PageSourceSearch

https://nationalcharitytodayawards.co.uk/assets/index-By78oqUp.js

js nationalcharitytodayawards.co.uk collected 2026-10-04 14:09:19 UTC 2,876,045 bytes, 2,115 lines download raw bytes

vendor: 3,886 bytes, lines 1-9
1var NQ=Object.defineProperty;var lT=e=>{throw TypeError(e)};var _Q=(e,t,r)=>t in e?NQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pa=(e,t,r)=>_Q(e,typeof t!="symbol"?t+"":t,r),Q2=(e,t,r)=>t.has(e)||lT("Cannot "+r);var Le=(e,t,r)=>(Q2(e,t,"read from private field"),r?r.call(e):t.get(e)),pn=(e,t,r)=>t.has(e)?lT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ut=(e,t,r,a)=>(Q2(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),Vn=(e,t,r)=>(Q2(e,t,"access private method"),r);var rb=(e,t,r,a)=>({set _(s){Ut(e,t,s,r)},get _(){return Le(e,t,a)}});function SQ(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(a,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var ab=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X2={exports:{}},Kx={},J2={exports:{}},ir={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var cT;function CQ(){if(cT)return ir;cT=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),u=Symbol.iterator;function f(H){return H===null||typeof H!="object"?null:(H=u&&H[u]||H["@@iterator"],typeof H=="function"?H:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,g={};function y(H,q,K){this.props=H,this.context=q,this.refs=g,this.updater=K||m}y.prototype.isReactComponent={},y.prototype.setState=function(H,q){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,q,"setState")},y.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function x(){}x.prototype=y.prototype;function w(H,q,K){this.props=H,this.context=q,this.refs=g,this.updater=K||m}var j=w.prototype=new x;j.constructor=w,b(j,y.prototype),j.isPureReactComponent=!0;var N=Array.isArray,_=Object.prototype.hasOwnProperty,S={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function T(H,q,K){var te,re={},Q=null,ne=null;if(q!=null)for(te in q.ref!==void 0&&(ne=q.ref),q.key!==void 0&&(Q=""+q.key),q)_.call(q,te)&&!A.hasOwnProperty(te)&&(re[te]=q[te]);var oe=arguments.length-2;if(oe===1)re.children=K;else if(1<oe){for(var ae=Array(oe),le=0;
vendor: 4,242 bytes, line 9
9le<oe;le++)ae[le]=arguments[le+2];re.children=ae}if(H&&H.defaultProps)for(te in oe=H.defaultProps,oe)re[te]===void 0&&(re[te]=oe[te]);return{$$typeof:e,type:H,key:Q,ref:ne,props:re,_owner:S.current}}function R(H,q){return{$$typeof:e,type:H.type,key:q,ref:H.ref,props:H.props,_owner:H._owner}}function M(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function k(H){var q={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(K){return q[K]})}var P=/\/+/g;function O(H,q){return typeof H=="object"&&H!==null&&H.key!=null?k(""+H.key):q.toString(36)}function F(H,q,K,te,re){var Q=typeof H;(Q==="undefined"||Q==="boolean")&&(H=null);var ne=!1;if(H===null)ne=!0;else switch(Q){case"string":case"number":ne=!0;break;case"object":switch(H.$$typeof){case e:case t:ne=!0}}if(ne)return ne=H,re=re(ne),H=te===""?"."+O(ne,0):te,N(re)?(K="",H!=null&&(K=H.replace(P,"$&/")+"/"),F(re,q,K,"",function(le){return le})):re!=null&&(M(re)&&(re=R(re,K+(!re.key||ne&&ne.key===re.key?"":(""+re.key).replace(P,"$&/")+"/")+H)),q.push(re)),1;if(ne=0,te=te===""?".":te+":",N(H))for(var oe=0;oe<H.length;oe++){Q=H[oe];var ae=te+O(Q,oe);ne+=F(Q,q,K,ae,re)}else if(ae=f(H),typeof ae=="function")for(H=ae.call(H),oe=0;!(Q=H.next()).done;)Q=Q.value,ae=te+O(Q,oe++),ne+=F(Q,q,K,ae,re);else if(Q==="object")throw q=String(H),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return ne}function $(H,q,K){if(H==null)return H;var te=[],re=0;return F(H,te,"","",function(Q){return q.call(K,Q,re++)}),te}function G(H){if(H._status===-1){var q=H._result;q=q(),q.then(function(K){(H._status===0||H._status===-1)&&(H._status=1,H._result=K)},function(K){(H._status===0||H._status===-1)&&(H._status=2,H._result=K)}),H._status===-1&&(H._status=0,H._result=q)}if(H._status===1)return H._result.default;throw H._result}var B={current:null},Y={transition:null},ee={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:Y,ReactCurrentOwner:S};function J(){throw Error("act(...) is not supported in production builds of React.")}return ir.Children={map:$,forEach:function(H,q,K){$(H,function(){q.apply(this,arguments)},K)},count:function(H){var q=0;return $(H,function(){q++}),q},toArray:function(H){return $(H,function(q){return q})||[]},only:function(H){if(!M(H))throw Error("React.Children.only expected to receive a single React element child.");return H}},ir.Component=y,ir.Fragment=r,ir.Profiler=s,ir.PureComponent=w,ir.StrictMode=a,ir.Suspense=c,ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,ir.act=J,ir.cloneElement=function(H,q,K){if(H==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+H+".");var te=b({},H.props),re=H.key,Q=H.ref,ne=H._owner;if(q!=null){if(q.ref!==void 0&&(Q=q.ref,ne=S.current),q.key!==void 0&&(re=""+q.key),H.type&&H.type.defaultProps)var oe=H.type.defaultProps;for(ae in q)_.call(q,ae)&&!A.hasOwnProperty(ae)&&(te[ae]=q[ae]===void 0&&oe!==void 0?oe[ae]:q[ae])}var ae=arguments.length-2;if(ae===1)te.children=K;else if(1<ae){oe=Array(ae);for(var le=0;le<ae;le++)oe[le]=arguments[le+2];te.children=oe}return{$$typeof:e,type:H.type,key:re,ref:Q,props:te,_owner:ne}},ir.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},H.Provider={$$typeof:i,_context:H},H.Consumer=H},ir.createElement=T,ir.createFactory=function(H){var q=T.bind(null,H);return q.type=H,q},ir.createRef=function(){return{current:null}},ir.forwardRef=function(H){return{$$typeof:l,render:H}},ir.isValidElement=M,ir.lazy=function(H){return{$$typeof:h,_payload:{_status:-1,_result:H},_init:G}},ir.memo=function(H,q){return{$$typeof:d,type:H,compare:q===void 0?null:q}},ir.startTransition=function(H){var q=Y.transition;Y.transition={};try{H()}finally{Y.transition=q}},ir.unstable_act=J,ir.useCallback=function(H,q){return B.current.useCallback(H,q)},ir.useContext=function(H){return B.current.useContext(H)},ir.useDebugValue=function(){},ir.useDeferredValue=function(H){return B.current.useDeferredValue(H)},ir.useEffect=function(H,q){return B.current.useEffect(H,q)}
vendor: 5,734 bytes, lines 9-25
9,ir.useId=function(){return B.current.useId()},ir.useImperativeHandle=function(H,q,K){return B.current.useImperativeHandle(H,q,K)},ir.useInsertionEffect=function(H,q){return B.current.useInsertionEffect(H,q)},ir.useLayoutEffect=function(H,q){return B.current.useLayoutEffect(H,q)},ir.useMemo=function(H,q){return B.current.useMemo(H,q)},ir.useReducer=function(H,q,K){return B.current.useReducer(H,q,K)},ir.useRef=function(H){return B.current.useRef(H)},ir.useState=function(H){return B.current.useState(H)},ir.useSyncExternalStore=function(H,q,K){return B.current.useSyncExternalStore(H,q,K)},ir.useTransition=function(){return B.current.useTransition()},ir.version="18.3.1",ir}var dT;function Hw(){return dT||(dT=1,J2.exports=CQ()),J2.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var uT;function AQ(){if(uT)return Kx;uT=1;var e=Hw(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,d){var h,u={},f=null,m=null;d!==void 0&&(f=""+d),c.key!==void 0&&(f=""+c.key),c.ref!==void 0&&(m=c.ref);for(h in c)a.call(c,h)&&!i.hasOwnProperty(h)&&(u[h]=c[h]);if(l&&l.defaultProps)for(h in c=l.defaultProps,c)u[h]===void 0&&(u[h]=c[h]);return{$$typeof:t,type:l,key:f,ref:m,props:u,_owner:s.current}}return Kx.Fragment=r,Kx.jsx=o,Kx.jsxs=o,Kx}var hT;function kQ(){return hT||(hT=1,X2.exports=AQ()),X2.exports}var n=kQ(),L=Hw();const we=Lr(L),kq=SQ({__proto__:null,default:we},[L]);var sb={},Z2={exports:{}},Jo={},eN={exports:{}},tN={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var fT;function PQ(){return fT||(fT=1,(function(e){function t(Y,ee){var J=Y.length;Y.push(ee);e:for(;0<J;){var H=J-1>>>1,q=Y[H];if(0<s(q,ee))Y[H]=ee,Y[J]=q,J=H;else break e}}function r(Y){return Y.length===0?null:Y[0]}function a(Y){if(Y.length===0)return null;var ee=Y[0],J=Y.pop();if(J!==ee){Y[0]=J;e:for(var H=0,q=Y.length,K=q>>>1;H<K;){var te=2*(H+1)-1,re=Y[te],Q=te+1,ne=Y[Q];if(0>s(re,J))Q<q&&0>s(ne,re)?(Y[H]=ne,Y[Q]=J,H=Q):(Y[H]=re,Y[te]=J,H=te);else if(Q<q&&0>s(ne,J))Y[H]=ne,Y[Q]=J,H=Q;else break e}}return ee}function s(Y,ee){var J=Y.sortIndex-ee.sortIndex;return J!==0?J:Y.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],h=1,u=null,f=3,m=!1,b=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(Y){for(var ee=r(d);ee!==null;){if(ee.callback===null)a(d);else if(ee.startTime<=Y)a(d),ee.sortIndex=ee.expirationTime,t(c,ee);else break;ee=r(d)}}function N(Y){if(g=!1,j(Y),!b)if(r(c)!==null)b=!0,G(_);else{var ee=r(d);ee!==null&&B(N,ee.startTime-Y)}}function _(Y,ee){b=!1,g&&(g=!1,x(T),T=-1),m=!0;var J=f;try{for(j(ee),u=r(c);u!==null&&(!(u.expirationTime>ee)||Y&&!k());){var H=u.callback;if(typeof H=="function"){u.callback=null,f=u.priorityLevel;var q=H(u.expirationTime<=ee);ee=e.unstable_now(),typeof q=="function"?u.callback=q:u===r(c)&&a(c),j(ee)}else a(c);u=r(c)}if(u!==null)var K=!0;else{var te=r(d);te!==null&&B(N,te.startTime-ee),K=!1}return K}finally{u=null,f=J,m=!1}}var S=!1,A=null,T=-1,R=5,M=-1;function k(){return!(e.unstable_now()-M<R)}function P(){if(A!==null){var Y=e.unstable_now();M=Y;var ee=!0;try{ee=A(!0,Y)}finally{ee?O():(S=!1,A=null)}}else S=!1}var O;if(typeof w=="function")O=function(){w(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,$=F.port2;F.port1.onmessage=P,O=function(){$.postMessage(null)}}else O=function(){y(P,0)};function G(Y){A=Y,S||(S=!0,O())}function B(Y,ee){T=y(function(){Y(e.unstable_now())},ee)}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(Y){Y.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,G(_))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(Y){switch(f){case 1:case 2:case 3:var ee=3;break;default:ee=f}var J=f;f=ee;try{return Y()}finally{f=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,ee){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var J=f;f=Y;try{return ee()}finally{f=J}},e.unstable_scheduleCallback=function(Y,ee,J){var H=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?H+J:H):J=H,Y){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=J+q,Y={id:h++,callback:ee,priorityLevel:Y,startTime:J,expirationTime:q,sortIndex:-1},J>H?(Y.sortIndex=J,t(d,Y),r(c)===null&&Y===r(d)&&(g?(x(T),T=-1):g=!0,B(N,J-H)
vendor: 4,485 bytes, lines 25-33
25)):(Y.sortIndex=q,t(c,Y),b||m||(b=!0,G(_))),Y},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(Y){var ee=f;return function(){var J=f;f=ee;try{return Y.apply(this,arguments)}finally{f=J}}}})(tN)),tN}var mT;function EQ(){return mT||(mT=1,eN.exports=PQ()),eN.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var pT;function TQ(){if(pT)return Jo;pT=1;var e=Hw(),t=EQ();function r(p){for(var v="https://reactjs.org/docs/error-decoder.html?invariant="+p,C=1;C<arguments.length;C++)v+="&args[]="+encodeURIComponent(arguments[C]);return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function i(p,v){o(p,v),o(p+"Capture",v)}function o(p,v){for(s[p]=v,p=0;p<v.length;p++)a.add(v[p])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},u={};function f(p){return c.call(u,p)?!0:c.call(h,p)?!1:d.test(p)?u[p]=!0:(h[p]=!0,!1)}function m(p,v,C,I){if(C!==null&&C.type===0)return!1;switch(typeof v){case"function":case"symbol":return!0;case"boolean":return I?!1:C!==null?!C.acceptsBooleans:(p=p.toLowerCase().slice(0,5),p!=="data-"&&p!=="aria-");default:return!1}}function b(p,v,C,I){if(v===null||typeof v>"u"||m(p,v,C,I))return!0;if(I)return!1;if(C!==null)switch(C.type){case 3:return!v;case 4:return v===!1;case 5:return isNaN(v);case 6:return isNaN(v)||1>v}return!1}function g(p,v,C,I,V,X,de){this.acceptsBooleans=v===2||v===3||v===4,this.attributeName=I,this.attributeNamespace=V,this.mustUseProperty=C,this.propertyName=p,this.type=v,this.sanitizeURL=X,this.removeEmptyString=de}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(p){y[p]=new g(p,0,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(p){var v=p[0];y[v]=new g(v,1,!1,p[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(p){y[p]=new g(p,2,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(p){y[p]=new g(p,2,!1,p,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(p){y[p]=new g(p,3,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(p){y[p]=new g(p,3,!0,p,null,!1,!1)}),["capture","download"].forEach(function(p){y[p]=new g(p,4,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(function(p){y[p]=new g(p,6,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(function(p){y[p]=new g(p,5,!1,p.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function w(p){return p[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
33-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(p){var v=p.replace(x,w);y[v]=new g(v,1,!1,p,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(p){var v=p.replace(x,w);y[v]=new g(v,1,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(p){var v=p.replace(x,w);y[v]=new g(v,1,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(p){y[p]=new g(p,1,!1,p.toLowerCase(),null,!1,!1)}),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(p){y[p]=new g(p,1,!1,p.toLowerCase(),null,!0,!0)});function j(p,v,C,I){var V=y.hasOwnProperty(v)?y[v]:null;(V!==null?V.type!==0:I||!(2<v.length)||v[0]!=="o"&&v[0]!=="O"||v[1]!=="n"&&v[1]!=="N")&&(b(v,C,V,I)&&(C=null),I||V===null?f(v)&&(C===null?p.removeAttribute(v):p.setAttribute(v,""+C)):V.mustUseProperty?p[V.propertyName]=C===null?V.type===3?!1:"":C:(v=V.attributeName,I=V.attributeNamespace,C===null?p.removeAttribute(v):(V=V.type,C=V===3||V===4&&C===!0?"":""+C,I?p.setAttributeNS(I,v,C):p.setAttribute(v,C))))}var N=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),S=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),k=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),Y=Symbol.iterator;function ee(p){return p===null||typeof p!="object"?null:(p=Y&&p[Y]||p["@@iterator"],typeof p=="function"?p:null)}var J=Object.assign,H;function q(p){if(H===void 0)try{throw Error()}catch(C){var v=C.stack.trim().match(/\n( *(at )?)/);H=v&&v[1]||""}return`
34`+H+p}var K=!1;function te(p,v){if(!p||K)return"";K=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(v)if(v=function(){throw Error()},Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(at){var I=at}Reflect.construct(p,[],v)}else{try{v.call()}catch(at){I=at}p.call(v.prototype)}else{try{throw Error()}catch(at){I=at}p()}}catch(at){if(at&&I&&typeof at.stack=="string"){for(var V=at.stack.split(`
35`),X=I.stack.split(`
36`),de=V.length-1,Oe=X.length-1;1<=de&&0<=Oe&&V[de]!==X[Oe];)Oe--;for(;1<=de&&0<=Oe;de--,Oe--)if(V[de]!==X[Oe]){if(de!==1||Oe!==1)do if(de--,Oe--,0>Oe||V[de]!==X[Oe]){var De=`
37`+V[de].replace(" at new "," at ");return p.displayName&&De.includes("<anonymous>")&&(De=De.replace("<anonymous>",p.displayName)),De}while(1<=de&&0<=Oe);break}}}finally{K=!1,Error.prepareStackTrace=C}return(p=p?p.displayName||p.name:"")?q(p):""}function re(p){switch(p.tag){case 5:return q(p.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return p=te(p.type,!1),p;case 11:return p=te(p.type.render,!1),p;case 1:return p=te(p.type,!0),p;default:return""}}function Q(p){if(p==null)return null;if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case A:return"Fragment";case S:return"Portal";case R:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case F:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case k:return(p.displayName||"Context")+".Consumer";case M:return(p._context.displayName||"Context")+".Provider";case P:var v=p.render;return p=p.displayName,p||(p=v.displayName||v.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case $:return v=p.displayName||null,v!==null?v:Q(p.type)||"Memo";case G:v=p._payload,p=p._init;try{return Q(p(v))}catch{}}return null}function ne(p){var v=p.type;switch(p.tag){case 24:return"Cache";case 9:return(v.displayName||"Context")+".Consumer";case 10:return(v._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return p=v.render,p=p.displayName||p.name||"",v.displayName||(p!==""?"ForwardRef("+p+")":"ForwardRef");case 7:return"Fragment";case 5:return v;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Q(v);case 8:return v===T?"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 v=="function")return v.displayName||v.name||null;if(typeof v=="string")return v}return null}function oe(p){switch(typeof p){case"boolean":case"number":case"string":case"undefined":return p;case"object":return p;default:return""}}function ae(p){var v=p.type;return(p=p.nodeName)&&p.toLowerCase()==="input"&&(v==="checkbox"||v==="radio")}function le(p){var v=ae(p)?"checked":"value",C=Object.getOwnPropertyDescriptor(p.constructor.prototype,v),I=""+p[v];if(!p.hasOwnProperty(v)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var V=C.get,X=C.set;return Object.defineProperty(p,v,{configurable:!0,get:function(){return V.call(this)},set:function(de){I=""+de,X.call(this,de)}}),Object.defineProperty(p,v,{enumerable:C.enumerable}),{getValue:function(){return I},setValue:function(de){I=""+de},stopTracking:function(){p._valueTracker=null,delete p[v]}}}}function je(p){p._valueTracker||(p._valueTracker=le(p))}function xe(p){if(!p)return!1;var v=p._valueTracker;if(!v)return!0;var C=v.getValue(),I="";return p&&(I=ae(p)?p.checked?"true":"false":p.value),p=I,p!==C?(v.setValue(p),!0):!1}
vendor: 5,205 bytes, line 37
37function Fe(p){if(p=p||(typeof document<"u"?document:void 0),typeof p>"u")return null;try{return p.activeElement||p.body}catch{return p.body}}function he(p,v){var C=v.checked;return J({},v,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:C??p._wrapperState.initialChecked})}function Ne(p,v){var C=v.defaultValue==null?"":v.defaultValue,I=v.checked!=null?v.checked:v.defaultChecked;C=oe(v.value!=null?v.value:C),p._wrapperState={initialChecked:I,initialValue:C,controlled:v.type==="checkbox"||v.type==="radio"?v.checked!=null:v.value!=null}}function ue(p,v){v=v.checked,v!=null&&j(p,"checked",v,!1)}function rt(p,v){ue(p,v);var C=oe(v.value),I=v.type;if(C!=null)I==="number"?(C===0&&p.value===""||p.value!=C)&&(p.value=""+C):p.value!==""+C&&(p.value=""+C);else if(I==="submit"||I==="reset"){p.removeAttribute("value");return}v.hasOwnProperty("value")?Pe(p,v.type,C):v.hasOwnProperty("defaultValue")&&Pe(p,v.type,oe(v.defaultValue)),v.checked==null&&v.defaultChecked!=null&&(p.defaultChecked=!!v.defaultChecked)}function Te(p,v,C){if(v.hasOwnProperty("value")||v.hasOwnProperty("defaultValue")){var I=v.type;if(!(I!=="submit"&&I!=="reset"||v.value!==void 0&&v.value!==null))return;v=""+p._wrapperState.initialValue,C||v===p.value||(p.value=v),p.defaultValue=v}C=p.name,C!==""&&(p.name=""),p.defaultChecked=!!p._wrapperState.initialChecked,C!==""&&(p.name=C)}function Pe(p,v,C){(v!=="number"||Fe(p.ownerDocument)!==p)&&(C==null?p.defaultValue=""+p._wrapperState.initialValue:p.defaultValue!==""+C&&(p.defaultValue=""+C))}var $e=Array.isArray;function Ve(p,v,C,I){if(p=p.options,v){v={};for(var V=0;V<C.length;V++)v["$"+C[V]]=!0;for(C=0;C<p.length;C++)V=v.hasOwnProperty("$"+p[C].value),p[C].selected!==V&&(p[C].selected=V),V&&I&&(p[C].defaultSelected=!0)}else{for(C=""+oe(C),v=null,V=0;V<p.length;V++){if(p[V].value===C){p[V].selected=!0,I&&(p[V].defaultSelected=!0);return}v!==null||p[V].disabled||(v=p[V])}v!==null&&(v.selected=!0)}}function be(p,v){if(v.dangerouslySetInnerHTML!=null)throw Error(r(91));return J({},v,{value:void 0,defaultValue:void 0,children:""+p._wrapperState.initialValue})}function We(p,v){var C=v.value;if(C==null){if(C=v.children,v=v.defaultValue,C!=null){if(v!=null)throw Error(r(92));if($e(C)){if(1<C.length)throw Error(r(93));C=C[0]}v=C}v==null&&(v=""),C=v}p._wrapperState={initialValue:oe(C)}}function Ze(p,v){var C=oe(v.value),I=oe(v.defaultValue);C!=null&&(C=""+C,C!==p.value&&(p.value=C),v.defaultValue==null&&p.defaultValue!==C&&(p.defaultValue=C)),I!=null&&(p.defaultValue=""+I)}function st(p){var v=p.textContent;v===p._wrapperState.initialValue&&v!==""&&v!==null&&(p.value=v)}function Mt(p){switch(p){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 Ht(p,v){return p==null||p==="http://www.w3.org/1999/xhtml"?Mt(v):p==="http://www.w3.org/2000/svg"&&v==="foreignObject"?"http://www.w3.org/1999/xhtml":p}var Yt,on=(function(p){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(v,C,I,V){MSApp.execUnsafeLocalFunction(function(){return p(v,C,I,V)})}:p})(function(p,v){if(p.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in p)p.innerHTML=v;else{for(Yt=Yt||document.createElement("div"),Yt.innerHTML="<svg>"+v.valueOf().toString()+"</svg>",v=Yt.firstChild;p.firstChild;)p.removeChild(p.firstChild);for(;v.firstChild;)p.appendChild(v.firstChild)}});function It(p,v){if(v){var C=p.firstChild;if(C&&C===p.lastChild&&C.nodeType===3){C.nodeValue=v;return}}p.textContent=v}var _t={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},xr=["Webkit","ms","Moz","O"];Object.keys(_t).forEach(function(p){xr.forEach(function(v){v=v+p.charAt(0).toUpperCase()+p.substring(1),_t[v]=_t[p]})});function xn(p,v,C){return v==null||typeof v=="boolean"||v===""?"":C||typeof v!="number"||v===0||_t.hasOwnProperty(p)&&_t[p]?(""+v).trim():v+"px"}function Rr(p,v){p=p.style;for(var C in v)if(v.hasOwnProperty(C)){var I=C.indexOf("--")===0,V=xn(C,v[C],I);C==="float"&&(C="cssFloat"),I?p.setProperty(C,V):p[C]=V}}var Wn=J({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 lr(p,v){if(v){if(Wn[p]&&(v.children!=null||v.dangerouslySetInnerHTML!=null))throw Error(r(137,p));if(v.dangerouslySetInnerHTML!=null){if(v.children!=null)throw Error(r(60));if(typeof v.dangerouslySetInnerHTML!="object"||!("__html"in v.dangerouslySetInnerHTML))throw Error(r(61))}if(v.style!=null&&typeof v.style!="object")throw Error(r(62))}}function Ha(p,v){if(p.indexOf("-")===-1)return typeof v.is=="str
37ing";switch(p){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 Rn=null;function ta(p){return p=p.target||p.srcElement||window,p.correspondingUseElement&&(p=p.correspondingUseElement),p.nodeType===3?p.parentNode:p}var fr=null,na=null,Ea=null;function Kn(p){if(p=ph(p)){if(typeof fr!="function")throw Error(r(280));var v=p.stateNode;v&&(v=Tf(v),fr(p.stateNode,p.type,v))}}function St(p){na?Ea?Ea.push(p):Ea=[p]:na=p}function hn(){if(na){var p=na,v=Ea;if(Ea=na=null,Kn(p),v)for(p=0;p<v.length;p++)Kn(v[p])}}function yr(p,v){return p(v)}function Gn(){}var da=!1;function cr(p,v,C){if(da)return p(v,C);da=!0;try{return yr(p,v,C)}finally{da=!1,(na!==null||Ea!==null)&&(Gn(),hn())}}function Dt(p,v){var C=p.stateNode;if(C===null)return null;var I=Tf(C);if(I===null)return null;C=I[v];e:switch(v){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(I=!I.disabled)||(p=p.type,I=!(p==="button"||p==="input"||p==="select"||p==="textarea")),p=!I;break e;default:p=!1}if(p)return null;if(C&&typeof C!="function")throw Error(r(231,v,typeof C));return C}var va=!1;if(l)try{var ar={};Object.defineProperty(ar,"passive",{get:function(){va=!0}}),window.addEventListener("test",ar,ar),window.removeEventListener("test",ar,ar)}catch{va=!1}function dr(p,v,C,I,V,X,de,Oe,De){var at=Array.prototype.slice.call(arguments,3);try{v.apply(C,at)}catch(jt){this.onError(jt)}}var jr=!1,Yn=null,Ta=!1,ro=null,hi={onError:function(p){jr=!0,Yn=p}};function ra(p,v,C,I,V,X,de,Oe,De){jr=!1,Yn=null,dr.apply(hi,arguments)}function ks(p,v,C,I,V,X,de,Oe,De){if(ra.apply(this,arguments),jr){if(jr){var at=Yn;jr=!1,Yn=null}else throw Error(r(198));Ta||(Ta=!0,ro=at)}}function ua(p){var v=p,C=p;if(p.alternate)for(;v.return;)v=v.return;else{p=v;do v=p,(v.flags&4098)!==0&&(C=v.return),p=v.return;while(p)}return v.tag===3?C:null}function Ps(p){if(p.tag===13){var v=p.memoizedState;if(v===null&&(p=p.alternate,p!==null&&(v=p.memoizedState)),v!==null)return v.dehydrated}return null}function xs(p){if(ua(p)!==p)throw Error(r(188))}function Ye(p){var v=p.alternate;if(!v){if(v=ua(p),v===null)throw Error(r(188));return v!==p?null:p}for(var C=p,I=v;;){var V=C.return;if(V===null)break;var X=V.alternate;if(X===null){if(I=V.return,I!==null){C=I;continue}break}if(V.child===X.child){for(X=V.child;X;){if(X===C)return xs(V),p;if(X===I)return xs(V),v;X=X.sibling}throw Error(r(188))}if(C.return!==I.return)C=V,I=X;else{for(var de=!1,Oe=V.child;Oe;){if(Oe===C){de=!0,C=V,I=X;break}if(Oe===I){de=!0,I=V,C=X;break}Oe=Oe.sibling}if(!de){for(Oe=X.child;Oe;){if(Oe===C){de=!0,C=X,I=V;break}if(Oe===I){de=!0,I=X,C=V;break}Oe=Oe.sibling}if(!de)throw Error(r(189))}}if(C.alternate!==I)throw Error(r(190))}if(C.tag!==3)throw Error(r(188));return C.stateNode.current===C?p:v}function nt(p){return p=Ye(p),p!==null?Vr(p):null}function Vr(p){if(p.tag===5||p.tag===6)return p;for(p=p.child;p!==null;){var v=Vr(p);if(v!==null)return v;p=p.sibling}return null}var aa=t.unstable_scheduleCallback,Da=t.unstable_cancelCallback,ur=t.unstable_shouldYield,fi=t.unstable_requestPaint,$n=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,Wt=t.unstable_ImmediatePriority,ys=t.unstable_UserBlockingPriority,Fa=t.unstable_NormalPriority,mi=t.unstable_LowPriority,Il=t.unstable_IdlePriority,ao=null,vs=null;function ol(p){if(vs&&typeof vs.onCommitFiberRoot=="function")try{vs.onCommitFiberRoot(ao,p,void 0,(p.current.flags&128)===128)}catch{}}var es=Math.clz32?Math.clz32:So,Qn=Math.log,Yr=Math.LN2;function So(p){return p>>>=0,p===0?32:31-(Qn(p)/Yr|0)|0}var Co=64,Ao=4194304;function ko(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function bs(p,v){var C=p.pendingLanes;if(C===0)return 0;var I=0,V=p.suspendedLanes,X=p.pingedLanes,de=C&268435455;if(de!==0){var Oe=de&~V;Oe!==0?I=ko(Oe):(X&=de,X!==0&&(I=ko(X)))}else de=C&~V,de!==0?I=ko(de):X!==0&&(I=ko(X));if(I===0)return 0;if(v!==0&&v!==I&&(v&V)===0&&(V=I&-I,X=v&-v,V>=X||V===16&&(X&4194240)!==0))return v;if((I&4)!==0&&(I|=C&16),v=p.entangledLanes,v!==0)for(p=p.entanglements,v&=I;0<v;)C=31-es(v),V=1<<C,I|=p[C],v&=~V;return I}function Po(p,v){switch(p){case 1:case 2:case 4:return v+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 v+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 Ks(p,v){for(var C=p.suspendedLanes,I=p.pingedLanes,V=p.expirationTimes,X=p.pendingLanes;0<X;){var de=31-es(X),Oe=1<<de,De=V[de];De===-1?((Oe&C)===0||(Oe&I)!==0)&&(V[de]=Po(Oe,v)):De<=v&&(p.expiredLanes|=Oe),X&=~Oe}}function Dl(p){return p=p.pendingLanes&-1073741825,p!==0?p:p&1073741824?1073741824:0}function Fl(){var p=Co;return Co<<=1,(Co&4194240)===0&&(Co=64),p}function uu(p){for(var v=[],C=0;31>C;
vendor: 16,803 bytes, line 37
37C++)v.push(p);return v}function ql(p,v,C){p.pendingLanes|=v,v!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,v=31-es(v),p[v]=C}function dh(p,v){var C=p.pendingLanes&~v;p.pendingLanes=v,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=v,p.mutableReadLanes&=v,p.entangledLanes&=v,v=p.entanglements;var I=p.eventTimes;for(p=p.expirationTimes;0<C;){var V=31-es(C),X=1<<V;v[V]=0,I[V]=-1,p[V]=-1,C&=~X}}function pd(p,v){var C=p.entangledLanes|=v;for(p=p.entanglements;C;){var I=31-es(C),V=1<<I;V&v|p[I]&v&&(p[I]|=v),C&=~V}}var sr=0;function Bl(p){return p&=-p,1<p?4<p?(p&268435455)!==0?16:536870912:4:1}var jc,Nc,$l,Eo,Ul,zl=!1,Mi=[],Ir=null,Gs=null,Ys=null,yn=new Map,ll=new Map,To=[],Xn="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 ba(p,v){switch(p){case"focusin":case"focusout":Ir=null;break;case"dragenter":case"dragleave":Gs=null;break;case"mouseover":case"mouseout":Ys=null;break;case"pointerover":case"pointerout":yn.delete(v.pointerId);break;case"gotpointercapture":case"lostpointercapture":ll.delete(v.pointerId)}}function Es(p,v,C,I,V,X){return p===null||p.nativeEvent!==X?(p={blockedOn:v,domEventName:C,eventSystemFlags:I,nativeEvent:X,targetContainers:[V]},v!==null&&(v=ph(v),v!==null&&Nc(v)),p):(p.eventSystemFlags|=I,v=p.targetContainers,V!==null&&v.indexOf(V)===-1&&v.push(V),p)}function cl(p,v,C,I,V){switch(v){case"focusin":return Ir=Es(Ir,p,v,C,I,V),!0;case"dragenter":return Gs=Es(Gs,p,v,C,I,V),!0;case"mouseover":return Ys=Es(Ys,p,v,C,I,V),!0;case"pointerover":var X=V.pointerId;return yn.set(X,Es(yn.get(X)||null,p,v,C,I,V)),!0;case"gotpointercapture":return X=V.pointerId,ll.set(X,Es(ll.get(X)||null,p,v,C,I,V)),!0}return!1}function fn(p){var v=Ad(p.target);if(v!==null){var C=ua(v);if(C!==null){if(v=C.tag,v===13){if(v=Ps(C),v!==null){p.blockedOn=v,Ul(p.priority,function(){$l(C)});return}}else if(v===3&&C.stateNode.current.memoizedState.isDehydrated){p.blockedOn=C.tag===3?C.stateNode.containerInfo:null;return}}}p.blockedOn=null}function gd(p){if(p.blockedOn!==null)return!1;for(var v=p.targetContainers;0<v.length;){var C=Li(p.domEventName,p.eventSystemFlags,v[0],p.nativeEvent);if(C===null){C=p.nativeEvent;var I=new C.constructor(C.type,C);Rn=I,C.target.dispatchEvent(I),Rn=null}else return v=ph(C),v!==null&&Nc(v),p.blockedOn=C,!1;v.shift()}return!0}function Dr(p,v,C){gd(p)&&C.delete(v)}function Hr(){zl=!1,Ir!==null&&gd(Ir)&&(Ir=null),Gs!==null&&gd(Gs)&&(Gs=null),Ys!==null&&gd(Ys)&&(Ys=null),yn.forEach(Dr),ll.forEach(Dr)}function dl(p,v){p.blockedOn===v&&(p.blockedOn=null,zl||(zl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hr)))}function Oo(p){function v(V){return dl(V,p)}if(0<Mi.length){dl(Mi[0],p);for(var C=1;C<Mi.length;C++){var I=Mi[C];I.blockedOn===p&&(I.blockedOn=null)}}for(Ir!==null&&dl(Ir,p),Gs!==null&&dl(Gs,p),Ys!==null&&dl(Ys,p),yn.forEach(v),ll.forEach(v),C=0;C<To.length;C++)I=To[C],I.blockedOn===p&&(I.blockedOn=null);for(;0<To.length&&(C=To[0],C.blockedOn===null);)fn(C),C.blockedOn===null&&To.shift()}var wa=N.ReactCurrentBatchConfig,ts=!0;function Qs(p,v,C,I){var V=sr,X=wa.transition;wa.transition=null;try{sr=1,pi(p,v,C,I)}finally{sr=V,wa.transition=X}}function ul(p,v,C,I){var V=sr,X=wa.transition;wa.transition=null;try{sr=4,pi(p,v,C,I)}finally{sr=V,wa.transition=X}}function pi(p,v,C,I){if(ts){var V=Li(p,v,C,I);if(V===null)kf(p,v,I,Vl,C),ba(p,I);else if(cl(V,p,v,C,I))I.stopPropagation();else if(ba(p,I),v&4&&-1<Xn.indexOf(p)){for(;V!==null;){var X=ph(V);if(X!==null&&jc(X),X=Li(p,v,C,I),X===null&&kf(p,v,I,Vl,C),X===V)break;V=X}V!==null&&I.stopPropagation()}else kf(p,v,I,null,C)}}var Vl=null;function Li(p,v,C,I){if(Vl=null,p=ta(I),p=Ad(p),p!==null)if(v=ua(p),v===null)p=null;else if(C=v.tag,C===13){if(p=Ps(v),p!==null)return p;p=null}else if(C===3){if(v.stateNode.current.memoizedState.isDehydrated)return v.tag===3?v.stateNode.containerInfo:null;p=null}else v!==p&&(p=null);return Vl=p,null}function Hl(p){switch(p){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(Ue()){case Wt:return 1;case ys:return 4;case Fa:case mi:return 16;case Il:return 536870912;default:return 16}default:return 16}}var Ts=null,ns=null,gi=null;function uh(){if(gi)return gi;var p,v=ns,C=v.length,I,V="value"in Ts?Ts.value:Ts.textContent,X=V.length;for(p=0;p<C&&v[p]===V[p];p++);var de=C-p;for(I=1;I<=de&&v[C-I]===V[X-I];I++);return gi=V.slice(p,1<I?1-I:void 0)}function Oa(p){var v=p.keyCode;return"charCode"in p?(p=p.charCode,p===0&&v===13&&(p=13)):p=v,p===10&&(p=13),32<=p||p===13?p:0}function Xs(){return!0}function Js(){return!1}function qa(p){function v(C,I,V,X,de){this._reactName=C,this._targetInst=V,this.type=I,this.nativeEvent=X,this.target=de,this.currentTarget=null;for(var Oe in p)p.hasOwnProperty(Oe)&&(C=p[Oe],this[Oe]=C?C(X):X[Oe]);return this.isDefaultPrevented=(X.defaultPrevented!=null?X.defaultPrevented:X.returnValue===!1)?Xs:Js,this.isPropagationStopped=Js,this}return J(v.prototype,{preventDefault:function(){this.defaultPrevented=!0;var C=this.nativeEvent;C&&(C.preventDefault?C.preventDefault():typeof C.returnValue!="unknown"&&(C.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var C=this.nativeEvent;C&&(C.stopPropagation?C.stopPropagation():typeof C.cancelBubble!="unknown"&&(C.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),v}var so={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(p){return p.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ri=qa(so),_c=J({},so,{view:0,detail:0}),Wl=qa(_c),io,xd,Mo,Lo=J({},_c,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qt,button:0,buttons:0,relatedTarget:function(p){return p.relatedTarget===void 0?p.fromElement===p.srcElement?p.toElement:p.fromElement:p.relatedTarget},movementX:function(p){return"movementX"in p?p.movementX:(p!==Mo&&(Mo&&p.type==="mousemove"?(io=p.screenX-Mo.screenX,xd=p.screenY-Mo.screenY):xd=io=0,Mo=p),io)},movementY:function(p){return"movementY"in p?p.movementY:xd}}),Kl=qa(Lo),yd=J({},Lo,{dataTransfer:0}),_f=qa(yd),hl=J({},_c,{relatedTarget:0}),Ii=qa(hl),hu=J({},so,{animationName:0,elapsedTime:0,pseudoElement:0}),Ro=qa(hu),fu=J({},so,{clipboardData:function(p){return"clipboardData"in p?p.clipboardData:window.clipboardData}}),z=qa(fu),ie=J({},so,{data:0}),Ee=qa(ie),Re={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qe={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"},ot={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vt(p){var v=this.nativeEvent;return v.getModifierState?v.getModifierState(p):(p=ot[p])?!!v[p]:!1}function qt(){return vt}var un=J({},_c,{key:function(p){if(p.key){var v=Re[p.key]||p.key;if(v!=="Unidentified")return v}return p.type==="keypress"?(p=Oa(p),p===13?"Enter":String.fromCharCode(p)):p.type==="keydown"||p.type==="keyup"?Qe[p.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qt,charCode:function(p){return p.type==="keypress"?Oa(p):0},keyCode:function(p){return p.type==="keydown"||p.type==="keyup"?p.keyCode:0},which:function(p){return p.type==="keypress"?Oa(p):p.type==="keydown"||p.type==="keyup"?p.keyCode:0}}),On=qa(un),gn=J({},Lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jn=qa(gn),sa=J({},_c,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qt}),ha=qa(sa),Ma=J({},so,{propertyName:0,elapsedTime:0,pseudoElement:0}),rs=qa(Ma),La=J({},Lo,{deltaX:function(p){return"deltaX"in p?p.deltaX:"wheelDeltaX"in p?-p.wheelDeltaX:0},deltaY:function(p){return"deltaY"in p?p.deltaY:"wheelDeltaY"in p?-p.wheelDeltaY:"wheelDelta"in p?-p.wheelDelta:0},deltaZ:0,deltaMode:0}),oo=qa(La),Os=[9,13,27,32],Zs=l&&"CompositionEvent"in window,Io=null;l&&"documentMode"in document&&(Io=document.documentMode);var mu=l&&"TextEvent"in window&&!Io,Ms=l&&(!Zs||Io&&8<Io&&11>=Io),lo=" ",fl=!1;function vd(p,v){switch(p){case"keyup":return Os.indexOf(v.keyCode)!==-1;case"keydown":return v.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sc(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var fa=!1;function bd(p,v){switch(p){case"compositionend":return Sc(v);case"keypress":return v.which!==32?null:(fl=!0,lo);case"textInput":return p=v.data,p===lo&&fl?null:p;default:return null}}function Cc(p,v){if(fa)return p==="compositionend"||!Zs&&vd(p,v)?(p=uh(),gi=ns=Ts=null,fa=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(v.ctrlKey||v.altKey||v.metaKey)||v.ctrlKey&&v.altKey){if(v.char&&1<v.char.length)return v.char;if(v.which)return String.fromCharCode(v.which)}return null;case"compositionend":return Ms&&v.locale!=="ko"?null:v.data;default:return null}}var wd={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 jd(p){var v=p&&p.nodeName&&p.nodeName.toLowerCase();return v==="input"?!!wd[p.type]:v==="textarea"}function Ls(p,v,C,I){St(I),v=ip(v,"onChange"),0<v.length&&(C=new Ri("onChange","change",null,C,I),p.push({event:C,listeners:v}))}var Ac=null,Do=null;function pu(p){Cf(p,0)}function Rs(p){var v=vu(p);if(xe(v))return p}function Nd(p,v){if(p==="change")return v}var kc=!1;if(l){var _d;if(l){var Fo="oninput"in document;if(!Fo){var Gl=document.createElement("div");Gl.setAttribute("oninput","return;"),Fo=typeof Gl.oninput=="function"}_d=Fo}else _d=!1;kc=_d&&(!document.documentMode||9<document.documentMode)}function Is(){Ac&&(Ac.detachEvent("onpropertychange",as),Do=Ac=null)}function as(p){if(p.propertyName==="value"&&Rs(Do)){var v=[];Ls(v,Do,p,ta(p)),cr(pu,v)}}function Yl(p,v,C){p==="focusin"?(Is(),Ac=v,Do=C,Ac.attachEvent("onpropertychange",as)):p==="focusout"&&Is()}function ml(p){if(p==="selectionchange"||p==="keyup"||p==="keydown")return Rs(Do)}function pl(p,v){if(p==="click")return Rs(v)}function Sd(p,v){if(p==="input"||p==="change")return Rs(v)}function Ql(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var Un=typeof Object.is=="function"?Object.is:Ql;function qo(p,v){if(Un(p,v))return!0;if(typeof p!="object"||p===null||typeof v!="object"||v===null)return!1;var C=Object.keys(p),I=Object.keys(v);if(C.length!==I.length)return!1;for(I=0;I<C.length;I++){var V=C[I];if(!c.call(v,V)||!Un(p[V],v[V]))return!1}return!0}function ss(p){for(;p&&p.firstChild;)p=p.firstChild;return p}function xi(p,v){var C=ss(p);p=0;for(var I;C;){if(C.nodeType===3){if(I=p+C.textContent.length,p<=v&&I>=v)return{node:C,offset:v-p};p=I}e:{for(;C;){if(C.nextSibling){C=C.nextSibling;break e}C=C.parentNode}C=void 0}C=ss(C)}}function Pc(p,v){return p&&v?p===v?!0:p&&p.nodeType===3?!1:v&&v.nodeType===3?Pc(p,v.parentNode):"contains"in p?p.contains(v):p.compareDocumentPosition?!!(p.compareDocumentPosition(v)&16):!1:!1}function ei(){for(var p=window,v=Fe();v instanceof p.HTMLIFrameElement;){try{var C=typeof v.contentWindow.location.href=="string"}catch{C=!1}if(C)p=v.contentWindow;else break;v=Fe(p.document)}return v}function Xl(p){var v=p&&p.nodeName&&p.nodeName.toLowerCase();return v&&(v==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||v==="textarea"||p.contentEditable==="true")}function Jl(p){var v=ei(),C=p.focusedElem,I=p.selectionRange;if(v!==C&&C&&C.ownerDocument&&Pc(C.ownerDocument.documentElement,C)){if(I!==null&&Xl(C)){if(v=I.start,p=I.end,p===void 0&&(p=v),"selectionStart"in C)C.selectionStart=v,C.selectionEnd=Math.min(p,C.value.length);else if(p=(v=C.ownerDocument||document)&&v.defaultView||window,p.getSelection){p=p.getSelection();var V=C.textContent.length,X=Math.min(I.start,V);I=I.end===void 0?X:Math.min(I.end,V),!p.extend&&X>I&&(V=I,I=X,X=V),V=xi(C,X);var de=xi(C,I);V&&de&&(p.rangeCount!==1||p.anchorNode!==V.node||p.anchorOffset!==V.offset||p.focusNode!==de.node||p.focusOffset!==de.offset)&&(v=v.createRange(),v.setStart(V.node,V.offset),p.removeAllRanges(),X>I?(p.addRange(v),p.extend(de.node,de.offset)):(v.setEnd(de.node,de.offset),p.addRange(v)))}}for(v=[],p=C;p=p.parentNode;)p.nodeType===1&&v.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<v.length;C++)p=v[C],p.element.scrollLeft=p.left,p.element.scrollTop=p.top}}var Ec=l&&"documentMode"in document&&11>=document.documentMode,Ds=null,gl=null,Bo=null,$o=!1;function Uo(p,v,C){var I=C.window===C?C.document:C.nodeType===9?C:C.ownerDocument;$o||Ds==null||Ds!==Fe(I)||(I=Ds,"selectionStart"in I&&Xl(I)?I={start:I.selectionStart,end:I.selectionEnd}:(I=(I.ownerDocument&&I.ownerDocument.defaultView||window).getSelection(),I={anchorNode:I.anchorNode,anchorOffset:I.anchorOffset,focusNode:I.focusNode,focusOffset:I.focusOffset}),Bo&&qo(Bo,I)||(Bo=I,I=ip(gl,"onSelect"),0<I.length&&(v=new Ri("onSelect","select",null,v,C),p.push({event:v,listeners:I}),v.target=Ds)))}function xl(p,v){var C={};return C[p.toLowerCase()]=v.toLowerCase(),C["Webkit"+p]="webkit"+v,C["Moz"+p]="moz"+v,C}var Wa={animationend:xl("Animation","AnimationEnd"),animationiteration:xl("Animation","AnimationIteration"),animationstart:xl("Animation","AnimationStart"),transitionend:xl("Transition","TransitionEnd")},U={},ke={};l&&(ke=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function ze(p){if(U[p])return U[p];if(!Wa[p])return p;var v=Wa[p],C;for(C in v)if(v.hasOwnProperty(C)&&C in ke)return U[p]=v[C];return p}var wt=ze("animationend"),kt=ze("animationiteration"),zt=ze("animationstart"),Zn=ze("transitionend"),ja=new Map,co="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 Cr(p,v){ja.set(p,v),i(v,[p])}for(var zn=0;zn<co.length;zn++){var yi=co[zn],zo=yi.toLowerCase(),ap=yi[0].toUpperCase()+yi.slice(1);Cr(zo,"on"+ap)}Cr(wt,"onAnimationEnd"),Cr(kt,"onAnimationIteration"),Cr(zt,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(Zn,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cd="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(" "),Nv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cd));function Sf(p,v,C){var I=p.type||"unknown-event";p.currentTarget=C,ks(I,v,void 0,p),p.currentTarget=null}function Cf(p,v){v=(v&4)!==0;for(var C=0;C<p.length;C++){var I=p[C],V=I.event;I=I.listeners;e:{var X=void 0;if(v)for(var de=I.length-1;0<=de;de--){var Oe=I[de],De=Oe.instance,at=Oe.currentTarget;if(Oe=Oe.listener,De!==X&&V.isPropagationStopped())break e;Sf(V,Oe,at),X=De}else for(de=0;de<I.length;de++){if(Oe=I[de],De=Oe.instance,at=Oe.currentTarget,Oe=Oe.listener,De!==X&&V.isPropagationStopped())break e;Sf(V,Oe,at),X=De}}}if(Ta)throw p=ro,Ta=!1,ro=null,p}function Wr(p,v){var C=v[Fi];C===void 0&&(C=v[Fi]=new Set);var I=p+"__bubble";C.has(I)||(Af(v,p,2,!1),C.add(I))}function sp(p,v,C){var I=0;v&&(I|=4),Af(C,p,I,v)}var hh="_reactListening"+Math.random().toString(36).slice(2);function gu(p){if(!p[hh]){p[hh]=!0,a.forEach(function(C){C!=="selectionchange"&&(Nv.has(C)||sp(C,!1,p),sp(C,!0,p))});var v=p.nodeType===9?p:p.ownerDocument;v===null||v[hh]||(v[hh]=!0,sp("selectionchange",!1,v))}}function Af(p,v,C,I){switch(Hl(v)){case 1:var V=Qs;break;case 4:V=ul;break;default:V=pi}C=V.bind(null,v,C,p),V=void 0,!va||v!=="touchstart"&&v!=="touchmove"&&v!=="wheel"||(V=!0),I?V!==void 0?p.addEventListener(v,C,{capture:!0,passive:V}):p.addEventListener(v,C,!0):V!==void 0?p.addEventListener(v,C,{passive:V}):p.addEventListener(v,C,!1)}function kf(p,v,C,I,V){var X=I;if((v&1)===0&&(v&2)===0&&I!==null)e:for(;;){if(I===null)return;var de=I.tag;if(de===3||de===4){var Oe=I.stateNode.containerInfo;if(Oe===V||Oe.nodeType===8&&Oe.parentNode===V)break;if(de===4)for(de=I.return;de!==null;){var De=de.tag;if((De===3||De===4)&&(De=de.stateNode.containerInfo,De===V||De.nodeType===8&&De.parentNode===V))return;de=de.return}for(;Oe!==null;){if(de=Ad(Oe),de===null)return;if(De=de.tag,De===5||De===6){I=X=de;continue e}Oe=Oe.parentNode}}I=I.return}cr(function(){var at=X,jt=ta(C),At=[];e:{var bt=ja.get(p);if(bt!==void 0){var Vt=Ri,tn=p;switch(p){case"keypress":if(Oa(C)===0)break e;case"keydown":case"keyup":Vt=On;break;case"focusin":tn="focus",Vt=Ii;break;case"focusout":tn="blur",Vt=Ii;break;case"beforeblur":case"afterblur":Vt=Ii;break;case"click":if(C.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Vt=Kl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Vt=_f;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Vt=ha;break;case wt:case kt:case zt:Vt=Ro;break;case Zn:Vt=rs;break;case"scroll":Vt=Wl;break;case"wheel":Vt=oo;break;case"copy":case"cut":case"paste":Vt=z;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Vt=Jn}var sn=(v&4)!==0,cs=!sn&&p==="scroll",et=sn?bt!==null?bt+"Capture":null:bt;sn=[];for(var He=at,tt;He!==null;){tt=He;var Et=tt.stateNode;if(tt.tag===5&&Et!==null&&(tt=Et,et!==null&&(Et=Dt(He,et),Et!=null&&sn.push(Pf(He,Et,tt)))),cs)break;He=He.return}0<sn.length&&(bt=new Vt(bt,tn,null,C,jt),At.push({event:bt,listeners:sn}))}}if((v&7)===0){e:{if(bt=p==="mouseover"||p==="pointerover",Vt=p==="mouseout"||p==="pointerout",bt&&C!==Rn&&(tn=C.relatedTarget||C.fromElement)&&(Ad(tn)||tn[ti]))break e;if((Vt||bt)&&(bt=jt.window===jt?jt:(bt=jt.ownerDocument)?bt.defaultView||bt.parentWindow:window,Vt?(tn=C.relatedTarget||C.toElement,Vt=at,tn=tn?Ad(tn):null,tn!==null&&(cs=ua(tn),tn!==cs||tn.tag!==5&&tn.tag!==6)&&(tn=null)):(Vt=null,tn=at),Vt!==tn)){if(sn=Kl,Et="onMouseLeave",et="onMouseEnter",He="mouse",(p==="pointerout"||p==="pointerover")&&(sn=Jn,Et="onPointerLeave",et="onPointerEnter",He="pointer"),cs=Vt==null?bt:vu(Vt),tt=tn==null?bt:vu(tn),bt=new sn(Et,He+"leave",Vt,C,jt),bt.target=cs,bt.relatedTarget=tt,Et=null,Ad(jt)===at&&(sn=new sn(et,He+"enter",tn,C,jt),sn.target=tt,sn.relatedTarget=cs,Et=sn),cs=Et,Vt&&tn)t:{for(sn=Vt,et=tn,He=0,tt=sn;tt;tt=xu(tt))He++;for(tt=0,Et=et;Et;Et=xu(Et))tt++;for(;0<He-tt;)sn=xu(sn),He--;for(;0<tt-He;)et=xu(et),tt--;for(;He--;){if(sn===et||et!==null&&sn===et.alternate)break t;sn=xu(sn),et=xu(et)}sn=null}else sn=null;Vt!==null&&_v(At,bt,Vt,sn,!1),tn!==null&&cs!==null&&_v(At,cs,tn,sn,!0)}}
vendor: 8,083 bytes, lines 37-38
37e:{if(bt=at?vu(at):window,Vt=bt.nodeName&&bt.nodeName.toLowerCase(),Vt==="select"||Vt==="input"&&bt.type==="file")var dn=Nd;else if(jd(bt))if(kc)dn=Sd;else{dn=ml;var wn=Yl}else(Vt=bt.nodeName)&&Vt.toLowerCase()==="input"&&(bt.type==="checkbox"||bt.type==="radio")&&(dn=pl);if(dn&&(dn=dn(p,at))){Ls(At,dn,C,jt);break e}wn&&wn(p,bt,at),p==="focusout"&&(wn=bt._wrapperState)&&wn.controlled&&bt.type==="number"&&Pe(bt,"number",bt.value)}switch(wn=at?vu(at):window,p){case"focusin":(jd(wn)||wn.contentEditable==="true")&&(Ds=wn,gl=at,Bo=null);break;case"focusout":Bo=gl=Ds=null;break;case"mousedown":$o=!0;break;case"contextmenu":case"mouseup":case"dragend":$o=!1,Uo(At,C,jt);break;case"selectionchange":if(Ec)break;case"keydown":case"keyup":Uo(At,C,jt)}var jn;if(Zs)e:{switch(p){case"compositionstart":var Mn="onCompositionStart";break e;case"compositionend":Mn="onCompositionEnd";break e;case"compositionupdate":Mn="onCompositionUpdate";break e}Mn=void 0}else fa?vd(p,C)&&(Mn="onCompositionEnd"):p==="keydown"&&C.keyCode===229&&(Mn="onCompositionStart");Mn&&(Ms&&C.locale!=="ko"&&(fa||Mn!=="onCompositionStart"?Mn==="onCompositionEnd"&&fa&&(jn=uh()):(Ts=jt,ns="value"in Ts?Ts.value:Ts.textContent,fa=!0)),wn=ip(at,Mn),0<wn.length&&(Mn=new Ee(Mn,p,null,C,jt),At.push({event:Mn,listeners:wn}),jn?Mn.data=jn:(jn=Sc(C),jn!==null&&(Mn.data=jn)))),(jn=mu?bd(p,C):Cc(p,C))&&(at=ip(at,"onBeforeInput"),0<at.length&&(jt=new Ee("onBeforeInput","beforeinput",null,C,jt),At.push({event:jt,listeners:at}),jt.data=jn))}Cf(At,v)})}function Pf(p,v,C){return{instance:p,listener:v,currentTarget:C}}function ip(p,v){for(var C=v+"Capture",I=[];p!==null;){var V=p,X=V.stateNode;V.tag===5&&X!==null&&(V=X,X=Dt(p,C),X!=null&&I.unshift(Pf(p,X,V)),X=Dt(p,v),X!=null&&I.push(Pf(p,X,V))),p=p.return}return I}function xu(p){if(p===null)return null;do p=p.return;while(p&&p.tag!==5);return p||null}function _v(p,v,C,I,V){for(var X=v._reactName,de=[];C!==null&&C!==I;){var Oe=C,De=Oe.alternate,at=Oe.stateNode;if(De!==null&&De===I)break;Oe.tag===5&&at!==null&&(Oe=at,V?(De=Dt(C,X),De!=null&&de.unshift(Pf(C,De,Oe))):V||(De=Dt(C,X),De!=null&&de.push(Pf(C,De,Oe)))),C=C.return}de.length!==0&&p.push({event:v,listeners:de})}var d2=/\r\n?/g,u2=/\u0000|\uFFFD/g;function Sv(p){return(typeof p=="string"?p:""+p).replace(d2,`
38`).replace(u2,"")}function op(p,v,C){if(v=Sv(v),Sv(p)!==v&&C)throw Error(r(425))}function fh(){}var Ef=null,yu=null;function Ex(p,v){return p==="textarea"||p==="noscript"||typeof v.children=="string"||typeof v.children=="number"||typeof v.dangerouslySetInnerHTML=="object"&&v.dangerouslySetInnerHTML!==null&&v.dangerouslySetInnerHTML.__html!=null}var Tx=typeof setTimeout=="function"?setTimeout:void 0,Cv=typeof clearTimeout=="function"?clearTimeout:void 0,Av=typeof Promise=="function"?Promise:void 0,h2=typeof queueMicrotask=="function"?queueMicrotask:typeof Av<"u"?function(p){return Av.resolve(null).then(p).catch(f2)}:Tx;function f2(p){setTimeout(function(){throw p})}function Ox(p,v){var C=v,I=0;do{var V=C.nextSibling;if(p.removeChild(C),V&&V.nodeType===8)if(C=V.data,C==="/$"){if(I===0){p.removeChild(V),Oo(v);return}I--}else C!=="$"&&C!=="$?"&&C!=="$!"||I++;C=V}while(C);Oo(v)}function vi(p){for(;p!=null;p=p.nextSibling){var v=p.nodeType;if(v===1||v===3)break;if(v===8){if(v=p.data,v==="$"||v==="$!"||v==="$?")break;if(v==="/$")return null}}return p}function Vo(p){p=p.previousSibling;for(var v=0;p;){if(p.nodeType===8){var C=p.data;if(C==="$"||C==="$!"||C==="$?"){if(v===0)return p;v--}else C==="/$"&&v++}p=p.previousSibling}return null}var Di=Math.random().toString(36).slice(2),Zl="__reactFiber$"+Di,mh="__reactProps$"+Di,ti="__reactContainer$"+Di,Fi="__reactEvents$"+Di,m2="__reactListeners$"+Di,p2="__reactHandles$"+Di;function Ad(p){var v=p[Zl];if(v)return v;for(var C=p.parentNode;C;){if(v=C[ti]||C[Zl]){if(C=v.alternate,v.child!==null||C!==null&&C.child!==null)for(p=Vo(p);p!==null;){if(C=p[Zl])return C;p=Vo(p)}return v}p=C,C=p.parentNode}return null}function ph(p){return p=p[Zl]||p[ti],!p||p.tag!==5&&p.tag!==6&&p.tag!==13&&p.tag!==3?null:p}function vu(p){if(p.tag===5||p.tag===6)return p.stateNode;throw Error(r(33))}function Tf(p){return p[mh]||null}var Mx=[],Tc=-1;function yl(p){return{current:p}}function Tr(p){0>Tc||(p.current=Mx[Tc],Mx[Tc]=null,Tc--)}function Fr(p,v){Tc++,Mx[Tc]=p.current,p.current=v}var kd={},Fs=yl(kd),qi=yl(!1),bu=kd;function gh(p,v){var C=p.type.contextTypes;if(!C)return kd;var I=p.stateNode;if(I&&I.__reactInternalMemoizedUnmaskedChildContext===v)return I.__reactInternalMemoizedMaskedChildContext;var V={},X;for(X in C)V[X]=v[X];return I&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=v,p.__reactInternalMemoizedMaskedChildContext=V),V}function Bi(p){return p=p.childContextTypes,p!=null}function lp(){Tr(qi),Tr(Fs)}function kv(p,v,C){if(Fs.current!==kd)throw Error(r(168));Fr(Fs,v),Fr(qi,C)}function Lx(p,v,C){var I=p.stateNode;if(v=v.childContextTypes,typeof I.getChildContext!="function")return C;I=I.getChildContext();for(var V in I)if(!(V in v))throw Error(r(108,ne(p)||"Unknown",V));return J({},C,I)}function wu(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||kd,bu=Fs.current,Fr(Fs,p),Fr(qi,qi.current),!0}function Pv(p,v,C){var I=p.stateNode;if(!I)throw Error(r(169));C?(p=Lx(p,v,bu),I.__reactInternalMemoizedMergedChildContext=p,Tr(qi),Tr(Fs),Fr(Fs,p)):Tr(qi),Fr(qi,C)}var Oc=null,Of=!1,E=!1;function D(p){Oc===null?Oc=[p]:Oc.push(p)}function W(p){Of=!0,D(p)}function Z(){if(!E&&Oc!==null){E=!0;var p=0,v=sr;try{var C=Oc;for(sr=1;p<C.length;p++){var I=C[p];do I=I(!0);while(I!==null)}Oc=null,Of=!1}catch(V){throw Oc!==null&&(Oc=Oc.slice(p+1)),aa(Wt,Z),V}finally{sr=v,E=!1}}return null}var se=[],ce=0,fe=null,ge=0,ve=[],Se=0,Ie=null,Xe=1,Je="";function Ke(p,v){se[ce++]=ge,se[ce++]=fe,fe=p,ge=v}function pt(p,v,C){ve[Se++]=Xe,ve[Se++]=Je,ve[Se++]=Ie,Ie=p;var I=Xe;p=Je;var V=32-es(I)-1;I&=~(1<<V),C+=1;var X=32-es(v)+V;if(30<X){var de=V-V%5;X=(I&(1<<de)-1).toString(32),I>>=de,V-=de,Xe=1<<32-es(v)+V|C<<V|I,Je=X+p}else Xe=1<<X|C<<V|I,Je=p}function it(p){p.return!==null&&(Ke(p,1),pt(p,1,0))}function qe(p){for(;p===fe;)fe=se[--ce],se[ce]=null,ge=se[--ce],se[ce]=null;for(;p===Ie;)Ie=ve[--Se],ve[Se]=null,Je=ve[--Se],ve[Se]=null,Xe=ve[--Se],ve[Se]=null}var Be=null,ut=null,ct=!1,ft=null;function $t(p,v){var C=sc(5,null,null,0);C.elementType="DELETED",C.stateNode=v,C.return=p,v=p.deletions,v===null?(p.deletions=[C],p.flags|=16):v.push(C)}function Lt(p,v){switch(p.tag){case 5:var C=p.type;return v=v.nodeType!==1||C.toLowerCase()!==v.nodeName.toLowerCase()?null:v,v!==null?(p.stateNode=v,Be=p,ut=vi(v.firstChild),!0):!1;case 6:return v=p.pendingProps===""||v.nodeType!==3?null:v,v!==null?(p.stateNode=v,Be=p,ut=null,!0):!1;case 13:return v=v.nodeType!==8?null:v,v!==null?(C=Ie!==null?{id:Xe,overflow:Je}:null,p.memoizedState={dehydrated:v,treeContext:C,retryLane:1073741824},C=sc(18,null,null,0),C.stateNode=v,C.return=p,p.child=C,Be=p,ut=null,!0):!1;default:return!1}}function mn(p){return(p.mode&1)!==0&&(p.flags&128)===0}function Ft(p){if(ct){var v=ut;if(v){var C=v;if(!Lt(p,v)){if(mn(p))throw Error(r(418));v=vi(C.nextSibling);var I=Be;v&&Lt(p,v)?$t(I,C):(p.flags=p.flags&-4097|2,ct=!1,Be=p)}}else{if(mn(p))throw Error(r(418));p.flags=p.flags&-4097|2,ct=!1,Be=p}}}function vr(p){for(p=p.return;p!==null&&p.tag!==5&&p.tag!==3&&p.tag!==13;)p=p.return;Be=p}function br(p){if(p!==Be)return!1;if(!ct)return vr(p),ct=!0,!1;var v;if((v=p.tag!==3)&&!(v=p.tag!==5)&&(v=p.type,v=v!=="head"&&v!=="body"&&!Ex(p.type,p.memoizedProps)),v&&(v=ut)){if(mn(p))throw hr(),Error(r(418));for(;v;)$t(p,v),v=vi(v.nextSibling)}if(vr(p),p.tag===13){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));e:{for(p=p.nextSibling,v=0;p;){if(p.nodeType===8){var C=p.data;if(C==="/$"){if(v===0){ut=vi(p.nextSibling);break e}v--}else C!=="$"&&C!=="$!"&&C!=="$?"||v++}p=p.nextSibling}ut=null}}else ut=Be?vi(p.stateNode.nextSibling):null;return!0}function hr(){for(var p=ut;p;)p=vi(p.nextSibling)}function Dn(){ut=Be=null,ct=!1}function Or(p){ft===null?ft=[p]:ft.push(p)}var qr=N.ReactCurrentBatchConfig;
vendor: 4,679 bytes, line 38
38function Tn(p,v,C){if(p=C.ref,p!==null&&typeof p!="function"&&typeof p!="object"){if(C._owner){if(C=C._owner,C){if(C.tag!==1)throw Error(r(309));var I=C.stateNode}if(!I)throw Error(r(147,p));var V=I,X=""+p;return v!==null&&v.ref!==null&&typeof v.ref=="function"&&v.ref._stringRef===X?v.ref:(v=function(de){var Oe=V.refs;de===null?delete Oe[X]:Oe[X]=de},v._stringRef=X,v)}if(typeof p!="string")throw Error(r(284));if(!C._owner)throw Error(r(290,p))}return p}function Na(p,v){throw p=Object.prototype.toString.call(v),Error(r(31,p==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":p))}function bi(p){var v=p._init;return v(p._payload)}function Ba(p){function v(et,He){if(p){var tt=et.deletions;tt===null?(et.deletions=[He],et.flags|=16):tt.push(He)}}function C(et,He){if(!p)return null;for(;He!==null;)v(et,He),He=He.sibling;return null}function I(et,He){for(et=new Map;He!==null;)He.key!==null?et.set(He.key,He):et.set(He.index,He),He=He.sibling;return et}function V(et,He){return et=kh(et,He),et.index=0,et.sibling=null,et}function X(et,He,tt){return et.index=tt,p?(tt=et.alternate,tt!==null?(tt=tt.index,tt<He?(et.flags|=2,He):tt):(et.flags|=2,He)):(et.flags|=1048576,He)}function de(et){return p&&et.alternate===null&&(et.flags|=2),et}function Oe(et,He,tt,Et){return He===null||He.tag!==6?(He=V2(tt,et.mode,Et),He.return=et,He):(He=V(He,tt),He.return=et,He)}function De(et,He,tt,Et){var dn=tt.type;return dn===A?jt(et,He,tt.props.children,Et,tt.key):He!==null&&(He.elementType===dn||typeof dn=="object"&&dn!==null&&dn.$$typeof===G&&bi(dn)===He.type)?(Et=V(He,tt.props),Et.ref=Tn(et,He,tt),Et.return=et,Et):(Et=Yv(tt.type,tt.key,tt.props,null,et.mode,Et),Et.ref=Tn(et,He,tt),Et.return=et,Et)}function at(et,He,tt,Et){return He===null||He.tag!==4||He.stateNode.containerInfo!==tt.containerInfo||He.stateNode.implementation!==tt.implementation?(He=H2(tt,et.mode,Et),He.return=et,He):(He=V(He,tt.children||[]),He.return=et,He)}function jt(et,He,tt,Et,dn){return He===null||He.tag!==7?(He=Bf(tt,et.mode,Et,dn),He.return=et,He):(He=V(He,tt),He.return=et,He)}function At(et,He,tt){if(typeof He=="string"&&He!==""||typeof He=="number")return He=V2(""+He,et.mode,tt),He.return=et,He;if(typeof He=="object"&&He!==null){switch(He.$$typeof){case _:return tt=Yv(He.type,He.key,He.props,null,et.mode,tt),tt.ref=Tn(et,null,He),tt.return=et,tt;case S:return He=H2(He,et.mode,tt),He.return=et,He;case G:var Et=He._init;return At(et,Et(He._payload),tt)}if($e(He)||ee(He))return He=Bf(He,et.mode,tt,null),He.return=et,He;Na(et,He)}return null}function bt(et,He,tt,Et){var dn=He!==null?He.key:null;if(typeof tt=="string"&&tt!==""||typeof tt=="number")return dn!==null?null:Oe(et,He,""+tt,Et);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case _:return tt.key===dn?De(et,He,tt,Et):null;case S:return tt.key===dn?at(et,He,tt,Et):null;case G:return dn=tt._init,bt(et,He,dn(tt._payload),Et)}if($e(tt)||ee(tt))return dn!==null?null:jt(et,He,tt,Et,null);Na(et,tt)}return null}function Vt(et,He,tt,Et,dn){if(typeof Et=="string"&&Et!==""||typeof Et=="number")return et=et.get(tt)||null,Oe(He,et,""+Et,dn);if(typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case _:return et=et.get(Et.key===null?tt:Et.key)||null,De(He,et,Et,dn);case S:return et=et.get(Et.key===null?tt:Et.key)||null,at(He,et,Et,dn);case G:var wn=Et._init;return Vt(et,He,tt,wn(Et._payload),dn)}if($e(Et)||ee(Et))return et=et.get(tt)||null,jt(He,et,Et,dn,null);Na(He,Et)}return null}function tn(et,He,tt,Et){for(var dn=null,wn=null,jn=He,Mn=He=0,si=null;jn!==null&&Mn<tt.length;Mn++){jn.index>Mn?(si=jn,jn=null):si=jn.sibling;var Pr=bt(et,jn,tt[Mn],Et);if(Pr===null){jn===null&&(jn=si);break}p&&jn&&Pr.alternate===null&&v(et,jn),He=X(Pr,He,Mn),wn===null?dn=Pr:wn.sibling=Pr,wn=Pr,jn=si}if(Mn===tt.length)return C(et,jn),ct&&Ke(et,Mn),dn;if(jn===null){for(;Mn<tt.length;Mn++)jn=At(et,tt[Mn],Et),jn!==null&&(He=X(jn,He,Mn),wn===null?dn=jn:wn.sibling=jn,wn=jn);return ct&&Ke(et,Mn),dn}for(jn=I(et,jn);Mn<tt.length;Mn++)si=Vt(jn,et,Mn,tt[Mn],Et),si!==null&&(p&&si.alternate!==null&&jn.delete(si.key===null?Mn:si.key),He=X(si,He,Mn),wn===null?dn=si:wn.sibling=si,wn=si);return p&&jn.forEach(function(Ph){return v(et,Ph)}),ct&&Ke(et,Mn),dn}function sn(et,He,tt,Et){var dn=ee(tt);if(typeof dn!="function")throw Error(r(150));if(tt=dn.call(tt),tt==null)throw Error(r(151));for(var wn=dn=null,jn=He,Mn=He=0,si=null,Pr=tt.next();jn!==null&&!Pr.done;Mn++,Pr=tt.next()){jn.index>Mn?(si=jn,jn=null):si=jn.sibling;var Ph=bt(et,jn,Pr.value,Et);if(Ph===null){jn===null&&(jn=si);break}p&&jn&&Ph.alternate===null&&v(et,jn),He=X(Ph,He,Mn),wn===null?dn=Ph:wn.sibling=Ph,wn=Ph,jn=si}if(Pr.done)return C(et,jn),ct&&Ke(et,Mn),dn;
vendor: 10,510 bytes, line 38
38if(jn===null){for(;!Pr.done;Mn++,Pr=tt.next())Pr=At(et,Pr.value,Et),Pr!==null&&(He=X(Pr,He,Mn),wn===null?dn=Pr:wn.sibling=Pr,wn=Pr);return ct&&Ke(et,Mn),dn}for(jn=I(et,jn);!Pr.done;Mn++,Pr=tt.next())Pr=Vt(jn,et,Mn,Pr.value,Et),Pr!==null&&(p&&Pr.alternate!==null&&jn.delete(Pr.key===null?Mn:Pr.key),He=X(Pr,He,Mn),wn===null?dn=Pr:wn.sibling=Pr,wn=Pr);return p&&jn.forEach(function(jQ){return v(et,jQ)}),ct&&Ke(et,Mn),dn}function cs(et,He,tt,Et){if(typeof tt=="object"&&tt!==null&&tt.type===A&&tt.key===null&&(tt=tt.props.children),typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case _:e:{for(var dn=tt.key,wn=He;wn!==null;){if(wn.key===dn){if(dn=tt.type,dn===A){if(wn.tag===7){C(et,wn.sibling),He=V(wn,tt.props.children),He.return=et,et=He;break e}}else if(wn.elementType===dn||typeof dn=="object"&&dn!==null&&dn.$$typeof===G&&bi(dn)===wn.type){C(et,wn.sibling),He=V(wn,tt.props),He.ref=Tn(et,wn,tt),He.return=et,et=He;break e}C(et,wn);break}else v(et,wn);wn=wn.sibling}tt.type===A?(He=Bf(tt.props.children,et.mode,Et,tt.key),He.return=et,et=He):(Et=Yv(tt.type,tt.key,tt.props,null,et.mode,Et),Et.ref=Tn(et,He,tt),Et.return=et,et=Et)}return de(et);case S:e:{for(wn=tt.key;He!==null;){if(He.key===wn)if(He.tag===4&&He.stateNode.containerInfo===tt.containerInfo&&He.stateNode.implementation===tt.implementation){C(et,He.sibling),He=V(He,tt.children||[]),He.return=et,et=He;break e}else{C(et,He);break}else v(et,He);He=He.sibling}He=H2(tt,et.mode,Et),He.return=et,et=He}return de(et);case G:return wn=tt._init,cs(et,He,wn(tt._payload),Et)}if($e(tt))return tn(et,He,tt,Et);if(ee(tt))return sn(et,He,tt,Et);Na(et,tt)}return typeof tt=="string"&&tt!==""||typeof tt=="number"?(tt=""+tt,He!==null&&He.tag===6?(C(et,He.sibling),He=V(He,tt),He.return=et,et=He):(C(et,He),He=V2(tt,et.mode,Et),He.return=et,et=He),de(et)):C(et,He)}return cs}var is=Ba(!0),Ar=Ba(!1),ni=yl(null),ri=null,_a=null,os=null;function qs(){os=_a=ri=null}function $i(p){var v=ni.current;Tr(ni),p._currentValue=v}function Ho(p,v,C){for(;p!==null;){var I=p.alternate;if((p.childLanes&v)!==v?(p.childLanes|=v,I!==null&&(I.childLanes|=v)):I!==null&&(I.childLanes&v)!==v&&(I.childLanes|=v),p===C)break;p=p.return}}function Sa(p,v){ri=p,os=_a=null,p=p.dependencies,p!==null&&p.firstContext!==null&&((p.lanes&v)!==0&&(Yo=!0),p.firstContext=null)}function Ka(p){var v=p._currentValue;if(os!==p)if(p={context:p,memoizedValue:v,next:null},_a===null){if(ri===null)throw Error(r(308));_a=p,ri.dependencies={lanes:0,firstContext:p}}else _a=_a.next=p;return v}var uo=null;function Pd(p){uo===null?uo=[p]:uo.push(p)}function Mc(p,v,C,I){var V=v.interleaved;return V===null?(C.next=C,Pd(v)):(C.next=V.next,V.next=C),v.interleaved=C,kr(p,I)}function kr(p,v){p.lanes|=v;var C=p.alternate;for(C!==null&&(C.lanes|=v),C=p,p=p.return;p!==null;)p.childLanes|=v,C=p.alternate,C!==null&&(C.childLanes|=v),C=p,p=p.return;return C.tag===3?C.stateNode:null}var ec=!1;function cp(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rx(p,v){p=p.updateQueue,v.updateQueue===p&&(v.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,effects:p.effects})}function Wo(p,v){return{eventTime:p,lane:v,tag:0,payload:null,callback:null,next:null}}function Ko(p,v,C){var I=p.updateQueue;if(I===null)return null;if(I=I.shared,(Nr&2)!==0){var V=I.pending;return V===null?v.next=v:(v.next=V.next,V.next=v),I.pending=v,kr(p,C)}return V=I.interleaved,V===null?(v.next=v,Pd(I)):(v.next=V.next,V.next=v),I.interleaved=v,kr(p,C)}function ju(p,v,C){if(v=v.updateQueue,v!==null&&(v=v.shared,(C&4194240)!==0)){var I=v.lanes;I&=p.pendingLanes,C|=I,v.lanes=C,pd(p,C)}}function Go(p,v){var C=p.updateQueue,I=p.alternate;if(I!==null&&(I=I.updateQueue,C===I)){var V=null,X=null;if(C=C.firstBaseUpdate,C!==null){do{var de={eventTime:C.eventTime,lane:C.lane,tag:C.tag,payload:C.payload,callback:C.callback,next:null};X===null?V=X=de:X=X.next=de,C=C.next}while(C!==null);X===null?V=X=v:X=X.next=v}else V=X=v;C={baseState:I.baseState,firstBaseUpdate:V,lastBaseUpdate:X,shared:I.shared,effects:I.effects},p.updateQueue=C;return}p=C.lastBaseUpdate,p===null?C.firstBaseUpdate=v:p.next=v,C.lastBaseUpdate=v}function Lc(p,v,C,I){var V=p.updateQueue;ec=!1;var X=V.firstBaseUpdate,de=V.lastBaseUpdate,Oe=V.shared.pending;if(Oe!==null){V.shared.pending=null;var De=Oe,at=De.next;De.next=null,de===null?X=at:de.next=at,de=De;var jt=p.alternate;jt!==null&&(jt=jt.updateQueue,Oe=jt.lastBaseUpdate,Oe!==de&&(Oe===null?jt.firstBaseUpdate=at:Oe.next=at,jt.lastBaseUpdate=De))}if(X!==null){var At=V.baseState;de=0,jt=at=De=null,Oe=X;do{var bt=Oe.lane,Vt=Oe.eventTime;if((I&bt)===bt){jt!==null&&(jt=jt.next={eventTime:Vt,lane:0,tag:Oe.tag,payload:Oe.payload,callback:Oe.callback,next:null});e:{var tn=p,sn=Oe;switch(bt=v,Vt=C,sn.tag){case 1:if(tn=sn.payload,typeof tn=="function"){At=tn.call(Vt,At,bt);break e}At=tn;break e;case 3:tn.flags=tn.flags&-65537|128;case 0:if(tn=sn.payload,bt=typeof tn=="function"?tn.call(Vt,At,bt):tn,bt==null)break e;At=J({},At,bt);break e;case 2:ec=!0}}Oe.callback!==null&&Oe.lane!==0&&(p.flags|=64,bt=V.effects,bt===null?V.effects=[Oe]:bt.push(Oe))}else Vt={eventTime:Vt,lane:bt,tag:Oe.tag,payload:Oe.payload,callback:Oe.callback,next:null},jt===null?(at=jt=Vt,De=At):jt=jt.next=Vt,de|=bt;if(Oe=Oe.next,Oe===null){if(Oe=V.shared.pending,Oe===null)break;bt=Oe,Oe=bt.next,bt.next=null,V.lastBaseUpdate=bt,V.shared.pending=null}}while(!0);if(jt===null&&(De=At),V.baseState=De,V.firstBaseUpdate=at,V.lastBaseUpdate=jt,v=V.shared.interleaved,v!==null){V=v;do de|=V.lane,V=V.next;while(V!==v)}else X===null&&(V.shared.lanes=0);If|=de,p.lanes=de,p.memoizedState=At}}function Nu(p,v,C){if(p=v.effects,v.effects=null,p!==null)for(v=0;v<p.length;v++){var I=p[v],V=I.callback;if(V!==null){if(I.callback=null,I=C,typeof V!="function")throw Error(r(191,V));V.call(I)}}}var xh={},ho=yl(xh),yh=yl(xh),Ed=yl(xh);function Rc(p){if(p===xh)throw Error(r(174));return p}function vh(p,v){switch(Fr(Ed,v),Fr(yh,p),Fr(ho,xh),p=v.nodeType,p){case 9:case 11:v=(v=v.documentElement)?v.namespaceURI:Ht(null,"");break;default:p=p===8?v.parentNode:v,v=p.namespaceURI||null,p=p.tagName,v=Ht(v,p)}Tr(ho),Fr(ho,v)}function tc(){Tr(ho),Tr(yh),Tr(Ed)}function Ev(p){Rc(Ed.current);var v=Rc(ho.current),C=Ht(v,p.type);v!==C&&(Fr(yh,p),Fr(ho,C))}function Ix(p){yh.current===p&&(Tr(ho),Tr(yh))}var ia=yl(0);function vl(p){for(var v=p;v!==null;){if(v.tag===13){var C=v.memoizedState;if(C!==null&&(C=C.dehydrated,C===null||C.data==="$?"||C.data==="$!"))return v}else if(v.tag===19&&v.memoizedProps.revealOrder!==void 0){if((v.flags&128)!==0)return v}else if(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 null;v=v.return}v.sibling.return=v.return,v=v.sibling}return null}var Dx=[];function Fx(){for(var p=0;p<Dx.length;p++)Dx[p]._workInProgressVersionPrimary=null;Dx.length=0}var dp=N.ReactCurrentDispatcher,up=N.ReactCurrentBatchConfig,nc=0,ma=null,Ga=null,$a=null,bh=!1,Ic=!1,wh=0,g2=0;function ls(){throw Error(r(321))}function hp(p,v){if(v===null)return!1;for(var C=0;C<v.length&&C<p.length;C++)if(!Un(p[C],v[C]))return!1;return!0}function Mf(p,v,C,I,V,X){if(nc=X,ma=v,v.memoizedState=null,v.updateQueue=null,v.lanes=0,dp.current=p===null||p.memoizedState===null?GY:YY,p=C(I,V),Ic){X=0;do{if(Ic=!1,wh=0,25<=X)throw Error(r(301));X+=1,$a=Ga=null,v.updateQueue=null,dp.current=QY,p=C(I,V)}while(Ic)}if(dp.current=Rv,v=Ga!==null&&Ga.next!==null,nc=0,$a=Ga=ma=null,bh=!1,v)throw Error(r(300));return p}function rc(){var p=wh!==0;return wh=0,p}function bl(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $a===null?ma.memoizedState=$a=p:$a=$a.next=p,$a}function fo(){if(Ga===null){var p=ma.alternate;p=p!==null?p.memoizedState:null}else p=Ga.next;var v=$a===null?ma.memoizedState:$a.next;if(v!==null)$a=v,Ga=p;else{if(p===null)throw Error(r(310));Ga=p,p={memoizedState:Ga.memoizedState,baseState:Ga.baseState,baseQueue:Ga.baseQueue,queue:Ga.queue,next:null},$a===null?ma.memoizedState=$a=p:$a=$a.next=p}return $a}function Lf(p,v){return typeof v=="function"?v(p):v}function fp(p){var v=fo(),C=v.queue;if(C===null)throw Error(r(311));C.lastRenderedReducer=p;var I=Ga,V=I.baseQueue,X=C.pending;if(X!==null){if(V!==null){var de=V.next;V.next=X.next,X.next=de}I.baseQueue=V=X,C.pending=null}if(V!==null){X=V.next,I=I.baseState;var Oe=de=null,De=null,at=X;do{var jt=at.lane;if((nc&jt)===jt)De!==null&&(De=De.next={lane:0,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null}),I=at.hasEagerState?at.eagerState:p(I,at.action);else{var At={lane:jt,action:at.action,hasEagerState:at.hasEagerState,eagerState:at.eagerState,next:null};De===null?(Oe=De=At,de=I):De=De.next=At,ma.lanes|=jt,If|=jt}at=at.next}while(at!==null&&at!==X);De===null?de=I:De.next=Oe,Un(I,v.memoizedState)||(Yo=!0),v.memoizedState=I,v.baseState=de,v.baseQueue=De,C.lastRenderedState=I}if(p=C.interleaved,p!==null){V=p;do X=V.lane,ma.lanes|=X,If|=X,V=V.next;while(V!==p)}else V===null&&(C.lanes=0);return[v.memoizedState,C.dispatch]}function Td(p){var v=fo(),C=v.queue;if(C===null)throw Error(r(311));C.lastRenderedReducer=p;var I=C.dispatch,V=C.pending,X=v.memoizedState;if(V!==null){C.pending=null;var de=V=V.next;do X=p(X,de.action),de=de.next;while(de!==V);Un(X,v.memoizedState)||(Yo=!0),v.memoizedState=X,v.baseQueue===null&&(v.baseState=X),C.lastRenderedState=X}return[X,I]}function Tv(){}function qx(p,v){var C=ma,I=fo(),V=v(),X=!Un(I.memoizedState,V);if(X&&(I.memoizedState=V,Yo=!0),I=I.queue,gp(Mv.bind(null,C,I,p),[p]),I.getSnapshot!==v||X||$a!==null&&$a.memoizedState.tag&1){if(C.flags|=2048,mo(9,Bx.bind(null,C,I,V,v),void 0,null),ai===null)throw Error(r(349));(nc&30)!==0||Ov(C,v,V)}return V}function Ov(p,v,C){p.flags|=16384,p={getSnapshot:v,value:C},v=ma.updateQueue,v===null?(v={lastEffect:null,stores:null},ma.updateQueue=v,v.stores=[p]):(C=v.stores,C===null?v.stores=[p]:C.push(p))}function Bx(p,v,C,I){v.value=C,v.getSnapshot=I,jh(v)&&mp(p)}function Mv(p,v,C){return C(function(){jh(v)&&mp(p)})}function jh(p){var v=p.getSnapshot;p=p.value;try{var C=v();return!Un(p,C)}catch{return!0}}function mp(p){var v=kr(p,1);v!==null&&$c(v,p,1,-1)}function Rf(p){var v=bl();return typeof p=="function"&&(p=p()),v.memoizedState=v.baseState=p,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lf,lastRenderedState:p}
vendor: 7,893 bytes, line 38
38,v.queue=p,p=p.dispatch=KY.bind(null,ma,p),[v.memoizedState,p]}function mo(p,v,C,I){return p={tag:p,create:v,destroy:C,deps:I,next:null},v=ma.updateQueue,v===null?(v={lastEffect:null,stores:null},ma.updateQueue=v,v.lastEffect=p.next=p):(C=v.lastEffect,C===null?v.lastEffect=p.next=p:(I=C.next,C.next=p,p.next=I,v.lastEffect=p)),p}function Dc(){return fo().memoizedState}function wl(p,v,C,I){var V=bl();ma.flags|=p,V.memoizedState=mo(1|v,C,void 0,I===void 0?null:I)}function _u(p,v,C,I){var V=fo();I=I===void 0?null:I;var X=void 0;if(Ga!==null){var de=Ga.memoizedState;if(X=de.destroy,I!==null&&hp(I,de.deps)){V.memoizedState=mo(v,C,X,I);return}}ma.flags|=p,V.memoizedState=mo(1|v,C,X,I)}function pp(p,v){return wl(8390656,8,p,v)}function gp(p,v){return _u(2048,8,p,v)}function Lv(p,v){return _u(4,2,p,v)}function xp(p,v){return _u(4,4,p,v)}function yp(p,v){if(typeof v=="function")return p=p(),v(p),function(){v(null)};if(v!=null)return p=p(),v.current=p,function(){v.current=null}}function iE(p,v,C){return C=C!=null?C.concat([p]):null,_u(4,4,yp.bind(null,v,p),C)}function x2(){}function oE(p,v){var C=fo();v=v===void 0?null:v;var I=C.memoizedState;return I!==null&&v!==null&&hp(v,I[1])?I[0]:(C.memoizedState=[p,v],p)}function lE(p,v){var C=fo();v=v===void 0?null:v;var I=C.memoizedState;return I!==null&&v!==null&&hp(v,I[1])?I[0]:(p=p(),C.memoizedState=[p,v],p)}function cE(p,v,C){return(nc&21)===0?(p.baseState&&(p.baseState=!1,Yo=!0),p.memoizedState=C):(Un(C,v)||(C=Fl(),ma.lanes|=C,If|=C,p.baseState=!0),v)}function HY(p,v){var C=sr;sr=C!==0&&4>C?C:4,p(!0);var I=up.transition;up.transition={};try{p(!1),v()}finally{sr=C,up.transition=I}}function dE(){return fo().memoizedState}function WY(p,v,C){var I=Ch(p);if(C={lane:I,action:C,hasEagerState:!1,eagerState:null,next:null},uE(p))hE(v,C);else if(C=Mc(p,v,C,I),C!==null){var V=go();$c(C,p,I,V),fE(C,v,I)}}function KY(p,v,C){var I=Ch(p),V={lane:I,action:C,hasEagerState:!1,eagerState:null,next:null};if(uE(p))hE(v,V);else{var X=p.alternate;if(p.lanes===0&&(X===null||X.lanes===0)&&(X=v.lastRenderedReducer,X!==null))try{var de=v.lastRenderedState,Oe=X(de,C);if(V.hasEagerState=!0,V.eagerState=Oe,Un(Oe,de)){var De=v.interleaved;De===null?(V.next=V,Pd(v)):(V.next=De.next,De.next=V),v.interleaved=V;return}}catch{}finally{}C=Mc(p,v,V,I),C!==null&&(V=go(),$c(C,p,I,V),fE(C,v,I))}}function uE(p){var v=p.alternate;return p===ma||v!==null&&v===ma}function hE(p,v){Ic=bh=!0;var C=p.pending;C===null?v.next=v:(v.next=C.next,C.next=v),p.pending=v}function fE(p,v,C){if((C&4194240)!==0){var I=v.lanes;I&=p.pendingLanes,C|=I,v.lanes=C,pd(p,C)}}var Rv={readContext:Ka,useCallback:ls,useContext:ls,useEffect:ls,useImperativeHandle:ls,useInsertionEffect:ls,useLayoutEffect:ls,useMemo:ls,useReducer:ls,useRef:ls,useState:ls,useDebugValue:ls,useDeferredValue:ls,useTransition:ls,useMutableSource:ls,useSyncExternalStore:ls,useId:ls,unstable_isNewReconciler:!1},GY={readContext:Ka,useCallback:function(p,v){return bl().memoizedState=[p,v===void 0?null:v],p},useContext:Ka,useEffect:pp,useImperativeHandle:function(p,v,C){return C=C!=null?C.concat([p]):null,wl(4194308,4,yp.bind(null,v,p),C)},useLayoutEffect:function(p,v){return wl(4194308,4,p,v)},useInsertionEffect:function(p,v){return wl(4,2,p,v)},useMemo:function(p,v){var C=bl();return v=v===void 0?null:v,p=p(),C.memoizedState=[p,v],p},useReducer:function(p,v,C){var I=bl();return v=C!==void 0?C(v):v,I.memoizedState=I.baseState=v,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:v},I.queue=p,p=p.dispatch=WY.bind(null,ma,p),[I.memoizedState,p]},useRef:function(p){var v=bl();return p={current:p},v.memoizedState=p},useState:Rf,useDebugValue:x2,useDeferredValue:function(p){return bl().memoizedState=p},useTransition:function(){var p=Rf(!1),v=p[0];return p=HY.bind(null,p[1]),bl().memoizedState=p,[v,p]},useMutableSource:function(){},useSyncExternalStore:function(p,v,C){var I=ma,V=bl();if(ct){if(C===void 0)throw Error(r(407));C=C()}else{if(C=v(),ai===null)throw Error(r(349));(nc&30)!==0||Ov(I,v,C)}V.memoizedState=C;var X={value:C,getSnapshot:v};return V.queue=X,pp(Mv.bind(null,I,X,p),[p]),I.flags|=2048,mo(9,Bx.bind(null,I,X,C,v),void 0,null),C},useId:function(){var p=bl(),v=ai.identifierPrefix;if(ct){var C=Je,I=Xe;C=(I&~(1<<32-es(I)-1)).toString(32)+C,v=":"+v+"R"+C,C=wh++,0<C&&(v+="H"+C.toString(32)),v+=":"}else C=g2++,v=":"+v+"r"+C.toString(32)+":";return p.memoizedState=v},unstable_isNewReconciler:!1},YY={readContext:Ka,useCallback:oE,useContext:Ka,useEffect:gp,useImperativeHandle:iE,useInsertionEffect:Lv,useLayoutEffect:xp,useMemo:lE,useReducer:fp,useRef:Dc,useState:function(){return fp(Lf)},useDebugValue:x2,useDeferredValue:function(p){var v=fo();return cE(v,Ga.memoizedState,p)},useTransition:function(){var p=fp(Lf)[0],v=fo().memoizedState;return[p,v]},useMutableSource:Tv,useSyncExternalStore:qx,useId:dE,unstable_isNewReconciler:!1},QY={readContext:Ka,useCallback:oE,useContext:Ka,useEffect:gp,useImperativeHandle:iE,useInsertionEffect:Lv,useLayoutEffect:xp,useMemo:lE,useReducer:Td,useRef:Dc,useState:function(){return Td(Lf)},useDebugValue:x2,useDeferredValue:function(p){var v=fo();return Ga===null?v.memoizedState=p:cE(v,Ga.memoizedState,p)},useTransition:function(){var p=Td(Lf)[0],v=fo().memoizedState;return[p,v]},useMutableSource:Tv,useSyncExternalStore:qx,useId:dE,unstable_isNewReconciler:!1};function Fc(p,v){if(p&&p.defaultProps){v=J({},v),p=p.defaultProps;for(var C in p)v[C]===void 0&&(v[C]=p[C]);return v}return v}function y2(p,v,C,I){v=p.memoizedState,C=C(I,v),C=C==null?v:J({},v,C),p.memoizedState=C,p.lanes===0&&(p.updateQueue.baseState=C)}var Iv={isMounted:function(p){return(p=p._reactInternals)?ua(p)===p:!1},enqueueSetState:function(p,v,C){p=p._reactInternals;var I=go(),V=Ch(p),X=Wo(I,V);X.payload=v,C!=null&&(X.callback=C),v=Ko(p,X,V),v!==null&&($c(v,p,V,I),ju(v,p,V))},enqueueReplaceState:function(p,v,C){p=p._reactInternals;var I=go(),V=Ch(p),X=Wo(I,V);X.tag=1,X.payload=v,C!=null&&(X.callback=C),v=Ko(p,X,V),v!==null&&($c(v,p,V,I),ju(v,p,V))},enqueueForceUpdate:function(p,v){p=p._reactInternals;var C=go(),I=Ch(p),V=Wo(C,I);V.tag=2,v!=null&&(V.callback=v),v=Ko(p,V,I),v!==null&&($c(v,p,I,C),ju(v,p,I))}};function mE(p,v,C,I,V,X,de){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate(I,X,de):v.prototype&&v.prototype.isPureReactComponent?!qo(C,I)||!qo(V,X):!0}function pE(p,v,C){var I=!1,V=kd,X=v.contextType;return typeof X=="object"&&X!==null?X=Ka(X):(V=Bi(v)?bu:Fs.current,I=v.contextTypes,X=(I=I!=null)?gh(p,V):kd),v=new v(C,X),p.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Iv,p.stateNode=v,v._reactInternals=p,I&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=V,p.__reactInternalMemoizedMaskedChildContext=X),v}function gE(p,v,C,I){p=v.state,typeof v.componentWillReceiveProps=="function"&&v.componentWillReceiveProps(C,I),typeof v.UNSAFE_componentWillReceiveProps=="function"&&v.UNSAFE_componentWillReceiveProps(C,I),v.state!==p&&Iv.enqueueReplaceState(v,v.state,null)}function v2(p,v,C,I){var V=p.stateNode;V.props=C,V.state=p.memoizedState,V.refs={},cp(p);var X=v.contextType;typeof X=="object"&&X!==null?V.context=Ka(X):(X=Bi(v)?bu:Fs.current,V.context=gh(p,X)),V.state=p.memoizedState,X=v.getDerivedStateFromProps,typeof X=="function"&&(y2(p,v,X,C),V.state=p.memoizedState),typeof v.getDerivedStateFromProps=="function"||typeof V.getSnapshotBeforeUpdate=="function"||typeof V.UNSAFE_componentWillMount!="function"&&typeof V.componentWillMount!="function"||(v=V.state,typeof V.componentWillMount=="function"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount=="function"&&V.UNSAFE_componentWillMount(),v!==V.state&&Iv.enqueueReplaceState(V,V.state,null),Lc(p,C,V,I),V.state=p.memoizedState),typeof V.componentDidMount=="function"&&(p.flags|=4194308)}function vp(p,v){try{var C="",I=v;do C+=re(I),I=I.return;
vendor: 41,194 bytes, lines 38-40
38while(I);var V=C}catch(X){V=`
39Error generating stack: `+X.message+`
40`+X.stack}return{value:p,source:v,stack:V,digest:null}}function b2(p,v,C){return{value:p,source:null,stack:C??null,digest:v??null}}function w2(p,v){try{console.error(v.value)}catch(C){setTimeout(function(){throw C})}}var XY=typeof WeakMap=="function"?WeakMap:Map;function xE(p,v,C){C=Wo(-1,C),C.tag=3,C.payload={element:null};var I=v.value;return C.callback=function(){zv||(zv=!0,I2=I),w2(p,v)},C}function yE(p,v,C){C=Wo(-1,C),C.tag=3;var I=p.type.getDerivedStateFromError;if(typeof I=="function"){var V=v.value;C.payload=function(){return I(V)},C.callback=function(){w2(p,v)}}var X=p.stateNode;return X!==null&&typeof X.componentDidCatch=="function"&&(C.callback=function(){w2(p,v),typeof I!="function"&&(_h===null?_h=new Set([this]):_h.add(this));var de=v.stack;this.componentDidCatch(v.value,{componentStack:de!==null?de:""})}),C}function vE(p,v,C){var I=p.pingCache;if(I===null){I=p.pingCache=new XY;var V=new Set;I.set(v,V)}else V=I.get(v),V===void 0&&(V=new Set,I.set(v,V));V.has(C)||(V.add(C),p=uQ.bind(null,p,v,C),v.then(p,p))}function bE(p){do{var v;if((v=p.tag===13)&&(v=p.memoizedState,v=v!==null?v.dehydrated!==null:!0),v)return p;p=p.return}while(p!==null);return null}function wE(p,v,C,I,V){return(p.mode&1)===0?(p===v?p.flags|=65536:(p.flags|=128,C.flags|=131072,C.flags&=-52805,C.tag===1&&(C.alternate===null?C.tag=17:(v=Wo(-1,1),v.tag=2,Ko(C,v,1))),C.lanes|=1),p):(p.flags|=65536,p.lanes=V,p)}var JY=N.ReactCurrentOwner,Yo=!1;function po(p,v,C,I){v.child=p===null?Ar(v,null,C,I):is(v,p.child,C,I)}function jE(p,v,C,I,V){C=C.render;var X=v.ref;return Sa(v,V),I=Mf(p,v,C,I,X,V),C=rc(),p!==null&&!Yo?(v.updateQueue=p.updateQueue,v.flags&=-2053,p.lanes&=~V,Su(p,v,V)):(ct&&C&&it(v),v.flags|=1,po(p,v,I,V),v.child)}function NE(p,v,C,I,V){if(p===null){var X=C.type;return typeof X=="function"&&!z2(X)&&X.defaultProps===void 0&&C.compare===null&&C.defaultProps===void 0?(v.tag=15,v.type=X,_E(p,v,X,I,V)):(p=Yv(C.type,null,I,v,v.mode,V),p.ref=v.ref,p.return=v,v.child=p)}if(X=p.child,(p.lanes&V)===0){var de=X.memoizedProps;if(C=C.compare,C=C!==null?C:qo,C(de,I)&&p.ref===v.ref)return Su(p,v,V)}return v.flags|=1,p=kh(X,I),p.ref=v.ref,p.return=v,v.child=p}function _E(p,v,C,I,V){if(p!==null){var X=p.memoizedProps;if(qo(X,I)&&p.ref===v.ref)if(Yo=!1,v.pendingProps=I=X,(p.lanes&V)!==0)(p.flags&131072)!==0&&(Yo=!0);else return v.lanes=p.lanes,Su(p,v,V)}return j2(p,v,C,I,V)}function SE(p,v,C){var I=v.pendingProps,V=I.children,X=p!==null?p.memoizedState:null;if(I.mode==="hidden")if((v.mode&1)===0)v.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fr(wp,jl),jl|=C;else{if((C&1073741824)===0)return p=X!==null?X.baseLanes|C:C,v.lanes=v.childLanes=1073741824,v.memoizedState={baseLanes:p,cachePool:null,transitions:null},v.updateQueue=null,Fr(wp,jl),jl|=p,null;v.memoizedState={baseLanes:0,cachePool:null,transitions:null},I=X!==null?X.baseLanes:C,Fr(wp,jl),jl|=I}else X!==null?(I=X.baseLanes|C,v.memoizedState=null):I=C,Fr(wp,jl),jl|=I;return po(p,v,V,C),v.child}function CE(p,v){var C=v.ref;(p===null&&C!==null||p!==null&&p.ref!==C)&&(v.flags|=512,v.flags|=2097152)}function j2(p,v,C,I,V){var X=Bi(C)?bu:Fs.current;return X=gh(v,X),Sa(v,V),C=Mf(p,v,C,I,X,V),I=rc(),p!==null&&!Yo?(v.updateQueue=p.updateQueue,v.flags&=-2053,p.lanes&=~V,Su(p,v,V)):(ct&&I&&it(v),v.flags|=1,po(p,v,C,V),v.child)}function AE(p,v,C,I,V){if(Bi(C)){var X=!0;wu(v)}else X=!1;if(Sa(v,V),v.stateNode===null)Fv(p,v),pE(v,C,I),v2(v,C,I,V),I=!0;else if(p===null){var de=v.stateNode,Oe=v.memoizedProps;de.props=Oe;var De=de.context,at=C.contextType;typeof at=="object"&&at!==null?at=Ka(at):(at=Bi(C)?bu:Fs.current,at=gh(v,at));var jt=C.getDerivedStateFromProps,At=typeof jt=="function"||typeof de.getSnapshotBeforeUpdate=="function";At||typeof de.UNSAFE_componentWillReceiveProps!="function"&&typeof de.componentWillReceiveProps!="function"||(Oe!==I||De!==at)&&gE(v,de,I,at),ec=!1;var bt=v.memoizedState;de.state=bt,Lc(v,I,de,V),De=v.memoizedState,Oe!==I||bt!==De||qi.current||ec?(typeof jt=="function"&&(y2(v,C,jt,I),De=v.memoizedState),(Oe=ec||mE(v,C,Oe,I,bt,De,at))?(At||typeof de.UNSAFE_componentWillMount!="function"&&typeof de.componentWillMount!="function"||(typeof de.componentWillMount=="function"&&de.componentWillMount(),typeof de.UNSAFE_componentWillMount=="function"&&de.UNSAFE_componentWillMount()),typeof de.componentDidMount=="function"&&(v.flags|=4194308)):(typeof de.componentDidMount=="function"&&(v.flags|=4194308),v.memoizedProps=I,v.memoizedState=De),de.props=I,de.state=De,de.context=at,I=Oe):(typeof de.componentDidMount=="function"&&(v.flags|=4194308),I=!1)}else{de=v.stateNode,Rx(p,v),Oe=v.memoizedProps,at=v.type===v.elementType?Oe:Fc(v.type,Oe),de.props=at,At=v.pendingProps,bt=de.context,De=C.contextType,typeof De=="object"&&De!==null?De=Ka(De):(De=Bi(C)?bu:Fs.current,De=gh(v,De));var Vt=C.getDerivedStateFromProps;(jt=typeof Vt=="function"||typeof de.getSnapshotBeforeUpdate=="function")||typeof de.UNSAFE_componentWillReceiveProps!="function"&&typeof de.componentWillReceiveProps!="function"||(Oe!==At||bt!==De)&&gE(v,de,I,De),ec=!1,bt=v.memoizedState,de.state=bt,Lc(v,I,de,V);var tn=v.memoizedState;Oe!==At||bt!==tn||qi.current||ec?(typeof Vt=="function"&&(y2(v,C,Vt,I),tn=v.memoizedState),(at=ec||mE(v,C,at,I,bt,tn,De)||!1)?(jt||typeof de.UNSAFE_componentWillUpdate!="function"&&typeof de.componentWillUpdate!="function"||(typeof de.componentWillUpdate=="function"&&de.componentWillUpdate(I,tn,De),typeof de.UNSAFE_componentWillUpdate=="function"&&de.UNSAFE_componentWillUpdate(I,tn,De)),typeof de.componentDidUpdate=="function"&&(v.flags|=4),typeof de.getSnapshotBeforeUpdate=="function"&&(v.flags|=1024)):(typeof de.componentDidUpdate!="function"||Oe===p.memoizedProps&&bt===p.memoizedState||(v.flags|=4),typeof de.getSnapshotBeforeUpdate!="function"||Oe===p.memoizedProps&&bt===p.memoizedState||(v.flags|=1024),v.memoizedProps=I,v.memoizedState=tn),de.props=I,de.state=tn,de.context=De,I=at):(typeof de.componentDidUpdate!="function"||Oe===p.memoizedProps&&bt===p.memoizedState||(v.flags|=4),typeof de.getSnapshotBeforeUpdate!="function"||Oe===p.memoizedProps&&bt===p.memoizedState||(v.flags|=1024),I=!1)}return N2(p,v,C,I,X,V)}function N2(p,v,C,I,V,X){CE(p,v);var de=(v.flags&128)!==0;if(!I&&!de)return V&&Pv(v,C,!1),Su(p,v,X);I=v.stateNode,JY.current=v;var Oe=de&&typeof C.getDerivedStateFromError!="function"?null:I.render();return v.flags|=1,p!==null&&de?(v.child=is(v,p.child,null,X),v.child=is(v,null,Oe,X)):po(p,v,Oe,X),v.memoizedState=I.state,V&&Pv(v,C,!0),v.child}function kE(p){var v=p.stateNode;v.pendingContext?kv(p,v.pendingContext,v.pendingContext!==v.context):v.context&&kv(p,v.context,!1),vh(p,v.containerInfo)}function PE(p,v,C,I,V){return Dn(),Or(V),v.flags|=256,po(p,v,C,I),v.child}var _2={dehydrated:null,treeContext:null,retryLane:0};function S2(p){return{baseLanes:p,cachePool:null,transitions:null}}function EE(p,v,C){var I=v.pendingProps,V=ia.current,X=!1,de=(v.flags&128)!==0,Oe;if((Oe=de)||(Oe=p!==null&&p.memoizedState===null?!1:(V&2)!==0),Oe?(X=!0,v.flags&=-129):(p===null||p.memoizedState!==null)&&(V|=1),Fr(ia,V&1),p===null)return Ft(v),p=v.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?((v.mode&1)===0?v.lanes=1:p.data==="$!"?v.lanes=8:v.lanes=1073741824,null):(de=I.children,p=I.fallback,X?(I=v.mode,X=v.child,de={mode:"hidden",children:de},(I&1)===0&&X!==null?(X.childLanes=0,X.pendingProps=de):X=Qv(de,I,0,null),p=Bf(p,I,C,null),X.return=v,p.return=v,X.sibling=p,v.child=X,v.child.memoizedState=S2(C),v.memoizedState=_2,p):C2(v,de));if(V=p.memoizedState,V!==null&&(Oe=V.dehydrated,Oe!==null))return ZY(p,v,de,I,Oe,V,C);if(X){X=I.fallback,de=v.mode,V=p.child,Oe=V.sibling;var De={mode:"hidden",children:I.children};return(de&1)===0&&v.child!==V?(I=v.child,I.childLanes=0,I.pendingProps=De,v.deletions=null):(I=kh(V,De),I.subtreeFlags=V.subtreeFlags&14680064),Oe!==null?X=kh(Oe,X):(X=Bf(X,de,C,null),X.flags|=2),X.return=v,I.return=v,I.sibling=X,v.child=I,I=X,X=v.child,de=p.child.memoizedState,de=de===null?S2(C):{baseLanes:de.baseLanes|C,cachePool:null,transitions:de.transitions},X.memoizedState=de,X.childLanes=p.childLanes&~C,v.memoizedState=_2,I}return X=p.child,p=X.sibling,I=kh(X,{mode:"visible",children:I.children}),(v.mode&1)===0&&(I.lanes=C),I.return=v,I.sibling=null,p!==null&&(C=v.deletions,C===null?(v.deletions=[p],v.flags|=16):C.push(p)),v.child=I,v.memoizedState=null,I}function C2(p,v){return v=Qv({mode:"visible",children:v},p.mode,0,null),v.return=p,p.child=v}function Dv(p,v,C,I){return I!==null&&Or(I),is(v,p.child,null,C),p=C2(v,v.pendingProps.children),p.flags|=2,v.memoizedState=null,p}function ZY(p,v,C,I,V,X,de){if(C)return v.flags&256?(v.flags&=-257,I=b2(Error(r(422))),Dv(p,v,de,I)):v.memoizedState!==null?(v.child=p.child,v.flags|=128,null):(X=I.fallback,V=v.mode,I=Qv({mode:"visible",children:I.children},V,0,null),X=Bf(X,V,de,null),X.flags|=2,I.return=v,X.return=v,I.sibling=X,v.child=I,(v.mode&1)!==0&&is(v,p.child,null,de),v.child.memoizedState=S2(de),v.memoizedState=_2,X);if((v.mode&1)===0)return Dv(p,v,de,null);if(V.data==="$!"){if(I=V.nextSibling&&V.nextSibling.dataset,I)var Oe=I.dgst;return I=Oe,X=Error(r(419)),I=b2(X,I,void 0),Dv(p,v,de,I)}if(Oe=(de&p.childLanes)!==0,Yo||Oe){if(I=ai,I!==null){switch(de&-de){case 4:V=2;break;case 16:V=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:V=32;break;case 536870912:V=268435456;break;default:V=0}V=(V&(I.suspendedLanes|de))!==0?0:V,V!==0&&V!==X.retryLane&&(X.retryLane=V,kr(p,V),$c(I,p,V,-1))}return U2(),I=b2(Error(r(421))),Dv(p,v,de,I)}return V.data==="$?"?(v.flags|=128,v.child=p.child,v=hQ.bind(null,p),V._reactRetry=v,null):(p=X.treeContext,ut=vi(V.nextSibling),Be=v,ct=!0,ft=null,p!==null&&(ve[Se++]=Xe,ve[Se++]=Je,ve[Se++]=Ie,Xe=p.id,Je=p.overflow,Ie=v),v=C2(v,I.children),v.flags|=4096,v)}function TE(p,v,C){p.lanes|=v;var I=p.alternate;I!==null&&(I.lanes|=v),Ho(p.return,v,C)}function A2(p,v,C,I,V){var X=p.memoizedState;X===null?p.memoizedState={isBackwards:v,rendering:null,renderingStartTime:0,last:I,tail:C,tailMode:V}:(X.isBackwards=v,X.rendering=null,X.renderingStartTime=0,X.last=I,X.tail=C,X.tailMode=V)}function OE(p,v,C){var I=v.pendingProps,V=I.revealOrder,X=I.tail;if(po(p,v,I.children,C),I=ia.current,(I&2)!==0)I=I&1|2,v.flags|=128;else{if(p!==null&&(p.flags&128)!==0)e:for(p=v.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&TE(p,C,v);else if(p.tag===19)TE(p,C,v);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===v)break e;for(;p.sibling===null;){if(p.return===null||p.return===v)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}I&=1}if(Fr(ia,I),(v.mode&1)===0)v.memoizedState=null;else switch(V){case"forwards":for(C=v.child,V=null;C!==null;)p=C.alternate,p!==null&&vl(p)===null&&(V=C),C=C.sibling;C=V,C===null?(V=v.child,v.child=null):(V=C.sibling,C.sibling=null),A2(v,!1,V,C,X);break;case"backwards":for(C=null,V=v.child,v.child=null;V!==null;){if(p=V.alternate,p!==null&&vl(p)===null){v.child=V;break}p=V.sibling,V.sibling=C,C=V,V=p}A2(v,!0,C,null,X);break;case"together":A2(v,!1,null,null,void 0);break;default:v.memoizedState=null}return v.child}function Fv(p,v){(v.mode&1)===0&&p!==null&&(p.alternate=null,v.alternate=null,v.flags|=2)}function Su(p,v,C){if(p!==null&&(v.dependencies=p.dependencies),If|=v.lanes,(C&v.childLanes)===0)return null;if(p!==null&&v.child!==p.child)throw Error(r(153));if(v.child!==null){for(p=v.child,C=kh(p,p.pendingProps),v.child=C,C.return=v;p.sibling!==null;)p=p.sibling,C=C.sibling=kh(p,p.pendingProps),C.return=v;C.sibling=null}return v.child}function eQ(p,v,C){switch(v.tag){case 3:kE(v),Dn();break;case 5:Ev(v);break;case 1:Bi(v.type)&&wu(v);break;case 4:vh(v,v.stateNode.containerInfo);break;case 10:var I=v.type._context,V=v.memoizedProps.value;Fr(ni,I._currentValue),I._currentValue=V;break;case 13:if(I=v.memoizedState,I!==null)return I.dehydrated!==null?(Fr(ia,ia.current&1),v.flags|=128,null):(C&v.child.childLanes)!==0?EE(p,v,C):(Fr(ia,ia.current&1),p=Su(p,v,C),p!==null?p.sibling:null);Fr(ia,ia.current&1);break;case 19:if(I=(C&v.childLanes)!==0,(p.flags&128)!==0){if(I)return OE(p,v,C);v.flags|=128}if(V=v.memoizedState,V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),Fr(ia,ia.current),I)break;return null;case 22:case 23:return v.lanes=0,SE(p,v,C)}return Su(p,v,C)}var ME,k2,LE,RE;ME=function(p,v){for(var C=v.child;C!==null;){if(C.tag===5||C.tag===6)p.appendChild(C.stateNode);else if(C.tag!==4&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===v)break;for(;C.sibling===null;){if(C.return===null||C.return===v)return;C=C.return}C.sibling.return=C.return,C=C.sibling}},k2=function(){},LE=function(p,v,C,I){var V=p.memoizedProps;if(V!==I){p=v.stateNode,Rc(ho.current);var X=null;switch(C){case"input":V=he(p,V),I=he(p,I),X=[];break;case"select":V=J({},V,{value:void 0}),I=J({},I,{value:void 0}),X=[];break;case"textarea":V=be(p,V),I=be(p,I),X=[];break;default:typeof V.onClick!="function"&&typeof I.onClick=="function"&&(p.onclick=fh)}lr(C,I);var de;C=null;for(at in V)if(!I.hasOwnProperty(at)&&V.hasOwnProperty(at)&&V[at]!=null)if(at==="style"){var Oe=V[at];for(de in Oe)Oe.hasOwnProperty(de)&&(C||(C={}),C[de]="")}else at!=="dangerouslySetInnerHTML"&&at!=="children"&&at!=="suppressContentEditableWarning"&&at!=="suppressHydrationWarning"&&at!=="autoFocus"&&(s.hasOwnProperty(at)?X||(X=[]):(X=X||[]).push(at,null));for(at in I){var De=I[at];if(Oe=V!=null?V[at]:void 0,I.hasOwnProperty(at)&&De!==Oe&&(De!=null||Oe!=null))if(at==="style")if(Oe){for(de in Oe)!Oe.hasOwnProperty(de)||De&&De.hasOwnProperty(de)||(C||(C={}),C[de]="");for(de in De)De.hasOwnProperty(de)&&Oe[de]!==De[de]&&(C||(C={}),C[de]=De[de])}else C||(X||(X=[]),X.push(at,C)),C=De;else at==="dangerouslySetInnerHTML"?(De=De?De.__html:void 0,Oe=Oe?Oe.__html:void 0,De!=null&&Oe!==De&&(X=X||[]).push(at,De)):at==="children"?typeof De!="string"&&typeof De!="number"||(X=X||[]).push(at,""+De):at!=="suppressContentEditableWarning"&&at!=="suppressHydrationWarning"&&(s.hasOwnProperty(at)?(De!=null&&at==="onScroll"&&Wr("scroll",p),X||Oe===De||(X=[])):(X=X||[]).push(at,De))}C&&(X=X||[]).push("style",C);var at=X;(v.updateQueue=at)&&(v.flags|=4)}},RE=function(p,v,C,I){C!==I&&(v.flags|=4)};function $x(p,v){if(!ct)switch(p.tailMode){case"hidden":v=p.tail;for(var C=null;v!==null;)v.alternate!==null&&(C=v),v=v.sibling;C===null?p.tail=null:C.sibling=null;break;case"collapsed":C=p.tail;for(var I=null;C!==null;)C.alternate!==null&&(I=C),C=C.sibling;I===null?v||p.tail===null?p.tail=null:p.tail.sibling=null:I.sibling=null}}function Ui(p){var v=p.alternate!==null&&p.alternate.child===p.child,C=0,I=0;if(v)for(var V=p.child;V!==null;)C|=V.lanes|V.childLanes,I|=V.subtreeFlags&14680064,I|=V.flags&14680064,V.return=p,V=V.sibling;else for(V=p.child;V!==null;)C|=V.lanes|V.childLanes,I|=V.subtreeFlags,I|=V.flags,V.return=p,V=V.sibling;return p.subtreeFlags|=I,p.childLanes=C,v}function tQ(p,v,C){var I=v.pendingProps;switch(qe(v),v.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ui(v),null;case 1:return Bi(v.type)&&lp(),Ui(v),null;case 3:return I=v.stateNode,tc(),Tr(qi),Tr(Fs),Fx(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(p===null||p.child===null)&&(br(v)?v.flags|=4:p===null||p.memoizedState.isDehydrated&&(v.flags&256)===0||(v.flags|=1024,ft!==null&&(q2(ft),ft=null))),k2(p,v),Ui(v),null;case 5:Ix(v);var V=Rc(Ed.current);if(C=v.type,p!==null&&v.stateNode!=null)LE(p,v,C,I,V),p.ref!==v.ref&&(v.flags|=512,v.flags|=2097152);else{if(!I){if(v.stateNode===null)throw Error(r(166));return Ui(v),null}if(p=Rc(ho.current),br(v)){I=v.stateNode,C=v.type;var X=v.memoizedProps;switch(I[Zl]=v,I[mh]=X,p=(v.mode&1)!==0,C){case"dialog":Wr("cancel",I),Wr("close",I);break;case"iframe":case"object":case"embed":Wr("load",I);break;case"video":case"audio":for(V=0;V<Cd.length;V++)Wr(Cd[V],I);break;case"source":Wr("error",I);break;case"img":case"image":case"link":Wr("error",I),Wr("load",I);break;case"details":Wr("toggle",I);break;case"input":Ne(I,X),Wr("invalid",I);break;case"select":I._wrapperState={wasMultiple:!!X.multiple},Wr("invalid",I);break;case"textarea":We(I,X),Wr("invalid",I)}lr(C,X),V=null;for(var de in X)if(X.hasOwnProperty(de)){var Oe=X[de];de==="children"?typeof Oe=="string"?I.textContent!==Oe&&(X.suppressHydrationWarning!==!0&&op(I.textContent,Oe,p),V=["children",Oe]):typeof Oe=="number"&&I.textContent!==""+Oe&&(X.suppressHydrationWarning!==!0&&op(I.textContent,Oe,p),V=["children",""+Oe]):s.hasOwnProperty(de)&&Oe!=null&&de==="onScroll"&&Wr("scroll",I)}switch(C){case"input":je(I),Te(I,X,!0);break;case"textarea":je(I),st(I);break;case"select":case"option":break;default:typeof X.onClick=="function"&&(I.onclick=fh)}I=V,v.updateQueue=I,I!==null&&(v.flags|=4)}else{de=V.nodeType===9?V:V.ownerDocument,p==="http://www.w3.org/1999/xhtml"&&(p=Mt(C)),p==="http://www.w3.org/1999/xhtml"?C==="script"?(p=de.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild)):typeof I.is=="string"?p=de.createElement(C,{is:I.is}):(p=de.createElement(C),C==="select"&&(de=p,I.multiple?de.multiple=!0:I.size&&(de.size=I.size))):p=de.createElementNS(p,C),p[Zl]=v,p[mh]=I,ME(p,v,!1,!1),v.stateNode=p;e:{switch(de=Ha(C,I),C){case"dialog":Wr("cancel",p),Wr("close",p),V=I;break;case"iframe":case"object":case"embed":Wr("load",p),V=I;break;case"video":case"audio":for(V=0;V<Cd.length;V++)Wr(Cd[V],p);V=I;break;case"source":Wr("error",p),V=I;break;case"img":case"image":case"link":Wr("error",p),Wr("load",p),V=I;break;case"details":Wr("toggle",p),V=I;break;case"input":Ne(p,I),V=he(p,I),Wr("invalid",p);break;case"option":V=I;break;case"select":p._wrapperState={wasMultiple:!!I.multiple},V=J({},I,{value:void 0}),Wr("invalid",p);break;case"textarea":We(p,I),V=be(p,I),Wr("invalid",p);break;default:V=I}lr(C,V),Oe=V;for(X in Oe)if(Oe.hasOwnProperty(X)){var De=Oe[X];X==="style"?Rr(p,De):X==="dangerouslySetInnerHTML"?(De=De?De.__html:void 0,De!=null&&on(p,De)):X==="children"?typeof De=="string"?(C!=="textarea"||De!=="")&&It(p,De):typeof De=="number"&&It(p,""+De):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(s.hasOwnProperty(X)?De!=null&&X==="onScroll"&&Wr("scroll",p):De!=null&&j(p,X,De,de))}switch(C){case"input":je(p),Te(p,I,!1);break;case"textarea":je(p),st(p);break;case"option":I.value!=null&&p.setAttribute("value",""+oe(I.value));break;case"select":p.multiple=!!I.multiple,X=I.value,X!=null?Ve(p,!!I.multiple,X,!1):I.defaultValue!=null&&Ve(p,!!I.multiple,I.defaultValue,!0);break;default:typeof V.onClick=="function"&&(p.onclick=fh)}switch(C){case"button":case"input":case"select":case"textarea":I=!!I.autoFocus;break e;case"img":I=!0;break e;default:I=!1}}I&&(v.flags|=4)}v.ref!==null&&(v.flags|=512,v.flags|=2097152)}return Ui(v),null;case 6:if(p&&v.stateNode!=null)RE(p,v,p.memoizedProps,I);else{if(typeof I!="string"&&v.stateNode===null)throw Error(r(166));if(C=Rc(Ed.current),Rc(ho.current),br(v)){if(I=v.stateNode,C=v.memoizedProps,I[Zl]=v,(X=I.nodeValue!==C)&&(p=Be,p!==null))switch(p.tag){case 3:op(I.nodeValue,C,(p.mode&1)!==0);break;case 5:p.memoizedProps.suppressHydrationWarning!==!0&&op(I.nodeValue,C,(p.mode&1)!==0)}X&&(v.flags|=4)}else I=(C.nodeType===9?C:C.ownerDocument).createTextNode(I),I[Zl]=v,v.stateNode=I}return Ui(v),null;case 13:if(Tr(ia),I=v.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(ct&&ut!==null&&(v.mode&1)!==0&&(v.flags&128)===0)hr(),Dn(),v.flags|=98560,X=!1;else if(X=br(v),I!==null&&I.dehydrated!==null){if(p===null){if(!X)throw Error(r(318));if(X=v.memoizedState,X=X!==null?X.dehydrated:null,!X)throw Error(r(317));X[Zl]=v}else Dn(),(v.flags&128)===0&&(v.memoizedState=null),v.flags|=4;Ui(v),X=!1}else ft!==null&&(q2(ft),ft=null),X=!0;if(!X)return v.flags&65536?v:null}return(v.flags&128)!==0?(v.lanes=C,v):(I=I!==null,I!==(p!==null&&p.memoizedState!==null)&&I&&(v.child.flags|=8192,(v.mode&1)!==0&&(p===null||(ia.current&1)!==0?Bs===0&&(Bs=3):U2())),v.updateQueue!==null&&(v.flags|=4),Ui(v),null);case 4:return tc(),k2(p,v),p===null&&gu(v.stateNode.containerInfo),Ui(v),null;case 10:return $i(v.type._context),Ui(v),null;case 17:return Bi(v.type)&&lp(),Ui(v),null;case 19:if(Tr(ia),X=v.memoizedState,X===null)return Ui(v),null;if(I=(v.flags&128)!==0,de=X.rendering,de===null)if(I)$x(X,!1);else{if(Bs!==0||p!==null&&(p.flags&128)!==0)for(p=v.child;p!==null;){if(de=vl(p),de!==null){for(v.flags|=128,$x(X,!1),I=de.updateQueue,I!==null&&(v.updateQueue=I,v.flags|=4),v.subtreeFlags=0,I=C,C=v.child;C!==null;)X=C,p=I,X.flags&=14680066,de=X.alternate,de===null?(X.childLanes=0,X.lanes=p,X.child=null,X.subtreeFlags=0,X.memoizedProps=null,X.memoizedState=null,X.updateQueue=null,X.dependencies=null,X.stateNode=null):(X.childLanes=de.childLanes,X.lanes=de.lanes,X.child=de.child,X.subtreeFlags=0,X.deletions=null,X.memoizedProps=de.memoizedProps,X.memoizedState=de.memoizedState,X.updateQueue=de.updateQueue,X.type=de.type,p=de.dependencies,X.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext}),C=C.sibling;return Fr(ia,ia.current&1|2),v.child}p=p.sibling}X.tail!==null&&$n()>jp&&(v.flags|=128,I=!0,$x(X,!1),v.lanes=4194304)}else{if(!I)if(p=vl(de),p!==null){if(v.flags|=128,I=!0,C=p.updateQueue,C!==null&&(v.updateQueue=C,v.flags|=4),$x(X,!0),X.tail===null&&X.tailMode==="hidden"&&!de.alternate&&!ct)return Ui(v),null}else 2*$n()-X.renderingStartTime>jp&&C!==1073741824&&(v.flags|=128,I=!0,$x(X,!1),v.lanes=4194304);X.isBackwards?(de.sibling=v.child,v.child=de):(C=X.last,C!==null?C.sibling=de:v.child=de,X.last=de)}return X.tail!==null?(v=X.tail,X.rendering=v,X.tail=v.sibling,X.renderingStartTime=$n(),v.sibling=null,C=ia.current,Fr(ia,I?C&1|2:C&1),v):(Ui(v),null);case 22:case 23:return $2(),I=v.memoizedState!==null,p!==null&&p.memoizedState!==null!==I&&(v.flags|=8192),I&&(v.mode&1)!==0?(jl&1073741824)!==0&&(Ui(v),v.subtreeFlags&6&&(v.flags|=8192)):Ui(v),null;case 24:return null;case 25:return null}throw Error(r(156,v.tag))}function nQ(p,v){switch(qe(v),v.tag){case 1:return Bi(v.type)&&lp(),p=v.flags,p&65536?(v.flags=p&-65537|128,v):null;case 3:return tc(),Tr(qi),Tr(Fs),Fx(),p=v.flags,(p&65536)!==0&&(p&128)===0?(v.flags=p&-65537|128,v):null;case 5:return Ix(v),null;case 13:if(Tr(ia),p=v.memoizedState,p!==null&&p.dehydrated!==null){if(v.alternate===null)throw Error(r(340));Dn()}return p=v.flags,p&65536?(v.flags=p&-65537|128,v):null;case 19:return Tr(ia),null;case 4:return tc(),null;case 10:return $i(v.type._context),null;case 22:case 23:return $2(),null;case 24:return null;default:return null}}var qv=!1,zi=!1,rQ=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function bp(p,v){var C=p.ref;if(C!==null)if(typeof C=="function")try{C(null)}catch(I){Ya(p,v,I)}else C.current=null}function P2(p,v,C){try{C()}catch(I){Ya(p,v,I)}}var IE=!1;function aQ(p,v){if(Ef=ts,p=ei(),Xl(p)){if("selectionStart"in p)var C={start:p.selectionStart,end:p.selectionEnd};else e:{C=(C=p.ownerDocument)&&C.defaultView||window;var I=C.getSelection&&C.getSelection();if(I&&I.rangeCount!==0){C=I.anchorNode;var V=I.anchorOffset,X=I.focusNode;I=I.focusOffset;try{C.nodeType,X.nodeType}catch{C=null;break e}var de=0,Oe=-1,De=-1,at=0,jt=0,At=p,bt=null;t:for(;;){for(var Vt;At!==C||V!==0&&At.nodeType!==3||(Oe=de+V),At!==X||I!==0&&At.nodeType!==3||(De=de+I),At.nodeType===3&&(de+=At.nodeValue.length),(Vt=At.firstChild)!==null;)bt=At,At=Vt;for(;;){if(At===p)break t;if(bt===C&&++at===V&&(Oe=de),bt===X&&++jt===I&&(De=de),(Vt=At.nextSibling)!==null)break;At=bt,bt=At.parentNode}At=Vt}C=Oe===-1||De===-1?null:{start:Oe,end:De}}else C=null}C=C||{start:0,end:0}}else C=null;for(yu={focusedElem:p,selectionRange:C},ts=!1,Jt=v;Jt!==null;)if(v=Jt,p=v.child,(v.subtreeFlags&1028)!==0&&p!==null)p.return=v,Jt=p;else for(;Jt!==null;){v=Jt;try{var tn=v.alternate;if((v.flags&1024)!==0)switch(v.tag){case 0:case 11:case 15:break;case 1:if(tn!==null){var sn=tn.memoizedProps,cs=tn.memoizedState,et=v.stateNode,He=et.getSnapshotBeforeUpdate(v.elementType===v.type?sn:Fc(v.type,sn),cs);et.__reactInternalSnapshotBeforeUpdate=He}break;case 3:var tt=v.stateNode.containerInfo;tt.nodeType===1?tt.textContent="":tt.nodeType===9&&tt.documentElement&&tt.removeChild(tt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Et){Ya(v,v.return,Et)}if(p=v.sibling,p!==null){p.return=v.return,Jt=p;break}Jt=v.return}return tn=IE,IE=!1,tn}function Ux(p,v,C){var I=v.updateQueue;if(I=I!==null?I.lastEffect:null,I!==null){var V=I=I.next;do{if((V.tag&p)===p){var X=V.destroy;V.destroy=void 0,X!==void 0&&P2(v,C,X)}V=V.next}while(V!==I)}}function Bv(p,v){if(v=v.updateQueue,v=v!==null?v.lastEffect:null,v!==null){var C=v=v.next;do{if((C.tag&p)===p){var I=C.create;C.destroy=I()}C=C.next}while(C!==v)}}function E2(p){var v=p.ref;if(v!==null){var C=p.stateNode;switch(p.tag){case 5:p=C;break;default:p=C}typeof v=="function"?v(p):v.current=p}}function DE(p){var v=p.alternate;v!==null&&(p.alternate=null,DE(v)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(v=p.stateNode,v!==null&&(delete v[Zl],delete v[mh],delete v[Fi],delete v[m2],delete v[p2])),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function FE(p){return p.tag===5||p.tag===3||p.tag===4}function qE(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||FE(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function T2(p,v,C){var I=p.tag;if(I===5||I===6)p=p.stateNode,v?C.nodeType===8?C.parentNode.insertBefore(p,v):C.insertBefore(p,v):(C.nodeType===8?(v=C.parentNode,v.insertBefore(p,C)):(v=C,v.appendChild(p)),C=C._reactRootContainer,C!=null||v.onclick!==null||(v.onclick=fh));else if(I!==4&&(p=p.child,p!==null))for(T2(p,v,C),p=p.sibling;p!==null;)T2(p,v,C),p=p.sibling}function O2(p,v,C){var I=p.tag;if(I===5||I===6)p=p.stateNode,v?C.insertBefore(p,v):C.appendChild(p);else if(I!==4&&(p=p.child,p!==null))for(O2(p,v,C),p=p.sibling;p!==null;)O2(p,v,C),p=p.sibling}var wi=null,qc=!1;function Nh(p,v,C){for(C=C.child;C!==null;)BE(p,v,C),C=C.sibling}function BE(p,v,C){if(vs&&typeof vs.onCommitFiberUnmount=="function")try{vs.onCommitFiberUnmount(ao,C)}catch{}switch(C.tag){case 5:zi||bp(C,v);case 6:var I=wi,V=qc;wi=null,Nh(p,v,C),wi=I,qc=V,wi!==null&&(qc?(p=wi,C=C.stateNode,p.nodeType===8?p.parentNode.removeChild(C):p.removeChild(C)):wi.removeChild(C.stateNode));break;case 18:wi!==null&&(qc?(p=wi,C=C.stateNode,p.nodeType===8?Ox(p.parentNode,C):p.nodeType===1&&Ox(p,C),Oo(p)):Ox(wi,C.stateNode));break;case 4:I=wi,V=qc,wi=C.stateNode.containerInfo,qc=!0,Nh(p,v,C),wi=I,qc=V;break;case 0:case 11:case 14:case 15:if(!zi&&(I=C.updateQueue,I!==null&&(I=I.lastEffect,I!==null))){V=I=I.next;do{var X=V,de=X.destroy;X=X.tag,de!==void 0&&((X&2)!==0||(X&4)!==0)&&P2(C,v,de),V=V.next}while(V!==I)}Nh(p,v,C);break;case 1:if(!zi&&(bp(C,v),I=C.stateNode,typeof I.componentWillUnmount=="function"))try{I.props=C.memoizedProps,I.state=C.memoizedState,I.componentWillUnmount()}catch(Oe){Ya(C,v,Oe)}Nh(p,v,C);break;case 21:Nh(p,v,C);break;case 22:C.mode&1?(zi=(I=zi)||C.memoizedState!==null,Nh(p,v,C),zi=I):Nh(p,v,C);break;default:Nh(p,v,C)}}function $E(p){var v=p.updateQueue;if(v!==null){p.updateQueue=null;var C=p.stateNode;C===null&&(C=p.stateNode=new rQ),v.forEach(function(I){var V=fQ.bind(null,p,I);C.has(I)||(C.add(I),I.then(V,V))})}}function Bc(p,v){var C=v.deletions;if(C!==null)for(var I=0;I<C.length;I++){var V=C[I];try{var X=p,de=v,Oe=de;e:for(;Oe!==null;){switch(Oe.tag){case 5:wi=Oe.stateNode,qc=!1;break e;case 3:wi=Oe.stateNode.containerInfo,qc=!0;break e;case 4:wi=Oe.stateNode.containerInfo,qc=!0;break e}Oe=Oe.return}if(wi===null)throw Error(r(160));BE(X,de,V),wi=null,qc=!1;var De=V.alternate;De!==null&&(De.return=null),V.return=null}catch(at){Ya(V,v,at)}}if(v.subtreeFlags&12854)for(v=v.child;v!==null;)UE(v,p),v=v.sibling}function UE(p,v){var C=p.alternate,I=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:if(Bc(v,p),Od(p),I&4){try{Ux(3,p,p.return),Bv(3,p)}catch(sn){Ya(p,p.return,sn)}try{Ux(5,p,p.return)}catch(sn){Ya(p,p.return,sn)}}break;case 1:Bc(v,p),Od(p),I&512&&C!==null&&bp(C,C.return);break;case 5:if(Bc(v,p),Od(p),I&512&&C!==null&&bp(C,C.return),p.flags&32){var V=p.stateNode;try{It(V,"")}catch(sn){Ya(p,p.return,sn)}}if(I&4&&(V=p.stateNode,V!=null)){var X=p.memoizedProps,de=C!==null?C.memoizedProps:X,Oe=p.type,De=p.updateQueue;if(p.updateQueue=null,De!==null)try{Oe==="input"&&X.type==="radio"&&X.name!=null&&ue(V,X),Ha(Oe,de);var at=Ha(Oe,X);for(de=0;de<De.length;de+=2){var jt=De[de],At=De[de+1];jt==="style"?Rr(V,At):jt==="dangerouslySetInnerHTML"?on(V,At):jt==="children"?It(V,At):j(V,jt,At,at)}switch(Oe){case"input":rt(V,X);break;case"textarea":Ze(V,X);break;case"select":var bt=V._wrapperState.wasMultiple;V._wrapperState.wasMultiple=!!X.multiple;var Vt=X.value;Vt!=null?Ve(V,!!X.multiple,Vt,!1):bt!==!!X.multiple&&(X.defaultValue!=null?Ve(V,!!X.multiple,X.defaultValue,!0):Ve(V,!!X.multiple,X.multiple?[]:"",!1))}V[mh]=X}catch(sn){Ya(p,p.return,sn)}}break;case 6:if(Bc(v,p),Od(p),I&4){if(p.stateNode===null)throw Error(r(162));V=p.stateNode,X=p.memoizedProps;try{V.nodeValue=X}catch(sn){Ya(p,p.return,sn)}}break;case 3:if(Bc(v,p),Od(p),I&4&&C!==null&&C.memoizedState.isDehydrated)try{Oo(v.containerInfo)}catch(sn){Ya(p,p.return,sn)}break;case 4:Bc(v,p),Od(p);break;case 13:Bc(v,p),Od(p),V=p.child,V.flags&8192&&(X=V.memoizedState!==null,V.stateNode.isHidden=X,!X||V.alternate!==null&&V.alternate.memoizedState!==null||(R2=$n())),I&4&&$E(p);break;case 22:if(jt=C!==null&&C.memoizedState!==null,p.mode&1?(zi=(at=zi)||jt,Bc(v,p),zi=at):Bc(v,p),Od(p),I&8192){if(at=p.memoizedState!==null,(p.stateNode.isHidden=at)&&!jt&&(p.mode&1)!==0)for(Jt=p,jt=p.child;jt!==null;){for(At=Jt=jt;Jt!==null;){switch(bt=Jt,Vt=bt.child,bt.tag){case 0:case 11:case 14:case 15:Ux(4,bt,bt.return);break;case 1:bp(bt,bt.return);var tn=bt.stateNode;if(typeof tn.componentWillUnmount=="function"){I=bt,C=bt.return;try{v=I,tn.props=v.memoizedProps,tn.state=v.memoizedState,tn.componentWillUnmount()}catch(sn){Ya(I,C,sn)}}break;case 5:bp(bt,bt.return);break;case 22:if(bt.memoizedState!==null){HE(At);continue}}Vt!==null?(Vt.return=bt,Jt=Vt):HE(At)}jt=jt.sibling}e:for(jt=null,At=p;;){if(At.tag===5){if(jt===null){jt=At;try{V=At.stateNode,at?(X=V.style,typeof X.setProperty=="function"?X.setProperty("display","none","important"):X.display="none"):(Oe=At.stateNode,De=At.memoizedProps.style,de=De!=null&&De.hasOwnProperty("display")?De.display:null,Oe.style.display=xn("display",de))}catch(sn){Ya(p,p.return,sn)}}}else if(At.tag===6){if(jt===null)try{At.stateNode.nodeValue=at?"":At.memoizedProps}catch(sn){Ya(p,p.return,sn)}}else if((At.tag!==22&&At.tag!==23||At.memoizedState===null||At===p)&&At.child!==null){At.child.return=At,At=At.child;continue}if(At===p)break e;for(;At.sibling===null;){if(At.return===null||At.return===p)break e;jt===At&&(jt=null),At=At.return}jt===At&&(jt=null),At.sibling.return=At.return,At=At.sibling}}break;case 19:Bc(v,p),Od(p),I&4&&$E(p);break;case 21:break;default:Bc(v,p),Od(p)}}function Od(p){var v=p.flags;if(v&2){try{e:{for(var C=p.return;C!==null;){if(FE(C)){var I=C;break e}C=C.return}throw Error(r(160))}switch(I.tag){case 5:var V=I.stateNode;I.flags&32&&(It(V,""),I.flags&=-33);var X=qE(p);O2(p,X,V);break;case 3:case 4:var de=I.stateNode.containerInfo,Oe=qE(p);T2(p,Oe,de);break;default:throw Error(r(161))}}catch(De){Ya(p,p.return,De)}p.flags&=-3}v&4096&&(p.flags&=-4097)}function sQ(p,v,C){Jt=p,zE(p)}function zE(p,v,C){for(var I=(p.mode&1)!==0;Jt!==null;){var V=Jt,X=V.child;if(V.tag===22&&I){var de=V.memoizedState!==null||qv;if(!de){var Oe=V.alternate,De=Oe!==null&&Oe.memoizedState!==null||zi;Oe=qv;var at=zi;if(qv=de,(zi=De)&&!at)for(Jt=V;Jt!==null;)de=Jt,De=de.child,de.tag===22&&de.memoizedState!==null?WE(V):De!==null?(De.return=de,Jt=De):WE(V);for(;X!==null;)Jt=X,zE(X),X=X.sibling;Jt=V,qv=Oe,zi=at}VE(p)}else(V.subtreeFlags&8772)!==0&&X!==null?(X.return=V,Jt=X):VE(p)}}function VE(p){for(;Jt!==null;){var v=Jt;if((v.flags&8772)!==0){var C=v.alternate;try{if((v.flags&8772)!==0)switch(v.tag){case 0:case 11:case 15:zi||Bv(5,v);break;case 1:var I=v.stateNode;if(v.flags&4&&!zi)if(C===null)I.componentDidMount();else{var V=v.elementType===v.type?C.memoizedProps:Fc(v.type,C.memoizedProps);I.componentDidUpdate(V,C.memoizedState,I.__reactInternalSnapshotBeforeUpdate)}var X=v.updateQueue;X!==null&&Nu(v,X,I);break;case 3:var de=v.updateQueue;if(de!==null){if(C=null,v.child!==null)switch(v.child.tag){case 5:C=v.child.stateNode;break;case 1:C=v.child.stateNode}Nu(v,de,C)}break;case 5:var Oe=v.stateNode;if(C===null&&v.flags&4){C=Oe;var De=v.memoizedProps;switch(v.type){case"button":case"input":case"select":case"textarea":De.autoFocus&&C.focus();break;case"img":De.src&&(C.src=De.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(v.memoizedState===null){var at=v.alternate;if(at!==null){var jt=at.memoizedState;if(jt!==null){var At=jt.dehydrated;At!==null&&Oo(At)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}zi||v.flags&512&&E2(v)}catch(bt){Ya(v,v.return,bt)}}if(v===p){Jt=null;break}if(C=v.sibling,C!==null){C.return=v.return,Jt=C;break}Jt=v.return}}function HE(p){for(;Jt!==null;){var v=Jt;if(v===p){Jt=null;break}var C=v.sibling;if(C!==null){C.return=v.return,Jt=C;break}Jt=v.return}}function WE(p){for(;Jt!==null;){var v=Jt;try{switch(v.tag){case 0:case 11:case 15:var C=v.return;try{Bv(4,v)}catch(De){Ya(v,C,De)}break;case 1:var I=v.stateNode;if(typeof I.componentDidMount=="function"){var V=v.return;try{I.componentDidMount()}catch(De){Ya(v,V,De)}}var X=v.return;try{E2(v)}catch(De){Ya(v,X,De)}break;case 5:var de=v.return;try{E2(v)}catch(De){Ya(v,de,De)}}}catch(De){Ya(v,v.return,De)}if(v===p){Jt=null;break}var Oe=v.sibling;if(Oe!==null){Oe.return=v.return,Jt=Oe;break}Jt=v.return}}var iQ=Math.ceil,$v=N.ReactCurrentDispatcher,M2=N.ReactCurrentOwner,ac=N.ReactCurrentBatchConfig,Nr=0,ai=null,ws=null,ji=0,jl=0,wp=yl(0),Bs=0,zx=null,If=0,Uv=0,L2=0,Vx=null,Qo=null,R2=0,jp=1/0,Cu=null,zv=!1,I2=null,_h=null,Vv=!1,Sh=null,Hv=0,Hx=0,D2=null,Wv=-1,Kv=0;function go(){return(Nr&6)!==0?$n():Wv!==-1?Wv:Wv=$n()}function Ch(p){return(p.mode&1)===0?1:(Nr&2)!==0&&ji!==0?ji&-ji:qr.transition!==null?(Kv===0&&(Kv=Fl()),Kv):(p=sr,p!==0||(p=window.event,p=p===void 0?16:Hl(p.type)),p)}function $c(p,v,C,I){if(50<Hx)throw Hx=0,D2=null,Error(r(185));ql(p,C,I),((Nr&2)===0||p!==ai)&&(p===ai&&((Nr&2)===0&&(Uv|=C),Bs===4&&Ah(p,ji)),Xo(p,I),C===1&&Nr===0&&(v.mode&1)===0&&(jp=$n()+500,Of&&Z()))}function Xo(p,v){var C=p.callbackNode;Ks(p,v);var I=bs(p,p===ai?ji:0);if(I===0)C!==null&&Da(C),p.callbackNode=null,p.callbackPriority=0;else if(v=I&-I,p.callbackPriority!==v){if(C!=null&&Da(C),v===1)p.tag===0?W(GE.bind(null,p)):D(GE.bind(null,p)),h2(function(){(Nr&6)===0&&Z()}),C=null;else{switch(Bl(I)){case 1:C=Wt;break;case 4:C=ys;break;case 16:C=Fa;break;case 536870912:C=Il;break;default:C=Fa}C=nT(C,KE.bind(null,p))}p.callbackPriority=v,p.callbackNode=C}}function KE(p,v){if(Wv=-1,Kv=0,(Nr&6)!==0)throw Error(r(327));var C=p.callbackNode;if(Np()&&p.callbackNode!==C)return null;var I=bs(p,p===ai?ji:0);if(I===0)return null;if((I&30)!==0||(I&p.expiredLanes)!==0||v)v=Gv(p,I);else{v=I;var V=Nr;Nr|=2;var X=QE();(ai!==p||ji!==v)&&(Cu=null,jp=$n()+500,Ff(p,v));do try{cQ();break}catch(Oe){YE(p,Oe)}while(!0);qs(),$v.current=X,Nr=V,ws!==null?v=0:(ai=null,ji=0,v=Bs)}if(v!==0){if(v===2&&(V=Dl(p),V!==0&&(I=V,v=F2(p,V))),v===1)throw C=zx,Ff(p,0),Ah(p,I),Xo(p,$n()),C;if(v===6)Ah(p,I);else{if(V=p.current.alternate,(I&30)===0&&!oQ(V)&&(v=Gv(p,I),v===2&&(X=Dl(p),X!==0&&(I=X,v=F2(p,X))),v===1))throw C=zx,Ff(p,0),Ah(p,I),Xo(p,$n()),C;switch(p.finishedWork=V,p.finishedLanes=I,v){case 0:case 1:throw Error(r(345));case 2:qf(p,Qo,Cu);break;case 3:if(Ah(p,I),(I&130023424)===I&&(v=R2+500-$n(),10<v)){if(bs(p,0)!==0)break;if(V=p.suspendedLanes,(V&I)!==I){go(),p.pingedLanes|=p.suspendedLanes&V;break}p.timeoutHandle=Tx(qf.bind(null,p,Qo,Cu),v);break}qf(p,Qo,Cu);break;case 4:if(Ah(p,I),(I&4194240)===I)break;for(v=p.eventTimes,V=-1;0<I;){var de=31-es(I);X=1<<de,de=v[de],de>V&&(V=de),I&=~X}if(I=V,I=$n()-I,I=(120>I?120:480>I?480:1080>I?1080:1920>I?1920:3e3>I?3e3:4320>I?4320:1960*iQ(I/1960))-I,10<I){p.timeoutHandle=Tx(qf.bind(null,p,Qo,Cu),I);break}qf(p,Qo,Cu);break;case 5:qf(p,Qo,Cu);break;default:throw Error(r(329))}}}return Xo(p,$n()),p.callbackNode===C?KE.bind(null,p):null}function F2(p,v){var C=Vx;return p.current.memoizedState.isDehydrated&&(Ff(p,v).flags|=256),p=Gv(p,v),p!==2&&(v=Qo,Qo=C,v!==null&&q2(v)),p}function q2(p){Qo===null?Qo=p:Qo.push.apply(Qo,p)}function oQ(p){for(var v=p;;){if(v.flags&16384){var C=v.updateQueue;if(C!==null&&(C=C.stores,C!==null))for(var I=0;I<C.length;I++){var V=C[I],X=V.getSnapshot;V=V.value;try{if(!Un(X(),V))return!1}catch{return!1}}}if(C=v.child,v.subtreeFlags&16384&&C!==null)C.return=v,v=C;else{if(v===p)break;for(;v.sibling===null;){if(v.return===null||v.return===p)return!0;v=v.return}v.sibling.return=v.return,v=v.sibling}}return!0}function Ah(p,v){for(v&=~L2,v&=~Uv,p.suspendedLanes|=v,p.pingedLanes&=~v,p=p.expirationTimes;0<v;){var C=31-es(v),I=1<<C;p[C]=-1,v&=~I}}function GE(p){if((Nr&6)!==0)throw Error(r(327));Np();var v=bs(p,0);if((v&1)===0)return Xo(p,$n()),null;var C=Gv(p,v);if(p.tag!==0&&C===2){var I=Dl(p);I!==0&&(v=I,C=F2(p,I))}if(C===1)throw C=zx,Ff(p,0),Ah(p,v),Xo(p,$n()),C;if(C===6)throw Error(r(345));return p.finishedWork=p.current.alternate,p.finishedLanes=v,qf(p,Qo,Cu),Xo(p,$n()),null}function B2(p,v){var C=Nr;Nr|=1;try{return p(v)}finally{Nr=C,Nr===0&&(jp=$n()+500,Of&&Z())}}function Df(p){Sh!==null&&Sh.tag===0&&(Nr&6)===0&&Np();var v=Nr;Nr|=1;var C=ac.transition,I=sr;try{if(ac.transition=null,sr=1,p)return p()}finally{sr=I,ac.transition=C,Nr=v,(Nr&6)===0&&Z()}}function $2(){jl=wp.current,Tr(wp)}function Ff(p,v){p.finishedWork=null,p.finishedLanes=0;var C=p.timeoutHandle;if(C!==-1&&(p.timeoutHandle=-1,Cv(C)),ws!==null)for(C=ws.return;C!==null;){var I=C;switch(qe(I),I.tag){case 1:I=I.type.childContextTypes,I!=null&&lp();break;case 3:tc(),Tr(qi),Tr(Fs),Fx();break;case 5:Ix(I);break;case 4:tc();break;case 13:Tr(ia);break;case 19:Tr(ia);break;case 10:$i(I.type._context);break;case 22:case 23:$2()}C=C.return}if(ai=p,ws=p=kh(p.current,null),ji=jl=v,Bs=0,zx=null,L2=Uv=If=0,Qo=Vx=null,uo!==null){for(v=0;v<uo.length;v++)if(C=uo[v],I=C.interleaved,I!==null){C.interleaved=null;var V=I.next,X=C.pending;if(X!==null){var de=X.next;X.next=V,I.next=de}C.pending=I}uo=null}return p}function YE(p,v){do{var C=ws;try{if(qs(),dp.current=Rv,bh){for(var I=ma.memoizedState;I!==null;){var V=I.queue;V!==null&&(V.pending=null),I=I.next}bh=!1}if(nc=0,$a=Ga=ma=null,Ic=!1,wh=0,M2.current=null,C===null||C.return===null){Bs=1,zx=v,ws=null;break}e:{var X=p,de=C.return,Oe=C,De=v;if(v=ji,Oe.flags|=32768,De!==null&&typeof De=="object"&&typeof De.then=="function"){var at=De,jt=Oe,At=jt.tag;if((jt.mode&1)===0&&(At===0||At===11||At===15)){var bt=jt.alternate;bt?(jt.updateQueue=bt.updateQueue,jt.memoizedState=bt.memoizedState,jt.lanes=bt.lanes):(jt.updateQueue=null,jt.memoizedState=null)}var Vt=bE(de);if(Vt!==null){Vt.flags&=-257,wE(Vt,de,Oe,X,v),Vt.mode&1&&vE(X,at,v),v=Vt,De=at;var tn=v.updateQueue;if(tn===null){var sn=new Set;sn.add(De),v.updateQueue=sn}else tn.add(De);break e}else{if((v&1)===0){vE(X,at,v),U2();break e}De=Error(r(426))}}else if(ct&&Oe.mode&1){var cs=bE(de);if(cs!==null){(cs.flags&65536)===0&&(cs.flags|=256),wE(cs,de,Oe,X,v),Or(vp(De,Oe));break e}}X=De=vp(De,Oe),Bs!==4&&(Bs=2),Vx===null?Vx=[X]:Vx.push(X),X=de;do{switch(X.tag){case 3:X.flags|=65536,v&=-v,X.lanes|=v;var et=xE(X,De,v);Go(X,et);break e;case 1:Oe=De;var He=X.type,tt=X.stateNode;if((X.flags&128)===0&&(typeof He.getDerivedStateFromError=="function"||tt!==null&&typeof tt.componentDidCatch=="function"&&(_h===null||!_h.has(tt)))){X.flags|=65536,v&=-v,X.lanes|=v;var Et=yE(X,Oe,v);Go(X,Et);break e}}X=X.return}while(X!==null)}JE(C)}catch(dn){v=dn,ws===C&&C!==null&&(ws=C=C.return);continue}break}while(!0)}function QE(){var p=$v.current;return $v.current=Rv,p===null?Rv:p}function U2(){(Bs===0||Bs===3||Bs===2)&&(Bs=4),ai===null||(If&268435455)===0&&(Uv&268435455)===0||Ah(ai,ji)}function Gv(p,v){var C=Nr;Nr|=2;var I=QE();(ai!==p||ji!==v)&&(Cu=null,Ff(p,v));do try{lQ();break}catch(V){YE(p,V)}while(!0);if(qs(),Nr=C,$v.current=I,ws!==null)throw Error(r(261));return ai=null,ji=0,Bs}function lQ(){for(;ws!==null;)XE(ws)}function cQ(){for(;ws!==null&&!ur();)XE(ws)}function XE(p){var v=tT(p.alternate,p,jl);p.memoizedProps=p.pendingProps,v===null?JE(p):ws=v,M2.current=null}function JE(p){var v=p;do{var C=v.alternate;if(p=v.return,(v.flags&32768)===0){if(C=tQ(C,v,jl),C!==null){ws=C;return}}else{if(C=nQ(C,v),C!==null){C.flags&=32767,ws=C;return}if(p!==null)p.flags|=32768,p.subtreeFlags=0,p.deletions=null;else{Bs=6,ws=null;return}}if(v=v.sibling,v!==null){ws=v;return}
vendor: 5,145 bytes, line 40
40ws=v=p}while(v!==null);Bs===0&&(Bs=5)}function qf(p,v,C){var I=sr,V=ac.transition;try{ac.transition=null,sr=1,dQ(p,v,C,I)}finally{ac.transition=V,sr=I}return null}function dQ(p,v,C,I){do Np();while(Sh!==null);if((Nr&6)!==0)throw Error(r(327));C=p.finishedWork;var V=p.finishedLanes;if(C===null)return null;if(p.finishedWork=null,p.finishedLanes=0,C===p.current)throw Error(r(177));p.callbackNode=null,p.callbackPriority=0;var X=C.lanes|C.childLanes;if(dh(p,X),p===ai&&(ws=ai=null,ji=0),(C.subtreeFlags&2064)===0&&(C.flags&2064)===0||Vv||(Vv=!0,nT(Fa,function(){return Np(),null})),X=(C.flags&15990)!==0,(C.subtreeFlags&15990)!==0||X){X=ac.transition,ac.transition=null;var de=sr;sr=1;var Oe=Nr;Nr|=4,M2.current=null,aQ(p,C),UE(C,p),Jl(yu),ts=!!Ef,yu=Ef=null,p.current=C,sQ(C),fi(),Nr=Oe,sr=de,ac.transition=X}else p.current=C;if(Vv&&(Vv=!1,Sh=p,Hv=V),X=p.pendingLanes,X===0&&(_h=null),ol(C.stateNode),Xo(p,$n()),v!==null)for(I=p.onRecoverableError,C=0;C<v.length;C++)V=v[C],I(V.value,{componentStack:V.stack,digest:V.digest});if(zv)throw zv=!1,p=I2,I2=null,p;return(Hv&1)!==0&&p.tag!==0&&Np(),X=p.pendingLanes,(X&1)!==0?p===D2?Hx++:(Hx=0,D2=p):Hx=0,Z(),null}function Np(){if(Sh!==null){var p=Bl(Hv),v=ac.transition,C=sr;try{if(ac.transition=null,sr=16>p?16:p,Sh===null)var I=!1;else{if(p=Sh,Sh=null,Hv=0,(Nr&6)!==0)throw Error(r(331));var V=Nr;for(Nr|=4,Jt=p.current;Jt!==null;){var X=Jt,de=X.child;if((Jt.flags&16)!==0){var Oe=X.deletions;if(Oe!==null){for(var De=0;De<Oe.length;De++){var at=Oe[De];for(Jt=at;Jt!==null;){var jt=Jt;switch(jt.tag){case 0:case 11:case 15:Ux(8,jt,X)}var At=jt.child;if(At!==null)At.return=jt,Jt=At;else for(;Jt!==null;){jt=Jt;var bt=jt.sibling,Vt=jt.return;if(DE(jt),jt===at){Jt=null;break}if(bt!==null){bt.return=Vt,Jt=bt;break}Jt=Vt}}}var tn=X.alternate;if(tn!==null){var sn=tn.child;if(sn!==null){tn.child=null;do{var cs=sn.sibling;sn.sibling=null,sn=cs}while(sn!==null)}}Jt=X}}if((X.subtreeFlags&2064)!==0&&de!==null)de.return=X,Jt=de;else e:for(;Jt!==null;){if(X=Jt,(X.flags&2048)!==0)switch(X.tag){case 0:case 11:case 15:Ux(9,X,X.return)}var et=X.sibling;if(et!==null){et.return=X.return,Jt=et;break e}Jt=X.return}}var He=p.current;for(Jt=He;Jt!==null;){de=Jt;var tt=de.child;if((de.subtreeFlags&2064)!==0&&tt!==null)tt.return=de,Jt=tt;else e:for(de=He;Jt!==null;){if(Oe=Jt,(Oe.flags&2048)!==0)try{switch(Oe.tag){case 0:case 11:case 15:Bv(9,Oe)}}catch(dn){Ya(Oe,Oe.return,dn)}if(Oe===de){Jt=null;break e}var Et=Oe.sibling;if(Et!==null){Et.return=Oe.return,Jt=Et;break e}Jt=Oe.return}}if(Nr=V,Z(),vs&&typeof vs.onPostCommitFiberRoot=="function")try{vs.onPostCommitFiberRoot(ao,p)}catch{}I=!0}return I}finally{sr=C,ac.transition=v}}return!1}function ZE(p,v,C){v=vp(C,v),v=xE(p,v,1),p=Ko(p,v,1),v=go(),p!==null&&(ql(p,1,v),Xo(p,v))}function Ya(p,v,C){if(p.tag===3)ZE(p,p,C);else for(;v!==null;){if(v.tag===3){ZE(v,p,C);break}else if(v.tag===1){var I=v.stateNode;if(typeof v.type.getDerivedStateFromError=="function"||typeof I.componentDidCatch=="function"&&(_h===null||!_h.has(I))){p=vp(C,p),p=yE(v,p,1),v=Ko(v,p,1),p=go(),v!==null&&(ql(v,1,p),Xo(v,p));break}}v=v.return}}function uQ(p,v,C){var I=p.pingCache;I!==null&&I.delete(v),v=go(),p.pingedLanes|=p.suspendedLanes&C,ai===p&&(ji&C)===C&&(Bs===4||Bs===3&&(ji&130023424)===ji&&500>$n()-R2?Ff(p,0):L2|=C),Xo(p,v)}function eT(p,v){v===0&&((p.mode&1)===0?v=1:(v=Ao,Ao<<=1,(Ao&130023424)===0&&(Ao=4194304)));var C=go();p=kr(p,v),p!==null&&(ql(p,v,C),Xo(p,C))}function hQ(p){var v=p.memoizedState,C=0;v!==null&&(C=v.retryLane),eT(p,C)}function fQ(p,v){var C=0;switch(p.tag){case 13:var I=p.stateNode,V=p.memoizedState;V!==null&&(C=V.retryLane);break;case 19:I=p.stateNode;break;default:throw Error(r(314))}I!==null&&I.delete(v),eT(p,C)}var tT;tT=function(p,v,C){if(p!==null)if(p.memoizedProps!==v.pendingProps||qi.current)Yo=!0;else{if((p.lanes&C)===0&&(v.flags&128)===0)return Yo=!1,eQ(p,v,C);Yo=(p.flags&131072)!==0}else Yo=!1,ct&&(v.flags&1048576)!==0&&pt(v,ge,v.index);switch(v.lanes=0,v.tag){case 2:var I=v.type;Fv(p,v),p=v.pendingProps;var V=gh(v,Fs.current);Sa(v,C),V=Mf(null,v,I,p,V,C);var X=rc();return v.flags|=1,typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0?(v.tag=1,v.memoizedState=null,v.updateQueue=null,Bi(I)?(X=!0,wu(v)):X=!1,v.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,cp(v),V.updater=Iv,v.stateNode=V,V._reactInternals=v,v2(v,I,p,C),v=N2(null,v,I,!0,X,C)):(v.tag=0,ct&&X&&it(v),po(null,v,V,C),v=v.child),v;case 16:I=v.elementType;e:{switch(Fv(p,v),p=v.pendingProps,V=I._init,I=V(I._payload),v.type=I,V=v.tag=pQ(I),p=Fc(I,p),V){case 0:v=j2(null,v,I,p,C);break e;case 1:v=AE(null,v,I,p,C);break e;case 11:v=jE(null,v,I,p,C);break e;case 14:v=NE(null,v,I,Fc(I.type,p),C);break e}throw Error(r(306,I,""))}return v;case 0:return I=v.type,V=v.pendingProps,V=v.elementType===I?V:Fc(I,V),j2(p,v,I,V,C);case 1:return I=v.type,V=v.pendingProps,V=v.elementType===I?V:Fc(I,V),AE(p,v,I,V,C);case 3:e:{if(kE(v),p===null)throw Error(r(387));I=v.pendingProps,X=v.memoizedState,V=X.element,Rx(p,v),Lc(v,I,null,C);var de=v.memoizedState;if(I=de.element,X.isDehydrated)if(X={element:I,isDehydrated:!1,cache:de.cac
vendor: 10,297 bytes, line 40
40he,pendingSuspenseBoundaries:de.pendingSuspenseBoundaries,transitions:de.transitions},v.updateQueue.baseState=X,v.memoizedState=X,v.flags&256){V=vp(Error(r(423)),v),v=PE(p,v,I,C,V);break e}else if(I!==V){V=vp(Error(r(424)),v),v=PE(p,v,I,C,V);break e}else for(ut=vi(v.stateNode.containerInfo.firstChild),Be=v,ct=!0,ft=null,C=Ar(v,null,I,C),v.child=C;C;)C.flags=C.flags&-3|4096,C=C.sibling;else{if(Dn(),I===V){v=Su(p,v,C);break e}po(p,v,I,C)}v=v.child}return v;case 5:return Ev(v),p===null&&Ft(v),I=v.type,V=v.pendingProps,X=p!==null?p.memoizedProps:null,de=V.children,Ex(I,V)?de=null:X!==null&&Ex(I,X)&&(v.flags|=32),CE(p,v),po(p,v,de,C),v.child;case 6:return p===null&&Ft(v),null;case 13:return EE(p,v,C);case 4:return vh(v,v.stateNode.containerInfo),I=v.pendingProps,p===null?v.child=is(v,null,I,C):po(p,v,I,C),v.child;case 11:return I=v.type,V=v.pendingProps,V=v.elementType===I?V:Fc(I,V),jE(p,v,I,V,C);case 7:return po(p,v,v.pendingProps,C),v.child;case 8:return po(p,v,v.pendingProps.children,C),v.child;case 12:return po(p,v,v.pendingProps.children,C),v.child;case 10:e:{if(I=v.type._context,V=v.pendingProps,X=v.memoizedProps,de=V.value,Fr(ni,I._currentValue),I._currentValue=de,X!==null)if(Un(X.value,de)){if(X.children===V.children&&!qi.current){v=Su(p,v,C);break e}}else for(X=v.child,X!==null&&(X.return=v);X!==null;){var Oe=X.dependencies;if(Oe!==null){de=X.child;for(var De=Oe.firstContext;De!==null;){if(De.context===I){if(X.tag===1){De=Wo(-1,C&-C),De.tag=2;var at=X.updateQueue;if(at!==null){at=at.shared;var jt=at.pending;jt===null?De.next=De:(De.next=jt.next,jt.next=De),at.pending=De}}X.lanes|=C,De=X.alternate,De!==null&&(De.lanes|=C),Ho(X.return,C,v),Oe.lanes|=C;break}De=De.next}}else if(X.tag===10)de=X.type===v.type?null:X.child;else if(X.tag===18){if(de=X.return,de===null)throw Error(r(341));de.lanes|=C,Oe=de.alternate,Oe!==null&&(Oe.lanes|=C),Ho(de,C,v),de=X.sibling}else de=X.child;if(de!==null)de.return=X;else for(de=X;de!==null;){if(de===v){de=null;break}if(X=de.sibling,X!==null){X.return=de.return,de=X;break}de=de.return}X=de}po(p,v,V.children,C),v=v.child}return v;case 9:return V=v.type,I=v.pendingProps.children,Sa(v,C),V=Ka(V),I=I(V),v.flags|=1,po(p,v,I,C),v.child;case 14:return I=v.type,V=Fc(I,v.pendingProps),V=Fc(I.type,V),NE(p,v,I,V,C);case 15:return _E(p,v,v.type,v.pendingProps,C);case 17:return I=v.type,V=v.pendingProps,V=v.elementType===I?V:Fc(I,V),Fv(p,v),v.tag=1,Bi(I)?(p=!0,wu(v)):p=!1,Sa(v,C),pE(v,I,V),v2(v,I,V,C),N2(null,v,I,!0,p,C);case 19:return OE(p,v,C);case 22:return SE(p,v,C)}throw Error(r(156,v.tag))};function nT(p,v){return aa(p,v)}function mQ(p,v,C,I){this.tag=p,this.key=C,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=v,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=I,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sc(p,v,C,I){return new mQ(p,v,C,I)}function z2(p){return p=p.prototype,!(!p||!p.isReactComponent)}function pQ(p){if(typeof p=="function")return z2(p)?1:0;if(p!=null){if(p=p.$$typeof,p===P)return 11;if(p===$)return 14}return 2}function kh(p,v){var C=p.alternate;return C===null?(C=sc(p.tag,v,p.key,p.mode),C.elementType=p.elementType,C.type=p.type,C.stateNode=p.stateNode,C.alternate=p,p.alternate=C):(C.pendingProps=v,C.type=p.type,C.flags=0,C.subtreeFlags=0,C.deletions=null),C.flags=p.flags&14680064,C.childLanes=p.childLanes,C.lanes=p.lanes,C.child=p.child,C.memoizedProps=p.memoizedProps,C.memoizedState=p.memoizedState,C.updateQueue=p.updateQueue,v=p.dependencies,C.dependencies=v===null?null:{lanes:v.lanes,firstContext:v.firstContext},C.sibling=p.sibling,C.index=p.index,C.ref=p.ref,C}function Yv(p,v,C,I,V,X){var de=2;if(I=p,typeof p=="function")z2(p)&&(de=1);else if(typeof p=="string")de=5;else e:switch(p){case A:return Bf(C.children,V,X,v);case T:de=8,V|=8;break;case R:return p=sc(12,C,v,V|2),p.elementType=R,p.lanes=X,p;case O:return p=sc(13,C,v,V),p.elementType=O,p.lanes=X,p;case F:return p=sc(19,C,v,V),p.elementType=F,p.lanes=X,p;case B:return Qv(C,V,X,v);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case M:de=10;break e;case k:de=9;break e;case P:de=11;break e;case $:de=14;break e;case G:de=16,I=null;break e}throw Error(r(130,p==null?p:typeof p,""))}return v=sc(de,C,v,V),v.elementType=p,v.type=I,v.lanes=X,v}function Bf(p,v,C,I){return p=sc(7,p,I,v),p.lanes=C,p}function Qv(p,v,C,I){return p=sc(22,p,I,v),p.elementType=B,p.lanes=C,p.stateNode={isHidden:!1},p}function V2(p,v,C){return p=sc(6,p,null,v),p.lanes=C,p}function H2(p,v,C){return v=sc(4,p.children!==null?p.children:[],p.key,v),v.lanes=C,v.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},v}function gQ(p,v,C,I,V){this.tag=v,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uu(0),this.expirationTimes=uu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uu(0),this.identifierPrefix=I,this.onRecoverableError=V,this.mutableSourceEagerHydrationData=null}function W2(p,v,C,I,V,X,de,Oe,De){return p=new gQ(p,v,C,Oe,De),v===1?(v=1,X===!0&&(v|=8)):v=0,X=sc(3,null,null,v),p.current=X,X.stateNode=p,X.memoizedState={element:I,isDehydrated:C,cache:null,transitions:null,pendingSuspenseBoundaries:null},cp(X),p}function xQ(p,v,C){var I=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:S,key:I==null?null:""+I,children:p,containerInfo:v,implementation:C}}function rT(p){if(!p)return kd;p=p._reactInternals;e:{if(ua(p)!==p||p.tag!==1)throw Error(r(170));var v=p;do{switch(v.tag){case 3:v=v.stateNode.context;break e;case 1:if(Bi(v.type)){v=v.stateNode.__reactInternalMemoizedMergedChildContext;break e}}v=v.return}while(v!==null);throw Error(r(171))}if(p.tag===1){var C=p.type;if(Bi(C))return Lx(p,C,v)}return v}function aT(p,v,C,I,V,X,de,Oe,De){return p=W2(C,I,!0,p,V,X,de,Oe,De),p.context=rT(null),C=p.current,I=go(),V=Ch(C),X=Wo(I,V),X.callback=v??null,Ko(C,X,V),p.current.lanes=V,ql(p,V,I),Xo(p,I),p}function Xv(p,v,C,I){var V=v.current,X=go(),de=Ch(V);return C=rT(C),v.context===null?v.context=C:v.pendingContext=C,v=Wo(X,de),v.payload={element:p},I=I===void 0?null:I,I!==null&&(v.callback=I),p=Ko(V,v,de),p!==null&&($c(p,V,de,X),ju(p,V,de)),de}function Jv(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return p.child.stateNode;default:return p.child.stateNode}}function sT(p,v){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var C=p.retryLane;p.retryLane=C!==0&&C<v?C:v}}function K2(p,v){sT(p,v),(p=p.alternate)&&sT(p,v)}function yQ(){return null}var iT=typeof reportError=="function"?reportError:function(p){console.error(p)};function G2(p){this._internalRoot=p}Zv.prototype.render=G2.prototype.render=function(p){var v=this._internalRoot;if(v===null)throw Error(r(409));Xv(p,v,null,null)},Zv.prototype.unmount=G2.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var v=p.containerInfo;Df(function(){Xv(null,p,null,null)}),v[ti]=null}};function Zv(p){this._internalRoot=p}Zv.prototype.unstable_scheduleHydration=function(p){if(p){var v=Eo();p={blockedOn:null,target:p,priority:v};for(var C=0;C<To.length&&v!==0&&v<To[C].priority;C++);To.splice(C,0,p),C===0&&fn(p)}};function Y2(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)}function eb(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11&&(p.nodeType!==8||p.nodeValue!==" react-mount-point-unstable "))}function oT(){}function vQ(p,v,C,I,V){if(V){if(typeof I=="function"){var X=I;I=function(){var at=Jv(de);X.call(at)}}var de=aT(v,I,p,0,null,!1,!1,"",oT);return p._reactRootContainer=de,p[ti]=de.current,gu(p.nodeType===8?p.parentNode:p),Df(),de}for(;V=p.lastChild;)p.removeChild(V);if(typeof I=="function"){var Oe=I;I=function(){var at=Jv(De);Oe.call(at)}}var De=W2(p,0,!1,null,null,!1,!1,"",oT);return p._reactRootContainer=De,p[ti]=De.current,gu(p.nodeType===8?p.parentNode:p),Df(function(){Xv(v,De,C,I)}),De}function tb(p,v,C,I,V){var X=C._reactRootContainer;if(X){var de=X;if(typeof V=="function"){var Oe=V;V=function(){var De=Jv(de);Oe.call(De)}}Xv(v,de,p,V)}else de=vQ(C,v,p,V,I);return Jv(de)}jc=function(p){switch(p.tag){case 3:var v=p.stateNode;if(v.current.memoizedState.isDehydrated){var C=ko(v.pendingLanes);C!==0&&(pd(v,C|1),Xo(v,$n()),(Nr&6)===0&&(jp=$n()+500,Z()))}break;case 13:Df(function(){var I=kr(p,1);if(I!==null){var V=go();$c(I,p,1,V)}}),K2(p,1)}},Nc=function(p){if(p.tag===13){var v=kr(p,134217728);if(v!==null){var C=go();$c(v,p,134217728,C)}K2(p,134217728)}},$l=function(p){if(p.tag===13){var v=Ch(p),C=kr(p,v);if(C!==null){var I=go();$c(C,p,v,I)}K2(p,v)}},Eo=function(){return sr},Ul=function(p,v){var C=sr;try{return sr=p,v()}finally{sr=C}},fr=function(p,v,C){switch(v){case"input":if(rt(p,C),v=C.name,C.type==="radio"&&v!=null){for(C=p;C.parentNode;)C=C.parentNode;for(C=C.querySelectorAll("input[name="+JSON.stringify(""+v)+'][type="radio"]'),v=0;v<C.length;v++){var I=C[v];if(I!==p&&I.form===p.form){var V=Tf(I);if(!V)throw Error(r(90));xe(I),rt(I,V)}}}break;case"textarea":Ze(p,C);break;case"select":v=C.value,v!=null&&Ve(p,!!C.multiple,v,!1)}},yr=B2,Gn=Df;var bQ={usingClientEntryPoint:!1,Events:[ph,vu,Tf,St,hn,B2]},Wx={findFiberByHostInstance:Ad,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wQ={bundleType:Wx.bundleType,version:Wx.version,rendererPackageName:Wx.rendererPackageName,rendererConfig:Wx.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(p){return p=nt(p),p===null?null:p.stateNode},findFiberByHostInstance:Wx.findFiberByHostInstance||yQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nb.isDisabled&&nb.supportsFiber)try{ao=nb.inject(wQ),vs=nb}catch{}}return Jo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bQ,Jo.createPortal=function(p,v){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Y2(v))throw Error(r(200));return xQ(p,v,null,C)},Jo.createRoot=function(p,v){if(!Y2(p))throw Error(r(299));var C=!1,I="",V=iT;return v!=null&&(v.unstable_strictMode===!0&&(C=!0),v.identifierPrefix!==void 0&&(I=v.identifierPrefix),v.onRecoverableError!==void 0&&(V=v.onRecoverableError)),v=W2(p,1,!1,null,null,C,!1,I,V),p[ti]=v.current,gu(p.nodeType===8?p.parentNode:p),new G2(v)},Jo.findDOMNode=function(p){if(p==null)return null;if(p.nodeType===1)return p;var v=p._reactInternals;if(v===void 0)throw typeof p.render=="function"?Error(r(188)):(p=Object.keys(p).join(","),Error(r(268,p)));return p=nt(v),p=p===null?null:p.stateNode,p},Jo.flushSync=function(p){return Df(p)},Jo.hydrate=function(p,v,C){if(!eb(v))throw Error(r(200));return tb(null,p,v,!0,C)},Jo.hydrateRoot=function(p,v,C){if(!Y2(p))throw Error(r(405));var I=C!=null&&C.hydratedSources||null,V=!1,X="",de=iT;if(C!=null&&(C.unstable_strictMode===!0&&(V=!0),C.identifierPrefix!==void 0&&(X=C.identifierPrefix),C.onRecoverableError!==void 0&&(de=C.onRecoverableError)),v=aT(v,null,p,1,C??null,V,!1,X,de),p[ti]=v.current,gu(p),I)for(p=0;p<I.length;p++)C=I[p],V=C._getVersion,V=V(C._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[C,V]:v.mutableSourceEagerHydrationData.push(C,V);return new Zv(v)},Jo.render=function(p,v,C){if(!eb(v))throw Error(r(200));return tb(null,p,v,!1,C)},Jo.unmountComponentAtNode=function(p){if(!eb(p))throw Error(r(40));return p._reactRootContainer?(Df(function(){tb(null,null,p,!1,function(){p._reactRootContainer=null,p[ti]=null})}),!0):!1},Jo.unstable_batchedUpdates=B2,Jo.unstable_renderSubtreeIntoContainer=function(p,v,C,I){if(!eb(C))throw Error(r(200));if(p==null||p._reactInternals===void 0)throw Error(r(38));return tb(p,v,C,!1,I)},Jo.version="18.3.1-next-f1338f8080-20240426",Jo}var gT;function i3(){if(gT)return Z2.exports;gT=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(),Z2.exports=TQ(),Z2.exports}var xT;function OQ(){if(xT)return sb;xT=1;var e=i3();return sb.createRoot=e.createRoot,sb.hydrateRoot=e.hydrateRoot,sb}var MQ=OQ();const LQ=Lr(MQ),RQ=20,IQ=1e6,Iu={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let nN=0;function DQ(){return nN=(nN+1)%Number.MAX_VALUE,nN.toString()}const rN=new Map,yT=e=>{if(rN.has(e))return;const t=setTimeout(()=>{rN.delete(e),Py({type:Iu.REMOVE_TOAST,toastId:e})},IQ);rN.set(e,t)},FQ=(e,t)=>{switch(t.type){case Iu.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,RQ)};case Iu.UPDATE_TOAST:return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case Iu.DISMISS_TOAST:{const{toastId:r}=t;return r?yT(r):e.toasts.forEach(a=>{yT(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,open:!1}:a)}}case Iu.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Kb=[];let Gb={toasts:[]};function Py(e){Gb=FQ(Gb,e),Kb.forEach(t=>{t(Gb)})}function qQ({...e}){const t=DQ(),r=s=>Py({type:Iu.UPDATE_TOAST,toast:{...s,id:t}}),a=()=>Py({type:Iu.DISMISS_TOAST,toastId:t});return Py({type:Iu.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:s=>{s||a()}}}),{id:t,dismiss:a,update:r}}function Pq(){const[e,t]=L.useState(Gb);return L.useEffect(()=>(Kb.push(t),()=>{const r=Kb.indexOf(t);r>-1&&Kb.splice(r,1)}),[e]),{...e,toast:qQ,dismiss:r=>Py({type:Iu.DISMISS_TOAST,toastId:r})}}function Eq(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Eq(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function or(){for(var e,t,r=0,a="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Eq(e))&&(a&&(a+=" "),a+=t);return a}const vT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bT=or,lx=(e,t)=>r=>{var a;if((t==null?void 0:t.variants)==null)return bT(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(d=>{const h=r==null?void 0:r[d],u=i==null?void 0:i[d];if(h===null)return null;const f=vT(h)||vT(u);return s[d][f]}),l=r&&Object.entries(r).reduce((d,h)=>{let[u,f]=h;return f===void 0||(d[u]=f),d},{}),c=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((d,h)=>{let{class:u,className:f,...m}=h;return Object.entries(m).every(b=>{let[g,y]=b;return Array.isArray(y)?y.includes({...i,...l}[g]):{...i,...l}[g]===y})?[...d,u,f]:d},[]);return bT(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
41 * @license lucide-react v0.475.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const BQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tq=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
46 * @license lucide-react v0.475.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var $Q={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"};/**
51 * @license lucide-react v0.475.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const UQ=L.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:i,iconNode:o,...l},c)=>L.createElement("svg",{ref:c,...$Q,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:Tq("lucide",s),...l},[...o.map(([d,h])=>L.createElement(d,h)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.475.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const gt=(e,t)=>{const r=L.forwardRef(({className:a,...s},i)=>L.createElement(UQ,{ref:i,iconNode:t,className:Tq(`lucide-${BQ(e)}`,a),...s}));return r.displayName=`${e}`,r};/**
61 * @license lucide-react v0.475.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const zQ=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],VQ=gt("ArrowDown",zQ);/**
66 * @license lucide-react v0.475.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const HQ=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wm=gt("ArrowLeft",HQ);/**
71 * @license lucide-react v0.475.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const WQ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ci=gt("ArrowRight",WQ);/**
76 * @license lucide-react v0.475.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const KQ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Oq=gt("ArrowUp",KQ);/**
81 * @license lucide-react v0.475.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const GQ=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],bn=gt("Award",GQ);/**
86 * @license lucide-react v0.475.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const YQ=[["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"}]],QQ=gt("Bell",YQ);/**
91 * @license lucide-react v0.475.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const XQ=[["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"}
95],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],ms=gt("Building2",XQ);/**
96 * @license lucide-react v0.475.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const JQ=[["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"}]],za=gt("Calendar",JQ);/**
101 * @license lucide-react v0.475.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const ZQ=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],ng=gt("Camera",ZQ);/**
106 * @license lucide-react v0.475.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const eX=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],gy=gt("Car",eX);/**
111 * @license lucide-react v0.475.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const tX=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],km=gt("ChartColumn",tX);/**
116 * @license lucide-react v0.475.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const nX=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],rX=gt("ChartLine",nX);/**
121 * @license lucide-react v0.475.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const aX=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],Mq=gt("ChartPie",aX);/**
126 * @license lucide-react v0.475.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const sX=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pm=gt("Check",sX);/**
131 * @license lucide-react v0.475.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const iX=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wm=gt("ChevronDown",iX);/**
136 * @license lucide-react v0.475.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const oX=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ww=gt("ChevronLeft",oX);/**
141 * @license lucide-react v0.475.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const lX=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Em=gt("ChevronRight",lX);/**
146 * @license lucide-react v0.475.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const cX=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Y0=gt("ChevronUp",cX);/**
151 * @license lucide-react v0.475.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const dX=[["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"}]],Mr=gt("CircleAlert",dX);/**
156 * @license lucide-react v0.475.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const uX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],hX=gt("CircleArrowDown",uX);/**
161 * @license lucide-react v0.475.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const fX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],mX=gt("CircleArrowUp",fX);/**
166 * @license lucide-react v0.475.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const pX=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Vy=gt("CircleCheckBig",pX);/**
171 * @license lucide-react v0.475.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const gX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Cn=gt("CircleCheck",gX);/**
176 * @license lucide-react v0.475.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const xX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aN=gt("CircleHelp",xX);/**
181 * @license lucide-react v0.475.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const yX=[["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"}]],o3=gt("CircleX",yX);/**
186 * @license lucide-react v0.475.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const vX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],la=gt("Clock",vX);/**
191 * @license lucide-react v0.475.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const bX=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],x1=gt("CloudUpload",bX);/**
196 * @license lucide-react v0.475.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const wX=[["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"}]],Hy=gt("Copy",wX);/**
201 * @license lucide-react v0.475.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const jX=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Lq=gt("CreditCard",jX);/**
206 * @license lucide-react v0.475.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const NX=[["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"}]],wT=gt("DollarSign",NX);/**
211 * @license lucide-react v0.475.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const _X=[["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"}]],Tl=gt("Download",_X);/**
216 * @license lucide-react v0.475.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const SX=[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]],CX=gt("Dumbbell",SX);/**
221 * @license lucide-react v0.475.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const AX=[["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"}]],Pl=gt("ExternalLink",AX);/**
226 * @license lucide-react v0.475.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const kX=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Ey=gt("EyeOff",kX);/**
231 * @license lucide-react v0.475.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const PX=[["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"}]],sd=gt("Eye",PX);/**
236 * @license lucide-react v0.475.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const EX=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Wy=gt("Facebook",EX);/**
241 * @license lucide-react v0.475.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const TX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],OX=gt("FileChartColumnIncreasing",TX);/**
246 * @license lucide-react v0.475.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const MX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]],Rq=gt("FileDown",MX);/**
251 * @license lucide-react v0.475.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const LX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],RX=gt("FileSpreadsheet",LX);/**
256 * @license lucide-react v0.475.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const IX=[["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"}]],pr=gt("FileText",IX);/**
261 * @license lucide-react v0.475.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const DX=[["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"}]],FX=gt("File",DX);/**
266 * @license lucide-react v0.475.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const qX=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],jT=gt("Gauge",qX);/**
271 * @license lucide-react v0.475.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const BX=[["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"}]],Iq=gt("Globe",BX);/**
276 * @license lucide-react v0.475.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const $X=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Sg=gt("Heart",$X);/**
281 * @license lucide-react v0.475.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const UX=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],zX=gt("House",UX);/**
286 * @license lucide-react v0.475.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const VX=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],ib=gt("ImagePlus",VX);/**
291 * @license lucide-react v0.475.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const HX=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Cg=gt("Image",HX);/**
296 * @license lucide-react v0.475.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const WX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ty=gt("Info",WX);/**
301 * @license lucide-react v0.475.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const KX=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],l3=gt("Instagram",KX);/**
306 * @license lucide-react v0.475.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const GX=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],YX=gt("Layers",GX);/**
311 * @license lucide-react v0.475.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const QX=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.
3159 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],XX=gt("Lightbulb",QX);/**
316 * @license lucide-react v0.475.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const JX=[["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"}]],Dq=gt("Link",JX);/**
321 * @license lucide-react v0.475.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const ZX=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Yu=gt("Linkedin",ZX);/**
326 * @license lucide-react v0.475.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const eJ=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],tJ=gt("ListChecks",eJ);/**
331 * @license lucide-react v0.475.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const nJ=[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],ob=gt("ListTodo",nJ);/**
336 * @license lucide-react v0.475.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const rJ=[["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"}]],aJ=gt("List",rJ);/**
341 * @license lucide-react v0.475.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const sJ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ky=gt("LoaderCircle",sJ);/**
346 * @license lucide-react v0.475.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const iJ=[["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"}]],oJ=gt("Loader",iJ);/**
351 * @license lucide-react v0.475.0 - ISC
352 *
353 * This source code is licensed under the ISC license.
354 * See the LICENSE file in the root directory of this source tree.
355 */const lJ=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],NT=gt("LockOpen",lJ);/**
356 * @license lucide-react v0.475.0 - ISC
357 *
358 * This source code is licensed under the ISC license.
359 * See the LICENSE file in the root directory of this source tree.
360 */const cJ=[["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"}]],Qu=gt("Lock",cJ);/**
361 * @license lucide-react v0.475.0 - ISC
362 *
363 * This source code is licensed under the ISC license.
364 * See the LICENSE file in the root directory of this source tree.
365 */const dJ=[["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"}]],Xr=gt("Mail",dJ);/**
366 * @license lucide-react v0.475.0 - ISC
367 *
368 * This source code is licensed under the ISC license.
369 * See the LICENSE file in the root directory of this source tree.
370 */const uJ=[["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"}]],Xu=gt("MapPin",uJ);
370/**
371 * @license lucide-react v0.475.0 - ISC
372 *
373 * This source code is licensed under the ISC license.
374 * See the LICENSE file in the root directory of this source tree.
375 */const hJ=[["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"}]],Fq=gt("Menu",hJ);/**
376 * @license lucide-react v0.475.0 - ISC
377 *
378 * This source code is licensed under the ISC license.
379 * See the LICENSE file in the root directory of this source tree.
380 */const fJ=[["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"}]],$h=gt("MessageSquare",fJ);/**
381 * @license lucide-react v0.475.0 - ISC
382 *
383 * This source code is licensed under the ISC license.
384 * See the LICENSE file in the root directory of this source tree.
385 */const mJ=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],_T=gt("Music",mJ);/**
386 * @license lucide-react v0.475.0 - ISC
387 *
388 * This source code is licensed under the ISC license.
389 * See the LICENSE file in the root directory of this source tree.
390 */const pJ=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],sN=gt("Navigation",pJ);/**
391 * @license lucide-react v0.475.0 - ISC
392 *
393 * This source code is licensed under the ISC license.
394 * See the LICENSE file in the root directory of this source tree.
395 */const gJ=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],jm=gt("Newspaper",gJ);/**
396 * @license lucide-react v0.475.0 - ISC
397 *
398 * This source code is licensed under the ISC license.
399 * See the LICENSE file in the root directory of this source tree.
400 */const xJ=[["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"}]],xa=gt("Pen",xJ);/**
401 * @license lucide-react v0.475.0 - ISC
402 *
403 * This source code is licensed under the ISC license.
404 * See the LICENSE file in the root directory of this source tree.
405 */const yJ=[["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"}]],c3=gt("Pencil",yJ);/**
406 * @license lucide-react v0.475.0 - ISC
407 *
408 * This source code is licensed under the ISC license.
409 * See the LICENSE file in the root directory of this source tree.
410 */const vJ=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Kw=gt("Phone",vJ);/**
411 * @license lucide-react v0.475.0 - ISC
412 *
413 * This source code is licensed under the ISC license.
414 * See the LICENSE file in the root directory of this source tree.
415 */const bJ=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],ST=gt("Play",bJ);/**
416 * @license lucide-react v0.475.0 - ISC
417 *
418 * This source code is licensed under the ISC license.
419 * See the LICENSE file in the root directory of this source tree.
420 */const wJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],gr=gt("Plus",wJ);/**
421 * @license lucide-react v0.475.0 - ISC
422 *
423 * This source code is licensed under the ISC license.
424 * See the LICENSE file in the root directory of this source tree.
425 */const jJ=[["path",{d:"M18 7c0-5.333-8-5.333-8 0",key:"1prm2n"}],["path",{d:"M10 7v14",key:"18tmcs"}],["path",{d:"M6 21h12",key:"4dkmi1"}],["path",{d:"M6 13h10",key:"ybwr4a"}]],wC=gt("PoundSterling",jJ);/**
426 * @license lucide-react v0.475.0 - ISC
427 *
428 * This source code is licensed under the ISC license.
429 * See the LICENSE file in the root directory of this source tree.
430 */const NJ=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],qq=gt("Printer",NJ);/**
431 * @license lucide-react v0.475.0 - ISC
432 *
433 * This source code is licensed under the ISC license.
434 * See the LICENSE file in the root directory of this source tree.
435 */const _J=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],tm=gt("Quote",_J);
435/**
436 * @license lucide-react v0.475.0 - ISC
437 *
438 * This source code is licensed under the ISC license.
439 * See the LICENSE file in the root directory of this source tree.
440 */const SJ=[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]],Bq=gt("Receipt",SJ);/**
441 * @license lucide-react v0.475.0 - ISC
442 *
443 * This source code is licensed under the ISC license.
444 * See the LICENSE file in the root directory of this source tree.
445 */const CJ=[["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"}]],Gy=gt("RefreshCw",CJ);/**
446 * @license lucide-react v0.475.0 - ISC
447 *
448 * This source code is licensed under the ISC license.
449 * See the LICENSE file in the root directory of this source tree.
450 */const AJ=[["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"}]],No=gt("Save",AJ);/**
451 * @license lucide-react v0.475.0 - ISC
452 *
453 * This source code is licensed under the ISC license.
454 * See the LICENSE file in the root directory of this source tree.
455 */const kJ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],y1=gt("Search",kJ);/**
456 * @license lucide-react v0.475.0 - ISC
457 *
458 * This source code is licensed under the ISC license.
459 * See the LICENSE file in the root directory of this source tree.
460 */const PJ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],$q=gt("Send",PJ);/**
461 * @license lucide-react v0.475.0 - ISC
462 *
463 * This source code is licensed under the ISC license.
464 * See the LICENSE file in the root directory of this source tree.
465 */const EJ=[["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"}]],Uq=gt("Settings",EJ);/**
466 * @license lucide-react v0.475.0 - ISC
467 *
468 * This source code is licensed under the ISC license.
469 * See the LICENSE file in the root directory of this source tree.
470 */const TJ=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Jh=gt("Share2",TJ);/**
471 * @license lucide-react v0.475.0 - ISC
472 *
473 * This source code is licensed under the ISC license.
474 * See the LICENSE file in the root directory of this source tree.
475 */const OJ=[["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"}]],ps=gt("Shield",OJ);/**
476 * @license lucide-react v0.475.0 - ISC
477 *
478 * This source code is licensed under the ISC license.
479 * See the LICENSE file in the root directory of this source tree.
480 */const MJ=[["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"}]],Ia=gt("Sparkles",MJ);/**
481 * @license lucide-react v0.475.0 - ISC
482 *
483 * This source code is licensed under the ISC license.
484 * See the LICENSE file in the root directory of this source tree.
485 */const LJ=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Gw=gt("SquarePen",LJ);/**
486 * @license lucide-react v0.475.0 - ISC
487 *
488 * This source code is licensed under the ISC license.
489 * See the LICENSE file in the root directory of this source tree.
490 */const RJ=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ki=gt("Star",RJ);/**
491 * @license lucide-react v0.475.0 - ISC
492 *
493 * This source code is licensed under the ISC license.
494 * See the LICENSE file in the root directory of this source tree.
495 */const IJ=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Yw=gt("Tag",IJ);/**
496 * @license lucide-react v0.475.0 - ISC
497 *
498 * This source code is licensed under the ISC license.
499 * See the LICENSE file in the root directory of this source tree.
500 */const DJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Tm=gt("Target",DJ);/**
501 * @license lucide-react v0.475.0 - ISC
502 *
503 * This source code is licensed under the ISC license.
504 * See the LICENSE file in the root directory of this source tree.
505 */const FJ=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],Om=gt("Ticket",FJ);/**
506 * @license lucide-react v0.475.0 - ISC
507 *
508 * This source code is licensed under the ISC license.
509 * See the LICENSE file in the root directory of this source tree.
510 */const qJ=[["rect",{width:"16",height:"16",x:"4",y:"3",rx:"2",key:"1wxw4b"}],["path",{d:"M4 11h16",key:"mpoxn0"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m18 22-2-3",key:"1p0ohu"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M16 15h.01",key:"rnfrdf"}]],CT=gt("TramFront",qJ);/**
511 * @license lucide-react v0.475.0 - ISC
512 *
513 * This source code is licensed under the ISC license.
514 * See the LICENSE file in the root directory of this source tree.
515 */const BJ=[["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"}]],tr=gt("Trash2",BJ);/**
516 * @license lucide-react v0.475.0 - ISC
517 *
518 * This source code is licensed under the ISC license.
519 * See the LICENSE file in the root directory of this source tree.
520 */const $J=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],Ju=gt("TrendingDown",$J);/**
521 * @license lucide-react v0.475.0 - ISC
522 *
523 * This source code is licensed under the ISC license.
524 * See the LICENSE file in the root directory of this source tree.
525 */const UJ=[["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"}]],ka=gt("TrendingUp",UJ);/**
526 * @license lucide-react v0.475.0 - ISC
527 *
528 * This source code is licensed under the ISC license.
529 * See the LICENSE file in the root directory of this source tree.
530 */const zJ=[["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"}]],eo=gt("TriangleAlert",zJ);/**
531 * @license lucide-react v0.475.0 - ISC
532 *
533 * This source code is licensed under the ISC license.
534 * See the LICENSE file in the root directory of this source tree.
535 */const VJ=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],Vd=gt("Trophy",VJ);/**
536 * @license lucide-react v0.475.0 - ISC
537 *
538 * This source code is licensed under the ISC license.
539 * See the LICENSE file in the root directory of this source tree.
540 */const HJ=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],Yy=gt("Twitter",HJ);/**
541 * @license lucide-react v0.475.0 - ISC
542 *
543 * This source code is licensed under the ISC license.
544 * See the LICENSE file in the root directory of this source tree.
545 */const WJ=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],KJ=gt("Type",WJ);/**
546 * @license lucide-react v0.475.0 - ISC
547 *
548 * This source code is licensed under the ISC license.
549 * See the LICENSE file in the root directory of this source tree.
550 */const GJ=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Al=gt("Upload",GJ);/**
551 * @license lucide-react v0.475.0 - ISC
552 *
553 * This source code is licensed under the ISC license.
554 * See the LICENSE file in the root directory of this source tree.
555 */const YJ=[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],QJ=gt("UserPlus",YJ);/**
556 * @license lucide-react v0.475.0 - ISC
557 *
558 * This source code is licensed under the ISC license.
559 * See the LICENSE file in the root directory of this source tree.
560 */const XJ=[["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"}]],Hd=gt("User",XJ);/**
561 * @license lucide-react v0.475.0 - ISC
562 *
563 * This source code is licensed under the ISC license.
564 * See the LICENSE file in the root directory of this source tree.
565 */const JJ=[["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"}]],Jr=gt("Users",JJ);
565/**
566 * @license lucide-react v0.475.0 - ISC
567 *
568 * This source code is licensed under the ISC license.
569 * See the LICENSE file in the root directory of this source tree.
570 */const ZJ=[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]],eZ=gt("UtensilsCrossed",ZJ);/**
571 * @license lucide-react v0.475.0 - ISC
572 *
573 * This source code is licensed under the ISC license.
574 * See the LICENSE file in the root directory of this source tree.
575 */const tZ=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],Qy=gt("Utensils",tZ);/**
576 * @license lucide-react v0.475.0 - ISC
577 *
578 * This source code is licensed under the ISC license.
579 * See the LICENSE file in the root directory of this source tree.
580 */const nZ=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],rZ=gt("Video",nZ);/**
581 * @license lucide-react v0.475.0 - ISC
582 *
583 * This source code is licensed under the ISC license.
584 * See the LICENSE file in the root directory of this source tree.
585 */const aZ=[["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}],["path",{d:"M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z",key:"1ezoue"}],["path",{d:"M22 19H2",key:"nuriw5"}]],Oy=gt("Vote",aZ);/**
586 * @license lucide-react v0.475.0 - ISC
587 *
588 * This source code is licensed under the ISC license.
589 * See the LICENSE file in the root directory of this source tree.
590 */const sZ=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],iZ=gt("Wallet",sZ);/**
591 * @license lucide-react v0.475.0 - ISC
592 *
593 * This source code is licensed under the ISC license.
594 * See the LICENSE file in the root directory of this source tree.
595 */const oZ=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],lZ=gt("Waves",oZ);/**
596 * @license lucide-react v0.475.0 - ISC
597 *
598 * This source code is licensed under the ISC license.
599 * See the LICENSE file in the root directory of this source tree.
600 */const cZ=[["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"}]],dZ=gt("Wifi",cZ);/**
601 * @license lucide-react v0.475.0 - ISC
602 *
603 * This source code is licensed under the ISC license.
604 * See the LICENSE file in the root directory of this source tree.
605 */const uZ=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]],Yb=gt("Wine",uZ);/**
606 * @license lucide-react v0.475.0 - ISC
607 *
608 * This source code is licensed under the ISC license.
609 * See the LICENSE file in the root directory of this source tree.
610 */const hZ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ei=gt("X",hZ);/**
611 * @license lucide-react v0.475.0 - ISC
612 *
613 * This source code is licensed under the ISC license.
614 * See the LICENSE file in the root directory of this source tree.
615 */const fZ=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],d3=gt("Youtube",fZ);/**
616 * @license lucide-react v0.475.0 - ISC
617 *
618 * This source code is licensed under the ISC license.
619 * See the LICENSE file in the root directory of this source tree.
620 */const mZ=[["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"}]],pZ=gt("Zap",mZ);/**
621 * @license lucide-react v0.475.0 - ISC
622 *
623 * This source code is licensed under the ISC license.
624 * See the LICENSE file in the root directory of this source tree.
625 */const gZ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],xZ=gt("ZoomIn",gZ),u3="-",yZ=e=>{const t=bZ(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{const l=o.split(u3);return l[0]===""&&l.length!==1&&l.shift(),zq(l,t)||vZ(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&a[o]?[...c,...a[o]]:c}}},zq=(e,t)=>
vendor: 7,177 bytes, line 625
625{var o;if(e.length===0)return t.classGroupId;const r=e[0],a=t.nextPart.get(r),s=a?zq(e.slice(1),a):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(u3);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},AT=/^\[(.+)\]$/,vZ=e=>{if(AT.test(e)){const t=AT.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},bZ=e=>{const{theme:t,classGroups:r}=e,a={nextPart:new Map,validators:[]};for(const s in r)jC(r[s],a,s,t);return a},jC=(e,t,r,a)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:kT(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(wZ(s)){jC(s(a),t,r,a);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{jC(o,kT(t,i),r,a)})})},kT=(e,t)=>{let r=e;return t.split(u3).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r},wZ=e=>e.isThemeGetter,jZ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,a=new Map;const s=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,a=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=a.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},NC="!",_C=":",NZ=_C.length,_Z=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=s=>{const i=[];let o=0,l=0,c=0,d;for(let b=0;b<s.length;b++){let g=s[b];if(o===0&&l===0){if(g===_C){i.push(s.slice(c,b)),c=b+NZ;continue}if(g==="/"){d=b;continue}}g==="["?o++:g==="]"?o--:g==="("?l++:g===")"&&l--}const h=i.length===0?s:s.substring(c),u=SZ(h),f=u!==h,m=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:m}};if(t){const s=t+_C,i=a;a=o=>o.startsWith(s)?i(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const s=a;a=i=>r({className:i,parseClassName:s})}return a},SZ=e=>e.endsWith(NC)?e.substring(0,e.length-1):e.startsWith(NC)?e.substring(1):e,CZ=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const s=[];let i=[];return a.forEach(o=>{o[0]==="["||t[o]?(s.push(...i.sort(),o),i=[]):i.push(o)}),s.push(...i.sort()),s}},AZ=e=>({cache:jZ(e.cacheSize),parseClassName:_Z(e),sortModifiers:CZ(e),...yZ(e)}),kZ=/\s+/,PZ=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],l=e.trim().split(kZ);let c="";for(let d=l.length-1;d>=0;d-=1){const h=l[d],{isExternal:u,modifiers:f,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=r(h);if(u){c=h+(c.length>0?" "+c:c);continue}let y=!!g,x=a(y?b.substring(0,g):b);if(!x){if(!y){c=h+(c.length>0?" "+c:c);continue}if(x=a(b),!x){c=h+(c.length>0?" "+c:c);continue}y=!1}const w=i(f).join(":"),j=m?w+NC:w,N=j+x;if(o.includes(N))continue;o.push(N);const _=s(x,y);for(let S=0;S<_.length;++S){const A=_[S];o.push(j+A)}c=h+(c.length>0?" "+c:c)}return c};function EZ(){let e=0,t,r,a="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Vq(t))&&(a&&(a+=" "),a+=r);return a}const Vq=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=Vq(e[a]))&&(r&&(r+=" "),r+=t);return r};function TZ(e,...t){let r,a,s,i=o;function o(c){const d=t.reduce((h,u)=>u(h),e());return r=AZ(d),a=r.cache.get,s=r.cache.set,i=l,l(c)}function l(c){const d=a(c);if(d)return d;const h=PZ(c,r);return s(c,h),h}return function(){return i(EZ.apply(null,arguments))}}const $s=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hq=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wq=/^\((?:(\w[\w-]*):)?(.+)\)$/i,OZ=/^\d+\/\d+$/,MZ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LZ=/\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$/,RZ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,IZ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_p=e=>OZ.test(e),er=e=>!!e&&!Number.isNaN(Number(e)),Eh=e=>!!e&&Number.isInteger(Number(e)),iN=e=>e.endsWith("%")&&er(e.slice(0,-1)),Au=e=>MZ.test(e),FZ=()=>!0,qZ=e=>LZ.test(e)&&!RZ.test(e),Kq=()=>!1,BZ=e=>IZ.test(e),$Z=e=>DZ.test(e),UZ=e=>!nn(e)&&!rn(e),zZ=e=>cx(e,Qq,Kq),nn=e=>Hq.test(e),$f=e=>cx(e,Xq,qZ),oN=e=>cx(e,GZ,er),PT=e=>cx(e,Gq,Kq),VZ=e=>cx(e,Yq,$Z),lb=e=>cx(e,Jq,BZ),rn=e=>Wq.test(e),Gx=e=>dx(e,Xq),HZ=e=>dx(e,YZ),ET=e=>dx(e,Gq),WZ=e=>dx(e,Qq),KZ=e=>dx(e,Yq),cb=e=>dx(e,Jq,!0),cx=(e,t,r)=>{const a=Hq.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},dx=(e,t,r=!1)=>{const a=Wq.exec(e);return a?a[1]?t(a[1]):r:!1},Gq=e=>e==="position"||e==="percentage",Yq=e=>e==="image"||e==="url",Qq=e=>e==="length"||e==="size"||e==="bg-size",Xq=e=>e==="length",GZ=e=>e==="number",YZ=e=>e==="family-name",Jq=e=>e==="shadow",QZ=()=>{const e=$s("color"),t=$s("font"),r=$s("text"),a=$s("font-weight"),s=$s("tracking"),i=$s("leading"),o=$s("breakpoint"),l=$s("container"),c=$s("spacing"),d=$s("radius"),h=$s("shadow"),u=$s("inset-shadow"),f=$s("text-shadow"),m=$s("drop-shadow"),b=$s("blur"),g=$s("perspective"),y=$s("aspect"),x=$s("ease"),w=$s("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...N(),rn,nn],S=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],T=()=>[rn,nn,c],R=()=>[_p,"full","auto",...T()],M=()=>[Eh,"none","subgrid",rn,nn],k=()=>["auto",{span:["full",Eh,rn,nn]},Eh,rn,nn],P=()=>[Eh,"auto",rn,nn],O=()=>["auto","min","max","fr",rn,nn],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],B=()=>[_p,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],Y=()=>[e,rn,nn],ee=()=>[...N(),ET,PT,{position:[rn,nn]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",WZ,zZ,{size:[rn,nn]}],q=()=>[iN,Gx,$f],K=()=>["","none","full",d,rn,nn],te=()=>["",er,Gx,$f],re=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[er,iN,ET,PT],oe=()=>["","none",b,rn,nn],ae=()=>["none",er,rn,nn],le=()=>["none",er,rn,nn],je=()=>[er,rn,nn],xe=()=>[_p,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Au],breakpoint:[Au],color:[FZ],container:[Au],"drop-shadow":[Au],ease:["in","out","in-out"],font:[UZ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Au],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Au],shadow:[Au],spacing:["px",er],text:[Au],"text-shadow":[Au],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_p,nn,rn,y]}
vendor: 4,428 bytes, line 625
625],container:["container"],columns:[{columns:[er,nn,rn,l]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:_()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Eh,"auto",rn,nn]}],basis:[{basis:[_p,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[er,_p,"auto","initial","none",nn]}],grow:[{grow:["",er,rn,nn]}],shrink:[{shrink:["",er,rn,nn]}],order:[{order:[Eh,"first","last","none",rn,nn]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",r,Gx,$f]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,rn,oN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iN,nn]}],"font-family":[{font:[HZ,nn,t]}],"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:[s,rn,nn]}],"line-clamp":[{"line-clamp":[er,"none",rn,oN]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",rn,nn]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",rn,nn]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"w
625avy"]}],"text-decoration-thickness":[{decoration:[er,"from-font","auto",rn,$f]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[er,"auto",rn,nn]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",rn,nn]}],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",rn,nn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Eh,rn,nn],radial:["",rn,nn],conic:[Eh,rn,nn]},KZ,VZ]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[er,rn,nn]}],"outline-w":[{outline:["",er,Gx,$f]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",h,cb,lb]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",u,cb,lb]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[er,$f]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",f,cb,lb]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[er,rn,nn]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"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":[er]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[rn,nn]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[er]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",rn,nn]}],filter:[{filter:["","none",rn,nn]}],blur:[{blur:oe()}],brightness:[{brightness:[er,rn,nn]}],contrast:[{contrast:[er,rn,nn]}],"drop-shadow":[{"drop-shadow":["","none",m,cb,lb]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",er,rn,nn]}],"hue-rotate":[{"hue-rotate":[er,rn,nn]}],invert:[{invert:["",er,rn,nn]}],saturate:[{saturate:[er,rn,nn]}],sepia:[{sepia:["",er,rn,nn]}],"backdrop-filter":[{"backdrop-filter":["","none",rn,nn]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[er,rn,nn]}],"backdrop-contrast":[{"backdrop-contrast":[er,rn,nn]}],"backdrop-grayscale":[{"backdrop-grayscale":["",er,rn,nn]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[er,rn,nn]}],"backdrop-invert":[{"backdrop-invert":["",er,rn,nn]}],"backdrop-opacity":[{"backdrop-opacity":[er,rn,nn]}],"backdrop-saturate":[{"backdrop-saturate":[er,rn,nn]}],"backdrop-sepia":[{"backdrop-sepia":["",er,rn,nn]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",rn,nn]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[er,"initial",rn,nn]}],ease:[{ease:["linear","initial",x,rn,nn]}],delay:[{delay:[er,rn,nn]}],animate:[{animate:["none",w,rn,nn]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,rn,nn]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[rn,nn,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}
vendor: 5,781 bytes, line 625
625],"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",rn,nn]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",rn,nn]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[er,Gx,$f,oN]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},Zq=TZ(QZ);function Ln(...e){return Zq(or(e))}const XZ=window.self!==window.top,eB=L.forwardRef(({...e},t)=>n.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}));eB.displayName="ToastProvider";const tB=L.forwardRef(({...e},t)=>n.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}));tB.displayName="ToastViewport";const JZ=lx("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"}}
625),nB=L.forwardRef(({className:e,variant:t,...r},a)=>n.jsx("div",{ref:a,className:Ln(JZ({variant:t}),e),...r}));nB.displayName="Toast";const ZZ=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("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}));ZZ.displayName="ToastAction";const rB=L.forwardRef(({className:e,...t},r)=>n.jsx("button",{ref:r,className:Ln("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:n.jsx(Ei,{className:"h-4 w-4"})}));rB.displayName="ToastClose";const aB=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("text-sm font-semibold",e),...t}));aB.displayName="ToastTitle";const sB=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("text-sm opacity-90",e),...t}));sB.displayName="ToastDescription";function eee(){const{toasts:e}=Pq();return n.jsxs(eB,{children:[e.map(function({id:t,title:r,description:a,action:s,...i}){return n.jsxs(nB,{...i,children:[n.jsxs("div",{className:"grid gap-1",children:[r&&n.jsx(aB,{children:r}),a&&n.jsx(sB,{children:a})]}),s,n.jsx(rB,{})]},t)}),n.jsx(tB,{})]})}var ux=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(){}},tee={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zh,s3,gq,nee=(gq=class{constructor(){pn(this,zh,tee);pn(this,s3,!1)}setTimeoutProvider(e){Ut(this,zh,e)}setTimeout(e,t){return Le(this,zh).setTimeout(e,t)}clearTimeout(e){Le(this,zh).clearTimeout(e)}setInterval(e,t){return Le(this,zh).setInterval(e,t)}clearInterval(e){Le(this,zh).clearInterval(e)}},zh=new WeakMap,s3=new WeakMap,gq),nm=new nee;function ree(e){setTimeout(e,0)}var Mm=typeof window>"u"||"Deno"in globalThis;function vo(){}function aee(e,t){return typeof e=="function"?e(t):e}function SC(e){return typeof e=="number"&&e>=0&&e!==1/0}function iB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rf(e,t){return typeof e=="function"?e(t):e}function fc(e,t){return typeof e=="function"?e(t):e}function TT(e,t){const{type:r="all",exact:a,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(o){if(a){if(t.queryHash!==h3(o,t.options))return!1}else if(!Xy(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function OT(e,t){const{exact:r,status:a,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Lm(t.options.mutationKey)!==Lm(i))return!1}else if(!Xy(t.options.mutationKey,i))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function h3(e,t){return((t==null?void 0:t.queryKeyHashFn)||Lm)(e)}function Lm(e){return JSON.stringify(e,(t,r)=>CC(r)?Object.keys(r).sort().reduce((a,s)=>(a[s]=r[s],a),{}):r)}function Xy(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Xy(e[r],t[r])):!1}var see=Object.prototype.hasOwnProperty;function oB(e,t){if(e===t)return e;const r=MT(e)&&MT(t);if(!r&&!(CC(e)&&CC(t)))return t;const s=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),o=i.length,l=r?new Array(o):{};let c=0;for(let d=0;d<o;d++){const h=r?d:i[d],u=e[h],f=t[h];if(u===f){l[h]=u,(r?d<s:see.call(e,h))&&c++;continue}if(u===null||f===null||typeof u!="object"||typeof f!="object"){l[h]=f;continue}const m=oB(u,f);l[h]=m,m===u&&c++}return s===o&&c===s?e:l}function v1(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function MT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function CC(e){if(!LT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!LT(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function LT(e){return Object.prototype.toString.call(e)==="[object Object]"}function iee(e){return new Promise(t=>{nm.setTimeout(t,e)})}function AC(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?oB(e,t):t}function oee(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function lee(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var f3=Symbol();function lB(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===f3?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function cB(e,t){return typeof e=="function"?e(...t):!!e}var hm,Vh,fg,xq,cee=(xq=class extends ux{constructor(){super();pn(this,hm);pn(this,Vh);pn(this,fg);Ut(this,fg,t=>{if(!Mm&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Le(this,Vh)||this.setEventListener(Le(this,fg))}onUnsubscribe(){var t;this.hasListeners()||((t=Le(this,Vh))==null||t.call(this),Ut(this,Vh,void 0))}setEventListener(t){var r;Ut(this,fg,t),(r=Le(this,Vh))==null||r.call(this),Ut(this,Vh,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){Le(this,hm)!==t&&(Ut(this,hm,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 5,052 bytes, line 625
625this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof Le(this,hm)=="boolean"?Le(this,hm):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hm=new WeakMap,Vh=new WeakMap,fg=new WeakMap,xq),m3=new cee;function kC(){let e,t;const r=new Promise((s,i)=>{e=s,t=i});r.status="pending",r.catch(()=>{});function a(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},r.reject=s=>{a({status:"rejected",reason:s}),t(s)},r}var dee=ree;function uee(){let e=[],t=0,r=l=>{l()},a=l=>{l()},s=dee;const i=l=>{t?e.push(l):s(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{a(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{a=l},setScheduler:l=>{s=l}}}var Vs=uee(),mg,Hh,pg,yq,hee=(yq=class extends ux{constructor(){super();pn(this,mg,!0);pn(this,Hh);pn(this,pg);Ut(this,pg,t=>{if(!Mm&&window.addEventListener){const r=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",a)}}})}onSubscribe(){Le(this,Hh)||this.setEventListener(Le(this,pg))}onUnsubscribe(){var t;this.hasListeners()||((t=Le(this,Hh))==null||t.call(this),Ut(this,Hh,void 0))}setEventListener(t){var r;Ut(this,pg,t),(r=Le(this,Hh))==null||r.call(this),Ut(this,Hh,t(this.setOnline.bind(this)))}setOnline(t){Le(this,mg)!==t&&(Ut(this,mg,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return Le(this,mg)}},mg=new WeakMap,Hh=new WeakMap,pg=new WeakMap,yq),b1=new hee;function fee(e){return Math.min(1e3*2**e,3e4)}function dB(e){return(e??"online")==="online"?b1.isOnline():!0}var PC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function uB(e){let t=!1,r=0,a;const s=kC(),i=()=>s.status!=="pending",o=g=>{var y;if(!i()){const x=new PC(g);f(x),(y=e.onCancel)==null||y.call(e,x)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>m3.isFocused()&&(e.networkMode==="always"||b1.isOnline())&&e.canRun(),h=()=>dB(e.networkMode)&&e.canRun(),u=g=>{i()||(a==null||a(),s.resolve(g))},f=g=>{i()||(a==null||a(),s.reject(g))},m=()=>new Promise(g=>{var y;a=x=>{(i()||d())&&g(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;a=void 0,i()||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(i())return;let g;const y=r===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(u).catch(x=>{var S;if(i())return;const w=e.retry??(Mm?0:3),j=e.retryDelay??fee,N=typeof j=="function"?j(r,x):j,_=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,x);if(t||!_){f(x);return}r++,(S=e.onFail)==null||S.call(e,r,x),iee(N).then(()=>d()?void 0:m()).then(()=>{t?f(x):b()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(a==null||a(),s),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?b():m().then(b),s)}}var fm,vq,hB=(vq=class{constructor(){pn(this,fm)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),SC(this.gcTime)&&Ut(this,fm,nm.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Mm?1/0:300*1e3))}clearGcTimeout(){Le(this,fm)&&(nm.clearTimeout(Le(this,fm)),Ut(this,fm,void 0))}},fm=new WeakMap,vq),mm,gg,uc,pm,ii,V0,gm,Yc,Tu,bq,mee=(bq=class extends hB{constructor(t){super();pn(this,Yc);pn(this,mm);pn(this,gg);pn(this,uc);pn(this,pm);pn(this,ii);pn(this,V0);pn(this,gm);Ut(this,gm,!1),Ut(this,V0,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ut(this,pm,t.client),Ut(this,uc,Le(this,pm).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ut(this,mm,RT(this.options)),this.state=t.state??Le(this,mm),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Le(this,ii))==null?void 0:t.promise}setOptions(t){if(this.options={...Le(this,V0),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=RT(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),Ut(this,mm,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Le(this,uc).remove(this)}setData(t,r){const a=AC(this.state.data,t,this.options);return Vn(this,Yc,Tu).call(this,{data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(t,r){Vn(this,Yc,Tu).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var a,s;const r=(a=Le(this,ii))==null?void 0:a.promise;return(s=Le(this,ii))==null||s.cancel(t),r?r.then(vo).catch(vo):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Le(this,mm))}isActive(){return this.observers.some(t=>fc(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===f3||this.state.dataUpdateCount+this.state.errorUpdate
625Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>rf(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:!iB(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=Le(this,ii))==null||r.continue()}onOnline(){var r;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=Le(this,ii))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Le(this,uc).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(Le(this,ii)&&(Le(this,gm)?Le(this,ii).cancel({revert:!0}):Le(this,ii).cancelRetry()),this.scheduleGc()),Le(this,uc).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Vn(this,Yc,Tu).call(this,{type:"invalidate"})}async fetch(t,r){var c,d,h,u,f,m,b,g,y,x,w,j;if(this.state.fetchStatus!=="idle"&&((c=Le(this,ii))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Le(this,ii))return Le(this,ii).continueRetry(),Le(this,ii).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(_=>_.options.queryFn);N&&this.setOptions(N.options)}const a=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ut(this,gm,!0),a.signal)})},i=()=>{const N=lB(this.options,r),S=(()=>{const A={client:Le(this,pm),queryKey:this.queryKey,meta:this.meta};return s(A),A})();return Ut(this,gm,!1),this.options.persister?this.options.persister(N,S,this):N(S)},l=(()=>{const N={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:Le(this,pm),state:this.state,fetchFn:i};return s(N),N})();(d=this.options.behavior)==null||d.onFetch(l,this),Ut(this,gg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&Vn(this,Yc,Tu).call(this,{type:"fetch",meta:(u=l.fetchOptions)==null?void 0:u.meta}),Ut(this,ii,uB({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:N=>{N instanceof PC&&N.revert&&this.setState({...Le(this,gg),fetchStatus:"idle"}),a.abort()},onFail:(N,_)=>{Vn(this,Yc,Tu).call(this,{type:"failed",failureCount:N,error:_})},onPause:()=>{Vn(this,Yc,Tu).call(this,{type:"pause"})},onContinue:()=>{Vn(this,Yc,Tu).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const N=await Le(this,ii).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(m=(f=Le(this,uc).config).onSuccess)==null||m.call(f,N,this),(g=(b=Le(this,uc).config).onSettled)==null||g.call(b,N,this.state.error,this),N}catch(N){if(N instanceof PC){if(N.silent)return Le(this,ii).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Vn(this,Yc,Tu).call(this,{type:"error",error:N}),(x=(y=Le(this,uc).config).onError)==null||x.call(y,N,this),(j=(w=Le(this,uc).config).onSettled)==null||j.call(w,this.state.data,N,this),N}finally{this.scheduleGc()}}},mm=new WeakMap,gg=new WeakMap,uc=new WeakMap,pm=new WeakMap,ii=new WeakMap,V0=new WeakMap,gm=new WeakMap,Yc=new WeakSet,Tu=function(t){const r=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...fB(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,data:t.data,dataUpdateCount:a.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ut(this,gg,t.manual?s:void 0),s;case"error":const i=t.error;
vendor: 13,859 bytes, line 625
625return{...a,error:i,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=r(this.state),Vs.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),Le(this,uc).notify({query:this,type:"updated",action:t})})},bq);function fB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dB(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function RT(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Zo,mr,H0,xo,xm,xg,Ou,Wh,W0,yg,vg,ym,vm,Kh,bg,zr,xy,EC,TC,OC,MC,LC,RC,IC,mB,wq,pee=(wq=class extends ux{constructor(t,r){super();pn(this,zr);pn(this,Zo);pn(this,mr);pn(this,H0);pn(this,xo);pn(this,xm);pn(this,xg);pn(this,Ou);pn(this,Wh);pn(this,W0);pn(this,yg);pn(this,vg);pn(this,ym);pn(this,vm);pn(this,Kh);pn(this,bg,new Set);this.options=r,Ut(this,Zo,t),Ut(this,Wh,null),Ut(this,Ou,kC()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Le(this,mr).addObserver(this),IT(Le(this,mr),this.options)?Vn(this,zr,xy).call(this):this.updateResult(),Vn(this,zr,MC).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return DC(Le(this,mr),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return DC(Le(this,mr),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Vn(this,zr,LC).call(this),Vn(this,zr,RC).call(this),Le(this,mr).removeObserver(this)}setOptions(t){const r=this.options,a=Le(this,mr);if(this.options=Le(this,Zo).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fc(this.options.enabled,Le(this,mr))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Vn(this,zr,IC).call(this),Le(this,mr).setOptions(this.options),r._defaulted&&!v1(this.options,r)&&Le(this,Zo).getQueryCache().notify({type:"observerOptionsUpdated",query:Le(this,mr),observer:this});const s=this.hasListeners();s&&DT(Le(this,mr),a,this.options,r)&&Vn(this,zr,xy).call(this),this.updateResult(),s&&(Le(this,mr)!==a||fc(this.options.enabled,Le(this,mr))!==fc(r.enabled,Le(this,mr))||rf(this.options.staleTime,Le(this,mr))!==rf(r.staleTime,Le(this,mr)))&&Vn(this,zr,EC).call(this);const i=Vn(this,zr,TC).call(this);s&&(Le(this,mr)!==a||fc(this.options.enabled,Le(this,mr))!==fc(r.enabled,Le(this,mr))||i!==Le(this,Kh))&&Vn(this,zr,OC).call(this,i)}getOptimisticResult(t){const r=Le(this,Zo).getQueryCache().build(Le(this,Zo),t),a=this.createResult(r,t);return xee(this,a)&&(Ut(this,xo,a),Ut(this,xg,this.options),Ut(this,xm,Le(this,mr).state)),a}getCurrentResult(){return Le(this,xo)}trackResult(t,r){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&!this.options.experimental_prefetchInRender&&Le(this,Ou).status==="pending"&&Le(this,Ou).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(a,s))})}trackProp(t){Le(this,bg).add(t)}getCurrentQuery(){return Le(this,mr)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=Le(this,Zo).defaultQueryOptions(t),a=Le(this,Zo).getQueryCache().build(Le(this,Zo),r);return a.fetch().then(()=>this.createResult(a,r))}fetch(t){return Vn(this,zr,xy).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Le(this,xo)))}createResult(t,r){var R;const a=Le(this,mr),s=this.options,i=Le(this,xo),o=Le(this,xm),l=Le(this,xg),d=t!==a?t.state:Le(this,H0),{state:h}=t;let u={...h},f=!1,m;if(r._optimisticResults){const M=this.hasListeners(),k=!M&&IT(t,r),P=M&&DT(t,a,r,s);(k||P)&&(u={...u,...fB(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:y}=u;m=u.data;let x=!1;if(r.placeholderData!==void 0&&m===void 0&&y==="pending"){let M;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(M=i.data,x=!0):M=typeof r.placeholderData=="function"?r.placeholderData((R=Le(this,vg))==null?void 0:R.state.data,Le(this,vg)):r.placeholderData,M!==void 0&&(y="success",m=AC(i==null?void 0:i.data,M,r),f=!0)}if(r.select&&m!==void 0&&!x)if(i&&m===(o==null?void 0:o.data)&&r.select===Le(this,W0))m=Le(this,yg);else try{Ut(this,W0,r.select),m=r.select(m),m=AC(i==null?void 0:i.data,m,r),Ut(this,yg,m),Ut(this,Wh,null)}catch(M){Ut(this,Wh,M)}Le(this,Wh)&&(b=Le(this,Wh),m=Le(this,yg),g=Date.now(),y="error");const w=u.fetchStatus==="fetching",j=y==="pending",N=y==="error",_=j&&w,S=m!==void 0,T={status:y,fetchStatus:u.fetchStatus,isPending:j,isSuccess:y==="success",isError:N,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:u.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>d.dataUpdateCount||u.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!j,isLoadingError:N&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:N&&S,isStale:p3(t,r),refetch:this.refetch,promise:Le(this,Ou),isEnabled:fc(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=O=>{T.status==="error"?O.reject(T.error):T.data!==void 0&&O.resolve(T.data)},k=()=>{const O=Ut(this,Ou,T.promise=kC());M(O)},P=Le(this,Ou);switch(P.status){case"pending":t.queryHash===a.queryHash&&M(P);break;case"fulfilled":(T.status==="error"||T.data!==P.value)&&k();break;case"rejected":(T.status!=="error"||T.error!==P.reason)&&k();break}}return T}updateResult(){const t=Le(this,xo),r=this.createResult(Le(this,mr),this.options);if(Ut(this,xm,Le(this,mr).state),Ut(this,xg,this.options),Le(this,xm).data!==void 0&&Ut(this,vg,Le(this,mr)),v1(r,t))return;Ut(this,xo,r);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!Le(this,bg).size)return!0;const o=new Set(i??Le(this,bg));return this.options.throwOnError&&o.add("error"),Object.keys(Le(this,xo)).some(l=>{const c=l;return Le(this,xo)[c]!==t[c]&&o.has(c)})};Vn(this,zr,mB).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Vn(this,zr,MC).call(this)}},Zo=new WeakMap,mr=new WeakMap,H0=new WeakMap,xo=new WeakMap,xm=new WeakMap,xg=new WeakMap,Ou=new WeakMap,Wh=new WeakMap,W0=new WeakMap,yg=new WeakMap,vg=new WeakMap,ym=new WeakMap,vm=new WeakMap,Kh=new WeakMap,bg=new WeakMap,zr=new WeakSet,xy=function(t){Vn(this,zr,IC).call(this);let r=Le(this,mr).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(vo)),r},EC=function(){Vn(this,zr,LC).call(this);const t=rf(this.options.staleTime,Le(this,mr));if(Mm||Le(this,xo).isStale||!SC(t))return;const a=iB(Le(this,xo).dataUpdatedAt,t)+1;Ut(this,ym,nm.setTimeout(()=>{Le(this,xo).isStale||this.updateResult()},a))},TC=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Le(this,mr)):this.options.refetchInterval)??!1},OC=function(t){Vn(this,zr,RC).call(this),Ut(this,Kh,t),!(Mm||fc(this.options.enabled,Le(this,mr))===!1||!SC(Le(this,Kh))||Le(this,Kh)===0)&&Ut(this,vm,nm.setInterval(()=>{(this.options.refetchIntervalInBackground||m3.isFocused())&&Vn(this,zr,xy).call(this)},Le(this,Kh)))},MC=function(){Vn(this,zr,EC).call(this),Vn(this,zr,OC).call(this,Vn(this,zr,TC).call(this))},LC=function(){Le(this,ym)&&(nm.clearTimeout(Le(this,ym)),Ut(this,ym,void 0))},RC=function(){Le(this,vm)&&(nm.clearInterval(Le(this,vm)),Ut(this,vm,void 0))},IC=function(){const t=Le(this,Zo).getQueryCache().build(Le(this,Zo),this.options);if(t===Le(this,mr))return;const r=Le(this,mr);Ut(this,mr,t),Ut(this,H0,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},mB=function(t){Vs.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(Le(this,xo))}),Le(this,Zo).getQueryCache().notify({query:Le(this,mr),type:"observerResultsUpdated"})})},wq);function gee(e,t){return fc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function IT(e,t){return gee(e,t)||e.state.data!==void 0&&DC(e,t,t.refetchOnMount)}function DC(e,t,r){if(fc(t.enabled,e)!==!1&&rf(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&p3(e,t)}return!1}function DT(e,t,r,a){return(e!==t||fc(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&p3(e,r)}function p3(e,t){return fc(t.enabled,e)!==!1&&e.isStaleByTime(rf(t.staleTime,e))}function xee(e,t){return!v1(e.getCurrentResult(),t)}function FT(e){return{onFetch:(t,r)=>{var h,u,f,m,b;const a=t.options,s=(f=(u=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let g=!1;const y=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=lB(t.options,t.fetchOptions),w=async(j,N,_)=>{if(g)return Promise.reject();if(N==null&&j.pages.length)return Promise.resolve(j);const A=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:N,direction:_?"backward":"forward",meta:t.options.meta};return y(k),k})(),T=await x(A),{maxPages:R}=t.options,M=_?lee:oee;return{pages:M(j.pages,T,R),pageParams:M(j.pageParams,N,R)}};if(s&&i.length){const j=s==="backward",N=j?yee:qT,_={pages:i,pageParams:o},S=N(a,_);l=await w(_,S,j)}else{const j=e??i.length;do{const N=c===0?o[0]??a.initialPageParam:qT(a,l);if(c>0&&N==null)break;l=await w(l,N),c++}while(c<j)}return l};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function qT(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function yee(e,{pages:t,pageParams:r}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,r[0],r):void 0}var K0,Id,yo,bm,Dd,Ih,jq,vee=(jq=class extends hB{constructor(t){super();pn(this,Dd);pn(this,K0);pn(this,Id);pn(this,yo);pn(this,bm);Ut(this,K0,t.client),this.mutationId=t.mutationId,Ut(this,yo,t.mutationCache),Ut(this,Id,[]),this.state=t.state||pB(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Le(this,Id).includes(t)||(Le(this,Id).push(t),this.clearGcTimeout(),Le(this,yo).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ut(this,Id,Le(this,Id).filter(r=>r!==t)),this.scheduleGc(),Le(this,yo).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Le(this,Id).length||(this.state.status==="pending"?this.scheduleGc():Le(this,yo).remove(this))}continue(){var t;return((t=Le(this,bm))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,d,h,u,f,m,b,g,y,x,w,j,N,_,S,A,T,R;const r=()=>{Vn(this,Dd,Ih).call(this,{type:"continue"})},a={client:Le(this,K0),meta:this.options.meta,mutationKey:this.options.mutationKey};Ut(this,bm,uB({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(M,k)=>{Vn(this,Dd,Ih).call(this,{type:"failed",failureCount:M,error:k})},onPause:()=>{Vn(this,Dd,Ih).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Le(this,yo).canRun(this)}));const s=this.state.status==="pending",i=!Le(this,bm).canStart();try{if(s)r();else{Vn(this,Dd,Ih).call(this,{type:"pending",variables:t,isPaused:i}),await((l=(o=Le(this,yo).config).onMutate)==null?void 0:l.call(o,t,this,a));const k=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,a));k!==this.state.context&&Vn(this,Dd,Ih).call(this,{type:"pending",context:k,variables:t,isPaused:i})}const M=await Le(this,bm).start();return await((u=(h=Le(this,yo).config).onSuccess)==null?void 0:u.call(h,M,t,this.state.context,this,a)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,M,t,this.state.context,a)),await((g=(b=Le(this,yo).config).onSettled)==null?void 0:g.call(b,M,null,this.state.variables,this.state.context,this,a)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,M,null,t,this.state.context,a)),Vn(this,Dd,Ih).call(this,{type:"success",data:M}),M}catch(M){try{throw await((j=(w=Le(this,yo).config).onError)==null?void 0:j.call(w,M,t,this.state.context,this,a)),await((_=(N=this.options).onError)==null?void 0:_.call(N,M,t,this.state.context,a)),await((A=(S=Le(this,yo).config).onSettled)==null?void 0:A.call(S,void 0,M,this.state.variables,this.state.context,this,a)),await((R=(T=this.options).onSettled)==null?void 0:R.call(T,void 0,M,t,this.state.context,a)),M}finally{Vn(this,Dd,Ih).call(this,{type:"error",error:M})}}finally{Le(this,yo).runNext(this)}}},K0=new WeakMap,Id=new WeakMap,yo=new WeakMap,bm=new WeakMap,Dd=new WeakSet,Ih=function(t){const r=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};
625case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Vs.batch(()=>{Le(this,Id).forEach(a=>{a.onMutationUpdate(t)}),Le(this,yo).notify({mutation:this,type:"updated",action:t})})},jq);function pB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mu,Qc,G0,Nq,bee=(Nq=class extends ux{constructor(t={}){super();pn(this,Mu);pn(this,Qc);pn(this,G0);this.config=t,Ut(this,Mu,new Set),Ut(this,Qc,new Map),Ut(this,G0,0)}build(t,r,a){const s=new vee({client:t,mutationCache:this,mutationId:++rb(this,G0)._,options:t.defaultMutationOptions(r),state:a});return this.add(s),s}add(t){Le(this,Mu).add(t);const r=db(t);if(typeof r=="string"){const a=Le(this,Qc).get(r);a?a.push(t):Le(this,Qc).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Le(this,Mu).delete(t)){const r=db(t);if(typeof r=="string"){const a=Le(this,Qc).get(r);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&Le(this,Qc).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=db(t);if(typeof r=="string"){const a=Le(this,Qc).get(r),s=a==null?void 0:a.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const r=db(t);if(typeof r=="string"){const s=(a=Le(this,Qc).get(r))==null?void 0:a.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Vs.batch(()=>{Le(this,Mu).forEach(t=>{this.notify({type:"removed",mutation:t})}),Le(this,Mu).clear(),Le(this,Qc).clear()})}getAll(){return Array.from(Le(this,Mu))}find(t){const r={exact:!0,...t};return this.getAll().find(a=>OT(r,a))}findAll(t={}){return this.getAll().filter(r=>OT(t,r))}notify(t){Vs.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
vendor: 5,036 bytes, line 625
625r.state.isPaused);return Vs.batch(()=>Promise.all(t.map(r=>r.continue().catch(vo))))}},Mu=new WeakMap,Qc=new WeakMap,G0=new WeakMap,Nq);function db(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Lu,Gh,el,Ru,Gu,Qb,FC,_q,wee=(_q=class extends ux{constructor(r,a){super();pn(this,Gu);pn(this,Lu);pn(this,Gh);pn(this,el);pn(this,Ru);Ut(this,Lu,r),this.setOptions(a),this.bindMethods(),Vn(this,Gu,Qb).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const a=this.options;this.options=Le(this,Lu).defaultMutationOptions(r),v1(this.options,a)||Le(this,Lu).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Le(this,el),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Lm(a.mutationKey)!==Lm(this.options.mutationKey)?this.reset():((s=Le(this,el))==null?void 0:s.state.status)==="pending"&&Le(this,el).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=Le(this,el))==null||r.removeObserver(this)}onMutationUpdate(r){Vn(this,Gu,Qb).call(this),Vn(this,Gu,FC).call(this,r)}getCurrentResult(){return Le(this,Gh)}reset(){var r;(r=Le(this,el))==null||r.removeObserver(this),Ut(this,el,void 0),Vn(this,Gu,Qb).call(this),Vn(this,Gu,FC).call(this)}mutate(r,a){var s;return Ut(this,Ru,a),(s=Le(this,el))==null||s.removeObserver(this),Ut(this,el,Le(this,Lu).getMutationCache().build(Le(this,Lu),this.options)),Le(this,el).addObserver(this),Le(this,el).execute(r)}},Lu=new WeakMap,Gh=new WeakMap,el=new WeakMap,Ru=new WeakMap,Gu=new WeakSet,Qb=function(){var a;const r=((a=Le(this,el))==null?void 0:a.state)??pB();Ut(this,Gh,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},FC=function(r){Vs.batch(()=>{var a,s,i,o,l,c,d,h;if(Le(this,Ru)&&this.hasListeners()){const u=Le(this,Gh).variables,f=Le(this,Gh).context,m={client:Le(this,Lu),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((s=(a=Le(this,Ru)).onSuccess)==null||s.call(a,r.data,u,f,m),(o=(i=Le(this,Ru)).onSettled)==null||o.call(i,r.data,null,u,f,m)):(r==null?void 0:r.type)==="error"&&((c=(l=Le(this,Ru)).onError)==null||c.call(l,r.error,u,f,m),(h=(d=Le(this,Ru)).onSettled)==null||h.call(d,void 0,r.error,u,f,m))}this.listeners.forEach(u=>{u(Le(this,Gh))})})},_q),Fd,Sq,jee=(Sq=class extends ux{constructor(t={}){super();pn(this,Fd);this.config=t,Ut(this,Fd,new Map)}build(t,r,a){const s=r.queryKey,i=r.queryHash??h3(s,r);let o=this.get(i);return o||(o=new mee({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(r),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){Le(this,Fd).has(t.queryHash)||(Le(this,Fd).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=Le(this,Fd).get(t.queryHash);r&&(t.destroy(),r===t&&Le(this,Fd).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Vs.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Le(this,Fd).get(t)}getAll(){return[...Le(this,Fd).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(a=>TT(r,a))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(a=>TT(t,a)):r}notify(t){Vs.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Vs.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Vs.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Fd=new WeakMap,Sq),Qa,Yh,Qh,wg,jg,Xh,Ng,_g,Cq,Nee=(Cq=class{constructor(e={}){pn(this,Qa);pn(this,Yh);pn(this,Qh);pn(this,wg);pn(this,jg);pn(this,Xh);pn(this,Ng);pn(this,_g);Ut(this,Qa,e.queryCache||new jee),Ut(this,Yh,e.mutationCache||new bee),Ut(this,Qh,e.defaultOptions||{}),Ut(this,wg,new Map),Ut(this,jg,new Map),Ut(this,Xh,0)}mount(){rb(this,Xh)._++,Le(this,Xh)===1&&(Ut(this,Ng,m3.subscribe(async e=>{e&&(await this.resumePausedMutations(),Le(this,Qa).onFocus())})),Ut(this,_g,b1.subscribe(async e=>{e&&(await this.resumePausedMutations(),Le(this,Qa).onOnline())})))}unmount(){var e,t;rb(this,Xh)._--,Le(this,Xh)===0&&((e=Le(this,Ng))==null||e.call(this),Ut(this,Ng,void 0),(t=Le(this,_g))==null||t.call(this),Ut(this,_g,void 0))}isFetching(e){return Le(this,Qa).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Le(this,Yh).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Le(this,Qa).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=Le(this,Qa).build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(rf(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return Le(this,Qa).findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),s=Le(this,Qa).get(a.queryHash),i=s==null?void 0:s.state.data,o=aee(t,i);if(o!==void 0)return Le(this,Qa).build(this,a).setData(o,{...r,manual:!0})}
625setQueriesData(e,t,r){return Vs.batch(()=>Le(this,Qa).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Le(this,Qa).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=Le(this,Qa);Vs.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=Le(this,Qa);return Vs.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Vs.batch(()=>Le(this,Qa).findAll(e).map(s=>s.cancel(r)));return Promise.all(a).then(vo).catch(vo)}invalidateQueries(e,t={}){return Vs.batch(()=>(Le(this,Qa).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},a=Vs.batch(()=>Le(this,Qa).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(vo)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(vo)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=Le(this,Qa).build(this,t);return r.isStaleByTime(rf(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vo).catch(vo)}fetchInfiniteQuery(e){return e.behavior=FT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vo).catch(vo)}ensureInfiniteQueryData(e){return e.behavior=FT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return b1.isOnline()?Le(this,Yh).resumePausedMutations():Promise.resolve()}getQueryCache(){return Le(this,Qa)}getMutationCache(){return Le(this,Yh)}getDefaultOptions(){return Le(this,Qh)}setDefaultOptions(e){Ut(this,Qh,e)}setQueryDefaults(e,t){Le(this,wg).set(Lm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Le(this,wg).values()],r={};return t.forEach(a=>{Xy(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){Le(this,jg).set(Lm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Le(this,jg).values()],r={};return t.forEach(a=>{Xy(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Le(this,Qh).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=h3(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===f3&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Le(this,Qh).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Le(this,Qa).clear(),Le(this,Yh).clear()}},Qa=new WeakMap,Yh=new WeakMap,Qh=new WeakMap,wg=new WeakMap,jg=new WeakMap,Xh=new WeakMap,Ng=new WeakMap,_g=new WeakMap,Cq),gB=L.createContext(void 0),Sr=e=>{const t=L.useContext(gB);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_ee=({client:e,children:t})=>(L.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(gB.Provider,{value:e,children:t})),xB=L.createContext(!1),See=()=>L.useContext(xB);xB.Provider;function Cee(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Aee=L.createContext(Cee()),kee=()=>L.useContext(Aee),Pee=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Eee=e=>{L.useEffect(()=>{e.clearReset()},[e])},Tee=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||cB(r,[e.error,a])),Oee=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>r(a(...s)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mee=(e,t)=>
625e.isLoading&&e.isFetching&&!t,Lee=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,BT=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Ree(e,t,r){var u,f,m,b,g;const a=See(),s=kee(),i=Sr(),o=i.defaultQueryOptions(e);(f=(u=i.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=a?"isRestoring":"optimistic",Oee(o),Pee(o,s),Eee(s);const l=!i.getQueryCache().get(o.queryHash),[c]=L.useState(()=>new t(i,o)),d=c.getOptimisticResult(o),h=!a&&e.subscribed!==!1;if(L.useSyncExternalStore(L.useCallback(y=>{const x=h?c.subscribe(Vs.batchCalls(y)):vo;return c.updateResult(),x},[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),L.useEffect(()=>{c.setOptions(o)},[o,c]),Lee(o,d))throw BT(o,c,s);if(Tee({result:d,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw d.error;if((b=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||b.call(m,o,d),o.experimental_prefetchInRender&&!Mm&&Mee(d,a)){const y=l?BT(o,c,s):(g=i.getQueryCache().get(o.queryHash))==null?void 0:g.promise;y==null||y.catch(vo).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function xt(e,t){return Ree(e,pee)}function Tt(e,t){const r=Sr(),[a]=L.useState(()=>new wee(r,e));L.useEffect(()=>{a.setOptions(e)},[a,e]);const s=L.useSyncExternalStore(L.useCallback(o=>a.subscribe(Vs.batchCalls(o)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=L.useCallback((o,l)=>{a.mutate(o,l).catch(vo)},[a]);if(s.error&&cB(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const g3=new Nee({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function Iee(){const[e,t]=L.useState(!1),r=L.useRef(!1),[a,s]=L.useState(!1),i=L.useRef(!1),[o,l]=L.useState(!1),c=L.useRef(!1),d=L.useRef([]),h=L.useRef([]),u=L.useRef([]),f=L.useRef(null),m=(T=!1)=>{const R=document.createElement("div");return R.style.position="absolute",R.style.pointerEvents="none",R.style.transition="all 0.1s ease-in-out",R.style.zIndex="9999",T?R.style.border="2px solid #2563EB":(R.style.border="2px solid #95a5fc",R.style.backgroundColor="rgba(99, 102, 241, 0.05)"),R},b=(T,R,M=!1)=>{if(!R||!r.current)return;R.offsetWidth;const k=R.getBoundingClientRect();T.style.top=`${k.top+window.scrollY}px`,T.style.left=`${k.left+window.scrollX}px`,T.style.width=`${k.width}px`,T.style.height=`${k.height}px`;let P=T.querySelector("div");P||(P=document.createElement("div"),P.textContent=R.tagName.toLowerCase(),P.style.position="absolute",P.style.top="-27px",P.style.left="-2px",P.style.padding="2px 8px",P.style.fontSize="11px",P.style.fontWeight=M?"500":"400",P.style.color=M?"#ffffff":"#526cff",P.style.backgroundColor=M?"#526cff":"#DBEAFE",P.style.borderRadius="3px",P.style.boxShadow="none",P.style.minWidth="24px",P.style.textAlign="center",T.appendChild(P))},g=T=>{if(!T)return[];const R=[...document.querySelectorAll(`[data-source-location="${T}"]`)];return R.length>0?R:[...document.querySelectorAll(`[data-visual-selector-id="${T}"]`)]},y=()=>{d.current.forEach(T=>{T&&T.parentNode&&T.remove()}),d.current=[],u.current=[]},x=T=>{if(!r.current||i.current)return;if(c.current){y();return}if(T.target.tagName.toLowerCase()==="path"){y();return}const R=T.target.closest("[data-source-location], [data-visual-selector-id]");if(!R){y();return}const M=R.dataset.sourceLocation||R.dataset.visualSelectorId;if(R.dataset.sourceLocation,f.current===M){y();return}const k=g(M);y(),k.forEach(P=>{const O=m(!1);document.body.appendChild(O),d.current.push(O),b(O,P)}),u.current=k},w=()=>{i.current||y()},j=T=>{var $;if(!r.current)return;if(c.current){T.preventDefault(),T.stopPropagation(),T.stopImmediatePropagation(),window.parent.postMessage({type:"close-dropdowns"},"*");return}if(T.target.tagName.toLowerCase()==="path")return;T.preventDefault(),T.stopPropagation(),T.stopImmediatePropagation();const R=T.target.closest("[data-source-location], [data-visual-selector-id]");if(!R)return;const M=R.dataset.sourceLocation||R.dataset.visualSelectorId;R.dataset.sourceLocation,h.current.forEach(G=>{G&&G.parentNode&&G.remove()}
625),h.current=[],g(M).forEach(G=>{const B=m(!0);document.body.appendChild(B),h.current.push(B),b(B,G,!0)}),f.current=M,y();const P=R.getBoundingClientRect(),O={top:P.top,left:P.left,right:P.right,bottom:P.bottom,width:P.width,height:P.height,centerX:P.left+P.width/2,centerY:P.top+P.height/2},F={type:"element-selected",tagName:R.tagName,classes:(($=R.className)==null?void 0:$.baseVal)||R.className||"",visualSelectorId:M,content:R.innerText,dataSourceLocation:R.dataset.sourceLocation,isDynamicContent:R.dataset.dynamicContent==="true",linenumber:R.dataset.linenumber,filename:R.dataset.filename,position:O};window.parent.postMessage(F,"*")},N=()=>{h.current.forEach(T=>{T&&T.parentNode&&T.remove()}),h.current=[],f.current=null},_=(T,R,M=!1)=>{const k=g(T);k.length!==0&&(k.forEach(P=>{var O;if(M)P.className=R;else{const F=((O=P.className)==null?void 0:O.baseVal)||P.className||"";P.className=Zq(F,R)}}),setTimeout(()=>{var P,O;f.current===T&&h.current.forEach((F,$)=>{$<k.length&&b(F,k[$])}),u.current.length>0&&((O=(P=u.current[0])==null?void 0:P.dataset)==null?void 0:O.visualSelectorId)===T&&d.current.forEach(($,G)=>{G<u.current.length&&b($,u.current[G])})},50))},S=(T,R)=>{const M=g(T);M.length!==0&&(M.forEach(k=>{k.innerText=R}),setTimeout(()=>{f.current===T&&h.current.forEach((k,P)=>{P<M.length&&b(k,M[P])})},50))},A=T=>{t(T),r.current=T,T?(document.body.style.cursor="crosshair",document.addEventListener("mouseover",x),document.addEventListener("mouseout",w),document.addEventListener("click",j,!0)):(y(),h.current.forEach(R=>{R&&R.parentNode&&R.remove()}),h.current=[],u.current=[],f.current=null,document.body.style.cursor="default",document.removeEventListener("mouseover",x),document.removeEventListener("mouseout",w),document.removeEventListener("click",j,!0))};return L.useEffect(()=>{document.querySelectorAll("[data-linenumber]:not([data-visual-selector-id])").forEach((k,P)=>
625{const O=`visual-id-${k.dataset.filename}-${k.dataset.linenumber}-${P}`;k.dataset.visualSelectorId=O});const R=()=>{if(f.current){const k=g(f.current);if(k.length>0){const O=k[0].getBoundingClientRect(),F=window.innerHeight,$=window.innerWidth,G=O.top<F&&O.bottom>0&&O.left<$&&O.right>0,B={top:O.top,left:O.left,right:O.right,bottom:O.bottom,width:O.width,height:O.height,centerX:O.left+O.width/2,centerY:O.top+O.height/2};window.parent.postMessage({type:"element-position-update",position:B,isInViewport:G,visualSelectorId:f.current},"*")}}},M=k=>{const P=k.data;switch(P.type){case"toggle-visual-edit-mode":A(P.data.enabled);break;case"update-classes":P.data&&P.data.classes!==void 0?_(P.data.visualSelectorId,P.data.classes,P.data.replace||!1):console.warn("[Agent] Invalid update-classes message:",P);break;case"unselect-element":N();break;case"refresh-page":window.location.reload();break;case"update-content":P.data&&P.data.content!==void 0?S(P.data.visualSelectorId,P.data.content):console.warn("[Agent] Invalid update-content message:",P);break;case"request-element-position":if(f.current){const O=g(f.current);if(O.length>0){const $=O[0].getBoundingClientRect(),G=window.innerHeight,B=window.innerWidth,Y=$.top<G&&$.bottom>0&&$.left<B&&$.right>0,ee={top:$.top,left:$.left,right:$.right,bottom:$.bottom,width:$.width,height:$.height,centerX:$.left+$.width/2,centerY:$.top+$.height/2};window.parent.postMessage({type:"element-position-update",position:ee,isInViewport:Y,visualSelectorId:f.current},"*")}}break;case"popover-drag-state":P.data&&P.data.isDragging!==void 0&&(s(P.data.isDragging),i.current=P.data.isDragging,P.data.isDragging&&y());break;case"dropdown-state":P.data&&P.data.isOpen!==void 0&&(l(P.data.isOpen),c.current=P.data.isOpen,P.data.isOpen&&y());break}};return window.addEventListener("message",M),window.addEventListener("scroll",R,!0),document.addEventListener("scroll",R,!0),window.parent.postMessage({type:"visual-edit-agent-ready"},"*"),()=>{window.removeEventListener("message",M),window.removeEventListener("scroll",R,!0),document.removeEventListener("scroll",R,!0),document.removeEventListener("mouseover",x),document.removeEventListener("mouseout",w),document.removeEventListener("click",j,!0),y(),h.current.forEach(k=>{k&&k.parentNode&&k.remove()})}},[]),L.useEffect(()=>{r.current=e},[e]),L.useEffect(()=>{i.current=a},[a]),L.useEffect(()=>{c.current=o},[o]),L.useEffect(()=>{const T=()=>{if(f.current){const M=g(f.current);h.current.forEach((k,P)=>{P<M.length&&b(k,M[P])})}u.current.length>0&&d.current.forEach((M,k)=>{k<u.current.length&&b(M,u.current[k])})},R=new MutationObserver(M=>{M.some(P=>{const O=$=>{if($.nodeType===Node.ELEMENT_NODE){if($.dataset&&$.dataset.visualSelectorId)return!0;for(let G=0;G<$.children.length;G++)if(O($.children[G]))return!0}return!1};return P.type==="attributes"&&(P.attributeName==="style"||P.attributeName==="class"||P.attributeName==="width"||P.attributeName==="height")&&O(P.target)})&&setTimeout(T,50)});return R.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["style","class","width","height"]}),window.addEventListener("resize",T),window.addEventListener("scroll",T),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T),R.disconnect()}},[]),null}/**
626 * react-router v7.9.1
627 *
628 * Copyright (c) Remix Software Inc.
629 *
630 * This source code is licensed under the MIT license found in the
631 * LICENSE.md file in the root directory of this source tree.
632 *
633 * @license MIT
634 */var $T="popstate";function Dee(e={}){function t(a,s){let{pathname:i,search:o,hash:l}=a.location;return qC("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(a,s){return typeof s=="string"?s:Jy(s)}return qee(t,r,null,e)}function Va(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function eu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fee(){return Math.random().toString(36).substring(2,10)}function UT(e,t){return{usr:e.state,key:e.key,idx:t}}function qC(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?hx(t):t,state:r,key:t&&t.key||a||Fee()}}function Jy({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function hx(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function qee(e,t,r,a={}){let{window:s=document.defaultView,v5Compat:i=!1}=a,o=s.history,l="POP",c=null,d=h();d==null&&(d=0,o.replaceState({...o.state,idx:d},""));function h(){return(o.state||{idx:null}).idx}function u(){l="POP";let y=h(),x=y==null?null:y-d;d=y,c&&c({action:l,location:g.location,delta:x})}function f(y,x){l="PUSH";let w=qC(g.location,y,x);d=h()+1;let j=UT(w,d),N=g.createHref(w);try{o.pushState(j,"",N)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(N)}i&&c&&c({action:l,location:g.location,delta:1})}function m(y,x){l="REPLACE";let w=qC(g.location,y,x);d=h();let j=UT(w,d),N=g.createHref(w);o.replaceState(j,"",N),i&&c&&c({action:l,location:g.location,delta:0})}function b(y){return Bee(y)}let g={get action(){return l},get location(){return e(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener($T,u),c=y,()=>{s.removeEventListener($T,u),c=null}},createHref(y){return t(s,y)},createURL:b,encodeLocation(y){let x=b(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(y){return o.go(y)}};return g}
634function Bee(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Va(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Jy(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function yB(e,t,r="/"){return $ee(e,t,r,!1)}function $ee(e,t,r,a){let s=typeof t=="string"?hx(t):t,i=Zu(s.pathname||"/",r);if(i==null)return null;let o=vB(e);Uee(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let d=Zee(i);l=Xee(o[c],d,a)}return l}function vB(e,t=[],r=[],a="",s=!1){let i=(o,l,c=s,d)=>{let h={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&c)return;Va(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let u=Bu([a,h.relativePath]),f=r.concat(h);o.children&&o.children.length>0&&(Va(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),vB(o.children,t,f,u,c)),!(o.path==null&&!o.index)&&t.push({path:u,score:Yee(u,o.index),routesMeta:f})};return e.forEach((o,l)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))i(o,l);else for(let d of bB(o.path))i(o,l,!0,d)}),t}function bB(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return s?[i,""]:[i];let o=bB(a.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Uee(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Qee(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var zee=/^:[\w-]+$/,Vee=3,Hee=2,Wee=1,Kee=10,Gee=-2,zT=e=>e==="*";function Yee(e,t){let r=e.split("/"),a=r.length;
634return r.some(zT)&&(a+=Gee),t&&(a+=Hee),r.filter(s=>!zT(s)).reduce((s,i)=>s+(zee.test(i)?Vee:i===""?Wee:Kee),a)}function Qee(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function Xee(e,t,r=!1){let{routesMeta:a}=e,s={},i="/",o=[];for(let l=0;l<a.length;++l){let c=a[l],d=l===a.length-1,h=i==="/"?t:t.slice(i.length)||"/",u=w1({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),f=c.route;if(!u&&d&&r&&!a[a.length-1].route.index&&(u=w1({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!u)return null;Object.assign(s,u.params),o.push({params:s,pathname:Bu([i,u.pathname]),pathnameBase:rte(Bu([i,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(i=Bu([i,u.pathnameBase]))}return o}function w1(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Jee(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:a.reduce((d,{paramName:h,isOptional:u},f)=>{if(h==="*"){let b=l[f]||"";o=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const m=l[f];return u&&!m?d[h]=void 0:d[h]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:o,pattern:e}}function Jee(e,t=!1,r=!0){eu(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 a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(a.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function Zee(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return eu(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Zu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function ete(e,t="/"){let{pathname:r,search:a="",hash:s=""}=typeof e=="string"?hx(e):e;return{pathname:r?r.startsWith("/")?r:tte(r,t):t,search:ate(a),hash:ste(s)}}function tte(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function lN(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nte(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wB(e){let t=nte(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function jB(e,t,r,a=!1){let s;typeof e=="string"?s=hx(e):(s={...e},Va(!s.pathname||!s.pathname.includes("?"),lN("?","pathname","search",s)),Va(!s.pathname||!s.pathname.includes("#"),lN("#","pathname","hash",s)),Va(!s.search||!s.search.includes("#"),lN("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=r;else{let u=t.length-1;if(!a&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),u-=1;s.pathname=f.join("/")}l=u>=0?t[u]:"/"}let c=ete(s,l),d=o&&o!=="/"&&o.endsWith("/"),h=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}var Bu=e=>e.join("/").replace(/\/\/+/g,"/"),rte=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ate=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ste=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ite(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var NB=["POST","PUT","PATCH","DELETE"];new Set(NB);var ote=["GET",...NB];new Set(ote);var fx=L.createContext(null);fx.displayName="DataRouter";var Qw=L.createContext(null);Qw.displayName="DataRouterState";L.createContext(!1);var _B=L.createContext({isTransitioning:!1});_B.displayName="ViewTransition";var lte=L.createContext(new Map);lte.displayName="Fetchers";var cte=L.createContext(null);cte.displayName="Await";var iu=L.createContext(null);iu.displayName="Navigation";var Q0=L.createContext(null);Q0.displayName="Location";var ih=L.createContext({outlet:null,matches:[],isDataRoute:!1});ih.displayName="Route";var x3=L.createContext(null);x3.displayName="RouteError";function dte(e,{relative:t}={}){Va(X0(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=L.useContext(iu),{hash:s,pathname:i,search:o}=J0(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:Bu([r,i])),a.createHref({pathname:l,search:o,hash:s})}function X0(){return L.useContext(Q0)!=null}function Rl(){return Va(X0(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Q0).location}var SB="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function CB(e){L.useContext(iu).static||L.useLayoutEffect(e)}function y3(){let{isDataRoute:e}=L.useContext(ih);return e?Nte():ute()}function ute(){Va(X0(),"useNavigate() may be used only in the context of a <Router> component.");let e=L.useContext(fx),{basename:t,navigator:r}=L.useContext(iu),{matches:a}=L.useContext(ih),{pathname:s}=Rl(),i=JSON.stringify(wB(a)),o=L.useRef(!1);return CB(()=>{o.current=!0}),L.useCallback((c,d={})=>
634{if(eu(o.current,SB),!o.current)return;if(typeof c=="number"){r.go(c);return}let h=jB(c,JSON.parse(i),s,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Bu([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,i,s,e])}L.createContext(null);function J0(e,{relative:t}={}){let{matches:r}=L.useContext(ih),{pathname:a}=Rl(),s=JSON.stringify(wB(r));return L.useMemo(()=>jB(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function hte(e,t){return AB(e,t)}function AB(e,t,r,a,s){var w;Va(X0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=L.useContext(iu),{matches:o}=L.useContext(ih),l=o[o.length-1],c=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",u=l&&l.route;{let j=u&&u.path||"";kB(d,!u||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
635
636Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let f=Rl(),m;if(t){let j=typeof t=="string"?hx(t):t;Va(h==="/"||((w=j.pathname)==null?void 0:w.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${j.pathname}" was given in the \`location\` prop.`),m=j}else m=f;let b=m.pathname||"/",g=b;if(h!=="/"){let j=h.replace(/^\//,"").split("/");g="/"+b.replace(/^\//,"").split("/").slice(j.length).join("/")}let y=yB(e,{pathname:g});eu(u||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),eu(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=xte(y&&y.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:Bu([h,i.encodeLocation?i.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?h:Bu([h,i.encodeLocation?i.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),o,r,a,s);return t&&x?L.createElement(Q0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},x):x}function fte(){let e=jte(),t=ite(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:i},"ErrorBoundary")," or"," ",L.createElement("code",{style:i},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),r?L.createElement("pre",{style:s},r):null,o)}var mte=L.createElement(fte,null),pte=class extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?L.createElement(ih.Provider,{value:this.props.routeContext},L.createElement(x3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function gte({routeContext:e,match:t,children:r}){let a=L.useContext(fx);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(ih.Provider,{value:e},r)}function xte(e,t=[],r=null,a=null,s=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,o=r==null?void 0:r.errors;if(o!=null){let d=i.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);Va(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(r)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:u,errors:f}
636=r,m=h.route.loader&&!u.hasOwnProperty(h.route.id)&&(!f||f[h.route.id]===void 0);if(h.route.lazy||m){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,h,u)=>{let f,m=!1,b=null,g=null;r&&(f=o&&h.route.id?o[h.route.id]:void 0,b=h.route.errorElement||mte,l&&(c<0&&u===0?(kB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,g=null):c===u&&(m=!0,g=h.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,u+1)),x=()=>{let w;return f?w=b:m?w=g:h.route.Component?w=L.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,L.createElement(gte,{match:h,routeContext:{outlet:d,matches:y,isDataRoute:r!=null},children:w})};return r&&(h.route.ErrorBoundary||h.route.errorElement||u===0)?L.createElement(pte,{location:r.location,revalidation:r.revalidation,component:b,error:f,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0},unstable_onError:a}):x()},null)}function v3(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function yte(e){let t=L.useContext(fx);return Va(t,v3(e)),t}function vte(e){let t=L.useContext(Qw);return Va(t,v3(e)),t}function bte(e){let t=L.useContext(ih);return Va(t,v3(e)),t}function b3(e){let t=bte(e),r=t.matches[t.matches.length-1];return Va(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function wte(){return b3("useRouteId")}function jte(){var a;let e=L.useContext(x3),t=vte("useRouteError"),r=b3("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function Nte(){let{router:e}=yte("useNavigate"),t=b3("useNavigate"),r=L.useRef(!1);return CB(()=>{r.current=!0}),L.useCallback(async(s,i={})=>{eu(r.current,SB),r.current&&(typeof s=="number"?e.navigate(s):await e.navigate(s,{fromRouteId:t,...i}))},[e,t])}var VT={};function kB(e,t,r){!t&&!VT[e]&&(VT[e]=!0,eu(!1,r))}L.memo(_te);function _te({routes:e,future:t,state:r,unstable_onError:a}){return AB(e,void 0,r,a,t)}function Hf(e){Va(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ste({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:s,static:i=!1}){Va(!X0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=L.useMemo(()=>({basename:o,navigator:s,static:i,future:{}}),[o,s,i]);typeof r=="string"&&(r=hx(r));let{pathname:c="/",search:d="",hash:h="",state:u=null,key:f="default"}=r,m=L.useMemo(()=>{let b=Zu(c,o);return b==null?null:{location:{pathname:b,search:d,hash:h,state:u,key:f},navigationType:a}},[o,c,d,h,u,f,a]);return eu(m!=null,`<Router basename="${o}"> is not able to match the URL "${c}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:L.createElement(iu.Provider,{value:l},L.createElement(Q0.Provider,{children:t,value:m}))}function Cte({children:e,location:t}){return hte(BC(e),t)}function BC(e,t=[]){let r=[];return L.Children.forEach(e,(a,s)=>{if(!L.isValidElement(a))return;let i=[...t,s];if(a.type===L.Fragment){r.push.apply(r,BC(a.props.children,i));return}Va(a.type===Hf,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Va(!a.props.index||!a.props.children,"An index route cannot have child routes.");let o={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(o.children=BC(a.props.children,i)),r.push(o)}),r}var Xb="get",Jb="application/x-www-form-urlencoded";function Xw(e){return e!=null&&typeof e.tagName=="string"}function Ate(e){return Xw(e)&&e.tagName.toLowerCase()==="button"}function kte(e){return Xw(e)&&e.tagName.toLowerCase()==="form"}function Pte(e){return Xw(e)&&e.tagName.toLowerCase()==="input"}function Ete(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Tte(e,t){return e.button===0&&(!t||t==="_self")&&!Ete(e)}var ub=null;function Ote(){if(ub===null)try{new FormData(document.createElement("form"),0),ub=!1}catch{ub=!0}return ub}var Mte=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cN(e){return e!=null&&!Mte.has(e)?(eu(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jb}"`),null):e}function Lte(e,t){let r,a,s,i,o;if(kte(e)){let l=e.getAttribute("action");a=l?Zu(l,t):null,r=e.getAttribute("method")||Xb,s=cN(e.getAttribute("enctype"))||Jb,i=new FormData(e)}
636else if(Ate(e)||Pte(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(a=c?Zu(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Xb,s=cN(e.getAttribute("formenctype"))||cN(l.getAttribute("enctype"))||Jb,i=new FormData(l,e),!Ote()){let{name:d,type:h,value:u}=e;if(h==="image"){let f=d?`${d}.`:"";i.append(`${f}x`,"0"),i.append(`${f}y`,"0")}else d&&i.append(d,u)}}else{if(Xw(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xb,a=null,s=Jb,o=e}return i&&s==="text/plain"&&(o=i,i=void 0),{action:a,method:r.toLowerCase(),encType:s,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function w3(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Rte(e,t,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname=`_root.${r}`:t&&Zu(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function Ite(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Dte(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Fte(e,t,r){let a=await Promise.all(e.map(async s=>{let i=t.routes[s.route.id];if(i){let o=await Ite(i,r);return o.links?o.links():[]}return[]}));return Ute(a.flat(1).filter(Dte).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function HT(e,t,r,a,s,i){let o=(c,d)=>r[d]?c.route.id!==r[d].route.id:!0,l=(c,d)=>{var h;return r[d].pathname!==c.pathname||((h=r[d].route.path)==null?void 0:h.endsWith("*"))&&r[d].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,d)=>o(c,d)||l(c,d)):i==="data"?t.filter((c,d)=>{var u;let h=a.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(o(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((u=r[0])==null?void 0:u.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function qte(e,t,{includeHydrateFallback:r}={}){return Bte(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let i=[s.module];return s.clientActionModule&&(i=i.concat(s.clientActionModule)),s.clientLoaderModule&&(i=i.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(i=i.concat(s.hydrateFallbackModule)),s.imports&&(i=i.concat(s.imports)),i}).flat(1))}function Bte(e){return[...new Set(e)]}function $te(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Ute(e,t){let r=new Set;return new Set(t),e.reduce((a,s)=>{let i=JSON.stringify($te(s));return r.has(i)||(r.add(i),a.push({key:i,link:s})),a},[])}function PB(){let e=L.useContext(fx);return w3(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zte(){let e=L.useContext(Qw);return w3(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var j3=L.createContext(void 0);j3.displayName="FrameworkContext";function EB(){let e=L.useContext(j3);return w3(e,"You must render this element inside a <HydratedRouter> element"),e}function Vte(e,t){let r=L.useContext(j3),[a,s]=L.useState(!1),[i,o]=L.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:h,onTouchStart:u}=t,f=L.useRef(null);L.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let g=x=>{x.forEach(w=>{o(w.isIntersecting)})},y=new IntersectionObserver(g,{threshold:.5});return f.current&&y.observe(f.current),()=>{y.disconnect()}}},[e]),L.useEffect(()=>{if(a){let g=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(g)}}},[a]);let m=()=>{s(!0)},b=()=>{s(!1),o(!1)};return r?e!=="intent"?[i,f,{}]:[i,f,{onFocus:Yx(l,m),onBlur:Yx(c,b),onMouseEnter:Yx(d,m),onMouseLeave:Yx(h,b),onTouchStart:Yx(u,m)}]:[!1,f,{}]}function Yx(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Hte({page:e,...t}){let{router:r}=PB(),a=L.useMemo(()=>yB(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?L.createElement(Kte,{page:e,matches:a,...t}):null}function Wte(e){let{manifest:t,routeModules:r}=EB(),[a,s]=L.useState([]);return L.useEffect(()=>{let i=!1;return Fte(e,t,r).then(o=>{i||s(o)}),()=>{i=!0}},[e,t,r]),a}function Kte({page:e,matches:t,...r}){let a=Rl(),{manifest:s,routeModules:i}=EB(),{basename:o}=PB(),{loaderData:l,matches:c}=zte(),d=L.useMemo(()=>HT(e,t,c,s,a,"data"),[e,t,c,s,a]),h=L.useMemo(()=>HT(e,t,c,s,a,"assets"),[e,t,c,s,a]),u=L.useMemo(()=>
636{if(e===a.pathname+a.search+a.hash)return[];let b=new Set,g=!1;if(t.forEach(x=>{var j;let w=s.routes[x.route.id];!w||!w.hasLoader||(!d.some(N=>N.route.id===x.route.id)&&x.route.id in l&&((j=i[x.route.id])!=null&&j.shouldRevalidate)||w.hasClientLoader?g=!0:b.add(x.route.id))}),b.size===0)return[];let y=Rte(e,o,"data");return g&&b.size>0&&y.searchParams.set("_routes",t.filter(x=>b.has(x.route.id)).map(x=>x.route.id).join(",")),[y.pathname+y.search]},[o,l,a,s,d,t,e,i]),f=L.useMemo(()=>qte(h,s),[h,s]),m=Wte(h);return L.createElement(L.Fragment,null,u.map(b=>L.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),f.map(b=>L.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),m.map(({key:b,link:g})=>L.createElement("link",{key:b,nonce:r.nonce,...g})))}function Gte(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var TB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{TB&&(window.__reactRouterVersion="7.9.1")}catch{}function Yte({basename:e,children:t,window:r}){let a=L.useRef();a.current==null&&(a.current=Dee({window:r,v5Compat:!0}));let s=a.current,[i,o]=L.useState({action:s.action,location:s.location}),l=L.useCallback(c=>{L.startTransition(()=>o(c))},[o]);return L.useLayoutEffect(()=>s.listen(l),[s,l]),L.createElement(Ste,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s})}var OB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rt=L.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:s,reloadDocument:i,replace:o,state:l,target:c,to:d,preventScrollReset:h,viewTransition:u,...f},m){let{basename:b}=L.useContext(iu),g=typeof d=="string"&&OB.test(d),y,x=!1;if(typeof d=="string"&&g&&(y=d,TB))try{let R=new URL(window.location.href),M=d.startsWith("//")?new URL(R.protocol+d):new URL(d),k=Zu(M.pathname,b);M.origin===R.origin&&k!=null?d=k+M.search+M.hash:x=!0}catch{eu(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=dte(d,{relative:s}),[j,N,_]=Vte(a,f),S=Zte(d,{replace:o,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:u});function A(R){t&&t(R),R.defaultPrevented||S(R)}let T=L.createElement("a",{...f,..._,href:y||w,onClick:x||i?t:A,ref:Gte(m,N),target:c,"data-discover":!g&&r==="render"?"true":void 0});return j&&!g?L.createElement(L.Fragment,null,T,L.createElement(Hte,{page:w})):T});Rt.displayName="Link";var Qte=L.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:s=!1,style:i,to:o,viewTransition:l,children:c,...d},h){let u=J0(o,{relative:d.relative}),f=Rl(),m=L.useContext(Qw),{navigator:b,basename:g}=L.useContext(iu),y=m!=null&&ane(u)&&l===!0,x=b.encodeLocation?b.encodeLocation(u).pathname:u.pathname,w=f.pathname,j=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;r||(w=w.toLowerCase(),j=j?j.toLowerCase():null,x=x.toLowerCase()),j&&g&&(j=Zu(j,g)||j);const N=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let _=w===x||!s&&w.startsWith(x)&&w.charAt(N)==="/",S=j!=null&&(j===x||!s&&j.startsWith(x)&&j.charAt(x.length)==="/"),A={isActive:_,isPending:S,isTransitioning:y},T=_?t:void 0,R;typeof a=="function"?R=a(A):R=[a,_?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(A):i;return L.createElement(Rt,{...d,"aria-current":T,className:R,ref:h,style:M,to:o,viewTransition:l},typeof c=="function"?c(A):c)});Qte.displayName="NavLink";var Xte=L.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:s,state:i,method:o=Xb,action:l,onSubmit:c,relative:d,preventScrollReset:h,viewTransition:u,...f},m)=>{let b=nne(),g=rne(l,{relative:d}),y=o.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&OB.test(l),w=j=>{if(c&&c(j),j.defaultPrevented)return;j.preventDefault();let N=j.nativeEvent.submitter,_=(N==null?void 0:N.getAttribute("formmethod"))||o;b(N||j.currentTarget,{fetcherKey:t,method:_,navigate:r,replace:s,state:i,relative:d,preventScrollReset:h,viewTransition:u})};return L.createElement("form",{ref:m,method:y,action:g,onSubmit:a?c:w,...f,"data-discover":!x&&e==="render"?"true":void 0})});Xte.displayName="Form";function Jte(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function MB(e){let t=L.useContext(fx);return Va(t,Jte(e)),t}function Zte(e,{target:t,replace:r,state:a,preventScrollReset:s,relative:i,viewTransition:o}={}){let l=y3(),c=Rl(),d=J0(e,{relative:i});return L.useCallback(h=>{if(Tte(h,t)){h.preventDefault();let u=r!==void 0?r:Jy(c)===Jy(d);l(e,{replace:u,state:a,preventScrollReset:s,relative:i,viewTransition:o})}},[c,l,d,r,a,t,e,s,i,o])}var ene=0,tne=()=>`__${String(++ene)}__`;function nne(){let{router:e}=MB("useSubmit"),{basename:t}=L.useContext(iu),r=wte();return L.useCallback(async(a,s={})=>{let{action:i,method:o,encType:l,formData:c,body:d}=Lte(a,t);if(s.navigate===!1){let h=s.fetcherKey||tne();await e.fetch(h,r,s.action||i,{preventScrollReset:s.preventScrollReset,formData:c,body:d,formMethod:s.method||o,formEncType:s.encType||l,flushSync:s.flushSync})}else await e.navigate(s.action||i,{preventScrollReset:s.preventScrollReset,formData:c,body:d,formMethod:s.method||o,formEncType:s.encType||l,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[e,t,r])}function rne(e,{relative:t}={}){let{basename:r}=L.useContext(iu),a=L.useContext(ih);Va(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),i={...J0(e||".",{relative:t})},o=Rl();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(u=>u).forEach(u=>l.append("index",u));let h=l.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:Bu([r,i.pathname])),Jy(i)}function ane(e,{relative:t}={}){let r=L.useContext(_B);Va(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=MB("useViewTransitionState"),s=J0(e,{relative:t});if(!r.isTransitioning)return!1;let i=Zu(r.currentLocation.pathname,a)||r.currentLocation.pathname,o=Zu(r.nextLocation.pathname,a)||r.nextLocation.pathname;return w1(s.pathname,o)!=null||w1(s.pathname,i)!=null}var Z0=i3();const LB=Lr(Z0);function RB(e,t){return function(){return e.apply(t,arguments)}}const{toString:sne}=Object.prototype,{getPrototypeOf:Ag}=Object,{iterator:ev,toStringTag:IB}=Symbol,j1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Zy=(e,t)=>{let r=e;const a=[];for(;r!=null&&r!==Object.prototype;){if(a.indexOf(r)!==-1)return!1;if(a.push(r),j1(r,t))return!0;r=Ag(r)}return!1},ine=(e,t)=>e!=null&&Zy(e,t)?e[t]:void 0,N3=(e=>t=>{const r=sne.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),cd=e=>(e=e.toLowerCase(),t=>N3(t)===e),Jw=e=>t=>typeof t===e,{isArray:Rm}=Array,kg=Jw("undefined");function mx(e){return e!==null&&!kg(e)&&e.constructor!==null&&!kg(e.constructor)&&al(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const DB=cd("ArrayBuffer");function one(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&DB(e.buffer),t}
vendor: 18,186 bytes, lines 636-638
636const lne=Jw("string"),al=Jw("function"),FB=Jw("number"),px=e=>e!==null&&typeof e=="object",cne=e=>e===!0||e===!1,Zb=e=>{if(!px(e))return!1;const t=Ag(e);return(t===null||t===Object.prototype||Ag(t)===null)&&!Zy(e,IB)&&!Zy(e,ev)},dne=e=>{if(!px(e)||mx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},une=cd("Date"),hne=cd("File"),fne=e=>!!(e&&typeof e.uri<"u"),mne=e=>e&&typeof e.getParts<"u",pne=cd("Blob"),gne=cd("FileList"),xne=e=>px(e)&&al(e.pipe);function yne(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const WT=yne(),KT=typeof WT.FormData<"u"?WT.FormData:void 0,vne=e=>{if(!e)return!1;if(KT&&e instanceof KT)return!0;const t=Ag(e);if(!t||t===Object.prototype||!al(e.append))return!1;const r=N3(e);return r==="formdata"||r==="object"&&al(e.toString)&&e.toString()==="[object FormData]"},bne=cd("URLSearchParams"),[wne,jne,Nne,_ne]=["ReadableStream","Request","Response","Headers"].map(cd),Sne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tv(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let a,s;if(typeof e!="object"&&(e=[e]),Rm(e))for(a=0,s=e.length;a<s;a++)t.call(null,e[a],a,e);else{if(mx(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(a=0;a<o;a++)l=i[a],t.call(null,e[l],l,e)}}function qB(e,t){if(mx(e))return null;t=t.toLowerCase();const r=Object.keys(e);let a=r.length,s;for(;a-- >0;)if(s=r[a],t===s.toLowerCase())return s;return null}const rm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,BB=e=>!kg(e)&&e!==rm;function $C(...e){const{caseless:t,skipUndefined:r}=BB(this)&&this||{},a={},s=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&qB(a,o)||o,c=j1(a,l)?a[l]:void 0;Zb(c)&&Zb(i)?a[l]=$C(c,i):Zb(i)?a[l]=$C({},i):Rm(i)?a[l]=i.slice():(!r||!kg(i))&&(a[l]=i)};for(let i=0,o=e.length;i<o;i++){const l=e[i];if(!l||mx(l)||(tv(l,s),typeof l!="object"||Rm(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let d=0;d<c.length;d++){const h=c[d];Dne.call(l,h)&&s(l[h],h)}}return a}const Cne=(e,t,r,{allOwnKeys:a}={})=>(tv(t,(s,i)=>{r&&al(s)?Object.defineProperty(e,i,{__proto__:null,value:RB(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:a}),e),Ane=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kne=(e,t,r,a)=>{e.prototype=Object.create(t.prototype,a),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Pne=(e,t,r,a)=>{let s,i,o;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!a||a(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&Ag(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Ene=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const a=e.indexOf(t,r);return a!==-1&&a===r},Tne=e=>{if(!e)return null;if(Rm(e))return e;let t=e.length;if(!FB(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},One=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ag(Uint8Array)),Mne=(e,t)=>{const a=(e&&e[ev]).call(e);let s;for(;(s=a.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Lne=(e,t)=>{let r;const a=[];for(;(r=e.exec(t))!==null;)a.push(r);return a},Rne=cd("HTMLFormElement"),Ine=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,s){return a.toUpperCase()+s}),{propertyIsEnumerable:Dne}=Object.prototype,Fne=cd("RegExp"),$B=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),a={};tv(r,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(a[i]=o||s)}),Object.defineProperties(e,a)},qne=e=>{$B(e,(t,r)=>{if(al(e)&&["arguments","caller","callee"].includes(r))return!1;const a=e[r];if(al(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Bne=(e,t)=>{const r={},a=s=>{s.forEach(i=>{r[i]=!0})};return Rm(e)?a(e):a(String(e).split(t)),r},$ne=()=>{},Une=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function zne(e){return!!(e&&al(e.append)&&e[IB]==="FormData"&&e[ev])}const Vne=e=>{const t=new WeakSet,r=a=>{if(px(a)){if(t.has(a))return;if(mx(a))return a;if(!("toJSON"in a)){t.add(a);const s=Rm(a)?[]:{};return tv(a,(i,o)=>{const l=r(i);!kg(l)&&(s[o]=l)}),t.delete(a),s}}return a};return r(e)},Hne=cd("AsyncFunction"),Wne=e=>e&&(px(e)||al(e))&&al(e.then)&&al(e.catch),UB=((e,t)=>e?setImmediate:t?((r,a)=>(rm.addEventListener("message",({source:s,data:i})=>{s===rm&&i===r&&a.length&&a.shift()()},!1),s=>{a.push(s),rm.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",al(rm.postMessage)),Kne=typeof queueMicrotask<"u"?queueMicrotask.bind(rm):typeof process<"u"&&process.nextTick||UB,zB=e=>e!=null&&al(e[ev]),Gne=e=>e!=null&&Zy(e,ev)&&zB(e),Ge={isArray:Rm,isArrayBuffer:DB,isBuffer:mx,isFormData:vne,isArrayBufferView:one,isString:lne,isNumber:FB,isBoolean:cne,isObject:px,isPlainObject:Zb,isEmptyObject:dne,isReadableStream:wne,isRequest:jne,isResponse:Nne,isHeaders:_ne,isUndefined:kg,isDate:une,isFile:hne,isReactNativeBlob:fne,isReactNative:mne,isBlob:pne,isRegExp:Fne,isFunction:al,isStream:xne,isURLSearchParams:bne,isTypedArray:One,isFileList:gne,forEach:tv,merge:$C,extend:Cne,trim:Sne,stripBOM:Ane,inherits:kne,toFlatObject:Pne,kindOf:N3,kindOfTest:cd,endsWith:Ene,toArray:Tne,forEachEntry:Mne,matchAll:Lne,isHTMLForm:Rne,hasOwnProperty:j1,hasOwnProp:j1,hasOwnInPrototypeChain:Zy,getSafeProp:ine,reduceDescriptors:$B,freezeMethods:qne,toObjectSet:Bne,toCamelCase:Ine,noop:$ne,toFiniteNumber:Une,findKey:qB,global:rm,isContextDefined:BB,isSpecCompliantForm:zne,toJSONObject:Vne,isAsyncFn:Hne,isThenable:Wne,setImmediate:UB,asap:Kne,isIterable:zB,isSafeIterable:Gne},Yne=Ge.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"]),Qne=e=>{const t={};let r,a,s;return e&&e.split(`
637`).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),a=o.substring(s+1).trim(),!(!r||t[r]&&Yne[r])&&(r==="set-cookie"?t[r]?t[r].push(a):t[r]=[a]:t[r]=t[r]?t[r]+", "+a:a)}),t};function Xne(e){let t=0,r=e.length;for(;t<r;){const a=e.charCodeAt(t);if(a!==9&&a!==32)break;t+=1}for(;r>t;){const a=e.charCodeAt(r-1);if(a!==9&&a!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const Jne=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Zne=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _3(e,t){return Ge.isArray(e)?e.map(r=>_3(r,t)):Xne(String(e).replace(t,""))}const ere=e=>_3(e,Jne),tre=e=>_3(e,Zne);function VB(e){const t=Object.create(null);return Ge.forEach(e.toJSON(),(r,a)=>{t[a]=tre(r)}),t}const GT=Symbol("internals");function Qx(e){return e&&String(e).trim().toLowerCase()}function e1(e){return e===!1||e==null?e:Ge.isArray(e)?e.map(e1):ere(String(e))}function nre(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=r.exec(e);)t[a[1]]=a[2];return t}const rre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dN(e,t,r,a,s){if(Ge.isFunction(a))return a.call(this,t,r);if(s&&(t=r),!!Ge.isString(t)){if(Ge.isString(a))return t.indexOf(a)!==-1;if(Ge.isRegExp(a))return a.test(t)}}function are(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,a)=>r.toUpperCase()+a)}function sre(e,t){const r=Ge.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+r,{__proto__:null,value:function(s,i,o){return this[a].call(this,t,s,i,o)},configurable:!0})})}let no=class{constructor(t){t&&this.set(t)}set(t,r,a){const s=this;function i(l,c,d){const h=Qx(c);if(!h)return;const u=Ge.findKey(s,h);(!u||s[u]===void 0||d===!0||d===void 0&&s[u]!==!1)&&(s[u||c]=e1(l))}const o=(l,c)=>Ge.forEach(l,(d,h)=>i(d,h,c));if(Ge.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(Ge.isString(t)&&(t=t.trim())&&!rre(t))o(Qne(t),r);else if(Ge.isObject(t)&&Ge.isSafeIterable(t)){let l=Object.create(null),c,d;for(const h of t){if(!Ge.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],Ge.hasOwnProp(l,d)?(c=l[d],l[d]=Ge.isArray(c)?[...c,h[1]]:[c,h[1]]):l[d]=h[1]}o(l,r)}else t!=null&&i(r,t,a);return this}get(t,r){if(t=Qx(t),t){const a=Ge.findKey(this,t);if(a){const s=this[a];if(!r)return s;if(r===!0)return nre(s);if(Ge.isFunction(r))return r.call(this,s,a);if(Ge.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Qx(t),t){const a=Ge.findKey(this,t);return!!(a&&this[a]!==void 0&&(!r||dN(this,this[a],a,r)))}return!1}delete(t,r){const a=this;let s=!1;function i(o){if(o=Qx(o),o){const l=Ge.findKey(a,o);l&&(!r||dN(a,a[l],l,r))&&(delete a[l],s=!0)}}return Ge.isArray(t)?t.forEach(i):i(t),s}clear(t){const r=Object.keys(this);let a=r.length,s=!1;for(;a--;){const i=r[a];(!t||dN(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const r=this,a={};return Ge.forEach(this,(s,i)=>{const o=Ge.findKey(a,i);if(o){r[o]=e1(s),delete r[i];return}const l=t?are(i):String(i).trim();l!==i&&delete r[i],r[l]=e1(s),a[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Ge.forEach(this,(a,s)=>{a!=null&&a!==!1&&(r[s]=t&&Ge.isArray(a)?a.join(", "):a)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
638`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const a=new this(t);return r.forEach(s=>a.set(s)),a}static accessor(t){const a=(this[GT]=this[GT]={accessors:{}}).accessors,s=this.prototype;function i(o){const l=Qx(o);a[l]||(sre(s,o),a[l]=!0)}return Ge.isArray(t)?t.forEach(i):i(t),this}};no.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(no.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[r]=a}}});Ge.freezeMethods(no);const ire="[REDACTED ****]";function ore(e){if(Ge.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Ge.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function lre(e,t){const r=new Set(t.map(i=>String(i).toLowerCase())),a=[],s=i=>{if(i===null||typeof i!="object"||Ge.isBuffer(i))return i;if(a.indexOf(i)!==-1)return;i instanceof no&&(i=i.toJSON()),a.push(i);let o;if(Ge.isArray(i))o=[],i.forEach((l,c)=>{const d=s(l);Ge.isUndefined(d)||(o[c]=d)});else{if(!Ge.isPlainObject(i)&&ore(i))return a.pop(),i;o=Object.create(null);for(const[l,c]of Object.entries(i)){const d=r.has(l.toLowerCase())?ire:s(c);Ge.isUndefined(d)||(o[l]=d)}}return a.pop(),o};return s(e)}let Bt=class HB extends Error{static from(t,r,a,s,i,o){const l=new HB(t.message,r||t.code,a,s,i);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),o&&Object.assign(l,o),l}constructor(t,r,a,s,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),a&&(this.config=a),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,r=t&&Ge.hasOwnProp(t,"redact")?t.redact:void 0,a=Ge.isArray(r)&&r.length>0?lre(t,r):Ge.toJSONObject(t);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:a,code:this.code,status:this.status}}};Bt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Bt.ERR_BAD_OPTION="ERR_BAD_OPTION";Bt.ECONNABORTED="ECONNABORTED";Bt.ETIMEDOUT="ETIMEDOUT";Bt.ECONNREFUSED="ECONNREFUSED";Bt.ERR_NETWORK="ERR_NETWORK";Bt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Bt.ERR_DEPRECATED="ERR_DEPRECATED";Bt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Bt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Bt.ERR_CANCELED="ERR_CANCELED";Bt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Bt.ERR_INVALID_URL="ERR_INVALID_URL";Bt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const cre=null,WB=100;function UC(e){return Ge.isPlainObject(e)||Ge.isArray(e)}function KB(e){return Ge.endsWith(e,"[]")?e.slice(0,-2):e}function uN(e,t,r){return e?e.concat(t).map(function(s,i){return s=KB(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function dre(e){return Ge.isArray(e)&&!e.some(UC)}const ure=Ge.toFlatObject(Ge,{},null,function(t){return/^is[A-Z]/.test(t)});function Zw(e,t,r){if(!Ge.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Ge.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,j){return!Ge.isUndefined(j[w])});const a=r.metaTokens,s=r.visitor||b,i=r.dots,o=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,c=r.maxDepth===void 0?WB:r.maxDepth,d=l&&Ge.isSpecCompliantForm(t),h=[];if(!Ge.isFunction(s))throw new TypeError("visitor must be a function");function u(x){if(x===null)return"";if(Ge.isDate(x))return x.toISOString();if(Ge.isBoolean(x))return x.toString();if(!d&&Ge.isBlob(x))throw new Bt("Blob is not supported. Use a Buffer instead.");if(Ge.isArrayBuffer(x)||Ge.isTypedArray(x)){if(d&&typeof l=="function")return new l([x]);if(typeof Buffer<"u")return Buffer.from(x);throw new Bt("Blob is not supported. Use a Buffer instead.",Bt.ERR_NOT_SUPPORT)}return x}function f(x){if(x>c)throw new Bt("Object is too deeply nested ("+x+" levels). Max depth: "+c,Bt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(x,w){if(c===1/0)return JSON.stringify(x);const j=[];return JSON.stringify(x,function(_,S){if(!Ge.isObject(S))return S;for(;j.length&&j[j.length-1]!==this;)j.pop();return j.push(S),f(w+j.length-1),S})}function b(x,w,j){let N=x;if(Ge.isReactNative(t)&&Ge.isReactNativeBlob(x))return t.append(uN(j,w,i),u(x)),!1;if(x&&!j&&typeof x=="object"){if(Ge.endsWith(w,"{}"))w=a?w:w.slice(0,-2),x=m(x,1);else if(Ge.isArray(x)&&dre(x)||(Ge.isFileList(x)||Ge.endsWith(w,"[]"))&&(N=Ge.toArray(x)))return w=KB(w),N.forEach(function(S,A){!(Ge.isUndefined(S)||S===null)&&t.append(o===!0?uN([w],A,i):o===null?w:w+"[]",u(S))}),!1}return UC(x)?!0:(t.append(uN(j,w,i),u(x)),!1)}const g=Object.assign(ure,{defaultVisitor:b,convertValue:u,isVisitable:UC});function y(x,w,j=0){if(!Ge.isUndefined(x)){if(f(j),h.indexOf(x)!==-1)throw new Error("Circular reference detected in "+w.join("."));h.push(x),Ge.forEach(x,function(_,S){(!(Ge.isUndefined(_)||_===null)&&s.call(t,_,Ge.isString(S)?S.trim():S,w,g))===!0&&y(_,w?w.concat(S):[S],j+1)}),h.pop()}}if(!Ge.isObject(e))throw new TypeError("data must be an object");return y(e),t}function YT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(a){return t[a]})}function S3(e,t){this._pairs=[],e&&Zw(e,this,t)}const GB=S3.prototype;GB.append=function(t,r){this._pairs.push([t,r])};GB.toString=function(t){const r=t?a=>t.call(this,a,YT):YT;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function hre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function YB(e,t,r){if(!t)return e;e=e||"";const a=Ge.isFunction(r)?{serialize:r}:r,s=Ge.getSafeProp(a,"encode")||hre,i=Ge.getSafeProp(a,"serialize");let o;if(i?o=i(t,a):o=Ge.isURLSearchParams(t)?t.toString():new S3(t,a).toString(s),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class QT{constructor(){this.handlers=[]}use(t,r,a){return this.handlers.push({fulfilled:t,rejected:r,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ge.forEach(this.handlers,function(a){a!==null&&t(a)})}}const C3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fre=typeof URLSearchParams<"u"?URLSearchParams:S3,mre=typeof FormData<"u"?FormData:null,pre=typeof Blob<"u"?Blob:null,gre={isBrowser:!0,classes:{URLSearchParams:fre,FormData:mre,Blob:pre},protocols:["http","https","file","blob","url","data"]},A3=typeof window<"u"&&typeof document<"u",zC=typeof navigator=="object"&&navigator||void 0,xre=A3&&(!zC||["ReactNative","NativeScript","NS"].indexOf(zC.product)<0),yre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vre=A3&&window.location.href||"http://localhost",bre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:A3,hasStandardBrowserEnv:xre,hasStandardBrowserWebWorkerEnv:yre,navigator:zC,origin:vre},Symbol.toStringTag,{value:"Module"})),Pi={...bre,...gre};function wre(e,t){return Zw(e,new Pi.classes.URLSearchParams,{visitor:function(r,a,s,i){return Pi.isNode&&Ge.isBuffer(r)?(this.append(a,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const XT=WB;function QB(e){if(e>XT)throw new Bt("FormData field is too deeply nested ("+e+" levels). Max depth: "+XT,Bt.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jre(e){const t=[],r=/\w+|\[(\w*)]/g;let a;for(;(a=r.exec(e))!==null;)QB(t.length),t.push(a[0]==="[]"?"":a[1]||a[0]);return t}function Nre(e){const t={},r=Object.keys(e);let a;const s=r.length;let i;for(a=0;a<s;a++)i=r[a],t[i]=e[i];return t}function XB(e){function t(r,a,s,i){QB(i);let o=r[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=i>=r.length;return o=!o&&Ge.isArray(s)?s.length:o,c?(Ge.hasOwnProp(s,o)?s[o]=Ge.isArray(s[o])?s[o].concat(a):[s[o],a]:s[o]=a,!l):((!Ge.hasOwnProp(s,o)||!Ge.isObject(s[o]))&&
vendor: 12,273 bytes, line 638
638(s[o]=[]),t(r,a,s[o],i)&&Ge.isArray(s[o])&&(s[o]=Nre(s[o])),!l)}if(Ge.isFormData(e)&&Ge.isFunction(e.entries)){const r={};return Ge.forEachEntry(e,(a,s)=>{t(jre(a),s,r,0)}),r}return null}const Sp=(e,t)=>e!=null&&Ge.hasOwnProp(e,t)?e[t]:void 0;function _re(e,t,r){if(Ge.isString(e))try{return(t||JSON.parse)(e),Ge.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(r||JSON.stringify)(e)}const nv={transitional:C3,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const a=r.getContentType()||"",s=a.indexOf("application/json")>-1,i=Ge.isObject(t);if(i&&Ge.isHTMLForm(t)&&(t=new FormData(t)),Ge.isFormData(t))return s?JSON.stringify(XB(t)):t;if(Ge.isArrayBuffer(t)||Ge.isBuffer(t)||Ge.isStream(t)||Ge.isFile(t)||Ge.isBlob(t)||Ge.isReadableStream(t))return t;if(Ge.isArrayBufferView(t))return t.buffer;if(Ge.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){const c=Sp(this,"formSerializer");if(a.indexOf("application/x-www-form-urlencoded")>-1)return wre(t,c).toString();if((l=Ge.isFileList(t))||a.indexOf("multipart/form-data")>-1){const d=Sp(this,"env"),h=d&&d.FormData;return Zw(l?{"files[]":t}:t,h&&new h,c)}}return i||s?(r.setContentType("application/json",!1),_re(t)):t}],transformResponse:[function(t){const r=Sp(this,"transitional")||nv.transitional,a=r&&r.forcedJSONParsing,s=Sp(this,"responseType"),i=s==="json";if(Ge.isResponse(t)||Ge.isReadableStream(t))return t;if(t&&Ge.isString(t)&&(a&&!s||i)){const l=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,Sp(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?Bt.from(c,Bt.ERR_BAD_RESPONSE,this,null,Sp(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pi.classes.FormData,Blob:Pi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ge.forEach(["delete","get","head","post","put","patch","query"],e=>{nv.headers[e]={}});function hN(e,t){const r=this||nv,a=t||r,s=no.from(a.headers);let i=a.data;return Ge.forEach(e,function(l){i=l.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function JB(e){return!!(e&&e.__CANCEL__)}let rv=class extends Bt{constructor(t,r,a){super(t??"canceled",Bt.ERR_CANCELED,r,a),this.name="CanceledError",this.__CANCEL__=!0}};function ZB(e,t,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?e(r):t(new Bt("Request failed with status code "+r.status,r.status>=400&&r.status<500?Bt.ERR_BAD_REQUEST:Bt.ERR_BAD_RESPONSE,r.config,r.request,r))}function Sre(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Cre(e,t){e=e||10;const r=new Array(e),a=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),h=a[i];o||(o=d),r[s]=c,a[s]=d;let u=i,f=0;for(;u!==s;)f+=r[u++],u=u%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-o<t)return;const m=h&&d-h;return m?Math.round(f*1e3/m):void 0}}function Are(e,t){let r=0,a=1e3/t,s,i;const o=(d,h=Date.now())=>{r=h,s=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const h=Date.now(),u=h-r;u>=a?o(d,h):(s=d,i||(i=setTimeout(()=>{i=null,o(s)},a-u)))},()=>s&&o(s)]}const N1=(e,t,r=3)=>{let a=0;const s=Cre(50,250);return Are(i=>{if(!i||typeof i.loaded!="number")return;const o=i.loaded,l=i.lengthComputable?i.total:void 0,c=l!=null?Math.min(o,l):o,d=Math.max(0,c-a),h=s(d);a=Math.max(a,c);const u={loaded:c,total:l,progress:l?c/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l?(l-c)/h:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(u)},r)},JT=(e,t)=>{const r=e!=null;return[a=>t[0]({lengthComputable:r,total:e,loaded:a}),t[1]]},ZT=e=>(...t)=>Ge.asap(()=>e(...t)),kre=Pi.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Pi.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Pi.origin),Pi.navigator&&/(msie|trident)/i.test(Pi.navigator.userAgent)):()=>!0,Pre=Pi.hasStandardBrowserEnv?{write(e,t,r,a,s,i,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];Ge.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),Ge.isString(a)&&l.push(`path=${a}`),Ge.isString(s)&&l.push(`domain=${s}`),i===!0&&l.push("secure"),Ge.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const a=t[r].replace(/^\s+/,""),s=a.indexOf("=");if(s!==-1&&a.slice(0,s)===e)try{return decodeURIComponent(a.slice(s+1))}catch{return a.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ere(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tre(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Ore=/^https?:(?!\/\/)/i,Mre=/[\t\n\r]/g;function Lre(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Rre(e){return Lre(e).replace(Mre,"")}function eO(e,t){if(typeof e=="string"&&Ore.test(Rre(e)))throw new Bt('Invalid URL: missing "//" after protocol',Bt.ERR_INVALID_URL,t)}function e$(e,t,r,a){eO(t,a);let s=!Ere(t);return e&&(s||r===!1)?(eO(e,a),Tre(e,t)):t}const tO=e=>e instanceof no?{...e}:e;function Im(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function a(h,u,f,m){return Ge.isPlainObject(h)&&Ge.isPlainObject(u)?Ge.merge.call({caseless:m},h,u):Ge.isPlainObject(u)?Ge.merge({},u):Ge.isArray(u)?u.slice():u}function s(h,u,f,m){if(Ge.isUndefined(u)){if(!Ge.isUndefined(h))return a(void 0,h,f,m)}else return a(h,u,f,m)}function i(h,u){if(!Ge.isUndefined(u))return a(void 0,u)}function o(h,u){if(Ge.isUndefined(u)){if(!Ge.isUndefined(h))return a(void 0,h)}else return a(void 0,u)}function l(h){const u=Ge.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Ge.isUndefined(u))if(Ge.isPlainObject(u)){if(Ge.hasOwnProp(u,h))return u[h]}else return;const f=Ge.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Ge.isPlainObject(f)&&Ge.hasOwnProp(f,h))return f[h]}function c(h,u,f){if(Ge.hasOwnProp(t,f))return a(h,u);if(Ge.hasOwnProp(e,f))return a(void 0,h)}const d={url:i,method:i,data:i,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,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(h,u,f)=>s(tO(h),tO(u),f,!0)};return Ge.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const f=Ge.hasOwnProp(d,u)?d[u]:s,m=Ge.hasOwnProp(e,u)?e[u]:void 0,b=Ge.hasOwnProp(t,u)?t[u]:void 0,g=f(m,b,u);Ge.isUndefined(g)&&f!==c||(r[u]=g)}),Ge.hasOwnProp(t,"validateStatus")&&Ge.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Ge.hasOwnProp(e,"validateStatus")?r.validateStatus=a(void 0,e.validateStatus):delete r.validateStatus),r}const Ire=["content-type","content-length"];function Dre(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([a,s])=>{Ire.includes(a.toLowerCase())&&e.set(a,s)})}const Fre=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function t$(e){const t=Im({},e),r=f=>Ge.hasOwnProp(t,f)?t[f]:void 0,a=r("data");let s=r("withXSRFToken");const i=r("xsrfHeaderName"),o=r("xsrfCookieName");let l=r("headers");const c=r("auth"),d=r("baseURL"),h=r("allowAbsoluteUrls"),u=r("url");if(t.headers=l=no.from(l),t.url=YB(e$(d,u,h,t),r("params"),r("paramsSerializer")),c){const f=Ge.getSafeProp(c,"username")||"",m=Ge.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(f+":"+(m?Fre(m):"")))}catch(b){throw Bt.from(b,Bt.ERR_BAD_OPTION_VALUE,e)}}if(Ge.isFormData(a)&&(Pi.hasStandardBrowserEnv||Pi.hasStandardBrowserWebWorkerEnv||Ge.isReactNative(a)?l.setContentType(void 0):Ge.isFunction(a.getHeaders)&&Dre(l,a.getHeaders(),r("formDataHeaderPolicy"))),Pi.hasStandardBrowserEnv&&(Ge.isFunction(s)&&(s=s(t)),s===!0||s==null&&kre(t.url))){const m=i&&o&&Pre.read(o);m&&l.set(i,m)}return t}const qre=typeof XMLHttpRequest<"u",Bre=qre&&function(e){return new Promise(function(r,a){const s=t$(e);let i=s.data;const o=no.from(s.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=s,h,u,f,m,b;function g(){m&&m(),b&&b(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function x(){if(!y)return;const j=no.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:j,config:e,request:y};ZB(function(A){r(A),g()},function(A){a(A),g()},_),y=null}"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(x)},y.onabort=function(){y&&(a(new Bt("Request aborted",Bt.ECONNABORTED,e,y)),g(),y=null)},y.onerror=function(N){const _=N&&N.message?N.message:"Network Error",S=new Bt(_,Bt.ERR_NETWORK,e,y);S.event=N||null,a(S),g(),y=null},y.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||C3;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),a(new Bt(N,_.clarifyTimeoutError?Bt.ETIMEDOUT:Bt.ECONNABORTED,e,y)),g(),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&Ge.forEach(VB(o),function(N,_){y.setRequestHeader(_,N)}),Ge.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),l&&l!=="json"&&(y.responseType=s.responseType),d&&([f,b]=N1(d,!0),y.addEventListener("progress",f)),c&&y.upload&&([u,m]=N1(c),y.upload.addEventListener("progress",u),y.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(h=j=>{y&&(a(!j||j.type?new rv(null,e,y):j),y.abort(),g(),y=null)},s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));const w=Sre(s.url);if(w&&!Pi.protocols.includes(w)){a(new Bt("Unsupported protocol "+w+":",Bt.ERR_BAD_REQUEST,e)),g();return}y.send(i||null)})},$re=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let a=!1;const s=function(c){if(!a){a=!0,o();const d=c instanceof Error?c:this.reason;r.abort(d instanceof Bt?d:new rv(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new Bt(`timeout of ${t}ms exceeded`,Bt.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s,{once:!0}));const{signal:l}=r;return l.unsubscribe=()=>Ge.asap(o),l},Ure=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let a=0,s;for(;a<r;)s=a+t,yield e.slice(a,s),a=s},zre=async function*(e,t){for await(const r of Vre(e))yield*Ure(r,t)},Vre=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:a}=await t.read();if(r)break;yield a}}finally{await t.cancel()}},nO=(e,t,r,a)=>{const s=zre(e,t);let i=0,o,l=c=>{o||(o=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:d,value:h}=await s.next();if(d){l(),c.close();return}let u=h.byteLength;if(r){let f=i+=u;r(f)}c.enqueue(new Uint8Array(h))}catch(d){throw l(d),d}},cancel(c){return l(c),s.return()}},{highWaterMark:2})},_1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Hre=(e,t,r)=>t+2<r&&_1(e.charCodeAt(t+1))&&_1(e.charCodeAt(t+2));function Wre(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),a=e.slice(t+1);if(/;base64/i.test(r)){let o=a.length;const l=a.length;for(let m=0;m<l;m++)if(a.charCodeAt(m)===37&&m+2<l){const b=a.charCodeAt(m+1),g=a.charCodeAt(m+2);_1(b)&&_1(g)&&(o-=2,m+=2)}let c=0,d=l-1;const h=m=>m>
vendor: 4,816 bytes, line 638
638=2&&a.charCodeAt(m-2)===37&&a.charCodeAt(m-1)===51&&(a.charCodeAt(m)===68||a.charCodeAt(m)===100);d>=0&&(a.charCodeAt(d)===61?(c++,d--):h(d)&&(c++,d-=3)),c===1&&d>=0&&(a.charCodeAt(d)===61||h(d))&&c++;const f=Math.floor(o/4)*3-(c||0);return f>0?f:0}let i=0;for(let o=0,l=a.length;o<l;o++){const c=a.charCodeAt(o);if(c===37&&Hre(a,o,l))i+=1,o+=2;else if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&o+1<l){const d=a.charCodeAt(o+1);d>=56320&&d<=57343?(i+=4,o++):i+=3}else i+=3}return i}const k3="1.18.1",rO=64*1024,{isFunction:hb}=Ge,Kre=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),aO=e=>{if(!Ge.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},sO=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gre=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},Yre=e=>{const t=Ge.global!==void 0&&Ge.global!==null?Ge.global:globalThis,{ReadableStream:r,TextEncoder:a}=t;e=Ge.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:i,Response:o}=e,l=s?hb(s):typeof fetch=="function",c=hb(i),d=hb(o);if(!l)return!1;const h=l&&hb(r),u=l&&(typeof a=="function"?(x=>w=>x.encode(w))(new a):async x=>new Uint8Array(await new i(x).arrayBuffer())),f=c&&h&&sO(()=>{let x=!1;const w=new i(Pi.origin,{body:new r,method:"POST",get duplex(){return x=!0,"half"}}),j=w.headers.has("Content-Type");return w.body!=null&&w.body.cancel(),x&&!j}),m=d&&h&&sO(()=>Ge.isReadableStream(new o("").body)),b={stream:m&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!b[x]&&(b[x]=(w,j)=>{let N=w&&w[x];if(N)return N.call(w);throw new Bt(`Response type '${x}' is not supported`,Bt.ERR_NOT_SUPPORT,j)})});const g=async x=>{if(x==null)return 0;if(Ge.isBlob(x))return x.size;if(Ge.isSpecCompliantForm(x))return(await new i(Pi.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(Ge.isArrayBufferView(x)||Ge.isArrayBuffer(x))return x.byteLength;if(Ge.isURLSearchParams(x)&&(x=x+""),Ge.isString(x))return(await u(x)).byteLength},y=async(x,w)=>{const j=Ge.toFiniteNumber(x.getContentLength());return j??g(w)};return async x=>{let{url:w,method:j,data:N,signal:_,cancelToken:S,timeout:A,onDownloadProgress:T,onUploadProgress:R,responseType:M,headers:k,withCredentials:P="same-origin",fetchOptions:O,maxContentLength:F,maxBodyLength:$}=t$(x);const G=Ge.isNumber(F)&&F>-1,B=Ge.isNumber($)&&$>-1,Y=Q=>Ge.hasOwnProp(x,Q)?x[Q]:void 0;let ee=s||fetch;M=M?(M+"").toLowerCase():"text";let J=$re([_,S&&S.toAbortSignal()],A),H=null;const q=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let K,te=null;const re=()=>new Bt("Request body larger than maxBodyLength limit",Bt.ERR_BAD_REQUEST,x,H);try{let Q;const ne=Y("auth");if(ne){const ue=Ge.getSafeProp(ne,"username")||"",rt=Ge.getSafeProp(ne,"password")||"";Q={username:ue,password:rt}}if(Gre(w)){const ue=new URL(w,Pi.origin);if(!Q&&(ue.username||ue.password)){const rt=aO(ue.username),Te=aO(ue.password);Q={username:rt,password:Te}}(ue.username||ue.password)&&(ue.username="",ue.password="",w=ue.href)}if(Q&&(k.delete("authorization"),k.set("Authorization","Basic "+btoa(Kre((Q.username||"")+":"+(Q.password||""))))),G&&typeof w=="string"&&w.startsWith("data:")&&Wre(w)>F)throw new Bt("maxContentLength size of "+F+" exceeded",Bt.ERR_BAD_RESPONSE,x,H);if(B&&j!=="get"&&j!=="head"){const ue=await g(N);if(typeof ue=="number"&&isFinite(ue)&&(K=ue,ue>$))throw re()}const oe=B&&(Ge.isReadableStream(N)||Ge.isStream(N)),ae=(ue,rt,Te)=>nO(ue,rO,Pe=>{if(B&&Pe>$)throw te=re();rt&&rt(Pe)},Te);if(f&&j!=="get"&&j!=="head"&&(R||oe)){if(K=K??await y(k,N),K!==0||oe){let ue=new i(w,{method:"POST",body:N,duplex:"half"}),rt;if(Ge.isFormData(N)&&(rt=ue.headers.get("content-type"))&&k.setContentType(rt),ue.body){const[Te,Pe]=R&&JT(K,N1(ZT(R)))||[];N=ae(ue.body,Te,Pe)}}}else if(oe&&!c&&h&&j!=="get"&&j!=="head")N=ae(N);else if(oe&&c&&!f&&j!=="get"&&j!=="head")throw new Bt("Stream request bodies are not supported by the current fetch implementation",Bt.ERR_NOT_SUPPORT,x,H);Ge.isString(P)||(P=P?"include":"omit");const le=c&&"credentials"in i.prototype;if(Ge.isFormData(N)){const ue=k.getContentType();ue&&/^multipart\/form-data/i.test(ue)&&!/boundary=/i.test(ue)&&k.delete("content-type")}k.set("User-Agent","axios/"+k3,!1);const je={...O,signal:J,method:j.toUpperCase(),headers:VB(k.normalize()),body:N,duplex:"half",credentials:le?P:void 0};H=c&&new i(w,je);let xe=await(c?ee(H,O):ee(w,je));const Fe=no.from(xe.headers);if(G){const ue=Ge.toFiniteNumber(Fe.getContentLength());if(ue!=null&&ue>F)throw new Bt("maxContentLength size of "+F+" exceeded",Bt.ERR_BAD_RESPONSE,x,H)}const he=m&&(M==="stream"||M==="response");if(m&&xe.body&&(T||G||he&&q)){const ue={};["status","statusText","headers"].forEach(be=>{ue[be]=xe[be]}
vendor: 6,537 bytes, lines 638-644
638);const rt=Ge.toFiniteNumber(Fe.getContentLength()),[Te,Pe]=T&&JT(rt,N1(ZT(T),!0))||[];let $e=0;const Ve=be=>{if(G&&($e=be,$e>F))throw new Bt("maxContentLength size of "+F+" exceeded",Bt.ERR_BAD_RESPONSE,x,H);Te&&Te(be)};xe=new o(nO(xe.body,rO,Ve,()=>{Pe&&Pe(),q&&q()}),ue)}M=M||"text";let Ne=await b[Ge.findKey(b,M)||"text"](xe,x);if(G&&!m&&!he){let ue;if(Ne!=null&&(typeof Ne.byteLength=="number"?ue=Ne.byteLength:typeof Ne.size=="number"?ue=Ne.size:typeof Ne=="string"&&(ue=typeof a=="function"?new a().encode(Ne).byteLength:Ne.length)),typeof ue=="number"&&ue>F)throw new Bt("maxContentLength size of "+F+" exceeded",Bt.ERR_BAD_RESPONSE,x,H)}return!he&&q&&q(),await new Promise((ue,rt)=>{ZB(ue,rt,{data:Ne,headers:no.from(xe.headers),status:xe.status,statusText:xe.statusText,config:x,request:H})})}catch(Q){if(q&&q(),J&&J.aborted&&J.reason instanceof Bt){const ne=J.reason;throw ne.config=x,H&&(ne.request=H),Q!==ne&&Object.defineProperty(ne,"cause",{__proto__:null,value:Q,writable:!0,enumerable:!1,configurable:!0}),ne}if(te)throw H&&!te.request&&(te.request=H),te;if(Q instanceof Bt)throw H&&!Q.request&&(Q.request=H),Q;if(Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)){const ne=new Bt("Network Error",Bt.ERR_NETWORK,x,H,Q&&Q.response);throw Object.defineProperty(ne,"cause",{__proto__:null,value:Q.cause||Q,writable:!0,enumerable:!1,configurable:!0}),ne}throw Bt.from(Q,Q&&Q.code,x,H,Q&&Q.response)}}},Qre=new Map,n$=e=>{let t=e&&e.env||{};const{fetch:r,Request:a,Response:s}=t,i=[a,s,r];let o=i.length,l=o,c,d,h=Qre;for(;l--;)c=i[l],d=h.get(c),d===void 0&&h.set(c,d=l?new Map:Yre(t)),h=d;return d};n$();const P3={http:cre,xhr:Bre,fetch:{get:n$}};Ge.forEach(P3,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const iO=e=>`- ${e}`,Xre=e=>Ge.isFunction(e)||e===null||e===!1;function Jre(e,t){e=Ge.isArray(e)?e:[e];const{length:r}=e;let a,s;const i={};for(let o=0;o<r;o++){a=e[o];let l;if(s=a,!Xre(a)&&(s=P3[(l=String(a)).toLowerCase()],s===void 0))throw new Bt(`Unknown adapter '${l}'`);if(s&&(Ge.isFunction(s)||(s=s.get(t))))break;i[l||"#"+o]=s}if(!s){const o=Object.entries(i).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since :
639`+o.map(iO).join(`
640`):" "+iO(o[0]):"as no adapter specified";throw new Bt("There is no suitable adapter to dispatch the request "+l,Bt.ERR_NOT_SUPPORT)}return s}const r$={getAdapter:Jre,adapters:P3};function fN(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rv(null,e)}function oO(e){return fN(e),e.headers=no.from(e.headers),e.data=hN.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),r$.getAdapter(e.adapter||nv.adapter,e)(e).then(function(a){fN(e),e.response=a;try{a.data=hN.call(e,e.transformResponse,a)}finally{delete e.response}return a.headers=no.from(a.headers),a},function(a){if(!JB(a)&&(fN(e),a&&a.response)){e.response=a.response;try{a.response.data=hN.call(e,e.transformResponse,a.response)}finally{delete e.response}a.response.headers=no.from(a.response.headers)}return Promise.reject(a)})}const ej={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ej[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const lO={};ej.transitional=function(t,r,a){function s(i,o){return"[Axios v"+k3+"] Transitional option '"+i+"'"+o+(a?". "+a:"")}return(i,o,l)=>{if(t===!1)throw new Bt(s(o," has been removed"+(r?" in "+r:"")),Bt.ERR_DEPRECATED);return r&&!lO[o]&&(lO[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};ej.spelling=function(t){return(r,a)=>(console.warn(`${a} is likely a misspelling of ${t}`),!0)};function Zre(e,t,r){if(typeof e!="object"||e===null)throw new Bt("options must be an object",Bt.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let s=a.length;for(;s-- >0;){const i=a[s],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){const l=e[i],c=l===void 0||o(l,i,e);if(c!==!0)throw new Bt("option "+i+" must be "+c,Bt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Bt("Unknown option "+i,Bt.ERR_BAD_OPTION)}}const t1={assertOptions:Zre,validators:ej},Vi=t1.validators;let Nm=class{constructor(t){this.defaults=t||{},this.interceptors={request:new QT,response:new QT}}async request(t,r){try{return await this._request(t,r)}catch(a){if(a instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=(()=>{if(!s.stack)return"";const o=s.stack.indexOf(`
641`);return o===-1?"":s.stack.slice(o+1)})();try{if(!a.stack)a.stack=i;else if(i){const o=i.indexOf(`
642`),l=o===-1?-1:i.indexOf(`
643`,o+1),c=l===-1?"":i.slice(l+1);String(a.stack).endsWith(c)||(a.stack+=`
644`+i)}}catch{}}throw a}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Im(this.defaults,r);const{transitional:a,paramsSerializer:s,headers:i}=r;a!==void 0&&t1.assertOptions(a,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean),legacyInterceptorReqResOrdering:Vi.transitional(Vi.boolean),advertiseZstdAcceptEncoding:Vi.transitional(Vi.boolean),validateStatusUndefinedResolves:Vi.transitional(Vi.boolean)},!1),s!=null&&(Ge.isFunction(s)?r.paramsSerializer={serialize:s}:t1.assertOptions(s,{encode:Vi.function,serialize:Vi.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),t1.assertOptions(r,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&Ge.merge(i.common,i[r.method]);i&&Ge.forEach(["delete","get","head","post","put","patch","query","common"],b=>{delete i[b]}),r.headers=no.concat(o,i);const l=[];let c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(r)===!1)return;c=c&&g.synchronous;const y=r.transitional||C3;y&&y.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let h,u=0,f;if(!c){const b=[oO.bind(this),void 0];for(b.unshift(...l),b.push(...d),f=b.length,h=Promise.resolve(r);u<f;)h=h.then(b[u++],b[u++]);return h}f=l.length;let m=r;
vendor: 2,037 bytes, line 644
644for(;u<f;){const b=l[u++],g=l[u++];try{m=b(m)}catch(y){g.call(this,y);break}}try{h=oO.call(this,m)}catch(b){return Promise.reject(b)}for(u=0,f=d.length;u<f;)h=h.then(d[u++],d[u++]);return h}getUri(t){t=Im(this.defaults,t);const r=e$(t.baseURL,t.url,t.allowAbsoluteUrls,t);return YB(r,t.params,t.paramsSerializer)}};Ge.forEach(["delete","get","head","options"],function(t){Nm.prototype[t]=function(r,a){return this.request(Im(a||{},{method:t,url:r,data:a&&Ge.hasOwnProp(a,"data")?a.data:void 0}))}});Ge.forEach(["post","put","patch","query"],function(t){function r(a){return function(i,o,l){return this.request(Im(l||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Nm.prototype[t]=r(),t!=="query"&&(Nm.prototype[t+"Form"]=r(!0))});let eae=class a${constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(s=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](s);a._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(l=>{a.subscribe(l),i=l}).then(s);return o.cancel=function(){a.unsubscribe(i)},o},t(function(i,o,l){a.reason||(a.reason=new rv(i,o,l),r(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=a=>{t.abort(a)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new a$(function(s){t=s}),cancel:t}}};function tae(e){return function(r){return e.apply(null,r)}}function nae(e){return Ge.isObject(e)&&e.isAxiosError===!0}const VC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
644alContent: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(VC).forEach(([e,t])=>{VC[t]=e});function s$(e){const t=new Nm(e),r=RB(Nm.prototype.request,t);return Ge.extend(r,Nm.prototype,t,{allOwnKeys:!0}),Ge.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return s$(Im(e,s))},r}const gs=s$(nv);gs.Axios=Nm;gs.CanceledError=rv;gs.CancelToken=eae;gs.isCancel=JB;gs.VERSION=k3;gs.toFormData=Zw;gs.AxiosError=Bt;gs.Cancel=gs.CanceledError;gs.all=function(t){return Promise.all(t)};gs.spread=tae;gs.isAxiosError=nae;gs.mergeConfig=Im;gs.AxiosHeaders=no;gs.formToJSON=e=>XB(Ge.isHTMLForm(e)?new FormData(e):e);gs.getAdapter=r$.getAdapter;gs.HttpStatusCode=VC;gs.default=gs;const{Axios:zEe,AxiosError:VEe,CanceledError:HEe,isCancel:WEe,CancelToken:KEe,VERSION:GEe,all:YEe,Cancel:QEe,isAxiosError:XEe,spread:JEe,toFormData:ZEe,AxiosHeaders:eTe,HttpStatusCode:tTe,formToJSON:nTe,getAdapter:rTe,mergeConfig:aTe,create:sTe}=gs,i$=typeof window>"u",cO=!i$&&window.self!==window.top,rae=!i$&&typeof document>"u",o$=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Ni=[];for(let e=0;e<256;++e)Ni.push((e+256).toString(16).slice(1));function aae(e,t=0){return(Ni[e[t+0]]+Ni[e[t+1]]+Ni[e[t+2]]+Ni[e[t+3]]+"-"+Ni[e[t+4]]+Ni[e[t+5]]+"-"+Ni[e[t+6]]+Ni[e[t+7]]+"-"+Ni[e[t+8]]+Ni[e[t+9]]+"-"+Ni[e[t+10]]+Ni[e[t+11]]+Ni[e[t+12]]+Ni[e[t+13]]+Ni[e[t+14]]+Ni[e[t+15]]).toLowerCase()}let mN;const sae=new Uint8Array(16);function iae(){if(!mN){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");mN=crypto.getRandomValues.bind(crypto)}return mN(sae)}const oae=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dO={randomUUID:oae};function lae(e,t,r){var s;e=e||{};const a=e.random??((s=e.rng)==null?void 0:s.call(e))??iae();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,aae(a)}function cae(e,t,r){return dO.randomUUID&&!e?dO.randomUUID():lae(e)}const Xx=typeof window<"u"?window:{base44SharedInstances:{}};function dae(e,t){return Xx.base44SharedInstances||(Xx.base44SharedInstances={}),Xx.base44SharedInstances[e]||(Xx.base44SharedInstances[e]={instance:t()}),Xx.base44SharedInstances[e].instance}const uae="__user_heartbeat_event__",hae="__initialization_event__",fae="__session_duration_event__",uO="analytics-enable",hO="base44_analytics_session_id",mae={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},pae="analytics",Ur=dae(pae,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...mae,...Nae()}})),gae=({axiosClient:e,serverUrl:t,appId:r,userAuthModule:a,enabled:s})=>{var i;const{maxQueueSize:o,throttleTime:l,batchSize:c}=Ur.config;if(!s||!(!((i=Ur.config)===null||i===void 0)&&i.enabled)||rae)return{track:()=>{},cleanup:()=>{}};let d;const h=`${t}/api/apps/${r}/analytics/track/batch`,u=async N=>{await e.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:N}})},f=N=>{try{const _=JSON.stringify({events:N}),S=new Blob([_],{type:"application/json"});return typeof navigator>"u"||_.length>6e4||!navigator.sendBeacon(h,S)}catch{return!1}},m=async(N,_={})=>
644{if(N.length===0)return;const S=await jae(a),A=N.map(wae(S));try{(!_.isBeacon||!f(A))&&await u(A)}catch{}},b=()=>{mO(m,{throttleTime:l,batchSize:c})},g=N=>{if(Ur.requestsQueue.length>=o)return;const _=bae();Ur.requestsQueue.push({...N,..._}),b()},y=()=>{mO(m,{throttleTime:l,batchSize:c}),d=pO(g),yae()},x=()=>{fO(),d==null||d(),vae(g);const N=Ur.requestsQueue.splice(0);m(N,{isBeacon:!0})},w=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&y())},j=()=>{fO(),d==null||d(),typeof window<"u"&&window.removeEventListener("visibilitychange",w)};return b(),d=pO(g),xae(g),typeof window<"u"&&window.addEventListener("visibilitychange",w),{track:g,cleanup:j}};function fO(){Ur.isProcessing=!1}async function mO(e,t){if(Ur.isProcessing)return;Ur.isProcessing=!0;const{throttleTime:r=1e3,batchSize:a=30}=t??{};for(;Ur.isProcessing&&Ur.requestsQueue.length>0;){const s=Ur.requestsQueue.splice(0,a);s.length&&await e(s),await new Promise(i=>setTimeout(i,r))}Ur.isProcessing=!1}function pO(e){var t;if(typeof window>"u"||Ur.isHeartBeatProcessing||((t=Ur.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Ur.isHeartBeatProcessing=!0;const r=setInterval(()=>{e({eventName:uae})},Ur.config.heartBeatInterval);return()=>{clearInterval(r),Ur.isHeartBeatProcessing=!1}}function xae(e){typeof window>"u"||Ur.wasInitializationTracked||(Ur.wasInitializationTracked=!0,e({eventName:hae,properties:{referrer:document==null?void 0:document.referrer}}))}function yae(){typeof window>"u"||Ur.sessionStartTime!==null||(Ur.sessionStartTime=new Date().toISOString())}function vae(e){if(typeof window>"u"||Ur.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Ur.sessionStartTime).getTime();Ur.sessionStartTime=null,e({eventName:fae,properties:{sessionDuration:t}})}function bae(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function wae(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let yy=null;function gO(){Ur.sessionContext=null,yy=null}async function jae(e){if(!Ur.sessionContext){if(!e.hasToken())return{user_id:null,session_id:S1()};if(!yy){const a=S1();yy=e.me().then(s=>({user_id:s.id,session_id:a})).catch(()=>({user_id:null,session_id:a}))}const t=yy,r=await t;return yy===t&&(Ur.sessionContext=r),r}return Ur.sessionContext}function Nae(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(uO);if(t==null||!t.length)return;const r=new URLSearchParams(window.location.search);r.delete(uO);const a=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",a),{enabled:t==="true"}}function xO(){var e;return(e=Ur.fallbackSessionId)!==null&&e!==void 0?e:Ur.fallbackSessionId=o$()}function S1(){if(typeof window>"u")return xO();try{const e=localStorage.getItem(hO);if(!e){const t=o$();return localStorage.setItem(hO,t),t}return e}catch{return xO()}}class _ae extends Error{constructor(t,r,a,s,i){super(t),this.name="Base44Error",this.status=r,this.code=a,this.data=s,this.originalError=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Bp({baseURL:e,headers:t={},token:r,interceptResponses:a=!0,onError:s}){const i=gs.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return r&&(i.defaults.headers.common.Authorization=`Bearer ${r}`),i.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",S1()));const l=cae();if(o.requestId=l,cO)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),a&&i.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{cO&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,d,h,u,f,m,b,g,y,x,w;const j=(l=o.response)===null||l===void 0?void 0:l.data,N=((c=j==null?void 0:j.error)===null||c===void 0?void 0:c.message)||(j==null?void 0:j.message)||(j==null?void 0:j.detail)||o.message,_=new _ae(N,(d=o.response)===null||d===void 0?void 0:d.status,(y=(f=(u=(h=j==null?void 0:j.error)===null||h===void 0?void 0:h.code)!==null&&u!==void 0?u:j==null?void 0:j.code)!==null&&f!==void 0?f:(g=(b=(m=o.response)===null||m===void 0?void 0:m.headers)===null||b===void 0?void 0:b.get)===null||g===void 0?void 0:g.call(b,"x-base44-connector-error"))!==null&&y!==void 0?y:(w=(x=o.response)===null||x===void 0?void 0:x.headers)===null||w===void 0?void 0:w["x-base44-connector-error"],j,o);return s==null||s(_),Promise.reject(_)}),i}function yO(e){const{axios:t,appId:r,getSocket:a}=e;return new Proxy({}
644,{get(s,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return Aae(t,r,i,a)}})}function Sae(e){var t;try{const r=JSON.parse(e);return{type:r.type,data:r.data,id:r.id||((t=r.data)===null||t===void 0?void 0:t.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}const Cae=100;function vO(e){return typeof e=="object"&&e!==null}function Aae(e,t,r,a){const s=`/apps/${t}/entities/${r}`,i=c=>Array.isArray(c)?c.join(","):c,o=(c,d,h,u,f)=>{const m={};return f&&(m.q=JSON.stringify(f)),c&&(m.sort=c),d&&(m.limit=d),h&&(m.skip=h),u&&(m.fields=i(u)),e.get(s,{params:m})},l=(c,d)=>{const h={};return d&&(h.q=JSON.stringify(d)),h.limit=c.limit||Cae,c.cursor&&(h.cursor=c.cursor),"distinct"in c?h.distinct=c.distinct:(c.sort&&(h.sort=c.sort),c.fields&&(h.fields=i(c.fields))),e.get(`${s}/v2/list`,{params:h})};return{async list(...c){const[d,h,u,f]=c;return vO(d)?l(d):o(d,h,u,f)},async filter(c,...d){const[h,u,f,m]=d;return vO(h)?l(h,c):o(h,u,f,m,c)},async get(c){return e.get(`${s}/${c}`)},async create(c){return e.post(s,c)},async update(c,d){return e.put(`${s}/${c}`,d)},async delete(c){return e.delete(`${s}/${c}`)},async deleteMany(c){return e.delete(s,{data:c})},async bulkCreate(c){return e.post(`${s}/bulk`,c)},async updateMany(c,d){return e.patch(`${s}/update-many`,{query:c,data:d})},async count(c){const d={};return c&&(d.q=JSON.stringify(c)),(await e.get(`${s}/count`,{params:d})).count},async aggregate(c){return e.post(`${s}/aggregate`,c)},async upsert(c,d){return e.post(`${s}/upsert`,{records:c,key:d.key})},async bulkUpdate(c){return e.put(`${s}/bulk`,c)},async importEntities(c){const d=new FormData;return d.append("file",c,c.name),e.post(`${s}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(c){const d=`entities:${t}:${r}`;return a().subscribeToRoom(d,{update_model:f=>{var m;const b=Sae(f.data);if(b){b.type!=="delete"&&(!((m=b.data)===null||m===void 0)&&m._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${r}#${b.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${r}.get("${b.id}")\` to fetch the full record.`);try{c(b)}catch(g){console.error("[Base44 SDK] Subscription callback error:",g)}}}})}}}function kae(e,t){return{async call(r,a,s){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(a!=null&&a.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:i,queryParams:o,...l}=s??{},c={...l,...i&&{path_params:i},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${r}/${a}`,c)}}}function bO(e,t){const r=kae(e,t);return new Proxy({},{get(a,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return s==="custom"?r:new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,d;return l instanceof FormData||l&&Object.values(l).some(h=>h instanceof File)?(c=new FormData,Object.keys(l).forEach(h=>{l[h]instanceof File?c.append(h,l[h],l[h].name):typeof l[h]=="object"&&l[h]!==null?c.append(h,JSON.stringify(l[h])):c.append(h,l[h])}),d="multipart/form-data"):(c=l,d="application/json"),s==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":d}}):e.post(`/apps/${t}/integration-endpoints/installable/${s}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":d}})}}})}})}function Pae(){return typeof window>"u"?!1:window!==window.parent}function Eae(e,t,r){const i=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${i},top=${o},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",d),clearInterval(h),l.closed||l.close()},d=u=>{var f;if(u.origin!==r||u.source!==l||!(!((f=u.data)===null||f===void 0)&&f.access_token))return;c();const m=new URL(t),{access_token:b,is_new_user:g}=u.data;m.searchParams.set("access_token",b),g!=null&&m.searchParams.set("is_new_user",String(g)),window.location.href=m.toString()},h=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",d)}function Tae(e,t,r,a){let s=null;const i=()=>{s=null};let o=!!a.token;return{hasToken(){return o},async me(){const l=s??e.get(`/apps/${r}/entities/User/me`).finally(()=>{s===l&&(s=null)});return s=l,l},async updateMe(l){return e.put(`/apps/${r}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=l?new URL(l,window.location.origin).toString():window.location.href,d=`${a.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=d},loginWithProvider(l,c="/"){const d=new URL(c,window.location.origin).toString(),h=`app_id=${r}&from_url=${encodeURIComponent(d)}`;let u;l==="sso"?u=`/apps/${r}/auth/sso/login`:u=`/apps/auth${l==="google"?"":`/${l}`}/login`;const f=`${a.appBaseUrl}/api${u}?${h}`;if(Pae()){const m=`${f}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Eae(m,d,window.location.origin)}window.location.href=f},logout(l){if(delete e.defaults.headers.common.Authorization,i(),gO(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const c=l||window.location.href,d=`${a.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=d}},setToken(l,c=!0){if(l&&(i(),gO(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(l,c,d){var h;try{const u=await e.post(`/apps/${r}/auth/login`,{email:l,password:c,...d&&{turnstile_token:d}}),{access_token:f,user:m}=u;return f&&this.setToken(f),{access_token:f,user:m}}catch(u){throw((h=u.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),u}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,c){return e.post(`/apps/${r}/users/invite-user`,{user_email:l,role:c})},register(l){return e.post(`/apps/${r}/auth/register`,l)},verifyOtp({email:l,otpCode:c}){return e.post(`/apps/${r}/auth/verify-otp`,{email:l,otp_code:c})},resendOtp(l){return e.post(`/apps/${r}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return e.post(`/apps/${r}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:c}){return e.post(`/apps/${r}/auth/reset-password`,{reset_token:l,new_password:c})},changePassword({userId:l,currentPassword:c,newPassword:d}){return e.post(`/apps/${r}/auth/change-password`,{user_id:l,current_password:c,new_password:d})}}}function Oae(e,t){return{async getAccessToken(r){const a=`/apps/${t}/auth/sso/accesstoken/${r}`;return e.get(a)},async getIdToken(r){const a=`/apps/${t}/auth/sso/idtoken/${r}`;return e.get(a)}}}const Mae=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);function Lae(e,t){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`)).access_token},async getConnection(r){var a;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const i=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(r)}`);return{accessToken:i.access_token,connectionConfig:(a=i.connection_config)!==null&&a!==void 0?a:null}},async getWorkspaceConnection(r){var a;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const i=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(r)}`);return{accessToken:i.access_token,connectionConfig:(a=i.connection_config)!==null&&a!==void 0?a:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`)).access_token},async getCurrentAppUserConnection(r){var a;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const i=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/token`);return{accessToken:i.access_token,connectionConfig:(a=i.connection_config)!==null&&a!==void 0?a:null}},async callApi(r,a){return l$(r,"Integration type"),Rae(e,`/apps/${t}/connectors/${encodeURIComponent(r)}/call`,a)}}}function l$(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function Rae(e,t,r){var a,s,i,o,l,c,d,h,u;if(!r||typeof r!="object")throw new Error("Request is required and must be an object");l$(r.path,"Request path");const f=(a=r.method)!==null&&a!==void 0?a:"GET";if(!Mae.has(f))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const b=await e.post(t,{method:f,...r.host==null?{}:{host:r.host},path:r.path,query:(s=r.query)!==null&&s!==void 0?s:{},headers:(i=r.headers)!==null&&i!==void 0?i:{},body:(o=r.body)!==null&&o!==void 0?o:null});return{success:b.success,phase:b.phase,status:(l=b.status_code)!==null&&l!==void 0?l:null,data:b.data,dataBase64:(c=b.data_base64)!==null&&c!==void 0?c:null,contentType:(d=b.content_type)!==null&&d!==void 0?d:null,headers:(h=b.headers)!==null&&h!==void 0?h:{},creditsCharged:(u=b.credits_charged)!==null&&u!==void 0?u:0}}function Iae(e,t){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(r)}`)}}}function Zh(e={}){const{storageKey:t="base44_access_token",paramName:r="access_token",saveToStorage:a=!0,removeFromUrl:s=!0}=e;let i=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(i=o.get(r),i){if(a&&Dae(i,{storageKey:t}),s){o.delete(r);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return i}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return i=window.localStorage.getItem(t),i}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function Dae(e,t){const{storageKey:r="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(r,e),window.localStorage.setItem("token",e),!0}catch(a){return console.error("Error saving token to local storage:",a),!1}}function Fae({axios:e,serviceRoleAxios:t,appId:r,serverUrl:a,functionsVersion:s,platformHeaders:i}){const o=new Headers(i),l=c=>{const d=c.defaults.headers.common.Authorization;
644return typeof d=="string"&&d.startsWith("Bearer ")?d:null};return async function(d,h={}){qae(d);const{fetch:u=fetch,...f}=h,m=new Headers(h.headers),b=(g,y)=>{y&&!m.has(g)&&m.set(g,y)};return b("Authorization",l(e)),b("Base44-Service-Authorization",l(t)),b("Base44-App-Id",r),b("Base44-Api-Url",a),b("Base44-Functions-Version",s),b("Base44-State",o.get("Base44-State")),b("X-Data-Env",o.get("X-Data-Env")),u(d,{...f,headers:m})}}function qae(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it — pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function wO(e,t,r){const a=(i,o)=>i?`${String(i).replace(/\/$/,"")}${o}`:o,s=i=>{const o=new Headers;if(r!=null&&r.getAuthHeaders){const l=r.getAuthHeaders();Object.entries(l).forEach(([c,d])=>{d!=null&&o.set(c,String(d))})}return i&&new Headers(i).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(i,o){if(typeof o=="string")throw new Error(`Function ${i} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(d=>d instanceof File)?(l=new FormData,Object.keys(o).forEach(d=>{o[d]instanceof File?l.append(d,o[d],o[d].name):typeof o[d]=="object"&&o[d]!==null?l.append(d,JSON.stringify(o[d])):l.append(d,o[d])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${i}`,l||o,{headers:{"Content-Type":c}})},async fetch(i,o={}){const c=`/functions${i.startsWith("/")?i:`/${i}`}`,d=s(o.headers),h={...o,headers:d};return await fetch(a(r==null?void 0:r.baseURL,c),h)}}}function jO({axios:e,getSocket:t,appId:r,serverUrl:a,token:s}){const i=`/apps/${r}/agents`,o={},l=()=>e.get(`${i}/conversations`),c=g=>e.get(`${i}/conversations/${g}`);return{getConversations:l,getConversation:c,listConversations:g=>e.get(`${i}/conversations`,{params:g}),createConversation:g=>e.post(`${i}/conversations`,g),addMessage:async(g,y)=>e.post(`${i}/conversations/v2/${g.id}/messages`,y),subscribeToConversation:(g,y)=>{const x=`/agent-conversations/${g}`,w=t(),j=c(g).then(N=>(o[g]=N,N));return w.subscribeToRoom(x,{connect:()=>{},update_model:async({data:N})=>{const _=JSON.parse(N);if(_._message){await j;const S=_._message,A=o[g];if(A){const T=A.messages||[],R=T.findIndex(k=>k.id===S.id),M=R!==-1?T.map((k,P)=>P===R?S:k):[...T,S];o[g]={...A,messages:M},y==null||y(o[g])}}}})},getWhatsAppConnectURL:g=>{const y=`${a}/api/apps/${r}/agents/${encodeURIComponent(g)}/whatsapp`,x=s??Zh();return x?`${y}?token=${x}`:y},getTelegramConnectURL:g=>{const y=`${a}/api/apps/${r}/agents/${encodeURIComponent(g)}/telegram`,x=s??Zh();return x?`${y}?token=${x}`:y}}}const NO={openai:"openai",typesafe:"typesafe"};function _O({serverUrl:e,token:t,appId:r,headers:a={}}){return{connection:({provider:i="openai"}={})=>{var o;if(!Object.prototype.hasOwnProperty.call(NO,i))throw new Error(`Unsupported AI Gateway provider: ${i}`);const l=NO[i];return{baseURL:`${e}/api/apps/${r}/ai/${l}/v1`,token:(o=t??Zh())!==null&&o!==void 0?o:"",headers:{...a}}}}}function SO(e,t){const r=`/app-logs/${t}`;return{async logUserInApp(a){await e.post(`${r}/log-user-in-app/${a}`)},async fetchLogs(a={}){return await e.get(r,{params:a})},async getStats(a={}){return await e.get(`${r}/stats`,{params:a})}}}function Bae(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function $ae(e,t){return{async inviteUser(r,a){if(a!=="user"&&a!=="admin")throw new Error(`Invalid role: "${a}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:r,role:a})}}}const tu=Object.create(null);tu.open="0";tu.close="1";tu.ping="2";tu.pong="3";tu.message="4";tu.upgrade="5";tu.noop="6";
vendor: 6,044 bytes, line 644
644const n1=Object.create(null);Object.keys(tu).forEach(e=>{n1[tu[e]]=e});const HC={type:"error",data:"parser error"},c$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",d$=typeof ArrayBuffer=="function",u$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,E3=({type:e,data:t},r,a)=>c$&&t instanceof Blob?r?a(t):CO(t,a):d$&&(t instanceof ArrayBuffer||u$(t))?r?a(t):CO(new Blob([t]),a):a(tu[e]+(t||"")),CO=(e,t)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];t("b"+(a||""))},r.readAsDataURL(e)};function AO(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pN;function Uae(e,t){if(c$&&e.data instanceof Blob)return e.data.arrayBuffer().then(AO).then(t);if(d$&&(e.data instanceof ArrayBuffer||u$(e.data)))return t(AO(e.data));E3(e,!1,r=>{pN||(pN=new TextEncoder),t(pN.encode(r))})}const kO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vy=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kO.length;e++)vy[kO.charCodeAt(e)]=e;const zae=e=>{let t=e.length*.75,r=e.length,a,s=0,i,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),h=new Uint8Array(d);for(a=0;a<r;a+=4)i=vy[e.charCodeAt(a)],o=vy[e.charCodeAt(a+1)],l=vy[e.charCodeAt(a+2)],c=vy[e.charCodeAt(a+3)],h[s++]=i<<2|o>>4,h[s++]=(o&15)<<4|l>>2,h[s++]=(l&3)<<6|c&63;return d},Vae=typeof ArrayBuffer=="function",T3=(e,t)=>{if(typeof e!="string")return{type:"message",data:h$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:Hae(e.substring(1),t)}:n1[r]?e.length>1?{type:n1[r],data:e.substring(1)}:{type:n1[r]}:HC},Hae=(e,t)=>{if(Vae){const r=zae(e);return h$(r,t)}else return{base64:!0,data:e}},h$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},f$="�",Wae=(e,t)=>{const r=e.length,a=new Array(r);let s=0;e.forEach((i,o)=>{E3(i,!1,l=>{a[o]=l,++s===r&&t(a.join(f$))})})},Kae=(e,t)=>{const r=e.split(f$),a=[];for(let s=0;s<r.length;s++){const i=T3(r[s],t);if(a.push(i),i.type==="error")break}return a};function Gae(){return new TransformStream({transform(e,t){Uae(e,r=>{const a=r.length;let s;if(a<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,a);else if(a<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,a)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(r)})}})}let gN;function fb(e){return e.reduce((t,r)=>t+r.length,0)}function mb(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let a=0;for(let s=0;s<t;s++)r[s]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),r}function Yae(e,t){gN||(gN=new TextDecoder);const r=[];let a=0,s=-1,i=!1;return new TransformStream({transform(o,l){for(r.push(o);;){if(a===0){if(fb(r)<1)break;const c=mb(r,1);i=(c[0]&128)===128,s=c[0]&127,s<126?a=3:s===126?a=1:a=2}else if(a===1){if(fb(r)<2)break;const c=mb(r,2);s=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),a=3}else if(a===2){if(fb(r)<8)break;const c=mb(r,8),d=new DataView(c.buffer,c.byteOffset,c.length),h=d.getUint32(0);if(h>Math.pow(2,21)-1){l.enqueue(HC);break}s=h*Math.pow(2,32)+d.getUint32(4),a=3}else{if(fb(r)<s)break;const c=mb(r,s);l.enqueue(T3(i?c:gN.decode(c),t)),a=0}if(s===0||s>e){l.enqueue(HC);break}}}})}const m$=4;function Ss(e){if(e)return Qae(e)}function Qae(e){for(var t in Ss.prototype)e[t]=Ss.prototype[t];return e}Ss.prototype.on=Ss.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ss.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ss.prototype.off=Ss.prototype.removeListener=Ss.prototype.removeAllListeners=Ss.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,s=0;s<r.length;s++)if(a=r[s],a===t||a.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this};Ss.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,s=r.length;a<s;++a)r[a].apply(this,t)}return this};Ss.prototype.emitReserved=Ss.prototype.emit;Ss.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ss.prototype.hasListeners=function(e){return!!this.listeners(e).length};const tj=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),mc=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Xae="arraybuffer";function p$(e,...t){return t.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const Jae=mc.setTimeout,Zae=mc.clearTimeout;function nj(e,t){t.useNativeTimers?(e.setTimeoutFn=Jae.bind(mc),e.clearTimeoutFn=Zae.bind(mc)):(e.setTimeoutFn=mc.setTimeout.bind(mc),e.clearTimeoutFn=mc.clearTimeout.bind(mc))}const ese=1.33;function tse(e){return typeof e=="string"?nse(e):Math.ceil((e.byteLength||e.size)*ese)}function nse(e){let t=0,r=0;for(let a=0,s=e.length;a<s;a++)t=e.charCodeAt(a),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(a++,r+=4);return r}function g$(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function rse(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function ase(e){let t={},r=e.split("&");for(let a=0,s=r.length;a<s;a++){let i=r[a].split("=");
vendor: 6,278 bytes, line 644
644t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class sse extends Error{constructor(t,r,a){super(t),this.description=r,this.context=a,this.type="TransportError"}}class O3 extends Ss{constructor(t){super(),this.writable=!1,nj(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,r,a){return super.emitReserved("error",new sse(t,r,a)),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 r=T3(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=rse(t);return r.length?"?"+r:""}}class ise extends O3{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const r=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};Kae(t,this.socket.binaryType).forEach(r),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,Wae(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=g$()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let x$=!1;try{x$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ose=x$;function lse(){}class cse extends ise{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,r){const a=this.request({method:"POST",data:t});a.on("success",r),a.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=t}}class Wd extends Ss{constructor(t,r,a){super(),this.createRequest=t,nj(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;const r=p$(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&a.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var s;a.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Wd.requestsCount++,Wd.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=lse,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Wd.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()}}Wd.requestsCount=0;Wd.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",PO);else if(typeof addEventListener=="function"){const e="onpagehide"in mc?"pagehide":"unload";addEventListener(e,PO,!1)}}function PO(){for(let e in Wd.requests)Wd.requests.hasOwnProperty(e)&&Wd.requests[e].abort()}const dse=(function(){const e=y$({xdomain:!1});return e&&e.responseType!==null})();class use extends cse{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=dse&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Wd(y$,this.uri(),t)}}function y$(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||ose))return new XMLHttpRequest}catch{}if(!t)try{return new mc[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const v$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class hse extends O3{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,a=v$?{}:p$(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,a)}catch(s){return this.emitReserved("error",s)}
vendor: 10,345 bytes, line 644
644this.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 r=0;r<t.length;r++){const a=t[r],s=r===t.length-1;E3(a,this.supportsBinary,i=>{try{this.doWrite(a,i)}catch{}s&&tj(()=>{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",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=g$()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const xN=mc.WebSocket||mc.MozWebSocket;class fse extends hse{createSocket(t,r,a){return v$?new xN(t,r,a):r?new xN(t,r):new xN(t)}doWrite(t,r){this.ws.send(r)}}class mse extends O3{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 r=Yae(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(r).getReader(),s=Gae();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{a.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();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 r=0;r<t.length;r++){const a=t[r],s=r===t.length-1;this._writer.write(a).then(()=>{s&&tj(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const pse={websocket:fse,webtransport:mse,polling:use},gse=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xse=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function WC(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),a=e.indexOf("]");r!=-1&&a!=-1&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));let s=gse.exec(e||""),i={},o=14;for(;o--;)i[xse[o]]=s[o]||"";return r!=-1&&a!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=yse(i,i.path),i.queryKey=vse(i,i.query),i}function yse(e,t){const r=/\/{2,9}/g,a=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function vse(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,s,i){s&&(r[s]=i)}),r}const KC=typeof addEventListener=="function"&&typeof removeEventListener=="function",r1=[];KC&&addEventListener("offline",()=>{r1.forEach(e=>e())},!1);class af extends Ss{constructor(t,r){if(super(),this.binaryType=Xae,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const a=WC(t);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=WC(r.host).host);nj(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(a=>{const s=a.prototype.name;this.transports.push(s),this._transportsByName[s]=a}),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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ase(this.opts.query)),KC&&(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"})},r1.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=m$,r.transport=t,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&af.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}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",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",af.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 r=new Error("server error");r.code=t.data,this._onError(r);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 r=1;for(let a=0;a<this.writeBuffer.length;a++){const s=this.writeBuffer[a].data;if(s&&(r+=tse(s)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,tj(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,a){return this._sendPacket("message",t,r,a),this}send(t,r,a){return this._sendPacket("message",t,r,a),this}_sendPacket(t,r,a,s){if(typeof r=="function"&&(s=r,r=void 0),typeof a=="function"&&(s=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const i={type:t,data:r,options:a};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(af.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,r){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(),KC&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=r1.indexOf(this._offlineEventListener);a!==-1&&r1.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}af.protocol=m$;class bse extends af{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 r=this.createTransport(t),a=!1;af.priorWebsocketSuccess=!1;const s=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",u=>{if(!a)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;af.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(h(),this.setTransport(r),r.send([{type:"upgrade"}
vendor: 11,033 bytes, line 644
644]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=r.name,this.emitReserved("upgradeError",f)}}))};function i(){a||(a=!0,h(),r.close(),r=null)}const o=u=>{const f=new Error("probe error: "+u);f.transport=r.name,i(),this.emitReserved("upgradeError",f)};function l(){o("transport closed")}function c(){o("socket closed")}function d(u){r&&u.name!==r.name&&i()}const h=()=>{r.removeListener("open",s),r.removeListener("error",o),r.removeListener("close",l),this.off("close",c),this.off("upgrading",d)};r.once("open",s),r.once("error",o),r.once("close",l),this.once("close",c),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&r.push(t[a]);return r}}let wse=class extends bse{constructor(t,r={}){const a=typeof t=="object",s=a?{...t}:{...r};(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>pse[i]).filter(i=>!!i)),super(a?s:t,s)}};function jse(e,t="",r){let a=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),a=WC(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const i=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+i+":"+a.port+t,a.href=a.protocol+"://"+i+(r&&r.port===a.port?"":":"+a.port),a}const Nse=typeof ArrayBuffer=="function",_se=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,b$=Object.prototype.toString,Sse=typeof Blob=="function"||typeof Blob<"u"&&b$.call(Blob)==="[object BlobConstructor]",Cse=typeof File=="function"||typeof File<"u"&&b$.call(File)==="[object FileConstructor]";function M3(e){return Nse&&(e instanceof ArrayBuffer||_se(e))||Sse&&e instanceof Blob||Cse&&e instanceof File}function a1(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(a1(e[r]))return!0;return!1}if(M3(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return a1(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&a1(e[r]))return!0;return!1}function Ase(e){const t=[],r=e.data,a=e;return a.data=GC(r,t),a.attachments=t.length,{packet:a,buffers:t}}function GC(e,t){if(!e)return e;if(M3(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=GC(e[a],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=GC(e[a],t));return r}return e}function kse(e,t){return e.data=YC(e.data,t),delete e.attachments,e}function YC(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 r=0;r<e.length;r++)e[r]=YC(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=YC(e[r],t));return e}const w$=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pse=5;var Hn;(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"})(Hn||(Hn={}));class Ese{constructor(t){this.replacer=t}encode(t){return(t.type===Hn.EVENT||t.type===Hn.ACK)&&a1(t)?this.encodeAsBinary({type:t.type===Hn.EVENT?Hn.BINARY_EVENT:Hn.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let r=""+t.type;return(t.type===Hn.BINARY_EVENT||t.type===Hn.BINARY_ACK)&&(r+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(r+=t.nsp+","),t.id!=null&&(r+=t.id),t.data!=null&&(r+=JSON.stringify(t.data,this.replacer)),r}encodeAsBinary(t){const r=Ase(t),a=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(a),s}}class L3 extends Ss{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let r;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(t);const a=r.type===Hn.BINARY_EVENT;a||r.type===Hn.BINARY_ACK?(r.type=a?Hn.EVENT:Hn.ACK,this.reconstructor=new Tse(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(M3(t)||t.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(t),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let r=0;const a={type:Number(t.charAt(0))};if(Hn[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Hn.BINARY_EVENT||a.type===Hn.BINARY_ACK){const i=r+1;for(;t.charAt(++r)!=="-"&&r!=t.length;);const o=t.substring(i,r);if(o!=Number(o)||t.charAt(r)!=="-")throw new Error("Illegal attachments");const l=Number(o);if(!j$(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");a.attachments=l}if(t.charAt(r+1)==="/"){const i=r+1;for(;++r&&!(t.charAt(r)===","||r===t.length););a.nsp=t.substring(i,r)}else a.nsp="/";const s=t.charAt(r+1);if(s!==""&&Number(s)==s){const i=r+1;for(;++r;){const o=t.charAt(r);if(o==null||Number(o)!=o){--r;break}if(r===t.length)break}a.id=Number(t.substring(i,r+1))}if(t.charAt(++r)){const i=this.tryParse(t.substr(r));if(L3.isPayloadValid(a.type,i))a.data=i;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,r){switch(t){case Hn.CONNECT:return C1(r);case Hn.DISCONNECT:return r===void 0;case Hn.CONNECT_ERROR:return typeof r=="string"||C1(r);case Hn.EVENT:case Hn.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&w$.indexOf(r[0])===-1);case Hn.ACK:case Hn.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Tse{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const r=kse(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Ose(e){return typeof e=="string"}const j$=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Mse(e){return e===void 0||j$(e)}function C1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lse(e,t){switch(e){case Hn.CONNECT:return t===void 0||C1(t);case Hn.DISCONNECT:return t===void 0;case Hn.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&w$.indexOf(t[0])===-1);case Hn.ACK:return Array.isArray(t);case Hn.CONNECT_ERROR:return typeof t=="string"||C1(t);default:return!1}}function Rse(e){return Ose(e.nsp)&&Mse(e.id)&&Lse(e.type,e.data)}const Ise=Object.freeze(Object.defineProperty({__proto__:null,Decoder:L3,Encoder:Ese,get PacketType(){return Hn},isPacketValid:Rse,protocol:Pse},Symbol.toStringTag,{value:"Module"}));function Xc(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const Dse=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N$ extends Ss{constructor(t,r,a){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=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Xc(t,"open",this.onopen.bind(this)),Xc(t,"packet",this.onpacket.bind(this)),Xc(t,"error",this.onerror.bind(this)),Xc(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,...r){var a,s,i;if(Dse.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const o={type:Hn.EVENT,data:r};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const h=this.ids++,u=r.pop();this._registerAckCallback(h,u),o.id=h}const l=(s=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||s===void 0?void 0:s.writable,c=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,r){var a;const s=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(s===void 0){this.acks[t]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},s),o=(...l)=>{this.io.clearTimeoutFn(i),r.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...r){return new Promise((a,s)=>{const i=(o,l)=>o?s(o):a(l);i.withError=!0,r.push(i),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>(this._queue[0],s!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...i)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.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:Hn.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,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}
vendor: 7,089 bytes, line 644
644_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){const a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Hn.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 Hn.EVENT:case Hn.BINARY_EVENT:this.onevent(t);break;case Hn.ACK:case Hn.BINARY_ACK:this.onack(t);break;case Hn.DISCONNECT:this.ondisconnect();break;case Hn.CONNECT_ERROR:this.destroy();const a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.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 r=this;let a=!1;return function(...s){a||(a=!0,r.packet({type:Hn.ACK,id:t,data:s}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,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:Hn.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 r=this._anyListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,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 r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(t===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,t.data)}}}function gx(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}gx.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};gx.prototype.reset=function(){this.attempts=0};gx.prototype.setMin=function(e){this.ms=e};gx.prototype.setMax=function(e){this.max=e};gx.prototype.setJitter=function(e){this.jitter=e};class QC extends Ss{constructor(t,r){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,nj(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((a=r.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new gx({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const s=r.parser||Ise;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=r.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 r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.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 wse(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const s=Xc(r,"open",function(){a.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Xc(r,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),r.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(s),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(Xc(t,"ping",this.onping.bind(this)),Xc(t,"data",this.ondata.bind(this)),Xc(t,"error",this.onerror.bind(this)),Xc(t,"close",this.onclose.bind(this)),Xc(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){tj(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new N$(this,t,r),this.nsps[t]=a),a}_destroy(t){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let a=0;a<r.length;a++)this.engine.write(r[a],t.options)}
644cleanup(){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,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),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 r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Jx={};function s1(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=jse(e,t.path||"/socket.io"),a=r.source,s=r.id,i=r.path,o=Jx[s]&&i in Jx[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new QC(a,t):(Jx[s]||(Jx[s]=new QC(a,t)),c=Jx[s]),r.query&&!t.query&&(t.query=r.queryKey),c.socket(r.path,t)}Object.assign(s1,{Manager:QC,Socket:N$,io:s1,connect:s1});const Fse=250;function EO(e,t){var r;const a=(r=e.token)!==null&&r!==void 0?r:Zh(),s={app_id:e.appId};a?s.token=a:s.anonymous_id=S1();const i=s1(e.serverUrl,{path:e.mountPath,transports:e.transports,query:s});return i.on("connect",async()=>{var o;return console.log("connect",i.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),i.on("update_model",async o=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,o)}),i.on("error",async o=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),i.on("connect_error",async o=>{var l;return console.error("connect_error",o),(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),i}function qse({config:e}){let t={...e};const r={},a={},s={connect:async()=>{const x=[];Object.keys(r).forEach(w=>{const j=f(w);
644j.length!==0&&(d(w),j.forEach(({connect:N})=>{const _=async()=>N==null?void 0:N();x.push(_())}))}),await Promise.all(x)},update_model:async x=>{const j=f(x.room).map(N=>{var _;return(_=N.update_model)===null||_===void 0?void 0:_.call(N,x)});await Promise.all(j)},error:async x=>{console.error("error",x);const w=Object.values(r).flat().map(j=>{var N;return(N=j.error)===null||N===void 0?void 0:N.call(j,x)});await Promise.all(w)}};let i=EO(e,s);function o(){l()}function l(){b(),i&&i.disconnect()}function c(x){o(),t={...t,...x},i=EO(t,s)}function d(x){i.emit("join",x)}function h(x){i.emit("leave",x)}async function u(x,w){var j;const N=JSON.stringify(w);return(j=s.update_model)===null||j===void 0?void 0:j.call(s,{room:x,data:N})}function f(x){var w;return(w=r[x])!==null&&w!==void 0?w:[]}function m(x){const w=a[x];w&&(clearTimeout(w),delete a[x])}function b(){Object.keys(a).forEach(x=>{var w,j;clearTimeout(a[x]),delete a[x],((j=(w=r[x])===null||w===void 0?void 0:w.length)!==null&&j!==void 0?j:0)===0&&delete r[x]})}function g(x){m(x),a[x]=setTimeout(()=>{var w,j;delete a[x],!(((j=(w=r[x])===null||w===void 0?void 0:w.length)!==null&&j!==void 0?j:0)>0)&&(h(x),delete r[x])},Fse)}return{socket:i,subscribeToRoom:(x,w)=>{r[x]?m(x):(d(x),r[x]=[]),r[x].push(w);let j=!1;return()=>{var N,_;j||(j=!0,r[x]=(_=(N=r[x])===null||N===void 0?void 0:N.filter(S=>S!==w))!==null&&_!==void 0?_:[],r[x].length===0&&g(x))}},updateConfig:c,updateModel:u,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
645  PartySocket requires a global 'EventTarget' class to be available!
646  You can polyfill this global by adding this to your code before any partysocket imports: 
647  
648  \`\`\`
649  import 'partysocket/event-target-polyfill';
650  \`\`\`
651  Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
652`);var _$=class extends Event{constructor(t,r){super("error",r);pa(this,"message");pa(this,"error");this.message=t.message,this.error=t}},S$=class extends Event{constructor(t=1e3,r="",a){super("close",a);pa(this,"code");pa(this,"reason");pa(this,"wasClean",!0);this.code=t,this.reason=r}},yN={Event,ErrorEvent:_$,CloseEvent:S$};function Bse(e,t){if(!e)throw new Error(t)}function $se(e){return new e.constructor(e.type,e)}function Use(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new S$(e.code||1999,e.reason||"unknown reason",e):"error"in e?new _$(e.error,e):new Event(e.type,e)}var Aq,zse=typeof process<"u"&&typeof((Aq=process.versions)==null?void 0:Aq.node)<"u"&&typeof document>"u",pb=zse?Use:$se,Uf={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},TO=!1,Vse=class Wf extends EventTarget{constructor(r,a,s={}){super();pa(this,"_ws");pa(this,"_retryCount",-1);pa(this,"_uptimeTimeout");pa(this,"_connectTimeout");pa(this,"_shouldReconnect",!0);pa(this,"_connectLock",!1);pa(this,"_binaryType","blob");pa(this,"_closeCalled",!1);pa(this,"_messageQueue",[]);pa(this,"_url");pa(this,"_protocols");pa(this,"_options");pa(this,"onclose",null);pa(this,"onerror",null);pa(this,"onmessage",null);pa(this,"onopen",null);pa(this,"_handleOpen",r=>{this._debug("open event");const{minUptime:a=Uf.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),a),Bse(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(s=>{var i;return(i=this._ws)==null?void 0:i.send(s)}),this._messageQueue=[],this.onopen&&this.onopen(r),this.dispatchEvent(pb(r))});pa(this,"_handleMessage",r=>{this._debug("message event"),this.onmessage&&this.onmessage(r),this.dispatchEvent(pb(r))});pa(this,"_handleError",r=>{this._debug("error event",r.message),this._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(r),this._debug("exec error listeners"),this.dispatchEvent(pb(r)),this._connect()});pa(this,"_handleClose",r=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(r),this.dispatchEvent(pb(r))});this._url=r,this._protocols=a,this._options=s,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Wf.CONNECTING}get OPEN(){return Wf.OPEN}get CLOSING(){return Wf.CLOSING}get CLOSED(){return Wf.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(r){this._binaryType=r,this._ws&&(this._ws.binaryType=r)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((a,s)=>(typeof s=="string"?a+=s.length:s instanceof Blob?a+=s.size:a+=s.byteLength,a),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Wf.CLOSED:Wf.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(r=1e3,a){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(r,a)}reconnect(r,a){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(r,a),this._connect())}send(r){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",r),this._ws.send(r);else{const{maxEnqueuedMessages:a=Uf.maxEnqueuedMessages}=this._options;this._messageQueue.length<a&&(this._debug("enqueue",r),this._messageQueue.push(r))}}_debug(...r){this._options.debug&&console.log.apply(console,["RWS>",...r])}_getNextDelay(){const{reconnectionDelayGrowFactor:r=Uf.reconnectionDelayGrowFactor,minReconnectionDelay:a=Uf.minReconnectionDelay,maxReconnectionDelay:s=Uf.maxReconnectionDelay}=this._options;let i=0;return this._retryCount>0&&(i=a*Math.pow(r,this._retryCount-1),i>s&&(i=s)),this._debug("next delay",i),i}
652_wait(){return new Promise(r=>{setTimeout(r,this._getNextDelay())})}_getNextProtocols(r){if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(typeof r=="function"){const a=r();if(!a)return Promise.resolve(null);if(typeof a=="string"||Array.isArray(a))return Promise.resolve(a);if(a.then)return a}throw Error("Invalid protocols")}_getNextUrl(r){if(typeof r=="string")return Promise.resolve(r);if(typeof r=="function"){const a=r();if(typeof a=="string")return Promise.resolve(a);if(a.then)return a}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:r=Uf.maxRetries,connectionTimeout:a=Uf.connectionTimeout}=this._options;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([s,i])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!TO&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. 
653
654For example, if you're using node.js, run \`npm install ws\`, and then in your code:
655
656import PartySocket from 'partysocket';
657import WS from 'ws';
658
659const partysocket = new PartySocket({
660  host: "127.0.0.1:1999",
661  room: "test-room",
662  WebSocket: WS
663});
664
665`),TO=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:s,protocols:i}),this._ws=i?new o(s,i):new o(s),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),a)}).catch(s=>{this._connectLock=!1,this._handleError(new yN.ErrorEvent(Error(s.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new yN.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(r=1e3,a){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(r,a),this._handleClose(new yN.CloseEvent(r,a,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*!
666 * Reconnecting WebSocket
667 * by Pedro Ladaria <[email protected]>
668 * https://github.com/pladaria/reconnecting-websocket
669 * License MIT
670 */const Hse=1e3,Wse=3e3,Kse=new Set([405,409,422,503]),Gse=new Set([400,403,404]);function Yse(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function Qse(e){return e instanceof Error?e:new Error(String(e))}class Xse{constructor(t,r,a,s,i){var o;this.onClose=i,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=s==null?void 0:s.id)!==null&&o!==void 0?o:crypto.randomUUID();let l=a.transport==="proxy";const c=async()=>{var f;if(this.closed)throw new Error("Actor connection is closed");if(!l)try{const{websocket_url:m,token:b}=await a.mintConnectionToken(t,r,this.id),g=m.includes("?")?"&":"?";return`${m}${g}token=${encodeURIComponent(b)}`}catch(m){const b=Yse(m);if(!(a.transport!=="direct"&&b!==void 0&&Kse.has(b))){b!==void 0&&Gse.has(b)&&this.close();try{(f=a.onMintError)===null||f===void 0||f.call(a,Qse(m))}catch{}throw m}l=!0}return Zse(a.host,t,r,this.id,a.appId,a.getAuthToken(),a.functionsVersion)},d=new Vse(c);this.ws=d;let h=Date.now();const u=()=>{h=Date.now()};d.addEventListener("open",u),d.addEventListener("message",f=>{u();let m;try{m=JSON.parse(f.data)}catch{return}if((m&&typeof m=="object"?m.type:void 0)!=="__pong")for(const g of this.listeners)g(m)}),this.heartbeat=setInterval(()=>{if(Date.now()-h>Wse){u(),d.readyState===d.OPEN&&d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},Hse)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function Jse(e,t,r,a){let s=null;return{connect(i){if(s)return s;const o=new Xse(e,t,r,i,()=>{a.delete(o),s===o&&(s=null)});return s=o,a.add(o),o}}}function Zse(e,t,r,a,s,i,o){let l=e.replace(/^(http|https|ws|wss):\/\//,"");l.endsWith("/")&&(l=l.slice(0,-1));const c=l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:"),d=new URLSearchParams([["_pk",a],["app_id",s],["handler",t]]);
670return i&&d.append("token",i),o&&d.append("fv",o),`${c?"ws":"wss"}://${l}/parties/${t}/${r}?${d}`}function eie(e,t){return e&&!e.startsWith("/")?e:t??e}function tie(e){const t=new Set;return{module:new Proxy({},{get(a,s){if(!(typeof s!="string"||s==="then"))return i=>Jse(s,i,e,t)}}),closeAll:()=>{for(const a of[...t])a.close()}}}function nie(e){var t,r,a,s;const{serverUrl:i="https://base44.app",appId:o,analytics:l,token:c,serviceToken:d,requiresAuth:h=!1,appBaseUrl:u,options:f,functionsVersion:m,headers:b}=e,g=typeof u=="string"?u:"",y={serverUrl:i,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:c};let x=null;const w=()=>(x||(x=qse({config:y})),x),j={...b,"X-App-Id":String(o)},N=b==null?void 0:b["Base44-State"],_=N?{"Base44-State":N}:{},S=m?{...j,"Base44-Functions-Version":m}:j,A=Bp({baseURL:`${i}/api`,headers:j,token:c,onError:f==null?void 0:f.onError}),T=Bp({baseURL:`${i}/api`,headers:S,token:c,interceptResponses:!1,onError:f==null?void 0:f.onError}),R={...j,...c?{"on-behalf-of":`Bearer ${c}`}:{}},M=Bp({baseURL:`${i}/api`,headers:R,token:d,onError:f==null?void 0:f.onError}),k=Bp({baseURL:`${i}/api`,headers:S,token:d,interceptResponses:!1}),P=Bp({baseURL:`${i}/api`,headers:j}),O=Tae(A,T,o,{appBaseUrl:g,token:c});if(typeof window<"u"){const Y=c||Zh();Y&&O.setToken(Y)}const F=tie({appId:o,host:eie(i,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:m,getAuthToken:()=>c||Zh(),mintConnectionToken:async(Y,ee,J)=>{const H=c||Zh();return await P.post(`/apps/${o}/actors/${encodeURIComponent(Y)}/connection-token`,{room:ee,connection_id:J},{headers:{...H?{Authorization:`Bearer ${H}`}:{},...m?{"Base44-Functions-Version":m}:{}}})},transport:f==null?void 0:f.actorsTransport,onMintError:f==null?void 0:f.onError}),$={entities:yO({axios:A,appId:o,getSocket:w}),integrations:bO(A,o),connectors:Iae(A,o),auth:O,functions:wO(T,o,{getAuthHeaders:()=>{const Y={},ee=c||Zh();return ee&&(Y.Authorization=`Bearer ${ee}`),Y},baseURL:(r=T.defaults)===null||r===void 0?void 0:r.baseURL}),agents:jO({axios:A,getSocket:w,appId:o,serverUrl:i,token:c}),aiGateway:_O({serverUrl:i,token:c,appId:o,headers:_}),appLogs:SO(A,o),app:Bae(A,o),users:$ae(A,o),analytics:gae({axiosClient:A,serverUrl:i,appId:o,userAuthModule:O,enabled:(a=l==null?void 0:l.enabled)!==null&&a!==void 0?a:!0}),actors:F.module,cleanup:()=>{$.analytics.cleanup(),F.closeAll(),x&&x.disconnect()}},G={entities:yO({axios:M,appId:o,getSocket:w}),integrations:bO(M,o),sso:Oae(M,o),connectors:Lae(M,o),functions:wO(k,o,{getAuthHeaders:()=>{const Y={};return d&&(Y.Authorization=`Bearer ${d}`),Y},baseURL:(s=k.defaults)===null||s===void 0?void 0:s.baseURL}),agents:jO({axios:M,getSocket:w,appId:o,serverUrl:i,token:c}),aiGateway:_O({serverUrl:i,token:d,appId:o,headers:_}),appLogs:SO(M,o),cleanup:()=>{x&&x.disconnect()}};return h&&typeof window<"u"&&setTimeout(async()=>{try{await $.auth.isAuthenticated()||$.auth.redirectToLogin(window.location.href)}catch(Y){console.error("Authentication check failed:",Y),$.auth.redirectToLogin(window.location.href)}},0),{...$,fetchWithAuth:Fae({axios:A,serviceRoleAxios:M,appId:String(o),serverUrl:i,functionsVersion:m,platformHeaders:b}),setToken(Y){$.auth.setToken(Y),x&&x.updateConfig({token:Y}),y.token=Y},getConfig(){return{serverUrl:i,appId:o,requiresAuth:h}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return G}}}const C$=typeof window>"u",rie=C$?{localStorage:new Map}:window,vN=rie.localStorage,aie=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Zx=(e,{defaultValue:t=void 0,removeFromUrl:r=!1}={})=>{if(C$)return t;const a=`base44_${aie(e)}`,s=new URLSearchParams(window.location.search),i=s.get(e);if(r){s.delete(e);const l=`${window.location.pathname}${s.toString()?`?${s.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(i)return vN.setItem(a,i),i;if(t)return vN.setItem(a,t),t;const o=vN.getItem(a);return o||null},sie=()=>({appId:Zx("app_id",{defaultValue:"6903417e7dc050165abb6978"}),serverUrl:Zx("server_url",{defaultValue:"https://base44.app"}),token:Zx("access_token",{removeFromUrl:!0}),fromUrl:Zx("from_url",{defaultValue:window.location.href}),functionsVersion:Zx("functions_version")}),$p={...sie()},{appId:iie,serverUrl:oie,token:lie,functionsVersion:cie}=$p,pe=nie({appId:iie,serverUrl:oie,token:lie,functionsVersion:cie,requiresAuth:!1}),A$=L.createContext(),die=({children:e})=>{const[t,r]=L.useState(null),[a,s]=L.useState(!1),[i,o]=L.useState(!0),[l,c]=L.useState(!0),[d,h]=L.useState(null),[u,f]=L.useState(null);L.useEffect(()=>{m()},[]);const m=async()=>{var x,w;try{c(!0),h(null);const j=Bp({baseURL:`${$p.serverUrl}/api/apps/public`,headers:{"X-App-Id":$p.appId},token:$p.token,interceptResponses:!0});try{const N=await j.get(`/prod/public-settings/by-id/${$p.appId}`);f(N),$p.token?await b():(o(!1),s(!1)),c(!1)}catch(N){if(console.error("App state check failed:",N),N.status===403&&((w=(x=N.data)==null?void 0:x.extra_data)!=null&&w.reason)){const _=N.data.extra_data.reason;h(_==="auth_required"?{type:"auth_required",message:"Authentication required"}:_==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:_,message:N.message})}else h({type:"unknown",message:N.message||"Failed to load app"});c(!1),o(!1)}}catch(j){console.error("Unexpected error:",j),h({type:"unknown",message:j.message||"An unexpected error occurred"}),c(!1),o(!1)}},b=async()=>{try{o(!0);const x=await pe.auth.me();r(x),s(!0),o(!1)}catch(x){console.error("User auth check failed:",x),o(!1),s(!1),(x.status===401||x.status===403)&&h({type:"auth_required",message:"Authentication required"})}},g=(x=!0)=>{r(null),s(!1),x?pe.auth.logout(window.location.href):pe.auth.logout()},y=()=>{pe.auth.redirectToLogin(window.location.href)};return n.jsx(A$.Provider,{value:{user:t,isAuthenticated:a,isLoadingAuth:i,isLoadingPublicSettings:l,authError:d,appPublicSettings:u,logout:g,navigateToLogin:y,checkAppState:m},children:e})},k$=()=>{const e=L.useContext(A$);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},_e=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
vendor: 4,313 bytes, line 670
670_e.displayName="Card";const Nt=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("flex flex-col space-y-1.5 p-6",e),...t}));Nt.displayName="CardHeader";const Pt=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("font-semibold leading-none tracking-tight",e),...t}));Pt.displayName="CardTitle";const wr=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("text-sm text-muted-foreground",e),...t}));wr.displayName="CardDescription";const Ce=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("p-6 pt-0",e),...t}));Ce.displayName="CardContent";const uie=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("flex items-center p-6 pt-0",e),...t}));uie.displayName="CardFooter";function OO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function P$(...e){return t=>{let r=!1;const a=e.map(s=>{const i=OO(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<a.length;s++){const i=a[s];typeof i=="function"?i():OO(e[s],null)}}}}function ea(...e){return L.useCallback(P$(...e),e)}function Pg(e){const t=fie(e),r=L.forwardRef((a,s)=>{const{children:i,...o}=a,l=L.Children.toArray(i),c=l.find(pie);if(c){const d=c.props.children,h=l.map(u=>u===c?L.Children.count(d)>1?L.Children.only(null):L.isValidElement(d)?d.props.children:null:u);return n.jsx(t,{...o,ref:s,children:L.isValidElement(d)?L.cloneElement(d,void 0,h):null})}return n.jsx(t,{...o,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var hie=Pg("Slot");function fie(e){const t=L.forwardRef((r,a)=>{const{children:s,...i}=r;if(L.isValidElement(s)){const o=xie(s),l=gie(i,s.props);return s.type!==L.Fragment&&(l.ref=a?P$(a,o):o),L.cloneElement(s,l)}return L.Children.count(s)>1?L.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mie=Symbol("radix.slottable");function pie(e){return L.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mie}function gie(e,t){const r={...t};for(const a in t){const s=e[a],i=t[a];/^on[A-Z]/.test(a)?s&&i?r[a]=(...l)=>{const c=i(...l);return s(...l),c}:s&&(r[a]=s):a==="style"?r[a]={...s,...i}:a==="className"&&(r[a]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function xie(e){var a,s;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const yie=lx("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-background 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"}}),me=L.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...s},i)=>{const o=a?hie:"button";return n.jsx(o,{className:Ln(yie({variant:t,size:r,className:e})),ref:i,...s})});me.displayName="Button";const Me=L.forwardRef(({className:e,type:t,...r},a)=>n.jsx("input",{type:t,className:Ln("flex h-9 w-full rounded-md border border-input bg-transparent 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:a,...r}));Me.displayName="Input";var vie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fn=vie.reduce((e,t)=>
vendor: 38,172 bytes, line 670
670{const r=Pg(`Primitive.${t}`),a=L.forwardRef((s,i)=>{const{asChild:o,...l}=s,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(c,{...l,ref:i})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function bie(e,t){e&&Z0.flushSync(()=>e.dispatchEvent(t))}var wie="Label",E$=L.forwardRef((e,t)=>n.jsx(Fn.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));E$.displayName=wie;var T$=E$;const jie=lx("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ye=L.forwardRef(({className:e,...t},r)=>n.jsx(T$,{ref:r,className:Ln(jie(),e),...t}));ye.displayName=T$.displayName;const en=L.forwardRef(({className:e,...t},r)=>n.jsx("textarea",{className:Ln("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:r,...t}));en.displayName="Textarea";function MO(e,[t,r]){return Math.min(r,Math.max(t,e))}function nr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Nie(e,t){const r=L.createContext(t),a=i=>{const{children:o,...l}=i,c=L.useMemo(()=>l,Object.values(l));return n.jsx(r.Provider,{value:c,children:o})};a.displayName=e+"Provider";function s(i){const o=L.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[a,s]}function ou(e,t=[]){let r=[];function a(i,o){const l=L.createContext(o),c=r.length;r=[...r,o];const d=u=>{var x;const{scope:f,children:m,...b}=u,g=((x=f==null?void 0:f[e])==null?void 0:x[c])||l,y=L.useMemo(()=>b,Object.values(b));return n.jsx(g.Provider,{value:y,children:m})};d.displayName=i+"Provider";function h(u,f){var g;const m=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,b=L.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[d,h]}const s=()=>{const i=r.map(o=>L.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return L.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[a,_ie(s,...t)]}function _ie(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(i)[`__scope${d}`];return{...l,...u}},{});return L.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function R3(e){const t=e+"CollectionProvider",[r,a]=ou(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:y,children:x}=g,w=we.useRef(null),j=we.useRef(new Map).current;return n.jsx(s,{scope:y,itemMap:j,collectionRef:w,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=Pg(l),d=we.forwardRef((g,y)=>{const{scope:x,children:w}=g,j=i(l,x),N=ea(y,j.collectionRef);return n.jsx(c,{ref:N,children:w})});d.displayName=l;const h=e+"CollectionItemSlot",u="data-radix-collection-item",f=Pg(h),m=we.forwardRef((g,y)=>{const{scope:x,children:w,...j}=g,N=we.useRef(null),_=ea(y,N),S=i(h,x);return we.useEffect(()=>(S.itemMap.set(N,{ref:N,...j}),()=>void S.itemMap.delete(N))),n.jsx(f,{[u]:"",ref:_,children:w})});m.displayName=h;function b(g){const y=i(e+"CollectionConsumer",g);return we.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const j=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((S,A)=>j.indexOf(S.ref.current)-j.indexOf(A.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:d,ItemSlot:m},b,a]}var Sie=L.createContext(void 0);function rj(e){const t=L.useContext(Sie);return e||t||"ltr"}function lf(e){const t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...r)=>{var a;return(a=t.current)==null?void 0:a.call(t,...r)},[])}function Cie(e,t=globalThis==null?void 0:globalThis.document){const r=lf(e);L.useEffect(()=>{const a=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var Aie="DismissableLayer",XC="dismissableLayer.update",kie="dismissableLayer.pointerDownOutside",Pie="dismissableLayer.focusOutside",LO,O$=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),I3=L.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,d=L.useContext(O$),[h,u]=L.useState(null),f=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=L.useState({}),b=ea(t,A=>u(A)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(y),w=h?g.indexOf(h):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,N=w>=x,_=Oie(A=>{const T=A.target,R=[...d.branches].some(M=>M.contains(T));!N||R||(s==null||s(A),o==null||o(A),A.defaultPrevented||l==null||l())},f),S=Mie(A=>{const T=A.target;[...d.branches].some(M=>M.contains(T))||(i==null||i(A),o==null||o(A),A.defaultPrevented||l==null||l())},f);return Cie(A=>{w===d.layers.size-1&&(a==null||a(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},f),L.useEffect(()=>{if(h)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(LO=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),RO(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=LO)}},[h,f,r,d]),L.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),RO())},[h,d]),L.useEffect(()=>{const A=()=>m({});return document.addEventListener(XC,A),()=>document.removeEventListener(XC,A)},[]),n.jsx(Fn.div,{...c,ref:b,style:{pointerEvents:j?N?"auto":"none":void 0,...e.style},onFocusCapture:nr(e.onFocusCapture,S.onFocusCapture),onBlurCapture:nr(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:nr(e.onPointerDownCapture,_.onPointerDownCapture)})});I3.displayName=Aie;var Eie="DismissableLayerBranch",Tie=L.forwardRef((e,t)=>{const r=L.useContext(O$),a=L.useRef(null),s=ea(t,a);return L.useEffect(()=>{const i=a.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),n.jsx(Fn.div,{...e,ref:s})});Tie.displayName=Eie;function Oie(e,t=globalThis==null?void 0:globalThis.document){const r=lf(e),a=L.useRef(!1),s=L.useRef(()=>{});return L.useEffect(()=>{const i=l=>{if(l.target&&!a.current){let c=function(){M$(kie,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);a.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function Mie(e,t=globalThis==null?void 0:globalThis.document){const r=lf(e),a=L.useRef(!1);return L.useEffect(()=>{const s=i=>{i.target&&!a.current&&M$(Pie,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function RO(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function M$(e,t,r,{discrete:a}){const s=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),a?bie(s,i):s.dispatchEvent(i)}var bN=0;function L$(){L.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??IO()),document.body.insertAdjacentElement("beforeend",e[1]??IO()),bN++,()=>{bN===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),bN--}},[])}function IO(){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 wN="focusScope.autoFocusOnMount",jN="focusScope.autoFocusOnUnmount",DO={bubbles:!1,cancelable:!0},Lie="FocusScope",D3=L.forwardRef((e,t)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[l,c]=L.useState(null),d=lf(s),h=lf(i),u=L.useRef(null),f=ea(t,g=>c(g)),m=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(a){let g=function(j){if(m.paused||!l)return;const N=j.target;l.contains(N)?u.current=N:Dh(u.current,{select:!0})},y=function(j){if(m.paused||!l)return;const N=j.relatedTarget;N!==null&&(l.contains(N)||Dh(u.current,{select:!0}))},x=function(j){if(document.activeElement===document.body)for(const _ of j)_.removedNodes.length>0&&Dh(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const w=new MutationObserver(x);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),w.disconnect()}}},[a,l,m.paused]),L.useEffect(()=>{if(l){qO.add(m);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(wN,DO);l.addEventListener(wN,d),l.dispatchEvent(x),x.defaultPrevented||(Rie(Bie(R$(l)),{select:!0}),document.activeElement===g&&Dh(l))}return()=>{l.removeEventListener(wN,d),setTimeout(()=>{const x=new CustomEvent(jN,DO);l.addEventListener(jN,h),l.dispatchEvent(x),x.defaultPrevented||Dh(g??document.body,{select:!0}),l.removeEventListener(jN,h),qO.remove(m)},0)}}},[l,d,h,m]);const b=L.useCallback(g=>{if(!r&&!a||m.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(y&&x){const w=g.currentTarget,[j,N]=Iie(w);j&&N?!g.shiftKey&&x===N?(g.preventDefault(),r&&Dh(j,{select:!0})):g.shiftKey&&x===j&&(g.preventDefault(),r&&Dh(N,{select:!0})):x===w&&g.preventDefault()}},[r,a,m.paused]);return n.jsx(Fn.div,{tabIndex:-1,...o,ref:f,onKeyDown:b})});D3.displayName=Lie;function Rie(e,{select:t=!1}={}){const r=document.activeElement;for(const a of e)if(Dh(a,{select:t}),document.activeElement!==r)return}function Iie(e){const t=R$(e),r=FO(t,e),a=FO(t.reverse(),e);return[r,a]}function R$(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function FO(e,t){for(const r of e)if(!Die(r,{upTo:t}))return r}function Die(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 Fie(e){return e instanceof HTMLInputElement&&"select"in e}function Dh(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Fie(e)&&t&&e.select()}}var qO=qie();function qie(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=BO(e,t),e.unshift(t)},remove(t){var r;e=BO(e,t),(r=e[0])==null||r.resume()}}}function BO(e,t){const r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function Bie(e){return e.filter(t=>t.tagName!=="A")}var Oi=globalThis!=null&&globalThis.document?L.useLayoutEffect:()=>{},$ie=kq[" useId ".trim().toString()]||(()=>{}),Uie=0;function Kd(e){const[t,r]=L.useState($ie());return Oi(()=>{r(a=>a??String(Uie++))},[e]),t?`radix-${t}`:""}const zie=["top","right","bottom","left"],cf=Math.min,Cl=Math.max,A1=Math.round,gb=Math.floor,Gd=e=>({x:e,y:e}),Vie={left:"right",right:"left",bottom:"top",top:"bottom"},Hie={start:"end",end:"start"};function JC(e,t,r){return Cl(e,cf(t,r))}function eh(e,t){return typeof e=="function"?e(t):e}function th(e){return e.split("-")[0]}function xx(e){return e.split("-")[1]}function F3(e){return e==="x"?"y":"x"}function q3(e){return e==="y"?"height":"width"}const Wie=new Set(["top","bottom"]);function Bd(e){return Wie.has(th(e))?"y":"x"}function B3(e){return F3(Bd(e))}function Kie(e,t,r){r===void 0&&(r=!1);const a=xx(e),s=B3(e),i=q3(s);let o=s==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=k1(o)),[o,k1(o)]}function Gie(e){const t=k1(e);return[ZC(e),t,ZC(t)]}function ZC(e){return e.replace(/start|end/g,t=>Hie[t])}const $O=["left","right"],UO=["right","left"],Yie=["top","bottom"],Qie=["bottom","top"];function Xie(e,t,r){switch(e){case"top":case"bottom":return r?t?UO:$O:t?$O:UO;case"left":case"right":return t?Yie:Qie;default:return[]}}function Jie(e,t,r,a){const s=xx(e);let i=Xie(th(e),r==="start",a);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(ZC)))),i}function k1(e){return e.replace(/left|right|bottom|top/g,t=>Vie[t])}function Zie(e){return{top:0,right:0,bottom:0,left:0,...e}}function I$(e){return typeof e!="number"?Zie(e):{top:e,right:e,bottom:e,left:e}}function P1(e){const{x:t,y:r,width:a,height:s}=e;return{width:a,height:s,top:r,left:t,right:t+a,bottom:r+s,x:t,y:r}}function zO(e,t,r){let{reference:a,floating:s}=e;const i=Bd(t),o=B3(t),l=q3(o),c=th(t),d=i==="y",h=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=a[l]/2-s[l]/2;let m;switch(c){case"top":m={x:h,y:a.y-s.height};break;case"bottom":m={x:h,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:u};break;case"left":m={x:a.x-s.width,y:u};break;default:m={x:a.x,y:a.y}}switch(xx(t)){case"start":m[o]-=f*(r&&d?-1:1);break;case"end":m[o]+=f*(r&&d?-1:1);break}return m}const eoe=async(e,t,r)=>{const{placement:a="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:u}=zO(d,a,c),f=a,m={},b=0;for(let g=0;g<l.length;g++){const{name:y,fn:x}=l[g],{x:w,y:j,data:N,reset:_}=await x({x:h,y:u,initialPlacement:a,placement:f,strategy:s,middlewareData:m,rects:d,platform:o,elements:{reference:e,floating:t}});h=w??h,u=j??u,m={...m,[y]:{...m[y],...N}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(d=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:h,y:u}=zO(d,f,c)),g=-1)}return{x:h,y:u,placement:f,strategy:s,middlewareData:m}};async function e0(e,t){var r;t===void 0&&(t={});const{x:a,y:s,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=eh(t,e),b=I$(m),y=l[f?u==="floating"?"reference":"floating":u],x=P1(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:h,strategy:c})),w=u==="floating"?{x:a,y:s,width:o.floating.width,height:o.floating.height}:o.reference,j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),N=await(i.isElement==null?void 0:i.isElement(j))?await(i.getScale==null?void 0:i.getScale(j))||{x:1,y:1}:{x:1,y:1},_=P1(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:j,strategy:c}):w);return{top:(x.top-_.top+b.top)/N.y,bottom:(_.bottom-x.bottom+b.bottom)/N.y,left:(x.left-_.left+b.left)/N.x,right:(_.right-x.right+b.right)/N.x}}const toe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:a,placement:s,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:h=0}=eh(e,t)||{};if(d==null)return{};const u=I$(h),f={x:r,y:a},m=B3(s),b=q3(m),g=await o.getDimensions(d),y=m==="y",x=y?"top":"left",w=y?"bottom":"right",j=y?"clientHeight":"clientWidth",N=i.reference[b]+i.reference[m]-f[m]-i.floating[b],_=f[m]-i.reference[m],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let A=S?S[j]:0;(!A||!await(o.isElement==null?void 0:o.isElement(S)))&&(A=l.floating[j]||i.floating[b]);const T=N/2-_/2,R=A/2-g[b]/2-1,M=cf(u[x],R),k=cf(u[w],R),P=M,O=A-g[b]-k,F=A/2-g[b]/2+T,$=JC(P,F,O),G=!c.arrow&&xx(s)!=null&&F!==$&&i.reference[b]/2-(F<P?M:k)-g[b]/2<0,B=G?F<P?F-P:F-O:0;return{[m]:f[m]+B,data:{[m]:$,centerOffset:F-$-B,...G&&{alignmentOffset:B}},reset:G}}}),noe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;const{placement:s,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...y}=eh(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const x=th(s),w=Bd(l),j=th(l)===l,N=await(c.isRTL==null?void 0:c.isRTL(d.floating)),_=f||(j||!g?[k1(l)]:Gie(l)),S=b!=="none";!f&&S&&_.push(...Jie(l,g,b,N));const A=[l,..._],T=await e0(t,y),R=[];let M=((a=i.flip)==null?void 0:a.overflows)||[];if(h&&R.push(T[x]),u){const F=Kie(s,o,N);R.push(T[F[0]],T[F[1]])}if(M=[...M,{placement:s,overflows:R}],!R.every(F=>F<=0)){var k,P;const F=(((k=i.flip)==null?void 0:k.index)||0)+1,$=A[F];if($&&(!(u==="alignment"?w!==Bd($):!1)||M.every(Y=>Bd(Y.placement)===w?Y.overflows[0]>0:!0)))return{data:{index:F,overflows:M},reset:{placement:$}};let G=(P=M.filter(B=>B.overflows[0]<=0).sort((B,Y)=>B.overflows[1]-Y.overflows[1])[0])==null?void 0:P.placement;if(!G)switch(m){case"bestFit":{var O;const B=(O=M.filter(Y=>{if(S){const ee=Bd(Y.placement);return ee===w||ee==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ee=>ee>0).reduce((ee,J)=>ee+J,0)]).sort((Y,ee)=>Y[1]-ee[1])[0])==null?void 0:O[0];B&&(G=B);break}case"initialPlacement":G=l;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function VO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function HO(e){return zie.some(t=>e[t]>=0)}const roe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:a="referenceHidden",...s}=eh(e,t);switch(a){case"referenceHidden":{const i=await e0(t,{...s,elementContext:"reference"}),o=VO(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:HO(o)}}}case"escaped":{const i=await e0(t,{...s,altBoundary:!0}),o=VO(i,r.floating);return{data:{escapedOffsets:o,escaped:HO(o)}}}default:return{}}}}},D$=new Set(["left","top"]);async function aoe(e,t){const{placement:r,platform:a,elements:s}=e,i=await(a.isRTL==null?void 0:a.isRTL(s.floating)),o=th(r),l=xx(r),c=Bd(r)==="y",d=D$.has(o)?-1:1,h=i&&c?-1:1,u=eh(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*h,y:f*d}:{x:f*d,y:m*h}}const soe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;const{x:s,y:i,placement:o,middlewareData:l}=t,c=await aoe(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},ioe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:a,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...c}=eh(e,t),d={x:r,y:a},h=await e0(t,c),u=Bd(th(s)),f=F3(u);let m=d[f],b=d[u];if(i){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+h[y],j=m-h[x];m=JC(w,m,j)}if(o){const y=u==="y"?"top":"left",x=u==="y"?"bottom":"right",w=b+h[y],j=b-h[x];b=JC(w,b,j)}const g=l.fn({...t,[f]:m,[u]:b});return{...g,data:{x:g.x-r,y:g.y-a,enabled:{[f]:i,[u]:o}}}}}},ooe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:a,placement:s,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=eh(e,t),h={x:r,y:a},u=Bd(s),f=F3(u);let m=h[f],b=h[u];const g=eh(l,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const j=f==="y"?"height":"width",N=i.reference[f]-i.floating[j]+y.mainAxis,_=i.reference[f]+i.reference[j]-y.mainAxis;m<N?m=N:m>_&&(m=_)}if(d){var x,w;const j=f==="y"?"width":"height",N=D$.has(th(s)),_=i.reference[u]-i.floating[j]+(N&&((x=o.offset)==null?void 0:x[u])||0)+(N?0:y.crossAxis),S=i.reference[u]+i.reference[j]+(N?0:((w=o.offset)==null?void 0:w[u])||0)-(N?y.crossAxis:0);b<_?b=_:b>S&&(b=S)}return{[f]:m,[u]:b}}}},loe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;const{placement:s,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...d}=eh(e,t),h=await e0(t,d),u=th(s),f=xx(s),m=Bd(s)==="y",{width:b,height:g}=i.floating;let y,x;u==="top"||u==="bottom"?(y=u,x=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=u,y=f==="end"?"top":"bottom");const w=g-h.top-h.bottom,j=b-h.left-h.right,N=cf(g-h[y],w),_=cf(b-h[x],j),S=!t.middlewareData.shift;let A=N,T=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=j),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(A=w),S&&!f){const M=Cl(h.left,0),k=Cl(h.right,0),P=Cl(h.top,0),O=Cl(h.bottom,0);m?T=b-2*(M!==0||k!==0?M+k:Cl(h.left,h.right)):A=g-2*(P!==0||O!==0?P+O:Cl(h.top,h.bottom))}await c({...t,availableWidth:T,availableHeight:A});const R=await o.getDimensions(l.floating);return b!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function aj(){return typeof window<"u"}function yx(e){return F$(e)?(e.nodeName||"").toLowerCase():"#document"}function Ol(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lu(e){var t;return(t=(F$(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F$(e){return aj()?e instanceof Node||e instanceof Ol(e).Node:!1}function id(e){return aj()?e instanceof Element||e instanceof Ol(e).Element:!1}function nu(e){return aj()?e instanceof HTMLElement||e instanceof Ol(e).HTMLElement:!1}function WO(e){return!aj()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ol(e).ShadowRoot}const coe=new Set(["inline","contents"]);function av(e){const{overflow:t,overflowX:r,overflowY:a,display:s}=od(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&!coe.has(s)}const doe=new Set(["table","td","th"]);function uoe(e){return doe.has(yx(e))}const hoe=[":popover-open",":modal"];function sj(e){return hoe.some(t=>{try{return e.matches(t)}catch{return!1}})}const foe=["transform","translate","scale","rotate","perspective"],moe=["transform","translate","scale","rotate","perspective","filter"],poe=["paint","layout","strict","content"];function $3(e){const t=U3(),r=id(e)?od(e):e;return foe.some(a=>r[a]?r[a]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||moe.some(a=>(r.willChange||"").includes(a))||poe.some(a=>(r.contain||"").includes(a))}function goe(e){let t=df(e);for(;nu(t)&&!Eg(t);){if($3(t))return t;if(sj(t))return null;t=df(t)}return null}function U3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xoe=new Set(["html","body","#document"]);function Eg(e){return xoe.has(yx(e))}function od(e){return Ol(e).getComputedStyle(e)}function ij(e){return id(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function df(e){if(yx(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WO(e)&&e.host||lu(e);return WO(t)?t.host:t}function q$(e){const t=df(e);return Eg(t)?e.ownerDocument?e.ownerDocument.body:e.body:nu(t)&&av(t)?t:q$(t)}function t0(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=q$(e),i=s===((a=e.ownerDocument)==null?void 0:a.body),o=Ol(s);if(i){const l=eA(o);return t.concat(o,o.visualViewport||[],av(s)?s:[],l&&r?t0(l):[])}return t.concat(s,t0(s,[],r))}function eA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function B$(e){const t=od(e);let r=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=nu(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:a,l=A1(r)!==i||A1(a)!==o;return l&&(r=i,a=o),{width:r,height:a,$:l}}function z3(e){return id(e)?e:e.contextElement}function rg(e){const t=z3(e);if(!nu(t))return Gd(1);const r=t.getBoundingClientRect(),{width:a,height:s,$:i}=B$(t);let o=(i?A1(r.width):r.width)/a,l=(i?A1(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const yoe=Gd(0);function $$(e){const t=Ol(e);return!U3()||!t.visualViewport?yoe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function voe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ol(e)?!1:t}function Dm(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=z3(e);let o=Gd(1);t&&(a?id(a)&&(o=rg(a)):o=rg(e));const l=voe(i,r,a)?$$(i):Gd(0);let c=(s.left+l.x)/o.x,d=(s.top+l.y)/o.y,h=s.width/o.x,u=s.height/o.y;if(i){const f=Ol(i),m=a&&id(a)?Ol(a):a;let b=f,g=eA(b);for(;g&&a&&m!==b;){const y=rg(g),x=g.getBoundingClientRect(),w=od(g),j=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,N=x.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,d*=y.y,h*=y.x,u*=y.y,c+=j,d+=N,b=Ol(g),g=eA(b)}}return P1({width:h,height:u,x:c,y:d})}function oj(e,t){const r=ij(e).scrollLeft;return t?t.left+r:Dm(lu(e)).left+r}function U$(e,t){const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-oj(e,r),s=r.top+t.scrollTop;return{x:a,y:s}}function boe(e){let{elements:t,rect:r,offsetParent:a,strategy:s}=e;const i=s==="fixed",o=lu(a),l=t?sj(t.floating):!1;if(a===o||l&&i)return r;let c={scrollLeft:0,scrollTop:0},d=Gd(1);const h=Gd(0),u=nu(a);if((u||!u&&!i)&&((yx(a)!=="body"||av(o))&&(c=ij(a)),nu(a))){const m=Dm(a);d=rg(a),h.x=m.x+a.clientLeft,h.y=m.y+a.clientTop}const f=o&&!u&&!i?U$(o,c):Gd(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+h.x+f.x,y:r.y*d.y-c.scrollTop*d.y+h.y+f.y}}function woe(e){return Array.from(e.getClientRects())}function joe(e){const t=lu(e),r=ij(e),a=e.ownerDocument.body,s=Cl(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),i=Cl(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-r.scrollLeft+oj(e);const l=-r.scrollTop;return od(a).direction==="rtl"&&(o+=Cl(t.clientWidth,a.clientWidth)-s),{width:s,height:i,x:o,y:l}}const KO=25;function Noe(e,t){const r=Ol(e),a=lu(e),s=r.visualViewport;let i=a.clientWidth,o=a.clientHeight,l=0,c=0;if(s){i=s.width,o=s.height;const h=U3();(!h||h&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}const d=oj(a);if(d<=0){const h=a.ownerDocument,u=h.body,f=getComputedStyle(u),m=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,b=Math.abs(a.clientWidth-u.clientWidth-m);b<=KO&&(i-=b)}else d<=KO&&(i+=d);return{width:i,height:o,x:l,y:c}}const _oe=new Set(["absolute","fixed"]);function Soe(e,t){const r=Dm(e,!0,t==="fixed"),a=r.top+e.clientTop,s=r.left+e.clientLeft,i=nu(e)?rg(e):Gd(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,d=a*i.y;return{width:o,height:l,x:c,y:d}}function GO(e,t,r){let a;if(t==="viewport")a=Noe(e,r);else if(t==="document")a=joe(lu(e));else if(id(t))a=Soe(t,r);else{const s=$$(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return P1(a)}function z$(e,t){const r=df(e);return r===t||!id(r)||Eg(r)?!1:od(r).position==="fixed"||z$(r,t)}function Coe(e,t){const r=t.get(e);if(r)return r;let a=t0(e,[],!1).filter(l=>id(l)&&yx(l)!=="body"),s=null;const i=od(e).position==="fixed";let o=i?df(e):e;for(;id(o)&&!Eg(o);){const l=od(o),c=$3(o);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&_oe.has(s.position)||av(o)&&!c&&z$(e,o))?a=a.filter(h=>h!==o):s=l,o=df(o)}return t.set(e,a),a}function Aoe(e){let{element:t,boundary:r,rootBoundary:a,strategy:s}=e;const o=[...r==="clippingAncestors"?sj(t)?[]:Coe(t,this._c):[].concat(r),a],l=o[0],c=o.reduce((d,h)=>{const u=GO(t,h,s);return d.top=Cl(u.top,d.top),d.right=cf(u.right,d.right),d.bottom=cf(u.bottom,d.bottom),d.left=Cl(u.left,d.left),d},GO(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function koe(e){const{width:t,height:r}=B$(e);return{width:t,height:r}}function Poe(e,t,r){const a=nu(t),s=lu(t),i=r==="fixed",o=Dm(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Gd(0);function d(){c.x=oj(s)}if(a||!a&&!i)if((yx(t)!=="body"||av(s))&&(l=ij(t)),a){const m=Dm(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&d();i&&!a&&s&&d();const h=s&&!a&&!i?U$(s,l):Gd(0),u=o.left+l.scrollLeft-c.x-h.x,f=o.top+l.scrollTop-c.y-h.y;return{x:u,y:f,width:o.width,height:o.height}}function NN(e){return od(e).position==="static"}function YO(e,t){if(!nu(e)||od(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return lu(e)===r&&(r=r.ownerDocument.body),r}function V$(e,t){const r=Ol(e);if(sj(e))return r;if(!nu(e)){let s=df(e);for(;s&&!Eg(s);){if(id(s)&&!NN(s))return s;s=df(s)}return r}let a=YO(e,t);for(;a&&uoe(a)&&NN(a);)a=YO(a,t);return a&&Eg(a)&&NN(a)&&!$3(a)?r:a||goe(e)||r}const Eoe=async function(e){const t=this.getOffsetParent||V$,r=this.getDimensions,a=await r(e.floating);return{reference:Poe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Toe(e){return od(e).direction==="rtl"}const Ooe={convertOffsetParentRelativeRectToViewportRelativeRect:boe,getDocumentElement:lu,getClippingRect:Aoe,getOffsetParent:V$,getElementRects:Eoe,getClientRects:woe,getDimensions:koe,getScale:rg,isElement:id,isRTL:Toe};function H$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Moe(e,t){let r=null,a;const s=lu(e);function i(){var l;clearTimeout(a),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:h,top:u,width:f,height:m}=d;if(l||t(),!f||!m)return;const b=gb(u),g=gb(s.clientWidth-(h+f)),y=gb(s.clientHeight-(u+m)),x=gb(h),j={rootMargin:-b+"px "+-g+"px "+-y+"px "+-x+"px",threshold:Cl(0,cf(1,c))||1};let N=!0;function _(S){const A=S[0].intersectionRatio;if(A!==c){if(!N)return o();A?o(!1,A):a=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!H$(d,e.getBoundingClientRect())&&o(),N=!1}try{r=new IntersectionObserver(_,{...j,root:s.ownerDocument})}catch{r=new IntersectionObserver(_,j)}r.observe(e)}return o(!0),i}function Loe(e,t,r,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,d=z3(e),h=s||i?[...d?t0(d):[],...t0(t)]:[];h.forEach(x=>{s&&x.addEventListener("scroll",r,{passive:!0}),i&&x.addEventListener("resize",r)});const u=d&&l?Moe(d,r):null;let f=-1,m=null;o&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var j;(j=m)==null||j.observe(t)})),r()}),d&&!c&&m.observe(d),m.observe(t));let b,g=c?Dm(e):null;c&&y();function y(){const x=Dm(e);g&&!H$(g,x)&&r(),g=x,b=requestAnimationFrame(y)}return r(),()=>{var x;h.forEach(w=>{s&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),u==null||u(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Roe=soe,Ioe=ioe,Doe=noe,Foe=loe,qoe=roe,QO=toe,Boe=ooe,$oe=(e,t,r)=>{const a=new Map,s={platform:Ooe,...r},i={...s.platform,_c:a};return eoe(e,t,{...s,platform:i})};var Uoe=typeof document<"u",zoe=function(){},i1=Uoe?L.useLayoutEffect:zoe;function E1(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 r,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!E1(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=r;a--!==0;){const i=s[a];if(!(i==="_owner"&&e.$$typeof)&&!E1(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function W$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XO(e,t){const r=W$(e);return Math.round(t*r)/r}function _N(e){const t=L.useRef(e);return i1(()=>{t.current=e}),t}function Voe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:s,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[h,u]=L.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=L.useState(a);E1(f,a)||m(a);const[b,g]=L.useState(null),[y,x]=L.useState(null),w=L.useCallback(Y=>{Y!==S.current&&(S.current=Y,g(Y))},[]),j=L.useCallback(Y=>{Y!==A.current&&(A.current=Y,x(Y))},[]),N=i||b,_=o||y,S=L.useRef(null),A=L.useRef(null),T=L.useRef(h),R=c!=null,M=_N(c),k=_N(s),P=_N(d),O=L.useCallback(()=>{if(!S.current||!A.current)return;const Y={placement:t,strategy:r,middleware:f};k.current&&(Y.platform=k.current),$oe(S.current,A.current,Y).then(ee=>{const J={...ee,isPositioned:P.current!==!1};F.current&&!E1(T.current,J)&&(T.current=J,Z0.flushSync(()=>{u(J)}))})},[f,t,r,k,P]);i1(()=>{d===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(Y=>({...Y,isPositioned:!1})))},[d]);const F=L.useRef(!1);i1(()=>(F.current=!0,()=>{F.current=!1}),[]),i1(()=>{if(N&&(S.current=N),_&&(A.current=_),N&&_){if(M.current)return M.current(N,_,O);O()}},[N,_,O,M,R]);const $=L.useMemo(()=>({reference:S,floating:A,setReference:w,setFloating:j}),[w,j]),G=L.useMemo(()=>({reference:N,floating:_}),[N,_]),B=L.useMemo(()=>{const Y={position:r,left:0,top:0};if(!G.floating)return Y;const ee=XO(G.floating,h.x),J=XO(G.floating,h.y);return l?{...Y,transform:"translate("+ee+"px, "+J+"px)",...W$(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ee,top:J}},[r,l,G.floating,h.x,h.y]);return L.useMemo(()=>({...h,update:O,refs:$,elements:G,floatingStyles:B}),[h,O,$,G,B])}const Hoe=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:s}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?QO({element:a.current,padding:s}).fn(r):{}:a?QO({element:a,padding:s}).fn(r):{}}}},Woe=(e,t)=>({...Roe(e),options:[e,t]}),Koe=(e,t)=>({...Ioe(e),options:[e,t]}),Goe=(e,t)=>({...Boe(e),options:[e,t]}),Yoe=(e,t)=>({...Doe(e),options:[e,t]}),Qoe=(e,t)=>({...Foe(e),options:[e,t]}),Xoe=(e,t)=>({...qoe(e),options:[e,t]}),Joe=(e,t)=>({...Hoe(e),options:[e,t]});var Zoe="Arrow",K$=L.forwardRef((e,t)=>{const{children:r,width:a=10,height:s=5,...i}=e;return n.jsx(Fn.svg,{...i,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});K$.displayName=Zoe;var ele=K$;function V3(e){const[t,r]=L.useState(void 0);return Oi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var H3="Popper",[G$,Y$]=ou(H3),[tle,Q$]=G$(H3),X$=e=>{const{__scopePopper:t,children:r}=e,[a,s]=L.useState(null);return n.jsx(tle,{scope:t,anchor:a,onAnchorChange:s,children:r})};X$.displayName=H3;var J$="PopperAnchor",Z$=L.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:a,...s}=e,i=Q$(J$,r),o=L.useRef(null),l=ea(t,o),c=L.useRef(null);return L.useEffect(()=>{const d=c.current;c.current=(a==null?void 0:a.current)||o.current,d!==c.current&&i.onAnchorChange(c.current)}),a?null:n.jsx(Fn.div,{...s,ref:l})});Z$.displayName=J$;var W3="PopperContent",[nle,rle]=G$(W3),eU=L.forwardRef((e,t)=>{var ne,oe,ae,le,je,xe;const{__scopePopper:r,side:a="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,y=Q$(W3,r),[x,w]=L.useState(null),j=ea(t,Fe=>w(Fe)),[N,_]=L.useState(null),S=V3(N),A=(S==null?void 0:S.width)??0,T=(S==null?void 0:S.height)??0,R=a+(i!=="center"?"-"+i:""),M=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},k=Array.isArray(d)?d:[d],P=k.length>0,O={padding:M,boundary:k.filter(sle),altBoundary:P},{refs:F,floatingStyles:$,placement:G,isPositioned:B,middlewareData:Y}=Voe({strategy:"fixed",placement:R,whileElementsMounted:(...Fe)=>Loe(...Fe,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Woe({mainAxis:s+T,alignmentAxis:o}),c&&Koe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Goe():void 0,...O}),c&&Yoe({...O}),Qoe({...O,apply:({elements:Fe,rects:he,availableWidth:Ne,availableHeight:ue})=>{const{width:rt,height:Te}=he.reference,Pe=Fe.floating.style;Pe.setProperty("--radix-popper-available-width",`${Ne}px`),Pe.setProperty("--radix-popper-available-height",`${ue}px`),Pe.setProperty("--radix-popper-anchor-width",`${rt}px`),Pe.setProperty("--radix-popper-anchor-height",`${Te}px`)}}),N&&Joe({element:N,padding:l}),ile({arrowWidth:A,arrowHeight:T}),f&&Xoe({strategy:"referenceHidden",...O})]}),[ee,J]=rU(G),H=lf(b);Oi(()=>{B&&(H==null||H())},[B,H]);const q=(ne=Y.arrow)==null?void 0:ne.x,K=(oe=Y.arrow)==null?void 0:oe.y,te=((ae=Y.arrow)==null?void 0:ae.centerOffset)!==0,[re,Q]=L.useState();return Oi(()=>{x&&Q(window.getComputedStyle(x).zIndex)},[x]),n.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:B?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(le=Y.transformOrigin)==null?void 0:le.x,(je=Y.transformOrigin)==null?void 0:je.y].join(" "),...((xe=Y.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(nle,{scope:r,placedSide:ee,onArrowChange:_,arrowX:q,arrowY:K,shouldHideArrow:te,children:n.jsx(Fn.div,{"data-side":ee,"data-align":J,...g,ref:j,style:{...g.style,animation:B?void 0:"none"}})})})});eU.displayName=W3;var tU="PopperArrow",ale={top:"bottom",right:"left",bottom:"top",left:"r
670ight"},nU=L.forwardRef(function(t,r){const{__scopePopper:a,...s}=t,i=rle(tU,a),o=ale[i.placedSide];return n.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:n.jsx(ele,{...s,ref:r,style:{...s.style,display:"block"}})})});nU.displayName=tU;function sle(e){return e!==null}var ile=e=>({name:"transformOrigin",options:e,fn(t){var y,x,w;const{placement:r,rects:a,middlewareData:s}=t,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,h]=rU(r),u={start:"0%",center:"50%",end:"100%"}[h],f=(((x=s.arrow)==null?void 0:x.x)??0)+l/2,m=(((w=s.arrow)==null?void 0:w.y)??0)+c/2;let b="",g="";return d==="bottom"?(b=o?u:`${f}px`,g=`${-c}px`):d==="top"?(b=o?u:`${f}px`,g=`${a.floating.height+c}px`):d==="right"?(b=`${-c}px`,g=o?u:`${m}px`):d==="left"&&(b=`${a.floating.width+c}px`,g=o?u:`${m}px`),{data:{x:b,y:g}}}});function rU(e){const[t,r="center"]=e.split("-");return[t,r]}var ole=X$,lle=Z$,cle=eU,dle=nU,ule="Portal",K3=L.forwardRef((e,t)=>{var l;const{container:r,...a}=e,[s,i]=L.useState(!1);Oi(()=>i(!0),[]);const o=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?LB.createPortal(n.jsx(Fn.div,{...a,ref:t}),o):null});K3.displayName=ule;var hle=kq[" useInsertionEffect ".trim().toString()]||Oi;function ru({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[s,i,o]=fle({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const h=L.useRef(e!==void 0);L.useEffect(()=>{const u=h.current;u!==l&&console.warn(`${a} is changing from ${u?"controlled":"uncontrolled"} to ${l?"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.`),h.current=l},[l,a])}const d=L.useCallback(h=>{var u;if(l){const f=mle(h)?h(e):h;f!==e&&((u=o.current)==null||u.call(o,f))}else i(h)},[l,e,i,o]);return[c,d]}function fle({defaultProp:e,onChange:t}){const[r,a]=L.useState(e),s=L.useRef(r),i=L.useRef(t);return hle(()=>{i.current=t},[t]),L.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,a,i]}function mle(e){return typeof e=="function"}function G3(e){const t=L.useRef({value:e,previous:e});return L.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var aU=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"}),ple="VisuallyHidden",gle=L.forwardRef((e,t)=>n.jsx(Fn.span,{...e,ref:t,style:{...aU,...e.style}}));gle.displayName=ple;var xle=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cp=new WeakMap,xb=new WeakMap,yb={},SN=0,sU=function(e){return e&&(e.host||sU(e.parentNode))},yle=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=sU(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})}
vendor: 13,864 bytes, lines 670-710
670,vle=function(e,t,r,a){var s=yle(t,Array.isArray(e)?e:[e]);yb[r]||(yb[r]=new WeakMap);var i=yb[r],o=[],l=new Set,c=new Set(s),d=function(u){!u||l.has(u)||(l.add(u),d(u.parentNode))};s.forEach(d);var h=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(f){if(l.has(f))h(f);else try{var m=f.getAttribute(a),b=m!==null&&m!=="false",g=(Cp.get(f)||0)+1,y=(i.get(f)||0)+1;Cp.set(f,g),i.set(f,y),o.push(f),g===1&&b&&xb.set(f,!0),y===1&&f.setAttribute(r,"true"),b||f.setAttribute(a,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return h(t),l.clear(),SN++,function(){o.forEach(function(u){var f=Cp.get(u)-1,m=i.get(u)-1;Cp.set(u,f),i.set(u,m),f||(xb.has(u)||u.removeAttribute(a),xb.delete(u)),m||u.removeAttribute(r)}),SN--,SN||(Cp=new WeakMap,Cp=new WeakMap,xb=new WeakMap,yb={})}},iU=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=xle(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),vle(a,s,r,"aria-hidden")):function(){return null}},qd=function(){return qd=Object.assign||function(t){for(var r,a=1,s=arguments.length;a<s;a++){r=arguments[a];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},qd.apply(this,arguments)};function oU(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(r[a[s]]=e[a[s]]);return r}function ble(e,t,r){if(r||arguments.length===2)for(var a=0,s=t.length,i;a<s;a++)(i||!(a in t))&&(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return e.concat(i||Array.prototype.slice.call(t))}var o1="right-scroll-bar-position",l1="width-before-scroll-bar",wle="with-scroll-bars-hidden",jle="--removed-body-scroll-bar-size";function CN(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Nle(e,t){var r=L.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var s=r.value;s!==a&&(r.value=a,r.callback(a,s))}}}})[0];return r.callback=t,r.facade}var _le=typeof window<"u"?L.useLayoutEffect:L.useEffect,JO=new WeakMap;function Sle(e,t){var r=Nle(null,function(a){return e.forEach(function(s){return CN(s,a)})});return _le(function(){var a=JO.get(r);if(a){var s=new Set(a),i=new Set(e),o=r.current;s.forEach(function(l){i.has(l)||CN(l,null)}),i.forEach(function(l){s.has(l)||CN(l,o)})}JO.set(r,e)},[e]),r}function Cle(e){return e}function Ale(e,t){t===void 0&&(t=Cle);var r=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,a);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(a=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){a=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(i),o=r}var c=function(){var h=o;o=[],h.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(h){o.push(h),d()},filter:function(h){return o=o.filter(h),r}}}};return s}function kle(e){e===void 0&&(e={});var t=Ale(null);return t.options=qd({async:!0,ssr:!1},e),t}var lU=function(e){var t=e.sideCar,r=oU(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return L.createElement(a,qd({},r))};lU.isSideCarExport=!0;function Ple(e,t){return e.useMedium(t),lU}var cU=kle(),AN=function(){},lj=L.forwardRef(function(e,t){var r=L.useRef(null),a=L.useState({onScrollCapture:AN,onWheelCapture:AN,onTouchMoveCapture:AN}),s=a[0],i=a[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,h=e.enabled,u=e.shards,f=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,y=e.allowPinchZoom,x=e.as,w=x===void 0?"div":x,j=e.gapMode,N=oU(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=f,S=Sle([r,t]),A=qd(qd({},N),s);return L.createElement(L.Fragment,null,h&&L.createElement(_,{sideCar:cU,removeScrollBar:d,shards:u,noRelative:m,noIsolation:b,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:j}),o?L.cloneElement(L.Children.only(l),qd(qd({},A),{ref:S})):L.createElement(w,qd({},A,{className:c,ref:S}),l))});lj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lj.classNames={fullWidth:l1,zeroRight:o1};var Ele=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tle(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ele();return t&&e.setAttribute("nonce",t),e}function Ole(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mle(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lle=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Tle())&&(Ole(t,r),Mle(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Rle=function(){var e=Lle();return function(t,r){L.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},dU=function(){var e=Rle(),t=function(r){var a=r.styles,s=r.dynamic;return e(a,s),null};return t},Ile={left:0,top:0,right:0,gap:0},kN=function(e){return parseInt(e||"",10)||0},Dle=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[kN(r),kN(a),kN(s)]},Fle=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ile;var t=Dle(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}},qle=dU(),ag="data-scroll-locked",Ble=function(e,t,r,a){var s=e.left,i=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),`
671  .`.concat(wle,` {
672   overflow: hidden `).concat(a,`;
673   padding-right: `).concat(l,"px ").concat(a,`;
674  }
675  body[`).concat(ag,`] {
676    overflow: hidden `).concat(a,`;
677    overscroll-behavior: contain;
678    `).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
679    padding-left: `.concat(s,`px;
680    padding-top: `).concat(i,`px;
681    padding-right: `).concat(o,`px;
682    margin-left:0;
683    margin-top:0;
684    margin-right: `).concat(l,"px ").concat(a,`;
685    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(a,";")].filter(Boolean).join(""),`
686  }
687  
688  .`).concat(o1,` {
689    right: `).concat(l,"px ").concat(a,`;
690  }
691  
692  .`).concat(l1,` {
693    margin-right: `).concat(l,"px ").concat(a,`;
694  }
695  
696  .`).concat(o1," .").concat(o1,` {
697    right: 0 `).concat(a,`;
698  }
699  
700  .`).concat(l1," .").concat(l1,` {
701    margin-right: 0 `).concat(a,`;
702  }
703  
704  body[`).concat(ag,`] {
705    `).concat(jle,": ").concat(l,`px;
706  }
707`)},ZO=function(){var e=parseInt(document.body.getAttribute(ag)||"0",10);return isFinite(e)?e:0},$le=function(){L.useEffect(function(){return document.body.setAttribute(ag,(ZO()+1).toString()),function(){var e=ZO()-1;e<=0?document.body.removeAttribute(ag):document.body.setAttribute(ag,e.toString())}},[])},Ule=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;$le();var i=L.useMemo(function(){return Fle(s)},[s]);return L.createElement(qle,{styles:Ble(i,!t,s,r?"":"!important")})},tA=!1;if(typeof window<"u")try{var vb=Object.defineProperty({},"passive",{get:function(){return tA=!0,!0}});window.addEventListener("test",vb,vb),window.removeEventListener("test",vb,vb)}catch{tA=!1}var Ap=tA?{passive:!1}:!1,zle=function(e){return e.tagName==="TEXTAREA"},uU=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!zle(e)&&r[t]==="visible")},Vle=function(e){return uU(e,"overflowY")},Hle=function(e){return uU(e,"overflowX")},eM=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=hU(e,a);if(s){var i=fU(e,a),o=i[1],l=i[2];if(o>l)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},Wle=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},Kle=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},hU=function(e,t){return e==="v"?Vle(t):Hle(t)},fU=function(e,t){return e==="v"?Wle(t):Kle(t)},Gle=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yle=function(e,t,r,a,s){var i=Gle(e,window.getComputedStyle(t).direction),o=i*a,l=r.target,c=t.contains(l),d=!1,h=o>0,u=0,f=0;do{if(!l)break;var m=fU(e,l),b=m[0],g=m[1],y=m[2],x=g-y-i*b;(b||x)&&hU(e,l)&&(u+=x,f+=b);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(h&&Math.abs(u)<1||!h&&Math.abs(f)<1)&&(d=!0),d},bb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tM=function(e){return[e.deltaX,e.deltaY]},nM=function(e){return e&&"current"in e?e.current:e},Qle=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xle=function(e){return`
708  .block-interactivity-`.concat(e,` {pointer-events: none;}
709  .allow-interactivity-`).concat(e,` {pointer-events: all;}
710`)},Jle=0,kp=[];function Zle(e){var t=L.useRef([]),r=L.useRef([0,0]),a=L.useRef(),s=L.useState(Jle++)[0],i=L.useState(dU)[0],o=L.useRef(e);L.useEffect(function(){o.current=e},[e]),L.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=ble([e.lockRef.current],(e.shards||[]).map(nM),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=L.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=bb(g),w=r.current,j="deltaX"in g?g.deltaX:w[0]-x[0],N="deltaY"in g?g.deltaY:w[1]-x[1],_,S=g.target,A=Math.abs(j)>Math.abs(N)?"h":"v";if("touches"in g&&A==="h"&&S.type==="range")return!1;var T=eM(A,S);if(!T)return!0;if(T?_=A:(_=A==="v"?"h":"v",T=eM(A,S)),!T)return!1;if(!a.current&&"changedTouches"in g&&(j||N)&&(a.current=_),!_)return!0;var R=a.current||_;return Yle(R,y,g,R==="h"?j:N)},[]),c=L.useCallback(function(g){var y=g;if(!(!kp.length||kp[kp.length-1]!==i)){var x="deltaY"in y?tM(y):bb(y),w=t.current.filter(function(_){return _.name===y.type&&(_.target===y.target||y.target===_.shadowParent)&&Qle(_.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var j=(o.current.shards||[]).map(nM).filter(Boolean).filter(function(_){return _.contains(y.target)}),N=j.length>0?l(y,j[0]):!o.current.noIsolation;N&&y.cancelable&&y.preventDefault()}}},[]),d=L.useCallback(function(g,y,x,w){var j={name:g,delta:y,target:x,should:w,shadowParent:ece(x)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(N){return N!==j})},1)},[]),h=L.useCallback(function(g){r.current=bb(g),a.current=void 0},[]),u=L.useCallback(function(g){d(g.type,tM(g),g.target,l(g,e.lockRef.current))},[]),f=L.useCallback(function(g){d(g.type,bb(g),g.target,l(g,e.lockRef.current))},[]);L.useEffect(function(){return kp.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ap),document.addEventListener("touchmove",c,Ap),document.addEventListener("touchstart",h,Ap),function(){kp=kp.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Ap),document.removeEventListener("touchmove",c,Ap),document.removeEventListener("touchstart",h,Ap)}},[]);var m=e.removeScrollBar,b=e.inert;return L.createElement(L.Fragment,null,b?L.createElement(i,{styles:Xle(s)}):null,m?L.createElement(Ule,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ece(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tce=Ple(cU,Zle);var Y3=L.forwardRef(function(e,t){return L.createElement(lj,qd({},e,{ref:t,sideCar:tce}))});Y3.classNames=lj.classNames;var nce=[" ","Enter","ArrowUp","ArrowDown"],rce=[" ","Enter"],Fm="Select",[cj,dj,ace]=R3(Fm),[vx]=ou(Fm,[ace,Y$]),uj=Y$(),[sce,pf]=vx(Fm),[ice,oce]=vx(Fm),mU=e=>{const{__scopeSelect:t,children:r,open:a,defaultOpen:s,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:d,name:h,autoComplete:u,disabled:f,required:m,form:b}=e,g=uj(t),[y,x]=L.useState(null),[w,j]=L.useState(null),[N,_]=L.useState(!1),S=rj(d),[A,T]=ru({prop:a,defaultProp:s??!1,onChange:i,caller:Fm}),[R,M]=ru({prop:o,defaultProp:l,onChange:c,caller:Fm}),k=L.useRef(null),P=y?b||!!y.closest("form"):!0,[O,F]=L.useState(new Set),$=Array.from(O).map(G=>G.props.value).join(";");return n.jsx(ole,{...g,children:n.jsxs(sce,{required:m,scope:t,trigger:y,onTriggerChange:x,valueNode:w,onValueNodeChange:j,valueNodeHasChildren:N,onValueNodeHasChildrenChange:_,contentId:Kd(),value:R,onValueChange:M,open:A,onOpenChange:T,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[n.jsx(cj.Provider,{scope:t,children:n.jsx(ice,{scope:e.__scopeSelect,onNativeOptionAdd:L.useCallback(G=>{F(B=>new Set(B).add(G))},[]),onNativeOptionRemove:L.useCallback(G=>{F(B=>{const Y=new Set(B);return Y.delete(G),Y})},[]),children:r})}),P?n.jsxs(FU,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:u,value:R,onChange:G=>M(G.target.value),disabled:f,form:b,children:[R===void 0?n.jsx("option",{value:""}):null,Array.from(O)]},$):null]})})};mU.displayName=Fm;var pU="SelectTrigger",gU=L.forwardRef((e,t)=>
vendor: 7,834 bytes, line 710
710{const{__scopeSelect:r,disabled:a=!1,...s}=e,i=uj(r),o=pf(pU,r),l=o.disabled||a,c=ea(t,o.onTriggerChange),d=dj(r),h=L.useRef("touch"),[u,f,m]=BU(g=>{const y=d().filter(j=>!j.disabled),x=y.find(j=>j.value===o.value),w=$U(y,g,x);w!==void 0&&o.onValueChange(w.value)}),b=g=>{l||(o.onOpenChange(!0),m()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return n.jsx(lle,{asChild:!0,...i,children:n.jsx(Fn.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:l,"data-disabled":l?"":void 0,"data-placeholder":qU(o.value)?"":void 0,...s,ref:c,onClick:nr(s.onClick,g=>{g.currentTarget.focus(),h.current!=="mouse"&&b(g)}),onPointerDown:nr(s.onPointerDown,g=>{h.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:nr(s.onKeyDown,g=>{const y=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(y&&g.key===" ")&&nce.includes(g.key)&&(b(),g.preventDefault())})})})});gU.displayName=pU;var xU="SelectValue",yU=L.forwardRef((e,t)=>{const{__scopeSelect:r,className:a,style:s,children:i,placeholder:o="",...l}=e,c=pf(xU,r),{onValueNodeHasChildrenChange:d}=c,h=i!==void 0,u=ea(t,c.onValueNodeChange);return Oi(()=>{d(h)},[d,h]),n.jsx(Fn.span,{...l,ref:u,style:{pointerEvents:"none"},children:qU(c.value)?n.jsx(n.Fragment,{children:o}):i})});yU.displayName=xU;var lce="SelectIcon",vU=L.forwardRef((e,t)=>{const{__scopeSelect:r,children:a,...s}=e;return n.jsx(Fn.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});vU.displayName=lce;var cce="SelectPortal",bU=e=>n.jsx(K3,{asChild:!0,...e});bU.displayName=cce;var qm="SelectContent",wU=L.forwardRef((e,t)=>{const r=pf(qm,e.__scopeSelect),[a,s]=L.useState();if(Oi(()=>{s(new DocumentFragment)},[]),!r.open){const i=a;return i?Z0.createPortal(n.jsx(jU,{scope:e.__scopeSelect,children:n.jsx(cj.Slot,{scope:e.__scopeSelect,children:n.jsx("div",{children:e.children})})}),i):null}return n.jsx(NU,{...e,ref:t})});wU.displayName=qm;var Wc=10,[jU,gf]=vx(qm),dce="SelectContentImpl",uce=Pg("SelectContent.RemoveScroll"),NU=L.forwardRef((e,t)=>{const{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:h,arrowPadding:u,collisionBoundary:f,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y,...x}=e,w=pf(qm,r),[j,N]=L.useState(null),[_,S]=L.useState(null),A=ea(t,ne=>N(ne)),[T,R]=L.useState(null),[M,k]=L.useState(null),P=dj(r),[O,F]=L.useState(!1),$=L.useRef(!1);L.useEffect(()=>{if(j)return iU(j)},[j]),L$();const G=L.useCallback(ne=>{const[oe,...ae]=P().map(xe=>xe.ref.current),[le]=ae.slice(-1),je=document.activeElement;for(const xe of ne)if(xe===je||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===oe&&_&&(_.scrollTop=0),xe===le&&_&&(_.scrollTop=_.scrollHeight),xe==null||xe.focus(),document.activeElement!==je))return},[P,_]),B=L.useCallback(()=>G([T,j]),[G,T,j]);L.useEffect(()=>{O&&B()},[O,B]);const{onOpenChange:Y,triggerPointerDownPosRef:ee}=w;L.useEffect(()=>{if(j){let ne={x:0,y:0};const oe=le=>{var je,xe;ne={x:Math.abs(Math.round(le.pageX)-(((je=ee.current)==null?void 0:je.x)??0)),y:Math.abs(Math.round(le.pageY)-(((xe=ee.current)==null?void 0:xe.y)??0))}},ae=le=>{ne.x<=10&&ne.y<=10?le.preventDefault():j.contains(le.target)||Y(!1),document.removeEventListener("pointermove",oe),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ae,{capture:!0})}}},[j,Y,ee]),L.useEffect(()=>{const ne=()=>Y(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[Y]);const[J,H]=BU(ne=>{const oe=P().filter(je=>!je.disabled),ae=oe.find(je=>je.ref.current===document.activeElement),le=$U(oe,ne,ae);le&&setTimeout(()=>le.ref.current.focus())}),q=L.useCallback((ne,oe,ae)=>{const le=!$.current&&!ae;(w.value!==void 0&&w.value===oe||le)&&(R(ne),le&&($.current=!0))},[w.value]),K=L.useCallback(()=>j==null?void 0:j.focus(),[j]),te=L.useCallback((ne,oe,ae)=>{const le=!$.current&&!ae;(w.value!==void 0&&w.value===oe||le)&&k(ne)},[w.value]),re=a==="popper"?nA:_U,Q=re===nA?{side:l,sideOffset:c,align:d,alignOffset:h,arrowPadding:u,collisionBoundary:f,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:y}:{};return n.jsx(jU,{scope:r,content:j,viewport:_,onViewportChange:S,itemRefCallback:q,selectedItem:T,onItemLeave:K,itemTextRefCallback:te,focusSelectedItem:B,selectedItemText:M,position:a,isPositioned:O,searchRef:J,children:n.jsx(Y3,{as:uce,allowPinchZoom:!0,children:n.jsx(D3,{asChild:!0,trapped:w.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:nr(s,ne=>{var oe;(oe=w.trigger)==null||oe.focus({preventScroll:!0}),ne.preventDefault()}),children:n.jsx(I3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:n.jsx(re,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:ne=>ne.preventDefault(),...x,...Q,onPlaced:()=>F(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:nr(x.onKeyDown,ne=>{const oe=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!oe&&ne.key.length===1&&H(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let le=P().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const je=ne.target,xe=le.indexOf(je);le=le.slice(xe+1)}setTimeout(()=>G(le)),ne.preventDefault()}})})})})})})});NU.displayName=dce;var hce="SelectItemAlignedPosition",_U=L.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:a,...s}=e,i=pf(qm,r),o=gf(qm,r),[l,c]=L.useState(null),[d,h]=L.useState(null),u=ea(t,A=>h(A)),f=dj(r),m=L.useRef(!1),b=L.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:x,focusSelectedItem:w}=o,j=L.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&d&&g&&y&&x){const A=i.trigger.getBoundingClientRect(),T=d.getBoundingClientRect(),R=i.valueNode.getBoundingClientRect(),M=x.getBoundingClientRect();if(i.dir!=="rtl"){const je=M.left-T.left,xe=R.left-je,Fe=A.left-xe,he=A.width+Fe,Ne=Math.max(he,T.width),ue=window.innerWidth-Wc,rt=MO(xe,[Wc,Math.max(Wc,ue-Ne)]);l.style.minWidth=he+"px",l.style.left=rt+"px"}else{const je=T.right-M.right,xe=window.innerWidth-R.right-je,Fe=window.innerWidth-A.right-xe,he=A.width+Fe,Ne=Math.max(he,T.width),ue=window.innerWidth-Wc,rt=MO(xe,[Wc,Math.max(Wc,ue-Ne)]);l.style.minWidth=he+"px",l.style.right=rt+"px"}const k=f(),P=window.innerHeight-Wc*2,O=g.scrollHeight,F=window.getComputedStyle(d),$=parseInt(F.borderTopWidth,10),G=parseInt(F.paddingTop,10),B=parseInt(F.borderBottomWidth,10),Y=parseInt(F.paddingBottom,10),ee=$+G+O+Y+B,J=Math.min(y.offsetHeight*5,ee),H=window.getComputedStyle(g),q=parseInt(H.paddingTop,10),K=parseInt(H.paddingBottom,10),te=A.top+A.height/2-Wc,re=P-te,Q=y.offsetHeight/2,ne=y.offsetTop+Q,oe=$+G+ne,ae=ee-oe;if(oe<=te){const je=k.length>0&&y===k[k.length-1].ref.current;l.style.bottom="0px";const xe=d.clientHeight-g.offsetTop-g.offsetHeight,Fe=Math.max(re,Q+(je?K:0)+xe+B),he=oe+Fe;l.style.height=he+"px"}else{const je=k.length>0&&y===k[0].ref.current;l.style.top="0px";const Fe=Math.max(te,$+g.offsetTop+(je?q:0)+Q)+ae;l.style.height=Fe+"px",g.scrollTop=oe-te+g.offsetTop}l.style.margin=`${Wc}
710px 0`,l.style.minHeight=J+"px",l.style.maxHeight=P+"px",a==null||a(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,l,d,g,y,x,i.dir,a]);Oi(()=>j(),[j]);const[N,_]=L.useState();Oi(()=>{d&&_(window.getComputedStyle(d).zIndex)},[d]);const S=L.useCallback(A=>{A&&b.current===!0&&(j(),w==null||w(),b.current=!1)},[j,w]);return n.jsx(mce,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:n.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:n.jsx(Fn.div,{...s,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_U.displayName=hce;var fce="SelectPopperPosition",nA=L.forwardRef((e,t)=>{const{__scopeSelect:r,align:a="start",collisionPadding:s=Wc,...i}=e,o=uj(r);return n.jsx(cle,{...o,...i,ref:t,align:a,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}})});nA.displayName=fce;var[mce,Q3]=vx(qm,{}),rA="SelectViewport",SU=L.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:a,...s}=e,i=gf(rA,r),o=Q3(rA,r),l=ea(t,i.onViewportChange),c=L.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:a}),n.jsx(cj.Slot,{scope:r,children:n.jsx(Fn.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:nr(s.onScroll,d=>{const h=d.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&u){const m=Math.abs(c.current-h.scrollTop);if(m>0){const b=window.innerHeight-Wc*2,g=parseFloat(u.style.minHeight),y=parseFloat(u.style.height),x=Math.max(g,y);if(x<b){const w=x+m,j=Math.min(b,w),N=w-j;u.style.height=j+"px",u.style.bottom==="0px"&&(h.scrollTop=N>0?N:0,u.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});SU.displayName=rA;var CU="SelectGroup",[pce,gce]=vx(CU),xce=L.forwardRef((e,t)=>{const{__scopeSelect:r,...a}=e,s=Kd();return n.jsx(pce,{scope:r,id:s,children:n.jsx(Fn.div,{role:"group","aria-labelledby":s,...a,ref:t})})});xce.displayName=CU;var AU="SelectLabel",kU=L.forwardRef((e,t)=>{const{__scopeSelect:r,...a}=e,s=gce(AU,r);return n.jsx(Fn.div,{id:s.id,...a,ref:t})});kU.displayName=AU;var T1="SelectItem",[yce,PU]=vx(T1),EU=L.forwardRef((e,t)=>{const{__scopeSelect:r,value:a,disabled:s=!1,textValue:i,...o}=e,l=pf(T1,r),c=gf(T1,r),d=l.value===a,[h,u]=L.useState(i??""),[f,m]=L.useState(!1),b=ea(t,w=>{var j;return(j=c.itemRefCallback)==null?void 0:j.call(c,w,a,s)}),g=Kd(),y=L.useRef("touch"),x=()=>{s||(l.onValueChange(a),l.onOpenChange(!1))};if(a==="")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 n.jsx(yce,{scope:r,value:a,disabled:s,textId:g,isSelected:d,onItemTextChange:L.useCallback(w=>{u(j=>j||((w==null?void 0:w.textContent)??"").trim())},[]),children:n.jsx(cj.ItemSlot,{scope:r,value:a,disabled:s,textValue:h,children:n.jsx(Fn.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":d&&f,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:b,onFocus:nr(o.onFocus,()=>m(!0)),onBlur:nr(o.onBlur,()=>m(!1)),onClick:nr(o.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:nr(o.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:nr(o.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:nr(o.onPointerMove,w=>{var j;y.current=w.pointerType,s?(j=c.onItemLeave)==null||j.call(c):y.current==="mouse"&&w.currentTarget.focu
vendor: 6,211 bytes, line 710
710s({preventScroll:!0})}),onPointerLeave:nr(o.onPointerLeave,w=>{var j;w.currentTarget===document.activeElement&&((j=c.onItemLeave)==null||j.call(c))}),onKeyDown:nr(o.onKeyDown,w=>{var N;((N=c.searchRef)==null?void 0:N.current)!==""&&w.key===" "||(rce.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})})})})});EU.displayName=T1;var by="SelectItemText",TU=L.forwardRef((e,t)=>{const{__scopeSelect:r,className:a,style:s,...i}=e,o=pf(by,r),l=gf(by,r),c=PU(by,r),d=oce(by,r),[h,u]=L.useState(null),f=ea(t,x=>u(x),c.onItemTextChange,x=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,x,c.value,c.disabled)}),m=h==null?void 0:h.textContent,b=L.useMemo(()=>n.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return Oi(()=>(g(b),()=>y(b)),[g,y,b]),n.jsxs(n.Fragment,{children:[n.jsx(Fn.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Z0.createPortal(i.children,o.valueNode):null]})});TU.displayName=by;var OU="SelectItemIndicator",MU=L.forwardRef((e,t)=>{const{__scopeSelect:r,...a}=e;return PU(OU,r).isSelected?n.jsx(Fn.span,{"aria-hidden":!0,...a,ref:t}):null});MU.displayName=OU;var aA="SelectScrollUpButton",LU=L.forwardRef((e,t)=>{const r=gf(aA,e.__scopeSelect),a=Q3(aA,e.__scopeSelect),[s,i]=L.useState(!1),o=ea(t,a.onScrollButtonChange);return Oi(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;i(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?n.jsx(IU,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});LU.displayName=aA;var sA="SelectScrollDownButton",RU=L.forwardRef((e,t)=>{const r=gf(sA,e.__scopeSelect),a=Q3(sA,e.__scopeSelect),[s,i]=L.useState(!1),o=ea(t,a.onScrollButtonChange);return Oi(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<d;i(h)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),s?n.jsx(IU,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});RU.displayName=sA;var IU=L.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:a,...s}=e,i=gf("SelectScrollButton",r),o=L.useRef(null),l=dj(r),c=L.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return L.useEffect(()=>()=>c(),[c]),Oi(()=>{var h;const d=l().find(u=>u.ref.current===document.activeElement);(h=d==null?void 0:d.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),n.jsx(Fn.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:nr(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(a,50))}),onPointerMove:nr(s.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),o.current===null&&(o.current=window.setInterval(a,50))}),onPointerLeave:nr(s.onPointerLeave,()=>{c()})})}),vce="SelectSeparator",DU=L.forwardRef((e,t)=>{const{__scopeSelect:r,...a}=e;return n.jsx(Fn.div,{"aria-hidden":!0,...a,ref:t})});DU.displayName=vce;var iA="SelectArrow",bce=L.forwardRef((e,t)=>{const{__scopeSelect:r,...a}=e,s=uj(r),i=pf(iA,r),o=gf(iA,r);return i.open&&o.position==="popper"?n.jsx(dle,{...s,...a,ref:t}):null});bce.displayName=iA;var wce="SelectBubbleInput",FU=L.forwardRef(({__scopeSelect:e,value:t,...r},a)=>{const s=L.useRef(null),i=ea(a,s),o=G3(t);return L.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const u=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(u)}},[o,t]),n.jsx(Fn.select,{...r,style:{...aU,...r.style},ref:i,defaultValue:t})});FU.displayName=wce;function qU(e){return e===""||e===void 0}function BU(e){const t=lf(e),r=L.useRef(""),a=L.useRef(0),s=L.useCallback(o=>{const l=r.current+o;t(l),(function c(d){r.current=d,window.clearTimeout(a.current),d!==""&&(a.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),i=L.useCallback(()=>{r.current="",window.clearTimeout(a.current)},[]);return L.useEffect(()=>()=>window.clearTimeout(a.current),[]),[r,s,i]}function $U(e,t,r){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=jce(e,Math.max(i,0));s.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function jce(e,t){return e.map((r,a)=>e[(t+a)%e.length])}var Nce=mU,UU=gU,_ce=yU,Sce=vU,Cce=bU,zU=wU,Ace=SU,VU=kU,HU=EU,kce=TU,Pce=MU,WU=LU,KU=RU,GU=DU;const Qt=Nce,Xt=_ce,Kt=L.forwardRef(({className:e,children:t,...r},a)=>n.jsxs(UU,{ref:a,className:Ln("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),...r,children:[t,n.jsx(Sce,{asChild:!0,children:n.jsx(Wm,{className:"h-4 w-4 opacity-50"})})]}));Kt.displayName=UU.displayName;const YU=L.forwardRef(({className:e,...t},r)=>n.jsx(WU,{ref:r,className:Ln("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Y0,{className:"h-4 w-4"})}));YU.displayName=WU.displayName;const QU=L.forwardRef(({className:e,...t},r)=>n.jsx(KU,{ref:r,className:Ln("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Wm,{className:"h-4 w-4"})}));QU.displayName=KU.displayName;const Gt=L.forwardRef(({className:e,children:t,position:r="popper",...a},s)=>n.jsx(Cce,{children:n.jsxs(zU,{ref:s,className:Ln("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]:sli
710de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="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:r,...a,children:[n.jsx(YU,{}),n.jsx(Ace,{className:Ln("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),n.jsx(QU,{})]})}));Gt.displayName=zU.displayName;const Ece=L.forwardRef(({className:e,...t},r)=>n.jsx(VU,{ref:r,className:Ln("px-2 py-1.5 text-sm font-semibold",e),...t}));Ece.displayName=VU.displayName;const Ae=L.forwardRef(({className:e,children:t,...r},a)=>n.jsxs(HU,{ref:a,className:Ln("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),...r,children:[n.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(Pce,{children:n.jsx(Pm,{className:"h-4 w-4"})})}),n.jsx(kce,{children:t})]}));Ae.displayName=HU.displayName;const Tce=L.forwardRef(({className:e,...t},r)=>n.jsx(GU,{ref:r,className:Ln("-mx-1 my-1 h-px bg-muted",e),...t}));Tce.displayName=GU.displayName;const Oce=lx("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 dt({className:e,variant:t,...r}){return n.jsx("div",{className:Ln(Oce({variant:t}),e),...r})}var PN="rovingFocusGroup.onEntryFocus",Mce={bubbles:!1,cancelable:!0},sv="RovingFocusGroup",[oA,XU,Lce]=R3(sv),[Rce,JU]=ou(sv,[Lce]),[Ice,Dce]=Rce(sv),ZU=L.forwardRef((e,t)=>n.jsx(oA.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(oA.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(Fce,{...e,ref:t})})}));ZU.displayName=sv;var Fce=L.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...u}=e,f=L.useRef(null),m=ea(t,f),b=rj(i),[g,y]=ru({prop:o,defaultProp:l??null,onChange:c,caller:sv}),[x,w]=L.useState(!1),j=lf(d),N=XU(r),_=L.useRef(!1),[S,A]=L.useState(0);return L.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(PN,j),()=>T.removeEventListener(PN,j)},[j]),n.jsx(Ice,{scope:r,orientation:a,dir:b,loop:s,currentTabStopId:g,onItemFocus:L.useCallback(T=>y(T),[y]),onItemShiftTab:L.useCallback(()=>w(!0),[]),onFocusableItemAdd:L.useCallback(()=>A(T=>T+1),[]),onFocusableItemRemove:L.useCallback(()=>A(T=>T-1),[]),children:n.jsx(Fn.div,{tabIndex:x||S===0?-1:0,"data-orientation":a,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:nr(e.onMouseDown,()=>{_.current=!0}),onFocus:nr(e.onFocus,T=>{const R=!_.current;if(T.target===T.currentTarget&&R&&!x){const M=new CustomEvent(PN,Mce);if(T.currentTarget.dispatchEvent(M),!M.defaultPrevented){const k=N().filter(G=>G.focusable),P=k.find(G=>G.active),O=k.find(G=>G.id===g),$=[P,O,...k].filter(Boolean).map(G=>G.ref.current);nz($,h)}}_.current=!1}),onBlur:nr(e.onBlur,()=>w(!1))})})}),ez="RovingFocusGroupItem",tz=L.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:s=!1,tabStopId:i,children:o,...l}=e,c=Kd(),d=i||c,h=Dce(ez,r),u=h.currentTabStopId===d,f=XU(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=h;return L.useEffect(()=>{if(a)return m(),()=>b()},[a,m,b]),n.jsx(oA.ItemSlot,{scope:r,id:d,focusable:a,active:s,children:n.jsx(Fn.span,{tabIndex:u?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:nr(e.onMouseDown,y=>{a?h.onItemFocus(d):y.preventDefault()}),onFocus:nr(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:nr(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){h.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=$ce(y,h.orientation,h.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();
vendor: 8,531 bytes, line 710
710let j=f().filter(N=>N.focusable).map(N=>N.ref.current);if(x==="last")j.reverse();else if(x==="prev"||x==="next"){x==="prev"&&j.reverse();const N=j.indexOf(y.currentTarget);j=h.loop?Uce(j,N+1):j.slice(N+1)}setTimeout(()=>nz(j))}}),children:typeof o=="function"?o({isCurrentTabStop:u,hasTabStop:g!=null}):o})})});tz.displayName=ez;var qce={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bce(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $ce(e,t,r){const a=Bce(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return qce[a]}function nz(e,t=!1){const r=document.activeElement;for(const a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}function Uce(e,t){return e.map((r,a)=>e[(t+a)%e.length])}var zce=ZU,Vce=tz;function Hce(e,t){return L.useReducer((r,a)=>t[r][a]??r,e)}var Km=e=>{const{present:t,children:r}=e,a=Wce(t),s=typeof r=="function"?r({present:a.isPresent}):L.Children.only(r),i=ea(a.ref,Kce(s));return typeof r=="function"||a.isPresent?L.cloneElement(s,{ref:i}):null};Km.displayName="Presence";function Wce(e){const[t,r]=L.useState(),a=L.useRef(null),s=L.useRef(e),i=L.useRef("none"),o=e?"mounted":"unmounted",[l,c]=Hce(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return L.useEffect(()=>{const d=wb(a.current);i.current=l==="mounted"?d:"none"},[l]),Oi(()=>{const d=a.current,h=s.current;if(h!==e){const f=i.current,m=wb(d);e?c("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(h&&f!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Oi(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,u=m=>{const g=wb(a.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(c("ANIMATION_END"),!s.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=m=>{m.target===t&&(i.current=wb(a.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:L.useCallback(d=>{a.current=d?getComputedStyle(d):null,r(d)},[])}}function wb(e){return(e==null?void 0:e.animationName)||"none"}function Kce(e){var a,s;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var hj="Tabs",[Gce]=ou(hj,[JU]),rz=JU(),[Yce,X3]=Gce(hj),az=L.forwardRef((e,t)=>{const{__scopeTabs:r,value:a,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...d}=e,h=rj(l),[u,f]=ru({prop:a,onChange:s,defaultProp:i??"",caller:hj});return n.jsx(Yce,{scope:r,baseId:Kd(),value:u,onValueChange:f,orientation:o,dir:h,activationMode:c,children:n.jsx(Fn.div,{dir:h,"data-orientation":o,...d,ref:t})})});az.displayName=hj;var sz="TabsList",iz=L.forwardRef((e,t)=>{const{__scopeTabs:r,loop:a=!0,...s}=e,i=X3(sz,r),o=rz(r);return n.jsx(zce,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:a,children:n.jsx(Fn.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});iz.displayName=sz;var oz="TabsTrigger",lz=L.forwardRef((e,t)=>{const{__scopeTabs:r,value:a,disabled:s=!1,...i}=e,o=X3(oz,r),l=rz(r),c=uz(o.baseId,a),d=hz(o.baseId,a),h=a===o.value;return n.jsx(Vce,{asChild:!0,...l,focusable:!s,active:h,children:n.jsx(Fn.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:nr(e.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(a):u.preventDefault()}),onKeyDown:nr(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(a)}),onFocus:nr(e.onFocus,()=>{const u=o.activationMode!=="manual";!h&&!s&&u&&o.onValueChange(a)})})})});lz.displayName=oz;var cz="TabsContent",dz=L.forwardRef((e,t)=>{const{__scopeTabs:r,value:a,forceMount:s,children:i,...o}=e,l=X3(cz,r),c=uz(l.baseId,a),d=hz(l.baseId,a),h=a===l.value,u=L.useRef(h);return L.useEffect(()=>{const f=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(f)},[]),n.jsx(Km,{present:s||h,children:({present:f})=>n.jsx(Fn.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:d,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:f&&i})})});dz.displayName=cz;function uz(e,t){return`${e}-trigger-${t}`}function hz(e,t){return`${e}-content-${t}`}var Qce=az,fz=iz,mz=lz,pz=dz;const nl=Qce,wo=L.forwardRef(({className:e,...t},r)=>n.jsx(fz,{ref:r,className:Ln("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));wo.displayName=fz.displayName;const ln=L.forwardRef(({className:e,...t},r)=>n.jsx(mz,{ref:r,className:Ln("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}));ln.displayName=mz.displayName;const cn=L.forwardRef(({className:e,...t},r)=>n.jsx(pz,{ref:r,className:Ln("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));cn.displayName=pz.displayName;var fj="Dialog",[gz]=ou(fj),[Xce,dd]=gz(fj),xz=e=>{const{__scopeDialog:t,children:r,open:a,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=L.useRef(null),c=L.useRef(null),[d,h]=ru({prop:a,defaultProp:s??!1,onChange:i,caller:fj});return n.jsx(Xce,{scope:t,triggerRef:l,contentRef:c,contentId:Kd(),titleId:Kd(),descriptionId:Kd(),open:d,onOpenChange:h,onOpenToggle:L.useCallback(()=>h(u=>!u),[h]),modal:o,children:r})};xz.displayName=fj;var yz="DialogTrigger",vz=L.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=dd(yz,r),i=ea(t,s.triggerRef);return n.jsx(Fn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":e6(s.open),...a,ref:i,onClick:nr(e.onClick,s.onOpenToggle)})});vz.displayName=yz;var J3="DialogPortal",[Jce,bz]=gz(J3,{forceMount:void 0}),wz=e=>{const{__scopeDialog:t,forceMount:r,children:a,container:s}=e,i=dd(J3,t);return n.jsx(Jce,{scope:t,forceMount:r,children:L.Children.map(a,o=>n.jsx(Km,{present:r||i.open,children:n.jsx(K3,{asChild:!0,container:s,children:o})}))})};wz.displayName=J3;var O1="DialogOverlay",jz=L.forwardRef((e,t)=>{const r=bz(O1,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,i=dd(O1,e.__scopeDialog);return i.modal?n.jsx(Km,{present:a||i.open,children:n.jsx(ede,{...s,ref:t})}):null});jz.displayName=O1;var Zce=Pg("DialogOverlay.RemoveScroll"),ede=L.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=dd(O1,r);return n.jsx(Y3,{as:Zce,allowPinchZoom:!0,shards:[s.contentRef],children:n.jsx(Fn.div,{"data-state":e6(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Bm="DialogContent",Nz=L.forwardRef((e,t)=>{const r=bz(Bm,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,i=dd(Bm,e.__scopeDialog);return n.jsx(Km,{present:a||i.open,children:i.modal?n.jsx(tde,{...s,ref:t}):n.jsx(nde,{...s,ref:t})})});Nz.displayName=Bm;var tde=L.forwardRef((e,t)=>{const r=dd(Bm,e.__scopeDialog),a=L.useRef(null),s=ea(t,r.contentRef,a);return L.useEffect(()=>{const i=a.current;if(i)return iU(i)},[]),n.jsx(_z,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:nr(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:nr(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:nr(e.onFocusOutside,i=>i.preventDefault())})}),nde=L.forwardRef((e,t)=>
vendor: 2,644 bytes, lines 710-714
710{const r=dd(Bm,e.__scopeDialog),a=L.useRef(!1),s=L.useRef(!1);return n.jsx(_z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(a.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(a.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),_z=L.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,l=dd(Bm,r),c=L.useRef(null),d=ea(t,c);return L$(),n.jsxs(n.Fragment,{children:[n.jsx(D3,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:i,children:n.jsx(I3,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":e6(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(rde,{titleId:l.titleId}),n.jsx(sde,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Z3="DialogTitle",Sz=L.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=dd(Z3,r);return n.jsx(Fn.h2,{id:s.titleId,...a,ref:t})});Sz.displayName=Z3;var Cz="DialogDescription",Az=L.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=dd(Cz,r);return n.jsx(Fn.p,{id:s.descriptionId,...a,ref:t})});Az.displayName=Cz;var kz="DialogClose",Pz=L.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=dd(kz,r);return n.jsx(Fn.button,{type:"button",...a,ref:t,onClick:nr(e.onClick,()=>s.onOpenChange(!1))})});Pz.displayName=kz;function e6(e){return e?"open":"closed"}var Ez="DialogTitleWarning",[oTe,Tz]=Nie(Ez,{contentName:Bm,titleName:Z3,docsSlug:"dialog"}),rde=({titleId:e})=>{const t=Tz(Ez),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
711
712If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
713
714For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return L.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ade="DialogDescriptionWarning",sde=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Tz(ade).contentName}}.`;return L.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null}
714,Oz=xz,Mz=vz,Lz=wz,mj=jz,pj=Nz,gj=Sz,xj=Az,t6=Pz;const Nn=Oz,M1=Mz,ide=Lz,ode=t6,Rz=L.forwardRef(({className:e,...t},r)=>n.jsx(mj,{ref:r,className:Ln("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}));Rz.displayName=mj.displayName;const vn=L.forwardRef(({className:e,children:t,...r},a)=>n.jsxs(ide,{children:[n.jsx(Rz,{}),n.jsxs(pj,{ref:a,className:Ln("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),...r,children:[t,n.jsxs(t6,{className:"absolute right-4 top-4 roun
714ded-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:[n.jsx(Ei,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));vn.displayName=pj.displayName;const _n=({className:e,...t})=>n.jsx("div",{className:Ln("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_n.displayName="DialogHeader";const Sn=L.forwardRef(({className:e,...t},r)=>n.jsx(gj,{ref:r,className:Ln("text-lg font-semibold leading-none tracking-tight",e),...t}));Sn.displayName=gj.displayName;const _s=L.forwardRef(({className:e,...t},r)=>n.jsx(xj,{ref:r,className:Ln("text-sm text-muted-foreground",e),...t}));_s.displayName=xj.displayName;var yj="Checkbox",[lde]=ou(yj),[cde,n6]=lde(yj);function dde(e){const{__scopeCheckbox:t,checked:r,children:a,defaultChecked:s,disabled:i,form:o,name:l,onCheckedChange:c,required:d,value:h="on",internal_do_not_use_render:u}=e,[f,m]=ru({prop:r,defaultProp:s??!1,onChange:c,caller:yj}),[b,g]=L.useState(null),[y,x]=L.useState(null),w=L.useRef(!1),j=b?!!o||!!b.closest("form"):!0,N={checked:f,disabled:i,setChecked:m,control:b,setControl:g,name:l,form:o,value:h,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:sf(s)?!1:s,isFormControl:j,bubbleInput:y,setBubbleInput:x};return n.jsx(cde,{scope:t,...N,children:ude(u)?u(N):a})}var Iz="CheckboxTrigger",Dz=L.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...a},s)=>{const{control:i,value:o,disabled:l,checked:c,required:d,setControl:h,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:b}=n6(Iz,e),g=ea(s,h),y=L.useRef(c);return L.useEffect(()=>{const x=i==null?void 0:i.form;if(x){const w=()=>u(y.current);return x.addEventListener("reset",w),()=>x.removeEventListener("reset",w)}},[i,u]),n.jsx(Fn.button,{type:"button",role:"checkbox","aria-checked":sf(c)?"mixed":c,"aria-required":d,"data-state":Uz(c),"data-disabled":l?"":void 0,disabled:l,value:o,...a,ref:g,onKeyDown:nr(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:nr(r,x=>{u(w=>sf(w)?!0:!w),b&&m&&(f.current=x.isPropagationStopped(),f.current||x.stopPropagation())})})});Dz.displayName=Iz;var r6=L.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:a,checked:s,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:d,form:h,...u}=e;return n.jsx(dde,{__scopeCheckbox:r,checked:s,defaultChecked:i,disabled:l,required:o,onCheckedChange:d,name:a,form:h,value:c,internal_do_not_use_render:({isFormControl:f})=>n.jsxs(n.Fragment,{children:[n.jsx(Dz,{...u,ref:t,__scopeCheckbox:r}),f&&n.jsx($z,{__scopeCheckbox:r})]})})});r6.displayName=yj;var Fz="CheckboxIndicator",qz=L.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:a,...s}=e,i=n6(Fz,r);return n.jsx(Km,{present:a||sf(i.checked)||i.checked===!0,children:n.jsx(Fn.span,{"data-state":Uz(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});qz.displayName=Fz;var Bz="CheckboxBubbleInput",$z=L.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:l,disabled:c,name:d,value:h,form:u,bubbleInput:f,setBubbleInput:m}=n6(Bz,e),b=ea(r,m),g=G3(i),y=V3(a);L.useEffect(()=>{const w=f;if(!w)return;const j=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(j,"checked").set,S=!s.current;if(g!==i&&_){const A=new Event("click",{bubbles:S});w.indeterminate=sf(i),_.call(w,sf(i)?!1:i),w.dispatchEvent(A)}},[f,g,i,s]);const x=L.useRef(sf(i)?!1:i);return n.jsx(Fn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:l,disabled:c,name:d,value:h,form:u,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$z.displayName=Bz;function ude(e){return typeof e=="function"}function sf(e){return e==="indeterminate"}function Uz(e){return sf(e)?"indeterminate":e?"checked":"unchecked"}const Zr=L.forwardRef(({className:e,...t},r)=>n.jsx(r6,{ref:r,className:Ln("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:n.jsx(qz,{className:Ln("flex items-center justify-center text-current"),children:n.jsx(Pm,{className:"h-4 w-4"})})}));Zr.displayName=r6.displayName;var vj="Collapsible",[hde,zz]=ou(vj),[fde,a6]=hde(vj),Vz=L.forwardRef((e,t)=>
vendor: 4,188 bytes, line 714
714{const{__scopeCollapsible:r,open:a,defaultOpen:s,disabled:i,onOpenChange:o,...l}=e,[c,d]=ru({prop:a,defaultProp:s??!1,onChange:o,caller:vj});return n.jsx(fde,{scope:r,disabled:i,contentId:Kd(),open:c,onOpenToggle:L.useCallback(()=>d(h=>!h),[d]),children:n.jsx(Fn.div,{"data-state":i6(c),"data-disabled":i?"":void 0,...l,ref:t})})});Vz.displayName=vj;var Hz="CollapsibleTrigger",Wz=L.forwardRef((e,t)=>{const{__scopeCollapsible:r,...a}=e,s=a6(Hz,r);return n.jsx(Fn.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":i6(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...a,ref:t,onClick:nr(e.onClick,s.onOpenToggle)})});Wz.displayName=Hz;var s6="CollapsibleContent",Kz=L.forwardRef((e,t)=>{const{forceMount:r,...a}=e,s=a6(s6,e.__scopeCollapsible);return n.jsx(Km,{present:r||s.open,children:({present:i})=>n.jsx(mde,{...a,ref:t,present:i})})});Kz.displayName=s6;var mde=L.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:a,children:s,...i}=e,o=a6(s6,r),[l,c]=L.useState(a),d=L.useRef(null),h=ea(t,d),u=L.useRef(0),f=u.current,m=L.useRef(0),b=m.current,g=o.open||l,y=L.useRef(g),x=L.useRef(void 0);return L.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Oi(()=>{const w=d.current;if(w){x.current=x.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const j=w.getBoundingClientRect();u.current=j.height,m.current=j.width,y.current||(w.style.transitionDuration=x.current.transitionDuration,w.style.animationName=x.current.animationName),c(a)}},[o.open,a]),n.jsx(Fn.div,{"data-state":i6(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...i,ref:h,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&s})});function i6(e){return e?"open":"closed"}var pde=Vz,gde=Wz,xde=Kz,ud="Accordion",yde=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[o6,vde,bde]=R3(ud),[bj]=ou(ud,[bde,zz]),l6=zz(),Gz=we.forwardRef((e,t)=>{const{type:r,...a}=e,s=a,i=a;return n.jsx(o6.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?n.jsx(_de,{...i,ref:t}):n.jsx(Nde,{...s,ref:t})})});Gz.displayName=ud;var[Yz,wde]=bj(ud),[Qz,jde]=bj(ud,{collapsible:!1}),Nde=we.forwardRef((e,t)=>{const{value:r,defaultValue:a,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[l,c]=ru({prop:r,defaultProp:a??"",onChange:s,caller:ud});return n.jsx(Yz,{scope:e.__scopeAccordion,value:we.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:we.useCallback(()=>i&&c(""),[i,c]),children:n.jsx(Qz,{scope:e.__scopeAccordion,collapsible:i,children:n.jsx(Xz,{...o,ref:t})})})}),_de=we.forwardRef((e,t)=>{const{value:r,defaultValue:a,onValueChange:s=()=>{},...i}=e,[o,l]=ru({prop:r,defaultProp:a??[],onChange:s,caller:ud}),c=we.useCallback(h=>l((u=[])=>[...u,h]),[l]),d=we.useCallback(h=>l((u=[])=>u.filter(f=>f!==h)),[l]);return n.jsx(Yz,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:n.jsx(Qz,{scope:e.__scopeAccordion,collapsible:!0,children:n.jsx(Xz,{...i,ref:t})})})}),[Sde,wj]=bj(ud),Xz=we.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:a,dir:s,orientation:i="vertical",...o}=e,l=we.useRef(null),c=ea(l,t),d=vde(r),u=rj(s)==="ltr",f=nr(e.onKeyDown,m=>{var T;if(!yde.includes(m.key))return;const b=m.target,g=d().filter(R=>{var M;return!((M=R.ref.current)!=null&&M.disabled)}),y=g.findIndex(R=>R.ref.current===b),x=g.length;if(y===-1)return;m.preventDefault();let w=y;const j=0,N=x-1,_=()=>{w=y+1,w>N&&(w=j)},S=()=>{w=y-1,w<j&&(w=N)};switch(m.key){case"Home":w=j;break;case"End":w=N;break;case"ArrowRight":i==="horizontal"&&(u?_():S());break;case"ArrowDown":i==="vertical"&&_();break;case"ArrowLeft":i==="horizontal"&&(u?S():_());break;case"ArrowUp":i==="vertical"&&S();break}const A=w%x;(T=g[A].ref.current)==null||T.focus()});return n.jsx(Sde,{scope:r,disabled:a,direction:s,orientation:i,children:n.jsx(o6.Slot,{scope:r,children:n.jsx(Fn.div,{...o,"data-orientation":i,ref:c,onKeyDown:a?void 0:f})})})}),L1="AccordionItem",[Cde,c6]=bj(L1),Jz=we.forwardRef((e,t)=>
714{const{__scopeAccordion:r,value:a,...s}=e,i=wj(L1,r),o=wde(L1,r),l=l6(r),c=Kd(),d=a&&o.value.includes(a)||!1,h=i.disabled||e.disabled;return n.jsx(Cde,{scope:r,open:d,disabled:h,triggerId:c,children:n.jsx(pde,{"data-orientation":i.orientation,"data-state":aV(d),...l,...s,ref:t,disabled:h,open:d,onOpenChange:u=>{u?o.onItemOpen(a):o.onItemClose(a)}})})});Jz.displayName=L1;var Zz="AccordionHeader",eV=we.forwardRef((e,t)=>{const{__scopeAccordion:r,...a}=e,s=wj(ud,r),i=c6(Zz,r);return n.jsx(Fn.h3,{"data-orientation":s.orientation,"data-state":aV(i.open),"data-disabled":i.disabled?"":void 0,...a,ref:t})});eV.displayName=Zz;var lA="AccordionTrigger",tV=we.forwardRef((e,t)=>{const{__scopeAccordion:r,...a}=e,s=wj(ud,r),i=c6(lA,r),o=jde(lA,r),l=l6(r);return n.jsx(o6.ItemSlot,{scope:r,children:n.jsx(gde,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...l,...a,ref:t})})});tV.displayName=lA;var nV="AccordionContent",rV=we.forwardRef((e,t)=>{const{__scopeAccordion:r,...a}=e,s=wj(ud,r),i=c6(nV,r),o=l6(r);return n.jsx(xde,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...a,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});rV.displayName=nV;function aV(e){return e?"open":"closed"}var Ade=Gz,kde=Jz,Pde=eV,sV=tV,iV=rV;const Ede=Ade,Up=L.forwardRef(({className:e,...t},r)=>n.jsx(kde,{ref:r,className:Ln("border-b",e),...t}));Up.displayName="AccordionItem";const zp=L.forwardRef(({className:e,children:t,...r},a)=>n.jsx(Pde,{className:"flex",children:n.jsxs(sV,{ref:a,className:Ln("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,n.jsx(Wm,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));zp.displayName=sV.displayName;const Vp=L.forwardRef(({className:e,children:t,...r},a)=>n.jsx(iV,{ref:a,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:n.jsx("div",{className:Ln("pb-4 pt-0",e),children:t})}));Vp.displayName=iV.displayName;const jj=L.createContext(null);function d6(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const u6=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Tde extends L.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ode({children:e,isPresent:t}){const r=L.useId(),a=L.useRef(null),s=L.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=L.useContext(u6);return L.useInsertionEffect(()=>{const{width:o,height:l,top:c,left:d}=s.current;if(t||!a.current||!o||!l)return;a.current.dataset.motionPopId=r;const h=document.createElement("style");return i&&(h.nonce=i),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
715          [data-motion-pop-id="${r}"] {
716            position: absolute !important;
717            width: ${o}px !important;
718            height: ${l}px !important;
719            top: ${c}px !important;
720            left: ${d}px !important;
721          }
722        `),()=>{document.head.removeChild(h)}},[t]),n.jsx(Tde,{isPresent:t,childRef:a,sizeRef:s,children:L.cloneElement(e,{ref:a})})}const Mde=({children:e,initial:t,isPresent:r,onExitComplete:a,custom:s,presenceAffectsLayout:i,mode:o})=>{const l=d6(Lde),c=L.useId(),d=L.useCallback(u=>{l.set(u,!0);for(const f of l.values())if(!f)return;a&&a()},[l,a]),h=L.useMemo(()=>({id:c,initial:t,isPresent:r,custom:s,onExitComplete:d,register:u=>(l.set(u,!1),()=>l.delete(u))}),i?[Math.random(),d]:[r,d]);return L.useMemo(()=>{l.forEach((u,f)=>l.set(f,!1))},[r]),L.useEffect(()=>{!r&&!l.size&&a&&a()},[r]),o==="popLayout"&&(e=n.jsx(Ode,{isPresent:r,children:e})),n.jsx(jj.Provider,{value:h,children:e})};function Lde(){return new Map}const h6=L.createContext({}),Ml=e=>e;let oV=Ml;function f6(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tg=(e,t,r)=>{const a=t-e;return a===0?1:(r-e)/a},$u=e=>e*1e3,Uu=e=>e/1e3,jb=e=>e.key||"";function rM(e){const t=[];
vendor: 9,525 bytes, line 722
722return L.Children.forEach(e,r=>{L.isValidElement(r)&&t.push(r)}),t}const m6=typeof window<"u",lV=m6?L.useLayoutEffect:L.useEffect,Gm=({children:e,exitBeforeEnter:t,custom:r,initial:a=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const l=L.useMemo(()=>rM(e),[e]),c=l.map(jb),d=L.useRef(!0),h=L.useRef(l),u=d6(()=>new Map),[f,m]=L.useState(l),[b,g]=L.useState(l);lV(()=>{d.current=!1,h.current=l;for(let w=0;w<b.length;w++){const j=jb(b[w]);c.includes(j)?u.delete(j):u.get(j)!==!0&&u.set(j,!1)}},[b,c.length,c.join("-")]);const y=[];if(l!==f){let w=[...l];for(let j=0;j<b.length;j++){const N=b[j],_=jb(N);c.includes(_)||(w.splice(j,0,N),y.push(N))}o==="wait"&&y.length&&(w=y),g(rM(w)),m(l);return}const{forceRender:x}=L.useContext(h6);return n.jsx(n.Fragment,{children:b.map(w=>{const j=jb(w),N=l===b||c.includes(j),_=()=>{if(u.has(j))u.set(j,!0);else return;let S=!0;u.forEach(A=>{A||(S=!1)}),S&&(x==null||x(),g(h.current),s&&s())};return n.jsx(Mde,{isPresent:N,initial:!d.current||a?void 0:!1,custom:N?void 0:r,presenceAffectsLayout:i,mode:o,onExitComplete:N?void 0:_,children:w},j)})})},Rde={useManualTiming:!1};function Ide(e){let t=new Set,r=new Set,a=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){i.has(d)&&(c.schedule(d),e()),d(o)}const c={schedule:(d,h=!1,u=!1)=>{const m=u&&a?t:r;return h&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(o=d,a){s=!0;return}a=!0,[t,r]=[r,t],t.forEach(l),t.clear(),a=!1,s&&(s=!1,c.process(d))}};return c}const Nb=["read","resolveKeyframes","update","preRender","render","postRender"],Dde=40;function cV(e,t){let r=!1,a=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,o=Nb.reduce((x,w)=>(x[w]=Ide(i),x),{}),{read:l,resolveKeyframes:c,update:d,preRender:h,render:u,postRender:f}=o,m=()=>{const x=performance.now();r=!1,s.delta=a?1e3/60:Math.max(Math.min(x-s.timestamp,Dde),1),s.timestamp=x,s.isProcessing=!0,l.process(s),c.process(s),d.process(s),h.process(s),u.process(s),f.process(s),s.isProcessing=!1,r&&t&&(a=!1,e(m))},b=()=>{r=!0,a=!0,s.isProcessing||e(m)};return{schedule:Nb.reduce((x,w)=>{const j=o[w];return x[w]=(N,_=!1,S=!1)=>(r||b(),j.schedule(N,_,S)),x},{}),cancel:x=>{for(let w=0;w<Nb.length;w++)o[Nb[w]].cancel(x)},state:s,steps:o}}const{schedule:Pa,cancel:uf,state:Si,steps:EN}=cV(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ml,!0),dV=L.createContext({strict:!1}),aM={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"]},Og={};for(const e in aM)Og[e]={isEnabled:t=>aM[e].some(r=>!!t[r])};function Fde(e){for(const t in e)Og[t]={...Og[t],...e[t]}}const qde=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 R1(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qde.has(e)}let uV=e=>!R1(e);function Bde(e){e&&(uV=t=>t.startsWith("on")?!R1(t):e(t))}try{Bde(require("@emotion/is-prop-valid").default)}catch{}function $de(e,t,r){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||(uV(s)||r===!0&&R1(s)||!t&&!R1(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}function Ude(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...a)=>e(...a);return new Proxy(r,{get:(a,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Nj=L.createContext({});function n0(e){return typeof e=="string"||Array.isArray(e)}function _j(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const p6=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],g6=["initial",...p6];function Sj(e){return _j(e.animate)||g6.some(t=>n0(e[t]))}function hV(e){return!!(Sj(e)||e.variants)}function zde(e,t){if(Sj(e)){const{initial:r,animate:a}=e;return{initial:r===!1||n0(r)?r:void 0,animate:n0(a)?a:void 0}}return e.inherit!==!1?t:{}}function Vde(e){const{initial:t,animate:r}=zde(e,L.useContext(Nj));return L.useMemo(()=>({initial:t,animate:r}),[sM(t),sM(r)])}function sM(e){return Array.isArray(e)?e.join(" "):e}const Hde=Symbol.for("motionComponentSymbol");function Kp(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wde(e,t,r){return L.useCallback(a=>{a&&e.mount&&e.mount(a),t&&(a?t.mount(a):t.unmount()),r&&(typeof r=="function"?r(a):Kp(r)&&(r.current=a))},[t])}const x6=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Kde="framerAppearId",fV="data-"+x6(Kde),{schedule:y6}=cV(queueMicrotask,!1),mV=L.createContext({});function Gde(e,t,r,a,s){var i,o;const{visualElement:l}=L.useContext(Nj),c=L.useContext(dV),d=L.useContext(jj),h=L.useContext(u6).reducedMotion,u=L.useRef(null);a=a||c.renderer,!u.current&&a&&(u.current=a(e,{visualState:t,parent:l,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const f=u.current,m=L.useContext(mV);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Yde(u.current,r,s,m);const b=L.useRef(!1);L.useInsertionEffect(()=>{f&&b.current&&f.update(r,d)});const g=r[fV],y=L.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return lV(()=>{f&&(b.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),y6.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),L.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}),y.current=!1))}),f}function Yde(e,t,r,a){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:pV(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&Kp(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:a,layoutScroll:c,layoutRoot:d})}function pV(e){if(e)return e.options.allowProjection!==!1?e.projection:pV(e.parent)}function Qde({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:a,Component:s}){var i,o;e&&Fde(e);function l(d,h){let u;const f={...L.useContext(u6),...d,layoutId:Xde(d)},{isStatic:m}=f,b=Vde(d),g=a(d,m);if(!m&&m6){Jde();const y=Zde(f);u=y.MeasureLayout,b.visualElement=Gde(s,g,f,t,y.ProjectionNode)}return n.jsxs(Nj.Provider,{value:b,children:[u&&b.visualElement?n.jsx(u,{visualElement:b.visualElement,...f}):null,r(s,d,Wde(g,b.visualElement,h),g,m,b.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const c=L.forwardRef(l);return c[Hde]=s,c}function Xde({layoutId:e}){const t=L.useContext(h6).id;return t&&e!==void 0?t+"-"+e:e}function Jde(e,t){L.useContext(dV).strict}function Zde(e){const{drag:t,layout:r}=Og;if(!t&&!r)return{};const a={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}const eue=["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 v6(e){return typeof e!="string"||e.includes("-")?!1:!!(eue.indexOf(e)>-1||/[A-Z]/u.test(e))}function gV(e,{style:t,vars:r},a,s){Object.assign(e.style,t,s&&s.getProjectionStyles(a));for(const i in r)e.style.setProperty(i,r[i])}const xV=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 yV(e,t,r,a){gV(e,t,void 0,a);for(const s in t.attrs)e.setAttribute(xV.has(s)?s:x6(s),t.attrs[s])}const to=e=>!!(e&&e.getVelocity),I1={};function tue(e){Object.assign(I1,e)}const iv=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ym=new Set(iv);function vV(e,{layout:t,layoutId:r}){return Ym.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!I1[e]||e==="opacity")}function b6(e,t,r){var a;const{style:s}=e,i={};for(const o in s)(to(s[o])||t.style&&to(t.style[o])||vV(o,e)||((a=r==null?void 0:r.getValue(o))===null||a===void 0?void 0:a.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function bV(e,t,r){const a=b6(e,t,r);for(const s in e)if(to(e[s])||to(t[s])){const i=iv.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;a[i]=e[s]}return a}function iM(e){const t=[{},{}];
vendor: 4,325 bytes, line 722
722return e==null||e.values.forEach((r,a)=>{t[0][a]=r.get(),t[1][a]=r.getVelocity()}),t}function w6(e,t,r,a){if(typeof t=="function"){const[s,i]=iM(a);t=t(r!==void 0?r:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=iM(a);t=t(r!==void 0?r:e.custom,s,i)}return t}const cA=e=>Array.isArray(e),nue=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),rue=e=>cA(e)?e[e.length-1]||0:e;function c1(e){const t=to(e)?e.get():e;return nue(t)?t.toValue():t}function aue({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},a,s,i){const o={latestValues:sue(a,s,i,e),renderState:t()};return r&&(o.mount=l=>r(a,l,o)),o}const wV=e=>(t,r)=>{const a=L.useContext(Nj),s=L.useContext(jj),i=()=>aue(e,t,a,s);return r?i():d6(i)};function sue(e,t,r,a){const s={},i=a(e,{});for(const f in i)s[f]=c1(i[f]);let{initial:o,animate:l}=e;const c=Sj(e),d=hV(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let h=r?r.initial===!1:!1;h=h||o===!1;const u=h?l:o;if(u&&typeof u!="boolean"&&!_j(u)){const f=Array.isArray(u)?u:[u];for(let m=0;m<f.length;m++){const b=w6(e,f[m]);if(b){const{transitionEnd:g,transition:y,...x}=b;for(const w in x){let j=x[w];if(Array.isArray(j)){const N=h?j.length-1:0;j=j[N]}j!==null&&(s[w]=j)}for(const w in g)s[w]=g[w]}}}return s}const j6=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),jV=()=>({...j6(),attrs:{}}),NV=(e,t)=>t&&typeof e=="number"?t.transform(e):e,nh=(e,t,r)=>r>t?t:r<e?e:r,bx={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},r0={...bx,transform:e=>nh(0,1,e)},_b={...bx,default:1},ov=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Fh=ov("deg"),Yd=ov("%"),Pn=ov("px"),iue=ov("vh"),oue=ov("vw"),oM={...Yd,parse:e=>Yd.parse(e)/100,transform:e=>Yd.transform(e*100)},lue={borderWidth:Pn,borderTopWidth:Pn,borderRightWidth:Pn,borderBottomWidth:Pn,borderLeftWidth:Pn,borderRadius:Pn,radius:Pn,borderTopLeftRadius:Pn,borderTopRightRadius:Pn,borderBottomRightRadius:Pn,borderBottomLeftRadius:Pn,width:Pn,maxWidth:Pn,height:Pn,maxHeight:Pn,top:Pn,right:Pn,bottom:Pn,left:Pn,padding:Pn,paddingTop:Pn,paddingRight:Pn,paddingBottom:Pn,paddingLeft:Pn,margin:Pn,marginTop:Pn,marginRight:Pn,marginBottom:Pn,marginLeft:Pn,backgroundPositionX:Pn,backgroundPositionY:Pn},cue={rotate:Fh,rotateX:Fh,rotateY:Fh,rotateZ:Fh,scale:_b,scaleX:_b,scaleY:_b,scaleZ:_b,skew:Fh,skewX:Fh,skewY:Fh,distance:Pn,translateX:Pn,translateY:Pn,translateZ:Pn,x:Pn,y:Pn,z:Pn,perspective:Pn,transformPerspective:Pn,opacity:r0,originX:oM,originY:oM,originZ:Pn},lM={...bx,transform:Math.round},N6={...lue,...cue,zIndex:lM,size:Pn,fillOpacity:r0,strokeOpacity:r0,numOctaves:lM},due={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uue=iv.length;function hue(e,t,r){let a="",s=!0;for(let i=0;i<uue;i++){const o=iv[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||r){const d=NV(l,N6[o]);if(!c){s=!1;const h=due[o]||o;a+=`${h}(${d}) `}r&&(t[o]=d)}}return a=a.trim(),r?a=r(t,s?"":a):s&&(a="none"),a}const _V=e=>t=>typeof t=="string"&&t.startsWith(e),SV=_V("--"),fue=_V("var(--"),_6=e=>fue(e)?mue.test(e.split("/*")[0].trim()):!1,mue=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function S6(e,t,r){const{style:a,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const d=t[c];if(Ym.has(c)){o=!0;continue}else if(SV(c)){s[c]=d;continue}else{const h=NV(d,N6[c]);c.startsWith("origin")?(l=!0,i[c]=h):a[c]=h}}if(t.transform||(o||r?a.transform=hue(t,e.transform,r):a.transform&&(a.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:h=0}=i;a.transformOrigin=`${c} ${d} ${h}`}}function cM(e,t,r){return typeof e=="string"?e:Pn.transform(t+r*e)}function pue(e,t,r){const a=cM(t,e.x,e.width),s=cM(r,e.y,e.height);return`${a} ${s}`}const gue={offset:"stroke-dashoffset",array:"stroke-dasharray"},xue={offset:"strokeDashoffset",array:"strokeDasharray"};function yue(e,t,r=1,a=0,s=!0){e.pathLength=1;const i=s?gue:xue;e[i.offset]=Pn.transform(-a);const o=Pn.transform(t),l=Pn.transform(r);e[i.array]=`${o} ${l}`}function C6(e,{attrX:t,attrY:r,attrScale:a,originX:s,originY:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...d}
vendor: 25,316 bytes, line 722
722,h,u){if(S6(e,d,u),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:b}=e;f.transform&&(b&&(m.transform=f.transform),delete f.transform),b&&(s!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=pue(b,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),a!==void 0&&(f.scale=a),o!==void 0&&yue(f,o,l,c,!1)}const A6=e=>typeof e=="string"&&e.toLowerCase()==="svg",vue={useVisualState:wV({scrapeMotionValuesFromProps:bV,createRenderState:jV,onMount:(e,t,{renderState:r,latestValues:a})=>{Pa.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),Pa.render(()=>{C6(r,a,A6(t.tagName),e.transformTemplate),yV(t,r)})}})},bue={useVisualState:wV({scrapeMotionValuesFromProps:b6,createRenderState:j6})};function CV(e,t,r){for(const a in t)!to(t[a])&&!vV(a,r)&&(e[a]=t[a])}function wue({transformTemplate:e},t){return L.useMemo(()=>{const r=j6();return S6(r,t,e),Object.assign({},r.vars,r.style)},[t])}function jue(e,t){const r=e.style||{},a={};return CV(a,r,e),Object.assign(a,wue(e,t)),a}function Nue(e,t){const r={},a=jue(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=a,r}function _ue(e,t,r,a){const s=L.useMemo(()=>{const i=jV();return C6(i,t,A6(a),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};CV(i,e.style,e),s.style={...i,...s.style}}return s}function Sue(e=!1){return(r,a,s,{latestValues:i},o)=>{const c=(v6(r)?_ue:Nue)(a,i,o,r),d=$de(a,typeof r=="string",e),h=r!==L.Fragment?{...d,...c,ref:s}:{},{children:u}=a,f=L.useMemo(()=>to(u)?u.get():u,[u]);return L.createElement(r,{...h,children:f})}}function Cue(e,t){return function(a,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...v6(a)?vue:bue,preloadedFeatures:e,useRender:Sue(s),createVisualElement:t,Component:a};return Qde(o)}}function AV(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let a=0;a<r;a++)if(t[a]!==e[a])return!1;return!0}function Cj(e,t,r){const a=e.getProps();return w6(a,t,r!==void 0?r:a.custom,e)}const Aue=f6(()=>window.ScrollTimeline!==void 0);class kue{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,r){for(let a=0;a<this.animations.length;a++)this.animations[a][t]=r}attachTimeline(t,r){const a=this.animations.map(s=>{if(Aue()&&s.attachTimeline)return s.attachTimeline(t);if(typeof r=="function")return r(s)});return()=>{a.forEach((s,i)=>{s&&s(),this.animations[i].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 r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Pue extends kue{then(t,r){return Promise.all(this.animations).then(t).catch(r)}}function k6(e,t){return e?e[t]||e.default||e:void 0}const dA=2e4;function kV(e){let t=0;const r=50;let a=e.next(t);for(;!a.done&&t<dA;)t+=r,a=e.next(t);return t>=dA?1/0:t}function P6(e){return typeof e=="function"}function dM(e,t){e.timeline=t,e.onfinish=null}const E6=e=>Array.isArray(e)&&typeof e[0]=="number",Eue={linearEasing:void 0};function Tue(e,t){const r=f6(e);return()=>{var a;return(a=Eue[t])!==null&&a!==void 0?a:r()}}const D1=Tue(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),PV=(e,t,r=10)=>{let a="";const s=Math.max(Math.round(t/r),2);for(let i=0;i<s;i++)a+=e(Tg(0,s-1,i))+", ";return`linear(${a.substring(0,a.length-2)})`};function EV(e){return!!(typeof e=="function"&&D1()||!e||typeof e=="string"&&(e in uA||D1())||E6(e)||Array.isArray(e)&&e.every(EV))}const wy=([e,t,r,a])=>`cubic-bezier(${e}, ${t}, ${r}, ${a})`,uA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wy([0,.65,.55,1]),circOut:wy([.55,0,1,.45]),backIn:wy([.31,.01,.66,-.59]),backOut:wy([.33,1.53,.69,.99])};function TV(e,t){if(e)return typeof e=="function"&&D1()?PV(e,t):E6(e)?wy(e):Array.isArray(e)?e.map(r=>TV(r,t)||uA.easeOut):uA[e]}const Kc={x:!1,y:!1};function OV(){return Kc.x||Kc.y}function Oue(e,t,r){var a;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(a=void 0)!==null&&a!==void 0?a:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function MV(e,t){const r=Oue(e),a=new AbortController,s={passive:!0,...t,signal:a.signal};return[r,s,()=>a.abort()]}function uM(e){return t=>{t.pointerType==="touch"||OV()||e(t)}}function Mue(e,t,r={}){const[a,s,i]=MV(e,r),o=uM(l=>{const{target:c}=l,d=t(l);if(typeof d!="function"||!c)return;const h=uM(u=>{d(u),c.removeEventListener("pointerleave",h)});c.addEventListener("pointerleave",h,s)});return a.forEach(l=>{l.addEventListener("pointerenter",o,s)}),i}const LV=(e,t)=>t?e===t?!0:LV(e,t.parentElement):!1,T6=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Lue=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Rue(e){return Lue.has(e.tagName)||e.tabIndex!==-1}const jy=new WeakSet;function hM(e){return t=>{t.key==="Enter"&&e(t)}}function TN(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Iue=(e,t)=>{const r=e.currentTarget;if(!r)return;const a=hM(()=>{if(jy.has(r))return;TN(r,"down");const s=hM(()=>{TN(r,"up")}),i=()=>TN(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",a,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",a),t)};function fM(e){return T6(e)&&!OV()}function Due(e,t,r={}){const[a,s,i]=MV(e,r),o=l=>{const c=l.currentTarget;if(!fM(l)||jy.has(c))return;jy.add(c);const d=t(l),h=(m,b)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),!(!fM(m)||!jy.has(c))&&(jy.delete(c),typeof d=="function"&&d(m,{success:b}))},u=m=>{h(m,r.useGlobalTarget||LV(c,m.target))},f=m=>{h(m,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return a.forEach(l=>{!Rue(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(r.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),l.addEventListener("focus",d=>Iue(d,s),s)}),i}function Fue(e){return e==="x"||e==="y"?Kc[e]?null:(Kc[e]=!0,()=>{Kc[e]=!1}):Kc.x||Kc.y?null:(Kc.x=Kc.y=!0,()=>{Kc.x=Kc.y=!1})}let d1;function que(){d1=void 0}const Qd={now:()=>(d1===void 0&&Qd.set(Si.isProcessing||Rde.useManualTiming?Si.timestamp:performance.now()),d1),set:e=>{d1=e,queueMicrotask(que)}};function O6(e,t){e.indexOf(t)===-1&&e.push(t)}function M6(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class L6{constructor(){this.subscriptions=[]}add(t){return O6(this.subscriptions,t),()=>M6(this.subscriptions,t)}notify(t,r,a){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,a);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,r,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function RV(e,t){return t?e*(1e3/t):0}const mM=30,Bue=e=>!isNaN(parseFloat(e));class $ue{constructor(t,r={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(a,s=!0)=>{const i=Qd.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Qd.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Bue(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new L6);const a=this.events[t].add(r);return t==="change"?()=>{a(),Pa.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,a){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Qd.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>mM)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,mM);return RV(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 a0(e,t){return new $ue(e,t)}function Uue(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,a0(r))}function zue(e,t){const r=Cj(e,t);let{transitionEnd:a={},transition:s={},...i}=r||{};i={...i,...a};for(const o in i){const l=rue(i[o]);Uue(e,o,l)}}function Vue(e){return!!(to(e)&&e.add)}function hA(e,t){const r=e.getValue("willChange");if(Vue(r))return r.add(t)}function IV(e){return e.props[fV]}const DV=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Hue=1e-7,Wue=12;function Kue(e,t,r,a,s){let i,o,l=0;do o=t+(r-t)/2,i=DV(o,a,s)-e,i>0?r=o:t=o;while(Math.abs(i)>Hue&&++l<Wue);return o}function lv(e,t,r,a){if(e===t&&r===a)return Ml;const s=i=>Kue(i,0,1,e,r);return i=>i===0||i===1?i:DV(s(i),t,a)}const FV=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qV=e=>t=>1-e(1-t),BV=lv(.33,1.53,.69,.99),R6=qV(BV),$V=FV(R6),UV=e=>(e*=2)<1?.5*R6(e):.5*(2-Math.pow(2,-10*(e-1))),I6=e=>1-Math.sin(Math.acos(e)),zV=qV(I6),VV=FV(I6),HV=e=>/^0[^.\s]+$/u.test(e);function Gue(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||HV(e):!0}const WV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yue=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Que(e){const t=Yue.exec(e);if(!t)return[,];const[,r,a,s]=t;return[`--${r??a}`,s]}function KV(e,t,r=1){const[a,s]=Que(e);if(!a)return;const i=window.getComputedStyle(t).getPropertyValue(a);if(i){const o=i.trim();return WV(o)?parseFloat(o):o}return _6(s)?KV(s,t,r+1):s}const Xue=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),pM=e=>e===bx||e===Pn,gM=(e,t)=>parseFloat(e.split(", ")[t]),xM=(e,t)=>(r,{transform:a})=>{if(a==="none"||!a)return 0;const s=a.match(/^matrix3d\((.+)\)$/u);if(s)return gM(s[1],t);{const i=a.match(/^matrix\((.+)\)$/u);return i?gM(i[1],e):0}},Jue=new Set(["x","y","z"]),Zue=iv.filter(e=>!Jue.has(e));function ehe(e){const t=[];return Zue.forEach(r=>{const a=e.getValue(r);a!==void 0&&(t.push([r,a.get()]),a.set(r.startsWith("scale")?1:0))}),t}const Mg={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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:xM(4,13),y:xM(5,14)};Mg.translateX=Mg.x;Mg.translateY=Mg.y;const GV=e=>t=>t.test(e),the={test:e=>e==="auto",parse:e=>e},YV=[bx,Pn,Yd,Fh,oue,iue,the],yM=e=>YV.find(GV(e)),_m=new Set;let fA=!1,mA=!1;function QV(){if(mA){const e=Array.from(_m).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),r=new Map;t.forEach(a=>{const s=ehe(a);s.length&&(r.set(a,s),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const s=r.get(a);s&&s.forEach(([i,o])=>{var l;(l=a.getValue(i))===null||l===void 0||l.set(o)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}mA=!1,fA=!1,_m.forEach(e=>e.complete()),_m.clear()}function XV(){_m.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(mA=!0)})}function nhe(){XV(),QV()}class D6{constructor(t,r,a,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=a,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(_m.add(this),fA||(fA=!0,Pa.read(XV),Pa.resolveKeyframes(QV))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:a,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(a&&r){const c=a.readValue(r,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),_m.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,_m.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const My=e=>Math.round(e*1e5)/1e5,F6=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rhe(e){return e==null}const ahe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,q6=(e,t)=>r=>!!(typeof r=="string"&&ahe.test(r)&&r.startsWith(e)||t&&!rhe(r)&&Object.prototype.hasOwnProperty.call(r,t)),JV=(e,t,r)=>a=>{if(typeof a!="string")return a;const[s,i,o,l]=a.match(F6);return{[e]:parseFloat(s),[t]:parseFloat(i),[r]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},she=e=>nh(0,255,e),ON={...bx,transform:e=>Math.round(she(e))},am={test:q6("rgb","red"),parse:JV("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:a=1})=>"rgba("+ON.transform(e)+", "+ON.transform(t)+", "+ON.transform(r)+", "+My(r0.transform(a))+")"};function ihe(e){let t="",r="",a="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),a=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),a=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,a+=a,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(a,16),alpha:s?parseInt(s,16)/255:1}}const pA={test:q6("#"),parse:ihe,transform:am.transform},Gp={test:q6("hsl","hue"),parse:JV("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:a=1})=>"hsla("+Math.round(e)+", "+Yd.transform(My(t))+", "+Yd.transform(My(r))+", "+My(r0.transform(a))+")"},Yi={test:e=>am.test(e)||pA.test(e)||Gp.test(e),parse:e=>am.test(e)?am.parse(e):Gp.test(e)?Gp.parse(e):pA.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?am.transform(e):Gp.transform(e)},ohe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lhe(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(F6))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(ohe))===null||r===void 0?void 0:r.length)||0)>0}const ZV="number",eH="color",che="var",dhe="var(",vM="${}",uhe=/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 s0(e){const t=e.toString(),r=[],a={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(uhe,c=>(Yi.test(c)?(a.color.push(i),s.push(eH),r.push(Yi.parse(c))):c.startsWith(dhe)?(a.var.push(i),s.push(che),r.push(c)):(a.number.push(i),s.push(ZV),r.push(parseFloat(c))),++i,vM)).split(vM);return{values:r,split:l,indexes:a,types:s}}function tH(e){return s0(e).values}function nH(e){const{split:t,types:r}=s0(e),a=t.length;return s=>{let i="";for(let o=0;o<a;o++)if(i+=t[o],s[o]!==void 0){const l=r[o];l===ZV?i+=My(s[o]):l===eH?i+=Yi.transform(s[o]):i+=s[o]}return i}}const hhe=e=>typeof e=="number"?0:e;function fhe(e){const t=tH(e);return nH(e)(t.map(hhe))}const hf={test:lhe,parse:tH,createTransformer:nH,getAnimatableNone:fhe},mhe=new Set(["brightness","contrast","saturate","opacity"]);function phe(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=r.match(F6)||[];if(!a)return e;const s=r.replace(a,"");let i=mhe.has(t)?1:0;return a!==r&&(i*=100),t+"("+i+s+")"}const ghe=/\b([a-z-]*)\(.*?\)/gu,gA={...hf,getAnimatableNone:e=>{const t=e.match(ghe);return t?t.map(phe).join(" "):e}},xhe={...N6,color:Yi,backgroundColor:Yi,outlineColor:Yi,fill:Yi,stroke:Yi,borderColor:Yi,borderTopColor:Yi,borderRightColor:Yi,borderBottomColor:Yi,borderLeftColor:Yi,filter:gA,WebkitFilter:gA},B6=e=>xhe[e];function rH(e,t){let r=B6(e);return r!==gA&&(r=hf),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const yhe=new Set(["auto","none","0"]);function vhe(e,t,r){let a=0,s;for(;a<e.length&&!s;){const i=e[a];typeof i=="string"&&!yhe.has(i)&&s0(i).values.length&&(s=e[a]),a++}if(s&&r)for(const i of t)e[i]=rH(r,s)}class aH extends D6{constructor(t,r,a,s,i){super(t,r,a,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:a}=this;if(!r||!r.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),_6(d))){const h=KV(d,r.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Xue.has(a)||t.length!==2)return;const[s,i]=t,o=yM(s),l=yM(i);if(o!==l)if(pM(o)&&pM(l))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,a=[];for(let s=0;s<t.length;s++)Gue(t[s])&&a.push(s);a.length&&vhe(t,a,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mg[a](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(a,s).jump(s,!1)}measureEndState(){var t;const{element:r,name:a,unresolvedKeyframes:s}=this;if(!r||!r.current)return;const i=r.getValue(a);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=Mg[a](r.measureViewportBox(),window.getComputedStyle(r.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,d])=>{r.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const bM=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hf.test(e)||e==="0")&&!e.startsWith("url("));function bhe(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function whe(e,t,r,a){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=bM(s,t),l=bM(i,t);return!o||!l?!1:bhe(e)||(r==="spring"||P6(r))&&a}const jhe=e=>e!==null;function Aj(e,{repeat:t,repeatType:r="loop"},a){const s=e.filter(jhe),i=t&&r!=="loop"&&t%2===1?0:s.length-1;return!i||a===void 0?s[i]:a}const Nhe=40;class sH{constructor({autoplay:t=!0,delay:r=0,type:a="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qd.now(),this.options={autoplay:t,delay:r,type:a,repeat:s,repeatDelay:i,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Nhe?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nhe(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Qd.now(),this.hasAttemptedResolve=!0;const{name:a,type:s,velocity:i,delay:o,onComplete:l,onUpdate:c,isGenerator:d}=this.options;if(!d&&!whe(t,a,s,i))if(o)this.options.duration=0;else{c==null||c(Aj(t,this.options,r)),l==null||l(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,r);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...h},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ua=(e,t,r)=>e+(t-e)*r;function MN(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function _he({hue:e,saturation:t,lightness:r,alpha:a}){e/=360,t/=100,r/=100;let s=0,i=0,o=0;if(!t)s=i=o=r;else{const l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;s=MN(c,l,e+1/3),i=MN(c,l,e),o=MN(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:a}}function F1(e,t){return r=>r>0?t:e}const LN=(e,t,r)=>{const a=e*e,s=r*(t*t-a)+a;return s<0?0:Math.sqrt(s)},She=[pA,am,Gp],Che=e=>She.find(t=>t.test(e));function wM(e){const t=Che(e);if(!t)return!1;let r=t.parse(e);return t===Gp&&(r=_he(r)),r}const jM=(e,t)=>{const r=wM(e),a=wM(t);if(!r||!a)return F1(e,t);const s={...r};return i=>(s.red=LN(r.red,a.red,i),s.green=LN(r.green,a.green,i),s.blue=LN(r.blue,a.blue,i),s.alpha=Ua(r.alpha,a.alpha,i),am.transform(s))},Ahe=(e,t)=>r=>t(e(r)),cv=(...e)=>e.reduce(Ahe),xA=new Set(["none","hidden"]);function khe(e,t){return xA.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Phe(e,t){return r=>Ua(e,t,r)}function $6(e){return typeof e=="number"?Phe:typeof e=="string"?_6(e)?F1:Yi.test(e)?jM:Ohe:Array.isArray(e)?iH:typeof e=="object"?Yi.test(e)?jM:Ehe:F1}function iH(e,t){const r=[...e],a=r.length,s=e.map((i,o)=>$6(i)(i,t[o]));return i=>{for(let o=0;o<a;o++)r[o]=s[o](i);return r}}function Ehe(e,t){const r={...e,...t},a={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(a[s]=$6(e[s])(e[s],t[s]));return s=>{for(const i in a)r[i]=a[i](s);return r}}function The(e,t){var r;const a=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][s[o]],c=(r=e.values[l])!==null&&r!==void 0?r:0;a[i]=c,s[o]++}return a}const Ohe=(e,t)=>{const r=hf.createTransformer(t),a=s0(e),s=s0(t);return a.indexes.var.length===s.indexes.var.length&&a.indexes.color.length===s.indexes.color.length&&a.indexes.number.length>=s.indexes.number.length?xA.has(e)&&!s.values.length||xA.has(t)&&!a.values.length?khe(e,t):cv(iH(The(a,s),s.values),r):F1(e,t)};function oH(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Ua(e,t,r):$6(e)(e,t)}const Mhe=5;function lH(e,t,r){const a=Math.max(t-Mhe,0);return RV(r-e(a),t-a)}const Ja={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},RN=.001;function Lhe({duration:e=Ja.duration,bounce:t=Ja.bounce,velocity:r=Ja.velocity,mass:a=Ja.mass}){let s,i,o=1-t;o=nh(Ja.minDamping,Ja.maxDamping,o),e=nh(Ja.minDuration,Ja.maxDuration,Uu(e)),o<1?(s=d=>{const h=d*o,u=h*e,f=h-r,m=yA(d,o),b=Math.exp(-u);return RN-f/m*b},i=d=>{const u=d*o*e,f=u*r+r,m=Math.pow(o,2)*Math.pow(d,2)*e,b=Math.exp(-u),g=yA(Math.pow(d,2),o);return(-s(d)+RN>0?-1:1)*((f-m)*b)/g}):(s=d=>{const h=Math.exp(-d*e),u=(d-r)*e+1;return-RN+h*u},i=d=>{const h=Math.exp(-d*e),u=(r-d)*(e*e);return h*u});const l=5/e,c=Ihe(s,i,l);if(e=$u(e),isNaN(c))return{stiffness:Ja.stiffness,damping:Ja.damping,duration:e};{const d=Math.pow(c,2)*a;return{stiffness:d,damping:o*2*Math.sqrt(a*d),duration:e}}}const Rhe=12;function Ihe(e,t,r){let a=r;for(let s=1;s<Rhe;s++)a=a-e(a)/t(a);return a}function yA(e,t){return e*Math.sqrt(1-t*t)}const Dhe=["duration","bounce"],Fhe=["stiffness","damping","mass"];function NM(e,t){return t.some(r=>e[r]!==void 0)}function qhe(e){let t={velocity:Ja.velocity,stiffness:Ja.stiffness,damping:Ja.damping,mass:Ja.mass,isResolvedFromDuration:!1,...e};if(!NM(e,Fhe)&&NM(e,Dhe))if(e.visualDuration){const r=e.visualDuration,a=2*Math.PI/(r*1.2),s=a*a,i=2*nh(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Ja.mass,stiffness:s,damping:i}}else{const r=Lhe(e);t={...t,...r,mass:Ja.mass},t.isResolvedFromDuration=!0}return t}function cH(e=Ja.visualDuration,t=Ja.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:s}=r;const i=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:d,mass:h,duration:u,velocity:f,isResolvedFromDuration:m}=qhe({...r,velocity:-Uu(r.velocity||0)}
vendor: 5,356 bytes, line 722
722),b=f||0,g=d/(2*Math.sqrt(c*h)),y=o-i,x=Uu(Math.sqrt(c/h)),w=Math.abs(y)<5;a||(a=w?Ja.restSpeed.granular:Ja.restSpeed.default),s||(s=w?Ja.restDelta.granular:Ja.restDelta.default);let j;if(g<1){const _=yA(x,g);j=S=>{const A=Math.exp(-g*x*S);return o-A*((b+g*x*y)/_*Math.sin(_*S)+y*Math.cos(_*S))}}else if(g===1)j=_=>o-Math.exp(-x*_)*(y+(b+x*y)*_);else{const _=x*Math.sqrt(g*g-1);j=S=>{const A=Math.exp(-g*x*S),T=Math.min(_*S,300);return o-A*((b+g*x*y)*Math.sinh(T)+_*y*Math.cosh(T))/_}}const N={calculatedDuration:m&&u||null,next:_=>{const S=j(_);if(m)l.done=_>=u;else{let A=0;g<1&&(A=_===0?$u(b):lH(j,_,S));const T=Math.abs(A)<=a,R=Math.abs(o-S)<=s;l.done=T&&R}return l.value=l.done?o:S,l},toString:()=>{const _=Math.min(kV(N),dA),S=PV(A=>N.next(_*A).value,_,30);return _+"ms "+S}};return N}function _M({keyframes:e,velocity:t=0,power:r=.8,timeConstant:a=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:d=.5,restSpeed:h}){const u=e[0],f={done:!1,value:u},m=T=>l!==void 0&&T<l||c!==void 0&&T>c,b=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let g=r*t;const y=u+g,x=o===void 0?y:o(y);x!==y&&(g=x-u);const w=T=>-g*Math.exp(-T/a),j=T=>x+w(T),N=T=>{const R=w(T),M=j(T);f.done=Math.abs(R)<=d,f.value=f.done?x:M};let _,S;const A=T=>{m(f.value)&&(_=T,S=cH({keyframes:[f.value,b(f.value)],velocity:lH(j,T,f.value),damping:s,stiffness:i,restDelta:d,restSpeed:h}))};return A(0),{calculatedDuration:null,next:T=>{let R=!1;return!S&&_===void 0&&(R=!0,N(T),A(T)),_!==void 0&&T>=_?S.next(T-_):(!R&&N(T),f)}}}const Bhe=lv(.42,0,1,1),$he=lv(0,0,.58,1),dH=lv(.42,0,.58,1),Uhe=e=>Array.isArray(e)&&typeof e[0]!="number",zhe={linear:Ml,easeIn:Bhe,easeInOut:dH,easeOut:$he,circIn:I6,circInOut:VV,circOut:zV,backIn:R6,backInOut:$V,backOut:BV,anticipate:UV},SM=e=>{if(E6(e)){oV(e.length===4);const[t,r,a,s]=e;return lv(t,r,a,s)}else if(typeof e=="string")return zhe[e];return e};function Vhe(e,t,r){const a=[],s=r||oH,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ml:t;l=cv(c,l)}a.push(l)}return a}function Hhe(e,t,{clamp:r=!0,ease:a,mixer:s}={}){const i=e.length;if(oV(i===t.length),i===1)return()=>t[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Vhe(t,a,s),l=o.length,c=d=>{let h=0;if(l>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const u=Tg(e[h],e[h+1],d);return o[h](u)};return r?d=>c(nh(e[0],e[i-1],d)):c}function Whe(e,t){const r=e[e.length-1];for(let a=1;a<=t;a++){const s=Tg(0,t,a);e.push(Ua(r,1,s))}}function Khe(e){const t=[0];return Whe(t,e.length-1),t}function Ghe(e,t){return e.map(r=>r*t)}function Yhe(e,t){return e.map(()=>t||dH).splice(0,e.length-1)}function q1({duration:e=300,keyframes:t,times:r,ease:a="easeInOut"}){const s=Uhe(a)?a.map(SM):SM(a),i={done:!1,value:t[0]},o=Ghe(r&&r.length===t.length?r:Khe(t),e),l=Hhe(o,t,{ease:Array.isArray(s)?s:Yhe(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const Qhe=e=>{const t=({timestamp:r})=>e(r);return{start:()=>Pa.update(t,!0),stop:()=>uf(t),now:()=>Si.isProcessing?Si.timestamp:Qd.now()}},Xhe={decay:_M,inertia:_M,tween:q1,keyframes:q1,spring:cH},Jhe=e=>e/100;class U6 extends sH{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:c}=this.options;c&&c()};const{name:r,motionValue:a,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||D6,l=(c,d)=>this.onKeyframesResolved(c,d);this.resolver=new o(i,l,r,a,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:r="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,l=P6(r)?r:Xhe[r]||q1;let c,d;l!==q1&&typeof t[0]!="number"&&(c=cv(Jhe,oH(t[0],t[1])),t=[0,100]);const h=l({...this.options,keyframes:t});i==="mirror"&&(d=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),h.calculatedDuration===null&&(h.calculatedDuration=kV(h));const{calculatedDuration:u}=h,f=u+s,m=f*(a+1)-s;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:u,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:a}=this;if(!a){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:d,totalDuration:h,resolvedDuration:u}=a;if(this.startTime===null)return i.next(0);const{delay:f,repeat:m,repeatType:b,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-f*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>h;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let j=this.currentTime,N=i;
vendor: 67,877 bytes, line 722
722if(m){const T=Math.min(this.currentTime,h)/u;let R=Math.floor(T),M=T%1;!M&&T>=1&&(M=1),M===1&&R--,R=Math.min(R,m+1),!!(R%2)&&(b==="reverse"?(M=1-M,g&&(M-=g/u)):b==="mirror"&&(N=o)),j=nh(0,1,M)*u}const _=w?{done:!1,value:c[0]}:N.next(j);l&&(_.value=l(_.value));let{done:S}=_;!w&&d!==null&&(S=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return A&&s!==void 0&&(_.value=Aj(c,this.options,s)),y&&y(_.value),A&&this.finish(),_}get duration(){const{resolved:t}=this;return t?Uu(t.calculatedDuration):0}get time(){return Uu(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 r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Uu(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Qhe,onPlay:r,startTime:a}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),r&&r();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=a??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 Zhe=new Set(["opacity","clipPath","filter","transform"]);function efe(e,t,r,{delay:a=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const d={[t]:r};c&&(d.offset=c);const h=TV(l,s);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:a,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const tfe=f6(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),B1=10,nfe=2e4;function rfe(e){return P6(e.type)||e.type==="spring"||!EV(e.ease)}function afe(e,t){const r=new U6({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let a={done:!1,value:e[0]};const s=[];let i=0;for(;!a.done&&i<nfe;)a=r.sample(i),s.push(a.value),i+=B1;return{times:void 0,keyframes:s,duration:i-B1,ease:"linear"}}const uH={anticipate:UV,backInOut:$V,circInOut:VV};function sfe(e){return e in uH}class CM extends sH{constructor(t){super(t);const{name:r,motionValue:a,element:s,keyframes:i}=this.options;this.resolver=new aH(i,(o,l)=>this.onKeyframesResolved(o,l),r,a,s),this.resolver.scheduleResolve()}initPlayback(t,r){var a;let{duration:s=300,times:i,ease:o,type:l,motionValue:c,name:d,startTime:h}=this.options;if(!(!((a=c.owner)===null||a===void 0)&&a.current))return!1;if(typeof o=="string"&&D1()&&sfe(o)&&(o=uH[o]),rfe(this.options)){const{onComplete:f,onUpdate:m,motionValue:b,element:g,...y}=this.options,x=afe(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),s=x.duration,i=x.times,o=x.ease,l="keyframes"}const u=efe(c.owner.current,d,t,{...this.options,duration:s,times:i,ease:o});return u.startTime=h??this.calcStartTime(),this.pendingTimeline?(dM(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;c.set(Aj(t,this.options,r)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return Uu(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return Uu(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:a}=r;a.currentTime=$u(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:a}=r;a.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return Ml;const{animation:a}=r;dM(a,t)}return Ml}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.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:r,keyframes:a,duration:s,type:i,ease:o,times:l}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:u,element:f,...m}=this.options,b=new U6({...m,keyframes:a,duration:s,type:i,ease:o,times:l,isGenerator:!0}),g=$u(this.time);d.setWithVelocity(b.sample(g-B1).value,b.sample(g).value,B1)}const{onStop:c}=this.options;c&&c(),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:r,name:a,repeatDelay:s,repeatType:i,damping:o,type:l}=t;return tfe()&&a&&Zhe.has(a)&&r&&r.owner&&r.owner.current instanceof HTMLElement&&!r.owner.getProps().onUpdate&&!s&&i!=="mirror"&&o!==0&&l!=="inertia"}}const ife={type:"spring",stiffness:500,damping:25,restSpeed:10},ofe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lfe={type:"keyframes",duration:.8},cfe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dfe=(e,{keyframes:t})=>t.length>2?lfe:Ym.has(e)?e.startsWith("scale")?ofe(t[1]):ife:cfe;function ufe({when:e,delay:t,delayChildren:r,staggerChildren:a,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:d,...h}){return!!Object.keys(h).length}const z6=(e,t,r,a={},s,i)=>o=>{const l=k6(a,e)||{},c=l.delay||a.delay||0;let{elapsed:d=0}=a;d=d-$u(c);let h={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};ufe(l)||(h={...h,...dfe(e,h)}),h.duration&&(h.duration=$u(h.duration)),h.repeatDelay&&(h.repeatDelay=$u(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let u=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(u=!0)),u&&!i&&t.get()!==void 0){const f=Aj(h.keyframes,l);if(f!==void 0)return Pa.update(()=>{h.onUpdate(f),h.onComplete()}),new Pue([])}return!i&&CM.supports(h)?new CM(h):new U6(h)};function hfe({protectedKeys:e,needsAnimating:t},r){const a=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,a}function hH(e,t,{delay:r=0,transitionOverride:a,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;a&&(o=a);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const u in c){const f=e.getValue(u,(i=e.latestValues[u])!==null&&i!==void 0?i:null),m=c[u];if(m===void 0||h&&hfe(h,u))continue;const b={delay:r,...k6(o||{},u)};let g=!1;if(window.MotionHandoffAnimation){const x=IV(e);if(x){const w=window.MotionHandoffAnimation(x,u,Pa);w!==null&&(b.startTime=w,g=!0)}}hA(e,u),f.start(z6(u,f,m,e.shouldReduceMotion&&Ym.has(u)?{type:!1}:b,e,g));const y=f.animation;y&&d.push(y)}return l&&Promise.all(d).then(()=>{Pa.update(()=>{l&&zue(e,l)})}),d}function vA(e,t,r={}){var a;const s=Cj(e,t,r.type==="exit"?(a=e.presenceContext)===null||a===void 0?void 0:a.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>Promise.all(hH(e,s,r)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:u,staggerDirection:f}=i;return ffe(e,t,h+d,u,f,r)}:()=>Promise.resolve(),{when:c}=i;if(c){const[d,h]=c==="beforeChildren"?[o,l]:[l,o];return d().then(()=>h())}else return Promise.all([o(),l(r.delay)])}function ffe(e,t,r=0,a=0,s=1,i){const o=[],l=(e.variantChildren.size-1)*a,c=s===1?(d=0)=>d*a:(d=0)=>l-d*a;return Array.from(e.variantChildren).sort(mfe).forEach((d,h)=>{d.notify("AnimationStart",t),o.push(vA(d,t,{...i,delay:r+c(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(o)}function mfe(e,t){return e.sortNodePosition(t)}function pfe(e,t,r={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const s=t.map(i=>vA(e,i,r));a=Promise.all(s)}else if(typeof t=="string")a=vA(e,t,r);else{const s=typeof t=="function"?Cj(e,t,r.custom):t;a=Promise.all(hH(e,s,r))}return a.then(()=>{e.notify("AnimationComplete",t)})}const gfe=g6.length;function fH(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?fH(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<gfe;r++){const a=g6[r],s=e.props[a];(n0(s)||s===!1)&&(t[a]=s)}return t}const xfe=[...p6].reverse(),yfe=p6.length;function vfe(e){return t=>Promise.all(t.map(({animation:r,options:a})=>pfe(e,r,a)))}function bfe(e){let t=vfe(e),r=AM(),a=!0;const s=c=>(d,h)=>{var u;const f=Cj(e,h,c==="exit"?(u=e.presenceContext)===null||u===void 0?void 0:u.custom:void 0);if(f){const{transition:m,transitionEnd:b,...g}=f;d={...d,...g,...b}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,h=fH(e.parent)||{},u=[],f=new Set;let m={},b=1/0;for(let y=0;y<yfe;y++){const x=xfe[y],w=r[x],j=d[x]!==void 0?d[x]:h[x],N=n0(j),_=x===c?w.isActive:null;_===!1&&(b=y);let S=j===h[x]&&j!==d[x]&&N;if(S&&a&&e.manuallyAnimateOnMount&&(S=!1),w.protectedKeys={...m},!w.isActive&&_===null||!j&&!w.prevProp||_j(j)||typeof j=="boolean")continue;const A=wfe(w.prevProp,j);let T=A||x===c&&w.isActive&&!S&&N||y>b&&N,R=!1;const M=Array.isArray(j)?j:[j];let k=M.reduce(s(x),{});_===!1&&(k={});const{prevResolvedValues:P={}}=w,O={...P,...k},F=B=>{T=!0,f.has(B)&&(R=!0,f.delete(B)),w.needsAnimating[B]=!0;const Y=e.getValue(B);Y&&(Y.liveStyle=!1)};for(const B in O){const Y=k[B],ee=P[B];if(m.hasOwnProperty(B))continue;let J=!1;cA(Y)&&cA(ee)?J=!AV(Y,ee):J=Y!==ee,J?Y!=null?F(B):f.add(B):Y!==void 0&&f.has(B)?F(B):w.protectedKeys[B]=!0}w.prevProp=j,w.prevResolvedValues=k,w.isActive&&(m={...m,...k}),a&&e.blockInitialAnimation&&(T=!1),T&&(!(S&&A)||R)&&u.push(...M.map(B=>({animation:B,options:{type:x}})))}if(f.size){const y={};f.forEach(x=>{const w=e.getBaseTarget(x),j=e.getValue(x);j&&(j.liveStyle=!0),y[x]=w??null}),u.push({animation:y})}let g=!!u.length;return a&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(g=!1),a=!1,g?t(u):Promise.resolve()}function l(c,d){var h;if(r[c].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(c,d)}),r[c].isActive=d;const u=o(c);for(const f in r)r[f].protectedKeys={};return u}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>r,reset:()=>{r=AM(),a=!0}}}function wfe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!AV(t,e):!1}function zf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function AM(){return{animate:zf(!0),whileInView:zf(),whileHover:zf(),whileTap:zf(),whileDrag:zf(),whileFocus:zf(),exit:zf()}}class xf{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jfe extends xf{constructor(t){super(t),t.animationState||(t.animationState=bfe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_j(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Nfe=0;class _fe extends xf{constructor(){super(...arguments),this.id=Nfe++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Sfe={animation:{Feature:jfe},exit:{Feature:_fe}};function i0(e,t,r,a={passive:!0}){return e.addEventListener(t,r,a),()=>e.removeEventListener(t,r)}function dv(e){return{point:{x:e.pageX,y:e.pageY}}}const Cfe=e=>t=>T6(t)&&e(t,dv(t));function Ly(e,t,r,a){return i0(e,t,Cfe(r),a)}const kM=(e,t)=>Math.abs(e-t);function Afe(e,t){const r=kM(e.x,t.x),a=kM(e.y,t.y);return Math.sqrt(r**2+a**2)}class mH{constructor(t,r,{transformPagePoint:a,contextWindow:s,dragSnapToOrigin:i=!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 u=DN(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=Afe(u.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:b}=u,{timestamp:g}=Si;this.history.push({...b,timestamp:g});const{onStart:y,onMove:x}=this.handlers;f||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,f)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=IN(f,this.transformPagePoint),Pa.update(this.updatePoint,!0)},this.handlePointerUp=(u,f)=>{this.end();const{onEnd:m,onSessionEnd:b,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=DN(u.type==="pointercancel"?this.lastMoveEventInfo:IN(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(u,y),b&&b(u,y)},!T6(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=a,this.contextWindow=s||window;const o=dv(t),l=IN(o,this.transformPagePoint),{point:c}=l,{timestamp:d}=Si;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=r;h&&h(t,DN(l,this.history)),this.removeListeners=cv(Ly(this.contextWindow,"pointermove",this.handlePointerMove),Ly(this.contextWindow,"pointerup",this.handlePointerUp),Ly(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),uf(this.updatePoint)}}function IN(e,t){return t?{point:t(e.point)}:e}function PM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function DN({point:e},t){return{point:e,delta:PM(e,pH(t)),offset:PM(e,kfe(t)),velocity:Pfe(t,.1)}}function kfe(e){return e[0]}function pH(e){return e[e.length-1]}function Pfe(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,a=null;const s=pH(e);for(;r>=0&&(a=e[r],!(s.timestamp-a.timestamp>$u(t)));)r--;if(!a)return{x:0,y:0};const i=Uu(s.timestamp-a.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-a.x)/i,y:(s.y-a.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const gH=1e-4,Efe=1-gH,Tfe=1+gH,xH=.01,Ofe=0-xH,Mfe=0+xH;function Ll(e){return e.max-e.min}function Lfe(e,t,r){return Math.abs(e-t)<=r}function EM(e,t,r,a=.5){e.origin=a,e.originPoint=Ua(t.min,t.max,e.origin),e.scale=Ll(r)/Ll(t),e.translate=Ua(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Efe&&e.scale<=Tfe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ofe&&e.translate<=Mfe||isNaN(e.translate))&&(e.translate=0)}function Ry(e,t,r,a){EM(e.x,t.x,r.x,a?a.originX:void 0),EM(e.y,t.y,r.y,a?a.originY:void 0)}function TM(e,t,r){e.min=r.min+t.min,e.max=e.min+Ll(t)}function Rfe(e,t,r){TM(e.x,t.x,r.x),TM(e.y,t.y,r.y)}function OM(e,t,r){e.min=t.min-r.min,e.max=e.min+Ll(t)}function Iy(e,t,r){OM(e.x,t.x,r.x),OM(e.y,t.y,r.y)}function Ife(e,{min:t,max:r},a){return t!==void 0&&e<t?e=a?Ua(t,e,a.min):Math.max(e,t):r!==void 0&&e>r&&(e=a?Ua(r,e,a.max):Math.min(e,r)),e}function MM(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Dfe(e,{top:t,left:r,bottom:a,right:s}){return{x:MM(e.x,r,s),y:MM(e.y,t,a)}}function LM(e,t){let r=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,a]=[a,r]),{min:r,max:a}}function Ffe(e,t){return{x:LM(e.x,t.x),y:LM(e.y,t.y)}}function qfe(e,t){let r=.5;const a=Ll(e),s=Ll(t);return s>a?r=Tg(t.min,t.max-a,e.min):a>s&&(r=Tg(e.min,e.max-s,t.min)),nh(0,1,r)}function Bfe(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const bA=.35;function $fe(e=bA){return e===!1?e=0:e===!0&&(e=bA),{x:RM(e,"left","right"),y:RM(e,"top","bottom")}}function RM(e,t,r){return{min:IM(e,t),max:IM(e,r)}}function IM(e,t){return typeof e=="number"?e:e[t]||0}const DM=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yp=()=>({x:DM(),y:DM()}),FM=()=>({min:0,max:0}),ds=()=>({x:FM(),y:FM()});function dc(e){return[e("x"),e("y")]}function yH({top:e,left:t,right:r,bottom:a}){return{x:{min:t,max:r},y:{min:e,max:a}}}function Ufe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zfe(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:a.y,right:a.x}}function FN(e){return e===void 0||e===1}function wA({scale:e,scaleX:t,scaleY:r}){return!FN(e)||!FN(t)||!FN(r)}function Kf(e){return wA(e)||vH(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vH(e){return qM(e.x)||qM(e.y)}function qM(e){return e&&e!=="0%"}function $1(e,t,r){const a=e-r,s=t*a;return r+s}function BM(e,t,r,a,s){return s!==void 0&&(e=$1(e,s,a)),$1(e,r,a)+t}function jA(e,t=0,r=1,a,s){e.min=BM(e.min,t,r,a,s),e.max=BM(e.max,t,r,a,s)}function bH(e,{x:t,y:r}){jA(e.x,t.translate,t.scale,t.originPoint),jA(e.y,r.translate,r.scale,r.originPoint)}const $M=.999999999999,UM=1.0000000000001;function Vfe(e,t,r,a=!1){const s=r.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=r[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(a&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Xp(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,bH(e,o)),a&&Kf(i.latestValues)&&Xp(e,i.latestValues))}t.x<UM&&t.x>$M&&(t.x=1),t.y<UM&&t.y>$M&&(t.y=1)}function Qp(e,t){e.min=e.min+t,e.max=e.max+t}function zM(e,t,r,a,s=.5){const i=Ua(e.min,e.max,s);jA(e,t,r,i,a)}function Xp(e,t){zM(e.x,t.x,t.scaleX,t.scale,t.originX),zM(e.y,t.y,t.scaleY,t.scale,t.originY)}function wH(e,t){return yH(zfe(e.getBoundingClientRect(),t))}function Hfe(e,t,r){const a=wH(e,r),{scroll:s}=t;return s&&(Qp(a.x,s.offset.x),Qp(a.y,s.offset.y)),a}const jH=({current:e})=>e?e.ownerDocument.defaultView:null,Wfe=new WeakMap;class Kfe{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=ds(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(dv(h).point)},i=(h,u)=>{const{drag:f,dragPropagation:m,onDragStart:b}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fue(f),!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),dc(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Yd.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const j=w.layout.layoutBox[y];j&&(x=Ll(j)*(parseFloat(x)/100))}}this.originPoint[y]=x}),b&&Pa.postRender(()=>b(h,u)),hA(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(h,u)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:b,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=u;if(m&&this.currentDirection===null){this.currentDirection=Gfe(y),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",u.point,y),this.updateAxis("y",u.point,y),this.visualElement.render(),g&&g(h,u)},l=(h,u)=>this.stop(h,u),c=()=>dc(h=>{var u;return this.getAnimationState(h)==="paused"&&((u=this.getAxisMotionValue(h).animation)===null||u===void 0?void 0:u.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new mH(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:jH(this.visualElement)})}stop(t,r){const a=this.isDragging;if(this.cancel(),!a)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Pa.postRender(()=>i(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,a){const{drag:s}=this.getProps();if(!a||!Sb(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(o=Ife(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:a}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;r&&Kp(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=Dfe(s.layoutBox,r):this.constraints=!1,this.elastic=$fe(a),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&dc(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Bfe(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Kp(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Hfe(a,s.root,this.visualElement.getTransformPagePoint());let o=Ffe(s.layout.layoutBox,i);if(r){const l=r(Ufe(o));this.hasMutatedConstraints=!!l,l&&(o=yH(l))}return o}startAnimation(t){const{drag:r,dragMomentum:a,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=dc(h=>{if(!Sb(h,r,this.currentDirection))return;let u=c&&c[h]||{};o&&(u={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,b={type:"inertia",velocity:a?t[h]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(h,b)});return Promise.all(d).then(l)}startAxisValueAnimation(t,r){const a=this.getAxisMotionValue(t);return hA(this.visualElement,t),a.start(z6(t,a,0,r,this.visualElement,!1))}stopAnimation(){dc(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dc(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),s=a[r];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){dc(r=>{const{drag:a}=this.getProps();if(!Sb(r,a,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[r];i.set(t[r]-Ua(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:a}=this.visualElement;if(!Kp(r)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};dc(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=qfe({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),dc(o=>{if(!Sb(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];l.set(Ua(c,d,s[o]))})}addListeners(){if(!this.visualElement.current)return;Wfe.set(this.visualElement,this);const t=this.visualElement.current,r=Ly(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(c)}),a=()=>{const{dragConstraints:c}=this.getProps();Kp(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",a);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Pa.read(a);const o=i0(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(dc(h=>{const u=this.getAxisMotionValue(h);u&&(this.originPoint[h]+=c[h].translate,u.set(u.get()+c[h].translate))}),this.visualElement.render())}));return()=>{o(),r(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:a=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=bA,dragMomentum:l=!0}=t;return{...t,drag:r,dragDirectionLock:a,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Sb(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Gfe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Yfe extends xf{constructor(t){super(t),this.removeGroupControls=Ml,this.removeListeners=Ml,this.controls=new Kfe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ml}unmount(){this.removeGroupControls(),this.removeListeners()}}const VM=e=>(t,r)=>{e&&Pa.postRender(()=>e(t,r))};class Qfe extends xf{constructor(){super(...arguments),this.removePointerDownListener=Ml}onPointerDown(t){this.session=new mH(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jH(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:VM(t),onStart:VM(r),onMove:a,onEnd:(i,o)=>{delete this.session,s&&Pa.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Ly(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Xfe(){const e=L.useContext(jj);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:r,register:a}=e,s=L.useId();L.useEffect(()=>a(s),[]);const i=L.useCallback(()=>r&&r(s),[s,r]);return!t&&r?[!1,i]:[!0]}const u1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function HM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ey={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Pn.test(e))e=parseFloat(e);else return e;const r=HM(e,t.target.x),a=HM(e,t.target.y);return`${r}% ${a}%`}},Jfe={correct:(e,{treeScale:t,projectionDelta:r})=>{const a=e,s=hf.parse(e);if(s.length>5)return a;const i=hf.createTransformer(e),o=typeof s[0]!="number"?1:0,l=r.x.scale*t.x,c=r.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const d=Ua(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=d),typeof s[3+o]=="number"&&(s[3+o]/=d),i(s)}};class Zfe extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:a,layoutId:s}=this.props,{projection:i}=t;tue(eme),i&&(r.group&&r.group.add(i),a&&a.register&&s&&a.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),u1.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:a,drag:s,isPresent:i}=this.props,o=a.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Pa.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),y6.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:a}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function NH(e){const[t,r]=Xfe(),a=L.useContext(h6);return n.jsx(Zfe,{...e,layoutGroup:a,switchLayoutGroup:L.useContext(mV),isPresent:t,safeToRemove:r})}const eme={borderRadius:{...ey,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ey,borderTopRightRadius:ey,borderBottomLeftRadius:ey,borderBottomRightRadius:ey,boxShadow:Jfe};function tme(e,t,r){const a=to(e)?e:a0(e);return a.start(z6("",a,t,r)),a.animation}function nme(e){return e instanceof SVGElement&&e.tagName!=="svg"}const rme=(e,t)=>e.depth-t.depth;class ame{constructor(){this.children=[],this.isDirty=!1}add(t){O6(this.children,t),this.isDirty=!0}remove(t){M6(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rme),this.isDirty=!1,this.children.forEach(t)}}function sme(e,t){const r=Qd.now(),a=({timestamp:s})=>{const i=s-r;i>=t&&(uf(a),e(i-t))};return Pa.read(a,!0),()=>uf(a)}const _H=["TopLeft","TopRight","BottomLeft","BottomRight"],ime=_H.length,WM=e=>typeof e=="string"?parseFloat(e):e,KM=e=>typeof e=="number"||Pn.test(e);function ome(e,t,r,a,s,i){s?(e.opacity=Ua(0,r.opacity!==void 0?r.opacity:1,lme(a)),e.opacityExit=Ua(t.opacity!==void 0?t.opacity:1,0,cme(a))):i&&(e.opacity=Ua(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,a));for(let o=0;o<ime;o++){const l=`border${_H[o]}Radius`;let c=GM(t,l),d=GM(r,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||KM(c)===KM(d)?(e[l]=Math.max(Ua(WM(c),WM(d),a),0),(Yd.test(d)||Yd.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||r.rotate)&&(e.rotate=Ua(t.rotate||0,r.rotate||0,a))}function GM(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const lme=SH(0,.5,zV),cme=SH(.5,.95,Ml);function SH(e,t,r){return a=>a<e?0:a>t?1:r(Tg(e,t,a))}function YM(e,t){e.min=t.min,e.max=t.max}function ic(e,t){YM(e.x,t.x),YM(e.y,t.y)}function QM(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function XM(e,t,r,a,s){return e-=t,e=$1(e,1/r,a),s!==void 0&&(e=$1(e,1/s,a)),e}function dme(e,t=0,r=1,a=.5,s,i=e,o=e){if(Yd.test(t)&&(t=parseFloat(t),t=Ua(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Ua(i.min,i.max,a);e===i&&(l-=t),e.min=XM(e.min,t,r,l,s),e.max=XM(e.max,t,r,l,s)}function JM(e,t,[r,a,s],i,o){dme(e,t[r],t[a],t[s],t.scale,i,o)}const ume=["x","scaleX","originX"],hme=["y","scaleY","originY"];function ZM(e,t,r,a){JM(e.x,t,ume,r?r.x:void 0,a?a.x:void 0),JM(e.y,t,hme,r?r.y:void 0,a?a.y:void 0)}function eL(e){return e.translate===0&&e.scale===1}function CH(e){return eL(e.x)&&eL(e.y)}function tL(e,t){return e.min===t.min&&e.max===t.max}function fme(e,t){return tL(e.x,t.x)&&tL(e.y,t.y)}function nL(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function AH(e,t){return nL(e.x,t.x)&&nL(e.y,t.y)}function rL(e){return Ll(e.x)/Ll(e.y)}function aL(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class mme{constructor(){this.members=[]}add(t){O6(this.members,t),t.scheduleRender()}remove(t){if(M6(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let a;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){a=i;break}}return a?(this.promote(a),!0):!1}promote(t,r){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.instance&&a.scheduleRender(),t.scheduleRender(),t.resumeFrom=a,r&&(t.resumeFrom.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:a}=t;r.onExitComplete&&r.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function pme(e,t,r){let a="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(r==null?void 0:r.z)||0;if((s||i||o)&&(a=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:d,rotate:h,rotateX:u,rotateY:f,skewX:m,skewY:b}=r;d&&(a=`perspective(${d}px) ${a}`),h&&(a+=`rotate(${h}deg) `),u&&(a+=`rotateX(${u}deg) `),f&&(a+=`rotateY(${f}deg) `),m&&(a+=`skewX(${m}deg) `),b&&(a+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(a+=`scale(${l}, ${c})`),a||"none"}const Gf={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ny=typeof window<"u"&&window.MotionDebug!==void 0,qN=["","X","Y","Z"],gme={visibility:"hidden"},sL=1e3;let xme=0;function BN(e,t,r,a){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),a&&(a[e]=0))}function kH(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=IV(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Pa,!(s||i))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&kH(a)}function PH({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:a,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=xme++,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,Ny&&(Gf.totalNodes=Gf.resolvedTargetDeltas=Gf.recalculatedProjection=0),this.nodes.forEach(bme),this.nodes.forEach(Sme),this.nodes.forEach(Cme),this.nodes.forEach(wme),Ny&&window.MotionDebug.record(Gf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new ame)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new L6),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=nme(o),this.instance=o;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(d||c)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=sme(f,250),u1.hasAnimatedSinceResize&&(u1.hasAnimatedSinceResize=!1,this.nodes.forEach(oL))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||h.getDefaultTransition()||Tme,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=h.getProps(),w=!this.targetLayout||!AH(this.targetLayout,b)||m,j=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||j||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,j);const N={...k6(g,"layout"),onPlay:y,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N)}else f||oL(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,uf(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(Ame),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&&kH(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const u=this.path[h];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(iL);return}this.isUpdating||this.nodes.forEach(Nme),this.isUpdating=!1,this.nodes.forEach(_me),this.nodes.forEach(yme),this.nodes.forEach(vme),this.clearAllSnapshots();const l=Qd.now();Si.delta=nh(0,1e3/60,l-Si.timestamp),Si.timestamp=l,Si.isProcessing=!0,EN.update.process(Si),EN.preRender.process(Si),EN.render.process(Si),Si.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,y6.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jme),this.sharedNodes.forEach(kme)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pa.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pa.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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ds(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=a(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!CH(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;o&&(l||Kf(this.latestValues)||h)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),Ome(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return ds();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Mme))){const{scroll:h}=this.root;h&&(Qp(c.x,h.offset.x),Qp(c.y,h.offset.y))}return c}removeElementScroll(o){var l;const c=ds();if(ic(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:u,options:f}=h;h!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&ic(c,o),Qp(c.x,u.offset.x),Qp(c.y,u.offset.y))}return c}applyTransform(o,l=!1){const c=ds();ic(c,o);for(let d=0;d<this.path.length;d++){const h=this.path[d];!l&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Xp(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Kf(h.latestValues)&&Xp(c,h.latestValues)}return Kf(this.latestValues)&&Xp(c,this.latestValues),c}removeTransform(o){const l=ds();ic(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Kf(d.latestValues))continue;wA(d.latestValues)&&d.updateSnapshot();const h=ds(),u=d.measurePageBox();ic(h,u),ZM(l,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return Kf(this.latestValues)&&ZM(l,this.latestValues),l}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!==Si.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(o||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=Si.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ds(),this.relativeTargetOrigin=ds(),Iy(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ds(),this.targetWithTransforms=ds()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Rfe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ic(this.target,this.layout.layoutBox),bH(this.target,this.targetDelta)):ic(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=ds(),this.relativeTargetOrigin=ds(),Iy(this.relativeTargetOrigin,this.target,m.target),ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ny&&Gf.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||wA(this.parent.latestValues)||vH(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 l=this.getLead(),c=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Si.timestamp&&(d=!1),d)return;const{layout:h,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||u))return;ic(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Vfe(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=ds());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(QM(this.prevProjectionDelta.x,this.projectionDelta.x),QM(this.prevProjectionDelta.y,this.projectionDelta.y)),Ry(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!aL(this.projectionDelta.x,this.prevProjectionDelta.x)||!aL(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),Ny&&Gf.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yp(),this.projectionDelta=Yp(),this.projectionDeltaWithTransform=Yp()}setAnimationOrigin(o,l=!1){const c=this.snapshot,d=c?c.latestValues:{},h={...this.latestValues},u=Yp();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=ds(),m=c?c.source:void 0,b=this.layout?this.layout.source:void 0,g=m!==b,y=this.getStack(),x=!y||y.members.length<=1,w=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Eme));this.animationProgress=0;let j;this.mixTargetDelta=N=>{const _=N/1e3;lL(u.x,o.x,_),lL(u.y,o.y,_),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Iy(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pme(this.relativeTarget,this.relativeTargetOrigin,f,_),j&&fme(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=ds()),ic(j,this.relativeTarget)),g&&(this.animationValues=h,ome(h,d,this.latestValues,_,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},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&&(uf(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pa.update(()=>{u1.hasAnimatedSinceResize=!0,this.currentAnimation=tme(0,sL,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},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(sL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:h}=o;if(!(!l||!c||!d)){if(this!==o&&this.layout&&d&&EH(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||ds();const u=Ll(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+u;const f=Ll(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}ic(l,c),Xp(l,h),Ry(this.projectionDeltaWithTransform,this.layoutCorrected,l,h)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new mme),this.sharedNodes.get(o).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(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:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&BN("z",o,d,this.animationValues);for(let h=0;h<qN.length;h++)BN(`rotate${qN[h]}`,o,d,this.animationValues),BN(`skew${qN[h]}`,o,d,this.animationValues);o.render();for(const h in d)o.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return gme;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=c1(o==null?void 0:o.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=c1(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Kf(this.latestValues)&&(g.transform=h?h({},""):"none",this.hasProjected=!1),g}const f=u.animationValues||u.latestValues;this.applyTransformsToTarget(),d.transform=pme(this.projectionDeltaWithTransform,this.treeScale,f),h&&(d.transform=h(f,d.transform));const{x:m,y:b}=this.projectionDelta;d.transformOrigin=`${m.origin*100}% ${b.origin*100}% 0`,u.animationValues?d.opacity=u===this?(c=(l=f.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:d.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in I1){if(f[g]===void 0)continue;const{correct:y,applyTo:x}=I1[g],w=d.transform==="none"?f[g]:y(f[g],u);if(x){const j=x.length;for(let N=0;N<j;N++)d[x[N]]=w}else d[g]=w}return this.options.layoutId&&(d.pointerEvents=u===this?c1(o==null?void 0:o.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(iL),this.root.sharedNodes.clear()}}}function yme(e){e.updateLayout()}function vme(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:s}=e.layout,{animationType:i}=e.options,o=r.source!==e.layout.source;i==="size"?dc(u=>{const f=o?r.measuredBox[u]:r.layoutBox[u],m=Ll(f);f.min=a[u].min,f.max=f.min+m}):EH(i,r.layoutBox,a)&&dc(u=>{const f=o?r.measuredBox[u]:r.layoutBox[u],m=Ll(a[u]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+m)});const l=Yp();Ry(l,a,r.layoutBox);const c=Yp();o?Ry(c,e.applyTransform(s,!0),r.measuredBox):Ry(c,a,r.layoutBox);const d=!CH(l);let h=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:m}=u;if(f&&m){const b=ds();Iy(b,r.layoutBox,f.layoutBox);const g=ds();Iy(g,a,m.layoutBox),AH(b,g)||(h=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=b,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:r,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function bme(e){Ny&&Gf.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 wme(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jme(e){e.clearSnapshot()}function iL(e){e.clearMeasurements()}function Nme(e){e.isLayoutDirty=!1}function _me(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oL(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sme(e){e.resolveTargetDelta()}function Cme(e){e.calcProjection()}function Ame(e){e.resetSkewAndRotation()}function kme(e){e.removeLeadSnapshot()}function lL(e,t,r){e.translate=Ua(t.translate,0,r),e.scale=Ua(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function cL(e,t,r,a){e.min=Ua(t.min,r.min,a),e.max=Ua(t.max,r.max,a)}function Pme(e,t,r,a){cL(e.x,t.x,r.x,a),cL(e.y,t.y,r.y,a)}function Eme(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Tme={duration:.45,ease:[.4,0,.1,1]},dL=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),uL=dL("applewebkit/")&&!dL("chrome/")?Math.round:Ml;function hL(e){e.min=uL(e.min),e.max=uL(e.max)}function Ome(e){hL(e.x),hL(e.y)}function EH(e,t,r){return e==="position"||e==="preserve-aspect"&&!Lfe(rL(t),rL(r),.2)}function Mme(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Lme=PH({attachResizeListener:(e,t)=>i0(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),$N={current:void 0},TH=PH({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$N.current){const e=new Lme({});e.mount(window),e.setOptions({layoutScroll:!0}),$N.current=e}return $N.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Rme={pan:{Feature:Qfe},drag:{Feature:Yfe,ProjectionNode:TH,MeasureLayout:NH}};function fL(e,t,r){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,i=a[s];i&&Pa.postRender(()=>i(t,dv(t)))}class Ime extends xf{mount(){const{current:t}=this.node;t&&(this.unmount=Mue(t,r=>(fL(this.node,r,"Start"),a=>fL(this.node,a,"End"))))}unmount(){}}class Dme extends xf{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=cv(i0(this.node.current,"focus",()=>this.onFocus()),i0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mL(e,t,r){const{props:a}=e;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),i=a[s];i&&Pa.postRender(()=>i(t,dv(t)))}class Fme extends xf{mount(){const{current:t}=this.node;t&&(this.unmount=Due(t,r=>(mL(this.node,r,"Start"),(a,{success:s})=>mL(this.node,a,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const NA=new WeakMap,UN=new WeakMap,qme=e=>{const t=NA.get(e.target);t&&t(e)},Bme=e=>{e.forEach(qme)};function $me({root:e,...t}){const r=e||document;UN.has(r)||UN.set(r,{});const a=UN.get(r),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(Bme,{root:e,...t})),a[s]}function Ume(e,t,r){const a=$me(t);return NA.set(e,r),a.observe(e),()=>{NA.delete(e),a.unobserve(e)}}const zme={some:0,all:1};class Vme extends xf{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:a,amount:s="some",once:i}=t,o={root:r?r.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:zme[s]},l=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:u}=this.node.getProps(),f=d?h:u;f&&f(c)};return Ume(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Hme(t,r))&&this.startObserver()}unmount(){}}function Hme({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Wme={inView:{Feature:Vme},tap:{Feature:Fme},focus:{Feature:Dme},hover:{Feature:Ime}},Kme={layout:{ProjectionNode:TH,MeasureLayout:NH}},_A={current:null},OH={current:!1};function Gme(){if(OH.current=!0,!!m6)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_A.current=e.matches;e.addListener(t),t()}else _A.current=!1}function Yme(e,t,r){for(const a in t){const s=t[a],i=r[a];if(to(s))e.addValue(a,s);else if(to(i))e.addValue(a,a0(s,{owner:e}));else if(i!==s)if(e.hasValue(a)){const o=e.getValue(a);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(a);e.addValue(a,a0(o!==void 0?o:s,{owner:e}))}}for(const a in r)t[a]===void 0&&e.removeValue(a);return t}const pL=new WeakMap,Qme=[...YV,Yi,hf],Xme=e=>Qme.find(GV(e)),gL=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Jme{scrapeMotionValuesFromProps(t,r,a){return{}}constructor({parent:t,props:r,presenceContext:a,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=D6,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 f=Qd.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Pa.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=r.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=r,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Sj(r),this.isVariantNode=hV(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...u}=this.scrapeMotionValuesFromProps(r,{},this);for(const f in u){const m=u[f];c[f]!==void 0&&to(m)&&m.set(c[f],!1)}}mount(t){this.current=t,pL.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((r,a)=>this.bindToMotionValue(a,r)),OH.current||Gme(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_A.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){pL.delete(this.current),this.projection&&this.projection.unmount(),uf(this.notifyUpdate),uf(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 r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const a=Ym.has(t),s=r.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Pa.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),r.owner&&r.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 Og){const r=Og[t];if(!r)continue;const{isEnabled:a,Feature:s}=r;if(!this.features[t]&&s&&a(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ds()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let a=0;a<gL.length;a++){const s=gL[a];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Yme(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const a=this.values.get(t);r!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&r!==void 0&&(a=a0(r===null?void 0:r,{owner:this}),this.addValue(t,a)),a}readValue(t,r){var a;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!==null&&a!==void 0?a:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(WV(s)||HV(s))?s=parseFloat(s):!Xme(s)&&hf.test(r)&&(s=rH(t,r)),this.setBaseTarget(t,to(s)?s.get():s)),to(s)?s.get():s}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:a}=this.props;let s;if(typeof a=="string"||typeof a=="object"){const o=w6(this.props,a,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);o&&(s=o[t])}if(a&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!to(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new L6),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class MH extends Jme{constructor(){super(...arguments),this.KeyframeResolver=aH}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:a}){delete r[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;to(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function Zme(e){return window.getComputedStyle(e)}class epe extends MH{constructor(){super(...arguments),this.type="html",this.renderInstance=gV}readValueFromInstance(t,r){if(Ym.has(r)){const a=B6(r);return a&&a.default||0}else{const a=Zme(t),s=(SV(r)?a.getPropertyValue(r):a[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return wH(t,r)}build(t,r,a){S6(t,r,a.transformTemplate)}scrapeMotionValuesFromProps(t,r,a){return b6(t,r,a)}}class tpe extends MH{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ds}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ym.has(r)){const a=B6(r);return a&&a.default||0}return r=xV.has(r)?r:x6(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,a){return bV(t,r,a)}build(t,r,a){C6(t,r,this.isSVGTag,a.transformTemplate)}renderInstance(t,r,a,s){yV(t,r,a,s)}mount(t){this.isSVGTag=A6(t.tagName),super.mount(t)}}const npe=(e,t)=>
722v6(e)?new tpe(t):new epe(t,{allowProjection:e!==L.Fragment}),rpe=Cue({...Sfe,...Wme,...Rme,...Kme},npe),lt=Ude(rpe);function _r(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 ld(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Lg(e,t){const r=_r(e);return isNaN(t)?ld(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ape(e,t){const r=_r(e);if(isNaN(t))return ld(e,NaN);const a=r.getDate(),s=ld(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return a>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),a),r)}const LH=6048e5,spe=864e5;let ipe={};function uv(){return ipe}function rd(e,t){var l,c,d,h;const r=uv(),a=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,s=_r(e),i=s.getDay(),o=(i<a?7:0)+i-a;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function U1(e){return rd(e,{weekStartsOn:1})}function RH(e){const t=_r(e),r=t.getFullYear(),a=ld(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=U1(a),i=ld(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=U1(i);return t.getTime()>=s.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function o0(e){const t=_r(e);return t.setHours(0,0,0,0),t}function xL(e){const t=_r(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function ope(e,t){const r=o0(e),a=o0(t),s=+r-xL(r),i=+a-xL(a);return Math.round((s-i)/spe)}function lpe(e){const t=RH(e),r=ld(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),U1(r)}function V6(e,t){const r=t*7;return Lg(e,r)}function cpe(e){return ld(e,Date.now())}function kj(e,t){const r=o0(e),a=o0(t);return+r==+a}function dpe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}
722function upe(e){if(!dpe(e)&&typeof e!="number")return!1;const t=_r(e);return!isNaN(Number(t))}function H6(e){const t=_r(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function hpe(e,t){const r=_r(e.start),a=_r(e.end);let s=+r>+a;const i=s?+r:+a,o=s?a:r;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=i;)c.push(_r(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return s?c.reverse():c}function fpe(e,t){const r=_r(e.start),a=_r(e.end);let s=+r>+a;const i=s?+r:+a,o=s?a:r;o.setHours(0,0,0,0),o.setDate(1);let l=1;const c=[];for(;+o<=i;)c.push(_r(o)),o.setMonth(o.getMonth()+l);return s?c.reverse():c}function mpe(e,t){const r=_r(e.start),a=_r(e.end);let s=+r>+a;const i=rd(s?a:r,t),o=rd(s?r:a,t);i.setHours(15),o.setHours(15);const l=+o.getTime();let c=i,d=1;const h=[];for(;+c<=l;)c.setHours(0),h.push(_r(c)),c=V6(c,d),c.setHours(15);return s?h.reverse():h}function W6(e){const t=_r(e);return t.setDate(1),t.setHours(0,0,0,0),t}function z1(e){const t=_r(e),r=ld(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function K6(e,t){var l,c,d,h;const r=uv(),a=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.weekStartsOn)??0,s=_r(e),i=s.getDay(),o=(i<a?-7:0)+6-(i-a);return s.setDate(s.getDate()+o),s.setHours(23,59,59,999),s}const ppe={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"}},gpe=(e,t,r)=>{let a;const s=ppe[e];return typeof s=="string"?a=s:t===1?a=s.one:a=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};function zN(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const xpe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ype={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vpe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bpe={date:zN({formats:xpe,defaultWidth:"full"}),time:zN({formats:ype,defaultWidth:"full"}),dateTime:zN({formats:vpe,defaultWidth:"full"})},wpe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jpe=(e,t,r,a)=>wpe[e];function ty(e){return(t,r)=>{const a=r!=null&&r.context?String(r.context):"standalone";let s;if(a==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const Npe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_pe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Spe={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"]},Cpe={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","Frid
722ay","Saturday"]},Ape={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"}},kpe={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"}},Ppe=(e,t)=>{const r=Number(e),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Epe={ordinalNumber:Ppe,era:ty({values:Npe,defaultWidth:"wide"}),quarter:ty({values:_pe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ty({values:Spe,defaultWidth:"wide"}),day:ty({values:Cpe,defaultWidth:"wide"}),dayPeriod:ty({values:Ape,defaultWidth:"wide",formattingValues:kpe,defaultFormattingWidth:"wide"})};function ny(e){return(t,r={})=>{const a=r.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Ope(l,u=>u.test(o)):Tpe(l,u=>u.test(o));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const h=t.slice(o.length);return{value:d,rest:h}}}function Tpe(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Ope(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Mpe(e){return(t,r={})=>{const a=t.match(e.matchPattern);if(!a)return null;const s=a[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const Lpe=/^(\d+)(th|st|nd|rd)?/i,Rpe=/\d+/i,Ipe={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},Dpe={any:[/^b/i,/^(a|c)/i]},Fpe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qpe={any:[/1/i,/2/i,/3/i,/4/i]},Bpe={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},$pe={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]},Upe={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},zpe={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]},Vpe={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},Hpe={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}},Wpe={ordinalNumber:Mpe({matchPattern:Lpe,parsePattern:Rpe,valueCallback:e=>parseInt(e,10)}),era:ny({matchPatterns:Ipe,defaultMatchWidth:"wide",parsePatterns:Dpe,defaultParseWidth:"any"}),quarter:ny({matchPatterns:Fpe,defaultMatchWidth:"wide",parsePatterns:qpe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ny({matchPatterns:Bpe,defaultMatchWidth:"wide",parsePatterns:$pe,defaultParseWidth:"any"}),day:ny({matchPatterns:Upe,defaultMatchWidth:"wide",parsePatterns:zpe,defaultParseWidth:"any"}),dayPeriod:ny({matchPatterns:Vpe,defaultMatchWidth:"any",parsePatterns:Hpe,defaultParseWidth:"any"})},Kpe={code:"en-US",formatDistance:gpe,formatLong:bpe,formatRelative:jpe,localize:Epe,match:Wpe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Gpe(e){const t=_r(e);return ope(t,z1(t))+1}function Ype(e){const t=_r(e),r=+U1(t)-+lpe(t);return Math.round(r/LH)+1}function IH(e,t){var h,u,f,m;const r=_r(e),a=r.getFullYear(),s=uv(),i=(t==null?void 0:t.firstWeekContainsDate)??((u=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:u.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(f=s.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,o=ld(e,0);o.setFullYear(a+1,0,i),o.setHours(0,0,0,0);const l=rd(o,t),c=ld(e,0);c.setFullYear(a,0,i),c.setHours(0,0,0,0);const d=rd(c,t);return r.getTime()>=l.getTime()?a+1:r.getTime()>=d.getTime()?a:a-1}function Qpe(e,t){var l,c,d,h;const r=uv(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,s=IH(e,t),i=ld(e,0);return i.setFullYear(s,0,a),i.setHours(0,0,0,0),rd(i,t)}function Xpe(e,t){const r=_r(e),a=+rd(r,t)-+Qpe(r,t);return Math.round(a/LH)+1}function Kr(e,t){const r=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return r+a}const Th={y(e,t){const r=e.getFullYear(),a=r>0?r:1-r;return Kr(t==="yy"?a%100:a,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Kr(r+1,2)},d(e,t){return Kr(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Kr(e.getHours()%12||12,t.length)},H(e,t){return Kr(e.getHours(),t.length)},m(e,t){return Kr(e.getMinutes(),t.length)},s(e,t){return Kr(e.getSeconds(),t.length)},S(e,t){const r=t.length,a=e.getMilliseconds(),s=Math.trunc(a*Math.pow(10,r-3));return Kr(s,t.length)}},Pp={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yL={G:function(e,t,r){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const a=e.getFullYear(),s=a>0?a:1-a;return r.ordinalNumber(s,{unit:"year"})}return Th.y(e,t)},Y:function(e,t,r,a){const s=IH(e,a),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return Kr(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Kr(i,t.length)},R:function(e,t){const r=RH(e);return Kr(r,t.length)},u:function(e,t){const r=e.getFullYear();return Kr(r,t.length)},Q:function(e,t,r){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Kr(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,r){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Kr(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,r){const a=e.getMonth();switch(t){case"M":case"MM":return Th.M(e,t);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,r){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return Kr(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,r,a){const s=Xpe(e,a);return t==="wo"?r.ordinalNumber(s,{unit:"week"}):Kr(s,t.length)},I:function(e,t,r){const a=Ype(e);return t==="Io"?r.ordinalNumber(a,{unit:"week"}):Kr(a,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Th.d(e,t)},D:function(e,t,r){const a=Gpe(e);return t==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):Kr(a,t.length)},E:function(e,t,r){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,r,a){const s=e.getDay(),i=(s-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Kr(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,r,a){const s=e.getDay(),i=(s-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Kr(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,r){const a=e.getDay(),s=a===0?7:a;switch(t){case"i":return String(s);case"ii":return Kr(s,t.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,r){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,r){const a=e.getHours();let s;switch(a===12?s=Pp.noon:a===0?s=Pp.midnight:s=a/12>
vendor: 4,427 bytes, line 722
722=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,r){const a=e.getHours();let s;switch(a>=17?s=Pp.evening:a>=12?s=Pp.afternoon:a>=4?s=Pp.morning:s=Pp.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return Th.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Th.H(e,t)},K:function(e,t,r){const a=e.getHours()%12;return t==="Ko"?r.ordinalNumber(a,{unit:"hour"}):Kr(a,t.length)},k:function(e,t,r){let a=e.getHours();return a===0&&(a=24),t==="ko"?r.ordinalNumber(a,{unit:"hour"}):Kr(a,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Th.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Th.s(e,t)},S:function(e,t){return Th.S(e,t)},X:function(e,t,r){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return bL(a);case"XXXX":case"XX":return Yf(a);case"XXXXX":case"XXX":default:return Yf(a,":")}},x:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"x":return bL(a);case"xxxx":case"xx":return Yf(a);case"xxxxx":case"xxx":default:return Yf(a,":")}},O:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vL(a,":");case"OOOO":default:return"GMT"+Yf(a,":")}},z:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vL(a,":");case"zzzz":default:return"GMT"+Yf(a,":")}},t:function(e,t,r){const a=Math.trunc(e.getTime()/1e3);return Kr(a,t.length)},T:function(e,t,r){const a=e.getTime();return Kr(a,t.length)}};function vL(e,t=""){const r=e>0?"-":"+",a=Math.abs(e),s=Math.trunc(a/60),i=a%60;return i===0?r+String(s):r+String(s)+t+Kr(i,2)}function bL(e,t){return e%60===0?(e>0?"-":"+")+Kr(Math.abs(e)/60,2):Yf(e,t)}function Yf(e,t=""){const r=e>0?"-":"+",a=Math.abs(e),s=Kr(Math.trunc(a/60),2),i=Kr(a%60,2);return r+s+t+i}const wL=(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"})}},DH=(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"})}},Jpe=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],a=r[1],s=r[2];if(!s)return wL(e,t);let i;switch(a){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",wL(a,t)).replace("{{time}}",DH(s,t))},Zpe={p:DH,P:Jpe},ege=/^D+$/,tge=/^Y+$/,nge=["D","DD","YY","YYYY"];function rge(e){return ege.test(e)}function age(e){return tge.test(e)}function sge(e,t,r){const a=ige(e,t,r);if(console.warn(a),nge.includes(e))throw new RangeError(a)}function ige(e,t,r){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const oge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cge=/^'([^]*?)'?$/,dge=/''/g,uge=/[a-zA-Z]/;function yt(e,t,r){var h,u,f,m;const a=uv(),s=a.locale??Kpe,i=a.firstWeekContainsDate??((u=(h=a.locale)==null?void 0:h.options)==null?void 0:u.firstWeekContainsDate)??1,o=a.weekStartsOn??((m=(f=a.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,l=_r(e);if(!upe(l))throw new RangeError("Invalid time value");let c=t.match(lge).map(b=>{const g=b[0];if(g==="p"||g==="P"){const y=Zpe[g];return y(b,s.formatLong)}return b}).join("").match(oge).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const g=b[0];if(g==="'")return{isToken:!1,value:hge(b)};if(yL[g])return{isToken:!0,value:b};
722if(g.match(uge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:b}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(b=>{if(!b.isToken)return b.value;const g=b.value;(age(g)||rge(g))&&sge(g,t,String(e));const y=yL[g[0]];return y(l,g,s.localize,d)}).join("")}function hge(e){const t=e.match(cge);return t?t[1].replace(dge,"'"):e}function gc(e,t){const r=_r(e),a=_r(t);return+r<+a}function fge(e){return+_r(e)<Date.now()}function mge(e,t){const r=_r(e),a=_r(t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function G6(e){return kj(e,cpe(e))}function SA(e,t){const r=+_r(e),[a,s]=[+_r(t.start),+_r(t.end)].sort((i,o)=>i-o);return r>=a&&r<=s}function _y(e,t){return Lg(e,-t)}function Sy(){return o0(Date.now())}function pge(e,t){return ape(e,-3)}function gge(e,t){return V6(e,-1)}function xge({show:e,onComplete:t}){L.useEffect(()=>{if(e){r();const s=setTimeout(()=>{t()},2500);return()=>clearTimeout(s)}},[e,t]);const r=()=>{const s=new(window.AudioContext||window.webkitAudioContext),i=s.createOscillator(),o=s.createGain();i.connect(o),o.connect(s.destination),i.type="sine",i.frequency.setValueAtTime(523.25,s.currentTime),i.frequency.setValueAtTime(659.25,s.currentTime+.1),i.frequency.setValueAtTime(783.99,s.currentTime+.2),o.gain.setValueAtTime(.3,s.currentTime),o.gain.exponentialRampToValueAtTime(.01,s.currentTime+.5),i.start(s.currentTime),i.stop(s.currentTime+.5)},a=Array.from({length:50},(s,i)=>({id:i,left:Math.random()*100,delay:Math.random()*.3,duration:2+Math.random()*1,rotation:Math.random()*360,color:["#dec069","#06053e","#4ade80","#f59e0b","#ec4899","#8b5cf6"][Math.floor(Math.random()*6)]}));return n.jsx(Gm,{children:e&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 pointer-events-none z-50 overflow-hidden",children:a.map(s=>n.jsx(lt.div,{className:"absolute top-0 w-3 h-3 rounded-full",style:{left:`${s.left}%`,backgroundColor:s.color},initial:{y:-20,opacity:1,rotate:0,scale:1},animate:{y:window.innerHeight+20,opacity:0,rotate:s.rotation*4,scale:.5},transition:{duration:s.duration,delay:s.delay,ease:"easeIn"}},s.id))}),n.jsx("div",{className:"fixed inset-0 pointer-events-none z-50 flex items-center justify-center",children:n.jsx(lt.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},exit:{scale:0,opacity:0},transition:{type:"spring",duration:.6},className:"bg-white rounded-full p-6 shadow-2xl border-4 border-green-500",children:n.jsx(lt.div,{animate:{rotate:[0,10,-10,10,0],scale:[1,1.1,1,1.1,1]},transition:{duration:.5,delay:.3,repeat:1},children:n.jsx(Cn,{className:"w-16 h-16 text-green-500"})})})}),n.jsx("div",{className:"fixed inset-0 pointer-events-none z-50 flex items-center justify-center",children:[...Array(8)].map((s,i)=>n.jsx(lt.div,{className:"absolute",initial:{scale:0,x:0,y:0,opacity:1},animate:{scale:[0,1,0],x:Math.cos(i*Math.PI*2/8)*150,y:Math.sin(i*Math.PI*2/8)*150,opacity:[0,1,0]},transition:{duration:1,delay:.2+i*.05,ease:"easeOut"},children:n.jsx(ki,{className:"w-6 h-6 text-accent-gold fill-accent-gold"})},`sparkle-${i}`))}),n.jsx("div",{className:"fixed top-24 left-0 right-0 pointer-events-none z-50 flex justify-center",children:n.jsxs(lt.div,{initial:{y:-100,opacity:0},animate:{y:0,opacity:1},exit:{y:-100,opacity:0},transition:{type:"spring",duration:.6},className:"bg-gradient-to-r from-green-500 to-emerald-500 text-white px-8 py-4 rounded-full shadow-2xl flex items-center gap-3",children:[n.jsx(Ia,{className:"w-5 h-5"}),n.jsx("span",{className:"font-bold text-lg",children:"Task Completed! 🎉"}),n.jsx(Ia,{className:"w-5 h-5"})]})})]})})}function Ct(e){return"/"+e.toLowerCase().replace(/ /g,"-")}var Pj="Switch",[yge]=ou(Pj),[vge,bge]=yge(Pj),FH=L.forwardRef((e,t)=>{const{__scopeSwitch:r,name:a,checked:s,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:d,form:h,...u}=e,[f,m]=L.useState(null),b=ea(t,j=>m(j)),g=L.useRef(!1),y=f?h||!!f.closest("form"):!0,[x,w]=ru({prop:s,defaultProp:i??!1,onChange:d,caller:Pj});return n.jsxs(vge,{scope:r,checked:x,disabled:l,children:[n.jsx(Fn.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":UH(x),"data-disabled":l?"":void 0,disabled:l,value:c,...u,ref:b,onClick:nr(e.onClick,j=>{w(N=>!N),y&&(g.current=j.isPropagationStopped(),g.current||j.stopPropagation())})}),y&&n.jsx($H,{control:f,bubbles:!g.current,name:a,value:c,checked:x,required:o,disabled:l,form:h,style:{transform:"translateX(-100%)"}})]})});FH.displayName=Pj;var qH="SwitchThumb",BH=L.forwardRef((e,t)=>
722{const{__scopeSwitch:r,...a}=e,s=bge(qH,r);return n.jsx(Fn.span,{"data-state":UH(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t})});BH.displayName=qH;var wge="SwitchBubbleInput",$H=L.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:a=!0,...s},i)=>{const o=L.useRef(null),l=ea(o,i),c=G3(r),d=V3(t);return L.useEffect(()=>{const h=o.current;if(!h)return;const u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==r&&m){const b=new Event("click",{bubbles:a});m.call(h,r),h.dispatchEvent(b)}},[c,r,a]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});$H.displayName=wge;function UH(e){return e?"checked":"unchecked"}var zH=FH,jge=BH;const Cs=L.forwardRef(({className:e,...t},r)=>n.jsx(zH,{className:Ln("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:r,children:n.jsx(jge,{className:Ln("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")})}));Cs.displayName=zH.displayName;function Nge(){const e=Sr(),[t,r]=L.useState(!1),[a,s]=L.useState(!1),[i,o]=L.useState(null),[l,c]=L.useState({name:"",description:"",image_url:"",is_active:!0,display_order:1}),[d,h]=L.useState({voting_start:"",voting_end:"",winner_announcement_date:"",intro_text:"",is_active:!0,is_public:!1}),{data:u=[]}=xt({queryKey:["adminPeoplesChoiceFinalists"],queryFn:()=>pe.entities.PeoplesChoiceFinalist.list("display_order",10)}),{data:f=[]}=xt({queryKey:["adminPeoplesChoiceVotes"],queryFn:()=>pe.entities.PeoplesChoiceVote.list("-vote_timestamp",1e3)}),{data:m=[]}=xt({queryKey:["adminPeoplesChoiceConfig"],queryFn:()=>pe.entities.PeoplesChoiceConfig.list("-created_date",1)}),b=m[0],g=f.filter($=>$.is_valid),y=g.length,x=g.reduce(($,G)=>($[G.finalist_name]=($[G.finalist_name]||0)+1,$),{}),w=g.reduce(($,G)=>{const B=yt(new Date(G.vote_timestamp),"yyyy-MM-dd");return $[B]=($[B]||0)+1,$},{}),j=f.reduce(($,G)=>($[G.ip_address]=($[G.ip_address]||0)+1,$),{}),N=Object.entries(j).filter(([$,G])=>G>1),_=Tt({mutationFn:$=>pe.entities.PeoplesChoiceFinalist.create($),onSuccess:()=>{e.invalidateQueries({queryKey:["adminPeoplesChoiceFinalists"]}),r(!1),R()}}),S=Tt({mutationFn:({id:$,data:G})=>pe.entities.PeoplesChoiceFinalist.update($,G),onSuccess:()=>{e.invalidateQueries({queryKey:["adminPeoplesChoiceFinalists"]}),r(!1),R()}}),A=Tt({mutationFn:$=>pe.entities.PeoplesChoiceFinalist.delete($),onSuccess:()=>{e.invalidateQueries({queryKey:["adminPeoplesChoiceFinalists"]})}}),T=Tt({mutationFn:$=>b!=null&&b.id?pe.entities.PeoplesChoiceConfig.update(b.id,$):pe.entities.PeoplesChoiceConfig.create($),onSuccess:()=>{e.invalidateQueries({queryKey:["adminPeoplesChoiceConfig"]}),s(!1)}}),R=()=>{c({name:"",description:"",image_url:"",is_active:!0,display_order:u.length+1}),o(null)},M=$=>{o($),c({name:$.name,description:$.description,image_url:$.image_url||"",is_active:$.is_active,display_order:$.display_order||1}),r(!0)},k=()=>{i?S.mutate({id:i.id,data:l}):_.mutate(l)},P=()=>{b&&h({voting_start:b.voting_start?b.voting_start.slice(0,16):"",voting_end:b.voting_end?b.voting_end.slice(0,16):"",winner_announcement_date:b.winner_announcement_date||"",intro_text:b.intro_text||"",is_active:b.is_active??!0,is_public:b.is_public??!1}),s(!0)},O=async()=>{const $=!(b!=null&&b.is_public);b!=null&&b.id?await pe.entities.PeoplesChoiceConfig.update(b.id,{is_public:$}):await pe.entities.PeoplesChoiceConfig.create({is_public:$,is_active:!1}),e.invalidateQueries({queryKey:["adminPeoplesChoiceConfig"]})},F=()=>{const $=["Timestamp","Finalist","Email","IP Address","User Agent","Valid"],G=f.map(H=>[H.vote_timestamp,H.finalist_name,H.voter_email,H.ip_address,`"${(H.user_agent||"").replace(/"/g,'""')}"`,H.is_valid?"Yes":"No"]),B=[$.join(","),...G.map(H=>H.join(","))].join(`
723`),Y=new Blob([B],{type:"text/csv"}),ee=window.URL.createObjectURL(Y),J=document.createElement("a");J.href=ee,J.download=`peoples-choice-votes-${yt(new Date,"yyyy-MM-dd")}.csv`,J.click()};return n.jsxs("div",{className:"space-y-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(Oy,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"People's Choice Award"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage finalists, view votes, and configure voting settings"})]})]}),n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(me,{variant:"outline",onClick:F,children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),n.jsx(me,{onClick:P,children:"Settings"})]})}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[n.jsx(_e,{children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 bg-blue-100 rounded-xl flex items-center justify-center",children:n.jsx(Oy,{className:"w-6 h-6 text-blue-600"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Total Votes"}),n.jsx("p",{className:"text-2xl font-bold text-gray-900",children:y})]})]})})}),n.jsx(_e,{children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 bg-purple-100 rounded-xl flex items-center justify-center",children:n.jsx(Jr,{className:"w-6 h-6 text-purple-600"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Finalists"}),n.jsx("p",{className:"text-2xl font-bold text-gray-900",children:u.filter($=>$.is_active).length})]})]})})}),n.jsx(_e,{children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 bg-green-100 rounded-xl flex items-center justify-center",children:n.jsx(ka,{className:"w-6 h-6 text-green-600"})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Today's Votes"}),n.jsx("p",{className:"text-2xl font-bold text-gray-900",children:w[yt(new Date,"yyyy-MM-dd")]||0})]})]})})}),n.jsx(_e,{children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center ${N.length>0?"bg-amber-100":"bg-gray-100"}`,children:n.jsx(eo,{className:`w-6 h-6 ${N.length>0?"text-amber-600":"text-gray-400"}`})}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Duplicate Attempts"}),n.jsx("p",{className:"text-2xl font-bold text-gray-900",children:N.length})]})]})})})]}),n.jsx(_e,{className:b!=null&&b.is_public?"border-green-200 bg-green-50":"border-amber-200 bg-amber-50",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Page Visibility"}),n.jsx("p",{className:"text-sm text-gray-600",children:b!=null&&b.is_public?"The People's Choice page is publicly accessible":'The page shows a "Coming Soon" message to public visitors'})]}),n.jsx(me,{onClick:O,className:b!=null&&b.is_public?"bg-amber-500 hover:bg-amber-600 text-white":"bg-green-600 hover:bg-green-700 text-white",children:b!=null&&b.is_public?"Lock Page":"Make Public"})]})})}),n.jsx(_e,{className:b!=null&&b.is_active?"border-green-200 bg-green-50":"border-gray-200",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Voting Status"}),n.jsx("p",{className:"text-sm text-gray-600",children:b!=null&&b.voting_start&&(b!=null&&b.voting_end)?n.jsxs(n.Fragment,{children:[yt(new Date(b.voting_start),"dd MMM yyyy HH:mm")," — ",yt(new Date(b.voting_end),"dd MMM yyyy HH:mm")]}):"Not configured"})]}),n.jsx("div",{className:`px-4 py-2 rounded-full font-semibold ${b!=null&&b.is_active?"bg-green-200 text-green-800":"bg-gray-200 text-gray-800"}`,children:b!=null&&b.is_active?"Active":"Inactive"})]})})}),n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(km,{className:"w-5 h-5 text-accent-gold"}),"Votes by Finalist"]})}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-4",children:u.filter($=>$.is_active).map($=>{const G=x[$.name]||0,B=y>0?(G/y*100).toFixed(1):0;return n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"font-medium text-gray-900",children:$.name}),n.jsxs("span",{className:"text-sm text-gray-600",children:[G," votes (",B,"%)"]})]}),n.jsx("div",{className:"h-3 bg-gray-200 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-gradient-to-r from-primary-navy to-accent-gold transition-all duration-500",style:{width:`${B}%`}})})]},$.id)})})})]}),n.jsxs(_e,{children:[n.jsxs(Nt,{className:"flex flex-row items-center justify-between",children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-accent-gold"}),"Manage Finalists"]}),n.jsxs(me,{onClick:()=>{R(),r(!0)},children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Finalist"]})]}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-4",children:u.map($=>n.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[$.image_url&&n.jsx("img",{src:$.image_url,alt:$.name,className:"w-16 h-16 object-contain bg-white rounded-lg"}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-gray-900",children:$.name}),n.jsx("p",{className:"text-sm text-gray-600 line-clamp-1",children:$.description})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${$.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:$.is_active?"Active":"Inactive"}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>M($),children:n.jsx(Gw,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>A.mutate($.id),children:n.jsx(tr,{className:"w-4 h-4 text-red-500"})})]})]},$.id))})})]}),n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Recent Votes"})}),n.jsx(Ce,{children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b",children:[n.jsx("th",{className:"text-left py-3 px-4",children:"Time"}),n.jsx("th",{className:"text-left py-3 px-4",children:"Finalist"}),n.jsx("th",{className:"text-left py-3 px-4",children:"Email"}),n.jsx("th",{className:"text-left py-3 px-4",children:"IP"}),n.jsx("th",{className:"text-left py-3 px-4",children:"Status"})]})}),n.jsx("tbody",{children:f.slice(0,20).map($=>n.jsxs("tr",{className:"border-b hover:bg-gray-50",children:[n.jsx("td",{className:"py-3 px-4 text-gray-600",children:yt(new Date($.vote_timestamp),"dd/MM/yy HH:mm")}
723),n.jsx("td",{className:"py-3 px-4 font-medium",children:$.finalist_name}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:$.voter_email}),n.jsx("td",{className:"py-3 px-4 text-gray-600 font-mono text-xs",children:$.ip_address}),n.jsx("td",{className:"py-3 px-4",children:n.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${$.is_valid?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:$.is_valid?"Valid":"Rejected"})})]},$.id))})]})})})]}),n.jsx(Nn,{open:t,onOpenChange:r,children:n.jsxs(vn,{children:[n.jsx(_n,{children:n.jsx(Sn,{children:i?"Edit Finalist":"Add Finalist"})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Name *"}),n.jsx(Me,{value:l.name,onChange:$=>c({...l,name:$.target.value}),placeholder:"Finalist name"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Description *"}),n.jsx(en,{value:l.description,onChange:$=>c({...l,description:$.target.value}),placeholder:"Short description"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Image URL"}),n.jsx(Me,{value:l.image_url,onChange:$=>c({...l,image_url:$.target.value}),placeholder:"https://..."})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Display Order"}),n.jsx(Me,{type:"number",value:l.display_order,onChange:$=>c({...l,display_order:parseInt($.target.value)})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ye,{children:"Active"}),n.jsx(Cs,{checked:l.is_active,onCheckedChange:$=>c({...l,is_active:$})})]})]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx(me,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),n.jsx(me,{onClick:k,children:"Save"})]})]})}),n.jsx(Nn,{open:a,onOpenChange:s,children:n.jsxs(vn,{children:[n.jsx(_n,{children:n.jsx(Sn,{children:"Voting Settings"})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Voting Start *"}),n.jsx(Me,{type:"datetime-local",value:d.voting_start,onChange:$=>h({...d,voting_start:$.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Voting End *"}),n.jsx(Me,{type:"datetime-local",value:d.voting_end,onChange:$=>h({...d,voting_end:$.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Winner Announcement Date"}),n.jsx(Me,{type:"date",value:d.winner_announcement_date,onChange:$=>h({...d,winner_announcement_date:$.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Custom Intro Text"}),n.jsx(en,{value:d.intro_text,onChange:$=>h({...d,intro_text:$.target.value}),placeholder:"Custom message for voting page"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ye,{children:"Voting Active"}),n.jsx(Cs,{checked:d.is_active,onCheckedChange:$=>h({...d,is_active:$})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(ye,{children:"Page Public"}),n.jsx(Cs,{checked:d.is_public,onCheckedChange:$=>h({...d,is_public:$})})]})]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx(me,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),n.jsx(me,{onClick:()=>T.mutate(d),children:"Save Settings"})]})]})})]})}function _ge({companyNames:e=[]}){const[t,r]=L.useState(!1),[a,s]=L.useState(!1),[i,o]=L.useState(""),[l,c]=L.useState([]),[d,h]=L.useState("all"),[u,f]=L.useState("all"),m=Sr(),{data:b=[],isLoading:g}=xt({queryKey:["sponsorProspects"],queryFn:()=>pe.entities.SponsorProspect.list("-updated_date",100),staleTime:3e4}),y=async()=>{if(!i){alert("Please select a company");return}r(!0),c([]);const _=`You are a LinkedIn profile research expert. For the company "${i}", identify 5-7 key decision-makers and influencers who would be responsible for or involved in sponsorship decisions.
724
725For each person, provide:
726- Full name
727- Job title
728- Department (marketing, corporate_social_responsibility, executive, business_development, or other)
729- LinkedIn URL (realistic URL format)
730- Brief summary of their professional background and why they'd be relevant
731- Decision maker score (0-100, where 100 is definitely a decision maker)
732- Priority level (high, medium, or low)
733
734Consider the charity sector and what these individuals' backgrounds suggest about their influence. Return as a JSON array of prospect objects.`;
734try{const S=await pe.integrations.Core.InvokeLLM({prompt:_,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{prospects:{type:"array",items:{type:"object",properties:{contact_name:{type:"string"},job_title:{type:"string"},department:{type:"string"},linkedin_url:{type:"string"},linkedin_profile_summary:{type:"string"},decision_maker_score:{type:"number"},priority:{type:"string"}}}}}}}),A=((S==null?void 0:S.prospects)||[]).map(T=>({...T,company_name:i,status:"new"}));c(A)}catch(S){console.error("Prospect discovery error:",S),alert("Failed to discover prospects. Please try again.")}r(!1)},x=Tt({mutationFn:async _=>{const S={company_name:_.company_name,contact_name:_.contact_name,job_title:_.job_title,department:_.department,linkedin_url:_.linkedin_url,linkedin_profile_summary:_.linkedin_profile_summary,decision_maker_score:_.decision_maker_score,priority:_.priority,status:"new"};return await pe.entities.SponsorProspect.create(S)},onSuccess:(_,S)=>{m.invalidateQueries({queryKey:["sponsorProspects"]}),c(A=>A.filter(T=>T.contact_name!==S.contact_name))}}),w=Tt({mutationFn:_=>pe.entities.SponsorProspect.delete(_),onSuccess:()=>{m.invalidateQueries({queryKey:["sponsorProspects"]})}}),j=Tt({mutationFn:({prospectId:_,status:S})=>pe.entities.SponsorProspect.update(_,{status:S}),onSuccess:()=>{m.invalidateQueries({queryKey:["sponsorProspects"]})}}),N=b.filter(_=>{const S=d==="all"||_.status===d,A=u==="all"||_.priority===u;return S&&A});return n.jsxs("div",{className:"space-y-6",children:[n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Yu,{className:"w-5 h-5 text-blue-600"}),"LinkedIn Prospect Discovery"]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Company to Research"}),n.jsx(Me,{placeholder:"Enter company name (e.g., Microsoft, KPMG)",value:i,onChange:_=>o(_.target.value),onKeyPress:_=>{_.key==="Enter"&&y()}})]}),n.jsx(me,{onClick:y,disabled:t||!i,className:"w-full bg-blue-600 hover:bg-blue-700",children:t?n.jsxs(n.Fragment,{children:[n.jsx(Ky,{className:"w-4 h-4 mr-2 animate-spin"}),"Discovering Prospects..."]}):n.jsxs(n.Fragment,{children:[n.jsx(ka,{className:"w-4 h-4 mr-2"}),"Discover Prospects on LinkedIn"]})}),l.length>0&&n.jsxs("div",{className:"mt-6 space-y-4",children:[n.jsxs("h3",{className:"font-semibold text-lg",children:["Discovered Prospects (",l.length,")"]}),n.jsx("div",{className:"space-y-3 max-h-96 overflow-y-auto",children:l.map((_,S)=>{var A;return n.jsx("div",{className:"border rounded-lg p-4 bg-gray-50 hover:bg-gray-100 transition",children:n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"font-semibold text-sm",children:_.contact_name}),n.jsx("p",{className:"text-xs text-gray-600",children:_.job_title}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:_.company_name}),n.jsx("p",{className:"text-xs text-gray-700 mt-2 line-clamp-2",children:_.linkedin_profile_summary})]}),n.jsxs("div",{className:"ml-4 text-right space-y-2",children:[n.jsxs("div",{className:"flex gap-1 justify-end",children:[n.jsx(dt,{variant:"outline",className:`text-xs ${_.priority==="high"?"border-red-300 bg-red-50":_.priority==="medium"?"border-yellow-300 bg-yellow-50":"border-gray-300 bg-gray-50"}`,children:_.priority}),n.jsxs(dt,{variant:"outline",className:"text-xs",children:["Score: ",_.decision_maker_score]})]}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("a",{href:(A=_.linkedin_url)!=null&&A.startsWith("http")?_.linkedin_url:`https://linkedin.com${_.linkedin_url}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline",children:"View Profile →"}),n.jsx(me,{onClick:()=>x.mutate(_),disabled:x.isPending,size:"sm",className:"w-full bg-green-600 hover:bg-green-700 h-7 text-xs",children:x.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ky,{className:"w-3 h-3 mr-1 animate-spin"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Vy,{className:"w-3 h-3 mr-1"}),"Save to Database"]})})]})]})]})},S)})})]})]})]}),n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{children:"Sponsorship Prospects Database"}),n.jsx("div",{className:"text-2xl font-bold text-blue-600",children:N.length})]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Status"}),n.jsxs(Qt,{value:d,onValueChange:h,children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Status"}),n.jsx(Ae,{value:"new",children:"New"}),n.jsx(Ae,{value:"researched",children:"Researched"}),n.jsx(Ae,{value:"contacted",children:"Contacted"}),n.jsx(Ae,{value:"interested",children:"Interested"}),n.jsx(Ae,{value:"negotiating",children:"Negotiating"}),n.jsx(Ae,{value:"closed",children:"Closed"}),n.jsx(Ae,{value:"declined",children:"Declined"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Priority"}),n.jsxs(Qt,{value:u,onValueChange:f,children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Priority"}),n.jsx(Ae,{value:"high",children:"High"}),n.jsx(Ae,{value:"medium",children:"Medium"}),n.jsx(Ae,{value:"low",children:"Low"})]})]})]})]}),n.jsxs("div",{className:"overflow-x-auto",children:[n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{className:"bg-gray-100 border-b",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-2 font-semibold",children:"Contact"}),n.jsx("th",{className:"text-left px-4 py-2 font-semibold",children:"Company"}),n.jsx("th",{className:"text-left px-4 py-2 font-semibold",children:"Status"}),n.jsx("th",{className:"text-center px-4 py-2 font-semibold",children:"Score"}),n.jsx("th",{className:"text-center px-4 py-2 font-semibold",children:"Priority"}),n.jsx("th",{className:"text-center px-4 py-2 font-semibold",children:"Actions"})]})}),n.jsx("tbody",{children:N.map(_=>{var S;return n.jsxs("tr",{className:"border-b hover:bg-gray-50",children:[n.jsxs("td",{className:"px-4 py-3",children:[n.jsx("div",{className:"font-medium",children:_.contact_name}),n.jsx("div",{className:"text-xs text-gray-500",children:_.job_title})]}),n.jsx("td",{className:"px-4 py-3",children:_.company_name}),n.jsx("td",{className:"px-4 py-3",children:n.jsxs(Qt,{value:_.status,onValueChange:A=>j.mutate({prospectId:_.id,status:A}),children:[n.jsx(Kt,{className:"w-32 h-8 text-xs",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"new",children:"New"}),n.jsx(Ae,{value:"researched",children:"Researched"}),n.jsx(Ae,{value:"contacted",children:"Contacted"}),n.jsx(Ae,{value:"interested",children:"Interested"}),n.jsx(Ae,{value:"negotiating",children:"Negotiating"}),n.jsx(Ae,{value:"closed",children:"Closed"}),n.jsx(Ae,{value:"declined",children:"Declined"})]})]})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx(dt,{variant:"outline",children:_.decision_maker_score})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx(dt,{className:_.priority==="high"?"bg-red-100 text-red-800":_.priority==="medium"?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800",children:_.priority})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsxs("div",{className:"flex justify-center gap-2",children:[n.jsx("a",{href:(S=_.linkedin_url)!=null&&S.startsWith("http")?_.linkedin_url:`https://linkedin.com${_.linkedin_url}`,target:"_blank",rel:"noopener noreferrer",className:"p-1 hover:bg-blue-100 rounded transition",title:"View LinkedIn",children:n.jsx(Yu,{className:"w-4 h-4 text-blue-600"})}),n.jsx("button",{onClick:()=>w.mutate(_.id),className:"p-1 hover:bg-red-100 rounded transition",title:"Delete prospect",children:n.jsx(tr,{className:"w-4 h-4 text-red-600"})})]})})]},_.id)})})]}),N.length===0&&n.jsx("div",{className:"text-center py-8 text-gray-500",children:"No prospects match your filters"})]})]})]})]})}function Sge({categories:e=[]}){var G;const[t,r]=L.useState(!1),[a,s]=L.useState(""),[i,o]=L.useState("United Kingdom"),[l,c]=L.useState("gold"),[d,h]=L.useState(""),[u,f]=L.useState(!0),[m,b]=L.useState(null),[g,y]=L.useState(null),[x,w]=L.useState(null),[j,N]=L.useState(!1),[_,S]=L.useState({sponsors:!1,outreach:!1,roi:!1}),[A,T]=L.useState(null),[R,M]=L.useState({sponsorName:"",sponsorIndustry:"",keyBenefits:""}),k=async()=>
734{if(!a){alert('Please enter a target industry or sector (e.g., "Financial Services", "Technology", "Healthcare")');return}r(!0),S(B=>({...B,sponsors:!1}));try{const B=e.map(ee=>ee.title).join(", "),Y=await pe.integrations.Core.InvokeLLM({prompt:`You are an expert in corporate sponsorship and partnership development for UK charity awards programmes.
735
736TASK: Identify 8-10 high-potential sponsors for the National Charity Today Awards™ based on the criteria below.
737
738TARGET CRITERIA:
739- Industry/Sector: ${a}
740- Location: ${i}
741- Preferred Tier: ${l.toUpperCase()}
742- Category Focus: ${d||"General sponsorship across all categories"}
743
744AVAILABLE AWARD CATEGORIES:
745${B}
746
747ABOUT THE AWARDS:
748The National Charity Today Awards™ is the UK's premier awards programme celebrating excellence, innovation, and impact in the charity sector. We recognize outstanding charities, individuals, and initiatives making a genuine difference across the nation.
749
750SPONSORSHIP BENEFITS:
751- Brand visibility to UK charity sector leaders
752- Association with social impact and excellence
753- Premium positioning at prestigious gala ceremony
754- PR and marketing opportunities
755- Networking with 250+ charity executives
756- Content rights and media coverage
757- LinkedIn and social media exposure
758
759Use current internet research (LinkedIn, company websites, news) to find:
7601. Companies actively involved in CSR/ESR initiatives
7612. Organizations with strong charity sector connections
7623. Brands seeking positive social impact positioning
7634. Companies with appropriate sponsorship budgets:
764   - Headline: £50k+ budget
765   - Gold: £25k-£40k budget
766   - Silver: £10k-£20k budget
767   - Bronze: £5k-£8k budget
768   - Category Sponsor: £2k-£5k budget (ideal for SMEs and local businesses wanting focused category support)
769
770For each suggestion, provide:
771- Company name
772- Why they're a perfect fit (specific CSR activities, charity partnerships, values alignment)
773- Estimated sponsorship capacity (budget tier they could afford)
774- Decision maker role (who to contact: CSR Director, Marketing Director, CEO)
775- Key selling points specific to them
776- Recommended award categories to pitch`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{suggestions:{type:"array",items:{type:"object",properties:{company_name:{type:"string"},industry:{type:"string"},why_perfect_fit:{type:"string"},estimated_budget_capacity:{type:"string"},decision_maker_role:{type:"string"},key_selling_points:{type:"array",items:{type:"string"}},recommended_categories:{type:"array",items:{type:"string"}},priority_score:{type:"string",enum:["high","medium","low"]}}}},market_insights:{type:"string"},outreach_strategy:{type:"string"}}}});b(Y),S(ee=>({...ee,sponsors:!0}))}catch{alert("Failed to generate sponsor suggestions. Please try again.")}r(!1)},P=async()=>{if(!R.sponsorName){alert("Please enter the sponsor company name");return}r(!0),S(B=>({...B,outreach:!1}));try{const B=await pe.integrations.Core.InvokeLLM({prompt:`You are an expert copywriter specializing in high-value corporate sponsorship proposals.
777
778CREATE a compelling, personalized sponsorship outreach email for:
779
780PROSPECT DETAILS:
781- Company: ${R.sponsorName}
782- Industry: ${R.sponsorIndustry||"Not specified"}
783- Key Benefits to Emphasize: ${R.keyBenefits||"General sponsorship benefits"}
784- Tier: ${l.toUpperCase()} Sponsorship
785- Category Focus: ${d||"General"}
786
787ABOUT THE AWARDS:
788The National Charity Today Awards™ is the UK's premier awards programme celebrating excellence in the charity sector. We're seeking prestigious partners to sponsor our 2026 gala ceremony.
789
790THE EMAIL SHOULD:
7911. Open with a compelling, personalized hook (research their recent CSR initiatives using internet context)
7922. Clearly articulate why THEY specifically are the ideal partner (not generic)
7933. Highlight exclusive benefits aligned with their brand values
7944. Include specific ROI metrics (media reach, audience demographics, LinkedIn impressions)
7955. Present a clear value proposition
7966. End with a strong, specific call to action
7977. Be professional yet warm in tone
7988. Be concise (300-400 words maximum)
799
800INVESTMENT LEVELS TO REFERENCE:
801- Headline Sponsor: £50,000+ (exclusive top-tier positioning)
802- Gold Sponsor: £25,000-£40,000 (premium category sponsorship)
803- Silver Sponsor: £10,000-£20,000 (category sponsorship)
804- Bronze Sponsor: £5,000-£8,000 (supporting partnership)
805- Category Sponsor: £2,000-£5,000 (focused single category sponsorship, ideal for SMEs)
806
807Use current internet research about their company to make this hyper-personalized.`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{subject_line:{type:"string"},email_body:{type:"string"},follow_up_suggestions:{type:"array",items:{type:"string"}},personalization_notes:{type:"string"}}}});y(B),S(Y=>({...Y,outreach:!0}))}catch{alert("Failed to generate outreach message. Please try again.")}r(!1)},O=async()=>{r(!0),S(B=>({...B,roi:!1}));try{const B=await pe.integrations.Core.InvokeLLM({prompt:`You are a sponsorship ROI analyst for premium charity awards programmes.
808
809ANALYZE the potential ROI and value proposition for sponsors of the National Charity Today Awards™.
810
811EVENT DETAILS:
812- Event: National Charity Today Awards™ Gala Lunch
813- Date: October 14, 2026
814- Venue: Holiday Inn Peterborough West
815- Expected Attendance: 250+ charity sector leaders, executives, and influencers
816- Categories: ${e.map(Y=>Y.title).join(", ")}
817- Media Coverage: Trade press, social media, photography, video highlights
818- Digital Presence: Website, email marketing, social media campaigns
819
820SPONSORSHIP TIERS & PRICING:
821- Headline: £50,000+ (1 exclusive position)
822- Gold: £25,000-£40,000 (3-4 positions)
823- Silver: £10,000-£20,000 (6-8 positions)
824- Bronze: £5,000-£8,000 (unlimited)
825
826Provide a comprehensive ROI analysis including:
827
8281. Quantifiable Benefits Analysis:
829   - Estimated brand impressions (digital + physical)
830   - Media value equivalency
831   - Networking value (access to decision makers)
832   - Content creation opportunities
833   - Social proof and credibility boost
834
8352. Tier-by-Tier Value Breakdown:
836   - What each tier receives
837   - ROI multiplier for each investment level
838   - Best fit company profiles for each tier
839
8403. Revenue Maximization Strategy:
841   - Optimal pricing strategy
842   - Upsell opportunities
843   - Package bundling suggestions
844   - Early bird incentives
845
8464. Competitive Positioning:
847   - How this compares to other UK charity awards
848   - Unique selling propositions
849   - Market gaps we can exploit
850
8515. Revenue Projections:
852   - Conservative estimate (if 50% packages sold)
853   - Moderate estimate (if 75% packages sold)
854   - Optimistic estimate (if 100% packages sold)
855
856Be specific, use real numbers, and focus on generating maximum revenue while delivering genuine value.`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{executive_summary:{type:"string"},quantifiable_benefits:{type:"object",properties:{estimated_impressions:{type:"string"},media_value_equivalency:{type:"string"},networking_value:{type:"string"},content_opportunities:{type:"string"}}},tier_analysis:{type:"array",items:{type:"object",properties:{tier_name:{type:"string"},investment:{type:"string"},key_benefits:{type:"array",items:{type:"string"}},roi_multiplier:{type:"string"},ideal_sponsor_profile:{type:"string"}}}},revenue_projections:{type:"object",properties:{conservative:{type:"string"},moderate:{type:"string"},optimistic:{type:"string"}}},maximization_strategies:{type:"array",items:{type:"string"}},competitive_advantages:{type:"array",items:{type:"string"}}}}});w(B),S(Y=>({...Y,roi:!0}))}catch{alert("Failed to generate ROI analysis. Please try again.")}r(!1)},F=B=>{navigator.clipboard.writeText(B),N(!0),setTimeout(()=>N(!1),3e3)},$={high:"bg-green-100 text-green-800 border-green-300",medium:"bg-blue-100 text-blue-800 border-blue-300",low:"bg-gray-100 text-gray-800 border-gray-300"};return n.jsxs(_e,{className:"border-2 border-purple-200 bg-gradient-to-br from-purple-50 via-blue-50 to-purple-50",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs(Pt,{className:"text-2xl flex items-center gap-3",children:[n.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-600 to-blue-600 rounded-full flex items-center justify-center",children:n.jsx(Ia,{className:"w-6 h-6 text-white"})}),"AI Sponsorship Intelligence"]}),n.jsx(wr,{className:"text-base mt-2",children:"Leverage AI to i
856dentify prospects, craft personalized outreach, and maximize sponsorship revenue"})]}),n.jsx("button",{onClick:()=>f(!u),className:"p-2 hover:bg-purple-100 rounded-lg transition-colors","aria-label":u?"Expand section":"Collapse section",children:u?n.jsx(Wm,{className:"w-5 h-5 text-purple-600"}):n.jsx(Y0,{className:"w-5 h-5 text-purple-600"})})]})}),!u&&n.jsx(Ce,{children:n.jsxs(nl,{defaultValue:"prospects",className:"w-full",children:[n.jsxs(wo,{className:"grid w-full grid-cols-4 mb-6",children:[n.jsxs(ln,{value:"prospects",className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-4 h-4"}),"Prospect Discovery"]}),n.jsxs(ln,{value:"suggestions",className:"flex items-center gap-2",children:[n.jsx(ms,{className:"w-4 h-4"}),"Find Sponsors"]}),n.jsxs(ln,{value:"outreach",className:"flex items-center gap-2",children:[n.jsx(Xr,{className:"w-4 h-4"}),"Outreach Builder"]}),n.jsxs(ln,{value:"roi",className:"flex items-center gap-2",children:[n.jsx(km,{className:"w-4 h-4"}),"ROI Analysis"]})]}),n.jsx(cn,{value:"prospects",className:"space-y-6",children:n.jsx(_ge,{companyNames:((G=m==null?void 0:m.suggestions)==null?void 0:G.map(B=>B.company_name))||[]})}),n.jsxs(cn,{value:"suggestions",className:"space-y-6",children:[n.jsx(_e,{className:"bg-white border-2 border-blue-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4 flex items-center gap-2",children:[n.jsx(Yu,{className:"w-5 h-5 text-blue-600"}),"AI-Powered Prospect Discovery"]}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Our AI scans LinkedIn, company websites, and news sources to identify high-value sponsorship prospects based on their CSR activities, charity partnerships, and budget capacity."}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"target-industry",children:"Target Industry/Sector *"}),n.jsx(Me,{id:"target-industry",value:a,onChange:B=>s(B.target.value),placeholder:"e.g., Financial Services, Technology, Retail, Healthcare",className:"h-12"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:'Be specific for better results (e.g., "Wealth Management" rather than just "Finance")'})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"target-location",children:"Location Focus"}),n.jsx(Me,{id:"target-location",value:i,onChange:B=>o(B.target.value),placeholder:"e.g., London, Manchester, United Kingdom",className:"h-12"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"tier-target",children:"Target Sponsorship Tier"}),n.jsxs("select",{id:"tier-target",value:l,onChange:B=>c(B.target.value),className:"w-full h-12 border border-gray-300 rounded-md px-3",children:[n.jsx("option",{value:"headline",children:"Headline (£50k+)"}),n.jsx("option",{value:"gold",children:"Gold (£25k-£40k)"}),n.jsx("option",{value:"silver",children:"Silver (£10k-£20k)"}),n.jsx("option",{value:"bronze",children:"Bronze (£5k-£8k)"}),n.jsx("option",{value:"category",children:"Category Sponsor (£2k-£5k)"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"category-focus",children:"Award Category Focus (Optional)"}),n.jsxs("select",{id:"category-focus",value:d,onChange:B=>h(B.target.value),className:"w-full h-12 border border-gray-300 rounded-md px-3",children:[n.jsx("option",{value:"",children:"General Sponsorship"}),e.map(B=>n.jsx("option",{value:B.title,children:B.title},B.id))]})]}),n.jsx(me,{onClick:k,disabled:t,className:"w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white h-14 text-lg font-bold",children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent mr-2"}),"AI Searching LinkedIn & Web..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ia,{className:"w-5 h-5 mr-2"}),"Find Perfect Sponsors with AI"]})})]})]})}),m&&_.sponsors&&!t&&n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[n.jsx(_e,{className:"bg-gradient-to-br from-indigo-50 to-blue-50 border-2 border-indigo-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h4",{className:"font-bold text-indigo-900 mb-3 flex items-center gap-2",children:[n.jsx(ka,{className:"w-5 h-5"}),"Market Insights"]}),n.jsx("p",{className:"text-gray-700 leading-relaxed",children:m.market_insights})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-purple-50 to-pink-50 border-2 border-purple-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h4",{className:"font-bold text-purple-900 mb-3 flex items-center gap-2",children:[n.jsx(ki,{className:"w-5 h-5"}),"Recommended Outreach Strategy"]}
856),n.jsx("p",{className:"text-gray-700 leading-relaxed",children:m.outreach_strategy})]})}),n.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:m.suggestions.filter((B,Y,ee)=>Y===ee.findIndex(J=>J.company_name===B.company_name)).map((B,Y)=>n.jsx(_e,{className:`border-2 hover:shadow-xl transition-all duration-300 ${B.priority_score==="high"?"border-green-300 bg-gradient-to-br from-green-50 to-white":B.priority_score==="medium"?"border-blue-300 bg-gradient-to-br from-blue-50 to-white":"border-gray-300 bg-white"}`,children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-1",children:B.company_name}),n.jsx("p",{className:"text-sm text-gray-600",children:B.industry})]}),n.jsxs(dt,{className:$[B.priority_score],children:[B.priority_score," priority"]})]}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-1",children:"Why Perfect Fit"}),n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:B.why_perfect_fit})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-1",children:"Budget Capacity"}),n.jsxs(dt,{className:"bg-green-100 text-green-800 text-sm px-3 py-1",children:[n.jsx(wT,{className:"w-3 h-3 mr-1"}),B.estimated_budget_capacity]})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-1",children:"Decision Maker"}),n.jsx("p",{className:"text-sm text-gray-700 font-medium",children:B.decision_maker_role})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-2",children:"Key Selling Points"}),n.jsx("ul",{className:"space-y-1",children:B.key_selling_points.map((ee,J)=>n.jsxs("li",{className:"text-sm text-gray-700 flex items-start gap-2",children:[n.jsx(Cn,{className:"w-4 h-4 text-green-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:ee})]},J))})]}),B.recommended_categories.length>0&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-2",children:"Recommended Categories"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:B.recommended_categories.map((ee,J)=>n.jsx(dt,{variant:"outline",className:"text-xs",children:ee},J))})]})]}),n.jsxs(me,{onClick:()=>{var ee;M({sponsorName:B.company_name,sponsorIndustry:B.industry,keyBenefits:B.key_selling_points.join(", ")}),(ee=document.querySelector('button[value="outreach"]'))==null||ee.click()},className:"w-full bg-primary-navy hover:opacity-90 text-white",children:[n.jsx(Xr,{className:"w-4 h-4 mr-2"}),"Generate Outreach Email"]})]})},Y))})]})]}),n.jsxs(cn,{value:"outreach",className:"space-y-6",children:[n.jsx(_e,{className:"bg-white border-2 border-green-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4 flex items-center gap-2",children:[n.jsx(Xr,{className:"w-5 h-5 text-green-600"}),"Personalized Outreach Email Generator"]}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Generate hyper-personalized, high-converting sponsorship proposals using AI-powered research and copywriting."}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-name",children:"Prospect Company Name *"}),n.jsx(Me,{id:"sponsor-name",value:R.sponsorName,onChange:B=>M({...R,sponsorName:B.target.value}),placeholder:"e.g., HSBC, Lloyds Banking Group, Microsoft",className:"h-12"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-industry",children:"Industry/Sector"}),n.jsx(Me,{id:"sponsor-industry",value:R.sponsorIndustry,onChange:B=>M({...R,sponsorIndustry:B.target.value}),placeholder:"e.g., Banking, Technology, Retail",className:"h-12"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"key-benefits",children:"Key Benefits to Emphasize"}),n.jsx(en,{id:"key-benefits",value:R.keyBenefits,onChange:B=>M({...R,keyBenefits:B.target.value}),placeholder:"e.g., Brand exposure to charity sector, CSR alignment, networking with CEOs",rows:3})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Sponsorship Tier"}
856),n.jsxs("select",{value:l,onChange:B=>c(B.target.value),className:"w-full h-12 border border-gray-300 rounded-md px-3",children:[n.jsx("option",{value:"headline",children:"Headline (£50k+)"}),n.jsx("option",{value:"gold",children:"Gold (£25k-£40k)"}),n.jsx("option",{value:"silver",children:"Silver (£10k-£20k)"}),n.jsx("option",{value:"bronze",children:"Bronze (£5k-£8k)"}),n.jsx("option",{value:"category",children:"Category Sponsor (£2k-£5k)"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Category Focus"}),n.jsxs("select",{value:d,onChange:B=>h(B.target.value),className:"w-full h-12 border border-gray-300 rounded-md px-3",children:[n.jsx("option",{value:"",children:"General"}),e.map(B=>n.jsx("option",{value:B.title,children:B.title},B.id))]})]})]}),n.jsx(me,{onClick:P,disabled:t||!R.sponsorName,className:"w-full bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white h-14 text-lg font-bold",children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent mr-2"}),"AI Crafting Personalized Email..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ia,{className:"w-5 h-5 mr-2"}),"Generate Personalized Email"]})})]})]})}),g&&_.outreach&&!t&&n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[n.jsx(_e,{className:"bg-gradient-to-br from-amber-50 to-yellow-50 border-2 border-amber-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h4",{className:"font-bold text-amber-900 mb-3 flex items-center gap-2",children:[n.jsx(ki,{className:"w-5 h-5"}),"AI Personalization Intelligence"]}),n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:g.personalization_notes})]})}),n.jsx(_e,{className:"bg-white border-2 border-purple-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h4",{className:"font-bold text-purple-900",children:"Email Subject Line"}),n.jsx(me,{variant:"outline",size:"sm",onClick:()=>F(g.subject_line),children:j?n.jsxs(n.Fragment,{children:[n.jsx(Cn,{className:"w-4 h-4 mr-2 text-green-600"}),"Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsx(Hy,{className:"w-4 h-4 mr-2"}),"Copy"]})})]}),n.jsx("p",{className:"text-lg font-semibold text-gray-800 bg-gray-50 p-4 rounded-lg",children:g.subject_line})]})}),n.jsx(_e,{className:"bg-white border-2 border-green-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h4",{className:"font-bold text-green-900",children:"Email Body"}),n.jsx(me,{variant:"outline",onClick:()=>F(g.email_body),children:j?n.jsxs(n.Fragment,{children:[n.jsx(Cn,{className:"w-4 h-4 mr-2 text-green-600"}),"Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsx(Hy,{className:"w-4 h-4 mr-2"}),"Copy Email"]})})]}),n.jsx("div",{className:"bg-gray-50 p-6 rounded-lg border border-gray-200",children:n.jsx("div",{className:"prose prose-sm max-w-none",children:n.jsx("pre",{className:"whitespace-pre-wrap font-sans text-gray-800 leading-relaxed",children:g.email_body})})})]})}),g.follow_up_suggestions&&g.follow_up_suggestions.length>0&&n.jsx(_e,{className:"bg-white border-2 border-blue-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("h4",{className:"font-bold text-blue-900 mb-4",children:"Follow-Up Strategy"}),n.jsx("ul",{className:"space-y-2",children:g.follow_up_suggestions.map((B,Y)=>n.jsxs("li",{className:"flex items-start gap-2 text-gray-700",children:[n.jsx("span",{className:"text-blue-600 font-bold mt-1",children:"→"}),n.jsx("span",{children:B})]},Y))})]})}),n.jsxs(me,{variant:"outline",onClick:()=>{y(null),M({sponsorName:"",sponsorIndustry:"",keyBenefits:""})},className:"w-full",children:[n.jsx(Gy,{className:"w-4 h-4 mr-2"}),"Generate Another Email"]})]})]}),n.jsxs(cn,{value:"roi",className:"space-y-6",children:[n.jsx(_e,{className:"bg-white border-2 border-orange-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4 flex items-center gap-2",children:[n.jsx(km,{className:"w-5 h-5 text-orange-600"}),"AI-Powered ROI & Revenue Analysis"]}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Get comprehensive sponsorship ROI insights, competitive analysis, and revenue projections to maximize your sponsorship sales."}),n.jsx(me,{onClick:O,disabled:t,className:"w-full bg-gradient-to-r from-orange-600 to-red-600 hover:from-orange-700 hover:to-red-700 text-white h-14 text-lg font-bold",children:t?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent mr-2"}),"AI Analyzing Market Data..."]}):n.jsxs(n.Fragment,{children:[n.jsx(ka,{className:"w-5 h-5 mr-2"}),"Generate Comprehensive ROI Analysis"]})})]})}),x&&_.roi&&!t&&n.jsxs(lt.div,{initial:{opacity:0,y:20}
856,animate:{opacity:1,y:0},className:"space-y-6",children:[n.jsx(_e,{className:"bg-gradient-to-br from-blue-50 to-indigo-50 border-2 border-blue-300",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("h3",{className:"text-2xl font-bold text-primary-navy mb-4 flex items-center gap-3",children:[n.jsx(wT,{className:"w-8 h-8 text-green-600"}),"Executive Summary"]}),n.jsx("p",{className:"text-gray-800 leading-relaxed text-lg",children:x.executive_summary})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-green-50 to-emerald-50 border-4 border-green-400 shadow-2xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("h3",{className:"text-2xl font-bold text-green-900 mb-6 text-center",children:"💰 Revenue Projections 2026"}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"bg-white rounded-xl p-6 border-2 border-green-200 text-center",children:[n.jsx("p",{className:"text-sm font-semibold text-gray-600 uppercase mb-2",children:"Conservative"}),n.jsx("p",{className:"text-4xl font-bold text-green-700 mb-1",children:x.revenue_projections.conservative}),n.jsx("p",{className:"text-xs text-gray-500",children:"50% capacity sold"})]}),n.jsxs("div",{className:"bg-white rounded-xl p-6 border-2 border-green-300 text-center shadow-lg",children:[n.jsx("p",{className:"text-sm font-semibold text-gray-600 uppercase mb-2",children:"Moderate"}),n.jsx("p",{className:"text-4xl font-bold text-green-800 mb-1",children:x.revenue_projections.moderate}),n.jsx("p",{className:"text-xs text-gray-500",children:"75% capacity sold"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-green-100 to-emerald-100 rounded-xl p-6 border-2 border-green-400 text-center shadow-xl",children:[n.jsx("p",{className:"text-sm font-semibold text-green-900 uppercase mb-2",children:"Optimistic"}),n.jsx("p",{className:"text-5xl font-bold text-green-900 mb-1",children:x.revenue_projections.optimistic}),n.jsx("p",{className:"text-xs text-green-700 font-semibold",children:"100% capacity sold 🎯"})]})]})]})}),n.jsx(_e,{className:"bg-white border-2 border-purple-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("h4",{className:"text-xl font-bold text-purple-900 mb-6",children:"Quantifiable Sponsor Benefits"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"bg-purple-50 rounded-lg p-4 border border-purple-200",children:[n.jsx("p",{className:"text-xs font-semibold text-purple-600 uppercase mb-2",children:"Brand Impressions"}),n.jsx("p",{className:"text-2xl font-bold text-primary-navy",children:x.quantifiable_benefits.estimated_impressions})]}),n.jsxs("div",{className:"bg-purple-50 rounded-lg p-4 border border-purple-200",children:[n.jsx("p",{className:"text-xs font-semibold text-purple-600 uppercase mb-2",children:"Media Value"}),n.jsx("p",{className:"text-2xl font-bold text-primary-navy",children:x.quantifiable_benefits.media_value_equivalency})]}),n.jsxs("div",{className:"bg-purple-50 rounded-lg p-4 border border-purple-200",children:[n.jsx("p",{className:"text-xs font-semibold text-purple-600 uppercase mb-2",children:"Networking Value"}),n.jsx("p",{className:"text-2xl font-bold text-primary-navy",children:x.quantifiable_benefits.networking_value})]}),n.jsxs("div",{className:"bg-purple-50 rounded-lg p-4 border border-purple-200",children:[n.jsx("p",{className:"text-xs font-semibold text-purple-600 uppercase mb-2",children:"Content Opportunities"}),n.jsx("p",{className:"text-2xl font-bold text-primary-navy",children:x.quantifiable_benefits.content_opportunities})]})]})]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h4",{className:"text-xl font-bold text-primary-navy",children:"Tier-by-Tier Value Analysis"}),x.tier_analysis.map((B,Y)=>n.jsx(_e,{className:"border-2 border-gray-200 hover:shadow-lg transition-shadow",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h5",{className:"text-lg font-bold text-primary-navy",children:B.tier_name}),n.jsx("p",{className:"text-2xl font-bold text-green-600",children:B.investment})]}),n.jsxs(dt,{className:"bg-blue-100 text-blue-800 text-sm px-3 py-2",children:["ROI: ",B.roi_multiplier]})]}),n.jsxs("div",{className:"mb-4",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase mb-2",children:"Key Benefits"}),n.jsx("ul",{className:"space-y-1",children:B.key_benefits.map((ee,J)=>n.jsxs("li",{className:"text-sm text-gray-700 flex items-start gap-2",children:[n.jsx(Cn,{className:"w-4 h-4 text-green-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:ee})]},J))})]}),n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 border border-gray-200",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 uppercase mb-2",children:"Ideal Sponsor Profile"}),n.jsx("p",{className:"text-sm text-gray-700",children:B.ideal_sponsor_profile})]})]})},Y))]}),n.jsx(_e,{className:"bg-gradient-to-br from-yellow-50 to-orange-50 border-2 border-yellow-300",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h4",{className:"text-xl font-bold text-orange-900 mb-4 flex items-center gap-2",children:[n.jsx(ka,{className:"w-6 h-6"}),"Revenue Maximization Strategies"]}),n.jsx("ul",{className:"space-y-3",children:x.maximization_strategies.map((B,Y)=>n.jsxs("li",{className:"flex items-start gap-3 bg-white rounded-lg p-4 border border-orange-200",children:[n.jsx("span",{className:"text-2xl font-bold text-orange-600",children:Y+1}),n.jsx("p",{className:"text-gray-700 leading-relaxed flex-1",children:B})]},Y))})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-blue-50 to-cyan-50 border-2 border-blue-300",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("h4",{className:"text-xl font-bold text-blue-900 mb-4 flex items-center gap-2",children:[n.jsx(ki,{className:"w-6 h-6"}),"Competitive Advantages"]}),n.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:x.competitive_advantages.map((B,Y)=>n.jsxs("div",{className:"bg-white rounded-lg p-4 border border-blue-200 flex items-start gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-blue-600 mt-0.5 flex-shrink-0"}),n.jsx("p",{className:"text-sm text-gray-700",children:B})]},Y))})]})})]})]})]})})]})}var VN,jL;function sl(){if(jL)return VN;jL=1;var e=Array.isArray;return VN=e,VN}var HN,NL;function VH(){if(NL)return HN;NL=1;var e=typeof ab=="object"&&ab&&ab.Object===Object&&ab;return HN=e,HN}var WN,_L;function cu(){if(_L)return WN;_L=1;var e=VH(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return WN=r,WN}var KN,SL;function hv(){if(SL)return KN;SL=1;var e=cu(),t=e.Symbol;return KN=t,KN}var GN,CL;function Cge(){if(CL)return GN;CL=1;var e=hv(),t=Object.prototype,r=t.hasOwnProperty,a=t.toString,s=e?e.toStringTag:void 0;function i(o){var l=r.call(o,s),c=o[s];try{o[s]=void 0;var d=!0}catch{}var h=a.call(o);return d&&(l?o[s]=c:delete o[s]),h}return GN=i,GN}var YN,AL;function Age(){if(AL)return YN;AL=1;var e=Object.prototype,t=e.toString;function r(a){return t.call(a)}return YN=r,YN}var QN,kL;
vendor: 4,988 bytes, line 856
856function oh(){if(kL)return QN;kL=1;var e=hv(),t=Cge(),r=Age(),a="[object Null]",s="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?s:a:i&&i in Object(l)?t(l):r(l)}return QN=o,QN}var XN,PL;function lh(){if(PL)return XN;PL=1;function e(t){return t!=null&&typeof t=="object"}return XN=e,XN}var JN,EL;function wx(){if(EL)return JN;EL=1;var e=oh(),t=lh(),r="[object Symbol]";function a(s){return typeof s=="symbol"||t(s)&&e(s)==r}return JN=a,JN}var ZN,TL;function Y6(){if(TL)return ZN;TL=1;var e=sl(),t=wx(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function s(i,o){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:a.test(i)||!r.test(i)||o!=null&&i in Object(o)}return ZN=s,ZN}var e_,OL;function yf(){if(OL)return e_;OL=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return e_=e,e_}var t_,ML;function Q6(){if(ML)return t_;ML=1;var e=oh(),t=yf(),r="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==a||c==s||c==r||c==i}return t_=o,t_}var n_,LL;function kge(){if(LL)return n_;LL=1;var e=cu(),t=e["__core-js_shared__"];return n_=t,n_}var r_,RL;function Pge(){if(RL)return r_;RL=1;var e=kge(),t=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function r(a){return!!t&&t in a}return r_=r,r_}var a_,IL;function HH(){if(IL)return a_;IL=1;var e=Function.prototype,t=e.toString;function r(a){if(a!=null){try{return t.call(a)}catch{}try{return a+""}catch{}}return""}return a_=r,a_}var s_,DL;function Ege(){if(DL)return s_;DL=1;var e=Q6(),t=Pge(),r=yf(),a=HH(),s=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,d=l.hasOwnProperty,h=RegExp("^"+c.call(d).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u(f){if(!r(f)||t(f))return!1;var m=e(f)?h:i;return m.test(a(f))}return s_=u,s_}var i_,FL;function Tge(){if(FL)return i_;FL=1;function e(t,r){return t==null?void 0:t[r]}return i_=e,i_}var o_,qL;function Qm(){if(qL)return o_;qL=1;var e=Ege(),t=Tge();function r(a,s){var i=t(a,s);return e(i)?i:void 0}return o_=r,o_}var l_,BL;function Ej(){if(BL)return l_;BL=1;var e=Qm(),t=e(Object,"create");return l_=t,l_}var c_,$L;function Oge(){if($L)return c_;$L=1;var e=Ej();function t(){this.__data__=e?e(null):{},this.size=0}return c_=t,c_}var d_,UL;function Mge(){if(UL)return d_;UL=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return d_=e,d_}var u_,zL;function Lge(){if(zL)return u_;zL=1;var e=Ej(),t="__lodash_hash_undefined__",r=Object.prototype,a=r.hasOwnProperty;function s(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return a.call(o,i)?o[i]:void 0}return u_=s,u_}var h_,VL;function Rge(){if(VL)return h_;VL=1;var e=Ej(),t=Object.prototype,r=t.hasOwnProperty;function a(s){var i=this.__data__;return e?i[s]!==void 0:r.call(i,s)}return h_=a,h_}var f_,HL;function Ige(){if(HL)return f_;HL=1;var e=Ej(),t="__lodash_hash_undefined__";function r(a,s){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=e&&s===void 0?t:s,this}return f_=r,f_}var m_,WL;function Dge(){if(WL)return m_;WL=1;var e=Oge(),t=Mge(),r=Lge(),a=Rge(),s=Ige();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=a,i.prototype.set=s,m_=i,m_}var p_,KL;function Fge(){if(KL)return p_;KL=1;function e(){this.__data__=[],this.size=0}return p_=e,p_}var g_,GL;function X6(){if(GL)return g_;GL=1;function e(t,r){return t===r||t!==t&&r!==r}return g_=e,g_}var x_,YL;function Tj(){if(YL)return x_;YL=1;var e=X6();function t(r,a){for(var s=r.length;s--;)if(e(r[s][0],a))return s;return-1}return x_=t,x_}var y_,QL;function qge(){if(QL)return y_;QL=1;var e=Tj(),t=Array.prototype,r=t.splice;function a(s){var i=this.__data__,o=e(i,s);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():r.call(i,o,1),--this.size,!0}return y_=a,y_}var v_,XL;function Bge(){if(XL)return v_;XL=1;var e=Tj();function t(r){var a=this.__data__,s=e(a,r);return s<0?void 0:a[s][1]}return v_=t,v_}var b_,JL;function $ge(){if(JL)return b_;JL=1;var e=Tj();function t(r){return e(this.__data__,r)>-1}return b_=t,b_}var w_,ZL;function Uge(){if(ZL)return w_;ZL=1;var e=Tj();function t(r,a){var s=this.__data__,i=e(s,r);return i<0?(++this.size,s.push([r,a])):s[i][1]=a,this}return w_=t,w_}var j_,eR;function Oj(){if(eR)return j_;eR=1;var e=Fge(),t=qge(),r=Bge(),a=$ge(),s=Uge();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=a,i.prototype.set=s,j_=i,j_}var N_,tR;function J6(){if(tR)return N_;tR=1;var e=Qm(),t=cu(),r=e(t,"Map");return N_=r,N_}var __,nR;
vendor: 9,245 bytes, lines 856-864
856function zge(){if(nR)return __;nR=1;var e=Dge(),t=Oj(),r=J6();function a(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return __=a,__}var S_,rR;function Vge(){if(rR)return S_;rR=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return S_=e,S_}var C_,aR;function Mj(){if(aR)return C_;aR=1;var e=Vge();function t(r,a){var s=r.__data__;return e(a)?s[typeof a=="string"?"string":"hash"]:s.map}return C_=t,C_}var A_,sR;function Hge(){if(sR)return A_;sR=1;var e=Mj();function t(r){var a=e(this,r).delete(r);return this.size-=a?1:0,a}return A_=t,A_}var k_,iR;function Wge(){if(iR)return k_;iR=1;var e=Mj();function t(r){return e(this,r).get(r)}return k_=t,k_}var P_,oR;function Kge(){if(oR)return P_;oR=1;var e=Mj();function t(r){return e(this,r).has(r)}return P_=t,P_}var E_,lR;function Gge(){if(lR)return E_;lR=1;var e=Mj();function t(r,a){var s=e(this,r),i=s.size;return s.set(r,a),this.size+=s.size==i?0:1,this}return E_=t,E_}var T_,cR;function Z6(){if(cR)return T_;cR=1;var e=zge(),t=Hge(),r=Wge(),a=Kge(),s=Gge();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var d=o[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=a,i.prototype.set=s,T_=i,T_}var O_,dR;function WH(){if(dR)return O_;dR=1;var e=Z6(),t="Expected a function";function r(a,s){if(typeof a!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var i=function(){var o=arguments,l=s?s.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var d=a.apply(this,o);return i.cache=c.set(l,d)||c,d};return i.cache=new(r.Cache||e),i}return r.Cache=e,O_=r,O_}var M_,uR;function Yge(){if(uR)return M_;uR=1;var e=WH(),t=500;function r(a){var s=e(a,function(o){return i.size===t&&i.clear(),o}),i=s.cache;return s}return M_=r,M_}var L_,hR;function Qge(){if(hR)return L_;hR=1;var e=Yge(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,a=e(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(t,function(o,l,c,d){i.push(c?d.replace(r,"$1"):l||o)}),i});return L_=a,L_}var R_,fR;function eP(){if(fR)return R_;fR=1;function e(t,r){for(var a=-1,s=t==null?0:t.length,i=Array(s);++a<s;)i[a]=r(t[a],a,t);return i}return R_=e,R_}var I_,mR;function Xge(){if(mR)return I_;mR=1;var e=hv(),t=eP(),r=sl(),a=wx(),s=e?e.prototype:void 0,i=s?s.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return t(l,o)+"";if(a(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return I_=o,I_}var D_,pR;function KH(){if(pR)return D_;pR=1;var e=Xge();function t(r){return r==null?"":e(r)}return D_=t,D_}var F_,gR;function GH(){if(gR)return F_;gR=1;var e=sl(),t=Y6(),r=Qge(),a=KH();function s(i,o){return e(i)?i:t(i,o)?[i]:r(a(i))}return F_=s,F_}var q_,xR;function Lj(){if(xR)return q_;xR=1;var e=wx();function t(r){if(typeof r=="string"||e(r))return r;var a=r+"";return a=="0"&&1/r==-1/0?"-0":a}return q_=t,q_}var B_,yR;function tP(){if(yR)return B_;yR=1;var e=GH(),t=Lj();function r(a,s){s=e(s,a);for(var i=0,o=s.length;a!=null&&i<o;)a=a[t(s[i++])];return i&&i==o?a:void 0}return B_=r,B_}var $_,vR;function YH(){if(vR)return $_;vR=1;var e=tP();function t(r,a,s){var i=r==null?void 0:e(r,a);return i===void 0?s:i}return $_=t,$_}var Jge=YH();const yc=Lr(Jge);var U_,bR;function Zge(){if(bR)return U_;bR=1;function e(t){return t==null}return U_=e,U_}var exe=Zge();const rr=Lr(exe);var z_,wR;function txe(){if(wR)return z_;wR=1;var e=oh(),t=sl(),r=lh(),a="[object String]";function s(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==a}return z_=s,z_}var nxe=txe();const $m=Lr(nxe);var rxe=Q6();const qn=Lr(rxe);var axe=yf();const jx=Lr(axe);var V_={exports:{}},Br={};/**
857 * @license React
858 * react-is.production.min.js
859 *
860 * Copyright (c) Facebook, Inc. and its affiliates.
861 *
862 * This source code is licensed under the MIT license found in the
863 * LICENSE file in the root directory of this source tree.
864 */var jR;function sxe(){if(jR)return Br;jR=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function g(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case r:case s:case a:case d:case h:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case c:case f:case u:case i:return y;default:return x}}case t:return x}}}return Br.ContextConsumer=o,Br.ContextProvider=i,Br.Element=e,Br.ForwardRef=c,Br.Fragment=r,Br.Lazy=f,Br.Memo=u,Br.Portal=t,Br.Profiler=s,Br.StrictMode=a,Br.Suspense=d,Br.SuspenseList=h,Br.isAsyncMode=function(){return!1},Br.isConcurrentMode=function(){return!1},Br.isContextConsumer=function(y){return g(y)===o},Br.isContextProvider=function(y){return g(y)===i},Br.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Br.isForwardRef=function(y){return g(y)===c},Br.isFragment=function(y){return g(y)===r},Br.isLazy=function(y){return g(y)===f},Br.isMemo=function(y){return g(y)===u},Br.isPortal=function(y){return g(y)===t},Br.isProfiler=function(y){return g(y)===s},Br.isStrictMode=function(y){return g(y)===a},Br.isSuspense=function(y){return g(y)===d},Br.isSuspenseList=function(y){return g(y)===h},Br.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===s||y===a||y===d||y===h||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===f||y.$$typeof===u||y.$$typeof===i||y.$$typeof===o||y.$$typeof===c||y.$$typeof===b||y.getModuleId!==void 0)},Br.typeOf=g,Br}var NR;function ixe(){return NR||(NR=1,V_.exports=sxe()),V_.exports}var oxe=ixe(),H_,_R;function QH(){if(_R)return H_;_R=1;var e=oh(),t=lh(),r="[object Number]";function a(s){return typeof s=="number"||t(s)&&e(s)==r}return H_=a,H_}var W_,SR;function lxe(){if(SR)return W_;SR=1;var e=QH();function t(r){return e(r)&&r!=+r}return W_=t,W_}var cxe=lxe();const Nx=Lr(cxe);var dxe=QH();const uxe=Lr(dxe);var ad=function(t){return t===0?0:t>0?1:-1},sm=function(t){return $m(t)&&t.indexOf("%")===t.length-1},Ot=function(t){return uxe(t)&&!Nx(t)},hxe=function(t){return rr(t)},Hs=function(t){return Ot(t)||$m(t)},fxe=0,_x=function(t){var r=++fxe;return"".concat(t||"").concat(r)},Um=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ot(t)&&!$m(t))return a;var i;if(sm(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return Nx(i)&&(i=a),s&&i>r&&(i=r),i},Uh=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},mxe=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,a={},s=0;s<r;s++)if(!a[t[s]])a[t[s]]=!0;else return!0;return!1},Ai=function(t,r){return Ot(t)&&Ot(r)?function(a){return t+a*(r-t)}:function(){return r}};function V1(e,t,r){return!e||!e.length?null:e.find(function(a){return a&&(typeof t=="function"?t(a):yc(a,t))===r})}var pxe=function(t,r){return Ot(t)&&Ot(r)?t-r:$m(t)&&$m(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function sg(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var a in t)if({}.hasOwnProperty.call(t,a)&&!{}.hasOwnProperty.call(e,a))return!1;return!0}function CA(e){"@babel/helpers - typeof";return CA=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},CA(e)}var gxe=["viewBox","children"],xxe=["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","colorRen
864dering","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"],CR=["points","pathLength"],K_={svg:gxe,polygon:CR,polyline:CR},nP=["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","onDrag
864Capture","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"],H1=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(L.isValidElement(t)&&(a=t.props),!jx(a))return null;var s={};return Object.keys(a).forEach(function(i){nP.includes(i)&&(s[i]=r||function(o){return a[i](a,o)})}),s},yxe=function(t,r,a){return function(s){return t(r,a,s),null}},W1=function(t,r,a){if(!jx(t)||CA(t)!=="object")return null;var s=null;return Object.keys(t).forEach(function(i){var o=t[i];nP.includes(i)&&typeof o=="function"&&(s||(s={}),s[i]=yxe(o,r,a))}),s},vxe=["children"],bxe=["children"];function AR(e,t){if(e==null)return{};var r=wxe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function wxe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function AA(e){"@babel/helpers - typeof";return AA=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},AA(e)}var kR={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"},zu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},PR=null,G_=null,rP=function e(t){if(t===PR&&Array.isArray(G_))return G_;var r=[];return L.Children.forEach(t,function(a){rr(a)||(oxe.isFragment(a)?r=r.concat(e(a.props.children)):r.push(a))}),G_=r,PR=t,r};function vc(e,t){var r=[],a=[];return Array.isArray(t)?a=t.map(function(s){return zu(s)}):a=[zu(t)],rP(e).forEach(function(s){var i=yc(s,"type.displayName")||yc(s,"type.name");a.indexOf(i)!==-1&&r.push(s)}),r}function Sl(e,t){var r=vc(e,t);return r&&r[0]}var ER=function(t){if(!t||!t.props)return!1;var r=t.props,a=r.width,s=r.height;return!(!Ot(a)||a<=0||!Ot(s)||s<=0)},jxe=["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"],Nxe=function(t){return t&&t.type&&$m(t.type)&&jxe.indexOf(t.type)>=0},XH=function(t){return t&&AA(t)==="object"&&"clipDot"in t},_xe=function(t,r,a,s){var i,o=(i=K_==null?void 0:K_[s])!==null&&i!==void 0?i:[];
vendor: 4,489 bytes, line 864
864return r.startsWith("data-")||!qn(t)&&(s&&o.includes(r)||xxe.includes(r))||a&&nP.includes(r)},Bn=function(t,r,a){if(!t||typeof t=="function"||typeof t=="boolean")return null;var s=t;if(L.isValidElement(t)&&(s=t.props),!jx(s))return null;var i={};return Object.keys(s).forEach(function(o){var l;_xe((l=s)===null||l===void 0?void 0:l[o],o,r,a)&&(i[o]=s[o])}),i},kA=function e(t,r){if(t===r)return!0;var a=L.Children.count(t);if(a!==L.Children.count(r))return!1;if(a===0)return!0;if(a===1)return TR(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var s=0;s<a;s++){var i=t[s],o=r[s];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!TR(i,o))return!1}return!0},TR=function(t,r){if(rr(t)&&rr(r))return!0;if(!rr(t)&&!rr(r)){var a=t.props||{},s=a.children,i=AR(a,vxe),o=r.props||{},l=o.children,c=AR(o,bxe);return s&&l?sg(i,c)&&kA(s,l):!s&&!l?sg(i,c):!1}return!1},OR=function(t,r){var a=[],s={};return rP(t).forEach(function(i,o){if(Nxe(i))a.push(i);else if(i){var l=zu(i.type),c=r[l]||{},d=c.handler,h=c.once;if(d&&(!h||!s[l])){var u=d(i,l,o);a.push(u),s[l]=!0}}}),a},Sxe=function(t){var r=t&&t.type;return r&&kR[r]?kR[r]:null},Cxe=function(t,r){return rP(r).indexOf(t)},Axe=["children","width","height","viewBox","className","style","title","desc"];function PA(){return PA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},PA.apply(this,arguments)}function kxe(e,t){if(e==null)return{};var r=Pxe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Pxe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function EA(e){var t=e.children,r=e.width,a=e.height,s=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,d=kxe(e,Axe),h=s||{width:r,height:a,x:0,y:0},u=or("recharts-surface",i);return we.createElement("svg",PA({},Bn(d,!0,"svg"),{className:u,width:r,height:a,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),we.createElement("title",null,l),we.createElement("desc",null,c),t)}var Exe=["children","className"];function TA(){return TA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},TA.apply(this,arguments)}function Txe(e,t){if(e==null)return{};var r=Oxe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Oxe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}var ya=we.forwardRef(function(e,t){var r=e.children,a=e.className,s=Txe(e,Exe),i=or("recharts-layer",a);return we.createElement("g",TA({className:i},Bn(s,!0),{ref:t}),r)}),Vu=function(t,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),i=2;i<a;i++)s[i-2]=arguments[i]},Y_,MR;function Mxe(){if(MR)return Y_;MR=1;function e(t,r,a){var s=-1,i=t.length;r<0&&(r=-r>i?0:i+r),a=a>i?i:a,a<0&&(a+=i),i=r>a?0:a-r>>>0,r>>>=0;for(var o=Array(i);++s<i;)o[s]=t[s+r];return o}return Y_=e,Y_}var Q_,LR;function Lxe(){if(LR)return Q_;LR=1;var e=Mxe();function t(r,a,s){var i=r.length;return s=s===void 0?i:s,!a&&s>=i?r:e(r,a,s)}return Q_=t,Q_}var X_,RR;function JH(){if(RR)return X_;RR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",s=t+r+a,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+s+i+"]");function c(d){return l.test(d)}return X_=c,X_}var J_,IR;function Rxe(){if(IR)return J_;IR=1;function e(t){return t.split("")}return J_=e,J_}var Z_,DR;function Ixe(){if(DR)return Z_;DR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",s=t+r+a,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+s+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",h="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=d+"?",g="["+i+"]?",y="(?:"+m+"(?:"+[h,u,f].join("|")+")"+g+b+")*",x=g+b+y,w="(?:"+[h+l+"?",l,u,f,o].join("|")+")",j=RegExp(c+"(?="+c+")|"+w+x,"g");function N(_){return _.match(j)||[]}return Z_=N,Z_}var e5,FR;
vendor: 14,433 bytes, line 864
864function Dxe(){if(FR)return e5;FR=1;var e=Rxe(),t=JH(),r=Ixe();function a(s){return t(s)?r(s):e(s)}return e5=a,e5}var t5,qR;function Fxe(){if(qR)return t5;qR=1;var e=Lxe(),t=JH(),r=Dxe(),a=KH();function s(i){return function(o){o=a(o);var l=t(o)?r(o):void 0,c=l?l[0]:o.charAt(0),d=l?e(l,1).join(""):o.slice(1);return c[i]()+d}}return t5=s,t5}var n5,BR;function qxe(){if(BR)return n5;BR=1;var e=Fxe(),t=e("toUpperCase");return n5=t,n5}var Bxe=qxe();const Rj=Lr(Bxe);function ga(e){return function(){return e}}const ZH=Math.cos,K1=Math.sin,hd=Math.sqrt,G1=Math.PI,Ij=2*G1,OA=Math.PI,MA=2*OA,Qf=1e-6,$xe=MA-Qf;function eW(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Uxe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return eW;const r=10**t;return function(a){this._+=a[0];for(let s=1,i=a.length;s<i;++s)this._+=Math.round(arguments[s]*r)/r+a[s]}}class zxe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?eW:Uxe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,a,s){this._append`Q${+t},${+r},${this._x1=+a},${this._y1=+s}`}bezierCurveTo(t,r,a,s,i,o){this._append`C${+t},${+r},${+a},${+s},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,a,s,i){if(t=+t,r=+r,a=+a,s=+s,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=a-t,d=s-r,h=o-t,u=l-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Qf)if(!(Math.abs(u*c-d*h)>Qf)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let m=a-o,b=s-l,g=c*c+d*d,y=m*m+b*b,x=Math.sqrt(g),w=Math.sqrt(f),j=i*Math.tan((OA-Math.acos((g+f-y)/(2*x*w)))/2),N=j/w,_=j/x;Math.abs(N-1)>Qf&&this._append`L${t+N*h},${r+N*u}`,this._append`A${i},${i},0,0,${+(u*m>h*b)},${this._x1=t+_*c},${this._y1=r+_*d}`}}arc(t,r,a,s,i,o){if(t=+t,r=+r,a=+a,o=!!o,a<0)throw new Error(`negative radius: ${a}`);let l=a*Math.cos(s),c=a*Math.sin(s),d=t+l,h=r+c,u=1^o,f=o?s-i:i-s;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>Qf||Math.abs(this._y1-h)>Qf)&&this._append`L${d},${h}`,a&&(f<0&&(f=f%MA+MA),f>$xe?this._append`A${a},${a},0,1,${u},${t-l},${r-c}A${a},${a},0,1,${u},${this._x1=d},${this._y1=h}`:f>Qf&&this._append`A${a},${a},0,${+(f>=OA)},${u},${this._x1=t+a*Math.cos(i)},${this._y1=r+a*Math.sin(i)}`)}rect(t,r,a,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${a=+a}v${+s}h${-a}Z`}toString(){return this._}}function aP(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const a=Math.floor(r);if(!(a>=0))throw new RangeError(`invalid digits: ${r}`);t=a}return e},()=>new zxe(t)}function sP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tW(e){this._context=e}tW.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 Dj(e){return new tW(e)}function nW(e){return e[0]}function rW(e){return e[1]}function aW(e,t){var r=ga(!0),a=null,s=Dj,i=null,o=aP(l);e=typeof e=="function"?e:e===void 0?nW:ga(e),t=typeof t=="function"?t:t===void 0?rW:ga(t);function l(c){var d,h=(c=sP(c)).length,u,f=!1,m;for(a==null&&(i=s(m=o())),d=0;d<=h;++d)!(d<h&&r(u=c[d],d,c))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(u,d,c),+t(u,d,c));if(m)return i=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:ga(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:ga(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ga(!!c),l):r},l.curve=function(c){return arguments.length?(s=c,a!=null&&(i=s(a)),l):s},l.context=function(c){return arguments.length?(c==null?a=i=null:i=s(a=c),l):a},l}function Cb(e,t,r){var a=null,s=ga(!0),i=null,o=Dj,l=null,c=aP(d);e=typeof e=="function"?e:e===void 0?nW:ga(+e),t=typeof t=="function"?t:ga(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?rW:ga(+r);function d(u){var f,m,b,g=(u=sP(u)).length,y,x=!1,w,j=new Array(g),N=new Array(g);for(i==null&&(l=o(w=c())),f=0;f<=g;++f){if(!(f<g&&s(y=u[f],f,u))===x)if(x=!x)m=f,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=f-1;b>=m;--b)l.point(j[b],N[b]);l.lineEnd(),l.areaEnd()}x&&(j[f]=+e(y,f,u),N[f]=+t(y,f,u),l.point(a?+a(y,f,u):j[f],r?+r(y,f,u):N[f]))}if(w)return l=null,w+""||null}function h(){return aW().defined(s).curve(o).context(i)}return d.x=function(u){return arguments.length?(e=typeof u=="function"?u:ga(+u),a=null,d):e},d.x0=function(u){return arguments.length?(e=typeof u=="function"?u:ga(+u),d):e},d.x1=function(u){return arguments.length?(a=u==null?null:typeof u=="function"?u:ga(+u),d):a},d.y=function(u){return arguments.length?(t=typeof u=="function"?u:ga(+u),r=null,d):t},d.y0=function(u){return arguments.length?(t=typeof u=="function"?u:ga(+u),d):t},d.y1=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ga(+u),d):r},d.lineX0=d.lineY0=function(){return h().x(e).y(t)},d.lineY1=function(){return h().x(e).y(r)},d.lineX1=function(){return h().x(a).y(t)},d.defined=function(u){return arguments.length?(s=typeof u=="function"?u:ga(!!u),d):s},d.curve=function(u){return arguments.length?(o=u,i!=null&&(l=o(i)),d):o},d.context=function(u){return arguments.length?(u==null?i=l=null:l=o(i=u),d):i},d}class sW{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Vxe(e){return new sW(e,!0)}function Hxe(e){return new sW(e,!1)}const iP={draw(e,t){const r=hd(t/G1);e.moveTo(r,0),e.arc(0,0,r,0,Ij)}},Wxe={draw(e,t){const r=hd(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},iW=hd(1/3),Kxe=iW*2,Gxe={draw(e,t){const r=hd(t/Kxe),a=r*iW;e.moveTo(0,-r),e.lineTo(a,0),e.lineTo(0,r),e.lineTo(-a,0),e.closePath()}},Yxe={draw(e,t){const r=hd(t),a=-r/2;e.rect(a,a,r,r)}},Qxe=.8908130915292852,oW=K1(G1/10)/K1(7*G1/10),Xxe=K1(Ij/10)*oW,Jxe=-ZH(Ij/10)*oW,Zxe={draw(e,t){const r=hd(t*Qxe),a=Xxe*r,s=Jxe*r;e.moveTo(0,-r),e.lineTo(a,s);for(let i=1;i<5;++i){const o=Ij*i/5,l=ZH(o),c=K1(o);e.lineTo(c*r,-l*r),e.lineTo(l*a-c*s,c*a+l*s)}e.closePath()}},r5=hd(3),eye={draw(e,t){const r=-hd(t/(r5*3));e.moveTo(0,r*2),e.lineTo(-r5*r,-r),e.lineTo(r5*r,-r),e.closePath()}},oc=-.5,lc=hd(3)/2,LA=1/hd(12),tye=(LA/2+1)*3,nye={draw(e,t){const r=hd(t/tye),a=r/2,s=r*LA,i=a,o=r*LA+r,l=-i,c=o;e.moveTo(a,s),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(oc*a-lc*s,lc*a+oc*s),e.lineTo(oc*i-lc*o,lc*i+oc*o),e.lineTo(oc*l-lc*c,lc*l+oc*c),e.lineTo(oc*a+lc*s,oc*s-lc*a),e.lineTo(oc*i+lc*o,oc*o-lc*i),e.lineTo(oc*l+lc*c,oc*c-lc*l),e.closePath()}};function rye(e,t){let r=null,a=aP(s);e=typeof e=="function"?e:ga(e||iP),t=typeof t=="function"?t:ga(t===void 0?64:+t);function s(){let i;if(r||(r=i=a()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return s.type=function(i){return arguments.length?(e=typeof i=="function"?i:ga(i),s):e},s.size=function(i){return arguments.length?(t=typeof i=="function"?i:ga(+i),s):t},s.context=function(i){return arguments.length?(r=i??null,s):r},s}function Y1(){}function Q1(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function lW(e){this._context=e}lW.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:Q1(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:Q1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aye(e){return new lW(e)}function cW(e){this._context=e}cW.prototype={areaStart:Y1,areaEnd:Y1,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:Q1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sye(e){return new cW(e)}function dW(e){this._context=e}dW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,a):this._context.moveTo(r,a);break;case 3:this._point=4;default:Q1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iye(e){return new dW(e)}function uW(e){this._context=e}uW.prototype={areaStart:Y1,areaEnd:Y1,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 oye(e){return new uW(e)}function $R(e){return e<0?-1:1}function UR(e,t,r){var a=e._x1-e._x0,s=t-e._x1,i=(e._y1-e._y0)/(a||s<0&&-0),o=(r-e._y1)/(s||a<0&&-0),l=(i*s+o*a)/(a+s);return($R(i)+$R(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function zR(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function a5(e,t,r){var a=e._x0,s=e._y0,i=e._x1,o=e._y1,l=(i-a)/3;e._context.bezierCurveTo(a+l,s+l*t,i-l,o-l*r,i,o)}function X1(e){this._context=e}X1.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:a5(this,this._t0,zR(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,a5(this,zR(this,r=UR(this,e,t)),r);break;default:a5(this,this._t0,r=UR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function hW(e){this._context=new fW(e)}(hW.prototype=Object.create(X1.prototype)).point=function(e,t){X1.prototype.point.call(this,t,e)};function fW(e){this._context=e}fW.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,a,s,i){this._context.bezierCurveTo(t,e,a,r,i,s)}};function lye(e){return new X1(e)}function cye(e){return new hW(e)}function mW(e){this._context=e}mW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var a=VR(e),s=VR(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(a[0][i],s[0][i],a[1][i],s[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function VR(e){var t,r=e.length-1,a,s=new Array(r),i=new Array(r),o=new Array(r);for(s[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)a=s[t]/i[t-1],i[t]-=a,o[t]-=a*o[t-1];for(s[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/i[t];for(i[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-s[t+1];return[s,i]}function dye(e){return new mW(e)}function Fj(e,t){this._context=e,this._t=t}Fj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 13,421 bytes, lines 864-867
864default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function uye(e){return new Fj(e,.5)}function hye(e){return new Fj(e,0)}function fye(e){return new Fj(e,1)}function Rg(e,t){if((o=e.length)>1)for(var r=1,a,s,i=e[t[0]],o,l=i.length;r<o;++r)for(s=i,i=e[t[r]],a=0;a<l;++a)i[a][1]+=i[a][0]=isNaN(s[a][1])?s[a][0]:s[a][1]}function RA(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function mye(e,t){return e[t]}function pye(e){const t=[];return t.key=e,t}function gye(){var e=ga([]),t=RA,r=Rg,a=mye;function s(i){var o=Array.from(e.apply(this,arguments),pye),l,c=o.length,d=-1,h;for(const u of i)for(l=0,++d;l<c;++l)(o[l][d]=[0,+a(u,o[l].key,d,i)]).data=u;for(l=0,h=sP(t(o));l<c;++l)o[h[l]].index=l;return r(o,h),o}return s.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ga(Array.from(i)),s):e},s.value=function(i){return arguments.length?(a=typeof i=="function"?i:ga(+i),s):a},s.order=function(i){return arguments.length?(t=i==null?RA:typeof i=="function"?i:ga(Array.from(i)),s):t},s.offset=function(i){return arguments.length?(r=i??Rg,s):r},s}function xye(e,t){if((a=e.length)>0){for(var r,a,s=0,i=e[0].length,o;s<i;++s){for(o=r=0;r<a;++r)o+=e[r][s][1]||0;if(o)for(r=0;r<a;++r)e[r][s][1]/=o}Rg(e,t)}}function yye(e,t){if((s=e.length)>0){for(var r=0,a=e[t[0]],s,i=a.length;r<i;++r){for(var o=0,l=0;o<s;++o)l+=e[o][r][1]||0;a[r][1]+=a[r][0]=-l/2}Rg(e,t)}}function vye(e,t){if(!(!((o=e.length)>0)||!((i=(s=e[t[0]]).length)>0))){for(var r=0,a=1,s,i,o;a<i;++a){for(var l=0,c=0,d=0;l<o;++l){for(var h=e[t[l]],u=h[a][1]||0,f=h[a-1][1]||0,m=(u-f)/2,b=0;b<l;++b){var g=e[t[b]],y=g[a][1]||0,x=g[a-1][1]||0;m+=y-x}c+=u,d+=m*u}s[a-1][1]+=s[a-1][0]=r,c&&(r-=d/c)}s[a-1][1]+=s[a-1][0]=r,Rg(e,t)}}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)}var bye=["type","size","sizeType"];function IA(){return IA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},IA.apply(this,arguments)}function HR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function WR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HR(Object(r),!0).forEach(function(a){wye(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HR(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function wye(e,t,r){return t=jye(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jye(e){var t=Nye(e,"string");return l0(t)=="symbol"?t:t+""}function Nye(e,t){if(l0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(l0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _ye(e,t){if(e==null)return{};var r=Sye(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Sye(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}var pW={symbolCircle:iP,symbolCross:Wxe,symbolDiamond:Gxe,symbolSquare:Yxe,symbolStar:Zxe,symbolTriangle:eye,symbolWye:nye},Cye=Math.PI/180,Aye=function(t){var r="symbol".concat(Rj(t));return pW[r]||iP},kye=function(t,r,a){if(r==="area")return t;switch(a){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var s=18*Cye;return 1.25*t*t*(Math.tan(s)-Math.tan(s*2)*Math.pow(Math.tan(s),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}},Pye=function(t,r){pW["symbol".concat(Rj(t))]=r},oP=function(t){var r=t.type,a=r===void 0?"circle":r,s=t.size,i=s===void 0?64:s,o=t.sizeType,l=o===void 0?"area":o,c=_ye(t,bye),d=WR(WR({},c),{},{type:a,size:i,sizeType:l}),h=function(){var y=Aye(a),x=rye().type(y).size(kye(i,l,a));return x()},u=d.className,f=d.cx,m=d.cy,b=Bn(d,!0);return f===+f&&m===+m&&i===+i?we.createElement("path",IA({},b,{className:or("recharts-symbols",u),transform:"translate(".concat(f,", ").concat(m,")"),d:h()})):null};oP.registerSymbol=Pye;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 DA(){return DA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},DA.apply(this,arguments)}function KR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Eye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KR(Object(r),!0).forEach(function(a){c0(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KR(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Tye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oye(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,xW(a.key),a)}}function Mye(e,t,r){return t&&Oye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lye(e,t,r){return t=J1(t),Rye(e,gW()?Reflect.construct(t,r||[],J1(e).constructor):t.apply(e,r))}function Rye(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 Iye(e)}function Iye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gW=function(){return!!e})()}function J1(e){return J1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},J1(e)}function Dye(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&&FA(e,t)}function FA(e,t){return FA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},FA(e,t)}function c0(e,t,r){return t=xW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xW(e){var t=Fye(e,"string");return Ig(t)=="symbol"?t:t+""}function Fye(e,t){if(Ig(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Ig(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cc=32,lP=(function(e){function t(){return Tye(this,t),Lye(this,t,arguments)}return Dye(t,e),Mye(t,[{key:"renderIcon",value:function(a){var s=this.props.inactiveColor,i=cc/2,o=cc/6,l=cc/3,c=a.inactive?s:a.color;if(a.type==="plainline")return we.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:a.payload.strokeDasharray,x1:0,y1:i,x2:cc,y2:i,className:"recharts-legend-icon"});if(a.type==="line")return we.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
865            A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
866            H`).concat(cc,"M").concat(2*l,",").concat(i,`
867            A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(a.type==="rect")return we.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(cc/8,"h").concat(cc,"v").concat(cc*3/4,"h").concat(-cc,"z"),className:"recharts-legend-icon"});if(we.isValidElement(a.legendIcon)){var d=Eye({},a);return delete d.legendIcon,we.cloneElement(a.legendIcon,d)}return we.createElement(oP,{fill:c,cx:i,cy:i,size:cc,sizeType:"diameter",type:a.type})}},{key:"renderItems",value:function(){var a=this,s=this.props,i=s.payload,o=s.iconSize,l=s.layout,c=s.formatter,d=s.inactiveColor,h={x:0,y:0,width:cc,height:cc},u={display:l==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,b){var g=m.formatter||c,y=or(c0(c0({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",m.inactive));if(m.type==="none")return null;var x=qn(m.value)?null:m.value;Vu(!qn(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=m.inactive?d:m.color;return we.createElement("li",DA({className:y,style:u,key:"legend-item-".concat(b)},W1(a.props,m,b)),we.createElement(EA,{width:o,height:o,viewBox:h,style:f},a.renderIcon(m)),we.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},g?g(x,m,b):x))})}},{key:"render",value:function(){var a=this.props,s=a.payload,i=a.layout,o=a.align;if(!s||!s.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return we.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(L.PureComponent);c0(lP,"displayName","Legend");c0(lP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var s5,GR;function qye(){if(GR)return s5;GR=1;var e=Oj();function t(){this.__data__=new e,this.size=0}return s5=t,s5}var i5,YR;function Bye(){if(YR)return i5;YR=1;function e(t){var r=this.__data__,a=r.delete(t);return this.size=r.size,a}return i5=e,i5}var o5,QR;function $ye(){if(QR)return o5;QR=1;function e(t){return this.__data__.get(t)}return o5=e,o5}var l5,XR;function Uye(){if(XR)return l5;XR=1;function e(t){return this.__data__.has(t)}return l5=e,l5}var c5,JR;function zye(){if(JR)return c5;JR=1;var e=Oj(),t=J6(),r=Z6(),a=200;function s(i,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<a-1)return c.push([i,o]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(i,o),this.size=l.size,this}return c5=s,c5}var d5,ZR;function yW(){if(ZR)return d5;ZR=1;var e=Oj(),t=qye(),r=Bye(),a=$ye(),s=Uye(),i=zye();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=a,o.prototype.has=s,o.prototype.set=i,d5=o,d5}var u5,e8;function Vye(){if(e8)return u5;e8=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return u5=t,u5}var h5,t8;function Hye(){if(t8)return h5;t8=1;function e(t){return this.__data__.has(t)}return h5=e,h5}var f5,n8;function vW(){if(n8)return f5;n8=1;var e=Z6(),t=Vye(),r=Hye();function a(s){var i=-1,o=s==null?0:s.length;for(this.__data__=new e;++i<o;)this.add(s[i])}return a.prototype.add=a.prototype.push=t,a.prototype.has=r,f5=a,f5}var m5,r8;function bW(){if(r8)return m5;r8=1;function e(t,r){for(var a=-1,s=t==null?0:t.length;++a<s;)if(r(t[a],a,t))return!0;return!1}return m5=e,m5}var p5,a8;function wW(){if(a8)return p5;a8=1;function e(t,r){return t.has(r)}return p5=e,p5}var g5,s8;function jW(){if(s8)return g5;s8=1;var e=vW(),t=bW(),r=wW(),a=1,s=2;function i(o,l,c,d,h,u){var f=c&a,m=o.length,b=l.length;if(m!=b&&!(f&&b>m))return!1;var g=u.get(o),y=u.get(l);if(g&&y)return g==l&&y==o;var x=-1,w=!0,j=c&s?new e:void 0;for(u.set(o,l),u.set(l,o);++x<m;){var N=o[x],_=l[x];if(d)var S=f?d(_,N,x,l,o,u):d(N,_,x,o,l,u);if(S!==void 0){if(S)continue;w=!1;break}if(j){if(!t(l,function(A,T){if(!r(j,T)&&(N===A||h(N,A,c,d,u)))return j.push(T)})){w=!1;break}}else if(!(N===_||h(N,_,c,d,u))){w=!1;break}}return u.delete(o),u.delete(l),w}return g5=i,g5}var x5,i8;function Wye(){if(i8)return x5;i8=1;var e=cu(),t=e.Uint8Array;return x5=t,x5}var y5,o8;function Kye(){if(o8)return y5;o8=1;function e(t){var r=-1,a=Array(t.size);return t.forEach(function(s,i){a[++r]=[i,s]}),a}return y5=e,y5}var v5,l8;function cP(){if(l8)return v5;l8=1;function e(t){var r=-1,a=Array(t.size);return t.forEach(function(s){a[++r]=s}),a}return v5=e,v5}var b5,c8;function Gye(){if(c8)return b5;c8=1;var e=hv(),t=Wye(),r=X6(),a=jW(),s=Kye(),i=cP(),o=1,l=2,c="[object Boolean]",d="[object Date]",h="[object Error]",u="[object Map]",f="[object Number]",m="[object RegExp]",b="[object Set]",g="[object String]",y="[object Symbol]",x="[object ArrayBuffer]",w="[object DataView]",j=e?e.prototype:void 0,N=j?j.valueOf
vendor: 1,088 bytes, line 867
867:void 0;function _(S,A,T,R,M,k,P){switch(T){case w:if(S.byteLength!=A.byteLength||S.byteOffset!=A.byteOffset)return!1;S=S.buffer,A=A.buffer;case x:return!(S.byteLength!=A.byteLength||!k(new t(S),new t(A)));case c:case d:case f:return r(+S,+A);case h:return S.name==A.name&&S.message==A.message;case m:case g:return S==A+"";case u:var O=s;case b:var F=R&o;if(O||(O=i),S.size!=A.size&&!F)return!1;var $=P.get(S);if($)return $==A;R|=l,P.set(S,A);var G=a(O(S),O(A),R,M,k,P);return P.delete(S),G;case y:if(N)return N.call(S)==N.call(A)}return!1}return b5=_,b5}var w5,d8;function NW(){if(d8)return w5;d8=1;function e(t,r){for(var a=-1,s=r.length,i=t.length;++a<s;)t[i+a]=r[a];return t}return w5=e,w5}var j5,u8;function Yye(){if(u8)return j5;u8=1;var e=NW(),t=sl();function r(a,s,i){var o=s(a);return t(a)?o:e(o,i(a))}return j5=r,j5}var N5,h8;function Qye(){if(h8)return N5;h8=1;function e(t,r){for(var a=-1,s=t==null?0:t.length,i=0,o=[];++a<s;){var l=t[a];r(l,a,t)&&(o[i++]=l)}return o}return N5=e,N5}var _5,f8;function Xye(){if(f8)return _5;f8=1;function e(){return[]}return _5=e,_5}var S5,m8;
vendor: 5,330 bytes, line 867
867function Jye(){if(m8)return S5;m8=1;var e=Qye(),t=Xye(),r=Object.prototype,a=r.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(o){return o==null?[]:(o=Object(o),e(s(o),function(l){return a.call(o,l)}))}:t;return S5=i,S5}var C5,p8;function Zye(){if(p8)return C5;p8=1;function e(t,r){for(var a=-1,s=Array(t);++a<t;)s[a]=r(a);return s}return C5=e,C5}var A5,g8;function e0e(){if(g8)return A5;g8=1;var e=oh(),t=lh(),r="[object Arguments]";function a(s){return t(s)&&e(s)==r}return A5=a,A5}var k5,x8;function dP(){if(x8)return k5;x8=1;var e=e0e(),t=lh(),r=Object.prototype,a=r.hasOwnProperty,s=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&a.call(o,"callee")&&!s.call(o,"callee")};return k5=i,k5}var Cy={exports:{}},P5,y8;function t0e(){if(y8)return P5;y8=1;function e(){return!1}return P5=e,P5}Cy.exports;var v8;function _W(){return v8||(v8=1,(function(e,t){var r=cu(),a=t0e(),s=t&&!t.nodeType&&t,i=s&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===s,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||a;e.exports=d})(Cy,Cy.exports)),Cy.exports}var E5,b8;function uP(){if(b8)return E5;b8=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(a,s){var i=typeof a;return s=s??e,!!s&&(i=="number"||i!="symbol"&&t.test(a))&&a>-1&&a%1==0&&a<s}return E5=r,E5}var T5,w8;function hP(){if(w8)return T5;w8=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return T5=t,T5}var O5,j8;function n0e(){if(j8)return O5;j8=1;var e=oh(),t=hP(),r=lh(),a="[object Arguments]",s="[object Array]",i="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",u="[object Object]",f="[object RegExp]",m="[object Set]",b="[object String]",g="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",j="[object Float64Array]",N="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",A="[object Uint8Array]",T="[object Uint8ClampedArray]",R="[object Uint16Array]",M="[object Uint32Array]",k={};k[w]=k[j]=k[N]=k[_]=k[S]=k[A]=k[T]=k[R]=k[M]=!0,k[a]=k[s]=k[y]=k[i]=k[x]=k[o]=k[l]=k[c]=k[d]=k[h]=k[u]=k[f]=k[m]=k[b]=k[g]=!1;function P(O){return r(O)&&t(O.length)&&!!k[e(O)]}return O5=P,O5}var M5,N8;function SW(){if(N8)return M5;N8=1;function e(t){return function(r){return t(r)}}return M5=e,M5}var Ay={exports:{}};Ay.exports;var _8;function r0e(){return _8||(_8=1,(function(e,t){var r=VH(),a=t&&!t.nodeType&&t,s=a&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===a,o=i&&r.process,l=(function(){try{var c=s&&s.require&&s.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Ay,Ay.exports)),Ay.exports}var L5,S8;function CW(){if(S8)return L5;S8=1;var e=n0e(),t=SW(),r=r0e(),a=r&&r.isTypedArray,s=a?t(a):e;return L5=s,L5}var R5,C8;function a0e(){if(C8)return R5;C8=1;var e=Zye(),t=dP(),r=sl(),a=_W(),s=uP(),i=CW(),o=Object.prototype,l=o.hasOwnProperty;function c(d,h){var u=r(d),f=!u&&t(d),m=!u&&!f&&a(d),b=!u&&!f&&!m&&i(d),g=u||f||m||b,y=g?e(d.length,String):[],x=y.length;for(var w in d)(h||l.call(d,w))&&!(g&&(w=="length"||m&&(w=="offset"||w=="parent")||b&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||s(w,x)))&&y.push(w);return y}return R5=c,R5}var I5,A8;function s0e(){if(A8)return I5;A8=1;var e=Object.prototype;function t(r){var a=r&&r.constructor,s=typeof a=="function"&&a.prototype||e;return r===s}return I5=t,I5}var D5,k8;function AW(){if(k8)return D5;k8=1;function e(t,r){return function(a){return t(r(a))}}return D5=e,D5}var F5,P8;function i0e(){if(P8)return F5;P8=1;var e=AW(),t=e(Object.keys,Object);return F5=t,F5}var q5,E8;function o0e(){if(E8)return q5;E8=1;var e=s0e(),t=i0e(),r=Object.prototype,a=r.hasOwnProperty;function s(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))a.call(i,l)&&l!="constructor"&&o.push(l);return o}return q5=s,q5}var B5,T8;function fv(){if(T8)return B5;T8=1;var e=Q6(),t=hP();function r(a){return a!=null&&t(a.length)&&!e(a)}return B5=r,B5}var $5,O8;function qj(){if(O8)return $5;O8=1;var e=a0e(),t=o0e(),r=fv();function a(s){return r(s)?e(s):t(s)}return $5=a,$5}var U5,M8;function l0e(){if(M8)return U5;M8=1;var e=Yye(),t=Jye(),r=qj();function a(s){return e(s,r,t)}return U5=a,U5}var z5,L8;function c0e(){if(L8)return z5;L8=1;var e=l0e(),t=1,r=Object.prototype,a=r.hasOwnProperty;function s(i,o,l,c,d,h){var u=l&t,f=e(i),m=f.length,b=e(o),g=b.length;if(m!=g&&!u)return!1;for(var y=m;y--;){var x=f[y];if(!(u?x in o:a.call(o,x)))return!1}var w=h.get(i),j=h.get(o);if(w&&j)return w==o&&j==i;var N=!0;h.set(i,o),h.set(o,i);for(var _=u;++y<m;){x=f[y];var S=i[x],A=o[x];if(c)var T=u?c(A,S,x,o,i,h):c(S,A,x,i,o,h);if(!(T===void 0?S===A||d(S,A,l,c,h):T)){N=!1;break}_||(_=x=="constructor")}if(N&&!_){var R=i.constructor,M=o.constructor;R!=M&&"constructor"in i&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof M=="function"&&M instanceof M)&&(N=!1)}return h.delete(i),h.delete(o),N}return z5=s,z5}var V5,R8;function d0e(){if(R8)return V5;R8=1;var e=Qm(),t=cu(),r=e(t,"DataView");return V5=r,V5}var H5,I8;function u0e(){if(I8)return H5;I8=1;var e=Qm(),t=cu(),r=e(t,"Promise");return H5=r,H5}var W5,D8;function kW(){if(D8)return W5;D8=1;var e=Qm(),t=cu(),r=e(t,"Set");return W5=r,W5}var K5,F8;function h0e(){if(F8)return K5;F8=1;var e=Qm(),t=cu(),r=e(t,"WeakMap");return K5=r,K5}var G5,q8;
vendor: 1,049 bytes, line 867
867function f0e(){if(q8)return G5;q8=1;var e=d0e(),t=J6(),r=u0e(),a=kW(),s=h0e(),i=oh(),o=HH(),l="[object Map]",c="[object Object]",d="[object Promise]",h="[object Set]",u="[object WeakMap]",f="[object DataView]",m=o(e),b=o(t),g=o(r),y=o(a),x=o(s),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=f||t&&w(new t)!=l||r&&w(r.resolve())!=d||a&&w(new a)!=h||s&&w(new s)!=u)&&(w=function(j){var N=i(j),_=N==c?j.constructor:void 0,S=_?o(_):"";if(S)switch(S){case m:return f;case b:return l;case g:return d;case y:return h;case x:return u}return N}),G5=w,G5}var Y5,B8;function m0e(){if(B8)return Y5;B8=1;var e=yW(),t=jW(),r=Gye(),a=c0e(),s=f0e(),i=sl(),o=_W(),l=CW(),c=1,d="[object Arguments]",h="[object Array]",u="[object Object]",f=Object.prototype,m=f.hasOwnProperty;function b(g,y,x,w,j,N){var _=i(g),S=i(y),A=_?h:s(g),T=S?h:s(y);A=A==d?u:A,T=T==d?u:T;var R=A==u,M=T==u,k=A==T;if(k&&o(g)){if(!o(y))return!1;_=!0,R=!1}if(k&&!R)return N||(N=new e),_||l(g)?t(g,y,x,w,j,N):r(g,y,A,x,w,j,N);if(!(x&c)){var P=R&&m.call(g,"__wrapped__"),O=M&&m.call(y,"__wrapped__");
vendor: 44,824 bytes, lines 867-874
867if(P||O){var F=P?g.value():g,$=O?y.value():y;return N||(N=new e),j(F,$,x,w,N)}}return k?(N||(N=new e),a(g,y,x,w,j,N)):!1}return Y5=b,Y5}var Q5,$8;function fP(){if($8)return Q5;$8=1;var e=m0e(),t=lh();function r(a,s,i,o,l){return a===s?!0:a==null||s==null||!t(a)&&!t(s)?a!==a&&s!==s:e(a,s,i,o,r,l)}return Q5=r,Q5}var X5,U8;function p0e(){if(U8)return X5;U8=1;var e=yW(),t=fP(),r=1,a=2;function s(i,o,l,c){var d=l.length,h=d,u=!c;if(i==null)return!h;for(i=Object(i);d--;){var f=l[d];if(u&&f[2]?f[1]!==i[f[0]]:!(f[0]in i))return!1}for(;++d<h;){f=l[d];var m=f[0],b=i[m],g=f[1];if(u&&f[2]){if(b===void 0&&!(m in i))return!1}else{var y=new e;if(c)var x=c(b,g,m,i,o,y);if(!(x===void 0?t(g,b,r|a,c,y):x))return!1}}return!0}return X5=s,X5}var J5,z8;function PW(){if(z8)return J5;z8=1;var e=yf();function t(r){return r===r&&!e(r)}return J5=t,J5}var Z5,V8;function g0e(){if(V8)return Z5;V8=1;var e=PW(),t=qj();function r(a){for(var s=t(a),i=s.length;i--;){var o=s[i],l=a[o];s[i]=[o,l,e(l)]}return s}return Z5=r,Z5}var eS,H8;function EW(){if(H8)return eS;H8=1;function e(t,r){return function(a){return a==null?!1:a[t]===r&&(r!==void 0||t in Object(a))}}return eS=e,eS}var tS,W8;function x0e(){if(W8)return tS;W8=1;var e=p0e(),t=g0e(),r=EW();function a(s){var i=t(s);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===s||e(o,s,i)}}return tS=a,tS}var nS,K8;function y0e(){if(K8)return nS;K8=1;function e(t,r){return t!=null&&r in Object(t)}return nS=e,nS}var rS,G8;function v0e(){if(G8)return rS;G8=1;var e=GH(),t=dP(),r=sl(),a=uP(),s=hP(),i=Lj();function o(l,c,d){c=e(c,l);for(var h=-1,u=c.length,f=!1;++h<u;){var m=i(c[h]);if(!(f=l!=null&&d(l,m)))break;l=l[m]}return f||++h!=u?f:(u=l==null?0:l.length,!!u&&s(u)&&a(m,u)&&(r(l)||t(l)))}return rS=o,rS}var aS,Y8;function b0e(){if(Y8)return aS;Y8=1;var e=y0e(),t=v0e();function r(a,s){return a!=null&&t(a,s,e)}return aS=r,aS}var sS,Q8;function w0e(){if(Q8)return sS;Q8=1;var e=fP(),t=YH(),r=b0e(),a=Y6(),s=PW(),i=EW(),o=Lj(),l=1,c=2;function d(h,u){return a(h)&&s(u)?i(o(h),u):function(f){var m=t(f,h);return m===void 0&&m===u?r(f,h):e(u,m,l|c)}}return sS=d,sS}var iS,X8;function Sx(){if(X8)return iS;X8=1;function e(t){return t}return iS=e,iS}var oS,J8;function j0e(){if(J8)return oS;J8=1;function e(t){return function(r){return r==null?void 0:r[t]}}return oS=e,oS}var lS,Z8;function N0e(){if(Z8)return lS;Z8=1;var e=tP();function t(r){return function(a){return e(a,r)}}return lS=t,lS}var cS,eI;function _0e(){if(eI)return cS;eI=1;var e=j0e(),t=N0e(),r=Y6(),a=Lj();function s(i){return r(i)?e(a(i)):t(i)}return cS=s,cS}var dS,tI;function vf(){if(tI)return dS;tI=1;var e=x0e(),t=w0e(),r=Sx(),a=sl(),s=_0e();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?a(o)?t(o[0],o[1]):e(o):s(o)}return dS=i,dS}var uS,nI;function TW(){if(nI)return uS;nI=1;function e(t,r,a,s){for(var i=t.length,o=a+(s?1:-1);s?o--:++o<i;)if(r(t[o],o,t))return o;return-1}return uS=e,uS}var hS,rI;function S0e(){if(rI)return hS;rI=1;function e(t){return t!==t}return hS=e,hS}var fS,aI;function C0e(){if(aI)return fS;aI=1;function e(t,r,a){for(var s=a-1,i=t.length;++s<i;)if(t[s]===r)return s;return-1}return fS=e,fS}var mS,sI;function A0e(){if(sI)return mS;sI=1;var e=TW(),t=S0e(),r=C0e();function a(s,i,o){return i===i?r(s,i,o):e(s,t,o)}return mS=a,mS}var pS,iI;function k0e(){if(iI)return pS;iI=1;var e=A0e();function t(r,a){var s=r==null?0:r.length;return!!s&&e(r,a,0)>-1}return pS=t,pS}var gS,oI;function P0e(){if(oI)return gS;oI=1;function e(t,r,a){for(var s=-1,i=t==null?0:t.length;++s<i;)if(a(r,t[s]))return!0;return!1}return gS=e,gS}var xS,lI;function E0e(){if(lI)return xS;lI=1;function e(){}return xS=e,xS}var yS,cI;function T0e(){if(cI)return yS;cI=1;var e=kW(),t=E0e(),r=cP(),a=1/0,s=e&&1/r(new e([,-0]))[1]==a?function(i){return new e(i)}:t;return yS=s,yS}var vS,dI;function O0e(){if(dI)return vS;dI=1;var e=vW(),t=k0e(),r=P0e(),a=wW(),s=T0e(),i=cP(),o=200;function l(c,d,h){var u=-1,f=t,m=c.length,b=!0,g=[],y=g;if(h)b=!1,f=r;else if(m>=o){var x=d?null:s(c);if(x)return i(x);b=!1,f=a,y=new e}else y=d?[]:g;e:for(;++u<m;){var w=c[u],j=d?d(w):w;if(w=h||w!==0?w:0,b&&j===j){for(var N=y.length;N--;)if(y[N]===j)continue e;d&&y.push(j),g.push(w)}else f(y,j,h)||(y!==g&&y.push(j),g.push(w))}return g}return vS=l,vS}var bS,uI;function M0e(){if(uI)return bS;uI=1;var e=vf(),t=O0e();function r(a,s){return a&&a.length?t(a,e(s,2)):[]}return bS=r,bS}var L0e=M0e();const hI=Lr(L0e);function OW(e,t,r){return t===!0?hI(e,r):qn(t)?hI(e,t):e}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)}var R0e=["ref"];function fI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fI(Object(r),!0).forEach(function(a){Bj(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fI(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function I0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mI(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,LW(a.key),a)}}function D0e(e,t,r){return t&&mI(e.prototype,t),r&&mI(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function F0e(e,t,r){return t=Z1(t),q0e(e,MW()?Reflect.construct(t,r||[],Z1(e).constructor):t.apply(e,r))}function q0e(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 B0e(e)}function B0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MW=function(){return!!e})()}function Z1(e){return Z1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z1(e)}function $0e(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&&qA(e,t)}function qA(e,t){return qA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},qA(e,t)}function Bj(e,t,r){return t=LW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LW(e){var t=U0e(e,"string");return Dg(t)=="symbol"?t:t+""}function U0e(e,t){if(Dg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Dg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function z0e(e,t){if(e==null)return{};var r=V0e(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function V0e(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function H0e(e){return e.value}function W0e(e,t){if(we.isValidElement(e))return we.cloneElement(e,t);if(typeof e=="function")return we.createElement(e,t);t.ref;var r=z0e(t,R0e);return we.createElement(lP,r)}var pI=1,Hu=(function(e){function t(){var r;I0e(this,t);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=F0e(this,t,[].concat(s)),Bj(r,"lastBoundingBox",{width:-1,height:-1}),r}return $0e(t,e),D0e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a=this.wrapperNode.getBoundingClientRect();return a.height=this.wrapperNode.offsetHeight,a.width=this.wrapperNode.offsetWidth,a}return null}},{key:"updateBBox",value:function(){var a=this.props.onBBoxUpdate,s=this.getBBox();s?(Math.abs(s.width-this.lastBoundingBox.width)>pI||Math.abs(s.height-this.lastBoundingBox.height)>pI)&&(this.lastBoundingBox.width=s.width,this.lastBoundingBox.height=s.height,a&&a(s)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,a&&a(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ku({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(a){var s=this.props,i=s.layout,o=s.align,l=s.verticalAlign,c=s.margin,d=s.chartWidth,h=s.chartHeight,u,f;if(!a||(a.left===void 0||a.left===null)&&(a.right===void 0||a.right===null))if(o==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();u={left:((d||0)-m.width)/2}}else u=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!a||(a.top===void 0||a.top===null)&&(a.bottom===void 0||a.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();f={top:((h||0)-b.height)/2}}else f=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ku(ku({},u),f)}},{key:"render",value:function(){var a=this,s=this.props,i=s.content,o=s.width,l=s.height,c=s.wrapperStyle,d=s.payloadUniqBy,h=s.payload,u=ku(ku({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return we.createElement("div",{className:"recharts-legend-wrapper",style:u,ref:function(m){a.wrapperNode=m}},W0e(i,ku(ku({},this.props),{},{payload:OW(h,d,H0e)})))}}],[{key:"getWithHeight",value:function(a,s){var i=ku(ku({},this.defaultProps),a.props),o=i.layout;return o==="vertical"&&Ot(a.props.height)?{height:a.props.height}:o==="horizontal"?{width:a.props.width||s}:null}}])})(L.PureComponent);Bj(Hu,"displayName","Legend");Bj(Hu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var wS,gI;function K0e(){if(gI)return wS;gI=1;var e=hv(),t=dP(),r=sl(),a=e?e.isConcatSpreadable:void 0;function s(i){return r(i)||t(i)||!!(a&&i&&i[a])}return wS=s,wS}var jS,xI;function RW(){if(xI)return jS;xI=1;var e=NW(),t=K0e();function r(a,s,i,o,l){var c=-1,d=a.length;for(i||(i=t),l||(l=[]);++c<d;){var h=a[c];s>0&&i(h)?s>1?r(h,s-1,i,o,l):e(l,h):o||(l[l.length]=h)}return l}return jS=r,jS}var NS,yI;function G0e(){if(yI)return NS;yI=1;function e(t){return function(r,a,s){for(var i=-1,o=Object(r),l=s(r),c=l.length;c--;){var d=l[t?c:++i];if(a(o[d],d,o)===!1)break}return r}}return NS=e,NS}var _S,vI;function Y0e(){if(vI)return _S;vI=1;var e=G0e(),t=e();return _S=t,_S}var SS,bI;function IW(){if(bI)return SS;bI=1;var e=Y0e(),t=qj();function r(a,s){return a&&e(a,s,t)}return SS=r,SS}var CS,wI;function Q0e(){if(wI)return CS;wI=1;var e=fv();function t(r,a){return function(s,i){if(s==null)return s;if(!e(s))return r(s,i);for(var o=s.length,l=a?o:-1,c=Object(s);(a?l--:++l<o)&&i(c[l],l,c)!==!1;);return s}}return CS=t,CS}var AS,jI;function mP(){if(jI)return AS;jI=1;var e=IW(),t=Q0e(),r=t(e);return AS=r,AS}var kS,NI;function DW(){if(NI)return kS;NI=1;var e=mP(),t=fv();function r(a,s){var i=-1,o=t(a)?Array(a.length):[];return e(a,function(l,c,d){o[++i]=s(l,c,d)}),o}return kS=r,kS}var PS,_I;function X0e(){if(_I)return PS;_I=1;function e(t,r){var a=t.length;for(t.sort(r);a--;)t[a]=t[a].value;return t}return PS=e,PS}var ES,SI;function J0e(){if(SI)return ES;SI=1;var e=wx();function t(r,a){if(r!==a){var s=r!==void 0,i=r===null,o=r===r,l=e(r),c=a!==void 0,d=a===null,h=a===a,u=e(a);if(!d&&!u&&!l&&r>a||l&&c&&h&&!d&&!u||i&&c&&h||!s&&h||!o)return 1;if(!i&&!l&&!u&&r<a||u&&s&&o&&!i&&!l||d&&s&&o||!c&&o||!h)return-1}return 0}return ES=t,ES}var TS,CI;function Z0e(){if(CI)return TS;CI=1;var e=J0e();function t(r,a,s){for(var i=-1,o=r.criteria,l=a.criteria,c=o.length,d=s.length;++i<c;){var h=e(o[i],l[i]);if(h){if(i>=d)return h;var u=s[i];return h*(u=="desc"?-1:1)}}return r.index-a.index}return TS=t,TS}var OS,AI;function eve(){if(AI)return OS;AI=1;var e=eP(),t=tP(),r=vf(),a=DW(),s=X0e(),i=SW(),o=Z0e(),l=Sx(),c=sl();function d(h,u,f){u.length?u=e(u,function(g){return c(g)?function(y){return t(y,g.length===1?g[0]:g)}:g}):u=[l];var m=-1;u=e(u,i(r));var b=a(h,function(g,y,x){var w=e(u,function(j){return j(g)});return{criteria:w,index:++m,value:g}});return s(b,function(g,y){return o(g,y,f)})}return OS=d,OS}var MS,kI;function tve(){if(kI)return MS;kI=1;function e(t,r,a){switch(a.length){case 0:return t.call(r);case 1:return t.call(r,a[0]);case 2:return t.call(r,a[0],a[1]);case 3:return t.call(r,a[0],a[1],a[2])}return t.apply(r,a)}return MS=e,MS}var LS,PI;function nve(){if(PI)return LS;PI=1;var e=tve(),t=Math.max;function r(a,s,i){return s=t(s===void 0?a.length-1:s,0),function(){for(var o=arguments,l=-1,c=t(o.length-s,0),d=Array(c);++l<c;)d[l]=o[s+l];l=-1;for(var h=Array(s+1);++l<s;)h[l]=o[l];return h[s]=i(d),e(a,this,h)}}return LS=r,LS}var RS,EI;function rve(){if(EI)return RS;EI=1;function e(t){return function(){return t}}return RS=e,RS}var IS,TI;function FW(){if(TI)return IS;TI=1;var e=Qm(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return IS=t,IS}var DS,OI;function ave(){if(OI)return DS;OI=1;var e=rve(),t=FW(),r=Sx(),a=t?function(s,i){return t(s,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return DS=a,DS}var FS,MI;function sve(){if(MI)return FS;MI=1;var e=800,t=16,r=Date.now;function a(s){var i=0,o=0;return function(){var l=r(),c=t-(l-o);if(o=l,c>0){if(++i>=e)return arguments[0]}else i=0;return s.apply(void 0,arguments)}}return FS=a,FS}var qS,LI;function ive(){if(LI)return qS;LI=1;var e=ave(),t=sve(),r=t(e);return qS=r,qS}var BS,RI;function ove(){if(RI)return BS;RI=1;var e=Sx(),t=nve(),r=ive();function a(s,i){return r(t(s,i,e),s+"")}return BS=a,BS}var $S,II;function $j(){if(II)return $S;II=1;var e=X6(),t=fv(),r=uP(),a=yf();function s(i,o,l){if(!a(l))return!1;var c=typeof o;return(c=="number"?t(l)&&r(o,l.length):c=="string"&&o in l)?e(l[o],i):!1}return $S=s,$S}var US,DI;function lve(){if(DI)return US;DI=1;var e=RW(),t=eve(),r=ove(),a=$j(),s=r(function(i,o){if(i==null)return[];var l=o.length;return l>1&&a(i,o[0],o[1])?o=[]:l>2&&a(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return US=s,US}var cve=lve();const pP=Lr(cve);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)}function BA(){return BA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},BA.apply(this,arguments)}function dve(e,t){return mve(e)||fve(e,t)||hve(e,t)||uve()}function uve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
868In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hve(e,t){if(e){if(typeof e=="string")return FI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return FI(e,t)}}function FI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function fve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function mve(e){if(Array.isArray(e))return e}function qI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function zS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qI(Object(r),!0).forEach(function(a){pve(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qI(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function pve(e,t,r){return t=gve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gve(e){var t=xve(e,"string");return d0(t)=="symbol"?t:t+""}function xve(e,t){if(d0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(d0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yve(e){return Array.isArray(e)&&Hs(e[0])&&Hs(e[1])?e.join(" ~ "):e}var vve=function(t){var r=t.separator,a=r===void 0?" : ":r,s=t.contentStyle,i=s===void 0?{}:s,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,d=c===void 0?{}:c,h=t.payload,u=t.formatter,f=t.itemSorter,m=t.wrapperClassName,b=t.labelClassName,g=t.label,y=t.labelFormatter,x=t.accessibilityLayer,w=x===void 0?!1:x,j=function(){if(h&&h.length){var P={padding:0,margin:0},O=(f?pP(h,f):h).map(function(F,$){if(F.type==="none")return null;var G=zS({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},l),B=F.formatter||u||yve,Y=F.value,ee=F.name,J=Y,H=ee;if(B&&J!=null&&H!=null){var q=B(Y,ee,F,$,h);if(Array.isArray(q)){var K=dve(q,2);J=K[0],H=K[1]}else J=q}return we.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:G},Hs(H)?we.createElement("span",{className:"recharts-tooltip-item-name"},H):null,Hs(H)?we.createElement("span",{className:"recharts-tooltip-item-separator"},a):null,we.createElement("span",{className:"recharts-tooltip-item-value"},J),we.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return we.createElement("ul",{className:"recharts-tooltip-item-list",style:P},O)}return null},N=zS({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),_=zS({margin:0},d),S=!rr(g),A=S?g:"",T=or("recharts-default-tooltip",m),R=or("recharts-tooltip-label",b);S&&y&&h!==void 0&&h!==null&&(A=y(g,h));var M=w?{role:"status","aria-live":"assertive"}:{};return we.createElement("div",BA({className:T,style:N},M),we.createElement("p",{className:R,style:_},we.isValidElement(A)?A:"".concat(A)),j())};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 Ab(e,t,r){return t=bve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bve(e){var t=wve(e,"string");return u0(t)=="symbol"?t:t+""}function wve(e,t){if(u0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(u0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ry="recharts-tooltip-wrapper",jve={visibility:"hidden"};function Nve(e){var t=e.coordinate,r=e.translateX,a=e.translateY;return or(ry,Ab(Ab(Ab(Ab({},"".concat(ry,"-right"),Ot(r)&&t&&Ot(t.x)&&r>=t.x),"".concat(ry,"-left"),Ot(r)&&t&&Ot(t.x)&&r<t.x),"".concat(ry,"-bottom"),Ot(a)&&t&&Ot(t.y)&&a>=t.y),"".concat(ry,"-top"),Ot(a)&&t&&Ot(t.y)&&a<t.y))}function BI(e){var t=e.allowEscapeViewBox,r=e.coordinate,a=e.key,s=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,d=e.viewBoxDimension;if(i&&Ot(i[a]))return i[a];var h=r[a]-l-s,u=r[a]+s;if(t[a])return o[a]?h:u;if(o[a]){var f=h,m=c[a];return f<m?Math.max(u,c[a]):Math.max(h,c[a])}var b=u+l,g=c[a]+d;return b>g?Math.max(h,c[a]):Math.max(u,c[a])}function _ve(e){var t=e.translateX,r=e.translateY,a=e.useTranslate3d;return{transform:a?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function Sve(e){var t=e.allowEscapeViewBox,r=e.coordinate,a=e.offsetTopLeft,s=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,d,h,u;return o.height>0&&o.width>0&&r?(h=BI({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:a,position:s,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),u=BI({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:a,position:s,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),d=_ve({translateX:h,translateY:u,useTranslate3d:l})):d=jve,{cssProperties:d,cssClasses:Nve({translateX:h,translateY:u,coordinate:r})}}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 $I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function UI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$I(Object(r),!0).forEach(function(a){UA(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$I(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Cve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ave(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,BW(a.key),a)}}function kve(e,t,r){return t&&Ave(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pve(e,t,r){return t=ew(t),Eve(e,qW()?Reflect.construct(t,r||[],ew(e).constructor):t.apply(e,r))}function Eve(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 Tve(e)}function Tve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qW=function(){return!!e})()}function ew(e){return ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ew(e)}function Ove(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&&$A(e,t)}function $A(e,t){return $A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},$A(e,t)}function UA(e,t,r){return t=BW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BW(e){var t=Mve(e,"string");return Fg(t)=="symbol"?t:t+""}function Mve(e,t){if(Fg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Fg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zI=1,Lve=(function(e){function t(){var r;Cve(this,t);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=Pve(this,t,[].concat(s)),UA(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),UA(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,d,h;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(d=(h=r.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&d!==void 0?d:0}})}}),r}return Ove(t,e),kve(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var a=this.wrapperNode.getBoundingClientRect();(Math.abs(a.width-this.state.lastBoundingBox.width)>zI||Math.abs(a.height-this.state.lastBoundingBox.height)>zI)&&this.setState({lastBoundingBox:{width:a.width,height:a.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 a,s;this.props.active&&this.updateBBox(),this.state.dismissed&&(((a=this.props.coordinate)===null||a===void 0?void 0:a.x)!==this.state.dismissedAtCoordinate.x||((s=this.props.coordinate)===null||s===void 0?void 0:s.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var a=this,s=this.props,i=s.active,o=s.allowEscapeViewBox,l=s.animationDuration,c=s.animationEasing,d=s.children,h=s.coordinate,u=s.hasPayload,f=s.isAnimationActive,m=s.offset,b=s.position,g=s.reverseDirection,y=s.useTranslate3d,x=s.viewBox,w=s.wrapperStyle,j=Sve({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:m,position:b,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),N=j.cssClasses,_=j.cssProperties,S=UI(UI({transition:f&&i?"transform ".concat(l,"ms ").concat(c):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&u?"visible":"hidden",position:"absolute",top:0,left:0},w);return we.createElement("div",{tabIndex:-1,className:N,style:S,ref:function(T){a.wrapperNode=T}},d)}}])})(L.PureComponent),Rve=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Xm={isSsr:Rve()};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 VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function HI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(r),!0).forEach(function(a){gP(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Ive(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dve(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,UW(a.key),a)}}function Fve(e,t,r){return t&&Dve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qve(e,t,r){return t=tw(t),Bve(e,$W()?Reflect.construct(t,r||[],tw(e).constructor):t.apply(e,r))}function Bve(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 $ve(e)}function $ve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $W(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($W=function(){return!!e})()}function tw(e){return tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},tw(e)}function Uve(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&&zA(e,t)}function zA(e,t){return zA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},zA(e,t)}function gP(e,t,r){return t=UW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UW(e){var t=zve(e,"string");return qg(t)=="symbol"?t:t+""}function zve(e,t){if(qg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(qg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Vve(e){return e.dataKey}function Hve(e,t){return we.isValidElement(e)?we.cloneElement(e,t):typeof e=="function"?we.createElement(e,t):we.createElement(vve,t)}var bo=(function(e){function t(){return Ive(this,t),qve(this,t,arguments)}return Uve(t,e),Fve(t,[{key:"render",value:function(){var a=this,s=this.props,i=s.active,o=s.allowEscapeViewBox,l=s.animationDuration,c=s.animationEasing,d=s.content,h=s.coordinate,u=s.filterNull,f=s.isAnimationActive,m=s.offset,b=s.payload,g=s.payloadUniqBy,y=s.position,x=s.reverseDirection,w=s.useTranslate3d,j=s.viewBox,N=s.wrapperStyle,_=b??[];u&&_.length&&(_=OW(b.filter(function(A){return A.value!=null&&(A.hide!==!0||a.props.includeHidden)}),g,Vve));var S=_.length>0;return we.createElement(Lve,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:f,active:i,coordinate:h,hasPayload:S,offset:m,position:y,reverseDirection:x,useTranslate3d:w,viewBox:j,wrapperStyle:N},Hve(d,HI(HI({},this.props),{},{payload:_})))}}])})(L.PureComponent);gP(bo,"displayName","Tooltip");gP(bo,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Xm.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 VS,WI;function Wve(){if(WI)return VS;WI=1;var e=cu(),t=function(){return e.Date.now()};return VS=t,VS}var HS,KI;function Kve(){if(KI)return HS;KI=1;var e=/\s/;function t(r){for(var a=r.length;a--&&e.test(r.charAt(a)););return a}return HS=t,HS}var WS,GI;function Gve(){if(GI)return WS;GI=1;var e=Kve(),t=/^\s+/;function r(a){return a&&a.slice(0,e(a)+1).replace(t,"")}return WS=r,WS}var KS,YI;function zW(){if(YI)return KS;YI=1;var e=Gve(),t=yf(),r=wx(),a=NaN,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(r(d))return a;if(t(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=t(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var u=i.test(d);return u||o.test(d)?l(d.slice(2),u?2:8):s.test(d)?a:+d}return KS=c,KS}var GS,QI;function Yve(){if(QI)return GS;QI=1;var e=yf(),t=Wve(),r=zW(),a="Expected a function",s=Math.max,i=Math.min;function o(l,c,d){var h,u,f,m,b,g,y=0,x=!1,w=!1,j=!0;if(typeof l!="function")throw new TypeError(a);c=r(c)||0,e(d)&&(x=!!d.leading,w="maxWait"in d,f=w?s(r(d.maxWait)||0,c):f,j="trailing"in d?!!d.trailing:j);function N(O){var F=h,$=u;return h=u=void 0,y=O,m=l.apply($,F),m}function _(O){return y=O,b=setTimeout(T,c),x?N(O):m}function S(O){var F=O-g,$=O-y,G=c-F;return w?i(G,f-$):G}function A(O){var F=O-g,$=O-y;return g===void 0||F>=c||F<0||w&&$>=f}function T(){var O=t();if(A(O))return R(O);b=setTimeout(T,S(O))}function R(O){return b=void 0,j&&h?N(O):(h=u=void 0,m)}function M(){b!==void 0&&clearTimeout(b),y=0,h=g=u=b=void 0}function k(){return b===void 0?m:R(t())}function P(){var O=t(),F=A(O);if(h=arguments,u=this,g=O,F){if(b===void 0)return _(g);if(w)return clearTimeout(b),b=setTimeout(T,c),N(g)}return b===void 0&&(b=setTimeout(T,c)),m}return P.cancel=M,P.flush=k,P}return GS=o,GS}var YS,XI;function Qve(){if(XI)return YS;XI=1;var e=Yve(),t=yf(),r="Expected a function";function a(s,i,o){var l=!0,c=!0;if(typeof s!="function")throw new TypeError(r);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(s,i,{leading:l,maxWait:i,trailing:c})}return YS=a,YS}var Xve=Qve();const VW=Lr(Xve);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 JI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function kb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(r),!0).forEach(function(a){Jve(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JI(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Jve(e,t,r){return t=Zve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zve(e){var t=ebe(e,"string");return h0(t)=="symbol"?t:t+""}function ebe(e,t){if(h0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(h0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tbe(e,t){return sbe(e)||abe(e,t)||rbe(e,t)||nbe()}function nbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
869In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rbe(e,t){if(e){if(typeof e=="string")return ZI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZI(e,t)}}function ZI(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function abe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function sbe(e){if(Array.isArray(e))return e}var Ep=L.forwardRef(function(e,t){var r=e.aspect,a=e.initialDimension,s=a===void 0?{width:-1,height:-1}:a,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,d=e.minWidth,h=d===void 0?0:d,u=e.minHeight,f=e.maxHeight,m=e.children,b=e.debounce,g=b===void 0?0:b,y=e.id,x=e.className,w=e.onResize,j=e.style,N=j===void 0?{}:j,_=L.useRef(null),S=L.useRef();S.current=w,L.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var A=L.useState({containerWidth:s.width,containerHeight:s.height}),T=tbe(A,2),R=T[0],M=T[1],k=L.useCallback(function(O,F){M(function($){var G=Math.round(O),B=Math.round(F);return $.containerWidth===G&&$.containerHeight===B?$:{containerWidth:G,containerHeight:B}})},[]);L.useEffect(function(){var O=function(ee){var J,H=ee[0].contentRect,q=H.width,K=H.height;k(q,K),(J=S.current)===null||J===void 0||J.call(S,q,K)};g>0&&(O=VW(O,g,{trailing:!0,leading:!1}));var F=new ResizeObserver(O),$=_.current.getBoundingClientRect(),G=$.width,B=$.height;return k(G,B),F.observe(_.current),function(){F.disconnect()}},[k,g]);var P=L.useMemo(function(){var O=R.containerWidth,F=R.containerHeight;if(O<0||F<0)return null;Vu(sm(o)||sm(c),`The width(%s) and height(%s) are both fixed numbers,
870       maybe you don't need to use a ResponsiveContainer.`,o,c),Vu(!r||r>0,"The aspect(%s) must be greater than zero.",r);var $=sm(o)?O:o,G=sm(c)?F:c;r&&r>0&&($?G=$/r:G&&($=G*r),f&&G>f&&(G=f)),Vu($>0||G>0,`The width(%s) and height(%s) of chart should be greater than 0,
871       please check the style of container, or the props width(%s) and height(%s),
872       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
873       height and width.`,$,G,o,c,h,u,r);var B=!Array.isArray(m)&&zu(m.type).endsWith("Chart");return we.Children.map(m,function(Y){return we.isValidElement(Y)?L.cloneElement(Y,kb({width:$,height:G},B?{style:kb({height:"100%",width:"100%",maxHeight:G,maxWidth:$},Y.props.style)}:{})):Y})},[r,m,c,f,u,h,R,o]);return we.createElement("div",{id:y?"".concat(y):void 0,className:or("recharts-responsive-container",x),style:kb(kb({},N),{},{width:o,height:c,minWidth:h,minHeight:u,maxHeight:f}),ref:_},P)}),nw=function(t){return null};nw.displayName="Cell";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 eD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function VA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eD(Object(r),!0).forEach(function(a){ibe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eD(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ibe(e,t,r){return t=obe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function obe(e){var t=lbe(e,"string");return f0(t)=="symbol"?t:t+""}function lbe(e,t){if(f0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(f0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tp={widthCache:{},cacheCount:0},cbe=2e3,dbe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},tD="recharts_measurement_span";function ube(e){var t=VA({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Dy=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Xm.isSsr)return{width:0,height:0};var a=ube(r),s=JSON.stringify({text:t,copyStyle:a});if(Tp.widthCache[s])return Tp.widthCache[s];try{var i=document.getElementById(tD);i||(i=document.createElement("span"),i.setAttribute("id",tD),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=VA(VA({},dbe),a);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Tp.widthCache[s]=c,++Tp.cacheCount>cbe&&(Tp.cacheCount=0,Tp.widthCache={}),c}catch{return{width:0,height:0}}},hbe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 rw(e,t){return gbe(e)||pbe(e,t)||mbe(e,t)||fbe()}function fbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
874In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mbe(e,t){if(e){if(typeof e=="string")return nD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nD(e,t)}}function nD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function pbe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function gbe(e){if(Array.isArray(e))return e}function xbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rD(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,vbe(a.key),a)}}function ybe(e,t,r){return t&&rD(e.prototype,t),r&&rD(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function vbe(e){var t=bbe(e,"string");return m0(t)=="symbol"?t:t+""}function bbe(e,t){if(m0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(m0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var aD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wbe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,jbe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,HW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Nbe=Object.keys(HW),Jp="NaN";function _be(e,t){return e*HW[t]}var Pb=(function(){function e(t,r){xbe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!wbe.test(r)&&(this.num=NaN,this.unit=""),Nbe.includes(r)&&(this.num=_be(t,r),this.unit="px")}return ybe(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var a,s=(a=jbe.exec(r))!==null&&a!==void 0?a:[],i=rw(s,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])})();function WW(e){if(e.includes(Jp))return Jp;for(var t=e;t.includes("*")||t.includes("/");){var r,a=(r=aD.exec(t))!==null&&r!==void 0?r:[],s=rw(a,4),i=s[1],o=s[2],l=s[3],c=Pb.parse(i??""),d=Pb.parse(l??""),h=o==="*"?c.multiply(d):c.divide(d);if(h.isNaN())return Jp;t=t.replace(aD,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,f=(u=sD.exec(t))!==null&&u!==void 0?u:[],m=rw(f,4),b=m[1],g=m[2],y=m[3],x=Pb.parse(b??""),w=Pb.parse(y??""),j=g==="+"?x.add(w):x.subtract(w);if(j.isNaN())return Jp;t=t.replace(sD,j.toString())}return t}var iD=/\(([^()]*)\)/;function Sbe(e){for(var t=e;t.includes("(");){var r=iD.exec(t),a=rw(r,2),s=a[1];t=t.replace(iD,WW(s))}return t}function Cbe(e){var t=e.replace(/\s+/g,"");return t=Sbe(t),t=WW(t),t}function Abe(e){try{return Cbe(e)}catch{return Jp}}function QS(e){var t=Abe(e.slice(5,-1));return t===Jp?"":t}var kbe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Pbe=["dx","dy","angle","className","breakAll"];function HA(){return HA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},HA.apply(this,arguments)}function oD(e,t){if(e==null)return{};var r=Ebe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Ebe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function lD(e,t){return Lbe(e)||Mbe(e,t)||Obe(e,t)||Tbe()}
874function Tbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
875In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Obe(e,t){if(e){if(typeof e=="string")return cD(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cD(e,t)}}function cD(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Mbe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function Lbe(e){if(Array.isArray(e))return e}var KW=/[ \f\n\r\t\v\u2028\u2029]+/,GW=function(t){var r=t.children,a=t.breakAll,s=t.style;try{var i=[];rr(r)||(a?i=r.toString().split(""):i=r.toString().split(KW));var o=i.map(function(c){return{word:c,width:Dy(c,s).width}}),l=a?0:Dy(" ",s).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},Rbe=function(t,r,a,s,i){var o=t.maxLines,l=t.children,c=t.style,d=t.breakAll,h=Ot(o),u=l,f=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(G,B){var Y=B.word,ee=B.width,J=G[G.length-1];if(J&&(s==null||i||J.width+ee+a<Number(s)))J.words.push(Y),J.width+=ee+a;else{var H={words:[Y],width:ee};G.push(H)}return G},[])},m=f(r),b=function($){return $.reduce(function(G,B){return G.width>B.width?G:B})};if(!h)return m;for(var g="…",y=function($){var G=u.slice(0,$),B=GW({breakAll:d,style:c,children:G+g}).wordsWithComputedWidth,Y=f(B),ee=Y.length>o||b(Y).width>Number(s);return[ee,Y]},x=0,w=u.length-1,j=0,N;x<=w&&j<=u.length-1;){var _=Math.floor((x+w)/2),S=_-1,A=y(S),T=lD(A,2),R=T[0],M=T[1],k=y(_),P=lD(k,1),O=P[0];if(!R&&!O&&(x=_+1),R&&O&&(w=_-1),!R&&O){N=M;break}j++}return N||m},dD=function(t){var r=rr(t)?[]:t.toString().split(KW);return[{words:r}]},Ibe=function(t){var r=t.width,a=t.scaleToFit,s=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((r||a)&&!Xm.isSsr){var c,d,h=GW({breakAll:o,children:s,style:i});if(h){var u=h.wordsWithComputedWidth,f=h.spaceWidth;c=u,d=f}else return dD(s);return Rbe({breakAll:o,children:s,maxLines:l,style:i},c,d,r,a)}return dD(s)},uD="#808080",aw=function(t){var r=t.x,a=r===void 0?0:r,s=t.y,i=s===void 0?0:s,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,d=c===void 0?"0.71em":c,h=t.scaleToFit,u=h===void 0?!1:h,f=t.textAnchor,m=f===void 0?"start":f,b=t.verticalAnchor,g=b===void 0?"end":b,y=t.fill,x=y===void 0?uD:y,w=oD(t,kbe),j=L.useMemo(function(){return Ibe({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:u,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,u,w.style,w.width]),N=w.dx,_=w.dy,S=w.angle,A=w.className,T=w.breakAll,R=oD(w,Pbe);if(!Hs(a)||!Hs(i))return null;var M=a+(Ot(N)?N:0),k=i+(Ot(_)?_:0),P;switch(g){case"start":P=QS("calc(".concat(d,")"));break;case"middle":P=QS("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:P=QS("calc(".concat(j.length-1," * -").concat(l,")"));break}var O=[];if(u){var F=j[0].width,$=w.width;O.push("scale(".concat((Ot($)?$/F:1)/F,")"))}return S&&O.push("rotate(".concat(S,", ").concat(M,", ").concat(k,")")),O.length&&(R.transform=O.join(" ")),we.createElement("text",HA({},Bn(R,!0),{x:M,y:k,className:or("recharts-text",A),textAnchor:m,fill:x.includes("url")?uD:x}),j.map(function(G,B){var Y=G.words.join(T?"":" ");return we.createElement("tspan",{x:M,dy:B===0?P:l,key:"".concat(Y,"-").concat(B)},Y)}))};function of(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dbe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xP(e){let t,r,a;e.length!==2?(t=of,r=(l,c)=>of(e(l),c),a=(l,c)=>e(l)-c):(t=e===of||e===Dbe?e:Fbe,r=e,a=e);function s(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const u=d+h>>>1;r(l[u],c)<0?d=u+1:h=u}while(d<h)}return d}function i(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const u=d+h>>>1;r(l[u],c)<=0?d=u+1:h=u}while(d<h)}return d}function o(l,c,d=0,h=l.length){const u=s(l,c,d,h-1);return u>d&&a(l[u-1],c)>-a(l[u],c)?u-1:u}return{left:s,center:o,right:i}}function Fbe(){return 0}function YW(e){return e===null?NaN:+e}function*qbe(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Bbe=xP(of),mv=Bbe.right;xP(YW).center;class hD extends Map{constructor(t,r=zbe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[a,s]of t)this.set(a,s)}get(t){return super.get(fD(this,t))}has(t){return super.has(fD(this,t))}set(t,r){return super.set($be(this,t),r)}delete(t){return super.delete(Ube(this,t))}}function fD({_intern:e,_key:t},r){const a=t(r);return e.has(a)?e.get(a):r}function $be({_intern:e,_key:t},r){const a=t(r);return e.has(a)?e.get(a):(e.set(a,r),r)}function Ube({_intern:e,_key:t},r){const a=t(r);return e.has(a)&&(r=e.get(a),e.delete(a)),r}function zbe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Vbe(e=of){if(e===of)return QW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const a=e(t,r);return a||a===0?a:(e(r,r)===0)-(e(t,t)===0)}}function QW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Hbe=Math.sqrt(50),Wbe=Math.sqrt(10),Kbe=Math.sqrt(2);function sw(e,t,r){const a=(t-e)/Math.max(0,r),s=Math.floor(Math.log10(a)),i=a/Math.pow(10,s),o=i>=Hbe?10:i>=Wbe?5:i>=Kbe?2:1;let l,c,d;return s<0?(d=Math.pow(10,-s)/o,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,s)*o,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=r&&r<2?sw(e,t,r*2):[l,c,d]}function WA(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const a=t<e,[s,i,o]=a?sw(t,e,r):sw(e,t,r);if(!(i>=s))return[];const l=i-s+1,c=new Array(l);if(a)if(o<0)for(let d=0;d<l;++d)c[d]=(i-d)/-o;else for(let d=0;d<l;++d)c[d]=(i-d)*o;else if(o<0)for(let d=0;d<l;++d)c[d]=(s+d)/-o;else for(let d=0;d<l;++d)c[d]=(s+d)*o;return c}function KA(e,t,r){return t=+t,e=+e,r=+r,sw(e,t,r)[2]}function GA(e,t,r){t=+t,e=+e,r=+r;const a=t<e,s=a?KA(t,e,r):KA(e,t,r);return(a?-1:1)*(s<0?1/-s:s)}function mD(e,t){let r;for(const a of e)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);return r}function pD(e,t){let r;for(const a of e)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);return r}function XW(e,t,r=0,a=1/0,s){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),a=Math.floor(Math.min(e.length-1,a)),!(r<=t&&t<=a))return e;for(s=s===void 0?QW:Vbe(s);a>r;){if(a-r>600){const c=a-r+1,d=t-r+1,h=Math.log(c),u=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*u*(c-u)/c)*(d-c/2<0?-1:1),m=Math.max(r,Math.floor(t-d*u/c+f)),b=Math.min(a,Math.floor(t+(c-d)*u/c+f));XW(e,t,m,b,s)}const i=e[t];let o=r,l=a;for(ay(e,r,t),s(e[a],i)>0&&ay(e,r,a);o<l;){for(ay(e,o,l),++o,--l;s(e[o],i)<0;)++o;for(;s(e[l],i)>0;)--l}s(e[r],i)===0?ay(e,r,l):(++l,ay(e,l,a)),l<=t&&(r=l+1),t<=l&&(a=l-1)}return e}function ay(e,t,r){const a=e[t];e[t]=e[r],e[r]=a}function Gbe(e,t,r){if(e=Float64Array.from(qbe(e)),!(!(a=e.length)||isNaN(t=+t))){if(t<=0||a<2)return pD(e);if(t>=1)return mD(e);var a,s=(a-1)*t,i=Math.floor(s),o=mD(XW(e,i).subarray(0,i+1)),l=pD(e.subarray(i+1));return o+(l-o)*(s-i)}}function Ybe(e,t,r=YW){if(!(!(a=e.length)||isNaN(t=+t))){if(t<=0||a<2)return+r(e[0],0,e);if(t>=1)return+r(e[a-1],a-1,e);var a,s=(a-1)*t,i=Math.floor(s),o=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return o+(l-o)*(s-i)}}function Qbe(e,t,r){e=+e,t=+t,r=(s=arguments.length)<2?(t=e,e=0,1):s<3?1:+r;for(var a=-1,s=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(s);++a<s;)i[a]=e+a*r;return i}function wc(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ch(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}
vendor: 8,107 bytes, line 875
875const YA=Symbol("implicit");function yP(){var e=new hD,t=[],r=[],a=YA;function s(i){let o=e.get(i);if(o===void 0){if(a!==YA)return a;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return s.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new hD;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return s},s.range=function(i){return arguments.length?(r=Array.from(i),s):r.slice()},s.unknown=function(i){return arguments.length?(a=i,s):a},s.copy=function(){return yP(t,r).unknown(a)},wc.apply(s,arguments),s}function p0(){var e=yP().unknown(void 0),t=e.domain,r=e.range,a=0,s=1,i,o,l=!1,c=0,d=0,h=.5;delete e.unknown;function u(){var f=t().length,m=s<a,b=m?s:a,g=m?a:s;i=(g-b)/Math.max(1,f-c+d*2),l&&(i=Math.floor(i)),b+=(g-b-i*(f-c))*h,o=i*(1-c),l&&(b=Math.round(b),o=Math.round(o));var y=Qbe(f).map(function(x){return b+i*x});return r(m?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),u()):t()},e.range=function(f){return arguments.length?([a,s]=f,a=+a,s=+s,u()):[a,s]},e.rangeRound=function(f){return[a,s]=f,a=+a,s=+s,l=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(l=!!f,u()):l},e.padding=function(f){return arguments.length?(c=Math.min(1,d=+f),u()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),u()):c},e.paddingOuter=function(f){return arguments.length?(d=+f,u()):d},e.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},e.copy=function(){return p0(t(),[a,s]).round(l).paddingInner(c).paddingOuter(d).align(h)},wc.apply(u(),arguments)}function JW(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return JW(t())},e}function Fy(){return JW(p0.apply(null,arguments).paddingInner(1))}function vP(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ZW(e,t){var r=Object.create(e.prototype);for(var a in t)r[a]=t[a];return r}function pv(){}var g0=.7,iw=1/g0,ig="\\s*([+-]?\\d+)\\s*",x0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xbe=/^#([0-9a-f]{3,8})$/,Jbe=new RegExp(`^rgb\\(${ig},${ig},${ig}\\)$`),Zbe=new RegExp(`^rgb\\(${Xd},${Xd},${Xd}\\)$`),e1e=new RegExp(`^rgba\\(${ig},${ig},${ig},${x0}\\)$`),t1e=new RegExp(`^rgba\\(${Xd},${Xd},${Xd},${x0}\\)$`),n1e=new RegExp(`^hsl\\(${x0},${Xd},${Xd}\\)$`),r1e=new RegExp(`^hsla\\(${x0},${Xd},${Xd},${x0}\\)$`),gD={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};vP(pv,y0,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xD,formatHex:xD,formatHex8:a1e,formatHsl:s1e,formatRgb:yD,toString:yD});function xD(){return this.rgb().formatHex()}function a1e(){return this.rgb().formatHex8()}function s1e(){return eK(this).formatHsl()}function yD(){return this.rgb().formatRgb()}function y0(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Xbe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vD(t):r===3?new rl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Eb(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Eb(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=Jbe.exec(e))?new rl(t[1],t[2],t[3],1):(t=Zbe.exec(e))?new rl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=e1e.exec(e))?Eb(t[1],t[2],t[3],t[4]):(t=t1e.exec(e))?Eb(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=n1e.exec(e))?jD(t[1],t[2]/100,t[3]/100,1):(t=r1e.exec(e))?jD(t[1],t[2]/100,t[3]/100,t[4]):gD.hasOwnProperty(e)?vD(gD[e]):e==="transparent"?new rl(NaN,NaN,NaN,0):null}function vD(e){return new rl(e>>16&255,e>>8&255,e&255,1)}function Eb(e,t,r,a){return a<=0&&(e=t=r=NaN),new rl(e,t,r,a)}function i1e(e){return e instanceof pv||(e=y0(e)),e?(e=e.rgb(),new rl(e.r,e.g,e.b,e.opacity)):new rl}function QA(e,t,r,a){return arguments.length===1?i1e(e):new rl(e,t,r,a??1)}function rl(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}vP(rl,QA,ZW(pv,{brighter(e){return e=e==null?iw:Math.pow(iw,e),new rl(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?g0:Math.pow(g0,e),new rl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rl(Sm(this.r),Sm(this.g),Sm(this.b),ow(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:bD,formatHex:bD,formatHex8:o1e,formatRgb:wD,toString:wD}));function bD(){return`#${im(this.r)}${im(this.g)}${im(this.b)}`}function o1e(){return`#${im(this.r)}${im(this.g)}${im(this.b)}${im((isNaN(this.opacity)?1:this.opacity)*255)}`}function wD(){const e=ow(this.opacity);return`${e===1?"rgb(":"rgba("}${Sm(this.r)}, ${Sm(this.g)}, ${Sm(this.b)}${e===1?")":`, ${e})`}`}function ow(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function im(e){return e=Sm(e),(e<16?"0":"")+e.toString(16)}function jD(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new nd(e,t,r,a)}function eK(e){if(e instanceof nd)return new nd(e.h,e.s,e.l,e.opacity);if(e instanceof pv||(e=y0(e)),!e)return new nd;if(e instanceof nd)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,s=Math.min(t,r,a),i=Math.max(t,r,a),o=NaN,l=i-s,c=(i+s)/2;return l?(t===i?o=(r-a)/l+(r<a)*6:r===i?o=(a-t)/l+2:o=(t-r)/l+4,l/=c<.5?i+s:2-i-s,o*=60):l=c>0&&c<1?0:o,new nd(o,l,c,e.opacity)}function l1e(e,t,r,a){return arguments.length===1?eK(e):new nd(e,t,r,a??1)}
vendor: 4,215 bytes, line 875
875function nd(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}vP(nd,l1e,ZW(pv,{brighter(e){return e=e==null?iw:Math.pow(iw,e),new nd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?g0:Math.pow(g0,e),new nd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*t,s=2*r-a;return new rl(XS(e>=240?e-240:e+120,s,a),XS(e,s,a),XS(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new nd(ND(this.h),Tb(this.s),Tb(this.l),ow(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=ow(this.opacity);return`${e===1?"hsl(":"hsla("}${ND(this.h)}, ${Tb(this.s)*100}%, ${Tb(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ND(e){return e=(e||0)%360,e<0?e+360:e}function Tb(e){return Math.max(0,Math.min(1,e||0))}function XS(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const bP=e=>()=>e;function c1e(e,t){return function(r){return e+r*t}}function d1e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function u1e(e){return(e=+e)==1?tK:function(t,r){return r-t?d1e(t,r,e):bP(isNaN(t)?r:t)}}function tK(e,t){var r=t-e;return r?c1e(e,r):bP(isNaN(e)?t:e)}const _D=(function e(t){var r=u1e(t);function a(s,i){var o=r((s=QA(s)).r,(i=QA(i)).r),l=r(s.g,i.g),c=r(s.b,i.b),d=tK(s.opacity,i.opacity);return function(h){return s.r=o(h),s.g=l(h),s.b=c(h),s.opacity=d(h),s+""}}return a.gamma=e,a})(1);function h1e(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,a=t.slice(),s;return function(i){for(s=0;s<r;++s)a[s]=e[s]*(1-i)+t[s]*i;return a}}function f1e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m1e(e,t){var r=t?t.length:0,a=e?Math.min(r,e.length):0,s=new Array(a),i=new Array(r),o;for(o=0;o<a;++o)s[o]=Cx(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(l){for(o=0;o<a;++o)i[o]=s[o](l);return i}}function p1e(e,t){var r=new Date;return e=+e,t=+t,function(a){return r.setTime(e*(1-a)+t*a),r}}function lw(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function g1e(e,t){var r={},a={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?r[s]=Cx(e[s],t[s]):a[s]=t[s];return function(i){for(s in r)a[s]=r[s](i);return a}}var XA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,JS=new RegExp(XA.source,"g");function x1e(e){return function(){return e}}function y1e(e){return function(t){return e(t)+""}}function v1e(e,t){var r=XA.lastIndex=JS.lastIndex=0,a,s,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(a=XA.exec(e))&&(s=JS.exec(t));)(i=s.index)>r&&(i=t.slice(r,i),l[o]?l[o]+=i:l[++o]=i),(a=a[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:lw(a,s)})),r=JS.lastIndex;return r<t.length&&(i=t.slice(r),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?y1e(c[0].x):x1e(t):(t=c.length,function(d){for(var h=0,u;h<t;++h)l[(u=c[h]).i]=u.x(d);return l.join("")})}function Cx(e,t){var r=typeof t,a;return t==null||r==="boolean"?bP(t):(r==="number"?lw:r==="string"?(a=y0(t))?(t=a,_D):v1e:t instanceof y0?_D:t instanceof Date?p1e:f1e(t)?h1e:Array.isArray(t)?m1e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?g1e:lw)(e,t)}function wP(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function b1e(e,t){t===void 0&&(t=e,e=Cx);for(var r=0,a=t.length-1,s=t[0],i=new Array(a<0?0:a);r<a;)i[r]=e(s,s=t[++r]);return function(o){var l=Math.max(0,Math.min(a-1,Math.floor(o*=a)));return i[l](o-l)}}function w1e(e){return function(){return e}}function cw(e){return+e}var SD=[0,1];function jo(e){return e}function JA(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:w1e(isNaN(t)?NaN:.5)}function j1e(e,t){var r;return e>t&&(r=e,e=t,t=r),function(a){return Math.max(e,Math.min(t,a))}}function N1e(e,t,r){var a=e[0],s=e[1],i=t[0],o=t[1];return s<a?(a=JA(s,a),i=r(o,i)):(a=JA(a,s),i=r(i,o)),function(l){return i(a(l))}}function _1e(e,t,r){var a=Math.min(e.length,t.length)-1,s=new Array(a),i=new Array(a),o=-1;for(e[a]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<a;)s[o]=JA(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(l){var c=mv(e,l,1,a)-1;return i[c](s[c](l))}}
vendor: 5,373 bytes, line 875
875function gv(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Uj(){var e=SD,t=SD,r=Cx,a,s,i,o=jo,l,c,d;function h(){var f=Math.min(e.length,t.length);return o!==jo&&(o=j1e(e[0],e[f-1])),l=f>2?_1e:N1e,c=d=null,u}function u(f){return f==null||isNaN(f=+f)?i:(c||(c=l(e.map(a),t,r)))(a(o(f)))}return u.invert=function(f){return o(s((d||(d=l(t,e.map(a),lw)))(f)))},u.domain=function(f){return arguments.length?(e=Array.from(f,cw),h()):e.slice()},u.range=function(f){return arguments.length?(t=Array.from(f),h()):t.slice()},u.rangeRound=function(f){return t=Array.from(f),r=wP,h()},u.clamp=function(f){return arguments.length?(o=f?!0:jo,h()):o!==jo},u.interpolate=function(f){return arguments.length?(r=f,h()):r},u.unknown=function(f){return arguments.length?(i=f,u):i},function(f,m){return a=f,s=m,h()}}function jP(){return Uj()(jo,jo)}function S1e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function dw(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,a=e.slice(0,r);return[a.length>1?a[0]+a.slice(2):a,+e.slice(r+1)]}function Bg(e){return e=dw(Math.abs(e)),e?e[1]:NaN}function C1e(e,t){return function(r,a){for(var s=r.length,i=[],o=0,l=e[0],c=0;s>0&&l>0&&(c+l+1>a&&(l=Math.max(1,a-c)),i.push(r.substring(s-=l,s+l)),!((c+=l+1)>a));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function A1e(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var k1e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function v0(e){if(!(t=k1e.exec(e)))throw new Error("invalid format: "+e);var t;return new NP({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]})}v0.prototype=NP.prototype;function NP(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+""}NP.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 P1e(e){e:for(var t=e.length,r=1,a=-1,s;r<t;++r)switch(e[r]){case".":a=s=r;break;case"0":a===0&&(a=r),s=r;break;default:if(!+e[r])break e;a>0&&(a=0);break}return a>0?e.slice(0,a)+e.slice(s+1):e}var nK;function E1e(e,t){var r=dw(e,t);if(!r)return e+"";var a=r[0],s=r[1],i=s-(nK=Math.max(-8,Math.min(8,Math.floor(s/3)))*3)+1,o=a.length;return i===o?a:i>o?a+new Array(i-o+1).join("0"):i>0?a.slice(0,i)+"."+a.slice(i):"0."+new Array(1-i).join("0")+dw(e,Math.max(0,t+i-1))[0]}function CD(e,t){var r=dw(e,t);if(!r)return e+"";var a=r[0],s=r[1];return s<0?"0."+new Array(-s).join("0")+a:a.length>s+1?a.slice(0,s+1)+"."+a.slice(s+1):a+new Array(s-a.length+2).join("0")}const AD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:S1e,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)=>CD(e*100,t),r:CD,s:E1e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function kD(e){return e}var PD=Array.prototype.map,ED=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T1e(e){var t=e.grouping===void 0||e.thousands===void 0?kD:C1e(PD.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",a=e.currency===void 0?"":e.currency[1]+"",s=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?kD:A1e(PD.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(u){u=v0(u);var f=u.fill,m=u.align,b=u.sign,g=u.symbol,y=u.zero,x=u.width,w=u.comma,j=u.precision,N=u.trim,_=u.type;_==="n"?(w=!0,_="g"):AD[_]||(j===void 0&&(j=12),N=!0,_="g"),(y||f==="0"&&m==="=")&&(y=!0,f="0",m="=");var S=g==="$"?r:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A=g==="$"?a:/[%p]/.test(_)?o:"",T=AD[_],R=/[defgprs%]/.test(_);j=j===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function M(k){var P=S,O=A,F,$,G;if(_==="c")O=T(k)+O,k="";else{k=+k;var B=k<0||1/k<0;if(k=isNaN(k)?c:T(Math.abs(k),j),N&&(k=P1e(k)),B&&+k==0&&b!=="+"&&(B=!1),P=(B?b==="("?b:l:b==="-"||b==="("?"":b)+P,O=(_==="s"?ED[8+nK/3]:"")+O+(B&&b==="("?")":""),R){for(F=-1,$=k.length;++F<$;)if(G=k.charCodeAt(F),48>G||G>57){O=(G===46?s+k.slice(F+1):k.slice(F))+O,k=k.slice(0,F);break}}}w&&!y&&(k=t(k,1/0));var Y=P.length+k.length+O.length,ee=Y<x?new Array(x-Y+1).join(f):"";switch(w&&y&&(k=t(ee+k,ee.length?x-O.length:1/0),ee=""),m){case"<":k=P+k+O+ee;break;case"=":k=P+ee+k+O;break;case"^":k=ee.slice(0,Y=ee.length>>1)+P+k+O+ee.slice(Y);break;default:k=ee+P+k+O;break}return i(k)}return M.toString=function(){return u+""},M}function h(u,f){var m=d((u=v0(u),u.type="f",u)),b=Math.max(-8,Math.min(8,Math.floor(Bg(f)/3)))*3,g=Math.pow(10,-b),y=ED[8+b/3];return function(x){return m(g*x)+y}}return{format:d,formatPrefix:h}}var Ob,_P,rK;
vendor: 4,052 bytes, line 875
875O1e({thousands:",",grouping:[3],currency:["$",""]});function O1e(e){return Ob=T1e(e),_P=Ob.format,rK=Ob.formatPrefix,Ob}function M1e(e){return Math.max(0,-Bg(Math.abs(e)))}function L1e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bg(t)/3)))*3-Bg(Math.abs(e)))}function R1e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bg(t)-Bg(e))+1}function aK(e,t,r,a){var s=GA(e,t,r),i;switch(a=v0(a??",f"),a.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return a.precision==null&&!isNaN(i=L1e(s,o))&&(a.precision=i),rK(a,o)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(i=R1e(s,Math.max(Math.abs(e),Math.abs(t))))&&(a.precision=i-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(i=M1e(s))&&(a.precision=i-(a.type==="%")*2);break}}return _P(a)}function bf(e){var t=e.domain;return e.ticks=function(r){var a=t();return WA(a[0],a[a.length-1],r??10)},e.tickFormat=function(r,a){var s=t();return aK(s[0],s[s.length-1],r??10,a)},e.nice=function(r){r==null&&(r=10);var a=t(),s=0,i=a.length-1,o=a[s],l=a[i],c,d,h=10;for(l<o&&(d=o,o=l,l=d,d=s,s=i,i=d);h-- >0;){if(d=KA(o,l,r),d===c)return a[s]=o,a[i]=l,t(a);if(d>0)o=Math.floor(o/d)*d,l=Math.ceil(l/d)*d;else if(d<0)o=Math.ceil(o*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function uw(){var e=jP();return e.copy=function(){return gv(e,uw())},wc.apply(e,arguments),bf(e)}function sK(e){var t;function r(a){return a==null||isNaN(a=+a)?t:a}return r.invert=r,r.domain=r.range=function(a){return arguments.length?(e=Array.from(a,cw),r):e.slice()},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return sK(e).unknown(t)},e=arguments.length?Array.from(e,cw):[0,1],bf(r)}function iK(e,t){e=e.slice();var r=0,a=e.length-1,s=e[r],i=e[a],o;return i<s&&(o=r,r=a,a=o,o=s,s=i,i=o),e[r]=t.floor(s),e[a]=t.ceil(i),e}function TD(e){return Math.log(e)}function OD(e){return Math.exp(e)}function I1e(e){return-Math.log(-e)}function D1e(e){return-Math.exp(-e)}function F1e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function q1e(e){return e===10?F1e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function B1e(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 MD(e){return(t,r)=>-e(-t,r)}function SP(e){const t=e(TD,OD),r=t.domain;let a=10,s,i;function o(){return s=B1e(a),i=q1e(a),r()[0]<0?(s=MD(s),i=MD(i),e(I1e,D1e)):e(TD,OD),t}return t.base=function(l){return arguments.length?(a=+l,o()):a},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const c=r();let d=c[0],h=c[c.length-1];const u=h<d;u&&([d,h]=[h,d]);let f=s(d),m=s(h),b,g;const y=l==null?10:+l;let x=[];if(!(a%1)&&m-f<y){if(f=Math.floor(f),m=Math.ceil(m),d>0){for(;f<=m;++f)for(b=1;b<a;++b)if(g=f<0?b/i(-f):b*i(f),!(g<d)){if(g>h)break;x.push(g)}}else for(;f<=m;++f)for(b=a-1;b>=1;--b)if(g=f>0?b/i(-f):b*i(f),!(g<d)){if(g>h)break;x.push(g)}x.length*2<y&&(x=WA(d,h,y))}else x=WA(f,m,Math.min(m-f,y)).map(i);return u?x.reverse():x},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=a===10?"s":","),typeof c!="function"&&(!(a%1)&&(c=v0(c)).precision==null&&(c.trim=!0),c=_P(c)),l===1/0)return c;const d=Math.max(1,a*l/t.ticks().length);return h=>{let u=h/i(Math.round(s(h)));return u*a<a-.5&&(u*=a),u<=d?c(h):""}},t.nice=()=>r(iK(r(),{floor:l=>i(Math.floor(s(l))),ceil:l=>i(Math.ceil(s(l)))})),t}function oK(){const e=SP(Uj()).domain([1,10]);return e.copy=()=>gv(e,oK()).base(e.base()),wc.apply(e,arguments),e}function LD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function RD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function CP(e){var t=1,r=e(LD(t),RD(t));return r.constant=function(a){return arguments.length?e(LD(t=+a),RD(t)):t},bf(r)}function lK(){var e=CP(Uj());return e.copy=function(){return gv(e,lK()).constant(e.constant())},wc.apply(e,arguments)}function ID(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $1e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function U1e(e){return e<0?-e*e:e*e}function AP(e){var t=e(jo,jo),r=1;
875function a(){return r===1?e(jo,jo):r===.5?e($1e,U1e):e(ID(r),ID(1/r))}return t.exponent=function(s){return arguments.length?(r=+s,a()):r},bf(t)}function kP(){var e=AP(Uj());return e.copy=function(){return gv(e,kP()).exponent(e.exponent())},wc.apply(e,arguments),e}function z1e(){return kP.apply(null,arguments).exponent(.5)}function DD(e){return Math.sign(e)*e*e}function V1e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function cK(){var e=jP(),t=[0,1],r=!1,a;function s(i){var o=V1e(e(i));return isNaN(o)?a:r?Math.round(o):o}return s.invert=function(i){return e.invert(DD(i))},s.domain=function(i){return arguments.length?(e.domain(i),s):e.domain()},s.range=function(i){return arguments.length?(e.range((t=Array.from(i,cw)).map(DD)),s):t.slice()},s.rangeRound=function(i){return s.range(i).round(!0)},s.round=function(i){return arguments.length?(r=!!i,s):r},s.clamp=function(i){return arguments.length?(e.clamp(i),s):e.clamp()},s.unknown=function(i){return arguments.length?(a=i,s):a},s.copy=function(){return cK(e.domain(),t).round(r).clamp(e.clamp()).unknown(a)},wc.apply(s,arguments),bf(s)}function dK(){var e=[],t=[],r=[],a;function s(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=Ybe(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?a:t[mv(r,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(of),s()},i.range=function(o){return arguments.length?(t=Array.from(o),s()):t.slice()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.quantiles=function(){return r.slice()},i.copy=function(){return dK().domain(e).range(t).unknown(a)},wc.apply(i,arguments)}function uK(){var e=0,t=1,r=1,a=[.5],s=[0,1],i;function o(c){return c!=null&&c<=c?s[mv(a,c,0,r)]:i}function l(){var c=-1;for(a=new Array(r);++c<r;)a[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(r=(s=Array.from(c)).length-1,l()):s.slice()},o.invertExtent=function(c){var d=s.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,a[0]]:d>=r?[a[r-1],t]:[a[d-1],a[d]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return a.slice()},o.copy=function(){return uK().domain([e,t]).range(s).unknown(i)},wc.apply(bf(o),arguments)}function hK(){var e=[.5],t=[0,1],r,a=1;function s(i){return i!=null&&i<=i?t[mv(e,i,0,a)]:r}return s.domain=function(i){return arguments.length?(e=Array.from(i),a=Math.min(e.length,t.length-1),s):e.slice()},s.range=function(i){return arguments.length?(t=Array.from(i),a=Math.min(e.length,t.length-1),s):t.slice()},s.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},s.unknown=function(i){return arguments.length?(r=i,s):r},s.copy=function(){return hK().domain(e).range(t).unknown(r)},wc.apply(s,arguments)}const ZS=new Date,e4=new Date;function Ws(e,t,r,a){function s(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return s.floor=i=>(e(i=new Date(+i)),i),s.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),s.round=i=>{const o=s(i),l=s.ceil(i);return i-o<l-i?o:l},s.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),s.range=(i,o,l)=>{const c=[];if(i=s.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let d;do c.push(d=new Date(+i)),t(i,l),e(i);while(d<i&&i<o);return c},s.filter=i=>Ws(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),r&&(s.count=(i,o)=>(ZS.setTime(+i),e4.setTime(+o),e(ZS),e(e4),Math.floor(r(ZS,e4))),s.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?s.filter(a?o=>a(o)%i===0:o=>s.count(0,o)%i===0):s)),s}const hw=Ws(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hw.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ws(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):hw);hw.range;const Du=1e3,xc=Du*60,Fu=xc*60,rh=Fu*24,PP=rh*7,FD=rh*30,t4=rh*365,om=Ws(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Du)},(e,t)=>(t-e)/Du,e=>e.getUTCSeconds());om.range;const EP=Ws(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Du)},(e,t)=>{e.setTime(+e+t*xc)},(e,t)=>(t-e)/xc,e=>e.getMinutes());EP.range;const TP=Ws(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xc)},(e,t)=>(t-e)/xc,e=>e.getUTCMinutes());TP.range;const OP=Ws(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Du-e.getMinutes()*xc)},(e,t)=>{e.setTime(+e+t*Fu)},(e,t)=>(t-e)/Fu,e=>e.getHours());OP.range;const MP=Ws(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fu)},(e,t)=>(t-e)/Fu,e=>e.getUTCHours());MP.range;const xv=Ws(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xc)/rh,e=>e.getDate()-1);xv.range;const zj=Ws(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/rh,e=>e.getUTCDate()-1);zj.range;const fK=Ws(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/rh,e=>Math.floor(e/rh));fK.range;function Jm(e){return Ws(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*xc)/PP)}const Vj=Jm(0),fw=Jm(1),H1e=Jm(2),W1e=Jm(3),$g=Jm(4),K1e=Jm(5),G1e=Jm(6);Vj.range;fw.range;H1e.range;W1e.range;$g.range;K1e.range;G1e.range;function Zm(e){return Ws(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/PP)}const Hj=Zm(0),mw=Zm(1),Y1e=Zm(2),Q1e=Zm(3),Ug=Zm(4),X1e=Zm(5),J1e=Zm(6);Hj.range;mw.range;Y1e.range;Q1e.range;Ug.range;X1e.range;J1e.range;const LP=Ws(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());LP.range;const RP=Ws(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());RP.range;const ah=Ws(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());ah.every=e=>
vendor: 4,401 bytes, line 875
875!isFinite(e=Math.floor(e))||!(e>0)?null:Ws(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ah.range;const sh=Ws(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());sh.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ws(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});sh.range;function mK(e,t,r,a,s,i){const o=[[om,1,Du],[om,5,5*Du],[om,15,15*Du],[om,30,30*Du],[i,1,xc],[i,5,5*xc],[i,15,15*xc],[i,30,30*xc],[s,1,Fu],[s,3,3*Fu],[s,6,6*Fu],[s,12,12*Fu],[a,1,rh],[a,2,2*rh],[r,1,PP],[t,1,FD],[t,3,3*FD],[e,1,t4]];function l(d,h,u){const f=h<d;f&&([d,h]=[h,d]);const m=u&&typeof u.range=="function"?u:c(d,h,u),b=m?m.range(d,+h+1):[];return f?b.reverse():b}function c(d,h,u){const f=Math.abs(h-d)/u,m=xP(([,,y])=>y).right(o,f);if(m===o.length)return e.every(GA(d/t4,h/t4,u));if(m===0)return hw.every(Math.max(GA(d,h,u),1));const[b,g]=o[f/o[m-1][2]<o[m][2]/f?m-1:m];return b.every(g)}return[l,c]}const[Z1e,ewe]=mK(sh,RP,Hj,fK,MP,TP),[twe,nwe]=mK(ah,LP,Vj,xv,OP,EP);function n4(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 r4(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 sy(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function rwe(e){var t=e.dateTime,r=e.date,a=e.time,s=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,d=iy(s),h=oy(s),u=iy(i),f=oy(i),m=iy(o),b=oy(o),g=iy(l),y=oy(l),x=iy(c),w=oy(c),j={a:B,A:Y,b:ee,B:J,c:null,d:VD,e:VD,f:Cwe,g:Iwe,G:Fwe,H:Nwe,I:_we,j:Swe,L:pK,m:Awe,M:kwe,p:H,q,Q:KD,s:GD,S:Pwe,u:Ewe,U:Twe,V:Owe,w:Mwe,W:Lwe,x:null,X:null,y:Rwe,Y:Dwe,Z:qwe,"%":WD},N={a:K,A:te,b:re,B:Q,c:null,d:HD,e:HD,f:zwe,g:Zwe,G:tje,H:Bwe,I:$we,j:Uwe,L:xK,m:Vwe,M:Hwe,p:ne,q:oe,Q:KD,s:GD,S:Wwe,u:Kwe,U:Gwe,V:Ywe,w:Qwe,W:Xwe,x:null,X:null,y:Jwe,Y:eje,Z:nje,"%":WD},_={a:M,A:k,b:P,B:O,c:F,d:UD,e:UD,f:vwe,g:$D,G:BD,H:zD,I:zD,j:pwe,L:ywe,m:mwe,M:gwe,p:R,q:fwe,Q:wwe,s:jwe,S:xwe,u:lwe,U:cwe,V:dwe,w:owe,W:uwe,x:$,X:G,y:$D,Y:BD,Z:hwe,"%":bwe};j.x=S(r,j),j.X=S(a,j),j.c=S(t,j),N.x=S(r,N),N.X=S(a,N),N.c=S(t,N);function S(ae,le){return function(je){var xe=[],Fe=-1,he=0,Ne=ae.length,ue,rt,Te;for(je instanceof Date||(je=new Date(+je));++Fe<Ne;)ae.charCodeAt(Fe)===37&&(xe.push(ae.slice(he,Fe)),(rt=qD[ue=ae.charAt(++Fe)])!=null?ue=ae.charAt(++Fe):rt=ue==="e"?" ":"0",(Te=le[ue])&&(ue=Te(je,rt)),xe.push(ue),he=Fe+1);return xe.push(ae.slice(he,Fe)),xe.join("")}}function A(ae,le){return function(je){var xe=sy(1900,void 0,1),Fe=T(xe,ae,je+="",0),he,Ne;if(Fe!=je.length)return null;if("Q"in xe)return new Date(xe.Q);if("s"in xe)return new Date(xe.s*1e3+("L"in xe?xe.L:0));if(le&&!("Z"in xe)&&(xe.Z=0),"p"in xe&&(xe.H=xe.H%12+xe.p*12),xe.m===void 0&&(xe.m="q"in xe?xe.q:0),"V"in xe){if(xe.V<1||xe.V>53)return null;"w"in xe||(xe.w=1),"Z"in xe?(he=r4(sy(xe.y,0,1)),Ne=he.getUTCDay(),he=Ne>4||Ne===0?mw.ceil(he):mw(he),he=zj.offset(he,(xe.V-1)*7),xe.y=he.getUTCFullYear(),xe.m=he.getUTCMonth(),xe.d=he.getUTCDate()+(xe.w+6)%7):(he=n4(sy(xe.y,0,1)),Ne=he.getDay(),he=Ne>4||Ne===0?fw.ceil(he):fw(he),he=xv.offset(he,(xe.V-1)*7),xe.y=he.getFullYear(),xe.m=he.getMonth(),xe.d=he.getDate()+(xe.w+6)%7)}else("W"in xe||"U"in xe)&&("w"in xe||(xe.w="u"in xe?xe.u%7:"W"in xe?1:0),Ne="Z"in xe?r4(sy(xe.y,0,1)).getUTCDay():n4(sy(xe.y,0,1)).getDay(),xe.m=0,xe.d="W"in xe?(xe.w+6)%7+xe.W*7-(Ne+5)%7:xe.w+xe.U*7-(Ne+6)%7);return"Z"in xe?(xe.H+=xe.Z/100|0,xe.M+=xe.Z%100,r4(xe)):n4(xe)}}function T(ae,le,je,xe){for(var Fe=0,he=le.length,Ne=je.length,ue,rt;Fe<he;){if(xe>=Ne)return-1;if(ue=le.charCodeAt(Fe++),ue===37){if(ue=le.charAt(Fe++),rt=_[ue in qD?le.charAt(Fe++):ue],!rt||(xe=rt(ae,je,xe))<0)return-1}else if(ue!=je.charCodeAt(xe++))return-1}return xe}function R(ae,le,je){var xe=d.exec(le.slice(je));return xe?(ae.p=h.get(xe[0].toLowerCase()),je+xe[0].length):-1}function M(ae,le,je){var xe=m.exec(le.slice(je));return xe?(ae.w=b.get(xe[0].toLowerCase()),je+xe[0].length):-1}function k(ae,le,je){var xe=u.exec(le.slice(je));return xe?(ae.w=f.get(xe[0].toLowerCase()),je+xe[0].length):-1}
vendor: 5,900 bytes, line 875
875function P(ae,le,je){var xe=x.exec(le.slice(je));return xe?(ae.m=w.get(xe[0].toLowerCase()),je+xe[0].length):-1}function O(ae,le,je){var xe=g.exec(le.slice(je));return xe?(ae.m=y.get(xe[0].toLowerCase()),je+xe[0].length):-1}function F(ae,le,je){return T(ae,t,le,je)}function $(ae,le,je){return T(ae,r,le,je)}function G(ae,le,je){return T(ae,a,le,je)}function B(ae){return o[ae.getDay()]}function Y(ae){return i[ae.getDay()]}function ee(ae){return c[ae.getMonth()]}function J(ae){return l[ae.getMonth()]}function H(ae){return s[+(ae.getHours()>=12)]}function q(ae){return 1+~~(ae.getMonth()/3)}function K(ae){return o[ae.getUTCDay()]}function te(ae){return i[ae.getUTCDay()]}function re(ae){return c[ae.getUTCMonth()]}function Q(ae){return l[ae.getUTCMonth()]}function ne(ae){return s[+(ae.getUTCHours()>=12)]}function oe(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var le=S(ae+="",j);return le.toString=function(){return ae},le},parse:function(ae){var le=A(ae+="",!1);return le.toString=function(){return ae},le},utcFormat:function(ae){var le=S(ae+="",N);return le.toString=function(){return ae},le},utcParse:function(ae){var le=A(ae+="",!0);return le.toString=function(){return ae},le}}}var qD={"-":"",_:" ",0:"0"},ui=/^\s*\d+/,awe=/^%/,swe=/[\\^$*+?|[\]().{}]/g;function Er(e,t,r){var a=e<0?"-":"",s=(a?-e:e)+"",i=s.length;return a+(i<r?new Array(r-i+1).join(t)+s:s)}function iwe(e){return e.replace(swe,"\\$&")}function iy(e){return new RegExp("^(?:"+e.map(iwe).join("|")+")","i")}function oy(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function owe(e,t,r){var a=ui.exec(t.slice(r,r+1));return a?(e.w=+a[0],r+a[0].length):-1}function lwe(e,t,r){var a=ui.exec(t.slice(r,r+1));return a?(e.u=+a[0],r+a[0].length):-1}function cwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.U=+a[0],r+a[0].length):-1}function dwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.V=+a[0],r+a[0].length):-1}function uwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.W=+a[0],r+a[0].length):-1}function BD(e,t,r){var a=ui.exec(t.slice(r,r+4));return a?(e.y=+a[0],r+a[0].length):-1}function $D(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),r+a[0].length):-1}function hwe(e,t,r){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return a?(e.Z=a[1]?0:-(a[2]+(a[3]||"00")),r+a[0].length):-1}function fwe(e,t,r){var a=ui.exec(t.slice(r,r+1));return a?(e.q=a[0]*3-3,r+a[0].length):-1}function mwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.m=a[0]-1,r+a[0].length):-1}function UD(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.d=+a[0],r+a[0].length):-1}function pwe(e,t,r){var a=ui.exec(t.slice(r,r+3));return a?(e.m=0,e.d=+a[0],r+a[0].length):-1}function zD(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.H=+a[0],r+a[0].length):-1}function gwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.M=+a[0],r+a[0].length):-1}function xwe(e,t,r){var a=ui.exec(t.slice(r,r+2));return a?(e.S=+a[0],r+a[0].length):-1}function ywe(e,t,r){var a=ui.exec(t.slice(r,r+3));return a?(e.L=+a[0],r+a[0].length):-1}function vwe(e,t,r){var a=ui.exec(t.slice(r,r+6));return a?(e.L=Math.floor(a[0]/1e3),r+a[0].length):-1}function bwe(e,t,r){var a=awe.exec(t.slice(r,r+1));return a?r+a[0].length:-1}function wwe(e,t,r){var a=ui.exec(t.slice(r));return a?(e.Q=+a[0],r+a[0].length):-1}function jwe(e,t,r){var a=ui.exec(t.slice(r));return a?(e.s=+a[0],r+a[0].length):-1}function VD(e,t){return Er(e.getDate(),t,2)}function Nwe(e,t){return Er(e.getHours(),t,2)}function _we(e,t){return Er(e.getHours()%12||12,t,2)}function Swe(e,t){return Er(1+xv.count(ah(e),e),t,3)}function pK(e,t){return Er(e.getMilliseconds(),t,3)}function Cwe(e,t){return pK(e,t)+"000"}function Awe(e,t){return Er(e.getMonth()+1,t,2)}function kwe(e,t){return Er(e.getMinutes(),t,2)}function Pwe(e,t){return Er(e.getSeconds(),t,2)}function Ewe(e){var t=e.getDay();return t===0?7:t}function Twe(e,t){return Er(Vj.count(ah(e)-1,e),t,2)}function gK(e){var t=e.getDay();return t>=4||t===0?$g(e):$g.ceil(e)}function Owe(e,t){return e=gK(e),Er($g.count(ah(e),e)+(ah(e).getDay()===4),t,2)}function Mwe(e){return e.getDay()}function Lwe(e,t){return Er(fw.count(ah(e)-1,e),t,2)}function Rwe(e,t){return Er(e.getFullYear()%100,t,2)}function Iwe(e,t){return e=gK(e),Er(e.getFullYear()%100,t,2)}function Dwe(e,t){return Er(e.getFullYear()%1e4,t,4)}function Fwe(e,t){var r=e.getDay();return e=r>=4||r===0?$g(e):$g.ceil(e),Er(e.getFullYear()%1e4,t,4)}function qwe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Er(t/60|0,"0",2)+Er(t%60,"0",2)}function HD(e,t){return Er(e.getUTCDate(),t,2)}function Bwe(e,t){return Er(e.getUTCHours(),t,2)}function $we(e,t){return Er(e.getUTCHours()%12||12,t,2)}function Uwe(e,t){return Er(1+zj.count(sh(e),e),t,3)}function xK(e,t){return Er(e.getUTCMilliseconds(),t,3)}function zwe(e,t){return xK(e,t)+"000"}function Vwe(e,t){return Er(e.getUTCMonth()+1,t,2)}function Hwe(e,t){return Er(e.getUTCMinutes(),t,2)}function Wwe(e,t){return Er(e.getUTCSeconds(),t,2)}function Kwe(e){var t=e.getUTCDay();return t===0?7:t}function Gwe(e,t){return Er(Hj.count(sh(e)-1,e),t,2)}function yK(e){var t=e.getUTCDay();return t>=4||t===0?Ug(e):Ug.ceil(e)}function Ywe(e,t){return e=yK(e),Er(Ug.count(sh(e),e)+(sh(e).getUTCDay()===4),t,2)}function Qwe(e){return e.getUTCDay()}function Xwe(e,t){return Er(mw.count(sh(e)-1,e),t,2)}function Jwe(e,t){return Er(e.getUTCFullYear()%100,t,2)}function Zwe(e,t){return e=yK(e),Er(e.getUTCFullYear()%100,t,2)}function eje(e,t){return Er(e.getUTCFullYear()%1e4,t,4)}function tje(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ug(e):Ug.ceil(e),Er(e.getUTCFullYear()%1e4,t,4)}function nje(){return"+0000"}function WD(){return"%"}function KD(e){return+e}function GD(e){return Math.floor(+e/1e3)}var Op,vK,bK;rje({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
875ay","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 rje(e){return Op=rwe(e),vK=Op.format,Op.parse,bK=Op.utcFormat,Op.utcParse,Op}function aje(e){return new Date(e)}function sje(e){return e instanceof Date?+e:+new Date(+e)}function IP(e,t,r,a,s,i,o,l,c,d){var h=jP(),u=h.invert,f=h.domain,m=d(".%L"),b=d(":%S"),g=d("%I:%M"),y=d("%I %p"),x=d("%a %d"),w=d("%b %d"),j=d("%B"),N=d("%Y");function _(S){return(c(S)<S?m:l(S)<S?b:o(S)<S?g:i(S)<S?y:a(S)<S?s(S)<S?x:w:r(S)<S?j:N)(S)}return h.invert=function(S){return new Date(u(S))},h.domain=function(S){return arguments.length?f(Array.from(S,sje)):f().map(aje)},h.ticks=function(S){var A=f();return e(A[0],A[A.length-1],S??10)},h.tickFormat=function(S,A){return A==null?_:d(A)},h.nice=function(S){var A=f();return(!S||typeof S.range!="function")&&(S=t(A[0],A[A.length-1],S??10)),S?f(iK(A,S)):h},h.copy=function(){return gv(h,IP(e,t,r,a,s,i,o,l,c,d))},h}function ije(){return wc.apply(IP(twe,nwe,ah,LP,Vj,xv,OP,EP,om,vK).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function oje(){return wc.apply(IP(Z1e,ewe,sh,RP,Hj,zj,MP,TP,om,bK).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Wj(){var e=0,t=1,r,a,s,i,o=jo,l=!1,c;function d(u){return u==null||isNaN(u=+u)?c:o(s===0?.5:(u=(i(u)-r)*s,l?Math.max(0,Math.min(1,u)):u))}d.domain=function(u){return arguments.length?([e,t]=u,r=i(e=+e),a=i(t=+t),s=r===a?0:1/(a-r),d):[e,t]},d.clamp=function(u){return arguments.length?(l=!!u,d):l},d.interpolator=function(u){return arguments.length?(o=u,d):o};function h(u){return function(f){var m,b;return arguments.length?([m,b]=f,o=u(m,b),d):[o(0),o(1)]}}return d.range=h(Cx),d.rangeRound=h(wP),d.unknown=function(u){return arguments.length?(c=u,d):c},function(u){return i=u,r=u(e),a=u(t),s=r===a?0:1/(a-r),d}}function wf(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function wK(){var e=bf(Wj()(jo));return e.copy=function(){return wf(e,wK())},ch.apply(e,arguments)}function jK(){var e=SP(Wj()).domain([1,10]);return e.copy=function(){return wf(e,jK()).base(e.base())},ch.apply(e,arguments)}function NK(){var e=CP(Wj());return e.copy=function(){return wf(e,NK()).constant(e.constant())},ch.apply(e,arguments)}function DP(){var e=AP(Wj());return e.copy=function(){return wf(e,DP()).exponent(e.exponent())},ch.apply(e,arguments)}function lje(){return DP.apply(null,arguments).exponent(.5)}function _K(){var e=[],t=jo;function r(a){if(a!=null&&!isNaN(a=+a))return t((mv(e,a,1)-1)/(e.length-1))}return r.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(of),r},r.interpolator=function(a){return arguments.length?(t=a,r):t},r.range=function(){return e.map((a,s)=>t(s/(e.length-1)))},r.quantiles=function(a){return Array.from({length:a+1},(s,i)=>Gbe(e,i/a))},r.copy=function(){return _K(t).domain(e)},ch.apply(r,arguments)}function Kj(){var e=0,t=.5,r=1,a=1,s,i,o,l,c,d=jo,h,u=!1,f;function m(g){return isNaN(g=+g)?f:(g=.5+((g=+h(g))-i)*(a*g<a*i?l:c),d(u?Math.max(0,Math.min(1,g)):g))}m.domain=function(g){return arguments.length?([e,t,r]=g,s=h(e=+e),i=h(t=+t),o=h(r=+r),l=s===i?0:.5/(i-s),c=i===o?0:.5/(o-i),a=i<s?-1:1,m):[e,t,r]},m.clamp=function(g){return arguments.length?(u=!!g,m):u},m.interpolator=function(g){return arguments.length?(d=g,m):d};function b(g){return function(y){var x,w,j;return arguments.length?([x,w,j]=y,d=b1e(g,[x,w,j]),m):[d(0),d(.5),d(1)]}}return m.range=b(Cx),m.rangeRound=b(wP),m.unknown=function(g){return arguments.length?(f=g,m):f},function(g){return h=g,s=g(e),i=g(t),o=g(r),l=s===i?0:.5/(i-s),c=i===o?0:.5/(o-i),a=i<s?-1:1,m}}function SK(){var e=bf(Kj()(jo));return e.copy=function(){return wf(e,SK())},ch.apply(e,arguments)}function CK(){var e=SP(Kj()).domain([.1,1,10]);return e.copy=function(){return wf(e,CK()).base(e.base())},ch.apply(e,arguments)}function AK(){var e=CP(Kj());return e.copy=function(){return wf(e,AK()).constant(e.constant())},ch.apply(e,arguments)}function FP(){var e=AP(Kj());return e.copy=function(){return wf(e,FP()).exponent(e.exponent())},ch.apply(e,arguments)}function cje(){return FP.apply(null,arguments).exponent(.5)}const YD=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:p0,scaleDiverging:SK,scaleDivergingLog:CK,scaleDivergingPow:FP,scaleDivergingSqrt:cje,scaleDivergingSymlog:AK,scaleIdentity:sK,scaleImplicit:YA,scaleLinear:uw,scaleLog:oK,scaleOrdinal:yP,scalePoint:Fy,scalePow:kP,scaleQuantile:dK,scaleQuantize:uK,scaleRadial:cK,scaleSequential:wK,scaleSequentialLog:jK,scaleSequentialPow:DP,scaleSequentialQuantile:_K,scaleSequentialSqrt:lje,scaleSequentialSymlog:NK,scaleSqrt:z1e,scaleSymlog:lK,scaleThreshold:hK,scaleTime:ije,scaleUtc:oje,tickFormat:aK},Symbol.toStringTag,{value:"Module"}));var a4,QD;function kK(){if(QD)return a4;QD=1;var e=wx();function t(r,a,s){for(var i=-1,o=r.length;++i<o;){var l=r[i],c=a(l);if(c!=null&&(d===void 0?c===c&&!e(c):s(c,d)))var d=c,h=l}return h}return a4=t,a4}var s4,XD;function dje(){if(XD)return s4;XD=1;function e(t,r){return t>r}return s4=e,s4}var i4,JD;
vendor: 66,022 bytes, lines 875-901
875function uje(){if(JD)return i4;JD=1;var e=kK(),t=dje(),r=Sx();function a(s){return s&&s.length?e(s,r,t):void 0}return i4=a,i4}var hje=uje();const ef=Lr(hje);var o4,ZD;function fje(){if(ZD)return o4;ZD=1;function e(t,r){return t<r}return o4=e,o4}var l4,e7;function mje(){if(e7)return l4;e7=1;var e=kK(),t=fje(),r=Sx();function a(s){return s&&s.length?e(s,r,t):void 0}return l4=a,l4}var pje=mje();const Gj=Lr(pje);var c4,t7;function gje(){if(t7)return c4;t7=1;var e=eP(),t=vf(),r=DW(),a=sl();function s(i,o){var l=a(i)?e:r;return l(i,t(o,3))}return c4=s,c4}var d4,n7;function xje(){if(n7)return d4;n7=1;var e=RW(),t=gje();function r(a,s){return e(t(a,s),1)}return d4=r,d4}var yje=xje();const vje=Lr(yje);var u4,r7;function PK(){if(r7)return u4;r7=1;var e=fP();function t(r,a){return e(r,a)}return u4=t,u4}var bje=PK();const zg=Lr(bje);var Ax=1e9,wje={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},BP,Ra=!0,bc="[DecimalError] ",Cm=bc+"Invalid argument: ",qP=bc+"Exponent out of range: ",kx=Math.floor,Xf=Math.pow,jje=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kl,li=1e7,Ca=7,EK=9007199254740991,pw=kx(EK/Ca),Zt={};Zt.absoluteValue=Zt.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Zt.comparedTo=Zt.cmp=function(e){var t,r,a,s,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(a=i.d.length,s=e.d.length,t=0,r=a<s?a:s;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return a===s?0:a>s^i.s<0?1:-1};Zt.decimalPlaces=Zt.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ca;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Zt.dividedBy=Zt.div=function(e){return Wu(this,new this.constructor(e))};Zt.dividedToIntegerBy=Zt.idiv=function(e){var t=this,r=t.constructor;return ca(Wu(t,new r(e),0,1),r.precision)};Zt.equals=Zt.eq=function(e){return!this.cmp(e)};Zt.exponent=function(){return As(this)};Zt.greaterThan=Zt.gt=function(e){return this.cmp(e)>0};Zt.greaterThanOrEqualTo=Zt.gte=function(e){return this.cmp(e)>=0};Zt.isInteger=Zt.isint=function(){return this.e>this.d.length-2};Zt.isNegative=Zt.isneg=function(){return this.s<0};Zt.isPositive=Zt.ispos=function(){return this.s>0};Zt.isZero=function(){return this.s===0};Zt.lessThan=Zt.lt=function(e){return this.cmp(e)<0};Zt.lessThanOrEqualTo=Zt.lte=function(e){return this.cmp(e)<1};Zt.logarithm=Zt.log=function(e){var t,r=this,a=r.constructor,s=a.precision,i=s+5;if(e===void 0)e=new a(10);else if(e=new a(e),e.s<1||e.eq(kl))throw Error(bc+"NaN");if(r.s<1)throw Error(bc+(r.s?"NaN":"-Infinity"));return r.eq(kl)?new a(0):(Ra=!1,t=Wu(b0(r,i),b0(e,i),i),Ra=!0,ca(t,s))};Zt.minus=Zt.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?MK(t,e):TK(t,(e.s=-e.s,e))};Zt.modulo=Zt.mod=function(e){var t,r=this,a=r.constructor,s=a.precision;if(e=new a(e),!e.s)throw Error(bc+"NaN");return r.s?(Ra=!1,t=Wu(r,e,0,1).times(e),Ra=!0,r.minus(t)):ca(new a(r),s)};Zt.naturalExponential=Zt.exp=function(){return OK(this)};Zt.naturalLogarithm=Zt.ln=function(){return b0(this)};Zt.negated=Zt.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Zt.plus=Zt.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TK(t,e):MK(t,(e.s=-e.s,e))};Zt.precision=Zt.sd=function(e){var t,r,a,s=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Cm+e);if(t=As(s)+1,a=s.d.length-1,r=a*Ca+1,a=s.d[a],a){for(;a%10==0;a/=10)r--;for(a=s.d[0];a>=10;a/=10)r++}return e&&t>r?t:r};Zt.squareRoot=Zt.sqrt=function(){var e,t,r,a,s,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(bc+"NaN")}for(e=As(l),Ra=!1,s=Math.sqrt(+l),s==0||s==1/0?(t=$d(l.d),(t.length+e)%2==0&&(t+="0"),s=Math.sqrt(t),e=kx((e+1)/2)-(e<0||e%2),s==1/0?t="5e"+e:(t=s.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),a=new c(t)):a=new c(s.toString()),r=c.precision,s=o=r+3;;)if(i=a,a=i.plus(Wu(l,i,o+2)).times(.5),$d(i.d).slice(0,o)===(t=$d(a.d)).slice(0,o)){if(t=t.slice(o-3,o+1),s==o&&t=="4999"){if(ca(i,r+1,0),i.times(i).eq(l)){a=i;break}}else if(t!="9999")break;o+=4}return Ra=!0,ca(a,r)};Zt.times=Zt.mul=function(e){var t,r,a,s,i,o,l,c,d,h=this,u=h.constructor,f=h.d,m=(e=new u(e)).d;if(!h.s||!e.s)return new u(0);for(e.s*=h.s,r=h.e+e.e,c=f.length,d=m.length,c<d&&(i=f,f=m,m=i,o=c,c=d,d=o),i=[],o=c+d,a=o;a--;)i.push(0);for(a=d;--a>=0;){for(t=0,s=c+a;s>a;)l=i[s]+m[a]*f[s-a-1]+t,i[s--]=l%li|0,t=l/li|0;i[s]=(i[s]+t)%li|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Ra?ca(e,u.precision):e};Zt.toDecimalPlaces=Zt.todp=function(e,t){var r=this,a=r.constructor;return r=new a(r),e===void 0?r:(au(e,0,Ax),t===void 0?t=a.rounding:au(t,0,8),ca(r,e+As(r)+1,t))};Zt.toExponential=function(e,t){var r,a=this,s=a.constructor;return e===void 0?r=zm(a,!0):(au(e,0,Ax),t===void 0?t=s.rounding:au(t,0,8),a=ca(new s(a),e+1,t),r=zm(a,!0,e+1)),r};Zt.toFixed=function(e,t){var r,a,s=this,i=s.constructor;return e===void 0?zm(s):(au(e,0,Ax),t===void 0?t=i.rounding:au(t,0,8),a=ca(new i(s),e+As(s)+1,t),r=zm(a.abs(),!1,e+As(a)+1),s.isneg()&&!s.isZero()?"-"+r:r)};Zt.toInteger=Zt.toint=function(){var e=this,t=e.constructor;return ca(new t(e),As(e)+1,t.rounding)};Zt.toNumber=function(){return+this};Zt.toPower=Zt.pow=function(e){var t,r,a,s,i,o,l=this,c=l.constructor,d=12,h=+(e=new c(e));if(!e.s)return new c(kl);if(l=new c(l),!l.s){if(e.s<1)throw Error(bc+"Infinity");return l}if(l.eq(kl))return l;if(a=c.precision,e.eq(kl))return ca(l,a);if(t=e.e,r=e.d.length-1,o=t>=r,i=l.s,o){if((r=h<0?-h:h)<=EK){for(s=new c(kl),t=Math.ceil(a/Ca+4),Ra=!1;r%2&&(s=s.times(l),s7(s.d,t)),r=kx(r/2),r!==0;)l=l.times(l),s7(l.d,t);return Ra=!0,e.s<0?new c(kl).div(s):ca(s,a)}}else if(i<0)throw Error(bc+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,Ra=!1,s=e.times(b0(l,a+d)),Ra=!0,s=OK(s),s.s=i,s};Zt.toPrecision=function(e,t){var r,a,s=this,i=s.constructor;return e===void 0?(r=As(s),a=zm(s,r<=i.toExpNeg||r>=i.toExpPos)):(au(e,1,Ax),t===void 0?t=i.rounding:au(t,0,8),s=ca(new i(s),e,t),r=As(s),a=zm(s,e<=r||r<=i.toExpNeg,e)),a};Zt.toSignificantDigits=Zt.tosd=function(e,t){var r=this,a=r.constructor;return e===void 0?(e=a.precision,t=a.rounding):(au(e,1,Ax),t===void 0?t=a.rounding:au(t,0,8)),ca(new a(r),e,t)};Zt.toString=Zt.valueOf=Zt.val=Zt.toJSON=Zt[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=As(e),r=e.constructor;return zm(e,t<=r.toExpNeg||t>=r.toExpPos)};function TK(e,t){var r,a,s,i,o,l,c,d,h=e.constructor,u=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),Ra?ca(t,u):t;if(c=e.d,d=t.d,o=e.e,s=t.e,c=c.slice(),i=o-s,i){for(i<0?(a=c,i=-i,l=d.length):(a=d,s=o,l=c.length),o=Math.ceil(u/Ca),l=o>l?o+1:l+1,i>l&&(i=l,a.length=1),a.reverse();i--;)a.push(0);a.reverse()}for(l=c.length,i=d.length,l-i<0&&(i=l,a=d,d=c,c=a),r=0;i;)r=(c[--i]=c[i]+d[i]+r)/li|0,c[i]%=li;for(r&&(c.unshift(r),++s),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=s,Ra?ca(t,u):t}function au(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Cm+e)}function $d(e){var t,r,a,s=e.length-1,i="",o=e[0];if(s>0){for(i+=o,t=1;t<s;t++)a=e[t]+"",r=Ca-a.length,r&&(i+=Bh(r)),i+=a;o=e[t],a=o+"",r=Ca-a.length,r&&(i+=Bh(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var Wu=(function(){function e(a,s){var i,o=0,l=a.length;for(a=a.slice();l--;)i=a[l]*s+o,a[l]=i%li|0,o=i/li|0;return o&&a.unshift(o),a}function t(a,s,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(a[l]!=s[l]){c=a[l]>s[l]?1:-1;break}return c}function r(a,s,i){for(var o=0;i--;)a[i]-=o,o=a[i]<s[i]?1:0,a[i]=o*li+a[i]-s[i];for(;!a[0]&&a.length>1;)a.shift()}return function(a,s,i,o){var l,c,d,h,u,f,m,b,g,y,x,w,j,N,_,S,A,T,R=a.constructor,M=a.s==s.s?1:-1,k=a.d,P=s.d;if(!a.s)return new R(a);if(!s.s)throw Error(bc+"Division by zero");for(c=a.e-s.e,A=P.length,_=k.length,m=new R(M),b=m.d=[],d=0;P[d]==(k[d]||0);)++d;if(P[d]>(k[d]||0)&&--c,i==null?w=i=R.precision:o?w=i+(As(a)-As(s))+1:w=i,w<0)return new R(0);if(w=w/Ca+2|0,d=0,A==1)for(h=0,P=P[0],w++;(d<_||h)&&w--;d++)j=h*li+(k[d]||0),b[d]=j/P|0,h=j%P|0;else{for(h=li/(P[0]+1)|0,h>1&&(P=e(P,h),k=e(k,h),A=P.length,_=k.length),N=A,g=k.slice(0,A),y=g.length;y<A;)g[y++]=0;T=P.slice(),T.unshift(0),S=P[0],P[1]>=li/2&&++S;do h=0,l=t(P,g,A,y),l<0?(x=g[0],A!=y&&(x=x*li+(g[1]||0)),h=x/S|0,h>1?(h>=li&&(h=li-1),u=e(P,h),f=u.length,y=g.length,l=t(u,g,f,y),l==1&&(h--,r(u,A<f?T:P,f))):(h==0&&(l=h=1),u=P.slice()),f=u.length,f<y&&u.unshift(0),r(g,u,y),l==-1&&(y=g.length,l=t(P,g,A,y),l<1&&(h++,r(g,A<y?T:P,y))),y=g.length):l===0&&(h++,g=[0]),b[d++]=h,l&&g[0]?g[y++]=k[N]||0:(g=[k[N]],y=1);while((N++<_||g[0]!==void 0)&&w--)}return b[0]||b.shift(),m.e=c,ca(m,o?i+As(m)+1:i)}})();function OK(e,t){var r,a,s,i,o,l,c=0,d=0,h=e.constructor,u=h.precision;if(As(e)>16)throw Error(qP+As(e));if(!e.s)return new h(kl);for(Ra=!1,l=u,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),d+=5;for(a=Math.log(Xf(2,d))/Math.LN10*2+5|0,l+=a,r=s=i=new h(kl),h.precision=l;;){if(s=ca(s.times(e),l),r=r.times(++c),o=i.plus(Wu(s,r,l)),$d(o.d).slice(0,l)===$d(i.d).slice(0,l)){for(;d--;)i=ca(i.times(i),l);return h.precision=u,t==null?(Ra=!0,ca(i,u)):i}i=o}}function As(e){for(var t=e.e*Ca,r=e.d[0];r>=10;r/=10)t++;return t}function h4(e,t,r){if(t>e.LN10.sd())throw Ra=!0,r&&(e.precision=r),Error(bc+"LN10 precision limit exceeded");return ca(new e(e.LN10),t)}function Bh(e){for(var t="";e--;)t+="0";return t}function b0(e,t){var r,a,s,i,o,l,c,d,h,u=1,f=10,m=e,b=m.d,g=m.constructor,y=g.precision;if(m.s<1)throw Error(bc+(m.s?"NaN":"-Infinity"));if(m.eq(kl))return new g(0);if(t==null?(Ra=!1,d=y):d=t,m.eq(10))return t==null&&(Ra=!0),h4(g,d);if(d+=f,g.precision=d,r=$d(b),a=r.charAt(0),i=As(m),Math.abs(i)<15e14){for(;a<7&&a!=1||a==1&&r.charAt(1)>3;)m=m.times(e),r=$d(m.d),a=r.charAt(0),u++;i=As(m),a>1?(m=new g("0."+r),i++):m=new g(a+"."+r.slice(1))}else return c=h4(g,d+2,y).times(i+""),m=b0(new g(a+"."+r.slice(1)),d-f).plus(c),g.precision=y,t==null?(Ra=!0,ca(m,y)):m;for(l=o=m=Wu(m.minus(kl),m.plus(kl),d),h=ca(m.times(m),d),s=3;;){if(o=ca(o.times(h),d),c=l.plus(Wu(o,new g(s),d)),$d(c.d).slice(0,d)===$d(l.d).slice(0,d))return l=l.times(2),i!==0&&(l=l.plus(h4(g,d+2,y).times(i+""))),l=Wu(l,new g(u),d),g.precision=y,t==null?(Ra=!0,ca(l,y)):l;l=c,s+=2}}function a7(e,t){var r,a,s;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(a=t.search(/e/i))>0?(r<0&&(r=a),r+=+t.slice(a+1),t=t.substring(0,a)):r<0&&(r=t.length),a=0;t.charCodeAt(a)===48;)++a;for(s=t.length;t.charCodeAt(s-1)===48;)--s;if(t=t.slice(a,s),t){if(s-=a,r=r-a-1,e.e=kx(r/Ca),e.d=[],a=(r+1)%Ca,r<0&&(a+=Ca),a<s){for(a&&e.d.push(+t.slice(0,a)),s-=Ca;a<s;)e.d.push(+t.slice(a,a+=Ca));t=t.slice(a),a=Ca-t.length}else a-=s;for(;a--;)t+="0";if(e.d.push(+t),Ra&&(e.e>pw||e.e<-pw))throw Error(qP+r)}else e.s=0,e.e=0,e.d=[0];return e}function ca(e,t,r){var a,s,i,o,l,c,d,h,u=e.d;for(o=1,i=u[0];i>=10;i/=10)o++;if(a=t-o,a<0)a+=Ca,s=t,d=u[h=0];else{if(h=Math.ceil((a+1)/Ca),i=u.length,h>=i)return e;for(d=i=u[h],o=1;i>=10;i/=10)o++;a%=Ca,s=a-Ca+o}if(r!==void 0&&(i=Xf(10,o-s-1),l=d/i%10|0,c=t<0||u[h+1]!==void 0||d%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(a>0?s>0?d/Xf(10,o-s):0:u[h-1])%10&1||r==(e.s<0?8:7))),t<1||!u[0])return c?(i=As(e),u.length=1,t=t-i-1,u[0]=Xf(10,(Ca-t%Ca)%Ca),e.e=kx(-t/Ca)||0):(u.length=1,u[0]=e.e=e.s=0),e;if(a==0?(u.length=h,i=1,h--):(u.length=h+1,i=Xf(10,Ca-a),u[h]=s>0?(d/Xf(10,o-s)%Xf(10,s)|0)*i:0),c)for(;;)if(h==0){(u[0]+=i)==li&&(u[0]=1,++e.e);break}else{if(u[h]+=i,u[h]!=li)break;u[h--]=0,i=1}for(a=u.length;u[--a]===0;)u.pop();if(Ra&&(e.e>pw||e.e<-pw))throw Error(qP+As(e));return e}function MK(e,t){var r,a,s,i,o,l,c,d,h,u,f=e.constructor,m=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Ra?ca(t,m):t;if(c=e.d,u=t.d,a=t.e,d=e.e,c=c.slice(),o=d-a,o){for(h=o<0,h?(r=c,o=-o,l=u.length):(r=u,a=d,l=c.length),s=Math.max(Math.ceil(m/Ca),l)+2,o>s&&(o=s,r.length=1),r.reverse(),s=o;s--;)r.push(0);r.reverse()}else{for(s=c.length,l=u.length,h=s<l,h&&(l=s),s=0;s<l;s++)if(c[s]!=u[s]){h=c[s]<u[s];break}o=0}for(h&&(r=c,c=u,u=r,t.s=-t.s),l=c.length,s=u.length-l;s>0;--s)c[l++]=0;for(s=u.length;s>o;){if(c[--s]<u[s]){for(i=s;i&&c[--i]===0;)c[i]=li-1;--c[i],c[s]+=li}c[s]-=u[s]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--a;return c[0]?(t.d=c,t.e=a,Ra?ca(t,m):t):new f(0)}function zm(e,t,r){var a,s=As(e),i=$d(e.d),o=i.length;return t?(r&&(a=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Bh(a):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(s<0?"e":"e+")+s):s<0?(i="0."+Bh(-s-1)+i,r&&(a=r-o)>0&&(i+=Bh(a))):s>=o?(i+=Bh(s+1-o),r&&(a=r-s-1)>0&&(i=i+"."+Bh(a))):((a=s+1)<o&&(i=i.slice(0,a)+"."+i.slice(a)),r&&(a=r-o)>0&&(s+1===o&&(i+="."),i+=Bh(a))),e.s<0?"-"+i:i}function s7(e,t){if(e.length>t)return e.length=t,!0}function LK(e){var t,r,a;function s(i){var o=this;if(!(o instanceof s))return new s(i);if(o.constructor=s,i instanceof s){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Cm+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return a7(o,i.toString())}else if(typeof i!="string")throw Error(Cm+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,jje.test(i))a7(o,i);else throw Error(Cm+i)}if(s.prototype=Zt,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.clone=LK,s.config=s.set=Nje,e===void 0&&(e={}),e)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<a.length;)e.hasOwnProperty(r=a[t++])||(e[r]=this[r]);return s.config(e),s}function Nje(e){if(!e||typeof e!="object")throw Error(bc+"Object expected");var t,r,a,s=["precision",1,Ax,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<s.length;t+=3)if((a=e[r=s[t]])!==void 0)if(kx(a)===a&&a>=s[t+1]&&a<=s[t+2])this[r]=a;else throw Error(Cm+r+": "+a);if((a=e[r="LN10"])!==void 0)if(a==Math.LN10)this[r]=new this(a);else throw Error(Cm+r+": "+a);return this}var BP=LK(wje);kl=new BP(1);const Qr=BP;function _je(e){return kje(e)||Aje(e)||Cje(e)||Sje()}function Sje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
876In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cje(e,t){if(e){if(typeof e=="string")return ZA(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ZA(e,t)}}function Aje(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function kje(e){if(Array.isArray(e))return ZA(e)}function ZA(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Pje=function(t){return t},RK={},IK=function(t){return t===RK},i7=function(t){return function r(){return arguments.length===0||arguments.length===1&&IK(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Eje=function e(t,r){return t===1?r:i7(function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];var o=s.filter(function(l){return l!==RK}).length;return o>=t?r.apply(void 0,s):e(t-o,i7(function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var h=s.map(function(u){return IK(u)?c.shift():u});return r.apply(void 0,_je(h).concat(c))}))})},Yj=function(t){return Eje(t.length,t)},ek=function(t,r){for(var a=[],s=t;s<r;++s)a[s-t]=s;return a},Tje=Yj(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),Oje=function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];if(!r.length)return Pje;var s=r.reverse(),i=s[0],o=s.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},tk=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},DK=function(t){var r=null,a=null;return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return r&&i.every(function(l,c){return l===r[c]})||(r=i,a=t.apply(void 0,i)),a}};function Mje(e){var t;return e===0?t=1:t=Math.floor(new Qr(e).abs().log(10).toNumber())+1,t}function Lje(e,t,r){for(var a=new Qr(e),s=0,i=[];a.lt(t)&&s<1e5;)i.push(a.toNumber()),a=a.add(r),s++;return i}var Rje=Yj(function(e,t,r){var a=+e,s=+t;return a+r*(s-a)}),Ije=Yj(function(e,t,r){var a=t-+e;return a=a||1/0,(r-e)/a}),Dje=Yj(function(e,t,r){var a=t-+e;return a=a||1/0,Math.max(0,Math.min(1,(r-e)/a))});const Qj={rangeStep:Lje,getDigitCount:Mje,interpolateNumber:Rje,uninterpolateNumber:Ije,uninterpolateTruncation:Dje};function nk(e){return Bje(e)||qje(e)||FK(e)||Fje()}function Fje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
877In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qje(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Bje(e){if(Array.isArray(e))return rk(e)}function w0(e,t){return zje(e)||Uje(e,t)||FK(e,t)||$je()}function $je(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
878In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FK(e,t){if(e){if(typeof e=="string")return rk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rk(e,t)}}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Uje(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],a=!0,s=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(a=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));a=!0);}catch(c){s=!0,i=c}finally{try{!a&&o.return!=null&&o.return()}finally{if(s)throw i}}return r}}function zje(e){if(Array.isArray(e))return e}function qK(e){var t=w0(e,2),r=t[0],a=t[1],s=r,i=a;return r>a&&(s=a,i=r),[s,i]}function BK(e,t,r){if(e.lte(0))return new Qr(0);var a=Qj.getDigitCount(e.toNumber()),s=new Qr(10).pow(a),i=e.div(s),o=a!==1?.05:.1,l=new Qr(Math.ceil(i.div(o).toNumber())).add(r).mul(o),c=l.mul(s);return t?c:new Qr(Math.ceil(c))}function Vje(e,t,r){var a=1,s=new Qr(e);if(!s.isint()&&r){var i=Math.abs(e);i<1?(a=new Qr(10).pow(Qj.getDigitCount(e)-1),s=new Qr(Math.floor(s.div(a).toNumber())).mul(a)):i>1&&(s=new Qr(Math.floor(e)))}else e===0?s=new Qr(Math.floor((t-1)/2)):r||(s=new Qr(Math.floor(e)));var o=Math.floor((t-1)/2),l=Oje(Tje(function(c){return s.add(new Qr(c-o).mul(a)).toNumber()}),ek);return l(0,t)}function $K(e,t,r,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Qr(0),tickMin:new Qr(0),tickMax:new Qr(0)};var i=BK(new Qr(t).sub(e).div(r-1),a,s),o;e<=0&&t>=0?o=new Qr(0):(o=new Qr(e).add(t).div(2),o=o.sub(new Qr(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new Qr(t).sub(o).div(i).toNumber()),d=l+c+1;return d>r?$K(e,t,r,a,s+1):(d<r&&(c=t>0?c+(r-d):c,l=t>0?l:l+(r-d)),{step:i,tickMin:o.sub(new Qr(l).mul(i)),tickMax:o.add(new Qr(c).mul(i))})}function Hje(e){var t=w0(e,2),r=t[0],a=t[1],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(s,2),l=qK([r,a]),c=w0(l,2),d=c[0],h=c[1];if(d===-1/0||h===1/0){var u=h===1/0?[d].concat(nk(ek(0,s-1).map(function(){return 1/0}))):[].concat(nk(ek(0,s-1).map(function(){return-1/0})),[h]);return r>a?tk(u):u}if(d===h)return Vje(d,s,i);var f=$K(d,h,o,i),m=f.step,b=f.tickMin,g=f.tickMax,y=Qj.rangeStep(b,g.add(new Qr(.1).mul(m)),m);return r>a?tk(y):y}function Wje(e,t){var r=w0(e,2),a=r[0],s=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=qK([a,s]),l=w0(o,2),c=l[0],d=l[1];if(c===-1/0||d===1/0)return[a,s];if(c===d)return[c];var h=Math.max(t,2),u=BK(new Qr(d).sub(c).div(h-1),i,0),f=[].concat(nk(Qj.rangeStep(new Qr(c),new Qr(d).sub(new Qr(.99).mul(u)),u)),[d]);return a>s?tk(f):f}var Kje=DK(Hje),Gje=DK(Wje),Yje="Invariant failed";function Vm(e,t){throw new Error(Yje)}var Qje=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Vg(e){"@babel/helpers - typeof";return Vg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vg(e)}function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},gw.apply(this,arguments)}function Xje(e,t){return t2e(e)||e2e(e,t)||Zje(e,t)||Jje()}function Jje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
879In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zje(e,t){if(e){if(typeof e=="string")return o7(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o7(e,t)}}function o7(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function e2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function t2e(e){if(Array.isArray(e))return e}function n2e(e,t){if(e==null)return{};var r=r2e(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function r2e(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function a2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s2e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,VK(a.key),a)}}function i2e(e,t,r){return t&&s2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o2e(e,t,r){return t=xw(t),l2e(e,UK()?Reflect.construct(t,r||[],xw(e).constructor):t.apply(e,r))}function l2e(e,t){if(t&&(Vg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c2e(e)}function c2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UK=function(){return!!e})()}function xw(e){return xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xw(e)}function d2e(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&&ak(e,t)}function ak(e,t){return ak=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},ak(e,t)}function zK(e,t,r){return t=VK(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VK(e){var t=u2e(e,"string");return Vg(t)=="symbol"?t:t+""}function u2e(e,t){if(Vg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Vg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yv=(function(e){function t(){return a2e(this,t),o2e(this,t,arguments)}return d2e(t,e),i2e(t,[{key:"render",value:function(){var a=this.props,s=a.offset,i=a.layout,o=a.width,l=a.dataKey,c=a.data,d=a.dataPointFormatter,h=a.xAxis,u=a.yAxis,f=n2e(a,Qje),m=Bn(f,!1);this.props.direction==="x"&&h.type!=="number"&&Vm();var b=c.map(function(g){var y=d(g,l),x=y.x,w=y.y,j=y.value,N=y.errorVal;if(!N)return null;var _=[],S,A;if(Array.isArray(N)){var T=Xje(N,2);S=T[0],A=T[1]}else S=A=N;if(i==="vertical"){var R=h.scale,M=w+s,k=M+o,P=M-o,O=R(j-S),F=R(j+A);_.push({x1:F,y1:k,x2:F,y2:P}),_.push({x1:O,y1:M,x2:F,y2:M}),_.push({x1:O,y1:k,x2:O,y2:P})}else if(i==="horizontal"){var $=u.scale,G=x+s,B=G-o,Y=G+o,ee=$(j-S),J=$(j+A);_.push({x1:B,y1:J,x2:Y,y2:J}),_.push({x1:G,y1:ee,x2:G,y2:J}),_.push({x1:B,y1:ee,x2:Y,y2:ee})}return we.createElement(ya,gw({className:"recharts-errorBar",key:"bar-".concat(_.map(function(H){return"".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))},m),_.map(function(H){return we.createElement("line",gw({},H,{key:"line-".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))}))});return we.createElement(ya,{className:"recharts-errorBars"},b)}}])})(we.Component);zK(yv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});zK(yv,"displayName","ErrorBar");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 l7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Vf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l7(Object(r),!0).forEach(function(a){h2e(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function h2e(e,t,r){return t=f2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f2e(e){var t=m2e(e,"string");return j0(t)=="symbol"?t:t+""}function m2e(e,t){if(j0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(j0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HK=function(t){var r=t.children,a=t.formattedGraphicalItems,s=t.legendWidth,i=t.legendContent,o=Sl(r,Hu);if(!o)return null;var l=Hu.defaultProps,c=l!==void 0?Vf(Vf({},l),o.props):{},d;return o.props&&o.props.payload?d=o.props&&o.props.payload:i==="children"?d=(a||[]).reduce(function(h,u){var f=u.item,m=u.props,b=m.sectors||m.data||[];return h.concat(b.map(function(g){return{type:o.props.iconType||f.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):d=(a||[]).map(function(h){var u=h.item,f=u.type.defaultProps,m=f!==void 0?Vf(Vf({},f),u.props):{},b=m.dataKey,g=m.name,y=m.legendType,x=m.hide;return{inactive:x,dataKey:b,type:c.iconType||y||"square",color:$P(u),value:g||b,payload:m}}),Vf(Vf(Vf({},c),Hu.getWithHeight(o,s)),{},{payload:d,item:o})};function N0(e){"@babel/helpers - typeof";return N0=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},N0(e)}function c7(e){return y2e(e)||x2e(e)||g2e(e)||p2e()}function p2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
880In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g2e(e,t){if(e){if(typeof e=="string")return sk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sk(e,t)}}function x2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y2e(e){if(Array.isArray(e))return sk(e)}function sk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function d7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Za(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?d7(Object(r),!0).forEach(function(a){og(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function og(e,t,r){return t=v2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v2e(e){var t=b2e(e,"string");return N0(t)=="symbol"?t:t+""}function b2e(e,t){if(N0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(N0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _o(e,t,r){return rr(e)||rr(t)?r:Hs(t)?yc(e,t,r):qn(t)?t(e):r}function qy(e,t,r,a){var s=vje(e,function(l){return _o(l,t)});if(r==="number"){var i=s.filter(function(l){return Ot(l)||parseFloat(l)});return i.length?[Gj(i),ef(i)]:[1/0,-1/0]}var o=a?s.filter(function(l){return!rr(l)}):s;return o.map(function(l){return Hs(l)||l instanceof Date?l:""})}var w2e=function(t){var r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=a==null?void 0:a.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,d=0;d<l;d++){var h=d>0?s[d-1].coordinate:s[l-1].coordinate,u=s[d].coordinate,f=d>=l-1?s[0].coordinate:s[d+1].coordinate,m=void 0;if(ad(u-h)!==ad(f-u)){var b=[];if(ad(f-u)===ad(c[1]-c[0])){m=f;var g=u+c[1]-c[0];b[0]=Math.min(g,(g+h)/2),b[1]=Math.max(g,(g+h)/2)}else{m=h;var y=f+c[1]-c[0];b[0]=Math.min(u,(y+u)/2),b[1]=Math.max(u,(y+u)/2)}var x=[Math.min(u,(m+u)/2),Math.max(u,(m+u)/2)];if(t>x[0]&&t<=x[1]||t>=b[0]&&t<=b[1]){o=s[d].index;break}}else{var w=Math.min(h,f),j=Math.max(h,f);if(t>(w+u)/2&&t<=(j+u)/2){o=s[d].index;break}}}else for(var N=0;N<l;N++)if(N===0&&t<=(a[N].coordinate+a[N+1].coordinate)/2||N>0&&N<l-1&&t>(a[N].coordinate+a[N-1].coordinate)/2&&t<=(a[N].coordinate+a[N+1].coordinate)/2||N===l-1&&t>(a[N].coordinate+a[N-1].coordinate)/2){o=a[N].index;break}return o},$P=function(t){var r,a=t,s=a.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Za(Za({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(s){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},j2e=function(t){var r=t.barSize,a=t.totalSize,s=t.stackGroups,i=s===void 0?{}:s;if(!i)return{};for(var o={},l=Object.keys(i),c=0,d=l.length;c<d;c++)for(var h=i[l[c]].stackGroups,u=Object.keys(h),f=0,m=u.length;f<m;f++){var b=h[u[f]],g=b.items,y=b.cateAxisId,x=g.filter(function(A){return zu(A.type).indexOf("Bar")>=0});if(x&&x.length){var w=x[0].type.defaultProps,j=w!==void 0?Za(Za({},w),x[0].props):x[0].props,N=j.barSize,_=j[y];o[_]||(o[_]=[]);var S=rr(N)?r:N;o[_].push({item:x[0],stackList:x.slice(1),barSize:rr(S)?void 0:Um(S,a,0)})}}return o},N2e=function(t){var r=t.barGap,a=t.barCategoryGap,s=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var d=Um(r,s,0,!0),h,u=[];if(o[0].barSize===+o[0].barSize){var f=!1,m=s/c,b=o.reduce(function(N,_){return N+_.barSize||0},0);b+=(c-1)*d,b>=s&&(b-=(c-1)*d,d=0),b>=s&&m>0&&(f=!0,m*=.9,b=c*m);var g=(s-b)/2>>0,y={offset:g-d,size:0};h=o.reduce(function(N,_){var S={item:_.item,position:{offset:y.offset+y.size+d,size:f?m:_.barSize}},A=[].concat(c7(N),[S]);return y=A[A.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(T){A.push({item:T,position:y})}),A},u)}else{var x=Um(a,s,0,!0);s-2*x-(c-1)*d<=0&&(d=0);var w=(s-2*x-(c-1)*d)/c;w>1&&(w>>=0);var j=l===+l?Math.min(w,l):w;h=o.reduce(function(N,_,S){var A=[].concat(c7(N),[{item:_.item,position:{offset:x+(w+d)*S+(w-j)/2,size:j}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(T){A.push({item:T,position:A[A.length-1].position})}),A},u)}return h},_2e=function(t,r,a,s){var i=a.children,o=a.width,l=a.margin,c=o-(l.left||0)-(l.right||0),d=HK({children:i,legendWidth:c});if(d){var h=s||{},u=h.width,f=h.height,m=d.align,b=d.verticalAlign,g=d.layout;if((g==="vertical"||g==="horizontal"&&b==="middle")&&m!=="center"&&Ot(t[m]))return Za(Za({},t),{},og({},m,t[m]+(u||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&b!=="middle"&&Ot(t[b]))return Za(Za({},t),{},og({},b,t[b]+(f||0)))}return t},S2e=function(t,r,a){return rr(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||a==="x"?r==="xAxis":a==="y"?r==="yAxis":!0},WK=function(t,r,a,s,i){var o=r.props.children,l=vc(o,yv).filter(function(d){return S2e(s,i,d.props.direction)});if(l&&l.length){var c=l.map(function(d){return d.props.dataKey});return t.reduce(function(d,h){var u=_o(h,a);if(rr(u))return d;var f=Array.isArray(u)?[Gj(u),ef(u)]:[u,u],m=c.reduce(function(b,g){var y=_o(h,g,0),x=f[0]-Math.abs(Array.isArray(y)?y[0]:y),w=f[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,b[0]),Math.max(w,b[1])]},[1/0,-1/0]);return[Math.min(m[0],d[0]),Math.max(m[1],d[1])]},[1/0,-1/0])}return null},C2e=function(t,r,a,s,i){var o=r.map(function(l){return WK(t,l,a,i,s)}).filter(function(l){return!rr(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},KK=function(t,r,a,s,i){var o=r.map(function(c){var d=c.props.dataKey;return a==="number"&&d&&WK(t,c,d,s)||qy(t,d,a,i)});if(a==="number")return o.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,d){for(var h=0,u=d.length;h<u;h++)l[d[h]]||(l[d[h]]=!0,c.push(d[h]));return c},[])},GK=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},YK=function(t,r,a,s){if(s)return t.map(function(c){return c.coordinate});var i,o,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===a&&(o=!0),c.coordinate});return i||l.push(r),o||l.push(a),l},qu=function(t,r,a){if(!t)return null;var s=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?s.bandwidth()/2:2,d=(r||a)&&o==="category"&&s.bandwidth?s.bandwidth()/c:0;if(d=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?ad(l[0]-l[1])*2*d:d,r&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(u){var f=i?i.indexOf(u):u;return{coordinate:s(f)+d,value:u,offset:d}});return h.filter(function(u){return!Nx(u.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(u,f){return{coordinate:s(u)+d,value:u,index:f,offset:d}}):s.ticks&&!a?s.ticks(t.tickCount).map(function(u){return{coordinate:s(u)+d,value:u,offset:d}}):s.domain().map(function(u,f){return{coordinate:s(u)+d,value:i?i[u]:u,index:f,offset:d}})},f4=new WeakMap,Mb=function(t,r){if(typeof r!="function")return t;f4.has(t)||f4.set(t,new WeakMap);var a=f4.get(t);if(a.has(r))return a.get(r);var s=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return a.set(r,s),s},A2e=function(t,r,a){var s=t.scale,i=t.type,o=t.layout,l=t.axisType;if(s==="auto")return o==="radial"&&l==="radiusAxis"?{scale:p0(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:uw(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!a)?{scale:Fy(),realScaleType:"point"}:i==="category"?{scale:p0(),realScaleType:"band"}:{scale:uw(),realScaleType:"linear"};if($m(s)){var c="scale".concat(Rj(s));return{scale:(YD[c]||Fy)(),realScaleType:YD[c]?c:"point"}}return qn(s)?{scale:s}:{scale:Fy(),realScaleType:"point"}},u7=1e-4,k2e=function(t){var r=t.domain();if(!(!r||r.length<=2)){var a=r.length,s=t.range(),i=Math.min(s[0],s[1])-u7,o=Math.max(s[0],s[1])+u7,l=t(r[0]),c=t(r[a-1]);(l<i||l>o||c<i||c>o)&&t.domain([r[0],r[a-1]])}},P2e=function(t,r){if(!t)return null;for(var a=0,s=t.length;a<s;a++)if(t[a].item===r)return t[a].position;return null},E2e=function(t,r){if(!r||r.length!==2||!Ot(r[0])||!Ot(r[1]))return t;var a=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!Ot(t[0])||t[0]<a)&&(i[0]=a),(!Ot(t[1])||t[1]>s)&&(i[1]=s),i[0]>s&&(i[0]=s),i[1]<a&&(i[1]=a),i},T2e=function(t){var r=t.length;if(!(r<=0))for(var a=0,s=t[0].length;a<s;++a)for(var i=0,o=0,l=0;l<r;++l){var c=Nx(t[l][a][1])?t[l][a][0]:t[l][a][1];c>=0?(t[l][a][0]=i,t[l][a][1]=i+c,i=t[l][a][1]):(t[l][a][0]=o,t[l][a][1]=o+c,o=t[l][a][1])}},O2e=function(t){var r=t.length;if(!(r<=0))for(var a=0,s=t[0].length;a<s;++a)for(var i=0,o=0;o<r;++o){var l=Nx(t[o][a][1])?t[o][a][0]:t[o][a][1];l>=0?(t[o][a][0]=i,t[o][a][1]=i+l,i=t[o][a][1]):(t[o][a][0]=0,t[o][a][1]=0)}},M2e={sign:T2e,expand:xye,none:Rg,silhouette:yye,wiggle:vye,positive:O2e},L2e=function(t,r,a){var s=r.map(function(l){return l.props.dataKey}),i=M2e[a],o=gye().keys(s).value(function(l,c){return+_o(l,c,0)}).order(RA).offset(i);return o(t)},R2e=function(t,r,a,s,i,o){if(!t)return null;var l=o?r.reverse():r,c={},d=l.reduce(function(u,f){var m,b=(m=f.type)!==null&&m!==void 0&&m.defaultProps?Za(Za({},f.type.defaultProps),f.props):f.props,g=b.stackId,y=b.hide;if(y)return u;var x=b[a],w=u[x]||{hasStack:!1,stackGroups:{}};if(Hs(g)){var j=w.stackGroups[g]||{numericAxisId:a,cateAxisId:s,items:[]};j.items.push(f),w.hasStack=!0,w.stackGroups[g]=j}else w.stackGroups[_x("_stackId_")]={numericAxisId:a,cateAxisId:s,items:[f]};return Za(Za({},u),{},og({},x,w))},c),h={};return Object.keys(d).reduce(function(u,f){var m=d[f];if(m.hasStack){var b={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,y){var x=m.stackGroups[y];return Za(Za({},g),{},og({},y,{numericAxisId:a,cateAxisId:s,items:x.items,stackedData:L2e(t,x.items,i)}))},b)}return Za(Za({},u),{},og({},f,m))},h)},I2e=function(t,r){var a=r.realScaleType,s=r.type,i=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=a||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&s==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var d=t.domain();if(!d.length)return null;var h=Kje(d,i,l);return t.domain([Gj(h),ef(h)]),{niceTicks:h}}if(i&&s==="number"){var u=t.domain(),f=Gje(u,i,l);return{niceTicks:f}}return null};function yw(e){var t=e.axis,r=e.ticks,a=e.bandSize,s=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!rr(s[t.dataKey])){var l=V1(r,"value",s[t.dataKey]);if(l)return l.coordinate+a/2}return r[i]?r[i].coordinate+a/2:null}var c=_o(s,rr(o)?t.dataKey:o);return rr(c)?null:t.scale(c)}var h7=function(t){var r=t.axis,a=t.ticks,s=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return a[l]?a[l].coordinate+s:null;var c=_o(o,r.dataKey,r.domain[l]);return rr(c)?null:r.scale(c)-i/2+s},D2e=function(t){var r=t.numericAxis,a=r.scale.domain();if(r.type==="number"){var s=Math.min(a[0],a[1]),i=Math.max(a[0],a[1]);return s<=0&&i>=0?0:i<0?i:s}return a[0]},F2e=function(t,r){var a,s=(a=t.type)!==null&&a!==void 0&&a.defaultProps?Za(Za({},t.type.defaultProps),t.props):t.props,i=s.stackId;if(Hs(i)){var o=r[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},q2e=function(t){return t.reduce(function(r,a){return[Gj(a.concat([r[0]]).filter(Ot)),ef(a.concat([r[1]]).filter(Ot))]},[1/0,-1/0])},QK=function(t,r,a){return Object.keys(t).reduce(function(s,i){var o=t[i],l=o.stackedData,c=l.reduce(function(d,h){var u=q2e(h.slice(r,a+1));return[Math.min(d[0],u[0]),Math.max(d[1],u[1])]},[1/0,-1/0]);return[Math.min(c[0],s[0]),Math.max(c[1],s[1])]},[1/0,-1/0]).map(function(s){return s===1/0||s===-1/0?0:s})},f7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ik=function(t,r,a){if(qn(t))return t(r,a);if(!Array.isArray(t))return r;var s=[];if(Ot(t[0]))s[0]=a?t[0]:Math.min(t[0],r[0]);else if(f7.test(t[0])){var i=+f7.exec(t[0])[1];s[0]=r[0]-i}else qn(t[0])?s[0]=t[0](r[0]):s[0]=r[0];if(Ot(t[1]))s[1]=a?t[1]:Math.max(t[1],r[1]);else if(m7.test(t[1])){var o=+m7.exec(t[1])[1];s[1]=r[1]+o}else qn(t[1])?s[1]=t[1](r[1]):s[1]=r[1];return s},vw=function(t,r,a){if(t&&t.scale&&t.scale.bandwidth){var s=t.scale.bandwidth();if(!a||s>0)return s}if(t&&r&&r.length>=2){for(var i=pP(r,function(u){return u.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var d=i[l],h=i[l-1];o=Math.min((d.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return a?void 0:0},p7=function(t,r,a){return!t||!t.length||zg(t,yc(a,"type.defaultProps.domain"))?r:t},XK=function(t,r){var a=t.type.defaultProps?Za(Za({},t.type.defaultProps),t.props):t.props,s=a.dataKey,i=a.name,o=a.unit,l=a.formatter,c=a.tooltipType,d=a.chartType,h=a.hide;return Za(Za({},Bn(t,!1)),{},{dataKey:s,unit:o,formatter:l,name:i||s,color:$P(t),value:_o(r,s),type:c,payload:r,chartType:d,hide:h})};function _0(e){"@babel/helpers - typeof";return _0=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},_0(e)}function g7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function x7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g7(Object(r),!0).forEach(function(a){B2e(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function B2e(e,t,r){return t=$2e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $2e(e){var t=U2e(e,"string");return _0(t)=="symbol"?t:t+""}function U2e(e,t){if(_0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(_0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bw=Math.PI/180,z2e=function(t){return t*180/Math.PI},Ti=function(t,r,a,s){return{x:t+Math.cos(-bw*s)*a,y:r+Math.sin(-bw*s)*a}},V2e=function(t,r){var a=t.x,s=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(a-i,2)+Math.pow(s-o,2))},H2e=function(t,r){var a=t.x,s=t.y,i=r.cx,o=r.cy,l=V2e({x:a,y:s},{x:i,y:o});if(l<=0)return{radius:l};var c=(a-i)/l,d=Math.acos(c);return s>o&&(d=2*Math.PI-d),{radius:l,angle:z2e(d),angleInRadian:d}},W2e=function(t){var r=t.startAngle,a=t.endAngle,s=Math.floor(r/360),i=Math.floor(a/360),o=Math.min(s,i);return{startAngle:r-o*360,endAngle:a-o*360}},K2e=function(t,r){var a=r.startAngle,s=r.endAngle,i=Math.floor(a/360),o=Math.floor(s/360),l=Math.min(i,o);return t+l*360},y7=function(t,r){var a=t.x,s=t.y,i=H2e({x:a,y:s},r),o=i.radius,l=i.angle,c=r.innerRadius,d=r.outerRadius;if(o<c||o>d)return!1;if(o===0)return!0;var h=W2e(r),u=h.startAngle,f=h.endAngle,m=l,b;if(u<=f){for(;m>f;)m-=360;for(;m<u;)m+=360;b=m>=u&&m<=f}else{for(;m>u;)m-=360;for(;m<f;)m+=360;b=m>=f&&m<=u}return b?x7(x7({},r),{},{radius:o,angle:K2e(m,r)}):null};function S0(e){"@babel/helpers - typeof";return S0=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},S0(e)}var G2e=["offset"];function Y2e(e){return Z2e(e)||J2e(e)||X2e(e)||Q2e()}function Q2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
881In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X2e(e,t){if(e){if(typeof e=="string")return ok(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ok(e,t)}}function J2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z2e(e){if(Array.isArray(e))return ok(e)}function ok(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function eNe(e,t){if(e==null)return{};var r=tNe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function tNe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function v7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function zs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v7(Object(r),!0).forEach(function(a){nNe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function nNe(e,t,r){return t=rNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rNe(e){var t=aNe(e,"string");return S0(t)=="symbol"?t:t+""}function aNe(e,t){if(S0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(S0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},C0.apply(this,arguments)}var sNe=function(t){var r=t.value,a=t.formatter,s=rr(t.children)?r:t.children;return qn(a)?a(s):s},iNe=function(t,r){var a=ad(r-t),s=Math.min(Math.abs(r-t),360);return a*s},oNe=function(t,r,a){var s=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,d=c.cx,h=c.cy,u=c.innerRadius,f=c.outerRadius,m=c.startAngle,b=c.endAngle,g=c.clockWise,y=(u+f)/2,x=iNe(m,b),w=x>=0?1:-1,j,N;s==="insideStart"?(j=m+w*o,N=g):s==="insideEnd"?(j=b-w*o,N=!g):s==="end"&&(j=b+w*o,N=g),N=x<=0?N:!N;var _=Ti(d,h,y,j),S=Ti(d,h,y,j+(N?1:-1)*359),A="M".concat(_.x,",").concat(_.y,`
882    A`).concat(y,",").concat(y,",0,1,").concat(N?0:1,`,
883    `).concat(S.x,",").concat(S.y),T=rr(t.id)?_x("recharts-radial-line-"):t.id;return we.createElement("text",C0({},a,{dominantBaseline:"central",className:or("recharts-radial-bar-label",l)}),we.createElement("defs",null,we.createElement("path",{id:T,d:A})),we.createElement("textPath",{xlinkHref:"#".concat(T)},r))},lNe=function(t){var r=t.viewBox,a=t.offset,s=t.position,i=r,o=i.cx,l=i.cy,c=i.innerRadius,d=i.outerRadius,h=i.startAngle,u=i.endAngle,f=(h+u)/2;if(s==="outside"){var m=Ti(o,l,d+a,f),b=m.x,g=m.y;return{x:b,y:g,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(s==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(s==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(s==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(c+d)/2,x=Ti(o,l,y,f),w=x.x,j=x.y;return{x:w,y:j,textAnchor:"middle",verticalAnchor:"middle"}},cNe=function(t){var r=t.viewBox,a=t.parentViewBox,s=t.offset,i=t.position,o=r,l=o.x,c=o.y,d=o.width,h=o.height,u=h>=0?1:-1,f=u*s,m=u>0?"end":"start",b=u>0?"start":"end",g=d>=0?1:-1,y=g*s,x=g>0?"end":"start",w=g>0?"start":"end";if(i==="top"){var j={x:l+d/2,y:c-u*s,textAnchor:"middle",verticalAnchor:m};return zs(zs({},j),a?{height:Math.max(c-a.y,0),width:d}:{})}if(i==="bottom"){var N={x:l+d/2,y:c+h+f,textAnchor:"middle",verticalAnchor:b};return zs(zs({},N),a?{height:Math.max(a.y+a.height-(c+h),0),width:d}:{})}if(i==="left"){var _={x:l-y,y:c+h/2,textAnchor:x,verticalAnchor:"middle"};return zs(zs({},_),a?{width:Math.max(_.x-a.x,0),height:h}:{})}if(i==="right"){var S={x:l+d+y,y:c+h/2,textAnchor:w,verticalAnchor:"middle"};return zs(zs({},S),a?{width:Math.max(a.x+a.width-S.x,0),height:h}:{})}var A=a?{width:d,height:h}:{};return i==="insideLeft"?zs({x:l+y,y:c+h/2,textAnchor:w,verticalAnchor:"middle"},A):i==="insideRight"?zs({x:l+d-y,y:c+h/2,textAnchor:x,verticalAnchor:"middle"},A):i==="insideTop"?zs({x:l+d/2,y:c+f,textAnchor:"middle",verticalAnchor:b},A):i==="insideBottom"?zs({x:l+d/2,y:c+h-f,textAnchor:"middle",verticalAnchor:m},A):i==="insideTopLeft"?zs({x:l+y,y:c+f,textAnchor:w,verticalAnchor:b},A):i==="insideTopRight"?zs({x:l+d-y,y:c+f,textAnchor:x,verticalAnchor:b},A):i==="insideBottomLeft"?zs({x:l+y,y:c+h-f,textAnchor:w,verticalAnchor:m},A):i==="insideBottomRight"?zs({x:l+d-y,y:c+h-f,textAnchor:x,verticalAnchor:m},A):jx(i)&&(Ot(i.x)||sm(i.x))&&(Ot(i.y)||sm(i.y))?zs({x:l+Um(i.x,d),y:c+Um(i.y,h),textAnchor:"end",verticalAnchor:"end"},A):zs({x:l+d/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},A)},dNe=function(t){return"cx"in t&&Ot(t.cx)};function Xi(e){var t=e.offset,r=t===void 0?5:t,a=eNe(e,G2e),s=zs({offset:r},a),i=s.viewBox,o=s.position,l=s.value,c=s.children,d=s.content,h=s.className,u=h===void 0?"":h,f=s.textBreakAll;if(!i||rr(l)&&rr(c)&&!L.isValidElement(d)&&!qn(d))return null;if(L.isValidElement(d))return L.cloneElement(d,s);var m;if(qn(d)){if(m=L.createElement(d,s),L.isValidElement(m))return m}else m=sNe(s);var b=dNe(i),g=Bn(s,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return oNe(s,m,g);var y=b?lNe(s):cNe(s);return we.createElement(aw,C0({className:or("recharts-label",u)},g,y,{breakAll:f}),m)}Xi.displayName="Label";var JK=function(t){var r=t.cx,a=t.cy,s=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,d=t.innerRadius,h=t.outerRadius,u=t.x,f=t.y,m=t.top,b=t.left,g=t.width,y=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(Ot(g)&&Ot(y)){if(Ot(u)&&Ot(f))return{x:u,y:f,width:g,height:y};if(Ot(m)&&Ot(b))return{x:m,y:b,width:g,height:y}}return Ot(u)&&Ot(f)?{x:u,y:f,width:0,height:0}:Ot(r)&&Ot(a)?{cx:r,cy:a,startAngle:i||s||0,endAngle:o||s||0,innerRadius:d||0,outerRadius:h||c||l||0,clockWise:x}:t.viewBox?t.viewBox:{}},uNe=function(t,r){return t?t===!0?we.createElement(Xi,{key:"label-implicit",viewBox:r}):Hs(t)?we.createElement(Xi,{key:"label-implicit",viewBox:r,value:t}):L.isValidElement(t)?t.type===Xi?L.cloneElement(t,{key:"label-implicit",viewBox:r}):we.createElement(Xi,{key:"label-implicit",content:t,viewBox:r}):qn(t)?we.createElement(Xi,{key:"label-implicit",content:t,viewBox:r}):jx(t)?we.createElement(Xi,C0({viewBox:r},t,{key:"label-implicit"})):null:null},hNe=function(t,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&a&&!t.label)return null;var s=t.children,i=JK(t),o=vc(s,Xi).map(function(c,d){return L.cloneElement(c,{viewBox:r||i,key:"label-".concat(d)})});if(!a)return o;var l=uNe(t.label,r||i);return[l].concat(Y2e(o))};Xi.parseViewBox=JK;Xi.renderCallByParent=hNe;var m4,b7;function fNe(){if(b7)return m4;b7=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return m4=e,m4}var mNe=fNe();const pNe=Lr(mNe);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)}var gNe=["valueAccessor"],xNe=["data","dataKey","clockWise","id","textBreakAll"];function yNe(e){return jNe(e)||wNe(e)||bNe(e)||vNe()}function vNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
884In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bNe(e,t){if(e){if(typeof e=="string")return lk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lk(e,t)}}function wNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jNe(e){if(Array.isArray(e))return lk(e)}function lk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ww.apply(this,arguments)}function w7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function j7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w7(Object(r),!0).forEach(function(a){NNe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function NNe(e,t,r){return t=_Ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Ne(e){var t=SNe(e,"string");return A0(t)=="symbol"?t:t+""}function SNe(e,t){if(A0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(A0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N7(e,t){if(e==null)return{};var r=CNe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function CNe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}var ANe=function(t){return Array.isArray(t.value)?pNe(t.value):t.value};function Ku(e){var t=e.valueAccessor,r=t===void 0?ANe:t,a=N7(e,gNe),s=a.data,i=a.dataKey,o=a.clockWise,l=a.id,c=a.textBreakAll,d=N7(a,xNe);return!s||!s.length?null:we.createElement(ya,{className:"recharts-label-list"},s.map(function(h,u){var f=rr(i)?r(h,u):_o(h&&h.payload,i),m=rr(l)?{}:{id:"".concat(l,"-").concat(u)};return we.createElement(Xi,ww({},Bn(h,!0),d,m,{parentViewBox:h.parentViewBox,value:f,textBreakAll:c,viewBox:Xi.parseViewBox(rr(o)?h:j7(j7({},h),{},{clockWise:o})),key:"label-".concat(u),index:u}))}))}Ku.displayName="LabelList";function kNe(e,t){return e?e===!0?we.createElement(Ku,{key:"labelList-implicit",data:t}):we.isValidElement(e)||qn(e)?we.createElement(Ku,{key:"labelList-implicit",data:t,content:e}):jx(e)?we.createElement(Ku,ww({data:t},e,{key:"labelList-implicit"})):null:null}function PNe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var a=e.children,s=vc(a,Ku).map(function(o,l){return L.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return s;var i=kNe(e.label,t);return[i].concat(yNe(s))}Ku.renderCallByParent=PNe;function k0(e){"@babel/helpers - typeof";return k0=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},k0(e)}function ck(){return ck=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},ck.apply(this,arguments)}function _7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function S7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_7(Object(r),!0).forEach(function(a){ENe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ENe(e,t,r){return t=TNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TNe(e){var t=ONe(e,"string");return k0(t)=="symbol"?t:t+""}function ONe(e,t){if(k0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(k0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MNe=function(t,r){var a=ad(r-t),s=Math.min(Math.abs(r-t),359.999);return a*s},Lb=function(t){var r=t.cx,a=t.cy,s=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,d=t.cornerIsExternal,h=c*(l?1:-1)+s,u=Math.asin(c/h)/bw,f=d?i:i+o*u,m=Ti(r,a,h,f),b=Ti(r,a,s,f),g=d?i-o*u:i,y=Ti(r,a,h*Math.cos(u*bw),g);return{center:m,circleTangency:b,lineTangency:y,theta:u}},ZK=function(t){var r=t.cx,a=t.cy,s=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=MNe(o,l),d=o+c,h=Ti(r,a,i,o),u=Ti(r,a,i,d),f="M ".concat(h.x,",").concat(h.y,`
885    A `).concat(i,",").concat(i,`,0,
886    `).concat(+(Math.abs(c)>180),",").concat(+(o>d),`,
887    `).concat(u.x,",").concat(u.y,`
888  `);if(s>0){var m=Ti(r,a,s,o),b=Ti(r,a,s,d);f+="L ".concat(b.x,",").concat(b.y,`
889            A `).concat(s,",").concat(s,`,0,
890            `).concat(+(Math.abs(c)>180),",").concat(+(o<=d),`,
891            `).concat(m.x,",").concat(m.y," Z")}else f+="L ".concat(r,",").concat(a," Z");return f},LNe=function(t){var r=t.cx,a=t.cy,s=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,d=t.startAngle,h=t.endAngle,u=ad(h-d),f=Lb({cx:r,cy:a,radius:i,angle:d,sign:u,cornerRadius:o,cornerIsExternal:c}),m=f.circleTangency,b=f.lineTangency,g=f.theta,y=Lb({cx:r,cy:a,radius:i,angle:h,sign:-u,cornerRadius:o,cornerIsExternal:c}),x=y.circleTangency,w=y.lineTangency,j=y.theta,N=c?Math.abs(d-h):Math.abs(d-h)-g-j;if(N<0)return l?"M ".concat(b.x,",").concat(b.y,`
892        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
893        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
894      `):ZK({cx:r,cy:a,innerRadius:s,outerRadius:i,startAngle:d,endAngle:h});var _="M ".concat(b.x,",").concat(b.y,`
895    A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(m.x,",").concat(m.y,`
896    A`).concat(i,",").concat(i,",0,").concat(+(N>180),",").concat(+(u<0),",").concat(x.x,",").concat(x.y,`
897    A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(w.x,",").concat(w.y,`
898  `);if(s>0){var S=Lb({cx:r,cy:a,radius:s,angle:d,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),A=S.circleTangency,T=S.lineTangency,R=S.theta,M=Lb({cx:r,cy:a,radius:s,angle:h,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),k=M.circleTangency,P=M.lineTangency,O=M.theta,F=c?Math.abs(d-h):Math.abs(d-h)-R-O;if(F<0&&o===0)return"".concat(_,"L").concat(r,",").concat(a,"Z");_+="L".concat(P.x,",").concat(P.y,`
899      A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,`
900      A`).concat(s,",").concat(s,",0,").concat(+(F>180),",").concat(+(u>0),",").concat(A.x,",").concat(A.y,`
901      A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(T.x,",").concat(T.y,"Z")}else _+="L".concat(r,",").concat(a,"Z");return _},RNe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},eG=function(t){var r=S7(S7({},RNe),t),a=r.cx,s=r.cy,i=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,d=r.cornerIsExternal,h=r.startAngle,u=r.endAngle,f=r.className;if(o<i||h===u)return null;var m=or("recharts-sector",f),b=o-i,g=Um(l,b,0,!0),y;return g>0&&Math.abs(h-u)<360?y=LNe({cx:a,cy:s,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,b/2),forceCornerRadius:c,cornerIsExternal:d,startAngle:h,endAngle:u}):y=ZK({cx:a,cy:s,innerRadius:i,outerRadius:o,startAngle:h,endAngle:u}),we.createElement("path",ck({},Bn(r,!0),{className:m,d:y,role:"img"}))};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 dk(){return dk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},dk.apply(this,arguments)}function C7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function A7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C7(Object(r),!0).forEach(function(a){INe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function INe(e,t,r){return t=DNe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DNe(e){var t=FNe(e,"string");return P0(t)=="symbol"?t:t+""}function FNe(e,t){if(P0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(P0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k7={curveBasisClosed:sye,curveBasisOpen:iye,curveBasis:aye,curveBumpX:Vxe,curveBumpY:Hxe,curveLinearClosed:oye,curveLinear:Dj,curveMonotoneX:lye,curveMonotoneY:cye,curveNatural:dye,curveStep:uye,curveStepAfter:fye,curveStepBefore:hye},Rb=function(t){return t.x===+t.x&&t.y===+t.y},ly=function(t){return t.x},cy=function(t){return t.y},qNe=function(t,r){if(qn(t))return t;var a="curve".concat(Rj(t));return(a==="curveMonotone"||a==="curveBump")&&r?k7["".concat(a).concat(r==="vertical"?"Y":"X")]:k7[a]||Dj},BNe=function(t){var r=t.type,a=r===void 0?"linear":r,s=t.points,i=s===void 0?[]:s,o=t.baseLine,l=t.layout,c=t.connectNulls,d=c===void 0?!1:c,h=qNe(a,l),u=d?i.filter(function(g){return Rb(g)}):i,f;if(Array.isArray(o)){var m=d?o.filter(function(g){return Rb(g)}):o,b=u.map(function(g,y){return A7(A7({},g),{},{base:m[y]})});return l==="vertical"?f=Cb().y(cy).x1(ly).x0(function(g){return g.base.x}):f=Cb().x(ly).y1(cy).y0(function(g){return g.base.y}),f.defined(Rb).curve(h),f(b)}return l==="vertical"&&Ot(o)?f=Cb().y(cy).x1(ly).x0(o):Ot(o)?f=Cb().x(ly).y1(cy).y0(o):f=aW().x(ly).y(cy),f.defined(Rb).curve(h),f(u)},lg=function(t){var r=t.className,a=t.points,s=t.path,i=t.pathRef;if((!a||!a.length)&&!s)return null;var o=a&&a.length?BNe(t):s;return L.createElement("path",dk({},Bn(t,!1),H1(t),{className:or("recharts-curve",r),d:o,ref:i}))},p4={exports:{}},g4,P7;function $Ne(){if(P7)return g4;P7=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return g4=e,g4}var x4,E7;function UNe(){if(E7)return x4;E7=1;var e=$Ne();function t(){}function r(){}return r.resetWarningCache=t,x4=function(){function a(o,l,c,d,h,u){if(u!==e){var f=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 f.name="Invariant Violation",f}}a.isRequired=a;function s(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:s,element:a,elementType:a,instanceOf:s,node:a,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},x4}var T7;function zNe(){return T7||(T7=1,p4.exports=UNe()()),p4.exports}var VNe=zNe();const $r=Lr(VNe);var HNe=Object.getOwnPropertyNames,WNe=Object.getOwnPropertySymbols,KNe=Object.prototype.hasOwnProperty;function O7(e,t){return function(a,s,i){return e(a,s,i)&&t(a,s,i)}}function Ib(e){return function(r,a,s){if(!r||!a||typeof r!="object"||typeof a!="object")return e(r,a,s);var i=s.cache,o=i.get(r),l=i.get(a);if(o&&l)return o===a&&l===r;i.set(r,a),i.set(a,r);var c=e(r,a,s);return i.delete(r),i.delete(a),c}}function M7(e){return HNe(e).concat(WNe(e))}var GNe=Object.hasOwn||(function(e,t){return KNe.call(e,t)});function ep(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var YNe="__v",QNe="__o",XNe="_owner",L7=Object.getOwnPropertyDescriptor,R7=Object.keys;function JNe(e,t,r){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!r.equals(e[a],t[a],a,a,e,t,r))return!1;return!0}function ZNe(e,t){return ep(e.getTime(),t.getTime())}function e_e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function t_e(e,t){return e===t}function I7(e,t,r){var a=e.size;if(a!==t.size)return!1;if(!a)return!0;for(var s=new Array(a),i=e.entries(),o,l,c=0;(o=i.next())&&!o.done;){for(var d=t.entries(),h=!1,u=0;(l=d.next())&&!l.done;){if(s[u]){u++;continue}var f=o.value,m=l.value;if(r.equals(f[0],m[0],c,u,e,t,r)&&r.equals(f[1],m[1],f[0],m[0],e,t,r)){h=s[u]=!0;break}u++}if(!h)return!1;c++}return!0}var n_e=ep;function r_e(e,t,r){var a=R7(e),s=a.length;if(R7(t).length!==s)return!1;for(;s-- >0;)if(!tG(e,t,r,a[s]))return!1;return!0}function dy(e,t,r){var a=M7(e),s=a.length;if(M7(t).length!==s)return!1;for(var i,o,l;s-- >0;
901)if(i=a[s],!tG(e,t,r,i)||(o=L7(e,i),l=L7(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function a_e(e,t){return ep(e.valueOf(),t.valueOf())}function s_e(e,t){return e.source===t.source&&e.flags===t.flags}function D7(e,t,r){var a=e.size;if(a!==t.size)return!1;if(!a)return!0;for(var s=new Array(a),i=e.values(),o,l;(o=i.next())&&!o.done;){for(var c=t.values(),d=!1,h=0;(l=c.next())&&!l.done;){if(!s[h]&&r.equals(o.value,l.value,o.value,l.value,e,t,r)){d=s[h]=!0;break}h++}if(!d)return!1}return!0}function i_e(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function o_e(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 tG(e,t,r,a){return(a===XNe||a===QNe||a===YNe)&&(e.$$typeof||t.$$typeof)?!0:GNe(t,a)&&r.equals(e[a],t[a],a,a,e,t,r)}var l_e="[object Arguments]",c_e="[object Boolean]",d_e="[object Date]",u_e="[object Error]",h_e="[object Map]",f_e="[object Number]",m_e="[object Object]",p_e="[object RegExp]",g_e="[object Set]",x_e="[object String]",y_e="[object URL]",v_e=Array.isArray,F7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,q7=Object.assign,b_e=Object.prototype.toString.call.bind(Object.prototype.toString);function w_e(e){var t=e.areArraysEqual,r=e.areDatesEqual,a=e.areErrorsEqual,s=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,d=e.areRegExpsEqual,h=e.areSetsEqual,u=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(b,g,y){if(b===g)return!0;if(b==null||g==null)return!1;var x=typeof b;if(x!==typeof g)return!1;if(x!=="object")return x==="number"?o(b,g,y):x==="function"?s(b,g,y):!1;var w=b.constructor;if(w!==g.constructor)return!1;if(w===Object)return l(b,g,y);if(v_e(b))return t(b,g,y);if(F7!=null&&F7(b))return u(b,g,y);if(w===Date)return r(b,g,y);if(w===RegExp)return d(b,g,y);if(w===Map)return i(b,g,y);if(w===Set)return h(b,g,y);var j=b_e(b);return j===d_e?r(b,g,y):j===p_e?d(b,g,y):j===h_e?i(b,g,y):j===g_e?h(b,g,y):j===m_e?typeof b.then!="function"&&typeof g.then!="function"&&l(b,g,y):j===y_e?f(b,g,y):j===u_e?a(b,g,y):j===l_e?l(b,g,y):j===c_e||j===f_e||j===x_e?c(b,g,y):!1}}function j_e(e){var t=e.circular,r=e.createCustomConfig,a=e.strict,s={areArraysEqual:a?dy:JNe,areDatesEqual:ZNe,areErrorsEqual:e_e,areFunctionsEqual:t_e,areMapsEqual:a?O7(I7,dy):I7,areNumbersEqual:n_e,areObjectsEqual:a?dy:r_e,arePrimitiveWrappersEqual:a_e,areRegExpsEqual:s_e,areSetsEqual:a?O7(D7,dy):D7,areTypedArraysEqual:a?dy:i_e,areUrlsEqual:o_e};if(r&&(s=q7({},s,r(s))),t){var i=Ib(s.areArraysEqual),o=Ib(s.areMapsEqual),l=Ib(s.areObjectsEqual),c=Ib(s.areSetsEqual);s=q7({},s,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return s}function N_e(e){return function(t,r,a,s,i,o,l){return e(t,r,l)}}function __e(e){var t=e.circular,r=e.comparator,a=e.createState,s=e.equals,i=e.strict;if(a)return function(c,d){var h=a(),u=h.cache,f=u===void 0?t?new WeakMap:void 0:u,m=h.meta;return r(c,d,{cache:f,equals:s,meta:m,strict:i})};if(t)return function(c,d){return r(c,d,{cache:new WeakMap,equals:s,meta:void 0,strict:i})};var o={cache:void 0,equals:s,meta:void 0,strict:i};return function(c,d){return r(c,d,o)}}var S_e=jf();jf({strict:!0});jf({circular:!0});jf({circular:!0,strict:!0});jf({createInternalComparator:function(){return ep}});jf({strict:!0,createInternalComparator:function(){return ep}});jf({circular:!0,createInternalComparator:function(){return ep}});jf({circular:!0,createInternalComparator:function(){return ep},strict:!0});function jf(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,a=e.createInternalComparator,s=e.createState,i=e.strict,o=i===void 0?!1:i,l=j_e(e),c=w_e(l),d=a?a(c):N_e(c);return __e({circular:r,comparator:c,createState:s,equals:d,strict:o})}function C_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function B7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,a=function s(i){r<0&&(r=i),i-r>t?(e(i),r=-1):C_e(s)};requestAnimationFrame(a)}function uk(e){"@babel/helpers - typeof";return uk=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},uk(e)}function A_e(e){return T_e(e)||E_e(e)||P_e(e)||k_e()}
vendor: 55,113 bytes, lines 901-919
901function k_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
902In 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 $7(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $7(e,t)}}function $7(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function E_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function T_e(e){if(Array.isArray(e))return e}function O_e(){var e={},t=function(){return null},r=!1,a=function s(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,l=A_e(o),c=l[0],d=l.slice(1);if(typeof c=="number"){B7(s.bind(null,d),c);return}s(c),B7(s.bind(null,d));return}uk(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,a(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function E0(e){"@babel/helpers - typeof";return E0=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},E0(e)}function U7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function z7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U7(Object(r),!0).forEach(function(a){nG(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function nG(e,t,r){return t=M_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M_e(e){var t=L_e(e,"string");return E0(t)==="symbol"?t:String(t)}function L_e(e,t){if(E0(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(E0(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var R_e=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(a,s){return a.filter(function(i){return s.includes(i)})})},I_e=function(t){return t},D_e=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},By=function(t,r){return Object.keys(r).reduce(function(a,s){return z7(z7({},a),{},nG({},s,t(s,r[s])))},{})},V7=function(t,r,a){return t.map(function(s){return"".concat(D_e(s)," ").concat(r,"ms ").concat(a)}).join(",")};function F_e(e,t){return $_e(e)||B_e(e,t)||rG(e,t)||q_e()}function q_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
903In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B_e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function $_e(e){if(Array.isArray(e))return e}function U_e(e){return H_e(e)||V_e(e)||rG(e)||z_e()}function z_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
904In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rG(e,t){if(e){if(typeof e=="string")return hk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hk(e,t)}}function V_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function H_e(e){if(Array.isArray(e))return hk(e)}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var jw=1e-4,aG=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},sG=function(t,r){return t.map(function(a,s){return a*Math.pow(r,s)}).reduce(function(a,s){return a+s})},H7=function(t,r){return function(a){var s=aG(t,r);return sG(s,a)}},W_e=function(t,r){return function(a){var s=aG(t,r),i=[].concat(U_e(s.map(function(o,l){return o*l}).slice(1)),[0]);return sG(i,a)}},W7=function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];var s=r[0],i=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":s=0,i=0,o=1,l=1;break;case"ease":s=.25,i=.1,o=.25,l=1;break;case"ease-in":s=.42,i=0,o=1,l=1;break;case"ease-out":s=.42,i=0,o=.58,l=1;break;case"ease-in-out":s=0,i=0,o=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var d=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),h=F_e(d,4);s=h[0],i=h[1],o=h[2],l=h[3]}}}var u=H7(s,o),f=H7(i,l),m=W_e(s,o),b=function(x){return x>1?1:x<0?0:x},g=function(x){for(var w=x>1?1:x,j=w,N=0;N<8;++N){var _=u(j)-w,S=m(j);if(Math.abs(_-w)<jw||S<jw)return f(j);j=b(j-_/S)}return f(j)};return g.isStepper=!1,g},K_e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,a=r===void 0?100:r,s=t.damping,i=s===void 0?8:s,o=t.dt,l=o===void 0?17:o,c=function(h,u,f){var m=-(h-u)*a,b=f*i,g=f+(m-b)*l/1e3,y=f*l/1e3+h;return Math.abs(y-u)<jw&&Math.abs(g)<jw?[u,0]:[y,g]};return c.isStepper=!0,c.dt=l,c},G_e=function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];var s=r[0];if(typeof s=="string")switch(s){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return W7(s);case"spring":return K_e();default:if(s.split("(")[0]==="cubic-bezier")return W7(s)}return typeof s=="function"?s:null};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 K7(e){return X_e(e)||Q_e(e)||iG(e)||Y_e()}function Y_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
905In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function X_e(e){if(Array.isArray(e))return mk(e)}function G7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function _i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?G7(Object(r),!0).forEach(function(a){fk(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function fk(e,t,r){return t=J_e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J_e(e){var t=Z_e(e,"string");return T0(t)==="symbol"?t:String(t)}function Z_e(e,t){if(T0(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(T0(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e5e(e,t){return r5e(e)||n5e(e,t)||iG(e,t)||t5e()}function t5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
906In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iG(e,t){if(e){if(typeof e=="string")return mk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mk(e,t)}}function mk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function n5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function r5e(e){if(Array.isArray(e))return e}var Nw=function(t,r,a){return t+(r-t)*a},pk=function(t){var r=t.from,a=t.to;return r!==a},a5e=function e(t,r,a){var s=By(function(i,o){if(pk(o)){var l=t(o.from,o.to,o.velocity),c=e5e(l,2),d=c[0],h=c[1];return _i(_i({},o),{},{from:d,velocity:h})}return o},r);return a<1?By(function(i,o){return pk(o)?_i(_i({},o),{},{velocity:Nw(o.velocity,s[i].velocity,a),from:Nw(o.from,s[i].from,a)}):o},r):e(t,s,a-1)};const s5e=(function(e,t,r,a,s){var i=R_e(e,t),o=i.reduce(function(y,x){return _i(_i({},y),{},fk({},x,[e[x],t[x]]))},{}),l=i.reduce(function(y,x){return _i(_i({},y),{},fk({},x,{from:e[x],velocity:0,to:t[x]}))},{}),c=-1,d,h,u=function(){return null},f=function(){return By(function(x,w){return w.from},l)},m=function(){return!Object.values(l).filter(pk).length},b=function(x){d||(d=x);var w=x-d,j=w/r.dt;l=a5e(r,l,j),s(_i(_i(_i({},e),t),f())),d=x,m()||(c=requestAnimationFrame(u))},g=function(x){h||(h=x);var w=(x-h)/a,j=By(function(_,S){return Nw.apply(void 0,K7(S).concat([r(w)]))},o);if(s(_i(_i(_i({},e),t),j)),w<1)c=requestAnimationFrame(u);else{var N=By(function(_,S){return Nw.apply(void 0,K7(S).concat([r(1)]))},o);s(_i(_i(_i({},e),t),N))}};return u=r.isStepper?b:g,function(){return requestAnimationFrame(u),function(){cancelAnimationFrame(c)}}});function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hg(e)}var i5e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function o5e(e,t){if(e==null)return{};var r=l5e(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function l5e(e,t){if(e==null)return{};var r={},a=Object.keys(e),s,i;for(i=0;i<a.length;i++)s=a[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function y4(e){return h5e(e)||u5e(e)||d5e(e)||c5e()}function c5e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
907In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d5e(e,t){if(e){if(typeof e=="string")return gk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gk(e,t)}}function u5e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function h5e(e){if(Array.isArray(e))return gk(e)}function gk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Y7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Uc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y7(Object(r),!0).forEach(function(a){ky(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ky(e,t,r){return t=oG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m5e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,oG(a.key),a)}}function p5e(e,t,r){return t&&m5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oG(e){var t=g5e(e,"string");return Hg(t)==="symbol"?t:String(t)}function g5e(e,t){if(Hg(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Hg(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x5e(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&&xk(e,t)}function xk(e,t){return xk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},xk(e,t)}function y5e(e){var t=v5e();return function(){var a=_w(e),s;if(t){var i=_w(this).constructor;s=Reflect.construct(a,arguments,i)}else s=a.apply(this,arguments);return yk(this,s)}}function yk(e,t){if(t&&(Hg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vk(e)}function vk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v5e(){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 _w(e){return _w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_w(e)}var su=(function(e){x5e(r,e);var t=y5e(r);function r(a,s){var i;f5e(this,r),i=t.call(this,a,s);var o=i.props,l=o.isActive,c=o.attributeName,d=o.from,h=o.to,u=o.steps,f=o.children,m=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(vk(i)),i.changeStyle=i.changeStyle.bind(vk(i)),!l||m<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:h}),yk(i);if(u&&u.length)i.state={style:u[0].style};else if(d){if(typeof f=="function")return i.state={style:d},yk(i);i.state={style:c?ky({},c,d):d}}else i.state={style:{}};return i}return p5e(r,[{key:"componentDidMount",value:function(){var s=this.props,i=s.isActive,o=s.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(s){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,d=i.shouldReAnimate,h=i.to,u=i.from,f=this.state.style;if(l){if(!o){var m={style:c?ky({},c,h):h};this.state&&f&&(c&&f[c]!==h||!c&&f!==h)&&this.setState(m);return}if(!(S_e(s.to,h)&&s.canBegin&&s.isActive)){var b=!s.canBegin||!s.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=b||d?u:s.to;if(this.state&&f){var y={style:c?ky({},c,g):g};(c&&f[c]!==g||!c&&f!==g)&&this.setState(y)}this.runAnimation(Uc(Uc({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var s=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),s&&s()}},{key:"handleStyleChange",value:function(s){this.changeStyle(s)}},{key:"changeStyle",value:function(s){this.mounted&&this.setState({style:s})}},{key:"runJSAnimation",value:function(s){var i=this,o=s.from,l=s.to,c=s.duration,d=s.easing,h=s.begin,u=s.onAnimationEnd,f=s.onAnimationStart,m=s5e(o,l,G_e(d),c,this.changeStyle),b=function(){i.stopJSAnimation=m()};this.manager.start([f,h,b,c,u])}},{key:"runStepAnimation",value:function(s){var i=this,o=s.steps,l=s.begin,c=s.onAnimationStart,d=o[0],h=d.style,u=d.duration,f=u===void 0?0:u,m=function(g,y,x){if(x===0)return g;var w=y.duration,j=y.easing,N=j===void 0?"ease":j,_=y.style,S=y.properties,A=y.onAnimationEnd,T=x>0?o[x-1]:y,R=S||Object.keys(_);if(typeof N=="function"||N==="spring")return[].concat(y4(g),[i.runJSAnimation.bind(i,{from:T.style,to:_,duration:w,easing:N}),w]);var M=V7(R,w,N),k=Uc(Uc(Uc({},T.style),_),{},{transition:M});return[].concat(y4(g),[k,w,A]).filter(I_e)};return this.manager.start([c].concat(y4(o.reduce(m,[h,Math.max(f,l)])),[s.onAnimationEnd]))}},{key:"runAnimation",value:function(s){this.manager||(this.manager=O_e());var i=s.begin,o=s.duration,l=s.attributeName,c=s.to,d=s.easing,h=s.onAnimationStart,u=s.onAnimationEnd,f=s.steps,m=s.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof d=="function"||typeof m=="function"||d==="spring"){this.runJSAnimation(s);return}if(f.length>1){this.runStepAnimation(s);return}var g=l?ky({},l,c):c,y=V7(Object.keys(g),o,d);b.start([h,i,Uc(Uc({},g),{},{transition:y}),o,u])}},{key:"render",value:function(){var s=this.props,i=s.children;s.begin;var o=s.duration;s.attributeName,s.easing;var l=s.isActive;s.steps,s.from,s.to,s.canBegin,s.onAnimationEnd,s.shouldReAnimate,s.onAnimationReStart;var c=o5e(s,i5e),d=L.Children.count(i),h=this.state.style;if(typeof i=="function")return i(h);if(!l||d===0||o<=0)return i;var u=function(m){var b=m.props,g=b.style,y=g===void 0?{}:g,x=b.className,w=L.cloneElement(m,Uc(Uc({},c),{},{style:Uc(Uc({},y),h),className:x}));return w};return d===1?u(L.Children.only(i)):we.createElement("div",null,L.Children.map(i,function(f){return u(f)}))}}]),r})(L.PureComponent);su.displayName="Animate";su.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};su.propTypes={from:$r.oneOfType([$r.object,$r.string]),to:$r.oneOfType([$r.object,$r.string]),attributeName:$r.string,duration:$r.number,begin:$r.number,easing:$r.oneOfType([$r.string,$r.func]),steps:$r.arrayOf($r.shape({duration:$r.number.isRequired,style:$r.object.isRequired,easing:$r.oneOfType([$r.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),$r.func]),properties:$r.arrayOf("string"),onAnimationEnd:$r.func})),children:$r.oneOfType([$r.node,$r.func]),isActive:$r.bool,canBegin:$r.bool,onAnimationEnd:$r.func,shouldReAnimate:$r.bool,onAnimationStart:$r.func,onAnimationReStart:$r.func};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)}function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Sw.apply(this,arguments)}function b5e(e,t){return _5e(e)||N5e(e,t)||j5e(e,t)||w5e()}function w5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
908In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j5e(e,t){if(e){if(typeof e=="string")return Q7(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q7(e,t)}}function Q7(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function N5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function _5e(e){if(Array.isArray(e))return e}function X7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function J7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X7(Object(r),!0).forEach(function(a){S5e(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X7(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function S5e(e,t,r){return t=C5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C5e(e){var t=A5e(e,"string");return O0(t)=="symbol"?t:t+""}function A5e(e,t){if(O0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(O0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Z7=function(t,r,a,s,i){var o=Math.min(Math.abs(a)/2,Math.abs(s)/2),l=s>=0?1:-1,c=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0,h;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,m=4;f<m;f++)u[f]=i[f]>o?o:i[f];h="M".concat(t,",").concat(r+l*u[0]),u[0]>0&&(h+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(d,",").concat(t+c*u[0],",").concat(r)),h+="L ".concat(t+a-c*u[1],",").concat(r),u[1]>0&&(h+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(d,`,
909        `).concat(t+a,",").concat(r+l*u[1])),h+="L ".concat(t+a,",").concat(r+s-l*u[2]),u[2]>0&&(h+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(d,`,
910        `).concat(t+a-c*u[2],",").concat(r+s)),h+="L ".concat(t+c*u[3],",").concat(r+s),u[3]>0&&(h+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(d,`,
911        `).concat(t,",").concat(r+s-l*u[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var b=Math.min(o,i);h="M ".concat(t,",").concat(r+l*b,`
912            A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+c*b,",").concat(r,`
913            L `).concat(t+a-c*b,",").concat(r,`
914            A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+a,",").concat(r+l*b,`
915            L `).concat(t+a,",").concat(r+s-l*b,`
916            A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t+a-c*b,",").concat(r+s,`
917            L `).concat(t+c*b,",").concat(r+s,`
918            A `).concat(b,",").concat(b,",0,0,").concat(d,",").concat(t,",").concat(r+s-l*b," Z")}else h="M ".concat(t,",").concat(r," h ").concat(a," v ").concat(s," h ").concat(-a," Z");return h},k5e=function(t,r){if(!t||!r)return!1;var a=t.x,s=t.y,i=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var d=Math.min(i,i+l),h=Math.max(i,i+l),u=Math.min(o,o+c),f=Math.max(o,o+c);return a>=d&&a<=h&&s>=u&&s<=f}return!1},P5e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},UP=function(t){var r=J7(J7({},P5e),t),a=L.useRef(),s=L.useState(-1),i=b5e(s,2),o=i[0],l=i[1];L.useEffect(function(){if(a.current&&a.current.getTotalLength)try{var N=a.current.getTotalLength();N&&l(N)}catch{}},[]);var c=r.x,d=r.y,h=r.width,u=r.height,f=r.radius,m=r.className,b=r.animationEasing,g=r.animationDuration,y=r.animationBegin,x=r.isAnimationActive,w=r.isUpdateAnimationActive;if(c!==+c||d!==+d||h!==+h||u!==+u||h===0||u===0)return null;var j=or("recharts-rectangle",m);return w?we.createElement(su,{canBegin:o>0,from:{width:h,height:u,x:c,y:d},to:{width:h,height:u,x:c,y:d},duration:g,animationEasing:b,isActive:w},function(N){var _=N.width,S=N.height,A=N.x,T=N.y;return we.createElement(su,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:x,easing:b},we.createElement("path",Sw({},Bn(r,!0),{className:j,d:Z7(A,T,_,S,f),ref:a})))}):we.createElement("path",Sw({},Bn(r,!0),{className:j,d:Z7(c,d,h,u,f)}))};function bk(){return bk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},bk.apply(this,arguments)}var Xj=function(t){var r=t.cx,a=t.cy,s=t.r,i=t.className,o=or("recharts-dot",i);return r===+r&&a===+a&&s===+s?L.createElement("circle",bk({},Bn(t,!1),H1(t),{className:o,cx:r,cy:a,r:s})):null};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)}var E5e=["x","y","top","left","width","height","className"];function wk(){return wk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},wk.apply(this,arguments)}function eF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function T5e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eF(Object(r),!0).forEach(function(a){O5e(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function O5e(e,t,r){return t=M5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M5e(e){var t=L5e(e,"string");return M0(t)=="symbol"?t:t+""}function L5e(e,t){if(M0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(M0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R5e(e,t){if(e==null)return{};var r=I5e(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function I5e(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}var D5e=function(t,r,a,s,i,o){return"M".concat(t,",").concat(i,"v").concat(s,"M").concat(o,",").concat(r,"h").concat(a)},F5e=function(t){var r=t.x,a=r===void 0?0:r,s=t.y,i=s===void 0?0:s,o=t.top,l=o===void 0?0:o,c=t.left,d=c===void 0?0:c,h=t.width,u=h===void 0?0:h,f=t.height,m=f===void 0?0:f,b=t.className,g=R5e(t,E5e),y=T5e({x:a,y:i,top:l,left:d,width:u,height:m},g);return!Ot(a)||!Ot(i)||!Ot(u)||!Ot(m)||!Ot(l)||!Ot(d)?null:we.createElement("path",wk({},Bn(y,!0),{className:or("recharts-cross",b),d:D5e(a,i,u,m,l,d)}))},v4,tF;function q5e(){if(tF)return v4;tF=1;var e=AW(),t=e(Object.getPrototypeOf,Object);return v4=t,v4}var b4,nF;function B5e(){if(nF)return b4;nF=1;var e=oh(),t=q5e(),r=lh(),a="[object Object]",s=Function.prototype,i=Object.prototype,o=s.toString,l=i.hasOwnProperty,c=o.call(Object);function d(h){if(!r(h)||e(h)!=a)return!1;var u=t(h);if(u===null)return!0;var f=l.call(u,"constructor")&&u.constructor;return typeof f=="function"&&f instanceof f&&o.call(f)==c}return b4=d,b4}var $5e=B5e();const U5e=Lr($5e);var w4,rF;function z5e(){if(rF)return w4;rF=1;var e=oh(),t=lh(),r="[object Boolean]";function a(s){return s===!0||s===!1||t(s)&&e(s)==r}return w4=a,w4}var V5e=z5e();const H5e=Lr(V5e);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 Cw(){return Cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Cw.apply(this,arguments)}function W5e(e,t){return Q5e(e)||Y5e(e,t)||G5e(e,t)||K5e()}function K5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
919In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G5e(e,t){if(e){if(typeof e=="string")return aF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aF(e,t)}}function aF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function Y5e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function Q5e(e){if(Array.isArray(e))return e}function sF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function iF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sF(Object(r),!0).forEach(function(a){X5e(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function X5e(e,t,r){return t=J5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J5e(e){var t=Z5e(e,"string");return L0(t)=="symbol"?t:t+""}function Z5e(e,t){if(L0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(L0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oF=function(t,r,a,s,i){var o=a-s,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+a,",").concat(r),l+="L ".concat(t+a-o/2,",").concat(r+i),l+="L ".concat(t+a-o/2-s,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},eSe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tSe=function(t){var r=iF(iF({},eSe),t),a=L.useRef(),s=L.useState(-1),i=W5e(s,2),o=i[0],l=i[1];L.useEffect(function(){if(a.current&&a.current.getTotalLength)try{var j=a.current.getTotalLength();j&&l(j)}catch{}},[]);var c=r.x,d=r.y,h=r.upperWidth,u=r.lowerWidth,f=r.height,m=r.className,b=r.animationEasing,g=r.animationDuration,y=r.animationBegin,x=r.isUpdateAnimationActive;if(c!==+c||d!==+d||h!==+h||u!==+u||f!==+f||h===0&&u===0||f===0)return null;var w=or("recharts-trapezoid",m);return x?we.createElement(su,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:f,x:c,y:d},to:{upperWidth:h,lowerWidth:u,height:f,x:c,y:d},duration:g,animationEasing:b,isActive:x},function(j){var N=j.upperWidth,_=j.lowerWidth,S=j.height,A=j.x,T=j.y;return we.createElement(su,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:b},we.createElement("path",Cw({},Bn(r,!0),{className:w,d:oF(A,T,N,_,S),ref:a})))}):we.createElement("g",null,we.createElement("path",Cw({},Bn(r,!0),{className:w,d:oF(c,d,h,u,f)})))},nSe=["option","shapeType","propTransformer","activeClassName","isActive"];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 rSe(e,t){if(e==null)return{};var r=aSe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function aSe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function lF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Aw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lF(Object(r),!0).forEach(function(a){sSe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function sSe(e,t,r){return t=iSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iSe(e){var t=oSe(e,"string");return R0(t)=="symbol"?t:t+""}function oSe(e,t){if(R0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(R0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lSe(e,t){return Aw(Aw({},t),e)}function cSe(e,t){return e==="symbols"}function cF(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return we.createElement(UP,r);case"trapezoid":return we.createElement(tSe,r);case"sector":return we.createElement(eG,r);case"symbols":if(cSe(t))return we.createElement(oP,r);break;default:return null}}function dSe(e){return L.isValidElement(e)?e.props:e}function uSe(e){var t=e.option,r=e.shapeType,a=e.propTransformer,s=a===void 0?lSe:a,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=rSe(e,nSe),d;if(L.isValidElement(t))d=L.cloneElement(t,Aw(Aw({},c),dSe(t)));else if(qn(t))d=t(c);else if(U5e(t)&&!H5e(t)){var h=s(t,c);d=we.createElement(cF,{shapeType:r,elementProps:h})}else{var u=c;d=we.createElement(cF,{shapeType:r,elementProps:u})}return l?we.createElement(ya,{className:o},d):d}function Jj(e,t){return t!=null&&"trapezoids"in e.props}function Zj(e,t){return t!=null&&"sectors"in e.props}function I0(e,t){return t!=null&&"points"in e.props}function hSe(e,t){var r,a,s=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(a=t.labelViewBox)===null||a===void 0?void 0:a.y)||e.y===t.y;return s&&i}function fSe(e,t){var r=e.endAngle===t.endAngle,a=e.startAngle===t.startAngle;return r&&a}function mSe(e,t){var r=e.x===t.x,a=e.y===t.y,s=e.z===t.z;return r&&a&&s}function pSe(e,t){var r;return Jj(e,t)?r=hSe:Zj(e,t)?r=fSe:I0(e,t)&&(r=mSe),r}function gSe(e,t){var r;return Jj(e,t)?r="trapezoids":Zj(e,t)?r="sectors":I0(e,t)&&(r="points"),r}function xSe(e,t){if(Jj(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Zj(e,t)){var a;return(a=t.tooltipPayload)===null||a===void 0||(a=a[0])===null||a===void 0||(a=a.payload)===null||a===void 0?void 0:a.payload}return I0(e,t)?t.payload:{}}function ySe(e){var t=e.activeTooltipItem,r=e.graphicalItem,a=e.itemData,s=gSe(r,t),i=xSe(r,t),o=a.filter(function(c,d){var h=zg(i,c),u=r.props[s].filter(function(b){var g=pSe(r,t);return g(b,t)}),f=r.props[s].indexOf(u[u.length-1]),m=d===f;return h&&m}),l=a.indexOf(o[o.length-1]);return l}var j4,dF;function vSe(){if(dF)return j4;dF=1;var e=Math.ceil,t=Math.max;function r(a,s,i,o){for(var l=-1,c=t(e((s-a)/(i||1)),0),d=Array(c);c--;)d[o?c:++l]=a,a+=i;return d}return j4=r,j4}var N4,uF;function lG(){if(uF)return N4;uF=1;var e=zW(),t=1/0,r=17976931348623157e292;function a(s){if(!s)return s===0?s:0;if(s=e(s),s===t||s===-t){var i=s<0?-1:1;return i*r}return s===s?s:0}return N4=a,N4}var _4,hF;function bSe(){if(hF)return _4;hF=1;var e=vSe(),t=$j(),r=lG();function a(s){return function(i,o,l){return l&&typeof l!="number"&&t(i,o,l)&&(o=l=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),l=l===void 0?i<o?1:-1:r(l),e(i,o,l,s)}}return _4=a,_4}var S4,fF;function wSe(){if(fF)return S4;fF=1;var e=bSe(),t=e();return S4=t,S4}var jSe=wSe();const kw=Lr(jSe);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)}function mF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function pF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mF(Object(r),!0).forEach(function(a){cG(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function cG(e,t,r){return t=NSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NSe(e){var t=_Se(e,"string");return D0(t)=="symbol"?t:t+""}function _Se(e,t){if(D0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(D0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SSe=["Webkit","Moz","O","ms"],CSe=function(t,r){var a=t.replace(/(\w)/,function(i){return i.toUpperCase()}),s=SSe.reduce(function(i,o){return pF(pF({},i),{},cG({},o+a,r))},{});return s[t]=r,s};function Wg(e){"@babel/helpers - typeof";return Wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wg(e)}function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Pw.apply(this,arguments)}function gF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function C4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gF(Object(r),!0).forEach(function(a){_l(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ASe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,uG(a.key),a)}}function kSe(e,t,r){return t&&xF(e.prototype,t),r&&xF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function PSe(e,t,r){return t=Ew(t),ESe(e,dG()?Reflect.construct(t,r||[],Ew(e).constructor):t.apply(e,r))}function ESe(e,t){if(t&&(Wg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TSe(e)}function TSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dG=function(){return!!e})()}function Ew(e){return Ew=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ew(e)}function OSe(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&&jk(e,t)}function jk(e,t){return jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},jk(e,t)}function _l(e,t,r){return t=uG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uG(e){var t=MSe(e,"string");return Wg(t)=="symbol"?t:t+""}function MSe(e,t){if(Wg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Wg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var LSe=function(t){var r=t.data,a=t.startIndex,s=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,d=Fy().domain(kw(0,c)).range([i,i+o-l]),h=d.domain().map(function(u){return d(u)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(a),endX:d(s),scale:d,scaleValues:h}},yF=function(t){return t.changedTouches&&!!t.changedTouches.length},Kg=(function(e){function t(r){var a;return ASe(this,t),a=PSe(this,t,[r]),_l(a,"handleDrag",function(s){a.leaveTimer&&(clearTimeout(a.leaveTimer),a.leaveTimer=null),a.state.isTravellerMoving?a.handleTravellerMove(s):a.state.isSlideMoving&&a.handleSlideDrag(s)}),_l(a,"handleTouchMove",function(s){s.changedTouches!=null&&s.changedTouches.length>0&&a.handleDrag(s.changedTouches[0])}),_l(a,"handleDragEnd",function(){a.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var s=a.props,i=s.endIndex,o=s.onDragEnd,l=s.startIndex;o==null||o({endIndex:i,startIndex:l})}),a.detachDragEndListener()}),_l(a,"handleLeaveWrapper",function(){(a.state.isTravellerMoving||a.state.isSlideMoving)&&(a.leaveTimer=window.setTimeout(a.handleDragEnd,a.props.leaveTimeOut))}),_l(a,"handleEnterSlideOrTraveller",function(){a.setState({isTextActive:!0})}),_l(a,"handleLeaveSlideOrTraveller",function(){a.setState({isTextActive:!1})}),_l(a,"handleSlideDragStart",function(s){var i=yF(s)?s.changedTouches[0]:s;a.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),a.attachDragEndListener()}),a.travellerDragStartHandlers={startX:a.handleTravellerDragStart.bind(a,"startX"),endX:a.handleTravellerDragStart.bind(a,"endX")},a.state={},a}return OSe(t,e),kSe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(a){var s=a.startX,i=a.endX,o=this.state.scaleValues,l=this.props,c=l.gap,d=l.data,h=d.length-1,u=Math.min(s,i),f=Math.max(s,i),m=t.getIndexInRange(o,u),b=t.getIndexInRange(o,f);return{startIndex:m-m%c,endIndex:b===h?h:b-b%c}}},{key:"getTextOfTick",value:function(a){var s=this.props,i=s.data,o=s.tickFormatter,l=s.dataKey,c=_o(i[a],l,a);return qn(o)?o(c,a):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(a){var s=this.state,i=s.slideMoveStartX,o=s.startX,l=s.endX,c=this.props,d=c.x,h=c.width,u=c.travellerWidth,f=c.startIndex,m=c.endIndex,b=c.onChange,g=a.pageX-i;g>0?g=Math.min(g,d+h-u-l,d+h-u-o):g<0&&(g=Math.max(g,d-o,d-l));var y=this.getIndex({startX:o+g,endX:l+g});(y.startIndex!==f||y.endIndex!==m)&&b&&b(y),this.setState({startX:o+g,endX:l+g,slideMoveStartX:a.pageX})}},{key:"handleTravellerDragStart",value:function(a,s){var i=yF(s)?s.changedTouches[0]:s;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:a,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(a){var s=this.state,i=s.brushMoveStartX,o=s.movingTravellerId,l=s.endX,c=s.startX,d=this.state[o],h=this.props,u=h.x,f=h.width,m=h.travellerWidth,b=h.onChange,g=h.gap,y=h.data,x={startX:this.state.startX,endX:this.state.endX},w=a.pageX-i;w>0?w=Math.min(w,u+f-m-d):w<0&&(w=Math.max(w,u-d)),x[o]=d+w;var j=this.getIndex(x),N=j.startIndex,_=j.endIndex,S=function(){var T=y.length-1;return o==="startX"&&(l>c?N%g===0:_%g===0)||l<c&&_===T||o==="endX"&&(l>c?_%g===0:N%g===0)||l>c&&_===T};this.setState(_l(_l({},o,d+w),"brushMoveStartX",a.pageX),function(){b&&S()&&b(j)})}},{key:"handleTravellerMoveKeyboard",value:function(a,s){var i=this,o=this.state,l=o.scaleValues,c=o.startX,d=o.endX,h=this.state[s],u=l.indexOf(h);if(u!==-1){var f=u+a;if(!(f===-1||f>=l.length)){var m=l[f];s==="startX"&&m>=d||s==="endX"&&m<=c||this.setState(_l({},s,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var a=this.props,s=a.x,i=a.y,o=a.width,l=a.height,c=a.fill,d=a.stroke;return we.createElement("rect",{stroke:d,fill:c,x:s,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var a=this.props,s=a.x,i=a.y,o=a.width,l=a.height,c=a.data,d=a.children,h=a.padding,u=L.Children.only(d);return u?we.cloneElement(u,{x:s,y:i,width:o,height:l,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(a,s){var i,o,l=this,c=this.props,d=c.y,h=c.travellerWidth,u=c.height,f=c.traveller,m=c.ariaLabel,b=c.data,g=c.startIndex,y=c.endIndex,x=Math.max(a,this.props.x),w=C4(C4({},Bn(this.props,!1)),{},{x,y:d,width:h,height:u}),j=m||"Min value: ".concat((i=b[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=b[y])===null||o===void 0?void 0:o.name);return we.createElement(ya,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":a,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[s],onTouchStart:this.travellerDragStartHandlers[s],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),l.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,s))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,w))}},{key:"renderSlide",value:function(a,s){var i=this.props,o=i.y,l=i.height,c=i.stroke,d=i.travellerWidth,h=Math.min(a,s)+d,u=Math.max(Math.abs(s-a)-d,0);return we.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:u,height:l})}},{key:"renderText",value:function(){var a=this.props,s=a.startIndex,i=a.endIndex,o=a.y,l=a.height,c=a.travellerWidth,d=a.stroke,h=this.state,u=h.startX,f=h.endX,m=5,b={pointerEvents:"none",fill:d};return we.createElement(ya,{className:"recharts-brush-texts"},we.createElement(aw,Pw({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,f)-m,y:o+l/2},b),this.getTextOfTick(s)),we.createElement(aw,Pw({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,f)+c+m,y:o+l/2},b),this.getTextOfTick(i)))}},{key:"render",value:function(){var a=this.props,s=a.data,i=a.className,o=a.children,l=a.x,c=a.y,d=a.width,h=a.height,u=a.alwaysShowText,f=this.state,m=f.startX,b=f.endX,g=f.isTextActive,y=f.isSlideMoving,x=f.isTravellerMoving,w=f.isTravellerFocused;if(!s||!s.length||!Ot(l)||!Ot(c)||!Ot(d)||!Ot(h)||d<=0||h<=0)return null;var j=or("recharts-brush",i),N=we.Children.count(o)===1,_=CSe("userSelect","none");return we.createElement(ya,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),N&&this.renderPanorama(),this.renderSlide(m,b),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(b,"endX"),(g||y||x||w||u)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(a){var s=a.x,i=a.y,o=a.width,l=a.height,c=a.stroke,d=Math.floor(i+l/2)-1;return we.createElement(we.Fragment,null,we.createElement("rect",{x:s,y:i,width:o,height:l,fill:c,stroke:"none"}),we.createElement("line",{x1:s+1,y1:d,x2:s+o-1,y2:d,fill:"none",stroke:"#fff"}),we.createElement("line",{x1:s+1,y1:d+2,x2:s+o-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(a,s){var i;return we.isValidElement(a)?i=we.cloneElement(a,s):qn(a)?i=a(s):i=t.renderDefaultTraveller(s),i}},{key:"getDerivedStateFromProps",value:function(a,s){var i=a.data,o=a.width,l=a.x,c=a.travellerWidth,d=a.updateId,h=a.startIndex,u=a.endIndex;if(i!==s.prevData||d!==s.prevUpdateId)return C4({prevData:i,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o},i&&i.length?LSe({data:i,width:o,x:l,travellerWidth:c,startIndex:h,endIndex:u}):{scale:null,scaleValues:null});if(s.scale&&(o!==s.prevWidth||l!==s.prevX||c!==s.prevTravellerWidth)){s.scale.range([l,l+o-c]);var f=s.scale.domain().map(function(m){return s.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o,startX:s.scale(a.startIndex),endX:s.scale(a.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(a,s){for(var i=a.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);a[c]>s?l=c:o=c}return s>=a[l]?l:o}}])})(L.PureComponent);_l(Kg,"displayName","Brush");_l(Kg,"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 A4,vF;function RSe(){if(vF)return A4;vF=1;var e=mP();function t(r,a){var s;return e(r,function(i,o,l){return s=a(i,o,l),!s}),!!s}return A4=t,A4}var k4,bF;function ISe(){if(bF)return k4;bF=1;var e=bW(),t=vf(),r=RSe(),a=sl(),s=$j();function i(o,l,c){var d=a(o)?e:r;return c&&s(o,l,c)&&(l=void 0),d(o,t(l,3))}return k4=i,k4}var DSe=ISe();const FSe=Lr(DSe);var Jd=function(t,r){var a=t.alwaysShow,s=t.ifOverflow;return a&&(s="extendDomain"),s===r},P4,wF;function qSe(){if(wF)return P4;wF=1;var e=FW();function t(r,a,s){a=="__proto__"&&e?e(r,a,{configurable:!0,enumerable:!0,value:s,writable:!0}):r[a]=s}return P4=t,P4}var E4,jF;function BSe(){if(jF)return E4;jF=1;var e=qSe(),t=IW(),r=vf();function a(s,i){var o={};return i=r(i,3),t(s,function(l,c,d){e(o,c,i(l,c,d))}),o}return E4=a,E4}var $Se=BSe();const USe=Lr($Se);var T4,NF;function zSe(){if(NF)return T4;NF=1;function e(t,r){for(var a=-1,s=t==null?0:t.length;++a<s;)if(!r(t[a],a,t))return!1;return!0}return T4=e,T4}var O4,_F;function VSe(){if(_F)return O4;_F=1;var e=mP();function t(r,a){var s=!0;return e(r,function(i,o,l){return s=!!a(i,o,l),s}),s}return O4=t,O4}var M4,SF;function HSe(){if(SF)return M4;SF=1;var e=zSe(),t=VSe(),r=vf(),a=sl(),s=$j();function i(o,l,c){var d=a(o)?e:t;return c&&s(o,l,c)&&(l=void 0),d(o,r(l,3))}return M4=i,M4}var WSe=HSe();const hG=Lr(WSe);var KSe=["x","y"];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 Nk(){return Nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Nk.apply(this,arguments)}function CF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function uy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CF(Object(r),!0).forEach(function(a){GSe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function GSe(e,t,r){return t=YSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YSe(e){var t=QSe(e,"string");return F0(t)=="symbol"?t:t+""}function QSe(e,t){if(F0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(F0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XSe(e,t){if(e==null)return{};var r=JSe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function JSe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function ZSe(e,t){var r=e.x,a=e.y,s=XSe(e,KSe),i="".concat(r),o=parseInt(i,10),l="".concat(a),c=parseInt(l,10),d="".concat(t.height||s.height),h=parseInt(d,10),u="".concat(t.width||s.width),f=parseInt(u,10);return uy(uy(uy(uy(uy({},t),s),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:f,name:t.name,radius:t.radius})}function AF(e){return we.createElement(uSe,Nk({shapeType:"rectangle",propTransformer:ZSe,activeClassName:"recharts-active-bar"},e))}var e4e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(a,s){if(typeof t=="number")return t;var i=Ot(a)||hxe(a);return i?t(a,s):(i||Vm(),r)}},t4e=["value","background"],fG;function Gg(e){"@babel/helpers - typeof";return Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gg(e)}function n4e(e,t){if(e==null)return{};var r=r4e(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function r4e(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Tw.apply(this,arguments)}function kF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Ns(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
919t%2?kF(Object(r),!0).forEach(function(a){tf(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function a4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,pG(a.key),a)}}function s4e(e,t,r){return t&&PF(e.prototype,t),r&&PF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i4e(e,t,r){return t=Ow(t),o4e(e,mG()?Reflect.construct(t,r||[],Ow(e).constructor):t.apply(e,r))}function o4e(e,t){if(t&&(Gg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l4e(e)}function l4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mG=function(){return!!e})()}
vendor: 115,841 bytes, lines 919-924
919function Ow(e){return Ow=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ow(e)}function c4e(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&&_k(e,t)}function _k(e,t){return _k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},_k(e,t)}function tf(e,t,r){return t=pG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pG(e){var t=d4e(e,"string");return Gg(t)=="symbol"?t:t+""}function d4e(e,t){if(Gg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Gg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pc=(function(e){function t(){var r;a4e(this,t);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=i4e(this,t,[].concat(s)),tf(r,"state",{isAnimationFinished:!1}),tf(r,"id",_x("recharts-bar-")),tf(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),tf(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return c4e(t,e),s4e(t,[{key:"renderRectanglesStatically",value:function(a){var s=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,d=i.activeBar,h=Bn(this.props,!1);return a&&a.map(function(u,f){var m=f===c,b=m?d:o,g=Ns(Ns(Ns({},h),u),{},{isActive:m,option:b,index:f,dataKey:l,onAnimationStart:s.handleAnimationStart,onAnimationEnd:s.handleAnimationEnd});return we.createElement(ya,Tw({className:"recharts-bar-rectangle"},W1(s.props,u,f),{key:"rectangle-".concat(u==null?void 0:u.x,"-").concat(u==null?void 0:u.y,"-").concat(u==null?void 0:u.value,"-").concat(f)}),we.createElement(AF,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var a=this,s=this.props,i=s.data,o=s.layout,l=s.isAnimationActive,c=s.animationBegin,d=s.animationDuration,h=s.animationEasing,u=s.animationId,f=this.state.prevData;return we.createElement(su,{begin:c,duration:d,isActive:l,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var b=m.t,g=i.map(function(y,x){var w=f&&f[x];if(w){var j=Ai(w.x,y.x),N=Ai(w.y,y.y),_=Ai(w.width,y.width),S=Ai(w.height,y.height);return Ns(Ns({},y),{},{x:j(b),y:N(b),width:_(b),height:S(b)})}if(o==="horizontal"){var A=Ai(0,y.height),T=A(b);return Ns(Ns({},y),{},{y:y.y+y.height-T,height:T})}var R=Ai(0,y.width),M=R(b);return Ns(Ns({},y),{},{width:M})});return we.createElement(ya,null,a.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var a=this.props,s=a.data,i=a.isAnimationActive,o=this.state.prevData;return i&&s&&s.length&&(!o||!zg(o,s))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(s)}},{key:"renderBackground",value:function(){var a=this,s=this.props,i=s.data,o=s.dataKey,l=s.activeIndex,c=Bn(this.props.background,!1);return i.map(function(d,h){d.value;var u=d.background,f=n4e(d,t4e);if(!u)return null;var m=Ns(Ns(Ns(Ns(Ns({},f),{},{fill:"#eee"},u),c),W1(a.props,d,h)),{},{onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd,dataKey:o,index:h,className:"recharts-bar-background-rectangle"});return we.createElement(AF,Tw({key:"background-bar-".concat(h),option:a.props.background,isActive:h===l},m))})}},{key:"renderErrorBar",value:function(a,s){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,d=i.layout,h=i.children,u=vc(h,yv);if(!u)return null;var f=d==="vertical"?o[0].height/2:o[0].width/2,m=function(y,x){var w=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:w,errorVal:_o(y,x)}},b={clipPath:a?"url(#clipPath-".concat(s,")"):null};return we.createElement(ya,b,u.map(function(g){return we.cloneElement(g,{key:"error-bar-".concat(s,"-").concat(g.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,offset:f,dataPointFormatter:m})}))}},{key:"render",value:function(){var a=this.props,s=a.hide,i=a.data,o=a.className,l=a.xAxis,c=a.yAxis,d=a.left,h=a.top,u=a.width,f=a.height,m=a.isAnimationActive,b=a.background,g=a.id;if(s||!i||!i.length)return null;var y=this.state.isAnimationFinished,x=or("recharts-bar",o),w=l&&l.allowDataOverflow,j=c&&c.allowDataOverflow,N=w||j,_=rr(g)?this.id:g;return we.createElement(ya,{className:x},w||j?we.createElement("defs",null,we.createElement("clipPath",{id:"clipPath-".concat(_)},we.createElement("rect",{x:w?d:d-u/2,y:j?h:h-f/2,width:w?u:u*2,height:j?f:f*2}))):null,we.createElement(ya,{className:"recharts-bar-rectangles",clipPath:N?"url(#clipPath-".concat(_,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(N,_),(!m||y)&&Ku.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(a,s){return a.animationId!==s.prevAnimationId?{prevAnimationId:a.animationId,curData:a.data,prevData:s.curData}:a.data!==s.curData?{curData:a.data}:null}}])})(L.PureComponent);fG=pc;tf(pc,"displayName","Bar");tf(pc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Xm.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});tf(pc,"getComposedData",function(e){var t=e.props,r=e.item,a=e.barPosition,s=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,d=e.stackedData,h=e.dataStartIndex,u=e.displayedData,f=e.offset,m=P2e(a,r);if(!m)return null;var b=t.layout,g=r.type.defaultProps,y=g!==void 0?Ns(Ns({},g),r.props):r.props,x=y.dataKey,w=y.children,j=y.minPointSize,N=b==="horizontal"?o:i,_=d?N.scale.domain():null,S=D2e({numericAxis:N}),A=vc(w,nw),T=u.map(function(R,M){var k,P,O,F,$,G;d?k=E2e(d[h+M],_):(k=_o(R,x),Array.isArray(k)||(k=[S,k]));var B=e4e(j,fG.defaultProps.minPointSize)(k[1],M);if(b==="horizontal"){var Y,ee=[o.scale(k[0]),o.scale(k[1])],J=ee[0],H=ee[1];P=h7({axis:i,ticks:l,bandSize:s,offset:m.offset,entry:R,index:M}),O=(Y=H??J)!==null&&Y!==void 0?Y:void 0,F=m.size;var q=J-H;if($=Number.isNaN(q)?0:q,G={x:P,y:o.y,width:F,height:o.height},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var K=ad($||B)*(Math.abs(B)-Math.abs($));O-=K,$+=K}}else{var te=[i.scale(k[0]),i.scale(k[1])],re=te[0],Q=te[1];if(P=re,O=h7({axis:o,ticks:c,bandSize:s,offset:m.offset,entry:R,index:M}),F=Q-re,$=m.size,G={x:i.x,y:O,width:i.width,height:$},Math.abs(B)>0&&Math.abs(F)<Math.abs(B)){var ne=ad(F||B)*(Math.abs(B)-Math.abs(F));F+=ne}}return Ns(Ns(Ns({},R),{},{x:P,y:O,width:F,height:$,value:d?k:k[1],payload:R,background:G},A&&A[M]&&A[M].props),{},{tooltipPayload:[XK(r,R)],tooltipPosition:{x:P+F/2,y:O+$/2}})});return Ns({data:T,layout:b},f)});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 u4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,gG(a.key),a)}}function h4e(e,t,r){return t&&EF(e.prototype,t),r&&EF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function TF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Jc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TF(Object(r),!0).forEach(function(a){e2(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function e2(e,t,r){return t=gG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gG(e){var t=f4e(e,"string");return q0(t)=="symbol"?t:t+""}function f4e(e,t){if(q0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(q0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zP=function(t,r,a,s,i){var o=t.width,l=t.height,c=t.layout,d=t.children,h=Object.keys(r),u={left:a.left,leftMirror:a.left,right:o-a.right,rightMirror:o-a.right,top:a.top,topMirror:a.top,bottom:l-a.bottom,bottomMirror:l-a.bottom},f=!!Sl(d,pc);return h.reduce(function(m,b){var g=r[b],y=g.orientation,x=g.domain,w=g.padding,j=w===void 0?{}:w,N=g.mirror,_=g.reversed,S="".concat(y).concat(N?"Mirror":""),A,T,R,M,k;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var P=x[1]-x[0],O=1/0,F=g.categoricalDomain.sort(pxe);if(F.forEach(function(te,re){re>0&&(O=Math.min((te||0)-(F[re-1]||0),O))}),Number.isFinite(O)){var $=O/P,G=g.layout==="vertical"?a.height:a.width;if(g.padding==="gap"&&(A=$*G/2),g.padding==="no-gap"){var B=Um(t.barCategoryGap,$*G),Y=$*G/2;A=Y-B-(Y-B)/G*B}}}s==="xAxis"?T=[a.left+(j.left||0)+(A||0),a.left+a.width-(j.right||0)-(A||0)]:s==="yAxis"?T=c==="horizontal"?[a.top+a.height-(j.bottom||0),a.top+(j.top||0)]:[a.top+(j.top||0)+(A||0),a.top+a.height-(j.bottom||0)-(A||0)]:T=g.range,_&&(T=[T[1],T[0]]);var ee=A2e(g,i,f),J=ee.scale,H=ee.realScaleType;J.domain(x).range(T),k2e(J);var q=I2e(J,Jc(Jc({},g),{},{realScaleType:H}));s==="xAxis"?(k=y==="top"&&!N||y==="bottom"&&N,R=a.left,M=u[S]-k*g.height):s==="yAxis"&&(k=y==="left"&&!N||y==="right"&&N,R=u[S]-k*g.width,M=a.top);var K=Jc(Jc(Jc({},g),q),{},{realScaleType:H,x:R,y:M,scale:J,width:s==="xAxis"?a.width:g.width,height:s==="yAxis"?a.height:g.height});return K.bandSize=vw(K,q),!g.hide&&s==="xAxis"?u[S]+=(k?-1:1)*K.height:g.hide||(u[S]+=(k?-1:1)*K.width),Jc(Jc({},m),{},e2({},b,K))},{})},xG=function(t,r){var a=t.x,s=t.y,i=r.x,o=r.y;return{x:Math.min(a,i),y:Math.min(s,o),width:Math.abs(i-a),height:Math.abs(o-s)}},m4e=function(t){var r=t.x1,a=t.y1,s=t.x2,i=t.y2;return xG({x:r,y:a},{x:s,y:i})},yG=(function(){function e(t){u4e(this,e),this.scale=t}return h4e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,i=a.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(s){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var a=this.range(),s=a[0],i=a[a.length-1];return s<=i?r>=s&&r<=i:r>=i&&r<=s}}],[{key:"create",value:function(r){return new e(r)}}])})();e2(yG,"EPS",1e-4);var VP=function(t){var r=Object.keys(t).reduce(function(a,s){return Jc(Jc({},a),{},e2({},s,yG.create(t[s])))},{});return Jc(Jc({},r),{},{apply:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return USe(s,function(c,d){return r[d].apply(c,{bandAware:o,position:l})})},isInRange:function(s){return hG(s,function(i,o){return r[o].isInRange(i)})}})};function p4e(e){return(e%180+180)%180}var g4e=function(t){var r=t.width,a=t.height,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=p4e(s),o=i*Math.PI/180,l=Math.atan(a/r),c=o>l&&o<Math.PI-l?a/Math.sin(o):r/Math.cos(o);return Math.abs(c)},L4,OF;function x4e(){if(OF)return L4;OF=1;var e=vf(),t=fv(),r=qj();function a(s){return function(i,o,l){var c=Object(i);if(!t(i)){var d=e(o,3);i=r(i),o=function(u){return d(c[u],u,c)}}var h=s(i,o,l);return h>-1?c[d?i[h]:h]:void 0}}return L4=a,L4}var R4,MF;function y4e(){if(MF)return R4;MF=1;var e=lG();function t(r){var a=e(r),s=a%1;return a===a?s?a-s:a:0}return R4=t,R4}var I4,LF;function v4e(){if(LF)return I4;LF=1;var e=TW(),t=vf(),r=y4e(),a=Math.max;function s(i,o,l){var c=i==null?0:i.length;if(!c)return-1;var d=l==null?0:r(l);return d<0&&(d=a(c+d,0)),e(i,t(o,3),d)}return I4=s,I4}var D4,RF;function b4e(){if(RF)return D4;RF=1;var e=x4e(),t=v4e(),r=e(t);return D4=r,D4}var w4e=b4e();const j4e=Lr(w4e);var N4e=WH();const _4e=Lr(N4e);var S4e=_4e(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("")}),HP=L.createContext(void 0),WP=L.createContext(void 0),vG=L.createContext(void 0),bG=L.createContext({}),wG=L.createContext(void 0),jG=L.createContext(0),NG=L.createContext(0),IF=function(t){var r=t.state,a=r.xAxisMap,s=r.yAxisMap,i=r.offset,o=t.clipPathId,l=t.children,c=t.width,d=t.height,h=S4e(i);return we.createElement(HP.Provider,{value:a},we.createElement(WP.Provider,{value:s},we.createElement(bG.Provider,{value:i},we.createElement(vG.Provider,{value:h},we.createElement(wG.Provider,{value:o},we.createElement(jG.Provider,{value:d},we.createElement(NG.Provider,{value:c},l)))))))},C4e=function(){return L.useContext(wG)},_G=function(t){var r=L.useContext(HP);r==null&&Vm();var a=r[t];return a==null&&Vm(),a},A4e=function(){var t=L.useContext(HP);return Uh(t)},k4e=function(){var t=L.useContext(WP),r=j4e(t,function(a){return hG(a.domain,Number.isFinite)});return r||Uh(t)},SG=function(t){var r=L.useContext(WP);r==null&&Vm();var a=r[t];return a==null&&Vm(),a},P4e=function(){var t=L.useContext(vG);return t},E4e=function(){return L.useContext(bG)},KP=function(){return L.useContext(NG)},GP=function(){return L.useContext(jG)};function Yg(e){"@babel/helpers - typeof";return Yg=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},Yg(e)}function T4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O4e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,AG(a.key),a)}}function M4e(e,t,r){return t&&O4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function L4e(e,t,r){return t=Mw(t),R4e(e,CG()?Reflect.construct(t,r||[],Mw(e).constructor):t.apply(e,r))}function R4e(e,t){if(t&&(Yg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return I4e(e)}function I4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CG=function(){return!!e})()}function Mw(e){return Mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mw(e)}function D4e(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&&Sk(e,t)}function Sk(e,t){return Sk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Sk(e,t)}function DF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function FF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DF(Object(r),!0).forEach(function(a){YP(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function YP(e,t,r){return t=AG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AG(e){var t=F4e(e,"string");return Yg(t)=="symbol"?t:t+""}function F4e(e,t){if(Yg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Yg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function q4e(e,t){return z4e(e)||U4e(e,t)||$4e(e,t)||B4e()}function B4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
920In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $4e(e,t){if(e){if(typeof e=="string")return qF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qF(e,t)}}function qF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function U4e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function z4e(e){if(Array.isArray(e))return e}function Ck(){return Ck=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Ck.apply(this,arguments)}var V4e=function(t,r){var a;return we.isValidElement(t)?a=we.cloneElement(t,r):qn(t)?a=t(r):a=we.createElement("line",Ck({},r,{className:"recharts-reference-line-line"})),a},H4e=function(t,r,a,s,i,o,l,c,d){var h=i.x,u=i.y,f=i.width,m=i.height;if(a){var b=d.y,g=t.y.apply(b,{position:o});if(Jd(d,"discard")&&!t.y.isInRange(g))return null;var y=[{x:h+f,y:g},{x:h,y:g}];return c==="left"?y.reverse():y}if(r){var x=d.x,w=t.x.apply(x,{position:o});if(Jd(d,"discard")&&!t.x.isInRange(w))return null;var j=[{x:w,y:u+m},{x:w,y:u}];return l==="top"?j.reverse():j}if(s){var N=d.segment,_=N.map(function(S){return t.apply(S,{position:o})});return Jd(d,"discard")&&FSe(_,function(S){return!t.isInRange(S)})?null:_}return null};function W4e(e){var t=e.x,r=e.y,a=e.segment,s=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,d=C4e(),h=_G(s),u=SG(i),f=P4e();if(!d||!f)return null;Vu(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=VP({x:h.scale,y:u.scale}),b=Hs(t),g=Hs(r),y=a&&a.length===2,x=H4e(m,b,g,y,f,e.position,h.orientation,u.orientation,e);if(!x)return null;var w=q4e(x,2),j=w[0],N=j.x,_=j.y,S=w[1],A=S.x,T=S.y,R=Jd(e,"hidden")?"url(#".concat(d,")"):void 0,M=FF(FF({clipPath:R},Bn(e,!0)),{},{x1:N,y1:_,x2:A,y2:T});return we.createElement(ya,{className:or("recharts-reference-line",l)},V4e(o,M),Xi.renderCallByParent(e,m4e({x1:N,y1:_,x2:A,y2:T})))}var QP=(function(e){function t(){return T4e(this,t),L4e(this,t,arguments)}return D4e(t,e),M4e(t,[{key:"render",value:function(){return we.createElement(W4e,this.props)}}])})(we.Component);YP(QP,"displayName","ReferenceLine");YP(QP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Ak.apply(this,arguments)}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 BF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function $F(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BF(Object(r),!0).forEach(function(a){t2(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function K4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G4e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,PG(a.key),a)}}function Y4e(e,t,r){return t&&G4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q4e(e,t,r){return t=Lw(t),X4e(e,kG()?Reflect.construct(t,r||[],Lw(e).constructor):t.apply(e,r))}function X4e(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 J4e(e)}function J4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kG=function(){return!!e})()}function Lw(e){return Lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lw(e)}function Z4e(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&&kk(e,t)}function kk(e,t){return kk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},kk(e,t)}function t2(e,t,r){return t=PG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PG(e){var t=eCe(e,"string");return Qg(t)=="symbol"?t:t+""}function eCe(e,t){if(Qg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Qg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tCe=function(t){var r=t.x,a=t.y,s=t.xAxis,i=t.yAxis,o=VP({x:s.scale,y:i.scale}),l=o.apply({x:r,y:a},{bandAware:!0});return Jd(t,"discard")&&!o.isInRange(l)?null:l},n2=(function(e){function t(){return K4e(this,t),Q4e(this,t,arguments)}return Z4e(t,e),Y4e(t,[{key:"render",value:function(){var a=this.props,s=a.x,i=a.y,o=a.r,l=a.alwaysShow,c=a.clipPathId,d=Hs(s),h=Hs(i);if(Vu(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!h)return null;var u=tCe(this.props);if(!u)return null;var f=u.x,m=u.y,b=this.props,g=b.shape,y=b.className,x=Jd(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=$F($F({clipPath:x},Bn(this.props,!0)),{},{cx:f,cy:m});return we.createElement(ya,{className:or("recharts-reference-dot",y)},t.renderDot(g,w),Xi.renderCallByParent(this.props,{x:f-o,y:m-o,width:2*o,height:2*o}))}}])})(we.Component);t2(n2,"displayName","ReferenceDot");t2(n2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});t2(n2,"renderDot",function(e,t){var r;return we.isValidElement(e)?r=we.cloneElement(e,t):qn(e)?r=e(t):r=we.createElement(Xj,Ak({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Pk(){return Pk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Pk.apply(this,arguments)}function Xg(e){"@babel/helpers - typeof";return Xg=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},Xg(e)}function UF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function zF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UF(Object(r),!0).forEach(function(a){r2(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function nCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rCe(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,TG(a.key),a)}}function aCe(e,t,r){return t&&rCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sCe(e,t,r){return t=Rw(t),iCe(e,EG()?Reflect.construct(t,r||[],Rw(e).constructor):t.apply(e,r))}function iCe(e,t){if(t&&(Xg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oCe(e)}function oCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EG=function(){return!!e})()}function Rw(e){return Rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rw(e)}function lCe(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&&Ek(e,t)}function Ek(e,t){return Ek=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Ek(e,t)}function r2(e,t,r){return t=TG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TG(e){var t=cCe(e,"string");return Xg(t)=="symbol"?t:t+""}function cCe(e,t){if(Xg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Xg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dCe=function(t,r,a,s,i){var o=i.x1,l=i.x2,c=i.y1,d=i.y2,h=i.xAxis,u=i.yAxis;if(!h||!u)return null;var f=VP({x:h.scale,y:u.scale}),m={x:t?f.x.apply(o,{position:"start"}):f.x.rangeMin,y:a?f.y.apply(c,{position:"start"}):f.y.rangeMin},b={x:r?f.x.apply(l,{position:"end"}):f.x.rangeMax,y:s?f.y.apply(d,{position:"end"}):f.y.rangeMax};return Jd(i,"discard")&&(!f.isInRange(m)||!f.isInRange(b))?null:xG(m,b)},a2=(function(e){function t(){return nCe(this,t),sCe(this,t,arguments)}return lCe(t,e),aCe(t,[{key:"render",value:function(){var a=this.props,s=a.x1,i=a.x2,o=a.y1,l=a.y2,c=a.className,d=a.alwaysShow,h=a.clipPathId;Vu(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=Hs(s),f=Hs(i),m=Hs(o),b=Hs(l),g=this.props.shape;if(!u&&!f&&!m&&!b&&!g)return null;var y=dCe(u,f,m,b,this.props);if(!y&&!g)return null;var x=Jd(this.props,"hidden")?"url(#".concat(h,")"):void 0;return we.createElement(ya,{className:or("recharts-reference-area",c)},t.renderRect(g,zF(zF({clipPath:x},Bn(this.props,!0)),y)),Xi.renderCallByParent(this.props,y))}}])})(we.Component);r2(a2,"displayName","ReferenceArea");r2(a2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});r2(a2,"renderRect",function(e,t){var r;return we.isValidElement(e)?r=we.cloneElement(e,t):qn(e)?r=e(t):r=we.createElement(UP,Pk({},t,{className:"recharts-reference-area-rect"})),r});function OG(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var a=[],s=0;s<e.length;s+=t)a.push(e[s]);return a}function uCe(e,t,r){var a={width:e.width+t.width,height:e.height+t.height};return g4e(a,r)}function hCe(e,t,r){var a=r==="width",s=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:a?s:i,end:a?s+o:i+l}:{start:a?s+o:i+l,end:a?s:i}}function Iw(e,t,r,a,s){if(e*t<e*a||e*t>e*s)return!1;var i=r();return e*(t-e*i/2-a)>=0&&e*(t+e*i/2-s)<=0}function fCe(e,t){return OG(e,t+1)}function mCe(e,t,r,a,s){for(var i=(a||[]).slice(),o=t.start,l=t.end,c=0,d=1,h=o,u=function(){var b=a==null?void 0:a[c];if(b===void 0)return{v:OG(a,d)};var g=c,y,x=function(){return y===void 0&&(y=r(b,g)),y},w=b.coordinate,j=c===0||Iw(e,w,x,h,l);j||(c=0,h=o,d+=1),j&&(h=w+e*(x()/2+s),c+=d)},f;d<=i.length;)if(f=u(),f)return f.v;return[]}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 VF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Qi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VF(Object(r),!0).forEach(function(a){pCe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function pCe(e,t,r){return t=gCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gCe(e){var t=xCe(e,"string");return B0(t)=="symbol"?t:t+""}function xCe(e,t){if(B0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(B0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yCe(e,t,r,a,s){for(var i=(a||[]).slice(),o=i.length,l=t.start,c=t.end,d=function(f){var m=i[f],b,g=function(){return b===void 0&&(b=r(m,f)),b};if(f===o-1){var y=e*(m.coordinate+e*g()/2-c);i[f]=m=Qi(Qi({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else i[f]=m=Qi(Qi({},m),{},{tickCoord:m.coordinate});var x=Iw(e,m.tickCoord,g,l,c);x&&(c=m.tickCoord-e*(g()/2+s),i[f]=Qi(Qi({},m),{},{isShow:!0}))},h=o-1;h>=0;h--)d(h);return i}function vCe(e,t,r,a,s,i){var o=(a||[]).slice(),l=o.length,c=t.start,d=t.end;if(i){var h=a[l-1],u=r(h,l-1),f=e*(h.coordinate+e*u/2-d);o[l-1]=h=Qi(Qi({},h),{},{tickCoord:f>0?h.coordinate-f*e:h.coordinate});var m=Iw(e,h.tickCoord,function(){return u},c,d);m&&(d=h.tickCoord-e*(u/2+s),o[l-1]=Qi(Qi({},h),{},{isShow:!0}))}for(var b=i?l-1:l,g=function(w){var j=o[w],N,_=function(){return N===void 0&&(N=r(j,w)),N};if(w===0){var S=e*(j.coordinate-e*_()/2-c);o[w]=j=Qi(Qi({},j),{},{tickCoord:S<0?j.coordinate-S*e:j.coordinate})}else o[w]=j=Qi(Qi({},j),{},{tickCoord:j.coordinate});var A=Iw(e,j.tickCoord,_,c,d);A&&(c=j.tickCoord+e*(_()/2+s),o[w]=Qi(Qi({},j),{},{isShow:!0}))},y=0;y<b;y++)g(y);return o}function XP(e,t,r){var a=e.tick,s=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,d=e.tickFormatter,h=e.unit,u=e.angle;if(!s||!s.length||!a)return[];if(Ot(c)||Xm.isSsr)return fCe(s,typeof c=="number"&&Ot(c)?c:0);var f=[],m=l==="top"||l==="bottom"?"width":"height",b=h&&m==="width"?Dy(h,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(j,N){var _=qn(d)?d(j.value,N):j.value;return m==="width"?uCe(Dy(_,{fontSize:t,letterSpacing:r}),b,u):Dy(_,{fontSize:t,letterSpacing:r})[m]},y=s.length>=2?ad(s[1].coordinate-s[0].coordinate):1,x=hCe(i,y,m);return c==="equidistantPreserveStart"?mCe(y,x,g,s,o):(c==="preserveStart"||c==="preserveStartEnd"?f=vCe(y,x,g,s,o,c==="preserveStartEnd"):f=yCe(y,x,g,s,o),f.filter(function(w){return w.isShow}))}var bCe=["viewBox"],wCe=["viewBox"],jCe=["ticks"];function Jg(e){"@babel/helpers - typeof";return Jg=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},Jg(e)}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Zp.apply(this,arguments)}function HF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Us(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HF(Object(r),!0).forEach(function(a){JP(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function F4(e,t){if(e==null)return{};var r=NCe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function NCe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function _Ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,LG(a.key),a)}}function SCe(e,t,r){return t&&WF(e.prototype,t),r&&WF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CCe(e,t,r){return t=Dw(t),ACe(e,MG()?Reflect.construct(t,r||[],Dw(e).constructor):t.apply(e,r))}function ACe(e,t){if(t&&(Jg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kCe(e)}function kCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MG=function(){return!!e})()}function Dw(e){return Dw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dw(e)}function PCe(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&&Tk(e,t)}function Tk(e,t){return Tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Tk(e,t)}function JP(e,t,r){return t=LG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LG(e){var t=ECe(e,"string");return Jg(t)=="symbol"?t:t+""}function ECe(e,t){if(Jg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Jg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Px=(function(e){function t(r){var a;return _Ce(this,t),a=CCe(this,t,[r]),a.state={fontSize:"",letterSpacing:""},a}return PCe(t,e),SCe(t,[{key:"shouldComponentUpdate",value:function(a,s){var i=a.viewBox,o=F4(a,bCe),l=this.props,c=l.viewBox,d=F4(l,wCe);return!sg(i,c)||!sg(o,d)||!sg(s,this.state)}},{key:"componentDidMount",value:function(){var a=this.layerReference;if(a){var s=a.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];s&&this.setState({fontSize:window.getComputedStyle(s).fontSize,letterSpacing:window.getComputedStyle(s).letterSpacing})}}},{key:"getTickLineCoord",value:function(a){var s=this.props,i=s.x,o=s.y,l=s.width,c=s.height,d=s.orientation,h=s.tickSize,u=s.mirror,f=s.tickMargin,m,b,g,y,x,w,j=u?-1:1,N=a.tickSize||h,_=Ot(a.tickCoord)?a.tickCoord:a.coordinate;switch(d){case"top":m=b=a.coordinate,y=o+ +!u*c,g=y-j*N,w=g-j*f,x=_;break;case"left":g=y=a.coordinate,b=i+ +!u*l,m=b-j*N,x=m-j*f,w=_;break;case"right":g=y=a.coordinate,b=i+ +u*l,m=b+j*N,x=m+j*f,w=_;break;default:m=b=a.coordinate,y=o+ +u*c,g=y+j*N,w=g+j*f,x=_;break}return{line:{x1:m,y1:g,x2:b,y2:y},tick:{x,y:w}}}},{key:"getTickTextAnchor",value:function(){var a=this.props,s=a.orientation,i=a.mirror,o;switch(s){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var a=this.props,s=a.orientation,i=a.mirror,o="end";switch(s){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var a=this.props,s=a.x,i=a.y,o=a.width,l=a.height,c=a.orientation,d=a.mirror,h=a.axisLine,u=Us(Us(Us({},Bn(this.props,!1)),Bn(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var f=+(c==="top"&&!d||c==="bottom"&&d);u=Us(Us({},u),{},{x1:s,y1:i+f*l,x2:s+o,y2:i+f*l})}else{var m=+(c==="left"&&!d||c==="right"&&d);u=Us(Us({},u),{},{x1:s+m*o,y1:i,x2:s+m*o,y2:i+l})}return we.createElement("line",Zp({},u,{className:or("recharts-cartesian-axis-line",yc(h,"className"))}))}},{key:"renderTicks",value:function(a,s,i){var o=this,l=this.props,c=l.tickLine,d=l.stroke,h=l.tick,u=l.tickFormatter,f=l.unit,m=XP(Us(Us({},this.props),{},{ticks:a}),s,i),b=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),y=Bn(this.props,!1),x=Bn(h,!1),w=Us(Us({},y),{},{fill:"none"},Bn(c,!1)),j=m.map(function(N,_){var S=o.getTickLineCoord(N),A=S.line,T=S.tick,R=Us(Us(Us(Us({textAnchor:b,verticalAnchor:g},y),{},{stroke:"none",fill:d},x),T),{},{index:_,payload:N,visibleTicksCount:m.length,tickFormatter:u});return we.createElement(ya,Zp({className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},W1(o.props,N,_)),c&&we.createElement("line",Zp({},w,A,{className:or("recharts-cartesian-axis-tick-line",yc(c,"className"))})),h&&t.renderTickItem(h,R,"".concat(qn(u)?u(N.value,_):N.value).concat(f||"")))});return we.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var a=this,s=this.props,i=s.axisLine,o=s.width,l=s.height,c=s.ticksGenerator,d=s.className,h=s.hide;if(h)return null;var u=this.props,f=u.ticks,m=F4(u,jCe),b=f;return qn(c)&&(b=f&&f.length>0?c(this.props):c(m)),o<=0||l<=0||!b||!b.length?null:we.createElement(ya,{className:or("recharts-cartesian-axis",d),ref:function(y){a.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Xi.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(a,s,i){var o,l=or(s.className,"recharts-cartesian-axis-tick-value");return we.isValidElement(a)?o=we.cloneElement(a,Us(Us({},s),{},{className:l})):qn(a)?o=a(Us(Us({},s),{},{className:l})):o=we.createElement(aw,Zp({},s,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])})(L.Component);JP(Px,"displayName","CartesianAxis");JP(Px,"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 TCe=["x1","y1","x2","y2","key"],OCe=["offset"];function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function KF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KF(Object(r),!0).forEach(function(a){MCe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function MCe(e,t,r){return t=LCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LCe(e){var t=RCe(e,"string");return Hm(t)=="symbol"?t:t+""}function RCe(e,t){if(Hm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Hm(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lm(){return lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},lm.apply(this,arguments)}function GF(e,t){if(e==null)return{};var r=ICe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function ICe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}var DCe=function(t){var r=t.fill;if(!r||r==="none")return null;var a=t.fillOpacity,s=t.x,i=t.y,o=t.width,l=t.height,c=t.ry;return we.createElement("rect",{x:s,y:i,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:a,className:"recharts-cartesian-grid-bg"})};function RG(e,t){var r;if(we.isValidElement(e))r=we.cloneElement(e,t);else if(qn(e))r=e(t);else{var a=t.x1,s=t.y1,i=t.x2,o=t.y2,l=t.key,c=GF(t,TCe),d=Bn(c,!1);d.offset;var h=GF(d,OCe);r=we.createElement("line",lm({},h,{x1:a,y1:s,x2:i,y2:o,fill:"none",key:l}))}return r}function FCe(e){var t=e.x,r=e.width,a=e.horizontal,s=a===void 0?!0:a,i=e.horizontalPoints;if(!s||!i||!i.length)return null;var o=i.map(function(l,c){var d=Ji(Ji({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return RG(s,d)});return we.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function qCe(e){var t=e.y,r=e.height,a=e.vertical,s=a===void 0?!0:a,i=e.verticalPoints;if(!s||!i||!i.length)return null;var o=i.map(function(l,c){var d=Ji(Ji({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return RG(s,d)});return we.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function BCe(e){var t=e.horizontalFill,r=e.fillOpacity,a=e.x,s=e.y,i=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,d=c===void 0?!0:c;if(!d||!t||!t.length)return null;var h=l.map(function(f){return Math.round(f+s-s)}).sort(function(f,m){return f-m});s!==h[0]&&h.unshift(0);var u=h.map(function(f,m){var b=!h[m+1],g=b?s+o-f:h[m+1]-f;if(g<=0)return null;var y=m%t.length;return we.createElement("rect",{key:"react-".concat(m),y:f,x:a,height:g,width:i,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return we.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function $Ce(e){var t=e.vertical,r=t===void 0?!0:t,a=e.verticalFill,s=e.fillOpacity,i=e.x,o=e.y,l=e.width,c=e.height,d=e.verticalPoints;if(!r||!a||!a.length)return null;var h=d.map(function(f){return Math.round(f+i-i)}).sort(function(f,m){return f-m});i!==h[0]&&h.unshift(0);var u=h.map(function(f,m){var b=!h[m+1],g=b?i+l-f:h[m+1]-f;if(g<=0)return null;var y=m%a.length;return we.createElement("rect",{key:"react-".concat(m),x:f,y:o,width:g,height:c,stroke:"none",fill:a[y],fillOpacity:s,className:"recharts-cartesian-grid-bg"})});return we.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var UCe=function(t,r){var a=t.xAxis,s=t.width,i=t.height,o=t.offset;return YK(XP(Ji(Ji(Ji({},Px.defaultProps),a),{},{ticks:qu(a,!0),viewBox:{x:0,y:0,width:s,height:i}})),o.left,o.left+o.width,r)},zCe=function(t,r){var a=t.yAxis,s=t.width,i=t.height,o=t.offset;return YK(XP(Ji(Ji(Ji({},Px.defaultProps),a),{},{ticks:qu(a,!0),viewBox:{x:0,y:0,width:s,height:i}})),o.top,o.top+o.height,r)},Mp={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Jf(e){var t,r,a,s,i,o,l=KP(),c=GP(),d=E4e(),h=Ji(Ji({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Mp.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Mp.fill,horizontal:(a=e.horizontal)!==null&&a!==void 0?a:Mp.horizontal,horizontalFill:(s=e.horizontalFill)!==null&&s!==void 0?s:Mp.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Mp.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Mp.verticalFill,x:Ot(e.x)?e.x:d.left,y:Ot(e.y)?e.y:d.top,width:Ot(e.width)?e.width:d.width,height:Ot(e.height)?e.height:d.height}),u=h.x,f=h.y,m=h.width,b=h.height,g=h.syncWithTicks,y=h.horizontalValues,x=h.verticalValues,w=A4e(),j=k4e();if(!Ot(m)||m<=0||!Ot(b)||b<=0||!Ot(u)||u!==+u||!Ot(f)||f!==+f)return null;var N=h.verticalCoordinatesGenerator||UCe,_=h.horizontalCoordinatesGenerator||zCe,S=h.horizontalPoints,A=h.verticalPoints;if((!S||!S.length)&&qn(_)){var T=y&&y.length,R=_({yAxis:j?Ji(Ji({},j),{},{ticks:T?y:j.ticks}):void 0,width:l,height:c,offset:d},T?!0:g);Vu(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Hm(R),"]")),Array.isArray(R)&&(S=R)}if((!A||!A.length)&&qn(N)){var M=x&&x.length,k=N({xAxis:w?Ji(Ji({},w),{},{ticks:M?x:w.ticks}):void 0,width:l,height:c,offset:d},M?!0:g);Vu(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Hm(k),"]")),Array.isArray(k)&&(A=k)}return we.createElement("g",{className:"recharts-cartesian-grid"},we.createElement(DCe,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),we.createElement(FCe,lm({},h,{offset:d,horizontalPoints:S,xAxis:w,yAxis:j})),we.createElement(qCe,lm({},h,{offset:d,verticalPoints:A,xAxis:w,yAxis:j})),we.createElement(BCe,lm({},h,{horizontalPoints:S})),we.createElement($Ce,lm({},h,{verticalPoints:A})))}Jf.displayName="CartesianGrid";var VCe=["type","layout","connectNulls","ref"],HCe=["key"];function Zg(e){"@babel/helpers - typeof";return Zg=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},Zg(e)}function YF(e,t){if(e==null)return{};var r=WCe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function WCe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function $y(){return $y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},$y.apply(this,arguments)}function QF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Nl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QF(Object(r),!0).forEach(function(a){Zc(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Lp(e){return QCe(e)||YCe(e)||GCe(e)||KCe()}function KCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
921In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GCe(e,t){if(e){if(typeof e=="string")return Ok(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ok(e,t)}}function YCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QCe(e){if(Array.isArray(e))return Ok(e)}function Ok(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function XCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,DG(a.key),a)}}function JCe(e,t,r){return t&&XF(e.prototype,t),r&&XF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZCe(e,t,r){return t=Fw(t),eAe(e,IG()?Reflect.construct(t,r||[],Fw(e).constructor):t.apply(e,r))}function eAe(e,t){if(t&&(Zg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tAe(e)}function tAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IG=function(){return!!e})()}function Fw(e){return Fw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fw(e)}function nAe(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&&Mk(e,t)}function Mk(e,t){return Mk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Mk(e,t)}function Zc(e,t,r){return t=DG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DG(e){var t=rAe(e,"string");return Zg(t)=="symbol"?t:t+""}function rAe(e,t){if(Zg(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(Zg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vv=(function(e){function t(){var r;XCe(this,t);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=ZCe(this,t,[].concat(s)),Zc(r,"state",{isAnimationFinished:!0,totalLength:0}),Zc(r,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),Zc(r,"getStrokeDasharray",function(o,l,c){var d=c.reduce(function(x,w){return x+w});if(!d)return r.generateSimpleStrokeDasharray(l,o);for(var h=Math.floor(o/d),u=o%d,f=l-o,m=[],b=0,g=0;b<c.length;g+=c[b],++b)if(g+c[b]>u){m=[].concat(Lp(c.slice(0,b)),[u-g]);break}var y=m.length%2===0?[0,f]:[f];return[].concat(Lp(t.repeat(c,h)),Lp(m),y).map(function(x){return"".concat(x,"px")}).join(", ")}),Zc(r,"id",_x("recharts-line-")),Zc(r,"pathRef",function(o){r.mainCurve=o}),Zc(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Zc(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return nAe(t,e),JCe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var a=this.getTotalLength();this.setState({totalLength:a})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var a=this.getTotalLength();a!==this.state.totalLength&&this.setState({totalLength:a})}}},{key:"getTotalLength",value:function(){var a=this.mainCurve;try{return a&&a.getTotalLength&&a.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(a,s){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,l=i.xAxis,c=i.yAxis,d=i.layout,h=i.children,u=vc(h,yv);if(!u)return null;var f=function(g,y){return{x:g.x,y:g.y,value:g.value,errorVal:_o(g.payload,y)}},m={clipPath:a?"url(#clipPath-".concat(s,")"):null};return we.createElement(ya,m,u.map(function(b){return we.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,dataPointFormatter:f})}))}},{key:"renderDots",value:function(a,s,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,d=l.points,h=l.dataKey,u=Bn(this.props,!1),f=Bn(c,!0),m=d.map(function(g,y){var x=Nl(Nl(Nl({key:"dot-".concat(y),r:3},u),f),{},{index:y,cx:g.x,cy:g.y,value:g.value,dataKey:h,payload:g.payload,points:d});return t.renderDotItem(c,x)}),b={clipPath:a?"url(#clipPath-".concat(s?"":"dots-").concat(i,")"):null};return we.createElement(ya,$y({className:"recharts-line-dots",key:"dots"},b),m)}},{key:"renderCurveStatically",value:function(a,s,i,o){var l=this.props,c=l.type,d=l.layout,h=l.connectNulls;l.ref;var u=YF(l,VCe),f=Nl(Nl(Nl({},Bn(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:s?"url(#clipPath-".concat(i,")"):null,points:a},o),{},{type:c,layout:d,connectNulls:h});return we.createElement(lg,$y({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(a,s){var i=this,o=this.props,l=o.points,c=o.strokeDasharray,d=o.isAnimationActive,h=o.animationBegin,u=o.animationDuration,f=o.animationEasing,m=o.animationId,b=o.animateNewValues,g=o.width,y=o.height,x=this.state,w=x.prevPoints,j=x.totalLength;return we.createElement(su,{begin:h,duration:u,isActive:d,easing:f,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(N){var _=N.t;if(w){var S=w.length/l.length,A=l.map(function(P,O){var F=Math.floor(O*S);if(w[F]){var $=w[F],G=Ai($.x,P.x),B=Ai($.y,P.y);return Nl(Nl({},P),{},{x:G(_),y:B(_)})}if(b){var Y=Ai(g*2,P.x),ee=Ai(y/2,P.y);return Nl(Nl({},P),{},{x:Y(_),y:ee(_)})}return Nl(Nl({},P),{},{x:P.x,y:P.y})});return i.renderCurveStatically(A,a,s)}var T=Ai(0,j),R=T(_),M;if(c){var k="".concat(c).split(/[,\s]+/gim).map(function(P){return parseFloat(P)});M=i.getStrokeDasharray(R,j,k)}else M=i.generateSimpleStrokeDasharray(j,R);return i.renderCurveStatically(l,a,s,{strokeDasharray:M})})}},{key:"renderCurve",value:function(a,s){var i=this.props,o=i.points,l=i.isAnimationActive,c=this.state,d=c.prevPoints,h=c.totalLength;return l&&o&&o.length&&(!d&&h>0||!zg(d,o))?this.renderCurveWithAnimation(a,s):this.renderCurveStatically(o,a,s)}},{key:"render",value:function(){var a,s=this.props,i=s.hide,o=s.dot,l=s.points,c=s.className,d=s.xAxis,h=s.yAxis,u=s.top,f=s.left,m=s.width,b=s.height,g=s.isAnimationActive,y=s.id;if(i||!l||!l.length)return null;var x=this.state.isAnimationFinished,w=l.length===1,j=or("recharts-line",c),N=d&&d.allowDataOverflow,_=h&&h.allowDataOverflow,S=N||_,A=rr(y)?this.id:y,T=(a=Bn(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},R=T.r,M=R===void 0?3:R,k=T.strokeWidth,P=k===void 0?2:k,O=XH(o)?o:{},F=O.clipDot,$=F===void 0?!0:F,G=M*2+P;return we.createElement(ya,{className:j},N||_?we.createElement("defs",null,we.createElement("clipPath",{id:"clipPath-".concat(A)},we.createElement("rect",{x:N?f:f-m/2,y:_?u:u-b/2,width:N?m:m*2,height:_?b:b*2})),!$&&we.createElement("clipPath",{id:"clipPath-dots-".concat(A)},we.createElement("rect",{x:f-G/2,y:u-G/2,width:m+G,height:b+G}))):null,!w&&this.renderCurve(S,A),this.renderErrorBar(S,A),(w||o)&&this.renderDots(S,$,A),(!g||x)&&Ku.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(a,s){return a.animationId!==s.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,prevPoints:s.curPoints}:a.points!==s.curPoints?{curPoints:a.points}:null}},{key:"repeat",value:function(a,s){for(var i=a.length%2!==0?[].concat(Lp(a),[0]):a,o=[],l=0;l<s;++l)o=[].concat(Lp(o),Lp(i));return o}},{key:"renderDotItem",value:function(a,s){var i;if(we.isValidElement(a))i=we.cloneElement(a,s);else if(qn(a))i=a(s);else{var o=s.key,l=YF(s,HCe),c=or("recharts-line-dot",typeof a!="boolean"?a.className:"");i=we.createElement(Xj,$y({key:o},l,{className:c}))}return i}}])})(L.PureComponent);Zc(vv,"displayName","Line");Zc(vv,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Xm.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Zc(vv,"getComposedData",function(e){var t=e.props,r=e.xAxis,a=e.yAxis,s=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,d=e.offset,h=t.layout,u=c.map(function(f,m){var b=_o(f,o);return h==="horizontal"?{x:yw({axis:r,ticks:s,bandSize:l,entry:f,index:m}),y:rr(b)?null:a.scale(b),value:b,payload:f}:{x:rr(b)?null:r.scale(b),y:yw({axis:a,ticks:i,bandSize:l,entry:f,index:m}),value:b,payload:f}});return Nl({points:u,layout:h},d)});var aAe=["layout","type","stroke","connectNulls","isRange","ref"],sAe=["key"],FG;function ex(e){"@babel/helpers - typeof";return ex=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},ex(e)}function qG(e,t){if(e==null)return{};var r=iAe(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function iAe(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},cm.apply(this,arguments)}function JF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function qh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JF(Object(r),!0).forEach(function(a){Ud(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JF(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function oAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZF(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,$G(a.key),a)}}function lAe(e,t,r){return t&&ZF(e.prototype,t),r&&ZF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cAe(e,t,r){return t=qw(t),dAe(e,BG()?Reflect.construct(t,r||[],qw(e).constructor):t.apply(e,r))}function dAe(e,t){if(t&&(ex(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uAe(e)}function uAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BG=function(){return!!e})()}function qw(e){return qw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qw(e)}function hAe(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&&Lk(e,t)}function Lk(e,t){return Lk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Lk(e,t)}function Ud(e,t,r){return t=$G(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $G(e){var t=fAe(e,"string");return ex(t)=="symbol"?t:t+""}function fAe(e,t){if(ex(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(ex(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Nf=(function(e){function t(){var r;oAe(this,t);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=cAe(this,t,[].concat(s)),Ud(r,"state",{isAnimationFinished:!0}),Ud(r,"id",_x("recharts-area-")),Ud(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),qn(o)&&o()}),Ud(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),qn(o)&&o()}),r}return hAe(t,e),lAe(t,[{key:"renderDots",value:function(a,s,i){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var c=this.props,d=c.dot,h=c.points,u=c.dataKey,f=Bn(this.props,!1),m=Bn(d,!0),b=h.map(function(y,x){var w=qh(qh(qh({key:"dot-".concat(x),r:3},f),m),{},{index:x,cx:y.x,cy:y.y,dataKey:u,value:y.value,payload:y.payload,points:h});return t.renderDotItem(d,w)}),g={clipPath:a?"url(#clipPath-".concat(s?"":"dots-").concat(i,")"):null};return we.createElement(ya,cm({className:"recharts-area-dots"},g),b)}},{key:"renderHorizontalRect",value:function(a){var s=this.props,i=s.baseLine,o=s.points,l=s.strokeWidth,c=o[0].x,d=o[o.length-1].x,h=a*Math.abs(c-d),u=ef(o.map(function(f){return f.y||0}));return Ot(i)&&typeof i=="number"?u=Math.max(i,u):i&&Array.isArray(i)&&i.length&&(u=Math.max(ef(i.map(function(f){return f.y||0})),u)),Ot(u)?we.createElement("rect",{x:c<d?c:c-h,y:0,width:h,height:Math.floor(u+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(a){var s=this.props,i=s.baseLine,o=s.points,l=s.strokeWidth,c=o[0].y,d=o[o.length-1].y,h=a*Math.abs(c-d),u=ef(o.map(function(f){return f.x||0}));return Ot(i)&&typeof i=="number"?u=Math.max(i,u):i&&Array.isArray(i)&&i.length&&(u=Math.max(ef(i.map(function(f){return f.x||0})),u)),Ot(u)?we.createElement("rect",{x:0,y:c<d?c:c-h,width:u+(l?parseInt("".concat(l),10):1),height:Math.floor(h)}):null}},{key:"renderClipRect",value:function(a){var s=this.props.layout;return s==="vertical"?this.renderVerticalRect(a):this.renderHorizontalRect(a)}},{key:"renderAreaStatically",value:function(a,s,i,o){var l=this.props,c=l.layout,d=l.type,h=l.stroke,u=l.connectNulls,f=l.isRange;l.ref;var m=qG(l,aAe);return we.createElement(ya,{clipPath:i?"url(#clipPath-".concat(o,")"):null},we.createElement(lg,cm({},Bn(m,!0),{points:a,connectNulls:u,type:d,baseLine:s,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&we.createElement(lg,cm({},Bn(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:u,fill:"none",points:a})),h!=="none"&&f&&we.createElement(lg,cm({},Bn(this.props,!1),{className:"recharts-area-curve",layout:c,type:d,connectNulls:u,fill:"none",points:s})))}},{key:"renderAreaWithAnimation",value:function(a,s){var i=this,o=this.props,l=o.points,c=o.baseLine,d=o.isAnimationActive,h=o.animationBegin,u=o.animationDuration,f=o.animationEasing,m=o.animationId,b=this.state,g=b.prevPoints,y=b.prevBaseLine;return we.createElement(su,{begin:h,duration:u,isActive:d,easing:f,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var w=x.t;if(g){var j=g.length/l.length,N=l.map(function(T,R){var M=Math.floor(R*j);if(g[M]){var k=g[M],P=Ai(k.x,T.x),O=Ai(k.y,T.y);return qh(qh({},T),{},{x:P(w),y:O(w)})}return T}),_;if(Ot(c)&&typeof c=="number"){var S=Ai(y,c);_=S(w)}else if(rr(c)||Nx(c)){var A=Ai(y,0);_=A(w)}else _=c.map(function(T,R){var M=Math.floor(R*j);if(y[M]){var k=y[M],P=Ai(k.x,T.x),O=Ai(k.y,T.y);return qh(qh({},T),{},{x:P(w),y:O(w)})}return T});return i.renderAreaStatically(N,_,a,s)}return we.createElement(ya,null,we.createElement("defs",null,we.createElement("clipPath",{id:"animationClipPath-".concat(s)},i.renderClipRect(w))),we.createElement(ya,{clipPath:"url(#animationClipPath-".concat(s,")")},i.renderAreaStatically(l,c,a,s)))})}},{key:"renderArea",value:function(a,s){var i=this.props,o=i.points,l=i.baseLine,c=i.isAnimationActive,d=this.state,h=d.prevPoints,u=d.prevBaseLine,f=d.totalLength;return c&&o&&o.length&&(!h&&f>0||!zg(h,o)||!zg(u,l))?this.renderAreaWithAnimation(a,s):this.renderAreaStatically(o,l,a,s)}},{key:"render",value:function(){var a,s=this.props,i=s.hide,o=s.dot,l=s.points,c=s.className,d=s.top,h=s.left,u=s.xAxis,f=s.yAxis,m=s.width,b=s.height,g=s.isAnimationActive,y=s.id;if(i||!l||!l.length)return null;var x=this.state.isAnimationFinished,w=l.length===1,j=or("recharts-area",c),N=u&&u.allowDataOverflow,_=f&&f.allowDataOverflow,S=N||_,A=rr(y)?this.id:y,T=(a=Bn(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},R=T.r,M=R===void 0?3:R,k=T.strokeWidth,P=k===void 0?2:k,O=XH(o)?o:{},F=O.clipDot,$=F===void 0?!0:F,G=M*2+P;return we.createElement(ya,{className:j},N||_?we.createElement("defs",null,we.createElement("clipPath",{id:"clipPath-".concat(A)},we.createElement("rect",{x:N?h:h-m/2,y:_?d:d-b/2,width:N?m:m*2,height:_?b:b*2})),!$&&we.createElement("clipPath",{id:"clipPath-dots-".concat(A)},we.createElement("rect",{x:h-G/2,y:d-G/2,width:m+G,height:b+G}))):null,w?null:this.renderArea(S,A),(o||w)&&this.renderDots(S,$,A),(!g||x)&&Ku.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(a,s){return a.animationId!==s.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,curBaseLine:a.baseLine,prevPoints:s.curPoints,prevBaseLine:s.curBaseLine}:a.points!==s.curPoints||a.baseLine!==s.curBaseLine?{curPoints:a.points,curBaseLine:a.baseLine}:null}}])})(L.PureComponent);FG=Nf;Ud(Nf,"displayName","Area");Ud(Nf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Xm.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ud(Nf,"getBaseValue",function(e,t,r,a){var s=e.layout,i=e.baseValue,o=t.props.baseValue,l=o??i;if(Ot(l)&&typeof l=="number")return l;var c=s==="horizontal"?a:r,d=c.scale.domain();if(c.type==="number"){var h=Math.max(d[0],d[1]),u=Math.min(d[0],d[1]);return l==="dataMin"?u:l==="dataMax"||h<0?h:Math.max(Math.min(d[0],d[1]),0)}return l==="dataMin"?d[0]:l==="dataMax"?d[1]:d[0]});Ud(Nf,"getComposedData",function(e){var t=e.props,r=e.item,a=e.xAxis,s=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,c=e.dataKey,d=e.stackedData,h=e.dataStartIndex,u=e.displayedData,f=e.offset,m=t.layout,b=d&&d.length,g=FG.getBaseValue(t,r,a,s),y=m==="horizontal",x=!1,w=u.map(function(N,_){var S;b?S=d[h+_]:(S=_o(N,c),Array.isArray(S)?x=!0:S=[g,S]);var A=S[1]==null||b&&_o(N,c)==null;return y?{x:yw({axis:a,ticks:i,bandSize:l,entry:N,index:_}),y:A?null:s.scale(S[1]),value:S,payload:N}:{x:A?null:a.scale(S[1]),y:yw({axis:s,ticks:o,bandSize:l,entry:N,index:_}),value:S,payload:N}}),j;return b||x?j=w.map(function(N){var _=Array.isArray(N.value)?N.value[0]:null;return y?{x:N.x,y:_!=null&&N.y!=null?s.scale(_):null}:{x:_!=null?a.scale(_):null,y:N.y}}):j=y?s.scale(g):a.scale(g),qh({points:w,baseLine:j,layout:m,isRange:x},f)});Ud(Nf,"renderDotItem",function(e,t){var r;if(we.isValidElement(e))r=we.cloneElement(e,t);else if(qn(e))r=e(t);else{var a=or("recharts-area-dot",typeof e!="boolean"?e.className:""),s=t.key,i=qG(t,sAe);r=we.createElement(Xj,cm({},i,{key:s,className:a}))}return r});function tx(e){"@babel/helpers - typeof";return tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tx(e)}function mAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pAe(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,VG(a.key),a)}}function gAe(e,t,r){return t&&pAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xAe(e,t,r){return t=Bw(t),yAe(e,UG()?Reflect.construct(t,r||[],Bw(e).constructor):t.apply(e,r))}function yAe(e,t){if(t&&(tx(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vAe(e)}function vAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UG=function(){return!!e})()}function Bw(e){return Bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Bw(e)}function bAe(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&&Rk(e,t)}function Rk(e,t){return Rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Rk(e,t)}function zG(e,t,r){return t=VG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VG(e){var t=wAe(e,"string");return tx(t)=="symbol"?t:t+""}function wAe(e,t){if(tx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(tx(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ik(){return Ik=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Ik.apply(this,arguments)}function jAe(e){var t=e.xAxisId,r=KP(),a=GP(),s=_G(t);return s==null?null:L.createElement(Px,Ik({},s,{className:or("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(o){return qu(o,!0)}}))}var ed=(function(e){function t(){return mAe(this,t),xAe(this,t,arguments)}return bAe(t,e),gAe(t,[{key:"render",value:function(){return L.createElement(jAe,this.props)}}])})(L.Component);zG(ed,"displayName","XAxis");zG(ed,"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 nx(e){"@babel/helpers - typeof";return nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nx(e)}function NAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Ae(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,KG(a.key),a)}}function SAe(e,t,r){return t&&_Ae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CAe(e,t,r){return t=$w(t),AAe(e,HG()?Reflect.construct(t,r||[],$w(e).constructor):t.apply(e,r))}function AAe(e,t){if(t&&(nx(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kAe(e)}function kAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HG=function(){return!!e})()}function $w(e){return $w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$w(e)}function PAe(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&&Dk(e,t)}function Dk(e,t){return Dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},Dk(e,t)}function WG(e,t,r){return t=KG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KG(e){var t=EAe(e,"string");return nx(t)=="symbol"?t:t+""}function EAe(e,t){if(nx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(nx(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fk(){return Fk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Fk.apply(this,arguments)}var TAe=function(t){var r=t.yAxisId,a=KP(),s=GP(),i=SG(r);return i==null?null:L.createElement(Px,Fk({},i,{className:or("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:a,height:s},ticksGenerator:function(l){return qu(l,!0)}}))},td=(function(e){function t(){return NAe(this,t),CAe(this,t,arguments)}return PAe(t,e),SAe(t,[{key:"render",value:function(){return L.createElement(TAe,this.props)}}])})(L.Component);WG(td,"displayName","YAxis");WG(td,"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 e9(e){return RAe(e)||LAe(e)||MAe(e)||OAe()}function OAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
922In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MAe(e,t){if(e){if(typeof e=="string")return qk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qk(e,t)}}function LAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RAe(e){if(Array.isArray(e))return qk(e)}function qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Bk=function(t,r,a,s,i){var o=vc(t,QP),l=vc(t,n2),c=[].concat(e9(o),e9(l)),d=vc(t,a2),h="".concat(s,"Id"),u=s[0],f=r;if(c.length&&(f=c.reduce(function(g,y){if(y.props[h]===a&&Jd(y.props,"extendDomain")&&Ot(y.props[u])){var x=y.props[u];return[Math.min(g[0],x),Math.max(g[1],x)]}return g},f)),d.length){var m="".concat(u,"1"),b="".concat(u,"2");f=d.reduce(function(g,y){if(y.props[h]===a&&Jd(y.props,"extendDomain")&&Ot(y.props[m])&&Ot(y.props[b])){var x=y.props[m],w=y.props[b];return[Math.min(g[0],x,w),Math.max(g[1],x,w)]}return g},f)}return i&&i.length&&(f=i.reduce(function(g,y){return Ot(y)?[Math.min(g[0],y),Math.max(g[1],y)]:g},f)),f},q4={exports:{}},t9;function IAe(){return t9||(t9=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1));function s(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function i(c,d,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var m=new s(h,u||c,f),b=r?r+d:d;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],m]:c._events[b].push(m):(c._events[b]=m,c._eventsCount++),c}function o(c,d){--c._eventsCount===0?c._events=new a:delete c._events[d]}function l(){this._events=new a,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,u;if(this._eventsCount===0)return d;for(u in h=this._events)t.call(h,u)&&d.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.prototype.listeners=function(d){var h=r?r+d:d,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,m=u.length,b=new Array(m);f<m;f++)b[f]=u[f].fn;return b},l.prototype.listenerCount=function(d){var h=r?r+d:d,u=this._events[h];return u?u.fn?1:u.length:0},l.prototype.emit=function(d,h,u,f,m,b){var g=r?r+d:d;if(!this._events[g])return!1;var y=this._events[g],x=arguments.length,w,j;if(y.fn){switch(y.once&&this.removeListener(d,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,h),!0;case 3:return y.fn.call(y.context,h,u),!0;case 4:return y.fn.call(y.context,h,u,f),!0;case 5:return y.fn.call(y.context,h,u,f,m),!0;case 6:return y.fn.call(y.context,h,u,f,m,b),!0}for(j=1,w=new Array(x-1);j<x;j++)w[j-1]=arguments[j];y.fn.apply(y.context,w)}else{var N=y.length,_;for(j=0;j<N;j++)switch(y[j].once&&this.removeListener(d,y[j].fn,void 0,!0),x){case 1:y[j].fn.call(y[j].context);break;case 2:y[j].fn.call(y[j].context,h);break;case 3:y[j].fn.call(y[j].context,h,u);break;case 4:y[j].fn.call(y[j].context,h,u,f);break;default:if(!w)for(_=1,w=new Array(x-1);_<x;_++)w[_-1]=arguments[_];y[j].fn.apply(y[j].context,w)}}return!0},l.prototype.on=function(d,h,u){return i(this,d,h,u,!1)},l.prototype.once=function(d,h,u){return i(this,d,h,u,!0)},l.prototype.removeListener=function(d,h,u,f){var m=r?r+d:d;if(!this._events[m])return this;if(!h)return o(this,m),this;var b=this._events[m];if(b.fn)b.fn===h&&(!f||b.once)&&(!u||b.context===u)&&o(this,m);else{for(var g=0,y=[],x=b.length;g<x;g++)(b[g].fn!==h||f&&!b[g].once||u&&b[g].context!==u)&&y.push(b[g]);y.length?this._events[m]=y.length===1?y[0]:y:o(this,m)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=r?r+d:d,this._events[h]&&o(this,h)):(this._events=new a,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(q4)),q4.exports}var DAe=IAe();const FAe=Lr(DAe);var B4=new FAe,$4="recharts.syncMouseEvents";function $0(e){"@babel/helpers - typeof";return $0=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},$0(e)}function qAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BAe(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,GG(a.key),a)}}function $Ae(e,t,r){return t&&BAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U4(e,t,r){return t=GG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GG(e){var t=UAe(e,"string");return $0(t)=="symbol"?t:t+""}function UAe(e,t){if($0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if($0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zAe=(function(){function e(){qAe(this,e),U4(this,"activeIndex",0),U4(this,"coordinateList",[]),U4(this,"layout","horizontal")}return $Ae(e,[{key:"setDetails",value:function(r){var a,s=r.coordinateList,i=s===void 0?null:s,o=r.container,l=o===void 0?null:o,c=r.layout,d=c===void 0?null:c,h=r.offset,u=h===void 0?null:h,f=r.mouseHandlerCallback,m=f===void 0?null:f;this.coordinateList=(a=i??this.coordinateList)!==null&&a!==void 0?a:[],this.container=l??this.container,this.layout=d??this.layout,this.offset=u??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,a;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var s=this.container.getBoundingClientRect(),i=s.x,o=s.y,l=s.height,c=this.coordinateList[this.activeIndex].coordinate,d=((r=window)===null||r===void 0?void 0:r.scrollX)||0,h=((a=window)===null||a===void 0?void 0:a.scrollY)||0,u=i+c+d,f=o+this.offset.top+l/2+h;this.mouseHandlerCallback({pageX:u,pageY:f})}}}])})();function VAe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var a=e==null?void 0:e[0],s=e==null?void 0:e[1];if(a&&s&&Ot(a)&&Ot(s))return!0}return!1}function HAe(e,t,r,a){var s=a/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-s:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-s,width:e==="horizontal"?a:r.width-1,height:e==="horizontal"?r.height-1:a}}function YG(e){var t=e.cx,r=e.cy,a=e.radius,s=e.startAngle,i=e.endAngle,o=Ti(t,r,a,s),l=Ti(t,r,a,i);return{points:[o,l],cx:t,cy:r,radius:a,startAngle:s,endAngle:i}}function WAe(e,t,r){var a,s,i,o;if(e==="horizontal")a=t.x,i=a,s=r.top,o=r.top+r.height;else if(e==="vertical")s=t.y,o=s,a=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,d=t.innerRadius,h=t.outerRadius,u=t.angle,f=Ti(l,c,d,u),m=Ti(l,c,h,u);a=f.x,s=f.y,i=m.x,o=m.y}else return YG(t);return[{x:a,y:s},{x:i,y:o}]}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 n9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function Db(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n9(Object(r),!0).forEach(function(a){KAe(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n9(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function KAe(e,t,r){return t=GAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GAe(e){var t=YAe(e,"string");return U0(t)=="symbol"?t:t+""}function YAe(e,t){if(U0(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(U0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QAe(e){var t,r,a=e.element,s=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,h=e.tooltipAxisBandSize,u=e.layout,f=e.chartName,m=(t=a.props.cursor)!==null&&t!==void 0?t:(r=a.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!a||!m||!i||!o||f!=="ScatterChart"&&s!=="axis")return null;var b,g=lg;if(f==="ScatterChart")b=o,g=F5e;else if(f==="BarChart")b=HAe(u,o,c,h),g=UP;else if(u==="radial"){var y=YG(o),x=y.cx,w=y.cy,j=y.radius,N=y.startAngle,_=y.endAngle;b={cx:x,cy:w,startAngle:N,endAngle:_,innerRadius:j,outerRadius:j},g=eG}else b={points:WAe(u,o,c)},g=lg;var S=Db(Db(Db(Db({stroke:"#ccc",pointerEvents:"none"},c),b),Bn(m,!1)),{},{payload:l,payloadIndex:d,className:or("recharts-tooltip-cursor",m.className)});return L.isValidElement(m)?L.cloneElement(m,S):L.createElement(g,S)}var XAe=["item"],JAe=["children","className","width","height","style","compact","title","desc"];function rx(e){"@babel/helpers - typeof";return rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rx(e)}function eg(){return eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},eg.apply(this,arguments)}function r9(e,t){return tke(e)||eke(e,t)||XG(e,t)||ZAe()}function ZAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
923In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eke(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(a=i.call(r)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw s}}return l}}function tke(e){if(Array.isArray(e))return e}function a9(e,t){if(e==null)return{};var r=nke(e,t),a,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function nke(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function rke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ake(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,JG(a.key),a)}}function ske(e,t,r){return t&&ake(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ike(e,t,r){return t=Uw(t),oke(e,QG()?Reflect.construct(t,r||[],Uw(e).constructor):t.apply(e,r))}function oke(e,t){if(t&&(rx(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lke(e)}function lke(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 Uw(e){return Uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uw(e)}function cke(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&&$k(e,t)}function $k(e,t){return $k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,s){return a.__proto__=s,a},$k(e,t)}function ax(e){return hke(e)||uke(e)||XG(e)||dke()}function dke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
924In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XG(e,t){if(e){if(typeof e=="string")return Uk(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Uk(e,t)}}function uke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hke(e){if(Array.isArray(e))return Uk(e)}function Uk(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function s9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,a)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s9(Object(r),!0).forEach(function(a){kn(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s9(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function kn(e,t,r){return t=JG(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JG(e){var t=fke(e,"string");return rx(t)=="symbol"?t:t+""}function fke(e,t){if(rx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(rx(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mke={xAxis:["bottom","top"],yAxis:["left","right"]},pke={width:"100%",height:"100%"},ZG={x:0,y:0};function Fb(e){return e}var gke=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},xke=function(t,r,a,s){var i=r.find(function(h){return h&&h.index===a});if(i){if(t==="horizontal")return{x:i.coordinate,y:s.y};if(t==="vertical")return{x:s.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=s.radius;return mt(mt(mt({},s),Ti(s.cx,s.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,d=s.angle;return mt(mt(mt({},s),Ti(s.cx,s.cy,c,d)),{},{angle:d,radius:c})}return ZG},s2=function(t,r){var a=r.graphicalItems,s=r.dataStartIndex,i=r.dataEndIndex,o=(a??[]).reduce(function(l,c){var d=c.props.data;return d&&d.length?[].concat(ax(l),ax(d)):l},[]);return o.length>0?o:t&&t.length&&Ot(s)&&Ot(i)?t.slice(s,i+1):[]};function eY(e){return e==="number"?[0,"auto"]:void 0}var zk=function(t,r,a,s){var i=t.graphicalItems,o=t.tooltipAxis,l=s2(r,t);return a<0||!i||!i.length||a>=l.length?null:i.reduce(function(c,d){var h,u=(h=d.props.data)!==null&&h!==void 0?h:r;u&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=a&&(u=u.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(o.dataKey&&!o.allowDuplicatedCategory){var m=u===void 0?l:u;f=V1(m,o.dataKey,s)}else f=u&&u[a]||l[a];return f?[].concat(ax(c),[XK(d,f)]):c},[])},i9=function(t,r,a,s){var i=s||{x:t.chartX,y:t.chartY},o=gke(i,a),l=t.orderedTooltipTicks,c=t.tooltipAxis,d=t.tooltipTicks,h=w2e(o,l,d,c);if(h>=0&&d){var u=d[h]&&d[h].value,f=zk(t,r,h,u),m=xke(a,l,h,i);return{activeTooltipIndex:h,activeLabel:u,activePayload:f,activeCoordinate:m}}return null},yke=function(t,r){var a=r.axes,s=r.graphicalItems,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,h=t.layout,u=t.children,f=t.stackOffset,m=GK(h,i);return a.reduce(function(b,g){var y,x=g.type.defaultProps!==void 0?mt(mt({},g.type.defaultProps),g.props):g.props,w=x.type,j=x.dataKey,N=x.allowDataOverflow,_=x.allowDuplicatedCategory,S=x.scale,A=x.ticks,T=x.includeHidden,R=x[o];if(b[R])return b;var M=s2(t.data,{graphicalItems:s.filter(function(q){var K,te=o in q.props?q.props[o]:(K=q.type.defaultProps)===null||K===void 0?void 0:K[o];return te===R}),dataStartIndex:c,dataEndIndex:d}),k=M.length,P,O,F;VAe(x.domain,N,w)&&(P=ik(x.domain,null,N),m&&(w==="number"||S!=="auto")&&(F=qy(M,j,"category")));var $=eY(w);if(!P||P.length===0){var G,B=(G=x.domain)!==null&&G!==void 0?G:$;if(j){if(P=qy(M,j,w),w==="category"&&m){var Y=mxe(P);_&&Y?(O=P,P=kw(0,k)):_||(P=p7(B,P,g).reduce(function(q,K){return q.indexOf(K)>=0?q:[].concat(ax(q),[K])},[]))}else if(w==="category")_?P=P.filter(function(q){return q!==""&&!rr(q)}):P=p7(B,P,g).reduce(function(q,K){return q.indexOf(K)>=0||K===""||rr(K)?q:[].concat(ax(q),[K])},[]);else if(w==="number"){var ee=C2e(M,s.filter(function(q){var K,te,re=o in q.props?q.props[o]:(K=q.type.defaultProps)===null||K===void 0?void 0:K[o],Q="hide"in q.props?q.props.hide:(te=q.type.defaultProps)===null||te===void 0?void 0:te.hide;return re===R&&(T||!Q)}),j,i,h);ee&&(P=ee)}m&&(w==="number"||S!=="auto")&&(F=qy(M,j,"category"))}else m?P=kw(0,k):l&&l[R]&&l[R].hasStack&&w==="number"?P=f==="expand"?[0,1]:QK(l[R].stackGroups,c,d):P=KK(M,s.filter(function(q){var K=o in q.props?q.props[o]:q.type.defaultProps[o],te="hide"in q.props?q.props.hide:q.type.defaultProps.hide;return K===R&&(T||!te)}),w,h,!0);if(w==="number")P=Bk(u,P,R,i,A),B&&(P=ik(B,P,N));else if(w==="category"&&B){var J=B,H=P.every(function(q){return J.indexOf(q)>=0});H&&(P=J)}}return mt(mt({},b),{},kn({},R,mt(mt({},x),{},{axisType:i,domain:P,categoricalDomain:F,duplicateDomain:O,originalDomain:(y=x.domain)!==null&&y!==void 0?y:$,isCategorical:m,layout:h})))},{})},vke=function(t,r){var a=r.graphicalItems,s=r.Axis,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,h=t.layout,u=t.children,f=s2(t.data,{graphicalItems:a,dataStartIndex:c,dataEndIndex:d}),m=f.length,b=GK(h,i),g=-1;return a.reduce(function(y,x){var w=x.type.defaultProps!==void 0?mt(mt({},x.type.defaultProps),x.props):x.props,j=w[o],N=eY("number");if(!y[j]){g++;var _;return b?_=kw(0,m):l&&l[j]&&l[j].hasStack?(_=QK(l[j].stackGroups,c,d),_=Bk(u,_,j,i)):(_=ik(N,KK(f,a.filter(function(S){var A,T,R=o in S.props?S.props[o]:(A=S.type.defaultProps)===null||A===void 0?void 0:A[o],M="hide"in S.props?S.props.hide:(T=S.type.defaultProps)===null||T===void 0?void 0:T.hide;return R===j&&!M}),"number",h),s.defaultProps.allowDataOverflow),_=Bk(u,_,j,i)),mt(mt({},y),{},kn({},j,mt(mt({axisType:i},s.defaultProps),{},{hide:!0,orientation:yc(mke,"".concat(i,".").concat(g%2),null),domain:_,originalDomain:N,isCategorical:b,layout:h})))}return y},{})},bke=function(t,r){var a=r.axisType,s=a===void 0?"xAxis":a,i=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,h=t.children,u="".concat(s,"Id"),f=vc(h,i),m={};return f&&f.length?m=yke(t,{axes:f,graphicalItems:o,axisType:s,axisIdKey:u,stackGroups:l,dataStartIndex:c,dataEndIndex:d}):o&&o.length&&(m=vke(t,{Axis:i,graphicalItems:o,axisType:s,axisIdKey:u,stackGroups:l,dataStartIndex:c,dataEndIndex:d})),m},wke=function(t){var r=Uh(t),a=qu(r,!1,!0);return{tooltipTicks:a,orderedTooltipTicks:pP(a,function(s){return s.coordinate}),tooltipAxis:r,tooltipAxisBandSize:vw(r,a)}},o9=function(t){var r=t.children,a=t.defaultShowTooltip,s=Sl(r,Kg),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),s&&s.props&&(s.props.startIndex>=0&&(i=s.props.startIndex),s.props.endIndex>=0&&(o=s.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!a}},jke=function(t){return!t||!t.length?!1:t.some(function(r){var a=zu(r&&r.type);return a&&a.indexOf("Bar")>=0})},l9=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"}},Nke=function(t,r){var a=t.props,s=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,d=a.width,h=a.height,u=a.children,f=a.margin||{},m=Sl(u,Kg),b=Sl(u,Hu),g=Object.keys(c).reduce(function(_,S){var A=c[S],T=A.orientation;return!A.mirror&&!A.hide?mt(mt({},_),{},kn({},T,_[T]+A.width)):_},{left:f.left||0,right:f.right||0}),y=Object.keys(o).reduce(function(_,S){var A=o[S],T=A.orientation;return!A.mirror&&!A.hide?mt(mt({},_),{},kn({},T,yc(_,"".concat(T))+A.height)):_},{top:f.top||0,bottom:f.bottom||0}),x=mt(mt({},y),g),w=x.bottom;m&&(x.bottom+=m.props.height||Kg.defaultProps.height),b&&r&&(x=_2e(x,s,a,r));var j=d-x.left-x.right,N=h-x.top-x.bottom;return mt(mt({brushBottom:w},x),{},{width:Math.max(j,0),height:Math.max(N,0)})},_ke=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},ZP=function(t){var r=t.chartName,a=t.GraphicalChild,s=t.defaultTooltipEventType,i=s===void 0?"axis":s,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,d=t.legendContent,h=t.formatAxisMap,u=t.defaultProps,f=function(x,w){var j=w.graphicalItems,N=w.stackGroups,_=w.offset,S=w.updateId,A=w.dataStartIndex,T=w.dataEndIndex,R=x.barSize,M=x.layout,k=x.barGap,P=x.barCategoryGap,O=x.maxBarSize,F=l9(M),$=F.numericAxisName,G=F.cateAxisName,B=jke(j),Y=[];return j.forEach(function(ee,J){var H=s2(x.data,{graphicalItems:[ee],dataStartIndex:A,dataEndIndex:T}),q=ee.type.defaultProps!==void 0?mt(mt({},ee.type.defaultProps),ee.props):ee.props,K=q.dataKey,te=q.maxBarSize,re=q["".concat($,"Id")],Q=q["".concat(G,"Id")],ne={},oe=c.reduce(function(Ve,be){var We=w["".concat(be.axisType,"Map")],Ze=q["".concat(be.axisType,"Id")];We&&We[Ze]||be.axisType==="zAxis"||Vm();var st=We[Ze];return mt(mt({},Ve),{},kn(kn({},be.axisType,st),"".concat(be.axisType,"Ticks"),qu(st)))},ne),ae=oe[G],le=oe["".concat(G,"Ticks")],je=N&&N[re]&&N[re].hasStack&&F2e(ee,N[re].stackGroups),xe=zu(ee.type).indexOf("Bar")>=0,Fe=vw(ae,le),he=[],Ne=B&&j2e({barSize:R,stackGroups:N,totalSize:_ke(oe,G)});if(xe){var ue,rt,Te=rr(te)?O:te,Pe=(ue=(rt=vw(ae,le,!0))!==null&&rt!==void 0?rt:Te)!==null&&ue!==void 0?ue:0;he=N2e({barGap:k,barCategoryGap:P,bandSize:Pe!==Fe?Pe:Fe,sizeList:Ne[Q],maxBarSize:Te}),Pe!==Fe&&(he=he.map(function(Ve){return mt(mt({},Ve),{},{position:mt(mt({},Ve.position),{},{offset:Ve.position.offset-Pe/2})})}))}var $e=ee&&ee.type&&ee.type.getComposedData;$e&&Y.push({props:mt(mt({},$e(mt(mt({},oe),{},{displayedData:H,props:x,dataKey:K,item:ee,bandSize:Fe,barPosition:he,offset:_,stackedData:je,layout:M,dataStartIndex:A,dataEndIndex:T}))),{},kn(kn(kn({key:ee.key||"item-".concat(J)},$,oe[$]),G,oe[G]),"animationId",S)),childIndex:Cxe(ee,x.children),item:ee})}),Y},m=function(x,w){var j=x.props,N=x.dataStartIndex,_=x.dataEndIndex,S=x.updateId;if(!ER({props:j}))return null;var A=j.children,T=j.layout,R=j.stackOffset,M=j.data,k=j.reverseStackOrder,P=l9(T),O=P.numericAxisName,F=P.cateAxisName,$=vc(A,a),G=R2e(M,$,"".concat(O,"Id"),"".concat(F,"Id"),R,k),B=c.reduce(function(q,K){var te="".concat(K.axisType,"Map");return mt(mt({},q),{},kn({},te,bke(j,mt(mt({},K),{},{graphicalItems:$,stackGroups:K.axisType===O&&G,dataStartIndex:N,dataEndIndex:_}))))},{}),Y=Nke(mt(mt({},B),{},{props:j,graphicalItems:$}),w==null?void 0:w.legendBBox);Object.keys(B).forEach(function(q){B[q]=h(j,B[q],Y,q.replace("Map",""),r)});var ee=B["".concat(F,"Map")],J=wke(ee),H=f(j,mt(mt({},B),{},{dataStartIndex:N,dataEndIndex:_,updateId:S,graphicalItems:$,stackGroups:G,offset:Y}));return mt(mt({formattedGraphicalItems:H,graphicalItems:$,offset:Y,stackGroups:G},J),B)},b=(function(y){function x(w){var j,N,_;return rke(this,x),_=ike(this,x,[w]),kn(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kn(_,"accessibilityManager",new zAe),kn(_,"handleLegendBBoxUpdate",function(S){if(S){var A=_.state,T=A.dataStartIndex,R=A.dataEndIndex,M=A.updateId;_.setState(mt({legendBBox:S},m({props:_.props,dataStartIndex:T,dataEndIndex:R,updateId:M},mt(mt({},_.state),{},{legendBBox:S}))))}}),kn(_,"handleReceiveSyncEvent",function(S,A,T){if(_.props.syncId===S){if(T===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(A)}}),kn(_,"handleBrushChange",function(S){var A=S.startIndex,T=S.endIndex;if(A!==_.state.dataStartIndex||T!==_.state.dataEndIndex){var R=_.state.updateId;_.setState(function(){return mt({dataStartIndex:A,dataEndIndex:T},m({props:_.props,dataStartIndex:A,dataEndIndex:T,updateId:R},_.state))}),_.triggerSyncEvent({dataStartIndex:A,dataEndIndex:T})}}),kn(_,"handleMouseEnter",function(S){var A=_.getMouseInfo(S);if(A){var T=mt(mt({},A),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var R=_.props.onMouseEnter;qn(R)&&R(T,S)}}),kn(_,"triggeredAfterMouseMove",function(S){var A=_.getMouseInfo(S),T=A?mt(mt({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(T),_.triggerSyncEvent(T);var R=_.props.onMouseMove;qn(R)&&R(T,S)}),kn(_,"handleItemMouseEnter",function(S){_.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),kn(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),kn(_,"handleMouseMove",function(S){S.persist(),_.throttleTriggeredAfterMouseMove(S)}),kn(_,"handleMouseLeave",function(S){_.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};_.setState(A),_.triggerSyncEvent(A);var T=_.props.onMouseLeave;qn(T)&&T(A,S)}),kn(_,"handleOuterEvent",function(S){var A=Sxe(S),T=yc(_.props,"".concat(A));if(A&&qn(T)){var R,M;/.*touch.*/i.test(A)?M=_.getMouseInfo(S.changedTouches[0]):M=_.getMouseInfo(S),T((R=M)!==null&&R!==void 0?R:{},S)}}),kn(_,"handleClick",function(S){var A=_.getMouseInfo(S);if(A){var T=mt(mt({},A),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var R=_.props.onClick;qn(R)&&R(T,S)}}),kn(_,"handleMouseDown",function(S){var A=_.props.onMouseDown;if(qn(A)){var T=_.getMouseInfo(S);A(T,S)}}),kn(_,"handleMouseUp",function(S){var A=_.props.onMouseUp;if(qn(A)){var T=_.getMouseInfo(S);A(T,S)}}),kn(_,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),kn(_,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.handleMouseDown(S.changedTouches[0])}),kn(_,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&_.handleMouseUp(S.changedTouches[0])}),kn(_,"handleDoubleClick",function(S){var A=_.props.onDoubleClick;if(qn(A)){var T=_.getMouseInfo(S);A(T,S)}}),kn(_,"handleContextMenu",function(S){var A=_.props.onContextMenu;if(qn(A)){var T=_.getMouseInfo(S);A(T,S)}}),kn(_,"triggerSyncEvent",function(S){_.props.syncId!==void 0&&B4.emit($4,_.props.syncId,S,_.eventEmitterSymbol)}),kn(_,"applySyncEvent",function(S){var A=_.props,T=A.layout,R=A.syncMethod,M=_.state.updateId,k=S.dataStartIndex,P=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)_.setState(mt({dataStartIndex:k,dataEndIndex:P},m({props:_.props,dataStartIndex:k,dataEndIndex:P,updateId:M},_.state)));else if(S.activeTooltipIndex!==void 0){var O=S.chartX,F=S.chartY,$=S.activeTooltipIndex,G=_.state,B=G.offset,Y=G.tooltipTicks;if(!B)return;if(typeof R=="function")$=R(Y,S);else if(R==="value"){$=-1;for(var ee=0;ee<Y.length;ee++)if(Y[ee].value===S.activeLabel){$=ee;break}}var J=mt(mt({},B),{},{x:B.left,y:B.top}),H=Math.min(O,J.x+J.width),q=Math.min(F,J.y+J.height),K=Y[$]&&Y[$].value,te=zk(_.state,_.props.data,$),re=Y[$]?{x:T==="horizontal"?Y[$].coordinate:H,y:T==="horizontal"?q:Y[$].coordinate}:ZG;_.setState(mt(mt({},S),{},{activeLabel:K,activeCoordinate:re,activePayload:te,activeTooltipIndex:$}))}else _.setState(S)}),kn(_,"renderCursor",function(S){var A,T=_.state,R=T.isTooltipActive,M=T.activeCoordinate,k=T.activePayload,P=T.offset,O=T.activeTooltipIndex,F=T.tooltipAxisBandSize,$=_.getTooltipEventType(),G=(A=S.props.active)!==null&&A!==void 0?A:R,B=_.props.layout,Y=S.key||"_recharts-cursor";return we.createElement(QAe,{key:Y,activeCoordinate:M,activePayload:k,activeTooltipIndex:O,chartName:r,element:S,isActive:G,layout:B,offset:P,tooltipAxisBandSize:F,tooltipEventType:$})}),kn(_,"renderPolarAxis",function(S,A,T){var R=yc(S,"type.axisType"),M=yc(_.state,"".concat(R,"Map")),k=S.type.defaultProps,P=k!==void 0?mt(mt({},k),S.props):S.props,O=M&&M[P["".concat(R,"Id")]];return L.cloneElement(S,mt(mt({},O),{},{className:or(R,O.className),key:S.key||"".concat(A,"-").concat(T),ticks:qu(O,!0)}))}),kn(_,"renderPolarGrid",function(S){var A=S.props,T=A.radialLines,R=A.polarAngles,M=A.polarRadius,k=_.state,P=k.radiusAxisMap,O=k.angleAxisMap,F=Uh(P),$=Uh(O),G=$.cx,B=$.cy,Y=$.innerRadius,ee=$.outerRadius;return L.cloneElement(S,{polarAngles:Array.isArray(R)?R:qu($,!0).map(function(J){return J.coordinate}),polarRadius:Array.isArray(M)?M:qu(F,!0).map(function(J){return J.coordinate}),cx:G,cy:B,innerRadius:Y,outerRadius:ee,key:S.key||"polar-grid",radialLines:T})}),kn(_,"renderLegend",function(){var S=_.state.formattedGraphicalItems,A=_.props,T=A.children,R=A.width,M=A.height,k=_.props.margin||{},P=R-(k.left||0)-(k.right||0),O=HK({children:T,formattedGraphicalItems:S,legendWidth:P,legendContent:d});if(!O)return null;var F=O.item,$=a9(O,XAe);return L.cloneElement(F,mt(mt({},$),{},{chartWidth:R,chartHeight:M,margin:k,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),kn(_,"renderTooltip",function(){var S,A=_.props,T=A.children,R=A.accessibilityLayer,M=Sl(T,bo);if(!M)return null;var k=_.state,P=k.isTooltipActive,O=k.activeCoordinate,F=k.activePayload,$=k.activeLabel,G=k.offset,B=(S=M.props.active)!==null&&S!==void 0?S:P;return L.cloneElement(M,{viewBox:mt(mt({},G),{},{x:G.left,y:G.top}),active:B,label:$,payload:B?F:[],coordinate:O,accessibilityLayer:R})}),kn(_,"renderBrush",function(S){var A=_.props,T=A.margin,R=A.data,M=_.state,k=M.offset,P=M.dataStartIndex,O=M.dataEndIndex,F=M.updateId;return L.cloneElement(S,{key:S.key||"_recharts-brush",onChange:Mb(_.handleBrushChange,S.props.onChange),data:R,x:Ot(S.props.x)?S.props.x:k.left,y:Ot(S.props.y)?S.props.y:k.top+k.height+k.brushBottom-(T.bottom||0),width:Ot(S.props.width)?S.props.width:k.width,startIndex:P,endIndex:O,updateId:"brush-".concat(F)})}),kn(_,"renderReferenceElement",function(S,A,T){if(!S)return null;var R=_,M=R.clipPathId,k=_.state,P=k.xAxisMap,O=k.yAxisMap,F=k.offset,$=S.type.defaultProps||{},G=S.props,B=G.xAxisId,Y=B===void 0?$.xAxisId:B,ee=G.yAxisId,J=ee===void 0?$.yAxisId:ee;return L.cloneElement(S,{key:S.key||"".concat(A,"-").concat(T),xAxis:P[Y],yAxis:O[J],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:M})}),kn(_,"renderActivePoints",function(S){var A=S.item,T=S.activePoint,R=S.basePoint,M=S.childIndex,k=S.isRange,P=[],O=A.props.key,F=A.item.type.defaultProps!==void 0?mt(mt({},A.item.type.defaultProps),A.item.props):A.item.props,$=F.activeDot,G=F.dataKey,B=mt(mt({index:M,dataKey:G,cx:T.x,cy:T.y,r:4,fill:$P(A.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},Bn($,!1)),H1($));return P.push(x.renderActiveDot($,B,"".concat(O,"-activePoint-").concat(M))),R?P.push(x.renderActiveDot($,mt(mt({},B),{},{cx:R.x,cy:R.y}),"".concat(O,"-basePoint-").concat(M))):k&&P.push(null),P}),kn(_,"renderGraphicChild",function(S,A,T){var R=_.filterFormatItem(S,A,T);if(!R)return null;var M=_.getTooltipEventType(),k=_.state,P=k.isTooltipActive,O=k.tooltipAxis,F=k.activeTooltipIndex,$=k.activeLabel,G=_.props.children,B=Sl(G,bo),Y=R.props,ee=Y.points,J=Y.isRange,H=Y.baseLine,q=R.item.type.defaultProps!==void 0?mt(mt({},R.item.type.defaultProps),R.item.props):R.item.props,K=q.activeDot,te=q.hide,re=q.activeBar,Q=q.activeShape,ne=!!(!te&&P&&B&&(K||re||Q)),oe={};M!=="axis"&&B&&B.props.trigger==="click"?oe={onClick:Mb(_.handleItemMouseEnter,S.props.onClick)}:M!=="axis"&&(oe={onMouseLeave:Mb(_.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:Mb(_.handleItemMouseEnter,S.props.onMouseEnter)});var ae=L.cloneElement(S,mt(mt({},R.props),oe));function le(be){return typeof O.dataKey=="function"?O.dataKey(be.payload):null}if(ne)if(F>=0){var je,xe;if(O.dataKey&&!O.allowDuplicatedCategory){var Fe=typeof O.dataKey=="function"?le:"payload.".concat(O.dataKey.toString());je=V1(ee,Fe,$),xe=J&&H&&V1(H,Fe,$)}else je=ee==null?void 0:ee[F],xe=J&&H&&H[F];if(Q||re){var he=S.props.activeIndex!==void 0?S.props.activeIndex:F;return[L.cloneElement(S,mt(mt(mt({},R.props),oe),{},{activeIndex:he})),null,null]}if(!rr(je))return[ae].concat(ax(_.renderActivePoints({item:R,activePoint:je,basePoint:xe,childIndex:F,isRange:J})))}else{var Ne,ue=(Ne=_.getItemByXY(_.state.activeCoordinate))!==null&&Ne!==void 0?Ne:{graphicalItem:ae},rt=ue.graphicalItem,Te=rt.item,Pe=Te===void 0?S:Te,$e=rt.childIndex,Ve=mt(mt(mt({},R.props),oe),{},{activeIndex:$e});return[L.cloneElement(Pe,Ve),null,null]}return J?[ae,null,null]:[ae,null]}),kn(_,"renderCustomized",function(S,A,T){return L.cloneElement(S,mt(mt({key:"recharts-customized-".concat(T)},_.props),_.state))}),kn(_,"renderMap",{CartesianGrid:{handler:Fb,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Fb},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Fb},YAxis:{handler:Fb},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((j=w.id)!==null&&j!==void 0?j:_x("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=VW(_.triggeredAfterMouseMove,(N=w.throttleDelay)!==null&&N!==void 0?N:1e3/60),_.state={},_}return cke(x,y),ske(x,[{key:"componentDidMount",value:function(){var j,N;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,N=j.children,_=j.data,S=j.height,A=j.layout,T=Sl(N,bo);if(T){var R=T.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,k=zk(this.state,_,R,M),P=this.state.tooltipTicks[R].coordinate,O=(this.state.offset.top+S)/2,F=A==="horizontal",$=F?{x:P,y:O}:{y:P,x:O},G=this.state.formattedGraphicalItems.find(function(Y){var ee=Y.item;return ee.type.name==="Scatter"});G&&($=mt(mt({},$),G.props.points[R].tooltipPosition),k=G.props.points[R].tooltipPayload);var B={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:M,activePayload:k,activeCoordinate:$};this.setState(B),this.renderCursor(T),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,N){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==N.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var _,S;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(j){kA([Sl(j.children,bo)],[Sl(this.props.children,bo)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Sl(this.props.children,bo);if(j&&typeof j.props.shared=="boolean"){var N=j.props.shared?"axis":"item";return l.indexOf(N)>=0?N:i}return i}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var N=this.container,_=N.getBoundingClientRect(),S=hbe(_),A={chartX:Math.round(j.pageX-S.left),chartY:Math.round(j.pageY-S.top)},T=_.width/N.offsetWidth||1,R=this.inRange(A.chartX,A.chartY,T);if(!R)return null;var M=this.state,k=M.xAxisMap,P=M.yAxisMap,O=this.getTooltipEventType(),F=i9(this.state,this.props.data,this.props.layout,R);if(O!=="axis"&&k&&P){var $=Uh(k).scale,G=Uh(P).scale,B=$&&$.invert?$.invert(A.chartX):null,Y=G&&G.invert?G.invert(A.chartY):null;return mt(mt({},A),{},{xValue:B,yValue:Y},F)}return F?mt(mt({},A),F):null}},{key:"inRange",value:function(j,N){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,A=j/_,T=N/_;if(S==="horizontal"||S==="vertical"){var R=this.state.offset,M=A>=R.left&&A<=R.left+R.width&&T>=R.top&&T<=R.top+R.height;return M?{x:A,y:T}:null}var k=this.state,P=k.angleAxisMap,O=k.radiusAxisMap;if(P&&O){var F=Uh(P);return y7({x:A,y:T},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,N=this.getTooltipEventType(),_=Sl(j,bo),S={};_&&N==="axis"&&(_.props.trigger==="click"?S={onClick:this.handleClick}:S={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 A=H1(this.props,this.handleOuterEvent);return mt(mt({},A),S)}},{key:"addListener",value:function(){B4.on($4,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){B4.removeListener($4,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,N,_){for(var S=this.state.formattedGraphicalItems,A=0,T=S.length;A<T;A++){var R=S[A];if(R.item===j||R.props.key===j.key||N===zu(R.item.type)&&_===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,N=this.state.offset,_=N.left,S=N.top,A=N.height,T=N.width;return we.createElement("defs",null,we.createElement("clipPath",{id:j},we.createElement("rect",{x:_,y:S,height:A,width:T})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(N,_){var S=r9(_,2),A=S[0],T=S[1];return mt(mt({},N),{},kn({},A,T.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(N,_){var S=r9(_,2),A=S[0],T=S[1];return mt(mt({},N),{},kn({},A,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var N;return(N=this.state.xAxisMap)===null||N===void 0||(N=N[j])===null||N===void 0?void 0:N.scale}},{key:"getYScaleByAxisId",value:function(j){var N;return(N=this.state.yAxisMap)===null||N===void 0||(N=N[j])===null||N===void 0?void 0:N.scale}},{key:"getItemByXY",value:function(j){var N=this.state,_=N.formattedGraphicalItems,S=N.activeItem;if(_&&_.length)for(var A=0,T=_.length;A<T;A++){var R=_[A],M=R.props,k=R.item,P=k.type.defaultProps!==void 0?mt(mt({},k.type.defaultProps),k.props):k.props,O=zu(k.type);if(O==="Bar"){var F=(M.data||[]).find(function(Y){return k5e(j,Y)});if(F)return{graphicalItem:R,payload:F}}else if(O==="RadialBar"){var $=(M.data||[]).find(function(Y){return y7(j,Y)});if($)return{graphicalItem:R,payload:$}}else if(Jj(R,S)||Zj(R,S)||I0(R,S)){var G=ySe({graphicalItem:R,activeTooltipItem:S,itemData:P.data}),B=P.activeIndex===void 0?G:P.activeIndex;return{graphicalItem:mt(mt({},R),{},{childIndex:B}),payload:I0(R,S)?P.data[G]:R.props.data[G]}}}return null}},{key:"render",value:function(){var j=this;if(!ER(this))return null;var N=this.props,_=N.children,S=N.className,A=N.width,T=N.height,R=N.style,M=N.compact,k=N.title,P=N.desc,O=a9(N,JAe),F=Bn(O,!1);if(M)return we.createElement(IF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},we.createElement(EA,eg({},F,{width:A,height:T,title:k,desc:P}),this.renderClipPath(),OR(_,this.renderMap)));if(this.props.accessibilityLayer){var $,G;F.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,F.role=(G=this.props.role)!==null&&G!==void 0?G:"application",F.onKeyDown=function(Y){j.accessibilityManager.keyboardEvent(Y)},F.onFocus=function(){j.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return we.createElement(IF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},we.createElement("div",eg({className:or("recharts-wrapper",S),style:mt({position:"relative",curs
924or:"default",width:A,height:T},R)},B,{ref:function(ee){j.container=ee}}),we.createElement(EA,eg({},F,{width:A,height:T,title:k,desc:P,style:pke}),this.renderClipPath(),OR(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(L.Component);kn(b,"displayName",r),kn(b,"defaultProps",mt({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},u)),kn(b,"getDerivedStateFromProps",function(y,x){var w=y.dataKey,j=y.data,N=y.children,_=y.width,S=y.height,A=y.layout,T=y.stackOffset,R=y.margin,M=x.dataStartIndex,k=x.dataEndIndex;if(x.updateId===void 0){var P=o9(y);return mt(mt(mt({},P),{},{updateId:0},m(mt(mt({props:y},P),{},{updateId:0}),x)),{},{prevDataKey:w,prevData:j,prevWidth:_,prevHeight:S,prevLayout:A,prevStackOffset:T,prevMargin:R,prevChildren:N})}if(w!==x.prevDataKey||j!==x.prevData||_!==x.prevWidth||S!==x.prevHeight||A!==x.prevLayout||T!==x.prevStackOffset||!sg(R,x.prevMargin)){var O=o9(y),F={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},$=mt(mt({},i9(x,j,A)),{},{updateId:x.updateId+1}),G=mt(mt(mt({},O),F),$);return mt(mt(mt({},G),m(mt({props:y},G),x)),{},{prevDataKey:w,prevData:j,prevWidth:_,prevHeight:S,prevLayout:A,prevStackOffset:T,prevMargin:R,prevChildren:N})}if(!kA(N,x.prevChildren)){var B,Y,ee,J,H=Sl(N,Kg),q=H&&(B=(Y=H.props)===null||Y===void 0?void 0:Y.startIndex)!==null&&B!==void 0?B:M,K=H&&(ee=(J=H.props)===null||J===void 0?void 0:J.endIndex)!==null&&ee!==void 0?ee:k,te=q!==M||K!==k,re=!rr(j),Q=re&&!te?x.updateId:x.updateId+1;return mt(mt({updateId:Q},m(mt(mt({props:y},x),{},{updateId:Q,dataStartIndex:q,dataEndIndex:K}),x)),{},{prevChildren:N,dataStartIndex:q,dataEndIndex:K})}return null}),kn(b,"renderActiveDot",function(y,x,w){var j;return L.isValidElement(y)?j=L.cloneElement(y,x):qn(y)?j=y(x):j=we.createElement(Xj,x),we.createElement(ya,{className:"recharts-active-dot",key:w},j)});var g=L.forwardRef(function(x,w){return we.createElement(b,eg({},x,{ref:w}))});return g.displayName=b.displayName,g},Ske=ZP({chartName:"LineChart",GraphicalChild:vv,axisComponents:[{axisType:"xAxis",AxisComp:ed},{axisType:"yAxis",AxisComp:td}],formatAxisMap:zP}),qb=ZP({chartName:"BarChart",GraphicalChild:pc,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ed},{axisType:"yAxis",AxisComp:td}],formatAxisMap:zP}),Cke=ZP({chartName:"AreaChart",GraphicalChild:Nf,axisComponents:[{axisType:"xAxis",AxisComp:ed},{axisType:"yAxis",AxisComp:td}],formatAxisMap:zP});function Ake({nominations:e=[],tableBookings:t=[],sponsors:r=[],categories:a=[]}){var N,_;const[s,i]=L.useState("30days"),[o,l]=L.useState("all"),d=(()=>{const S=new Date;switch(s){case"7days":return{start:_y(S,7),end:S};case"30days":return{start:_y(S,30),end:S};case"90days":return{start:_y(S,90),end:S};case"year":return{start:z1(S),end:S};default:return{start:_y(S,30),end:S}}})(),h=S=>S.filter(A=>{const T=new Date(A.created_date);return T>=d.start&&T<=d.end}),u=h(e);h(t);const f=L.useMemo(()=>{const S=e.length,A={submitted:e.filter(k=>k.status==="submitted").length,under_review:e.filter(k=>k.status==="under_review").length,shortlisted:e.filter(k=>k.status==="shortlisted").length,finalist:e.filter(k=>k.status==="finalist").length,winner:e.filter(k=>k.status==="winner").length,declined:e.filter(k=>k.status==="declined").length,draft:e.filter(k=>k.status==="draft").length},T=S>0?(A.winner/S*100).toFixed(1):0,R=S>0?(A.shortlisted/S*100).toFixed(1):0,M=S>0?(A.declined/S*100).toFixed(1):0;return{total:S,byStatus:A,conversionRate:T,shortlistRate:R,declineRate:M,funnelStages:[{stage:"Submitted",count:A.submitted,color:"#10b981"},{stage:"Under Review",count:A.under_review,color:"#f59e0b"},{stage:"Shortlisted",count:A.shortlisted,color:"#3b82f6"},{stage:"Finalist",count:A.finalist,color:"#8b5cf6"},{stage:"Winner",count:A.winner,color:"#eab308"}]}},[e]),m=L.useMemo(()=>(s==="year"?fpe({start:d.start,end:d.end}):hpe({start:d.start,end:d.end})).map(A=>{const T=s==="year"?yt(A,"MMM yyyy"):yt(A,"MMM dd"),R=u.filter(M=>{const k=new Date(M.created_date);return s==="year"?yt(k,"MMM yyyy")===yt(A,"MMM yyyy"):yt(k,"MMM dd")===yt(A,"MMM dd")}).length;return{date:T,nominations:R}}),[u,s,d]),b=L.useMemo(()=>a.map(S=>{const A=e.filter(M=>M.category===S.title),T=A.length>0?A.reduce((M,k)=>M+(k.quality_score||0),0)/A.length:0,R=r.find(M=>{var k;return M.is_active&&((k=M.sponsored_categories)==null?void 0:k.includes(S.title))});return{name:S.title,nominations:A.length,avgScore:Math.round(T),winners:A.filter(M=>M.status==="winner").length,sponsored:!!R,sponsorName:(R==null?void 0:R.name)||"Not Sponsored"}}).sort((S,A)=>A.nominations-S.nominations),[e,a,r]),g=L.useMemo(()=>{const A=t.reduce((M,k)=>{var O;const P=((O=k.seats_detail)==null?void 0:O.filter(F=>F.guest_name&&F.guest_name.trim()!=="").length)||0;return M+P},0),T=250-A,R=(A/250*100).toFixed(1);return{totalSeats:250,allocatedSeats:A,availableSeats:T,occupancyRate:R,tables:{total:25,booked:t.length,available:25-t.length}}},[t]),y=L.useMemo(()=>{const S=e.filter(T=>T.quality_score),A=[{range:"90-100",min:90,max:100,count:0,color:"#10b981"},{range:"80-89",min:80,max:89,count:0,color:"#3b82f6"},{range:"70-79",min:70,max:79,count:0,color:"#f59e0b"},{range:"60-69",min:60,max:69,count:0,color:"#ef4444"},{range:"Below 60",min:0,max:59,count:0,color:"#6b7280"}];
924return S.forEach(T=>{const R=A.find(M=>T.quality_score>=M.min&&T.quality_score<=M.max);R&&R.count++}),A.filter(T=>T.count>0)},[e]),x=L.useMemo(()=>r.map(S=>{var k;const A=S.sponsored_categories||[],T=e.filter(P=>A.includes(P.category)),R=t.find(P=>P.table_number==="Table 25"),M=((k=R==null?void 0:R.seats_detail)==null?void 0:k.filter(P=>{var O;return(O=P.guest_name)==null?void 0:O.includes(S.name)}).length)||0;return{name:S.name,tier:S.tier,categoriesSponsored:A.length,nominations:T.length,complimentarySeats:M,isActive:S.is_active}}).sort((S,A)=>A.nominations-S.nominations),[r,e,t]),w=L.useMemo(()=>{const S=e.filter(F=>F.status==="draft").length,A=e.filter(F=>F.status==="submitted").length,T=e.filter(F=>F.status==="declined").length,R=e.length,M=R>0?(S/R*100).toFixed(1):0,k=R>0?(T/R*100).toFixed(1):0,P=R>0?((R-S)/R*100).toFixed(1):0,O=e.filter(F=>F.status==="draft"&&(!F.nomination_statement||F.nomination_statement.length<200)).length;return{drafts:S,submitted:A,declined:T,draftRate:M,declineRate:k,completionRate:P,incompleteDrafts:O,insights:[{type:M>20?"warning":"success",message:M>20?`High draft abandonment: ${M}% of nominations are incomplete`:`Good completion rate: Only ${M}% drafts`},{type:k>30?"warning":"info",message:k>30?`${k}% of nominations declined - consider guidance improvements`:`${k}% decline rate is within normal range`}]}},[e]),j=()=>{let S="data:text/csv;charset=utf-8,";S+=`NATIONAL CHARITY TODAY AWARDS - COMPREHENSIVE ANALYTICS REPORT
925`,S+=`Generated: ${new Date().toLocaleString("en-GB")}
926`,S+=`Report Period: ${yt(d.start,"d MMM yyyy")} - ${yt(d.end,"d MMM yyyy")}
927
928`,S+=`NOMINATIONS OVERVIEW
929`,S+=`Status,Count,Percentage
930`,Object.entries(f.byStatus).forEach(([R,M])=>{const k=e.length>0?(M/e.length*100).toFixed(1):0;S+=`${R},${M},${k}%
931`}),S+=`
932Total Nominations,${f.total}
933`,S+=`Conversion Rate (Winners),${f.conversionRate}%
934`,S+=`Shortlist Rate,${f.shortlistRate}%
935
936`,S+=`CATEGORY PERFORMANCE
937`,S+=`Category,Nominations,Average Score,Winners,Sponsored,Sponsor Name
938`,b.forEach(R=>{S+=`"${R.name}",${R.nominations},${R.avgScore},${R.winners},${R.sponsored?"Yes":"No"},"${R.sponsorName}"
939`}),S+=`
940`,S+=`TICKET SALES & EVENT CAPACITY
941`,S+=`Total Seats Available,${g.totalSeats}
942`,S+=`Seats Allocated,${g.allocatedSeats}
943`,S+=`Seats Remaining,${g.availableSeats}
944`,S+=`Occupancy Rate,${g.occupancyRate}%
945`,S+=`Tables Booked,${g.tables.booked}
946`,S+=`Tables Available,${g.tables.available}
947
948`,S+=`SPONSOR VISIBILITY METRICS
949`,S+=`Sponsor Name,Tier,Categories Sponsored,Nominations in Categories,Complimentary Seats,Status
950`,x.forEach(R=>{S+=`"${R.name}",${R.tier},${R.categoriesSponsored},${R.nominations},${R.complimentarySeats},${R.isActive?"Active":"Inactive"}
951`});const A=encodeURI(S),T=document.createElement("a");T.setAttribute("href",A),T.setAttribute("download",`NCTA_Analytics_Report_${yt(new Date,"yyyy-MM-dd")}.csv`),document.body.appendChild(T),T.click(),document.body.removeChild(T)};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(km,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Analytics & Insights"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Comprehensive reporting on nominations, tickets, and sponsor engagement"})]})]}),n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(Qt,{value:s,onValueChange:i,children:[n.jsx(Kt,{className:"w-[180px]",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"7days",children:"Last 7 Days"}),n.jsx(Ae,{value:"30days",children:"Last 30 Days"}),n.jsx(Ae,{value:"90days",children:"Last 90 Days"}),n.jsx(Ae,{value:"year",children:"This Year"})]})]}),n.jsxs(me,{onClick:j,className:"bg-primary-navy hover:opacity-90 text-white font-semibold",children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Download Report"]})]})}),n.jsxs("div",{className:"grid md:grid-cols-4 gap-6",children:[n.jsx(_e,{className:"border-2 border-blue-200 bg-gradient-to-br from-blue-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-600",children:"Total Nominations"}),n.jsx(bn,{className:"w-5 h-5 text-blue-600"})]}),n.jsx("div",{className:"text-3xl font-bold text-blue-900",children:e.length}),n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[u.length," in selected period"]})]})}),n.jsx(_e,{className:"border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-600",children:"Winner Conversion"}),n.jsx(Tm,{className:"w-5 h-5 text-green-600"})]}),n.jsxs("div",{className:"text-3xl font-bold text-green-900",children:[f.conversionRate,"%"]}),n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[f.byStatus.winner," winners from ",f.total," nominations"]})]})}),n.jsx(_e,{className:"border-2 border-purple-200 bg-gradient-to-br from-purple-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-600",children:"Event Capacity"}),n.jsx(Jr,{className:"w-5 h-5 text-purple-600"})]}),n.jsxs("div",{className:"text-3xl font-bold text-purple-900",children:[g.occupancyRate,"%"]}),n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[g.allocatedSeats,"/",g.totalSeats," seats allocated"]})]})}),n.jsx(_e,{className:"border-2 border-orange-200 bg-gradient-to-br from-orange-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-600",children:"Avg Quality Score"}),n.jsx(pZ,{className:"w-5 h-5 text-orange-600"})]}),n.jsx("div",{className:"text-3xl font-bold text-orange-900",children:e.filter(S=>S.quality_score).length>0?Math.round(e.filter(S=>S.quality_score).reduce((S,A)=>S+A.quality_score,0)/e.filter(S=>S.quality_score).length):"N/A"}),n.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[e.filter(S=>S.quality_score).length," scored nominations"]})]})})]}),n.jsxs(nl,{defaultValue:"funnel",className:"space-y-6",children:[n.jsxs(wo,{children:[n.jsx(ln,{value:"funnel",children:"Nomination Funnel"}),n.jsx(ln,{value:"trends",children:"Trends Over Time"}),n.jsx(ln,{value:"categories",children:"Category Analysis"}),n.jsx(ln,{value:"sponsors",children:"Sponsor ROI"}),n.jsx(ln,{value:"tickets",children:"Ticket Sales"}),n.jsx(ln,{value:"dropoffs",children:"Drop-Off Analysis"})]}),n.jsx(cn,{value:"funnel",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(ka,{className:"w-5 h-5 text-blue-600"}),"Nomination Journey Funnel"]}),n.jsx(wr,{children:"Track progression from submission to winner"})]}),n.jsx(Ce,{children:n.jsx(Ep,{width:"100%",height:350,children:n.jsxs(qb,{data:f.funnelStages,children:[n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"stage",angle:-15,textAnchor:"end",height:80}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(pc,{dataKey:"count",radius:[8,8,0,0],children:f.funnelStages.map((S,A)=>n.jsx(nw,{fill:S.color},`cell-${A}`))})]})})})]}),n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Mq,{className:"w-5 h-5 text-purple-600"}),"Status Distribution"]}),n.jsx(wr,{children:"Current status breakdown"})]}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-3",children:Object.entries(f.byStatus).map(([S,A])=>{const T=e.length>0?(A/e.length*100).toFixed(1):0;return n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:S.replace("_"," ")}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"text-right",children:[n.jsx("div",{className:"text-lg font-bold text-gray-900",children:A}),n.jsxs("div",{className:"text-xs text-gray-500",children:[T,"%"]})]}),n.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:n.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-500",style:{width:`${T}%`}})})]})]},S)})})})]})]})}),n.jsx(cn,{value:"trends",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(za,{className:"w-5 h-5 text-green-600"}),"Nomination Submissions Over Time"]}),n.jsx(wr,{children:"Daily/monthly nomination volume trends"})]}),n.jsx(Ce,{children:n.jsx(Ep,{width:"100%",height:400,children:n.jsxs(Cke,{data:m,children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"colorNominations",x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{offset:"5%",
951stopColor:"#3b82f6",stopOpacity:.8}),n.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]})}),n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"date",angle:-45,textAnchor:"end",height:80}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(Nf,{type:"monotone",dataKey:"nominations",stroke:"#3b82f6",fillOpacity:1,fill:"url(#colorNominations)"})]})})})]})}),n.jsx(cn,{value:"categories",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-amber-600"}),"Category Performance Analysis"]}),n.jsx(wr,{children:"Nominations, average scores, and sponsorship by category"})]}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-3",children:b.map((S,A)=>n.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg border-2 border-gray-200 hover:border-accent-gold transition-colors",children:[n.jsx("div",{className:"flex items-start justify-between mb-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"font-bold text-primary-navy mb-1",children:S.name}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[S.sponsored&&n.jsxs(dt,{className:"bg-green-600 text-white text-xs",children:["Sponsored by ",S.sponsorName]}),!S.sponsored&&n.jsx(dt,{className:"bg-gray-400 text-white text-xs",children:"Available for Sponsorship"})]})]})}),n.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200",children:[n.jsx("div",{className:"text-2xl font-bold text-blue-600",children:S.nominations}),n.jsx("div",{className:"text-xs text-gray-600",children:"Nominations"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200",children:[n.jsx("div",{className:"text-2xl font-bold text-purple-600",children:S.avgScore||"N/A"}),n.jsx("div",{className:"text-xs text-gray-600",children:"Avg Score"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200",children:[n.jsx("div",{className:"text-2xl font-bold text-amber-600",children:S.winners}),n.jsx("div",{className:"text-xs text-gray-600",children:"Winners"})]})]})]},A))})})]})}),n.jsx(cn,{value:"sponsors",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(ms,{className:"w-5 h-5 text-indigo-600"}),"Sponsor Visibility & ROI"]}),n.jsx(wr,{children:"Track sponsor engagement and value delivery"})]}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-3",children:x.map((S,A)=>n.jsxs("div",{className:`p-5 rounded-lg border-2 transition-all ${S.isActive?"bg-gradient-to-r from-blue-50 to-purple-50 border-blue-200 hover:border-blue-400":"bg-gray-50 border-gray-200 opacity-60"}`,children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-primary-navy text-lg",children:S.name}),n.jsx(dt,{className:S.tier==="headline"?"bg-amber-500 text-white":S.tier==="gold"?"bg-yellow-500 text-white":S.tier==="silver"?"bg-gray-400 text-white":S.tier==="bronze"?"bg-orange-600 text-white":"bg-blue-500 text-white",children:S.tier.toUpperCase()})]}),!S.isActive&&n.jsx(dt,{className:"bg-gray-500 text-white",children:"Inactive"})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200 text-center",children:[n.jsx("div",{className:"text-xl font-bold text-indigo-600",children:S.categoriesSponsored}),n.jsx("div",{className:"text-xs text-gray-600",children:"Categories"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200 text-center",children:[n.jsx("div",{className:"text-xl font-bold text-blue-600",children:S.nominations}),n.jsx("div",{className:"text-xs text-gray-600",children:"Nominations"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-gray-200 text-center",children:[n.jsx("div",{className:"text-xl font-bold text-purple-600",children:S.complimentarySeats}),n.jsx("div",{className:"text-xs text-gray-600",children:"Event Seats"})]})]})]},A))})})]})}),n.jsx(cn,{value:"tickets",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-5 h-5 text-emerald-600"}),"Event Capacity Overview"]}),n.jsx(wr,{children:"Real-time seating and booking status"})]}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"text-center p-6 bg-gradient-to-br from-emerald-50 to-blue-50 rounded-xl border-2 border-emerald-200",children:[n.jsxs("div",{className:"text-5xl font-bold text-emerald-900 mb-2",children:[g.occupancyRate,"%"]}),n.jsx("div",{className:"text-sm font-semibold text-emerald-700",children:"Event Capacity Filled"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-gray-200 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-blue-900",children:g.allocatedSeats}),n.jsx("div",{className:"text-xs text-gray-600 mt-1",children:"Seats Allocated"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-gray-200 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:g.availableSeats}),n.jsx("div",{className:"text-xs text-gray-600 mt-1",children:"Seats Available"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-green-200 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-900",children:g.tables.booked}),n.jsx("div",{className:"text-xs text-gray-600 mt-1",children:"Tables Booked"})]}),n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-orange-200 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-900",children:g.tables.available}),n.jsx("div",{className:"text-xs text-gray-600 mt-1",children:"Tables Available"})]})]})]})})]}),n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(km,{className:"w-5 h-5 text-blue-600"}),"Quality Score Distribution"]}),n.jsx(wr,{children:"Nomination quality breakdown"})]}),n.jsx(Ce,{children:y.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(eo,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),n.jsx("p",{children:"No nominations have been scored yet."})]}):n.jsx(Ep,{width:"100%",height:350,children:n.jsxs(qb,{data:y,children:[n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"range"}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(pc,{dataKey:"count",radius:[8,8,0,0],children:y.map((S,A)=>n.jsx(nw,{fill:S.color},`cell-${A}`))})]})})})]})]})}),n.jsx(cn,{value:"trends",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(ka,{className:"w-5 h-5 text-blue-600"}),"Submission Trends"]}),n.jsx(wr,{children:"Monitor nomination submission patterns"})]}),n.jsxs(Ce,{children:[n.jsx(Ep,{width:"100%",height:400,children:n.jsxs(Ske,{data:m,children:[n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"date",angle:-45,textAnchor:"end",height:80}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(Hu,{}),n.jsx(vv,{type:"monotone",dataKey:"nominations",stroke:"#3b82f6",strokeWidth:3,dot:{r:4}})]})}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4 mt-6",children:[n.jsxs("div",{className:"bg-blue-50 rounded-lg p-4 border border-blue-200",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Peak Day"}),n.jsx("div",{className:"text-xl font-bold text-blue-900",children:((N=m.reduce((S,A)=>A.nominations>S.nominations?A:S,m[0]))==null?void 0:N.date)||"N/A"}),n.jsxs("div",{className:"text-xs text-gray-500",children:[((_=m.reduce((S,A)=>A.nominations>S.nominations?A:S,m[0]))==null?void 0:_.nominations)||0," nominations"]})]}),n.jsxs("div",{className:"bg-green-50 rounded-lg p-4 border border-green-200",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Average per Day"}),n.jsx("div",{className:"text-xl font-bold text-green-900",children:m.length>0?(m.reduce((S,A)=>S+A.nominations,0)/m.length).toFixed(1):0})]}),n.jsxs("div",{className:"bg-purple-50 rounded-lg p-4 border border-purple-200",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"In Selected Period"}),n.jsx("div",{className:"text-xl font-bold text-purple-900",children:u.length}),n.jsx("div",{className:"text-xs text-gray-500",children:"nominations"})]})]})]})]})}),n.jsx(cn,{value:"categories",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-amber-600"}),"Category Performance Comparison"]}),n.jsx(wr,{children:"Compare nomination volumes and quality across categories"})]}),n.jsx(Ce,{children:n.jsx(Ep,{width:"100%",height:400,children:n.jsxs(qb,{data:b,children:[n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"name",angle:-45,textAnchor:"end",height:120,interval:0}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(Hu,{}),n.jsx(pc,{dataKey:"nominations",fill:"#3b82f6",name:"Nominations",radius:[4,4,0,0]}
951),n.jsx(pc,{dataKey:"avgScore",fill:"#8b5cf6",name:"Avg Score",radius:[4,4,0,0]})]})})})]})}),n.jsx(cn,{value:"sponsors",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(ms,{className:"w-5 h-5 text-indigo-600"}),"Detailed Sponsor ROI Analysis"]}),n.jsx(wr,{children:"Visibility metrics and value per sponsor tier"})]}),n.jsxs(Ce,{children:[n.jsx("div",{className:"mb-6",children:n.jsx(Ep,{width:"100%",height:300,children:n.jsxs(qb,{data:x.filter(S=>S.isActive),children:[n.jsx(Jf,{strokeDasharray:"3 3"}),n.jsx(ed,{dataKey:"name",angle:-30,textAnchor:"end",height:100}),n.jsx(td,{}),n.jsx(bo,{}),n.jsx(Hu,{}),n.jsx(pc,{dataKey:"nominations",fill:"#6366f1",name:"Nominations in Sponsored Categories",radius:[4,4,0,0]}),n.jsx(pc,{dataKey:"complimentarySeats",fill:"#10b981",name:"Complimentary Seats",radius:[4,4,0,0]})]})})}),n.jsx("div",{className:"grid md:grid-cols-5 gap-3 mt-6",children:["headline","gold","silver","bronze","partner"].map(S=>{const A=r.filter(T=>T.tier===S&&T.is_active).length;return n.jsxs("div",{className:`p-4 rounded-lg border-2 text-center ${S==="headline"?"bg-amber-50 border-amber-300":S==="gold"?"bg-yellow-50 border-yellow-300":S==="silver"?"bg-gray-100 border-gray-300":S==="bronze"?"bg-orange-50 border-orange-300":"bg-blue-50 border-blue-300"}`,children:[n.jsx("div",{className:"text-2xl font-bold text-gray-900",children:A}),n.jsx("div",{className:"text-xs text-gray-600 capitalize mt-1",children:S})]},S)})})]})]})}),n.jsx(cn,{value:"tickets",children:n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-5 h-5 text-emerald-600"}),"Ticket Purchase Journey"]}),n.jsx(wr,{children:"Analyze booking patterns and capacity trends"})]}),n.jsx(Ce,{children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h4",{className:"font-semibold text-gray-900",children:"Seating Capacity Progress"}),n.jsxs("div",{className:"relative pt-1",children:[n.jsxs("div",{className:"flex mb-2 items-center justify-between",children:[n.jsx("div",{children:n.jsxs("span",{className:"text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-emerald-600 bg-emerald-200",children:[g.allocatedSeats," of ",g.totalSeats," seats"]})}),n.jsx("div",{className:"text-right",children:n.jsxs("span",{className:"text-xs font-semibold inline-block text-emerald-600",children:[g.occupancyRate,"%"]})})]}),n.jsx("div",{className:"overflow-hidden h-4 mb-4 text-xs flex rounded-full bg-gray-200",children:n.jsx("div",{style:{width:`${g.occupancyRate}%`},className:"shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-gradient-to-r from-emerald-500 to-blue-600 transition-all duration-500"})})]}),n.jsxs("div",{className:"space-y-3 mt-6",children:[n.jsx("div",{className:"p-4 bg-emerald-50 rounded-lg border border-emerald-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Total Tables"}),n.jsx("span",{className:"text-2xl font-bold text-emerald-900",children:"25"})]})}),n.jsx("div",{className:"p-4 bg-blue-50 rounded-lg border border-blue-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Tables Booked"}),n.jsx("span",{className:"text-2xl font-bold text-blue-900",children:g.tables.booked})]})}),n.jsx("div",{className:"p-4 bg-gray-50 rounded-lg border border-gray-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Tables Available"}),n.jsx("span",{className:"text-2xl font-bold text-gray-900",children:g.tables.available})]})})]})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-gray-900 mb-4",children:"Recent Bookings Timeline"}),n.jsxs("div",{className:"space-y-3 max-h-[400px] overflow-y-auto",children:[t.sort((S,A)=>new Date(A.created_date)-new Date(S.created_date)).slice(0,10).map((S,A)=>{var T;return n.jsxs("div",{className:"p-3 bg-white rounded-lg border border-gray-200 hover:border-blue-300 transition-colors",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"font-semibold text-primary-navy",children:S.table_number}),n.jsxs(dt,{className:"bg-blue-100 text-blue-800 text-xs",children:[((T=S.seats_detail)==null?void 0:T.filter(R=>R.guest_name).length)||0," seats"]})]}),n.jsx("div",{className:"text-sm text-gray-600",children:S.organization}),n.jsx("div",{className:"text-xs text-gray-500 mt-1",children:yt(new Date(S.created_date),"d MMM yyyy, h:mm a")})]},S.id)}),t.length===0&&n.jsxs("div",{className:"text-center py-8 text-gray-400",children:[n.jsx(Jr,{className:"w-12 h-12 mx-auto mb-2 opacity-30"}),n.jsx("p",{className:"text-sm",children:"No bookings yet"})]})]})]})]})})]})}),n.jsx(cn,{value:"dropoffs",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(eo,{className:"w-5 h-5 text-orange-600"}),"Nomination Drop-Off Points"]}),n.jsx(wr,{children:"Identify where users abandon the process"})]}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-5 bg-gradient-to-r from-orange-50 to-red-50 rounded-lg border-2 border-orange-200",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx("div",{className:"w-12 h-12 bg-orange-500 rounded-full flex items-center justify-center",children:n.jsx(o3,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-2xl font-bold text-orange-900",children:[w.draftRate,"%"]}),n.jsx("div",{className:"text-sm text-orange-700",children:"Draft Abandonment Rate"})]})]}),n.jsxs("p",{className:"text-sm text-gray-700",children:[w.drafts," nominations started but not submitted (",w.incompleteDrafts," with minimal information)"]})]}),n.jsxs("div",{className:"p-5 bg-gradient-to-r from-green-50 to-emerald-50 rounded-lg border-2 border-green-200",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx("div",{className:"w-12 h-12 bg-green-500 rounded-full flex items-center justify-center",children:n.jsx(Cn,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-2xl font-bold text-green-900",children:[w.completionRate,"%"]}),n.jsx("div",{className:"text-sm text-green-700",children:"Completion Rate"})]})]}),n.jsxs("p",{className:"text-sm text-gray-700",children:[w.submitted," nominations successfully submitted"]})]}),n.jsxs("div",{className:"space-y-2 mt-6",children:[n.jsx("h4",{className:"font-semibold text-gray-900 mb-3",children:"Key Insights"}),w.insights.map((S,A)=>n.jsx("div",{className:`p-4 rounded-lg border-2 ${S.type==="warning"?"bg-yellow-50 border-yellow-300":S.type==="success"?"bg-green-50 border-green-300":"bg-blue-50 border-blue-300"}`,children:n.jsx("p",{className:"text-sm text-gray-800 font-medium",children:S.message})},A))]})]})})]}),n.jsxs(_e,{className:"shadow-xl border-none",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Tm,{className:"w-5 h-5 text-purple-600"}),"Recommended Actions"]}),n.jsx(wr,{children:"Data-driven suggestions to improve performance"})]}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[w.draftRate>20&&n.jsx("div",{className:"p-4 bg-amber-50 border-2 border-amber-300 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(eo,{className:"w-5 h-5 text-amber-600 mt-1"}),n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-amber-900 mb
951-1",children:"High Draft Rate Detected"}),n.jsxs("p",{className:"text-sm text-amber-800 mb-2",children:[w.draftRate,"% of users start but don't complete nominations."]}),n.jsxs("ul",{className:"text-xs text-amber-700 space-y-1 ml-4 list-disc",children:[n.jsx("li",{children:"Consider adding more guidance to the nomination form"}),n.jsx("li",{children:"Send reminder emails to users with drafts"}),n.jsx("li",{children:"Simplify the form or break it into steps"})]})]})]})}),b.some(S=>!S.sponsored&&S.nominations>5)&&n.jsx("div",{className:"p-4 bg-blue-50 border-2 border-blue-300 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(ms,{className:"w-5 h-5 text-blue-600 mt-1"}),n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-blue-900 mb-1",children:"Sponsorship Opportunities"}),n.jsx("p",{className:"text-sm text-blue-800 mb-2",children:"High-performing categories without sponsors:"}),n.jsx("ul",{className:"text-xs text-blue-700 space-y-1 ml-4 list-disc",children:b.filter(S=>!S.sponsored&&S.nominations>5).slice(0,3).map((S,A)=>n.jsxs("li",{children:[S.name," (",S.nominations," nominations)"]},A))})]})]})}),g.occupancyRate<50&&n.jsx("div",{className:"p-4 bg-purple-50 border-2 border-purple-300 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Jr,{className:"w-5 h-5 text-purple-600 mt-1"}),n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-purple-900 mb-1",children:"Low Event Capacity"}),n.jsxs("p",{className:"text-sm text-purple-800 mb-2",children:["Only ",g.occupancyRate,"% of seats filled."]}),n.jsxs("ul",{className:"text-xs text-purple-700 space-y-1 ml-4 list-disc",children:[n.jsx("li",{children:"Launch targeted marketing campaign"}),n.jsx("li",{children:"Offer early bird pricing or group discounts"}),n.jsx("li",{children:"Promote to past attendees and nominees"})]})]})]})}),e.filter(S=>S.quality_score&&S.quality_score<60).length>e.length*.3&&n.jsx("div",{className:"p-4 bg-red-50 border-2 border-red-300 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Ju,{className:"w-5 h-5 text-red-600 mt-1"}),n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-red-900 mb-1",children:"Quality Score Concern"}),n.jsxs("p",{className:"text-sm text-red-800 mb-2",children:[(e.filter(S=>S.quality_score&&S.quality_score<60).length/e.length*100).toFixed(0),"% of scored nominations are below 60/100."]}),n.jsxs("ul",{className:"text-xs text-red-700 space-y-1 ml-4 list-disc",children:[n.jsx("li",{children:"Improve AI Assistant prompts and suggestions"}),n.jsx("li",{children:"Add example nominations or templates"}),n.jsx("li",{children:"Provide more detailed submission guidelines"})]})]})]})}),w.insights.length===0&&w.draftRate<=20&&n.jsx("div",{className:"p-4 bg-green-50 border-2 border-green-300 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-green-600 mt-1"}),n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-green-900 mb-1",children:"Strong Performance"}),n.jsx("p",{className:"text-sm text-green-800",children:"Nomination completion rate is healthy. Continue current approach and monitor for changes."})]})]})})]})})]})]})})]})]})}var h1={exports:{}};/*!
952 * Quill Editor v1.3.7
953 * https://quilljs.com/
954 * Copyright (c) 2014, Jason Chen
955 * Copyright (c) 2013, salesforce.com
956 */var kke=h1.exports,c9;function Pke(){return c9||(c9=1,(function(e,t){(function(a,s){e.exports=s()})(typeof self<"u"?self:kke,function(){return(function(r){var a={};function s(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return r[i].call(o.exports,o,o.exports,s),o.l=!0,o.exports}return s.m=r,s.c=a,s.d=function(i,o,l){s.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:l})},s.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return s.d(o,"a",o),o},s.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},s.p="",s(s.s=109)})([(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(17),o=s(18),l=s(19),c=s(45),d=s(46),h=s(47),u=s(48),f=s(49),m=s(12),b=s(32),g=s(33),y=s(31),x=s(1),w={Scope:x.Scope,create:x.create,find:x.find,query:x.query,register:x.register,Container:i.default,Format:o.default,Leaf:l.default,Embed:u.default,Scroll:c.default,Block:h.default,Inline:d.default,Text:f.default,Attributor:{Attribute:m.default,Class:b.default,Style:g.default,Store:y.default}};a.default=w}),(function(r,a,s){var i=this&&this.__extends||(function(){var y=Object.
vendor: 39,124 bytes, lines 956-969
956setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,w){x.__proto__=w}||function(x,w){for(var j in w)w.hasOwnProperty(j)&&(x[j]=w[j])};return function(x,w){y(x,w);function j(){this.constructor=x}x.prototype=w===null?Object.create(w):(j.prototype=w.prototype,new j)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=(function(y){i(x,y);function x(w){var j=this;return w="[Parchment] "+w,j=y.call(this,w)||this,j.message=w,j.name=j.constructor.name,j}return x})(Error);a.ParchmentError=o;var l={},c={},d={},h={};a.DATA_KEY="__blot";var u;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(u=a.Scope||(a.Scope={}));function f(y,x){var w=b(y);if(w==null)throw new o("Unable to create "+y+" blot");var j=w,N=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:j.create(x);return new j(N,x)}a.create=f;function m(y,x){return x===void 0&&(x=!1),y==null?null:y[a.DATA_KEY]!=null?y[a.DATA_KEY].blot:x?m(y.parentNode,x):null}a.find=m;function b(y,x){x===void 0&&(x=u.ANY);var w;if(typeof y=="string")w=h[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)w=h.text;else if(typeof y=="number")y&u.LEVEL&u.BLOCK?w=h.block:y&u.LEVEL&u.INLINE&&(w=h.inline);else if(y instanceof HTMLElement){var j=(y.getAttribute("class")||"").split(/\s+/);for(var N in j)if(w=c[j[N]],w)break;w=w||d[y.tagName]}return w==null?null:x&u.LEVEL&w.scope&&x&u.TYPE&w.scope?w:null}a.query=b;function g(){for(var y=[],x=0;x<arguments.length;x++)y[x]=arguments[x];if(y.length>1)return y.map(function(N){return g(N)});var w=y[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new o("Invalid definition");if(w.blotName==="abstract")throw new o("Cannot register abstract class");if(h[w.blotName||w.attrName]=w,typeof w.keyName=="string")l[w.keyName]=w;else if(w.className!=null&&(c[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(N){return N.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var j=Array.isArray(w.tagName)?w.tagName:[w.tagName];j.forEach(function(N){(d[N]==null||w.className==null)&&(d[N]=w)})}return w}a.register=g}),(function(r,a,s){var i=s(51),o=s(11),l=s(3),c=s(20),d="\0",h=function(u){Array.isArray(u)?this.ops=u:u!=null&&Array.isArray(u.ops)?this.ops=u.ops:this.ops=[]};h.prototype.insert=function(u,f){var m={};return u.length===0?this:(m.insert=u,f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(m.attributes=f),this.push(m))},h.prototype.delete=function(u){return u<=0?this:this.push({delete:u})},h.prototype.retain=function(u,f){if(u<=0)return this;var m={retain:u};return f!=null&&typeof f=="object"&&Object.keys(f).length>0&&(m.attributes=f),this.push(m)},h.prototype.push=function(u){var f=this.ops.length,m=this.ops[f-1];if(u=l(!0,{},u),typeof m=="object"){if(typeof u.delete=="number"&&typeof m.delete=="number")return this.ops[f-1]={delete:m.delete+u.delete},this;if(typeof m.delete=="number"&&u.insert!=null&&(f-=1,m=this.ops[f-1],typeof m!="object"))return this.ops.unshift(u),this;if(o(u.attributes,m.attributes)){if(typeof u.insert=="string"&&typeof m.insert=="string")return this.ops[f-1]={insert:m.insert+u.insert},typeof u.attributes=="object"&&(this.ops[f-1].attributes=u.attributes),this;if(typeof u.retain=="number"&&typeof m.retain=="number")return this.ops[f-1]={retain:m.retain+u.retain},typeof u.attributes=="object"&&(this.ops[f-1].attributes=u.attributes),this}}return f===this.ops.length?this.ops.push(u):this.ops.splice(f,0,u),this},h.prototype.chop=function(){var u=this.ops[this.ops.length-1];return u&&u.retain&&!u.attributes&&this.ops.pop(),this},h.prototype.filter=function(u){return this.ops.filter(u)},h.prototype.forEach=function(u){this.ops.forEach(u)},h.prototype.map=function(u){return this.ops.map(u)},h.prototype.partition=function(u){var f=[],m=[];return this.forEach(function(b){var g=u(b)?f:m;g.push(b)}),[f,m]},h.prototype.reduce=function(u,f){return this.ops.reduce(u,f)},h.prototype.changeLength=function(){return this.reduce(function(u,f){return f.insert?u+c.length(f):f.delete?u-f.delete:u},0)},h.prototype.length=function(){return this.reduce(function(u,f){return u+c.length(f)},0)},h.prototype.slice=function(u,f){u=u||0,typeof f!="number"&&(f=1/0);for(var m=[],b=c.iterator(this.ops),g=0;g<f&&b.hasNext();){var y;g<u?y=b.next(u-g):(y=b.next(f-g),m.push(y)),g+=c.length(y)}return new h(m)},h.prototype.compose=function(u){var f=c.iterator(this.ops),m=c.iterator(u.ops),b=[],g=m.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var y=g.retain;f.peekType()==="insert"&&f.peekLength()<=y;)y-=f.peekLength(),b.push(f.next());g.retain-y>0&&m.next(g.retain-y)}for(var x=new h(b);f.hasNext()||m.hasNext();)if(m.peekType()==="insert")x.push(m.next());else if(f.peekType()==="delete")x.push(f.next());else{var w=Math.min(f.peekLength(),m.peekLength()),j=f.next(w),N=m.next(w);if(typeof N.retain=="number"){var _={};typeof j.retain=="number"?_.retain=w:_.insert=j.insert;var S=c.attributes.compose(j.attributes,N.attributes,typeof j.retain=="number");if(S&&(_.attributes=S),x.push(_),!m.hasNext()&&o(x.ops[x.ops.length-1],_)){var A=new h(f.rest());return x.concat(A).chop()}}else typeof N.delete=="number"&&typeof j.retain=="number"&&x.push(N)}return x.chop()},h.prototype.concat=function(u){var f=new h(this.ops.slice());return u.ops.length>0&&(f.push(u.ops[0]),f.ops=f.ops.concat(u.ops.slice(1))),f},h.prototype.diff=function(u,f){if(this.ops===u.ops)return new h;var m=[this,u].map(function(w){return w.map(function(j){if(j.insert!=null)return typeof j.insert=="string"?j.insert:d;var N=w===u?"on":"with";throw new Error("diff() called "+N+" non-document")}).join("")}),b=new h,g=i(m[0],m[1],f),y=c.iterator(this.ops),x=c.iterator(u.ops);return g.forEach(function(w){for(var j=w[1].length;j>0;){var N=0;switch(w[0]){case i.INSERT:N=Math.min(x.peekLength(),j),b.push(x.next(N));break;case i.DELETE:N=Math.min(j,y.peekLength()),y.next(N),b.delete(N);break;case i.EQUAL:N=Math.min(y.peekLength(),x.peekLength(),j);var _=y.next(N),S=x.next(N);o(_.insert,S.insert)?b.retain(N,c.attributes.diff(_.attributes,S.attributes)):b.push(S).delete(N);break}j-=N}}),b.chop()},h.prototype.eachLine=function(u,f){f=f||`
957`;for(var m=c.iterator(this.ops),b=new h,g=0;m.hasNext();){if(m.peekType()!=="insert")return;var y=m.peek(),x=c.length(y)-m.peekLength(),w=typeof y.insert=="string"?y.insert.indexOf(f,x)-x:-1;if(w<0)b.push(m.next());else if(w>0)b.push(m.next(w));else{if(u(b,m.next(1).attributes||{},g)===!1)return;g+=1,b=new h}}b.length()>0&&u(b,{},g)},h.prototype.transform=function(u,f){if(f=!!f,typeof u=="number")return this.transformPosition(u,f);for(var m=c.iterator(this.ops),b=c.iterator(u.ops),g=new h;m.hasNext()||b.hasNext();)if(m.peekType()==="insert"&&(f||b.peekType()!=="insert"))g.retain(c.length(m.next()));else if(b.peekType()==="insert")g.push(b.next());else{var y=Math.min(m.peekLength(),b.peekLength()),x=m.next(y),w=b.next(y);if(x.delete)continue;w.delete?g.push(w):g.retain(y,c.attributes.transform(x.attributes,w.attributes,f))}return g.chop()},h.prototype.transformPosition=function(u,f){f=!!f;for(var m=c.iterator(this.ops),b=0;m.hasNext()&&b<=u;){var g=m.peekLength(),y=m.peekType();if(m.next(),y==="delete"){u-=Math.min(g,u-b);continue}else y==="insert"&&(b<u||!f)&&(u+=g);b+=g}return u},r.exports=h}),(function(r,a){var s=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},d=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var b=s.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&s.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!g)return!1;var y;for(y in m);return typeof y>"u"||s.call(m,y)},h=function(m,b){o&&b.name==="__proto__"?o(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},u=function(m,b){if(b==="__proto__")if(s.call(m,b)){if(l)return l(m,b).value}else return;return m[b]};r.exports=function f(){var m,b,g,y,x,w,j=arguments[0],N=1,_=arguments.length,S=!1;for(typeof j=="boolean"&&(S=j,j=arguments[1]||{},N=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});N<_;++N)if(m=arguments[N],m!=null)for(b in m)g=u(j,b),y=u(m,b),j!==y&&(S&&y&&(d(y)||(x=c(y)))?(x?(x=!1,w=g&&c(g)?g:[]):w=g&&d(g)?g:{},h(j,{name:b,newValue:f(S,w,y)})):typeof y<"u"&&h(j,{name:b,newValue:y}));return j}}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.BlockEmbed=a.bubbleFormats=void 0;var i=(function(){function k(P,O){for(var F=0;F<O.length;F++){var $=O[F];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(P,$.key,$)}}return function(P,O,F){return O&&k(P.prototype,O),F&&k(P,F),P}})(),o=function k(P,O,F){P===null&&(P=Function.prototype);var $=Object.getOwnPropertyDescriptor(P,O);if($===void 0){var G=Object.getPrototypeOf(P);return G===null?void 0:k(G,O,F)}else{if("value"in $)return $.value;var B=$.get;return B===void 0?void 0:B.call(F)}},l=s(3),c=j(l),d=s(2),h=j(d),u=s(0),f=j(u),m=s(16),b=j(m),g=s(6),y=j(g),x=s(7),w=j(x);function j(k){return k&&k.__esModule?k:{default:k}}function N(k,P){if(!(k instanceof P))throw new TypeError("Cannot call a class as a function")}function _(k,P){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:k}function S(k,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);k.prototype=Object.create(P&&P.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(k,P):k.__proto__=P)}var A=1,T=(function(k){S(P,k);function P(){return N(this,P),_(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return i(P,[{key:"attach",value:function(){o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"attach",this).call(this),this.attributes=new f.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new h.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,$){var G=f.default.query(F,f.default.Scope.BLOCK_ATTRIBUTE);G!=null&&this.attributes.attribute(G,$)}},{key:"formatAt",value:function(F,$,G,B){this.format(G,B)}},{key:"insertAt",value:function(F,$,G){if(typeof $=="string"&&$.endsWith(`
958`)){var B=f.default.create(R.blotName);this.parent.insertBefore(B,F===0?this:this.next),B.insertAt(0,$.slice(0,-1))}else o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,$,G)}}]),P})(f.default.Embed);T.scope=f.default.Scope.BLOCK_BLOT;var R=(function(k){S(P,k);function P(O){N(this,P);var F=_(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,O));return F.cache={},F}return i(P,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(f.default.Leaf).reduce(function(F,$){return $.length()===0?F:F.insert($.value(),M($))},new h.default).insert(`
959`,M(this))),this.cache.delta}},{key:"deleteAt",value:function(F,$){o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"deleteAt",this).call(this,F,$),this.cache={}}},{key:"formatAt",value:function(F,$,G,B){$<=0||(f.default.query(G,f.default.Scope.BLOCK)?F+$===this.length()&&this.format(G,B):o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"formatAt",this).call(this,F,Math.min($,this.length()-F-1),G,B),this.cache={})}},{key:"insertAt",value:function(F,$,G){if(G!=null)return o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,$,G);if($.length!==0){var B=$.split(`
960`),Y=B.shift();Y.length>0&&(F<this.length()-1||this.children.tail==null?o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),Y):this.children.tail.insertAt(this.children.tail.length(),Y),this.cache={});var ee=this;B.reduce(function(J,H){return ee=ee.split(J,!0),ee.insertAt(0,H),H.length},F+Y.length)}}},{key:"insertBefore",value:function(F,$){var G=this.children.head;o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,$),G instanceof b.default&&G.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+A),this.cache.length}},{key:"moveChildren",value:function(F,$){o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,$),this.cache={}}},{key:"optimize",value:function(F){o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if($&&(F===0||F>=this.length()-A)){var G=this.clone();return F===0?(this.parent.insertBefore(G,this),this):(this.parent.insertBefore(G,this.next),G)}else{var B=o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,F,$);return this.cache={},B}}}]),P})(f.default.Block);R.blotName="block",R.tagName="P",R.defaultChild="break",R.allowedChildren=[y.default,f.default.Embed,w.default];function M(k){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return k==null||(typeof k.formats=="function"&&(P=(0,c.default)(P,k.formats())),k.parent==null||k.parent.blotName=="scroll"||k.parent.statics.scope!==k.statics.scope)?P:M(k.parent,P)}a.bubbleFormats=M,a.BlockEmbed=T,a.default=R}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.overload=a.expandConfig=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},o=(function(){function ee(J,H){var q=[],K=!0,te=!1,re=void 0;try{for(var Q=J[Symbol.iterator](),ne;!(K=(ne=Q.next()).done)&&(q.push(ne.value),!(H&&q.length===H));K=!0);}catch(oe){te=!0,re=oe}finally{try{!K&&Q.return&&Q.return()}finally{if(te)throw re}}return q}return function(J,H){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return ee(J,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function ee(J,H){for(var q=0;q<H.length;q++){var K=H[q];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(J,K.key,K)}}return function(J,H,q){return H&&ee(J.prototype,H),q&&ee(J,q),J}})();s(50);var c=s(2),d=M(c),h=s(14),u=M(h),f=s(8),m=M(f),b=s(9),g=M(b),y=s(0),x=M(y),w=s(15),j=M(w),N=s(3),_=M(N),S=s(10),A=M(S),T=s(34),R=M(T);function M(ee){return ee&&ee.__esModule?ee:{default:ee}}function k(ee,J,H){return J in ee?Object.defineProperty(ee,J,{value:H,enumerable:!0,configurable:!0,writable:!0}):ee[J]=H,ee}function P(ee,J){if(!(ee instanceof J))throw new TypeError("Cannot call a class as a function")}var O=(0,A.default)("quill"),F=(function(){l(ee,null,[{key:"debug",value:function(H){H===!0&&(H="log"),A.default.level(H)}},{key:"find",value:function(H){return H.__quill||x.default.find(H)}},{key:"import",value:function(H){return this.imports[H]==null&&O.error("Cannot import "+H+". Are you sure it was registered?"),this.imports[H]}},{key:"register",value:function(H,q){var K=this,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof H!="string"){var re=H.attrName||H.blotName;typeof re=="string"?this.register("formats/"+re,H,q):Object.keys(H).forEach(function(Q){K.register(Q,H[Q],q)})}else this.imports[H]!=null&&!te&&O.warn("Overwriting "+H+" with",q),this.imports[H]=q,(H.startsWith("blots/")||H.startsWith("formats/"))&&q.blotName!=="abstract"?x.default.register(q):H.startsWith("modules")&&typeof q.register=="function"&&q.register()}}]);function ee(J){var H=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,ee),this.options=$(J,q),this.container=this.options.container,this.container==null)return O.error("Invalid Quill container",J);this.options.debug&&ee.debug(this.options.debug);var K=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new m.default,this.scroll=x.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new u.default(this.scroll),this.selection=new j.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(m.default.events.EDITOR_CHANGE,function(re){re===m.default.events.TEXT_CHANGE&&H.root.classList.toggle("ql-blank",H.editor.isBlank())}),this.emitter.on(m.default.events.SCROLL_UPDATE,function(re,Q){var ne=H.selection.lastRange,oe=ne&&ne.length===0?ne.index:void 0;G.call(H,function(){return H.editor.update(null,Q,oe)},re)});var te=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+K+"<p><br></p></div>");this.setContents(te),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(ee,[{key:"addContainer",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof H=="string"){var K=H;H=document.createElement("div"),H.classList.add(K)}return this.container.insertBefore(H,q),H}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(H,q,K){var te=this,re=B(H,q,K),Q=o(re,4);return H=Q[0],q=Q[1],K=Q[3],G.call(this,function(){return te.editor.deleteText(H,q)},K,H,-1*q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(H),this.container.classList.toggle("ql-disabled",!H)}},{key:"focus",value:function(){var H=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=H,this.scrollIntoView()}},{key:"format",value:function(H,q){var K=this,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;return G.call(this,function(){var re=K.getSelection(!0),Q=new d.default;if(re==null)return Q;if(x.default.query(H,x.default.Scope.BLOCK))Q=K.editor.formatLine(re.index,re.length,k({},H,q));else{if(re.length===0)return K.selection.format(H,q),Q;Q=K.editor.formatText(re.index,re.length,k({},H,q))}return K.setSelection(re,m.default.sources.SILENT),Q},te)}},{key:"formatLine",value:function(H,q,K,te,re){var Q=this,ne=void 0,oe=B(H,q,K,te,re),ae=o(oe,4);return H=ae[0],q=ae[1],ne=ae[2],re=ae[3],G.call(this,function(){return Q.editor.formatLine(H,q,ne)},re,H,0)}},{key:"formatText",value:function(H,q,K,te,re){var Q=this,ne=void 0,oe=B(H,q,K,te,re),ae=o(oe,4);return H=ae[0],q=ae[1],ne=ae[2],re=ae[3],G.call(this,function(){return Q.editor.formatText(H,q,ne)},re,H,0)}},{key:"getBounds",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K=void 0;typeof H=="number"?K=this.selection.getBounds(H,q):K=this.selection.getBounds(H.index,H.length);var te=this.container.getBoundingClientRect();return{bottom:K.bottom-te.top,height:K.height,left:K.left-te.left,right:K.right-te.left,top:K.top-te.top,width:K.width}}},{key:"getContents",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-H,K=B(H,q),te=o(K,2);return H=te[0],q=te[1],this.editor.getContents(H,q)}},{key:"getFormat",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof H=="number"?this.editor.getFormat(H,q):this.editor.getFormat(H.index,H.length)}},{key:"getIndex",value:function(H){return H.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(H){return this.scroll.leaf(H)}},{key:"getLine",value:function(H){return this.scroll.line(H)}},{key:"getLines",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof H!="number"?this.scroll.lines(H.index,H.length):this.scroll.lines(H,q)}},{key:"getModule",value:function(H){return this.theme.modules[H]}},{key:"getSelection",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return H&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-H,K=B(H,q),te=o(K,2);return H=te[0],q=te[1],this.editor.getText(H,q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(H,q,K){var te=this,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ee.sources.API;return G.call(this,function(){return te.editor.insertEmbed(H,q,K)},re,H)}},{key:"insertText",value:function(H,q,K,te,re){var Q=this,ne=void 0,oe=B(H,0,K,te,re),ae=o(oe,4);return H=ae[0],ne=ae[2],re=ae[3],G.call(this,function(){return Q.editor.insertText(H,q,ne)},re,H,q.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(H,q,K){this.clipboard.dangerouslyPasteHTML(H,q,K)}},{key:"removeFormat",value:function(H,q,K){var te=this,re=B(H,q,K),Q=o(re,4);return H=Q[0],q=Q[1],K=Q[3],G.call(this,function(){return te.editor.removeFormat(H,q)},K,H)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(H){var q=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return G.call(this,function(){H=new d.default(H);var te=q.getLength(),re=q.editor.deleteText(0,te),Q=q.editor.applyDelta(H),ne=Q.ops[Q.ops.length-1];ne!=null&&typeof ne.insert=="string"&&ne.insert[ne.insert.length-1]===`
961`&&(q.editor.deleteText(q.getLength()-1,1),Q.delete(1));var oe=re.compose(Q);return oe},K)}},{key:"setSelection",value:function(H,q,K){if(H==null)this.selection.setRange(null,q||ee.sources.API);else{var te=B(H,q,K),re=o(te,4);H=re[0],q=re[1],K=re[3],this.selection.setRange(new w.Range(H,q),K),K!==m.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API,K=new d.default().insert(H);return this.setContents(K,q)}},{key:"update",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.default.sources.USER,q=this.scroll.update(H);return this.selection.update(H),q}},{key:"updateContents",value:function(H){var q=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return G.call(this,function(){return H=new d.default(H),q.editor.applyDelta(H,K)},K,!0)}}]),ee})();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=m.default.events,F.sources=m.default.sources,F.version="1.3.7",F.imports={delta:d.default,parchment:x.default,"core/module":g.default,"core/theme":R.default};function $(ee,J){if(J=(0,_.default)(!0,{container:ee,modules:{clipboard:!0,keyboard:!0,history:!0}},J),!J.theme||J.theme===F.DEFAULTS.theme)J.theme=R.default;else if(J.theme=F.import("themes/"+J.theme),J.theme==null)throw new Error("Invalid theme "+J.theme+". Did you register it?");var H=(0,_.default)(!0,{},J.theme.DEFAULTS);[H,J].forEach(function(te){te.modules=te.modules||{},Object.keys(te.modules).forEach(function(re){te.modules[re]===!0&&(te.modules[re]={})})});var q=Object.keys(H.modules).concat(Object.keys(J.modules)),K=q.reduce(function(te,re){var Q=F.import("modules/"+re);return Q==null?O.error("Cannot load "+re+" module. Are you sure you registered it?"):te[re]=Q.DEFAULTS||{},te},{});return J.modules!=null&&J.modules.toolbar&&J.modules.toolbar.constructor!==Object&&(J.modules.toolbar={container:J.modules.toolbar}),J=(0,_.default)(!0,{},F.DEFAULTS,{modules:K},H,J),["bounds","container","scrollingContainer"].forEach(function(te){typeof J[te]=="string"&&(J[te]=document.querySelector(J[te]))}),J.modules=Object.keys(J.modules).reduce(function(te,re){return J.modules[re]&&(te[re]=J.modules[re]),te},{}),J}function G(ee,J,H,q){if(this.options.strict&&!this.isEnabled()&&J===m.default.sources.USER)return new d.default;var K=H==null?null:this.getSelection(),te=this.editor.delta,re=ee();if(K!=null&&(H===!0&&(H=K.index),q==null?K=Y(K,re,J):q!==0&&(K=Y(K,H,q,J)),this.setSelection(K,m.default.sources.SILENT)),re.length()>0){var Q,ne=[m.default.events.TEXT_CHANGE,re,te,J];if((Q=this.emitter).emit.apply(Q,[m.default.events.EDITOR_CHANGE].concat(ne)),J!==m.default.sources.SILENT){var oe;(oe=this.emitter).emit.apply(oe,ne)}}return re}function B(ee,J,H,q,K){var te={};return typeof ee.index=="number"&&typeof ee.length=="number"?typeof J!="number"?(K=q,q=H,H=J,J=ee.length,ee=ee.index):(J=ee.length,ee=ee.index):typeof J!="number"&&(K=q,q=H,H=J,J=0),(typeof H>"u"?"undefined":i(H))==="object"?(te=H,K=q):typeof H=="string"&&(q!=null?te[H]=q:K=H),K=K||m.default.sources.API,[ee,J,te,K]}function Y(ee,J,H,q){if(ee==null)return null;var K=void 0,te=void 0;if(J instanceof d.default){var re=[ee.index,ee.index+ee.length].map(function(ae){return J.transformPosition(ae,q!==m.default.sources.USER)}),Q=o(re,2);K=Q[0],te=Q[1]}else{var ne=[ee.index,ee.index+ee.length].map(function(ae){return ae<J||ae===J&&q===m.default.sources.USER?ae:H>=0?ae+H:Math.max(J,ae+H)}),oe=o(ne,2);K=oe[0],te=oe[1]}return new w.Range(K,te-K)}a.expandConfig=$,a.overload=B,a.default=F}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function y(x,w){for(var j=0;j<w.length;j++){var N=w[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,w,j){return w&&y(x.prototype,w),j&&y(x,j),x}})(),o=function y(x,w,j){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,w);if(N===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:y(_,w,j)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(j)}},l=s(7),c=u(l),d=s(0),h=u(d);function u(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function m(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function b(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var g=(function(y){b(x,y);function x(){return f(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,[{key:"formatAt",value:function(j,N,_,S){if(x.compare(this.statics.blotName,_)<0&&h.default.query(_,h.default.Scope.BLOT)){var A=this.isolate(j,N);S&&A.wrap(_,S)}else o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"formatAt",this).call(this,j,N,_,S)}},{key:"optimize",value:function(j){if(o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,j),this.parent instanceof x&&x.compare(this.statics.blotName,this.parent.statics.blotName)>0){var N=this.parent.isolate(this.offset(),this.length());this.moveChildren(N),N.wrap(this)}}}],[{key:"compare",value:function(j,N){var _=x.order.indexOf(j),S=x.order.indexOf(N);return _>=0||S>=0?_-S:j===N?0:j<N?-1:1}}]),x})(h.default.Inline);g.allowedChildren=[g,h.default.Embed,c.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],a.default=g}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(0),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function d(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function h(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var u=(function(f){h(m,f);function m(){return c(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default.Text);a.default=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function w(j,N){for(var _=0;_<N.length;_++){var S=N[_];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(j,S.key,S)}}return function(j,N,_){return N&&w(j.prototype,N),_&&w(j,_),j}})(),o=function w(j,N,_){j===null&&(j=Function.prototype);var S=Object.getOwnPropertyDescriptor(j,N);if(S===void 0){var A=Object.getPrototypeOf(j);return A===null?void 0:w(A,N,_)}else{if("value"in S)return S.value;var T=S.get;return T===void 0?void 0:T.call(_)}},l=s(54),c=u(l),d=s(10),h=u(d);function u(w){return w&&w.__esModule?w:{default:w}}function f(w,j){if(!(w instanceof j))throw new TypeError("Cannot call a class as a function")}function m(w,j){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:w}function b(w,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);w.prototype=Object.create(j&&j.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(w,j):w.__proto__=j)}var g=(0,h.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(w){document.addEventListener(w,function(){for(var j=arguments.length,N=Array(j),_=0;_<j;_++)N[_]=arguments[_];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(S){if(S.__quill&&S.__quill.emitter){var A;(A=S.__quill.emitter).handleDOM.apply(A,N)}})})});var x=(function(w){b(j,w);function j(){f(this,j);var N=m(this,(j.__proto__||Object.getPrototypeOf(j)).call(this));return N.listeners={},N.on("error",g.error),N}return i(j,[{key:"emit",value:function(){g.log.apply(g,arguments),o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(_){for(var S=arguments.length,A=Array(S>1?S-1:0),T=1;T<S;T++)A[T-1]=arguments[T];(this.listeners[_.type]||[]).forEach(function(R){var M=R.node,k=R.handler;(_.target===M||M.contains(_.target))&&k.apply(void 0,[_].concat(A))})}},{key:"listenDOM",value:function(_,S,A){this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push({node:S,handler:A})}}]),j})(c.default);x.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},x.sources={API:"api",SILENT:"silent",USER:"user"},a.default=x}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});function i(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,l),this.quill=c,this.options=d};o.DEFAULTS={},a.default=o}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function l(d){if(i.indexOf(d)<=i.indexOf(o)){for(var h,u=arguments.length,f=Array(u>1?u-1:0),m=1;m<u;m++)f[m-1]=arguments[m];(h=console)[d].apply(h,f)}}function c(d){return i.reduce(function(h,u){return h[u]=l.bind(console,u,d),h},{})}l.level=c.level=function(d){o=d},a.default=c}),(function(r,a,s){var i=Array.prototype.slice,o=s(52),l=s(53),c=r.exports=function(f,m,b){return b||(b={}),f===m?!0:f instanceof Date&&m instanceof Date?f.getTime()===m.getTime():!f||!m||typeof f!="object"&&typeof m!="object"?b.strict?f===m:f==m:u(f,m,b)};function d(f){return f==null}function h(f){return!(!f||typeof f!="object"||typeof f.length!="number"||typeof f.copy!="function"||typeof f.slice!="function"||f.length>0&&typeof f[0]!="number")}function u(f,m,b){var g,y;if(d(f)||d(m)||f.prototype!==m.prototype)return!1;if(l(f))return l(m)?(f=i.call(f),m=i.call(m),c(f,m,b)):!1;if(h(f)){if(!h(m)||f.length!==m.length)return!1;for(g=0;g<f.length;g++)if(f[g]!==m[g])return!1;return!0}try{var x=o(f),w=o(m)}catch{return!1}if(x.length!=w.length)return!1;for(x.sort(),w.sort(),g=x.length-1;g>=0;g--)if(x[g]!=w[g])return!1;for(g=x.length-1;g>=0;g--)if(y=x[g],!c(f[y],m[y],b))return!1;return typeof f==typeof m}}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(1),o=(function(){function l(c,d,h){h===void 0&&(h={}),this.attrName=c,this.keyName=d;var u=i.Scope.TYPE&i.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&i.Scope.LEVEL|u:this.scope=i.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(d){return d.name})},l.prototype.add=function(c,d){return this.canAdd(c,d)?(c.setAttribute(this.keyName,d),!0):!1},l.prototype.canAdd=function(c,d){var h=i.query(c,i.Scope.BLOT&(this.scope|i.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof d=="string"?this.whitelist.indexOf(d.replace(/["']/g,""))>-1:this.whitelist.indexOf(d)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var d=c.getAttribute(this.keyName);return this.canAdd(c,d)&&d?d:""},l})();a.default=o}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.Code=void 0;var i=(function(){function T(R,M){var k=[],P=!0,O=!1,F=void 0;try{for(var $=R[Symbol.iterator](),G;!(P=(G=$.next()).done)&&(k.push(G.value),!(M&&k.length===M));P=!0);}catch(B){O=!0,F=B}finally{try{!P&&$.return&&$.return()}finally{if(O)throw F}}return k}return function(R,M){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return T(R,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function T(R,M){for(var k=0;k<M.length;k++){var P=M[k];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(R,P.key,P)}}return function(R,M,k){return M&&T(R.prototype,M),k&&T(R,k),R}})(),l=function T(R,M,k){R===null&&(R=Function.prototype);var P=Object.getOwnPropertyDescriptor(R,M);if(P===void 0){var O=Object.getPrototypeOf(R);return O===null?void 0:T(O,M,k)}else{if("value"in P)return P.value;var F=P.get;return F===void 0?void 0:F.call(k)}},c=s(2),d=w(c),h=s(0),u=w(h),f=s(4),m=w(f),b=s(6),g=w(b),y=s(7),x=w(y);function w(T){return T&&T.__esModule?T:{default:T}}function j(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}function N(T,R){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:T}function _(T,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);T.prototype=Object.create(R&&R.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(T,R):T.__proto__=R)}var S=(function(T){_(R,T);function R(){return j(this,R),N(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return R})(g.default);S.blotName="code",S.tagName="CODE";var A=(function(T){_(R,T);function R(){return j(this,R),N(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return o(R,[{key:"delta",value:function(){var k=this,P=this.domNode.textContent;return P.endsWith(`
962`)&&(P=P.slice(0,-1)),P.split(`
963`).reduce(function(O,F){return O.insert(F).insert(`
964`,k.formats())},new d.default)}},{key:"format",value:function(k,P){if(!(k===this.statics.blotName&&P)){var O=this.descendant(x.default,this.length()-1),F=i(O,1),$=F[0];$!=null&&$.deleteAt($.length()-1,1),l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"format",this).call(this,k,P)}}},{key:"formatAt",value:function(k,P,O,F){if(P!==0&&!(u.default.query(O,u.default.Scope.BLOCK)==null||O===this.statics.blotName&&F===this.statics.formats(this.domNode))){var $=this.newlineIndex(k);if(!($<0||$>=k+P)){var G=this.newlineIndex(k,!0)+1,B=$-G+1,Y=this.isolate(G,B),ee=Y.next;Y.format(O,F),ee instanceof R&&ee.formatAt(0,k-G+P-B,O,F)}}}},{key:"insertAt",value:function(k,P,O){if(O==null){var F=this.descendant(x.default,k),$=i(F,2),G=$[0],B=$[1];G.insertAt(B,P)}}},{key:"length",value:function(){var k=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
965`)?k:k+1}},{key:"newlineIndex",value:function(k){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(P)return this.domNode.textContent.slice(0,k).lastIndexOf(`
966`);var O=this.domNode.textContent.slice(k).indexOf(`
967`);return O>-1?k+O:-1}},{key:"optimize",value:function(k){this.domNode.textContent.endsWith(`
968`)||this.appendChild(u.default.create("text",`
969`)),l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,k);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(k),P.moveChildren(this),P.remove())}},{key:"replace",value:function(k){l(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replace",this).call(this,k),[].slice.call(this.domNode.querySelectorAll("*")).forEac
969h(function(P){var O=u.default.find(P);O==null?P.parentNode.removeChild(P):O instanceof u.default.Embed?O.remove():O.unwrap()})}}],[{key:"create",value:function(k){var P=l(R.__proto__||Object.getPrototypeOf(R),"create",this).call(this,k);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),R})(m.default);A.blotName="code-block",A.tagName="PRE",A.TAB="  ",a.Code=S,a.default=A}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},o=(function(){function ee(J,H){var q=[],K=!0,te=!1,re=void 0;try{for(var Q=J[Symbol.iterator](),ne;!(K=(ne=Q.next()).done)&&(q.push(ne.value),!(H&&q.length===H));K=!0);}catch(oe){te=!0,re=oe}finally{try{!K&&Q.return&&Q.return()}finally{if(te)throw re}}return q}return function(J,H){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return ee(J,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function ee(J,H){for(var q=0;q<H.length;q++){var K=H[q];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(J,K.key,K)}}return function(J,H,q){return H&&ee(J.prototype,H),q&&ee(J,q),J}}
vendor: 57,545 bytes, lines 969-981
969)(),c=s(2),d=P(c),h=s(20),u=P(h),f=s(0),m=P(f),b=s(13),g=P(b),y=s(24),x=P(y),w=s(4),j=P(w),N=s(16),_=P(N),S=s(21),A=P(S),T=s(11),R=P(T),M=s(3),k=P(M);function P(ee){return ee&&ee.__esModule?ee:{default:ee}}function O(ee,J,H){return J in ee?Object.defineProperty(ee,J,{value:H,enumerable:!0,configurable:!0,writable:!0}):ee[J]=H,ee}function F(ee,J){if(!(ee instanceof J))throw new TypeError("Cannot call a class as a function")}var $=/^[ -~]*$/,G=(function(){function ee(J){F(this,ee),this.scroll=J,this.delta=this.getDelta()}return l(ee,[{key:"applyDelta",value:function(H){var q=this,K=!1;this.scroll.update();var te=this.scroll.length();return this.scroll.batchStart(),H=Y(H),H.reduce(function(re,Q){var ne=Q.retain||Q.delete||Q.insert.length||1,oe=Q.attributes||{};if(Q.insert!=null){if(typeof Q.insert=="string"){var ae=Q.insert;ae.endsWith(`
970`)&&K&&(K=!1,ae=ae.slice(0,-1)),re>=te&&!ae.endsWith(`
971`)&&(K=!0),q.scroll.insertAt(re,ae);var le=q.scroll.line(re),je=o(le,2),xe=je[0],Fe=je[1],he=(0,k.default)({},(0,w.bubbleFormats)(xe));if(xe instanceof j.default){var Ne=xe.descendant(m.default.Leaf,Fe),ue=o(Ne,1),rt=ue[0];he=(0,k.default)(he,(0,w.bubbleFormats)(rt))}oe=u.default.attributes.diff(he,oe)||{}}else if(i(Q.insert)==="object"){var Te=Object.keys(Q.insert)[0];if(Te==null)return re;q.scroll.insertAt(re,Te,Q.insert[Te])}te+=ne}return Object.keys(oe).forEach(function(Pe){q.scroll.formatAt(re,ne,Pe,oe[Pe])}),re+ne},0),H.reduce(function(re,Q){return typeof Q.delete=="number"?(q.scroll.deleteAt(re,Q.delete),re):re+(Q.retain||Q.insert.length||1)},0),this.scroll.batchEnd(),this.update(H)}},{key:"deleteText",value:function(H,q){return this.scroll.deleteAt(H,q),this.update(new d.default().retain(H).delete(q))}},{key:"formatLine",value:function(H,q){var K=this,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(te).forEach(function(re){if(!(K.scroll.whitelist!=null&&!K.scroll.whitelist[re])){var Q=K.scroll.lines(H,Math.max(q,1)),ne=q;Q.forEach(function(oe){var ae=oe.length();if(!(oe instanceof g.default))oe.format(re,te[re]);else{var le=H-oe.offset(K.scroll),je=oe.newlineIndex(le+ne)-le+1;oe.formatAt(le,je,re,te[re])}ne-=ae})}}),this.scroll.optimize(),this.update(new d.default().retain(H).retain(q,(0,A.default)(te)))}},{key:"formatText",value:function(H,q){var K=this,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(te).forEach(function(re){K.scroll.formatAt(H,q,re,te[re])}),this.update(new d.default().retain(H).retain(q,(0,A.default)(te)))}},{key:"getContents",value:function(H,q){return this.delta.slice(H,H+q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(H,q){return H.concat(q.delta())},new d.default)}},{key:"getFormat",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K=[],te=[];q===0?this.scroll.path(H).forEach(function(Q){var ne=o(Q,1),oe=ne[0];oe instanceof j.default?K.push(oe):oe instanceof m.default.Leaf&&te.push(oe)}):(K=this.scroll.lines(H,q),te=this.scroll.descendants(m.default.Leaf,H,q));var re=[K,te].map(function(Q){if(Q.length===0)return{};for(var ne=(0,w.bubbleFormats)(Q.shift());Object.keys(ne).length>0;){var oe=Q.shift();if(oe==null)return ne;ne=B((0,w.bubbleFormats)(oe),ne)}return ne});return k.default.apply(k.default,re)}},{key:"getText",value:function(H,q){return this.getContents(H,q).filter(function(K){return typeof K.insert=="string"}).map(function(K){return K.insert}).join("")}},{key:"insertEmbed",value:function(H,q,K){return this.scroll.insertAt(H,q,K),this.update(new d.default().retain(H).insert(O({},q,K)))}},{key:"insertText",value:function(H,q){var K=this,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return q=q.replace(/\r\n/g,`
972`).replace(/\r/g,`
973`),this.scroll.insertAt(H,q),Object.keys(te).forEach(function(re){K.scroll.formatAt(H,q.length,re,te[re])}),this.update(new d.default().retain(H).insert(q,(0,A.default)(te)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var H=this.scroll.children.head;return H.statics.blotName!==j.default.blotName||H.children.length>1?!1:H.children.head instanceof _.default}},{key:"removeFormat",value:function(H,q){var K=this.getText(H,q),te=this.scroll.line(H+q),re=o(te,2),Q=re[0],ne=re[1],oe=0,ae=new d.default;Q!=null&&(Q instanceof g.default?oe=Q.newlineIndex(ne)-ne+1:oe=Q.length()-ne,ae=Q.delta().slice(ne,ne+oe-1).insert(`
974`));var le=this.getContents(H,q+oe),je=le.diff(new d.default().insert(K).concat(ae)),xe=new d.default().retain(H).concat(je);return this.applyDelta(xe)}},{key:"update",value:function(H){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,te=this.delta;if(q.length===1&&q[0].type==="characterData"&&q[0].target.data.match($)&&m.default.find(q[0].target)){var re=m.default.find(q[0].target),Q=(0,w.bubbleFormats)(re),ne=re.offset(this.scroll),oe=q[0].oldValue.replace(x.default.CONTENTS,""),ae=new d.default().insert(oe),le=new d.default().insert(re.value()),je=new d.default().retain(ne).concat(ae.diff(le,K));H=je.reduce(function(xe,Fe){return Fe.insert?xe.insert(Fe.insert,Q):xe.push(Fe)},new d.default),this.delta=te.compose(H)}else this.delta=this.getDelta(),(!H||!(0,R.default)(te.compose(H),this.delta))&&(H=te.diff(this.delta,K));return H}}]),ee})();function B(ee,J){return Object.keys(J).reduce(function(H,q){return ee[q]==null||(J[q]===ee[q]?H[q]=J[q]:Array.isArray(J[q])?J[q].indexOf(ee[q])<0&&(H[q]=J[q].concat([ee[q]])):H[q]=[J[q],ee[q]]),H},{})}function Y(ee){return ee.reduce(function(J,H){if(H.insert===1){var q=(0,A.default)(H.attributes);return delete q.image,J.insert({image:H.attributes.image},q)}if(H.attributes!=null&&(H.attributes.list===!0||H.attributes.bullet===!0)&&(H=(0,A.default)(H),H.attributes.list?H.attributes.list="ordered":(H.attributes.list="bullet",delete H.attributes.bullet)),typeof H.insert=="string"){var K=H.insert.replace(/\r\n/g,`
975`).replace(/\r/g,`
976`);return J.insert(K,H.attributes)}return J.push(H)},new d.default)}a.default=G}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.Range=void 0;var i=(function(){function T(R,M){var k=[],P=!0,O=!1,F=void 0;try{for(var $=R[Symbol.iterator](),G;!(P=(G=$.next()).done)&&(k.push(G.value),!(M&&k.length===M));P=!0);}catch(B){O=!0,F=B}finally{try{!P&&$.return&&$.return()}finally{if(O)throw F}}return k}return function(R,M){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return T(R,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function T(R,M){for(var k=0;k<M.length;k++){var P=M[k];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(R,P.key,P)}}return function(R,M,k){return M&&T(R.prototype,M),k&&T(R,k),R}})(),l=s(0),c=x(l),d=s(21),h=x(d),u=s(11),f=x(u),m=s(8),b=x(m),g=s(10),y=x(g);function x(T){return T&&T.__esModule?T:{default:T}}function w(T){if(Array.isArray(T)){for(var R=0,M=Array(T.length);R<T.length;R++)M[R]=T[R];return M}else return Array.from(T)}function j(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")}var N=(0,y.default)("quill:selection"),_=function T(R){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;j(this,T),this.index=R,this.length=M},S=(function(){function T(R,M){var k=this;j(this,T),this.emitter=M,this.scroll=R,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){k.mouseDown||setTimeout(k.update.bind(k,b.default.sources.USER),1)}),this.emitter.on(b.default.events.EDITOR_CHANGE,function(P,O){P===b.default.events.TEXT_CHANGE&&O.length()>0&&k.update(b.default.sources.SILENT)}),this.emitter.on(b.default.events.SCROLL_BEFORE_UPDATE,function(){if(k.hasFocus()){var P=k.getNativeRange();P!=null&&P.start.node!==k.cursor.textNode&&k.emitter.once(b.default.events.SCROLL_UPDATE,function(){try{k.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(b.default.events.SCROLL_OPTIMIZE,function(P,O){if(O.range){var F=O.range,$=F.startNode,G=F.startOffset,B=F.endNode,Y=F.endOffset;k.setNativeRange($,G,B,Y)}}),this.update(b.default.sources.SILENT)}return o(T,[{key:"handleComposition",value:function(){var M=this;this.root.addEventListener("compositionstart",function(){M.composing=!0}),this.root.addEventListener("compositionend",function(){if(M.composing=!1,M.cursor.parent){var k=M.cursor.restore();if(!k)return;setTimeout(function(){M.setNativeRange(k.startNode,k.startOffset,k.endNode,k.endOffset)},1)}})}},{key:"handleDragging",value:function(){var M=this;this.emitter.listenDOM("mousedown",document.body,function(){M.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){M.mouseDown=!1,M.update(b.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(M,k){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[M])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||c.default.query(M,c.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var O=c.default.find(P.start.node,!1);if(O==null)return;if(O instanceof c.default.Leaf){var F=O.split(P.start.offset);O.parent.insertBefore(this.cursor,F)}else O.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(M,k),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();M=Math.min(M,P-1),k=Math.min(M+k,P-1)-M;var O=void 0,F=this.scroll.leaf(M),$=i(F,2),G=$[0],B=$[1];if(G==null)return null;var Y=G.position(B,!0),ee=i(Y,2);O=ee[0],B=ee[1];var J=document.createRange();if(k>0){J.setStart(O,B);var H=this.scroll.leaf(M+k),q=i(H,2);if(G=q[0],B=q[1],G==null)return null;var K=G.position(B,!0),te=i(K,2);return O=te[0],B=te[1],J.setEnd(O,B),J.getBoundingClientRect()}else{var re="left",Q=void 0;return O instanceof Text?(B<O.data.length?(J.setStart(O,B),J.setEnd(O,B+1)):(J.setStart(O,B-1),J.setEnd(O,B),re="right"),Q=J.getBoundingClientRect()):(Q=G.domNode.getBoundingClientRect(),B>0&&(re="right")),{bottom:Q.top+Q.height,height:Q.height,left:Q[re],right:Q[re],top:Q.top,width:0}}}},{key:"getNativeRange",value:function(){var M=document.getSelection();if(M==null||M.rangeCount<=0)return null;var k=M.getRangeAt(0);if(k==null)return null;var P=this.normalizeNative(k);return N.info("getNativeRange",P),P}},{key:"getRange",value:function(){var M=this.getNativeRange();if(M==null)return[null,null];var k=this.normalizedToRange(M);return[k,M]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(M){var k=this,P=[[M.start.node,M.start.offset]];M.native.collapsed||P.push([M.end.node,M.end.offset]);var O=P.map(function(G){var B=i(G,2),Y=B[0],ee=B[1],J=c.default.find(Y,!0),H=J.offset(k.scroll);return ee===0?H:J instanceof c.default.Container?H+J.length():H+J.index(Y,ee)}),F=Math.min(Math.max.apply(Math,w(O)),this.scroll.length()-1),$=Math.min.apply(Math,[F].concat(w(O)));return new _($,F-$)}},{key:"normalizeNative",value:function(M){if(!A(this.root,M.startContainer)||!M.collapsed&&!A(this.root,M.endContainer))return null;var k={start:{node:M.startContainer,offset:M.startOffset},end:{node:M.endContainer,offset:M.endOffset},native:M};return[k.start,k.end].forEach(function(P){for(var O=P.node,F=P.offset;!(O instanceof Text)&&O.childNodes.length>0;)if(O.childNodes.length>F)O=O.childNodes[F],F=0;else if(O.childNodes.length===F)O=O.lastChild,F=O instanceof Text?O.data.length:O.childNodes.length+1;else break;P.node=O,P.offset=F}),k}},{key:"rangeToNative",value:function(M){var k=this,P=M.collapsed?[M.index]:[M.index,M.index+M.length],O=[],F=this.scroll.length();return P.forEach(function($,G){$=Math.min(F-1,$);var B=void 0,Y=k.scroll.leaf($),ee=i(Y,2),J=ee[0],H=ee[1],q=J.position(H,G!==0),K=i(q,2);B=K[0],H=K[1],O.push(B,H)}),O.length<2&&(O=O.concat(O)),O}},{key:"scrollIntoView",value:function(M){var k=this.lastRange;if(k!=null){var P=this.getBounds(k.index,k.length);if(P!=null){var O=this.scroll.length()-1,F=this.scroll.line(Math.min(k.index,O)),$=i(F,1),G=$[0],B=G;if(k.length>0){var Y=this.scroll.line(Math.min(k.index+k.length,O)),ee=i(Y,1);B=ee[0]}if(!(G==null||B==null)){var J=M.getBoundingClientRect();P.top<J.top?M.scrollTop-=J.top-P.top:P.bottom>J.bottom&&(M.scrollTop+=P.bottom-J.bottom)}}}}},{key:"setNativeRange",value:function(M,k){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M,O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:k,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(N.info("setNativeRange",M,k,P,O),!(M!=null&&(this.root.parentNode==null||M.parentNode==null||P.parentNode==null))){var $=document.getSelection();if($!=null)if(M!=null){this.hasFocus()||this.root.focus();var G=(this.getNativeRange()||{}).native;if(G==null||F||M!==G.startContainer||k!==G.startOffset||P!==G.endContainer||O!==G.endOffset){M.tagName=="BR"&&(k=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode),P.tagName=="BR"&&(O=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var B=document.createRange();B.setStart(M,k),B.setEnd(P,O),$.removeAllRanges(),$.addRange(B)}}else $.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof k=="string"&&(P=k,k=!1),N.info("setRange",M),M!=null){var O=this.rangeToNative(M);this.setNativeRange.apply(this,w(O).concat([k]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.default.sources.USER,k=this.lastRange,P=this.getRange(),O=i(P,2),F=O[0],$=O[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,f.default)(k,this.lastRange)){var G;!this.composing&&$!=null&&$.native.collapsed&&$.start.node!==this.cursor.textNode&&this.cursor.restore();var B=[b.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(k),M];if((G=this.emitter).emit.apply(G,[b.default.events.EDITOR_CHANGE].concat(B)),M!==b.default.sources.SILENT){var Y;(Y=this.emitter).emit.apply(Y,B)}}}}]),T})();function A(T,R){try{R.parentNode}catch{return!1}return R instanceof Text&&(R=R.parentNode),T.contains(R)}a.Range=_,a.default=S}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function b(g,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,x){return y&&b(g.prototype,y),x&&b(g,x),g}})(),o=function b(g,y,x){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,y);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,y,x)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(x)}},l=s(0),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(){return h(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"insertInto",value:function(x,w){x.children.length===0?o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,x,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g})(c.default.Embed);m.blotName="break",m.tagName="BR",a.default=m}),(function(r,a,s){var i=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var b in m)m.hasOwnProperty(b)&&(f[b]=m[b])};return function(f,m){u(f,m);function b(){this.constructor=f}f.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(44),l=s(30),c=s(1),d=(function(u){i(f,u);function f(m){var b=u.call(this,m)||this;return b.build(),b}return f.prototype.appendChild=function(m){this.insertBefore(m)},f.prototype.attach=function(){u.prototype.attach.call(this),this.children.forEach(function(m){m.attach()})},f.prototype.build=function(){var m=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(b){try{var g=h(b);m.insertBefore(g,m.children.head||void 0)}catch(y){if(y instanceof c.ParchmentError)return;throw y}})},f.prototype.deleteAt=function(m,b){if(m===0&&b===this.length())return this.remove();this.children.forEachAt(m,b,function(g,y,x){g.deleteAt(y,x)})},f.prototype.descendant=function(m,b){var g=this.children.find(b),y=g[0],x=g[1];return m.blotName==null&&m(y)||m.blotName!=null&&y instanceof m?[y,x]:y instanceof f?y.descendant(m,x):[null,-1]},f.prototype.descendants=function(m,b,g){b===void 0&&(b=0),g===void 0&&(g=Number.MAX_VALUE);var y=[],x=g;return this.children.forEachAt(b,g,function(w,j,N){(m.blotName==null&&m(w)||m.blotName!=null&&w instanceof m)&&y.push(w),w instanceof f&&(y=y.concat(w.descendants(m,j,x))),x-=N}),y},f.prototype.detach=function(){this.children.forEach(function(m){m.detach()}),u.prototype.detach.call(this)},f.prototype.formatAt=function(m,b,g,y){this.children.forEachAt(m,b,function(x,w,j){x.formatAt(w,j,g,y)})},f.prototype.insertAt=function(m,b,g){var y=this.children.find(m),x=y[0],w=y[1];if(x)x.insertAt(w,b,g);else{var j=g==null?c.create("text",b):c.create(b,g);this.appendChild(j)}},f.prototype.insertBefore=function(m,b){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return m instanceof g}))throw new c.ParchmentError("Cannot insert "+m.statics.blotName+" into "+this.statics.blotName);m.insertInto(this,b)},f.prototype.length=function(){return this.children.reduce(function(m,b){return m+b.length()},0)},f.prototype.moveChildren=function(m,b){this.children.forEach(function(g){m.insertBefore(g,b)})},f.prototype.optimize=function(m){if(u.prototype.optimize.call(this,m),this.children.length===0)if(this.statics.defaultChild!=null){var b=c.create(this.statics.defaultChild);this.appendChild(b),b.optimize(m)}else this.remove()},f.prototype.path=function(m,b){b===void 0&&(b=!1);var g=this.children.find(m,b),y=g[0],x=g[1],w=[[this,m]];return y instanceof f?w.concat(y.path(x,b)):(y!=null&&w.push([y,x]),w)},f.prototype.removeChild=function(m){this.children.remove(m)},f.prototype.replace=function(m){m instanceof f&&m.moveChildren(this),u.prototype.replace.call(this,m)},f.prototype.split=function(m,b){if(b===void 0&&(b=!1),!b){if(m===0)return this;if(m===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(m,this.length(),function(y,x,w){y=y.split(x,b),g.appendChild(y)}),g},f.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},f.prototype.update=function(m,b){var g=this,y=[],x=[];m.forEach(function(w){w.target===g.domNode&&w.type==="childList"&&(y.push.apply(y,w.addedNodes),x.push.apply(x,w.removedNodes))}),x.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var j=c.find(w);j!=null&&(j.domNode.parentNode==null||j.domNode.parentNode===g.domNode)&&j.detach()}}),y.filter(function(w){return w.parentNode==g.domNode}).sort(function(w,j){return w===j?0:w.compareDocumentPosition(j)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var j=null;w.nextSibling!=null&&(j=c.find(w.nextSibling));var N=h(w);(N.next!=j||N.next==null)&&(N.parent!=null&&N.parent.removeChild(g),g.insertBefore(N,j||void 0))})},f})(l.default);function h(u){var f=c.find(u);if(f==null)try{f=c.create(u)}catch{f=c.create(c.Scope.INLINE),[].slice.call(u.childNodes).forEach(function(b){f.domNode.appendChild(b)}),u.parentNode&&u.parentNode.replaceChild(f.domNode,u),f.attach()}return f}a.default=d}),(function(r,a,s){var i=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var b in m)m.hasOwnProperty(b)&&(f[b]=m[b])};return function(f,m){u(f,m);function b(){this.constructor=f}f.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(12),l=s(31),c=s(17),d=s(1),h=(function(u){i(f,u);function f(m){var b=u.call(this,m)||this;return b.attributes=new l.default(b.domNode),b}return f.formats=function(m){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return m.tagName.toLowerCase()},f.prototype.format=function(m,b){var g=d.query(m);g instanceof o.default?this.attributes.attribute(g,b):b&&g!=null&&(m!==this.statics.blotName||this.formats()[m]!==b)&&this.replaceWith(m,b)},f.prototype.formats=function(){var m=this.attributes.values(),b=this.statics.formats(this.domNode);return b!=null&&(m[this.statics.blotName]=b),m},f.prototype.replaceWith=function(m,b){var g=u.prototype.replaceWith.call(this,m,b);return this.attributes.copy(g),g},f.prototype.update=function(m,b){var g=this;u.prototype.update.call(this,m,b),m.some(function(y){return y.target===g.domNode&&y.type==="attributes"})&&this.attributes.build()},f.prototype.wrap=function(m,b){var g=u.prototype.wrap.call(this,m,b);return g instanceof f&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},f})(c.default);a.default=h}),(function(r,a,s){var i=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var f in u)u.hasOwnProperty(f)&&(h[f]=u[f])};return function(h,u){d(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(30),l=s(1),c=(function(d){i(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.value=function(u){return!0},h.prototype.index=function(u,f){return this.domNode===u||this.domNode.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(f,1):-1},h.prototype.position=function(u,f){var m=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return u>0&&(m+=1),[this.parent.domNode,m]},h.prototype.value=function(){var u;return u={},u[this.statics.blotName]=this.statics.value(this.domNode)||!0,u},h.scope=l.Scope.INLINE_BLOT,h})(o.default);a.default=c}),(function(r,a,s){var i=s(11),o=s(3),l={attributes:{compose:function(d,h,u){typeof d!="object"&&(d={}),typeof h!="object"&&(h={});var f=o(!0,{},h);u||(f=Object.keys(f).reduce(function(b,g){return f[g]!=null&&(b[g]=f[g]),b},{}));for(var m in d)d[m]!==void 0&&h[m]===void 0&&(f[m]=d[m]);return Object.keys(f).length>0?f:void 0},diff:function(d,h){typeof d!="object"&&(d={}),typeof h!="object"&&(h={});var u=Object.keys(d).concat(Object.keys(h)).reduce(function(f,m){return i(d[m],h[m])||(f[m]=h[m]===void 0?null:h[m]),f},{});return Object.keys(u).length>0?u:void 0},transform:function(d,h,u){if(typeof d!="object")return h;if(typeof h=="object"){if(!u)return h;var f=Object.keys(h).reduce(function(m,b){return d[b]===void 0&&(m[b]=h[b]),m},{});return Object.keys(f).length>0?f:void 0}}},iterator:function(d){return new c(d)},length:function(d){return typeof d.delete=="number"?d.delete:typeof d.retain=="number"?d.retain:typeof d.insert=="string"?d.insert.length:1}};function c(d){this.ops=d,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(d){d||(d=1/0);var h=this.ops[this.index];if(h){var u=this.offset,f=l.length(h);if(d>=f-u?(d=f-u,this.index+=1,this.offset=0):this.offset+=d,typeof h.delete=="number")return{delete:d};var m={};return h.attributes&&(m.attributes=h.attributes),typeof h.retain=="number"?m.retain=d:typeof h.insert=="string"?m.insert=h.insert.substr(u,d):m.insert=h.insert,m}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var d=this.offset,h=this.index,u=this.next(),f=this.ops.slice(this.index);return this.offset=d,this.index=h,[u].concat(f)}else return[]},r.exports=l}),(function(r,a){var s=(function(){function i(g,y){return y!=null&&g instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function d(g,y,x,w,j){typeof y=="object"&&(x=y.depth,w=y.prototype,j=y.includeNonEnumerable,y=y.circular);var N=[],_=[],S=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof x>"u"&&(x=1/0);function A(T,R){if(T===null)return null;if(R===0)return T;var M,k;if(typeof T!="object")return T;if(i(T,o))M=new o;else if(i(T,l))M=new l;else if(i(T,c))M=new c(function(J,H){T.then(function(q){J(A(q,R-1))},function(q){H(A(q,R-1))})});else if(d.__isArray(T))M=[];else if(d.__isRegExp(T))M=new RegExp(T.source,b(T)),T.lastIndex&&(M.lastIndex=T.lastIndex);else if(d.__isDate(T))M=new Date(T.getTime());else{if(S&&Buffer.isBuffer(T))return Buffer.allocUnsafe?M=Buffer.allocUnsafe(T.length):M=new Buffer(T.length),T.copy(M),M;i(T,Error)?M=Object.create(T):typeof w>"u"?(k=Object.getPrototypeOf(T),M=Object.create(k)):(M=Object.create(w),k=w)}if(y){var P=N.indexOf(T);if(P!=-1)return _[P];N.push(T),_.push(M)}i(T,o)&&T.forEach(function(J,H){var q=A(H,R-1),K=A(J,R-1);M.set(q,K)}),i(T,l)&&T.forEach(function(J){var H=A(J,R-1);M.add(H)});for(var O in T){var F;k&&(F=Object.getOwnPropertyDescriptor(k,O)),!(F&&F.set==null)&&(M[O]=A(T[O],R-1))}if(Object.getOwnPropertySymbols)for(var $=Object.getOwnPropertySymbols(T),O=0;O<$.length;O++){var G=$[O],B=Object.getOwnPropertyDescriptor(T,G);B&&!B.enumerable&&!j||(M[G]=A(T[G],R-1),B.enumerable||Object.defineProperty(M,G,{enumerable:!1}))}if(j)for(var Y=Object.getOwnPropertyNames(T),O=0;O<Y.length;O++){var ee=Y[O],B=Object.getOwnPropertyDescriptor(T,ee);B&&B.enumerable||(M[ee]=A(T[ee],R-1),Object.defineProperty(M,ee,{enumerable:!1}))}return M}return A(g,x)}d.clonePrototype=function(y){if(y===null)return null;var x=function(){};return x.prototype=y,new x};function h(g){return Object.prototype.toString.call(g)}d.__objToStr=h;function u(g){return typeof g=="object"&&h(g)==="[object Date]"}d.__isDate=u;function f(g){return typeof g=="object"&&h(g)==="[object Array]"}d.__isArray=f;function m(g){return typeof g=="object"&&h(g)==="[object RegExp]"}d.__isRegExp=m;function b(g){var y="";return g.global&&(y+="g"),g.ignoreCase&&(y+="i"),g.multiline&&(y+="m"),y}return d.__getRegExpFlags=b,d})();typeof r=="object"&&r.exports&&(r.exports=s)}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function M(k,P){var O=[],F=!0,$=!1,G=void 0;try{for(var B=k[Symbol.iterator](),Y;!(F=(Y=B.next()).done)&&(O.push(Y.value),!(P&&O.length===P));F=!0);}catch(ee){$=!0,G=ee}finally{try{!F&&B.return&&B.return()}finally{if($)throw G}}return O}return function(k,P){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return M(k,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function M(k,P){for(var O=0;O<P.length;O++){var F=P[O];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(k,F.key,F)}}return function(k,P,O){return P&&M(k.prototype,P),O&&M(k,O),k}})(),l=function M(k,P,O){k===null&&(k=Function.prototype);var F=Object.getOwnPropertyDescriptor(k,P);if(F===void 0){var $=Object.getPrototypeOf(k);return $===null?void 0:M($,P,O)}else{if("value"in F)return F.value;var G=F.get;return G===void 0?void 0:G.call(O)}},c=s(0),d=N(c),h=s(8),u=N(h),f=s(4),m=N(f),b=s(16),g=N(b),y=s(13),x=N(y),w=s(25),j=N(w);function N(M){return M&&M.__esModule?M:{default:M}}function _(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function S(M,k){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:M}function A(M,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);M.prototype=Object.create(k&&k.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(M,k):M.__proto__=k)}function T(M){return M instanceof m.default||M instanceof f.BlockEmbed}var R=(function(M){A(k,M);function k(P,O){_(this,k);var F=S(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,P));return F.emitter=O.emitter,Array.isArray(O.whitelist)&&(F.whitelist=O.whitelist.reduce(function($,G){return $[G]=!0,$},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return o(k,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(O,F){var $=this.line(O),G=i($,2),B=G[0],Y=G[1],ee=this.line(O+F),J=i(ee,1),H=J[0];if(l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"deleteAt",this).call(this,O,F),H!=null&&B!==H&&Y>0){if(B instanceof f.BlockEmbed||H instanceof f.BlockEmbed){this.optimize();return}if(B instanceof x.default){var q=B.newlineIndex(B.length(),!0);if(q>-1&&(B=B.split(q+1),B===H)){this.optimize();return}}else if(H instanceof x.default){var K=H.newlineIndex(0);K>-1&&H.split(K+1)}var te=H.children.head instanceof g.default?null:H.children.head;B.moveChildren(H,te),B.remove()}this.optimize()}},{key:"enable",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",O)}},{key:"formatAt",value:function(O,F,$,G){this.whitelist!=null&&!this.whitelist[$]||(l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"formatAt",this).call(this,O,F,$,G),this.optimize())}},{key:"insertAt",value:function(O,F,$){if(!($!=null&&this.whitelist!=null&&!this.whitelist[F])){if(O>=this.length())if($==null||d.default.query(F,d.default.Scope.BLOCK)==null){var G=d.default.create(this.statics.defaultChild);this.appendChild(G),$==null&&F.endsWith(`
977`)&&(F=F.slice(0,-1)),G.insertAt(0,F,$)}else{var B=d.default.create(F,$);this.appendChild(B)}else l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,O,F,$);this.optimize()}}},{key:"insertBefore",value:function(O,F){if(O.statics.scope===d.default.Scope.INLINE_BLOT){var $=d.default.create(this.statics.defaultChild);$.appendChild(O),O=$}l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,O,F)}},{key:"leaf",value:function(O){return this.path(O).pop()||[null,-1]}},{key:"line",value:function(O){return O===this.length()?this.line(O-1):this.descendant(T,O)}},{key:"lines",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,$=function G(B,Y,ee){var J=[],H=ee;return B.children.forEachAt(Y,ee,function(q,K,te){T(q)?J.push(q):q instanceof d.default.Container&&(J=J.concat(G(q,K,H))),H-=te}),J};return $(this,O,F)}},{key:"optimize",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,O,F),O.length>0&&this.emitter.emit(u.default.events.SCROLL_OPTIMIZE,O,F))}},{key:"path",value:function(O){return l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,O).slice(1)}},{key:"update",value:function(O){if(this.batch!==!0){var F=u.default.sources.USER;typeof O=="string"&&(F=O),Array.isArray(O)||(O=this.observer.takeRecords()),O.length>0&&this.emitter.emit(u.default.events.SCROLL_BEFORE_UPDATE,F,O),l(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"update",this).call(this,O.concat([])),O.length>0&&this.emitter.emit(u.default.events.SCROLL_UPDATE,F,O)}}}]),k})(d.default.Scroll);R.blotName="scroll",R.className="ql-editor",R.tagName="DIV",R.defaultChild="block",R.allowedChildren=[m.default,f.BlockEmbed,j.default],a.default=R}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.SHORTKEY=a.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},o=(function(){function Q(ne,oe){var ae=[],le=!0,je=!1,xe=void 0;try{for(var Fe=ne[Symbol.iterator](),he;!(le=(he=Fe.next()).done)&&(ae.push(he.value),!(oe&&ae.length===oe));le=!0);}catch(Ne){je=!0,xe=Ne}finally{try{!le&&Fe.return&&Fe.return()}finally{if(je)throw xe}}return ae}return function(ne,oe){if(Array.isArray(ne))return ne;if(Symbol.iterator in Object(ne))return Q(ne,oe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function Q(ne,oe){for(var ae=0;ae<oe.length;ae++){var le=oe[ae];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(ne,le.key,le)}}return function(ne,oe,ae){return oe&&Q(ne.prototype,oe),ae&&Q(ne,ae),ne}})(),c=s(21),d=M(c),h=s(11),u=M(h),f=s(3),m=M(f),b=s(2),g=M(b),y=s(20),x=M(y),w=s(0),j=M(w),N=s(5),_=M(N),S=s(10),A=M(S),T=s(9),R=M(T);function M(Q){return Q&&Q.__esModule?Q:{default:Q}}function k(Q,ne,oe){return ne in Q?Object.defineProperty(Q,ne,{value:oe,enumerable:!0,configurable:!0,writable:!0}):Q[ne]=oe,Q}function P(Q,ne){if(!(Q instanceof ne))throw new TypeError("Cannot call a class as a function")}function O(Q,ne){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne&&(typeof ne=="object"||typeof ne=="function")?ne:Q}function F(Q,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ne);Q.prototype=Object.create(ne&&ne.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),ne&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,ne):Q.__proto__=ne)}var $=(0,A.default)("quill:keyboard"),G=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",B=(function(Q){F(ne,Q),l(ne,null,[{key:"match",value:function(ae,le){return le=re(le),["altKey","ctrlKey","metaKey","shiftKey"].some(function(je){return!!le[je]!==ae[je]&&le[je]!==null})?!1:le.key===(ae.which||ae.keyCode)}}]);function ne(oe,ae){P(this,ne);var le=O(this,(ne.__proto__||Object.getPrototypeOf(ne)).call(this,oe,ae));return le.bindings={},Object.keys(le.options.bindings).forEach(function(je){je==="list autofill"&&oe.scroll.whitelist!=null&&!oe.scroll.whitelist.list||le.options.bindings[je]&&le.addBinding(le.options.bindings[je])}),le.addBinding({key:ne.keys.ENTER,shiftKey:null},q),le.addBinding({key:ne.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(le.addBinding({key:ne.keys.BACKSPACE},{collapsed:!0},ee),le.addBinding({key:ne.keys.DELETE},{collapsed:!0},J)):(le.addBinding({key:ne.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},ee),le.addBinding({key:ne.keys.DELETE},{collapsed:!0,suffix:/^.?$/},J)),le.addBinding({key:ne.keys.BACKSPACE},{collapsed:!1},H),le.addBinding({key:ne.keys.DELETE},{collapsed:!1},H),le.addBinding({key:ne.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},ee),le.listen(),le}return l(ne,[{key:"addBinding",value:function(ae){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},xe=re(ae);if(xe==null||xe.key==null)return $.warn("Attempted to add invalid keyboard binding",xe);typeof le=="function"&&(le={handler:le}),typeof je=="function"&&(je={handler:je}),xe=(0,m.default)(xe,le,je),this.bindings[xe.key]=this.bindings[xe.key]||[],this.bindings[xe.key].push(xe)}},{key:"listen",value:function(){var ae=this;this.quill.root.addEventListener("keydown",function(le){if(!le.defaultPrevented){var je=le.which||le.keyCode,xe=(ae.bindings[je]||[]).filter(function(It){return ne.match(le,It)});if(xe.length!==0){var Fe=ae.quill.getSelection();if(!(Fe==null||!ae.quill.hasFocus())){var he=ae.quill.getLine(Fe.index),Ne=o(he,2),ue=Ne[0],rt=Ne[1],Te=ae.quill.getLeaf(Fe.index),Pe=o(Te,2),$e=Pe[0],Ve=Pe[1],be=Fe.length===0?[$e,Ve]:ae.quill.getLeaf(Fe.index+Fe.length),We=o(be,2),Ze=We[0],st=We[1],Mt=$e instanceof j.default.Text?$e.value().slice(0,Ve):"",Ht=Ze instanceof j.default.Text?Ze.value().slice(st):"",Yt={collapsed:Fe.length===0,empty:Fe.length===0&&ue.length()<=1,format:ae.quill.getFormat(Fe),offset:rt,prefix:Mt,suffix:Ht},on=xe.some(function(It){if(It.collapsed!=null&&It.collapsed!==Yt.collapsed||It.empty!=null&&It.empty!==Yt.empty||It.offset!=null&&It.offset!==Yt.offset)return!1;if(Array.isArray(It.format)){if(It.format.every(function(_t){return Yt.format[_t]==null}))return!1}else if(i(It.format)==="object"&&!Object.keys(It.format).every(function(_t){return It.format[_t]===!0?Yt.format[_t]!=null:It.format[_t]===!1?Yt.format[_t]==null:(0,u.default)(It.format[_t],Yt.format[_t])}))return!1;return It.prefix!=null&&!It.prefix.test(Yt.prefix)||It.suffix!=null&&!It.suffix.test(Yt.suffix)?!1:It.handler.call(ae,Fe,Yt)!==!0});on&&le.preventDefault()}}}})}}]),ne})(R.default);B.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},B.DEFAULTS={bindings:{bold:te("bold"),italic:te("italic"),underline:te("underline"),indent:{key:B.keys.TAB,format:["blockquote","indent","list"],handler:function(ne,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:B.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(ne,oe){if(oe.collapsed&&oe.offset!==0)return!0;this.quill.format("indent","-1",_.default.sources.USER)}},"outdent backspace":{key:B.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(ne,oe){oe.format.indent!=null?this.quill.format("indent","-1",_.default.sources.USER):oe.format.list!=null&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":K(!0),"outdent code-block":K(!1),"remove tab":{key:B.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(ne){this.quill.deleteText(ne.index-1,1,_.default.sources.USER)}},tab:{key:B.keys.TAB,handler:function(ne){this.quill.history.cutoff();var oe=new g.default().retain(ne.index).delete(ne.length).insert("	");this.quill.updateContents(oe,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ne.index+1,_.default.sources.SILENT)}},"list empty enter":{key:B.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(ne,oe){this.quill.format("list",!1,_.default.sources.USER),oe.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:B.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(ne){var oe=this.quill.getLine(ne.index),ae=o(oe,2),le=ae[0],je=ae[1],xe=(0,m.default)({},le.formats(),{list:"checked"}),Fe=new g.default().retain(ne.index).insert(`
978`,xe).retain(le.length()-je-1).retain(1,{list:"unchecked"});this.quill.updateContents(Fe,_.default.sources.USER),this.quill.setSelection(ne.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:B.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(ne,oe){var ae=this.quill.getLine(ne.index),le=o(ae,2),je=le[0],xe=le[1],Fe=new g.default().retain(ne.index).insert(`
979`,oe.format).retain(je.length()-xe-1).retain(1,{header:null});this.quill.updateContents(Fe,_.default.sources.USER),this.quill.setSelection(ne.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(ne,oe){var ae=oe.prefix.length,le=this.quill.getLine(ne.index),je=o(le,2),xe=je[0],Fe=je[1];if(Fe>ae)return!0;var he=void 0;switch(oe.prefix.trim()){case"[]":case"[ ]":he="unchecked";break;case"[x]":he="checked";break;case"-":case"*":he="bullet";break;default:he="ordered"}this.quill.insertText(ne.index," ",_.default.sources.USER),this.quill.history.cutoff();var Ne=new g.default().retain(ne.index-Fe).delete(ae+1).retain(xe.length()-2-Fe).retain(1,{list:he});this.quill.updateContents(Ne,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(ne.index-ae,_.default.sources.SILENT)}},"code exit":{key:B.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(ne){var oe=this.quill.getLine(ne.index),ae=o(oe,2),le=ae[0],je=ae[1],xe=new g.default().retain(ne.index+le.length()-je-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(xe,_.default.sources.USER)}},"embed left":Y(B.keys.LEFT,!1),"embed left shift":Y(B.keys.LEFT,!0),"embed right":Y(B.keys.RIGHT,!1),"embed right shift":Y(B.keys.RIGHT,!0)}};function Y(Q,ne){var oe,ae=Q===B.keys.LEFT?"prefix":"suffix";return oe={key:Q,shiftKey:ne,altKey:null},k(oe,ae,/^$/),k(oe,"handler",function(je){var xe=je.index;Q===B.keys.RIGHT&&(xe+=je.length+1);var Fe=this.quill.getLeaf(xe),he=o(Fe,1),Ne=he[0];return Ne instanceof j.default.Embed?(Q===B.keys.LEFT?ne?this.quill.setSelection(je.index-1,je.length+1,_.default.sources.USER):this.quill.setSelection(je.index-1,_.default.sources.USER):ne?this.quill.setSelection(je.index,je.length+1,_.default.sources.USER):this.quill.setSelection(je.index+je.length+1,_.default.sources.USER),!1):!0}),oe}function ee(Q,ne){if(!(Q.index===0||this.quill.getLength()<=1)){var oe=this.quill.getLine(Q.index),ae=o(oe,1),le=ae[0],je={};if(ne.offset===0){var xe=this.quill.getLine(Q.index-1),Fe=o(xe,1),he=Fe[0];if(he!=null&&he.length()>1){var Ne=le.formats(),ue=this.quill.getFormat(Q.index-1,1);je=x.default.attributes.diff(Ne,ue)||{}}}var rt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(ne.prefix)?2:1;this.quill.deleteText(Q.index-rt,rt,_.default.sources.USER),Object.keys(je).length>0&&this.quill.formatLine(Q.index-rt,rt,je,_.default.sources.USER),this.quill.focus()}}function J(Q,ne){var oe=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(ne.suffix)?2:1;if(!(Q.index>=this.quill.getLength()-oe)){var ae={},le=0,je=this.quill.getLine(Q.index),xe=o(je,1),Fe=xe[0];if(ne.offset>=Fe.length()-1){var he=this.quill.getLine(Q.index+1),Ne=o(he,1),ue=Ne[0];if(ue){var rt=Fe.formats(),Te=this.quill.getFormat(Q.index,1);ae=x.default.attributes.diff(rt,Te)||{},le=ue.length()}}this.quill.deleteText(Q.index,oe,_.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(Q.index+le-1,oe,ae,_.default.sources.USER)}}function H(Q){var ne=this.quill.getLines(Q),oe={};if(ne.length>1){var ae=ne[0].formats(),le=ne[ne.length-1].formats();oe=x.default.attributes.diff(le,ae)||{}}this.quill.deleteText(Q,_.default.sources.USER),Object.keys(oe).length>0&&this.quill.formatLine(Q.index,1,oe,_.default.sources.USER),this.quill.setSelection(Q.index,_.default.sources.SILENT),this.quill.focus()}function q(Q,ne){var oe=this;Q.length>0&&this.quill.scroll.deleteAt(Q.index,Q.length);var ae=Object.keys(ne.format).reduce(function(le,je){return j.default.query(je,j.default.Scope.BLOCK)&&!Array.isArray(ne.format[je])&&(le[je]=ne.format[je]),le},{});this.quill.insertText(Q.index,`
980`,ae,_.default.sources.USER),this.quill.setSelection(Q.index+1,_.default.sources.SILENT),this.quill.focus(),Object.keys(ne.format).forEach(function(le){ae[le]==null&&(Array.isArray(ne.format[le])||le!=="link"&&oe.quill.format(le,ne.format[le],_.default.sources.USER))})}function K(Q){return{key:B.keys.TAB,shiftKey:!Q,format:{"code-block":!0},handler:function(oe){var ae=j.default.query("code-block"),le=oe.index,je=oe.length,xe=this.quill.scroll.descendant(ae,le),Fe=o(xe,2),he=Fe[0],Ne=Fe[1];if(he!=null){var ue=this.quill.getIndex(he),rt=he.newlineIndex(Ne,!0)+1,Te=he.newlineIndex(ue+Ne+je),Pe=he.domNode.textContent.slice(rt,Te).split(`
981`);Ne=0,Pe.forEach(function($e,Ve){Q?(he.insertAt(rt+Ne,ae.TAB),Ne+=ae.TAB.length,Ve===0?le+=ae.TAB.length:je+=ae.TAB.length):$e.startsWith(ae.TAB)&&(he.deleteAt(rt+Ne,ae.TAB.length),Ne-=ae.TAB.length,Ve===0?le-=ae.TAB.length:je-=ae.TAB.length),Ne+=$e.length+1}),this.quill.update(_.default.sources.USER),this.quill.setSelection(le,je,_.default.sources.SILENT)}}}}function te(Q){return{key:Q[0].toUpperCase(),shortKey:!0,handler:function(oe,ae){this.quill.format(Q,!ae.format[Q],_.default.sources.USER)}}}function re(Q){if(typeof Q=="string"||typeof Q=="number")return re({key:Q});if((typeof Q>"u"?"undefined":i(Q))==="object"&&(Q=(0,d.default)(Q,!1)),typeof Q.key=="string")if(B.keys[Q.key.toUpperCase()]!=null)Q.key=B.keys[Q.key.toUpperCase()];else if(Q.key.length===1)Q.key=Q.key.toUpperCase().charCodeAt(0);else return null;return Q.shortKey&&(Q[G]=Q.shortKey,delete Q.shortKey),Q}a.default=B,a.SHORTKEY=G}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function x(w,j){var N=[],_=!0,S=!1,A=void 0;try{for(var T=w[Symbol.iterator](),R;!(_=(R=T.next()).done)&&(N.push(R.value),!(j&&N.length===j));_=!0);}catch(M){S=!0,A=M}finally{try{!_&&T.return&&T.return()}finally{if(S)throw A}}return N}return function(w,j){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return x(w,j);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function x(w,j,N){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,j);if(_===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:x(S,j,N)}else{if("value"in _)return _.value;var A=_.get;return A===void 0?void 0:A.call(N)}},l=(function(){function x(w,j){for(var N=0;N<j.length;N++){var _=j[N];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,j,N){return j&&x(w.prototype,j),N&&x(w,N),w}})(),c=s(0),d=f(c),h=s(7),u=f(h);function f(x){return x&&x.__esModule?x:{default:x}}function m(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function b(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function g(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var y=(function(x){g(w,x),l(w,null,[{key:"value",value:function(){}}]);function w(j,N){m(this,w);var _=b(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,j));return _.selection=N,_.textNode=document.createTextNode(w.CONTENTS),_.domNode.appendChild(_.textNode),_._length=0,_}return l(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(N,_){if(this._length!==0)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,N,_);for(var S=this,A=0;S!=null&&S.statics.scope!==d.default.Scope.BLOCK_BLOT;)A+=S.offset(S.parent),S=S.parent;S!=null&&(this._length=w.CONTENTS.length,S.optimize(),S.formatAt(A,w.CONTENTS.length,N,_),this._length=0)}},{key:"index",value:function(N,_){return N===this.textNode?0:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,N,_)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var N=this.textNode,_=this.selection.getNativeRange(),S=void 0,A=void 0,T=void 0;if(_!=null&&_.start.node===N&&_.end.node===N){var R=[N,_.start.offset,_.end.offset];S=R[0],A=R[1],T=R[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var M=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof u.default?(S=this.next.domNode,this.next.insertAt(0,M),this.textNode.data=w.CONTENTS):(this.textNode.data=M,this.parent.insertBefore(d.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),A!=null){var k=[A,T].map(function(O){return Math.max(0,Math.min(S.data.length,O-1))}),P=i(k,2);return A=P[0],T=P[1],{startNode:S,startOffset:A,endNode:S,endOffset:T}}}}},{key:"update",value:function(N,_){var S=this;if(N.some(function(T){return T.type==="characterData"&&T.target===S.textNode})){var A=this.restore();A&&(_.range=A)}}},{key:"value",value:function(){return""}}]),w})(d.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",a.default=y}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(0),o=d(i),l=s(4),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(){return h(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g})(o.default.Container);m.allowedChildren=[c.default,l.BlockEmbed,m],a.default=m}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.ColorStyle=a.ColorClass=a.ColorAttributor=void 0;var i=(function(){function y(x,w){for(var j=0;j<w.length;j++){var N=w[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,w,j){return w&&y(x.prototype,w),j&&y(x,j),x}})(),o=function y(x,w,j){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,w);if(N===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:y(_,w,j)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(j)}},l=s(0),c=d(l);function d(y){return y&&y.__esModule?y:{default:y}}function h(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function u(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function f(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var m=(function(y){f(x,y);function x(){return h(this,x),u(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,[{key:"value",value:function(j){var N=o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"value",this).call(this,j);return N.startsWith("rgb(")?(N=N.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+N.split(",").map(function(_){return("00"+parseInt(_).toString(16)).slice(-2)}).join("")):N}}]),x})(c.default.Attributor.Style),b=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),g=new m("color","color",{scope:c.default.Scope.INLINE});a.ColorAttributor=m,a.ColorClass=b,a.ColorStyle=g}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.sanitize=a.default=void 0;var i=(function(){function g(y,x){for(var w=0;w<x.length;w++){var j=x[w];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(y,j.key,j)}}return function(y,x,w){return x&&g(y.prototype,x),w&&g(y,w),y}})(),o=function g(y,x,w){y===null&&(y=Function.prototype);var j=Object.getOwnPropertyDescriptor(y,x);if(j===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:g(N,x,w)}else{if("value"in j)return j.value;var _=j.get;return _===void 0?void 0:_.call(w)}},l=s(6),c=d(l);function d(g){return g&&g.__esModule?g:{default:g}}function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function f(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var m=(function(g){f(y,g);function y(){return h(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return i(y,[{key:"format",value:function(w,j){if(w!==this.statics.blotName||!j)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,w,j);j=this.constructor.sanitize(j),this.domNode.setAttribute("href",j)}}],[{key:"create",value:function(w){var j=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,w);return w=this.sanitize(w),j.setAttribute("href",w),j.setAttribute("rel","noopener noreferrer"),j.setAttribute("target","_blank"),j}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return b(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),y})(c.default);m.blotName="link",m.tagName="A",m.SANITIZED_URL="about:blank",m.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function b(g,y){var x=document.createElement("a");x.href=g;var w=x.href.slice(0,x.href.indexOf(":"));return y.indexOf(w)>-1}a.default=m,a.sanitize=b}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=(function(){function y(x,w){for(var j=0;j<w.length;j++){var N=w[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,w,j){return w&&y(x.prototype,w),j&&y(x,j),x}})(),l=s(23),c=u(l),d=s(107),h=u(d);function u(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}var m=0;function b(y,x){y.setAttribute(x,y.getAttribute(x)!=="true")}var g=(function(){function y(x){var w=this;f(this,y),this.select=x,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(j){switch(j.keyCode){case c.default.keys.ENTER:w.togglePicker();break;case c.default.keys.ESCAPE:w.escape(),j.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),b(this.label,"aria-expanded"),b(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var j=this,N=document.createElement("span");return N.tabIndex="0",N.setAttribute("role","button"),N.classList.add("ql-picker-item"),w.hasAttribute("value")&&N.setAttribute("data-value",w.getAttribute("value")),w.textContent&&N.setAttribute("data-label",w.textContent),N.addEventListener("click",function(){j.selectItem(N,!0)}),N.addEventListener("keydown",function(_){switch(_.keyCode){case c.default.keys.ENTER:j.selectItem(N,!0),_.preventDefault();break;case c.default.keys.ESCAPE:j.escape(),_.preventDefault();break}}),N}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=h.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","fal
981se"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,j=document.createElement("span");j.classList.add("ql-picker-options"),j.setAttribute("aria-hidden","true"),j.tabIndex="-1",j.id="ql-picker-options-"+m,m+=1,this.label.setAttribute("aria-controls",j.id),this.options=j,[].slice.call(this.select.options).forEach(function(N){var _=w.buildItem(N);j.appendChild(_),N.selected===!0&&w.selectItem(_)}),this.container.appendChild(j)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(j){w.container.setAttribute(j.name,j.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,N=this.container.querySelector(".ql-selected");if(w!==N&&(N!=null&&N.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),j))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":i(Event))==="object"){var _=document.createEvent("Event");_.initEvent("change",!0,!0),this.select.dispatchEvent(_)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var j=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(j)}else this.selectItem(null);var N=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",N)}}]),y})();a.default=g}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(0),o=$(i),l=s(5),c=$(l),d=s(4),h=$(d),u=s(16),f=$(u),m=s(25),b=$(m),g=s(24),y=$(g),x=s(35),w=$(x),j=s(6),N=$(j),_=s(22),S=$(_),A=s(7),T=$(A),R=s(55),M=$(R),k=s(42),P=$(k),O=s(23),F=$(O);function $(G){return G&&G.__esModule?G:{default:G}}c.default.register({"blots/block":h.default,"blots/block/embed":d.BlockEmbed,"blots/break":f.default,"blots/container":b.default,"blots/cursor":y.default,"blots/embed":w.default,"blots/inline":N.default,"blots/scroll":S.default,"blots/text":T.default,"modules/clipboard":M.default,"modules/history":P.default,"modules/keyboard":F.default}),o.default.register(h.default,f.default,y.default,N.default,S.default,T.default),a.default=c.default}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(1),o=(function(){function l(c){this.domNode=c,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new i.ParchmentError("Blot definition missing tagName");var d;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?d=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?d=document.createElement(c):d=document.createElement(this.tagName[0])):d=document.createElement(this.tagName),this.className&&d.classList.add(this.className),d},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return i.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},l.prototype.deleteAt=function(c,d){var h=this.isolate(c,d);h.remove()},l.prototype.formatAt=function(c,d,h,u){var f=this.isolate(c,d);if(i.query(h,i.Scope.BLOT)!=null&&u)f.wrap(h,u);else if(i.query(h,i.Scope.ATTRIBUTE)!=null){var m=i.create(this.statics.scope);f.wrap(m),m.format(h,u)}},l.prototype.insertAt=function(c,d,h){var u=h==null?i.create("text",d):i.
vendor: 98,501 bytes, lines 981-991
981create(d,h),f=this.split(c);this.parent.insertBefore(u,f)},l.prototype.insertInto=function(c,d){d===void 0&&(d=null),this.parent!=null&&this.parent.children.remove(this);var h=null;c.children.insertBefore(this,d),d!=null&&(h=d.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=h)&&c.domNode.insertBefore(this.domNode,h),this.parent=c,this.attach()},l.prototype.isolate=function(c,d){var h=this.split(c);return h.split(d),h},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[i.DATA_KEY]!=null&&delete this.domNode[i.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,d){var h=typeof c=="string"?i.create(c,d):c;return h.replace(this),h},l.prototype.split=function(c,d){return c===0?this:this.next},l.prototype.update=function(c,d){},l.prototype.wrap=function(c,d){var h=typeof c=="string"?i.create(c,d):c;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},l.blotName="abstract",l})();a.default=o}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(12),o=s(32),l=s(33),c=s(1),d=(function(){function h(u){this.attributes={},this.domNode=u,this.build()}return h.prototype.attribute=function(u,f){f?u.add(this.domNode,f)&&(u.value(this.domNode)!=null?this.attributes[u.attrName]=u:delete this.attributes[u.attrName]):(u.remove(this.domNode),delete this.attributes[u.attrName])},h.prototype.build=function(){var u=this;this.attributes={};var f=i.default.keys(this.domNode),m=o.default.keys(this.domNode),b=l.default.keys(this.domNode);f.concat(m).concat(b).forEach(function(g){var y=c.query(g,c.Scope.ATTRIBUTE);y instanceof i.default&&(u.attributes[y.attrName]=y)})},h.prototype.copy=function(u){var f=this;Object.keys(this.attributes).forEach(function(m){var b=f.attributes[m].value(f.domNode);u.format(m,b)})},h.prototype.move=function(u){var f=this;this.copy(u),Object.keys(this.attributes).forEach(function(m){f.attributes[m].remove(f.domNode)}),this.attributes={}},h.prototype.values=function(){var u=this;return Object.keys(this.attributes).reduce(function(f,m){return f[m]=u.attributes[m].value(u.domNode),f},{})},h})();a.default=d}),(function(r,a,s){var i=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var f in u)u.hasOwnProperty(f)&&(h[f]=u[f])};return function(h,u){d(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(12);function l(d,h){var u=d.getAttribute("class")||"";return u.split(/\s+/).filter(function(f){return f.indexOf(h+"-")===0})}var c=(function(d){i(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.keys=function(u){return(u.getAttribute("class")||"").split(/\s+/).map(function(f){return f.split("-").slice(0,-1).join("-")})},h.prototype.add=function(u,f){return this.canAdd(u,f)?(this.remove(u),u.classList.add(this.keyName+"-"+f),!0):!1},h.prototype.remove=function(u){var f=l(u,this.keyName);f.forEach(function(m){u.classList.remove(m)}),u.classList.length===0&&u.removeAttribute("class")},h.prototype.value=function(u){var f=l(u,this.keyName)[0]||"",m=f.slice(this.keyName.length+1);return this.canAdd(u,m)?m:""},h})(o.default);a.default=c}),(function(r,a,s){var i=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var f in u)u.hasOwnProperty(f)&&(h[f]=u[f])};return function(h,u){d(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(12);function l(d){var h=d.split("-"),u=h.slice(1).map(function(f){return f[0].toUpperCase()+f.slice(1)}).join("");return h[0]+u}var c=(function(d){i(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.keys=function(u){return(u.getAttribute("style")||"").split(";").map(function(f){var m=f.split(":");return m[0].trim()})},h.prototype.add=function(u,f){return this.canAdd(u,f)?(u.style[l(this.keyName)]=f,!0):!1},h.prototype.remove=function(u){u.style[l(this.keyName)]="",u.getAttribute("style")||u.removeAttribute("style")},h.prototype.value=function(u){var f=u.style[l(this.keyName)];return this.canAdd(u,f)?f:""},h})(o.default);a.default=c}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function c(d,h){for(var u=0;u<h.length;u++){var f=h[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(d,f.key,f)}}return function(d,h,u){return h&&c(d.prototype,h),u&&c(d,u),d}})();function o(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(d,h){o(this,c),this.quill=d,this.options=h,this.modules={}}return i(c,[{key:"init",value:function(){var h=this;Object.keys(this.options.modules).forEach(function(u){h.modules[u]==null&&h.addModule(u)})}},{key:"addModule",value:function(h){var u=this.quill.constructor.import("modules/"+h);return this.modules[h]=new u(this.quill,this.options.modules[h]||{}),this.modules[h]}}]),c})();l.DEFAULTS={modules:{}},l.themes={default:l},a.default=l}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function x(w,j){for(var N=0;N<j.length;N++){var _=j[N];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,j,N){return j&&x(w.prototype,j),N&&x(w,N),w}})(),o=function x(w,j,N){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,j);if(_===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:x(S,j,N)}else{if("value"in _)return _.value;var A=_.get;return A===void 0?void 0:A.call(N)}},l=s(0),c=u(l),d=s(7),h=u(d);function u(x){return x&&x.__esModule?x:{default:x}}function f(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function m(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function b(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var g="\uFEFF",y=(function(x){b(w,x);function w(j){f(this,w);var N=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,j));return N.contentNode=document.createElement("span"),N.contentNode.setAttribute("contenteditable",!1),[].slice.call(N.domNode.childNodes).forEach(function(_){N.contentNode.appendChild(_)}),N.leftGuard=document.createTextNode(g),N.rightGuard=document.createTextNode(g),N.domNode.appendChild(N.leftGuard),N.domNode.appendChild(N.contentNode),N.domNode.appendChild(N.rightGuard),N}return i(w,[{key:"index",value:function(N,_){return N===this.leftGuard?0:N===this.rightGuard?1:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,N,_)}},{key:"restore",value:function(N){var _=void 0,S=void 0,A=N.data.split(g).join("");if(N===this.leftGuard)if(this.prev instanceof h.default){var T=this.prev.length();this.prev.insertAt(T,A),_={startNode:this.prev.domNode,startOffset:T+A.length}}else S=document.createTextNode(A),this.parent.insertBefore(c.default.create(S),this),_={startNode:S,startOffset:A.length};else N===this.rightGuard&&(this.next instanceof h.default?(this.next.insertAt(0,A),_={startNode:this.next.domNode,startOffset:A.length}):(S=document.createTextNode(A),this.parent.insertBefore(c.default.create(S),this.next),_={startNode:S,startOffset:A.length}));return N.data=g,_}},{key:"update",value:function(N,_){var S=this;N.forEach(function(A){if(A.type==="characterData"&&(A.target===S.leftGuard||A.target===S.rightGuard)){var T=S.restore(A.target);T&&(_.range=T)}})}}]),w})(c.default.Embed);a.default=y}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.AlignStyle=a.AlignClass=a.AlignAttribute=void 0;var i=s(0),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},d=new o.default.Attributor.Attribute("align","align",c),h=new o.default.Attributor.Class("align","ql-align",c),u=new o.default.Attributor.Style("align","text-align",c);a.AlignAttribute=d,a.AlignClass=h,a.AlignStyle=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.BackgroundStyle=a.BackgroundClass=void 0;var i=s(0),o=c(i),l=s(26);function c(u){return u&&u.__esModule?u:{default:u}}var d=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),h=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});a.BackgroundClass=d,a.BackgroundStyle=h}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.DirectionStyle=a.DirectionClass=a.DirectionAttribute=void 0;var i=s(0),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},d=new o.default.Attributor.Attribute("direction","dir",c),h=new o.default.Attributor.Class("direction","ql-direction",c),u=new o.default.Attributor.Style("direction","direction",c);a.DirectionAttribute=d,a.DirectionClass=h,a.DirectionStyle=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.FontClass=a.FontStyle=void 0;var i=(function(){function x(w,j){for(var N=0;N<j.length;N++){var _=j[N];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,j,N){return j&&x(w.prototype,j),N&&x(w,N),w}})(),o=function x(w,j,N){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,j);if(_===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:x(S,j,N)}else{if("value"in _)return _.value;var A=_.get;return A===void 0?void 0:A.call(N)}},l=s(0),c=d(l);function d(x){return x&&x.__esModule?x:{default:x}}function h(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function u(x,w){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:x}function f(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(x,w):x.__proto__=w)}var m={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},b=new c.default.Attributor.Class("font","ql-font",m),g=(function(x){f(w,x);function w(){return h(this,w),u(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return i(w,[{key:"value",value:function(N){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,N).replace(/["']/g,"")}}]),w})(c.default.Attributor.Style),y=new g("font","font-family",m);a.FontStyle=y,a.FontClass=b}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.SizeStyle=a.SizeClass=void 0;var i=s(0),o=l(i);function l(h){return h&&h.__esModule?h:{default:h}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),d=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});a.SizeClass=c,a.SizeStyle=d}),(function(r,a,s){r.exports={align:{"":s(76),center:s(77),right:s(78),justify:s(79)},background:s(80),blockquote:s(81),bold:s(82),clean:s(83),code:s(58),"code-block":s(58),color:s(84),direction:{"":s(85),rtl:s(86)},float:{center:s(87),full:s(88),left:s(89),right:s(90)},formula:s(91),header:{1:s(92),2:s(93)},italic:s(94),image:s(95),indent:{"+1":s(96),"-1":s(97)},link:s(98),list:{ordered:s(99),bullet:s(100),check:s(101)},script:{sub:s(102),super:s(103)},strike:s(104),underline:s(105),video:s(106)}}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.getLastChangeIndex=a.default=void 0;var i=(function(){function j(N,_){for(var S=0;S<_.length;S++){var A=_[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(N,A.key,A)}}return function(N,_,S){return _&&j(N.prototype,_),S&&j(N,S),N}})(),o=s(0),l=f(o),c=s(5),d=f(c),h=s(9),u=f(h);function f(j){return j&&j.__esModule?j:{default:j}}function m(j,N){if(!(j instanceof N))throw new TypeError("Cannot call a class as a function")}function b(j,N){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:j}function g(j,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);j.prototype=Object.create(N&&N.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(j,N):j.__proto__=N)}var y=(function(j){g(N,j);function N(_,S){m(this,N);var A=b(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,_,S));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(d.default.events.EDITOR_CHANGE,function(T,R,M,k){T!==d.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||k===d.default.sources.USER?A.record(R,M):A.transform(R))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return i(N,[{key:"change",value:function(S,A){if(this.stack[S].length!==0){var T=this.stack[S].pop();this.stack[A].push(T),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(T[S],d.default.sources.USER),this.ignoreChange=!1;var R=w(T[S]);this.quill.setSelection(R)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(S,A){if(S.ops.length!==0){this.stack.redo=[];var T=this.quill.getContents().diff(A),R=Date.now();if(this.lastRecorded+this.options.delay>R&&this.stack.undo.length>0){var M=this.stack.undo.pop();T=T.compose(M.undo),S=M.redo.compose(S)}else this.lastRecorded=R;this.stack.undo.push({redo:S,undo:T}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(S){this.stack.undo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),N})(u.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function x(j){var N=j.ops[j.ops.length-1];return N==null?!1:N.insert!=null?typeof N.insert=="string"&&N.insert.endsWith(`
982`):N.attributes!=null?Object.keys(N.attributes).some(function(_){return l.default.query(_,l.default.Scope.BLOCK)!=null}):!1}function w(j){var N=j.reduce(function(S,A){return S+=A.delete||0,S},0),_=j.length()-N;return x(j)&&(_-=1),_}a.default=y,a.getLastChangeIndex=w}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.BaseTooltip=void 0;var i=(function(){function q(K,te){for(var re=0;re<te.length;re++){var Q=te[re];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(K,Q.key,Q)}}return function(K,te,re){return te&&q(K.prototype,te),re&&q(K,re),K}})(),o=function q(K,te,re){K===null&&(K=Function.prototype);var Q=Object.getOwnPropertyDescriptor(K,te);if(Q===void 0){var ne=Object.getPrototypeOf(K);return ne===null?void 0:q(ne,te,re)}else{if("value"in Q)return Q.value;var oe=Q.get;return oe===void 0?void 0:oe.call(re)}},l=s(3),c=R(l),d=s(2),h=R(d),u=s(8),f=R(u),m=s(23),b=R(m),g=s(34),y=R(g),x=s(59),w=R(x),j=s(60),N=R(j),_=s(28),S=R(_),A=s(61),T=R(A);function R(q){return q&&q.__esModule?q:{default:q}}function M(q,K){if(!(q instanceof K))throw new TypeError("Cannot call a class as a function")}function k(q,K){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K&&(typeof K=="object"||typeof K=="function")?K:q}function P(q,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof K);q.prototype=Object.create(K&&K.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),K&&(Object.setPrototypeOf?Object.setPrototypeOf(q,K):q.__proto__=K)}var O=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],$=[!1,"serif","monospace"],G=["1","2","3",!1],B=["small",!1,"large","huge"],Y=(function(q){P(K,q);function K(te,re){M(this,K);var Q=k(this,(K.__proto__||Object.getPrototypeOf(K)).call(this,te,re)),ne=function oe(ae){if(!document.body.contains(te.root))return document.body.removeEventListener("click",oe);Q.tooltip!=null&&!Q.tooltip.root.contains(ae.target)&&document.activeElement!==Q.tooltip.textbox&&!Q.quill.hasFocus()&&Q.tooltip.hide(),Q.pickers!=null&&Q.pickers.forEach(function(le){le.container.contains(ae.target)||le.close()})};return te.emitter.listenDOM("click",document.body,ne),Q}return i(K,[{key:"addModule",value:function(re){var Q=o(K.prototype.__proto__||Object.getPrototypeOf(K.prototype),"addModule",this).call(this,re);return re==="toolbar"&&this.extendToolbar(Q),Q}},{key:"buildButtons",value:function(re,Q){re.forEach(function(ne){var oe=ne.getAttribute("class")||"";oe.split(/\s+/).forEach(function(ae){if(ae.startsWith("ql-")&&(ae=ae.slice(3),Q[ae]!=null))if(ae==="direction")ne.innerHTML=Q[ae][""]+Q[ae].rtl;else if(typeof Q[ae]=="string")ne.innerHTML=Q[ae];else{var le=ne.value||"";le!=null&&Q[ae][le]&&(ne.innerHTML=Q[ae][le])}})})}},{key:"buildPickers",value:function(re,Q){var ne=this;this.pickers=re.map(function(ae){if(ae.classList.contains("ql-align"))return ae.querySelector("option")==null&&H(ae,O),new N.default(ae,Q.align);if(ae.classList.contains("ql-background")||ae.classList.contains("ql-color")){var le=ae.classList.contains("ql-background")?"background":"color";return ae.querySelector("option")==null&&H(ae,F,le==="background"?"#ffffff":"#000000"),new w.default(ae,Q[le])}else return ae.querySelector("option")==null&&(ae.classList.contains("ql-font")?H(ae,$):ae.classList.contains("ql-header")?H(ae,G):ae.classList.contains("ql-size")&&H(ae,B)),new S.default(ae)});var oe=function(){ne.pickers.forEach(function(le){le.update()})};this.quill.on(f.default.events.EDITOR_CHANGE,oe)}}]),K})(y.default);Y.DEFAULTS=(0,c.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var K=this,te=this.container.querySelector("input.ql-image[type=file]");te==null&&(te=document.createElement("input"),te.setAttribute("type","file"),te.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),te.classList.add("ql-image"),te.addEventListener("change",function(){if(te.files!=null&&te.files[0]!=null){var re=new FileReader;re.onload=function(Q){var ne=K.quill.getSelection(!0);K.quill.updateContents(new h.default().retain(ne.index).delete(ne.length).insert({image:Q.target.result}),f.default.sources.USER),K.quill.setSelection(ne.index+1,f.default.sources.SILENT),te.value=""},re.readAsDataURL(te.files[0])}}),this.container.appendChild(te)),te.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var ee=(function(q){P(K,q);function K(te,re){M(this,K);var Q=k(this,(K.__proto__||Object.getPrototypeOf(K)).call(this,te,re));return Q.textbox=Q.root.querySelector('input[type="text"]'),Q.listen(),Q}return i(K,[{key:"listen",value:function(){var re=this;this.textbox.addEventListener("keydown",function(Q){b.default.match(Q,"enter")?(re.save(),Q.preventDefault()):b.default.match(Q,"escape")&&(re.cancel(),Q.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Q!=null?this.textbox.value=Q:re!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+re)||""),this.root.setAttribute("data-mode",re)}},{key:"restoreFocus",value:function(){var re=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=re}},{key:"save",value:function(){var re=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",re,f.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",re,f.default.sources.USER)),this.quill.root.scrollTop=Q;break}case"video":re=J(re);case"formula":{if(!re)break;var ne=this.quill.getSelection(!0);if(ne!=null){var oe=ne.index+ne.length;this.quill.insertEmbed(oe,this.root.getAttribute("data-mode"),re,f.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(oe+1," ",f.default.sources.USER),this.quill.setSelection(oe+2,f.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),K})(T.default);function J(q){var K=q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return K?(K[1]||"https")+"://www.youtube.com/embed/"+K[2]+"?showinfo=0":(K=q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(K[1]||"https")+"://player.vimeo.com/video/"+K[2]+"/":q}function H(q,K){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;K.forEach(function(re){var Q=document.createElement("option");re===te?Q.setAttribute("selected","selected"):Q.setAttribute("value",re),q.appendChild(Q)})}a.BaseTooltip=ee,a.default=Y}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,d=this.iterator();c=d();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,d=this.head;d!=null;){if(d===l)return c;c+=d.length(),d=d.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var d,h=this.iterator();d=h();){var u=d.length();if(l<u||c&&l===u&&(d.next==null||d.next.length()!==0))return[d,l];l-=u}return[null,0]},o.prototype.forEach=function(l){for(var c,d=this.iterator();c=d();)l(c)},o.prototype.forEachAt=function(l,c,d){if(!(c<=0))for(var h=this.find(l),u=h[0],f=h[1],m,b=l-f,g=this.iterator(u);(m=g())&&b<l+c;){var y=m.length();l>b?d(m,l-b,Math.min(c,b+y-l)):d(m,0,Math.min(y,l+c-b)),b+=y}},o.prototype.map=function(l){return this.reduce(function(c,d){return c.push(l(d)),c},[])},o.prototype.reduce=function(l,c){for(var d,h=this.iterator();d=h();)c=l(c,d);return c},o})();a.default=i}),(function(r,a,s){var i=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var b in m)m.hasOwnProperty(b)&&(f[b]=m[b])};return function(f,m){u(f,m);function b(){this.constructor=f}f.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(17),l=s(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},d=100,h=(function(u){i(f,u);function f(m){var b=u.call(this,m)||this;return b.scroll=b,b.observer=new MutationObserver(function(g){b.update(g)}),b.observer.observe(b.domNode,c),b.attach(),b}return f.prototype.detach=function(){u.prototype.detach.call(this),this.observer.disconnect()},f.prototype.deleteAt=function(m,b){this.update(),m===0&&b===this.length()?this.children.forEach(function(g){g.remove()}):u.prototype.deleteAt.call(this,m,b)},f.prototype.formatAt=function(m,b,g,y){this.update(),u.prototype.formatAt.call(this,m,b,g,y)},f.prototype.insertAt=function(m,b,g){this.update(),u.prototype.insertAt.call(this,m,b,g)},f.prototype.optimize=function(m,b){var g=this;m===void 0&&(m=[]),b===void 0&&(b={}),u.prototype.optimize.call(this,b);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)m.push(y.pop());for(var x=function(_,S){S===void 0&&(S=!0),!(_==null||_===g)&&_.domNode.parentNode!=null&&(_.domNode[l.DATA_KEY].mutations==null&&(_.domNode[l.DATA_KEY].mutations=[]),S&&x(_.parent))},w=function(_){_.domNode[l.DATA_KEY]==null||_.domNode[l.DATA_KEY].mutations==null||(_ instanceof o.default&&_.children.forEach(w),_.optimize(b))},j=m,N=0;j.length>0;N+=1){if(N>=d)throw new Error("[Parchment] Maximum optimize iterations reached");for(j.forEach(function(_){var S=l.find(_.target,!0);S!=null&&(S.domNode===_.target&&(_.type==="childList"?(x(l.find(_.previousSibling,!1)),[].forEach.call(_.addedNodes,function(A){var T=l.find(A,!1);x(T,!1),T instanceof o.default&&T.children.forEach(function(R){x(R,!1)})})):_.type==="attributes"&&x(S.prev)),x(S))}),this.children.forEach(w),j=[].slice.call(this.observer.takeRecords()),y=j.slice();y.length>0;)m.push(y.pop())}},f.prototype.update=function(m,b){var g=this;b===void 0&&(b={}),m=m||this.observer.takeRecords(),m.map(function(y){var x=l.find(y.target,!0);return x==null?null:x.domNode[l.DATA_KEY].mutations==null?(x.domNode[l.DATA_KEY].mutations=[y],x):(x.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===g||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],b)}),this.domNode[l.DATA_KEY].mutations!=null&&u.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,b),this.optimize(m,b)},f.blotName="scroll",f.defaultChild="block",f.scope=l.Scope.BLOCK_BLOT,f.tagName="DIV",f})(o.default);a.default=h}),(function(r,a,s){var i=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var m in f)f.hasOwnProperty(m)&&(u[m]=f[m])};return function(u,f){h(u,f);function m(){this.constructor=u}u.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(18),l=s(1);function c(h,u){if(Object.keys(h).length!==Object.keys(u).length)return!1;for(var f in h)if(h[f]!==u[f])return!1;return!0}var d=(function(h){i(u,h);function u(){return h!==null&&h.apply(this,arguments)||this}return u.formats=function(f){if(f.tagName!==u.tagName)return h.formats.call(this,f)},u.prototype.format=function(f,m){var b=this;f===this.statics.blotName&&!m?(this.children.forEach(function(g){g instanceof o.default||(g=g.wrap(u.blotName,!0)),b.attributes.copy(g)}),this.unwrap()):h.prototype.format.call(this,f,m)},u.prototype.formatAt=function(f,m,b,g){if(this.formats()[b]!=null||l.query(b,l.Scope.ATTRIBUTE)){var y=this.isolate(f,m);y.format(b,g)}else h.prototype.formatAt.call(this,f,m,b,g)},u.prototype.optimize=function(f){h.prototype.optimize.call(this,f);var m=this.formats();if(Object.keys(m).length===0)return this.unwrap();var b=this.next;b instanceof u&&b.prev===this&&c(m,b.formats())&&(b.moveChildren(this),b.remove())},u.blotName="inline",u.scope=l.Scope.INLINE_BLOT,u.tagName="SPAN",u})(o.default);a.default=d}),(function(r,a,s){var i=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var f in u)u.hasOwnProperty(f)&&(h[f]=u[f])};return function(h,u){d(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(18),l=s(1),c=(function(d){i(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.formats=function(u){var f=l.query(h.blotName).tagName;if(u.tagName!==f)return d.formats.call(this,u)},h.prototype.format=function(u,f){l.query(u,l.Scope.BLOCK)!=null&&(u===this.statics.blotName&&!f?this.replaceWith(h.blotName):d.prototype.format.call(this,u,f))},h.prototype.formatAt=function(u,f,m,b){l.query(m,l.Scope.BLOCK)!=null?this.format(m,b):d.prototype.formatAt.call(this,u,f,m,b)},h.prototype.insertAt=function(u,f,m){if(m==null||l.query(f,l.Scope.INLINE)!=null)d.prototype.insertAt.call(this,u,f,m);else{var b=this.split(u),g=l.create(f,m);b.parent.insertBefore(g,b)}},h.prototype.update=function(u,f){navigator.userAgent.match(/Trident/)?this.build():d.prototype.update.call(this,u,f)},h.blotName="block",h.scope=l.Scope.BLOCK_BLOT,h.tagName="P",h})(o.default);a.default=c}),(function(r,a,s){var i=this&&this.__extends||(function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,h){d.__proto__=h}||function(d,h){for(var u in h)h.hasOwnProperty(u)&&(d[u]=h[u])};return function(d,h){c(d,h);function u(){this.constructor=d}d.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(19),l=(function(c){i(d,c);function d(){return c!==null&&c.apply(this,arguments)||this}return d.formats=function(h){},d.prototype.format=function(h,u){c.prototype.formatAt.call(this,0,this.length(),h,u)},d.prototype.formatAt=function(h,u,f,m){h===0&&u===this.length()?this.format(f,m):c.prototype.formatAt.call(this,h,u,f,m)},d.prototype.formats=function(){return this.statics.formats(this.domNode)},d})(o.default);a.default=l}),(function(r,a,s){var i=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var f in u)u.hasOwnProperty(f)&&(h[f]=u[f])};return function(h,u){d(h,u);function f(){this.constructor=h}h.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})();Object.defineProperty(a,"__esModule",{value:!0});var o=s(19),l=s(1),c=(function(d){i(h,d);function h(u){var f=d.call(this,u)||this;return f.text=f.statics.value(f.domNode),f}return h.create=function(u){return document.createTextNode(u)},h.value=function(u){var f=u.data;return f.normalize&&(f=f.normalize()),f},h.prototype.deleteAt=function(u,f){this.domNode.data=this.text=this.text.slice(0,u)+this.text.slice(u+f)},h.prototype.index=function(u,f){return this.domNode===u?f:-1},h.prototype.insertAt=function(u,f,m){m==null?(this.text=this.text.slice(0,u)+f+this.text.slice(u),this.domNode.data=this.text):d.prototype.insertAt.call(this,u,f,m)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(u){d.prototype.optimize.call(this,u),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(u,f){return[this.domNode,u]},h.prototype.split=function(u,f){if(f===void 0&&(f=!1),!f){if(u===0)return this;if(u===this.length())return this.next}var m=l.create(this.domNode.splitText(u));return this.parent.insertBefore(m,this.next),this.text=this.statics.value(this.domNode),m},h.prototype.update=function(u,f){var m=this;u.some(function(b){return b.type==="characterData"&&b.target===m.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=l.Scope.INLINE_BLOT,h})(o.default);a.default=c}),(function(r,a,s){var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var d=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>d.length)&&(c=d.length),c-=l.length;var h=d.indexOf(l,c);return h!==-1&&h===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var d=Object(this),h=d.length>>>0,u=arguments[1],f,m=0;m<h;m++)if(f=d[m],c.call(u,f,m,d))return f}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(r,a){var s=-1,i=1,o=0;function l(N,_,S){if(N==_)return N?[[o,N]]:[];(S<0||N.length<S)&&(S=null);var A=u(N,_),T=N.substring(0,A);N=N.substring(A),_=_.substring(A),A=f(N,_);var R=N.substring(N.length-A);N=N.substring(0,N.length-A),_=_.substring(0,_.length-A);var M=c(N,_);return T&&M.unshift([o,T]),R&&M.push([o,R]),b(M),S!=null&&(M=x(M,S)),M=w(M),M}function c(N,_){var S;if(!N)return[[i,_]];if(!_)return[[s,N]];var A=N.length>_.length?N:_,T=N.length>_.length?_:N,R=A.indexOf(T);if(R!=-1)return S=[[i,A.substring(0,R)],[o,T],[i,A.substring(R+T.length)]],N.length>_.length&&(S[0][0]=S[2][0]=s),S;if(T.length==1)return[[s,N],[i,_]];var M=m(N,_);if(M){var k=M[0],P=M[1],O=M[2],F=M[3],$=M[4],G=l(k,O),B=l(P,F);return G.concat([[o,$]],B)}return d(N,_)}function d(N,_){for(var S=N.length,A=_.length,T=Math.ceil((S+A)/2),R=T,M=2*T,k=new Array(M),P=new Array(M),O=0;O<M;O++)k[O]=-1,P[O]=-1;k[R+1]=0,P[R+1]=0;for(var F=S-A,$=F%2!=0,G=0,B=0,Y=0,ee=0,J=0;J<T;J++){for(var H=-J+G;H<=J-B;H+=2){var q=R+H,K;H==-J||H!=J&&k[q-1]<k[q+1]?K=k[q+1]:K=k[q-1]+1;for(var te=K-H;K<S&&te<A&&N.charAt(K)==_.charAt(te);)K++,te++;if(k[q]=K,K>S)B+=2;else if(te>A)G+=2;else if($){var re=R+F-H;if(re>=0&&re<M&&P[re]!=-1){var Q=S-P[re];if(K>=Q)return h(N,_,K,te)}}}for(var ne=-J+Y;ne<=J-ee;ne+=2){var re=R+ne,Q;ne==-J||ne!=J&&P[re-1]<P[re+1]?Q=P[re+1]:Q=P[re-1]+1;for(var oe=Q-ne;Q<S&&oe<A&&N.charAt(S-Q-1)==_.charAt(A-oe-1);)Q++,oe++;if(P[re]=Q,Q>S)ee+=2;else if(oe>A)Y+=2;else if(!$){var q=R+F-ne;if(q>=0&&q<M&&k[q]!=-1){var K=k[q],te=R+K-q;if(Q=S-Q,K>=Q)return h(N,_,K,te)}}}}return[[s,N],[i,_]]}function h(N,_,S,A){var T=N.substring(0,S),R=_.substring(0,A),M=N.substring(S),k=_.substring(A),P=l(T,R),O=l(M,k);return P.concat(O)}function u(N,_){if(!N||!_||N.charAt(0)!=_.charAt(0))return 0;for(var S=0,A=Math.min(N.length,_.length),T=A,R=0;S<T;)N.substring(R,T)==_.substring(R,T)?(S=T,R=S):A=T,T=Math.floor((A-S)/2+S);return T}function f(N,_){if(!N||!_||N.charAt(N.length-1)!=_.charAt(_.length-1))return 0;for(var S=0,A=Math.min(N.length,_.length),T=A,R=0;S<T;)N.substring(N.length-T,N.length-R)==_.substring(_.length-T,_.length-R)?(S=T,R=S):A=T,T=Math.floor((A-S)/2+S);return T}function m(N,_){var S=N.length>_.length?N:_,A=N.length>_.length?_:N;if(S.length<4||A.length*2<S.length)return null;function T(B,Y,ee){for(var J=B.substring(ee,ee+Math.floor(B.length/4)),H=-1,q="",K,te,re,Q;(H=Y.indexOf(J,H+1))!=-1;){var ne=u(B.substring(ee),Y.substring(H)),oe=f(B.substring(0,ee),Y.substring(0,H));q.length<oe+ne&&(q=Y.substring(H-oe,H)+Y.substring(H,H+ne),K=B.substring(0,ee-oe),te=B.substring(ee+ne),re=Y.substring(0,H-oe),Q=Y.substring(H+ne))}return q.length*2>=B.length?[K,te,re,Q,q]:null}var R=T(S,A,Math.ceil(S.length/4)),M=T(S,A,Math.ceil(S.length/2)),k;if(!R&&!M)return null;M?R?k=R[4].length>M[4].length?R:M:k=M:k=R;var P,O,F,$;N.length>_.length?(P=k[0],O=k[1],F=k[2],$=k[3]):(F=k[0],$=k[1],P=k[2],O=k[3]);var G=k[4];return[P,O,F,$,G]}function b(N){N.push([o,""]);for(var _=0,S=0,A=0,T="",R="",M;_<N.length;)switch(N[_][0]){case i:A++,R+=N[_][1],_++;break;case s:S++,T+=N[_][1],_++;break;case o:S+A>1?(S!==0&&A!==0&&(M=u(R,T),M!==0&&(_-S-A>0&&N[_-S-A-1][0]==o?N[_-S-A-1][1]+=R.substring(0,M):(N.splice(0,0,[o,R.substring(0,M)]),_++),R=R.substring(M),T=T.substring(M)),M=f(R,T),M!==0&&(N[_][1]=R.substring(R.length-M)+N[_][1],R=R.substring(0,R.length-M),T=T.substring(0,T.length-M))),S===0?N.splice(_-A,S+A,[i,R]):A===0?N.splice(_-S,S+A,[s,T]):N.splice(_-S-A,S+A,[s,T],[i,R]),_=_-S-A+(S?1:0)+(A?1:0)+1):_!==0&&N[_-1][0]==o?(N[_-1][1]+=N[_][1],N.splice(_,1)):_++,A=0,S=0,T="",R="";break}N[N.length-1][1]===""&&N.pop();var k=!1;for(_=1;_<N.length-1;)N[_-1][0]==o&&N[_+1][0]==o&&(N[_][1].substring(N[_][1].length-N[_-1][1].length)==N[_-1][1]?(N[_][1]=N[_-1][1]+N[_][1].substring(0,N[_][1].length-N[_-1][1].length),N[_+1][1]=N[_-1][1]+N[_+1][1],N.splice(_-1,1),k=!0):N[_][1].substring(0,N[_+1][1].length)==N[_+1][1]&&(N[_-1][1]+=N[_+1][1],N[_][1]=N[_][1].substring(N[_+1][1].length)+N[_+1][1],N.splice(_+1,1),k=!0)),_++;k&&b(N)}var g=l;g.INSERT=i,g.DELETE=s,g.EQUAL=o,r.exports=g;function y(N,_){if(_===0)return[o,N];for(var S=0,A=0;A<N.length;A++){var T=N[A];if(T[0]===s||T[0]===o){var R=S+T[1].length;if(_===R)return[A+1,N];if(_<R){N=N.slice();var M=_-S,k=[T[0],T[1].slice(0,M)],P=[T[0],T[1].slice(M)];return N.splice(A,1,k,P),[A+1,N]}else S=R}}throw new Error("cursor_pos is out of bounds!")}function x(N,_){var S=y(N,_),A=S[1],T=S[0],R=A[T],M=A[T+1];if(R==null)return N;if(R[0]!==o)return N;if(M!=null&&R[1]+M[1]===M[1]+R[1])return A.splice(T,2,M,R),j(A,T,2);if(M!=null&&M[1].indexOf(R[1])===0){A.splice(T,2,[M[0],R[1]],[0,R[1]]);var k=M[1].slice(R[1].length);return k.length>0&&A.splice(T+2,0,[M[0],k]),j(A,T,3)}else return N}function w(N){for(var _=!1,S=function(M){return M.charCodeAt(0)>=56320&&M.charCodeAt(0)<=57343},A=function(M){return M.charCodeAt(M.length-1)>=55296&&M.charCodeAt(M.length-1)<=56319},T=2;T<N.length;T+=1)N[T-2][0]===o&&A(N[T-2][1])&&N[T-1][0]===s&&S(N[T-1][1])&&N[T][0]===i&&S(N[T][1])&&(_=!0,N[T-1][1]=N[T-2][1].slice(-1)+N[T-1][1],N[T][1]=N[T-2][1].slice(-1)+N[T][1],N[T-2][1]=N[T-2][1].slice(0,-1));if(!_)return N;for(var R=[],T=0;T<N.length;T+=1)N[T][1].length>0&&R.push(N[T]);return R}function j(N,_,S){for(var A=_+S-1;A>=0&&A>=_-1;A--)if(A+1<N.length){var T=N[A],R=N[A+1];T[0]===R[1]&&N.splice(A,2,[T[0],T[1]+R[1]])}return N}}),(function(r,a){a=r.exports=typeof Object.keys=="function"?Object.keys:s,a.shim=s;function s(i){var o=[];for(var l in i)o.push(l);return o}}),(function(r,a){var s=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";a=r.exports=s?i:o,a.supported=i;function i(l){return Object.prototype.toString.call(l)=="[object Arguments]"}a.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}}),(function(r,a){var s=Object.prototype.hasOwnProperty,i="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(i=!1));function l(d,h,u){this.fn=d,this.context=h,this.once=u||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],u,f;if(this._eventsCount===0)return h;for(f in u=this._events)s.call(u,f)&&h.push(i?f.slice(1):f);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(u)):h},c.prototype.listeners=function(h,u){var f=i?i+h:h,m=this._events[f];if(u)return!!m;if(!m)return[];if(m.fn)return[m.fn];for(var b=0,g=m.length,y=new Array(g);b<g;b++)y[b]=m[b].fn;return y},c.prototype.emit=function(h,u,f,m,b,g){var y=i?i+h:h;if(!this._events[y])return!1;var x=this._events[y],w=arguments.length,j,N;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,u),!0;case 3:return x.fn.call(x.context,u,f),!0;case 4:return x.fn.call(x.context,u,f,m),!0;case 5:return x.fn.call(x.context,u,f,m,b),!0;case 6:return x.fn.call(x.context,u,f,m,b,g),!0}for(N=1,j=new Array(w-1);N<w;N++)j[N-1]=arguments[N];x.fn.apply(x.context,j)}else{var _=x.length,S;for(N=0;N<_;N++)switch(x[N].once&&this.removeListener(h,x[N].fn,void 0,!0),w){case 1:x[N].fn.call(x[N].context);break;case 2:x[N].fn.call(x[N].context,u);break;case 3:x[N].fn.call(x[N].context,u,f);break;case 4:x[N].fn.call(x[N].context,u,f,m);break;default:if(!j)for(S=1,j=new Array(w-1);S<w;S++)j[S-1]=arguments[S];x[N].fn.apply(x[N].context,j)}}return!0},c.prototype.on=function(h,u,f){var m=new l(u,f||this),b=i?i+h:h;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],m]:this._events[b].push(m):(this._events[b]=m,this._eventsCount++),this},c.prototype.once=function(h,u,f){var m=new l(u,f||this,!0),b=i?i+h:h;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],m]:this._events[b].push(m):(this._events[b]=m,this._eventsCount++),this},c.prototype.removeListener=function(h,u,f,m){var b=i?i+h:h;if(!this._events[b])return this;if(!u)return--this._eventsCount===0?this._events=new o:delete this._events[b],this;var g=this._events[b];if(g.fn)g.fn===u&&(!m||g.once)&&(!f||g.context===f)&&(--this._eventsCount===0?this._events=new o:delete this._events[b]);else{for(var y=0,x=[],w=g.length;y<w;y++)(g[y].fn!==u||m&&!g[y].once||f&&g[y].context!==f)&&x.push(g[y]);x.length?this._events[b]=x.length===1?x[0]:x:--this._eventsCount===0?this._events=new o:delete this._events[b]}return this},c.prototype.removeAllListeners=function(h){var u;return h?(u=i?i+h:h,this._events[u]&&(--this._eventsCount===0?this._events=new o:delete this._events[u])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=i,c.EventEmitter=c,typeof r<"u"&&(r.exports=c)}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.matchText=a.matchSpacing=a.matchNewline=a.matchBlot=a.matchAttributor=a.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},o=(function(){function Te(Pe,$e){var Ve=[],be=!0,We=!1,Ze=void 0;try{for(var st=Pe[Symbol.iterator](),Mt;!(be=(Mt=st.next()).done)&&(Ve.push(Mt.value),!($e&&Ve.length===$e));be=!0);}catch(Ht){We=!0,Ze=Ht}finally{try{!be&&st.return&&st.return()}finally{if(We)throw Ze}}return Ve}return function(Pe,$e){if(Array.isArray(Pe))return Pe;if(Symbol.iterator in Object(Pe))return Te(Pe,$e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function Te(Pe,$e){for(var Ve=0;Ve<$e.length;Ve++){var be=$e[Ve];be.enumerable=be.enumerable||!1,be.configurable=!0,"value"in be&&(be.writable=!0),Object.defineProperty(Pe,be.key,be)}}return function(Pe,$e,Ve){return $e&&Te(Pe.prototype,$e),Ve&&Te(Pe,Ve),Pe}})(),c=s(3),d=P(c),h=s(2),u=P(h),f=s(0),m=P(f),b=s(5),g=P(b),y=s(10),x=P(y),w=s(9),j=P(w),N=s(36),_=s(37),S=s(13),A=P(S),T=s(26),R=s(38),M=s(39),k=s(40);function P(Te){return Te&&Te.__esModule?Te:{default:Te}}function O(Te,Pe,$e){return Pe in Te?Object.defineProperty(Te,Pe,{value:$e,enumerable:!0,configurable:!0,writable:!0}):Te[Pe]=$e,Te}function F(Te,Pe){if(!(Te instanceof Pe))throw new TypeError("Cannot call a class as a function")}function $(Te,Pe){if(!Te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Pe&&(typeof Pe=="object"||typeof Pe=="function")?Pe:Te}function G(Te,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Pe);Te.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:Te,enumerable:!1,writable:!0,configurable:!0}}),Pe&&(Object.setPrototypeOf?Object.setPrototypeOf(Te,Pe):Te.__proto__=Pe)}var B=(0,x.default)("quill:clipboard"),Y="__ql-matcher",ee=[[Node.TEXT_NODE,rt],[Node.TEXT_NODE,he],["br",je],[Node.ELEMENT_NODE,he],[Node.ELEMENT_NODE,le],[Node.ELEMENT_NODE,Ne],[Node.ELEMENT_NODE,ae],[Node.ELEMENT_NODE,ue],["li",Fe],["b",oe.bind(oe,"bold")],["i",oe.bind(oe,"italic")],["style",xe]],J=[N.AlignAttribute,R.DirectionAttribute].reduce(function(Te,Pe){return Te[Pe.keyName]=Pe,Te},{}),H=[N.AlignStyle,_.BackgroundStyle,T.ColorStyle,R.DirectionStyle,M.FontStyle,k.SizeStyle].reduce(function(Te,Pe){return Te[Pe.keyName]=Pe,Te},{}),q=(function(Te){G(Pe,Te);function Pe($e,Ve){F(this,Pe);var be=$(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).call(this,$e,Ve));return be.quill.root.addEventListener("paste",be.onPaste.bind(be)),be.container=be.quill.addContainer("ql-clipboard"),be.container.setAttribute("contenteditable",!0),be.container.setAttribute("tabindex",-1),be.matchers=[],ee.concat(be.options.matchers).forEach(function(We){var Ze=o(We,2),st=Ze[0],Mt=Ze[1];!Ve.matchVisual&&Mt===Ne||be.addMatcher(st,Mt)}),be}return l(Pe,[{key:"addMatcher",value:function(Ve,be){this.matchers.push([Ve,be])}},{key:"convert",value:function(Ve){if(typeof Ve=="string")return this.container.innerHTML=Ve.replace(/\>\r?\n +\</g,"><"),this.convert();var be=this.quill.getFormat(this.quill.selection.savedRange.index);if(be[A.default.blotName]){var We=this.container.innerText;return this.container.innerHTML="",new u.default().insert(We,O({},A.default.blotName,be[A.default.blotName]))}var Ze=this.prepareMatching(),st=o(Ze,2),Mt=st[0],Ht=st[1],Yt=ne(this.container,Mt,Ht);return re(Yt,`
983`)&&Yt.ops[Yt.ops.length-1].attributes==null&&(Yt=Yt.compose(new u.default().retain(Yt.length()-1).delete(1))),B.log("convert",this.container.innerHTML,Yt),this.container.innerHTML="",Yt}},{key:"dangerouslyPasteHTML",value:function(Ve,be){var We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof Ve=="string")this.quill.setContents(this.convert(Ve),be),this.quill.setSelection(0,g.default.sources.SILENT);else{var Ze=this.convert(be);this.quill.updateContents(new u.default().retain(Ve).concat(Ze),We),this.quill.setSelection(Ve+Ze.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(Ve){var be=this;if(!(Ve.defaultPrevented||!this.quill.isEnabled())){var We=this.quill.getSelection(),Ze=new u.default().retain(We.index),st=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){Ze=Ze.concat(be.convert()).delete(We.length),be.quill.updateContents(Ze,g.default.sources.USER),be.quill.setSelection(Ze.length()-We.length,g.default.sources.SILENT),be.quill.scrollingContainer.scrollTop=st,be.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Ve=this,be=[],We=[];return this.matchers.forEach(function(Ze){var st=o(Ze,2),Mt=st[0],Ht=st[1];switch(Mt){case Node.TEXT_NODE:We.push(Ht);break;case Node.ELEMENT_NODE:be.push(Ht);break;default:[].forEach.call(Ve.container.querySelectorAll(Mt),function(Yt){Yt[Y]=Yt[Y]||[],Yt[Y].push(Ht)});break}}),[be,We]}}]),Pe})(j.default);q.DEFAULTS={matchers:[],matchVisual:!0};function K(Te,Pe,$e){return(typeof Pe>"u"?"undefined":i(Pe))==="object"?Object.keys(Pe).reduce(function(Ve,be){return K(Ve,be,Pe[be])},Te):Te.reduce(function(Ve,be){return be.attributes&&be.attributes[Pe]?Ve.push(be):Ve.insert(be.insert,(0,d.default)({},O({},Pe,$e),be.attributes))},new u.default)}function te(Te){if(Te.nodeType!==Node.ELEMENT_NODE)return{};var Pe="__ql-computed-style";return Te[Pe]||(Te[Pe]=window.getComputedStyle(Te))}function re(Te,Pe){for(var $e="",Ve=Te.ops.length-1;Ve>=0&&$e.length<Pe.length;--Ve){var be=Te.ops[Ve];if(typeof be.insert!="string")break;$e=be.insert+$e}return $e.slice(-1*Pe.length)===Pe}function Q(Te){if(Te.childNodes.length===0)return!1;var Pe=te(Te);return["block","list-item"].indexOf(Pe.display)>-1}function ne(Te,Pe,$e){return Te.nodeType===Te.TEXT_NODE?$e.reduce(function(Ve,be){return be(Te,Ve)},new u.default):Te.nodeType===Te.ELEMENT_NODE?[].reduce.call(Te.childNodes||[],function(Ve,be){var We=ne(be,Pe,$e);return be.nodeType===Te.ELEMENT_NODE&&(We=Pe.reduce(function(Ze,st){return st(be,Ze)},We),We=(be[Y]||[]).reduce(function(Ze,st){return st(be,Ze)},We)),Ve.concat(We)},new u.default):new u.default}function oe(Te,Pe,$e){return K($e,Te,!0)}function ae(Te,Pe){var $e=m.default.Attributor.Attribute.keys(Te),Ve=m.default.Attributor.Class.keys(Te),be=m.default.Attributor.Style.keys(Te),We={};return $e.concat(Ve).concat(be).forEach(function(Ze){var st=m.default.query(Ze,m.default.Scope.ATTRIBUTE);st!=null&&(We[st.attrName]=st.value(Te),We[st.attrName])||(st=J[Ze],st!=null&&(st.attrName===Ze||st.keyName===Ze)&&(We[st.attrName]=st.value(Te)||void 0),st=H[Ze],st!=null&&(st.attrName===Ze||st.keyName===Ze)&&(st=H[Ze],We[st.attrName]=st.value(Te)||void 0))}),Object.keys(We).length>0&&(Pe=K(Pe,We)),Pe}function le(Te,Pe){var $e=m.default.query(Te);if($e==null)return Pe;if($e.prototype instanceof m.default.Embed){var Ve={},be=$e.value(Te);be!=null&&(Ve[$e.blotName]=be,Pe=new u.default().insert(Ve,$e.formats(Te)))}else typeof $e.formats=="function"&&(Pe=K(Pe,$e.blotName,$e.formats(Te)));return Pe}function je(Te,Pe){return re(Pe,`
984`)||Pe.insert(`
985`),Pe}function xe(){return new u.default}function Fe(Te,Pe){var $e=m.default.query(Te);if($e==null||$e.blotName!=="list-item"||!re(Pe,`
986`))return Pe;for(var Ve=-1,be=Te.parentNode;!be.classList.contains("ql-clipboard");)(m.default.query(be)||{}).blotName==="list"&&(Ve+=1),be=be.parentNode;return Ve<=0?Pe:Pe.compose(new u.default().retain(Pe.length()-1).retain(1,{indent:Ve}))}function he(Te,Pe){return re(Pe,`
987`)||(Q(Te)||Pe.length()>0&&Te.nextSibling&&Q(Te.nextSibling))&&Pe.insert(`
988`),Pe}function Ne(Te,Pe){if(Q(Te)&&Te.nextElementSibling!=null&&!re(Pe,`
989
990`)){var $e=Te.offsetHeight+parseFloat(te(Te).marginTop)+parseFloat(te(Te).marginBottom);Te.nextElementSibling.offsetTop>Te.offsetTop+$e*1.5&&Pe.insert(`
991`)}return Pe}function ue(Te,Pe){var $e={},Ve=Te.style||{};return Ve.fontStyle&&te(Te).fontStyle==="italic"&&($e.italic=!0),Ve.fontWeight&&(te(Te).fontWeight.startsWith("bold")||parseInt(te(Te).fontWeight)>=700)&&($e.bold=!0),Object.keys($e).length>0&&(Pe=K(Pe,$e)),parseFloat(Ve.textIndent||0)>0&&(Pe=new u.default().insert("	").concat(Pe)),Pe}function rt(Te,Pe){var $e=Te.data;if(Te.parentNode.tagName==="O:P")return Pe.insert($e.trim());if($e.trim().length===0&&Te.parentNode.classList.contains("ql-clipboard"))return Pe;if(!te(Te.parentNode).whiteSpace.startsWith("pre")){var Ve=function(We,Ze){return Ze=Ze.replace(/[^\u00a0]/g,""),Ze.length<1&&We?" ":Ze};$e=$e.replace(/\r\n/g," ").replace(/\n/g," "),$e=$e.replace(/\s\s+/g,Ve.bind(Ve,!0)),(Te.previousSibling==null&&Q(Te.parentNode)||Te.previousSibling!=null&&Q(Te.previousSibling))&&($e=$e.replace(/^\s+/,Ve.bind(Ve,!1))),(Te.nextSibling==null&&Q(Te.parentNode)||Te.nextSibling!=null&&Q(Te.nextSibling))&&($e=$e.replace(/\s+$/,Ve.bind(Ve,!1)))}return Pe.insert($e)}a.default=q,a.matchAttributor=ae,a.matchBlot=le,a.matchNewline=he,a.matchSpacing=Ne,a.matchText=rt}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function b(g,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,x){return y&&b(g.prototype,y),x&&b(g,x),g}})(),o=function b(g,y,x){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,y);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,y,x)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(x)}},l=s(6),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(){return h(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"optimize",value:function(x){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,x),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g})(c.default);m.blotName="bold",m.tagName=["STRONG","B"],a.default=m}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.addControls=a.default=void 0;var i=(function(){function k(P,O){var F=[],$=!0,G=!1,B=void 0;try{for(var Y=P[Symbol.iterator](),ee;!($=(ee=Y.next()).done)&&(F.push(ee.value),!(O&&F.length===O));$=!0);}catch(J){G=!0,B=J}finally{try{!$&&Y.return&&Y.return()}finally{if(G)throw B}}return F}return function(P,O){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return k(P,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function k(P,O){for(var F=0;F<O.length;F++){var $=O[F];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(P,$.key,$)}}return function(P,O,F){return O&&k(P.prototype,O),F&&k(P,F),P}})(),l=s(2),c=x(l),d=s(0),h=x(d),u=s(5),f=x(u),m=s(10),b=x(m),g=s(9),y=x(g);function x(k){return k&&k.__esModule?k:{default:k}}function w(k,P,O){return P in k?Object.defineProperty(k,P,{value:O,enumerable:!0,configurable:!0,writable:!0}):k[P]=O,k}function j(k,P){if(!(k instanceof P))throw new TypeError("Cannot call a class as a function")}function N(k,P){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:k}function _(k,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);k.prototype=Object.create(P&&P.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(k,P):k.__proto__=P)}var S=(0,b.default)("quill:toolbar"),A=(function(k){_(P,k);function P(O,F){j(this,P);var $=N(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,O,F));if(Array.isArray($.options.container)){var G=document.createElement("div");R(G,$.options.container),O.container.parentNode.insertBefore(G,O.container),$.container=G}else typeof $.options.container=="string"?$.container=document.querySelector($.options.container):$.container=$.options.container;if(!($.container instanceof HTMLElement)){var B;return B=S.error("Container required for toolbar",$.options),N($,B)}return $.container.classList.add("ql-toolbar"),$.controls=[],$.handlers={},Object.keys($.options.handlers).forEach(function(Y){$.addHandler(Y,$.options.handlers[Y])}),[].forEach.call($.container.querySelectorAll("button, select"),function(Y){$.attach(Y)}),$.quill.on(f.default.events.EDITOR_CHANGE,function(Y,ee){Y===f.default.events.SELECTION_CHANGE&&$.update(ee)}),$.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){var Y=$.quill.selection.getRange(),ee=i(Y,1),J=ee[0];$.update(J)}),$}return o(P,[{key:"addHandler",value:function(F,$){this.handlers[F]=$}},{key:"attach",value:function(F){var $=this,G=[].find.call(F.classList,function(Y){return Y.indexOf("ql-")===0});if(G){if(G=G.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[G]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[G]==null){S.warn("ignoring attaching to disabled format",G,F);return}if(h.default.query(G)==null){S.warn("ignoring attaching to nonexistent format",G,F);return}}var B=F.tagName==="SELECT"?"change":"click";F.addEventListener(B,function(Y){var ee=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var J=F.options[F.selectedIndex];J.hasAttribute("selected")?ee=!1:ee=J.value||!1}else F.classList.contains("ql-active")?ee=!1:ee=F.value||!F.hasAttribute("value"),Y.preventDefault();$.quill.focus();var H=$.quill.selection.getRange(),q=i(H,1),K=q[0];if($.handlers[G]!=null)$.handlers[G].call($,ee);else if(h.default.query(G).prototype instanceof h.default.Embed){if(ee=prompt("Enter "+G),!ee)return;$.quill.updateContents(new c.default().retain(K.index).delete(K.length).insert(w({},G,ee)),f.default.sources.USER)}else $.quill.format(G,ee,f.default.sources.USER);$.update(K)}),this.controls.push([G,F])}}},{key:"update",value:function(F){var $=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(G){var B=i(G,2),Y=B[0],ee=B[1];if(ee.tagName==="SELECT"){var J=void 0;if(F==null)J=null;else if($[Y]==null)J=ee.querySelector("option[selected]");else if(!Array.isArray($[Y])){var H=$[Y];typeof H=="string"&&(H=H.replace(/\"/g,'\\"')),J=ee.querySelector('option[value="'+H+'"]')}J==null?(ee.value="",ee.selectedIndex=-1):J.selected=!0}else if(F==null)ee.classList.remove("ql-active");else if(ee.hasAttribute("value")){var q=$[Y]===ee.getAttribute("value")||$[Y]!=null&&$[Y].toString()===ee.getAttribute("value")||$[Y]==null&&!ee.getAttribute("value");ee.classList.toggle("ql-active",q)}else ee.classList.toggle("ql-active",$[Y]!=null)})}}]),P})(y.default);A.DEFAULTS={};function T(k,P,O){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),O!=null&&(F.value=O),k.appendChild(F)}function R(k,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(O){var F=document.createElement("span");F.classList.add("ql-formats"),O.forEach(function($){if(typeof $=="string")T(F,$);else{var G=Object.keys($)[0],B=$[G];Array.isArray(B)?M(F,G,B):T(F,G,B)}}),k.appendChild(F)})}function M(k,P,O){var F=document.createElement("select");F.classList.add("ql-"+P),O.forEach(function($){var G=document.createElement("option");$!==!1?G.setAttribute("value",$):G.setAttribute("selected","selected"),F.appendChild(G)}),k.appendChild(F)}A.DEFAULTS={container:null,handlers:{clean:function(){var P=this,O=this.quill.getSelection();if(O!=null)if(O.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function($){h.default.query($,h.default.Scope.INLINE)!=null&&P.quill.format($,!1)})}else this.quill.removeFormat(O,f.default.sources.USER)},direction:function(P){var O=this.quill.getFormat().align;P==="rtl"&&O==null?this.quill.format("align","right",f.default.sources.USER):!P&&O==="right"&&this.quill.format("align",!1,f.default.sources.USER),this.quill.format("direction",P,f.default.sources.USER)},indent:function(P){var O=this.quill.getSelection(),F=this.quill.getFormat(O),$=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var G=P==="+1"?1:-1;F.direction==="rtl"&&(G*=-1),this.quill.format("indent",$+G,f.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,f.default.sources.USER)},list:function(P){var O=this.quill.getSelection(),F=this.quill.getFormat(O);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,f.default.sources.USER):this.quill.format("list","unchecked",f.default.sources.USER):this.quill.format("list",P,f.default.sources.USER)}}},a.default=A,a.addControls=R}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function b(g,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,x){return y&&b(g.prototype,y),x&&b(g,x),g}})(),o=function b(g,y,x){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,y);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,y,x)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(x)}},l=s(28),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(y,x){h(this,g);var w=u(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y));return w.label.innerHTML=x,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(j){j.classList.add("ql-primary")}),w}return i(g,[{key:"buildItem",value:function(x){var w=o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,x);return w.style.backgroundColor=x.getAttribute("value")||"",w}},{key:"selectItem",value:function(x,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,x,w);var j=this.label.querySelector(".ql-color-label"),N=x&&x.getAttribute("data-value")||"";j&&(j.tagName==="line"?j.style.stroke=N:j.style.fill=N)}}]),g})(c.default);a.default=m}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function b(g,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,x){return y&&b(g.prototype,y),x&&b(g,x),g}})(),o=function b(g,y,x){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,y);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,y,x)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(x)}},l=s(28),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(y,x){h(this,g);var w=u(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,y));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(j){j.innerHTML=x[j.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return i(g,[{key:"selectItem",value:function(x,w){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,x,w),x=x||this.defaultItem,this.label.innerHTML=x.innerHTML}}]),g})(c.default);a.default=m}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function c(d,h){for(var u=0;u<h.length;u++){var f=h[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(d,f.key,f)}}return function(d,h,u){return h&&c(d.prototype,h),u&&c(d,u),d}})();function o(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(d,h){var u=this;o(this,c),this.quill=d,this.boundsContainer=h||document.body,this.root=d.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){u.root.style.marginTop=-1*u.quill.root.scrollTop+"px"}),this.hide()}return i(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(h){var u=h.left+h.width/2-this.root.offsetWidth/2,f=h.bottom+this.quill.root.scrollTop;this.root.style.left=u+"px",this.root.style.top=f+"px",this.root.classList.remove("ql-flip");var m=this.boundsContainer.getBoundingClientRect(),b=this.root.getBoundingClientRect(),g=0;if(b.right>m.right&&(g=m.right-b.right,this.root.style.left=u+g+"px"),b.left<m.left&&(g=m.left-b.left,this.root.style.left=u+g+"px"),b.bottom>m.bottom){var y=b.bottom-b.top,x=h.bottom-h.top+y;this.root.style.top=f-x+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c})();a.default=l}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function M(k,P){var O=[],F=!0,$=!1,G=void 0;try{for(var B=k[Symbol.iterator](),Y;!(F=(Y=B.next()).done)&&(O.push(Y.value),!(P&&O.length===P));F=!0);}catch(ee){$=!0,G=ee}finally{try{!F&&B.return&&B.return()}finally{if($)throw G}}return O}return function(k,P){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return M(k,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function M(k,P,O){k===null&&(k=Function.prototype);var F=Object.getOwnPropertyDescriptor(k,P);if(F===void 0){var $=Object.getPrototypeOf(k);return $===null?void 0:M($,P,O)}else{if("value"in F)return F.value;var G=F.get;return G===void 0?void 0:G.call(O)}},l=(function(){function M(k,P){for(var O=0;O<P.length;O++){var F=P[O];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(k,F.key,F)}}return function(k,P,O){return P&&M(k.prototype,P),O&&M(k,O),k}})(),c=s(3),d=j(c),h=s(8),u=j(h),f=s(43),m=j(f),b=s(27),g=j(b),y=s(15),x=s(41),w=j(x);function j(M){return M&&M.__esModule?M:{default:M}}function N(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function _(M,k){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:M}function S(M,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);M.prototype=Object.create(k&&k.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(M,k):M.__proto__=k)}var A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],T=(function(M){S(k,M);function k(P,O){N(this,k),O.modules.toolbar!=null&&O.modules.toolbar.container==null&&(O.modules.toolbar.container=A);var F=_(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,P,O));return F.quill.container.classList.add("ql-snow"),F}return l(k,[{key:"extendToolbar",value:function(O){O.container.classList.add("ql-snow"),this.buildButtons([].slice.call(O.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(O.container.querySelectorAll("select")),w.default),this.tooltip=new R(this.quill,this.options.bounds),O.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,$){O.handlers.link.call(O,!$.format.link)})}}]),k})(m.default);T.DEFAULTS=(0,d.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(k){if(k){var P=this.quill.getSelection();if(P==null||P.length==0)return;var O=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(O)&&O.indexOf("mailto:")!==0&&(O="mailto:"+O);var F=this.quill.theme.tooltip;F.edit("link",O)}else this.quill.format("link",!1)}}}}});var R=(function(M){S(k,M);function k(P,O){N(this,k);var F=_(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,P,O));return F.preview=F.root.querySelector("a.ql-preview"),F}return l(k,[{key:"listen",value:function(){var O=this;o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){O.root.classList.contains("ql-editing")?O.save():O.edit("link",O.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(O.linkRange!=null){var $=O.linkRange;O.restoreFocus(),O.quill.formatText($,"link",!1,u.default.sources.USER),delete O.linkRange}F.preventDefault(),O.hide()}),this.quill.on(u.default.events.SELECTION_CHANGE,function(F,$,G){if(F!=null){if(F.length===0&&G===u.default.sources.USER){var B=O.quill.scroll.descendant(g.default,F.index),Y=i(B,2),ee=Y[0],J=Y[1];if(ee!=null){O.linkRange=new y.Range(F.index-J,ee.length());var H=g.default.formats(ee.domNode);O.preview.textContent=H,O.preview.setAttribute("href",H),O.show(),O.position(O.quill.getBounds(O.linkRange));return}}else delete O.linkRange;O.hide()}})}},{key:"show",value:function(){o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),k})(f.BaseTooltip);R.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),a.default=T}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(29),o=be(i),l=s(36),c=s(38),d=s(64),h=s(65),u=be(h),f=s(66),m=be(f),b=s(67),g=be(b),y=s(37),x=s(26),w=s(39),j=s(40),N=s(56),_=be(N),S=s(68),A=be(S),T=s(27),R=be(T),M=s(69),k=be(M),P=s(70),O=be(P),F=s(71),$=be(F),G=s(72),B=be(G),Y=s(73),ee=be(Y),J=s(13),H=be(J),q=s(74),K=be(q),te=s(75),re=be(te),Q=s(57),ne=be(Q),oe=s(41),ae=be(oe),le=s(28),je=be(le),xe=s(59),Fe=be(xe),he=s(60),Ne=be(he),ue=s(61),rt=be(ue),Te=s(108),Pe=be(Te),$e=s(62),Ve=be($e);function be(We){return We&&We.__esModule?We:{default:We}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":x.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":j.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":x.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":j.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":d.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":x.ColorStyle,"formats/font":w.FontClass,"formats/size":j.SizeClass,"formats/blockquote":u.default,"formats/code-block":H.default,"formats/header":m.default,"formats/list":g.default,"formats/bold":_.default,"formats/code":J.Code,"formats/italic":A.default,"formats/link":R.default,"formats/script":k.default,"formats/strike":O.default,"formats/underline":$.default,"formats/image":B.default,"formats/video":ee.default,"formats/list/item":b.ListItem,"modules/formula":K.default,"modules/syntax":re.default,"modules/toolbar":ne.default,"themes/bubble":Pe.default,"themes/snow":Ve.default,"ui/icons":ae.default,"ui/picker":je.default,"ui/icon-picker":Ne.default,"ui/color-picker":Fe.default,"ui/tooltip":rt.default},!0),a.default=o.default}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.IndentClass=void 0;var i=(function(){function g(y,x){for(var w=0;w<x.length;w++){var j=x[w];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(y,j.key,j)}}return function(y,x,w){return x&&g(y.prototype,x),w&&g(y,w),y}})(),o=function g(y,x,w){y===null&&(y=Function.prototype);var j=Object.getOwnPropertyDescriptor(y,x);if(j===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:g(N,x,w)}else{if("value"in j)return j.value;var _=j.get;return _===void 0?void 0:_.call(w)}},l=s(0),c=d(l);function d(g){return g&&g.__esModule?g:{default:g}}function h(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}function u(g,y){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:g}function f(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);g.prototype=Object.create(y&&y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(g,y):g.__proto__=y)}var m=(function(g){f(y,g);function y(){return h(this,y),u(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return i(y,[{key:"add",value:function(w,j){if(j==="+1"||j==="-1"){var N=this.value(w)||0;j=j==="+1"?N+1:N-1}return j===0?(this.remove(w),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,w,j)}},{key:"canAdd",value:function(w,j){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,w,j)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,w,parseInt(j))}},{key:"value",value:function(w){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,w))||void 0}}]),y})(c.default.Attributor.Class),b=new m("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});a.IndentClass=b}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(4),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function d(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function h(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var u=(function(f){h(m,f);function m(){return c(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);u.blotName="blockquote",u.tagName="blockquote",a.default=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function m(b,g){for(var y=0;y<g.length;y++){var x=g[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,g,y){return g&&m(b.prototype,g),y&&m(b,y),b}})(),o=s(4),l=c(o);function c(m){return m&&m.__esModule?m:{default:m}}function d(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function h(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function u(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var f=(function(m){u(b,m);function b(){return d(this,b),h(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),b})(l.default);f.blotName="header",f.tagName=["H1","H2","H3","H4","H5","H6"],a.default=f}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.ListItem=void 0;var i=(function(){function N(_,S){for(var A=0;A<S.length;A++){var T=S[A];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,S,A){return S&&N(_.prototype,S),A&&N(_,A),_}})(),o=function N(_,S,A){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,S);if(T===void 0){var R=Object.getPrototypeOf(_);return R===null?void 0:N(R,S,A)}else{if("value"in T)return T.value;var M=T.get;return M===void 0?void 0:M.call(A)}},l=s(0),c=m(l),d=s(4),h=m(d),u=s(25),f=m(u);function m(N){return N&&N.__esModule?N:{default:N}}function b(N,_,S){return _ in N?Object.defineProperty(N,_,{value:S,enumerable:!0,configurable:!0,writable:!0}):N[_]=S,N}function g(N,_){if(!(N instanceof _))throw new TypeError("Cannot call a class as a function")}function y(N,_){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:N}function x(N,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);N.prototype=Object.create(_&&_.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(N,_):N.__proto__=_)}var w=(function(N){x(_,N);function _(){return g(this,_),y(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return i(_,[{key:"format",value:function(A,T){A===j.blotName&&!T?this.replaceWith(c.default.create(this.statics.scope)):o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,A,T)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,T){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,T),this):(this.parent.unwrap(),o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replaceWith",this).call(this,A,T))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:o(_.__proto__||Object.getPrototypeOf(_),"formats",this).call(this,A)}}]),_})(h.default);w.blotName="list-item",w.tagName="LI";var j=(function(N){x(_,N),i(_,null,[{key:"create",value:function(A){var T=A==="ordered"?"OL":"UL",R=o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,T);return(A==="checked"||A==="unchecked")&&R.setAttribute("data-checked",A==="checked"),R}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function _(S){g(this,_);var A=y(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,S)),T=function(M){if(M.target.parentNode===S){var k=A.statics.formats(S),P=c.default.find(M.target);k==="checked"?P.format("list","unchecked"):k==="unchecked"&&P.format("list","checked")}};return S.addEventListener("touchstart",T),S.addEventListener("mousedown",T),A}return i(_,[{key:"format",value:function(A,T){this.children.length>0&&this.children.tail.format(A,T)}},{key:"formats",value:function(){return b({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,T){if(A instanceof w)o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,A,T);else{var R=T==null?this.length():T.offset(this),M=this.split(R);M.parent.insertBefore(A,M)}}},{key:"optimize",value:function(A){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,A);var T=this.next;T!=null&&T.prev===this&&T.statics.blotName===this.statics.blotName&&T.domNode.tagName===this.domNode.tagName&&T.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(T.moveChildren(this),T.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var T=c.default.create(this.statics.defaultChild);A.moveChildren(T),this.appendChild(T)}o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replace",this).call(this,A)}}]),_})(f.default);j.blotName="list",j.scope=c.default.Scope.BLOCK_BLOT,j.tagName=["OL","UL"],j.defaultChild="list-item",j.allowedChildren=[w],a.ListItem=w,a.default=j}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(56),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function d(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function h(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var u=(function(f){h(m,f);function m(){return c(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);u.blotName="italic",u.tagName=["EM","I"],a.default=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function b(g,y){for(var x=0;x<y.length;x++){var w=y[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,y,x){return y&&b(g.prototype,y),x&&b(g,x),g}})(),o=function b(g,y,x){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,y);if(w===void 0){var j=Object.getPrototypeOf(g);return j===null?void 0:b(j,y,x)}else{if("value"in w)return w.value;var N=w.get;return N===void 0?void 0:N.call(x)}},l=s(6),c=d(l);function d(b){return b&&b.__esModule?b:{default:b}}function h(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function u(b,g){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:b}function f(b,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);b.prototype=Object.create(g&&g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(b,g):b.__proto__=g)}var m=(function(b){f(g,b);function g(){return h(this,g),u(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,null,[{key:"create",value:function(x){return x==="super"?document.createElement("sup"):x==="sub"?document.createElement("sub"):o(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,x)}},{key:"formats",value:function(x){if(x.tagName==="SUB")return"sub";if(x.tagName==="SUP")return"super"}}]),g})(c.default);m.blotName="script",m.tagName=["SUB","SUP"],a.default=m}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(6),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function d(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function h(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var u=(function(f){h(m,f);function m(){return c(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);u.blotName="strike",u.tagName="S",a.default=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=s(6),o=l(i);function l(f){return f&&f.__esModule?f:{default:f}}function c(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function d(f,m){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:f}function h(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(f,m):f.__proto__=m)}var u=(function(f){h(m,f);function m(){return c(this,m),d(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);u.blotName="underline",u.tagName="U",a.default=u}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function y(x,w){for(var j=0;j<w.length;j++){var N=w[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,w,j){return w&&y(x.prototype,w),j&&y(x,j),x}})(),o=function y(x,w,j){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,w);if(N===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:y(_,w,j)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(j)}},l=s(0),c=h(l),d=s(27);function h(y){return y&&y.__esModule?y:{default:y}}function u(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function f(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["alt","height","width"],g=(function(y){m(x,y);function x(){return u(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,[{key:"format",value:function(j,N){b.indexOf(j)>-1?N?this.domNode.setAttribute(j,N):this.domNode.removeAttribute(j):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,j,N)}}],[{key:"create",value:function(j){var N=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,j);return typeof j=="string"&&N.setAttribute("src",this.sanitize(j)),N}},{key:"formats",value:function(j){return b.reduce(function(N,_){return j.hasAttribute(_)&&(N[_]=j.getAttribute(_)),N},{})}},{key:"match",value:function(j){return/\.(jpe?g|gif|png)$/.test(j)||/^data:image\/.+;base64/.test(j)}},{key:"sanitize",value:function(j){return(0,d.sanitize)(j,["http","https","data"])?j:"//:0"}},{key:"value",value:function(j){return j.getAttribute("src")}}]),x})(c.default.Embed);g.blotName="image",g.tagName="IMG",a.default=g}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0});var i=(function(){function y(x,w){for(var j=0;j<w.length;j++){var N=w[j];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,N.key,N)}}return function(x,w,j){return w&&y(x.prototype,w),j&&y(x,j),x}})(),o=function y(x,w,j){x===null&&(x=Function.prototype);var N=Object.getOwnPropertyDescriptor(x,w);if(N===void 0){var _=Object.getPrototypeOf(x);return _===null?void 0:y(_,w,j)}else{if("value"in N)return N.value;var S=N.get;return S===void 0?void 0:S.call(j)}},l=s(4),c=s(27),d=h(c);function h(y){return y&&y.__esModule?y:{default:y}}function u(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function f(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["height","width"],g=(function(y){m(x,y);function x(){return u(this,x),f(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,[{key:"format",value:function(j,N){b.indexOf(j)>-1?N?this.domNode.setAttribute(j,N):this.domNode.removeAttribute(j):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,j,N)}}],[{key:"create",value:function(j){var N=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,j);return N.setAttribute("frameborder","0"),N.setAttribute("allowfullscreen",!0),N.setAttribute("src",this.sanitize(j)),N}},{key:"formats",value:function(j){return b.reduce(function(N,_){return j.hasAttribute(_)&&(N[_]=j.getAttribute(_)),N},{})}},{key:"sanitize",value:function(j){return d.default.sanitize(j)}},{key:"value",value:function(j){return j.getAttribute("src")}}]),x})(l.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",a.default=g}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.FormulaBlot=void 0;var i=(function(){function j(N,_){for(var S=0;S<_.length;S++){var A=_[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(N,A.key,A)}}return function(N,_,S){return _&&j(N.prototype,_),S&&j(N,S),N}})(),o=function j(N,_,S){N===null&&(N=Function.prototype);var A=Object.getOwnPropertyDescriptor(N,_);if(A===void 0){var T=Object.getPrototypeOf(N);return T===null?void 0:j(T,_,S)}else{if("value"in A)return A.value;var R=A.get;return R===void 0?void 0:R.call(S)}},l=s(35),c=m(l),d=s(5),h=m(d),u=s(9),f=m(u);function m(j){return j&&j.__esModule?j:{default:j}}function b(j,N){if(!(j instanceof N))throw new TypeError("Cannot call a class as a function")}function g(j,N){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:j}function y(j,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);j.prototype=Object.create(N&&N.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(j,N):j.__proto__=N)}var x=(function(j){y(N,j);function N(){return b(this,N),g(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return i(N,null,[{key:"create",value:function(S){var A=o(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,S);return typeof S=="string"&&(window.katex.render(S,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",S)),A}},{key:"value",value:function(S){return S.getAttribute("data-value")}}]),N})(c.default);x.blotName="formula",x.className="ql-formula",x.tagName="SPAN";var w=(function(j){y(N,j),i(N,null,[{key:"register",value:function(){h.default.register(x,!0)}}]);function N(){b(this,N);var _=g(this,(N.__proto__||Object.getPrototypeOf(N)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return _}return N})(f.default);a.FormulaBlot=x,a.default=w}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.CodeToken=a.CodeBlock=void 0;var i=(function(){function S(A,T){for(var R=0;R<T.length;R++){var M=T[R];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,T,R){return T&&S(A.prototype,T),R&&S(A,R),A}})(),o=function S(A,T,R){A===null&&(A=Function.prototype);var M=Object.getOwnPropertyDescriptor(A,T);if(M===void 0){var k=Object.getPrototypeOf(A);return k===null?void 0:S(k,T,R)}else{if("value"in M)return M.value;var P=M.get;return P===void 0?void 0:P.call(R)}},l=s(0),c=g(l),d=s(5),h=g(d),u=s(9),f=g(u),m=s(13),b=g(m);function g(S){return S&&S.__esModule?S:{default:S}}function y(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function x(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function w(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var j=(function(S){w(A,S);function A(){return y(this,A),x(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return i(A,[{key:"replaceWith",value:function(R){this.domNode.textContent=this.domNode.textContent,this.attach(),o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"replaceWith",this).call(this,R)}},{key:"highlight",value:function(R){var M=this.domNode.textContent;this.cachedText!==M&&((M.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=R(M),this.domNode.normalize(),this.attach()),this.cachedText=M)}}]),A})(b.default);j.className="ql-syntax";var N=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),_=(function(S){w(A,S),i(A,null,[{key:"register",value:function(){h.default.register(N,!0),h.default.register(j,!0)}}]);function A(T,R){y(this,A);var M=x(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,T,R));if(typeof M.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var k=null;return M.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(k),k=setTimeout(function(){M.highlight(),k=null},M.options.interval)}),M.highlight(),M}return i(A,[{key:"highlight",value:function(){var R=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var M=this.quill.getSelection();this.quill.scroll.descendants(j).forEach(function(k){k.highlight(R.options.highlight)}),this.quill.update(h.default.sources.SILENT),M!=null&&this.quill.setSelection(M,h.default.sources.SILENT)}}}]),A})(f.default);_.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(S){var A=window.hljs.highlightAuto(S);return A.value}})(),interval:1e3},a.CodeBlock=j,a.CodeToken=N,a.default=_}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect>
991 <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(r,a){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.
991177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(r,a){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(r,a){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(r,a){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(r,a){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}),(function(r,a,s){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.BubbleTooltip=void 0;var i=function A(T,R,M){T===null&&(T=Function.prototype);var k=Object.getOwnPropertyDescriptor(T,R);if(k===void 0){var P=Object.getPrototypeOf(T);return P===null?void 0:A(P,R,M)}else{if("value"in k)return k.value;var O=k.get;return O===void 0?void 0:O.call(M)}},o=(function(){function A(T,R){for(var M=0;M<R.length;M++){var k=R[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(T,k.key,k)}}return function(T,R,M){return R&&A(T.prototype,R),M&&A(T,M),T}})(),l=s(3),c=y(l),d=s(8),h=y(d),u=s(43),f=y(u),m=s(15),b=s(41),g=y(b);
vendor: 8,457 bytes, line 991
991function y(A){return A&&A.__esModule?A:{default:A}}function x(A,T){if(!(A instanceof T))throw new TypeError("Cannot call a class as a function")}function w(A,T){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:A}function j(A,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);A.prototype=Object.create(T&&T.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(A,T):A.__proto__=T)}var N=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],_=(function(A){j(T,A);function T(R,M){x(this,T),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=N);var k=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,R,M));return k.quill.container.classList.add("ql-bubble"),k}return o(T,[{key:"extendToolbar",value:function(M){this.tooltip=new S(this.quill,this.options.bounds),this.tooltip.root.appendChild(M.container),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),g.default)}}]),T})(f.default);_.DEFAULTS=(0,c.default)(!0,{},f.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){T?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var S=(function(A){j(T,A);function T(R,M){x(this,T);var k=w(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,R,M));return k.quill.on(h.default.events.EDITOR_CHANGE,function(P,O,F,$){if(P===h.default.events.SELECTION_CHANGE)if(O!=null&&O.length>0&&$===h.default.sources.USER){k.show(),k.root.style.left="0px",k.root.style.width="",k.root.style.width=k.root.offsetWidth+"px";var G=k.quill.getLines(O.index,O.length);if(G.length===1)k.position(k.quill.getBounds(O));else{var B=G[G.length-1],Y=k.quill.getIndex(B),ee=Math.min(B.length()-1,O.index+O.length-Y),J=k.quill.getBounds(new m.Range(Y,ee));k.position(J)}}else document.activeElement!==k.textbox&&k.quill.hasFocus()&&k.hide()}),k}return o(T,[{key:"listen",value:function(){var M=this;i(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){M.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!M.root.classList.contains("ql-hidden")){var k=M.quill.getSelection();k!=null&&M.position(M.quill.getBounds(k))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(M){var k=i(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"position",this).call(this,M),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",k===0)return k;P.style.marginLeft=-1*k-P.offsetWidth/2+"px"}}]),T})(u.BaseTooltip);S.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),a.BubbleTooltip=S,a.default=_}),(function(r,a,s){r.exports=s(63)})]).default})})(h1)),h1.exports}var zc,d9;function Eke(){if(d9)return zc;d9=1;var e=zc&&zc.__extends||(function(){var h=function(u,f){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var g in b)b.hasOwnProperty(g)&&(m[g]=b[g])},h(u,f)};return function(u,f){h(u,f);function m(){this.constructor=u}u.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}})(),t=zc&&zc.__assign||function(){return t=Object.assign||function(h){for(var u,f=1,m=arguments.length;f<m;f++){u=arguments[f];for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(h[b]=u[b])}return h},t.apply(this,arguments)},r=zc&&zc.__spreadArrays||function(){for(var h=0,u=0,f=arguments.length;u<f;u++)h+=arguments[u].length;for(var m=Array(h),b=0,u=0;u<f;u++)for(var g=arguments[u],y=0,x=g.length;y<x;y++,b++)m[b]=g[y];return m},a=zc&&zc.__importDefault||function(h){return h&&h.__esModule?h:{default:h}},s=a(Hw()),i=a(i3()),o=a(PK()),l=a(Pke()),c=(function(h){e(u,h);function u(f){var m=h.call(this,f)||this;m.dirtyProps=["modules","formats","bounds","theme","children"],m.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],m.state={generation:0},m.selection=null,m.onEditorChange=function(g,y,x,w){var j,N,_,S;g==="text-change"?(N=(j=m).onEditorChangeText)===null||N===void 0||N.call(j,m.editor.root.innerHTML,y,w,m.unprivilegedEditor):g==="selection-change"&&((S=(_=m).onEditorChangeSelection)===null||S===void 0||S.call(_,y,w,m.unprivilegedEditor))};var b=m.isControlled()?f.value:f.defaultValue;return m.value=b??"",m}return u.prototype.validateProps=function(f){var m;if(s.default.Children.count(f.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(s.default.Children.count(f.children)){var b=s.default.Children.only(f.children);if(((m=b)===null||m===void 0?void 0:m.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&f.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},u.prototype.shouldComponentUpdate=function(f,m){var b=this,g;if(this.validateProps(f),!this.editor||this.state.generation!==m.generation)return!0;if("value"in f){var y=this.getEditorContents(),x=(g=f.value,g??"");this.isEqualValue(x,y)||this.setEditorContents(this.editor,x)}return f.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,f.readOnly),r(this.cleanProps,this.dirtyProps).some(function(w){return!o.default(f[w],b.props[w])})},u.prototype.shouldComponentRegenerate=function(f){var m=this;return this.dirtyProps.some(function(b){return!o.default(f[b],m.props[b])})},u.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},u.prototype.componentWillUnmount=function(){this.destroyEditor()},u.prototype.componentDidUpdate=function(f,m){var b=this;if(this.editor&&this.shouldComponentRegenerate(f)){var g=this.editor.getContents(),y=this.editor.getSelection();this.regenerationSnapshot={delta:g,selection:y},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==m.generation){var x=this.regenerationSnapshot,g=x.delta,w=x.selection;delete this.regenerationSnapshot,this.instantiateEditor();var j=this.editor;j.setContents(g),d(function(){return b.setEditorSelection(j,w)})}},u.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},u.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},u.prototype.isControlled=function(){return"value"in this.props},u.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},u.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},u.prototype.createEditor=function(f,m){var b=new l.default(f,m);return m.tabIndex!=null&&this.setEditorTabIndex(b,m.tabIndex),this.hookEditor(b),b},u.prototype.hookEditor=function(f){this.unprivilegedEditor=this.makeUnprivilegedEditor(f),f.on("editor-change",this.onEditorChange)},u.prototype.unhookEditor=function(f){f.off("editor-change",this.onEditorChange)},u.prototype.getEditorContents=function(){return this.value},u.prototype.getEditorSelection=function(){return this.selection},u.prototype.isDelta=function(f){return f&&f.ops},u.prototype.isEqualValue=function(f,m){return this.isDelta(f)&&this.isDelta(m)?o.default(f.ops,m.ops):o.default(f,m)},u.prototype.setEditorContents=function(f,m){var b=this;this.value=m;var g=this.getEditorSelection();typeof m=="string"?f.setContents(f.clipboard.convert(m)):f.setContents(m),d(function(){return b.setE
991ditorSelection(f,g)})},u.prototype.setEditorSelection=function(f,m){if(this.selection=m,m){var b=f.getLength();m.index=Math.max(0,Math.min(m.index,b-1)),m.length=Math.max(0,Math.min(m.length,b-1-m.index)),f.setSelection(m)}},u.prototype.setEditorTabIndex=function(f,m){var b,g;!((g=(b=f)===null||b===void 0?void 0:b.scroll)===null||g===void 0)&&g.domNode&&(f.scroll.domNode.tabIndex=m)},u.prototype.setEditorReadOnly=function(f,m){m?f.disable():f.enable()},u.prototype.makeUnprivilegedEditor=function(f){var m=f;return{getHTML:function(){return m.root.innerHTML},getLength:m.getLength.bind(m),getText:m.getText.bind(m),getContents:m.getContents.bind(m),getSelection:m.getSelection.bind(m),getBounds:m.getBounds.bind(m)}},u.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var f=i.default.findDOMNode(this.editingArea);if(!f)throw new Error("Cannot find element for editing area");if(f.nodeType===3)throw new Error("Editing area cannot be a text node");return f},u.prototype.renderEditingArea=function(){var f=this,m=this.props,b=m.children,g=m.preserveWhitespace,y=this.state.generation,x={key:y,ref:function(w){f.editingArea=w}};return s.default.Children.count(b)?s.default.cloneElement(s.default.Children.only(b),x):g?s.default.createElement("pre",t({},x)):s.default.createElement("div",t({},x))},u.prototype.render=function(){var f;return s.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(f=this.props.className,f??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},u.prototype.onEditorChangeText=function(f,m,b,g){var y,x;if(this.editor){var w=this.isDelta(this.value)?g.getContents():g.getHTML();w!==this.getEditorContents()&&(this.lastDeltaChangeSet=m,this.value=w,(x=(y=this.props).onChange)===null||x===void 0||x.call(y,f,m,b,g))}},u.prototype.onEditorChangeSelection=function(f,m,b){var g,y,x,w,j,N;if(this.editor){var _=this.getEditorSelection(),S=!_&&f,A=_&&!f;o.default(f,_)||(this.selection=f,(y=(g=this.props).onChangeSelection)===null||y===void 0||y.call(g,f,m,b),S?(w=(x=this.props).onFocus)===null||w===void 0||w.call(x,f,m,b):A&&((N=(j=this.props).onBlur)===null||N===void 0||N.call(j,_,m,b)))}},u.prototype.focus=function(){this.editor&&this.editor.focus()},u.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},u.displayName="React Quill",u.Quill=l.default,u.defaultProps={theme:"snow",modules:{},readOnly:!1},u})(s.default.Component);function d(h){Promise.resolve().then(h)}return zc=c,zc}var Tke=Eke();const sx=Lr(Tke);function Oke({currentDate:e,events:t,onDateChange:r,onEventClick:a,onDateClick:s}){const i=W6(e),o=H6(i),l=rd(i,{weekStartsOn:1}),c=K6(o,{weekStartsOn:1}),d=()=>{const g=new Date(e);g.setMonth(g.getMonth()-1),r(g)},h=()=>{const g=new Date(e);g.setMonth(g.getMonth()+1),r(g)},u=()=>{r(new Date)},f=[];let m=l;for(;m<=c;)f.push(m),m=Lg(m,1);const b=g=>t.filter(y=>{const x=new Date(y.date);return kj(x,g)});return n.jsxs("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:[n.jsxs("div",{className:"bg-primary-navy p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(me,{onClick:d,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Ww,{className:"w-5 h-5"})}),n.jsx("div",{className:"text-center",children:n.jsx("h2",{className:"text-2xl font-bold text-white",children:yt(e,"MMMM yyyy")})}),n.jsx(me,{onClick:h,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Em,{className:"w-5 h-5"})})]}),n.jsx("div",{className:"flex justify-center mt-4",children:n.jsx(me,{onClick:u,variant:"outline",size:"sm",className:"bg-accent-gold text-primary-navy border-accent-gold hover:bg-[#e8ca7a] font-semibold",children:"Today"})})]}),n.jsxs("div",{className:"p-4",children:[n.jsx("div",{className:"grid grid-cols-7 gap-2 mb-2",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(g=>n.jsx("div",{className:"text-center text-sm font-semibold text-gray-600 py-2",children:g},g))}),n.jsx("div",{className:"grid grid-cols-7 gap-2",children:f.map((g,y)=>{const x=b(g),w=mge(g,e),j=G6(g);return n.jsxs("div",{onClick:()=>s(g),className:`min-h-[100px] p-2 border rounded-lg cursor-pointer transition-all ${w?j?"bg-blue-50 border-blue-400 border-2":"bg-white hover:bg-gray-50":"bg-gray-50 text-gray-400"}`,children:[n.jsx("div",{className:`text-sm font-semibold mb-1 ${j?"text-blue-600":"text-gray-700"}`,children:yt(g,"d")}),n.jsxs("div",{className:"space-y-1",children:[x.slice(0,3).map(N=>n.jsxs("div",{onClick:_=>{_.stopPropagation(),a(N)},className:`text-xs p-1 rounded truncate cursor-pointer ${N.colorClass} hover:opacity-80 transition-opacity`,children:[N.icon&&n.jsx("span",{className:"mr-1",children:N.icon}),N.title]},N.id)),x.length>3&&n.jsxs("div",{className:"text-xs text-gray-500 font-semibold",children:["+",x.length-3," more"]})]})]},y)})})]})]})}function Mke({events:e,onEventClick:t,startDate:r,endDate:a}){const s=e.reduce((o,l)=>{const c=yt(new Date(l.date),"yyyy-MM-dd");return o[c]||(o[c]=[]),o[c].push(l),o},{}),i=Object.keys(s).sort();return i.length===0?n.jsxs("div",{className:"text-center py-20 text-gray-500",children:[n.jsx(za,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{className:"text-lg",children:"No events scheduled"})]}):n.jsx("div",{className:"bg-white rounded-xl shadow-lg p-6 space-y-6",children:i.map(o=>{const l=new Date(o),c=s[o].sort((u,f)=>!u.time&&!f.time?0:u.time?f.time?u.time.localeCompare(f.time):1:-1),d=G6(l),h=fge(l)&&!d;return n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:`flex items-center gap-3 pb-2 border-b-2 ${d?"border-blue-500":"border-gray-200"}`,children:[n.jsxs("div",{className:`text-center min-w-[60px] py-2 px-3 rounded-lg ${d?"bg-blue-500 text-white":h?"bg-gray-200 text-gray-600":"bg-primary-navy text-white"}`,children:[n.jsx("div",{className:"text-2xl font-bold",children:yt(l,"d")}),n.jsx("div",{className:"text-xs uppercase",children:yt(l,"MMM")})]}),n.jsxs("div",{children:[n.jsxs("h3",{className:`text-lg font-bold ${d?"text-blue-600":"text-gray-900"}`,children:[yt(l,"EEEE"),d&&n.jsx("span",{className:"ml-2 text-sm",children:"(Today)"})]}),n.jsxs("p",{className:"text-sm text-gray-500",children:[c.length," event",c.length!==1?"s":""]})]})]}),n.jsx("div",{className:"space-y-2 ml-4 pl-4 border-l-2 border-gray-200",children:c.map(u=>n.jsx(_e,{onClick:()=>
991t(u),className:`cursor-pointer hover:shadow-md transition-all border-l-4 ${u.colorClass}`,children:n.jsx(Ce,{className:"p-4",children:n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.icon&&n.jsx("span",{className:"text-lg",children:u.icon}),n.jsx("h4",{className:"font-semibold text-gray-900",children:u.title})]}),u.description&&n.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 mb-2",children:u.description}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-gray-500",children:[u.time&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(la,{className:"w-3 h-3"}),u.time]}),u.owner&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("span",{children:"•"}),u.owner]}),u.status&&n.jsx(dt,{className:`${u.statusColor||"bg-gray-100 text-gray-800"} text-xs`,children:u.status})]})]}),u.isOverdue&&n.jsx(Mr,{className:"w-5 h-5 text-red-500 flex-shrink-0"})]})})},u.id))})]},o)})})}function Lke({currentDate:e,events:t,onDateChange:r,onEventClick:a}){const s=()=>{r(_y(e,1))},i=()=>{r(Lg(e,1))},o=()=>{r(new Date)},l=t.filter(c=>kj(new Date(c.date),e)).sort((c,d)=>!c.time&&!d.time?0:c.time?d.time?c.time.localeCompare(d.time):1:-1);return n.jsxs("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:[n.jsxs("div",{className:"bg-primary-navy p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(me,{onClick:s,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Ww,{className:"w-5 h-5"})}),n.jsxs("div",{className:"text-center",children:[n.jsx("h2",{className:"text-3xl font-bold text-white",children:yt(e,"EEEE")}),n.jsx("p",{className:"text-white/80 text-lg mt-1",children:yt(e,"MMMM d, yyyy")})]}),n.jsx(me,{onClick:i,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Em,{className:"w-5 h-5"})})]}),n.jsx("div",{className:"flex justify-center mt-4",children:n.jsx(me,{onClick:o,variant:"outline",size:"sm",className:"bg-accent-gold text-primary-navy border-accent-gold hover:bg-[#e8ca7a] font-semibold",children:"Today"})})]}),n.jsx("div",{className:"p-6",children:l.length===0?n.jsxs("div",{className:"text-center py-20 text-gray-500",children:[n.jsx(Rke,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{className:"text-lg",children:"No events scheduled for this day"})]}):n.jsx("div",{className:"space-y-3",children:l.map(c=>n.jsx(_e,{onClick:()=>a(c),className:`cursor-pointer hover:shadow-lg transition-all border-l-4 ${c.colorClass}`,children:n.jsx(Ce,{className:"p-6",children:n.jsx("div",{className:"flex items-start justify-between gap-4",children:n.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[n.jsx("span",{className:"text-3xl",children:c.icon}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"font-bold text-gray-900 text-lg mb-2",children:c.title}),c.description&&n.jsx("p",{className:"text-gray-600 mb-3",children:c.description}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[c.time&&n.jsxs("span",{className:"text-sm font-semibold text-gray-700 bg-gray-100 px-3 py-1 rounded",children:["🕐 ",c.time]}),c.status&&n.jsx("span",{className:`text-xs font-semibold px-3 py-1 rounded ${c.statusColor}`,children:c.status}),c.priority&&n.jsxs("span",{className:`text-xs font-semibold px-3 py-1 rounded ${c.priorityColor}`,children:[c.priority," priority"]}),c.owner&&n.jsxs("span",{className:"text-sm text-gray-600",children:["👤 ",c.owner]})]})]})]})})})},c.id))})})]})}function Rke({className:e}){return n.jsx("div",{className:e,children:"📅"})}function u9({currentDate:e,events:t,onDateChange:r,onEventClick:a,weekdaysOnly:s=!1}){const i=rd(e,{weekStartsOn:1});K6(e,{weekStartsOn:1});const o=()=>{r(gge(e))},l=()=>{r(V6(e,1))},c=()=>{r(new Date)},d=s?5:7,h=[];for(let f=0;f<d;f++)h.push(Lg(i,f));const u=f=>t.filter(m=>kj(new Date(m.date),f)).sort((m,b)=>!m.time&&!b.time?0:m.time?b.time?m.time.localeCompare(b.time):1:-1);return n.jsxs("div",{className:"bg-white rounded-xl shadow-lg overflow-hidden",children:[n.jsxs("div",{className:"bg-primary-navy p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(me,{onClick:o,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Ww,{className:"w-5 h-5"})}),n.jsxs("div",{className:"text-center",children:[n.jsxs("h2",{className:"text-2xl font-bold text-white",children:[yt(i,"MMMM d")," - ",yt(Lg(i,d-1),"MMMM d, yyyy")]}),n.jsx("p",{className:"text-white/80 text-sm mt-1",children:s?"Weekdays Only":"Full Week"})]}),n.jsx(me,{onClick:l,variant:"ghost",size:"icon",className:"text-white hover:bg-white/20",children:n.jsx(Em,{className:"w-5 h-5"})})]}),n.jsx("div",{className:"flex justify-center mt-4",children:n.jsx(me,{onClick:c,variant:"outline",size:"sm",className:"bg-accent-gold text-primary-navy border-accent-gold hover:bg-[#e8ca7a] font-semibold",children:"Today"})})]}),n.jsx("div",{className:"p-4",children:n.jsx("div",{className:`grid grid-cols-${d}
991 gap-3`,children:h.map(f=>{const m=u(f),b=G6(f);return n.jsxs("div",{className:`border-2 rounded-lg overflow-hidden ${b?"border-blue-500":"border-gray-200"}`,children:[n.jsxs("div",{className:`p-3 text-center ${b?"bg-blue-500 text-white":"bg-gray-50"}`,children:[n.jsx("div",{className:"font-bold text-sm",children:yt(f,"EEE")}),n.jsx("div",{className:`text-2xl font-bold ${b?"text-white":"text-gray-900"}`,children:yt(f,"d")}),n.jsx("div",{className:`text-xs ${b?"text-white/80":"text-gray-500"}`,children:yt(f,"MMM")})]}),n.jsxs("div",{className:"p-2 space-y-2 min-h-[300px] max-h-[600px] overflow-y-auto",children:[m.map(g=>n.jsxs("div",{onClick:()=>a(g),className:`text-xs p-2 rounded cursor-pointer hover:opacity-80 transition-all ${g.colorClass}`,children:[n.jsxs("div",{className:"font-semibold mb-1 line-clamp-2",children:[g.icon," ",g.title]}),g.time&&n.jsxs("div",{className:"text-xs opacity-90",children:["🕐 ",g.time]}),g.owner&&n.jsxs("div",{className:"text-xs opacity-75 mt-1",children:["👤 ",g.owner]})]},g.id)),m.length===0&&n.jsx("div",{className:"text-center py-8 text-gray-400 text-xs",children:"No events"})]})]},f.toString())})})})]})}function Ike({activeFilters:e,onFilterChange:t}){const r=[{id:"task",label:"Tasks",icon:"📋",color:"bg-blue-500"},{id:"nomination",label:"Nominations",icon:"🏆",color:"bg-purple-500"},{id:"content",label:"Content",icon:"📝",color:"bg-green-500"},{id:"communication",label:"Communications",icon:"📢",color:"bg-orange-500"},{id:"sponsor",label:"Sponsors",icon:"🤝",color:"bg-amber-500"},{id:"ticket",label:"Tickets",icon:"🎫",color:"bg-pink-500"},{id:"peopleschoice",label:"People's Choice",icon:"🗳️",color:"bg-indigo-500"},{id:"manual",label:"Manual Events",icon:"📅",color:"bg-gray-500"}];return n.jsx(_e,{className:"bg-white shadow-md",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h3",{className:"font-bold text-gray-900 text-sm uppercase tracking-wide",children:"Show Event Types"}),n.jsx(me,{variant:"outline",size:"sm",onClick:()=>t([]),className:"text-xs font-medium text-gray-600 hover:text-gray-900",children:"Uncheck All"})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:r.map(a=>n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:`filter-${a.id}`,checked:e.includes(a.id),onCheckedChange:s=>{t(s?[...e,a.id]:e.filter(i=>i!==a.id))}}),n.jsxs(ye,{htmlFor:`filter-${a.id}`,className:"cursor-pointer flex items-center gap-2 text-sm",children:[n.jsx("span",{className:`w-3 h-3 rounded-full ${a.color}`}),n.jsx("span",{children:a.icon}),n.jsx("span",{className:"font-medium",children:a.label})]})]},a.id))})]})})}function Dke({event:e,onClose:t,onEdit:r,onDelete:a}){if(!e)return null;const i=(o=>{const l={task:{color:"bg-blue-500",icon:"📋",label:"Task"},nomination:{color:"bg-purple-500",icon:"🏆",label:"Nomination"},content:{color:"bg-green-500",icon:"📝",label:"Content"},communication:{color:"bg-orange-500",icon:"📢",label:"Communication"},sponsor:{color:"bg-amber-500",icon:"🤝",label:"Sponsor"},ticket:{color:"bg-pink-500",icon:"🎫",label:"Ticket"},peopleschoice:{color:"bg-indigo-500",icon:"🗳️",label:"People's Choice"},manual:{color:"bg-gray-500",icon:"📅",label:"Event"}};return l[o]||l.manual})(e.sourceType);return n.jsxs(lt.div,{initial:{x:400,opacity:0},animate:{x:0,opacity:1},exit:{x:400,opacity:0},className:"fixed right-0 top-0 bottom-0 w-full md:w-[480px] bg-white shadow-2xl z-50 overflow-y-auto",children:[n.jsxs("div",{className:`${i.color} text-white p-6`,children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-4xl",children:i.icon}),n.jsx(dt,{className:"bg-white/20 text-white border-white/30",children:i.label})]}),n.jsx("button",{onClick:t,className:"text-white/80 hover:text-white transition-colors",children:n.jsx(Ei,{className:"w-6 h-6"})})]}),n.jsx("h2",{className:"text-2xl font-bold mb-2",children:e.title}),n.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/90",children:[n.jsx(za,{className:"w-4 h-4"}),n.jsx("span",{children:yt(new Date(e.date),"EEEE, MMMM d, yyyy")}),e.time&&n.jsxs(n.Fragment,{children:[n.jsx(la,{className:"w-4 h-4 ml-2"}),n.jsx("span",{children:e.time})]})]})]}),n.jsxs("div",{className:"p-6 space-y-6",children:[e.status&&n.jsxs("div",{children:[n.jsx(hy,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Status"}),n.jsx(dt,{className:e.statusColor||"bg-gray-100 text-gray-800",children:e.status})]}),e.description&&n.jsxs("div",{children:[n.jsx(hy,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Description"}),n.jsx("p",{className:"text-gray-700 leading-relaxed whitespace-pre-wrap",children:e.description})]}),e.owner&&n.jsxs("div",{children:[n.jsx(hy,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:e.sourceType==="task"?"Assigned To":"Owner"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Hd,{className:"w-4 h-4 text-gray-500"}),n.jsx("span",{className:"text-gray-900",children:e.owner})]})]}),e.priority&&n.jsxs("div",{children:[n.jsx(hy,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Priority"}),n.jsx(dt,{className:e.priorityColor||"bg-gray-100 text-gray-800",children:e.priority})]}),e.category&&n.jsxs("div",{children:[n.jsx(hy,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Category"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Yw,{
991className:"w-4 h-4 text-gray-500"}),n.jsx("span",{className:"text-gray-900",children:e.category})]})]}),e.reminderEnabled&&n.jsx("div",{className:"p-4 bg-amber-50 border border-amber-200 rounded-lg",children:n.jsxs("div",{className:"flex items-center gap-2 text-amber-900",children:[n.jsx(QQ,{className:"w-4 h-4"}),n.jsxs("span",{className:"text-sm font-semibold",children:["Reminder set for ",e.reminderOffset===0?"same day":`${e.reminderOffset} day${e.reminderOffset>1?"s":""} before`]})]})}),e.sourceId&&e.linkPage&&n.jsx("div",{className:"border-t pt-6",children:n.jsx(Rt,{to:Ct(e.linkPage),children:n.jsxs(me,{variant:"outline",className:"w-full border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold",children:[n.jsx(Dq,{className:"w-4 h-4 mr-2"}),"View in ",i.label," Module"]})})}),e.sourceType==="manual"&&n.jsxs("div",{className:"border-t pt-6 space-y-3",children:[n.jsxs(me,{onClick:()=>r(e),variant:"outline",className:"w-full border-2 border-blue-500 text-blue-700 hover:bg-blue-50 font-semibold",children:[n.jsx(xa,{className:"w-4 h-4 mr-2"}),"Edit Event"]}),n.jsxs(me,{onClick:()=>a(e),variant:"outline",className:"w-full border-2 border-red-500 text-red-700 hover:bg-red-50 font-semibold",children:[n.jsx(tr,{className:"w-4 h-4 mr-2"}),"Delete Event"]})]})]})]})}function hy({children:e,className:t}){return n.jsx("div",{className:`text-sm font-semibold text-gray-700 ${t||""}`,children:e})}function Fke({open:e,onClose:t,onCreateEvent:r,selectedDate:a,editingEvent:s}){var h,u;const[i,o]=L.useState("manual"),[l,c]=L.useState({title:"",description:"",start_date:a?yt(a,"yyyy-MM-dd'T'HH:mm"):"",end_date:"",event_type:"general",color:"blue",is_all_day:!1,reminder_enabled:!1,reminder_offset_days:1,owner_email:"",assigned_to:"",priority:"medium",task_status:"not_started",task_category:"general",is_recurring:!1,recurrence_pattern:"weekly",recurrence_interval:1,recurrence_end_date:"",content_type:"News and Updates",platforms:[],post_content:""});we.useEffect(()=>{s?(o(s.sourceType),c({title:s.title||"",description:s.description||"",start_date:s.date?yt(new Date(s.date),"yyyy-MM-dd'T'HH:mm"):"",end_date:s.endDate?yt(new Date(s.endDate),"yyyy-MM-dd'T'HH:mm"):"",event_type:s.eventType||"general",color:s.color||"blue",is_all_day:s.isAllDay||!1,reminder_enabled:s.reminderEnabled||!1,reminder_offset_days:s.reminderOffset||1,owner_email:s.owner||"",assigned_to:s.owner||"",priority:s.priority||"medium",task_status:s.status||"not_started",task_category:s.category||"general",content_type:s.category||"News and Updates",platforms:[],post_content:s.description||""})):a&&c(f=>({...f,start_date:yt(a,"yyyy-MM-dd'T'HH:mm")}))},[s,a]);const d=f=>{f.preventDefault(),r(i,l,s==null?void 0:s.sourceId)};return n.jsx(Nn,{open:e,onOpenChange:t,children:n.jsxs(vn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:s?"Edit Event":"Create New Event"})}),n.jsxs(nl,{value:i,onValueChange:o,className:"mt-4",children:[n.jsxs(wo,{className:"grid grid-cols-4 w-full",children:[n.jsx(ln,{value:"manual",children:"📅 Event"}),n.jsx(ln,{value:"task",children:"📋 Task"}),n.jsx(ln,{value:"content",children:"📝 Content"}),n.jsx(ln,{value:"communication",children:"📢 Post"})]}),n.jsxs("form",{onSubmit:d,className:"mt-6 space-y-6",children:[n.jsxs(cn,{value:"manual",className:"space-y-4 mt-0",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"title",children:"Event Title *"}),n.jsx(Me,{id:"title",value:l.title,onChange:f=>c({...l,title:f.target.value}),placeholder:"Enter event title",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"description",children:"Description"}),n.jsx(en,{id:"description",value:l.description,onChange:f=>c({...l,description:f.target.value}),placeholder:"Event description (optional)",rows:3})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"start-date",children:"Start Date & Time *"}),n.jsx(Me,{id:"start-date",type:"datetime-local",value:l.start_date,onChange:f=>c({...l,start_date:f.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"end-date",children:"End Date & Time"}),n.jsx(Me,{id:"end-date",type:"datetime-local",value:l.end_date,onChange:f=>c({...l,end_date:f.target.value})})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"event-type",children:"Event Type"}),n.jsxs(Qt,{value:l.event_type,onValueChange:f=>c({...l,event_type:f}),children:[n.jsx(Kt,{id:"event-type",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"meeting",children:"Meeting"}),n.jsx(Ae,{value:"deadline",children:"Deadline"}),n.jsx(Ae,{value:"campaign",children:"Campaign"}),n.jsx(Ae,{value:"ceremony",children:"Ceremony"}),n.jsx(Ae,{value:"marketing",children:"Marketing"}),n.jsx(Ae,{value:"admin",children:"Admin"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"color",children:"Color"}),n.jsxs(Qt,{value:l.color,onValueChange:f=>c({...l,color:f}),children:[n.jsx(Kt,{id:"color",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"blue",children:"Blue"}),n.jsx(Ae,{value:"green",children:"Green"}),n.jsx(Ae,{value:"purple",children:"Purple"}),n.jsx(Ae,{value:"orange",children:"Orange"}),n.jsx(Ae,{value:"red",children:"Red"}),n.jsx(Ae,{value:"pink",children:"Pink"}),n.jsx(Ae,{value:"indigo",children:"Indigo"}),n.jsx(Ae,{value:"teal",children:"Teal"})]})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"owner",children:"Owner/Responsible Person"}),n.jsx(Me,{id:"owner",type:"email",value:l.owner_email,onChange:f=>c({...l,owner_email:f.target.value}),placeholder:"[email protected]"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"all-day",checked:l.is_all_day,onCheckedChange:f=>c({...l,is_all_day:f})}),n.jsx(ye,{htmlFor:"all-day",children:"All-day event"})]}),n.jsxs("div",{className:"border-t pt-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[n.jsx(Zr,{id:"reminder",checked:l.reminder_enabled,onCheckedChange:f=>c({...l,reminder_enabled:f})}),n.jsx(ye,{htmlFor:"reminder",children:"Enable reminder"})]}),l.reminder_enabled&&n.jsxs(Qt,{value:l.reminder_offset_days.toString(),onValueChange:f=>c({...l,reminder_offset_days:parseInt(f)}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"0",children:"On the day"}),n.jsx(Ae,{value:"1",children:"1 day before"}),n.jsx(Ae,{value:"3",children:"3 days before"}),n.jsx(Ae,{value:"7",children:"1 week before"})]})]})]})]}
991),n.jsxs(cn,{value:"task",className:"space-y-4 mt-0",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Task Title *"}),n.jsx(Me,{value:l.title,onChange:f=>c({...l,title:f.target.value}),placeholder:"Enter task title",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Description"}),n.jsx(en,{value:l.description,onChange:f=>c({...l,description:f.target.value}),rows:3})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Due Date *"}),n.jsx(Me,{type:"date",value:(h=l.start_date)==null?void 0:h.split("T")[0],onChange:f=>c({...l,start_date:f.target.value+"T09:00"}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Assigned To *"}),n.jsx(Me,{value:l.assigned_to,onChange:f=>c({...l,assigned_to:f.target.value}),placeholder:"Assignee name",required:!0})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Priority"}),n.jsxs(Qt,{value:l.priority,onValueChange:f=>c({...l,priority:f}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"low",children:"Low"}),n.jsx(Ae,{value:"medium",children:"Medium"}),n.jsx(Ae,{value:"high",children:"High"}),n.jsx(Ae,{value:"urgent",children:"Urgent"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Category"}),n.jsxs(Qt,{value:l.task_category,onValueChange:f=>c({...l,task_category:f}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"nominations",children:"Nominations"}),n.jsx(Ae,{value:"judging",children:"Judging"}),n.jsx(Ae,{value:"event_planning",children:"Event Planning"}),n.jsx(Ae,{value:"marketing",children:"Marketing"}),n.jsx(Ae,{value:"sponsorship",children:"Sponsorship"}),n.jsx(Ae,{value:"logistics",children:"Logistics"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]})]}),n.jsxs("div",{className:"border-t pt-4 mt-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Zr,{id:"task-recurring",checked:l.is_recurring,onCheckedChange:f=>c({...l,is_recurring:f})}),n.jsx(ye,{htmlFor:"task-recurring",className:"font-semibold cursor-pointer",children:"Recurring Task"})]}),l.is_recurring&&n.jsxs("div",{className:"space-y-4 pl-6 border-l-4 border-blue-200 bg-blue-50 p-4 rounded",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Repeat Pattern"}),n.jsxs(Qt,{value:l.recurrence_pattern,onValueChange:f=>c({...l,recurrence_pattern:f}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"daily",children:"Daily"}),n.jsx(Ae,{value:"weekly",children:"Weekly"}),n.jsx(Ae,{value:"monthly",children:"Monthly"}),n.jsx(Ae,{value:"annual",children:"Annual"}),n.jsx(Ae,{value:"custom",children:"Custom"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Repeat Every"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Me,{type:"number",min:"1",value:l.recurrence_interval,onChange:f=>c({...l,recurrence_interval:parseInt(f.target.value)||1}),className:"w-20"}),n.jsx("span",{className:"text-sm text-gray-600",children:l.recurrence_pattern==="daily"?"day(s)":l.recurrence_pattern==="weekly"?"week(s)":l.recurrence_pattern==="monthly"?"month(s)":l.recurrence_pattern==="annual"?"year(s)":"interval(s)"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"End Date (Optional)"}),n.jsx(Me,{type:"date",value:l.recurrence_end_date,onChange:f=>c({...l,recurrence_end_date:f.target.value})}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave blank to repeat indefinitely"})]})]})]})]}),n.jsxs(cn,{value:"content",className:"space-y-4 mt-0",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Article Title *"}),n.jsx(Me,{value:l.title,onChange:f=>c({...l,title:f.target.value}),placeholder:"Enter article title",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Excerpt"}),n.jsx(en,{value:l.description,onChange:f=>c({...l,description:f.target.value}),placeholder:"Brief summary",rows:3})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Publish Date *"}),n.jsx(Me,{type:"date",value:(u=l.start_date)==null?void 0:u.split("T")[0],onChange:f=>c({...l,start_date:f.target.value+"T09:00"}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Category"}),n.jsxs(Qt,{value:l.content_type,onValueChange:f=>c({...l,content_type:f}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"News and Updates",children:"News and Updates"}),n.jsx(Ae,{value:"Guidance and How To Content",children:"Guidance and How To"}),n.jsx(Ae,{value:"Sponsorship and Partner Focus",children:"Sponsorship Focus"}),n.jsx(Ae,{value:"Impact and Legacy Stories",children:"Impact Stories"}),n.jsx(Ae,{value:"Behind the Scenes",children:"Behind the Scenes"}),n.jsx(Ae,{value:"Event and Awards Day Content",children:"Event Content"}),n.jsx(Ae,{value:"Strategic Thought Leadership",children:"Thought Leadership"})]})]})]})]})]}
991),n.jsxs(cn,{value:"communication",className:"space-y-4 mt-0",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Post Content *"}),n.jsx(en,{value:l.post_content,onChange:f=>c({...l,post_content:f.target.value,title:f.target.value.slice(0,50)+"..."}),placeholder:"What would you like to share?",rows:4,required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Platforms *"}),n.jsx("div",{className:"grid grid-cols-2 gap-3 mt-2",children:["Facebook","Twitter","LinkedIn","Instagram","YouTube"].map(f=>n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:`platform-${f}`,checked:l.platforms.includes(f),onCheckedChange:m=>{c(m?{...l,platforms:[...l.platforms,f]}:{...l,platforms:l.platforms.filter(b=>b!==f)})}}),n.jsx(ye,{htmlFor:`platform-${f}`,children:f})]},f))})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Scheduled Date & Time *"}),n.jsx(Me,{type:"datetime-local",value:l.start_date,onChange:f=>c({...l,start_date:f.target.value}),required:!0})]})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),n.jsxs(me,{type:"submit",className:"flex-1 bg-primary-navy text-white hover:opacity-90 font-semibold",children:[s?"Update":"Create"," ",i==="manual"?"Event":i==="task"?"Task":i==="content"?"Content":"Post"]})]})]})]})]})})}function tY(){const[e,t]=L.useState(new Date),[r,a]=L.useState("weekday"),[s,i]=L.useState(["task","nomination","content","communication","sponsor","ticket","peopleschoice","manual"]),[o,l]=L.useState(null),[c,d]=L.useState(!1),[h,u]=L.useState(null),[f,m]=L.useState(null),b=Sr(),{data:g=[]}=xt({queryKey:["tasks"],queryFn:()=>pe.entities.Task.list("-due_date",500)}),{data:y=[]}=xt({queryKey:["nominations"],queryFn:()=>pe.entities.Nomination.list("-created_date",500)}),{data:x=[]}=xt({queryKey:["newsArticles"],queryFn:()=>pe.entities.NewsArticle.list("-published_date",500)}),{data:w=[]}=xt({queryKey:["socialMediaPosts"],queryFn:()=>pe.entities.SocialMediaPost.list("-scheduled_date_time",500)}),{data:j=[]}=xt({queryKey:["sponsors"],queryFn:()=>pe.entities.Sponsor.list("display_order",100)}),{data:N=[]}=xt({queryKey:["tableBookings"],queryFn:()=>pe.entities.TableBooking.list("table_number",100)}),{data:_=[]}=xt({queryKey:["calendarEvents"],queryFn:()=>pe.entities.CalendarEvent.list("-start_date",500)}),{data:S=[]}=xt({queryKey:["peoplesChoiceConfig"],queryFn:()=>pe.entities.PeoplesChoiceConfig.list("-created_date",1)}),A=Tt({mutationFn:async({type:G,data:B})=>{if(G==="manual")return pe.entities.CalendarEvent.create(B);
991if(G==="task")return pe.entities.Task.create({title:B.title,description:B.description,assigned_to:B.assigned_to,due_date:B.start_date.split("T")[0],priority:B.priority,status:B.task_status,category:B.task_category,progress_percentage:0});if(G==="content")return pe.entities.NewsArticle.create({title:B.title,content:B.description||"Draft content",excerpt:B.description,category:B.content_type,published_date:B.start_date.split("T")[0],is_published:!1});if(G==="communication")return pe.entities.SocialMediaPost.create({post_content:B.post_content,platforms:B.platforms,scheduled_date_time:B.start_date,status:"scheduled",post_type:"general"})},onSuccess:(G,B)=>{b.invalidateQueries({queryKey:["calendarEvents"]}),b.invalidateQueries({queryKey:["tasks"]}),b.invalidateQueries({queryKey:["newsArticles"]}),b.invalidateQueries({queryKey:["socialMediaPosts"]}),d(!1),m(null)}}),T=Tt({mutationFn:async({id:G,data:B})=>pe.entities.CalendarEvent.update(G,B),onSuccess:()=>{b.invalidateQueries({queryKey:["calendarEvents"]}),d(!1),m(null),l(null)}}),R=Tt({mutationFn:G=>pe.entities.CalendarEvent.delete(G),onSuccess:()=>{b.invalidateQueries({queryKey:["calendarEvents"]}),l(null)}}),k=(()=>{const G=[];if(s.includes("task")&&g.forEach(B=>{var ee;const Y=gc(new Date(B.due_date),Sy())&&B.status!=="completed";G.push({id:`task-${B.id}
991`,sourceId:B.id,sourceType:"task",title:B.title,description:B.description,date:B.due_date,time:null,status:(ee=B.status)==null?void 0:ee.replace("_"," "),statusColor:B.status==="completed"?"bg-green-100 text-green-800":B.status==="in_progress"?"bg-orange-100 text-orange-800":B.status==="on_hold"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800",priority:B.priority,priorityColor:B.priority==="urgent"?"bg-red-100 text-red-800":B.priority==="high"?"bg-orange-100 text-orange-800":B.priority==="medium"?"bg-yellow-100 text-yellow-800":"bg-blue-100 text-blue-800",owner:B.assigned_to,category:B.category,colorClass:"bg-blue-100 text-blue-800 border-blue-500",icon:"📋",linkPage:"AdminDashboard",isOverdue:Y})}),s.includes("nomination")&&y.forEach(B=>{var Y;G.push({id:`nomination-${B.id}`,sourceId:B.id,sourceType:"nomination",title:`${B.nominee_name} - ${B.category}`,description:B.nomination_statement,date:B.created_date,time:yt(new Date(B.created_date),"HH:mm"),status:(Y=B.status)==null?void 0:Y.replace("_"," "),statusColor:B.status==="winner"?"bg-yellow-100 text-yellow-800":B.status==="finalist"?"bg-purple-100 text-purple-800":B.status==="shortlisted"?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800",category:B.category,owner:B.nominator_name,colorClass:"bg-purple-100 text-purple-800 border-purple-500",icon:"🏆",linkPage:"AdminDashboard"})}),s.includes("content")&&x.forEach(B=>{B.published_date&&G.push({id:`content-${B.id}
991`,sourceId:B.id,sourceType:"content",title:B.title,description:B.excerpt||B.content,date:B.published_date,time:null,status:B.is_published?"Published":"Draft",statusColor:B.is_published?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800",category:B.category,owner:B.author,colorClass:"bg-green-100 text-green-800 border-green-500",icon:"📝",linkPage:"AdminDashboard"})}),s.includes("communication")&&w.forEach(B=>{var Y;B.scheduled_date_time&&G.push({id:`communication-${B.id}`,sourceId:B.id,sourceType:"communication",title:B.post_content.slice(0,50)+(B.post_content.length>50?"...":""),description:B.post_content,date:B.scheduled_date_time.split("T")[0],time:yt(new Date(B.scheduled_date_time),"HH:mm"),status:B.status,statusColor:B.status==="posted"?"bg-green-100 text-green-800":B.status==="scheduled"?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800",category:(Y=B.platforms)==null?void 0:Y.join(", "),colorClass:"bg-orange-100 text-orange-800 border-orange-500",icon:"📢",linkPage:"AdminDashboard"})}),s.includes("ticket")&&N.forEach(B=>{B.created_date&&G.push({id:`ticket-${B.id}`,sourceId:B.id,sourceType:"ticket",title:`Table Booking: ${B.table_number}`,description:`${B.organization} - ${B.primary_contact}`,date:B.created_date,time:yt(new Date(B.created_date),"HH:mm"),status:B.status,statusColor:B.status==="paid"?"bg-green-100 text-green-800":"bg-orange-100 text-orange-800",owner:B.primary_contact,colorClass:"bg-pink-100 text-pink-800 border-pink-500",icon:"🎫",linkPage:"AdminDashboard"})}),s.includes("sponsor")&&j.forEach(B=>{B.created_date&&G.push({id:`sponsor-${B.id}`,sourceId:B.id,sourceType:"sponsor",title:`Sponsor Added: ${B.name}`,description:B.description,date:B.created_date,time:yt(new Date(B.created_date),"HH:mm"),status:B.is_active?"Active":"Inactive",statusColor:B.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800",category:B.tier,colorClass:"bg-amber-100 text-amber-800 border-amber-500",icon:"🤝",linkPage:"AdminDashboard"})}),s.includes("peopleschoice")&&S.length>0){const B=S[0];B.voting_start&&G.push({id:"pc-start",sourceType:"peopleschoice",title:"People's Choice Voting Opens",description:"Public voting period begins",date:B.voting_start.split("T")[0],time:B.voting_start.includes("T")?yt(new Date(B.voting_start),"HH:mm"):null,status:"Campaign",statusColor:"bg-indigo-100 text-indigo-800",colorClass:"bg-indigo-100 text-indigo-800 border-indigo-500",icon:"🗳️",linkPage:"AdminDashboard"}),B.voting_end&&G.push({id:"pc-end",sourceType:"peopleschoice",title:"People's Choice Voting Closes",description:"Voting deadline - final count begins",date:B.voting_end.split("T")[0],time:B.voting_end.includes("T")?yt(new Date(B.voting_end),"HH:mm"):null,status:"Deadline",statusColor:"bg-red-100 text-red-800",colorClass:"bg-indigo-100 text-indigo-800 border-indigo-500",icon:"🗳️",linkPage:"AdminDashboard"}),B.winner_announcement_date&&G.push({id:"pc-announce",sourceType:"peopleschoice",title:"People's Choice Winner Announcement",description:"Official winner reveal",date:B.winner_announcement_date,time:null,status:"Announcement",statusColor:"bg-yellow-100 text-yellow-800",colorClass:"bg-indigo-100 text-indigo-800 border-indigo-500",icon:"🗳️",linkPage:"AdminDashboard"})}return s.includes("manual")&&_.forEach(B=>{const Y={blue:"bg-blue-100 text-blue-800 border-blue-500",green:"bg-green-100 text-green-800 border-green-500",purple:"bg-purple-100 text-purple-800 border-purple-500",orange:"bg-orange-100 text-orange-800 border-orange-500",red:"bg-red-100 text-red-800 border-red-500",pink:"bg-pink-100 text-pink-800 border-pink-500",indigo:"bg-indigo-100 text-indigo-800 border-indigo-500",teal:"bg-teal-100 text-teal-800 border-teal-500"};G.push({id:`manual-${B.id}
991`,sourceId:B.id,sourceType:"manual",title:B.title,description:B.description,date:B.start_date.split("T")[0],time:B.start_date.includes("T")?yt(new Date(B.start_date),"HH:mm"):null,endDate:B.end_date,eventType:B.event_type,color:B.color,isAllDay:B.is_all_day,reminderEnabled:B.reminder_enabled,reminderOffset:B.reminder_offset_days,owner:B.owner_email,colorClass:Y[B.color]||Y.blue,icon:"📅"})}),G})(),P=async(G,B,Y)=>{Y?T.mutate({id:Y,data:B}):A.mutate({type:G,data:B})},O=async G=>{G.sourceType==="manual"&&G.sourceId&&window.confirm("Are you sure you want to delete this event?")&&R.mutate(G.sourceId)},F=G=>{G.sourceType==="manual"&&(m(G),d(!0))},$=G=>{u(G),d(!0)};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 py-8",children:[n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(za,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Master Calendar"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Unified timeline across all Awards operations"})]})]}),n.jsxs(lt.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-8",children:[n.jsx("div",{className:"flex items-center justify-end mb-6",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex gap-1 bg-white rounded-lg p-1 shadow-md",children:[n.jsx(me,{variant:r==="month"?"default":"ghost",size:"sm",onClick:()=>a("month"),className:r==="month"?"bg-primary-navy text-white":"",children:"Month"}),n.jsx(me,{variant:r==="week"?"default":"ghost",size:"sm",onClick:()=>a("week"),className:r==="week"?"bg-primary-navy text-white":"",children:"Week"}),n.jsx(me,{variant:r==="weekday"?"default":"ghost",size:"sm",onClick:()=>a("weekday"),className:r==="weekday"?"bg-primary-navy text-white":"",children:"Weekday"}),n.jsx(me,{variant:r==="day"?"default":"ghost",size:"sm",onClick:()=>a("day"),className:r==="day"?"bg-primary-navy text-white":"",children:"Day"}),n.jsx(me,{variant:r==="agenda"?"default":"ghost",size:"sm",onClick:()=>a("agenda"),className:r==="agenda"?"bg-primary-navy text-white":"",children:"Agenda"})]}),n.jsxs(me,{onClick:()=>{u(new Date),m(null),d(!0)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create Event"]})]})}),n.jsx(Ike,{activeFilters:s,onFilterChange:i})]}),r==="month"&&n.jsx(Oke,{currentDate:e,events:k,onDateChange:t,onEventClick:l,onDateClick:$}),r==="week"&&n.jsx(u9,{currentDate:e,events:k,onDateChange:t,onEventClick:l,weekdaysOnly:!1}),r==="weekday"&&n.jsx(u9,{currentDate:e,events:k,onDateChange:t,onEventClick:l,weekdaysOnly:!0}),r==="day"&&n.jsx(Lke,{currentDate:e,events:k,onDateChange:t,onEventClick:l}),r==="agenda"&&n.jsx(Mke,{events:k,onEventClick:l,startDate:e})]}),n.jsx(Gm,{children:o&&n.jsx(Dke,{event:o,onClose:()=>l(null),onEdit:F,onDelete:O})}),n.jsx(Fke,{open:c,onClose:()=>{d(!1),u(null),m(null)},selectedDate:h,editingEvent:f,onCreateEvent:P})]})}const qke="modulepreload",Bke=function(e){return"/"+e},h9={},Vk=function(t,r,a){let s=Promise.resolve();if(r&&r.length>0){let o=function(d){return Promise.all(d.map(h=>Promise.resolve(h).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=o(r.map(d=>{if(d=Bke(d),d in h9)return;h9[d]=!0;const h=d.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${u}`))return;const f=document.createElement("link");if(f.rel=h?"stylesheet":qke,h||(f.as="script"),f.crossOrigin="",f.href=d,c&&f.setAttribute("nonce",c),document.head.appendChild(f),h)return new Promise((m,b)=>{f.addEventListener("load",m),f.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function Gr(e){"@babel/helpers - typeof";return Gr=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},Gr(e)}var Zi=Uint8Array,El=Uint16Array,eE=Int32Array,i2=new Zi([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]),o2=new Zi([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]),Hk=new Zi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nY=function(e,t){for(var r=new El(31),a=0;a<31;++a)r[a]=t+=1<<e[a-1];for(var s=new eE(r[30]),a=1;a<30;++a)for(var i=r[a];i<r[a+1];++i)s[i]=i-r[a]<<5|a;return{b:r,r:s}},rY=nY(i2,2),aY=rY.b,Wk=rY.r;aY[28]=258,Wk[258]=28;var sY=nY(o2,0),$ke=sY.b,f9=sY.r,Kk=new El(32768);for(var Aa=0;Aa<32768;++Aa){var Oh=(Aa&43690)>>1|(Aa&21845)<<1;Oh=(Oh&52428)>>2|(Oh&13107)<<2,Oh=(Oh&61680)>>4|(Oh&3855)<<4,Kk[Aa]=((Oh&65280)>>8|(Oh&255)<<8)>>1}var Zd=(function(e,t,r){for(var a=e.length,s=0,i=new El(t);s<a;++s)e[s]&&++i[e[s]-1];var o=new El(t);for(s=1;s<t;++s)o[s]=o[s-1]+i[s-1]<<1;var l;if(r){l=new El(1<<t);var c=15-t;for(s=0;s<a;++s)if(e[s])for(var d=s<<4|e[s],h=t-e[s],u=o[e[s]-1]++<<h,f=u|(1<<h)-1;u<=f;++u)l[Kk[u]>>c]=d}else for(l=new El(a),s=0;s<a;++s)e[s]&&(l[s]=Kk[o[e[s]-1]++]>>15-e[s]);return l}),ff=new Zi(288);for(var Aa=0;Aa<144;++Aa)ff[Aa]=8;for(var Aa=144;Aa<256;++Aa)ff[Aa]=9;for(var Aa=256;Aa<280;++Aa)ff[Aa]=7;for(var Aa=280;Aa<288;++Aa)ff[Aa]=8;var z0=new Zi(32);for(var Aa=0;Aa<32;++Aa)z0[Aa]=5;var Uke=Zd(ff,9,0),zke=Zd(ff,9,1),Vke=Zd(z0,5,0),Hke=Zd(z0,5,1),z4=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},Vc=function(e,t,r){var a=t/8|0;return(e[a]|e[a+1]<<8)>>(t&7)&r},V4=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},tE=function(e){return(e+7)/8|0},iY=function(e,t,r){return(r==null||r>e.length)&&(r=e.length),new Zi(e.subarray(t,r))}
vendor: 4,514 bytes, line 991
991,Wke=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Gc=function(e,t,r){var a=new Error(t||Wke[e]);if(a.code=e,Error.captureStackTrace&&Error.captureStackTrace(a,Gc),!r)throw a;return a},Kke=function(e,t,r,a){var s=e.length,i=0;if(!s||t.f&&!t.l)return r||new Zi(0);var o=!r,l=o||t.i!=2,c=t.i;o&&(r=new Zi(s*3));var d=function(je){var xe=r.length;if(je>xe){var Fe=new Zi(Math.max(xe*2,je));Fe.set(r),r=Fe}},h=t.f||0,u=t.p||0,f=t.b||0,m=t.l,b=t.d,g=t.m,y=t.n,x=s*8;do{if(!m){h=Vc(e,u,1);var w=Vc(e,u+1,3);if(u+=3,w)if(w==1)m=zke,b=Hke,g=9,y=5;else if(w==2){var S=Vc(e,u,31)+257,A=Vc(e,u+10,15)+4,T=S+Vc(e,u+5,31)+1;u+=14;for(var R=new Zi(T),M=new Zi(19),k=0;k<A;++k)M[Hk[k]]=Vc(e,u+k*3,7);u+=A*3;for(var P=z4(M),O=(1<<P)-1,F=Zd(M,P,1),k=0;k<T;){var $=F[Vc(e,u,O)];u+=$&15;var j=$>>4;if(j<16)R[k++]=j;else{var G=0,B=0;for(j==16?(B=3+Vc(e,u,3),u+=2,G=R[k-1]):j==17?(B=3+Vc(e,u,7),u+=3):j==18&&(B=11+Vc(e,u,127),u+=7);B--;)R[k++]=G}}var Y=R.subarray(0,S),ee=R.subarray(S);g=z4(Y),y=z4(ee),m=Zd(Y,g,1),b=Zd(ee,y,1)}else Gc(1);else{var j=tE(u)+4,N=e[j-4]|e[j-3]<<8,_=j+N;if(_>s){c&&Gc(0);break}l&&d(f+N),r.set(e.subarray(j,_),f),t.b=f+=N,t.p=u=_*8,t.f=h;continue}if(u>x){c&&Gc(0);break}}l&&d(f+131072);for(var J=(1<<g)-1,H=(1<<y)-1,q=u;;q=u){var G=m[V4(e,u)&J],K=G>>4;if(u+=G&15,u>x){c&&Gc(0);break}if(G||Gc(2),K<256)r[f++]=K;else if(K==256){q=u,m=null;break}else{var te=K-254;if(K>264){var k=K-257,re=i2[k];te=Vc(e,u,(1<<re)-1)+aY[k],u+=re}var Q=b[V4(e,u)&H],ne=Q>>4;Q||Gc(3),u+=Q&15;var ee=$ke[ne];if(ne>3){var re=o2[ne];ee+=V4(e,u)&(1<<re)-1,u+=re}if(u>x){c&&Gc(0);break}l&&d(f+131072);var oe=f+te;if(f<ee){var ae=i-ee,le=Math.min(ee,oe);for(ae+f<0&&Gc(3);f<le;++f)r[f]=a[ae+f]}for(;f<oe;++f)r[f]=r[f-ee]}}t.l=m,t.p=q,t.b=f,t.f=h,m&&(h=1,t.m=g,t.d=b,t.n=y)}while(!h);return f!=r.length&&o?iY(r,0,f):r.subarray(0,f)},Pu=function(e,t,r){r<<=t&7;var a=t/8|0;e[a]|=r,e[a+1]|=r>>8},fy=function(e,t,r){r<<=t&7;var a=t/8|0;e[a]|=r,e[a+1]|=r>>8,e[a+2]|=r>>16},H4=function(e,t){for(var r=[],a=0;a<e.length;++a)e[a]&&r.push({s:a,f:e[a]});var s=r.length,i=r.slice();if(!s)return{t:lY,l:0};if(s==1){var o=new Zi(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(_,S){return _.f-S.f}),r.push({s:-1,f:25001});var l=r[0],c=r[1],d=0,h=1,u=2;for(r[0]={s:-1,f:l.f+c.f,l,r:c};h!=s-1;)l=r[r[d].f<r[u].f?d++:u++],c=r[d!=h&&r[d].f<r[u].f?d++:u++],r[h++]={s:-1,f:l.f+c.f,l,r:c};for(var f=i[0].s,a=1;a<s;++a)i[a].s>f&&(f=i[a].s);var m=new El(f+1),b=Gk(r[h-1],m,0);if(b>t){var a=0,g=0,y=b-t,x=1<<y;for(i.sort(function(S,A){return m[A.s]-m[S.s]||S.f-A.f});a<s;++a){var w=i[a].s;if(m[w]>t)g+=x-(1<<b-m[w]),m[w]=t;else break}for(g>>=y;g>0;){var j=i[a].s;m[j]<t?g-=1<<t-m[j]++-1:++a}for(;a>=0&&g;--a){var N=i[a].s;m[N]==t&&(--m[N],++g)}b=t}return{t:new Zi(m),l:b}},Gk=function(e,t,r){return e.s==-1?Math.max(Gk(e.l,t,r+1),Gk(e.r,t,r+1)):t[e.s]=r},m9=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new El(++t),a=0,s=e[0],i=1,o=function(c){r[a++]=c},l=1;l<=t;++l)if(e[l]==s&&l!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=e[l]}return{c:r.subarray(0,a),n:t}},my=function(e,t){for(var r=0,a=0;a<t.length;++a)r+=e[a]*t[a];return r},oY=function(e,t,r){var a=r.length,s=tE(t+2);e[s]=a&255,e[s+1]=a>>8,e[s+2]=e[s]^255,e[s+3]=e[s+1]^255;for(var i=0;i<a;++i)e[s+i+4]=r[i];return(s+4+a)*8},p9=function(e,t,r,a,s,i,o,l,c,d,h){Pu(t,h++,r),++s[256];for(var u=H4(s,15),f=u.t,m=u.l,b=H4(i,15),g=b.t,y=b.l,x=m9(f),w=x.c,j=x.n,N=m9(g),_=N.c,S=N.n,A=new El(19),T=0;T<w.length;++T)++A[w[T]&31];for(var T=0;T<_.length;++T)++A[_[T]&31];for(var R=H4(A,7),M=R.t,k=R.l,P=19;P>4&&!M[Hk[P-1]];--P);var O=d+5<<3,F=my(s,ff)+my(i,z0)+o,$=my(s,f)+my(i,g)+o+14+3*P+my(A,M)+2*A[16]+3*A[17]+7*A[18];if(c>=0&&O<=F&&O<=$)return oY(t,h,e.subarray(c,c+d));var G,B,Y,ee;if(Pu(t,h,1+($<F)),h+=2,$<F){G=Zd(f,m,0),B=f,Y=Zd(g,y,0),ee=g;var J=Zd(M,k,0);Pu(t,h,j-257),Pu(t,h+5,S-1),Pu(t,h+10,P-4),h+=14;for(var T=0;T<P;++T)Pu(t,h+3*T,M[Hk[T]]);h+=3*P;for(var H=[w,_],q=0;q<2;++q)for(var K=H[q],T=0;T<K.length;++T){var te=K[T]&31;Pu(t,h,J[te]),h+=M[te],te>15&&(Pu(t,h,K[T]>>5&127),h+=K[T]>>12)}}else G=Uke,B=ff,Y=Vke,ee=z0;for(var T=0;T<l;++T){var re=a[T];if(re>255){var te=re>>18&31;fy(t,h,G[te+257]),h+=B[te+257],te>
vendor: 3,803 bytes, line 991
9917&&(Pu(t,h,re>>23&31),h+=i2[te]);var Q=re&31;fy(t,h,Y[Q]),h+=ee[Q],Q>3&&(fy(t,h,re>>5&8191),h+=o2[Q])}else fy(t,h,G[re]),h+=B[re]}return fy(t,h,G[256]),h+B[256]},Gke=new eE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),lY=new Zi(0),Yke=function(e,t,r,a,s,i){var o=i.z||e.length,l=new Zi(a+o+5*(1+Math.ceil(o/7e3))+s),c=l.subarray(a,l.length-s),d=i.l,h=(i.r||0)&7;if(t){h&&(c[0]=i.r>>3);for(var u=Gke[t-1],f=u>>13,m=u&8191,b=(1<<r)-1,g=i.p||new El(32768),y=i.h||new El(b+1),x=Math.ceil(r/3),w=2*x,j=function(he){return(e[he]^e[he+1]<<x^e[he+2]<<w)&b},N=new eE(25e3),_=new El(288),S=new El(32),A=0,T=0,R=i.i||0,M=0,k=i.w||0,P=0;R+2<o;++R){var O=j(R),F=R&32767,$=y[O];if(g[F]=$,y[O]=F,k<=R){var G=o-R;if((A>7e3||M>24576)&&(G>423||!d)){h=p9(e,c,0,N,_,S,T,M,P,R-P,h),M=A=T=0,P=R;for(var B=0;B<286;++B)_[B]=0;for(var B=0;B<30;++B)S[B]=0}var Y=2,ee=0,J=m,H=F-$&32767;if(G>2&&O==j(R-H))for(var q=Math.min(f,G)-1,K=Math.min(32767,R),te=Math.min(258,G);H<=K&&--J&&F!=$;){if(e[R+Y]==e[R+Y-H]){for(var re=0;re<te&&e[R+re]==e[R+re-H];++re);if(re>Y){if(Y=re,ee=H,re>q)break;for(var Q=Math.min(H,re-2),ne=0,B=0;B<Q;++B){var oe=R-H+B&32767,ae=g[oe],le=oe-ae&32767;le>ne&&(ne=le,$=oe)}}}F=$,$=g[F],H+=F-$&32767}if(ee){N[M++]=268435456|Wk[Y]<<18|f9[ee];var je=Wk[Y]&31,xe=f9[ee]&31;T+=i2[je]+o2[xe],++_[257+je],++S[xe],k=R+Y,++A}else N[M++]=e[R],++_[e[R]]}}for(R=Math.max(R,k);R<o;++R)N[M++]=e[R],++_[e[R]];h=p9(e,c,d,N,_,S,T,M,P,R-P,h),d||(i.r=h&7|c[h/8|0]<<3,h-=7,i.h=y,i.p=g,i.i=R,i.w=k)}else{for(var R=i.w||0;R<o+d;R+=65535){var Fe=R+65535;Fe>=o&&(c[h/8|0]=d,Fe=o),h=oY(c,h+1,e.subarray(R,Fe))}i.i=o}return iY(l,0,a+tE(h)+s)},cY=function(){var e=1,t=0;return{p:function(r){for(var a=e,s=t,i=r.length|0,o=0;o!=i;){for(var l=Math.min(o+2655,i);o<l;++o)s+=a+=r[o];a=(a&65535)+15*(a>>16),s=(s&65535)+15*(s>>16)}e=a,t=s},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},Qke=function(e,t,r,a,s){if(!s&&(s={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new Zi(i.length+e.length);o.set(i),o.set(e,i.length),e=o,s.w=i.length}return Yke(e,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,a,s)},dY=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Xke=function(e,t){var r=t.level,a=r==0?0:r<6?1:r==9?3:2;if(e[0]=120,e[1]=a<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var s=cY();s.p(t.dictionary),dY(e,2,s.d())}},Jke=function(e,t){return((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&Gc(6,"invalid zlib data"),(e[1]>>5&1)==1&&Gc(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function Yk(e,t){t||(t={});var r=cY();r.p(e);var a=Qke(e,t,t.dictionary?6:2,4);return Xke(a,t),dY(a,a.length-4,r.d()),a}function Zke(e,t){return Kke(e.subarray(Jke(e),-4),{i:2},t,t)}var e3e=typeof TextDecoder<"u"&&new TextDecoder,t3e=0;try{e3e.decode(lY,{stream:!0}),t3e=1}catch{}var En=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function W4(){En.console&&typeof En.console.log=="function"&&En.console.log.apply(En.console,arguments)}var oa={log:W4,warn:function(e){En.console&&(typeof En.console.warn=="function"?En.console.warn.apply(En.console,arguments):W4.call(null,arguments))},error:function(e){En.console&&(typeof En.console.error=="function"?En.console.error.apply(En.console,arguments):W4(e))}};function K4(e,t,r){var a=new XMLHttpRequest;a.open("GET",e),a.responseType="blob",a.onload=function(){Zf(a.response,t,r)},a.onerror=function(){oa.error("could not download file")},a.send()}function g9(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Bb(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");
991t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Uy,Qk,Zf=En.saveAs||((typeof window>"u"?"undefined":Gr(window))!=="object"||window!==En?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,r){var a=En.URL||En.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener",typeof e=="string"?(s.href=e,s.origin!==location.origin?g9(s.href)?K4(e,t,r):Bb(s,s.target="_blank"):Bb(s)):(s.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(s.href)}),4e4),setTimeout((function(){Bb(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e=="string")if(g9(e))K4(e,t,r);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){Bb(a)}))}else navigator.msSaveOrOpenBlob((function(s,i){return i===void 0?i={autoBom:!1}:Gr(i)!=="object"&&(oa.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s})(e,r),t)}:function(e,t,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),typeof e=="string")return K4(e,t,r);var s=e.type==="application/octet-stream",i=/constructor/i.test(En.HTMLElement)||En.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||s&&i)&&(typeof FileReader>"u"?"undefined":Gr(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var h=l.result;h=o?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=h:location=h,a=null},l.readAsDataURL(e)}else{var c=En.URL||En.webkitURL,d=c.createObjectURL(e);a?a.location=d:location.href=d,a=null,setTimeout((function(){c.revokeObjectURL(d)}),4e4)}});/**
992 * A class to parse color values
993 * @author Stoyan Stefanov <[email protected]>
994 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
995 * @license Use it if you like it
996 */function uY(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:"90ee9
9960",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 r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],a=0;a<r.length;a++){var s=r[a].re,i=r[a].process,o=s.exec(e);o&&(t=i(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 l=this.r.toString(16),c=this.g.toString(16),d=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),d.length==1&&(d="0"+d),"#"+l+c+d}}/**
997 * @license
998 * Joseph Myers does not specify a particular license for his work.
999 *
1000 * Author: Joseph Myers
1001 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
1002 *
1003 * Modified by: Owen Leong
1004 */function G4(e,t){var r=e[0],a=e[1],s=e[2],i=e[3];r=Hi(r,a,s,i,t[0],7,-680876936),i=Hi(i,r,a,s,t[1],12,-389564586),s=Hi(s,i,r,a,t[2],17,606105819),a=Hi(a,s,i,r,t[3],22,-1044525330),r=Hi(r,a,s,i,t[4],7,-176418897),i=Hi(i,r,a,s,t[5],12,1200080426),s=Hi(s,i,r,a,t[6],17,-1473231341),a=Hi(a,s,i,r,t[7],22,-45705983),r=Hi(r,a,s,i,t[8],7,1770035416),i=Hi(i,r,a,s,t[9],12,-1958414417),s=Hi(s,i,r,a,t[10],17,-42063),a=Hi(a,s,i,r,t[11],22,-1990404162),r=Hi(r,a,s,i,t[12],7,1804603682),i=Hi(i,r,a,s,t[13],12,-40341101),s=Hi(s,i,r,a,t[14],17,-1502002290),r=Wi(r,a=Hi(a,s,i,r,t[15],22,1236535329),s,i,t[1],5,-165796510),i=Wi(i,r,a,s,t[6],9,-1069501632),s=Wi(s,i,r,a,t[11],14,643717713),a=Wi(a,s,i,r,t[0],20,-373897302),r=Wi(r,a,s,i,t[5],5,-701558691),i=Wi(i,r,a,s,t[10],9,38016083),s=Wi(s,i,r,a,t[15],14,-660478335),a=Wi(a,s,i,r,t[4],20,-405537848),r=Wi(r,a,s,i,t[9],5,568446438),i=Wi(i,r,a,s,t[14],9,-1019803690),s=Wi(s,i,r,a,t[3],14,-187363961),a=Wi(a,s,i,r,t[8],20,1163531501),r=Wi(r,a,s,i,t[13],5,-1444681467),i=Wi(i,r,a,s,t[2],9,-51403784),s=Wi(s,i,r,a,t[7],14,1735328473),r=Ki(r,a=Wi(a,s,i,r,t[12],20,-1926607734),s,i,t[5],4,-378558),i=Ki(i,r,a,s,t[8],11,-2022574463),s=Ki(s,i,r,a,t[11],16,1839030562),a=Ki(a,s,i,r,t[14],23,-35309556),r=Ki(r,a,s,i,t[1],4,-1530992060),i=Ki(i,r,a,s,t[4],11,1272893353),s=Ki(s,i,r,a,t[7],16,-155497632),a=Ki(a,s,i,r,t[10],23,-1094730640),r=Ki(r,a,s,i,t[13],4,681279174),i=Ki(i,r,a,s,t[0],11,-358537222),s=Ki(s,i,r,a,t[3],16,-722521979),a=Ki(a,s,i,r,t[6],23,76029189),r=Ki(r,a,s,i,t[9],4,-640364487),i=Ki(i,r,a,s,t[12],11,-421815835),s=Ki(s,i,r,a,t[15],16,530742520),r=Gi(r,a=Ki(a,s,i,r,t[2],23,-995338651),s,i,t[0],6,-198630844),i=Gi(i,r,a,s,t[7],10,1126891415),s=Gi(s,i,r,a,t[14],15,-1416354905),a=Gi(a,s,i,r,t[5],21,-57434055),r
vendor: 8,482 bytes, lines 1004-1021
1004=Gi(r,a,s,i,t[12],6,1700485571),i=Gi(i,r,a,s,t[3],10,-1894986606),s=Gi(s,i,r,a,t[10],15,-1051523),a=Gi(a,s,i,r,t[1],21,-2054922799),r=Gi(r,a,s,i,t[8],6,1873313359),i=Gi(i,r,a,s,t[15],10,-30611744),s=Gi(s,i,r,a,t[6],15,-1560198380),a=Gi(a,s,i,r,t[13],21,1309151649),r=Gi(r,a,s,i,t[4],6,-145523070),i=Gi(i,r,a,s,t[11],10,-1120210379),s=Gi(s,i,r,a,t[2],15,718787259),a=Gi(a,s,i,r,t[9],21,-343485551),e[0]=nf(r,e[0]),e[1]=nf(a,e[1]),e[2]=nf(s,e[2]),e[3]=nf(i,e[3])}function l2(e,t,r,a,s,i){return t=nf(nf(t,e),nf(a,i)),nf(t<<s|t>>>32-s,r)}function Hi(e,t,r,a,s,i,o){return l2(t&r|~t&a,e,t,s,i,o)}function Wi(e,t,r,a,s,i,o){return l2(t&a|r&~a,e,t,s,i,o)}function Ki(e,t,r,a,s,i,o){return l2(t^r^a,e,t,s,i,o)}function Gi(e,t,r,a,s,i,o){return l2(r^(t|~a),e,t,s,i,o)}function hY(e){var t,r=e.length,a=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)G4(a,n3e(e.substring(t-64,t)));e=e.substring(t-64);var s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)s[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(s[t>>2]|=128<<(t%4<<3),t>55)for(G4(a,s),t=0;t<16;t++)s[t]=0;return s[14]=8*r,G4(a,s),a}function n3e(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}Uy=En.atob.bind(En),Qk=En.btoa.bind(En);var x9="0123456789abcdef".split("");function r3e(e){for(var t="",r=0;r<4;r++)t+=x9[e>>8*r+4&15]+x9[e>>8*r&15];return t}function a3e(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function Xk(e){return hY(e).map(a3e).join("")}var s3e=(function(e){for(var t=0;t<e.length;t++)e[t]=r3e(e[t]);return e.join("")})(hY("hello"))!="5d41402abc4b2a76b9719d911017c592";function nf(e,t){if(s3e){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}return e+t&4294967295}/**
1005 * @license
1006 * FPDF is released under a permissive license: there is no usage restriction.
1007 * You may embed it freely in your application (commercial or not), with or
1008 * without modifications.
1009 *
1010 * Reference: http://www.fpdf.org/en/script/script37.php
1011 */function Jk(e,t){var r,a,s,i;if(e!==r){for(var o=(s=e,i=1+(256/e.length>>0),new Array(i+1).join(s)),l=[],c=0;c<256;c++)l[c]=c;var d=0;for(c=0;c<256;c++){var h=l[c];d=(d+h+o.charCodeAt(c))%256,l[c]=l[d],l[d]=h}r=e,a=l}else l=a;var u=t.length,f=0,m=0,b="";for(c=0;c<u;c++)m=(m+(h=l[f=(f+1)%256]))%256,l[f]=l[m],l[m]=h,o=l[(l[f]+l[m])%256],b+=String.fromCharCode(t.charCodeAt(c)^o);return b}/**
1012 * @license
1013 * Licensed under the MIT License.
1014 * http://opensource.org/licenses/mit-license
1015 * Author: Owen Leong (@owenl131)
1016 * Date: 15 Oct 2020
1017 * References:
1018 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
1019 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
1020 * http://www.fpdf.org/en/script/script37.php
1021 */var y9={print:4,modify:8,copy:16,"annot-forms":32};function Hp(e,t,r,a){this.v=1,this.r=2;var s=192;e.forEach((function(l){if(y9.perm!==void 0)throw new Error("Invalid permission: "+l);s+=y9[l]})),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var i=(t+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,o),this.P=-(1+(255^s)),this.encryptionKey=Xk(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(a)).substr(0,5),this.U=Jk(this.encryptionKey,this.padding)}function Wp(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",r=e.length,a=0;a<r;a++){var s=e.charCodeAt(a);s<33||s===35||s===37||s===40||s===41||s===47||s===60||s===62||s===91||s===93||s===123||s===125||s>126?t+="#"+("0"+s.toString(16)).slice(-2):t+=e[a]}return t}function v9(e){if(Gr(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(r,a,s){if(s=s||!1,typeof r!="string"||typeof a!="function"||typeof s!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(r)||(t[r]={});var i=Math.random().toString(35);return t[r][i]=[a,!!s],i},this.unsubscribe=function(r){for(var a in t)if(t[a][r])return delete t[a][r],Object.keys(t[a]).length===0&&delete t[a],!0;return!1},this.publish=function(r){if(t.hasOwnProperty(r)){var a=Array.prototype.slice.call(arguments,1),s=[];for(var i in t[r]){var o=t[r][i];try{o[0].apply(e,a)}catch(l){En.console&&oa.error("jsPDF PubSub Error",l.message,l)}o[1]&&s.push(i)}s.length&&s.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function zw(e){if(!(this instanceof zw))return new zw(e);var t="opacity,stroke-opacity".split(",");for(var r in e)e.hasOwnProperty(r)&&t.indexOf(r)>=0&&(this[r]=e[r]);this.id="",this.objectNumber=-1}function fY(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function em(e,t,r,a,s){if(!(this instanceof em))return new em(e,t,r,a,s);this.type=e==="axial"?2:3,this.coords=t,this.colors=r,fY.call(this,a,s)}function tg(e,t,r,a,s){if(!(this instanceof tg))return new tg(e,t,r,a,s);this.boundingBox=e,this.xStep=t,this.yStep=r,this.stream="",this.cloneIndex=0,fY.call(this,a,s)}function An(e){var t,r=typeof arguments[0]=="string"?arguments[0]:"p",a=arguments[1],s=arguments[2],i=arguments[3],o=[],l=1,c=16,d="S",h=null;Gr(e=e||{})==="object"&&(r=e.orientation,a=e.unit||a,s=e.format||s,i=e.compress||e.compressPdf||i,(h=e.encryption||null)!==null&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),l=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(c=e.floatPrecision),d=e.defaultPathOperation||"S"),o=e.filters||(i===!0?["FlateEncode"]:o),a=a||"mm",r=(""+(r||"P")).toLowerCase();var u=e.putOnlyUsedFonts||!1,f={},m={internal:{},__private__:{}};m.__private__.PubSub=v9;var b="1.3",g=m.__private__.getPdfVersion=function(){return b};m.__private__.setPdfVersion=function(z){b=z};var y={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 y};var x=m.__private__.getPageFormat=function(z){return y[z]};s=s||"a4";var w={COMPAT:"compat",ADVANCED:"advanced"},j=w.COMPAT;function N(){this.saveGraphicsState(),ue(new Dt(_t,0,0,-_t,0,Ro()*_t).toString()+" cm"),this.setFontSize(this.getFontSize()/_t),d="n",j=w.ADVANCED}function _(){this.restoreGraphicsState(),d="S",j=w.COMPAT}var S=m.__private__.combineFontStyleAndFontWeight=function(z,ie){if(z=="bold"&&ie=="normal"||z=="bold"&&ie==400||z=="normal"&&ie=="italic"||z=="bold"&&ie=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return ie&&(z=ie==400||ie==="normal"?z==="italic"?"italic":"normal":ie!=700&&ie!=="bold"||z!=="normal"?(ie==700?"bold":ie)+""+z:"bold"),z};m.advancedAPI=function(z){var ie=j===w.COMPAT;return ie&&N.call(this),typeof z!="function"||(z(this),ie&&_.call(this)),this},m.compatAPI=function(z){var ie=j===w.ADVANCED;return ie&&_.call(this),typeof z!="function"||(z(this),ie&&N.call(this)),this},m.isAdvancedAPI=function(){return j===w.ADVANCED};var A,T=function(z){if(j!==w.ADVANCED)throw new Error(z+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},R=m.roundToPrecision=m.__private__.roundToPrecision=function(z,ie){var Ee=t||ie;if(isNaN(z)||isNaN(Ee))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return z.toFixed(Ee).replace(/0+$/,"")};A=m.hpf=m.__private__.hpf=typeof c=="number"?function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.hpf");return R(z,c)}:c==="smart"?function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.hpf");return R(z,z>-1&&z<1?16:5)}:function(z){if(isNaN(z))throw new Error("Invalid argument passed to 
1021jsPDF.hpf");return R(z,16)};var M=m.f2=m.__private__.f2=function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.f2");return R(z,2)},k=m.__private__.f3=function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.f3");return R(z,3)},P=m.scale=m.__private__.scale=function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.scale");return j===w.COMPAT?z*_t:j===w.ADVANCED?z:void 0},O=function(z){return j===w.COMPAT?Ro()-z:j===w.ADVANCED?z:void 0},F=function(z){return P(O(z))};m.__private__.setPrecision=m.setPrecision=function(z){typeof parseInt(z,10)=="number"&&(t=parseInt(z,10))};var $,G="00000000000000000000000000000000",B=m.__private__.getFileId=function(){return G},Y=m.__private__.setFileId=function(z){return G=z!==void 0&&/^[a-fA-F0-9]{32}$/.test(z)?z.toUpperCase():G.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),h!==null&&(Ir=new Hp(h.userPermissions,h.userPassword,h.ownerPassword,G)),G};m.setFileId=function(z){return Y(z),this},m.getFileId=function(){return B()};var ee=m.__private__.convertDateToPDFDate=function(z){var ie=z.getTimezoneOffset(),Ee=ie<0?"+":"-",Re=Math.floor(Math.abs(ie/60)),Qe=Math.abs(ie%60),ot=[Ee,te(Re),"'",te(Qe),"'"].join("");return["D:",z.getFullYear(),te(z.getMonth()+1),te(z.getDate()),te(z.getHours()),te(z.getMinutes()),te(z.getSeconds()),ot].join("")},J=m.__private__.convertPDFDateToDate=function(z){var ie=parseInt(z.substr(2,4),10),Ee=parseInt(z.substr(6,2),10)-1,Re=parseInt(z.substr(8,2),10),Qe=parseInt(z.substr(10,2),10),ot=parseInt(z.substr(12,2),10),vt=parseInt(z.substr(14,2),10);return new Date(ie,Ee,Re,Qe,ot,vt,0)},H=m.__private__.setCreationDate=function(z){var ie;if(z===void 0&&(z=new Date),z instanceof Date)ie=ee(z);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(z))throw new Error("Invalid argument passed to jsPDF.setCreationDate");ie=z}return $=ie},q=m.__private__.getCreationDate=function(z){var ie=$;return z==="jsDate"&&(ie=J($)),ie};m.setCreationDate=function(z){return H(z),this},m.getCreationDate=function(z){return q(z)};var K,te=m.__private__.padd2=function(z){return("0"+parseInt(z)).slice(-2)},re=m.__private__.padd2Hex=function(z){return("00"+(z=z.toString())).substr(z.length)},Q=0,ne=[],oe=[],ae=0,le=[],je=[],xe=!1,Fe=oe,he=function(){Q=0,ae=0,oe=[],ne=[],le=[],hi=Yn(),ra=Yn()};m.__private__.setCustomOutputDestination=function(z){xe=!0,Fe=z};var Ne=function(z){xe||(Fe=z)};m.__private__.resetCustomOutputDestination=function(){xe=!1,Fe=oe};var ue=m.__private__.out=function(z){return z=z.toString(),ae+=z.length+1,Fe.push(z),Fe},rt=m.__private__.write=function(z){return ue(arguments.length===1?z.toString():Array.prototype.join.call(arguments," "))},Te=m.__private__.getArrayBuffer=function(z){for(var ie=z.length,Ee=new ArrayBuffer(ie),Re=new Uint8Array(Ee);ie--;)Re[ie]=z.charCodeAt(ie);return Ee},Pe=[["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 Pe};var $e=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(z){return $e=j===w.ADVANCED?z/_t:z,this};var Ve,be=m.__private__.getFontSize=m.getFontSize=function(){return j===w.COMPAT?$e:$e*_t},We=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(z){return We=z,this},m.__private__.getR2L=m.getR2L=function(){return We};var Ze,st=m.__private__.setZoomMode=function(z){var ie=[void 0,null,"fullwidth","fullheight","fullpage","original"];
vendor: 13,803 bytes, lines 1021-1025
1021if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(z))Ve=z;else if(isNaN(z)){if(ie.indexOf(z)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+z+'" is not recognized.');Ve=z}else Ve=parseInt(z,10)};m.__private__.getZoomMode=function(){return Ve};var Mt,Ht=m.__private__.setPageMode=function(z){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(z)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+z+'" is not recognized.');Ze=z};m.__private__.getPageMode=function(){return Ze};var Yt=m.__private__.setLayoutMode=function(z){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(z)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+z+'" is not recognized.');Mt=z};m.__private__.getLayoutMode=function(){return Mt},m.__private__.setDisplayMode=m.setDisplayMode=function(z,ie,Ee){return st(z),Yt(ie),Ht(Ee),this};var on={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(z){if(Object.keys(on).indexOf(z)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return on[z]},m.__private__.getDocumentProperties=function(){return on},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(z){for(var ie in on)on.hasOwnProperty(ie)&&z[ie]&&(on[ie]=z[ie]);return this},m.__private__.setDocumentProperty=function(z,ie){if(Object.keys(on).indexOf(z)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return on[z]=ie};var It,_t,xr,xn,Rr,Wn={},lr={},Ha=[],Rn={},ta={},fr={},na={},Ea=null,Kn=0,St=[],hn=new v9(m),yr=e.hotfixes||[],Gn={},da={},cr=[],Dt=function z(ie,Ee,Re,Qe,ot,vt){if(!(this instanceof z))return new z(ie,Ee,Re,Qe,ot,vt);isNaN(ie)&&(ie=1),isNaN(Ee)&&(Ee=0),isNaN(Re)&&(Re=0),isNaN(Qe)&&(Qe=1),isNaN(ot)&&(ot=0),isNaN(vt)&&(vt=0),this._matrix=[ie,Ee,Re,Qe,ot,vt]};Object.defineProperty(Dt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(z){this._matrix[0]=z}}),Object.defineProperty(Dt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(z){this._matrix[1]=z}}),Object.defineProperty(Dt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(z){this._matrix[2]=z}}),Object.defineProperty(Dt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(z){this._matrix[3]=z}}),Object.defineProperty(Dt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(z){this._matrix[4]=z}}),Object.defineProperty(Dt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(z){this._matrix[5]=z}}),Object.defineProperty(Dt.prototype,"a",{get:function(){return this._matrix[0]},set:function(z){this._matrix[0]=z}}),Object.defineProperty(Dt.prototype,"b",{get:function(){return this._matrix[1]},set:function(z){this._matrix[1]=z}}),Object.defineProperty(Dt.prototype,"c",{get:function(){return this._matrix[2]},set:function(z){this._matrix[2]=z}}),Object.defineProperty(Dt.prototype,"d",{get:function(){return this._matrix[3]},set:function(z){this._matrix[3]=z}}),Object.defineProperty(Dt.prototype,"e",{get:function(){return this._matrix[4]},set:function(z){this._matrix[4]=z}}),Object.defineProperty(Dt.prototype,"f",{get:function(){return this._matrix[5]},set:function(z){this._matrix[5]=z}}),Object.defineProperty(Dt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Dt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Dt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Dt.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Dt.prototype.join=function(z){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(A).join(z)},Dt.prototype.multiply=function(z){var ie=z.sx*this.sx+z.shy*this.shx,Ee=z.sx*this.shy+z.shy*this.sy,Re=z.shx*this.sx+z.sy*this.shx,Qe=z.shx*this.shy+z.sy*this.sy,ot=z.tx*this.sx+z.ty*this.shx+this.tx,vt=z.tx*this.shy+z.ty*this.sy+this.ty;return new Dt(ie,Ee,Re,Qe,ot,vt)},Dt.prototype.decompose=function(){var z=this.sx,ie=this.shy,Ee=this.shx,Re=this.sy,Qe=this.tx,ot=this.ty,vt=Math.sqrt(z*z+ie*ie),qt=(z/=vt)*Ee+(ie/=vt)*Re;Ee-=z*qt,Re-=ie*qt;var un=Math.sqrt(Ee*Ee+Re*Re);return qt/=un,z*(Re/=un)<ie*(Ee/=un)&&(z=-z,ie=-ie,qt=-qt,vt=-vt),{scale:new Dt(vt,0,0,un,0,0),translate:new Dt(1,0,0,1,Qe,ot),rotate:new Dt(z,ie,-ie,z,0,0),skew:new Dt(1,0,qt,1,0,0)}},Dt.prototype.toString=function(z){return this.join(" ")},Dt.prototype.inversed=function(){var z=this.sx,ie=this.shy,Ee=this.shx,Re=this.sy,Qe=this.tx,ot=this.ty,vt=1/(z*Re-ie*Ee),qt=Re*vt,un=-ie*vt,On=-Ee*vt,gn=z*vt;return new Dt(qt,un,On,gn,-qt*Qe-On*ot,-un*Qe-gn*ot)},Dt.prototype.applyToPoint=function(z){var ie=z.x*this.sx+z.y*this.shx+this.tx,Ee=z.x*this.shy+z.y*this.sy+this.ty;return new Mo(ie,Ee)},Dt.prototype.applyToRectangle=function(z){var ie=this.applyToPoint(z),Ee=this.applyToPoint(new Mo(z.x+z.w,z.y+z.h));return new Lo(ie.x,ie.y,Ee.x-ie.x,Ee.y-ie.y)},Dt.prototype.clone=function(){var z=this.sx,ie=this.shy,Ee=this.shx,Re=this.sy,Qe=this.tx,ot=this.ty;return new Dt(z,ie,Ee,Re,Qe,ot)},m.Matrix=Dt;var va=m.matrixMult=function(z,ie){return ie.multiply(z)},ar=new Dt(1,0,0,1,0,0);m.unitMatrix=m.identityMatrix=ar;var dr=function(z,ie){if(!ta[z]){var Ee=(ie instanceof em?"Sh":"P")+(Object.keys(Rn).length+1).toString(10);ie.id=Ee,ta[z]=Ee,Rn[Ee]=ie,hn.publish("addPattern",ie)}};m.ShadingPattern=em,m.TilingPattern=tg,m.addShadingPattern=function(z,ie){return T("addShadingPattern()"),dr(z,ie),this},m.beginTilingPattern=function(z){T("beginTilingPattern()"),yd(z.boundingBox[0],z.boundingBox[1],z.boundingBox[2]-z.boundingBox[0],z.boundingBox[3]-z.boundingBox[1],z.matrix)},m.endTilingPattern=function(z,ie){T("endTilingPattern()"),ie.stream=je[K].join(`
1022`),dr(z,ie),hn.publish("endTilingPattern",ie),cr.pop().restore()};var jr=m.__private__.newObject=function(){var z=Yn();return Ta(z,!0),z},Yn=m.__private__.newObjectDeferred=function(){return Q++,ne[Q]=function(){return ae},Q},Ta=function(z,ie){return ie=typeof ie=="boolean"&&ie,ne[z]=ae,ie&&ue(z+" 0 obj"),z},ro=m.__private__.newAdditionalObject=function(){var z={objId:Yn(),content:""};return le.push(z),z},hi=Yn(),ra=Yn(),ks=m.__private__.decodeColorString=function(z){var ie=z.split(" ");if(ie.length!==2||ie[1]!=="g"&&ie[1]!=="G")ie.length===5&&(ie[4]==="k"||ie[4]==="K")&&(ie=[(1-ie[0])*(1-ie[3]),(1-ie[1])*(1-ie[3]),(1-ie[2])*(1-ie[3]),"r"]);else{var Ee=parseFloat(ie[0]);ie=[Ee,Ee,Ee,"r"]}for(var Re="#",Qe=0;Qe<3;Qe++)Re+=("0"+Math.floor(255*parseFloat(ie[Qe])).toString(16)).slice(-2);return Re},ua=m.__private__.encodeColorString=function(z){var ie;typeof z=="string"&&(z={ch1:z});var Ee=z.ch1,Re=z.ch2,Qe=z.ch3,ot=z.ch4,vt=z.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Ee=="string"&&Ee.charAt(0)!=="#"){var qt=new uY(Ee);if(qt.ok)Ee=qt.toHex();else if(!/^\d*\.?\d*$/.test(Ee))throw new Error('Invalid color "'+Ee+'" passed to jsPDF.encodeColorString.')}if(typeof Ee=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Ee)&&(Ee="#"+Ee[1]+Ee[1]+Ee[2]+Ee[2]+Ee[3]+Ee[3]),typeof Ee=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Ee)){var un=parseInt(Ee.substr(1),16);Ee=un>>16&255,Re=un>>8&255,Qe=255&un}if(Re===void 0||ot===void 0&&Ee===Re&&Re===Qe)if(typeof Ee=="string")ie=Ee+" "+vt[0];else switch(z.precision){case 2:ie=M(Ee/255)+" "+vt[0];break;case 3:default:ie=k(Ee/255)+" "+vt[0]}else if(ot===void 0||Gr(ot)==="object"){if(ot&&!isNaN(ot.a)&&ot.a===0)return ie=["1.","1.","1.",vt[1]].join(" ");if(typeof Ee=="string")ie=[Ee,Re,Qe,vt[1]].join(" ");else switch(z.precision){case 2:ie=[M(Ee/255),M(Re/255),M(Qe/255),vt[1]].join(" ");break;default:case 3:ie=[k(Ee/255),k(Re/255),k(Qe/255),vt[1]].join(" ")}}else if(typeof Ee=="string")ie=[Ee,Re,Qe,ot,vt[2]].join(" ");else switch(z.precision){case 2:ie=[M(Ee),M(Re),M(Qe),M(ot),vt[2]].join(" ");break;case 3:default:ie=[k(Ee),k(Re),k(Qe),k(ot),vt[2]].join(" ")}return ie},Ps=m.__private__.getFilters=function(){return o},xs=m.__private__.putStream=function(z){var ie=(z=z||{}).data||"",Ee=z.filters||Ps(),Re=z.alreadyAppliedFilters||[],Qe=z.addLength1||!1,ot=ie.length,vt=z.objectId,qt=function(rs){return rs};if(h!==null&&vt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");h!==null&&(qt=Ir.encryptor(vt,0));var un={};Ee===!0&&(Ee=["FlateEncode"]);var On=z.additionalKeyValues||[],gn=(un=An.API.processDataByFilters!==void 0?An.API.processDataByFilters(ie,Ee):{data:ie,reverseChain:[]}).reverseChain+(Array.isArray(Re)?Re.join(" "):Re.toString());if(un.data.length!==0&&(On.push({key:"Length",value:un.data.length}),Qe===!0&&On.push({key:"Length1",value:ot})),gn.length!=0)if(gn.split("/").length-1==1)On.push({key:"Filter",value:gn});else{On.push({key:"Filter",value:"["+gn+"]"});for(var Jn=0;Jn<On.length;Jn+=1)if(On[Jn].key==="DecodeParms"){for(var sa=[],ha=0;ha<un.reverseChain.split("/").length-1;ha+=1)sa.push("null");sa.push(On[Jn].value),On[Jn].value="["+sa.join(" ")+"]"}}ue("<<");for(var Ma=0;Ma<On.length;Ma++)ue("/"+On[Ma].key+" "+On[Ma].value);ue(">>"),un.data.length!==0&&(ue("stream"),ue(qt(un.data)),ue("endstream"))},Ye=m.__private__.putPage=function(z){var ie=z.number,Ee=z.data,Re=z.objId,Qe=z.contentsObjId;Ta(Re,!0),ue("<</Type /Page"),ue("/Parent "+z.rootDictionaryObjId+" 0 R"),ue("/Resources "+z.resourceDictionaryObjId+" 0 R"),ue("/MediaBox ["+parseFloat(A(z.mediaBox.bottomLeftX))+" "+parseFloat(A(z.mediaBox.bottomLeftY))+" "+A(z.mediaBox.topRightX)+" "+A(z.mediaBox.topRightY)+"]"),z.cropBox!==null&&ue("/CropBox ["+A(z.cropBox.bottomLeftX)+" "+A(z.cropBox.bottomLeftY)+" "+A(z.cropBox.topRightX)+" "+A(z.cropBox.topRightY)+"]"),z.bleedBox!==null&&ue("/BleedBox ["+A(z.bleedBox.bottomLeftX)+" "+A(z.bleedBox.bottomLeftY)+" "+A(z.bleedBox.topRightX)+" "+A(z.bleedBox.topRightY)+"]"),z.trimBox!==null&&ue("/TrimBox ["+A(z.trimBox.bottomLeftX)+" "+A(z.trimBox.bottomLeftY)+" "+A(z.trimBox.topRightX)+" "+A(z.trimBox.topRightY)+"]"),z.artBox!==null&&ue("/ArtBox ["+A(z.artBox.bottomLeftX)+" "+A(z.artBox.bottomLeftY)+" "+A(z.artBox.topRightX)+" "+A(z.artBox.topRightY)+"]"),typeof z.userUnit=="number"&&z.userUnit!==1&&ue("/UserUnit "+z.userUnit),hn.publish("putPage",{objId:Re,pageContext:St[ie],pageNumber:ie,page:Ee}),ue("/Contents "+Qe+" 0 R"),ue(">>"),ue("endobj");var ot=Ee.join(`
1023`);return j===w.ADVANCED&&(ot+=`
1024Q`),Ta(Qe,!0),xs({data:ot,filters:Ps(),objectId:Qe}),ue("endobj"),Re},nt=m.__private__.putPages=function(){var z,ie,Ee=[];for(z=1;z<=Kn;z++)St[z].objId=Yn(),St[z].contentsObjId=Yn();for(z=1;z<=Kn;z++)Ee.push(Ye({number:z,data:je[z],objId:St[z].objId,contentsObjId:St[z].contentsObjId,mediaBox:St[z].mediaBox,cropBox:St[z].cropBox,bleedBox:St[z].bleedBox,trimBox:St[z].trimBox,artBox:St[z].artBox,userUnit:St[z].userUnit,rootDictionaryObjId:hi,resourceDictionaryObjId:ra}));Ta(hi,!0),ue("<</Type /Pages");var Re="/Kids [";for(ie=0;ie<Kn;ie++)Re+=Ee[ie]+" 0 R ";ue(Re+"]"),ue("/Count "+Kn),ue(">>"),ue("endobj"),hn.publish("postPutPages")},Vr=function(z){hn.publish("putFont",{font:z,out:ue,newObject:jr,putStream:xs}),z.isAlreadyPutted!==!0&&(z.objectNumber=jr(),ue("<<"),ue("/Type /Font"),ue("/BaseFont /"+Wp(z.postScriptName)),ue("/Subtype /Type1"),typeof z.encoding=="string"&&ue("/Encoding /"+z.encoding),ue("/FirstChar 32"),ue("/LastChar 255"),ue(">>"),ue("endobj"))},aa=function(){for(var z in Wn)Wn.hasOwnProperty(z)&&(u===!1||u===!0&&f.hasOwnProperty(z))&&Vr(Wn[z])},Da=function(z){z.objectNumber=jr();var ie=[];ie.push({key:"Type",value:"/XObject"}),ie.push({key:"Subtype",value:"/Form"}),ie.push({key:"BBox",value:"["+[A(z.x),A(z.y),A(z.x+z.width),A(z.y+z.height)].join(" ")+"]"}),ie.push({key:"Matrix",value:"["+z.matrix.toString()+"]"});var Ee=z.pages[1].join(`
1025`);xs({data:Ee,additionalKeyValues:ie,objectId:z.objectNumber}),ue("endobj")},ur=function(){for(var z in Gn)Gn.hasOwnProperty(z)&&Da(Gn[z])},fi=function(z,ie){var Ee,Re=[],Qe=1/(ie-1);for(Ee=0;Ee<1;Ee+=Qe)Re.push(Ee);if(Re.push(1),z[0].offset!=0){var ot={offset:0,color:z[0].color};z.unshift(ot)}if(z[z.length-1].offset!=1){var vt={offset:1,color:z[z.length-1].color};z.push(vt)}for(var qt="",un=0,On=0;On<Re.length;On++){for(Ee=Re[On];Ee>z[un+1].offset;)un++;var gn=z[un].offset,Jn=(Ee-gn)/(z[un+1].offset-gn),sa=z[un].color,ha=z[un+1].color;qt+=re(Math.round((1-Jn)*sa[0]+Jn*ha[0]).toString(16))+re(Math.round((1-Jn)*sa[1]+Jn*ha[1]).toString(16))+re(Math.round((1-Jn)*sa[2]+Jn*ha[2]).toString(16))}return qt.trim()},$n=function(z,ie){ie||(ie=21);var Ee=jr(),Re=fi(z.colors,ie),Qe=[];Qe.push({key:"FunctionType",value:"0"}),Qe.push({key:"Domain",value:"[0.0 1.0]"}),Qe.push({key:"Size",value:"["+ie+"]"}),Qe.push({key:"BitsPerSample",value:"8"}),Qe.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Qe.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xs({data:Re,additionalKeyValues:Qe,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Ee}),ue("endobj"),z.objectNumber=jr(),ue("<< /ShadingType "+z.type),ue("/ColorSpace /DeviceRGB");var ot="/Coords ["+A(parseFloat(z.coords[0]))+" "+A(parseFloat(z.coords[1]))+" ";z.type===2?ot+=A(parseFloat(z.coords[2]))+" "+A(parseFloat(z.coords[3])):ot+=A(parseFloat(z.coords[2]))+" "+A(parseFloat(z.coords[3]))+" "+A(parseFloat(z.coords[4]))+" "+A(parseFloat(z.coords[5])),ue(ot+="]"),z.matrix&&ue("/Matrix ["+z.matrix.toString()+"]"),ue("/Function "+Ee+" 0 R"),ue("/Extend [true true]"),ue(">>"),ue("endobj")},Ue=function(z,ie){var Ee=Yn(),Re=jr();ie.push({resourcesOid:Ee,objectOid:Re}),z.objectNumber=Re;var Qe=[];Qe.push({key:"Type",value:"/Pattern"}),Qe.push({key:"PatternType",value:"1"}),Qe.push({key:"PaintType",value:"1"}),Qe.push({key:"TilingType",value:"1"}
vendor: 5,231 bytes, lines 1025-1026
1025),Qe.push({key:"BBox",value:"["+z.boundingBox.map(A).join(" ")+"]"}),Qe.push({key:"XStep",value:A(z.xStep)}),Qe.push({key:"YStep",value:A(z.yStep)}),Qe.push({key:"Resources",value:Ee+" 0 R"}),z.matrix&&Qe.push({key:"Matrix",value:"["+z.matrix.toString()+"]"}),xs({data:z.stream,additionalKeyValues:Qe,objectId:z.objectNumber}),ue("endobj")},Wt=function(z){var ie;for(ie in Rn)Rn.hasOwnProperty(ie)&&(Rn[ie]instanceof em?$n(Rn[ie]):Rn[ie]instanceof tg&&Ue(Rn[ie],z))},ys=function(z){for(var ie in z.objectNumber=jr(),ue("<<"),z)switch(ie){case"opacity":ue("/ca "+M(z[ie]));break;case"stroke-opacity":ue("/CA "+M(z[ie]))}ue(">>"),ue("endobj")},Fa=function(){var z;for(z in fr)fr.hasOwnProperty(z)&&ys(fr[z])},mi=function(){for(var z in ue("/XObject <<"),Gn)Gn.hasOwnProperty(z)&&Gn[z].objectNumber>=0&&ue("/"+z+" "+Gn[z].objectNumber+" 0 R");hn.publish("putXobjectDict"),ue(">>")},Il=function(){Ir.oid=jr(),ue("<<"),ue("/Filter /Standard"),ue("/V "+Ir.v),ue("/R "+Ir.r),ue("/U <"+Ir.toHexString(Ir.U)+">"),ue("/O <"+Ir.toHexString(Ir.O)+">"),ue("/P "+Ir.P),ue(">>"),ue("endobj")},ao=function(){for(var z in ue("/Font <<"),Wn)Wn.hasOwnProperty(z)&&(u===!1||u===!0&&f.hasOwnProperty(z))&&ue("/"+z+" "+Wn[z].objectNumber+" 0 R");ue(">>")},vs=function(){if(Object.keys(Rn).length>0){for(var z in ue("/Shading <<"),Rn)Rn.hasOwnProperty(z)&&Rn[z]instanceof em&&Rn[z].objectNumber>=0&&ue("/"+z+" "+Rn[z].objectNumber+" 0 R");hn.publish("putShadingPatternDict"),ue(">>")}},ol=function(z){if(Object.keys(Rn).length>0){for(var ie in ue("/Pattern <<"),Rn)Rn.hasOwnProperty(ie)&&Rn[ie]instanceof m.TilingPattern&&Rn[ie].objectNumber>=0&&Rn[ie].objectNumber<z&&ue("/"+ie+" "+Rn[ie].objectNumber+" 0 R");hn.publish("putTilingPatternDict"),ue(">>")}},es=function(){if(Object.keys(fr).length>0){var z;for(z in ue("/ExtGState <<"),fr)fr.hasOwnProperty(z)&&fr[z].objectNumber>=0&&ue("/"+z+" "+fr[z].objectNumber+" 0 R");hn.publish("putGStateDict"),ue(">>")}},Qn=function(z){Ta(z.resourcesOid,!0),ue("<<"),ue("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ao(),vs(),ol(z.objectOid),es(),mi(),ue(">>"),ue("endobj")},Yr=function(){var z=[];aa(),Fa(),ur(),Wt(z),hn.publish("putResources"),z.forEach(Qn),Qn({resourcesOid:ra,objectOid:Number.MAX_SAFE_INTEGER}),hn.publish("postPutResources")},So=function(){hn.publish("putAdditionalObjects");for(var z=0;z<le.length;z++){var ie=le[z];Ta(ie.objId,!0),ue(ie.content),ue("endobj")}hn.publish("postPutAdditionalObjects")},Co=function(z){lr[z.fontName]=lr[z.fontName]||{},lr[z.fontName][z.fontStyle]=z.id},Ao=function(z,ie,Ee,Re,Qe){var ot={id:"F"+(Object.keys(Wn).length+1).toString(10),postScriptName:z,fontName:ie,fontStyle:Ee,encoding:Re,isStandardFont:Qe||!1,metadata:{}};return hn.publish("addFont",{font:ot,instance:this}),Wn[ot.id]=ot,Co(ot),ot.id},ko=function(z){for(var ie=0,Ee=Pe.length;ie<Ee;ie++){var Re=Ao.call(this,z[ie][0],z[ie][1],z[ie][2],Pe[ie][3],!0);u===!1&&(f[Re]=!0);var Qe=z[ie][0].split("-");Co({id:Re,fontName:Qe[0],fontStyle:Qe[1]||""})}hn.publish("addFonts",{fonts:Wn,dictionary:lr})},bs=function(z){return z.foo=function(){try{return z.apply(this,arguments)}catch(Re){var ie=Re.stack||"";~ie.indexOf(" at ")&&(ie=ie.split(" at ")[1]);var Ee="Error in function "+ie.split(`
1026`)[0].split("<")[0]+": "+Re.message;if(!En.console)throw new Error(Ee);En.console.error(Ee,Re),En.alert&&alert(Ee)}},z.foo.bar=z,z.foo},Po=function(z,ie){var Ee,Re,Qe,ot,vt,qt,un,On,gn;if(Qe=(ie=ie||{}).sourceEncoding||"Unicode",vt=ie.outputEncoding,(ie.autoencode||vt)&&Wn[It].metadata&&Wn[It].metadata[Qe]&&Wn[It].metadata[Qe].encoding&&(ot=Wn[It].metadata[Qe].encoding,!vt&&Wn[It].encoding&&(vt=Wn[It].encoding),!vt&&ot.codePages&&(vt=ot.codePages[0]),typeof vt=="string"&&(vt=ot[vt]),vt)){for(un=!1,qt=[],Ee=0,Re=z.length;Ee<Re;Ee++)(On=vt[z.charCodeAt(Ee)])?qt.push(String.fromCharCode(On)):qt.push(z[Ee]),qt[Ee].charCodeAt(0)>>8&&(un=!0);z=qt.join("")}for(Ee=z.length;un===void 0&&Ee!==0;)z.charCodeAt(Ee-1)>>8&&(un=!0),Ee--;if(!un)return z;for(qt=ie.noBOM?[]:[254,255],Ee=0,Re=z.length;Ee<Re;Ee++){if((gn=(On=z.charCodeAt(Ee))>>8)>>8)throw new Error("Character at position "+Ee+" of string '"+z+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");qt.push(gn),qt.push(On-(gn<<8))}return String.fromCharCode.apply(void 0,qt)},Ks=m.__private__.pdfEscape=m.pdfEscape=function(z,ie){return Po(z,ie).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Dl=m.__private__.beginPage=function(z){je[++Kn]=[],St[Kn]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(z[0]),topRightY:Number(z[1])}},ql(Kn),Ne(je[K])},Fl=function(z,ie){var Ee,Re,Qe;switch(r=ie||r,typeof z=="string"&&(Ee=x(z.toLowerCase()),Array.isArray(Ee)&&(Re=Ee[0],Qe=Ee[1])),Array.isArray(z)&&(Re=z[0]*_t,Qe=z[1]*_t),isNaN(Re)&&(Re=s[0],Qe=s[1]),(Re>14400||Qe>14400)&&(oa.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),Re=Math.min(14400,Re),Qe=Math.min(14400,Qe)),s=[Re,Qe],r.substr(0,1)){case"l":Qe>Re&&(s=[Qe,Re]);break;case"p":Re>Qe&&(s=[Qe,Re])}Dl(s),Vl(ul),ue(Xs),Wl!==0&&ue(Wl+" J"),io!==0&&ue(io+" j"),hn.publish("addPage",{pageNumber:Kn})},uu=function(z){z>
vendor: 6,086 bytes, lines 1026-1027
10260&&z<=Kn&&(je.splice(z,1),St.splice(z,1),Kn--,K>Kn&&(K=Kn),this.setPage(K))},ql=function(z){z>0&&z<=Kn&&(K=z)},dh=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return je.length-1},pd=function(z,ie,Ee){var Re,Qe=void 0;return Ee=Ee||{},z=z!==void 0?z:Wn[It].fontName,ie=ie!==void 0?ie:Wn[It].fontStyle,Re=z.toLowerCase(),lr[Re]!==void 0&&lr[Re][ie]!==void 0?Qe=lr[Re][ie]:lr[z]!==void 0&&lr[z][ie]!==void 0?Qe=lr[z][ie]:Ee.disableWarning===!1&&oa.warn("Unable to look up font label for font '"+z+"', '"+ie+"'. Refer to getFontList() for available fonts."),Qe||Ee.noFallback||(Qe=lr.times[ie])==null&&(Qe=lr.times.normal),Qe},sr=m.__private__.putInfo=function(){var z=jr(),ie=function(Re){return Re};for(var Ee in h!==null&&(ie=Ir.encryptor(z,0)),ue("<<"),ue("/Producer ("+Ks(ie("jsPDF "+An.version))+")"),on)on.hasOwnProperty(Ee)&&on[Ee]&&ue("/"+Ee.substr(0,1).toUpperCase()+Ee.substr(1)+" ("+Ks(ie(on[Ee]))+")");ue("/CreationDate ("+Ks(ie($))+")"),ue(">>"),ue("endobj")},Bl=m.__private__.putCatalog=function(z){var ie=(z=z||{}).rootDictionaryObjId||hi;switch(jr(),ue("<<"),ue("/Type /Catalog"),ue("/Pages "+ie+" 0 R"),Ve||(Ve="fullwidth"),Ve){case"fullwidth":ue("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ue("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ue("/OpenAction [3 0 R /Fit]");break;case"original":ue("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Ee=""+Ve;Ee.substr(Ee.length-1)==="%"&&(Ve=parseInt(Ve)/100),typeof Ve=="number"&&ue("/OpenAction [3 0 R /XYZ null null "+M(Ve)+"]")}switch(Mt||(Mt="continuous"),Mt){case"continuous":ue("/PageLayout /OneColumn");break;case"single":ue("/PageLayout /SinglePage");break;case"two":case"twoleft":ue("/PageLayout /TwoColumnLeft");break;case"tworight":ue("/PageLayout /TwoColumnRight")}Ze&&ue("/PageMode /"+Ze),hn.publish("putCatalog"),ue(">>"),ue("endobj")},jc=m.__private__.putTrailer=function(){ue("trailer"),ue("<<"),ue("/Size "+(Q+1)),ue("/Root "+Q+" 0 R"),ue("/Info "+(Q-1)+" 0 R"),h!==null&&ue("/Encrypt "+Ir.oid+" 0 R"),ue("/ID [ <"+G+"> <"+G+"> ]"),ue(">>")},Nc=m.__private__.putHeader=function(){ue("%PDF-"+b),ue("%ºß¬à")},$l=m.__private__.putXRef=function(){var z="0000000000";ue("xref"),ue("0 "+(Q+1)),ue("0000000000 65535 f ");for(var ie=1;ie<=Q;ie++)typeof ne[ie]=="function"?ue((z+ne[ie]()).slice(-10)+" 00000 n "):ne[ie]!==void 0?ue((z+ne[ie]).slice(-10)+" 00000 n "):ue("0000000000 00000 n ")},Eo=m.__private__.buildDocument=function(){he(),Ne(oe),hn.publish("buildDocument"),Nc(),nt(),So(),Yr(),h!==null&&Il(),sr(),Bl();var z=ae;return $l(),jc(),ue("startxref"),ue(""+z),ue("%%EOF"),Ne(je[K]),oe.join(`
1027`)},Ul=m.__private__.getBlob=function(z){return new Blob([Te(z)],{type:"application/pdf"})},zl=m.output=m.__private__.output=bs((function(z,ie){switch(typeof(ie=ie||{})=="string"?ie={filename:ie}:ie.filename=ie.filename||"generated.pdf",z){case void 0:return Eo();case"save":m.save(ie.filename);break;case"arraybuffer":return Te(Eo());case"blob":return Ul(Eo());case"bloburi":case"bloburl":if(En.URL!==void 0&&typeof En.URL.createObjectURL=="function")return En.URL&&En.URL.createObjectURL(Ul(Eo()))||void 0;oa.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Ee="",Re=Eo();try{Ee=Qk(Re)}catch{Ee=Qk(unescape(encodeURIComponent(Re)))}return"data:application/pdf;filename="+ie.filename+";base64,"+Ee;case"pdfobjectnewwindow":if(Object.prototype.toString.call(En)==="[object Window]"){var Qe="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ot=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';ie.pdfObjectUrl&&(Qe=ie.pdfObjectUrl,ot="");var vt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+Qe+'"'+ot+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(ie)+");<\/script></body></html>",qt=En.open();return qt!==null&&qt.document.write(vt),qt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(En)==="[object Window]"){var un='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(ie.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+ie.filename+'" width="500px" height="400px" /></body></html>',On=En.open();if(On!==null){On.document.write(un);var gn=this;On.document.documentElement.querySelector("#pdfViewer").onload=function(){On.document.title=ie.filename,On.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(gn.output("bloburl"))}}return On}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 Jn='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",ie)+'"></iframe></body></html>',sa=En.open();if(sa!==null&&(sa.document.write(Jn),sa.document.title=ie.filename),sa||typeof safari>"u")return sa;break;case"datauri":case"dataurl":return En.document.location.href=this.output("datauristring",ie);default:return null}})),Mi=function(z){return Array.isArray(yr)===!0&&yr.indexOf(z)>-1};switch(a){case"pt":_t=1;break;case"mm":_t=72/25.4;break;case"cm":_t=72/2.54;break;case"in":_t=72;break;case"px":_t=Mi("px_scaling")==1?.75:96/72;break;case"pc":case"em":_t=12;break;case"ex":_t=6;break;default:if(typeof a!="number")throw new Error("Invalid unit: "+a);_t=a}var Ir=null;H(),Y();var Gs=function(z){return h!==null?Ir.encryptor(z,0):function(ie){return ie}},Ys=m.__private__.getPageInfo=m.getPageInfo=function(z){if(isNaN(z)||z%1!=0)throw new Error("Invalid argument passed to 
1027jsPDF.getPageInfo");return{objId:St[z].objId,pageNumber:z,pageContext:St[z]}},yn=m.__private__.getPageInfoByObjId=function(z){if(isNaN(z)||z%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var ie in St)if(St[ie].objId===z)break;return Ys(ie)},ll=m.__private__.getCurrentPageInfo=m.getCurrentPageInfo=function(){return{objId:St[K].objId,pageNumber:K,pageContext:St[K]}};m.addPage=function(){return Fl.apply(this,arguments),this},m.setPage=function(){return ql.apply(this,arguments),Ne.call(this,je[K]),this},m.insertPage=function(z){return this.addPage(),this.movePage(K,z),this},m.movePage=function(z,ie){var Ee,Re;if(z>ie){Ee=je[z],Re=St[z];for(var Qe=z;Qe>ie;Qe--)je[Qe]=je[Qe-1],St[Qe]=St[Qe-1];je[ie]=Ee,St[ie]=Re,this.setPage(ie)}else if(z<ie){Ee=je[z],Re=St[z];for(var ot=z;ot<ie;ot++)je[ot]=je[ot+1],St[ot]=St[ot+1];je[ie]=Ee,St[ie]=Re,this.setPage(ie)}return this},m.deletePage=function(){return uu.apply(this,arguments),this},m.__private__.text=m.text=function(z,ie,Ee,Re,Qe){var ot,vt,qt,un,On,gn,Jn,sa,ha,Ma=(Re=Re||{}).scope||this;if(typeof z=="number"&&typeof ie=="number"&&(typeof Ee=="string"||Array.isArray(Ee))){var rs=Ee;Ee=ie,ie=z,z=rs}if(arguments[3]instanceof Dt?(T("The transform parameter of text() with a Matrix value"),ha=Qe):(qt=arguments[4],un=arguments[5],Gr(Jn=arguments[3])==="object"&&Jn!==null||(typeof qt=="string"&&(un=qt,qt=null),typeof Jn=="string"&&(un=Jn,Jn=null),typeof Jn=="number"&&(qt=Jn,Jn=null),Re={flags:Jn,angle:qt,align:un})),isNaN(ie)||isNaN(Ee)||z==null)throw new Error("Invalid arguments passed to jsPDF.text");if(z.length===0)return Ma;var La="",oo=!1,Os=typeof Re.lineHeightFactor=="number"?Re.lineHeightFactor:Qs,Zs=Ma.internal.scaleFactor;function Io(ke){return ke=ke.split("	").join(Array(Re.TabLen||9).join(" ")),Ks(ke,Jn)}function mu(ke){for(var ze,wt=ke.concat(),kt=[],zt=wt.length;zt--;)typeof(ze=wt.shift())=="string"?kt.push(ze):Array.isArray(ke)&&(ze.length===1||ze[1]===void 0&&ze[2]===void 0)?kt.push(ze[0]):kt.push([ze[0],ze[1],ze[2]]);return kt}function Ms(ke,ze){var wt;if(typeof ke=="string")wt=ze(ke)[0];else if(Array.isArray(ke)){for(var kt,zt,Zn=ke.concat(),ja=[],co=Zn.length;co--;)typeof(kt=Zn.shift())=="string"?ja.push(ze(kt)[0]):Array.isArray(kt)&&typeof kt[0]=="string"&&(zt=ze(kt[0],kt[1],kt[2]),ja.push([zt[0],zt[1],zt[2]]));wt=ja}return wt}var lo=!1,fl=!0;if(typeof z=="string")lo=!0;else if(Array.isArray(z)){var vd=z.concat();vt=[];for(var Sc,fa=vd.length;fa--;)(typeof(Sc=vd.shift())!="string"||Array.isArray(Sc)&&typeof Sc[0]!="string")&&(fl=!1);lo=fl}if(lo===!1)throw new Error('Type of text must be string or Array. "'+z+'" is not recognized.');typeof z=="string"&&(z=z.match(/[\r?\n]/)?z.split(/\r\n|\r|\n/g):[z]);var bd=$e/Ma.internal.scaleFactor,Cc=bd*(Os-1);switch(Re.baseline){case"bottom":Ee-=Cc;break;case"top":Ee+=bd-Cc;break;case"hanging":Ee+=bd-2*Cc;break;case"middle":Ee+=bd/2-Cc}if((gn=Re.maxWidth||0)>0&&(typeof z=="string"?z=Ma.splitTextToSize(z,gn):Object.prototype.toString.call(z)==="[object Array]"&&(z=z.reduce((function(ke,ze){return ke.concat(Ma.splitTextToSize(ze,gn))}),[]))),ot={text:z,x:ie,y:Ee,options:Re,mutex:{pdfEscape:Ks,activeFontKey:It,fonts:Wn,activeFontSize:$e}},hn.publish("preProcessText",ot),z=ot.text,qt=(Re=ot.options).angle,!(ha instanceof Dt)&&qt&&typeof qt=="number"){qt*=Math.PI/180,Re.rotationDirection===0&&(qt=-qt),j===w.ADVANCED&&(qt=-qt);var wd=Math.cos(qt),jd=Math.sin(qt);ha=new Dt(wd,jd,-jd,wd,0,0)}else qt&&qt instanceof Dt&&(ha=qt);j!==w.ADVANCED||ha||(ha=ar),(On=Re.charSpace||Ri)!==void 0&&(La+=A(P(On))+` Tc
1028`,this.setCharSpace(this.getCharSpace()||0)),(sa=Re.horizontalScale)!==void 0&&(La+=A(100*sa)+` Tz
1029`),Re.lang;var Ls=-1,Ac=Re.renderingMode!==void 0?Re.renderingMode:Re.stroke,Do=Ma.internal.getCurrentPageInfo().pageContext;switch(Ac){case 0:case!1:case"fill":Ls=0;break;case 1:case!0:case"stroke":Ls=1;break;case 2:case"fillThenStroke":Ls=2;break;case 3:case"invisible":Ls=3;break;case 4:case"fillAndAddForClipping":Ls=4;break;case 5:case"strokeAndAddPathForClipping":Ls=5;break;
vendor: 8,888 bytes, lines 1029-1041
1029case 6:case"fillThenStrokeAndAddToPathForClipping":Ls=6;break;case 7:case"addToPathForClipping":Ls=7}var pu=Do.usedRenderingMode!==void 0?Do.usedRenderingMode:-1;Ls!==-1?La+=Ls+` Tr
1030`:pu!==-1&&(La+=`0 Tr
1031`),Ls!==-1&&(Do.usedRenderingMode=Ls),un=Re.align||"left";var Rs,Nd=$e*Os,kc=Ma.internal.pageSize.getWidth(),_d=Wn[It];On=Re.charSpace||Ri,gn=Re.maxWidth||0,Jn=Object.assign({autoencode:!0,noBOM:!0},Re.flags);var Fo=[],Gl=function(ke){return Ma.getStringUnitWidth(ke,{font:_d,charSpace:On,fontSize:$e,doKerning:!1})*$e/Zs};if(Object.prototype.toString.call(z)==="[object Array]"){var Is;vt=mu(z),un!=="left"&&(Rs=vt.map(Gl));var as,Yl=0;if(un==="right"){ie-=Rs[0],z=[],fa=vt.length;for(var ml=0;ml<fa;ml++)ml===0?(as=ns(ie),Is=gi(Ee)):(as=P(Yl-Rs[ml]),Is=-Nd),z.push([vt[ml],as,Is]),Yl=Rs[ml]}else if(un==="center"){ie-=Rs[0]/2,z=[],fa=vt.length;for(var pl=0;pl<fa;pl++)pl===0?(as=ns(ie),Is=gi(Ee)):(as=P((Yl-Rs[pl])/2),Is=-Nd),z.push([vt[pl],as,Is]),Yl=Rs[pl]}else if(un==="left"){z=[],fa=vt.length;for(var Sd=0;Sd<fa;Sd++)z.push(vt[Sd])}else if(un==="justify"&&_d.encoding==="Identity-H"){z=[],fa=vt.length,gn=gn!==0?gn:kc;for(var Ql=0,Un=0;Un<fa;Un++)if(Is=Un===0?gi(Ee):-Nd,as=Un===0?ns(ie):Ql,Un<fa-1){var qo=P((gn-Rs[Un])/(vt[Un].split(" ").length-1)),ss=vt[Un].split(" ");z.push([ss[0]+" ",as,Is]),Ql=0;for(var xi=1;xi<ss.length;xi++){var Pc=(Gl(ss[xi-1]+" "+ss[xi])-Gl(ss[xi]))*Zs+qo;xi==ss.length-1?z.push([ss[xi],Pc,0]):z.push([ss[xi]+" ",Pc,0]),Ql-=Pc}}else z.push([vt[Un],as,Is]);z.push(["",Ql,0])}else{if(un!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(z=[],fa=vt.length,gn=gn!==0?gn:kc,Un=0;Un<fa;Un++)Is=Un===0?gi(Ee):-Nd,as=Un===0?ns(ie):0,Un<fa-1?Fo.push(A(P((gn-Rs[Un])/(vt[Un].split(" ").length-1)))):Fo.push(0),z.push([vt[Un],as,Is])}}var ei=typeof Re.R2L=="boolean"?Re.R2L:We;ei===!0&&(z=Ms(z,(function(ke,ze,wt){return[ke.split("").reverse().join(""),ze,wt]}))),ot={text:z,x:ie,y:Ee,options:Re,mutex:{pdfEscape:Ks,activeFontKey:It,fonts:Wn,activeFontSize:$e}},hn.publish("postProcessText",ot),z=ot.text,oo=ot.mutex.isHex||!1;var Xl=Wn[It].encoding;Xl!=="WinAnsiEncoding"&&Xl!=="StandardEncoding"||(z=Ms(z,(function(ke,ze,wt){return[Io(ke),ze,wt]}))),vt=mu(z),z=[];for(var Jl,Ec,Ds,gl=0,Bo=1,$o=Array.isArray(vt[0])?Bo:gl,Uo="",xl=function(ke,ze,wt){var kt="";return wt instanceof Dt?(wt=typeof Re.angle=="number"?va(wt,new Dt(1,0,0,1,ke,ze)):va(new Dt(1,0,0,1,ke,ze),wt),j===w.ADVANCED&&(wt=va(new Dt(1,0,0,-1,0,0),wt)),kt=wt.join(" ")+` Tm
1032`):kt=A(ke)+" "+A(ze)+` Td
1033`,kt},Wa=0;Wa<vt.length;Wa++){switch(Uo="",$o){case Bo:Ds=(oo?"<":"(")+vt[Wa][0]+(oo?">":")"),Jl=parseFloat(vt[Wa][1]),Ec=parseFloat(vt[Wa][2]);break;case gl:Ds=(oo?"<":"(")+vt[Wa]+(oo?">":")"),Jl=ns(ie),Ec=gi(Ee)}Fo!==void 0&&Fo[Wa]!==void 0&&(Uo=Fo[Wa]+` Tw
1034`),Wa===0?z.push(Uo+xl(Jl,Ec,ha)+Ds):$o===gl?z.push(Uo+Ds):$o===Bo&&z.push(Uo+xl(Jl,Ec,ha)+Ds)}z=$o===gl?z.join(` Tj
1035T* `):z.join(` Tj
1036`),z+=` Tj
1037`;var U=`BT
1038/`;return U+=It+" "+$e+` Tf
1039`,U+=A($e*Os)+` TL
1040`,U+=qa+`
1041`,U+=La,U+=z,ue(U+="ET"),f[It]=!0,Ma};var To=m.__private__.clip=m.clip=function(z){return ue(z==="evenodd"?"W*":"W"),this};m.clipEvenOdd=function(){return To("evenodd")},m.__private__.discardPath=m.discardPath=function(){return ue("n"),this};var Xn=m.__private__.isValidStyle=function(z){var ie=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(z)!==-1&&(ie=!0),ie};m.__private__.setDefaultPathOperation=m.setDefaultPathOperation=function(z){return Xn(z)&&(d=z),this};var ba=m.__private__.getStyle=m.getStyle=function(z){var ie=d;switch(z){case"D":case"S":ie="S";break;case"F":ie="f";break;case"FD":case"DF":ie="B";break;case"f":case"f*":case"B":case"B*":ie=z}return ie},Es=m.close=function(){return ue("h"),this};m.stroke=function(){return ue("S"),this},m.fill=function(z){return cl("f",z),this},m.fillEvenOdd=function(z){return cl("f*",z),this},m.fillStroke=function(z){return cl("B",z),this},m.fillStrokeEvenOdd=function(z){return cl("B*",z),this};var cl=function(z,ie){Gr(ie)==="object"?Dr(ie,z):ue(z)},fn=function(z){z===null||j===w.ADVANCED&&z===void 0||(z=ba(z),ue(z))};function gd(z,ie,Ee,Re,Qe){var ot=new tg(ie||this.boundingBox,Ee||this.xStep,Re||this.yStep,this.gState,Qe||this.matrix);ot.stream=this.stream;var vt=z+"$$"+this.cloneIndex+++"$$";return dr(vt,ot),ot}var Dr=function(z,ie){var Ee=ta[z.key],Re=Rn[Ee];if(Re instanceof em)ue("q"),ue(Hr(ie)),Re.gState&&m.setGState(Re.gState),ue(z.matrix.toString()+" cm"),ue("/"+Ee+" sh"),ue("Q");else if(Re instanceof tg){var Qe=new Dt(1,0,0,-1,0,Ro());z.matrix&&(Qe=Qe.multiply(z.matrix||ar),Ee=gd.call(Re,z.key,z.boundingBox,z.xStep,z.yStep,Qe).id),ue("q"),ue("/Pattern cs"),ue("/"+Ee+" scn"),Re.gState&&m.setGState(Re.gState),ue(ie),ue("Q")}},Hr=function(z){switch(z){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},dl=m.moveTo=function(z,ie){return ue(A(P(z))+" "+A(F(ie))+" m"),this},Oo=m.lineTo=function(z,ie){return ue(A(P(z))+" "+A(F(ie))+" l"),this},wa=m.curveTo=function(z,ie,Ee,Re,Qe,ot){return ue([A(P(z)),A(F(ie)),A(P(Ee)),A(F(Re)),A(P(Qe)),A(F(ot)),"c"].join(" ")),this};m.__private__.line=m.line=function(z,ie,Ee,Re,Qe){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||isNaN(Re)||!Xn(Qe))throw new Error("Invalid arguments passed to jsPDF.line");return j===w.COMPAT?this.lines([[Ee-z,Re-ie]],z,ie,[1,1],Qe||"S"):this.lines([[Ee-z,Re-ie]],z,ie,[1,1]).stroke()},m.__private__.lines=m.lines=function(z,ie,Ee,Re,Qe,ot){var vt,qt,un,On,gn,Jn,sa,ha,Ma,rs,La,oo;if(typeof z=="number"&&(oo=Ee,Ee=ie,ie=z,z=oo),Re=Re||[1,1],ot=ot||!1,isNaN(ie)||isNaN(Ee)||!Array.isArray(z)||!Array.isArray(Re)||!Xn(Qe)||typeof ot!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(dl(ie,Ee),vt=Re[0],qt=Re[1],On=z.length,rs=ie,La=Ee,un=0;un<On;un++)(gn=z[un]).length===2?(rs=gn[0]*vt+rs,La=gn[1]*qt+La,Oo(rs,La)):(Jn=gn[0]*vt+rs,sa=gn[1]*qt+La,ha=gn[2]*vt+rs,Ma=gn[3]*qt+La,rs=gn[4]*vt+rs,La=gn[5]*qt+La,wa(Jn,sa,ha,Ma,rs,La));return ot&&Es(),fn(Qe),this},m.path=function(z){for(var ie=0;ie<z.length;ie++){var Ee=z[ie],Re=Ee.c;switch(Ee.op){case"m":dl(Re[0],Re[1]);break;case"l":Oo(Re[0],Re[1]);break;case"c":wa.apply(this,Re);break;case"h":Es()}}return this},m.__private__.rect=m.rect=function(z,ie,Ee,Re,Qe){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||isNaN(Re)||!Xn(Qe))throw new Error("Invalid arguments passed to jsPDF.rect");return j===w.COMPAT&&(Re=-Re),ue([A(P(z)),A(F(ie)),A(P(Ee)),A(P(Re)),"re"].join(" ")),fn(Qe),this},m.__private__.triangle=m.triangle=function(z,ie,Ee,Re,Qe,ot,vt){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||isNaN(Re)||isNaN(Qe)||isNaN(ot)||!Xn(vt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Ee-z,Re-ie],[Qe-Ee,ot-Re],[z-Qe,ie-ot]],z,ie,[1,1],vt,!0),this},m.__private__.roundedRect=m.roundedRect=function(z,ie,Ee,Re,Qe,ot,vt){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||isNaN(Re)||isNaN(Qe)||isNaN(ot)||!Xn(vt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var qt=4/3*(Math.SQRT2-1);return Qe=Math.min(Qe,.5*Ee),ot=Math.min(ot,.5*Re),this.lines([[Ee-2*Qe,0],[Qe*qt,0,Qe,ot-ot*qt,Qe,ot],[0,Re-2*ot],[0,ot*qt,-Qe*qt,ot,-Qe,ot],[2*Qe-Ee,0],[-Qe*qt,0,-Qe,-ot*qt,-Qe,-ot],[0,2*ot-Re],[0,-ot*qt,Qe*qt,-ot,Qe,-ot]],z+Qe,ie,[1,1],vt,!0),this},m.__private__.ellipse=m.ellipse=function(z,ie,Ee,Re,Qe){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||isNaN(Re)||!Xn(Qe))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ot=4/3*(Math.SQRT2-1)*Ee,vt=4/3*(Math.SQRT2-1)*Re;return dl(z+Ee,ie),wa(z+Ee,ie-vt,z+ot,ie-Re,z,ie-Re),wa(z-ot,ie-Re,z-Ee,ie-vt,z-Ee,ie),wa(z-Ee,ie+vt,z-ot,ie+Re,z,ie+Re),wa(z+ot,ie+Re,z+Ee,ie+vt,z+Ee,ie),fn(Qe),this},m.__private__.circle=m.circle=function(z,ie,Ee,Re){if(isNaN(z)||isNaN(ie)||isNaN(Ee)||!Xn(Re))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(z,ie,Ee,Ee,Re)},m.setFont=function(z,ie,Ee){return Ee&&(ie=S(ie,Ee)),It=pd(z,ie,{disableWarning:!1}),this};var ts=m.__private__.getFont=m.getFont=function(){return Wn[pd.apply(m,arguments)]};m.__private__.getFontList=m.getFontList=function(){var z,ie,Ee={};for(z in lr)if(lr.hasOwnProperty(z))for(ie in Ee[z]=[],lr[z])lr[z].hasOwnProperty(ie)&&Ee[z].push(ie);return Ee},m.addFont=function(z,ie,Ee,Re,Qe){var ot=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ot.indexOf(arguments[3])!==-1?Qe=arguments[3]:arguments[3]&&ot.indexOf(arguments[3])==-1&&(Ee=S(Ee,Re)),Qe=Qe||"Identity-H",Ao.call(this,z,ie,Ee,Qe)};var Qs,ul=e.lineWidth||.200025,pi=m.__private__.getLineWidth=m.getLineWidth=function(){return ul},Vl=m.__private__.setLineWidth=m.setLineWidth=function(z){return ul=z,ue(A(P(z))+" w"),this};m.__private__.setLineDash=An.API.setLineDash=An.API.setLineDashPattern=function(z,ie){if(z=z||[],ie=ie||0,isNaN(ie)||!Array.isArray(z))throw new Error("Invalid arguments passed to 
1041jsPDF.setLineDash");return z=z.map((function(Ee){return A(P(Ee))})).join(" "),ie=A(P(ie)),ue("["+z+"] "+ie+" d"),this};var Li=m.__private__.getLineHeight=m.getLineHeight=function(){return $e*Qs};m.__private__.getLineHeight=m.getLineHeight=function(){return $e*Qs};var Hl=m.__private__.setLineHeightFactor=m.setLineHeightFactor=function(z){return typeof(z=z||1.15)=="number"&&(Qs=z),this},Ts=m.__private__.getLineHeightFactor=m.getLineHeightFactor=function(){return Qs};Hl(e.lineHeight);var ns=m.__private__.getHorizontalCoordinate=function(z){return P(z)},gi=m.__private__.getVerticalCoordinate=function(z){return j===w.ADVANCED?z:St[K].mediaBox.topRightY-St[K].mediaBox.bottomLeftY-P(z)},uh=m.__private__.getHorizontalCoordinateString=m.getHorizontalCoordinateString=function(z){return A(ns(z))},Oa=m.__private__.getVerticalCoordinateString=m.getVerticalCoordinateString=function(z){return A(gi(z))},Xs=e.strokeColor||"0 G";m.__private__.getStrokeColor=m.getDrawColor=function(){return ks(Xs)},m.__private__.setStrokeColor=m.setDrawColor=function(z,ie,Ee,Re){return Xs=ua({ch1:z,ch2:ie,ch3:Ee,ch4:Re,pdfColorType:"draw",precision:2}),ue(Xs),this};var Js=e.fillColor||"0 g";m.__private__.getFillColor=m.getFillColor=function(){return ks(Js)},m.__private__.setFillColor=m.setFillColor=function(z,ie,Ee,Re){return Js=ua({ch1:z,ch2:ie,ch3:Ee,ch4:Re,pdfColorType:"fill",precision:2}),ue(Js),this};var qa=e.textColor||"0 g",so=m.__private__.getTextColor=m.getTextColor=function(){return ks(qa)};m.__private__.setTextColor=m.setTextColor=function(z,ie,Ee,Re){return qa=ua({ch1:z,ch2:ie,ch3:Ee,ch4:Re,pdfColorType:"text",precision:3}),this};var Ri=e.charSpace,_c=m.__private__.getCharSpace=m.getCharSpace=function(){return parseFloat(Ri||0)};m.__private__.setCharSpace=m.setCharSpace=function(z){if(isNaN(z))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ri=z,this};var Wl=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(z){var ie=m.CapJoinStyles[z];if(ie===void 0)throw new Error("Line cap style of '"+z+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Wl=ie,ue(ie+" J"),this};var io=0;m.__private__.setLineJoin=m.setLineJoin=function(z){var ie=m.CapJoinStyles[z];if(ie===void 0)throw new Error("Line join style of '"+z+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return io=ie,ue(ie+" j"),this},m.__private__.setLineMiterLimit=m.__private__.setMiterLimit=m.setLineMiterLimit=m.setMiterLimit=function(z){if(z=z||0,isNaN(z))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ue(A(P(z))+" M"),this},m.GState=zw,m.setGState=function(z){(z=typeof z=="string"?fr[na[z]]:xd(null,z)).equals(Ea)||(ue("/"+z.id+" gs"),Ea=z)};var xd=function(z,ie){if(!z||!na[z]){var Ee=!1;for(var Re in fr)if(fr.hasOwnProperty(Re)&&fr[Re].equals(ie)){Ee=!0;break}if(Ee)ie=fr[Re];else{var Qe="GS"+(Object.keys(fr).length+1).toString(10);fr[Qe]=ie,ie.id=Qe}return z&&(na[z]=ie.id),hn.publish("addGState",ie),ie}};m.addGState=function(z,ie){return xd(z,ie),this},m.saveGraphicsState=function(){return ue("q"),Ha.push({key:It,size:$e,color:qa}),this},m.restoreGraphicsState=function(){ue("Q");var z=Ha.pop();return It=z.key,$e=z.size,qa=z.color,Ea=null,this},m.setCurrentTransformationMatrix=function(z){return ue(z.toString()+" cm"),this},m.comment=function(z){return ue("#"+z),this};var Mo=function(z,ie){var Ee=z||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Ee},set:function(ot){isNaN(ot)||(Ee=parseFloat(ot))}});var Re=ie||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return Re},set:function(ot){isNaN(ot)||(Re=parseFloat(ot))}});var Qe="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Qe},set:function(ot){Qe=ot.toString()}}),this},Lo=function(z,ie,Ee,Re){Mo.call(this,z,ie),this.type="rect";var Qe=Ee||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Qe},set:function(vt){isNaN(vt)||(Qe=parseFloat(vt))}});var ot=Re||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ot},set:function(vt){isNaN(vt)||(ot=parseFloat(vt))}}),this},Kl=function(){this.page=Kn,this.currentPage=K,this.pages=je.slice(0),this.pagesContext=St.slice(0),this.x=xr,this.y=xn,this.matrix=Rr,this.width=Ii(K),this.height=Ro(K),this.outputDestination=Fe,this.id="",this.objectNumber=-1};Kl.prototype.restore=function(){Kn=this.page,K=this.currentPage,St=this.pagesContext,je=this.pages,xr=this.x,xn=this.y,Rr=this.matrix,hu(K,this.width),fu(K,this.height),Fe=this.outputDestination};var yd=function(z,ie,Ee,Re,Qe){cr.push(new Kl),Kn=K=0,je=[],xr=z,xn=ie,Rr=Qe,Dl([Ee,Re])}
1041,_f=function(z){if(da[z])cr.pop().restore();else{var ie=new Kl,Ee="Xo"+(Object.keys(Gn).length+1).toString(10);ie.id=Ee,da[z]=Ee,Gn[Ee]=ie,hn.publish("addFormObject",ie),cr.pop().restore()}};for(var hl in m.beginFormObject=function(z,ie,Ee,Re,Qe){return yd(z,ie,Ee,Re,Qe),this},m.endFormObject=function(z){return _f(z),this},m.doFormObject=function(z,ie){var Ee=Gn[da[z]];return ue("q"),ue(ie.toString()+" cm"),ue("/"+Ee.id+" Do"),ue("Q"),this},m.getFormObject=function(z){var ie=Gn[da[z]];return{x:ie.x,y:ie.y,width:ie.width,height:ie.height,matrix:ie.matrix}},m.save=function(z,ie){return z=z||"generated.pdf",(ie=ie||{}).returnPromise=ie.returnPromise||!1,ie.returnPromise===!1?(Zf(Ul(Eo()),z),typeof Zf.unload=="function"&&En.setTimeout&&setTimeout(Zf.unload,911),this):new Promise((function(Ee,Re){try{var Qe=Zf(Ul(Eo()),z);typeof Zf.unload=="function"&&En.setTimeout&&setTimeout(Zf.unload,911),Ee(Qe)}catch(ot){Re(ot.message)}}))},An.API)An.API.hasOwnProperty(hl)&&(hl==="events"&&An.API.events.length?(function(z,ie){var Ee,Re,Qe;for(Qe=ie.length-1;Qe!==-1;Qe--)Ee=ie[Qe][0],Re=ie[Qe][1],z.subscribe.apply(z,[Ee].concat(typeof Re=="function"?[Re]:Re))})(hn,An.API.events):m[hl]=An.API[hl]);var Ii=m.getPageWidth=function(z){return(St[z=z||K].mediaBox.topRightX-St[z].mediaBox.bottomLeftX)/_t},hu=m.setPageWidth=function(z,ie){St[z].mediaBox.topRightX=ie*_t+St[z].mediaBox.bottomLeftX},Ro=m.getPageHeight=function(z){return(St[z=z||K].mediaBox.topRightY-St[z].mediaBox.bottomLeftY)/_t},fu=m.setPageHeight=function(z,ie){St[z].mediaBox.topRightY=ie*_t+St[z].mediaBox.bottomLeftY};return m.internal={pdfEscape:Ks,getStyle:ba,getFont:ts,getFontSize:be,getCharSpace:_c,getTextColor:so,getLineHeight:Li,getLineHeightFactor:Ts,getLineWidth:pi,write:rt,getHorizontalCoordinate:ns,getVerticalCoordinate:gi,getCoordinateString:uh,getVerticalCoordinateString:Oa,collections:{},newObject:jr,newAdditionalObject:ro,newObjectDeferred:Yn,newObjectDeferredBegin:Ta,getFilters:Ps,putStream:xs,events:hn,scaleFactor:_t,pageSize:{getWidth:function(){return Ii(K)},setWidth:function(z){hu(K,z)},getHeight:function(){return Ro(K)},setHeight:function(z){fu(K,z)}},encryptionOptions:h,encryption:Ir,getEncryptor:Gs,output:zl,getNumberOfPages:dh,pages:je,out:ue,f2:M,f3:k,getPageInfo:Ys,getPageInfoByObjId:yn,getCurrentPageInfo:ll,getPDFVersion:g,Point:Mo,Rectangle:Lo,Matrix:Dt,hasHotfix:Mi},Object.defineProperty(m.internal.pageSize,"width",{get:function(){return Ii(K)},set:function(z){hu(K,z)},enumerable:!0,configurable:!0}),Object.defineProperty(m.internal.pageSize,"height",{get:function(){return Ro(K)},set:function(z){fu(K,z)},enumerable:!0,configurable:!0}),ko.call(m,Pe),It="F1",Fl(s,r),hn.publish("initialized"),m}Hp.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},Hp.prototype.toHexString=function(e){return e.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},Hp.prototype.hexToBytes=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(String.fromCharCode(parseInt(e.substr(r,2),16)));return t.join("")},Hp.prototype.processOwnerPassword=function(e,t){return Jk(Xk(t).substr(0,5),e)},Hp.prototype.encryptor=function(e,t){var r=Xk(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(a){return Jk(r,a)}},zw.prototype.equals=function(e){var t,r="id,objectNumber,equals";if(!e||Gr(e)!==Gr(this))return!1;var a=0;for(t in this)if(!(r.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;a++}for(t in e)e.hasOwnProperty(t)&&r.indexOf(t)<0&&a--;return a===0},An.API={events:[]},An.version="2.5.2";var Xa=An.API,nE=1,tp=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Rp=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},In=function(e){return e.toFixed(2)},Mh=function(e){return e.toFixed(5)};Xa.__acroform__={};var il=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},b9=function(e){return e*nE},Rd=function(e){var t=new pY,r=an.internal.getHeight(e)||0,a=an.internal.getWidth(e)||0;return t.BBox=[0,0,Number(In(a)),Number(In(r))],t},i3e=Xa.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to 
1041jsPDF.API.__acroform__.setBit");return e|=1<<t},o3e=Xa.__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)},l3e=Xa.__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)==0?0:1},us=Xa.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return l3e(e,t-1)},hs=Xa.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return i3e(e,t-1)},fs=Xa.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return o3e(e,t-1)},c3e=Xa.__acroform__.calculateCoordinates=function(e,t){var r=t.internal.getHorizontalCoordinate,a=t.internal.getVerticalCoordinate,s=e[0],i=e[1],o=e[2],l=e[3],c={};return c.lowerLeft_X=r(s)||0,c.lowerLeft_Y=a(i+l)||0,c.upperRight_X=r(s+o)||0,c.upperRight_Y=a(i)||0,[Number(In(c.lowerLeft_X)),Number(In(c.lowerLeft_Y)),Number(In(c.upperRight_X)),Number(In(c.upperRight_Y))]},d3e=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],r=e._V||e.DV,a=Zk(e,r),s=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("/"+s+" "+In(a.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC");var i=Rd(e);return i.scope=e.scope,i.stream=t.join(`
1042`),i}},Zk=function(e,t){var r=e.fontSize===0?e.maxFontSize:e.fontSize,a={text:"",fontSize:""},s=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");s=e.multiline?s.map((function(k){return k.split(`
1043`)})):s.map((function(k){return[k]}));var i=r,o=an.internal.getHeight(e)||0;o=o<0?-o:o;var l=an.internal.getWidth(e)||0;l=l<0?-l:l;var c=function(k,P,O){if(k+1<s.length){var F=P+" "+s[k+1][0];return $b(F,e,O).width<=l-4}return!1};i++;e:for(;i>0;){t="",i--;var d,h,u=$b("3",e,i).height,f=e.multiline?o-i:(o-u)/2,m=f+=2,b=0,g=0,y=0;if(i<=0){t=`(...) Tj
1044`,t+="% Width of Text: "+$b(t,e,i=12).width+", FieldWidth:"+l+`
1045`;break}for(var x="",w=0,j=0;j<s.length;j++)if(s.hasOwnProperty(j)){var N=!1;if(s[j].length!==1&&y!==s[j].length-1){if((u+2)*(w+2)+2>o)continue e;x+=s[j][y],N=!0,g=j,j--}else{x=(x+=s[j][y]+" ").substr(x.length-1)==" "?x.substr(0,x.length-1):x;var _=parseInt(j),S=c(_,x,i),A=j>=s.length-1;if(S&&!A){x+=" ",y=0;continue}if(S||A){if(A)g=_;else if(e.multiline&&(u+2)*(w+2)+2>o)continue e}else{if(!e.multiline||(u+2)*(w+2)+2>o)continue e;g=_}}for(var T="",R=b;R<=g;R++){var M=s[R];if(e.multiline){if(R===g){T+=M[y]+" ",y=(y+1)%M.length;continue}if(R===b){T+=M[M.length-1]+" ";continue}}T+=M[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,h=$b(T,e,i).width,e.textAlign){case"right":d=l-h-2;break;case"center":d=(l-h)/2;break;case"left":default:d=2}t+=In(d)+" "+In(m)+` Td
1046`,t+="("+tp(T)+`) Tj
1047`,t+=-In(d)+` 0 Td
1048`,m=-(i+2),h=0,b=N?g:g+1,w++,x=""}break}return a.text=t,a.fontSize=i,a},$b=function(e,t,r){var a=t.scope.internal.getFont(t.fontName,t.fontStyle),s=t.scope.getStringUnitWidth(e,{font:a,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:t.scope.getStringUnitWidth("3",{font:a,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:s}},u3e={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},h3e=function(e,t){var r={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find((function(a){return a.type===r.type&&a.object===r.object}))===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(r)},f3e=function(e,t){for(var r in e)if(e.hasOwnProperty(r)){var a=r,s=e[r];t.internal.newObjectDeferredBegin(s.objId,!0),Gr(s)==="object"&&typeof s.putStream=="function"&&s.putStream(),delete e[a]}},m3e=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if
vendor: 20,284 bytes, lines 1048-1054
1048(fd.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(u3e)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");nE=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new gY,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",(function(){(function(r){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0})(e)})),e.internal.events.subscribe("buildDocument",(function(){(function(r){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var a=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var s in a)if(a.hasOwnProperty(s)){var i=a[s];i.objId=void 0,i.hasAnnotation&&h3e(i,r)}})(e)})),e.internal.events.subscribe("putCatalog",(function(){(function(r){if(r.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)})),e.internal.events.subscribe("postPutPages",(function(r){(function(a,s){var i=!a;for(var o in a||(s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),a=a||s.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(a.hasOwnProperty(o)){var l=a[o],c=[],d=l.Rect;if(l.Rect&&(l.Rect=c3e(l.Rect,s)),s.internal.newObjectDeferredBegin(l.objId,!0),l.DA=an.createDefaultAppearanceStream(l),Gr(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(c=l.getKeyValueListForStream()),l.Rect=d,l.hasAppearanceStream&&!l.appearanceStreamContent){var h=d3e(l);c.push({key:"AP",value:"<</N "+h+">>"}),s.internal.acroformPlugin.xForms.push(h)}if(l.appearanceStreamContent){var u="";for(var f in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(f)){var m=l.appearanceStreamContent[f];if(u+="/"+f+" ",u+="<<",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(s,l)),u+="/"+o+" "+b+" ",s.internal.acroformPlugin.xForms.indexOf(b)>=0||s.internal.acroformPlugin.xForms.push(b)}}else typeof(b=m)=="function"&&(b=b.call(s,l)),u+="/"+o+" "+b,s.internal.acroformPlugin.xForms.indexOf(b)>=0||s.internal.acroformPlugin.xForms.push(b);u+=">>"}c.push({key:"AP",value:`<<
1049`+u+">>"})}s.internal.putStream({additionalKeyValues:c,objectId:l.objId}),s.internal.out("endobj")}i&&f3e(s.internal.acroformPlugin.xForms,s)})(r,e)})),e.internal.acroformPlugin.isInitialized=!0}},mY=Xa.__acroform__.arrayToPdfArray=function(e,t,r){var a=function(o){return o};if(Array.isArray(e)){for(var s="[",i=0;i<e.length;i++)switch(i!==0&&(s+=" "),Gr(e[i])){case"boolean":case"number":case"object":s+=e[i].toString();break;case"string":e[i].substr(0,1)!=="/"?(t!==void 0&&r&&(a=r.internal.getEncryptor(t)),s+="("+tp(a(e[i].toString()))+")"):s+=e[i].toString()}return s+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Y4=function(e,t,r){var a=function(s){return s};return t!==void 0&&r&&(a=r.internal.getEncryptor(t)),(e=e||"").toString(),e="("+tp(a(e))+")"},zd=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})};zd.prototype.toString=function(){return this.objId+" 0 R"},zd.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},zd.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter((function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"}));for(var r in t)if(Object.getOwnPropertyDescriptor(this,t[r]).configurable===!1){var a=t[r],s=this[a];s&&(Array.isArray(s)?e.push({key:a,value:mY(s,this.objId,this.scope)}):s instanceof zd?(s.scope=this.scope,e.push({key:a,value:s.objId+" 0 R"})):typeof s!="function"&&e.push({key:a,value:s}))}return e};var pY=function(){zd.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(r){t=r}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(r){e=r.trim()},get:function(){return e||null}})};il(pY,zd);var gY=function(){zd.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 r=function(a){return a};return this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),"("+tp(r(e))+")"}},set:function(r){e=r}})};il(gY,zd);var fd=function e(){zd.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute F supplied.');t=x}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!us(t,3)},set:function(x){x?this.F=hs(t,3):this.F=fs(t,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(x){if(isNaN(x))throw new Error('Invalid value "'+x+'" for attribute Ff supplied.');r=x}});var a=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(a.length!==0)return a},set:function(x){a=x!==void 0?x:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[0])?0:a[0]},set:function(x){a[0]=x}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[1])?0:a[1]},set:function(x){a[1]=x}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[2])?0:a[2]},set:function(x){a[2]=x}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!a||isNaN(a[3])?0:a[3]},set:function(x){a[3]=x}});var s="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return s},set:function(x){switch(x){case"/Btn":case"/Tx":case"/Ch":case"/Sig":s=x;break;default:throw new Error('Invalid value "'+x+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof Vw)return;i="FieldObject"+e.FieldNum++}var x=function(w){return w};return this.scope&&(x=this.scope.internal.getEncryptor(this.objId)),"("+tp(x(i))+")"},set:function(x){i=x.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(x){i=x}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(x){o=x}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(x){l=x}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(x){c=x}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/nE:d},set:function(x){d=x}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(x){h=x}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof Vw||this instanceof Am))return Y4(u,this.objId,this.scope)},set:function(x){x=x.toString(),u=x}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof ci?f:Y4(f,this.objId,this.scope)},set:function(x){x=x.toString(),f=this instanceof ci?x:x.substr(0,1)==="("?Rp(x.substr(1,x.length-2)):Rp(x)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ci?Rp(f.substr(1,f.length-1)):f},set:function(x){x=x.toString(),f=this instanceof ci?"/"+x:x}});var m=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(m)return m},set:function(x){this.V=x}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(m)return this instanceof ci?m:Y4(m,this.objId,this.scope)},set:function(x){x=x.toString(),m=this instanceof ci?x:x.substr(0,1)==="("?Rp(x.substr(1,x.length-2)):Rp(x)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ci?Rp(m.substr(1,m.length-1)):m},set:function(x){x=x.toString(),m=this instanceof ci?"/"+x:x}}),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,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(x){x=!!x,g=x}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(b)return b},set:function(x){b=x}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,1)},set:function(x){x?this.Ff=hs(this.Ff,1):this.Ff=fs(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,2)},set:function(x){x?this.Ff=hs(this.Ff,2):this.Ff=fs(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,3)},set:function(x){x?this.Ff=hs(this.Ff,3):this.Ff=fs(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(x){if([0,1,2].indexOf(x)===-1)throw new Error('Invalid value "'+x+'" for attribute Q supplied.');y=x}}),Object.defineProperty(this,"textAlign",{get:function(){var x;switch(y){case 0:default:x="left";break;case 1:x="center";break;case 2:x="right"}return x},configurable:!0,enumerable:!0,set:function(x){switch(x){case"right":case 2:y=2;break;case"center":case 1:y=1;break;case"left":case 0:default:y=0}}})};il(fd,zd);var cg=function(){fd.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(r){e=r}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(r){e=r}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return mY(t,this.objId,this.scope)},set:function(r){var a,s;s=[],typeof(a=r)=="string"&&(s=(function(i,o,l){l||(l=1);for(var c,d=[];c=o.exec(i);)d.push(c[l]);return d})(a,/\((.*?)\)/g)),t=s}}),this.getOptions=function(){return t},this.setOptions=function(r){t=r,this.sort&&t.sort()},this.addOption=function(r){r=(r=r||"").toString(),t.push(r),this.sort&&t.sort()},this.removeOption=function(r,a){for(a=a||!1,r=(r=r||"").toString();t.indexOf(r)!==-1&&(t.splice(t.indexOf(r),1),a!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,18)},set:function(r){r?this.Ff=hs(this.Ff,18):this.Ff=fs(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,19)},set:function(r){this.combo===!0&&(r?this.Ff=hs(this.Ff,19):this.Ff=fs(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,20)},set:function(r){r?(this.Ff=hs(this.Ff,20),t.sort()):this.Ff=fs(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,22)},set:function(r){r?this.Ff=hs(this.Ff,22):this.Ff=fs(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,23)},set:function(r){r?this.Ff=hs(this.Ff,23):this.Ff=fs(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,27)},set:function(r){r?this.Ff=hs(this.Ff,27):this.Ff=fs(this.Ff,27)}}),this.hasAppearanceStream=!1};il(cg,fd);var dg=function(){cg.call(this),this.fontName="helvetica",this.combo=!1};il(dg,cg);var ug=function(){dg.call(this),this.combo=!0};il(ug,dg);var f1=function(){ug.call(this),this.edit=!0};il(f1,ug);var ci=function(){fd.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,15)},set:function(r){r?this.Ff=hs(this.Ff,15):this.Ff=fs(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,16)},set:function(r){r?this.Ff=hs(this.Ff,16):this.Ff=fs(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,17)},set:function(r){r?this.Ff=hs(this.Ff,17):this.Ff=fs(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,26)},set:function(r){r?this.Ff=hs(this.Ff,26):this.Ff=fs(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(i){return i};if(this.scope&&(r=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var a,s=[];for(a in s.push("<<"),t)s.push("/"+a+" ("+tp(r(t[a]))+")");return s.push(">>"),s.join(`
1050`)}},set:function(r){Gr(r)==="object"&&(t=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(r){typeof r=="string"&&(t.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(r){e="/"+r}})};il(ci,fd);var m1=function(){ci.call(this),this.pushButton=!0};il(m1,ci);var hg=function(){ci.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:[]}})};il(hg,ci);var Vw=function(){var e,t;fd.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(s){e=s}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(s){t=s}});var r,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var s=function(l){return l};this.scope&&(s=this.scope.internal.getEncryptor(this.objId));var i,o=[];for(i in o.push("<<"),a)o.push("/"+i+" ("+tp(s(a[i]))+")");return o.push(">>"),o.join(`
1051`)},set:function(s){Gr(s)==="object"&&(a=s)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(s){typeof s=="string"&&(a.CA=s)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(s){r=s}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(s){r="/"+s}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=an.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};il(Vw,fd),hg.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 r=this.Kids[t];r.appearanceStreamContent=e.createAppearanceStream(r.optionName),r.caption=e.getCA()}},hg.prototype.createOption=function(e){var t=new Vw;return t.Parent=this,t.optionName=e,this.Kids.push(t),p3e.call(this.scope,t),t};var p1=function(){ci.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=an.CheckBox.createAppearanceStream()};il(p1,ci);var Am=function(){fd.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,13)},set:function(t){t?this.Ff=hs(this.Ff,13):this.Ff=fs(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,21)},set:function(t){t?this.Ff=hs(this.Ff,21):this.Ff=fs(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,23)},set:function(t){t?this.Ff=hs(this.Ff,23):this.Ff=fs(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,24)},set:function(t){t?this.Ff=hs(this.Ff,24):this.Ff=fs(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,25)},set:function(t){t?this.Ff=hs(this.Ff,25):this.Ff=fs(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,26)},set:function(t){t?this.Ff=hs(this.Ff,26):this.Ff=fs(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}})};il(Am,fd);var g1=function(){Am.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!us(this.Ff,14)},set:function(e){e?this.Ff=hs(this.Ff,14):this.Ff=fs(this.Ff,14)}}),this.password=!0};il(g1,Am);var an={CheckBox:{createAppearanceStream:function(){return{N:{On:an.CheckBox.YesNormal},D:{On:an.CheckBox.YesPushDown,Off:an.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=[],a=e.scope.internal.getFont(e.fontName,e.fontStyle).id,s=e.scope.__private__.encodeColorString(e.color),i=Zk(e,e.caption);return r.push("0.749023 g"),r.push("0 0 "+In(an.internal.getWidth(e))+" "+In(an.internal.getHeight(e))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+a+" "+In(i.fontSize)+" Tf "+s),r.push("BT"),r.push(i.text),r.push("ET"),r.push("Q"),r.push("EMC"),t.stream=r.join(`
1052`),t},YesNormal:function(e){var t=Rd(e);t.scope=e.scope;var r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),s=[],i=an.internal.getHeight(e),o=an.internal.getWidth(e),l=Zk(e,e.caption);return s.push("1 g"),s.push("0 0 "+In(o)+" "+In(i)+" re"),s.push("f"),s.push("q"),s.push("0 0 1 rg"),s.push("0 0 "+In(o-1)+" "+In(i-1)+" re"),s.push("W"),s.push("n"),s.push("0 g"),s.push("BT"),s.push("/"+r+" "+In(l.fontSize)+" Tf "+a),s.push(l.text),s.push("ET"),s.push("Q"),t.stream=s.join(`
1053`),t},OffPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+In(an.internal.getWidth(e))+" "+In(an.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
1054`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:an.RadioButton.Circle.OffPushDown},N:{}}
vendor: 4,104 bytes, lines 1054-1060
1054;return t.N[e]=an.RadioButton.Circle.YesNormal,t.D[e]=an.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=Rd(e);t.scope=e.scope;var r=[],a=an.internal.getWidth(e)<=an.internal.getHeight(e)?an.internal.getWidth(e)/4:an.internal.getHeight(e)/4;a=Number((.9*a).toFixed(5));var s=an.internal.Bezier_C,i=Number((a*s).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Mh(an.internal.getWidth(e)/2)+" "+Mh(an.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),r.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),r.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),r.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
1055`),t},YesPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=[],a=an.internal.getWidth(e)<=an.internal.getHeight(e)?an.internal.getWidth(e)/4:an.internal.getHeight(e)/4;a=Number((.9*a).toFixed(5));var s=Number((2*a).toFixed(5)),i=Number((s*an.internal.Bezier_C).toFixed(5)),o=Number((a*an.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Mh(an.internal.getWidth(e)/2)+" "+Mh(an.internal.getHeight(e)/2)+" cm"),r.push(s+" 0 m"),r.push(s+" "+i+" "+i+" "+s+" 0 "+s+" c"),r.push("-"+i+" "+s+" -"+s+" "+i+" -"+s+" 0 c"),r.push("-"+s+" -"+i+" -"+i+" -"+s+" 0 -"+s+" c"),r.push(i+" -"+s+" "+s+" -"+i+" "+s+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Mh(an.internal.getWidth(e)/2)+" "+Mh(an.internal.getHeight(e)/2)+" cm"),r.push(a+" 0 m"),r.push(a+" "+o+" "+o+" "+a+" 0 "+a+" c"),r.push("-"+o+" "+a+" -"+a+" "+o+" -"+a+" 0 c"),r.push("-"+a+" -"+o+" -"+o+" -"+a+" 0 -"+a+" c"),r.push(o+" -"+a+" "+a+" -"+o+" "+a+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
1056`),t},OffPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=[],a=an.internal.getWidth(e)<=an.internal.getHeight(e)?an.internal.getWidth(e)/4:an.internal.getHeight(e)/4;a=Number((.9*a).toFixed(5));var s=Number((2*a).toFixed(5)),i=Number((s*an.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Mh(an.internal.getWidth(e)/2)+" "+Mh(an.internal.getHeight(e)/2)+" cm"),r.push(s+" 0 m"),r.push(s+" "+i+" "+i+" "+s+" 0 "+s+" c"),r.push("-"+i+" "+s+" -"+s+" "+i+" -"+s+" 0 c"),r.push("-"+s+" -"+i+" -"+i+" -"+s+" 0 -"+s+" c"),r.push(i+" -"+s+" "+s+" -"+i+" "+s+" 0 c"),r.push("f"),r.push("Q"),t.stream=r.join(`
1057`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:an.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=an.RadioButton.Cross.YesNormal,t.D[e]=an.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=Rd(e);t.scope=e.scope;var r=[],a=an.internal.calculateCross(e);return r.push("q"),r.push("1 1 "+In(an.internal.getWidth(e)-2)+" "+In(an.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(In(a.x1.x)+" "+In(a.x1.y)+" m"),r.push(In(a.x2.x)+" "+In(a.x2.y)+" l"),r.push(In(a.x4.x)+" "+In(a.x4.y)+" m"),r.push(In(a.x3.x)+" "+In(a.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join(`
1058`),t},YesPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=an.internal.calculateCross(e),a=[];return a.push("0.749023 g"),a.push("0 0 "+In(an.internal.getWidth(e))+" "+In(an.internal.getHeight(e))+" re"),a.push("f"),a.push("q"),a.push("1 1 "+In(an.internal.getWidth(e)-2)+" "+In(an.internal.getHeight(e)-2)+" re"),a.push("W"),a.push("n"),a.push(In(r.x1.x)+" "+In(r.x1.y)+" m"),a.push(In(r.x2.x)+" "+In(r.x2.y)+" l"),a.push(In(r.x4.x)+" "+In(r.x4.y)+" m"),a.push(In(r.x3.x)+" "+In(r.x3.y)+" l"),a.push("s"),a.push("Q"),t.stream=a.join(`
1059`),t},OffPushDown:function(e){var t=Rd(e);t.scope=e.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+In(an.internal.getWidth(e))+" "+In(an.internal.getHeight(e))+" re"),r.push("f"),t.stream=r.join(`
1060`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+r}};an.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=an.internal.getWidth(e),r=an.internal.getHeight(e),a=Math.min(t,r);
vendor: 24,265 bytes, line 1060
1060return{x1:{x:(t-a)/2,y:(r-a)/2+a},x2:{x:(t-a)/2+a,y:(r-a)/2},x3:{x:(t-a)/2,y:(r-a)/2},x4:{x:(t-a)/2+a,y:(r-a)/2+a}}}},an.internal.getWidth=function(e){var t=0;return Gr(e)==="object"&&(t=b9(e.Rect[2])),t},an.internal.getHeight=function(e){var t=0;return Gr(e)==="object"&&(t=b9(e.Rect[3])),t};var p3e=Xa.addField=function(e){if(m3e(this,e),!(e instanceof fd))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};Xa.AcroFormChoiceField=cg,Xa.AcroFormListBox=dg,Xa.AcroFormComboBox=ug,Xa.AcroFormEditBox=f1,Xa.AcroFormButton=ci,Xa.AcroFormPushButton=m1,Xa.AcroFormRadioButton=hg,Xa.AcroFormCheckBox=p1,Xa.AcroFormTextField=Am,Xa.AcroFormPasswordField=g1,Xa.AcroFormAppearance=an,Xa.AcroForm={ChoiceField:cg,ListBox:dg,ComboBox:ug,EditBox:f1,Button:ci,PushButton:m1,RadioButton:hg,CheckBox:p1,TextField:Am,PasswordField:g1,Appearance:an},An.AcroForm={ChoiceField:cg,ListBox:dg,ComboBox:ug,EditBox:f1,Button:ci,PushButton:m1,RadioButton:hg,CheckBox:p1,TextField:Am,PasswordField:g1,Appearance:an};An.AcroForm;function xY(e){return e.reduce((function(t,r,a){return t[r]=a,t}),{})}(function(e){e.__addimage__={};var t="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]]},a=e.__addimage__.getImageFileTypeByImageData=function(k,P){var O,F,$,G,B,Y=t;if((P=P||t)==="RGBA"||k.data!==void 0&&k.data instanceof Uint8ClampedArray&&"height"in k&&"width"in k)return"RGBA";if(S(k))for(B in r)for($=r[B],O=0;O<$.length;O+=1){for(G=!0,F=0;F<$[O].length;F+=1)if($[O][F]!==void 0&&$[O][F]!==k[F]){G=!1;break}if(G===!0){Y=B;break}}else for(B in r)for($=r[B],O=0;O<$.length;O+=1){for(G=!0,F=0;F<$[O].length;F+=1)if($[O][F]!==void 0&&$[O][F]!==k.charCodeAt(F)){G=!1;break}if(G===!0){Y=B;break}}return Y===t&&P!==t&&(Y=P),Y},s=function k(P){for(var O=this.internal.write,F=this.internal.putStream,$=(0,this.internal.getFilters)();$.indexOf("FlateEncode")!==-1;)$.splice($.indexOf("FlateEncode"),1);P.objectId=this.internal.newObject();var G=[];if(G.push({key:"Type",value:"/XObject"}),G.push({key:"Subtype",value:"/Image"}),G.push({key:"Width",value:P.width}),G.push({key:"Height",value:P.height}),P.colorSpace===y.INDEXED?G.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(P.palette.length/3-1)+" "+("sMask"in P&&P.sMask!==void 0?P.objectId+2:P.objectId+1)+" 0 R]"}):(G.push({key:"ColorSpace",value:"/"+P.colorSpace}),P.colorSpace===y.DEVICE_CMYK&&G.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),G.push({key:"BitsPerComponent",value:P.bitsPerComponent}),"decodeParameters"in P&&P.decodeParameters!==void 0&&G.push({key:"DecodeParms",value:"<<"+P.decodeParameters+">>"}),"transparency"in P&&Array.isArray(P.transparency)){for(var B="",Y=0,ee=P.transparency.length;Y<ee;Y++)B+=P.transparency[Y]+" "+P.transparency[Y]+" ";G.push({key:"Mask",value:"["+B+"]"})}P.sMask!==void 0&&G.push({key:"SMask",value:P.objectId+1+" 0 R"});var J=P.filter!==void 0?["/"+P.filter]:void 0;if(F({data:P.data,additionalKeyValues:G,alreadyAppliedFilters:J,objectId:P.objectId}),O("endobj"),"sMask"in P&&P.sMask!==void 0){var H="/Predictor "+P.predictor+" /Colors 1 /BitsPerComponent "+P.bitsPerComponent+" /Columns "+P.width,q={width:P.width,height:P.height,colorSpace:"DeviceGray",bitsPerComponent:P.bitsPerComponent,decodeParameters:H,data:P.sMask};"filter"in P&&(q.filter=P.filter),k.call(this,q)}if(P.colorSpace===y.INDEXED){var K=this.internal.newObject();F({data:T(new Uint8Array(P.palette)),objectId:K}),O("endobj")}},i=function(){var k=this.internal.collections.addImage_images;for(var P in k)s.call(this,k[P])},o=function(){var k,P=this.internal.collections.addImage_images,O=this.internal.write;for(var F in P)O("/I"+(k=P[F]).index,k.objectId,"0","R")},l=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",i),this.internal.events.subscribe("putXobjectDict",o))},c=function(){var k=this.internal.collections.addImage_images;return l.call(this),k},d=function(){return Object.keys(this.internal.collections.addImage_images).length},h=function(k){return typeof e["process"+k.toUpperCase()]=="function"},u=function(k){return Gr(k)==="object"&&k.nodeType===1},f=function(k,P){if(k.nodeName==="IMG"&&k.hasAttribute("src")){var O=""+k.getAttribute("src");if(O.indexOf("data:image/")===0)return Uy(unescape(O).split("base64,").pop());var F=e.loadFile(O,!0);if(F!==void 0)return F}if(k.nodeName==="CANVAS"){if(k.width===0||k.height===0)throw new Error("Given canvas must have data. Canvas width: "+k.width+", height: "+k.height);var $;switch(P){case"PNG":$="image/png";break;case"WEBP":$="image/webp";break;case"JPEG":case"JPG":default:$="image/jpeg"}return Uy(k.toDataURL($,1).split("base64,").pop())}},m=function(k){var P=this.internal.collections.addImage_images;if(P){for(var O in P)if(k===P[O].alias)return P[O]}},b=function(k,P,O){return k||P||(k=-96,P=-96),k<0&&(k=-1*O.width*72/k/this.internal.scaleFactor),P<0&&(P=-1*O.height*72/P/this.internal.scaleFactor),k===0&&(k=P*O.width/O.height),P===0&&(P=k*O.height/O.width),[k,P]},g=function(k,P,O,F,$,G){var B=b.call(this,O,F,$),Y=this.internal.getCoordinateString,ee=this.internal.getVerticalCoordinateString,J=c.call(this);if(O=B[0],F=B[1],J[$.index]=$,G){G*=Math.PI/180;var H=Math.cos(G),q=Math.sin(G),K=function(re){return re.toFixed(4)},te=[K(H),K(q),K(-1*q),K(H),0,0,"cm"]}this.internal.write("q"),G?(this.internal.write([1,"0","0",1,Y(k),ee(P+F),"cm"].join(" ")),this.internal.write(te.join(" ")),this.internal.write([Y(O),"0","0",Y(F),"0","0","cm"].join(" "))):this.internal.write([Y(O),"0","0",Y(F),Y(k),ee(P+F),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+$.index+" Do"),this.internal.write("Q")},y=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 x=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=e.__addimage__.sHashCode=function(k){var P,O,F=0;if(typeof k=="string")for(O=k.length,P=0;P<O;P++)F=(F<<5)-F+k.charCodeAt(P),F|=0;else if(S(k))for(O=k.byteLength/2,P=0;P<O;P++)F=(F<<5)-F+k[P],F|=0;return F},j=e.__addimage__.validateStringAsBase64=function(k){(k=k||"").toString().trim();var P=!0;return k.length===0&&(P=!1),k.length%4!=0&&(P=!1),/^[A-Za-z0-9+/]+$/.test(k.substr(0,k.length-2))===!1&&(P=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(k.substr(-2))===!1&&(P=!1),P},N=e.__addimage__.extractImageFromDataUrl=function(k){var P=(k=k||"").split("base64,"),O=null;if(P.length===2){var F=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(P[0]);Array.isArray(F)&&(O={mimeType:F[1],charset:F[2],data:P[1]})}return O},_=e.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};e.__addimage__.isArrayBuffer=function(k){return _()&&k instanceof ArrayBuffer};var S=e.__addimage__.isArrayBufferView=function(k){return _()&&typeof Uint32Array<"u"&&(k instanceof Int8Array||k instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array||k instanceof Float64Array)},A=e.__addimage__.binaryStringToUint8Array=function(k){for(var P=k.length,O=new Uint8Array(P),F=0;F<P;F++)O[F]=k.charCodeAt(F);return O},T=e.__addimage__.arrayBufferToBinaryString=function(k){for(var P="",O=S(k)?k:new Uint8Array(k),F=0;F<O.length;F+=8192)P+=String.fromCharCode.apply(null,O.subarray(F,F+8192));return P};e.addImage=function(){var k,P,O,F,$,G,B,Y,ee;if(typeof arguments[1]=="number"?(P=t,O=arguments[1],F=arguments[2],$=arguments[3],G=arguments[4],B=arguments[5],Y=arguments[6],ee=arguments[7]):(P=arguments[1],O=arguments[2],F=arguments[3],$=arguments[4],G=arguments[5],B=arguments[6],Y=arguments[7],ee=arguments[8]),Gr(k=arguments[0])==="object"&&!u(k)&&"imageData"in k){var J=k;k=J.imageData,P=J.format||P||t,O=J.x||O||0,F=J.y||F||0,$=J.w||J.width||$,G=J.h||J.height||G,B=J.alias||B,Y=J.compression||Y,ee=J.rotation||J.angle||ee}var H=this.internal.getFilters();if(Y===void 0&&H.indexOf("FlateEncode")!==-1&&(Y="SLOW"),isNaN(O)||isNaN(F))throw new Error("Invalid coordinates passed to jsPDF.addImage");l.call(this);var q=R.call(this,k,P,B,Y);return g.call(this,O,F,$,G,q,ee),this};var R=function(k,P,O,F){var $,G,B;if(typeof k=="string"&&a(k)===t){k=unescape(k);var Y=M(k,!1);(Y!==""||(Y=e.loadFile(k,!0))!==void 0)&&(k=Y)}if(u(k)&&(k=f(k,P)),P=a(k,P),!h(P))throw new Error("addImage does not support files of type '"+P+"', please ensure that a plugin for '"+P+"' support is added.");if(((B=O)==null||B.length===0)&&(O=(function(ee){return typeof ee=="string"||S(ee)?w(ee):S(ee.data)?w(ee.data):null})(k)),($=m.call(this,O))||(_()&&(k instanceof Uint8Array||P==="RGBA"||(G=k,k=A(k))),$=this["process"+P.toUpperCase()](k,d.call(this),O,(function(ee){return ee&&typeof ee=="string"&&(ee=ee.toUpperCase()),ee in e.image_compression?ee:x.NONE})(F),G)),!$)throw new Error("An unknown error occurred whilst processing the image.");return $},M=e.__addimage__.convertBase64ToBinaryString=function(k,P){var O;P=typeof P!="boolean"||P;var F,$="";if(typeof k=="string"){F=(O=N(k))!==null?O.data:k;try{$=Uy(F)}catch(G){if(P)throw j(F)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+G.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return $};e.getImageProperties=function(k){var P,O,F="";if(u(k)&&(k=f(k)),typeof k=="string"&&a(k)===t&&((F=M(k,!1))===""&&(F=e.loadFile(k)||""),k=F),O=a(k),!h(O))throw new Error("addImage does not support files of type '"+O+"', please ensure that a plugin for '"+O+"' support is added.");if(!_()||k instanceof Uint8Array||(k=A(k)),!(P=this["process"+O.toUpperCase()](k)))throw new Error("An unknown error occurred whilst processing the image");return P.fileType=O,P}})(An.API),(function(e){var t=function(r){if(r!==void 0&&r!="")return!0};An.API.events.push(["addPage",function(r){this.internal.getPageInfo(r.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(r){for(var a,s,i,o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(r.objId),d=r.pageContext.annotations,h=!1,u=0;u<d.length&&!h;u++)switch((a=d[u]).type){case"link":(t(a.options.url)||t(a.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(h!=0){this.internal.write("/Annots [");for(var f=0;f<d.length;f++){a=d[f];var m=this.internal.pdfEscape,b=this.internal.getEncryptor(r.objId);switch(a.type){case"reference":this.internal.write(" "+a.object.objId+" 0 R ");break;case"text":var g=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),x=this.internal.getEncryptor(g.objId),w=a.title||"Note";i="<</Type /Annot /Subtype /Text "+(s="/Rect ["+o(a.bounds.x)+" "+l(a.bounds.y+a.bounds.h)+" "+o(a.bounds.x+a.bounds.w)+" "+l(a.bounds.y)+"] ")+"/Contents ("+m(x(a.contents))+")",i+=" /Popup "+y.objId+" 0 R",i+=" /P "+c.objId+" 0 R",i+=" /T ("+m(x(w))+") >>",g.content=i;var j=g.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(s="/Rect ["+o(a.bounds.x+30)+" "+l(a.bounds.y+a.bounds.h)+" "+o(a.bounds.x+a.bounds.w+30)+" "+l(a.bounds.y)+"] ")+" /Parent "+j,a.open&&(i+=" /Open true"),i+=" >>",y.content=i,this.internal.write(g.objId,"0 R",y.objId,"0 R");break;case"freetext":s="/Rect ["+o(a.bounds.x)+" "+l(a.bounds.y)+" "+o(a.bounds.x+a.bounds.w)+" "+l(a.bounds.y+a.bounds.h)+"] ";var N=a.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+s+"/Contents ("+m(b(a.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+N+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(a.options.name){var _=this.annotations._nameMap[a.options.name];a.options.pageNumber=_.page,a.options.top=_.y}else a.options.top||(a.options.top=0);if(s="/Rect ["+a.finalBounds.x+" "+a.finalBounds.y+" "+a.finalBounds.w+" "+a.finalBounds.h+"] ",i="",a.options.url)i="<</Type /Annot /Subtype /Link "+s+"/Border [0 0 0] /A <</S /URI /URI ("+m(b(a.options.url))+") >>";else if(a.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+s+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(a.options.pageNumber).objId+" 0 R",a.options.magFactor=a.options.magFactor||"XYZ",a.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+a.options.top+"]";break;case"FitV":a.options.left=a.options.left||0,i+=" /FitV "+a.options.left+"]";break;case"XYZ":default:var S=l(a.options.top);a.options.left=a.options.left||0,a.options.zoom===void 0&&(a.options.zoom=0),i+=" /XYZ "+a.options.left+" "+S+" "+a.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),e.createAnnotation=function(r){var a=this.internal.getCurrentPageInfo();switch(r.type){case"link":this.link(r.bounds.x,r.bounds.y,r.bounds.w,r.bounds.h,r);break;case"text":case"freetext":a.pageContext.annotations.push(r)}},e.link=function(r,a,s,i,o){var l=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;l.pageContext.annotations.push({finalBounds:{x:c(r),y:d(a),w:c(r+s),h:d(a+i)},options:o,type:"link"})},e.textWithLink=function(r,a,s,i){var o,l,c=this.getTextWidth(r),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){l=i.maxWidth;var h=this.splitTextToSize(r,l).length;o=Math.ceil(d*h)}else l=c,o=d;return this.text(r,a,s,i),s+=.2*d,i.align==="center"&&(a-=c/2),i.align==="right"&&(a-=c),this.link(a,s-d,l,o,i),c},e.getTextWidth=function(r){var a=this.internal.getFontSize();return this.getStringUnitWidth(r)*a/this.internal.scaleFactor}})(An.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]},r={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}},a={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},s=[1570,1571,1573,1575];e.__arabicParser__={};var i=e.__arabicParser__.isInArabicSubstitutionA=function(g){return t[g.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(g){return typeof g=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(g)},l=e.__arabicParser__.isArabicEndLetter=function(g){return o(g)&&i(g)&&t[g.charCodeAt(0)].length<=2},c=e.__arabicParser__.isArabicAlfLetter=function(g){return o(g)&&s.indexOf(g.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(g){return o(g)&&i(g)&&t[g.charCodeAt(0)].length>=1};var d=e.__arabicParser__.arabicLetterHasFinalForm=function(g){return o(g)&&i(g)&&t[g.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(g){return o(g)&&i(g)&&t[g.charCodeAt(0)].length>=3};var h=e.__arabicParser__.arabicLetterHasMedialForm=function(g){return o(g)&&i(g)&&t[g.charCodeAt(0)].length==4},u=e.__arabicParser__.resolveLigatures=function(g){var y=0,x=r,w="",j=0;for(y=0;y<g.length;y+=1)x[g.charCodeAt(y)]!==void 0?(j++,typeof(x=x[g.charCodeAt(y)])=="number"&&(w+=String.fromCharCode(x),x=r,j=0),y===g.length-1&&(x=r,w+=g.charAt(y-(j-1)),y-=j-1,j=0)):(x=r,w+=g.charAt(y-j),y-=j,j=0);return w};e.__arabicParser__.isArabicDiacritic=function(g){return g!==void 0&&a[g.charCodeAt(0)]!==void 0};var f=e.__arabicParser__.getCorrectForm=function(g,y,x){return o(g)?i(g)===!1?-1:!d(g)||!o(y)&&!o(x)||!o(x)&&l(y)||l(g)&&!o(y)||l(g)&&c(y)||l(g)&&l(y)?0:h(g)&&o(y)&&!l(y)&&o(x)&&d(x)?3:l(g)||!o(x)?1:2:-1},m=function(g){var y=0,x=0,w=0,j="",N="",_="",S=(g=g||"").split("\\s+"),A=[];for(y=0;y<S.length;y+=1){for(A.push(""),x=0;x<S[y].length;x+=1)j=S[y][x],N=S[y][x-1],_=S[y][x+1],o(j)?(w=f(j,N,_),A[y]+=w!==-1?String.fromCharCode(t[j.charCodeAt(0)][w]):j):A[y]+=j;A[y]=u(A[y])}return A.join(" ")},b=e.__arabicParser__.processArabic=e.processArabic=function(){var g,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,x=[];if(Array.isArray(y)){var w=0;for(x=[],w=0;w<y.length;w+=1)Array.isArray(y[w])?x.push([m(y[w][0]),y[w][1],y[w][2]]):x.push([m(y[w])]);g=x}else g=m(y);return typeof arguments[0]=="string"?g:(arguments[0].text=g,arguments[0])};e.events.push(["preProcessText",b])})(An.API),An.API.autoPrint=function(e){var t;switch((e=e||{}).variant=e.variant||"non-conform",e.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default: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")}))}return this},(function(e){var t=function(){var r=void 0;Object.defineProperty(this,"pdf",{get:function(){return r},set:function(l){r=l}});var a=150;Object.defineProperty(this,"width",{get:function(){return a},set:function(l){a=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=a+1)}});var s=300;Object.defineProperty(this,"height",{get:function(){return s},set:function(l){s=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=s+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(l){o=l}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(r,a){var s;if((r=r||"2d")!=="2d")return null;for(s in a)this.pdf.context2d.hasOwnProperty(s)&&(this.pdf.context2d[s]=a[s]);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}])})(An.API),(function(e){var t={left:0,top:0,bottom:0,right:0},r=!1,a=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(),s.call(this))},s=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(g){c=g}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(g){d=g}});var h=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return h},set:function(g){h=g}});var u=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return u},set:function(g){u=g}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(g){f=g}});var m=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return m},set:function(g){m=g}});var b=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return b},set:function(g){b=g}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(c){return a.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},e.getTextDimensions=function(c,d){a.call(this);var h=(d=d||{}).fontSize||this.getFontSize(),u=d.font||this.getFont(),f=d.scaleFactor||this.internal.scaleFactor,m=0,b=0,g=0,y=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var x=d.maxWidth;x>0?typeof c=="string"?c=this.splitTextToSize(c,x):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce((function(j,N){return j.concat(y.splitTextToSize(N,x))}),[])):c=Array.isArray(c)?c:[c];for(var w=0;w<c.length;w++)m<(g=this.getStringUnitWidth(c[w],{font:u})*h)&&(m=g);return m!==0&&(b=c.length),{w:m/=f,h:Math.max((b*h*this.getLineHeightFactor()-h*(this.getLineHeightFactor()-1))/f,0)}},e.cellAddPage=function(){a.call(this),this.addPage();var c=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new i(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var c;c=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),a.call(this);var d=this.internal.__cell__.lastCell,h=this.internal.__cell__.padding,u=this.internal.__cell__.margins||t,f=this.internal.__cell__.tableHeaderRow,m=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===c.lineNumber?(c.x=(d.x||0)+(d.width||0),c.y=d.y||0):d.y+d.height+c.height+u.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=u.top,m&&f&&(this.printHeaderRow(c.lineNumber,!0),c.y+=f[0].height)):c.y=d.y+d.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,r===!0?"FD":void 0),c.al
1060ign==="right"?this.text(c.text,c.x+c.width-h,c.y+h,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+h,{align:"center",baseline:"top",maxWidth:c.width-h-h}):this.text(c.text,c.x+h,c.y+h,{align:"left",baseline:"top",maxWidth:c.width-h-h})),this.internal.__cell__.lastCell=c,this};e.table=function(c,d,h,u,f){if(a.call(this),!h)throw new Error("No data for PDF table.");var m,b,g,y,x=[],w=[],j=[],N={},_={},S=[],A=[],T=(f=f||{}).autoSize||!1,R=f.printHeaders!==!1,M=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,k=f.margins||Object.assign({width:this.getPageWidth()},t),P=typeof f.padding=="number"?f.padding:3,O=f.headerBackgroundColor||"#c8c8c8",F=f.headerTextColor||"#000";if(s.call(this),this.internal.__cell__.printHeaders=R,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=M,this.internal.__cell__.padding=P,this.internal.__cell__.headerBackgroundColor=O,this.internal.__cell__.headerTextColor=F,this.setFontSize(M),u==null)w=x=Object.keys(h[0]),j=x.map((function(){return"left"}));else if(Array.isArray(u)&&Gr(u[0])==="object")for(x=u.map((function(J){return J.name})),w=u.map((function(J){return J.prompt||J.name||""})),j=u.map((function(J){return J.align||"left"})),m=0;m<u.length;m+=1)_[u[m].name]=u[m].width*(19.049976/25.4);else Array.isArray(u)&&typeof u[0]=="string"&&(w=x=u,j=x.map((function(){return"left"})));if(T||Array.isArray(u)&&typeof u[0]=="string")for(m=0;m<x.length;m+=1){for(N[y=x[m]]=h.map((function(J){return J[y]})),this.setFont(void 0,"bold"),S.push(this.getTextDimensions(w[m],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),b=N[y],this.setFont(void 0,"normal"),g=0;g<b.length;g+=1)S.push(this.getTextDimensions(b[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);_[y]=Math.max.apply(null,S)+P+P,S=[]}if(R){var $={};for(m=0;m<x.length;m+=1)$[x[m]]={},$[x[m]].text=w[m],$[x[m]].align=j[m];var G=l.call(this,$,_);A=x.map((function(J){return new i(c,d,_[J],G,$[J].text,void 0,$[J].align)})),this.setTableHeaderRow(A),this.printHeaderRow(1,!1)}var B=u.reduce((function(J,H){return J[H.name]=H.align,J}),{});for(m=0;m<h.length;
vendor: 13,756 bytes, line 1060
1060m+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:m,data:h[m]},this);var Y=l.call(this,h[m],_);for(g=0;g<x.length;g+=1){var ee=h[m][x[g]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:m,col:g,data:ee},this),o.call(this,new i(c,d,_[x[g]],Y,ee,m+2,B[x[g]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=d,this};var l=function(c,d){var h=this.internal.__cell__.padding,u=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(c).map((function(m){var b=c[m];return this.splitTextToSize(b.hasOwnProperty("text")?b.text:b,d[m]-h-h)}),this).map((function(m){return this.getLineHeightFactor()*m.length*u/f+h+h}),this).reduce((function(m,b){return Math.max(m,b)}),0)};e.setTableHeaderRow=function(c){a.call(this),this.internal.__cell__.tableHeaderRow=c},e.printHeaderRow=function(c,d){if(a.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var h;if(r=!0,typeof this.internal.__cell__.headerFunction=="function"){var u=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(u[0],u[1],u[2],u[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],m=0;m<this.internal.__cell__.tableHeaderRow.length;m+=1){h=this.internal.__cell__.tableHeaderRow[m].clone(),d&&(h.y=this.internal.__cell__.margins.top||0,f.push(h)),h.lineNumber=c;var b=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,h),this.setTextColor(b)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),r=!1}})(An.API);var yY={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},vY=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],e3=xY(vY),bY=[100,200,300,400,500,600,700,800,900],g3e=xY(bY);function t3(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),r=(function(i){return yY[i=i||"normal"]?i:"normal"})(e.style),a=(function(i){if(!i)return 400;if(typeof i=="number")return i>=100&&i<=900&&i%100==0?i:400;if(/^\d00$/.test(i))return parseInt(i);switch(i){case"bold":return 700;case"normal":default:return 400}})(e.weight),s=(function(i){return typeof e3[i=i||"normal"]=="number"?i:"normal"})(e.stretch);return{family:t,style:r,weight:a,stretch:s,src:e.src||[],ref:e.ref||{name:t,style:[s,r,a].join(" ")}}}function w9(e,t,r,a){var s;for(s=r;s>=0&&s<t.length;s+=a)if(e[t[s]])return e[t[s]];for(s=r;s>=0&&s<t.length;s-=a)if(e[t[s]])return e[t[s]]}var x3e={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},j9={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function N9(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function y3e(e,t,r){for(var a=(r=r||{}).defaultFontFamily||"times",s=Object.assign({},x3e,r.genericFontFamilies||{}),i=null,o=null,l=0;l<t.length;++l)if(s[(i=t3(t[l])).family]&&(i.family=s[i.family]),e.hasOwnProperty(i.family)){o=e[i.family];break}if(!(o=o||e[a]))throw new Error("Could not find a font-family for the rule '"+N9(i)+"' and default family '"+a+"'.");if(o=(function(c,d){if(d[c])return d[c];var h=e3[c],u=h<=e3.normal?-1:1,f=w9(d,vY,h,u);if(!f)throw new Error("Could not find a matching font-stretch value for "+c);return f})(i.stretch,o),o=(function(c,d){if(d[c])return d[c];for(var h=yY[c],u=0;u<h.length;++u)if(d[h[u]])return d[h[u]];throw new Error("Could not find a matching font-style for "+c)})(i.style,o),!(o=(function(c,d){if(d[c])return d[c];if(c===400&&d[500])return d[500];if(c===500&&d[400])return d[400];var h=g3e[c],u=w9(d,bY,h,c<400?-1:1);if(!u)throw new Error("Could not find a matching font-weight for value "+c);return u})(i.weight,o)))throw new Error("Failed to resolve a font for the rule '"+N9(i)+"'.");return o}function _9(e){return e.trimLeft()}function v3e(e,t){for(var r=0;r<e.length;){if(e.charAt(r)===t)return[e.substring(0,r),e.substring(r+1)];r+=1}return null}function b3e(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 Ub,S9,C9,Q4=["times"];(function(e){var t,r,a,s,i,o,l,c,d,h=function(q){return q=q||{},this.isStrokeTransparent=q.isStrokeTransparent||!1,this.strokeOpacity=q.strokeOpacity||1,this.strokeStyle=q.strokeStyle||"#000000",this.fillStyle=q.fillStyle||"#000000",this.isFillTransparent=q.isFillTransparent||!1,this.fillOpacity=q.fillOpacity||1,this.font=q.font||"10px sans-serif",this.textBaseline=q.textBaseline||"alphabetic",this.textAlign=q.textAlign||"left",this.lineWidth=q.lineWidth||1,this.lineJoin=q.lineJoin||"miter",this.lineCap=q.lineCap||"butt",this.path=q.path||[],this.transform=q.transform!==void 0?q.transform.clone():new c,this.globalCompositeOperation=q.globalCompositeOperation||"normal",this.globalAlpha=q.globalAlpha||1,this.clip_path=q.clip_path||[],this.currentPoint=q.currentPoint||new o,this.miterLimit=q.miterLimit||10,this.lastPoint=q.lastPoint||new o,this.lineDashOffset=q.lineDashOffset||0,this.lineDash=q.lineDash||[],this.margin=q.margin||[0,0,0,0],this.prevPageLastElemOffset=q.prevPageLastElemOffset||0,this.ignoreClearRect=typeof q.ignoreClearRect!="boolean"||q.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new u(this),t=this.internal.f2,r=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,s=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,o=this.internal.Point,l=this.internal.Rectangle,c=this.internal.Matrix,d=new h}]);var u=function(q){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var K=q;Object.defineProperty(this,"pdf",{get:function(){return K}});var te=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return te},set:function(Ne){te=!!Ne}});var re=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return re},set:function(Ne){re=!!Ne}});var Q=0;Object.defineProperty(this,"posX",{get:function(){return Q},set:function(Ne){isNaN(Ne)||(Q=Ne)}});var ne=0;Object.defineProperty(this,"posY",{get:function(){return ne},set:function(Ne){isNaN(Ne)||(ne=Ne)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(Ne){var ue;typeof Ne=="number"?ue=[Ne,Ne,Ne,Ne]:((ue=new Array(4))[0]=Ne[0],ue[1]=Ne.length>=2?Ne[1]:ue[0],ue[2]=Ne.length>=3?Ne[2]:ue[0],ue[3]=Ne.length>=4?Ne[3]:ue[1]),d.margin=ue}});var oe=!1;Object.defineProperty(this,"autoPaging",{get:function(){return oe},set:function(Ne){oe=Ne}});var ae=0;Object.defineProperty(this,"lastBreak",{get:function(){return ae},set:function(Ne){ae=Ne}});var le=[];Object.defineProperty(this,"pageBreaks",{get:function(){return le},set:function(Ne){le=Ne}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(Ne){Ne instanceof h&&(d=Ne)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(Ne){d.path=Ne}});var je=[];Object.defineProperty(this,"ctxStack",{get:function(){return je},set:function(Ne){je=Ne}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(Ne){var ue;ue=f(Ne),this.ctx.fillStyle=ue.style,this.ctx.isFillTransparent=ue.a===0,this.ctx.fillOpacity=ue.a,this.pdf.setFillColor(ue.r,ue.g,ue.b,{a:ue.a}),this.pdf.setTextColor(ue.r,ue.g,ue.b,{a:ue.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(Ne){var ue=f(Ne);this.ctx.strokeStyle=ue.style,this.ctx.isStrokeTransparent=ue.a===0,this.ctx.strokeOpacity=ue.a,ue.a===0?this.pdf.setDrawColor(255,255,255):(ue.a,this.pdf.setDrawColor(ue.r,ue.g,ue.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(Ne){["butt","round","square"].indexOf(Ne)!==-1&&(this.ctx.lineCap=Ne,this.pdf.setLineCap(Ne))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(Ne){isNaN(Ne)||(this.ctx.lineWidth=Ne,this.pdf.setLineWidth(Ne))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(Ne){["bevel","round","miter"].indexOf(Ne)!==-1&&(this.ctx.lineJoin=Ne,this.pdf.setLineJoin(Ne))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(Ne){isNaN(Ne)||(this.ctx.miterLimit=Ne,this.pdf.setMiterLimit(Ne))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(Ne){this.ctx.textBaseline=Ne}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(Ne){["right","end","center","left","start"].indexOf(Ne)!==-1&&(this.ctx.textAlign=Ne)}});var xe=null;function Fe(Ne,ue){if(xe===null){var rt=(function(Te){var Pe=[];return Object.keys(Te).forEach((function($e){Te[$e].forEach((function(Ve){var be=null;switch(Ve){case"bold":be={family:$e,weight:"bold"};break;case"italic":be={family:$e,style:"italic"};break;case"bolditalic":be={family:$e,weight:"bold",style:"italic"};break;case"":case"normal":be={family:$e}}be!==null&&(be.ref={name:$e,style:Ve},Pe.push(be))}))})),Pe})(Ne.getFontList());xe=(function(Te){for(var Pe={},$e=0;$e<Te.length;++$e){var Ve=t3(Te[$e]),be=Ve.family,We=Ve.stretch,Ze=Ve.style,st=Ve.weight;Pe[be]=Pe[be]||{},Pe[be][We]=Pe[be][We]||{},Pe[be][We][Ze]=Pe[be][We][Ze]||{},Pe[be][We][Ze][st]=Ve}return Pe})(rt.concat(ue))}return xe}var he=null;Object.defineProperty(this,"fontFaces",{get:function(){return he},set:function(Ne){xe=null,he=Ne}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(Ne){var ue;if(this.ctx.font=Ne,(ue=/^\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-z]+?)\s*$/i.exec(Ne))!==null){var rt=ue[1],Te=(ue[2],ue[3]),Pe=ue[4],$e=(ue[5],ue[6]),Ve=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Pe)[2];Pe=Math.floor(Ve==="px"?parseFloat(Pe)*this.pdf.internal.scaleFactor:Ve==="em"?parseFloat(Pe)*this.pdf.getFontSize():parseFloat(Pe)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Pe);var be=(function(on){var It,_t,xr=[],xn=on.trim();if(xn==="")return Q4;if(xn in j9)return[j9[xn]];for(;xn!=="";){switch(_t=null,It=(xn=_9(xn)).charAt(0)){case'"':case"'":_t=v3e(xn.substring(1),It);break;default:_t=b3e(xn)}if(_t===null||(xr.push(_t[0]),(xn=_9(_t[1]))!==""&&xn.charAt(0)!==","))return Q4;xn=xn.replace(/^,/,"")}return xr})($e);if(this.fontFaces){var We=y3e(Fe(this.pdf,this.fontFaces),be.map((function(on){return{family:on,stretch:"normal",weight:Te,style:rt}})));this.pdf.setFont(We.ref.name,We.ref.style)}else{var Ze="";(Te==="bold"||parseInt(Te,10)>=700||rt==="bold")&&(Ze="bold"),rt==="italic"&&(Ze+="italic"),Ze.length===0&&(Ze="normal");for(var st="",Mt={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"},Ht=0;Ht<be.length;Ht++){if(this.pdf.internal.getFont(be[Ht],Ze,{noFallback:!0,disableWarning:!0})!==void 0){st=be[Ht];break}if(Ze==="bolditalic"&&this.pdf.internal.getFont(be[Ht],"bold",{noFallback:!0,disableWarning:!0})!==void 0)st=be[Ht],Ze="bold";else if(this.pdf.internal.getFont(be[Ht],"normal",{noFallback:!0,disableWarning:!0})!==void 0){st=be[Ht],Ze="normal";break}}if(st===""){for(var Yt=0;Yt<be.length;Yt++)if(Mt[be[Yt]]){st=Mt[be[Yt]];break}}st=st===""?"Times":st,this.pdf.setFont(st,Ze)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(Ne){this.ctx.globalCompositeOperation=Ne}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(Ne){this.ctx.globalAlpha=Ne}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(Ne){this.ctx.lineDashOffset=Ne,H.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(Ne){this.ctx.lineDash=Ne,H.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(Ne){this.ctx.ignoreClearRect=!!Ne}})};u.prototype.setLineDash=function(q){this.lineDash=q},u.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},u.prototype.fill=function(){N.call(this,"fill",!1)},u.prototype.stroke=function(){N.call(this,"stroke",!1)},u.prototype.beginPath=function(){this.path=[{type:"begin"}]},u.prototype.moveTo=function(q,K){if(isNaN(q)||isNaN(K))throw oa.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var te=this.ctx.transform.applyToPoint(new o(q,K));this.path.push({type:"mt",x:te.x,y:te.y}),this.ctx.lastPoint=new o(q,K)},u.prototype.closePath=function(){var q=new o(0,0),K=0;for(K=this.path.length-1;K!==-1;K--)if(this.path[K].type==="begin"&&Gr(this.path[K+1])==="object"&&typeof this.path[K+1].x=="number"){q=new o(this.path[K+1].x,this.path[K+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(q.x,q.y)},u.prototype.lineTo=function(q,K){if(isNaN(q)||isNaN(K))throw oa.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to 
1060jsPDF.context2d.lineTo");var te=this.ctx.transform.applyToPoint(new o(q,K));this.path.push({type:"lt",x:te.x,y:te.y}),this.ctx.lastPoint=new o(te.x,te.y)},u.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),N.call(this,null,!0)},u.prototype.quadraticCurveTo=function(q,K,te,re){if(isNaN(te)||isNaN(re)||isNaN(q)||isNaN(K))throw oa.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var Q=this.ctx.transform.applyToPoint(new o(te,re)),ne=this.ctx.transform.applyToPoint(new o(q,K));this.path.push({type:"qct",x1:ne.x,y1:ne.y,x:Q.x,y:Q.y}),this.ctx.lastPoint=new o(Q.x,Q.y)},u.prototype.bezierCurveTo=function(q,K,te,re,Q,ne){if(isNaN(Q)||isNaN(ne)||isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re))throw oa.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var oe=this.ctx.transform.applyToPoint(new o(Q,ne)),ae=this.ctx.transform.applyToPoint(new o(q,K)),le=this.ctx.transform.applyToPoint(new o(te,re));this.path.push({type:"bct",x1:ae.x,y1:ae.y,x2:le.x,y2:le.y,x:oe.x,y:oe.y}),this.ctx.lastPoint=new o(oe.x,oe.y)},u.prototype.arc=function(q,K,te,re,Q,ne){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re)||isNaN(Q))throw oa.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ne=!!ne,!this.ctx.transform.isIdentity){var oe=this.ctx.transform.applyToPoint(new o(q,K));q=oe.x,K=oe.y;var ae=this.ctx.transform.applyToPoint(new o(0,te)),le=this.ctx.transform.applyToPoint(new o(0,0));te=Math.sqrt(Math.pow(ae.x-le.x,2)+Math.pow(ae.y-le.y,2))}Math.abs(Q-re)>=2*Math.PI&&(re=0,Q=2*Math.PI),this.path.push({type:"arc",x:q,y:K,radius:te,startAngle:re,endAngle:Q,counterclockwise:ne})},u.prototype.arcTo=function(q,K,te,re,Q){throw new Error("arcTo not implemented.")},u.prototype.rect=function(q,K,te,re){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re))throw oa.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(q,K),this.lineTo(q+te,K),this.lineTo(q+te,K+re),this.lineTo(q,K+re),this.lineTo(q,K),this.lineTo(q+te,K),this.lineTo(q,K)},u.prototype.fillRect=function(q,K,te,re){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re))throw oa.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var Q={};this.lineCap!=="butt"&&(Q.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(Q.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(q,K,te,re),this.fill(),Q.hasOwnProperty("lineCap")&&(this.lineCap=Q.lineCap),Q.hasOwnProperty("lineJoin")&&(this.lineJoin=Q.lineJoin)}},u.prototype.strokeRect=function(q,K,te,re){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re))throw oa.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");b.call(this)||(this.beginPath(),this.rect(q,K,te,re),this.stroke())},u.prototype.clearRect=function(q,K,te,re){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re))throw oa.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(q,K,te,re))},u.prototype.save=function(q){q=typeof q!="boolean"||q;for(var K=this.pdf.internal.getCurrentPageInfo().pageNumber,te=0;te<this.pdf.internal.getNumberOfPages();te++)this.pdf.setPage(te+1),this.pdf.internal.out("q");if(this.pdf.setPage(K),q){this.ctx.fontSize=this.pdf.internal.getFontSize();var re=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=re}},u.prototype.restore=function(q){q=typeof q!="boolean"||q;for(var K=this.pdf.internal.getCurrentPageInfo().pageNumber,te=0;te<this.pdf.internal.getNumberOfPages();te++)this.pdf.setPage(te+1),this.pdf.internal.out("Q");this.pdf.setPage(K),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)},u.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(q){var K,te,re,Q;if(q.isCanvasGradient===!0&&(q=q.getColor()),!q)return{r:0,g:0,b:0,a:0,style:q};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(q))K=0,te=0,re=0,Q=0;else{var ne=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(q);if(ne!==null)K=parseInt(ne[1]),te=parseInt(ne[2]),re=parseInt(ne[3]),Q=1;
vendor: 17,156 bytes, line 1060
1060else if((ne=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(q))!==null)K=parseInt(ne[1]),te=parseInt(ne[2]),re=parseInt(ne[3]),Q=parseFloat(ne[4]);else{if(Q=1,typeof q=="string"&&q.charAt(0)!=="#"){var oe=new uY(q);q=oe.ok?oe.toHex():"#000000"}q.length===4?(K=q.substring(1,2),K+=K,te=q.substring(2,3),te+=te,re=q.substring(3,4),re+=re):(K=q.substring(1,3),te=q.substring(3,5),re=q.substring(5,7)),K=parseInt(K,16),te=parseInt(te,16),re=parseInt(re,16)}}return{r:K,g:te,b:re,a:Q,style:q}},m=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},b=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};u.prototype.fillText=function(q,K,te,re){if(isNaN(K)||isNaN(te)||typeof q!="string")throw oa.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(re=isNaN(re)?void 0:re,!m.call(this)){var Q=Y(this.ctx.transform.rotation),ne=this.ctx.transform.scaleX;P.call(this,{text:q,x:K,y:te,scale:ne,angle:Q,align:this.textAlign,maxWidth:re})}},u.prototype.strokeText=function(q,K,te,re){if(isNaN(K)||isNaN(te)||typeof q!="string")throw oa.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!b.call(this)){re=isNaN(re)?void 0:re;var Q=Y(this.ctx.transform.rotation),ne=this.ctx.transform.scaleX;P.call(this,{text:q,x:K,y:te,scale:ne,renderingMode:"stroke",angle:Q,align:this.textAlign,maxWidth:re})}},u.prototype.measureText=function(q){if(typeof q!="string")throw oa.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var K=this.pdf,te=this.pdf.internal.scaleFactor,re=K.internal.getFontSize(),Q=K.getStringUnitWidth(q)*re/K.internal.scaleFactor,ne=function(oe){var ae=(oe=oe||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return ae}}),this};return new ne({width:Q*=Math.round(96*te/72*1e4)/1e4})},u.prototype.scale=function(q,K){if(isNaN(q)||isNaN(K))throw oa.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var te=new c(q,0,0,K,0,0);this.ctx.transform=this.ctx.transform.multiply(te)},u.prototype.rotate=function(q){if(isNaN(q))throw oa.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var K=new c(Math.cos(q),Math.sin(q),-Math.sin(q),Math.cos(q),0,0);this.ctx.transform=this.ctx.transform.multiply(K)},u.prototype.translate=function(q,K){if(isNaN(q)||isNaN(K))throw oa.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var te=new c(1,0,0,1,q,K);this.ctx.transform=this.ctx.transform.multiply(te)},u.prototype.transform=function(q,K,te,re,Q,ne){if(isNaN(q)||isNaN(K)||isNaN(te)||isNaN(re)||isNaN(Q)||isNaN(ne))throw oa.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var oe=new c(q,K,te,re,Q,ne);this.ctx.transform=this.ctx.transform.multiply(oe)},u.prototype.setTransform=function(q,K,te,re,Q,ne){q=isNaN(q)?1:q,K=isNaN(K)?0:K,te=isNaN(te)?0:te,re=isNaN(re)?1:re,Q=isNaN(Q)?0:Q,ne=isNaN(ne)?0:ne,this.ctx.transform=new c(q,K,te,re,Q,ne)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};u.prototype.drawImage=function(q,K,te,re,Q,ne,oe,ae,le){var je=this.pdf.getImageProperties(q),xe=1,Fe=1,he=1,Ne=1;re!==void 0&&ae!==void 0&&(he=ae/re,Ne=le/Q,xe=je.width/re*ae/re,Fe=je.height/Q*le/Q),ne===void 0&&(ne=K,oe=te,K=0,te=0),re!==void 0&&ae===void 0&&(ae=re,le=Q),re===void 0&&ae===void 0&&(ae=je.width,le=je.height);for(var ue,rt=this.ctx.transform.decompose(),Te=Y(rt.rotate.shx),Pe=new c,$e=(Pe=(Pe=(Pe=Pe.multiply(rt.translate)).multiply(rt.skew)).multiply(rt.scale)).applyToRectangle(new l(ne-K*he,oe-te*Ne,re*xe,Q*Fe)),Ve=y.call(this,$e),be=[],We=0;We<Ve.length;We+=1)be.indexOf(Ve[We])===-1&&be.push(Ve[We]);if(j(be),this.autoPaging)for(var Ze=be[0],st=be[be.length-1],Mt=Ze;Mt<st+1;Mt++){this.pdf.setPage(Mt);var Ht=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Yt=Mt===1?this.posY+this.margin[0]:this.margin[0],on=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],It=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],_t=Mt===1?0:on+(Mt-2)*It;if(this.ctx.clip_path.length!==0){var xr=this.path;ue=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(ue,this.posX+this.margin[3],-_t+Yt+this.ctx.prevPageLastElemOffset),_.call(this,"fill",!0),this.path=xr}var xn=JSON.parse(JSON.stringify($e));xn=w([xn],this.posX+this.margin[3],-_t+Yt+this.ctx.prevPageLastElemOffset)[0];var Rr=(Mt>Ze||Mt<st)&&g.call(this);Rr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ht,It,null).clip().discardPath()),this.pdf.addImage(q,"JPEG",xn.x,xn.y,xn.w,xn.h,null,null,Te),Rr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(q,"JPEG",$e.x,$e.y,$e.w,$e.h,null,null,Te)};var y=function(q,K,te){var re=[];K=K||this.pdf.internal.pageSize.width,te=te||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var Q=this.posY+this.ctx.prevPageLastElemOffset;switch(q.type){default:case"mt":case"lt":re.push(Math.floor((q.y+Q)/te)+1);break;case"arc":re.push(Math.floor((q.y+Q-q.radius)/te)+1),re.push(Math.floor((q.y+Q+q.radius)/te)+1);break;case"qct":var ne=ee(this.ctx.lastPoint.x,this.ctx.lastPoint.y,q.x1,q.y1,q.x,q.y);re.push(Math.floor((ne.y+Q)/te)+1),re.push(Math.floor((ne.y+ne.h+Q)/te)+1);break;case"bct":var oe=J(this.ctx.lastPoint.x,this.ctx.lastPoint.y,q.x1,q.y1,q.x2,q.y2,q.x,q.y);re.push(Math.floor((oe.y+Q)/te)+1),re.push(Math.floor((oe.y+oe.h+Q)/te)+1);break;case"rect":re.push(Math.floor((q.y+Q)/te)+1),re.push(Math.floor((q.y+q.h+Q)/te)+1)}for(var ae=0;ae<re.length;ae+=1)for(;this.pdf.internal.getNumberOfPages()<re[ae];)x.call(this);return re},x=function(){var q=this.fillStyle,K=this.strokeStyle,te=this.font,re=this.lineCap,Q=this.lineWidth,ne=this.lineJoin;this.pdf.addPage(),this.fillStyle=q,this.strokeStyle=K,this.font=te,this.lineCap=re,this.lineWidth=Q,this.lineJoin=ne},w=function(q,K,te){for(var re=0;re<q.length;re++)switch(q[re].type){case"bct":q[re].x2+=K,q[re].y2+=te;case"qct":q[re].x1+=K,q[re].y1+=te;case"mt":case"lt":case"arc":default:q[re].x+=K,q[re].y+=te}return q},j=function(q){return q.sort((function(K,te){return K-te}))},N=function(q,K){for(var te,re,Q=this.fillStyle,ne=this.strokeStyle,oe=this.lineCap,ae=this.lineWidth,le=Math.abs(ae*this.ctx.transform.scaleX),je=this.lineJoin,xe=JSON.parse(JSON.stringify(this.path)),Fe=JSON.parse(JSON.stringify(this.path)),he=[],Ne=0;Ne<Fe.length;Ne++)if(Fe[Ne].x!==void 0)for(var ue=y.call(this,Fe[Ne]),rt=0;rt<ue.length;rt+=1)he.indexOf(ue[rt])===-1&&he.push(ue[rt]);for(var Te=0;Te<he.length;Te++)for(;this.pdf.internal.getNumberOfPages()<he[Te];)x.call(this);if(j(he),this.autoPaging)for(var Pe=he[0],$e=he[he.length-1],Ve=Pe;Ve<$e+1;Ve++){this.pdf.setPage(Ve),this.fillStyle=Q,this.strokeStyle=ne,this.lineCap=oe,this.lineWidth=le,this.lineJoin=je;var be=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],We=Ve===1?this.posY+this.margin[0]:this.margin[0],Ze=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],st=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Mt=Ve===1?0:Ze+(Ve-2)*st;if(this.ctx.clip_path.length!==0){var Ht=this.path;te=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(te,this.posX+this.margin[3],-Mt+We+this.ctx.prevPageLastElemOffset),_.call(this,q,!0),this.path=Ht}if(re=JSON.parse(JSON.stringify(xe)),this.path=w(re,this.posX+this.margin[3],-Mt+We+this.ctx.prevPageLastElemOffset),K===!1||Ve===0){var Yt=(Ve>Pe||Ve<$e)&&g.call(this);Yt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],be,st,null).clip().discardPath()),_.call(this,q,K),Yt&&this.pdf.restoreGraphicsState()}this.lineWidth=ae}else this.lineWidth=le,_.call(this,q,K),this.lineWidth=ae;this.path=xe},_=function(q,K){if((q!=="stroke"||K||!b.call(this))&&(q==="stroke"||K||!m.call(this))){for(var te,re,Q=[],ne=this.path,oe=0;oe<ne.length;oe++){var ae=ne[oe];switch(ae.type){case"begin":Q.push({begin:!0});break;case"close":Q.push({close:!0});break;case"mt":Q.push({start:ae,deltas:[],abs:[]});break;case"lt":var le=Q.length;if(ne[oe-1]&&!isNaN(ne[oe-1].x)&&(te=[ae.x-ne[oe-1].x,ae.y-ne[oe-1].y],le>0)){for(;le>=0;le--)if(Q[le-1].close!==!0&&Q[le-1].begin!==!0){Q[le-1].deltas.push(te),Q[le-1].abs.push(ae);break}}break;case"bct":te=[ae.x1-ne[oe-1].x,ae.y1-ne[oe-1].y,ae.x2-ne[oe-1].x,ae.y2-ne[oe-1].y,ae.x-ne[oe-1].x,ae.y-ne[oe-1].y],Q[Q.length-1].deltas.push(te);break;case"qct":var je=ne[oe-1].x+2/3*(ae.x1-ne[oe-1].x),xe=ne[oe-1].y+2/3*(ae.y1-ne[oe-1].y),Fe=ae.x+2/3*(ae.x1-ae.x),he=ae.y+2/3*(ae.y1-ae.y),Ne=ae.x,ue=ae.y;te=[je-ne[oe-1].x,xe-ne[oe-1].y,Fe-ne[oe-1].x,he-ne[oe-1].y,Ne-ne[oe-1].x,ue-ne[oe-1].y],Q[Q.length-1].deltas.push(te);break;case"arc":Q.push({deltas:[],abs:[],arc:!0}),Array.isArray(Q[Q.length-1].abs)&&Q[Q.length-1].abs.push(ae)}}re=K?null:q==="stroke"?"stroke":"fill";for(var rt=!1,Te=0;Te<Q.length;Te++)if(Q[Te].arc)for(var Pe=Q[Te].abs,$e=0;$e<Pe.length;$e++){var Ve=Pe[$e];Ve.type==="arc"?T.call(this,Ve.x,Ve.y,Ve.radius,Ve.startAngle,Ve.endAngle,Ve.counterclockwise,void 0,K,!rt):O.call(this,Ve.x,Ve.y),rt=!0}else if(Q[Te].close===!0)this.pdf.internal.out("h"),rt=!1;else if(Q[Te].begin!==!0){var be=Q[Te].start.x,We=Q[Te].start.y;F.call(this,Q[Te].deltas,be,We),rt=!0}re&&R.call(this,re),K&&M.call(this)}},S=function(q){var K=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,te=K*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return q-te;case"top":return q+K-te;case"hanging":return q+K-2*te;case"middle":return q+K/2-te;case"ideographic":return q;case"alphabetic":default:return q}},A=function(q){return q+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};u.prototype.createLinearGradient=function(){var q=function(){};return q.colorStops=[],q.addColorStop=function(K,te){this.colorStops.push([K,te])},q.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},q.isCanvasGradient=!0,q},u.prototype.createPattern=function(){return this.createLinearGradient()},u.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(q,K,te,re,Q,ne,oe,ae,le){for(var je=G.call(this,te,re,Q,ne),xe=0;xe<je.length;xe++){var Fe=je[xe];xe===0&&(le?k.call(this,Fe.x1+q,Fe.y1+K):O.call(this,Fe.x1+q,Fe.y1+K)),$.call(this,q,K,Fe.x2,Fe.y2,Fe.x3,Fe.y3,Fe.x4,Fe.y4)}ae?M.call(this):R.call(this,oe)},R=function(q){switch(q){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},M=function(){this.pdf.clip(),this.pdf.discardPath()},k=function(q,K){this.pdf.internal.out(r(q)+" "+a(K)+" m")},P=function(q){var K;switch(q.align){case"right":case"end":K="right";break;case"center":K="center";break;case"left":case"start":default:K="left"}var te=this.pdf.getTextDimensions(q.text),re=S.call(this,q.y),Q=A.call(this,re)-te.h,ne=this.ctx.transform.applyToPoint(new o(q.x,re)),oe=this.ctx.transform.decompose(),ae=new c;ae=(ae=(ae=ae.multiply(oe.translate)).multiply(oe.skew)).multiply(oe.scale);for(var le,je,xe,Fe=this.ctx.transform.applyToRectangle(new l(q.x,re,te.w,te.h)),he=ae.applyToRectangle(new l(q.x,Q,te.w,te.h)),Ne=y.call(this,he),ue=[],rt=0;rt<Ne.length;rt+=1)ue.indexOf(Ne[rt])===-1&&ue.push(Ne[rt]);if(j(ue),this.autoPaging)for(var Te=ue[0],Pe=ue[ue.length-1],$e=Te;$e<Pe+1;$e++){this.pdf.setPage($e);var Ve=$e===1?this.posY+this.margin[0]:this.margin[0],be=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],We=this.pdf.internal.pageSize.height-this.margin[2],Ze=We-this.margin[0],st=this.pdf.internal.pageSize.width-this.margin[1],Mt=st-this.margin[3],Ht=$e===1?0:be+($e-2)*Ze;if(this.ctx.clip_path.length!==0){var Yt=this.path;le=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(le,this.posX+this.margin[3],-1*Ht+Ve),_.call(this,"fill",!0),this.path=Yt}var on=w([JSON.parse(JSON.stringify(he))],this.posX+this.margin[3],-Ht+Ve+this.ctx.prevPageLastElemOffset)[0];q.scale>=.01&&(je=this.pdf.internal.getFontSize(),this.pdf.setFontSize(je*q.scale),xe=this.lineWidth,this.lineWidth=xe*q.scale);var It=this.autoPaging!=="text";if(It||on.y+on.h<=We){if(It||on.y>=Ve&&on.x<=st){var _t=It?q.text:this.pdf.splitTextToSize(q.text,q.maxWidth||st-on.x)[0],xr=w([JSON.parse(JSON.stringify(Fe))],this.posX+this.margin[3],-Ht+Ve+this.ctx.prevPageLastElemOffset)[0],xn=It&&($e>Te||$e<Pe)&&g.call(this);xn&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Mt,Ze,null).clip().discardPath()),this.pdf.text(_t,xr.x,xr.y,{angle:q.angle,align:K,renderingMode:q.renderingMode}),xn&&this.pdf.restoreGraphicsState()}}else on.y<We&&(this.ctx.prevPageLastElemOffset+=We-on.y);q.scale>=.01&&(this.pdf.setFontSize(je),this.lineWidth=xe)}else q.scale>=.01&&(je=this.pdf.internal.getFontSize(),this.pdf.setFontSize(je*q.scale),xe=this.lineWidth,this.lineWidth=xe*q.scale),this.pdf.text(q.text,ne.x+this.posX,ne.y+this.posY,{angle:q.angle,align:K,renderingMode:q.renderingMode,maxWidth:q.maxWidth}),q.scale>=.01&&(this.pdf.setFontSize(je),this.lineWidth=xe)},O=function(q,K,te,re){te=te||0,re=re||0,this.pdf.internal.out(r(q+te)+" "+a(K+re)+" l")},F=function(q,K,te){return this.pdf.lines(q,K,te,null,null)},$=function(q,K,te,re,Q,ne,oe,ae){this.pdf.internal.out([t(s(te+q)),t(i(re+K)),t(s(Q+q)),t(i(ne+K)),t(s(oe+q)),t(i(ae+K)),"c"].join(" "))},G=function(q,K,te,re){for(var Q=2*Math.PI,ne=Math.PI/2;K>te;)K-=Q;var oe=Math.abs(te-K);oe<Q&&re&&(oe=Q-oe);for(var ae=[],le=re?-1:1,je=K;oe>1e-5;){var xe=je+le*Math.min(oe,ne);ae.push(B.call(this,q,je,xe)),oe-=Math.abs(xe-je),je=xe}return ae},B=function(q,K,te){var re=(te-K)/2,Q=q*Math.cos(re),ne=q*Math.sin(re),oe=Q,ae=-ne,le=oe*oe+ae*ae,je=le+oe*Q+ae*ne,xe=4/3*(Math.sqrt(2*le*je)-je)/(oe*ne-ae*Q),Fe=oe-xe*ae,he=ae+xe*oe,Ne=Fe,ue=-he,rt=re+K,Te=Math.cos(rt),Pe=Math.sin(rt);return{x1:q*Math.cos(K),y1:q*Math.sin(K),x2:Fe*Te-he*Pe,y2:Fe*Pe+he*Te,x3:Ne*Te-ue*Pe,y3:Ne*Pe+ue*Te,x4:q*Math.cos(te),y4:q*Math.sin(te)}},Y=function(q){return 180*q/Math.PI},ee=function(q,K,te,re,Q,ne){var oe=q+.5*(te-q),ae=K+.5*(re-K),le=Q+.5*(te-Q),je=ne+.5*(re-ne),xe=Math.min(q,Q,oe,le),Fe=Math.max(q,Q,oe,le),he=Math.min(K,ne,ae,je),Ne=Math.max(K,ne,ae,je);return new l(xe,he,Fe-xe,Ne-he)},J=function(q,K,te,re,Q,ne,oe,ae){var le,je,xe,Fe,he,Ne,ue,rt,Te,Pe,$e,Ve,be,We,Ze=te-q,st=re-K,Mt=Q-te,Ht=ne-re,Yt=oe-Q,on=ae-ne;for(je=0;je<41;je++)Te=(ue=(xe=q+(le=je/40)*Ze)+le*((he=te+le*Mt)-xe))+le*(he+le*(Q+le*Yt-he)-ue),Pe=(rt=(Fe=K+le*st)+le*((Ne=re+le*Ht)-Fe))+le*(Ne+le*(ne+le*on-Ne)-rt),je==0?($e=Te,Ve=Pe,be=Te,We=Pe):($e=Math.min($e,Te),Ve=Math.min(Ve,Pe),be=Math.max(be,Te),We=Math.max(We,Pe));return new l(Math.round($e),Math.round(Ve),Math.round(be-$e),Math.round(We-Ve))},H=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var q,K,te=(q=this.ctx.lineDash,K=this.ctx.lineDashOffset,JSON.stringify({lineDash:q,lineDashOffset:K}));this.prevLineDash!==te&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=te)}}})(An.API),(function(e){var t=function(i){var o,l,c,d,h,u,f,m,b,g;for(l=[],c=0,d=(i+=o="\0\0\0\0".slice(i.length%4||4)).length;d>c;c+=4)(h=(i.charCodeAt(c)<<24)+(i.charCodeAt(c+1)<<16)+(i.charCodeAt(c+2)<<8)+i.charCodeAt(c+3))!==0?(u=(h=((h=((h=((h=(h-(g=h%85))/85)-(b=h%85))/85)-(m=h%85))/85)-(f=h%85))/85)%85,l.push(u+33,f+33,m+33,b+33,g+33)):l.push(122);return(function(y,x){for(var w=x;w>0;w--)y.pop()})(l,o.length),String.fromCharCode.apply(String,l)+"~>"},r=function(i){var o,l,c,d,h,u=String,f="length",m=255,b="charCodeAt",g="slice",y="replace";for(i[g](-2),i=i[g](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),c=[],d=0,h=(i+=o="uuuuu"[g](i[f]%5||5))[f];h>d;d+=5)l=52200625*(i[b](d)-33)+614125*(i[b](d+1)-33)+7225*(i[b](d+2)-33)+85*(i[b](d+3)-33)+(i[b](d+4)-33),c.push(m&l>>24,m&l>>16,m&l>>8,m&l);return(function(x,w){for(var j=w;j>0;j--)x.pop()})(c,o[f]),u.fromCharCode.apply(u,c)},a=function(i){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((i=i.replace(/\s/g,"")).indexOf(">")!==-1&&(i=i.substr(0,i.indexOf(">"))),i.length%2&&(i+="0"),o.test(i)===!1)return"";for(var l="",c=0;c<i.length;c+=2)l+=String.fromCharCode("0x"+(i[c]+i[c+1]));return l},s=function(i){for(var o=new Uint8Array(i.length),l=i.length;l--;)o[l]=i.charCodeAt(l);return i=(o=Yk(o)).reduce((function(c,d){return c+String.fromCharCode(d)}),"")};e.processDataByFilters=function(i,o){var l=0,c=i||"",d=[];for(typeof(o=o||[])=="string"&&(o=[o]),l=0;l<o.length;l+=1)switch(o[l]){case"ASCII85Decode":case"/ASCII85Decode":c=r(c),d.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":c=t(c),d.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":c=a(c),d.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":c=c.split("").map((function(h){return("0"+h.charCo
1060deAt().toString(16)).slice(-2)})).join("")+">",d.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":c=s(c),d.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[l]+'" is not implemented')}return{data:c,reverseChain:d.reverse().join(" ")}}})(An.API),(function(e){e.loadFile=function(t,r,a){return(function(s,i,o){i=i!==!1,o=typeof o=="function"?o:function(){};var l=void 0;try{l=(function(c,d,h){var u=new XMLHttpRequest,f=0,m=function(b){var g=b.length,y=[],x=String.fromCharCode;for(f=0;f<g;f+=1)y.push(x(255&b.charCodeAt(f)));return y.join("")};if(u.open("GET",c,!d),u.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(u.onload=function(){u.status===200?h(m(this.responseText)):h(void 0)}),u.send(null),d&&u.status===200)return m(u.responseText)})(s,i,o)}catch{}return l})(t,r,a)},e.loadImageFile=e.loadFile})(An.API),(function(e){function t(){return(En.html2canvas?Promise.resolve(En.html2canvas):Vk(()=>import("./html2canvas.esm-QH1iLAAe.js"),[])).catch((function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))})).then((function(o){return o.default?o.default:o}))}function r(){return(En.DOMPurify?Promise.resolve(En.DOMPurify):Vk(()=>import("./purify.es-C_uT9hQ1.js"),[])).catch((function(o){return Promise.reject(new Error("Could not load dompurify: "+o))})).then((function(o){return o.default?o.default:o}))}var a=function(o){var l=Gr(o);return l==="undefined"?"undefined":l==="string"||o instanceof String?"string":l==="number"||o instanceof Number?"number":l==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":l==="object"?"object":"unknown"},s=function(o,l){var c=document.createElement(o);for(var d in l.className&&(c.className=l.className),l.innerHTML&&l.dompurify&&(c.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)c.style[d]=l.style[d];return c},i=function o(l){var c=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),d=o.convert(Promise.resolve(),c);return d=(d=d.setProgress(1,o,1,[o])).set(l)};(i.prototype=Object.create(Promise.prototype)).constructor=i,i.convert=function(o,l){return o.__proto__=l||i.prototype,o},i.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"}},i.prototype.from=function(o,l){return this.then((function(){switch(l=l||(function(c){switch(a(c)){case"string":return"string";case"element":return c.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(o)){case"string":return this.then(r).then((function(c){return this.set({src:s("div",{innerHTML:o,dompurify:c})})}));case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}}))},i.prototype.to=function(o){switch(o){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.")}},i.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 o={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=(function c(d,h){for(var u=d.nodeType===3?document.createTextNode(d.nodeValue):d.cloneNode(!1),f=d.firstChild;f;f=f.nextSibling)h!==!0&&f.nodeType===1&&f.nodeName==="SCRIPT"||u.appendChild(c(f,h));return d.nodeType===1&&(d.nodeName==="CANVAS"?(u.width=d.width,u.height=d.height,u.getContext("2d").drawImage(d,0,0)):d.nodeName!=="TEXTAREA"&&d.nodeName!=="SELECT"||(u.value=d.value),u.addEventListener("load",(function(){u.scrollTop=d.scrollTop,u.scrollLeft=d.scrollLeft}),!0)),u})(this.prop.src,this.opt.html2canvas.javascriptEnabled);
1060l.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(s("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"}))},i.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).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)}))},i.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(t).then((function(l){var c=this.opt.jsPDF,d=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,u=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 u.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=d,d)for(var f=0;f<d.length;++f){var m=d[f],b=m.src.find((function(g){return g.format==="truetype"}));b&&c.addFont(b.url,m.ref.name,m.ref.style)}return u.windowHeight=u.windowHeight||0,u.windowHeight=u.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):u.windowHeight,c.context2d.save(!0),l(this.prop.container,u)})).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)}))},i.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o}))},i.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},i.prototype.output=function(o,l,c){return(c=c||"pdf").toLowerCase()==="img"||c.toLowerCase()==="image"?this.outputImg(o,l):this.outputPdf(o,l)},i.prototype.outputPdf=function(o,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(o,l)}))},i.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(o){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 "'+o+'" is not supported.'}}))},i.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},i.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf(
vendor: 11,622 bytes, lines 1060-1066
1060)}]).then((function(){this.prop.callback(this.prop.pdf)}))},i.prototype.set=function(o){if(a(o)!=="object")return this;var l=Object.keys(o||{}).map((function(c){if(c in i.template.prop)return function(){this.prop[c]=o[c]};switch(c){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[c]=o[c]}}}),this);return this.then((function(){return this.thenList(l)}))},i.prototype.get=function(o,l){return this.then((function(){var c=o in i.template.prop?this.prop[o]:this.opt[o];return l?l(c):c}))},i.prototype.setMargin=function(o){return this.then((function(){switch(a(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o})).then(this.setPageSize)},i.prototype.setPageSize=function(o){function l(c,d){return Math.floor(c*d/72*96)}return this.then((function(){(o=o||An.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:l(o.inner.width,o.k),height:l(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o}))},i.prototype.setProgress=function(o,l,c,d){return o!=null&&(this.progress.val=o),l!=null&&(this.progress.state=l),c!=null&&(this.progress.n=c),d!=null&&(this.progress.stack=d),this.progress.ratio=this.progress.val/this.progress.state,this},i.prototype.updateProgress=function(o,l,c,d){return this.setProgress(o?this.progress.val+o:null,l||null,c?this.progress.n+c:null,d?this.progress.stack.concat(d):null)},i.prototype.then=function(o,l){var c=this;return this.thenCore(o,l,(function(d,h){return c.updateProgress(null,null,1,[d]),Promise.prototype.then.call(this,(function(u){return c.updateProgress(null,d),u})).then(d,h).then((function(u){return c.updateProgress(1),u}))}))},i.prototype.thenCore=function(o,l,c){c=c||Promise.prototype.then,o&&(o=o.bind(this)),l&&(l=l.bind(this));var d=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:i.convert(Object.assign({},this),Promise.prototype),h=c.call(d,o,l);return i.convert(h,this.__proto__)},i.prototype.thenExternal=function(o,l){return Promise.prototype.then.call(this,o,l)},i.prototype.thenList=function(o){var l=this;return o.forEach((function(c){l=l.thenCore(c)})),l},i.prototype.catch=function(o){o&&(o=o.bind(this));var l=Promise.prototype.catch.call(this,o);return i.convert(l,this)},i.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},i.prototype.error=function(o){return this.then((function(){throw new Error(o)}))},i.prototype.using=i.prototype.set,i.prototype.saveAs=i.prototype.save,i.prototype.export=i.prototype.output,i.prototype.run=i.prototype.then,An.getPageSize=function(o,l,c){if(Gr(o)==="object"){var d=o;o=d.orientation,l=d.unit||l,c=d.format||c}l=l||"mm",c=c||"a4",o=(""+(o||"P")).toLowerCase();var h,u=(""+c).toLowerCase(),f={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 m,b=0,g=0;if(f.hasOwnProperty(u))b=f[u][1]/h,g=f[u][0]/h;else try{b=c[1],g=c[0]}catch{throw new Error("Invalid format: "+c)}if(o==="p"||o==="portrait")o="p",g>b&&(m=g,g=b,b=m);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",b>g&&(m=g,g=b,b=m)}return{width:g,height:b,unit:l,k:h,orientation:o}},e.html=function(o,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(t3):null;var c=new i(l);return l.worker?c:c.from(o).doCallback()}})(An.API),An.API.addJS=function(e){return C9=e,this.internal.events.subscribe("postPutResources",(function(){Ub=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ub+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),S9=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+C9+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){Ub!==void 0&&S9!==void 0&&this.internal.out("/Names <</JavaScript "+Ub+" 0 R>>")})),this},(function(e){var t;e.events.push(["postPutResources",function(){var r=this,a=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var s=r.outline.render().split(/\r\n/),i=0;i<s.length;i++){var o=s[i],l=a.exec(o);if(l!=null){var c=l[1];r.internal.newObjectDeferredBegin(c,!1)}r.internal.write(o)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,h=[];for(i=0;i<d;i++){var u=r.internal.newObject();h.push(u);var f=r.internal.getPageInfo(i+1);r.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var m=r.internal.newObject();for(r.internal.write("<< /Names [ "),i=0;i<h.length;i++)r.internal.write("(page_"+(i+1)+")"+h[i]+" 0 R");r.internal.write(" ] >>","endobj"),t=r.internal.newObject(),r.internal.write("<< /Dests "+m+" 0 R"),r.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var r=this;r.outline={createNamedDestinations:!1,root:{children:[]}},r.outline.add=function(a,s,i){var o={title:s,options:i,children:[]};return a==null&&(a=this.root),a.children.push(o),o},r.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=r,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},r.outline.genIds_r=function(a){a.id=r.internal.newObjectDeferred();for(var s=0;s<a.children.length;s++)this.genIds_r(a.children[s])},r.outline.renderRoot=function(a){this.objStart(a),this.line("/Type /Outlines"),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1]))),this.line("/Count "+this.count_r({count:0},a)),this.objEnd()},r.outline.renderItems=function(a){for(var s=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<a.children.length;i++){var o=a.children[i];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(a)),i>0&&this.line("/Prev "+this.makeRef(a.children[i-1])),i<a.children.length-1&&this.line("/Next "+this.makeRef(a.children[i+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 l=this.count=this.count_r({count:0},o);if(l>0&&this.line("/Count "+l),o.options&&o.options.pageNumber){var c=r.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+s(0)+" 0]")}this.objEnd()}for(var d=0;d<a.children.length;d++)this.renderItems(a.children[d])},r.outline.line=function(a){this.ctx.val+=a+`\r
1061`},r.outline.makeRef=function(a){return a.id+" 0 R"},r.outline.makeString=function(a){return"("+r.internal.pdfEscape(a)+")"},r.outline.objStart=function(a){this.ctx.val+=`\r
1062`+a.id+` 0 obj\r
1063<<\r
1064`},r.outline.objEnd=function(){this.ctx.val+=`>> \r
1065endobj\r
1066`},r.outline.count_r=function(a,s){for(var i=0;i<s.children.length;i++)a.count++,this.count_r(a,s.children[i]);return a.count}}])})(An.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(r,a,s,i,o,l){var c,d=this.decode.DCT_DECODE,h=null;if(typeof r=="string"||this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r)){switch(r=o||r,r=this.__addimage__.isArrayBuffer(r)?new Uint8Array(r):r,(c=(function(u){for(var f,m=256*u.charCodeAt(4)+u.charCodeAt(5),b=u.length,g={width:0,height:0,numcomponents:1},y=4;y<b;y+=2){if(y+=m,t.indexOf(u.charCodeAt(y+1))!==-1){f=256*u.charCodeAt(y+5)+u.charCodeAt(y+6),g={width:256*u.charCodeAt(y+7)+u.charCodeAt(y+8),height:f,numcomponents:u.charCodeAt(y+9)};break}m=256*u.charCodeAt(y+2)+u.charCodeAt(y+3)}return g})(r=this.__addimage__.isArrayBufferView(r)?this.__addimage__.arrayBufferToBinaryString(r):r)).numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}h={data:r,width:c.width,height:c.height,colorSpace:l,bitsPerComponent:8,filter:d,index:a,alias:s}}return h}})(An.API);var Ip,zb,A9,k9,P9,w3e=(function(){var e,t,r;function a(i){var o,l,c,d,h,u,f,m,b,g,y,x,w,j;for(this.data=i,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},u=null;;){switch(o=this.readUInt32(),b=(function(){var N,_;for(_=[],N=0;N<4;++N)_.push(String.fromCharCode(this.data[this.pos++]));return _}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(o);break;case"fcTL":u&&this.animation.frames.push(u),this.pos+=4,u={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},h=this.readUInt16(),d=this.readUInt16()||100,u.delay=1e3*h/d,u.disposeOp=this.data[this.pos++],u.blendOp=this.data[this.pos++],u.data=[];break;case"IDAT":case"fdAT":for(b==="fdAT"&&(this.pos+=4,o-=4),i=(u!=null?u.data:void 0)||this.imgData,x=0;0<=o?x<o:x>o;0<=o?++x:--x)i.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(c=this.palette.length/3,this.transparency.indexed=this.read(o),this.transparency.indexed.length>c)throw new Error("More transparent colors than palette size");if((g=c-this.transparency.indexed.length)>0)for(w=0;0<=g?w<g:w>g;0<=g?++w:--w)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(o)[0];break;case 2:this.transparency.rgb=this.read(o)}break;case"tEXt":f=(y=this.read(o)).indexOf(0),m=String.fromCharCode.apply(String,y.slice(0,f)),this.text[m]=String.fromCharCode.apply(String,y.slice(f+1));break;case"IEND":return u&&this.animation.frames.push(u),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=(j=this.colorType)===4||j===6,l=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*l,this.colorSpace
vendor: 8,688 bytes, lines 1066-1117
1066=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=o}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}a.prototype.read=function(i){var o,l;for(l=[],o=0;0<=i?o<i:o>i;0<=i?++o:--o)l.push(this.data[this.pos++]);return l},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(i){var o=this.pixelBitlength/8,l=new Uint8Array(this.width*this.height*o),c=0,d=this;if(i==null&&(i=this.imgData),i.length===0)return new Uint8Array(0);function h(u,f,m,b){var g,y,x,w,j,N,_,S,A,T,R,M,k,P,O,F,$,G,B,Y,ee,J=Math.ceil((d.width-u)/m),H=Math.ceil((d.height-f)/b),q=d.width==J&&d.height==H;for(P=o*J,M=q?l:new Uint8Array(P*H),N=i.length,k=0,y=0;k<H&&c<N;){switch(i[c++]){case 0:for(w=$=0;$<P;w=$+=1)M[y++]=i[c++];break;case 1:for(w=G=0;G<P;w=G+=1)g=i[c++],j=w<o?0:M[y-o],M[y++]=(g+j)%256;break;case 2:for(w=B=0;B<P;w=B+=1)g=i[c++],x=(w-w%o)/o,O=k&&M[(k-1)*P+x*o+w%o],M[y++]=(O+g)%256;break;case 3:for(w=Y=0;Y<P;w=Y+=1)g=i[c++],x=(w-w%o)/o,j=w<o?0:M[y-o],O=k&&M[(k-1)*P+x*o+w%o],M[y++]=(g+Math.floor((j+O)/2))%256;break;case 4:for(w=ee=0;ee<P;w=ee+=1)g=i[c++],x=(w-w%o)/o,j=w<o?0:M[y-o],k===0?O=F=0:(O=M[(k-1)*P+x*o+w%o],F=x&&M[(k-1)*P+(x-1)*o+w%o]),_=j+O-F,S=Math.abs(_-j),T=Math.abs(_-O),R=Math.abs(_-F),A=S<=T&&S<=R?j:T<=R?O:F,M[y++]=(g+A)%256;break;default:throw new Error("Invalid filter algorithm: "+i[c-1])}if(!q){var K=((f+k*b)*d.width+u)*o,te=k*P;for(w=0;w<J;w+=1){for(var re=0;re<o;re+=1)l[K++]=M[te++];K+=(m-1)*o}}k++}}return i=Zke(i),d.interlaceMethod==1?(h(0,0,8,8),h(4,0,8,8),h(0,4,4,8),h(2,0,4,4),h(0,2,2,4),h(1,0,2,2),h(0,1,1,2)):h(0,0,1,1),l},a.prototype.decodePalette=function(){var i,o,l,c,d,h,u,f,m;for(l=this.palette,h=this.transparency.indexed||[],d=new Uint8Array((h.length||0)+l.length),c=0,i=0,o=u=0,f=l.length;u<f;o=u+=3)d[c++]=l[o],d[c++]=l[o+1],d[c++]=l[o+2],d[c++]=(m=h[i++])!=null?m:255;return d},a.prototype.copyToImageData=function(i,o){var l,c,d,h,u,f,m,b,g,y,x;if(c=this.colors,g=null,l=this.hasAlphaChannel,this.palette.length&&(g=(x=this._decodedPalette)!=null?x:this._decodedPalette=this.decodePalette(),c=4,l=!0),b=(d=i.data||i).length,u=g||o,h=f=0,c===1)for(;h<b;)m=g?4*o[h/4]:f,y=u[m++],d[h++]=y,d[h++]=y,d[h++]=y,d[h++]=l?u[m++]:255,f=m;else for(;h<b;)m=g?4*o[h/4]:f,d[h++]=u[m++],d[h++]=u[m++],d[h++]=u[m++],d[h++]=l?u[m++]:255,f=m},a.prototype.decode=function(){var i;return i=new Uint8Array(this.width*this.height*4),this.copyToImageData(i,this.decodePixels()),i};var s=function(){if(Object.prototype.toString.call(En)==="[object Window]"){try{t=En.document.createElement("canvas"),r=t.getContext("2d")}catch{return!1}return!0}return!1};return s(),e=function(i){var o;if(s()===!0)return r.width=i.width,r.height=i.height,r.clearRect(0,0,i.width,i.height),r.putImageData(i,0,0),(o=new Image).src=t.toDataURL(),o;throw new Error("This method requires a Browser with Canvas-capability.")},a.prototype.decodeFrames=function(i){var o,l,c,d,h,u,f,m;if(this.animation){for(m=[],l=h=0,u=(f=this.animation.frames).length;h<u;l=++h)o=f[l],c=i.createImageData(o.width,o.height),d=this.decodePixels(new Uint8Array(o.data)),this.copyToImageData(c,d),o.imageData=c,m.push(o.image=e(c));return m}},a.prototype.renderFrame=function(i,o){var l,c,d;return l=(c=this.animation.frames)[o],d=c[o-1],o===0&&i.clearRect(0,0,this.width,this.height),(d!=null?d.disposeOp:void 0)===1?i.clearRect(d.xOffset,d.yOffset,d.width,d.height):(d!=null?d.disposeOp:void 0)===2&&i.putImageData(d.imageData,d.xOffset,d.yOffset),l.blendOp===0&&i.clearRect(l.xOffset,l.yOffset,l.width,l.height),i.drawImage(l.image,l.xOffset,l.yOffset)},a.prototype.animate=function(i){var o,l,c,d,h,u,f=this;return l=0,u=this.animation,d=u.numFrames,c=u.frames,h=u.numPlays,(o=function(){var m,b;if(m=l++%d,b=c[m],f.renderFrame(i,m),d>1&&l/d<h)return f.animation._timeout=setTimeout(o,b.delay)})()},a.prototype.stopAnimation=function(){var i;return clearTimeout((i=this.animation)!=null?i._timeout:void 0)},a.prototype.render=function(i){var o,l;return i._png&&i._png.stopAnimation(),i._png=this,i.width=this.width,i.height=this.height,o=i.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(l=o.createImageData(this.width,this.height),this.copyToImageData(l,this.decodePixels()),o.putImageData(l,0,0))},a})();/**
1067 * @license
1068 *
1069 * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
1070 *
1071 * Permission is hereby granted, free of charge, to any person obtaining
1072 * a copy of this software and associated documentation files (the
1073 * "Software"), to deal in the Software without restriction, including
1074 * without limitation the rights to use, copy, modify, merge, publish,
1075 * distribute, sublicense, and/or sell copies of the Software, and to
1076 * permit persons to whom the Software is furnished to do so, subject to
1077 * the following conditions:
1078 *
1079 * The above copyright notice and this permission notice shall be
1080 * included in all copies or substantial portions of the Software.
1081 *
1082 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1083 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1084 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1085 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1086 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1087 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1088 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1089 * ====================================================================
1090 *//**
1091 * @license
1092 * (c) Dean McNamee <[email protected]>, 2013.
1093 *
1094 * https://github.com/deanm/omggif
1095 *
1096 * Permission is hereby granted, free of charge, to any person obtaining a copy
1097 * of this software and associated documentation files (the "Software"), to
1098 * deal in the Software without restriction, including without limitation the
1099 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
1100 * sell copies of the Software, and to permit persons to whom the Software is
1101 * furnished to do so, subject to the following conditions:
1102 *
1103 * The above copyright notice and this permission notice shall be included in
1104 * all copies or substantial portions of the Software.
1105 *
1106 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1107 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1108 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1109 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1110 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1111 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1112 * IN THE SOFTWARE.
1113 *
1114 * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
1115 * including animation and compression.  It does not rely on any specific
1116 * underlying system, so should run in the browser, Node, or Plask.
1117 */function j3e(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 r=e[t++]|e[t++]<<8,a=e[t++]|e[t++]<<8,s=e[t++],i=s>>7,o=1<<(7&s)+1;e[t++],e[t++];var l=null,c=null;i&&(l=t,c=o,t+=3*o);var d=!0,h=[],u=0,f=null,m=0,b=null;for(this.width=r,this.height=a;d&&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(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var g=e[t++];u=e[t++]|e[t++]<<8,f=e[t++],(1&g)==0&&(f=null),m=g>>2&7,t++;break;case 254:for(;;){if(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var y=e[t++]|e[t++]<<8,x=e[t++]|e[t++]<<8,w=e[t++]|e[t++]<<8,j=e[t++]|e[t++]<<8,N=e[t++],_=N>>6&1,S=1<<(7&N)+1,A=l,T=c,R=!1;N>>7&&(R=!0,A=t,T=S,t+=3*S);var M=t;for(t++;;){var k;if(!((k=e[t++])>=0))throw Error("Invalid block size");if(k===0)break;t+=k}h.push({x:y,y:x,width:w,height:j,has_local_palette:R,palette_offset:A,palette_size:T,data_offset:M,data_length:t-M,transparent_index:f,interlaced:!!_,delay:u,dis
vendor: 60,742 bytes, lines 1117-1154
1117posal:m});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return b},this.frameInfo=function(P){if(P<0||P>=h.length)throw new Error("Frame index out of range.");return h[P]},this.decodeAndBlitFrameBGRA=function(P,O){var F=this.frameInfo(P),$=F.width*F.height,G=new Uint8Array($);E9(e,F.data_offset,G,$);var B=F.palette_offset,Y=F.transparent_index;Y===null&&(Y=256);var ee=F.width,J=r-ee,H=ee,q=4*(F.y*r+F.x),K=4*((F.y+F.height)*r+F.x),te=q,re=4*J;F.interlaced===!0&&(re+=4*r*7);for(var Q=8,ne=0,oe=G.length;ne<oe;++ne){var ae=G[ne];if(H===0&&(H=ee,(te+=re)>=K&&(re=4*J+4*r*(Q-1),te=q+(ee+J)*(Q<<1),Q>>=1)),ae===Y)te+=4;else{var le=e[B+3*ae],je=e[B+3*ae+1],xe=e[B+3*ae+2];O[te++]=xe,O[te++]=je,O[te++]=le,O[te++]=255}--H}},this.decodeAndBlitFrameRGBA=function(P,O){var F=this.frameInfo(P),$=F.width*F.height,G=new Uint8Array($);E9(e,F.data_offset,G,$);var B=F.palette_offset,Y=F.transparent_index;Y===null&&(Y=256);var ee=F.width,J=r-ee,H=ee,q=4*(F.y*r+F.x),K=4*((F.y+F.height)*r+F.x),te=q,re=4*J;F.interlaced===!0&&(re+=4*r*7);for(var Q=8,ne=0,oe=G.length;ne<oe;++ne){var ae=G[ne];if(H===0&&(H=ee,(te+=re)>=K&&(re=4*J+4*r*(Q-1),te=q+(ee+J)*(Q<<1),Q>>=1)),ae===Y)te+=4;else{var le=e[B+3*ae],je=e[B+3*ae+1],xe=e[B+3*ae+2];O[te++]=le,O[te++]=je,O[te++]=xe,O[te++]=255}--H}}}function E9(e,t,r,a){for(var s=e[t++],i=1<<s,o=i+1,l=o+1,c=s+1,d=(1<<c)-1,h=0,u=0,f=0,m=e[t++],b=new Int32Array(4096),g=null;;){for(;h<16&&m!==0;)u|=e[t++]<<h,h+=8,m===1?m=e[t++]:--m;if(h<c)break;var y=u&d;if(u>>=c,h-=c,y!==i){if(y===o)break;for(var x=y<l?y:g,w=0,j=x;j>i;)j=b[j]>>8,++w;var N=j;if(f+w+(x!==y?1:0)>a)return void oa.log("Warning, gif stream longer than expected.");r[f++]=N;var _=f+=w;for(x!==y&&(r[f++]=N),j=x;w--;)j=b[j],r[--_]=255&j,j>>=8;g!==null&&l<4096&&(b[l++]=g<<8|N,l>=d+1&&c<12&&(++c,d=d<<1|1)),g=y}else l=o+1,d=(1<<(c=s+1))-1,g=null}return f!==a&&oa.log("Warning, gif stream shorter than expected."),r}/**
1118 * @license
1119  Copyright (c) 2008, Adobe Systems Incorporated
1120  All rights reserved.
1121
1122  Redistribution and use in source and binary forms, with or without 
1123  modification, are permitted provided that the following conditions are
1124  met:
1125
1126  * Redistributions of source code must retain the above copyright notice, 
1127    this list of conditions and the following disclaimer.
1128  
1129  * Redistributions in binary form must reproduce the above copyright
1130    notice, this list of conditions and the following disclaimer in the 
1131    documentation and/or other materials provided with the distribution.
1132  
1133  * Neither the name of Adobe Systems Incorporated nor the names of its 
1134    contributors may be used to endorse or promote products derived from 
1135    this software without specific prior written permission.
1136
1137  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
1138  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
1139  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1140  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
1141  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1142  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1143  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1144  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1145  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1146  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1147  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1148*/function X4(e){var t,r,a,s,i,o=Math.floor,l=new Array(64),c=new Array(64),d=new Array(64),h=new Array(64),u=new Array(65535),f=new Array(65535),m=new Array(64),b=new Array(64),g=[],y=0,x=7,w=new Array(64),j=new Array(64),N=new Array(64),_=new Array(256),S=new Array(2048),A=[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],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],k=[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],P=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],$=[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 G(q,K){for(var te=0,re=0,Q=new Array,ne=1;ne<=16;ne++){for(var oe=1;oe<=q[ne];oe++)Q[K[re]]=[],Q[K[re]][0]=te,Q[K[re]][1]=ne,re++,te++;te*=2}return Q}function B(q){for(var K=q[0],te=q[1]-1;te>=0;)K&1<<te&&(y|=1<<x),te--,--x<0&&(y==255?(Y(255),Y(0)):Y(y),x=7,y=0)}function Y(q){g.push(q)}function ee(q){Y(q>>8&255),Y(255&q)}function J(q,K,te,re,Q){for(var ne,oe=Q[0],ae=Q[240],le=(function(Pe,$e){var Ve,be,We,Ze,st,Mt,Ht,Yt,on,It,_t=0;for(on=0;on<8;++on){Ve=Pe[_t],be=Pe[_t+1],We=Pe[_t+2],Ze=Pe[_t+3],st=Pe[_t+4],Mt=Pe[_t+5],Ht=Pe[_t+6];var xr=Ve+(Yt=Pe[_t+7]),xn=Ve-Yt,Rr=be+Ht,Wn=be-Ht,lr=We+Mt,Ha=We-Mt,Rn=Ze+st,ta=Ze-st,fr=xr+Rn,na=xr-Rn,Ea=Rr+lr,Kn=Rr-lr;Pe[_t]=fr+Ea,Pe[_t+4]=fr-Ea;var St=.707106781*(Kn+na);Pe[_t+2]=na+St,Pe[_t+6]=na-St;var hn=.382683433*((fr=ta+Ha)-(Kn=Wn+xn)),yr=.5411961*fr+hn,Gn=1.306562965*Kn+hn,da=.707106781*(Ea=Ha+Wn),cr=xn+da,Dt=xn-da;Pe[_t+5]=Dt+yr,Pe[_t+3]=Dt-yr,Pe[_t+1]=cr+Gn,Pe[_t+7]=cr-Gn,_t+=8}for(_t=0,on=0;on<8;++on){Ve=Pe[_t],be=Pe[_t+8],We=Pe[_t+16],Ze=Pe[_t+24],st=Pe[_t+32],Mt=Pe[_t+40],Ht=Pe[_t+48];var va=Ve+(Yt=Pe[_t+56]),ar=Ve-Yt,dr=be+Ht,jr=be-Ht,Yn=We+Mt,Ta=We-Mt,ro=Ze+st,hi=Ze-st,ra=va+ro,ks=va-ro,ua=dr+Yn,Ps=dr-Yn;Pe[_t]=ra+ua,Pe[_t+32]=ra-ua;var xs=.707106781*(Ps+ks);Pe[_t+16]=ks+xs,Pe[_t+48]=ks-xs;var Ye=.382683433*((ra=hi+Ta)-(Ps=jr+ar)),nt=.5411961*ra+Ye,Vr=1.306562965*Ps+Ye,aa=.707106781*(ua=Ta+jr),Da=ar+aa,ur=ar-aa;Pe[_t+40]=ur+nt,Pe[_t+24]=ur-nt,Pe[_t+8]=Da+Vr,Pe[_t+56]=Da-Vr,_t++}for(on=0;on<64;++on)It=Pe[on]*$e[on],m[on]=It>0?It+.5|0:It-.5|0;return m})(q,K),je=0;je<64;++je)b[A[je]]=le[je];var xe=b[0]-te;te=b[0],xe==0?B(re[0]):(B(re[f[ne=32767+xe]]),B(u[ne]));for(var Fe=63;Fe>0&&b[Fe]==0;)Fe--;if(Fe==0)return B(oe),te;for(var he,Ne=1;Ne<=Fe;){for(var ue=Ne;b[Ne]==0&&Ne<=Fe;)++Ne;var rt=Ne-ue;if(rt>=16){he=rt>>4;for(var Te=1;Te<=he;++Te)B(ae);rt&=15}ne=32767+b[Ne],B(Q[(rt<<4)+f[ne]]),B(u[ne]),Ne++}return Fe!=63&&B(oe),te}function H(q){q=Math.min(Math.max(q,1),100),i!=q&&((function(K){for(var te=[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],re=0;re<64;re++){var Q=o((te[re]*K+50)/100);Q=Math.min(Math.max(Q,1),255),l[A[re]]=Q}for(var ne=[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],oe=0;oe<64;oe++){var ae=o((ne[oe]*K+50)/100);ae=Math.min(Math.max(ae,1),255),c[A[oe]]=ae}for(var le=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],je=0,xe=0;xe<8;xe++)for(var Fe=0;Fe<8;Fe++)d[je]=1/(l[A[je]]*le[xe]*le[Fe]*8),h[je]=1/(c[A[je]]*le[xe]*le[Fe]*8),je++})(q<50?Math.floor(5e3/q):Math.floor(200-2*q)),i=q)}this.encode=function(q,K){K&&H(K),g=new Array,y=0,x=7,ee(65496),ee(65504),ee(16),Y(74),Y(70),Y(73),Y(70),Y(0),Y(1),Y(1),Y(0),ee(1),ee(1),Y(0),Y(0),(function(){ee(65499),ee(132),Y(0);for(var be=0;be<64;be++)Y(l[be]);Y(1);for(var We=0;We<64;We++)Y(c[We])})(),(function(be,We){ee(65472),ee(17),Y(8),ee(We),ee(be),Y(3),Y(1),Y(17),Y(0),Y(2),Y(17),Y(1),Y(3),Y(17),Y(1)})(q.width,q.height),(function(){ee(65476),ee(418),Y(0);for(var be=0;be<16;be++)Y(T[be+1]);for(var We=0;We<=11;We++)Y(R[We]);Y(16);for(var Ze=0;Ze<16;Ze++)Y(M[Ze+1]);for(var st=0;st<=161;st++)Y(k[st]);Y(1);for(var Mt=0;Mt<16;Mt++)Y(P[Mt+1]);for(var Ht=0;Ht<=11;Ht++)Y(O[Ht]);Y(17);for(var Yt=0;Yt<16;Yt++)Y(F[Yt+1]);for(var on=0;on<=161;on++)Y($[on])})(),ee(65498),ee(12),Y(3),Y(1),Y(0),Y(2),Y(17),Y(3),Y(17),Y(0),Y(63),Y(0);var te=0,re=0,Q=0;y=0,x=7,this.encode.displayName="_encode_";for(var ne,oe,ae,le,je,xe,Fe,he,Ne,ue=q.data,rt=q.width,Te=q.height,Pe=4*rt,$e=0;$e<Te;){for(ne=0;ne<Pe;){for(je=Pe*$e+ne,Fe=-1,he=0,Ne=0;Ne<64;Ne++)xe=je+(he=Ne>>3)*Pe+(Fe=4*(7&Ne)),$e+he>=Te&&(xe-=Pe*($e+1+he-Te)),ne+Fe>=Pe&&(xe-=ne+Fe-Pe+4),oe=ue[xe++],ae=ue[xe++],le=ue[xe++],w[Ne]=(S[oe]+S[ae+256>>0]+S[le+512>>0]>>16)-128,j[Ne]=(S[oe+768>>0]+S[ae+1024>>0]+S[le+1280>>0]>>16)-128,N[Ne]=(S[oe+1280>>0]+S[ae+1536>>0]+S[le+1792>>0]>>16)-128;te=J(w,d,te,t,a),re=J(j,h,re,r,s),Q=J(N,h,Q,r,s),ne+=32}$e+=8}if(x>=0){var Ve=[];Ve[1]=x+1,Ve[0]=(1<<x+1)-1,B(Ve)}return ee(65497),new Uint8Array(g)},e=e||50,(function(){for(var q=String.fromCharCode,K=0;K<256;K++)_[K]=q(K)})(),t=G(T,R),r=G(P,O),a=G(M,k),s=G(F,$),(function(){for(var q=1,K=2,te=1;te<=15;te++){for(var re=q;re<K;re++)f[32767+re]=te,u[32767+re]=[],u[32767+re][1]=te,u[32767+re][0]=re;for(var Q=-(K-1);Q<=-q;Q++)f[32767+Q]=te,u[32767+Q]=[],u[32767+Q][1]=te,u[32767+Q][0]=K-1+Q;q<<=1,K<<=1}})(),(function(){for(var q=0;q<256;q++)S[q]=19595*q,S[q+256>>0]=38470*q,S[q+512>>0]=7471*q+32768,S[q+768>>0]=-11059*q,S[q+1024>>0]=-21709*q,S[q+1280>>0]=32768*q+8421375,S[q+1536>>0]=-27439*q,S[q+1792>>0]=-5329*q})(),H(e)}/**
1149 * @license
1150 * Copyright (c) 2017 Aras Abbasi
1151 *
1152 * Licensed under the MIT License.
1153 * http://opensource.org/licenses/mit-license
1154 */function Hc(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 T9(e){function t(T){if(!T)throw Error("assert :P")}function r(T,R,M){for(var k=0;4>k;k++)if(T[R+k]!=M.charCodeAt(k))return!0;return!1}function a(T,R,M,k,P){for(var O=0;O<P;O++)T[R+O]=M[k+O]}function s(T,R,M,k){for(var P=0;P<k;P++)T[R+P]=M}function i(T){return new Int32Array(T)}function o(T,R){for(var M=[],k=0;k<T;k++)M.push(new R);return M}function l(T,R){var M=[];return(function k(P,O,F){for(var $=F[O],G=0;G<$&&(P.push(F.length>O+1?[]:new R),!(F.length<O+1));G++)k(P[G],O+1,F)})(M,0,T),M}var c=function(){var T=this;function R(E,D){for(var W=1<<D-1>>>0;E&W;)W>>>=1;return W?(E&W-1)+W:E}function M(E,D,W,Z,se){t(!(Z%W));do E[D+(Z-=W)]=se;while(0<Z)}function k(E,D,W,Z,se){if(t(2328>=se),512>=se)var ce=i(512);else if((ce=i(se))==null)return 0;return(function(fe,ge,ve,Se,Ie,Xe){var Je,Ke,pt=ge,it=1<<ve,qe=i(16),Be=i(16);for(t(Ie!=0),t(Se!=null),t(fe!=null),t(0<ve),Ke=0;Ke<Ie;++Ke){if(15<Se[Ke])return 0;++qe[Se[Ke]]}if(qe[0]==Ie)return 0;for(Be[1]=0,Je=1;15>Je;++Je){if(qe[Je]>1<<Je)return 0;Be[Je+1]=Be[Je]+qe[Je]}for(Ke=0;Ke<Ie;++Ke)Je=Se[Ke],0<Se[Ke]&&(Xe[Be[Je]++]=Ke);if(Be[15]==1)return(Se=new P).g=0,Se.value=Xe[0],M(fe,pt,1,it,Se),it;var ut,ct=-1,ft=it-1,$t=0,Lt=1,mn=1,Ft=1<<ve;for(Ke=0,Je=1,Ie=2;Je<=ve;++Je,Ie<<=1){if(Lt+=mn<<=1,0>(mn-=qe[Je]))return 0;for(;0<qe[Je];--qe[Je])(Se=new P).g=Je,Se.value=Xe[Ke++],M(fe,pt+$t,Ie,Ft,Se),$t=R($t,Je)}for(Je=ve+1,Ie=2;15>=Je;++Je,Ie<<=1){if(Lt+=mn<<=1,0>(mn-=qe[Je]))return 0;for(;0<qe[Je];--qe[Je]){if(Se=new P,($t&ft)!=ct){for(pt+=Ft,ut=1<<(ct=Je)-ve;15>ct&&!(0>=(ut-=qe[ct]));)++ct,ut<<=1;it+=Ft=1<<(ut=ct-ve),fe[ge+(ct=$t&ft)].g=ut+ve,fe[ge+ct].value=pt-ge-ct}Se.g=Je-ve,Se.value=Xe[Ke++],M(fe,pt+($t>>ve),Ie,Ft,Se),$t=R($t,Je)}}return Lt!=2*Be[15]-1?0:it})(E,D,W,Z,se,ce)}function P(){this.value=this.g=0}function O(){this.value=this.g=0}function F(){this.G=o(5,P),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(fa,O)}function $(E,D,W,Z){t(E!=null),t(D!=null),t(2147483648>Z),E.Ca=254,E.I=0,E.b=-8,E.Ka=0,E.oa=D,E.pa=W,E.Jd=D,E.Yc=W+Z,E.Zc=4<=Z?W+Z-4+1:W,ne(E)}function G(E,D){for(var W=0;0<D--;)W|=ae(E,128)<<D;return W}function B(E,D){var W=G(E,D);return oe(E)?-W:W}function Y(E,D,W,Z){var se,ce=0;for(t(E!=null),t(D!=null),t(4294967288>Z),E.Sb=Z,E.Ra=0,E.u=0,E.h=0,4<Z&&(Z=4),se=0;se<Z;++se)ce+=D[W+se]<<8*se;E.Ra=ce,E.bb=Z,E.oa=D,E.pa=W}function ee(E){for(;8<=E.u&&E.bb<E.Sb;)E.Ra>>>=8,E.Ra+=E.oa[E.pa+E.bb]<<wd-8>>>0,++E.bb,E.u-=8;te(E)&&(E.h=1,E.u=0)}function J(E,D){if(t(0<=D),!E.h&&D<=Cc){var W=K(E)&bd[D];return E.u+=D,ee(E),W}return E.h=1,E.u=0}function H(){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 K(E){return E.Ra>>>(E.u&wd-1)>>>0}function te(E){return t(E.bb<=E.Sb),E.h||E.bb==E.Sb&&E.u>wd}function re(E,D){E.u=D,E.h=te(E)}function Q(E){E.u>=jd&&(t(E.u>=jd),ee(E))}function ne(E){t(E!=null&&E.oa!=null),E.pa<E.Zc?(E.I=(E.oa[E.pa++]|E.I<<8)>>>0,E.b+=8):(t(E!=null&&E.oa!=null),E.pa<E.Yc?(E.b+=8,E.I=E.oa[E.pa++]|E.I<<8):E.Ka?E.b=0:(E.I<<=8,E.b+=8,E.Ka=1))}function oe(E){return G(E,1)}function ae(E,D){var W=E.Ca;0>E.b&&ne(E);var Z=E.b,se=W*D>>>8,ce=(E.I>>>Z>se)+0;for(ce?(W-=se,E.I-=se+1<<Z>>>0):W=se+1,Z=W,se=0;256<=Z;)se+=8,Z>>=8;return Z=7^se+Ls[Z],E.b-=Z,E.Ca=(W<<Z)-1,ce}function le(E,D,W){E[D+0]=W>>24&255,E[D+1]=W>>16&255,E[D+2]=W>>8&255,E[D+3]=W>>0&255}function je(E,D){return E[D+0]<<0|E[D+1]<<8}function xe(E,D){return je(E,D)|E[D+2]<<16}function Fe(E,D){return je(E,D)|je(E,D+2)<<16}function he(E,D){var W=1<<D;return t(E!=null),t(0<D),E.X=i(W),E.X==null?0:(E.Mb=32-D,E.Xa=D,1)}function Ne(E,D){t(E!=null),t(D!=null),t(E.Xa==D.Xa),a(D.X,0,E.X,0,1<<D.Xa)}function ue(){this.X=[],this.Xa=this.Mb=0}function rt(E,D,W,Z){t(W!=null),t(Z!=null);var se=W[0],ce=Z[0];return se==0&&(se=(E*ce+D/2)/D),ce==0&&(ce=(D*se+E/2)/E),0>=se||0>=ce?0:(W[0]=se,Z[0]=ce,1)}function Te(E,D){return E+(1<<D)-1>>>D}function Pe(E,D){return((4278255360&E)+(4278255360&D)>>>0&4278255360)+((16711935&E)+(16711935&D)>>>0&16711935)>>>0}function $e(E,D){T[D]=function(W,Z,se,ce,fe,ge,ve){var Se;for(Se=0;Se<fe;++Se){var Ie=T[E](ge[ve+Se-1],se,ce+Se);ge[ve+Se]=Pe(W[Z+Se],Ie)}}}function Ve(){this.ud=this.hd=this.jd=0}function be(E,D){return((4278124286&(E^D))>>>1)+(E&D)>>>0}function We(E){return 0<=E&&256>E?E:0>E?0:255<E?255:void 0}function Ze(E,D){return We(E+(E-D+.5>>1))}function st(E,D,W){return Math.abs(D-W)-Math.abs(E-W)}function Mt(E,D,W,Z,se,ce,fe){for(Z=ce[fe-1],W=0;W<se;++W)ce[fe+W]=Z=Pe(E[D+W],Z)}function Ht(E,D,W,Z,se){var ce;for(ce=0;ce<W;++ce){var fe=E[D+ce],ge=fe>>8&255,ve=16711935&(ve=(ve=16711935&fe)+((ge<<16)+ge));Z[se+ce]=(4278255360&fe)+ve>>>0}}function Yt(E,D){D.jd=E>>0&255,D.hd=E>>8&255,D.ud=E>>16&255}function on(E,D,W,Z,se,ce){var fe;for(fe=0;fe<Z;++fe){var ge=D[W+fe],ve=ge>>>8,Se=ge,Ie=255&(Ie=(Ie=ge>>>16)+((E.jd<<24>>24)*(ve<<24>>24)>>>5));Se=255&(Se=(Se=Se+((E.hd<<24>>24)*(ve<<24>>24)>>>5))+((E.ud<<24>>24)*(Ie<<24>>24)>>>5)),se[ce+fe]=(4278255360&ge)+(Ie<<16)+Se}}function It(E,D,W,Z,se){T[D]=function(ce,fe,ge,ve,Se,Ie,Xe,Je,Ke){for(ve=Xe;ve<Je;++ve)for(Xe=0;Xe<Ke;++Xe)Se[Ie++]=se(ge[Z(ce[fe++])])},T[E]=function(ce,fe,ge,ve,Se,Ie,Xe){var Je=8>>ce.b,Ke=ce.Ea,pt=ce.K[0],it=ce.w;if(8>Je)for(ce=(1<<ce.b)-1,it=(1<<Je)-1;fe<ge;++fe){var qe,Be=0;for(qe=0;qe<Ke;++qe)qe&ce||(Be=Z(ve[Se++])),Ie[Xe++]=se(pt[Be&it]),Be>>=Je}else T["VP8LMapColor"+W](ve,Se,pt,it,Ie,Xe,fe,ge,Ke)}}function _t(E,D,W,Z,se){for(W=D+W;D<W;){var ce=E[D++];Z[se++]=ce>>16&255,Z[se++]=ce>>8&255,Z[se++]=ce>>0&255}}function xr(E,D,W,Z,se){for(W=D+W;D<W;){var ce=E[D++];Z[se++]=ce>>16&255,Z[se++]=ce>>8&255,Z[se++]=ce>>0&255,Z[se++]=ce>>24&255}}function xn(E,D,W,Z,se){for(W=D+W;D<W;){var ce=(fe=E[D++])>>16&240|fe>>12&15,fe=fe>>0&240|fe>>28&15;Z[se++]=ce,Z[se++]=fe}}function Rr(E,D,W,Z,se){for(W=D+W;D<W;){var ce=(fe=E[D++])>>16&248|fe>>13&7,fe=fe>>5&224|fe>>3&31;Z[se++]=ce,Z[se++]=fe}}function Wn(E,D,W,Z,se){for(W=D+W;D<W;){var ce=E[D++];Z[se++]=ce>>0&255,Z[se++]=ce>>8&255,Z[se++]=ce>>16&255}}function lr(E,D,W,Z,se,ce){if(ce==0)for(W=D+W;D<W;)le(Z,((ce=E[D++])[0]>>24|ce[1]>>8&65280|ce[2]<<8&16711680|ce[3]<<24)>>>0),se+=32;else a(Z,se,E,D,W)}function Ha(E,D){T[D][0]=T[E+"0"],T[D][1]=T[E+"1"],T[D][2]=T[E+"2"],T[D][3]=T[E+"3"],T[D][4]=T[E+"4"],T[D][5]=T[E+"5"],T[D][6]=T[E+"6"],T[D][7]=T[E+"7"],T[D][8]=T[E+"8"],T[D][9]=T[E+"9"],T[D][10]=T[E+"10"],T[D][11]=T[E+"11"],T[D][12]=T[E+"12"],T[D][13]=T[E+"13"],T[D][14]=T[E+"0"],T[D][15]=T[E+"0"]}function Rn(E){return E==hh||E==gu||E==Af||E==kf}function ta(){this.eb=[],this.size=this.A=this.fb=0}function fr(){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 na(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ta,this.f.kb=new fr,this.sd=null}function Ea(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Kn(){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 St(E){return alert("todo:WebPSamplerProcessPlane"),E.T}function hn(E,D){var W=E.T,Z=D.ba.f.RGBA,se=Z.eb,ce=Z.fb+E.ka*Z.A,fe=Fi[D.ba.S],ge=E.y,ve=E.O,Se=E.f,Ie=E.N,Xe=E.ea,Je=E.W,Ke=D.cc,pt=D.dc,it=D.Mc,qe=D.Nc,Be=E.ka,ut=E.ka+E.T,ct=E.U,ft=ct+1>>1;for(Be==0?fe(ge,ve,null,null,Se,Ie,Xe,Je,Se,Ie,Xe,Je,se,ce,null,null,ct):(fe(D.ec,D.fc,ge,ve,Ke,pt,it,qe,Se,Ie,Xe,Je,se,ce-Z.A,se,ce,ct),++W);Be+2<ut;Be+=2)Ke=Se,pt=Ie,it=Xe,qe=Je,Ie+=E.Rc,Je+=E.Rc,ce+=2*Z.A,fe(ge,(ve+=2*E.fa)-E.fa,ge,ve,Ke,pt,it,qe,Se,Ie,Xe,Je,se,ce-Z.A,se,ce,ct);return ve+=E.fa,E.j+ut<E.o?(a(D.ec,D.fc,ge,ve,ct),a(D.cc,D.dc,Se,Ie,ft),a(D.Mc,D.Nc,Xe,Je,ft),W--):1&ut||fe(ge,ve,null,null,Se,Ie,Xe,Je,Se,Ie,Xe,Je,se,ce+Z.A,null,null,ct),W}function yr(E,D,W){var Z=E.F,se=[E.J];if(Z!=null){var ce=E.U,fe=D.ba.S,ge=fe==Cf||fe==Af;D=D.ba.f.RGBA;var ve=[0],Se=E.ka;ve[0]=E.T,E.Kb&&(Se==0?--ve[0]:(--Se,se[0]-=E.width),E.j+E.ka+E.T==E.o&&(ve[0]=E.o-E.j-Se));var Ie=D.eb;Se=D.fb+Se*D.A,E=ze(Z,se[0],E.width,ce,ve,Ie,Se+(ge?0:3),D.A),t(W==ve),E&&Rn(fe)&&U(Ie,Se,ge,ce,ve,D.A)}return 0}function Gn(E){var D=E.ma,W=D.ba.S,Z=11>W,se=W==Cd||W==Sf||W==Cf||W==Wr||W==12||Rn(W);if(D.memory=null,D.Ib=null,D.Jb=null,D.Nd=null,!fl(D.Oa,E,se?11:12))return 0;if(se&&Rn(W)&&vt(),E.da)alert("todo:use_scaling");else{if(Z){if(D.Ib=St,E.Kb){if(W=E.U+1>>1,D.memory=i(E.U+2*W),D.memory==null)return 0;D.ec=D.memory,D.fc=0,D.cc=D.ec,D.dc=D.fc+E.U,D.Mc=D.cc,D.Nc=D.dc+W,D.Ib=hn,vt()}}else alert("todo:EmitYUV");se&&(D.Jb=yr,Z&&Qe())}if(Z&&!Fs){for(E=0;256>E;++E)qi[E]=89858*(E-128)+yl>>Tc,Bi[E]=-22014*(E-128)+yl,gh[E]=-45773*(E-128),bu[E]=113618*(E-128)+yl>>Tc;for(E=Tr;E<Fr;++E)D=76283*(E-16)+yl>>Tc,lp[E-Tr]=Os(D,255),kv[E-Tr]=Os(D+8>>4,15);Fs=1}return 1}function da(E){var D=E.ma,W=E.U,Z=E.T;return t(!(1&E.ka)),0>=W||0>=Z?0:(W=D.Ib(E,D),D.Jb!=null&&D.Jb(E,D,W),D.Dc+=W,1)}function cr(E){E.ma.memory=null}function Dt(E,D,W,Z){return J(E,8)!=47?0:(D[0]=J(E,14)+1,W[0]=J(E,14)+1,Z[0]=J(E,1),J(E,3)!=0?0:!E.h)}function va(E,D){if(4>E)return E+1;var W=E-2>>1;return(2+(1&E)<<W)+J(D,W)+1}function ar(E,D){return 120<D?D-120:1<=(W=((W=u2[D-1])>>4)*E+(8-(15&W)))?W:1;var W}function dr(E,D,W){var Z=K(W),se=E[D+=255&Z].g-8;return 0<se&&(re(W,W.u+8),Z=K(W),D+=E[D].value,D+=Z&(1<<se)-1),re(W,W.u+E[D].g),E[D].value}function jr(E,D,W){return W.g+=E.g,W.value+=E.value<<D>>>0,t(8>=W.g),E.g}function Yn(E,D,W){var Z=E.xc;return t((D=Z==0?0:E.vc[E.md*(W>>Z)+(D>>Z)])<E.Wb),E.Ya[D]}function Ta(E,D,W,Z){var se=E.ab,ce=E.c*D,fe=E.C;D=fe+D;var ge=W,ve=Z;for(Z=E.Ta,W=E.Ua;0<se--;){var Se=E.gc[se],Ie=fe,Xe=D,Je=ge,Ke=ve,pt=(ve=Z,ge=W,Se.Ea);switch(t(Ie<Xe),t(Xe<=Se.nc),Se.hc){case 2:pu(Je,Ke,(Xe-Ie)*pt,ve,ge);break;case 0:var it=Ie,qe=Xe,Be=ve,ut=ge,ct=(Ft=Se).Ea;it==0&&(Ac(Je,Ke,null,null,1,Be,ut),Mt(Je,Ke+1,0,0,ct-1,Be,ut+1),Ke+=ct,ut+=ct,++it);for(var ft=1<<Ft.b,$t=ft-1,Lt=Te(ct,Ft.b),mn=Ft.K,Ft=Ft.w+(it>>Ft.b)*Lt;it<qe;){var vr=mn,br=Ft,hr=1;for(Do(Je,Ke,Be,ut-ct,1,Be,ut);hr<ct;){var Dn=(hr&~$t)+ft;Dn>ct&&(Dn=ct),(0,Fo[vr[br++]>>8&15])(Je,Ke+ +hr,Be,ut+hr-ct,Dn-hr,Be,ut+hr),hr=Dn}Ke+=ct,ut+=ct,++it&$t||(Ft+=Lt)}Xe!=Se.nc&&a(ve,ge-pt,ve,ge+(Xe-Ie-1)*pt,pt);break;case 1:for(pt=Je,qe=Ke,ct=(Je=Se.Ea)-(ut=Je&~(Be=(Ke=1<<Se.b)-1)),it=Te(Je,Se.b),ft=Se.K,Se=Se.w+(Ie>>Se.b)*it;Ie<Xe;){for($t=ft,Lt=Se,mn=new Ve,Ft=qe+ut,vr=qe+Je;qe<Ft;)Yt($t[Lt++],mn),Gl(mn,pt,qe,Ke,ve,ge),qe+=Ke,ge+=Ke;qe<vr&&(Yt($t[Lt++],mn),Gl(mn,pt,qe,ct,ve,ge),qe+=ct,ge+=ct),++Ie&Be||(Se+=it)}break;case 3:if(Je==ve&&Ke==ge&&0<Se.b){for(qe=ve,Je=pt=ge+(Xe-Ie)*pt-(ut=(Xe-Ie)*Te(Se.Ea,Se.b)),Ke=ve,Be=ge,it=[],ut=(ct=ut)-1;0<=ut;--ut)it[ut]=Ke[Be+ut];for(ut=ct-1;0<=ut;--ut)qe[Je+ut]=it[ut];Rs(Se,Ie,Xe,ve,pt,ve,ge)}else Rs(Se,Ie,Xe,Je,Ke,ve,ge)}ge=Z,ve=W}ve!=W&&a(Z,W,ge,ve,ce)}function ro(E,D){var W=E.V,Z=E.Ba+E.c*E.C,se=D-E.C;if(t(D<=E.l.o),t(16>=se),0<se){var ce=E.l,fe=E.Ta,ge=E.Ua,ve=ce.width;if(Ta(E,se,W,Z),se=ge=[ge],t((W=E.C)<(Z=D)),t(ce.v<ce.va),Z>ce.o&&(Z=ce.o),W<ce.j){var Se=ce.j-W;W=ce.j,se[0]+=Se*ve}if(W>=Z?W=0:(se[0]+=4*ce.v,ce.ka=W-ce.j,ce.U=ce.va-ce.v,ce.T=Z-W,W=1),W){if(ge=ge[0],11>(W=E.ca).S){var Ie=W.f.RGBA,Xe=(Z=W.S,se=ce.U,ce=ce.T,Se=Ie.eb,Ie.A),Je=ce;for(Ie=Ie.fb+E.Ma*Ie.A;0<Je--;){var Ke=fe,pt=ge,it=se,qe=Se,Be=Ie;switch(Z){case ap:Is(Ke,pt,it,qe,Be);break;case Cd:as(Ke,pt,it,qe,Be);break;case hh:as(Ke,pt,it,qe,Be),U(qe,Be,0,it,1,0);break;case Nv:pl(Ke,pt,it,qe,Be);break;case Sf:lr(Ke,pt,it,qe,Be,1);break;case gu:lr(Ke,pt,it,qe,Be,1),U(qe,Be,0,it,1,0);break;case Cf:lr(Ke,pt,it,qe,Be,0);break;case Af:lr(Ke,pt,it,qe,Be,0),U(qe,Be,1,it,1,0);break;case Wr:Yl(Ke,pt,it,qe,Be);break;case kf:Yl(Ke,pt,it,qe,Be),ke(qe,Be,it,1,0);break;case sp:ml(Ke,pt,it,qe,Be);break;default:t(0)}ge+=ve,Ie+=Xe}E.Ma+=ce}else alert("todo:EmitRescaledRowsYUVA");t(E.Ma<=W.height)}}E.C=D,t(E.C<=E.i)}function hi(E){var D;if(0<E.ua)return 0;for(D=0;D<E.Wb;++D){var W=E.Ya[D].G,Z=E.Ya[D].H;if(0<W[1][Z[1]+0].g||0<W[2][Z[2]+0].g||0<W[3][Z[3]+0].g)return 0}return 1}function ra(E,D,W,Z,se,ce){if(E.Z!=0){var fe=E.qd,ge=E.rd;for(t(ti[E.Z]!=null);D<W;++D)ti[E.Z](fe,ge,Z,se,Z,se,ce),fe=Z,ge=se,se+=ce;E.qd=fe,E.rd=ge}}function ks(E,D){var W=E.l.ma,Z=W.Z==0||W.Z==1?E.l.j:E.C;if(Z=E.C<Z?Z:E.C,t(D<=E.l.o),D>Z){var se=E.l.width,ce=W.ca,fe=W.tb+se*Z,ge=E.V,ve=E.Ba+E.c*Z,Se=E.gc;t(E.ab==1),t(Se[0].hc==3),kc(Se[0],Z,D,ge,ve,ce,fe),ra(W,Z,D,ce,fe,se)}E.C=E.Ma=D}function ua(E,D,W,Z,se,ce,fe){var ge=E.$/Z,ve=E.$%Z,Se=E.m,Ie=E.s,Xe=W+E.$,Je=Xe;se=W+Z*se;var Ke=W+Z*ce,pt=280+Ie.ua,it=E.Pb?ge:16777216,qe=0<Ie.ua?Ie.Wa:null,Be=Ie.wc,ut=Xe<Ke?Yn(Ie,ve,ge):null;t(E.C<ce),t(Ke<=se);var ct=!1;e:for(;;){for(;ct||Xe<Ke;){var ft=0;if(ge>=it){var $t=Xe-W;t((it=E).Pb),it.wd=it.m,it.xd=$t,0<it.s.ua&&Ne(it.s.Wa,it.s.vb),it=ge+op}if(ve&Be||(ut=Yn(Ie,ve,ge)),t(ut!=null),ut.Qb&&(D[Xe]=ut.qb,ct=!0),!ct)if(Q(Se),ut.jc){ft=Se,$t=D;var Lt=Xe,mn=ut.pd[K(ft)&fa-1];t(ut.jc),256>mn.g?(re(ft,ft.u+mn.g),$t[Lt]=mn.value,ft=0):(re(ft,ft.u+mn.g-256),t(256<=mn.value),ft=mn.value),ft==0&&(ct=!0)}else ft=dr(ut.G[0],ut.H[0],Se);if(Se.h)break;if(ct||256>ft){if(!ct)if(ut.nd)D[Xe]=(ut.qb|ft<<8)>>>0;else{if(Q(Se),ct=dr(ut.G[1],ut.H[1],Se),Q(Se),$t=dr(ut.G[2],ut.H[2],Se),Lt=dr(ut.G[3],ut.H[3],Se),Se.h)break;D[Xe]=(Lt<<24|ct<<16|ft<<8|$t)>>>0}if(ct=!1,++Xe,++ve>=Z&&(ve=0,++ge,fe!=null&&ge<=ce&&!(ge%16)&&fe(E,ge),qe!=null))for(;Je<Xe;)ft=D[Je++],qe.X[(506832829*ft&4294967295)>>>qe.Mb]=ft}else if(280>ft){if(ft=va(ft-256,Se),$t=dr(ut.G[4],ut.H[4],Se),Q(Se),$t=ar(Z,$t=va($t,Se)),Se.h)break;if(Xe-W<$t||se-Xe<ft)break e;for(Lt=0;Lt<ft;++Lt)D[Xe+Lt]=D[Xe+Lt-$t];for(Xe+=ft,ve+=ft;ve>=Z;)ve-=Z,++ge,fe!=null&&ge<=ce&&!(ge%16)&&fe(E,ge);if(t(Xe<=se),ve&Be&&(ut=Yn(Ie,ve,ge)),qe!=null)for(;Je<Xe;)ft=D[Je++],qe.X[(506832829*ft&4294967295)>>>qe.Mb]=ft}else{if(!(ft<pt))break e;for(ct=ft-280,t(qe!=null);Je<Xe;)ft=D[Je++],qe.X[(506832829*ft&4294967295)>>>qe.Mb]=ft;ft=Xe,t(!(ct>>>($t=qe).Xa)),D[ft]=$t.X[ct],ct=!0}ct||t(Se.h==te(Se))}if(E.Pb&&Se.h&&Xe<se)t(E.m.h),E.a=5,E.m=E.wd,E.$=E.xd,0<E.s.ua&&Ne(E.s.vb,E.s.Wa);else{if(Se.h)break e;fe!=null&&fe(E,ge>ce?ce:ge),E.a=0,E.$=Xe-W}return 1}return E.a=3,0}function Ps(E){t(E!=null),E.vc=null,E.yc=null,E.Ya=null;var D=E.Wa;D!=null&&(D.X=null),E.vb=null,t(E!=null)}function xs(){var E=new _f;return E==null?null:(E.a=0,E.xb=mh,Ha("Predictor","VP8LPredictors"),Ha("Predictor","VP8LPredictors_C"),Ha("PredictorAdd","VP8LPredictorsAdd"),Ha("PredictorAdd","VP8LPredictorsAdd_C"),pu=Ht,Gl=on,Is=_t,as=xr,Yl=xn,ml=Rr,pl=Wn,T.VP8LMapColor32b=Nd,T.VP8LMapColor8b=_d,E)}function Ye(E,D,W,Z,se){var ce=1,fe=[E],ge=[D],ve=Z.m,Se=Z.s,Ie=null,Xe=0;e:for(;;){if(W)for(;ce&&J(ve,1);){var Je=fe,Ke=ge,pt=Z,it=1,qe=pt.m,Be=pt.gc[pt.ab],ut=J(qe,2);if(pt.Oc&1<<ut)ce=0;else{switch(pt.Oc|=1<<ut,Be.hc=ut,Be.Ea=Je[0],Be.nc=Ke[0],Be.K=[null],++pt.ab,t(4>=pt.ab),ut){case 0:case 1:Be.b=J(qe,3)+2,it=Ye(Te(Be.Ea,Be.b),Te(Be.nc,Be.b),0,pt,Be.K),Be.K=Be.K[0];break;case 3:var ct,ft=J(qe,8)+1,$t=16<ft?0:4<ft?1:2<ft?2:3;if(Je[0]=Te(Be.Ea,$t),Be.b=$t,ct=it=Ye(ft,1,0,pt,Be.K)){var Lt,mn=ft,Ft=Be,vr=1<<(8>>Ft.b),br=i(vr);if(br==null)ct=0;else{var hr=Ft.K[0],Dn=Ft.w;for(br[0]=Ft.K[0][0],Lt=1;Lt<1*mn;++Lt)br[Lt]=Pe(hr[Dn+Lt],br[Lt-1]);for(;Lt<4*vr;++Lt)br[Lt]=0;Ft.K[0]=null,Ft.K[0]=br,ct=1}}it=ct;break;case 2:break;default:t(0)}ce=it}}if(fe=fe[0],ge=ge[0],ce&&J(ve,1)&&!(ce=1<=(Xe=J(ve,4))&&11>=Xe)){Z.a=3;break e}var Or;if(Or=ce)t:{var qr,Tn,Na,bi=Z,Ba=fe,is=ge,Ar=Xe,ni=W,ri=bi.m,_a=bi.s,os=[null],qs=1,$i=0,Ho=Sv[Ar];n:for(;;){if(ni&&J(ri,1)){var Sa=J(ri,3)+2,Ka=Te(Ba,Sa),uo=Te(is,Sa),Pd=Ka*uo;if(!Ye(Ka,uo,0,bi,os))break n;for(os=os[0],_a.xc=Sa,qr=0;qr<Pd;++qr){var Mc=os[qr]>>8&65535;os[qr]=Mc,Mc>=qs&&(qs=Mc+1)}}if(ri.h)break n;for(Tn=0;5>Tn;++Tn){var kr=xu[Tn];!Tn&&0<Ar&&(kr+=1<<Ar),$i<kr&&($i=kr)}var ec=o(qs*Ho,P),cp=qs,Rx=o(cp,F);if(Rx==null)var Wo=null;else t(65536>=cp),Wo=Rx;var Ko=i($i);if(Wo==null||Ko==null||ec==null){bi.a=1;break n}var ju=ec;for(qr=Na=0;qr<qs;++qr){var Go=Wo[qr],Lc=Go.G,Nu=Go.H,xh=0,ho=1,yh=0;for(Tn=0;5>Tn;++Tn){kr=xu[Tn],Lc[Tn]=ju,Nu[Tn]=Na,!Tn&&0<Ar&&(kr+=1<<Ar);a:{var Ed,Rc=kr,vh=bi,tc=Ko,Ev=ju,Ix=Na,ia=0,vl=vh.m,Dx=J(vl,1);if(s(tc,0,0,Rc),Dx){var Fx=J(vl,1)+1,dp=J(vl,1),up=J(vl,dp==0?1:8);tc[up]=1,Fx==2&&(tc[up=J(vl,8)]=1);var nc=1}else{var ma=i(19),Ga=J(vl,4)+4;if(19<Ga){vh.a=3;var $a=0;break a}for(Ed=0;Ed<Ga;++Ed)ma[d2[Ed]]=J(vl,3);var bh=void 0,Ic=void 0,wh=vh,g2=ma,ls=Rc,hp=tc,Mf=0,rc=wh.m,bl=8,fo=o(128,P);r:for(;k(fo,0,7,g2,19);){if(J(rc,1)){var Lf=2+2*J(rc,3);if((bh=2+J(rc,Lf))>ls)break r}else bh=ls;for(Ic=0;Ic<ls&&bh--;){Q(rc);var fp=fo[0+(127&K(rc))];re(rc,rc.u+fp.g);var Td=fp.value;if(16>Td)hp[Ic++]=Td,Td!=0&&(bl=Td);else{var Tv=Td==16,qx=Td-16,Ov=ip[qx],Bx=J(rc,Pf[qx])+Ov;if(Ic+Bx>ls)break r;for(var Mv=Tv?bl:0;0<Bx--;)hp[Ic++]=Mv}}Mf=1;break r}Mf||(wh.a=3),nc=Mf}(nc=nc&&!vl.h)&&(ia=k(Ev,Ix,8,tc,Rc)),nc&&ia!=0?$a=ia:(vh.a=3,$a=0)}if($a==0)break n;if(ho&&_v[Tn]==1&&(ho=ju[Na].g==0),xh+=ju[Na].g,Na+=$a,3>=Tn){var jh,mp=Ko[0];for(jh=1;jh<kr;++jh)Ko[jh]>mp&&(mp=Ko[jh]);yh+=mp}}if(Go.nd=ho,Go.Qb=0,ho&&(Go.qb=(Lc[3][Nu[3]+0].value<<24|Lc[1][Nu[1]+0].value<<16|Lc[2][Nu[2]+0].value)>>>0,xh==0&&256>Lc[0][Nu[0]+0].value&&(Go.Qb=1,Go.qb+=Lc[0][Nu[0]+0].value<<8)),Go.jc=!Go.Qb&&6>yh,Go.jc){var Rf,mo=Go;for(Rf=0;Rf<fa;++Rf){var Dc=Rf,wl=mo.pd[Dc],_u=mo.G[0][mo.H[0]+Dc];256<=_u.value?(wl.g=_u.g+256,wl.value=_u.value):(wl.g=0,wl.value=0,Dc>>=jr(_u,8,wl),Dc>>=jr(mo.G[1][mo.H[1]+Dc],16,wl),Dc>>=jr(mo.G[2][mo.H[2]+Dc],0,wl),jr(mo.G[3][mo.H[3]+Dc],24,wl))}}}_a.vc=os,_a.Wb=qs,_a.Ya=Wo,_a.yc=ec,Or=1;break t}Or=0}if(!(ce=Or)){Z.a=3;break e}if(0<Xe){if(Se.ua=1<<Xe,!he(Se.Wa,Xe)){Z.a=1,ce=0;break e}}else Se.ua=0;var pp=Z,gp=fe,Lv=ge,xp=pp.s,yp=xp.xc;if(pp.c=gp,pp.i=Lv,xp.md=Te(gp,yp),xp.wc=yp==0?-1:(1<<yp)-1,W){Z.xb=Zl;break e}if((Ie=i(fe*ge))==null){Z.a=1,ce=0;break e}ce=(ce=ua(Z,Ie,0,fe,ge,ge,null))&&!ve.h;break e}return ce?(se!=null?se[0]=Ie:(t(Ie==null),t(W)),Z.$=0,W||Ps(Se)):Ps(Se),ce}function nt(E,D){var W=E.c*E.i,Z=W+D+16*D;return t(E.c<=D),E.V=i(Z),E.V==null?(E.Ta=null,E.Ua=0,E.a=1,0):(E.Ta=E.V,E.Ua=E.Ba+W+D,1)}function Vr(E,D){var W=E.C,Z=D-W,se=E.V,ce=E.Ba+E.c*W;for(t(D<=E.l.o);0<Z;){var fe=16<Z?16:Z,ge=E.l.ma,ve=E.l.width,Se=ve*fe,Ie=ge.ca,Xe=ge.tb+ve*W,Je=E.Ta,Ke=E.Ua;Ta(E,fe,se,ce),wt(Je,Ke,Ie,Xe,Se),ra(ge,W,W+fe,Ie,Xe,ve),Z-=fe,se+=fe*E.c,W+=fe}t(W==D),E.C=E.Ma=D}function aa(){this.ub=this.yd=this.td=this.Rb=0}function Da(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function ur(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function fi(){this.Yb=(function(){var E=[];return(function D(W,Z,se){for(var ce=se[Z],fe=0;fe<ce&&(W.push(se.length>Z+1?[]:0),!(se.length<Z+1));fe++)D(W[fe],Z+1,se)})(E,0,[3,11]),E})()}function $n(){this.jb=i(3),this.Wc=l([4,8],fi),this.Xc=l([4,17],fi)}function Ue(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Wt(){this.ld=this.La=this.dd=this.tc=0}function ys(){this.Na=this.la=0}function Fa(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function mi(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Il(){this.uc=this.M=this.Nb=0,this.wa=Array(new Wt),this.Y=0,this.ya=Array(new mi),this.aa=0,this.l=new ol}function ao(){this.y=i(16),this.f=i(8),this.ea=i(8)}function vs(){this.cb=this.a=0,this.sc="",this.m=new H,this.Od=new aa,this.Kc=new Da,this.ed=new Ue,this.Qa=new ur,this.Ic=this.$c=this.Aa=0,this.D=new Il,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,H),this.ia=0,this.pb=o(4,Fa),this.Pa=new $n,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new ao),this.Hd=0,this.rb=Array(new ys),this.sb=0,this.wa=Array(new Wt),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 mi),this.L=this.aa=0,this.gd=l([4,2],Wt),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 ol(){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 es(){var E=new vs;return E!=null&&(E.a=0,E.sc="OK",E.cb=0,E.Xb=0,yu||(yu=Co)),E}function Qn(E,D,W){return E.a==0&&(E.a=D,E.sc=W,E.cb=0),0}function Yr(E,D,W){return 3<=W&&E[D+0]==157&&E[D+1]==1&&E[D+2]==42}function So(E,D){if(E==null)return 0;if(E.a=0,E.sc="OK",D==null)return Qn(E,2,"null VP8Io passed to VP8GetHeaders()");var W=D.data,Z=D.w,se=D.ha;if(4>se)return Qn(E,7,"Truncated header.");var ce=W[Z+0]|W[Z+1]<<8|W[Z+2]<<16,fe=E.Od;if(fe.Rb=!(1&ce),fe.td=ce>>1&7,fe.yd=ce>>4&1,fe.ub=ce>>5,3<fe.td)return Qn(E,3,"Incorrect keyframe parameters.");if(!fe.yd)return Qn(E,4,"Frame not displayable.");Z+=3,se-=3;var ge=E.Kc;if(fe.Rb){if(7>se)return Qn(E,7,"cannot parse picture header");if(!Yr(W,Z,se))return Qn(E,3,"Bad code word");ge.c=16383&(W[Z+4]<<8|W[Z+3]),ge.Td=W[Z+4]>>6,ge.i=16383&(W[Z+6]<<8|W[Z+5]),ge.Ud=W[Z+6]>>6,Z+=7,se-=7,E.za=ge.c+15>>4,E.Ub=ge.i+15>>4,D.width=ge.c,D.height=ge.i,D.Da=0,D.j=0,D.v=0,D.va=D.width,D.o=D.height,D.da=0,D.ib=D.width,D.hb=D.height,D.U=D.width,D.T=D.height,s((ce=E.Pa).jb,0,255,ce.jb.length),t((ce=E.Qa)!=null),ce.Cb=0,ce.Bb=0,ce.Fb=1,s(ce.Zb,0,0,ce.Zb.length),s(ce.Lb,0,0,ce.Lb)}if(fe.ub>se)return Qn(E,7,"bad partition length");$(ce=E.m,W,Z,fe.ub),Z+=fe.ub,se-=fe.ub,fe.Rb&&(ge.Ld=oe(ce),ge.Kd=oe(ce)),ge=E.Qa;var ve,Se=E.Pa;if(t(ce!=null),t(ge!=null),ge.Cb=oe(ce),ge.Cb){if(ge.Bb=oe(ce),oe(ce)){for(ge.Fb=oe(ce),ve=0;4>ve;++ve)ge.Zb[ve]=oe(ce)?B(ce,7):0;for(ve=0;4>ve;++ve)ge.Lb[ve]=oe(ce)?B(ce,6):0}if(ge.Bb)for(ve=0;3>ve;++ve)Se.jb[ve]=oe(ce)?G(ce,8):255}else ge.Bb=0;if(ce.Ka)return Qn(E,3,"cannot parse segment header");if((ge=E.ed).zd=oe(ce),ge.Tb=G(ce,6),ge.wb=G(ce,3),ge.Pc=oe(ce),ge.Pc&&oe(ce)){for(Se=0;4>Se;++Se)oe(ce)&&(ge.vd[Se]=B(ce,6));for(Se=0;4>Se;++Se)oe(ce)&&(ge.od[Se]=B(ce,6))}if(E.L=ge.Tb==0?0:ge.zd?1:2,ce.Ka)return Qn(E,3,"cannot parse filter header");var Ie=se;if(se=ve=Z,Z=ve+Ie,ge=Ie,E.Xb=(1<<G(E.m,2))-1,Ie<3*(Se=E.Xb))W=7;else{for(ve+=3*Se,ge-=3*Se,Ie=0;Ie<Se;++Ie){var Xe=W[se+0]|W[se+1]<<8|W[se+2]<<16;Xe>ge&&(Xe=ge),$(E.Jc[+Ie],W,ve,Xe),ve+=Xe,ge-=Xe,se+=3}$(E.Jc[+Se],W,ve,ge),W=ve<Z?0:5}if(W!=0)return Qn(E,W,"cannot parse partitions");for(W=G(ve=E.m,7),se=oe(ve)?B(ve,4):0,Z=oe(ve)?B(ve,4):0,ge=oe(ve)?B(ve,4):0,Se=oe(ve)?B(ve,4):0,ve=oe(ve)?B(ve,4):0,Ie=E.Qa,Xe=0;4>Xe;++Xe){if(Ie.Cb){var Je=Ie.Zb[Xe];Ie.Fb||(Je+=W)}else{if(0<Xe){E.pb[Xe]=E.pb[0];continue}Je=W}var Ke=E.pb[Xe];Ke.Sc[0]=fh[Os(Je+se,127)],Ke.Sc[1]=Ef[Os(Je+0,127)],Ke.Eb[0]=2*fh[Os(Je+Z,127)],Ke.Eb[1]=101581*Ef[Os(Je+ge,127)]>>16,8>Ke.Eb[1]&&(Ke.Eb[1]=8),Ke.Qc[0]=fh[Os(Je+Se,117)],Ke.Qc[1]=Ef[Os(Je+ve,127)],Ke.lc=Je+ve}if(!fe.Rb)return Qn(E,4,"Not a key frame.");for(oe(ce),fe=E.Pa,W=0;4>W;++W){for(se=0;8>se;++se)for(Z=0;3>Z;++Z)for(ge=0;11>ge;++ge)Se=ae(ce,f2[W][se][Z][ge])?G(ce,8):Av[W][se][Z][ge],fe.Wc[W][se].Yb[Z][ge]=Se;for(se=0;17>se;++se)fe.Xc[W][se]=fe.Wc[W][Ox[se]]}return E.kc=oe(ce),E.kc&&(E.Bd=G(ce,8)),E.cb=1}function Co(E,D,W,Z,se,ce,fe){var ge=D[se].Yb[W];for(W=0;16>se;++se){if(!ae(E,ge[W+0]))return se;for(;!ae(E,ge[W+1]);)if(ge=D[++se].Yb[0],W=0,se==16)return 16;var ve=D[se+1].Yb;if(ae(E,ge[W+2])){var Se=E,Ie=0;if(ae(Se,(Je=ge)[(Xe=W)+3]))if(ae(Se,Je[Xe+6])){for(ge=0,Xe=2*(Ie=ae(Se,Je[Xe+8]))+(Je=ae(Se,Je[Xe+9+Ie])),Ie=0,Je=Ex[Xe];Je[ge];++ge)Ie+=Ie+ae(Se,Je[ge]);Ie+=3+(8<<Xe)}else ae(Se,Je[Xe+7])?(Ie=7+2*ae(Se,165),Ie+=ae(Se,145)):Ie=5+ae(Se,159);else Ie=ae(Se,Je[Xe+4])?3+ae(Se,Je[Xe+5]):2;ge=ve[2]}else Ie=1,ge=ve[1];ve=fe+Tx[se],0>(Se=E).b&&ne(Se);var Xe,Je=Se.b,Ke=(Xe=Se.Ca>>1)-(Se.I>>Je)>>31;--Se.b,Se.Ca+=Ke,Se.Ca|=1,Se.I-=(Xe+1&Ke)<<Je,ce[ve]=((Ie^Ke)-Ke)*Z[(0<se)+0]}return 16}function Ao(E){var D=E.rb[E.sb-1];D.la=0,D.Na=0,s(E.zc,0,0,E.zc.length),E.ja=0}function ko(E,D){if(E==null)return 0;if(D==null)return Qn(E,2,"NULL VP8Io parameter in VP8Decode().");if(!E.cb&&!So(E,D))return 0;if(t(E.cb),D.ac==null||D.ac(D)){D.ob&&(E.L=0);var W=wu[E.L];if(E.L==2?(E.yb=0,E.zb=0):(E.yb=D.v-W>>4,E.zb=D.j-W>>4,0>E.yb&&(E.yb=0),0>E.zb&&(E.zb=0)),E.Va=D.o+15+W>>4,E.Hb=D.va+15+W>>4,E.Hb>E.za&&(E.Hb=E.za),E.Va>E.Ub&&(E.Va=E.Ub),0<E.L){var Z=E.ed;for(W=0;4>W;++W){var se;if(E.Qa.Cb){var ce=E.Qa.Lb[W];E.Qa.Fb||(ce+=Z.Tb)}else ce=Z.Tb;for(se=0;1>=se;++se){var fe=E.gd[W][se],ge=ce;if(Z.Pc&&(ge+=Z.vd[0],se&&(ge+=Z.od[0])),0<(ge=0>ge?0:63<ge?63:ge)){var ve=ge;0<Z.wb&&(ve=4<Z.wb?ve>>2:ve>>1)>9-Z.wb&&(ve=9-Z.wb),1>ve&&(ve=1),fe.dd=ve,fe.tc=2*ge+ve,fe.ld=40<=ge?2:15<=ge?1:0}else fe.tc=0;fe.La=se}}}W=0}else Qn(E,6,"Frame setup failed"),W=E.a;if(W=W==0){if(W){E.$c=0,0<E.Aa||(E.Ic=Oc);e:{W=E.Ic,Z=4*(ve=E.za);var Se=32*ve,Ie=ve+1,Xe=0<E.L?ve*(0<E.Aa?2:1):0,Je=(E.Aa==2?2:1)*ve;if((fe=Z+832+(se=3*(16*W+wu[E.L])/2*Se)+(ce=E.Fa!=null&&0<E.Fa.length?E.Kc.c*E.Kc.i:0))!=fe)W=0;else{if(fe>E.Vb){if(E.Vb=0,E.Ec=i(fe),E.Fc=0,E.Ec==null){W=Qn(E,1,"no memory during frame initialization.");break e}E.Vb=fe}fe=E.Ec,ge=E.Fc,E.Ac=fe,E.Bc=ge,ge+=Z,E.Gd=o(Se,ao),E.Hd=0,E.rb=o(Ie+1,ys),E.sb=1,E.wa=Xe?o(Xe,Wt):null,E.Y=0,E.D.Nb=0,E.D.wa=E.wa,E.D.Y=E.Y,0<E.Aa&&(E.D.Y+=ve),t(!0),E.oc=fe,E.pc=ge,ge+=832,E.ya=o(Je,mi),E.aa=0,E.D.ya=E.ya,E.D.aa=E.aa,E.Aa==2&&(E.D.aa+=ve),E.R=16*ve,E.B=8*ve,ve=(Se=wu[E.L])*E.R,Se=Se/2*E.B,E.sa=fe,E.ta=ge+ve,E.qa=E.sa,E.ra=E.ta+16*W*E.R+Se,E.Ha=E.qa,E.Ia=E.ra+8*W*E.B+Se,E.$c=0,ge+=se,E.mb=ce?fe:null,E.nb=ce?ge:null,t(ge+ce<=E.Fc+E.Vb),Ao(E),s(E.Ac,E.Bc,0,Z),W=1}}if(W){if(D.ka=0,D.y=E.sa,D.O=E.ta,D.f=E.qa,D.N=E.ra,D.ea=E.Ha,D.Vd=E.Ia,D.fa=E.R,D.Rc=E.B,D.F=null,D.J=0,!co){for(W=-255;255>=W;++W)kt[255+W]=0>W?-W:W;for(W=-1020;1020>=W;++W)zt[1020+W]=-128>W?-128:127<W?127:W;for(W=-112;112>=W;++W)Zn[112+W]=-16>W?-16:15<W?15:W;for(W=-255;510>=W;++W)ja[255+W]=0>W?0:255<W?255:W;co=1}Sd=sr,Ql=uu,qo=ql,ss=dh,xi=pd,Un=Fl,Pc=Js,ei=qa,Xl=_c,Jl=Wl,Ec=so,Ds=Ri,gl=io,Bo=xd,$o=Ts,Uo=ns,xl=gi,Wa=uh,Vo[0]=Xn,Vo[1]=jc,Vo[2]=ll,Vo[3]=To,Vo[4]=ba,Vo[5]=cl,Vo[6]=Es,Vo[7]=fn,Vo[8]=Dr,Vo[9]=gd,vi[0]=Mi,vi[1]=$l,vi[2]=Eo,vi[3]=Ul,vi[4]=Ir,vi[5]=Gs,vi[6]=Ys,Di[0]=wa,Di[1]=Nc,Di[2]=Hr,Di[3]=dl,Di[4]=Qs,Di[5]=ts,Di[6]=ul,W=1}else W=0}W&&(W=(function(Ke,pt){for(Ke.M=0;Ke.M<Ke.Va;++Ke.M){var it,qe=Ke.Jc[Ke.M&Ke.Xb],Be=Ke.m,ut=Ke;for(it=0;it<ut.za;++it){var ct=Be,ft=ut,$t=ft.Ac,Lt=ft.Bc+4*it,mn=ft.zc,Ft=ft.ya[ft.aa+it];if(ft.Qa.Bb?Ft.$b=ae(ct,ft.Pa.jb[0])?2+ae(ct,ft.Pa.jb[2]):ae(ct,ft.Pa.jb[1]):Ft.$b=0,ft.kc&&(Ft.Ad=ae(ct,ft.Bd)),Ft.Za=!ae(ct,145)+0,Ft.Za){var vr=Ft.Ob,br=0;for(ft=0;4>ft;++ft){var hr,Dn=mn[0+ft];for(hr=0;4>hr;++hr){Dn=h2[$t[Lt+hr]][Dn];for(var Or=Cv[ae(ct,Dn[0])];0<Or;)Or=Cv[2*Or+ae(ct,Dn[Or])];Dn=-Or,$t[Lt+hr]=Dn}a(vr,br,$t,Lt,4),br+=4,mn[0+ft]=Dn}}else Dn=ae(ct,156)?ae(ct,128)?1:3:ae(ct,163)?2:0,Ft.Ob[0]=Dn,s($t,Lt,Dn,4),s(mn,0,Dn,4);Ft.Dd=ae(ct,142)?ae(ct,114)?ae(ct,183)?1:3:2:0}if(ut.m.Ka)return Qn(Ke,7,"Premature end-of-partition0 encountered.");for(;Ke.ja<Ke.za;++Ke.ja){if(ut=qe,ct=(Be=Ke).rb[Be.sb-1],$t=Be.rb[Be.sb+Be.ja],it=Be.ya[Be.aa+Be.ja],Lt=Be.kc?it.Ad:0)ct.la=$t.la=0,it.Za||(ct.Na=$t.Na=0),it.Hc=0,it.Gc=0,it.ia=0;else{var qr,Tn;if(ct=$t,$t=ut,Lt=Be.Pa.Xc,mn=Be.ya[Be.aa+Be.ja],Ft=Be.pb[mn.$b],ft=mn.ad,vr=0,br=Be.rb[Be.sb-1],Dn=hr=0,s(ft,vr,0,384),mn.Za)var Na=0,bi=Lt[3];else{Or=i(16);var Ba=ct.Na+br.Na;if(Ba=yu($t,Lt[1],Ba,Ft.Eb,0,Or,0),ct.Na=br.Na=(0<Ba)+0,1<Ba)Sd(Or,0,ft,vr);else{var is=Or[0]+3>>3;for(Or=0;256>Or;Or+=16)ft[vr+Or]=is}Na=1,bi=Lt[0]}var Ar=15&ct.la,ni=15&br.la;for(Or=0;4>Or;++Or){var ri=1&ni;for(is=Tn=0;4>is;++is)Ar=Ar>>1|(ri=(Ba=yu($t,bi,Ba=ri+(1&Ar),Ft.Sc,Na,ft,vr))>Na)<<7,Tn=Tn<<2|(3<Ba?3:1<Ba?2:ft[vr+0]!=0),vr+=16;Ar>>=4,ni=ni>>1|ri<<7,hr=(hr<<8|Tn)>>>0}for(bi=Ar,Na=ni>>4,qr=0;4>qr;qr+=2){for(Tn=0,Ar=ct.la>>4+qr,ni=br.la>>4+qr,Or=0;2>Or;++Or){for(ri=1&ni,is=0;2>is;++is)Ba=ri+(1&Ar),Ar=Ar>>1|(ri=0<(Ba=yu($t,Lt[2],Ba,Ft.Qc,0,ft,vr)))<<3,Tn=Tn<<2|(3<Ba?3:1<Ba?2:ft[vr+0]!=0),vr+=16;Ar>>=2,ni=ni>>1|ri<<5}Dn|=Tn<<4*qr,bi|=Ar<<4<<qr,Na|=(240&ni)<<qr}ct.la=bi,br.la=Na,mn.Hc=hr,mn.Gc=Dn,mn.ia=43690&Dn?0:Ft.ia,Lt=!(hr|Dn)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[it.$b][it.Za],Be.wa[Be.Y+Be.ja].La|=!Lt),ut.Ka)return Qn(Ke,7,"Premature end-of-file encountered.")}if(Ao(Ke),Be=pt,ut=1,it=(qe=Ke).D,ct=0<qe.L&&qe.M>=qe.zb&&qe.M<=qe.Va,qe.Aa==0)e:{if(it.M=qe.M,it.uc=ct,Ms(qe,it),ut=1,it=(Tn=qe.D).Nb,ct=(Dn=wu[qe.L])*qe.R,$t=Dn/2*qe.B,Or=16*it*qe.R,is=8*it*qe.B,Lt=qe.sa,mn=qe.ta-ct+Or,Ft=qe.qa,ft=qe.ra-$t+is,vr=qe.Ha,br=qe.Ia-$t+is,ni=(Ar=Tn.M)==0,hr=Ar>=qe.Va-1,qe.Aa==2&&Ms(qe,Tn),Tn.uc)for(ri=(Ba=qe).D.M,t(Ba.D.uc),Tn=Ba.yb;Tn<Ba.Hb;++Tn){Na=Tn,bi=ri;var _a=(os=(kr=Ba).D).Nb;qr=kr.R;var os=os.wa[os.Y+Na],qs=kr.sa,$i=kr.ta+16*_a*qr+16*Na,Ho=os.dd,Sa=os.tc;if(Sa!=0)if(t(3<=Sa),kr.L==1)0<Na&&Uo(qs,$i,qr,Sa+4),os.La&&Wa(qs,$i,qr,Sa),0<bi&&$o(qs,$i,qr,Sa+4),os.La&&xl(qs,$i,qr,Sa);else{var Ka=kr.B,uo=kr.qa,Pd=kr.ra+8*_a*Ka+8*Na,Mc=kr.Ha,kr=kr.Ia+8*_a*Ka+8*Na;_a=os.ld,0<Na&&(ei(qs,$i,qr,Sa+4,Ho,_a),Jl(uo,Pd,Mc,kr,Ka,Sa+4,Ho,_a)),os.La&&(Ds(qs,$i,qr,Sa,Ho,_a),Bo(uo,Pd,Mc,kr,Ka,Sa,Ho,_a)),0<bi&&(Pc(qs,$i,qr,Sa+4,Ho,_a),Xl(uo,Pd,Mc,kr,Ka,Sa+4,Ho,_a)),os.La&&(Ec(qs,$i,qr,Sa,Ho,_a),gl(uo,Pd,Mc,kr,Ka,Sa,Ho,_a))}}if(qe.ia&&alert("todo:DitherRow"),Be.put!=null){if(Tn=16*Ar,Ar=16*(Ar+1),ni?(Be.y=qe.sa,Be.O=qe.ta+Or,Be.f=qe.qa,Be.N=qe.ra+is,Be.ea=qe.Ha,Be.W=qe.Ia+is):(Tn-=Dn,Be.y=Lt,Be.O=mn,Be.f=Ft,Be.N=ft,Be.ea=vr,Be.W=br),hr||(Ar-=Dn),Ar>Be.o&&(Ar=Be.o),Be.F=null,Be.J=null,qe.Fa!=null&&0<qe.Fa.length&&Tn<Ar&&(Be.J=fu(qe,Be,Tn,Ar-Tn),Be.F=qe.mb,Be.F==null&&Be.F.length==0)){ut=Qn(qe,3,"Could not decode alpha data.");break e}Tn<Be.j&&(Dn=Be.j-Tn,Tn=Be.j,t(!(1&Dn)),Be.O+=qe.R*Dn,Be.N+=qe.B*(Dn>>1),Be.W+=qe.B*(Dn>>1),Be.F!=null&&(Be.J+=Be.width*Dn)),Tn<Ar&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Tn-Be.j,Be.U=Be.va-Be.v,Be.T=Ar-Tn,ut=Be.put(Be))}it+1!=qe.Ic||hr||(a(qe.sa,qe.ta-ct,Lt,mn+16*qe.R,ct),a(qe.qa,qe.ra-$t,Ft,ft+8*qe.B,$t),a(qe.Ha,qe.Ia-$t,vr,br+8*qe.B,$t))}if(!ut)return Qn(Ke,6,"Output aborted.")}return 1})(E,D)),D.bc!=null&&D.bc(D),W&=1}return W?(E.cb=0,W):0}function bs(E,D,W,Z,se){se=E[D+W+32*Z]+(se>>3),E[D+W+32*Z]=-256&se?0>se?0:255:se}function Po(E,D,W,Z,se,ce){bs(E,D,0,W,Z+se),bs(E,D,1,W,Z+ce),bs(E,D,2,W,Z-ce),bs(E,D,3,W,Z-se)}function Ks(E){return(20091*E>>16)+E}function Dl(E,D,W,Z){var se,ce=0,fe=i(16);for(se=0;4>se;++se){var ge=E[D+0]+E[D+8],ve=E[D+0]-E[D+8],Se=(35468*E[D+4]>>16)-Ks(E[D+12]),Ie=Ks(E[D+4])+(35468*E[D+12]>>16);fe[ce+0]=ge+Ie,fe[ce+1]=ve+Se,fe[ce+2]=ve-Se,fe[ce+3]=ge-Ie,ce+=4,D++}for(se=ce=0;4>se;++se)ge=(E=fe[ce+0]+4)+fe[ce+8],ve=E-fe[ce+8],Se=(35468*fe[ce+4]>>16)-Ks(fe[ce+12]),bs(W,Z,0,0,ge+(Ie=Ks(fe[ce+4])+(35468*fe[ce+12]>>16))),bs(W,Z,1,0,ve+Se),bs(W,Z,2,0,ve-Se),bs(W,Z,3,0,ge-Ie),ce++,Z+=32}function Fl(E,D,W,Z){var se=E[D+0]+4,ce=35468*E[D+4]>>16,fe=Ks(E[D+4]),ge=35468*E[D+1]>>16;Po(W,Z,0,se+fe,E=Ks(E[D+1]),ge),Po(W,Z,1,se+ce,E,ge),Po(W,Z,2,se-ce,E,ge),Po(W,Z,3,se-fe,E,ge)}function uu(E,D,W,Z,se){Dl(E,D,W,Z),se&&Dl(E,D+16,W,Z+4)}function ql(E,D,W,Z){Ql(E,D+0,W,Z,1),Ql(E,D+32,W,Z+128,1)}function dh(E,D,W,Z){var se;for(E=E[D+0]+4,se=0;4>se;++se)for(D=0;4>D;++D)bs(W,Z,D,se,E)}function pd(E,D,W,Z){E[D+0]&&ss(E,D+0,W,Z),E[D+16]&&ss(E,D+16,W,Z+4),E[D+32]&&ss(E,D+32,W,Z+128),E[D+48]&&ss(E,D+48,W,Z+128+4)}function sr(E,D,W,Z){var se,ce=i(16);for(se=0;4>se;++se){var fe=E[D+0+se]+E[D+12+se],ge=E[D+4+se]+E[D+8+se],ve=E[D+4+se]-E[D+8+se],Se=E[D+0+se]-E[D+12+se];ce[0+se]=fe+ge,ce[8+se]=fe-ge,ce[4+se]=Se+ve,ce[12+se]=Se-ve}for(se=0;4>se;++se)fe=(E=ce[0+4*se]+3)+ce[3+4*se],ge=ce[1+4*se]+ce[2+4*se],ve=ce[1+4*se]-ce[2+4*se],Se=E-ce[3+4*se],W[Z+0]=fe+ge>>3,W[Z+16]=Se+ve>>3,W[Z+32]=fe-ge>>3,W[Z+48]=Se-ve>>3,Z+=64}function Bl(E,D,W){var Z,se=D-32,ce=yi,fe=255-E[se-1];for(Z=0;Z<W;++Z){var ge,ve=ce,Se=fe+E[D-1];for(ge=0;ge<W;++ge)E[D+ge]=ve[Se+E[se+ge]];D+=32}}function jc(E,D){Bl(E,D,4)}function Nc(E,D){Bl(E,D,8)}function $l(E,D){Bl(E,D,16)}function Eo(E,D){var W;for(W=0;16>W;++W)a(E,D+32*W,E,D-32,16)}function Ul(E,D){var W;for(W=16;0<W;--W)s(E,D,E[D-1],16),D+=32}function zl(E,D,W){var Z;for(Z=0;16>Z;++Z)s(D,W+32*Z,E,16)}function Mi(E,D){var W,Z=16;for(W=0;16>W;++W)Z+=E[D-1+32*W]+E[D+W-32];zl(Z>>5,E,D)}function Ir(E,D){var W,Z=8;for(W=0;16>W;++W)Z+=E[D-1+32*W];zl(Z>>4,E,D)}function Gs(E,D){var W,Z=8;for(W=0;16>W;++W)Z+=E[D+W-32];zl(Z>>4,E,D)}function Ys(E,D){zl(128,E,D)}function yn(E,D,W){return E+2*D+W+2>>2}function ll(E,D){var W,Z=D-32;for(Z=new Uint8Array([yn(E[Z-1],E[Z+0],E[Z+1]),yn(E[Z+0],E[Z+1],E[Z+2]),yn(E[Z+1],E[Z+2],E[Z+3]),yn(E[Z+2],E[Z+3],E[Z+4])]),W=0;4>W;++W)a(E,D+32*W,Z,0,Z.length)}function To(E,D){var W=E[D-1],Z=E[D-1+32],se=E[D-1+64],ce=E[D-1+96];le(E,D+0,16843009*yn(E[D-1-32],W,Z)),le(E,D+32,16843009*yn(W,Z,se)),le(E,D+64,16843009*yn(Z,se,ce)),le(E,D+96,16843009*yn(se,ce,ce))}function Xn(E,D){var W,Z=4;for(W=0;4>W;++W)Z+=E[D+W-32]+E[D-1+32*W];for(Z>>=3,W=0;4>W;++W)s(E,D+32*W,Z,4)}function ba(E,D){var W=E[D-1+0],Z=E[D-1+32],se=E[D-1+64],ce=E[D-1-32],fe=E[D+0-32],ge=E[D+1-32],ve=E[D+2-32],Se=E[D+3-32];E[D+0+96]=yn(Z,se,E[D-1+96]),E[D+1+96]=E[D+0+64]=yn(W,Z,se),E[D+2+96]=E[D+1+64]=E[D+0+32]=yn(ce,W,Z),E[D+3+96]=E[D+2+64]=E[D+1+32]=E[D+0+0]=yn(fe,ce,W),E[D+3+64]=E[D+2+32]=E[D+1+0]=yn(ge,fe,ce),E[D+3+32]=E[D+2+0]=yn(ve,ge,fe),E[D+3+0]=yn(Se,ve,ge)}function Es(E,D){var W=E[D+1-32],Z=E[D+2-32],se=E[D+3-32],ce=E[D+4-32],fe=E[D+5-32],ge=E[D+6-32],ve=E[D+7-32];E[D+0+0]=yn(E[D+0-32],W,Z),E[D+1+0]=E[D+0+32]=yn(W,Z,se),E[D+2+0]=E[D+1+32]=E[D+0+64]=yn(Z,se,ce),E[D+3+0]=E[D+2+32]=E[D+1+64]=E[D+0+96]=yn(se,ce,fe),E[D+3+32]=E[D+2+64]=E[D+1+96]=yn(ce,fe,ge),E[D+3+64]=E[D+2+96]=yn(fe,ge,ve),E[D+3+96]=yn(ge,ve,ve)}function cl(E,D){var W=E[D-1+0],Z=E[D-1+32],se=E[D-1+64],ce=E[D-1-32],fe=E[D+0-32],ge=E[D+1-32],ve=E[D+2-32],Se=E[D+3-32];E[D+0+0]=E[D+1+64]=ce+fe+1>>1,E[D+1+0]=E[D+2+64]=fe+ge+1>>1,E[D+2+0]=E[D+3+64]=ge+ve+1>>1,E[D+3+0]=ve+Se+1>>1,E[D+0+96]=yn(se,Z,W),E[D+0+64]=yn(Z,W,ce),E[D+0+32]=E[D+1+96]=yn(W,ce,fe),E[D+1+32]=E[D+2+96]=yn(ce,fe,ge),E[D+2+32]=E[D+3+96]=yn(fe,ge,ve),E[D+3+32]=yn(ge,ve,Se)}function fn(E,D){var W=E[D+0-32],Z=E[D+1-32],se=E[D+2-32],ce=E[D+3-32],fe=E[D+4-32],ge=E[D+5-32],ve=E[D+6-32],Se=E[D+7-32];E[D+0+0]=W+Z+1>>1,E[D+1+0]=E[D+0+64]=Z+se+1>>1,E[D+2+0]=E[D+1+64]=se+ce+1>>1,E[D+3+0]=E[D+2+64]=ce+fe+1>>1,E[D+0+32]=yn(W,Z,se),E[D+1+32]=E[D+0+96]=yn(Z,se,ce),E[D+2+32]=E[D+1+96]=yn(se,ce,fe),E[D+3+32]=E[D+2+96]=yn(ce,fe,ge),E[D+3+64]=yn(fe,ge,ve),E[D+3+96]=yn(ge,ve,Se)}function gd(E,D){var W=E[D-1+0],Z=E[D-1+32],se=E[D-1+64],ce=E[D-1+96];E[D+0+0]=W+Z+1>>1,E[D+2+0]=E[D+0+32]=Z+se+1>>1,E[D+2+32]=E[D+0+64]=se+ce+1>>1,E[D+1+0]=yn(W,Z,se),E[D+3+0]=E[D+1+32]=yn(Z,se,ce),E[D+3+32]=E[D+1+64]=yn(se,ce,ce),E[D+3+64]=E[D+2+64]=E[D+0+96]=E[D+1+96]=E[D+2+96]=E[D+3+96]=ce}function Dr(E,D){var W=E[D-1+0],Z=E[D-1+32],se=E[D-1+64],ce=E[D-1+96],fe=E[D-1-32],ge=E[D+0-32],ve=E[D+1-32],Se=E[D+2-32];E[D+0+0]=E[D+2+32]=W+fe+1>>1,E[D+0+32]=E[D+2+64]=Z+W+1>>1,E[D+0+64]=E[D+2+96]=se+Z+1>>1,E[D+0+96]=ce+se+1>>1,E[D+3+0]=yn(ge,ve,Se),E[D+2+0]=yn(fe,ge,ve),E[D+1+0]=E[D+3+32]=yn(W,fe,ge),E[D+1+32]=E[D+3+64]=yn(Z,W,fe),E[D+1+64]=E[D+3+96]=yn(se,Z,W),E[D+1+96]=yn(ce,se,Z)}function Hr(E,D){var W;for(W=0;8>W;++W)a(E,D+32*W,E,D-32,8)}function dl(E,D){var W;for(W=0;8>W;++W)s(E,D,E[D-1],8),D+=32}function Oo(E,D,W){var Z;for(Z=0;8>Z;++Z)s(D,W+32*Z,E,8)}function wa(E,D){var W,Z=8;for(W=0;8>W;++W)Z+=E[D+W-32]+E[D-1+32*W];Oo(Z>>4,E,D)}function ts(E,D){var W,Z=4;for(W=0;8>W;++W)Z+=E[D+W-32];Oo(Z>>3,E,D)}function Qs(E,D){var W,Z=4;for(W=0;8>W;++W)Z+=E[D-1+32*W];Oo(Z>>3,E,D)}function ul(E,D){Oo(128,E,D)}function pi(E,D,W){var Z=E[D-W],se=E[D+0],ce=3*(se-Z)+Cr[1020+E[D-2*W]-E[D+W]],fe=zn[112+(ce+4>>3)];E[D-W]=yi[255+Z+zn[112+(ce+3>>3)]],E[D+0]=yi[255+se-fe]}function Vl(E,D,W,Z){var se=E[D+0],ce=E[D+W];return zo[255+E[D-2*W]-E[D-W]]>Z||zo[255+ce-se]>Z}function Li(E,D,W,Z){return 4*zo[255+E[D-W]-E[D+0]]+zo[255+E[D-2*W]-E[D+W]]<=Z}function Hl(E,D,W,Z,se){var ce=E[D-3*W],fe=E[D-2*W],ge=E[D-W],ve=E[D+0],Se=E[D+W],Ie=E[D+2*W],Xe=E[D+3*W];return 4*zo[255+ge-ve]+zo[255+fe-Se]>Z?0:zo[255+E[D-4*W]-ce]<=se&&zo[255+ce-fe]<=se&&zo[255+fe-ge]<=se&&zo[255+Xe-Ie]<=se&&zo[255+Ie-Se]<=se&&zo[255+Se-ve]<=se}function Ts(E,D,W,Z){var se=2*Z+1;for(Z=0;16>Z;++Z)Li(E,D+Z,W,se)&&pi(E,D+Z,W)}function ns(E,D,W,Z){var se=2*Z+1;for(Z=0;16>Z;++Z)Li(E,D+Z*W,1,se)&&pi(E,D+Z*W,1)}function gi(E,D,W,Z){var se;for(se=3;0<se;--se)Ts(E,D+=4*W,W,Z)}function uh(E,D,W,Z){var se;for(se=3;0<se;--se)ns(E,D+=4,W,Z)}function Oa(E,D,W,Z,se,ce,fe,ge){for(ce=2*ce+1;0<se--;){if(Hl(E,D,W,ce,fe))if(Vl(E,D,W,ge))pi(E,D,W);else{var ve=E,Se=D,Ie=W,Xe=ve[Se-2*Ie],Je=ve[Se-Ie],Ke=ve[Se+0],pt=ve[Se+Ie],it=ve[Se+2*Ie],qe=27*(ut=Cr[1020+3*(Ke-Je)+Cr[1020+Xe-pt]])+63>>7,Be=18*ut+63>>7,ut=9*ut+63>>7;ve[Se-3*Ie]=yi[255+ve[Se-3*Ie]+ut],ve[Se-2*Ie]=yi[255+Xe+Be],ve[Se-Ie]=yi[255+Je+qe],ve[Se+0]=yi[255+Ke-qe],ve[Se+Ie]=yi[255+pt-Be],ve[Se+2*Ie]=yi[255+it-ut]}D+=Z}}function Xs(E,D,W,Z,se,ce,fe,ge){for(ce=2*ce+1;0<se--;){if(Hl(E,D,W,ce,fe))if(Vl(E,D,W,ge))pi(E,D,W);else{var ve=E,Se=D,Ie=W,Xe=ve[Se-Ie],Je=ve[Se+0],Ke=ve[Se+Ie],pt=zn[112+((it=3*(Je-Xe))+4>>3)],it=zn[112+(it+3>>3)],qe=pt+1>>1;ve[Se-2*Ie]=yi[255+ve[Se-2*Ie]+qe],ve[Se-Ie]=yi[255+Xe+it],ve[Se+0]=yi[255+Je-pt],ve[Se+Ie]=yi[255+Ke-qe]}D+=Z}}function Js(E,D,W,Z,se,ce){Oa(E,D,W,1,16,Z,se,ce)}function qa(E,D,W,Z,se,ce){Oa(E,D,1,W,16,Z,se,ce)}function so(E,D,W,Z,se,ce){var fe;for(fe=3;0<fe;--fe)Xs(E,D+=4*W,W,1,16,Z,se,ce)}function Ri(E,D,W,Z,se,ce){var fe;for(fe=3;0<fe;--fe)Xs(E,D+=4,1,W,16,Z,se,ce)}function _c(E,D,W,Z,se,ce,fe,ge){Oa(E,D,se,1,8,ce,fe,ge),Oa(W,Z,se,1,8,ce,fe,ge)}function Wl(E,D,W,Z,se,ce,fe,ge){Oa(E,D,1,se,8,ce,fe,ge),Oa(W,Z,1,se,8,ce,fe,ge)}function io(E,D,W,Z,se,ce,fe,ge){Xs(E,D+4*se,se,1,8,ce,fe,ge),Xs(W,Z+4*se,se,1,8,ce,fe,ge)}function xd(E,D,W,Z,se,ce,fe,ge){Xs(E,D+4,1,se,8,ce,fe,ge),Xs(W,Z+4,1,se,8,ce,fe,ge)}function Mo(){this.ba=new na,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Kn,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Lo(){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 Kl(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function yd(){this.ua=0,this.Wa=new ue,this.vb=new ue,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new F,this.yc=new P}function _f(){this.xb=this.a=0,this.l=new ol,this.ca=new na,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 yd,this.ab=0,this.gc=o(4,Kl),this.Oc=0}function hl(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ol,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Ii(E,D,W,Z,se,ce,fe){for(E=E==null?0:E[D+0],D=0;D<fe;++D)se[ce+D]=E+W[Z+D]&255,E=se[ce+D]}function hu(E,D,W,Z,se,ce,fe){var ge;if(E==null)Ii(null,null,W,Z,se,ce,fe);else for(ge=0;ge<fe;++ge)se[ce+ge]=E[D+ge]+W[Z+ge]&255}function Ro(E,D,W,Z,se,ce,fe){if(E==null)Ii(null,null,W,Z,se,ce,fe);else{var ge,ve=E[D+0],Se=ve,Ie=ve;for(ge=0;ge<fe;++ge)Se=Ie+(ve=E[D+ge])-Se,Ie=W[Z+ge]+(-256&Se?0>Se?0:255:Se)&255,Se=ve,se[ce+ge]=Ie}}function fu(E,D,W,Z){var se=D.width,ce=D.o;if(t(E!=null&&D!=null),0>W||0>=Z||W+Z>ce)return null;if(!E.Cc){if(E.ga==null){var fe;if(E.ga=new hl,(fe=E.ga==null)||(fe=D.width*D.o,t(E.Gb.length==0),E.Gb=i(fe),E.Uc=0,E.Gb==null?fe=0:(E.mb=E.Gb,E.nb=E.Uc,E.rc=null,fe=1),fe=!fe),!fe){fe=E.ga;var ge=E.Fa,ve=E.P,Se=E.qc,Ie=E.mb,Xe=E.nb,Je=ve+1,Ke=Se-1,pt=fe.l;if(t(ge!=null&&Ie!=null&&D!=null),ti[0]=null,ti[1]=Ii,ti[2]=hu,ti[3]=Ro,fe.ca=Ie,fe.tb=Xe,fe.c=D.width,fe.i=D.height,t(0<fe.c&&0<fe.i),1>=Se)D=0;else if(fe.$a=ge[ve+0]>>0&3,fe.Z=ge[ve+0]>>2&3,fe.Lc=ge[ve+0]>>4&3,ve=ge[ve+0]>>6&3,0>fe.$a||1<fe.$a||4<=fe.Z||1<fe.Lc||ve)D=0;else if(pt.put=da,pt.ac=Gn,pt.bc=cr,pt.ma=fe,pt.width=D.width,pt.height=D.height,pt.Da=D.Da,pt.v=D.v,pt.va=D.va,pt.j=D.j,pt.o=D.o,fe.$a)e:{t(fe.$a==1),D=xs();t:for(;;){if(D==null){D=0;break e}if(t(fe!=null),fe.mc=D,D.c=fe.c,D.i=fe.i,D.l=fe.l,D.l.ma=fe,D.l.width=fe.c,D.l.height=fe.i,D.a=0,Y(D.m,ge,Je,Ke),!Ye(fe.c,fe.i,1,D,null)||(D.ab==1&&D.gc[0].hc==3&&hi(D.s)?(fe.ic=1,ge=D.c*D.i,D.Ta=null,D.Ua=0,D.V=i(ge),D.Ba=0,D.V==null?(D.a=1,D=0):D=1):(fe.ic=0,D=nt(D,fe.c)),!D))break t;D=1;break e}fe.mc=null,D=0}else D=Ke>=fe.c*fe.i;fe=!D}if(fe)return null;E.ga.Lc!=1?E.Ga=0:Z=ce-W}t(E.ga!=null),t(W+Z<=ce);e:{if(D=(ge=E.ga).c,ce=ge.l.o,ge.$a==0){if(Je=E.rc,Ke=E.Vc,pt=E.Fa,ve=E.P+1+W*D,Se=E.mb,Ie=E.nb+W*D,t(ve<=E.P+E.qc),ge.Z!=0)for(t(ti[ge.Z]!=null),fe=0;fe<Z;++fe)ti[ge.Z](Je,Ke,pt,ve,Se,Ie,D),Je=Se,Ke=Ie,Ie+=D,ve+=D;else for(fe=0;fe<Z;++fe)a(Se,Ie,pt,ve,D),Je=Se,Ke=Ie,Ie+=D,ve+=D;E.rc=Je,E.Vc=Ke}else{if(t(ge.mc!=null),D=W+Z,t((fe=ge.mc)!=null),t(D<=fe.i),fe.C>=D)D=1;else if(ge.ic||Qe(),ge.ic){ge=fe.V,Je=fe.Ba,Ke=fe.c;var it=fe.i,qe=(pt=1,ve=fe.$/Ke,Se=fe.$%Ke,Ie=fe.m,Xe=fe.s,fe.$),Be=Ke*it,ut=Ke*D,ct=Xe.wc,ft=qe<ut?Yn(Xe,Se,ve):null;t(qe<=Be),t(D<=it),t(hi(Xe));t:for(;;){for(;!Ie.h&&qe<ut;){if(Se&ct||(ft=Yn(Xe,Se,ve)),t(ft!=null),Q(Ie),256>(it=dr(ft.G[0],ft.H[0],Ie)))ge[Je+qe]=it,++qe,++Se>=Ke&&(Se=0,++ve<=D&&!(ve%16)&&ks(fe,ve));else{if(!(280>it)){pt=0;break t}it=va(it-256,Ie);var $t,Lt=dr(ft.G[4],ft.H[4],Ie);if(Q(Ie),!(qe>=(Lt=ar(Ke,Lt=va(Lt,Ie)))&&Be-qe>=it)){pt=0;break t}for($t=0;$t<it;++$t)ge[Je+qe+$t]=ge[Je+qe+$t-Lt];for(qe+=it,Se+=it;Se>=Ke;)Se-=Ke,++ve<=D&&!(ve%16)&&ks(fe,ve);qe<ut&&Se&ct&&(ft=Yn(Xe,Se,ve))}t(Ie.h==te(Ie))}ks(fe,ve>D?D:ve);break t}!pt||Ie.h&&qe<Be?(pt=0,fe.a=Ie.h?5:3):fe.$=qe,D=pt}else D=ua(fe,fe.V,fe.Ba,fe.c,fe.i,D,Vr);if(!D){Z=0;break e}}W+Z>=ce&&(E.Cc=1),Z=1}if(!Z)return null;if(E.Cc&&((Z=E.ga)!=null&&(Z.mc=null),E.ga=null,0<E.Ga))return alert("todo:WebPDequantizeLevels"),null}return E.nb+W*se}function z(E,D,W,Z,se,ce){for(;0<se--;){var fe,ge=E,ve=D+(W?1:0),Se=E,Ie=D+(W?0:3);for(fe=0;fe<Z;++fe){var Xe=Se[Ie+4*fe];Xe!=255&&(Xe*=32897,ge[ve+4*fe+0]=ge[ve+4*fe+0]*Xe>>23,ge[ve+4*fe+1]=ge[ve+4*fe+1]*Xe>>23,ge[ve+4*fe+2]=ge[ve+4*fe+2]*Xe>>23)}D+=ce}}function ie(E,D,W,Z,se){for(;0<Z--;){var ce;for(ce=0;ce<W;++ce){var fe=E[D+2*ce+0],ge=15&(Se=E[D+2*ce+1]),ve=4369*ge,Se=(240&Se|Se>>4)*ve>>16;E[D+2*ce+0]=(240&fe|fe>>4)*ve>>16&240|(15&fe|fe<<4)*ve>>16>>4&15,E[D+2*ce+1]=240&Se|ge}D+=se}}function Ee(E,D,W,Z,se,ce,fe,ge){var ve,Se,Ie=255;for(Se=0;Se<se;++Se){for(ve=0;ve<Z;++ve){var Xe=E[D+ve];ce[fe+4*ve]=Xe,Ie&=Xe}D+=W,fe+=ge}return Ie!=255}function Re(E,D,W,Z,se){var ce;for(ce=0;ce<se;++ce)W[Z+ce]=E[D+ce]>>8}function Qe(){U=z,ke=ie,ze=Ee,wt=Re}function ot(E,D,W){T[E]=function(Z,se,ce,fe,ge,ve,Se,Ie,Xe,Je,Ke,pt,it,qe,Be,ut,ct){var ft,$t=ct-1>>1,Lt=ge[ve+0]|Se[Ie+0]<<16,mn=Xe[Je+0]|Ke[pt+0]<<16;t(Z!=null);var Ft=3*Lt+mn+131074>>2;for(D(Z[se+0],255&Ft,Ft>>16,it,qe),ce!=null&&(Ft=3*mn+Lt+131074>>2,D(ce[fe+0],255&Ft,Ft>>16,Be,ut)),ft=1;ft<=$t;++ft){var vr=ge[ve+ft]|Se[Ie+ft]<<16,br=Xe[Je+ft]|Ke[pt+ft]<<16,hr=Lt+vr+mn+br+524296,Dn=hr+2*(vr+mn)>>3;Ft=Dn+Lt>>1,Lt=(hr=hr+2*(Lt+br)>>3)+vr>>1,D(Z[se+2*ft-1],255&Ft,Ft>>16,it,qe+(2*ft-1)*W),D(Z[se+2*ft-0],255&Lt,Lt>>16,it,qe+(2*ft-0)*W),ce!=null&&(Ft=hr+mn>>1,Lt=Dn+br>>1,D(ce[fe+2*ft-1],255&Ft,Ft>>16,Be,ut+(2*ft-1)*W),D(ce[fe+2*ft+0],255&Lt,Lt>>16,Be,ut+(2*ft+0)*W)),Lt=vr,mn=br}1&ct||(Ft=3*Lt+mn+131074>>2,D(Z[se+ct-1],255&Ft,Ft>>16,it,qe+(ct-1)*W),ce!=null&&(Ft=3*mn+Lt+131074>>2,D(ce[fe+ct-1],255&Ft,Ft>>16,Be,ut+(ct-1)*W)))}}function vt(){Fi[ap]=m2,Fi[Cd]=Ad,Fi[Nv]=p2,Fi[Sf]=ph,Fi[Cf]=vu,Fi[Wr]=Tf,Fi[sp]=Mx,Fi[hh]=Ad,Fi[gu]=ph,Fi[Af]=vu,Fi[kf]=Tf}function qt(E){return E&-16384?0>E?0:255:E>>kd}function un(E,D){return qt((19077*E>>8)+(26149*D>>8)-14234)}function On(E,D,W){return qt((19077*E>>8)-(6419*D>>8)-(13320*W>>8)+8708)}function gn(E,D){return qt((19077*E>>8)+(33050*D>>8)-17685)}function Jn(E,D,W,Z,se){Z[se+0]=un(E,W),Z[se+1]=On(E,D,W),Z[se+2]=gn(E,D)}function sa(E,D,W,Z,se){Z[se+0]=gn(E,D),Z[se+1]=On(E,D,W),Z[se+2]=un(E,W)}function ha(E,D,W,Z,se){var ce=On(E,D,W);D=ce<<3&224|gn(E,D)>>3,Z[se+0]=248&un(E,W)|ce>>5,Z[se+1]=D}function Ma(E,D,W,Z,se){var ce=240&gn(E,D)|15;Z[se+0]=240&un(E,W)|On(E,D,W)>>4,Z[se+1]=ce}function rs(E,D,W,Z,se){Z[se+0]=255,Jn(E,D,W,Z,se+1)}function La(E,D,W,Z,se){sa(E,D,W,Z,se),Z[se+3]=255}function oo(E,D,W,Z,se){Jn(E,D,W,Z,se),Z[se+3]=255}function Os(E,D){return 0>E?0:E>D?D:E}function Zs(E,D,W){T[E]=function(Z,se,ce,fe,ge,ve,Se,Ie,Xe){for(var Je=Ie+(-2&Xe)*W;Ie!=Je;)D(Z[se+0],ce[fe+0],ge[ve+0],Se,Ie),D(Z[se+1],ce[fe+0],ge[ve+0],Se,Ie+W),se+=2,++fe,++ve,Ie+=2*W;1&Xe&&D(Z[se+0],ce[fe+0],ge[ve+0],Se,Ie)}}function Io(E,D,W){return W==0?E==0?D==0?6:5:D==0?4:0:W}function mu(E,D,W,Z,se){switch(E>>>30){case 3:Ql(D,W,Z,se,0);break;case 2:Un(D,W,Z,se);break;case 1:ss(D,W,Z,se)}}function Ms(E,D){var W,Z,se=D.M,ce=D.Nb,fe=E.oc,ge=E.pc+40,ve=E.oc,Se=E.pc+584,Ie=E.oc,Xe=E.pc+600;for(W=0;16>W;++W)fe[ge+32*W-1]=129;for(W=0;8>W;++W)ve[Se+32*W-1]=129,Ie[Xe+32*W-1]=129;for(0<se?fe[ge-1-32]=ve[Se-1-32]=Ie[Xe-1-32]=129:(s(fe,ge-32-1,127,21),s(ve,Se-32-1,127,9),s(Ie,Xe-32-1,127,9)),Z=0;Z<E.za;++Z){var Je=D.ya[D.aa+Z];if(0<Z){for(W=-1;16>W;++W)a(fe,ge+32*W-4,fe,ge+32*W+12,4);for(W=-1;8>W;++W)a(ve,Se+32*W-4,ve,Se+32*W+4,4),a(Ie,Xe+32*W-4,Ie,Xe+32*W+4,4)}var Ke=E.Gd,pt=E.Hd+Z,it=Je.ad,qe=Je.Hc;if(0<se&&(a(fe,ge-32,Ke[pt].y,0,16),a(ve,Se-32,Ke[pt].f,0,8),a(Ie,Xe-32,Ke[pt].ea,0,8)),Je.Za){var Be=fe,ut=ge-32+16;for(0<se&&(Z>=E.za-1?s(Be,ut,Ke[pt].y[15],4):a(Be,ut,Ke[pt+1].y,0,4)),W=0;4>W;W++)Be[ut+128+W]=Be[ut+256+W]=Be[ut+384+W]=Be[ut+0+W];for(W=0;16>W;++W,qe<<=2)Be=fe,ut=ge+Lx[W],Vo[Je.Ob[W]](Be,ut),mu(qe,it,16*+W,Be,ut)}else if(Be=Io(Z,se,Je.Ob[0]),vi[Be](fe,ge),qe!=0)for(W=0;16>W;++W,qe<<=2)mu(qe,it,16*+W,fe,ge+Lx[W]);for(W=Je.Gc,Be=Io(Z,se,Je.Dd),Di[Be](ve,Se),Di[Be](Ie,Xe),qe=it,Be=ve,ut=Se,255&(Je=W>>0)&&(170&Je?qo(qe,256,Be,ut):xi(qe,256,Be,ut)),Je=Ie,qe=Xe,255&(W>>=8)&&(170&W?qo(it,320,Je,qe):xi(it,320,Je,qe)),se<E.Ub-1&&(a(Ke[pt].y,0,fe,ge+480,16),a(Ke[pt].f,0,ve,Se+224,8),a(Ke[pt].ea,0,Ie,Xe+224,8)),W=8*ce*E.B,Ke=E.sa,pt=E.ta+16*Z+16*ce*E.R,it=E.qa,Je=E.ra+8*Z+W,qe=E.Ha,Be=E.Ia+8*Z+W,W=0;16>W;++W)a(Ke,pt+W*E.R,fe,ge+32*W,16);for(W=0;8>W;++W)a(it,Je+W*E.B,ve,Se+32*W,8),a(qe,Be+W*E.B,Ie,Xe+32*W,8)}}function lo(E,D,W,Z,se,ce,fe,ge,ve){var Se=[0],Ie=[0],Xe=0,Je=ve!=null?ve.kd:0,Ke=ve??new Lo;if(E==null||12>W)return 7;Ke.data=E,Ke.w=D,Ke.ha=W,D=[D],W=[W],Ke.gb=[Ke.gb];e:{var pt=D,it=W,qe=Ke.gb;if(t(E!=null),t(it!=null),t(qe!=null),qe[0]=0,12<=it[0]&&!r(E,pt[0],"RIFF")){if(r(E,pt[0]+8,"WEBP")){qe=3;break e}var Be=Fe(E,pt[0]+4);if(12>Be||4294967286<Be){qe=3;break e}if(Je&&Be>it[0]-8){qe=7;break e}qe[0]=Be,pt[0]+=12,it[0]-=12}qe=0}if(qe!=0)return qe;for(Be=0<Ke.gb[0],W=W[0];;){e:{var ut=E;it=D,qe=W;var ct=Se,ft=Ie,$t=pt=[0];if((Ft=Xe=[Xe])[0]=0,8>qe[0])qe=7;else{if(!r(ut,it[0],"VP8X")){if(Fe(ut,it[0]+4)!=10){qe=3;break e}if(18>qe[0]){qe=7;break e}var Lt=Fe(ut,it[0]+8),mn=1+xe(ut,it[0]+12);if(2147483648<=mn*(ut=1+xe(ut,it[0]+15))){qe=3;break e}$t!=null&&($t[0]=Lt),ct!=null&&(ct[0]=mn),ft!=null&&(ft[0]=ut),it[0]+=18,qe[0]-=18,Ft[0]=1}qe=0}}if(Xe=Xe[0],pt=pt[0],qe!=0)return qe;if(it=!!(2&pt),!Be&&Xe)return 3;if(ce!=null&&(ce[0]=!!(16&pt)),fe!=null&&(fe[0]=it),ge!=null&&(ge[0]=0),fe=Se[0],pt=Ie[0],Xe&&it&&ve==null){qe=0;break}if(4>W){qe=7;break}if(Be&&Xe||!Be&&!Xe&&!r(E,D[0],"ALPH")){W=[W],Ke.na=[Ke.na],Ke.P=[Ke.P],Ke.Sa=[Ke.Sa];e:{Lt=E,qe=D,Be=W;var Ft=Ke.gb;ct=Ke.na,ft=Ke.P,$t=Ke.Sa,mn=22,t(Lt!=null),t(Be!=null),ut=qe[0];var vr=Be[0];for(t(ct!=null),t($t!=null),ct[0]=null,ft[0]=null,$t[0]=0;;){if(qe[0]=ut,Be[0]=vr,8>vr){qe=7;break e}var br=Fe(Lt,ut+4);if(4294967286<br){qe=3;break e}var hr=8+br+1&-2;if(mn+=hr,0<Ft&&mn>Ft){qe=3;break e}if(!r(Lt,ut,"VP8 ")||!r(Lt,ut,"VP8L")){qe=0;break e}if(vr[0]<hr){qe=7;break e}r(Lt,ut,"ALPH")||(ct[0]=Lt,ft[0]=ut+8,$t[0]=br),ut+=hr,vr-=hr}}if(W=W[0],Ke.na=Ke.na[0],Ke.P=Ke.P[0],Ke.Sa=Ke.Sa[0],qe!=0)break}W=[W],Ke.Ja=[Ke.Ja],Ke.xa=[Ke.xa];e:if(Ft=E,qe=D,Be=W,ct=Ke.gb[0],ft=Ke.Ja,$t=Ke.xa,Lt=qe[0],ut=!r(Ft,Lt,"VP8 "),mn=!r(Ft,Lt,"VP8L"),t(Ft!=null),t(Be!=null),t(ft!=null),t($t!=null),8>Be[0])qe=7;else{if(ut||mn){if(Ft=Fe(Ft,Lt+4),12<=ct&&Ft>ct-12){qe=3;break e}if(Je&&Ft>Be[0]-8){qe=7;break e}ft[0]=Ft,qe[0]+=8,Be[0]-=8,$t[0]=mn}else $t[0]=5<=Be[0]&&Ft[Lt+0]==47&&!(Ft[Lt+4]>>5),ft[0]=Be[0];qe=0}if(W=W[0],Ke.Ja=Ke.Ja[0],Ke.xa=Ke.xa[0],D=D[0],qe!=0)break;if(4294967286<Ke.Ja)return 3;if(ge==null||it||(ge[0]=Ke.xa?2:1),fe=[fe],pt=[pt],Ke.xa){if(5>W){qe=7;break}ge=fe,Je=pt,it=ce,E==null||5>W?E=0:5<=W&&E[D+0]==47&&!(E[D+4]>>5)?(Be=[0],Ft=[0],ct=[0],Y(ft=new q,E,D,W),Dt(ft,Be,Ft,ct)?(ge!=null&&(ge[0]=Be[0]),Je!=null&&(Je[0]=Ft[0]),it!=null&&(it[0]=ct[0]),E=1):E=0):E=0}else{if(10>W){qe=7;break}ge=pt,E==null||10>W||!Yr(E,D+3,W-3)?E=0:(Je=E[D+0]|E[D+1]<<8|E[D+2]<<16,it=16383&(E[D+7]<<8|E[D+6]),E=16383&(E[D+9]<<8|E[D+8]),1&Je||3<(Je>>1&7)||!(Je>>4&1)||Je>>5>=Ke.Ja||!it||!E?E=0:(fe&&(fe[0]=it),ge&&(ge[0]=E),E=1))}if(!E||(fe=fe[0],pt=pt[0],Xe&&(Se[0]!=fe||Ie[0]!=pt)))return 3;ve!=null&&(ve[0]=Ke,ve.offset=D-ve.w,t(4294967286>D-ve.w),t(ve.offset==ve.ha-W));break}return qe==0||qe==7&&Xe&&ve==null?(ce!=null&&(ce[0]|=Ke.na!=null&&0<Ke.na.length),Z!=null&&(Z[0]=fe),se!=null&&(se[0]=pt),0):qe}function fl(E,D,W){var Z=D.width,se=D.height,ce=0,fe=0,ge=Z,ve=se;if(D.Da=E!=null&&0<E.Da,D.Da&&(ge=E.cd,ve=E.bd,ce=E.v,fe=E.j,11>W||(ce&=-2,fe&=-2),0>ce||0>fe||0>=ge||0>=ve||ce+ge>Z||fe+ve>se))return 0;if(D.v=ce,D.j=fe,D.va=ce+ge,D.o=fe+ve,D.U=ge,D.T=ve,D.da=E!=null&&0<E.da,D.da){if(!rt(ge,ve,W=[E.ib],ce=[E.hb]))return 0;D.ib=W[0],D.hb=ce[0]}return D.ob=E!=null&&E.ob,D.Kb=E==null||!E.Sd,D.da&&(D.ob=D.ib<3*Z/4&&D.hb<3*se/4,D.Kb=0),1}function vd(E){if(E==null)return 2;if(11>E.S){var D=E.f.RGBA;D.fb+=(E.height-1)*D.A,D.A=-D.A}else D=E.f.kb,E=E.height,D.O+=(E-1)*D.fa,D.fa=-D.fa,D.N+=(E-1>>1)*D.Ab,D.Ab=-D.Ab,D.W+=(E-1>>1)*D.Db,D.Db=-D.Db,D.F!=null&&(D.J+=(E-1)*D.lb,D.lb=-D.lb);return 0}function Sc(E,D,W,Z){if(Z==null||0>=E||0>=D)return 2;if(W!=null){if(W.Da){var se=W.cd,ce=W.bd,fe=-2&W.v,ge=-2&W.j;if(0>fe||0>ge||0>=se||0>=ce||fe+se>E||ge+ce>D)return 2;E=se,D=ce}if(W.da){if(!rt(E,D,se=[W.ib],ce=[W.hb]))return 2;E=se[0],D=ce[0]}}Z.width=E,Z.height=D;e:{var ve=Z.width,Se=Z.height;if(E=Z.S,0>=ve||0>=Se||!(E>=ap&&13>E))E=2;else{if(0>=Z.Rd&&Z.sd==null){fe=ce=se=D=0;var Ie=(ge=ve*Of[E])*Se;if(11>E||(ce=(Se+1)/2*(D=(ve+1)/2),E==12&&(fe=(se=ve)*Se)),(Se=i(Ie+2*ce+fe))==null){E=1;break e}Z.sd=Se,11>
vendor: 4,183 bytes, line 1154
1154E?((ve=Z.f.RGBA).eb=Se,ve.fb=0,ve.A=ge,ve.size=Ie):((ve=Z.f.kb).y=Se,ve.O=0,ve.fa=ge,ve.Fd=Ie,ve.f=Se,ve.N=0+Ie,ve.Ab=D,ve.Cd=ce,ve.ea=Se,ve.W=0+Ie+ce,ve.Db=D,ve.Ed=ce,E==12&&(ve.F=Se,ve.J=0+Ie+2*ce),ve.Tc=fe,ve.lb=se)}if(D=1,se=Z.S,ce=Z.width,fe=Z.height,se>=ap&&13>se)if(11>se)E=Z.f.RGBA,D&=(ge=Math.abs(E.A))*(fe-1)+ce<=E.size,D&=ge>=ce*Of[se],D&=E.eb!=null;else{E=Z.f.kb,ge=(ce+1)/2,Ie=(fe+1)/2,ve=Math.abs(E.fa),Se=Math.abs(E.Ab);var Xe=Math.abs(E.Db),Je=Math.abs(E.lb),Ke=Je*(fe-1)+ce;D&=ve*(fe-1)+ce<=E.Fd,D&=Se*(Ie-1)+ge<=E.Cd,D=(D&=Xe*(Ie-1)+ge<=E.Ed)&ve>=ce&Se>=ge&Xe>=ge,D&=E.y!=null,D&=E.f!=null,D&=E.ea!=null,se==12&&(D&=Je>=ce,D&=Ke<=E.Tc,D&=E.F!=null)}else D=0;E=D?0:2}}return E!=0||W!=null&&W.fd&&(E=vd(Z)),E}var fa=64,bd=[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],Cc=24,wd=32,jd=8,Ls=[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];$e("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(E){return E},T.Predictor2=function(E,D,W){return D[W+0]},T.Predictor3=function(E,D,W){return D[W+1]},T.Predictor4=function(E,D,W){return D[W-1]},T.Predictor5=function(E,D,W){return be(be(E,D[W+1]),D[W+0])},T.Predictor6=function(E,D,W){return be(E,D[W-1])},T.Predictor7=function(E,D,W){return be(E,D[W+0])},T.Predictor8=function(E,D,W){return be(D[W-1],D[W+0])},T.Predictor9=function(E,D,W){return be(D[W+0],D[W+1])},T.Predictor10=function(E,D,W){return be(be(E,D[W-1]),be(D[W+0],D[W+1]))},T.Predictor11=function(E,D,W){var Z=D[W+0];return 0>=st(Z>>24&255,E>>24&255,(D=D[W-1])>>24&255)+st(Z>>16&255,E>>16&255,D>>16&255)+st(Z>>8&255,E>>8&255,D>>8&255)+st(255&Z,255&E,255&D)?Z:E},T.Predictor12=function(E,D,W){var Z=D[W+0];return(We((E>>24&255)+(Z>>24&255)-((D=D[W-1])>>24&255))<<24|We((E>>16&255)+(Z>>16&255)-(D>>16&255))<<16|We((E>>8&255)+(Z>>8&255)-(D>>8&255))<<8|We((255&E)+(255&Z)-(255&D)))>>>0},T.Predictor13=function(E,D,W){var Z=D[W-1];return(Ze((E=be(E,D[W+0]))>>24&255,Z>>24&255)<<24|Ze(E>>16&255,Z>>16&255)<<16|Ze(E>>8&255,Z>>8&255)<<8|Ze(E>>0&255,Z>>0&255))>>>0};var Ac=T.PredictorAdd0;T.PredictorAdd1=Mt,$e("Predictor2","PredictorAdd2"),$e("Predictor3","PredictorAdd3"),$e("Predictor4","PredictorAdd4"),$e("Predictor5","PredictorAdd5"),$e("Predictor6","PredictorAdd6"),$e("Predictor7","PredictorAdd7"),$e("Predictor8","PredictorAdd8"),$e("Predictor9","PredictorAdd9"),$e("Predictor10","PredictorAdd10"),$e("Predictor11","PredictorAdd11"),$e("Predictor12","PredictorAdd12"),$e("Predictor13","PredictorAdd13");var Do=T.PredictorAdd2;It("ColorIndexInverseTransform","MapARGB","32b",(function(E){return E>>8&255}),(function(E){return E})),It("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(E){return E}),(function(E){return E>>8&255}));var pu,Rs=T.ColorIndexInverseTransform,Nd=T.MapARGB,kc=T.VP8LColorIndexInverseTransformAlpha,_d=T.MapAlpha,Fo=T.VP8LPredictorsAdd=[];Fo.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Gl,Is,as,Yl,ml,pl,Sd,Ql,Un,qo,ss,xi,Pc,ei,Xl,Jl,Ec,Ds,gl,Bo,$o,Uo,xl,Wa,U,ke,ze,wt,kt=i(511),zt=i(2041),Zn=i(225),ja=i(767),co=0,Cr=zt,zn=Zn,yi=ja,zo=kt,ap=0,Cd=1,Nv=2,Sf=3,Cf=4,Wr=5,sp=6,hh=7,gu=8,Af=9,kf=10,Pf=[2,3,7],ip=[3,3,11],xu=[280,256,256,256,40],_v=[0,1,1,1,0],d2=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],u2=[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,
vendor: 4,135 bytes, line 1154
115464,114,126,97,111,80,113,127,96,112],Sv=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],op=8,fh=[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],Ef=[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],yu=null,Ex=[[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]],Tx=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Cv=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Av=[[[[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,25
11545,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]]]],h2=[[[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,
11541,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]]],f2=[[[[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,25
vendor: 4,207 bytes, line 1154
11545,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]]]],Ox=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],vi=[],Vo=[],Di=[],Zl=1,mh=2,ti=[],Fi=[];ot("UpsampleRgbLinePair",Jn,3),ot("UpsampleBgrLinePair",sa,3),ot("UpsampleRgbaLinePair",oo,4),ot("UpsampleBgraLinePair",La,4),ot("UpsampleArgbLinePair",rs,4),ot("UpsampleRgba4444LinePair",Ma,2),ot("UpsampleRgb565LinePair",ha,2);var m2=T.UpsampleRgbLinePair,p2=T.UpsampleBgrLinePair,Ad=T.UpsampleRgbaLinePair,ph=T.UpsampleBgraLinePair,vu=T.UpsampleArgbLinePair,Tf=T.UpsampleRgba4444LinePair,Mx=T.UpsampleRgb565LinePair,Tc=16,yl=1<<Tc-1,Tr=-227,Fr=482,kd=6,Fs=0,qi=i(256),bu=i(256),gh=i(256),Bi=i(256),lp=i(Fr-Tr),kv=i(Fr-Tr);Zs("YuvToRgbRow",Jn,3),Zs("YuvToBgrRow",sa,3),Zs("YuvToRgbaRow",oo,4),Zs("YuvToBgraRow",La,4),Zs("YuvToArgbRow",rs,4),Zs("YuvToRgba4444Row",Ma,2),Zs("YuvToRgb565Row",ha,2);var Lx=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],wu=[0,2,8],Pv=[8,7,6,4,4,2,2,2,1,1,1,1],Oc=1;this.WebPDecodeRGBA=function(E,D,W,Z,se){var ce=Cd,fe=new Mo,ge=new na;fe.ba=ge,ge.S=ce,ge.width=[ge.width],ge.height=[ge.height];var ve=ge.width,Se=ge.height,Ie=new Ea;if(Ie==null||E==null)var Xe=2;else t(Ie!=null),Xe=lo(E,D,W,Ie.width,Ie.height,Ie.Pd,Ie.Qd,Ie.format,null);if(Xe!=0?ve=0:(ve!=null&&(ve[0]=Ie.width[0]),Se!=null&&(Se[0]=Ie.height[0]),ve=1),ve){ge.width=ge.width[0],ge.height=ge.height[0],Z!=null&&(Z[0]=ge.width),se!=null&&(se[0]=ge.height);e:{if(Z=new ol,(se=new Lo).data=E,se.w=D,se.ha=W,se.kd=1,D=[0],t(se!=null),((E=lo(se.data,se.w,se.ha,null,null,null,D,null,se))==0||E==7)&&D[0]&&(E=4),(D=E)==0){if(t(fe!=null),Z.data=se.data,Z.w=se.w+se.offset,Z.ha=se.ha-se.offset,Z.put=da,Z.ac=Gn,Z.bc=cr,Z.ma=fe,se.xa){if((E=xs())==null){fe=1;break e}if((function(Je,Ke){var pt=[0],it=[0],qe=[0];t:for(;;){if(Je==null)return 0;if(Ke==null)return Je.a=2,0;if(Je.l=Ke,Je.a=0,Y(Je.m,Ke.data,Ke.w,Ke.ha),!Dt(Je.m,pt,it,qe)){Je.a=3;break t}if(Je.xb=mh,Ke.width=pt[0],Ke.height=it[0],!Ye(pt[0],it[0],1,Je,null))break t;return 1}return t(Je.a!=0),0})(E,Z)){if(Z=(D=Sc(Z.width,Z.height,fe.Oa,fe.ba))==0){t:{Z=E;n:for(;;){if(Z==null){Z=0;break t}if(t(Z.s.yc!=null),t(Z.s.Ya!=null),t(0<Z.s.Wb),t((W=Z.l)!=null),t((se=W.ma)!=null),Z.xb!=0){if(Z.ca=se.ba,Z.tb=se.tb,t(Z.ca!=null),!fl(se.Oa,W,Sf)){Z.a=2;break n}if(!nt(Z,W.width)||W.da)break n;if((W.da||Rn(Z.ca.S))&&Qe(),11>Z.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),Z.ca.f.kb.F!=null&&Qe()),Z.Pb&&0<Z.s.ua&&Z.s.vb.X==null&&!he(Z.s.vb,Z.s.Wa.Xa)){Z.a=1;break n}Z.xb=0}if(!ua(Z,Z.V,Z.Ba,Z.c,Z.i,W.o,ro))break n;se.Dc=Z.Ma,Z=1;break t}t(Z.a!=0),Z=0}Z=!Z}Z&&(D=E.a)}else D=E.a}else{if((E=new es)==null){fe=1;break e}if(E.Fa=se.na,E.P=se.P,E.qc=se.Sa,So(E,Z)){if((D=Sc(Z.width,Z.height,fe.Oa,fe.ba))==0){if(E.Aa=0,W=fe.Oa,t((se=E)!=null),W!=null){if(0<(ve=0>(ve=W.Md)?0:100<ve?255:255*ve/100)){for(Se=Ie=0;4>Se;++Se)12>(Xe=se.pb[Se]).lc&&(Xe.ia=ve*Pv[0>Xe.lc?0:Xe.lc]>>3),Ie|=Xe.ia;Ie&&(alert("todo:VP8InitRandom"),se.ia=1)}se.Ga=W.Id,100<se.Ga?se.Ga=100:0>se.Ga&&(se.Ga=0)}ko(E,Z)||(D=E.a)}}else D=E.a}D==0&&fe.Oa!=null&&fe.Oa.fd&&(D=vd(fe.ba))}fe=D}ce=fe!=0?null:11>ce?ge.f.RGBA.eb:ge.f.kb.y}else ce=null;return ce};var Of=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(T,R){for(var M="",k=0;k<4;k++)M+=String.fromCharCode(T[R++]);return M}function h(T,R){return(T[R+0]<<0|T[R+1]<<8|T[R+2]<<16)>>>0}function u(T,R){return(T[R+0]<<0|T[R+1]<<8|T[R+2]<<16|T[R+3]<<24)>>>0}new c;var f=[0],m=[0],b=[],g=new c,y=e,x=(function(T,R){var M={},k=0,P=!1,O=0,F=0;
vendor: 9,339 bytes, line 1154
1154if(M.frames=[],!(function(K,te,re,Q){for(var ne=0;ne<Q;ne++)if(K[te+ne]!=re.charCodeAt(ne))return!0;return!1})(T,R,"RIFF",4)){var $,G;for(u(T,R+=4),R+=8;R<T.length;){var B=d(T,R),Y=u(T,R+=4);R+=4;var ee=Y+(1&Y);switch(B){case"VP8 ":case"VP8L":M.frames[k]===void 0&&(M.frames[k]={}),(q=M.frames[k]).src_off=P?F:R-8,q.src_size=O+Y+8,k++,P&&(P=!1,O=0,F=0);break;case"VP8X":(q=M.header={}).feature_flags=T[R];var J=R+4;q.canvas_width=1+h(T,J),J+=3,q.canvas_height=1+h(T,J),J+=3;break;case"ALPH":P=!0,O=ee+8,F=R-8;break;case"ANIM":(q=M.header).bgcolor=u(T,R),J=R+4,q.loop_count=($=T)[(G=J)+0]<<0|$[G+1]<<8,J+=2;break;case"ANMF":var H,q;(q=M.frames[k]={}).offset_x=2*h(T,R),R+=3,q.offset_y=2*h(T,R),R+=3,q.width=1+h(T,R),R+=3,q.height=1+h(T,R),R+=3,q.duration=h(T,R),R+=3,H=T[R++],q.dispose=1&H,q.blend=H>>1&1}B!="ANMF"&&(R+=ee)}return M}})(y,0);x.response=y,x.rgbaoutput=!0,x.dataurl=!1;var w=x.header?x.header:null,j=x.frames?x.frames:null;if(w){w.loop_counter=w.loop_count,f=[w.canvas_height],m=[w.canvas_width];for(var N=0;N<j.length&&j[N].blend!=0;N++);}var _=j[0],S=g.WebPDecodeRGBA(y,_.src_off,_.src_size,m,f);_.rgba=S,_.imgwidth=m[0],_.imgheight=f[0];for(var A=0;A<m[0]*f[0]*4;A++)b[A]=S[A];return this.width=m,this.height=f,this.data=b,this}(function(e){var t=function(){return typeof Yk=="function"},r=function(f,m,b,g){var y=4,x=o;switch(g){case e.image_compression.FAST:y=1,x=i;break;case e.image_compression.MEDIUM:y=6,x=l;break;case e.image_compression.SLOW:y=9,x=c}f=a(f,m,b,x);var w=Yk(f,{level:y});return e.__addimage__.arrayBufferToBinaryString(w)},a=function(f,m,b,g){for(var y,x,w,j=f.length/m,N=new Uint8Array(f.length+j),_=h(),S=0;S<j;S+=1){if(w=S*m,y=f.subarray(w,w+m),g)N.set(g(y,b,x),w+S);else{for(var A,T=_.length,R=[];A<T;A+=1)R[A]=_[A](y,b,x);var M=u(R.concat());N.set(R[M],w+S)}x=y}return N},s=function(f){var m=Array.apply([],f);return m.unshift(0),m},i=function(f,m){var b,g=[],y=f.length;g[0]=1;for(var x=0;x<y;x+=1)b=f[x-m]||0,g[x+1]=f[x]-b+256&255;return g},o=function(f,m,b){var g,y=[],x=f.length;y[0]=2;for(var w=0;w<x;w+=1)g=b&&b[w]||0,y[w+1]=f[w]-g+256&255;return y},l=function(f,m,b){var g,y,x=[],w=f.length;x[0]=3;for(var j=0;j<w;j+=1)g=f[j-m]||0,y=b&&b[j]||0,x[j+1]=f[j]+256-(g+y>>>1)&255;return x},c=function(f,m,b){var g,y,x,w,j=[],N=f.length;j[0]=4;for(var _=0;_<N;_+=1)g=f[_-m]||0,y=b&&b[_]||0,x=b&&b[_-m]||0,w=d(g,y,x),j[_+1]=f[_]-w+256&255;return j},d=function(f,m,b){if(f===m&&m===b)return f;var g=Math.abs(m-b),y=Math.abs(f-b),x=Math.abs(f+m-b-b);return g<=y&&g<=x?f:y<=x?m:b},h=function(){return[s,i,o,l,c]},u=function(f){var m=f.map((function(b){return b.reduce((function(g,y){return g+Math.abs(y)}),0)}));return m.indexOf(Math.min.apply(null,m))};e.processPNG=function(f,m,b,g){var y,x,w,j,N,_,S,A,T,R,M,k,P,O,F,$=this.decode.FLATE_DECODE,G="";if(this.__addimage__.isArrayBuffer(f)&&(f=new Uint8Array(f)),this.__addimage__.isArrayBufferView(f)){if(f=(w=new w3e(f)).imgData,x=w.bits,y=w.colorSpace,N=w.colors,[4,6].indexOf(w.colorType)!==-1){if(w.bits===8){T=(A=w.pixelBitlength==32?new Uint32Array(w.decodePixels().buffer):w.pixelBitlength==16?new Uint16Array(w.decodePixels().buffer):new Uint8Array(w.decodePixels().buffer)).length,M=new Uint8Array(T*w.colors),R=new Uint8Array(T);var B,Y=w.pixelBitlength-w.bits;for(O=0,F=0;O<T;O++){for(P=A[O],B=0;B<Y;)M[F++]=P>>>B&255,B+=w.bits;R[O]=P>>>B&255}}if(w.bits===16){T=(A=new Uint32Array(w.decodePixels().buffer)).length,M=new Uint8Array(T*(32/w.pixelBitlength)*w.colors),R=new Uint8Array(T*(32/w.pixelBitlength)),k=w.colors>1,O=0,F=0;for(var ee=0;O<T;)P=A[O++],M[F++]=P>>>0&255,k&&(M[F++]=P>>>16&255,P=A[O++],M[F++]=P>>>0&255),R[ee++]=P>>>16&255;x=8}g!==e.image_compression.NONE&&t()?(f=r(M,w.width*w.colors,w.colors,g),S=r(R,w.width,1,g)):(f=M,S=R,$=void 0)}if(w.colorType===3&&(y=this.color_spaces.INDEXED,_=w.palette,w.transparency.indexed)){var J=w.transparency.indexed,H=0;for(O=0,T=J.length;O<T;++O)H+=J[O];if((H/=255)===T-1&&J.indexOf(0)!==-1)j=[J.indexOf(0)];else if(H!==T){for(A=w.decodePixels(),R=new Uint8Array(A.length),O=0,T=A.length;O<T;O++)R[O]=J[A[O]];S=r(R,w.width,1)}}var q=(function(K){var te;switch(K){case e.image_compression.FAST:te=11;break;case e.image_compression.MEDIUM:te=13;break;case e.image_compression.SLOW:te=14;break;default:te=12}return te})(g);return $===this.decode.FLATE_DECODE&&(G="/Predictor "+q+" "),G+="/Colors "+N+" /BitsPerComponent "+x+" /Columns "+w.width,(this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),(S&&this.__addimage__.isArrayBuffer(S)||this.__addimage__.isArrayBufferView(S))&&(S=this.__addimage__.arrayBufferToBinaryString(S)),{alias:b,data:f,index:m,filter:$,decodeParameters:G,transparency:j,palette:_,sMask:S,predictor:q,width:w.width,height:w.height,bitsPerComponent:x,colorSpace:y}}}})(An.API),(function(e){e.processGIF89A=function(t,r,a,s){var i=new j3e(t),o=i.width,l=i.height,c=[];i.decodeAndBlitFrameRGBA(0,c);var d={data:c,width:o,height:l},h=new X4(100).encode(d,100);return e.processJPEG.call(this,h,r,a,s)},e.processGIF87A=e.processGIF89A})(An.API),Hc.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 r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:s,green:a,blue:r,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Hc.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(r){oa.log("bit decode error:"+r)}},Hc.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),r=t%4;for(e=this.height-1;e>=0;e--){for(var a=this.bottom_up?e:this.height-1-e,s=0;s<t;s++)for(var i=this.datav.getUint8(this.pos++,!0),o=a*this.width*4+8*s*4,l=0;l<8&&8*s+l<this.width;l++){var c=this.palette[i>>7-l&1];this.data[o+4*l]=c.blue,this.data[o+4*l+1]=c.green,this.data[o+4*l+2]=c.red,this.data[o+4*l+3]=255}r!==0&&(this.pos+=4-r)}},Hc.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,r=this.height-1;r>=0;r--){for(var a=this.bottom_up?r:this.height-1-r,s=0;s<e;s++){var i=this.datav.getUint8(this.pos++,!0),o=a*this.width*4+2*s*4,l=i>>4,c=15&i,d=this.palette[l];if(this.data[o]=d.blue,this.data[o+1]=d.green,this.data[o+2]=d.red,this.data[o+3]=255,2*s+1>=this.width)break;d=this.palette[c],this.data[o+4]=d.blue,this.data[o+4+1]=d.green,this.data[o+4+2]=d.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},Hc.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var s=this.datav.getUint8(this.pos++,!0),i=r*this.width*4+4*a;if(s<this.palette.length){var o=this.palette[s];this.data[i]=o.red,this.data[i+1]=o.green,this.data[i+2]=o.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}e!==0&&(this.pos+=4-e)}},Hc.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var a=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(i&t)/t*255|0,l=(i>>5&t)/t*255|0,c=(i>>10&t)/t*255|0,d=i>>15?255:0,h=a*this.width*4+4*s;this.data[h]=c,this.data[h+1]=l,this.data[h+2]=o,this.data[h+3]=d}this.pos+=e}},Hc.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),r=parseInt("111111",2),a=this.height-1;a>=0;a--){for(var s=this.bottom_up?a:this.height-1-a,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(o&t)/t*255|0,c=(o>>5&r)/r*255|0,d=(o>>11)/t*255|0,h=s*this.width*4+4*i;this.data[h]=d,this.data[h+1]=c,this.data[h+2]=l,this.data[h+3]=255}this.pos+=e}},Hc.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*r;this.data[o]=i,this.data[o+1]=s,this.data[o+2]=a,this.data[o+3]=255}this.pos+=this.width%4}},Hc.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var a=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),l=t*this.width*4+4*r;
vendor: 4,572 bytes, line 1154
1154this.data[l]=i,this.data[l+1]=s,this.data[l+2]=a,this.data[l+3]=o}},Hc.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,r,a,s){var i=new Hc(t,!1),o=i.width,l=i.height,c={data:i.getData(),width:o,height:l},d=new X4(100).encode(c,100);return e.processJPEG.call(this,d,r,a,s)}})(An.API),T9.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,r,a,s){var i=new T9(t),o=i.width,l=i.height,c={data:i.getData(),width:o,height:l},d=new X4(100).encode(c,100);return e.processJPEG.call(this,d,r,a,s)}})(An.API),An.API.processRGBA=function(e,t,r){for(var a=e.data,s=a.length,i=new Uint8Array(s/4*3),o=new Uint8Array(s/4),l=0,c=0,d=0;d<s;d+=4){var h=a[d],u=a[d+1],f=a[d+2],m=a[d+3];i[l++]=h,i[l++]=u,i[l++]=f,o[c++]=m}var b=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:b,index:t,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},An.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 (Sp
1154ain)","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},Ip=An.API,zb=Ip.getCharWidthsArray=function(e,t){var r,a,s=(t=t||{}).font||this.internal.getFont(),i=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:s.metadata.Unicode.widths,c=l.fof?l.fof:1,d=t.kerning?t.kerning:s.metadata.Unicode.kerning,h=d.fof?d.fof:1,u=t.doKerning!==!1,f=0,m=e.length,b=0,g=l[0]||c,y=[];for(r=0;r<m;r++)a=e.charCodeAt(r),typeof s.metadata.widthOfString=="function"?y.push((s.metadata.widthOfGlyph(s.metadata.characterToGlyph(a))+o*(1e3/i)||0)/1e3):(f=u&&Gr(d[a])==="object"&&!isNaN(parseInt(d[a][b],10))?d[a][b]/h:0,y.push((l[a]||g)/c+f)),b=a;return y},A9=Ip.getStringUnitWidth=function(e,t){var r=(t=t||{}).fontSize||this.internal.getFontSize(),a=t.font||this.internal.getFont(),s=t.charSpace||this.internal.getCharSpace();return Ip.processArabic&&(e=Ip.processArabic(e)),typeof a.metadata.widthOfString=="function"?a.metadata.widthOfString(e,r,s)/r:zb.apply(this,arguments).reduce((function(i,o){return i+o}),0)},k9=function(e,t,r,a){for(var s=[],i=0,o=e.length,l=0;i!==o&&l+t[i]<r;)l+=t[i],i++;s.push(e.slice(0,i));var c=i;for(l=0;i!==o;)l+t[i]>a&&(s.push(e.slice(c,i)),l=0,c=i),l+=t[i],i++;return c!==i&&s.push(e.slice(c,i)),s},P9=function(e,t,r){r||(r={});var a,s,i,o,l,c,d,h=[],u=[h],f=r.textIndent||0,m=0,b=0,g=e.split(" "),y=zb.apply(this,[" ",r])[0];if(c=r.lineIndent===-1?g[0].length+2:r.lineIndent||0){var x=Array(c).join(" "),w=[];g.map((function(N){(N=N.split(/\s*\n/)).length>1?w=w.concat(N.map((function(_,S){return(S&&_.length?`
1155`:"")+_}))):w.push(N[0])})),g=w,c=A9.apply(this,[x,r])}for(i=0,o=g.length;i<o;i++){var j=0;if(a=g[i],c&&a[0]==`
1156`&&(a=a.substr(1),j=1),f+m+(b=(s=zb.apply(this,[a,r])).reduce((function(N,_){return N+_}),0))>t||j){if(b>t){for(l=k9.apply(this,[a,s,t-(f+m),t]),h.push(l.shift()),h=[l.pop()];l.length;)u.push([l.shift()]);b=s.slice(a.length-(h[0]?h[0].length:0)).reduce((function(N,_){return N+_}),0)}else h=[a];u.push(h),f=b+c,m=y}else h.push(a),f+=m+b,m=y}return d=c?function(N,_){return(_?x:"")+N.join(" ")}:function(N){return N.join(" ")},u.map(d)},Ip.splitTextToSize=function(e,t,r){var a,s=(r=r||{}).fontSize||this.internal.getFontSize(),i=(function(h){if(h.widths&&h.kerning)return{widths:h.widths,kerning:h.kerning};var u=this.internal.getFont(h.fontName,h.fontStyle);return u.metadata.Unicode?{widths:u.metadata.Unicode.widths||{0:1},kerning:u.metadata.Unicode.kerning||{}}:{font:u.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,r);a=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/s;i.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/s:0,i.lineIndent=r.lineIndent;var l,c,d=[];for(l=0,c=a.length;l<c;l++)d=d.concat(P9.apply(this,[a[l],o,i]));return d},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",r={},a={},s=0;s<t.length;s++)r[t[s]]="0123456789abcdef"[s],a["0123456789abcdef"[s]]=t[s];var i=function(u){return"0x"+parseInt(u,10).toString(16)},o=e.__fontmetrics__.compress=function(u){var f,m,b,g,y=["{"];for(var x in u){if(f=u[x],isNaN(parseInt(x,10))?m="'"+x+"'":(x=parseInt(x,10),m=(m=i(x).slice(2)).slice(0,-1)+a[m.slice(-1)]),typeof f=="number")f<0?(b=i(f).slice(3),g="-"):(b=i(f).slice(2),g=""),b=g+b.slice(0,-1)+a[b.slice(-1)];else{if(Gr(f)!=="object")throw new Error("Don't know what to do with value type "+Gr(f)+".");b=o(f)}y.push(m+b)}return y.push("}"),y.join("")},l=e.__fontmetrics__.uncompress=function(u){if(typeof u!="string")throw new Error("Invalid argument passed to uncompress.");for(var f,m,b,g,y={},x=1,w=y,j=[],N="",_="",S=u.length-1,A=1;A<S;A+=1)(g=u[A])=="'"?f?(b=f.join(""),f=void 0):f=[]:f?f.push(g):g=="{"?(j.push([w,b]),w={},b=void 0):g=="}"?((m=j.pop())[0][m[1]]=w,b=void 0,w=m[0]):g=="-"?x=-1:b===void 0?r.hasOwnProperty(g)?(N+=r[g],b=parseInt(N,16)*x,x=1,N=""):N+=g:r.hasOwnProperty(g)?(_+=r[g],w[b]=parseInt(_,16)*x,x=1,b=void 0,_=""):_+=g;return y},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d={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
vendor: 2,567 bytes, line 1156
1156={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'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
vendor: 12,160 bytes, line 1156
1156dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'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(
1156u){var f=u.font,m=h.Unicode[f.postScriptName];m&&(f.metadata.Unicode={},f.metadata.Unicode.widths=m.widths,f.metadata.Unicode.kerning=m.kerning);var b=d.Unicode[f.postScriptName];b&&(f.metadata.Unicode.encoding=b,f.encoding=b.codePages[0])}])})(An.API),(function(e){var t=function(r){for(var a=r.length,s=new Uint8Array(a),i=0;i<a;i++)s[i]=r.charCodeAt(i);return s};e.API.events.push(["addFont",function(r){var a=void 0,s=r.font,i=r.instance;if(!s.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");if(typeof(a=i.existsFileInVFS(s.postScriptName)===!1?i.loadFile(s.postScriptName):i.getFileFromVFS(s.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");(function(o,l){l=/^\x00\x01\x00\x00/.test(l)?t(l):t(Uy(l)),o.metadata=e.API.TTFFont.open(l),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(s,a)}}])})(An),(function(e){function t(){return(En.canvg?Promise.resolve(En.canvg):Vk(()=>import("./index.es-CRXwBZXp.js"),[])).catch((function(r){return Promise.reject(new Error("Could not load canvg: "+r))})).then((function(r){return r.default?r.default:r}))}An.API.addSvgAsImage=function(r,a,s,i,o,l,c,d){if(isNaN(a)||isNaN(s))throw oa.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw oa.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var u=h.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},m=this;return t().then((function(b){return b.fromString(u,r,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(b){return b.render(f)})).then((function(){m.addImage(h.toDataURL("image/jpeg",1),a,s,i,o,c,d)}))}})(),An.API.putTotalPages=function(e){var t,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),r=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var s=0;s<this.internal.pages[a].length;s++)this.internal.pages[a][s]=this.internal.pages[a][s].replace(t,r);return this},An.API.viewerPreferences=function(e,t){var r;e=e||{},t=t||!1;var a,s,i,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}},l=Object.keys(o),c=[],d=0,h=0,u=0;function f(b,g){var y,x=!1;for(y=0;y<b.length;y+=1)b[y]===g&&(x=!0);return x}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var m=l.length;for(u=0;
vendor: 36,621 bytes, lines 1156-1184
1156u<m;u+=1)r[l[u]].value=r[l[u]].defaultValue,r[l[u]].explicitSet=!1}if(Gr(e)==="object"){for(s in e)if(i=e[s],f(l,s)&&i!==void 0){if(r[s].type==="boolean"&&typeof i=="boolean")r[s].value=i;else if(r[s].type==="name"&&f(r[s].valueSet,i))r[s].value=i;else if(r[s].type==="integer"&&Number.isInteger(i))r[s].value=i;else if(r[s].type==="array"){for(d=0;d<i.length;d+=1)if(a=!0,i[d].length===1&&typeof i[d][0]=="number")c.push(String(i[d]-1));else if(i[d].length>1){for(h=0;h<i[d].length;h+=1)typeof i[d][h]!="number"&&(a=!1);a===!0&&c.push([i[d][0]-1,i[d][1]-1].join(" "))}r[s].value="["+c.join(" ")+"]"}else r[s].value=r[s].defaultValue;r[s].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",(function(){var b,g=[];for(b in r)r[b].explicitSet===!0&&(r[b].type==="name"?g.push("/"+b+" /"+r[b].value):g.push("/"+b+" "+r[b].value));g.length!==0&&this.internal.write(`/ViewerPreferences
1157<<
1158`+g.join(`
1159`)+`
1160>>`)})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},(function(e){var t=function(){var a='<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>',s=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),i=unescape(encodeURIComponent(a)),o=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),l=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),c=unescape(encodeURIComponent("</x:xmpmeta>")),d=i.length+o.length+l.length+s.length+c.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+d+" >>"),this.internal.write("stream"),this.internal.write(s+i+o+l+c),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(a,s){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:a,namespaceuri:s||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",t)),this}})(An.API),(function(e){var t=e.API,r=t.pdfEscape16=function(i,o){for(var l,c=o.metadata.Unicode.widths,d=["","0","00","000","0000"],h=[""],u=0,f=i.length;u<f;++u){if(l=o.metadata.characterToGlyph(i.charCodeAt(u)),o.metadata.glyIdsUsed.push(l),o.metadata.toUnicode[l]=i.charCodeAt(u),c.indexOf(l)==-1&&(c.push(l),c.push([parseInt(o.metadata.widthOfGlyph(l),10)])),l=="0")return h.join("");l=l.toString(16),h.push(d[4-l.length],l)}return h.join("")},a=function(i){var o,l,c,d,h,u,f;for(h=`/CIDInit /ProcSet findresource begin
116112 dict begin
1162begincmap
1163/CIDSystemInfo <<
1164  /Registry (Adobe)
1165  /Ordering (UCS)
1166  /Supplement 0
1167>> def
1168/CMapName /Adobe-Identity-UCS def
1169/CMapType 2 def
11701 begincodespacerange
1171<0000><ffff>
1172endcodespacerange`,c=[],u=0,f=(l=Object.keys(i).sort((function(m,b){return m-b}))).length;u<f;u++)o=l[u],c.length>=100&&(h+=`
1173`+c.length+` beginbfchar
1174`+c.join(`
1175`)+`
1176endbfchar`,c=[]),i[o]!==void 0&&i[o]!==null&&typeof i[o].toString=="function"&&(d=("0000"+i[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),c.push("<"+o+"><"+d+">"));return c.length&&(h+=`
1177`+c.length+` beginbfchar
1178`+c.join(`
1179`)+`
1180endbfchar
1181`),h+=`endcmap
1182CMapName currentdict /CMap defineresource pop
1183end
1184end`};t.events.push(["putFont",function(i){(function(o){var l=o.font,c=o.out,d=o.newObject,h=o.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="Identity-H"){for(var u=l.metadata.Unicode.widths,f=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),m="",b=0;b<f.length;b++)m+=String.fromCharCode(f[b]);var g=d();h({data:m,addLength1:!0,objectId:g}),c("endobj");var y=d();h({data:a(l.metadata.toUnicode),addLength1:!0,objectId:y}),c("endobj");var x=d();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+Wp(l.fontName)),c("/FontFile2 "+g+" 0 R"),c("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),c("/Flags "+l.metadata.flags),c("/StemV "+l.metadata.stemV),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c(">>"),c("endobj");var w=d();c("<<"),c("/Type /Font"),c("/BaseFont /"+Wp(l.fontName)),c("/FontDescriptor "+x+" 0 R"),c("/W "+e.API.PDFObject.convert(u)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+l.encoding+")"),c(">>"),c(">>"),c("endobj"),l.objectNumber=d(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+y+" 0 R"),c("/BaseFont /"+Wp(l.fontName)),c("/Encoding /"+l.encoding),c("/DescendantFonts ["+w+" 0 R]"),c(">>"),c("endobj"),l.isAlreadyPutted=!0}})(i)}]),t.events.push(["putFont",function(i){(function(o){var l=o.font,c=o.out,d=o.newObject,h=o.putStream;if(l.metadata instanceof e.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var u=l.metadata.rawData,f="",m=0;m<u.length;m++)f+=String.fromCharCode(u[m]);var b=d();h({data:f,addLength1:!0,objectId:b}),c("endobj");var g=d();h({data:a(l.metadata.toUnicode),addLength1:!0,objectId:g}),c("endobj");var y=d();c("<<"),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c("/StemV "+l.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+b+" 0 R"),c("/Flags 96"),c("/FontBBox "+e.API.PDFObject.convert(l.metadata.bbox)),c("/FontName /"+Wp(l.fontName)),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c(">>"),c("endobj"),l.objectNumber=d();for(var x=0;x<l.metadata.hmtx.widths.length;x++)l.metadata.hmtx.widths[x]=parseInt(l.metadata.hmtx.widths[x]*(1e3/l.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+Wp(l.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),c("endobj"),l.isAlreadyPutted=!0}})(i)}]);var s=function(i){var o,l=i.text||"",c=i.x,d=i.y,h=i.options||{},u=i.mutex||{},f=u.pdfEscape,m=u.activeFontKey,b=u.fonts,g=m,y="",x=0,w="",j=b[g].encoding;if(b[g].encoding!=="Identity-H")return{text:l,x:c,y:d,options:h,mutex:u};for(w=l,g=m,Array.isArray(l)&&(w=l[0]),x=0;x<w.length;x+=1)b[g].metadata.hasOwnProperty("cmap")&&(o=b[g].metadata.cmap.unicode.codeMap[w[x].charCodeAt(0)]),o||w[x].charCodeAt(0)<256&&b[g].metadata.hasOwnProperty("Unicode")?y+=w[x]:y+="";var N="";return parseInt(g.slice(1))<14||j==="WinAnsiEncoding"?N=f(y,g).split("").map((function(_){return _.charCodeAt(0).toString(16)})).join(""):j==="Identity-H"&&(N=r(y,b[g])),u.isHex=!0,{text:N,x:c,y:d,options:h,mutex:u}};t.events.push(["postProcessText",function(i){var o=i.text||"",l=[],c={text:o,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(o)){var d=0;for(d=0;d<o.length;d+=1)Array.isArray(o[d])&&o[d].length===3?l.push([s(Object.assign({},c,{text:o[d][0]})).text,o[d][1],o[d][2]]):l.push(s(Object.assign({},c,{text:o[d]})).text);i.text=l}else i.text=s(Object.assign({},c,{text:o})).text}])})(An),(function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0},e.addFileToVFS=function(r,a){return t.call(this),this.internal.vFS[r]=a,this},e.getFileFromVFS=function(r){return t.call(this),this.internal.vFS[r]!==void 0?this.internal.vFS[r]:null}})(An.API),(function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(a){var s,i,o,l,c,d,h,u=t,f=[[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},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],x=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)$/),w=!1,j=0;this.__bidiEngine__={};var N=function(k){var P=k.charCodeAt(),O=P>>8,F=g[O];return F!==void 0?u[256*F+(255&P)]:O===252||O===253?"AL":x.test(O)?"L":O===8?"R":"N"},_=function(k){for(var P,O=0;O<k.length;O++){if((P=N(k.charAt(O)))==="L")return!1;if(P==="R")return!0}return!1},S=function(k,P,O,F){var $,G,B,Y,ee=P[F];switch(ee){case"L":case"R":w=!1;break;case"N":case"AN":break;case"EN":w&&(ee="AN");break;case"AL":w=!0,ee="R";break;case"WS":ee="N";break;case"CS":F<1||F+1>=P.length||($=O[F-1])!=="EN"&&$!=="AN"||(G=P[F+1])!=="EN"&&G!=="AN"?ee="N":w&&(G="AN"),ee=G===$?G:"N";break;case"ES":ee=($=F>0?O[F-1]:"B")==="EN"&&F+1<P.length&&P[F+1]==="EN"?"EN":"N";break;case"ET":if(F>0&&O[F-1]==="EN"){ee="EN";break}if(w){ee="N";break}for(B=F+1,Y=P.length;B<Y&&P[B]==="ET";)B++;ee=B<Y&&P[B]==="EN"?"EN":"N";break;case"NSM":if(o&&!l){for(Y=P.length,B=F+1;B<Y&&P[B]==="NSM";)B++;if(B<Y){var J=k[F],H=J>=1425&&J<=2303||J===64286;if($=P[B],H&&($==="R"||$==="AL")){ee="R";break}}}ee=F<1||($=P[F-1])==="B"?"N":O[F-1];break;case"B":w=!1,s=!0,ee=j;break;case"S":i=!0,ee="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":w=!1;break;case"BN":ee="N"}return ee},A=function(k,P,O){var F=k.split("");return O&&T(F,O,{hiLevel:j}),F.reverse(),P&&P.reverse(),F.join("")},T=function(k,P,O){var F,$,G,B,Y,ee=-1,J=k.length,H=0,q=[],K=j?m:f,te=[];for(w=!1,s=!1,i=!1,$=0;$<J;$++)te[$]=N(k[$]);for(G=0;G<J;G++){if(Y=H,q[G]=S(k,te,q,G),F=240&(H=K[Y][b[q[G]]]),H&=15,P[G]=B=K[H][5],F>0)if(F===16){for($=ee;$<G;$++)P[$]=1;ee=-1}else ee=-1;if(K[H][6])ee===-1&&(ee=G);else if(ee>-1){for($=ee;$<G;$++)P[$]=B;ee=-1}te[G]==="B"&&(P[G]=0),O.hiLevel|=B}i&&(function(re,Q,ne){for(var oe=0;oe<ne;oe++)if(re[oe]==="S"){Q[oe]=j;for(var ae=oe-1;ae>=0&&re[ae]==="WS";ae--)Q[ae]=j}})(te,P,J)},R=function(k,P,O,F,$){if(!($.hiLevel<k)){if(k===1&&j===1&&!s)return P.reverse(),void(O&&O.reverse());for(var G,B,Y,ee,J=P.length,H=0;H<J;){if(F[H]>=k){for(Y=H+1;Y<J&&F[Y]>=k;)Y++;for(ee=H,B=Y-1;ee<B;ee++,B--)G=P[ee],P[ee]=P[B],P[B]=G,O&&(G=O[ee],O[ee]=O[B],O[B]=G);H=Y}H++}}},M=function(k,P,O){var F=k.split(""),$={hiLevel:j};return O||(O=[]),T(F,O,$),(function(G,B,Y){if(Y.hiLevel!==0&&h)for(var ee,J=0;J<G.length;J++)B[J]===1&&(ee=y.indexOf(G[J]))>=0&&(G[J]=y[ee+1])})(F,O,$),R(2,F,P,O,$),R(1,F,P,O,$),F.join("")};return this.__bidiEngine__.doBidiReorder=function(k,P,O){if((function($,G){if(G)for(var B=0;B<$.length;B++)G[B]=B;l===void 0&&(l=_($)),d===void 0&&(d=_($))})(k,P),o||!c||d)if(o&&c&&l^d)j=l?1:0,k=A(k,P,O);else if(!o&&c&&d)j=l?1:0,k=M(k,P,O),k=A(k,P);else if(!o||l||c||d){if(o&&!c&&l^d)k=A(k,P),l?(j=0,k=M(k,P,O)):(j=1,k=M(k,P,O),k=A(k,P));else if(o&&l&&!c&&d)j=1,k=M(k,P,O),k=A(k,P);else if(!o&&!c&&l^d){var F=h;l?(j=1,k=M(k,P,O),j=0,h=!1,k=M(k,P,O),h=F):(j=0,k=M(k,P,O),k=A(k,P),j=1,h=!1,k=M(k,P,O),h=F,k=A(k,P))}}else j=0,k=M(k,P,O);else j=l?1:0,k=M(k,P,O);return k},this.__bidiEngine__.setOptions=function(k){k&&(o=k.isInputVisual,c=k.isOutputVisual,l=k.isInputRtl,d=k.isOutputRtl,h=k.isSymmetricSwapping)},this.__bidiEngine__.setOptions(a),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"],r=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(a){var s=a.text,i=(a.x,a.y,a.options||{}),o=(a.mutex,i.lang,[]);if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,r.setOptions(i),Object.prototype.toString.call(s)==="[object Array]"){var l=0;for(o=[],l=0;l<s.length;l+=1)Object.prototype.toString.call(s[l])==="[object Array]"?o.push([r.doBidiReorder(s[l][0]),s[l][1],s[l][2]]):o.push([r.doBidiReorder(s[l])]);a.text=o}else a.text=r.doBidiReorder(s);r.setOptions({isInputVisual:!0})}])})(An),An.API.TTFFont=(function(){function e(t){var r;if(this.rawData=t,r=this.contents=new mf(t),this.contents.pos=4,r.readString(4)==="ttcf")throw new Error("TTCF not supported.");r.pos=0,this.parse(),this.subset=new D3e(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new N3e(this.contents),this.head=new S3e(this),this.name=new E3e(this),this.cmap=new wY(this),this.toUnicode={},this.hhea=new C3e(this),this.maxp=new T3e(this),this.hmtx=new O3e(this),this.post=new k3e(this),this.os2=new A3e(this),this.loca=new I3e(this),this.glyf=new M3e(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,r,a,s,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var o,l,c,d;for(d=[],o=0,l=(c=this.bbox).length;o<l;o++)t=c[o],d.push(Math.round(t*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(a=255&(s=this.post.italic_angle),(32768&(r=s>>16))!=0&&(r=-(1+(65535^r))),this.italicAngle=+(r+"."+a)):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=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===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 r;return((r=this.cmap.unicode)!=null?r.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var r;return r=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*r},e.prototype.widthOfString=function(t,r,a){var s,i,o,l;for(o=0,i=0,l=(t=""+t).length;0<=l?i<l:i>l;i=0<=l?++i:--i)s=t.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(s))+a*(1e3/r)||0;return o*(r/1e3)},e.prototype.lineHeight=function(t,r){var a;return r==null&&(r=!1),a=r?this.lineGap:0,(this.ascender+a-this.decender)/1e3*t},e})();var md,mf=(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 r,a;for(a=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)a[r]=String.fromCharCode(this.readByte());return a.join("")},e.prototype.writeString=function(t){var r,a,s;for(s=[],r=0,a=t.length;0<=a?r<a:r>a;r=0<=a?++r:--r)s.push(this.writeByte(t.charCodeAt(r)));return s},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,r,a,s,i,o,l,c;return t=this.readByte(),r=this.readByte(),a=this.readByte(),s=this.readByte(),i=this.readByte(),o=this.readByte(),l=this.readByte(),c=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^r)+1099511627776*(255^a)+4294967296*(255^s)+16777216*(255^i)+65536*(255^o)+256*(255^l)+(255^c)+1):72057594037927940*t+281474976710656*r+1099511627776*a+4294967296*s+16777216*i+65536*o+256*l+c},e.prototype.writeLongLong=function(t){var r,a;return r=Math.floor(t/4294967296),a=4294967295&t,this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r),this.writeByte(a>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var r,a;for(r=[],a=0;0<=t?a<t:a>t;a=0<=t?++a:--a)r.push(this.readByte());return r},e.prototype.write=function(t){var r,a,s,i;for(i=[],a=0,s=t.length;a<s;a++)r=t[a],i.push(this.writeByte(r));return i},e})(),N3e=(function(){var e;function t(r){var a,s,i;for(this.scalarType=r.readInt(),this.tableCount=r.readShort(),this.searchRange=r.readShort(),this.entrySelector=r.readShort(),this.rangeShift=r.readShort(),this.tables={},s=0,i=this.tableCount;0<=i?s<i:s>i;s=0<=i?++s:--s)a={tag:r.readString(4),checksum:r.readInt(),offset:r.readInt(),length:r.readInt()},this.tables[a.tag]=a}return t.prototype.encode=function(r){var a,s,i,o,l,c,d,h,u,f,m,b,g;for(g in m=Object.keys(r).length,c=Math.log(2),u=16*Math.floor(Math.log(m)/c),o=Math.floor(u/c),h=16*m-u,(s=new mf).writeInt(this.scalarType),s.writeShort(m),s.writeShort(u),s.writeShort(o),s.writeShort(h),i=16*m,d=s.pos+i,l=null,b=[],r)for(f=r[g],s.writeString(g),s.writeInt(e(f)),s.writeInt(d),s.writeInt(f.length),b=b.concat(f),g==="head"&&(l=d),d+=f.length;d%4;)b.push(0),d++;return s.write(b),a=2981146554-e(s.data),s.pos=l+8,s.writeUInt32(a),s.data},e=function(r){var a,s,i,o;for(r=jY.call(r);r.length%4;)r.push(0);for(i=new mf(r),s=0,a=0,o=r.length;a<o;a=a+=4)s+=i.readUInt32();return 4294967295&s},t})(),_3e={}.hasOwnProperty,du=function(e,t){for(var r in t)_3e.call(t,r)&&(e[r]=t[r]);function a(){this.constructor=e}return a.prototype=t.prototype,e.prototype=new a,e.__super__=t.prototype,e};md=(function(){function e(t){var r;this.file=t,r=this.file.directory.tables[this.tag],this.exists=!!r,r&&(this.offset=r.offset,this.length=r.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 S3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="head",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.revision=r.readInt(),this.checkSumAdjustment=r.readInt(),this.magicNumber=r.readInt(),this.flags=r.readShort(),this.unitsPerEm=r.readShort(),this.created=r.readLongLong(),this.modified=r.readLongLong(),this.xMin=r.readShort(),this.yMin=r.readShort(),this.xMax=r.readShort(),this.yMax=r.readShort(),this.macStyle=r.readShort(),this.lowestRecPPEM=r.readShort(),this.fontDirectionHint=r.readShort(),this.indexToLocFormat=r.readShort(),this.glyphDataFormat=r.readShort()},t.prototype.encode=function(r){var a;return(a=new mf).writeInt(this.version),a.writeInt(this.revision),a.writeInt(this.checkSumAdjustment),a.writeInt(this.magicNumber),a.writeShort(this.flags),a.writeShort(this.unitsPerEm),a.writeLongLong(this.created),a.writeLongLong(this.modified),a.writeShort(this.xMin),a.writeShort(this.yMin),a.writeShort(this.xMax),a.writeShort(this.yMax),a.writeShort(this.macStyle),a.writeShort(this.lowestRecPPEM),a.writeShort(this.fontDirectionHint),a.writeShort(r),a.writeShort(this.glyphDataFormat),a.data},t})(),O9=(function(){function e(t,r){var a,s,i,o,l,c,d,h,u,f,m,b,g,y,x,w,j;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=r+t.readInt(),u=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(c=0;c<256;++c)this.codeMap[c]=t.readByte();break;case 4:for(m=t.readUInt16(),f=m/2,t.pos+=6,i=(function(){var N,_;for(_=[],c=N=0;0<=f?N<f:N>f;c=0<=f?++N:--N)_.push(t.readUInt16());return _})(),t.pos+=2,g=(function(){var N,_;for(_=[],c=N=0;0<=f?N<f:N>f;c=0<=f?++N:--N)_.push(t.readUInt16());return _})(),d=(function(){var N,_;for(_=[],c=N=0;0<=f?N<f:N>f;c=0<=f?++N:--N)_.push(t.readUInt16());return _})(),h=(function(){var N,_;for(_=[],c=N=0;0<=f?N<f:N>f;c=0<=f?++N:--N)_.push(t.readUInt16());return _})(),s=(this.length-t.pos+this.offset)/2,l=(function(){var N,_;for(_=[],c=N=0;0<=s?N<s:N>s;c=0<=s?++N:--N)_.push(t.readUInt16());return _})(),c=x=0,j=i.length;x<j;c=++x)for(y=i[c],a=w=b=g[c];b<=y?w<=y:w>=y;a=b<=y?++w:--w)h[c]===0?o=a+d[c]:(o=l[h[c]/2+(a-b)-(f-c)]||0)!==0&&(o+=d[c]),this.codeMap[a]=65535&o}t.pos=u}return e.encode=function(t,r){var a,s,i,o,l,c,d,h,u,f,m,b,g,y,x,w,j,N,_,S,A,T,R,M,k,P,O,F,$,G,B,Y,ee,J,H,q,K,te,re,Q,ne,oe,ae,le,je,xe;switch(F=new mf,o=Object.keys(t).sort((function(Fe,he){return Fe-he})),r){case"macroman":for(g=0,y=(function(){var Fe=[];for(b=0;b<256;++b)Fe.push(0);return Fe})(),w={0:0},i={},$=0,ee=o.length;$<ee;$++)w[ae=t[s=o[$]]]==null&&(w[ae]=++g),i[s]={old:t[s],new:w[t[s]]},y[s]=w[t[s]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(y),{charMap:i,subtable:F.data,maxGlyphID:g+1};case"unicode":for(P=[],u=[],j=0,w={},a={},x=d=null,G=0,J=o.length;G<J;G++)w[_=t[s=o[G]]]==null&&(w[_]=++j),a[s]={old:_,new:w[_]},l=w[_]-s,x!=null&&l===d||(x&&u.push(x),P.push(s),d=l),x=s;for(x&&u.push(x),u.push(65535),P.push(65535),M=2*(R=P.length),T=2*Math.pow(Math.log(R)/Math.LN2,2),f=Math.log(T/2)/Math.LN2,A=2*R-T,c=[],S=[],m=[],b=B=0,H=P.length;B<H;b=++B){if(k=P[b],h=u[b],k===65535){c.push(0),S.push(0);break}if(k-(O=a[k].new)>=32768)for(c.push(0),S.push(2*(m.length+R-b)),s=Y=k;k<=h?Y<=h:Y>=h;s=k<=h?++Y:--Y)m.push(a[s].new);else c.push(O-k),S.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*R+2*m.length),F.writeUInt16(0),F.writeUInt16(M),F.writeUInt16(T),F.writeUInt16(f),F.writeUInt16(A),ne=0,q=u.length;ne<q;ne++)s=u[ne],F.writeUInt16(s);for(F.writeUInt16(0),oe=0,K=P.length;oe<K;oe++)s=P[oe],F.writeUInt16(s);for(le=0,te=c.length;le<te;le++)l=c[le],F.writeUInt16(l);for(je=0,re=S.length;je<re;je++)N=S[je],F.writeUInt16(N);for(xe=0,Q=m.length;xe<Q;xe++)g=m[xe],F.writeUInt16(g);return{charMap:a,subtable:F.data,maxGlyphID:j+1}}},e})(),wY=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="cmap",t.prototype.parse=function(r){var a,s,i;for(r.pos=this.offset,this.version=r.readUInt16(),i=r.readUInt16(),this.tables=[],this.unicode=null,s=0;0<=i?s<i:s>i;s=0<=i?++s:--s)a=new O9(r,this.offset),this.tables.push(a),a.isUnicode&&this.unicode==null&&(this.unicode=a);return!0},t.encode=function(r,a){var s,i;return a==null&&(a="macroman"),s=O9.encode(r,a),(i=new mf).writeUInt16(0),i.writeUInt16(1),s.table=i.data.concat(s.subtable),s},t})(),C3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="hhea",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.ascender=r.readShort(),this.decender=r.readShort(),this.lineGap=r.readShort(),this.advanceWidthMax=r.readShort(),this.minLeftSideBearing=r.readShort(),this.minRightSideBearing=r.readShort(),this.xMaxExtent=r.readShort(),this.caretSlopeRise=r.readShort(),this.caretSlopeRun=r.readShort(),this.caretOffset=r.readShort(),r.pos+=8,this.metricDataFormat=r.readShort(),this.numberOfMetrics=r.readUInt16()},t})(),A3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="OS/2",t.prototype.parse=function(r){if(r.pos=this.offset,this.version=r.readUInt16(),this.averageCharWidth=r.readShort(),this.weightClass=r.readUInt16(),this.widthClass=r.readUInt16(),this.type=r.readShort(),this.ySubscriptXSize=r.readShort(),this.ySubscriptYSize=r.readShort(),this.ySubscriptXOffset=r.readShort(),this.ySubscriptYOffset=r.readShort(),this.ySuperscriptXSize=r.readShort(),this.ySuperscriptYSize=r.readShort(),this.ySuperscriptXOffset=r.readShort(),this.ySuperscriptYOffset=r.readShort(),this.yStrikeoutSize=r.readShort(),this.yStrikeoutPosition=r.readShort(),this.familyClass=r.readShort(),this.panose=(function(){var a,s;for(s=[],a=0;a<10;++a)s.push(r.readByte());return s})(),this.charRange=(function(){var a,s;for(s=[],a=0;a<4;++a)s.push(r.readInt());return s})(),this.vendorID=r.readString(4),this.selection=r.readShort(),this.firstCharIndex=r.readShort(),this.lastCharIndex=r.readShort(),this.version>0&&(this.ascent=r.readShort(),this.descent=r.readShort(),this.lineGap=r.readShort(),this.winAscent=r.readShort(),this.winDescent=r.readShort(),this.codePageRange=(function(){var a,s;for(s=[],a=0;a<2;a=++a)s.push(r.readInt());return s})(),this.version>1))return this.xHeight=r.readShort(),this.capHeight=r.readShort(),this.defaultChar=r.readShort(),this.breakChar=r.readShort(),this.maxContext=r.readShort()},t})(),k3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="post",t.prototype.parse=function(r){var a,s,i;switch(r.pos=this.offset,this.format=r.readInt(),this.italicAngle=r.readInt(),this.underlinePosition=r.readShort(),this.underlineThickness=r.readShort(),this.isFixedPitch=r.readInt(),this.minMemType42=r.readInt(),this.maxMemType42=r.readInt(),this.minMemType1=r.readInt(),this.maxMemType1=r.readInt(),this.format){case 65536:break;case 131072:var o;for(s=r.readUInt16(),this.glyphNameIndex=[],o=0;0<=s?o<s:o>s;o=0<=s?++o:--o)this.glyphNameIndex.push(r.readUInt16());for(this.names=[],i=[];r.pos<this.offset+this.length;)a=r.readByte(),i.push(this.names.push(r.readString(a)));return i;case 151552:return s=r.readUInt16(),this.offsets=r.read(s);case 196608:break;case 262144:return this.map=(function(){var l,c,d;for(d=[],o=l=0,c=this.file.maxp.numGlyphs;0<=c?l<c:l>c;o=0<=c?++l:--l)d.push(r.readUInt32());return d}).call(this)}},t})(),P3e=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},E3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="name",t.prototype.parse=function(r){var a,s,i,o,l,c,d,h,u,f,m;for(r.pos=this.offset,r.readShort(),a=r.readShort(),c=r.readShort(),s=[],o=0;0<=a?o<a:o>a;o=0<=a?++o:--o)s.push({platformID:r.readShort(),encodingID:r.readShort(),languageID:r.readShort(),nameID:r.readShort(),length:r.readShort(),offset:this.offset+c+r.readShort()});for(d={},o=u=0,f=s.length;u<f;o=++u)i=s[o],r.pos=i.offset,h=r.readString(i.length),l=new P3e(h,i),d[m=i.nameID]==null&&(d[m]=[]),d[i.nameID].push(l);this.strings=d,this.copyright=d[0],this.fontFamily=d[1],this.fontSubfam
1184ily=d[2],this.uniqueSubfamily=d[3],this.fontName=d[4],this.version=d[5];try{this.postscriptName=d[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=d[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=d[7],this.manufacturer=d[8],this.designer=d[9],this.description=d[10],this.vendorUrl=d[11],this.designerUrl=d[12],this.license=d[13],this.licenseUrl=d[14],this.preferredFamily=d[15],this.preferredSubfamily=d[17],this.compatibleFull=d[18],this.sampleText=d[19]},t})(),T3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="maxp",t.prototype.parse=function(r){return r.pos=this.offset,this.version=r.readInt(),this.numGlyphs=r.readUInt16(),this.maxPoints=r.readUInt16(),this.maxContours=r.readUInt16(),this.maxCompositePoints=r.readUInt16(),this.maxComponentContours=r.readUInt16(),this.maxZones=r.readUInt16(),this.maxTwilightPoints=r.readUInt16(),this.maxStorage=r.readUInt16(),this.maxFunctionDefs=r.readUInt16(),this.maxInstructionDefs=r.readUInt16(),this.maxStackElements=r.readUInt16(),this.maxSizeOfInstructions=r.readUInt16(),this.maxComponentElements=r.readUInt16(),this.maxComponentDepth=r.readUInt16()},t})(),O3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="hmtx",t.prototype.parse=function(r){var a,s,i,o,l,c,d;for(r.pos=this.offset,this.metrics=[],a=0,c=this.file.hhea.numberOfMetrics;0<=c?a<c:a>c;a=0<=c?++a:--a)this.metrics.push({advance:r.readUInt16(),lsb:r.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var h,u;for(u=[],a=h=0;0<=i?h<i:h>i;a=0<=i?++h:--h)u.push(r.readInt16());return u})(),this.widths=(function(){var h,u,f,m;for(m=[],h=0,u=(f=this.metrics).length;h<u;h++)o=f[h],m.push(o.advance);return m}).call(this),s=this.widths[this.widths.length-1],d=[],a=l=0;0<=i?l<i:l>i;a=0<=i?++l:--l)d.push(this.widths.push(s));return d},t.prototype.forGlyph=function(r){return r in this.metrics?this.metrics[r]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[r-this.metrics.length]}},t})(),jY=[].slice,M3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(r){var a,s,i,o,l,c,d,h,u,f;return r in this.cache?this.cache[r]:(o=this.file.loca,a=this.file.contents,s=o.indexOf(r),(i=o.lengthOf(r))===0?this.cache[r]=null:(a.pos=this.offset+s,l=(c=new mf(a.read(i))).readShort(),h=c.readShort(),f=c.readShort(),d=c.readShort(),u=c.readShort(),this.cache[r]=l===-1?new R3e(c,h,f,d,u):new L3e(c,l,h,f,d,u),this.cache[r]))},t.prototype.encode=function(r,a,s){var i,o,l,c,d;for(l=[],o=[],c=0,d=a.length;c<d;c++)i=r[a[c]],o.push(l.length),i&&(l=l.concat(i.encode(s)));return o.push(l.length),{table:l,offsets:o}},t})(),L3e=(function(){function e(t,r,a,s,i,o){this.raw=t,this.numberOfContours=r,this.xMin=a,this.yMin=s,this.xMax=i,this.yMax=o,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e})(),R3e=(function(){function e(t,r,a,s,i){var o,l;for(this.raw=t,this.xMin=r,this.yMin=a,this.xMax=s,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;l=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&l;)o.pos+=1&l?4:2,128&l?o.pos+=8:64&l?o.pos+=4:8&l&&(o.pos+=2)}return e.prototype.encode=function(){var t,r,a;for(r=new mf(jY.call(this.raw.data)),t=0,a=this.glyphIDs.length;t<a;++t)r.pos=this.glyphOffsets[t];return r.data},e})(),I3e=(function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return du(t,md),t.prototype.tag="loca",t.prototype.parse=function(r){var a,s;return r.pos=this.offset,a=this.file.head.indexToLocFormat,this.offsets=a===0?(function(){var i,o;for(o=[],s=0,i=this.length;s<i;s+=2)o.push(2*r.readUInt16());return o}).call(this):(function(){var i,o;for(o=[],s=0,i=this.length;s<i;s+=4)o.push(r.readUInt32());return o}).call(this)},t.prototype.indexOf=function(r){return this.offsets[r]},t.prototype.lengthOf=function(r){return this.offsets[r+1]-this.offsets[r]},t.prototype.encode=function(r,a){for(var s=new Uint32Array(this.offsets.length),i=0,o=0,l=0;l<s.length;++l)if(s[l]=i,o<a.length&&a[o]==l){++o,s[l]=i;var c=this.offsets[l],d=this.offsets[l+1]-c;d>0&&(i+=d)}for(var h=new Array(4*s.length),u=0;u<s.length;++u)h[4*u+3]=255&s[u],h[4*u+2]=(65280&s[u])>>8,h[4*u+1]=(16711680&s[u])>>16,h[4*u]=(4278190080&s[u])>>24;return h},t})(),D3e=(function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,r,a,s,i;for(r in s=this.font.cmap.tables[0].codeMap,t={},i=this.subset)a=i[r],t[r]=s[a];return t},e.prototype.glyphsFor=function(t){var r,a,s,i,o,l,c;for(s={},o=0,l=t.length;o<l;o++)s[i=t[o]]=this.font.glyf.glyphFor(i);for(i in r=[],s)(a=s[i])!=null&&a.compound&&r.push.apply(r,a.glyphIDs);if(r.length>0)for(i in c=this.glyphsFor(r))a=c[i],s[i]=a;return s},e.prototype.encode=function(t,r){var a,s,i,o,l,c,d,h,u,f,m,b,g,y,x;for(s in a=wY.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),m={0:0},x=a.charMap)m[(c=x[s]).old]=c.new;for(b in f=a.maxGlyphID,o)b in m||(m[b]=f++);return h=(function(w){var j,N;for(j in N={},w)N[w[j]]=j;return N})(m),u=Object.keys(h).sort((function(w,j){return w-j})),g=(function(){var w,j,N;for(N=[],w=0,j=u.length;w<j;w++)l=u[w],N.push(h[l]);return N})(),i=this.font.glyf.encode(o,g,m),d=this.font.loca.encode(i.offsets,g),y={cmap:this.font.cmap.raw(),glyf:i.table,loca:d,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(r)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},e})();An.API.PDFObject=(function(){var e;function t(){}return e=function(r,a){return(Array(a+1).join("0")+r).slice(-a)},t.convert=function(r){var a,s,i,o;if(Array.isArray(r))return"["+(function(){var l,c,d;for(d=[],l=0,c=r.length;l<c;l++)a=r[l],d.push(t.convert(a));return d})().join(" ")+"]";if(typeof r=="string")return"/"+r;if(r!=null&&r.isString)return"("+r+")";if(r instanceof Date)return"(D:"+e(r.getUTCFullYear(),4)+e(r.getUTCMonth(),2)+e(r.getUTCDate(),2)+e(r.getUTCHours(),2)+e(r.getUTCMinutes(),2)+e(r.getUTCSeconds(),2)+"Z)";if({}.toString.call(r)==="[object Object]"){for(s in i=["<<"],r)o=r[s],i.push("/"+s+" "+t.convert(o));return i.push(">>"),i.join(`
1185`)}return""+r},t})();function F3e({tasks:e=[],nominations:t=[],tableBookings:r=[],sponsors:a=[],categories:s=[],socialPosts:i=[],newsArticles:o=[]}){var he,Ne,ue,rt,Te,Pe,$e,Ve,be,We,Ze,st,Mt,Ht,Yt,on,It,_t,xr,xn,Rr,Wn,lr,Ha,Rn,ta,fr,na,Ea,Kn,St,hn,yr,Gn,da,cr,Dt,va,ar,dr,jr,Yn,Ta,ro,hi,ra,ks,ua,Ps,xs;const[l,c]=L.useState(()=>{const Ye=localStorage.getItem("ncta_executive_analysis");return Ye?JSON.parse(Ye):null}),d=Array.isArray(e)?e:[],h=Array.isArray(t)?t:[],u=Array.isArray(r)?r:[],f=Array.isArray(a)?a:[],m=Array.isArray(s)?s:[],b=Array.isArray(i)?i:[],g=Array.isArray(o)?o:[],[y,x]=L.useState(!1),[w,j]=L.useState(()=>{const Ye=localStorage.getItem("ncta_executive_analysis_updated");return Ye?new Date(Ye):null}),[N,_]=L.useState(!1),[S,A]=L.useState([]),[T,R]=L.useState(""),[M,k]=L.useState(!1),{data:P=[]}=xt({queryKey:["peoplesChoiceVotes"],queryFn:()=>pe.entities.PeoplesChoiceVote.list("-created_date",1e3),initialData:[]}),{data:O=[]}=xt({queryKey:["peoplesChoiceConfig"],queryFn:()=>pe.entities.PeoplesChoiceConfig.list("-created_date",1),initialData:[]}),{data:F=null}=xt({queryKey:["nominationsWindow"],queryFn:async()=>(await pe.entities.NominationsWindow.list("-updated_date",1))[0]||null,initialData:null}),{data:$=[]}=xt({queryKey:["financeTransactions"],queryFn:()=>pe.entities.FinanceTransaction.list("-date",500),initialData:[]}),{data:G=[]}=xt({queryKey:["invoices"],queryFn:()=>pe.entities.Invoice.list("-issue_date",200),initialData:[]}),{data:B=[]}=xt({queryKey:["bills"],queryFn:()=>pe.entities.Bill.list("-issue_date",200),initialData:[]}),{data:Y=[]}=xt({queryKey:["budgets"],queryFn:()=>pe.entities.Budget.list("-created_date",50),initialData:[]}),{data:ee=[]}=xt({queryKey:["calendarEvents"],queryFn:()=>pe.entities.CalendarEvent.list("-start_datetime",200),initialData:[]}),{data:J=[]}=xt({queryKey:["tickets"],queryFn:()=>pe.entities.TicketSale.list("-created_date",500),initialData:[]}),{data:H=[]}=xt({queryKey:["contacts"],queryFn:()=>pe.entities.Contact.list("-created_date",500),initialData:[]}),{data:q=[]}=xt({queryKey:["riskRegister"],queryFn:()=>pe.entities.RiskRegister.list("-created_date",100),initialData:[]}),{data:K=[]}=xt({queryKey:["seoPages"],queryFn:()=>pe.entities.PageSEO.list("-updated_date",100),initialData:[]}),{data:te=[]}=xt({queryKey:["websiteContent"],queryFn:()=>pe.entities.WebsiteContent.list("-updated_date",100),initialData:[]}),{data:re=[]}=xt({queryKey:["importantInfo"],queryFn:()=>pe.entities.ImportantInformation.list("-updated_date",50),initialData:[]}),{data:Q=[]}=xt({queryKey:["sponsorProspects"],queryFn:()=>pe.entities.SponsorProspect.list("-created_date",100),initialData:[]}),ne=Array.isArray(Y)?Y.find(Ye=>Ye.is_active)||Y[0]:null,oe=async()=>{var Ye,nt,Vr,aa,Da;x(!0);try{const ur={tasks:{total:d.length,completed:d.filter(Ue=>Ue.status==="completed").length,in_progress:d.filter(Ue=>Ue.status==="in_progress").length,not_started:d.filter(Ue=>Ue.status==="not_started").length,on_hold:d.filter(Ue=>Ue.status==="on_hold").length,overdue:d.filter(Ue=>gc(new Date(Ue.due_date),Sy())&&Ue.status!=="completed").length,overdue_details:d.filter(Ue=>gc(new Date(Ue.due_date),Sy())&&Ue.status!=="completed").map(Ue=>({title:Ue.title,due_date:Ue.due_date,priority:Ue.priority,category:Ue.category,assigned_to:Ue.assigned_to,days_overdue:Math.floor((Sy().getTime()-new Date(Ue.due_date).getTime())/864e5)})),by_priority:{urgent:d.filter(Ue=>Ue.priority==="urgent"&&Ue.status!=="completed").length,high:d.filter(Ue=>Ue.priority==="high"&&Ue.status!=="completed").length},by_category:d.reduce((Ue,Wt)=>(Ue[Wt.category]=(Ue[Wt.category]||0)+1,Ue),{})},nominations:{total:h.length,by_status:{submitted:h.filter(Ue=>Ue.status==="submitted").length,under_review:h.filter(Ue=>Ue.status==="under_review").length,shortlisted:h.filter(Ue=>Ue.status==="shortlisted").length,finalist:h.filter(Ue=>Ue.status==="finalist").length,winner:h.filter(Ue=>Ue.status==="winner").length,declined:h.filter(Ue=>Ue.status==="declined").length},by_category:h.reduce((Ue,Wt)=>(Ue[Wt.category]=(Ue[Wt.category]||0)+1,Ue),{}),avg_quality_score:h.filter(Ue=>Ue.quality_score).length>0?(h.filter(Ue=>Ue.quality_score).reduce((Ue,Wt)=>Ue+Wt.quality_score,0)/h.filter(Ue=>Ue.quality_score).length).toFixed(1):null,high_quality:h.filter(Ue=>Ue.quality_score>=85).length},tickets_and_tables:{total_tables:25,booked_tables:u.length,total_seats_allocated:u.reduce((Ue,Wt)=>{var Fa;const ys=((Fa=Wt.seats_detail)==null?void 0:Fa.filter(mi=>mi.guest_name&&mi.guest_name.trim()!=="").length)||0;return Ue+ys},0),total_capacity:250,revenue_confirmed:u.reduce((Ue,Wt)=>Ue+(Wt.amount_paid||0),0),paid_bookings:u.filter(Ue=>Ue.status==="paid").length,pending_payment:u.filter(Ue=>Ue.status==="reserved"||Ue.status==="confirmed").length},sponsors:{total:f.length,active:f.filter(Ue=>Ue.is_active).length,by_tier:f.reduce((Ue,Wt)=>(Ue[Wt.tier]=(Ue[Wt.tier]||0)+1,Ue),{}),categories_sponsored:f.reduce((Ue,Wt)=>{var ys;return Ue+(((ys=Wt.sponsored_categories)==null?void 0:ys.length)||0)},0),categories_available:m.length},peopleschoice:{total_votes:(P==null?void 0:P.length)||0,valid_votes:(P==null?void 0:P.filter(Ue=>Ue.is_valid).length)||0,voting_open:((Ye=O[0])==null?void 0:Ye.is_public)||
1185!1,voting_start:(nt=O[0])==null?void 0:nt.voting_start,voting_end:(Vr=O[0])==null?void 0:Vr.voting_end},content:{total_articles:g.length,published:g.filter(Ue=>Ue.is_published).length,draft:g.filter(Ue=>!Ue.is_published).length,featured:g.filter(Ue=>Ue.is_featured).length},communications:{total_posts:b.length,posted:b.filter(Ue=>Ue.status==="posted").length,scheduled:b.filter(Ue=>Ue.status==="scheduled").length,draft:b.filter(Ue=>Ue.status==="draft").length},current_date:yt(new Date,"yyyy-MM-dd"),calendar:{total_events:(ee==null?void 0:ee.length)||0,upcoming_events:(ee==null?void 0:ee.filter(Ue=>new Date(Ue.start_datetime)>new Date).length)||0,overdue_events:(ee==null?void 0:ee.filter(Ue=>new Date(Ue.end_datetime)<new Date&&!Ue.completed).length)||0,by_type:(ee==null?void 0:ee.reduce((Ue,Wt)=>(Ue[Wt.event_type]=(Ue[Wt.event_type]||0)+1,Ue),{}))||{}},tickets:{total_sold:(J==null?void 0:J.length)||0,total_revenue:(J==null?void 0:J.reduce((Ue,Wt)=>Ue+(Wt.amount_paid||0),0))||0,by_type:(J==null?void 0:J.reduce((Ue,Wt)=>(Ue[Wt.ticket_type]=(Ue[Wt.ticket_type]||0)+1,Ue),{}))||{},payment_status:(J==null?void 0:J.reduce((Ue,Wt)=>(Ue[Wt.payment_status]=(Ue[Wt.payment_status]||0)+1,Ue),{}))||{}},contacts:{total:(H==null?void 0:H.length)||0,by_type:(H==null?void 0:H.reduce((Ue,Wt)=>(Ue[Wt.contact_type]=(Ue[Wt.contact_type]||0)+1,Ue),{}))||{},vip_contacts:(H==null?void 0:H.filter(Ue=>Ue.is_vip).length)||0},risk_and_compliance:{total_risks:(q==null?void 0:q.length)||0,by_severity:(q==null?void 0:q.reduce((Ue,Wt)=>(Ue[Wt.severity]=(Ue[Wt.severity]||0)+1,Ue),{}))||{},by_status:(q==null?void 0:q.reduce((Ue,Wt)=>(Ue[Wt.status]=(Ue[Wt.status]||0)+1,Ue),{}))||{},high_severity_open:(q==null?void 0:q.filter(Ue=>Ue.severity==="high"&&Ue.status==="open").length)||0},seo:{total_pages:(K==null?void 0:K.length)||0,avg_seo_score:(K==null?void 0:K.filter(Ue=>Ue.seo_score).length)>0?(K.filter(Ue=>Ue.seo_score).reduce((Ue,Wt)=>Ue+Wt.seo_score,0)/K.filter(Ue=>Ue.seo_score).length).toFixed(1):null,pages_needing_improvement:(K==null?void 0:K.filter(Ue=>Ue.seo_score&&Ue.seo_score<70).length)||0,active_pages:(K==null?void 0:K.filter(Ue=>Ue.is_active).length)||0},website_content:{total_sections:(te==null?void 0:te.length)||0,published:(te==null?void 0:te.filter(Ue=>Ue.is_published).length)||0,draft:(te==null?void 0:te.filter(Ue=>!Ue.is_published).length)||0},important_information:{total_notices:(re==null?void 0:re.length)||0,active:(re==null?void 0:re.filter(Ue=>Ue.is_active).length)||0},sponsor_prospects:{total:(Q==null?void 0:Q.length)||0,by_status:(Q==null?void 0:Q.reduce((Ue,Wt)=>(Ue[Wt.status]=(Ue[Wt.status]||0)+1,Ue),{}))||{},hot_prospects:(Q==null?void 0:Q.filter(Ue=>Ue.priority==="hot").length)||0},nominations_window:F?{status:F.status,opens_at:F.opensAt,closes_at:F.closesAt,capacity_enabled:F.finalistCapacityEnabled,capacity_limit:F.finalistCapacityLimit,capacity_filled:F.finalistSlotsFilled,closure_reason:F.closureReason}:null,finance:{total_income:($==null?void 0:$.filter(Ue=>Ue.transaction_type==="Income"&&Ue.status==="Paid").reduce((Ue,Wt)=>Ue+(Wt.gross_amount||0),0))||0,total_expenses:($==null?void 0:$.filter(Ue=>Ue.transaction_type==="Expense"&&Ue.status==="Paid").reduce((Ue,Wt)=>Ue+(Wt.gross_amount||0),0))||0,outstanding_invoices_value:(G==null?void 0:G.filter(Ue=>Ue.status!=="Paid"&&Ue.status!=="Cancelled").reduce((Ue,Wt)=>Ue+(Wt.total-(Wt.amount_paid||0)),0))||0,outstanding_bills_value:(B==null?void 0:B.filter(Ue=>Ue.status!=="Paid"&&Ue.status!=="Cancelled").reduce((Ue,Wt)=>Ue+(Wt.total-(Wt.amount_paid||0)),0))||0,overdue_invoices_count:(G==null?void 0:G.filter(Ue=>Ue.status!=="Paid"&&Ue.status!=="Cancelled"&&gc(new Date(Ue.due_date),new Date)).length)||0,overdue_bills_count:(B==null?void 0:B.filter(Ue=>Ue.status!=="Paid"&&Ue.status!=="Cancelled"&&gc(new Date(Ue.due_date),new Date)).length)||0,invoices_total:(G==null?void 0:G.length)||0,bills_total:(B==null?void 0:B.length)||0,paid_invoices:(G==null?void 0:G.filter(Ue=>Ue.status==="Paid").length)||0,paid_bills:(B==null?void 0:B.filter(Ue=>Ue.status==="Paid").length)||0,budget:ne?{name:ne.name,total_budget:((aa=ne.lines)==null?void 0:aa.reduce((Ue,Wt)=>Ue+(Wt.planned_amount||0),0))||0,budget_lines_count:((Da=ne.lines)==null?void 0:Da.length)||0}:null}},fi=await pe.integrations.Core.InvokeLLM({prompt:`You are the Executive Director overseeing the National Charity Today Awards™. You have combined responsibility for finance and operations. Your role is to provide clear, directive guidance on performance, risks, priorities and next steps.
1186
1187CURRENT DATA SNAPSHOT:
1188${JSON.stringify(ur,null,2)}
1189
1190CONTEXT:
1191- Event capacity: 250 seats across 25 tables
1192- Target: Premium national charity awards programme
1193- Scale ambition: Multi-million pound event
1194- Current date: ${yt(new Date,"d MMMM yyyy")}
1195
1196ANALYSIS REQUIRED:
1197
11981. OVERALL HEALTH
1199Provide a single sentence assessment. Assign status: GREEN (on track), AMBER (caution needed), or RED (significant risk).
1200
12012. DELIVERY AND DEADLINES
1202⚠️ CRITICAL - OVERDUE TASKS: ${ur.tasks.overdue}
1203${ur.tasks.overdue>0?`
1204YOU MUST INCLUDE ALL ${ur.tasks.overdue} OVERDUE TASKS IN YOUR overdue_items ARRAY.
1205Each overdue task MUST be listed with format: "[TASK NAME] - [DAYS] days overdue (Priority: [PRIORITY], Assigned: [ASSIGNED_TO])"
1206
1207OVERDUE TASK DETAILS YOU MUST INCLUDE:
1208${JSON.stringify(ur.tasks.overdue_details,null,2)}
1209
1210MANDATORY: The overdue_items array MUST contain exactly ${ur.tasks.overdue} items. Do NOT return an empty array when overdue tasks exist.
1211`:"No overdue tasks currently."}
1212
1213List critical upcoming deadlines (next 14 days). Assess timeline risk based on overdue count, priority levels, and category distribution.
1214
12153. REVENUE PERFORMANCE
1216IMPORTANT: Use actual finance data from dataSnapshot.finance:
1217- Total income confirmed: £{dataSnapshot.finance.total_income}
1218- Total expenses confirmed: £{dataSnapshot.finance.total_expenses}
1219- Net profit/loss: Calculate from actual data
1220- Outstanding invoices: £{dataSnapshot.finance.outstanding_invoices_value} ({dataSnapshot.finance.overdue_invoices_count} overdue)
1221- Outstanding bills: £{dataSnapshot.finance.outstanding_bills_value} ({dataSnapshot.finance.overdue_bills_count} overdue)
1222- Ticket revenue vs £125,000 target
1223- Sponsor revenue assessment
1224- Payment risk based on overdue items
1225
12264. COST AND MARGIN AWARENESS
1227Use actual expense data: £{dataSnapshot.finance.total_expenses} spent
1228Calculate profit margin from real numbers
1229${ur.finance.budget?`Budget reference: ${ur.finance.budget.name} with total planned spend of £${ur.finance.budget.total_budget} across ${ur.finance.budget.budget_lines_count} categories`:"No active budget configured"}
1230Flag if insufficient expense tracking
1231Identify cost categories at risk
1232If budget exists, mention budget adherence status
1233
12345. OPERATIONAL PRESSURE POINTS
1235Identify bottlenecks, overloaded areas, unresolved dependencies.
1236
12376. CALENDAR AND EVENTS
1238Analyze upcoming events, deadlines, and event preparedness. Flag scheduling conflicts or gaps.
1239
12407. TICKETING PERFORMANCE
1241Assess ticket sales velocity, revenue from tickets vs tables, payment status distribution.
1242
12438. CONTACTS AND STAKEHOLDERS
1244Evaluate contact database health, VIP management, and stakeholder engagement.
1245
12469. RISK AND COMPLIANCE
1247Review open risks by severity, compliance status, and mitigation actions needed.
1248
124910. SEO AND DIGITAL PRESENCE
1250Assess website SEO health, page optimization scores, and digital visibility improvements needed.
1251
125211. WEBSITE CONTENT MANAGEMENT
1253Evaluate content freshness, published vs draft ratio, and content gaps.
1254
125512. SPONSOR PROSPECTS PIPELINE
1256Analyze prospect pipeline health, conversion status, hot leads requiring action.
1257
125813. NOMINATIONS PIPELINE QUALITY
1259Assess volume, quality distribution, category balance, judging readiness. Flag risk of weak shortlists.
1260
126114. SPONSOR VALUE DELIVERY
1262Assess if sponsors are getting value. Flag outstanding obligations or dissatisfaction risk.
1263
126415. PEOPLE'S CHOICE PERFORMANCE
1265Evaluate engagement trend, voting velocity, any reputation risks.
1266
126716. MARKETING & COMMUNICATIONS EFFECTIVENESS
1268Assess content cadence, social media performance, news coverage, identify gaps and missed opportunities.
1269
127017. NOMINATIONS WINDOW ANALYSIS
1271Evaluate nominations window status. If finalistCapacityEnabled is true, analyze:
1272- Daily nomination velocity (nominations per day)
1273- Days remaining until scheduled close
1274- Finalist slots remaining
1275- Predicted date when capacity will be reached
1276- Risk level of early closure (LOW, MEDIUM, HIGH)
1277- Recommended actions if early closure is predicted
1278Provide specific numerical predictions. If early closure is likely (>70% probability), state the estimated date clearly.
1279
128018. WHAT YOU SHOULD FOCUS ON NEXT
1281- Top 3 priorities for next 7 days
1282- Top 3 priorities for next 30 days
1283- Actions to unlock revenue
1284- Actions to reduce risk
1285- Actions to improve delivery confidence
1286
128719. DECISION POINTS
1288Flag any critical decisions needed with trade-offs, financial impact, and reputational impact.
1289
1290TONE: Professional, direct, calm, honest. No hype. Be specific and practical.
1291
1292OUTPUT FORMAT: Provide structured analysis with clear headers and bullet points. Use numbers and specifics. If data is missing, state it clearly.`,response_json_schema:{type:"object",properties:{overall_health:{type:"object",properties:{status:{type:"string",enum:["GREEN","AMBER","RED"]},summary:{type:"string"}}},delivery_and_deadlines:{type:"object",properties:{critical_deadlines:{type:"array",items:{type:"string"}},overdue_items:{type:"array",items:{type:"string"}},timeline_risk:{type:"string"}}},revenue_performance:{type:"object",properties:{total_income_confirmed:{type:"number"},total_expenses_confirmed:{type:"number"},net_profit:{type:"number"},profit_margin_percentage:{type:"number"},ticket_revenue_confirmed:{type:"number"},ticket_revenue_target:{type:"number"},ticket_revenue_percentage:{type:"number"},sponsor_revenue_assessment:{type:"string"},outstanding_receivables:{type:"number"},outstanding_payables:{type:"number"},overdue_invoice_risk:{type:"string"},overdue_bill_pressure:{type:"string"},payment_risk:{type:"string"},revenue_forecast:{type:"string"}}},cost_and_margin:{type:"object",properties:{estimated_costs:{type:"string"},margin_status:{type:"string"},budget_adherence:{type:"string"},cost_risks:{type:"array",items:{type:"string"}}}},operational_pressure:{type:"array",items:{type:"string"}},calendar_and_events:{type:"object",properties:{upcoming_events_summary:{type:"string"},critical_deadlines:{type:"array",items:{type:"string"}},event_preparedness:{type:"string"},scheduling_risks:{type:"array",items:{type:"string"}}}},ticketing_performance:{type:"object",properties:{sales_velocity:{type:"string"},revenue_breakdown:{type:"string"},payment_status_summary:{type:"string"},ticketing_risks:{type:"array",items:{type:"string"}}}},contacts_stakeholders:{type:"object",properties:{database_health:{type:"string"},vip_management:{type:"string"},engagement_assessment:{type:"string"}}},risk_and_compliance:{type:"object",properties:{open_risks_summary:{type:"string"},high_priority_risks:{type:"array",items:{type:"string"}},compliance_status:{type:"string"},mitigation_actions:{type:"array",items:{type:"string"}}}},seo_digital_presence:{type:"object",properties:{seo_health_summary:{type:"string"},optimization_priorities:{type:"array",items:{type:"string"}},visibility_assessment:{type:"string"}}},website_content:{type:"object",properties:{content_freshness:{type:"string"},publishing_cadence:{type:"string"},content_gaps:{type:"array",items:{type:"string"}}}},sponsor_prospects:{type:"object",properties:{pipeline_health:{type:"string"},hot_leads_requiring_action:{type:"array",items:{type:"string"}},conversion_assessment:{type:"string"}}},nominations_quality:{type:"object",properties:{volume_assessment:{type:"string"}
1292,quality_assessment:{type:"string"},category_balance:{type:"string"},judging_readiness:{type:"string"}}},sponsor_value:{type:"object",properties:{value_delivery_status:{type:"string"},risks:{type:"array",items:{type:"string"}}}},peopleschoice_performance:{type:"object",properties:{engagement_trend:{type:"string"},voting_velocity:{type:"string"},risks:{type:"array",items:{type:"string"}}}},marketing_communications:{type:"object",properties:{content_cadence:{type:"string"},social_media_performance:{type:"string"},news_coverage_assessment:{type:"string"},gaps_and_opportunities:{type:"array",items:{type:"string"}}}},nominations_window_analysis:{type:"object",properties:{window_status:{type:"string"},capacity_tracking:{type:"string"},daily_velocity:{type:"string"},predicted_capacity_date:{type:"string"},early_closure_risk:{type:"string",enum:["NONE","LOW","MEDIUM","HIGH"]},risk_explanation:{type:"string"},recommendations:{type:"array",items:{type:"string"}}}},next_7_days:{type:"array",items:{type:"string"}},next_30_days:{type:"array",items:{type:"string"}},revenue_actions:{type:"array",items:{type:"string"}},risk_actions:{type:"array",items:{type:"string"}},delivery_actions:{type:"array",items:{type:"string"}},decision_points:{type:"array",items:{type:"object",properties:{decision:{type:"string"},tradeoffs:{type:"string"},financial_impact:{type:"string"},reputational_impact:{type:"string"}}}}}}}),$n=new Date;c(fi),j($n),localStorage.setItem("ncta_executive_analysis",JSON.stringify(fi)),localStorage.setItem("ncta_executive_analysis_updated",$n.toISOString())}catch(ur){console.error("Error generating analysis:",ur),alert("Failed to generate executive analysis. Please try again.")}x(!1)},ae=async()=>{if(!T.trim()||!l)return;const Ye={role:"user",content:T};A(nt=>[...nt,Ye]),R(""),k(!0);try{const nt={analysis:l,tasks:d,nominations:h,tableBookings:u,sponsors:f,categories:m,current_date:yt(new Date,"d MMMM yyyy")},Vr=await pe.integrations.Core.InvokeLLM({prompt:`You are the Executive Director's AI advisor for the National Charity Today Awards™.
1293
1294CRITICAL RULES:
1295- ONLY use the exact data provided below. Do NOT infer, assume, or make up information.
1296- If data is not provided, state "Information not available" rather than guessing.
1297- Be factual and specific. No generalizations or assumptions.
1298- Only reference actual numbers, dates, and facts from the data.
1299
1300ACTUAL DATA AVAILABLE:
1301${JSON.stringify(nt,null,2)}
1302
1303USER QUESTION: ${T}
1304
1305Answer based ONLY on the data above. Format as structured JSON:
1306{
1307  "summary": "1-2 sentence answer based on actual data",
1308  "sections": [
1309    {
1310      "title": "Section Title",
1311      "items": ["fact 1", "fact 2"]
1312    }
1313  ],
1314  "action_items": ["Actionable item 1"],
1315  "timeline": "Timeframe if relevant"
1316}`,response_json_schema:{type:"object",properties:{summary:{type:"string"},sections:{type:"array",items:{type:"object",properties:{title:{type:"string"},items:{type:"array",items:{type:"string"}}}}},action_items:{type:"array",items:{type:"string"}},timeline:{type:"string"}}}});A(aa=>[...aa,{role:"assistant",content:Vr,formatted:!0}
1316])}catch(nt){console.error("Error asking question:",nt),A(Vr=>[...Vr,{role:"assistant",content:"Sorry, I encountered an error. Please try again.",formatted:!1}])}k(!1)},le=()=>{var $n,Ue,Wt,ys,Fa,mi,Il,ao,vs,ol,es;if(!l)return;const Ye=new An;let nt=20;Ye.setFontSize(18),Ye.setFont(void 0,"bold"),Ye.text("NATIONAL CHARITY TODAY AWARDS™",105,nt,{align:"center"}),nt+=8,Ye.setFontSize(14),Ye.text("EXECUTIVE OVERVIEW",105,nt,{align:"center"}),nt+=6,Ye.setFontSize(9),Ye.setFont(void 0,"normal"),Ye.text(`Generated: ${yt(new Date,"d MMMM yyyy HH:mm")}`,105,nt,{align:"center"}),nt+=15,Ye.setFontSize(12),Ye.setFont(void 0,"bold"),Ye.text(`OVERALL HEALTH: ${(($n=l.overall_health)==null?void 0:$n.status)||"N/A"}`,20,nt),nt+=8,Ye.setFontSize(10),Ye.setFont(void 0,"normal");const Vr=Ye.splitTextToSize(((Ue=l.overall_health)==null?void 0:Ue.summary)||"No summary available",170);Ye.text(Vr,20,nt),nt+=Vr.length*5+10,nt>250&&(Ye.addPage(),nt=20),Ye.setFontSize(12),Ye.setFont(void 0,"bold"),Ye.text("DELIVERY AND DEADLINES",20,nt),nt+=8,Ye.setFontSize(10),Ye.setFont(void 0,"normal"),Ye.text("Critical Deadlines (Next 14 Days):",20,nt),nt+=6,(((Wt=l.delivery_and_deadlines)==null?void 0:Wt.critical_deadlines)||[]).forEach(Qn=>{nt>270&&(Ye.addPage(),nt=20);const Yr=Ye.splitTextToSize(`• ${Qn}`,165);Ye.text(Yr,25,nt),nt+=Yr.length*5}),nt+=5,(((ys=l.delivery_and_deadlines)==null?void 0:ys.overdue_items)||[]).length>0&&(nt>260&&(Ye.addPage(),nt=20),Ye.text("Overdue Items:",20,nt),nt+=6,l.delivery_and_deadlines.overdue_items.forEach(Qn=>{nt>270&&(Ye.addPage(),nt=20);const Yr=Ye.splitTextToSize(`• ${Qn}`,165);Ye.text(Yr,25,nt),nt+=Yr.length*5}),nt+=5),nt>250&&(Ye.addPage(),nt=20);const aa=Ye.splitTextToSize(`Timeline Risk: ${((Fa=l.delivery_and_deadlines)==null?void 0:Fa.timeline_risk)||"N/A"}`,170);Ye.text(aa,20,nt),nt+=aa.length*5+10,nt>230&&(Ye.addPage(),nt=20),Ye.setFontSize(12),Ye.setFont(void 0,"bold"),Ye.text("REVENUE PERFORMANCE",20,nt),nt+=8,Ye.setFontSize(10),Ye.setFont(void 0,"normal"),Ye.text(`Ticket Revenue: £${(((mi=l.revenue_performance)==null?void 0:mi.ticket_revenue_confirmed)||0).toLocaleString()} / £${(((Il=l.revenue_performance)==null?void 0:Il.ticket_revenue_target)||0).toLocaleString()} (${((ao=l.revenue_performance)==null?void 0:ao.ticket_revenue_percentage)||0}%)`,20,nt),nt+=6;const Da=Ye.splitTextToSize(`Sponsor Revenue: ${((vs=l.revenue_performance)==null?void 0:vs.sponsor_revenue_assessment)||"N/A"}`,170);Ye.text(Da,20,nt),nt+=Da.length*5+2;const ur=Ye.splitTextToSize(`Payment Risk: ${((ol=l.revenue_performance)==null?void 0:ol.payment_risk)||"N/A"}`,170);Ye.text(ur,20,nt),nt+=ur.length*5+2;const fi=Ye.splitTextToSize(`Forecast: ${((es=l.revenue_performance)==null?void 0:es.revenue_forecast)||"N/A"}`,170);Ye.text(fi,20,nt),nt+=fi.length*5+10,nt>200&&(Ye.addPage(),nt=20),Ye.setFontSize(12),Ye.setFont(void 0,"bold"),Ye.text("WHAT YOU SHOULD FOCUS ON NEXT",20,nt),nt+=8,Ye.setFontSize(10),Ye.setFont(void 0,"bold"),Ye.text("Next 7 Days:",20,nt),nt+=6,Ye.setFont(void 0,"normal"),(l.next_7_days||[]).forEach((Qn,Yr)=>{nt>270&&(Ye.addPage(),nt=20);const So=Ye.splitTextToSize(`${Yr+1}. ${Qn}`,165);Ye.text(So,25,nt),nt+=So.length*5}),nt+=5,nt>200&&(Ye.addPage(),nt=20),Ye.setFont(void 0,"bold"),Ye.text("Next 30 Days:",20,nt),nt+=6,Ye.setFont(void 0,"normal"),(l.next_30_days||[]).forEach((Qn,Yr)=>{nt>270&&(Ye.addPage(),nt=20);const So=Ye.splitTextToSize(`${Yr+1}. ${Qn}`,165);Ye.text(So,25,nt),nt+=So.length*5}),nt+=8,nt>230&&(Ye.addPage(),nt=20),Ye.setFont(void 0,"bold"),Ye.text("Actions to Unlock Revenue:",20,nt),nt+=6,Ye.setFont(void 0,"normal"),(l.revenue_actions||[]).forEach(Qn=>{nt>270&&(Ye.addPage(),nt=20);const Yr=Ye.splitTextToSize(`• ${Qn}`,165);Ye.text(Yr,25,nt),nt+=Yr.length*5}),nt+=5,nt>230&&(Ye.addPage(),nt=20),Ye.setFont(void 0,"bold"),Ye.text("Actions to Reduce Risk:",20,nt),nt+=6,Ye.setFont(void 0,"normal"),(l.risk_actions||[]).forEach(Qn=>{nt>270&&(Ye.addPage(),nt=20);const Yr=Ye.splitTextToSize(`• ${Qn}`,165);Ye.text(Yr,25,nt),nt+=Yr.length*5}),nt+=5,nt>230&&(Ye.addPage(),nt=20),Ye.setFont(void 0,"bold"),Ye.text("Actions to Improve Delivery:",20,nt),nt+=6,Ye.setFont(void 0,"normal"),(l.delivery_actions||[]).forEac
1316h(Qn=>{nt>270&&(Ye.addPage(),nt=20);const Yr=Ye.splitTextToSize(`• ${Qn}`,165);Ye.text(Yr,25,nt),nt+=Yr.length*5}),Ye.save(`NCTA_Executive_Overview_${yt(new Date,"yyyy-MM-dd_HHmm")}.pdf`)};if(!l&&!y)return n.jsx("div",{className:"text-center py-20",children:n.jsxs(me,{onClick:oe,className:"bg-primary-navy hover:opacity-90 text-white font-semibold",size:"lg",children:[n.jsx(ka,{className:"w-5 h-5 mr-2"}),"Generate Executive Analysis"]})});if(y)return n.jsxs("div",{className:"text-center py-20",children:[n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-primary-navy border-t-transparent mx-auto mb-6"}),n.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Analyzing Awards Performance"}),n.jsx("p",{className:"text-gray-600",children:"Evaluating tasks, revenue, nominations, operations and strategic position..."})]});const je={GREEN:{bg:"bg-green-500",text:"text-green-700",icon:Cn},AMBER:{bg:"bg-amber-500",text:"text-amber-700",icon:Mr},RED:{bg:"bg-red-500",text:"text-red-700",icon:eo}},xe=je[(he=l==null?void 0:l.overall_health)==null?void 0:he.status]||je.AMBER,Fe=xe.icon;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(ka,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"AI Executive Overview"}),n.jsx("p",{className:"text-lg text-gray-600",children:w?`Strategic insights powered by AI • Last updated: ${yt(w,"d MMMM yyyy, HH:mm")}`:"Strategic insights powered by AI"})]})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs(me,{onClick:()=>_(!N),variant:"outline",className:"border-2 border-purple-500 text-purple-700 hover:bg-purple-50 font-semibold",children:[n.jsx($h,{className:"w-4 h-4 mr-2"}),"Ask Executive AI"]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(me,{onClick:le,variant:"outline",className:"border-2 border-primary-navy text-primary-navy font-semibold",children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Download Report"]}),n.jsxs(me,{onClick:oe,disabled:y,className:"bg-primary-navy hover:opacity-90 text-white font-semibold",children:[n.jsx(Gy,{className:`w-4 h-4 mr-2 ${y?"animate-spin":""}`}),"Refresh Analysis"]})]})]}),N&&n.jsxs(lt.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"border-2 border-purple-200 rounded-xl bg-purple-50 p-6",children:[n.jsxs("div",{className:"max-h-96 overflow-y-auto mb-4 space-y-3",children:[S.length===0?n.jsx("p",{className:"text-gray-500 text-sm text-center py-4",children:"Ask questions about your awards performance, strategy, or any aspect of the program."}):S.map((Ye,nt)=>n.jsx("div",{className:`flex ${Ye.role==="user"?"justify-end":"justify-start"}`,children:Ye.role==="user"?n.jsx("div",{className:"bg-primary-navy text-white rounded-lg rounded-br-none px-4 py-2 max-w-xs",children:n.jsx("p",{className:"text-sm",children:Ye.content})}):Ye.formatted?n.jsxs("div",{className:"bg-white text-gray-900 border border-purple-200 rounded-lg rounded-bl-none p-4 max-w-md space-y-3",children:[n.jsx("p",{className:"text-sm font-semibold text-primary-navy",children:Ye.content.summary}),Array.isArray(Ye.content.sections)&&Ye.content.sections.map((Vr,aa)=>n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-bold text-gray-700 mb-1",children:Vr.title}),n.jsx("ul",{className:"space-y-1 ml-3",children:Array.isArray(Vr.items)&&Vr.items.map((Da,ur)=>n.jsxs("li",{className:"text-xs text-gray-600",children:["• ",Da]},ur))})]},aa)),Array.isArray(Ye.content.action_items)&&Ye.content.action_items.length>0&&n.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[n.jsx("p",{className:"text-xs font-bold text-green-700 mb-1",children:"Action Items"}),n.jsx("ul",{className:"space-y-1 ml-3",children:Ye.content.action_items.map((Vr,aa)=>n.jsxs("li",{className:"text-xs text-green-600",children:["→ ",Vr]},aa))})]}),Ye.content.timeline&&n.jsxs("div",{className:"text-xs text-gray-600 pt-2 border-t border-gray-200",children:[n.jsx("span",{className:"font-semibold",children:"Timeline:"})," ",Ye.content.timeline]})]}):n.jsx("div",{className:"bg-white text-gray-900 border border-purple-200 rounded-lg rounded-bl-none px-4 py-2 max-w-xs",children:n.jsx("p",{className:"text-sm",children:Ye.content})})},nt)),M&&n.jsx("div",{className:"flex justify-start",children:n.jsxs("div",{className:"bg-white text-gray-900 border border-purple-200 px-4 py-2 rounded-lg rounded-bl-none flex items-center gap-2",children:[n.jsx(oJ,{className:"w-4 h-4 animate-spin"}),n.jsx("p",{className:"text-sm",children:"Thinking..."})]})})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Me,{placeholder:"Ask anything about your awards program...",value:T,onChange:Ye=>R(Ye.target.value),onKeyPress:Ye=>Ye.key==="Enter"&&!M&&ae(),disabled:M,className:"bg-white"}),n.jsx(me,{onClick:ae,disabled:M||!T.trim(),className:"bg-primary-navy hover:opacity-90 text-white",children:n.jsx($q,{className:"w-4 h-4"})})]})]}),n.jsx(lt.div,{initial:{opacity:0,y:20}
1316,animate:{opacity:1,y:0},children:n.jsx(_e,{className:`border-l-8 border-${xe.bg.replace("bg-","")}`,children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex items-start gap-6",children:[n.jsx("div",{className:`w-20 h-20 ${xe.bg} rounded-2xl flex items-center justify-center flex-shrink-0`,children:n.jsx(Fe,{className:"w-10 h-10 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:"Overall Health"}),n.jsx(dt,{className:`${xe.bg} text-white text-lg px-4 py-1`,children:((Ne=l==null?void 0:l.overall_health)==null?void 0:Ne.status)||"N/A"})]}),n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed",children:((ue=l==null?void 0:l.overall_health)==null?void 0:ue.summary)||"No summary available"})]})]})})})}),n.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:[n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx(wC,{className:"w-8 h-8 text-green-600"}),n.jsx("h4",{className:"font-bold text-gray-700 text-sm",children:"Revenue"})]}),n.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:["£",(((rt=l==null?void 0:l.revenue_performance)==null?void 0:rt.ticket_revenue_confirmed)||0).toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[((Te=l==null?void 0:l.revenue_performance)==null?void 0:Te.ticket_revenue_percentage)||0,"% of target"]})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx(Jr,{className:"w-8 h-8 text-blue-600"}),n.jsx("h4",{className:"font-bold text-gray-700 text-sm",children:"Seats Sold"})]}),n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:u.reduce((Ye,nt)=>{var aa;const Vr=((aa=nt.seats_detail)==null?void 0:aa.filter(Da=>Da.guest_name&&Da.guest_name.trim()!=="").length)||0;return Ye+Vr},0)}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"of 250 capacity"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx(bn,{className:"w-8 h-8 text-purple-600"}),n.jsx("h4",{className:"font-bold text-gray-700 text-sm",children:"Nominations"})]}),n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:h.length}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:h.filter(Ye=>Ye.quality_score).length>0?`Avg quality: ${(h.filter(Ye=>Ye.quality_score).reduce((Ye,nt)=>Ye+nt.quality_score,0)/h.filter(Ye=>Ye.quality_score).length).toFixed(1)}/100`:"Quality scoring needed"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx(Tm,{className:"w-8 h-8 text-orange-600"}),n.jsx("h4",{className:"font-bold text-gray-700 text-sm",children:"Tasks"})]}),n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:d.filter(Ye=>gc(new Date(Ye.due_date),Sy())&&Ye.status!=="completed").length}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"overdue items"})]})})]}),n.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(za,{className:"w-5 h-5 text-accent-gold"}),"Delivery & Deadlines"]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-gray-900 mb-2",children:"Critical Deadlines (Next 14 Days)"}),(((Pe=l.delivery_and_deadlines)==null?void 0:Pe.critical_deadlines)||[]).length===0?n.jsx("p",{className:"text-gray-500 text-sm",children:"No critical deadlines identified"}):n.jsx("ul",{className:"space-y-2",children:Array.isArray(($e=l==null?void 0:l.delivery_and_deadlines)==null?void 0:$e.critical_deadlines)&&l.delivery_and_deadlines.critical_deadlines.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700 flex items-start gap-2",children:[n.jsx(Ci,{className:"w-4 h-4 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:Ye})]},nt))})]}),Array.isArray((Ve=l==null?void 0:l.delivery_and_deadlines)==null?void 0:Ve.overdue_items)&&l.delivery_and_deadlines.overdue_items.length>0&&n.jsxs("div",{className:"p-4 bg-red-50 border-l-4 border-red-500 rounded",children:[n.jsx("h4",{className:"font-semibold text-red-900 mb-2",children:"Overdue Items"}),n.jsx("ul",{className:"space-y-1",children:l.delivery_and_deadlines.overdue_items.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-red-700",children:["• ",Ye]},nt))})]}),n.jsx("div",{className:"pt-3 border-t",children:n.jsxs("p",{className:"text-sm text-gray-700 leading-relaxed",children:[n.jsx("span",{className:"font-semibold",children:"Timeline Risk:"})," ",((be=l.delivery_and_deadlines)==null?void 0:be.timeline_risk)||"Not available"]})})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(wC,{className:"w-5 h-5 text-green-600"}),"Revenue Performance"]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[n.jsxs("div",{className:"p-3 bg-green-50 rounded-lg border border-green-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Total Income"}),n.jsxs("div",{className:"text-xl font-bold text-green-900",children:["£",((Ze=(We=l==null?void 0:l.revenue_performance)==null?void 0:We.total_income_confirmed)==null?void 0:Ze.toLocaleStr
1316ing())||0]})]}),n.jsxs("div",{className:"p-3 bg-red-50 rounded-lg border border-red-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Total Expenses"}),n.jsxs("div",{className:"text-xl font-bold text-red-900",children:["£",((Mt=(st=l==null?void 0:l.revenue_performance)==null?void 0:st.total_expenses_confirmed)==null?void 0:Mt.toLocaleString())||0]})]})]}),n.jsxs("div",{className:`p-4 rounded-lg ${(((Ht=l==null?void 0:l.revenue_performance)==null?void 0:Ht.net_profit)||0)>=0?"bg-blue-50 border border-blue-200":"bg-orange-50 border border-orange-200"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold",children:"Net Profit"}),n.jsxs("span",{className:`text-2xl font-bold ${(((Yt=l==null?void 0:l.revenue_performance)==null?void 0:Yt.net_profit)||0)>=0?"text-blue-900":"text-orange-900"}`,children:["£",((It=(on=l==null?void 0:l.revenue_performance)==null?void 0:on.net_profit)==null?void 0:It.toLocaleString())||0]})]}),n.jsxs("p",{className:"text-xs text-gray-600",children:["Margin: ",((_t=l==null?void 0:l.revenue_performance)==null?void 0:_t.profit_margin_percentage)||0,"%"]})]}),n.jsxs("div",{className:"bg-green-50 rounded-lg p-4 border border-green-200",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-semibold text-green-900",children:"Ticket Revenue"}),n.jsxs("span",{className:"text-2xl font-bold text-green-700",children:[((xr=l==null?void 0:l.revenue_performance)==null?void 0:xr.ticket_revenue_percentage)||0,"%"]})]}),n.jsx("div",{className:"w-full bg-green-200 rounded-full h-3",children:n.jsx("div",{className:"bg-green-600 h-3 rounded-full transition-all",style:{width:`${Math.min(((xn=l==null?void 0:l.revenue_performance)==null?void 0:xn.ticket_revenue_percentage)||0,100)}%`}})}),n.jsxs("p",{className:"text-xs text-green-700 mt-2",children:["£",(((Rr=l==null?void 0:l.revenue_performance)==null?void 0:Rr.ticket_revenue_confirmed)||0).toLocaleString()," of £",(((Wn=l==null?void 0:l.revenue_performance)==null?void 0:Wn.ticket_revenue_target)||0).toLocaleString()," target"]})]}),n.jsxs("div",{children:[n.jsxs("p",{className:"text-sm text-gray-700 mb-2",children:[n.jsx("span",{className:"font-semibold",children:"Sponsor Revenue:"})," ",((lr=l==null?void 0:l.revenue_performance)==null?void 0:lr.sponsor_revenue_assessment)||"N/A"]}),(((Ha=l==null?void 0:l.revenue_performance)==null?void 0:Ha.outstanding_receivables)||0)>0&&n.jsxs("p",{className:"text-sm text-amber-700 mb-2",children:[n.jsx("span",{className:"font-semibold",children:"Outstanding Receivables:"})," £",(ta=(Rn=l==null?void 0:l.revenue_performance)==null?void 0:Rn.outstanding_receivables)==null?void 0:ta.toLocaleString()]}),(((fr=l==null?void 0:l.revenue_performance)==null?void 0:fr.outstanding_payables)||0)>0&&n.jsxs("p",{className:"text-sm text-orange-700 mb-2",children:[n.jsx("span",{className:"font-semibold",children:"Outstanding Payables:"})," £",(Ea=(na=l==null?void 0:l.revenue_performance)==null?void 0:na.outstanding_payables)==null?void 0:Ea.toLocaleString()]}),((Kn=l==null?void 0:l.revenue_performance)==null?void 0:Kn.overdue_invoice_risk)&&n.jsxs("p",{className:"text-sm text-red-700 mb-2",children:[n.jsx("span",{className:"font-semibold",children:"Overdue Invoice Risk:"})," ",l.revenue_performance.overdue_invoice_risk]}),n.jsxs("p",{className:"text-sm text-gray-700 mb-2",children:[n.jsx("span",{className:"font-semibold",children:"Payment Risk:"})," ",((St=l==null?void 0:l.revenue_performance)==null?void 0:St.payment_risk)||"N/A"]}),n.jsxs("p",{className:"text-sm text-gray-700",children:[n.jsx("span",{className:"font-semibold",children:"Forecast:"})," ",((hn=l==null?void 0:l.revenue_performance)==null?void 0:hn.revenue_forecast)||"N/A"]})]})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(Ju,{className:"w-5 h-5 text-orange-600"}),"Cost & Margin Awareness"]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("p",{className:"text-sm text-gray-700",children:[n.jsx("span",{className:"font-semibold",children:"Estimated Costs:"})," ",((yr=l==null?void 0:l.cost_and_margin)==null?void 0:yr.estimated_costs)||"N/A"]}),n.jsxs("p",{className:"text-sm text-gray-700",children:[n.jsx("span",{className:"font-semibold",children:"Margin Status:"})," ",((Gn=l==null?void 0:l.cost_and_margin)==null?void 0:Gn.margin_status)||"N/A"]}),((da=l==null?void 0:l.cost_and_margin)==null?void 0:da.budget_adherence)&&n.jsxs("p",{className:"text-sm text-gray-700",children:[n.jsx("span",{className:"font-semibold",children:"Budget Adherence:"})," ",l.cost_and_margin.budget_adherence]}),Array.isArray((cr=l==null?void 0:l.cost_and_margin)==null?void 0:cr.cost_risks)&&l.cost_and_margin.cost_risks.length>0&&n.jsxs("div",{className:"p-4 bg-orange-50 border-l-4 border-orange-500 rounded",children:[n.jsx("h4",{className:"font-semibold text-orange-900 mb-2 text-sm",children:"Cost Risks"}),n.jsx("ul",{className:"space-y-1",children:l.cost_and_margin.cost_risks.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-orange-700",children:["• ",Ye]},nt))})]})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(eo,{className:"w-5 h-5 text-red-600"}),"Operational Pressure Points"]})}),n.jsx(Ce,{children:((l==null?void 0:l.operational_pressure)||[]).length===0?n.jsx("p",{className:"text-gray-500 text-sm",children:"No significant pressure points identified"}):n.jsx("ul",{className:"space-y-2",children:((l==null?void 0:l.operational_pressure)||[]).map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700 flex items-start gap-2",children:[n.jsx(Mr,{className:"w-4 h-4 text-red-500 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:Ye})]},nt))})})]})]}),n.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy text-lg",children:[n.jsx(bn,{className:"w-5 h-5 text-purple-600"}),"Nominations Pipeline"]})}),n.jsxs(Ce,{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Volume Assessment"}),n.jsx("p",{className:"text-sm text-gray-700",children:((Dt=l==null?void 0:l.nominations_quality)==null?void 0:Dt.volume_assessment)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Quality Assessment"}),n.jsx("p",{className:"text-sm text-gray-700",children:((va=l==null?void 0:l.nominations_quality)==null?void 0:va.qual
1316ity_assessment)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Category Balance"}),n.jsx("p",{className:"text-sm text-gray-700",children:((ar=l==null?void 0:l.nominations_quality)==null?void 0:ar.category_balance)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Judging Readiness"}),n.jsx("p",{className:"text-sm text-gray-700",children:((dr=l==null?void 0:l.nominations_quality)==null?void 0:dr.judging_readiness)||"Not available"})]})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"flex items-center gap-2 text-primary-navy text-lg",children:"🤝 Sponsor Value Delivery"})}),n.jsxs(Ce,{className:"space-y-3",children:[n.jsx("p",{className:"text-sm text-gray-700",children:((jr=l==null?void 0:l.sponsor_value)==null?void 0:jr.value_delivery_status)||"Not available"}),Array.isArray((Yn=l==null?void 0:l.sponsor_value)==null?void 0:Yn.risks)&&l.sponsor_value.risks.length>0&&n.jsxs("div",{className:"pt-3 border-t",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Risks"}),n.jsx("ul",{className:"space-y-1",children:l.sponsor_value.risks.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700",children:["• ",Ye]},nt))})]})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"flex items-center gap-2 text-primary-navy text-lg",children:"🗳️ People's Choice"})}),n.jsxs(Ce,{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Engagement Trend"}),n.jsx("p",{className:"text-sm text-gray-700",children:((Ta=l==null?void 0:l.peopleschoice_performance)==null?void 0:Ta.engagement_trend)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Voting Velocity"}),n.jsx("p",{className:"text-sm text-gray-700",children:((ro=l==null?void 0:l.peopleschoice_performance)==null?void 0:ro.voting_velocity)||"Not available"})]}),Array.isArray((hi=l==null?void 0:l.peopleschoice_performance)==null?void 0:hi.risks)&&l.peopleschoice_performance.risks.length>0&&n.jsxs("div",{className:"pt-3 border-t",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Risks"}),n.jsx("ul",{className:"space-y-1",children:l.peopleschoice_performance.risks.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700",children:["• ",Ye]},nt))})]})]})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"flex items-center gap-2 text-primary-navy",children:"📝 Marketing & Communications"})}),n.jsxs(Ce,{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Content Cadence"}),n.jsx("p",{className:"text-sm text-gray-700",children:((ra=l==null?void 0:l.marketing_communications)==null?void 0:ra.content_cadence)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Social Media Performance"}),n.jsx("p",{className:"text-sm text-gray-700",children:((ks=l==null?void 0:l.marketing_communications)==null?void 0:ks.social_media_performance)||"Not available"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"News Coverage"}),n.jsx("p",{className:"text-sm text-gray-700",children:((ua=l==null?void 0:l.marketing_communications)==null?void 0:ua.news_coverage_assessment)||"Not available"})]}),Array.isArray((Ps=l==null?void 0:l.marketing_communications)==null?void 0:Ps.gaps_and_opportunities)&&l.marketing_communications.gaps_and_opportunities.length>0&&n.jsxs("div",{className:"pt-3 border-t",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Gaps & Opportunities"}),n.jsx("ul",{className:"space-y-1",children:l.marketing_communications.gaps_and_opportunities.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700",children:["• ",Ye]},nt))})]})]})]}),(l==null?void 0:l.nominations_window_analysis)&&l.nominations_window_analysis.recommendations&&n.jsxs(_e,{className:`border-none shadow-xl ${l.nominations_window_analysis.early_closure_risk==="HIGH"?"border-l-8 border-red-500":l.nominations_window_analysis.early_closure_risk==="MEDIUM"?"border-l-8 border-amber-500":"border-l-8 border-green-500"}`,children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(za,{className:"w-6 h-6 text-blue-600"}),"Nominations Window Analysis"]}),l.nominations_window_analysis.early_closure_risk!=="NONE"&&n.jsxs(dt,{className:`text-lg px-4 py-2 ${l.nominations_window_analysis.early_closure_risk==="HIGH"?"bg-red-500":l.nominations_window_analysis.early_closure_risk==="MEDIUM"?"bg-amber-500":"bg-blue-500"} text-white`,children:[l.nominations_window_analysis.early_closure_risk," RISK"]})]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Window Status"}),n.jsx("p",{className:"text-sm text-gray-700",children:l.nominations_window_analysis.window_status})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Capacity Tracking"}),n.jsx("p",{className:"text-sm text-gray-700",children:l.nominations_window_analysis.capacity_tracking})]})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Daily Velocity"}),n.jsx("p",{className:"text-sm text-gray-700",children:l.nominations_window_analysis.daily_velocity})]}),l.nominations_window_analysis.predicted_capacity_date&&n.jsxs("div",{className:`p-4 rounded-lg border-2 ${l.nominations_window_analysis.early_closure_risk==="HIGH"?"bg-red-50 border-red-300":l.nominations_window_analysis.early_closure_risk==="MEDIUM"?"bg-amber-50 border-amber-300":"bg-blue-50 border-blue-300"}`,children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Predicted Capacity Date"}),n.jsx("p",{className:"text-lg font-bold text-gray-900 mb-2",children:l.nominations_window_analysis.predicted_capacity_date}),n.jsx("p",{className:"text-sm text-gray-700",children:l.nominations_window_analysis.risk_explanation})]}),Array.isArray((xs=l==null?void 0:l.nominations_window_analysis)==null?void 0:xs.recommendations)&&l.nominations_window_analysis.recommendations.length>0&&n.jsxs("div",{className:"pt-4 border-t",children:[n.jsxs("p",{className:"text-sm font-semibold text-gray-900 mb-3 flex items-center gap-2",children:[n.jsx(eo,{className:"w-5 h-5 text-amber-600"}),"Recommended Actions"]}),n.jsx("ul",{className:"space-y-2",children:l.nominations_window_analysis.recommendations.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700 flex items-start gap-2",children:[n.jsx(Ci,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:Ye})]},nt))})]})]})]}),n.jsxs(_e,{className:"border-none shadow-xl bg-gradient-to-br from-blue-50 to-purple-50",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"text-2xl text-primary-navy",children:"What You Should Focus On Next"})}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-full flex items-center justify-center text-white font-bold text-sm",children:"7d"}),n.jsx("h4",{className:"font-bold text-gray-900",children:"Next 7 Days"})]}),n.jsx("ul",{className:"space-y-2 ml-10",children:Array.isArray(l==null?void 0:l.next_7_days)&&l.next_7_days.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700 font-medium flex items-start gap-2",children:[n.jsxs("span",{className:"text-blue-600 font-bold",children:[nt+1,"."]}),n.jsx("span",{children:Ye})]},nt))})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx("div",{className:"w-8 h-8 bg-purple-600 rounded-full flex items-center justify-center text-white font-bold text-sm",children:"30d"}),n.jsx("h4",{className:"font-bold text-gray-900",children:"Next 30 Days"})]}),n.jsx("ul",{className:"space-y-2 ml-10",children:Array.isArray(l==null?void 0:l.next_30_days)&&l.next_30_days.map((Ye,nt)=>n.jsxs("li",{className:"text-sm text-gray-700 font-medium flex items-start gap-2",children:[n.jsxs("span",{className:"text-purple-600 font-bold",children:[nt+1,"."]}),n.jsx("span",{children:Ye})]},nt))})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4 pt-4 border-t",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-green-700 mb-2 text-sm",children:"💰 Revenue Actions"}),n.jsx("ul",{className:"space-y-1",children:Array.isArray(l==null?void 0:l.revenue_actions)&&l.revenue_actions.map((Ye,nt)=>n.jsxs("li",{className:"text-xs text-gray-700",children:["• ",Ye]},nt))})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-red-700 mb-2 text-sm",children:"🛡️ Risk Actions"}),n.jsx("ul",{className:"space-y-1",children:Array.isArray(l==null?void 0:l.risk_actions)&&l.risk_actions.map((Ye,nt)=>n.jsxs("li",{className:"text-xs text-gray-700",children:["• ",Ye]},nt))})]}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-semibold text-blue-700 mb-2 text-sm",children:"✅ Delivery Actions"}),n.jsx("ul",{className:"space-y-1",children:Array.isArray(l==null?void 0:l.delivery_actions)&&l.delivery_actions.map((Ye,nt)=>n.jsxs("li",{className:"text-xs text-gray-700",children:["• ",Ye]},nt))})]})]})]})]}),Array.isArray(l==null?void 0:l.decision_points)&&l.decision_points.length>0&&n.jsxs(_e,{className:"border-none shadow-xl border-l-8 border-amber-500",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy text-xl",children:[n.jsx(eo,{className:"w-6 h-6 text-amber-600"}),"Critical Decision Points"]})}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-6",children:l.decision_points.map((Ye,nt)=>n.jsxs("div",{className:"p-6 bg-amber-50 border border-amber-200 rounded-lg",children:[n.jsx("h4",{className:"font-bold text-gray-900 text-lg mb-3",children:Ye.decision}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Trade-offs"}),n.jsx("p",{className:"text-sm text-gray-700",children:Ye.tradeoffs})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Financial Impact"}),n.jsx("p",{className:"text-sm text-gray-700",children:Ye.financial_impact})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Reputational Impact"}),n.jsx("p",{className:"text-sm text-gray-700",children:Ye.reputational_impact})]})]})]})]},nt))})})]})]})}function q3e({transactions:e=[],tableBookings:t=[],sponsors:r=[]}){const{data:a=[]}=xt({queryKey:["incomeCategories"],queryFn:()=>pe.entities.IncomeCategory.list("display_order",100)}),s=a.filter(x=>x.is_active),[i,o]=L.useState(!1),[l,c]=L.useState({source_type:"ManualEntry",date:new Date().toISOString().split("T")[0],description:"",net_amount:0,vat_amount:0,gross_amount:0,payment_method:"BankTransfer",counterparty_name:"",counterparty_email:"",reference:"",account_code:"",notes:""}),d=Sr(),h=Tt({mutationFn:x=>pe.entities.FinanceTransaction.create({...x,transaction_type:"Income",status:"Paid",currency:"GBP"}),onSuccess:()=>{d.invalidateQueries({queryKey:["financeTransactions"]}),o(!1),u()}}),u=()=>{var x;c({source_type:"ManualEntry",date:new Date().toISOString().split("T")[0],description:"",net_amount:0,vat_amount:0,gross_amount:0,payment_method:"BankTransfer",counterparty_name:"",counterparty_email:"",reference:"",account_code:((x=s[0])==null?void 0:x.code)||"",notes:""})},f=x=>{x.preventDefault(),h.mutate(l)},m=x=>{const w=parseFloat(x)||0,N=w*.2,_=w+N;c(S=>({...S,net_amount:w,vat_amount:N,gross_amount:_}))},b=e.filter(x=>x.transaction_type==="Income"),g=b.reduce((x,w)=>x+(w.gross_amount||0),0),y=t.reduce((x,w)=>x+(w.amount_paid||0),0);
1316return b.filter(x=>x.source_type==="Ticket"),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Income Management"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Track all revenue sources including tickets, sponsorships, and other income"})]}),n.jsxs(me,{onClick:()=>o(!0),className:"bg-green-600 hover:bg-green-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Income"]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsx(_e,{className:"border-2 border-blue-200 bg-gradient-to-br from-blue-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx(Om,{className:"w-6 h-6 text-blue-600"}),n.jsx("h3",{className:"font-semibold text-gray-700",children:"Ticket Revenue"})]}),n.jsxs("div",{className:"text-3xl font-bold text-blue-900",children:["£",y.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[t.length," table bookings"]})]})}),n.jsx(_e,{className:"border-2 border-purple-200 bg-gradient-to-br from-purple-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx(ms,{className:"w-6 h-6 text-purple-600"}),n.jsx("h3",{className:"font-semibold text-gray-700",children:"Sponsorship"})]}),n.jsxs("div",{className:"text-3xl font-bold text-purple-900",children:["£",b.filter(x=>x.source_type==="Sponsorship").reduce((x,w)=>x+(w.gross_amount||0),0).toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[r.filter(x=>x.is_active).length," active sponsors"]})]})}),n.jsx(_e,{className:"border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx(ka,{className:"w-6 h-6 text-green-600"}),n.jsx("h3",{className:"font-semibold text-gray-700",children:"Total Income"})]}),n.jsxs("div",{className:"text-3xl font-bold text-green-900",children:["£",g.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[b.length," transactions"]})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Income Transactions"})}),n.jsx(Ce,{children:b.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(ka,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No income transactions yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Source"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Counterparty"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Amount"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"})]})}),n.jsx("tbody",{children:b.sort((x,w)=>new Date(w.date)-new Date(x.date)).map((x,w)=>n.jsxs("tr",{className:`${w%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-green-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4 text-gray-900",children:yt(new Date(x.date),"d MMM yyyy")}),n.jsx("td",{className:"py-3 px-4 text-gray-900 font-medium",children:x.description}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",children:x.source_type})}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:x.counterparty_name||"-"}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-green-600",children:["£",x.gross_amount.toLocaleString()]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:x.status==="Paid"?"bg-green-500 text-white":x.status==="Pending"?"bg-amber-500 text-white":"bg-gray-500 text-white",children:x.status})})]},x.id))})]})})})]}),n.jsx(Nn,{open:i,onOpenChange:o,children:n.jsxs(vn,{className:"max-w-2xl",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:"Add Income"})}),n.jsxs("form",{onSubmit:f,className:"space-y-4",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Income Category *"}),n.jsxs(Qt,{value:l.account_code,onValueChange:x=>c({...l,account_code:x}),children:[n.jsx(Kt,{children:n.jsx(Xt,{placeholder:"Select category"})}),n.jsx(Gt,{children:s.length>0?s.map(x=>n.jsx(Ae,{value:x.code,children:x.label},x.id)):n.jsx(Ae,{value:null,disabled:!0,children:"No income categories available"})})]}),s.length===0&&n.jsx("p",{className:"text-xs text-amber-600 mt-1",children:"Please add income categories in Finance Settings first"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Date"}),n.jsx(Me,{type:"date",value:l.date,onChange:x=>c({...l,date:x.target.value}),required:!0})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Description *"}),n.jsx(Me,{value:l.description,onChange:x=>c({...l,description:x.target.value}),placeholder:"e.g., Sponsorship payment from XYZ Corp",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Source Type"}),n.jsxs(Qt,{value:l.source_type,onValueChange:x=>c({...l,source_type:x}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"ManualEntry",children:"Manual Entry"}),n.jsx(Ae,{value:"Sponsorship",children:"Sponsorship"}),n.jsx(Ae,{value:"Invoice",children:"From Invoice"})]})]})]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Net Amount (£) *"}),n.jsx(Me,{type:"number",step:"0.01",value:l.net_amount,onChange:x=>m(x.target.value),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"VAT (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:l.vat_amount.toFixed(2),readOnly:!0,className:"bg-gray-50"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Gross Total (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:l.gross_amount.toFixed(2),readOnly:!0,className:"bg-gray-50 font-bold"})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Counterparty Name"}),n.jsx(Me,{value:l.counterparty_name,onChange:x=>c({...l,counterparty_name:x.target.value}),placeholder:"Who paid this?"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Payment Method"}),n.jsxs(Qt,{value:l.payment_method,onValueChange:x=>c({...l,payment_method:x}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"BankTransfer",children:"Bank Transfer"}),n.jsx(Ae,{value:"Card",children:"Card Payment"}),n.jsx(Ae,{value:"Cash",children:"Cash"}),n.jsx(Ae,{value:"Other",children:"Other"})]})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Reference"}),n.jsx(Me,{value:l.reference,onChange:x=>c({...l,reference:x.target.value}),placeholder:"Payment reference or transaction ID"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes (Internal)"}),n.jsx(en,{value:l.notes,onChange:x=>c({...l,notes:x.target.value}),placeholder:"Additional information...",rows:3})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>o(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-bold",disabled:h.isPending,children:h.isPending?"Adding...":"Add Income"})]})]})]})})]})}function B3e({transactions:e=[],bills:t=[]}){const[r,a]=L.useState(!1),[s,i]=L.useState(!1),[o,l]=L.useState({source_type:"ManualEntry",date:new Date().toISOString().split("T")[0],description:"",net_amount:0,vat_amount:0,gross_amount:0,payment_method:"BankTransfer",counterparty_name:"",account_code:"EXP-VENUE",reference:"",n
1316otes:"",receipt_url:""}),c=Sr(),{data:d=[]}=xt({queryKey:["expenseCategories"],queryFn:()=>pe.entities.ExpenseCategory.list("display_order",100)}),h=d.filter(w=>w.is_active),u=Tt({mutationFn:w=>pe.entities.FinanceTransaction.create({...w,transaction_type:"Expense",status:"Paid",currency:"GBP"}),onSuccess:()=>{c.invalidateQueries({queryKey:["financeTransactions"]}),a(!1),f()}}),f=()=>{l({source_type:"ManualEntry",date:new Date().toISOString().split("T")[0],description:"",net_amount:0,vat_amount:0,gross_amount:0,payment_method:"BankTransfer",counterparty_name:"",account_code:"EXP-VENUE",reference:"",notes:"",receipt_url:""})},m=w=>{w.preventDefault(),u.mutate(o)},b=w=>{const j=parseFloat(w)||0,_=j*.2,S=j+_;l(A=>({...A,net_amount:j,vat_amount:_,gross_amount:S}))},g=async w=>{const j=w.target.files[0];if(j){i(!0);try{const N=await pe.integrations.Core.UploadFile({file:j});l(_=>({..._,receipt_url:N.file_url}))}catch(N){console.error("Failed to upload receipt:",N),alert("Failed to upload receipt")}i(!1)}},y=e.filter(w=>w.transaction_type==="Expense"),x=y.reduce((w,j)=>w+(j.gross_amount||0),0);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Expense Management"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Track all costs including venue, catering, marketing, and operational expenses"})]}),n.jsxs(me,{onClick:()=>a(!0),className:"bg-red-600 hover:bg-red-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Expense"]})]}),n.jsx(_e,{className:"border-2 border-red-200 bg-gradient-to-br from-red-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx(Ju,{className:"w-6 h-6 text-red-600"}),n.jsx("h3",{className:"font-semibold text-gray-700",children:"Total Expenses"})]}),n.jsxs("div",{className:"text-4xl font-bold text-red-900",children:["£",x.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[y.length," expense transactions"]})]})}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Expense Transactions"})}),n.jsx(Ce,{children:y.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Ju,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No expense transactions yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Supplier"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Amount"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"})]})}),n.jsx("tbody",{children:y.sort((w,j)=>new Date(j.date)-new Date(w.date)).map((w,j)=>n.jsxs("tr",{className:`${j%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-red-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4 text-gray-900",children:yt(new Date(w.date),"d MMM yyyy")}),n.jsx("td",{className:"py-3 px-4 text-gray-900 font-medium",children:w.description}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:w.counterparty_name||"-"}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",children:w.account_code||"Uncategorized"})}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-red-600",children:["£",w.gross_amount.toLocaleString()]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:w.status==="Paid"?"bg-green-500 text-white":w.status==="Pending"?"bg-amber-500 text-white":"bg-gray-500 text-white",children:w.status})})]},w.id))})]})})})]}),n.jsx(Nn,{open:r,onOpenChange:a,children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:"Add Expense"})}),n.jsxs("form",{onSubmit:m,className:"space-y-4",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Date *"}),n.jsx(Me,{type:"date",value:o.date,onChange:w=>l({...o,date:w.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Expense Category *"}),n.jsxs(Qt,{value:o.account_code,onValueChange:w=>l({...o,account_code:w}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsx(Gt,{children:h.map(w=>n.jsx(Ae,{value:w.code,children:w.label},w.id))})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Description *"}),n.jsx(Me,{value:o.description,onChange:w=>l({...o,description:w.target.value}),placeholder:"What was this expense for?",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Supplier Name *"}),n.jsx(Me,{value:o.counterparty_name,onChange:w=>l({...o,counterparty_name:w.target.value}),placeholder:"Who did you pay?",required:!0})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Net Amount (£) *"}),n.jsx(Me,{type:"number",step:"0.01",value:o.net_amount,onChange:w=>b(w.target.value),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"VAT (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:o.vat_amount.toFixed(2),readOnly:!0,className:"bg-gray-50"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Gross Total (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:o.gross_amount.toFixed(2),readOnly:!0,className:"bg-gray-50 font-bold"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Receipt / Invoice"}),n.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-4 hover:border-accent-gold transition-colors",children:[n.jsxs("div",{className:"text-center",children:[n.jsx(Al,{className:"w-10 h-10 mx-auto mb-2 text-gray-400"}),n.jsx("label",{className:"cursor-pointer",children:n.jsx(me,{type:"button",variant:"outline",size:"sm",disabled:s,onClick:()=>document.getElementById("receipt-upload").click(),children:s?"Uploading...":"Upload Receipt"})}),n.jsx("input",{id:"receipt-upload",type:"file",accept:"image/*,application/pdf",onChange:g,className:"hidden"})]}),o.receipt_url&&n.jsx("p",{className:"text-sm text-green-600 mt-2",children:"✓ Receipt uploaded"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Payment Method"}),n.jsxs(Qt,{value:o.payment_method,onValueChange:w=>l({...o,payment_method:w}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"BankTransfer",children:"Bank Transfer"}),n.jsx(Ae,{value:"Card",children:"Card Payment"}),n.jsx(Ae,{value:"Cash",children:"Cash"}),n.jsx(Ae,{value:"Other",children:"Other"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes"}),n.jsx(en,{value:o.notes,onChange:w=>l({...o,notes:w.target.value}),placeholder:"Additional details...",rows:3})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>a(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-red-600 hover:bg-red-700 text-white font-bold",disabled:u.isPending,children:u.isPending?"Adding...":"Add Expense"})]})]})]})})]})}function $3e({transactions:e=[],invoices:t=[],tableBookings:r=[],sponsors:a=[]}){var xe,Fe;const[s,i]=L.useState(!1),[o,l]=L.useState(null),[c,d]=L.useState({name:`${new Date().getFullYear()} Awards Budget`,period_start:new Date().toISOString().split("T")[0],period_end:new Date(new Date().getFullYear(),11,31).toISOString().split("T")[0],expense_lines:[],income_lines:[],is_active:!0}),[h,u]=L.useState(!1),[f,m]=L.useState(null),[b,g]=L.useState("expense"),[y,x]=L.useState({account_code:"EXP-VENUE",planned_amount:0,notes:"",is_variable:!1,unit_cost:0,expected_units:0}),[w,j]=L.useState({category:"",description:"",target_amount:0,notes:""}),[N,_]=L.useState(!1),[S,A]=L.useState(null),T=Sr(),{data:R=[]}=xt({queryKey:["budgets"],queryFn:()=>pe.entities.Budget.list("-created_date",50)}),{data:M=[]}=xt({queryKey:["expenseCategories"],queryFn:()=>pe.entities.ExpenseCategory.list("display_order",100)}),{data:k=[]}=xt({queryKey:["incomeCategories"],queryFn:()=>pe.entities.IncomeCategory.list("display_order",100)}),P=M.filter(he=>he.is_active),O=k.filter(he=>he.is_active),F=R.find(he=>he.is_active)||R[0],$=Tt({mutationFn:he=>pe.entities.Budget.create(he),onSuccess:()=>
1316{T.invalidateQueries({queryKey:["budgets"]}),i(!1),Y()}}),G=Tt({mutationFn:({id:he,data:Ne})=>pe.entities.Budget.update(he,Ne),onSuccess:()=>{T.invalidateQueries({queryKey:["budgets"]}),i(!1),l(null),Y()}}),B=Tt({mutationFn:he=>pe.entities.Budget.delete(he),onSuccess:()=>{T.invalidateQueries({queryKey:["budgets"]})}}),Y=()=>{d({name:`${new Date().getFullYear()} Awards Budget`,period_start:new Date().toISOString().split("T")[0],period_end:new Date(new Date().getFullYear(),11,31).toISOString().split("T")[0],expense_lines:[],income_lines:[],is_active:!0})},ee=he=>{he.preventDefault(),o?G.mutate({id:o.id,data:c}):$.mutate(c)},J=()=>{if(b==="expense"){const he=[...c.expense_lines||[],y];d({...c,expense_lines:he}),x({account_code:"EXP-VENUE",planned_amount:0,notes:"",is_variable:!1,unit_cost:0,expected_units:0})}else{const he=[...c.income_lines||[],w];d({...c,income_lines:he}),j({category:"",description:"",target_amount:0,notes:""})}u(!1)},H=(he,Ne)=>{m(he),g(Ne),Ne==="expense"?x(c.expense_lines[he]):j(c.income_lines[he]),u(!0)},q=()=>{if(b==="expense"){const he=[...c.expense_lines];he[f]=y,d({...c,expense_lines:he}),x({account_code:"EXP-VENUE",planned_amount:0,notes:"",is_variable:!1,unit_cost:0,expected_units:0})}else{const he=[...c.income_lines];he[f]=w,d({...c,income_lines:he}),j({category:"",description:"",target_amount:0,notes:""})}u(!1),m(null)},K=(he,Ne)=>{if(Ne==="expense"){const ue=c.expense_lines.filter((rt,Te)=>Te!==he);d({...c,expense_lines:ue})}else{const ue=c.income_lines.filter((rt,Te)=>Te!==he);d({...c,income_lines:ue})}},te=L.useMemo(()=>F?P.map(he=>{const Ne=(F.expense_lines||[]).find($e=>$e.account_code===he.code),ue=(Ne==null?void 0:Ne.planned_amount)||0,rt=e.filter($e=>$e.transaction_type==="Expense"&&$e.account_code===he.code&&$e.status==="Paid").reduce(($e,Ve)=>$e+(Ve.gross_amount||0),0),Te=rt-ue,Pe=ue>0?(Te/ue*100).toFixed(1):0;return{...he,planned:ue,actual:rt,variance:Te,variancePercent:Pe,notes:(Ne==null?void 0:Ne.notes)||""}}).filter(he=>he.planned>0||he.actual>0):[],[F,e,P]),re=L.useMemo(()=>{const he=te.reduce((Te,Pe)=>Te+Pe.planned,0),Ne=te.reduce((Te,Pe)=>Te+Pe.actual,0),ue=Ne-he,rt=he>0?(ue/he*100).toFixed(1):0;return{totalPlanned:he,totalActual:Ne,totalVariance:ue,variancePercent:rt}},[te]),Q=he=>{l(he),d({name:he.name,period_start:he.period_start,period_end:he.period_end,expense_lines:he.expense_lines||he.lines||[],income_lines:he.income_lines||[],is_active:he.is_active}),i(!0)},ne=he=>{const Ne=M.find(ue=>ue.code===he);return(Ne==null?void 0:Ne.label)||he},oe=he=>{const Ne=k.find(ue=>ue.code===he);return(Ne==null?void 0:Ne.label)||he},ae=L.useMemo(()=>{const he=r.reduce((Te,Pe)=>Te+(Pe.amount_paid||0),0),Ne=e.filter(Te=>Te.source_type==="Sponsorship"&&Te.status==="Paid").reduce((Te,Pe)=>Te+(Pe.gross_amount||0),0),ue=e.filter(Te=>Te.transaction_type==="Income"&&Te.status==="Paid"&&Te.source_type!=="Sponsorship").reduce((Te,Pe)=>Te+(Pe.gross_amount||0),0)-he,rt=e.filter(Te=>Te.transaction_type==="Expense"&&Te.status==="Paid").reduce((Te,Pe)=>Te+(Pe.gross_amount||0),0);return{ticketRevenue:he,sponsorshipRevenue:Ne,otherIncome:ue,totalIncome:he+Ne+ue,totalExpenses:rt,netProfit:he+Ne+ue-rt}},[e,r]),le=L.useMemo(()=>F!=null&&F.income_lines?F.income_lines.reduce((he,Ne)=>he+(Ne.target_amount||0),0):0,[F]),je=he=>{const Ne=((F==null?void 0:F.income_lines)||[]).map(Ve=>{const be=(Ve.target_amount||0)*(he.attendance_percentage/100);return{category:oe(Ve.category),description:Ve.description||"",targetAmount:Ve.target_amount||0,amount:be,calculation:`£${Ve.target_amount.toLocaleString()} × ${he.attendance_percentage}%`}}),ue=Ne.reduce((Ve,be)=>Ve+be.amount,0),rt=((F==null?void 0:F.expense_lines)||[]).map(Ve=>{if(Ve.is_variable&&Ve.unit_cost&&Ve.expected_units){const be=he.attendance_percentage||100,We=Ve.expected_units*(be/100),Ze=Ve.unit_cost*We;return{category:ne(Ve.account_code),type:"variable",amount:Ze,calculation:`£${Ve.unit_cost} × ${We.toFixed(0)} units (${be}% of ${Ve.expected_units})`}}else{const be=1+Number(he.expense_adjustment_percentage||0)/100,We=(Ve.planned_amount||0)*be;return{category:ne(Ve.account_code),type:"fixed",amount:We,calculation:he.expense_adjustment_percentage?`£${Ve.planned_amount.toLocaleStr
1316ing()} × ${be} (${he.expense_adjustment_percentage>0?"+":""}${he.expense_adjustment_percentage}% adjustment)`:`£${Ve.planned_amount.toLocaleString()} (fixed)`}}}),Te=rt.reduce((Ve,be)=>Ve+be.amount,0),Pe=ue-Te,$e=ue>0?(Pe/ue*100).toFixed(1):0;return{projectedIncome:ue,projectedExpenses:Te,projectedProfit:Pe,profitMargin:$e,incomeBreakdown:Ne,expenseBreakdown:rt}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-indigo-600 rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(rX,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Budget & Forecast"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Financial planning, expense tracking, and scenario modeling"})]}),n.jsxs(me,{onClick:()=>{l(null),Y(),i(!0)},className:"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create Budget"]})]}),n.jsxs(nl,{defaultValue:"tracking",className:"space-y-6",children:[n.jsxs(wo,{className:"bg-white shadow-lg",children:[n.jsx(ln,{value:"tracking",children:"Budget Tracking"}),n.jsx(ln,{value:"scenarios",children:"Scenario Forecasting"}),n.jsx(ln,{value:"history",children:"Budget History"})]}),n.jsxs(cn,{value:"tracking",className:"space-y-6",children:[F&&n.jsx(_e,{className:"border-2 border-indigo-200 bg-gradient-to-br from-indigo-50 to-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:F.name}),n.jsxs("p",{className:"text-sm text-gray-600",children:[yt(new Date(F.period_start),"d MMM yyyy")," - ",yt(new Date(F.period_end),"d MMM yyyy")]})]}),n.jsx("div",{className:"flex gap-2",children:n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>Q(F),children:[n.jsx(xa,{className:"w-4 h-4 mr-1"}),"Edit Budget"]})})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"text-center p-4 bg-white rounded-lg border-2 border-blue-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Total Budget"}),n.jsxs("div",{className:"text-2xl font-bold text-blue-900",children:["£",re.totalPlanned.toLocaleString()]})]}),n.jsxs("div",{className:"text-center p-4 bg-white rounded-lg border-2 border-red-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Actual Spent"}),n.jsxs("div",{className:"text-2xl font-bold text-red-900",children:["£",re.totalActual.toLocaleString()]})]}),n.jsxs("div",{className:`text-center p-4 bg-white rounded-lg border-2 ${re.totalVariance>0?"border-red-400":"border-green-400"}`,children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Variance"}),n.jsxs("div",{className:`text-2xl font-bold ${re.totalVariance>0?"text-red-600":"text-green-600"}`,children:[re.totalVariance>0?"+":"","£",re.totalVariance.toLocaleString()]}),n.jsxs("div",{className:`text-xs font-semibold mt-1 ${re.totalVariance>0?"text-red-600":"text-green-600"}`,children:[re.totalVariance>0?"Over":"Under"," by ",Math.abs(parseFloat(re.variancePercent)),"%"]})]})]})]})}),F&&te.length>0&&n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Tm,{className:"w-5 h-5 text-indigo-600"}),"Budget vs Actual by Category"]})}),n.jsxs(Ce,{children:[n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Budgeted"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actual"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Remaining"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Variance"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Status"})]})}),n.jsxs("tbody",{children:[te.map((he,Ne)=>{const ue=he.planned-he.actual,rt=he.variance>0,Te=he.planned>0?(he.actual/he.planned*100).toFixed(0):0;return n.jsxs("tr",{className:`${Ne%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-indigo-50 transition-colors`,children:[n.jsxs("td",{className:"py-3 px-4",children:[n.jsx("div",{className:"font-medium text-gray-900",children:he.label}),he.notes&&n.jsx("div",{className:"text-xs text-gray-500 mt-1",children:he.notes})]}),n.jsxs("td",{className:"py-3 px-4 text-right font-semibold text-blue-900",children:["£",he.planned.toLocaleStr
1316ing()]}),n.jsxs("td",{className:"py-3 px-4 text-right font-semibold text-red-900",children:["£",he.actual.toLocaleString()]}),n.jsxs("td",{className:`py-3 px-4 text-right font-bold ${ue>=0?"text-green-600":"text-red-600"}`,children:["£",ue.toLocaleString()]}),n.jsxs("td",{className:`py-3 px-4 text-right font-bold ${rt?"text-red-600":"text-green-600"}`,children:[rt?"+":"","£",he.variance.toLocaleString(),n.jsxs("div",{className:"text-xs mt-1",children:["(",rt?"+":"",he.variancePercent,"%)"]})]}),n.jsx("td",{className:"py-3 px-4 text-center",children:rt?n.jsxs(dt,{className:"bg-red-500 text-white",children:[n.jsx(Mr,{className:"w-3 h-3 mr-1"}),"Over Budget"]}):Te>=90?n.jsxs(dt,{className:"bg-amber-500 text-white",children:[Te,"% Used"]}):n.jsxs(dt,{className:"bg-green-500 text-white",children:[n.jsx(Cn,{className:"w-3 h-3 mr-1"}),"On Track"]})})]},he.code)}),n.jsxs("tr",{className:"bg-indigo-100 border-t-2 border-indigo-300 font-bold",children:[n.jsx("td",{className:"py-4 px-4 text-primary-navy",children:"TOTALS"}),n.jsxs("td",{className:"py-4 px-4 text-right text-blue-900",children:["£",re.totalPlanned.toLocaleString()]}),n.jsxs("td",{className:"py-4 px-4 text-right text-red-900",children:["£",re.totalActual.toLocaleString()]}),n.jsxs("td",{className:`py-4 px-4 text-right ${re.totalPlanned-re.totalActual>=0?"text-green-600":"text-red-600"}`,children:["£",(re.totalPlanned-re.totalActual).toLocaleString()]}),n.jsxs("td",{className:`py-4 px-4 text-right ${re.totalVariance>0?"text-red-600":"text-green-600"}`,children:[re.totalVariance>0?"+":"","£",re.totalVariance.toLocaleString(),n.jsxs("div",{className:"text-xs mt-1",children:["(",re.totalVariance>0?"+":"",re.variancePercent,"%)"]})]}),n.jsx("td",{className:"py-4 px-4 text-center",children:re.totalVariance>0?n.jsx(dt,{className:"bg-red-600 text-white",children:"Over Budget"}):n.jsx(dt,{className:"bg-green-600 text-white",children:"Within Budget"})})]})]})]})}),re.totalVariance>0&&n.jsx("div",{className:"mt-6 p-4 bg-red-50 border-2 border-red-200 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mr,{className:"w-5 h-5 text-red-600 flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-red-900 mb-1",children:"Budget Alert: Over Budget"}),n.jsxs("p",{className:"text-sm text-red-700",children:["Total expenses are £",re.totalVariance.toLocaleString()," over budget (",Math.abs(parseFloat(re.variancePercent)),"% variance). Review categories marked in red and consider cost reduction strategies."]})]})]})})]})]})]}),n.jsx(cn,{value:"scenarios",className:"space-y-6",children:n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-primary-navy",children:[n.jsx(YX,{className:"w-5 h-5 text-indigo-600"}),"Financial Scenario Modeling"]})}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{className:"p-6 bg-gradient-to-br from-blue-50 to-white rounded-xl border-2 border-blue-200",children:[n.jsx("h3",{className:"text-lg font-bold text-blue-900 mb-4",children:"Current Actuals (Baseline)"}),n.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Ticket Revenue"}),n.jsxs("div",{className:"text-2xl font-bold text-blue-900",children:["£",ae.ticketRevenue.toLocaleString()]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Sponsorship"}),n.jsxs("div",{className:"text-2xl font-bold text-purple-900",children:["£",ae.sponsorshipRevenue.toLocaleString()]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Other Income"}),n.jsxs("div",{className:"text-2xl font-bold text-green-900",children:["£",ae.otherIncome.toLocaleString()]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Total Expenses"}),n.jsxs("div",{className:"text-2xl font-bold text-red-900",children:["£",ae.totalExpenses.toLocaleStr
1316ing()]})]})]}),n.jsxs("div",{className:"mt-4 pt-4 border-t border-blue-300 text-center",children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Net Profit"}),n.jsxs("div",{className:`text-3xl font-bold ${ae.netProfit>=0?"text-emerald-900":"text-red-900"}`,children:["£",ae.netProfit.toLocaleString()]})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Income Achievement Scenarios"}),n.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["Projecting ",le>0?`against £${le.toLocaleString()} income target`:"income scenarios"]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:[50,60,70,80,90,100].map(he=>{const Ne=je({expense_adjustment_percentage:0,attendance_percentage:he}),ue=Ne.projectedProfit>=0;return n.jsxs(_e,{className:`border-2 cursor-pointer transition-all hover:shadow-lg ${ue?"border-green-200 bg-gradient-to-br from-green-50 to-white hover:border-green-400":"border-red-200 bg-gradient-to-br from-red-50 to-white hover:border-red-400"}`,onClick:()=>{A({name:`${he}% Target`,description:`${he}% of income targets`,percentage:he,data:Ne}),_(!0)},children:[n.jsxs(Nt,{className:"pb-3",children:[n.jsxs(Pt,{className:`text-lg ${ue?"text-green-900":"text-red-900"}`,children:[he,"% Target"]}),n.jsxs(wr,{className:"text-xs",children:[he,"% of income targets"]})]}),n.jsxs(Ce,{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"Income"}),n.jsxs("span",{className:"font-semibold",children:["£",Ne.projectedIncome.toLocaleString()]})]}),n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"Expenses"}),n.jsxs("span",{className:"font-semibold",children:["£",Ne.projectedExpenses.toLocaleString()]})]}),n.jsxs("div",{className:"pt-2 border-t flex justify-between items-center",children:[n.jsx("span",{className:"text-sm font-bold",children:"Profit"}),n.jsxs("span",{className:`text-lg font-bold ${ue?"text-green-700":"text-red-700"}`,children:["£",Ne.projectedProfit.toLocaleString()]})]}),n.jsxs("div",{className:"text-xs text-gray-500 text-center",children:["Margin: ",Ne.profitMargin,"%"]})]})]},he)})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Advanced Forecasts"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"border-2 border-amber-200 bg-gradient-to-br from-amber-50 to-white cursor-pointer transition-all hover:shadow-lg hover:border-amber-400",onClick:()=>{const he=je({expense_adjustment_percentage:5,attendance_percentage:110});A({name:"Conservative Forecast",description:"+10% above target, +5% cost overrun",percentage:110,data:he}),_(!0)},children:[n.jsxs(Nt,{children:[n.jsx(Pt,{className:"text-lg text-amber-900",children:"Conservative Forecast"}),n.jsx(wr,{children:"+10% above target, +5% cost overrun"})]}),n.jsx(Ce,{children:(()=>{const he=je({expense_adjustment_percentage:5,attendance_percentage:110});return n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Projected Income"}),n.jsxs("span",{className:"font-bold",children:["£",he.projectedIncome.toLocaleString()]})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Projected Expenses"}),n.jsxs("span",{className:"font-bold",children:["£",he.projectedExpenses.toLocaleString()]})]}),n.jsxs("div",{className:"pt-3 border-t flex justify-between",children:[n.jsx("span",{className:"text-sm font-semibold",children:"Projected Profit"}),n.jsxs("span",{className:`text-xl font-bold ${he.projectedProfit>=0?"text-green-700":"text-red-700"}`,children:["£",he.projectedProfit.toLocaleString()]})]}),n.jsxs("div",{className:"text-xs text-gray-600 text-center",children:["Margin: ",he.profitMargin,"%"]})]})})()})]}),n.jsxs(_e,{className:"border-2 border-emerald-200 bg-gradient-to-br from-emerald-50 to-white cursor-pointer transition-all hover:shadow-lg hover:border-emerald-400",onClick:()=>{const he=je({expense_adjustment_percentage:0,attendance_percentage:130});A({name:"Optimistic Forecast",description:"+30% above target, 0% cost change",percentage:130,data:he}),_(!0)},children:[n.jsxs(Nt,{children:[n.jsx(Pt,{className:"text-lg text-emerald-900",children:"Optimistic Forecast"}),n.jsx(wr,{children:"+30% above target, 0% cost change"})]}),n.jsx(Ce,{children:(()=>{const he=je({expense_adjustment_percentage:0,attendance_percentage:130});return n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Projected Income"}),n.jsxs("span",{className:"font-bold",children:["£",he.projectedIncome.toLocaleStr
1316ing()]})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Projected Expenses"}),n.jsxs("span",{className:"font-bold",children:["£",he.projectedExpenses.toLocaleString()]})]}),n.jsxs("div",{className:"pt-3 border-t flex justify-between",children:[n.jsx("span",{className:"text-sm font-semibold",children:"Projected Profit"}),n.jsxs("span",{className:`text-xl font-bold ${he.projectedProfit>=0?"text-green-700":"text-red-700"}`,children:["£",he.projectedProfit.toLocaleString()]})]}),n.jsxs("div",{className:"text-xs text-gray-600 text-center",children:["Margin: ",he.profitMargin,"%"]})]})})()})]})]})]}),n.jsx("div",{className:"p-4 bg-blue-50 border-l-4 border-blue-500 rounded",children:n.jsxs("p",{className:"text-sm text-blue-900",children:[n.jsx("strong",{children:"Scenario modeling"})," helps inform pricing, sponsorship targets, and budget decisions by projecting different revenue and expense outcomes."]})})]})]})}),n.jsx(cn,{value:"history",className:"space-y-6",children:n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Budget History"})}),n.jsx(Ce,{children:R.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Tm,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No budgets created yet"}),n.jsx("p",{className:"text-sm mt-2",children:"Create your first budget to start tracking planned vs actual expenses"})]}):n.jsx("div",{className:"space-y-3",children:R.map(he=>{var Ne,ue,rt,Te,Pe,$e;return n.jsx(_e,{className:`${he.is_active?"border-2 border-indigo-500 bg-indigo-50":"border border-gray-200"}`,children:n.jsx(Ce,{className:"p-4",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("h4",{className:"font-bold text-gray-900",children:he.name}),he.is_active&&n.jsx(dt,{className:"bg-indigo-600 text-white",children:"Active"})]}),n.jsxs("p",{className:"text-sm text-gray-600",children:[yt(new Date(he.period_start),"d MMM yyyy")," - ",yt(new Date(he.period_end),"d MMM yyyy")]}),n.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[(((Ne=he.income_lines)==null?void 0:Ne.length)||0)+(((ue=he.expense_lines)==null?void 0:ue.length)||((rt=he.lines)==null?void 0:rt.length)||0)," budget line",(((Te=he.income_lines)==null?void 0:Te.length)||0)+(((Pe=he.expense_lines)==null?void 0:Pe.length)||(($e=he.lines)==null?void 0:$e.length)||0)!==1?"s":""]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(me,{variant:"outline",size:"sm",onClick:()=>
1316Q(he),children:n.jsx(xa,{className:"w-4 h-4"})}),!he.is_active&&n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{confirm(`Delete budget "${he.name}"?`)&&B.mutate(he.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})})},he.id)})})})]})})]}),n.jsx(Nn,{open:s,onOpenChange:he=>{i(he),he||(l(null),Y())},children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:o?"Edit Budget":"Create New Budget"})}),n.jsxs("form",{onSubmit:ee,className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Budget Name *"}),n.jsx(Me,{value:c.name,onChange:he=>d({...c,name:he.target.value}),placeholder:"e.g., 2026 Awards Budget",required:!0})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Period Start *"}),n.jsx(Me,{type:"date",value:c.period_start,onChange:he=>d({...c,period_start:he.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Period End *"}),n.jsx(Me,{type:"date",value:c.period_end,onChange:he=>d({...c,period_end:he.target.value}),required:!0})]})]}),n.jsxs("div",{className:"border-t pt-6 space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-green-900",children:"Income Targets"}),n.jsxs(me,{type:"button",variant:"outline",onClick:()=>{var he;m(null),g("income"),j({category:((he=O[0])==null?void 0:he.code)||"",description:"",target_amount:0,notes:""}),u(!0)},className:"border-green-500 text-green-600",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Income Line"]})]}),c.income_lines&&c.income_lines.length>0?n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-green-50 border-b",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-2 px-3 text-sm font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-left py-2 px-3 text-sm font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-right py-2 px-3 text-sm font-semibold text-gray-700",children:"Target"}),n.jsx("th",{className:"text-center py-2 px-3 text-sm font-semibold text-gray-700",children:"Actions"})]})}),n.jsxs("tbody",{children:[c.income_lines.map((he,Ne)=>n.jsxs("tr",{className:`${Ne%2===0?"bg-white":"bg-gray-50"} border-b`,children:[n.jsx("td",{className:"py-2 px-3 text-sm font-medium",children:oe(he.category)}),n.jsx("td",{className:"py-2 px-3 text-sm text-gray-600",children:he.description||"-"}),n.jsxs("td",{className:"py-2 px-3 text-right text-sm font-bold text-green-900",children:["£",he.target_amount.toLocaleString()]}),n.jsx("td",{className:"py-2 px-3 text-center",children:n.jsxs("div",{className:"flex justify-center gap-1",children:[n.jsx(me,{type:"button",variant:"ghost",size:"sm",onClick:()=>
1316H(Ne,"income"),children:n.jsx(xa,{className:"w-3 h-3"})}),n.jsx(me,{type:"button",variant:"ghost",size:"sm",onClick:()=>K(Ne,"income"),className:"text-red-600",children:n.jsx(tr,{className:"w-3 h-3"})})]})})]},Ne)),n.jsxs("tr",{className:"bg-green-100 font-bold",children:[n.jsx("td",{colSpan:"2",className:"py-3 px-3 text-sm",children:"TOTAL INCOME TARGET"}),n.jsxs("td",{className:"py-3 px-3 text-right text-green-900",children:["£",c.income_lines.reduce((he,Ne)=>he+(Ne.target_amount||0),0).toLocaleString()]}),n.jsx("td",{})]})]})]})}):n.jsx("div",{className:"text-center py-8 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-300",children:n.jsx("p",{className:"text-sm",children:'No income targets set. Click "Add Income Line" to start.'})})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-red-900",children:"Expense Budget"}),n.jsxs(me,{type:"button",variant:"outline",onClick:()=>{m(null),g("expense"),x({account_code:"EXP-VENUE",planned_amount:0,notes:"",is_variable:!1,unit_cost:0,expected_units:0}),u(!0)},className:"border-red-500 text-red-600",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Expense Line"]})]}),c.expense_lines&&c.expense_lines.length>0?n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-red-50 border-b",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-2 px-3 text-sm font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-right py-2 px-3 text-sm font-semibold text-gray-700",children:"Amount"}),n.jsx("th",{className:"text-left py-2 px-3 text-sm font-semibold text-gray-700",children:"Notes"}),n.jsx("th",{className:"text-center py-2 px-3 text-sm font-semibold text-gray-700",children:"Actions"})]})}),n.jsxs("tbody",{children:[c.expense_lines.map((he,Ne)=>n.jsxs("tr",{className:`${Ne%2===0?"bg-white":"bg-gray-50"} border-b`,children:[n.jsxs("td",{className:"py-2 px-3 text-sm font-medium",children:[ne(he.account_code),he.is_variable&&n.jsx(dt,{variant:"outline",className:"ml-2 text-xs",children:"Variable"})]}),n.jsxs("td",{className:"py-2 px-3 text-right text-sm font-bold text-red-900",children:["£",he.planned_amount.toLocaleString(),he.is_variable&&he.unit_cost&&he.expected_units&&n.jsxs("div",{className:"text-xs font-normal text-gray-500",children:["£",he.unit_cost," × ",he.expected_units," units"]})]}),n.jsx("td",{className:"py-2 px-3 text-sm text-gray-600",children:he.notes||"-"}),n.jsx("td",{className:"py-2 px-3 text-center",children:n.jsxs("div",{className:"flex justify-center gap-1",children:[n.jsx(me,{type:"button",variant:"ghost",size:"sm",onClick:()=>
1316H(Ne,"expense"),children:n.jsx(xa,{className:"w-3 h-3"})}),n.jsx(me,{type:"button",variant:"ghost",size:"sm",onClick:()=>K(Ne,"expense"),className:"text-red-600",children:n.jsx(tr,{className:"w-3 h-3"})})]})})]},Ne)),n.jsxs("tr",{className:"bg-red-100 font-bold",children:[n.jsx("td",{className:"py-3 px-3 text-sm",children:"TOTAL EXPENSE BUDGET"}),n.jsxs("td",{className:"py-3 px-3 text-right text-red-900",children:["£",c.expense_lines.reduce((he,Ne)=>he+(Ne.planned_amount||0),0).toLocaleString()]}),n.jsx("td",{colSpan:"2"})]})]})]})}):n.jsx("div",{className:"text-center py-8 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-300",children:n.jsx("p",{className:"text-sm",children:'No expense lines added yet. Click "Add Expense Line" to start.'})})]}),(c.income_lines&&c.income_lines.length>0||c.expense_lines&&c.expense_lines.length>0)&&n.jsx("div",{className:"p-4 bg-indigo-50 rounded-lg border-2 border-indigo-200",children:n.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Total Income Target"}),n.jsxs("div",{className:"text-xl font-bold text-green-900",children:["£",(c.income_lines||[]).reduce((he,Ne)=>he+(Ne.target_amount||0),0).toLocaleString()]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Total Expenses Budget"}),n.jsxs("div",{className:"text-xl font-bold text-red-900",children:["£",(c.expense_lines||[]).reduce((he,Ne)=>he+(Ne.planned_amount||0),0).toLocaleString()]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Projected Net"}),n.jsxs("div",{className:`text-xl font-bold ${(c.income_lines||[]).reduce((he,Ne)=>he+(Ne.target_amount||0),0)-(c.expense_lines||[]).reduce((he,Ne)=>he+(Ne.planned_amount||0),0)>=0?"text-emerald-900":"text-red-900"}`,children:["£",((c.income_lines||[]).reduce((he,Ne)=>he+(Ne.target_amount||0),0)-(c.expense_lines||[]).reduce((he,Ne)=>he+(Ne.planned_amount||0),0)).toLocaleString()]})]})]})})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>i(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-indigo-600 hover:bg-indigo-700 text-white font-bold",disabled:$.isPending||G.isPending,children:$.isPending||G.isPending?"Saving...":o?"Update Budget":"Create Budget"})]})]})]})}),n.jsx(Nn,{open:h,onOpenChange:u,children:n.jsxs(vn,{className:"max-w-lg",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-xl font-bold text-primary-navy",children:f!==null?`Edit ${b==="income"?"Income":"Expense"} Line`:`Add ${b==="income"?"Income":"Expense"} Line`})}),n.jsxs("div",{className:"space-y-4 py-4",children:[b==="expense"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Expense Category *"}),n.jsxs(Qt,{value:y.account_code,onValueChange:he=>x({...y,account_code:he}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsx(Gt,{children:P.map(he=>n.jsx(Ae,{value:he.code,children:he.label},he.id))})]})]}),n.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-blue-50 rounded-lg border border-blue-200",children:[n.jsx("input",{type:"checkbox",id:"is_variable",checked:y.is_variable,onChange:he=>{const Ne=he.target.checked;x({...y,is_variable:Ne,planned_amount:Ne&&y.unit_cost&&y.expected_units?y.unit_cost*y.expected_units:y.planned_amount})},className:"w-4 h-4"}),n.jsx(ye,{htmlFor:"is_variable",className:"cursor-pointer font-semibold",children:"Variable Cost (adjusts with attendance)"})]}),y.is_variable?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Cost Per Unit (£) *"}),n.jsx(Me,{type:"number",step:"0.01",value:y.unit_cost,onChange:he=>{const Ne=parseFloat(he.target.value)||0;x({...y,unit_cost:Ne,planned_amount:Ne*(y.expected_units||0)})},placeholder:"e.g., 43.00",required:!0}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"e.g., £43.00 per person"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Expected Units *"}),n.jsx(Me,{type:"number",value:y.expected_units,onChange:he=>{const Ne=parseFloat(he.target.value)||0;x({...y,expected_units:Ne,planned_amount:(y.unit_cost||0)*Ne})},placeholder:"e.g., 250",required:!0}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"e.g., 250 people"})]})]}),n.jsxs("div",{className:"p-3 bg-green-50 rounded-lg border border-green-200",children:[n.jsxs("div",{className:"text-sm font-semibold text-green-900",children:["Calculated Total: £",y.planned_amount.toLocaleStr
1316ing()]}),n.jsx("div",{className:"text-xs text-green-700 mt-1",children:"This will automatically adjust in forecasts based on projected attendance"})]})]}):n.jsxs("div",{children:[n.jsx(ye,{children:"Planned Amount (£) *"}),n.jsx(Me,{type:"number",step:"0.01",value:y.planned_amount,onChange:he=>x({...y,planned_amount:parseFloat(he.target.value)||0}),placeholder:"0.00",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes"}),n.jsx(en,{value:y.notes,onChange:he=>x({...y,notes:he.target.value}),placeholder:"Add notes about this budget line...",rows:3})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Income Category *"}),n.jsxs(Qt,{value:w.category,onValueChange:he=>j({...w,category:he}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsx(Gt,{children:O.length>0?O.map(he=>n.jsx(Ae,{value:he.code,children:he.label},he.id)):n.jsx(Ae,{value:null,disabled:!0,children:"No income categories available"})})]}),O.length===0&&n.jsx("p",{className:"text-xs text-amber-600 mt-1",children:"Please add income categories in Finance Settings first"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Description *"}),n.jsx(Me,{value:w.description,onChange:he=>j({...w,description:he.target.value}),placeholder:"e.g., Table sales at £2,500 each",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Target Amount (£) *"}),n.jsx(Me,{type:"number",step:"0.01",value:w.target_amount,onChange:he=>j({...w,target_amount:parseFloat(he.target.value)||0}),placeholder:"0.00",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes"}),n.jsx(en,{value:w.notes,onChange:he=>j({...w,notes:he.target.value}),placeholder:"Add notes about this income target...",rows:3})]})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{u(!1),m(null)},className:"flex-1",children:"Cancel"}),n.jsx(me,{onClick:f!==null?q:J,className:"flex-1 bg-indigo-600 hover:bg-indigo-700 text-white",children:f!==null?"Update Line":"Add Line"})]})]})]})}),n.jsx(Nn,{open:N,onOpenChange:_,children:n.jsxs(vn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy",children:[S==null?void 0:S.name," - Calculation Breakdown"]}),n.jsx("p",{className:"text-sm text-gray-600",children:S==null?void 0:S.description})]}),S&&n.jsxs("div",{className:"space-y-6 py-4",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"text-center p-4 bg-green-50 rounded-lg border-2 border-green-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Projected Income"}),n.jsxs("div",{className:"text-2xl font-bold text-green-900",children:["£",S.data.projectedIncome.toLocaleString()]})]}),n.jsxs("div",{className:"text-center p-4 bg-red-50 rounded-lg border-2 border-red-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Projected Expenses"}),n.jsxs("div",{className:"text-2xl font-bold text-red-900",children:["£",S.data.projectedExpenses.toLocaleString()]})]}),n.jsxs("div",{className:`text-center p-4 rounded-lg border-2 ${S.data.projectedProfit>=0?"bg-emerald-50 border-emerald-200":"bg-red-50 border-red-200"}`,children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Projected Profit"}),n.jsxs("div",{className:`text-2xl font-bold ${S.data.projectedProfit>=0?"text-emerald-900":"text-red-900"}`,children:["£",S.data.projectedProfit.toLocaleString()]}),n.jsxs("div",{className:"text-xs text-gray-600 mt-1",children:["Margin: ",S.data.profitMargin,"%"]})]})]}),n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg font-bold text-green-900 mb-3 flex items-center gap-2",children:[n.jsx(ka,{className:"w-5 h-5"}),"Income Breakdown"]}),n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-green-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Target"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Calculation"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Projected"})]})}),n.jsxs("tbody",{children:[(xe=S.data.incomeBreakdown)==null?void 0:xe.map((he,Ne)=>n.jsxs("tr",{className:`${Ne%2===0?"bg-white":"bg-gray-50"} border-b`,children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:he.category}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:he.description||"-"}),n.jsxs("td",{className:"py-3 px-4 text-right text-sm text-gray-600",children:["£",he.targetAmount.toLocaleStr
1316ing()]}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:he.calculation}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-green-900",children:["£",he.amount.toLocaleString()]})]},Ne)),n.jsxs("tr",{className:"bg-green-100 border-t-2 border-green-300 font-bold",children:[n.jsx("td",{colSpan:"4",className:"py-4 px-4 text-green-900",children:"TOTAL INCOME"}),n.jsxs("td",{className:"py-4 px-4 text-right text-green-900",children:["£",S.data.projectedIncome.toLocaleString()]})]})]})]})})]}),n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg font-bold text-red-900 mb-3 flex items-center gap-2",children:[n.jsx(Ju,{className:"w-5 h-5"}),"Expense Breakdown"]}),n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-red-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Type"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Calculation"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Amount"})]})}),n.jsxs("tbody",{children:[(Fe=S.data.expenseBreakdown)==null?void 0:Fe.map((he,Ne)=>n.jsxs("tr",{className:`${Ne%2===0?"bg-white":"bg-gray-50"} border-b`,children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:he.category}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",className:he.type==="variable"?"border-blue-500 text-blue-700":"border-gray-500 text-gray-700",children:he.type==="variable"?"Variable":"Fixed"})}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:he.calculation}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-red-900",children:["£",he.amount.toLocaleString()]})]},Ne)),n.jsxs("tr",{className:"bg-red-100 border-t-2 border-red-300 font-bold",children:[n.jsx("td",{colSpan:"3",className:"py-4 px-4 text-red-900",children:"TOTAL EXPENSES"}),n.jsxs("td",{className:"py-4 px-4 text-right text-red-900",children:["£",S.data.projectedExpenses.toLocaleString()]})]})]})]})})]}),n.jsxs("div",{className:"p-4 bg-indigo-50 rounded-lg border-2 border-indigo-200",children:[n.jsx("h4",{className:"font-bold text-indigo-900 mb-3",children:"Final Profit Calculation"}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-700",children:"Projected Income"}),n.jsxs("span",{className:"font-semibold text-green-900",children:["£",S.data.projectedIncome.toLocaleString()]})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-700",children:"Projected Expenses"}),n.jsxs("span",{className:"font-semibold text-red-900",children:["-£",S.data.projectedExpenses.toLocaleString()]})]}),n.jsxs("div",{className:"pt-2 border-t-2 border-indigo-300 flex justify-between font-bold text-lg",children:[n.jsx("span",{className:"text-indigo-900",children:"Projected Profit"}),n.jsxs("span",{className:S.data.projectedProfit>=0?"text-emerald-700":"text-red-700",children:["£",S.data.projectedProfit.toLocaleString()]})]}),n.jsxs("div",{className:"text-xs text-gray-600 text-center mt-2",children:["Profit Margin: ",S.data.profitMargin,"%"]})]})]}),n.jsx(me,{onClick:()=>_(!1),className:"w-full bg-indigo-600 hover:bg-indigo-700 text-white",children:"Close"})]})]})})]})}function U3e({invoices:e=[]}){const[t,r]=L.useState(!1),[a,s]=L.useState({customer_name:"",customer_email:"",customer_organisation:"",billing_address:"",issue_date:new Date().toISOString().split("T")[0],due_date:"",line_items:[{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"INC-OTHER"}],notes:""}),i=Sr(),o=Tt({mutationFn:async m=>{const b=`INV-${Date.now().toString().slice(-8)}`,g=m.line_items.reduce((w,j)=>w+(j.net||0),0),y=m.line_items.reduce((w,j)=>w+(j.vat||0),0),x=g+y;
1316return pe.entities.Invoice.create({...m,invoice_number:b,subtotal:g,vat_total:y,total:x,status:"Draft"})},onSuccess:()=>{i.invalidateQueries({queryKey:["invoices"]}),r(!1),l()}}),l=()=>{s({customer_name:"",customer_email:"",customer_organisation:"",billing_address:"",issue_date:new Date().toISOString().split("T")[0],due_date:"",line_items:[{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"INC-OTHER"}],notes:""})},c=(m,b,g)=>{const y=[...a.line_items];if(y[m][b]=g,b==="quantity"||b==="unit_price"||b==="vat_rate"){const x=parseFloat(y[m].quantity)||0,w=parseFloat(y[m].unit_price)||0,j=parseFloat(y[m].vat_rate)||0,N=x*w,_=N*(j/100),S=N+_;y[m].net=N,y[m].vat=_,y[m].gross=S}s({...a,line_items:y})},d=()=>{s({...a,line_items:[...a.line_items,{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"INC-OTHER"}]})},h=m=>{s({...a,line_items:a.line_items.filter((b,g)=>g!==m)})},u=m=>{m.preventDefault(),o.mutate(a)},f=e.filter(m=>m.status!=="Paid"&&m.status!=="Cancelled"&&gc(new Date(m.due_date),new Date));return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Invoice Management"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Create, send, and track invoices for sponsorships and other services"})]}),n.jsxs(me,{onClick:()=>r(!0),className:"bg-blue-600 hover:bg-blue-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create Invoice"]})]}),n.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[n.jsx(_e,{className:"bg-white border-2 border-gray-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:e.length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Total Invoices"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-green-50 to-white border-2 border-green-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-900",children:e.filter(m=>m.status==="Paid").length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Paid"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-amber-50 to-white border-2 border-amber-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-amber-900",children:e.filter(m=>m.status==="Sent"||m.status==="PartPaid").length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Pending"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-red-50 to-white border-2 border-red-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-900",children:f.length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Overdue"})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Invoices"})}),n.jsx(Ce,{children:e.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No invoices created yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Invoice #"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Customer"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Issue Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Amount"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"})]})}),n.jsx("tbody",{children:e.sort((m,b)=>new Date(b.issue_date)-new Date(m.issue_date)).map((m,b)=>{const g=m.status!=="Paid"&&m.status!=="Cancelled"&&gc(new Date(m.due_date),new Date);return n.jsxs("tr",{className:`${b%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-blue-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4 font-mono text-sm text-gray-900",children:m.invoice_number}),n.jsxs("td",{className:"py-3 px-4",children:[n.jsx("div",{className:"font-medium text-gray-900",children:m.customer_name}),n.jsx("div",{className:"text-xs text-gray-500",children:m.customer_organisation})]}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:yt(new Date(m.issue_date),"d MMM yyyy")}),n.jsx("td",{className:"py-3 px-4",children:n.jsx("div",{className:g?"text-red-600 font-semibold":"text-gray-600",children:yt(new Date(m.due_date),"d MMM yyyy")})}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-gray-900",children:["£",m.total.toLocaleStr
1316ing()]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:m.status==="Paid"?"bg-green-500 text-white":m.status==="Sent"?"bg-blue-500 text-white":m.status==="PartPaid"?"bg-amber-500 text-white":g?"bg-red-500 text-white":"bg-gray-500 text-white",children:g&&m.status!=="Paid"?"Overdue":m.status})})]},m.id)})})]})})})]}),n.jsx(Nn,{open:t,onOpenChange:r,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:"Create Invoice"})}),n.jsxs("form",{onSubmit:u,className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"font-semibold text-primary-navy border-b pb-2",children:"Customer Details"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Customer Name *"}),n.jsx(Me,{value:a.customer_name,onChange:m=>s({...a,customer_name:m.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Email *"}),n.jsx(Me,{type:"email",value:a.customer_email,onChange:m=>s({...a,customer_email:m.target.value}),required:!0})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Organisation"}),n.jsx(Me,{value:a.customer_organisation,onChange:m=>s({...a,customer_organisation:m.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Billing Address"}),n.jsx(en,{value:a.billing_address,onChange:m=>s({...a,billing_address:m.target.value}),rows:3})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Issue Date *"}),n.jsx(Me,{type:"date",value:a.issue_date,onChange:m=>s({...a,issue_date:m.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Due Date *"}),n.jsx(Me,{type:"date",value:a.due_date,onChange:m=>s({...a,due_date:m.target.value}),required:!0})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"font-semibold text-primary-navy",children:"Line Items"}),n.jsxs(me,{type:"button",size:"sm",variant:"outline",onClick:d,children:[n.jsx(gr,{className:"w-3 h-3 mr-1"}),"Add Line"]})]}),a.line_items.map((m,b)=>n.jsxs("div",{className:"p-4 border-2 border-gray-200 rounded-lg space-y-3",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("span",{className:"text-sm font-semibold text-gray-700",children:["Line ",b+1]}),a.line_items.length>1&&n.jsx(me,{type:"button",size:"sm",variant:"ghost",onClick:()=>h(b),className:"text-red-600",children:n.jsx(tr,{className:"w-4 h-4"})})]}),n.jsx(Me,{placeholder:"Description",value:m.description,onChange:g=>c(b,"description",g.target.value)}),n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Quantity"}),n.jsx(Me,{type:"number",step:"1",value:m.quantity,onChange:g=>c(b,"quantity",g.target.value)})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Unit Price (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:m.unit_price,onChange:g=>c(b,"unit_price",g.target.value)})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"VAT Rate (%)"}),n.jsx(Me,{type:"number",step:"0.01",value:m.vat_rate,onChange:g=>c(b,"vat_rate",g.target.value)})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-3 pt-2 border-t",children:[n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"Net"}),n.jsxs("div",{className:"text-sm font-bold text-gray-900",children:["£",m.net.toFixed(2)]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"VAT"}),n.jsxs("div",{className:"text-sm font-bold text-gray-900",children:["£",m.vat.toFixed(2)]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"Gross"}),n.jsxs("div",{className:"text-sm font-bold text-primary-navy",children:["£",m.gross.toFixed(2)]})]})]})]},b))]}),n.jsx("div",{className:"bg-gray-50 rounded-lg p-6 border-2 border-gray-200",children:n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"Subtotal:"}),n.jsxs("span",{className:"font-semibold text-gray-900",children:["£",a.line_items.reduce((m,b)=>m+(b.net||0),0).toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"VAT:"}),n.jsxs("span",{className:"font-semibold text-gray-900",children:["£",a.line_items.reduce((m,b)=>m+(b.vat||0),0).toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between text-xl border-t-2 pt-2",children:[n.jsx("span",{className:"font-bold text-primary-navy",children:"Total:"}),n.jsxs("span",{className:"font-bold text-primary-navy",children:["£",a.line_items.reduce((m,b)=>m+(b.gross||0),0).toFixed(2)]})]})]})}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes (Internal)"}),n.jsx(en,{value:a.notes,onChange:m=>s({...a,notes:m.target.value}),rows:3,placeholder:"Any additional notes..."})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>r(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-blue-600 hover:bg-blue-700 text-white font-bold",disabled:o.isPending,children:o.isPending?"Creating...":"Create Invoice"})]})]})]})})]})}function z3e({bills:e=[]}){const[t,r]=L.useState(!1),[a,s]=L.useState(!1),[i,o]=L.useState({bill_number:"",supplier_name:"",supplier_email:"",issue_date:new Date().toISOString().split("T")[0],due_date:"",line_items:[{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"EXP-VENUE"}
1316],attachment_url:"",notes:""}),l=Sr(),c=Tt({mutationFn:async y=>{var _;const x=y.line_items.reduce((S,A)=>S+(A.net||0),0),w=y.line_items.reduce((S,A)=>S+(A.vat||0),0),j=x+w,N=await pe.entities.Bill.create({...y,subtotal:x,vat_total:w,total:j,status:"Approved"});return await pe.entities.FinanceTransaction.create({transaction_type:"Expense",source_type:"Bill",source_id:N.id,date:y.issue_date,description:`Bill from ${y.supplier_name} - ${y.bill_number}`,net_amount:x,vat_amount:w,gross_amount:j,currency:"GBP",status:"Pending",counterparty_name:y.supplier_name,counterparty_email:y.supplier_email,reference:y.bill_number,account_code:((_=y.line_items[0])==null?void 0:_.account_code)||"EXP-OTHER",notes:y.notes}),N},onSuccess:()=>{l.invalidateQueries({queryKey:["bills"]}),l.invalidateQueries({queryKey:["financeTransactions"]}),r(!1),h()}}),d=Tt({mutationFn:async y=>{const x=e.find(N=>N.id===y);await pe.entities.Bill.update(y,{status:"Paid",paid_at:new Date().toISOString(),amount_paid:x.total});const j=(await pe.entities.FinanceTransaction.list()).find(N=>N.source_type==="Bill"&&N.source_id===y);j&&await pe.entities.FinanceTransaction.update(j.id,{status:"Paid"})},onSuccess:()=>{l.invalidateQueries({queryKey:["bills"]}),l.invalidateQueries({queryKey:["financeTransactions"]})}}),h=()=>{o({bill_number:"",supplier_name:"",supplier_email:"",issue_date:new Date().toISOString().split("T")[0],due_date:"",line_items:[{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"EXP-VENUE"}],attachment_url:"",notes:""})},u=(y,x,w)=>{const j=[...i.line_items];if(j[y][x]=w,x==="quantity"||x==="unit_price"||x==="vat_rate"){const N=parseFloat(j[y].quantity)||0,_=parseFloat(j[y].unit_price)||0,S=parseFloat(j[y].vat_rate)||0,A=N*_,T=A*(S/100),R=A+T;j[y].net=A,j[y].vat=T,j[y].gross=R}o({...i,line_items:j})},f=()=>{o({...i,line_items:[...i.line_items,{description:"",quantity:1,unit_price:0,vat_rate:20,net:0,vat:0,gross:0,account_code:"EXP-VENUE"}]})},m=async y=>{const x=y.target.files[0];if(x){s(!0);try{const w=await pe.integrations.Core.UploadFile({file:x});o(j=>({...j,attachment_url:w.file_url}))}catch(w){console.error("Failed to upload:",w),alert("Failed to upload file")}s(!1)}},b=y=>{y.preventDefault(),c.mutate(i)},g=e.filter(y=>y.status!=="Paid"&&y.status!=="Cancelled"&&gc(new Date(y.due_date),new Date));return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Bill Management"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Track supplier bills and manage payments"})]}),n.jsxs(me,{onClick:()=>r(!0),className:"bg-orange-600 hover:bg-orange-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Bill"]})]}),n.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[n.jsx(_e,{className:"bg-white border-2 border-gray-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-gray-900",children:e.length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Total Bills"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-green-50 to-white border-2 border-green-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-900",children:e.filter(y=>y.status==="Paid").length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Paid"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-amber-50 to-white border-2 border-amber-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-amber-900",children:e.filter(y=>y.status==="Approved"||y.status==="Scheduled").length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Awaiting Payment"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-red-50 to-white border-2 border-red-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-900",children:g.length}),n.jsx("div",{className:"text-sm text-gray-600 mt-1",children:"Overdue"})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Bills to Pay"})}),n.jsx(Ce,{children:e.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Bq,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No bills recorded yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Bill #"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Supplier"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Issue Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Amount"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:e.sort((y,x)=>new Date(y.due_date)-new Date(x.due_date)).map((y,x)=>{const w=y.status!=="Paid"&&y.status!=="Cancelled"&&gc(new Date(y.due_date),new Date);return n.jsxs("tr",{className:`${x%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-orange-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4 font-mono text-sm text-gray-900",children:y.bill_number}),n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:y.supplier_name}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:yt(new Date(y.issue_date),"d MMM yyyy")}),n.jsx("td",{className:"py-3 px-4",children:n.jsx("div",{className:w?"text-red-600 font-semibold":"text-gray-600",children:yt(new Date(y.due_date),"d MMM yyyy")})}),n.jsxs("td",{className:"py-3 px-4 text-right font-bold text-gray-900",children:["£",y.total.toLocaleStr
1316ing()]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:y.status==="Paid"?"bg-green-500 text-white":y.status==="Approved"?"bg-blue-500 text-white":w?"bg-red-500 text-white":"bg-gray-500 text-white",children:w&&y.status!=="Paid"?"Overdue":y.status})}),n.jsx("td",{className:"py-3 px-4 text-right",children:y.status!=="Paid"&&n.jsxs(me,{size:"sm",onClick:()=>d.mutate(y.id),disabled:d.isPending,className:"bg-green-600 hover:bg-green-700 text-white",children:[n.jsx(Cn,{className:"w-3 h-3 mr-1"}),"Mark Paid"]})})]},y.id)})})]})})})]}),n.jsx(Nn,{open:t,onOpenChange:r,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:"Add Bill"})}),n.jsxs("form",{onSubmit:b,className:"space-y-6",children:[n.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Bill Number *"}),n.jsx(Me,{value:i.bill_number,onChange:y=>o({...i,bill_number:y.target.value}),placeholder:"Supplier's invoice #",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Issue Date *"}),n.jsx(Me,{type:"date",value:i.issue_date,onChange:y=>o({...i,issue_date:y.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Due Date *"}),n.jsx(Me,{type:"date",value:i.due_date,onChange:y=>o({...i,due_date:y.target.value}),required:!0})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Supplier Name *"}),n.jsx(Me,{value:i.supplier_name,onChange:y=>o({...i,supplier_name:y.target.value}),required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Supplier Email"}),n.jsx(Me,{type:"email",value:i.supplier_email,onChange:y=>o({...i,supplier_email:y.target.value})})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"font-semibold text-primary-navy",children:"Line Items"}),n.jsxs(me,{type:"button",size:"sm",variant:"outline",onClick:f,children:[n.jsx(gr,{className:"w-3 h-3 mr-1"}),"Add Line"]})]}),i.line_items.map((y,x)=>n.jsxs("div",{className:"p-4 border-2 border-gray-200 rounded-lg space-y-3",children:[n.jsx("div",{className:"flex justify-between items-center",children:n.jsxs("span",{className:"text-sm font-semibold text-gray-700",children:["Line ",x+1]})}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[n.jsx(Me,{placeholder:"Description",value:y.description,onChange:w=>u(x,"description",w.target.value)}),n.jsxs(Qt,{value:y.account_code,onValueChange:w=>u(x,"account_code",w),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"EXP-VENUE",children:"Venue"}),n.jsx(Ae,{value:"EXP-CATERING",children:"Catering"}),n.jsx(Ae,{value:"EXP-AV",children:"AV & Tech"}),n.jsx(Ae,{value:"EXP-PHOTOGRAPHY",children:"Photography"}),n.jsx(Ae,{value:"EXP-MARKETING",children:"Marketing"}),n.jsx(Ae,{value:"EXP-DESIGN",children:"Design & Print"}),n.jsx(Ae,{value:"EXP-STAFF",children:"Staff"}),n.jsx(Ae,{value:"EXP-OTHER",children:"Other"})]})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Quantity"}),n.jsx(Me,{type:"number",step:"1",value:y.quantity,onChange:w=>u(x,"quantity",w.target.value)})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Unit Price (£)"}),n.jsx(Me,{type:"number",step:"0.01",value:y.unit_price,onChange:w=>u(x,"unit_price",w.target.value)})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"VAT Rate (%)"}),n.jsx(Me,{type:"number",step:"0.01",value:y.vat_rate,onChange:w=>u(x,"vat_rate",w.target.value)})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-3 pt-2 border-t",children:[n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"Net"}),n.jsxs("div",{className:"text-sm font-bold text-gray-900",children:["£",y.net.toFixed(2)]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"VAT"}),n.jsxs("div",{className:"text-sm font-bold text-gray-900",children:["£",y.vat.toFixed(2)]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-xs text-gray-600",children:"Gross"}),n.jsxs("div",{className:"text-sm font-bold text-primary-navy",children:["£",y.gross.toFixed(2)]})]})]})]},x))]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Attach Receipt/Invoice"}),n.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-4",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Al,{className:"w-10 h-10 mx-auto mb-2 text-gray-400"}),n.jsx("input",{type:"file",onChange:m,accept:"image/*,application/pdf",className:"hidden",id:"bill-attachment"}),n.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>document.getElementById("bill-attachment").click(),disabled:a,children:a?"Uploading...":"Upload File"}),i.attachment_url&&n.jsx("p",{className:"text-sm text-green-600 mt-2",children:"✓ File uploaded"})]})})]}),n.jsx("div",{className:"bg-gray-50 rounded-lg p-6 border-2 border-gray-200",children:n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"Subtotal:"}),n.jsxs("span",{className:"font-semibold text-gray-900",children:["£",i.line_items.reduce((y,x)=>y+(x.net||0),0).toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between text-sm",children:[n.jsx("span",{className:"text-gray-600",children:"VAT:"}),n.jsxs("span",{className:"font-semibold text-gray-900",children:["£",i.line_items.reduce((y,x)=>y+(x.vat||0),0).toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between text-xl border-t-2 pt-2",children:[n.jsx("span",{className:"font-bold text-primary-navy",children:"Total:"}),n.jsxs("span",{className:"font-bold text-primary-navy",children:["£",i.line_items.reduce((y,x)=>y+(x.gross||0),0).toFixed(2)]})]})]})}),n.jsxs("div",{children:[n.jsx(ye,{children:"Notes"}),n.jsx(en,{value:i.notes,onChange:y=>o({...i,notes:y.target.value}),rows:3})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>r(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-orange-600 hover:bg-orange-700 text-white font-bold",disabled:c.isPending,children:c.isPending?"Adding...":"Add Bill"})]})]})]})})]})}function V3e({transactions:e=[],invoices:t=[],bills:r=[]}){const[a,s]=L.useState("ytd"),o=(()=>{const d=new Date;switch(a){case"month":return{start:W6(d),end:H6(d)};case"quarter":return{start:pge(d),end:d};case"ytd":return{start:z1(d),end:d};default:return{start:z1(d),end:d}}})(),l=L.useMemo(()=>{const d={},h={};e.forEach(x=>{const w=new Date(x.date);
1316if(SA(w,o)){if(x.transaction_type==="Income"&&x.status==="Paid"){const j=x.account_code||"Other Income";d[j]=(d[j]||0)+x.gross_amount}else if(x.transaction_type==="Expense"&&x.status==="Paid"){const j=x.account_code||"Other Expenses";h[j]=(h[j]||0)+x.gross_amount}}});const u=Object.values(d).reduce((x,w)=>x+w,0),f=Object.values(h).reduce((x,w)=>x+w,0),m=u-f,b=u>0?(m/u*100).toFixed(1):0,g=t.filter(x=>x.status!=="Paid"&&x.status!=="Cancelled").reduce((x,w)=>x+(w.total-(w.amount_paid||0)),0),y=r.filter(x=>x.status!=="Paid"&&x.status!=="Cancelled").reduce((x,w)=>x+(w.total-(w.amount_paid||0)),0);return{incomeByCategory:d,expensesByCategory:h,totalIncome:u,totalExpenses:f,grossProfit:m,profitMargin:b,outstandingReceivables:g,outstandingPayables:y}},[e,t,r,o,a]),c=()=>{let d=`NATIONAL CHARITY TODAY AWARDS™ - PROFIT & LOSS REPORT
1317Period: ${yt(o.start,"d MMMM yyyy")} to ${yt(o.end,"d MMMM yyyy")}
1318Generated: ${yt(new Date,"d MMMM yyyy HH:mm")}
1319
1320━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1321
1322INCOME
1323
1324`;Object.entries(l.incomeByCategory).forEach(([m,b])=>{d+=`${m.padEnd(40)} £${b.toLocaleString()}
1325`}),d+=`${"Total Income".padEnd(40)} £${l.totalIncome.toLocaleString()}
1326
1327`,d+=`EXPENSES
1328
1329`,Object.entries(l.expensesByCategory).forEach(([m,b])=>{d+=`${m.padEnd(40)} £${b.toLocaleString()}
1330`}),d+=`${"Total Expenses".padEnd(40)} £${l.totalExpenses.toLocaleString()}
1331
1332`,d+=`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1333
1334`,d+=`${"GROSS PROFIT".padEnd(40)} £${l.grossProfit.toLocaleString()}
1335`,d+=`${"Profit Margin".padEnd(40)} ${l.profitMargin}%
1336
1337`,d+=`OUTSTANDING
1338
1339`,d+=`${"Receivables (Unpaid Invoices)".padEnd(40)} £${l.outstandingReceivables.toLocaleString()}
1340`,d+=`${"Payables (Unpaid Bills)".padEnd(40)} £${l.outstandingPayables.toLocaleString()}
1341`;const h=new Blob([d],{type:"text/plain"}),u=URL.createObjectURL(h),f=document.createElement("a");f.href=u,f.download=`P&L_Report_${yt(new Date,"yyyy-MM-dd")}.txt`,f.click(),URL.revokeObjectURL(u)};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Profit & Loss Report"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Financial performance overview for the selected period"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(Qt,{value:a,onValueChange:s,children:[n.jsx(Kt,{className:"w-[180px]",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"month",children:"This Month"}),n.jsx(Ae,{value:"quarter",children:"Last 3 Months"}),n.jsx(Ae,{value:"ytd",children:"Year to Date"})]})]}),n.jsxs(me,{onClick:c,variant:"outline",className:"border-2 border-primary-navy",children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Download"]})]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsx(_e,{className:"border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(ka,{className:"w-8 h-8 text-green-600 mx-auto mb-3"}),n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Total Income"}),n.jsxs("div",{className:"text-4xl font-bold text-green-900",children:["£",l.totalIncome.toLocaleString()]})]})}),n.jsx(_e,{className:"border-2 border-red-200 bg-gradient-to-br from-red-50 to-white",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(Ju,{className:"w-8 h-8 text-red-600 mx-auto mb-3"}),n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Total Expenses"}),n.jsxs("div",{className:"text-4xl font-bold text-red-900",children:["£",l.totalExpenses.toLocaleString()]})]})}),n.jsx(_e,{className:`border-2 ${l.grossProfit>=0?"border-blue-200 bg-gradient-to-br from-blue-50 to-white":"border-orange-200 bg-gradient-to-br from-orange-50 to-white"}`,children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(km,{className:`w-8 h-8 ${l.grossProfit>=0?"text-blue-600":"text-orange-600"} mx-auto mb-3`}),n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Gross Profit"}),n.jsxs("div",{className:`text-4xl font-bold ${l.grossProfit>=0?"text-blue-900":"text-orange-900"}
1341`,children:["£",l.grossProfit.toLocaleString()]}),n.jsxs("div",{className:"text-sm text-gray-600 mt-2",children:[l.profitMargin,"% margin"]})]})})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(ka,{className:"w-5 h-5 text-green-600"}),"Income by Category"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[Object.entries(l.incomeByCategory).map(([d,h])=>n.jsxs("div",{className:"flex justify-between items-center p-3 bg-green-50 rounded-lg border border-green-200",children:[n.jsx("span",{className:"font-medium text-gray-700",children:d}),n.jsxs("span",{className:"font-bold text-green-900",children:["£",h.toLocaleString()]})]},d)),Object.keys(l.incomeByCategory).length===0&&n.jsx("p",{className:"text-center text-gray-500 py-6",children:"No income in this period"})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Ju,{className:"w-5 h-5 text-red-600"}),"Expenses by Category"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[Object.entries(l.expensesByCategory).map(([d,h])=>n.jsxs("div",{className:"flex justify-between items-center p-3 bg-red-50 rounded-lg border border-red-200",children:[n.jsx("span",{className:"font-medium text-gray-700",children:d}),n.jsxs("span",{className:"font-bold text-red-900",children:["£",h.toLocaleString()]})]},d)),Object.keys(l.expensesByCategory).length===0&&n.jsx("p",{className:"text-center text-gray-500 py-6",children:"No expenses in this period"})]})})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Outstanding Items"})}),n.jsx(Ce,{children:n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"p-6 bg-amber-50 rounded-lg border-2 border-amber-200",children:[n.jsx("h4",{className:"font-semibold text-amber-900 mb-3",children:"Outstanding Receivables"}),n.jsxs("div",{className:"text-3xl font-bold text-amber-900 mb-2",children:["£",l.outstandingReceivables.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-amber-700",children:[t.filter(d=>d.status!=="Paid"&&d.status!=="Cancelled").length," unpaid invoice",t.filter(d=>d.status!=="Paid"&&d.status!=="Cancelled").length!==1?"s":""]})]}),n.jsxs("div",{className:"p-6 bg-orange-50 rounded-lg border-2 border-orange-200",children:[n.jsx("h4",{className:"font-semibold text-orange-900 mb-3",children:"Outstanding Payables"}),n.jsxs("div",{className:"text-3xl font-bold text-orange-900 mb-2",children:["£",l.outstandingPayables.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-orange-700",children:[r.filter(d=>d.status!=="Paid"&&d.status!=="Cancelled").length," unpaid bill",r.filter(d=>d.status!=="Paid"&&d.status!=="Cancelled").length!==1?"s":""]})]})]})})]})]})}function H3e({transactions:e=[],invoices:t=[],bills:r=[]}){const a=L.useMemo(()=>{const s=new Date,o=mpe({start:W6(s),end:H6(s)}).map(c=>{const d=K6(c),h=yt(c,"d MMM"),u=e.filter(m=>m.transaction_type==="Income"&&m.status==="Paid").filter(m=>{const b=new Date(m.date);return SA(b,{start:c,end:d})}).reduce((m,b)=>m+b.gross_amount,0),f=e.filter(m=>m.transaction_type==="Expense"&&m.status==="Paid").filter(m=>{const b=new Date(m.date);return SA(b,{start:c,end:d})}).reduce((m,b)=>m+b.gross_amount,0);return{week:h,income:u,expenses:f,net:u-f}}),l=r.filter(c=>c.status!=="Paid"&&c.status!=="Cancelled").filter(c=>{const d=new Date(c.due_date),h=new Date;return h.setDate(h.getDate()+30),d<=h}).sort((c,d)=>new Date(c.due_date)-new Date(d.due_date));return{weeklyData:o,upcomingBills:l}},[e,r]);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Cashflow View"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Weekly money in and money out"})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(za,{className:"w-5 h-5 text-blue-600"}),"Weekly Cashflow - ",yt(new Date,"MMMM yyyy")]})}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-4",children:a.weeklyData.map((s,i)=>n.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg border-2 border-gray-200",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("h4",{className:"font-semibold text-gray-900",children:["Week of ",s.week]}),n.jsxs(dt,{className:s.net>=0?"bg-green-500 text-white":"bg-red-500 text-white",children:["Net: £",s.net.toLocaleStr
1341ing()]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"text-center p-3 bg-green-50 rounded border border-green-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Income"}),n.jsxs("div",{className:"text-xl font-bold text-green-900",children:["£",s.income.toLocaleString()]})]}),n.jsxs("div",{className:"text-center p-3 bg-red-50 rounded border border-red-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Expenses"}),n.jsxs("div",{className:"text-xl font-bold text-red-900",children:["£",s.expenses.toLocaleString()]})]})]})]},i))})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Mr,{className:"w-5 h-5 text-amber-600"}),"Upcoming Bills (Next 30 Days)"]})}),n.jsx(Ce,{children:a.upcomingBills.length===0?n.jsx("p",{className:"text-center text-gray-500 py-8",children:"No upcoming bills"}):n.jsx("div",{className:"space-y-3",children:a.upcomingBills.map(s=>n.jsxs("div",{className:"flex justify-between items-center p-4 bg-amber-50 rounded-lg border border-amber-200",children:[n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold text-gray-900",children:s.supplier_name}),n.jsxs("div",{className:"text-sm text-gray-600",children:["Due: ",yt(new Date(s.due_date),"d MMMM yyyy")]})]}),n.jsxs("div",{className:"text-right",children:[n.jsxs("div",{className:"text-xl font-bold text-amber-900",children:["£",s.total.toLocaleString()]}),n.jsx(dt,{className:"bg-amber-500 text-white text-xs",children:s.status})]})]},s.id))})})]})]})}function W3e(){const[e,t]=L.useState(!1),[r,a]=L.useState(null),[s,i]=L.useState({code:"",label:"",description:"",is_active:!0,display_order:0}),o=Sr(),{data:l=[]}=xt({queryKey:["expenseCategories"],queryFn:()=>pe.entities.ExpenseCategory.list("display_order",100)}),c=Tt({mutationFn:g=>pe.entities.ExpenseCategory.create(g),onSuccess:()=>{o.invalidateQueries({queryKey:["expenseCategories"]}),t(!1),u()}}),d=Tt({mutationFn:({id:g,data:y})=>pe.entities.ExpenseCategory.update(g,y),onSuccess:()=>{o.invalidateQueries({queryKey:["expenseCategories"]}),t(!1),a(null),u()}}),h=Tt({mutationFn:g=>pe.entities.ExpenseCategory.delete(g),onSuccess:()=>{o.invalidateQueries({queryKey:["expenseCategories"]})}}),u=()=>{i({code:"",label:"",description:"",is_active:!0,display_order:0})},f=g=>{g.preventDefault(),r?d.mutate({id:r.id,data:s}):c.mutate(s)},m=g=>{a(g),i({code:g.code,label:g.label,description:g.description||"",is_active:g.is_active,display_order:g.display_order||0}),t(!0)},b=g=>{d.mutate({id:g.id,data:{...g,is_active:!g.is_active}})};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Expense Categories"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Manage expense categories used throughout budgets and transactions"})]}),n.jsxs(me,{onClick:()=>{a(null),u(),t(!0)},className:"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Category"]})]}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsx(Ce,{className:"p-6",children:l.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Yw,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No expense categories defined yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Code"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Label"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:l.map((g,y)=>n.jsxs("tr",{className:`${y%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-indigo-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",className:"font-mono text-xs",children:g.code})}),n.jsx("td",{className:"py-3 px-4 font-semibold text-gray-900",children:g.label}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:g.description||"-"}),n.jsx("td",{className:"py-3 px-4 text-center",children:n.jsxs("div",{className:"flex items-center justify-center gap-2",children:[n.jsx(Cs,{checked:g.is_active,onCheckedChange:()=>b(g)}),n.jsx(dt,{className:g.is_active?"bg-green-500 text-white":"bg-gray-400 text-white",children:g.is_active?"Active":"Inactive"})]})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex justify-center gap-2",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>
1341m(g),children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{confirm(`Delete category "${g.label}"? This may affect existing transactions.`)&&h.mutate(g.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},g.id))})]})})})}),n.jsx(Nn,{open:e,onOpenChange:g=>{t(g),g||(a(null),u())},children:n.jsxs(vn,{className:"max-w-lg",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-xl font-bold text-primary-navy",children:r?"Edit Expense Category":"Create Expense Category"})}),n.jsxs("form",{onSubmit:f,className:"space-y-4 py-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Category Code *"}),n.jsx(Me,{value:s.code,onChange:g=>i({...s,code:g.target.value.toUpperCase()}),placeholder:"e.g., EXP-ENTERTAINMENT",disabled:!!r,required:!0}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Unique identifier (cannot be changed after creation)"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Category Label *"}),n.jsx(Me,{value:s.label,onChange:g=>i({...s,label:g.target.value}),placeholder:"e.g., Entertainment",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Description"}),n.jsx(en,{value:s.description,onChange:g=>i({...s,description:g.target.value}),placeholder:"What expenses fall under this category...",rows:3})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Display Order"}),n.jsx(Me,{type:"number",value:s.display_order,onChange:g=>i({...s,display_order:parseInt(g.target.value)||0}),placeholder:"0"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lower numbers appear first"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Cs,{checked:s.is_active,onCheckedChange:g=>i({...s,is_active:g})}),n.jsx(ye,{children:"Active"})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{t(!1),a(null)},className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-indigo-600 hover:bg-indigo-700 text-white font-bold",disabled:c.isPending||d.isPending,children:c.isPending||d.isPending?"Saving...":r?"Update Category":"Create Category"})]})]})]})})]})}function K3e(){const[e,t]=L.useState(!1),[r,a]=L.useState(null),[s,i]=L.useState({code:"",label:"",description:"",is_active:!0,display_order:0}),o=Sr(),{data:l=[]}=xt({queryKey:["incomeCategories"],queryFn:()=>pe.entities.IncomeCategory.list("display_order",100)}),c=Tt({mutationFn:g=>pe.entities.IncomeCategory.create(g),onSuccess:()=>{o.invalidateQueries({queryKey:["incomeCategories"]}),t(!1),u()}}),d=Tt({mutationFn:({id:g,data:y})=>pe.entities.IncomeCategory.update(g,y),onSuccess:()=>{o.invalidateQueries({queryKey:["incomeCategories"]}),t(!1),a(null),u()}}),h=Tt({mutationFn:g=>pe.entities.IncomeCategory.delete(g),onSuccess:()=>{o.invalidateQueries({queryKey:["incomeCategories"]})}}),u=()=>{i({code:"",label:"",description:"",is_active:!0,display_order:0})},f=g=>{g.preventDefault(),r?d.mutate({id:r.id,data:s}):c.mutate(s)},m=g=>{a(g),i({code:g.code,label:g.label,description:g.description||"",is_active:g.is_active,display_order:g.display_order||0}),t(!0)},b=g=>{d.mutate({id:g.id,data:{...g,is_active:!g.is_active}})};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Income Categories"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Manage income categories used throughout budgets and transactions"})]}),n.jsxs(me,{onClick:()=>{a(null),u(),t(!0)},className:"bg-green-600 hover:bg-green-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Category"]})]}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsx(Ce,{className:"p-6",children:l.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Yw,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No income categories defined yet"})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Code"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Label"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Description"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:l.map((g,y)=>n.jsxs("tr",{className:`${y%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-green-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",className:"font-mono text-xs",children:g.code})}),n.jsx("td",{className:"py-3 px-4 font-semibold text-gray-900",children:g.label}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:g.description||"-"}),n.jsx("td",{className:"py-3 px-4 text-center",children:n.jsxs("div",{className:"flex items-center justify-center gap-2",children:[n.jsx(Cs,{checked:g.is_active,onCheckedChange:()=>b(g)}),n.jsx(dt,{className:g.is_active?"bg-green-500 text-white":"bg-gray-400 text-white",children:g.is_active?"Active":"Inactive"})]})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex justify-center gap-2",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>
1341m(g),children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{confirm(`Delete category "${g.label}"? This may affect existing transactions.`)&&h.mutate(g.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},g.id))})]})})})}),n.jsx(Nn,{open:e,onOpenChange:g=>{t(g),g||(a(null),u())},children:n.jsxs(vn,{className:"max-w-lg",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-xl font-bold text-primary-navy",children:r?"Edit Income Category":"Create Income Category"})}),n.jsxs("form",{onSubmit:f,className:"space-y-4 py-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Category Code *"}),n.jsx(Me,{value:s.code,onChange:g=>i({...s,code:g.target.value.toUpperCase()}),placeholder:"e.g., INC-TICKETS",disabled:!!r,required:!0}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Unique identifier (cannot be changed after creation)"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Category Label *"}),n.jsx(Me,{value:s.label,onChange:g=>i({...s,label:g.target.value}),placeholder:"e.g., Ticket Sales",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Description"}),n.jsx(en,{value:s.description,onChange:g=>i({...s,description:g.target.value}),placeholder:"What income falls under this category...",rows:3})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Display Order"}),n.jsx(Me,{type:"number",value:s.display_order,onChange:g=>i({...s,display_order:parseInt(g.target.value)||0}),placeholder:"0"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lower numbers appear first"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Cs,{checked:s.is_active,onCheckedChange:g=>i({...s,is_active:g})}),n.jsx(ye,{children:"Active"})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{t(!1),a(null)},className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-bold",disabled:c.isPending||d.isPending,children:c.isPending||d.isPending?"Saving...":r?"Update Category":"Create Category"})]})]})]})})]})}function G3e(){return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Finance Settings"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Configure chart of accounts, payment methods, and integrations"})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Uq,{className:"w-5 h-5 text-gray-600"}),"Configuration"]}),n.jsx(wr,{children:"Finance system configuration and setup"})]}),n.jsxs(Ce,{className:"space-y-8",children:[n.jsx(K3e,{}),n.jsx(W3e,{}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"p-6 border-2 border-gray-200 rounded-lg",children:[n.jsx(ms,{className:"w-8 h-8 text-blue-600 mb-3"}),n.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"Organisation Details"}),n.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Configure company name, address, VAT number, and bank details for invoices"}),n.jsx(me,{variant:"outline",children:"Configure"})]}),n.jsxs("div",{className:"p-6 border-2 border-gray-200 rounded-lg",children:[n.jsx(pr,{className:"w-8 h-8 text-purple-600 mb-3"}),n.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"Chart of Accounts"}),n.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Manage income and expense categories for accurate reporting"}),n.jsx(me,{variant:"outline",children:"Manage Accounts"})]})]})]})]}),n.jsx(_e,{className:"bg-blue-50 border-2 border-blue-200",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("h3",{className:"font-bold text-blue-900 mb-2",children:"Finance System Status"}),n.jsx("p",{className:"text-sm text-blue-700",children:"The finance system is operational and tracking all income and expenses. Ticket and sponsorship integrations are active."})]})})]})}function NY(){const[e,t]=L.useState(null),[r,a]=L.useState(!0),[s,i]=L.useState("all");Sr(),L.useEffect(()=>{o()},[]);const o=async()=>{try{const b=await pe.auth.me();if(t(b),b.role!=="admin"){a(!1);return}}catch(b){console.error(b)}a(!1)},{data:l=[]}=xt({queryKey:["financeTransactions"],queryFn:()=>pe.entities.FinanceTransaction.list("-date",500),enabled:(e==null?void 0:e.role)==="admin"}),{data:c=[]}=xt({queryKey:["invoices"],queryFn:()=>pe.entities.Invoice.list("-issue_date",200),enabled:(e==null?void 0:e.role)==="admin"}),{data:d=[]}=xt({queryKey:["bills"],queryFn:()=>pe.entities.Bill.list("-issue_date",200),enabled:(e==null?void 0:e.role)==="admin"}),{data:h=[]}=xt({queryKey:["payments"],queryFn:()=>pe.entities.Payment.list("-payment_date",500),enabled:(e==null?void 0:e.role)==="admin"}),{data:u=[]}=xt({queryKey:["tableBookings"],queryFn:()=>pe.entities.TableBooking.list("table_number",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:f=[]}=xt({queryKey:["sponsors"],queryFn:()=>pe.entities.Sponsor.list("display_order",100),enabled:(e==null?void 0:e.role)==="admin"}),m=L.useMemo(()=>{const b=l.filter(A=>A.transaction_type==="Income"&&A.status==="Paid").reduce((A,T)=>A+(T.gross_amount||0),0),g=l.filter(A=>A.transaction_type==="Expense"&&A.status==="Paid").reduce((A,T)=>A+(T.gross_amount||0),0),y=b-g,x=c.filter(A=>A.status!=="Paid"&&A.status!=="Cancelled").reduce((A,T)=>A+(T.total-(T.amount_paid||0)),0),w=d.filter(A=>A.status!=="Paid"&&A.status!=="Cancelled").reduce((A,T)=>A+(T.total-(T.amount_paid||0)),0),j=u.reduce((A,T)=>A+(T.amount_paid||0),0),N=l.filter(A=>A.source_type==="Sponsorship"&&A.status==="Paid").reduce((A,T)=>A+(T.gross_amount||0),0),_=c.filter(A=>A.status!=="Paid"&&A.status!=="Cancelled"&&gc(new Date(A.due_date),new Date)).length,S=d.filter(A=>A.status!=="Paid"&&A.status!=="Cancelled"&&gc(new Date(A.due_date),new Date)).length;return{totalIncome:b,totalExpenses:g,netProfit:y,profitMargin:b>0?(y/b*100).toFixed(1):0,outstandingInvoices:x,outstandingBills:w,cashPosition:b-g+x-w,ticketRevenue:j,sponsorshipRevenue:N,overdueInvoices:_,overdueBills:S}},[l,c,d,u]);return r?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-accent-gold border-t-transparent"})}):!e||e.role!=="admin"?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md w-full border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(ps,{className:"w-16 h-16 mx-auto mb-6 text-red-600"}),n.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Access Denied"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"You do not have permission to access the Finance Dashboard."}),n.jsx(me,{onClick:()=>window.location.href="/",className:"bg-primary-navy",children:"Return to Home"})]})})}):n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 py-8",children:n.jsxs("section",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(wC,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Finance & Accounts"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Complete financial management for the National Charity Today Awards™"})]})]}),n.jsx("section",{className:"pb-8",children:n.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:[n.jsx(lt.div,{initial:{opacity:0,y:20}
1341,animate:{opacity:1,y:0},transition:{delay:0},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"w-14 h-14 bg-green-100 rounded-2xl flex items-center justify-center",children:n.jsx(mX,{className:"w-7 h-7 text-green-600"})}),n.jsx(ka,{className:"w-5 h-5 text-green-600"})]}),n.jsx("h3",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Total Income"}),n.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:["£",m.totalIncome.toLocaleString()]}),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsxs(dt,{className:"bg-green-100 text-green-800 text-xs",children:["Ticket: £",m.ticketRevenue.toLocaleString()]}),n.jsxs(dt,{className:"bg-blue-100 text-blue-800 text-xs",children:["Sponsor: £",m.sponsorshipRevenue.toLocaleString()]})]})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"w-14 h-14 bg-red-100 rounded-2xl flex items-center justify-center",children:n.jsx(hX,{className:"w-7 h-7 text-red-600"})}),n.jsx(Ju,{className:"w-5 h-5 text-red-600"})]}),n.jsx("h3",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Total Expenses"}),n.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:["£",m.totalExpenses.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[d.filter(b=>b.status==="Paid").length," bills paid"]})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsx(_e,{className:`border-none shadow-xl ${m.netProfit>=0?"bg-gradient-to-br from-emerald-50 to-white":"bg-gradient-to-br from-red-50 to-white"}`,children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:`w-14 h-14 ${m.netProfit>=0?"bg-emerald-100":"bg-red-100"} rounded-2xl flex items-center justify-center`,children:n.jsx(km,{className:`w-7 h-7 ${m.netProfit>=0?"text-emerald-600":"text-red-600"}`})}),m.netProfit>=0?n.jsx(ka,{className:"w-5 h-5 text-emerald-600"}):n.jsx(Ju,{className:"w-5 h-5 text-red-600"})]}),n.jsx("h3",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Net Profit"}),n.jsxs("div",{className:`text-3xl font-bold ${m.netProfit>=0?"text-emerald-900":"text-red-900"}`,children:["£",m.netProfit.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[m.profitMargin,"% margin"]})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"w-14 h-14 bg-amber-100 rounded-2xl flex items-center justify-center",children:n.jsx(iZ,{className:"w-7 h-7 text-amber-600"})}),n.jsx(Mr,{className:"w-5 h-5 text-amber-600"})]}),n.jsx("h3",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Outstanding"}),n.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:["£",m.outstandingInvoices.toLocaleString()]}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[m.overdueInvoices," overdue invoice",m.overdueInvoices!==1?"s":""]})]})})})]})}),n.jsx("section",{className:"py-8",children:n.jsxs(nl,{defaultValue:"overview",className:"space-y-6",children:[n.jsxs(wo,{className:"bg-white shadow-lg flex-wrap h-auto",children:[n.jsx(ln,{value:"overview",children:"Overview"}),n.jsx(ln,{value:"income",children:"Income"}),n.jsx(ln,{value:"expenses",children:"Expenses"}),n.jsx(ln,{value:"budget",children:"Budget & Forecast"}),n.jsx(ln,{value:"invoices",children:"Invoices"}),n.jsx(ln,{value:"bills",children:"Bills"}),n.jsx(ln,{value:"reports",children:"P&L Reports"}),n.jsx(ln,{value:"cashflow",children:"Cashflow"}),n.jsx(ln,{value:"settings",children:"Settings"})]}),n.jsx(cn,{value:"overview",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"text-lg flex items-center gap-2",children:[n.jsx(pr,{className:"w-5 h-5 text-blue-600"}),"Invoices"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Total"}),n.jsx("span",{className:"font-bold text-gray-900",children:c.length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Paid"}),n.jsx("span",{className:"font-bold text-green-600",children:c.filter(b=>b.status==="Paid").length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Overdue"}),n.jsx("span",{className:"font-bold text-red-600",children:m.overdueInvoices})]})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"text-lg flex items-center gap-2",children:[n.jsx(Bq,{className:"w-5 h-5 text-orange-600"}),"Bills"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Total"}),n.jsx("span",{className:"font-bold text-gray-900",children:d.length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Paid"}),n.jsx("span",{className:"font-bold text-green-600",children:d.filter(b=>b.status==="Paid").length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Overdue"}),n.jsx("span",{className:"font-bold text-red-600",children:m.overdueBills})]})]})})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"text-lg flex items-center gap-2",children:[n.jsx(Lq,{className:"w-5 h-5 text-purple-600"}),"Transactions"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Total"}),n.jsx("span",{className:"font-bold text-gray-900",children:l.length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Income"}),n.jsx("span",{className:"font-bold text-green-600",children:l.filter(b=>b.transaction_type==="Income").length})]}),n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Expense"}),n.jsx("span",{className:"font-bold text-red-600",children:l.filter(b=>b.transaction_type==="Expense").length})]})]})})]})]}),n.jsxs(_e,{className:"border-none shadow-lg",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Mq,{className:"w-5 h-5 text-indigo-600"}),"Revenue Sources"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"text-center p-6 bg-gradient-to-br from-blue-50 to-white rounded-xl border-2 border-blue-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Ticket Sales"}),n.jsxs("div",{className:"text-3xl font-bold text-blue-900",children:["£",m.ticketRevenue.toLocaleStr
1341ing()]}),n.jsxs("div",{className:"text-xs text-gray-500 mt-2",children:[u.length," tables booked"]})]}),n.jsxs("div",{className:"text-center p-6 bg-gradient-to-br from-purple-50 to-white rounded-xl border-2 border-purple-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Sponsorship"}),n.jsxs("div",{className:"text-3xl font-bold text-purple-900",children:["£",m.sponsorshipRevenue.toLocaleString()]}),n.jsxs("div",{className:"text-xs text-gray-500 mt-2",children:[f.filter(b=>b.is_active).length," active sponsors"]})]}),n.jsxs("div",{className:"text-center p-6 bg-gradient-to-br from-green-50 to-white rounded-xl border-2 border-green-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-600 mb-2",children:"Other Income"}),n.jsxs("div",{className:"text-3xl font-bold text-green-900",children:["£",(m.totalIncome-m.ticketRevenue-m.sponsorshipRevenue).toLocaleString()]}),n.jsx("div",{className:"text-xs text-gray-500 mt-2",children:"Donations, ads, etc."})]})]})})]}),(m.overdueInvoices>0||m.overdueBills>0)&&n.jsx(_e,{className:"border-l-4 border-red-500 bg-red-50",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsx(Mr,{className:"w-6 h-6 text-red-600 flex-shrink-0 mt-1"}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-red-900 mb-2",children:"Action Required"}),n.jsxs("ul",{className:"space-y-1 text-sm text-red-700",children:[m.overdueInvoices>0&&n.jsxs("li",{children:["• ",m.overdueInvoices," overdue invoice",m.overdueInvoices!==1?"s":""," - £",m.outstandingInvoices.toLocaleString()," outstanding"]}),m.overdueBills>0&&n.jsxs("li",{children:["• ",m.overdueBills," overdue bill",m.overdueBills!==1?"s":""," - £",m.outstandingBills.toLocaleString()," to pay"]})]})]})]})})})]})}),n.jsx(cn,{value:"income",children:n.jsx(q3e,{transactions:l,tableBookings:u,sponsors:f})}),n.jsx(cn,{value:"expenses",children:n.jsx(B3e,{transactions:l,bills:d})}),n.jsx(cn,{value:"budget",children:n.jsx($3e,{transactions:l,invoices:c,tableBookings:u,sponsors:f})}),n.jsx(cn,{value:"invoices",children:n.jsx(U3e,{invoices:c})}),n.jsx(cn,{value:"bills",children:n.jsx(z3e,{bills:d})}),n.jsx(cn,{value:"reports",children:n.jsx(V3e,{transactions:l,invoices:c,bills:d})}),n.jsx(cn,{value:"cashflow",children:n.jsx(H3e,{transactions:l,invoices:c,bills:d})}),n.jsx(cn,{value:"settings",children:n.jsx(G3e,{})})]})})]})})}function _Y(){var k;const[e,t]=L.useState(""),[r,a]=L.useState("priority"),[s,i]=L.useState(null),[o,l]=L.useState({}),[c,d]=L.useState(!1),[h,u]=L.useState(!1),[f,m]=L.useState(null),b=Sr(),{data:g=[],isLoading:y}=xt({queryKey:["allPageSEO"],queryFn:()=>pe.entities.PageSEO.list("-priority",100)}),x=Tt({mutationFn:P=>pe.entities.PageSEO.create(P),onSuccess:()=>{b.invalidateQueries({queryKey:["allPageSEO"]}),i(null),l({})}}),w=Tt({mutationFn:({id:P,data:O})=>pe.entities.PageSEO.update(P,O),onSuccess:()=>{b.invalidateQueries({queryKey:["allPageSEO"]}),i(null),l({})}}),j=P=>{i(P),l(P)},N=()=>{i({isNew:!0}),l({page_name:"",meta_title:"",meta_description:"",keywords:[],robots_index:!0,robots_follow:!0,priority:.5,change_frequency:"weekly",is_active:!0})},_=()=>{s.isNew?x.mutate(o):w.mutate({id:s.id,data:o})},S=(P,O)=>{l(F=>({...F,[P]:O}))},A=async()=>{u(!0);try{const P=await pe.functions.invoke("generateComprehensiveWebsiteReport",{});m(P.data),alert("✓ Comprehensive system report generated!")}catch(P){console.error("Error generating report:",P),alert("Failed to generate report. Please try again.")}u(!1)},T=P=>{let O=0;if(P.meta_title){const G=P.meta_title.length;G>=50&&G<=60?O+=20:G>=40&&G<=70?O+=15:G>0&&(O+=10)}if(P.meta_description){const G=P.meta_description.length;G>=150&&G<=160?O+=20:G>=120&&G<=180?O+=15:G>0&&(O+=10)}P.keywords&&P.keywords.length>0&&(P.keywords.length>=5?O+=15:P.keywords.length>=3?O+=12:O+=8);let F=0;(P.og_title||P.meta_title)&&(F+=5),(P.og_description||P.meta_description)&&(F+=5),P.og_image&&(F+=5),O+=F;let $=0;return P.robots_index!==!1&&($+=5),P.canonical_url&&($+=5),P.structured_data&&($+=5),O+=$,P.h1_heading?O+=15:P.meta_title&&(O+=8),Math.round(O)},R=async P=>{var O;d(!0);try{const F=await pe.integrations.Core.InvokeLLM({prompt:`You are an expert SEO analyst. Analyze this page's SEO configuration and provide a comprehensive score and recommendations.
1342
1343PAGE SEO CONFIGURATION:
1344Page Name: ${P.page_name}
1345Meta Title: ${P.meta_title||"NOT SET"}
1346Meta Title Length: ${(P.meta_title||"").length} characters
1347Meta Description: ${P.meta_description||"NOT SET"}
1348Meta Description Length: ${(P.meta_description||"").length} characters
1349H1 Heading: ${P.h1_heading||"NOT SET"}
1350Keywords: ${((O=P.keywords)==null?void 0:O.join(", "))||"NOT SET"}
1351OG Title: ${P.og_title||"Not set (defaults to meta title)"}
1352OG Description: ${P.og_description||"Not set (defaults to meta de
1352scription)"}
1353OG Image: ${P.og_image||"NOT SET"}
1354Twitter Card Configured: ${P.twitter_title||P.twitter_description||P.twitter_image?"Yes":"No"}
1355Canonical URL: ${P.canonical_url||"Auto-generated"}
1356Robots Index: ${P.robots_index!==!1?"Allowed":"Blocked"}
1357Robots Follow: ${P.robots_follow!==!1?"Allowed":"Blocked"}
1358Sitemap Priority: ${P.priority||.5}
1359Structured Data: ${P.structured_data?"Configured":"NOT SET"}
1360
1361Evaluate this SEO configuration on the following criteria:
1362
13631. **Title Optimization (0-20 points)**: Is the meta title between 50-60 characters? Is it compelling and keyword-rich? Does it include brand name?
1364
13652. **Description Quality (0-20 points)**: Is the meta description between 150-160 characters? Is it compelling with a clear call-to-action?
1366
13673. **Keywords & Targeting (0-15 points)**: Are relevant keywords defined? Are they naturally integrated into title and description?
1368
13694. **Social Media Optimization (0-15 points)**: Are Open Graph tags configured? Is there a proper OG image (1200x630px)? Are Twitter cards set up?
1370
13715. **Technical SEO (0-15 points)**: Is indexing enabled? Is there a canonical URL? Is structured data present? Is sitemap priority appropriate?
1372
13736. **H1 & Content Signals (0-15 points)**: Is there a proper H1 heading? Does it align with title and keywords?
1374
1375Provide:
1376- A total score out of 100
1377- Individual scores for each criterion
1378- 3-5 specific, actionable recommendations to improve this page's SEO
1379- A priority level for each recommendation (High, Medium, Low)
1380
1381Be specific and actionable in your recommendations.`,response_json_schema:{type:"object",properties:{total_score:{type:"number"},title_optimization:{type:"number"},description_quality:{type:"number"},keywords_targeting:{type:"number"},social_optimization:{type:"number"},technical_seo:{type:"number"},content_signals:{type:"number"},recommendations:{type:"array",items:{type:"object",properties:{priority:{type:"string"},recommendation:{type:"string"}}}},summary:{type:"string"}}}});await pe.entities.PageSEO.update(P.id,{seo_score:F.total_score,seo_analysis:{title_optimization:F.title_optimization,description_quality:F.description_quality,keywords_targeting:F.keywords_targeting,social_optimization:F.social_optimization,technical_seo:F.technical_seo,content_signals:F.content_signals,recommendations:F.recommendations,summary:F.summary,analyzed_at:new Date().toISOString()}}),b.invalidateQueries({queryKey:["allPageSEO"]}),alert("✓ SEO analysis complete!")}catch(F){console.error("Error analyzing SEO:",F),alert("Failed to analyze SEO. Please try again.")}d(!1)},M=g.filter(P=>{var O;return P.page_name.toLowerCase().includes(e.toLowerCase())||((O=P.meta_title)==null?void 0:O.toLowerCase().includes(e.toLowerCase()))}).sort((P,O)=>{if(r==="seo_score"){const F=P.seo_score||T(P),$=O.seo_score||T(O);return F-$}return(O.priority||.5)-(P.priority||.5)});return s?n.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"mb-6",children:[n.jsxs(me,{variant:"ghost",onClick:()=>{i(null),l({})},className:"mb-4",children:[n.jsx(wm,{className:"w-4 h-4 mr-2"}),"Back to SEO Manager"]}),n.jsx("h1",{className:"text-3xl font-bold text-primary-navy",children:s.isNew?"Create New Page SEO":`Edit SEO: ${s.page_name}`})]}),n.jsxs(nl,{defaultValue:"basic",className:"space-y-6",children:[n.jsxs(wo,{className:"grid w-full grid-cols-4",children:[n.jsx(ln,{value:"basic",children:"Basic SEO"}),n.jsx(ln,{value:"social",children:"Social Media"}),n.jsx(ln,{value:"advanced",children:"Advanced"}),n.jsx(ln,{value:"settings",children:"Settings"})]}),n.jsx(cn,{value:"basic",children:n.jsxs(_e,{children:[n.jsxs(Nt,{children:[n.jsx(Pt,{children:"Basic SEO Information"}),n.jsx(wr,{children:"Core meta tags and page information"})]}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Page Name *"}),n.jsx(Me,{value:o.page_name||"",onChange:P=>S("page_name",P.target.value),placeholder:"e.g., Home, Categories, Nominations"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Internal identifier for this page"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Meta Title * (50-60 characters)"}),n.jsx(Me,{value:o.meta_title||"",onChange:P=>S("meta_title",P.target.value),placeholder:"National Charity Awards UK | Charity Today Awards 2026",maxLength:70}),n.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[(o.meta_title||"").length," / 60 characters"]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Meta Description * (150-160 characters)"}),n.jsx(en,{value:o.meta_description||"",onChange:P=>S("meta_description",P.target.value),placeholder:"Celebrate excellence in the UK charity sector at the National Charity Today Awards. Submit nominations for charity of the year and local charity awards.",maxLength:200,rows:3}),n.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[(o.meta_description||"").length," / 160 characters"]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"H1 Heading"}),n.jsx(Me,{value:o.h1_heading||"",onChange:P=>S("h1_heading",P.target.value),placeholder:"Primary heading for the page"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Target Keywords (comma-separated)"}),n.jsx(en,{value:(o.keywords||[]).join(", "),onChange:P=>S("keywords",P.target.value.split(",").map(O=>O.trim())),placeholder:"national charity awards, charity of the year, UK charity awards",rows:2})]})]})]})}),n.jsx(cn,{value:"social",children:n.jsxs(_e,{children:[n.jsxs(Nt,{children:[n.jsx(Pt,{children:"Social Media Tags"}),n.jsx(wr,{children:"Open Graph and Twitter Card metadata"})]}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"font-semibold text-lg",children:"Open Graph (Facebook, LinkedIn)"}),n.jsxs("div",{children:[n.jsx(ye,{children:"OG Title"}),n.jsx(Me,{value:o.og_title||"",onChange:P=>S("og_title",P.target.value),placeholder:"Defaults to meta title"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"OG Description"}),n.jsx(en,{value:o.og_description||"",onChange:P=>S("og_description",P.target.value),placeholder:"Defaults to meta de
1381scription",rows:2})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"OG Image URL"}),n.jsx(Me,{value:o.og_image||"",onChange:P=>S("og_image",P.target.value),placeholder:"https://example.com/image.jpg (1200x630px recommended)"})]})]}),n.jsxs("div",{className:"border-t pt-6 space-y-4",children:[n.jsx("h3",{className:"font-semibold text-lg",children:"Twitter Card"}),n.jsxs("div",{children:[n.jsx(ye,{children:"Twitter Title"}),n.jsx(Me,{value:o.twitter_title||"",onChange:P=>S("twitter_title",P.target.value),placeholder:"Defaults to OG title"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Twitter Description"}),n.jsx(en,{value:o.twitter_description||"",onChange:P=>S("twitter_description",P.target.value),placeholder:"Defaults to OG description",rows:2})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Twitter Image URL"}),n.jsx(Me,{value:o.twitter_image||"",onChange:P=>S("twitter_image",P.target.value),placeholder:"Defaults to OG image"})]})]})]})]})}),n.jsx(cn,{value:"advanced",children:n.jsxs(_e,{children:[n.jsxs(Nt,{children:[n.jsx(Pt,{children:"Advanced SEO Settings"}),n.jsx(wr,{children:"Technical SEO configuration"})]}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Custom URL Slug"}),n.jsx(Me,{value:o.custom_url_slug||"",onChange:P=>S("custom_url_slug",P.target.value),placeholder:"custom-url-slug"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave empty to use default page name"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Canonical URL"}),n.jsx(Me,{value:o.canonical_url||"",onChange:P=>S("canonical_url",P.target.value),placeholder:"https://nationalcharitytodayawards.co.uk/page"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Auto-generated if not provided"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Sitemap Priority (0.0 - 1.0)"}),n.jsx(Me,{type:"number",min:"0",max:"1",step:"0.1",value:o.priority||.5,onChange:P=>S("priority",parseFloat(P.target.value))})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Change Frequency"}),n.jsxs(Qt,{value:o.change_frequency||"weekly",onValueChange:P=>S("change_frequency",P),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"always",children:"Always"}),n.jsx(Ae,{value:"hourly",children:"Hourly"}),n.jsx(Ae,{value:"daily",children:"Daily"}),n.jsx(Ae,{value:"weekly",children:"Weekly"}),n.jsx(Ae,{value:"monthly",children:"Monthly"}),n.jsx(Ae,{value:"yearly",children:"Yearly"}),n.jsx(Ae,{value:"never",children:"Never"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Structured Data (JSON-LD)"}),n.jsx(en,{value:o.structured_data?JSON.stringify(o.structured_data,null,2):"",onChange:P=>{try{S("structured_data",JSON.parse(P.target.value))}catch{}},placeholder:'{"@context": "https://schema.org", "@type": "WebPage"}',rows:6,className:"font-mono text-sm"})]})]})]})}),n.jsx(cn,{value:"settings",children:n.jsxs(_e,{children:[n.jsxs(Nt,{children:[n.jsx(Pt,{children:"Page Settings"}),n.jsx(wr,{children:"Control indexing and visibility"})]}),n.jsxs(Ce,{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Allow Search Engine Indexing"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Let search engines index this page"})]}),n.jsx(Cs,{checked:o.robots_index!==!1,onCheckedChange:P=>S("robots_index",P)})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Follow Links"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Allow search engines to follow links on this page"})]}),n.jsx(Cs,{checked:o.robots_follow!==!1,onCheckedChange:P=>S("robots_follow",P)})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Active Configuration"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Enable this SEO configuration"})]}),n.jsx(Cs,{checked:o.is_active!==!1,onCheckedChange:P=>S("is_active",P)})]})]})]})})]}),n.jsxs("div",{className:"flex justify-end gap-4 mt-6",children:[n.jsx(me,{variant:"outline",onClick:()=>{i(null),l({})},children:"Cancel"}),n.jsxs(me,{onClick:_,disabled:x.isPending||w.isPending,className:"bg-primary-navy hover:opacity-90",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),x.isPending||w.isPending?"Saving...":"Save Configuration"]})]})]})}):n.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(y1,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-2",children:"SEO Manager"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage meta tags, Open Graph, and SEO settings for all pages"})]})]}),n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{className:"flex gap-3",children:[n.jsx(Rt,{to:Ct("AdminDashboard"),
1381children:n.jsxs(me,{variant:"outline",children:[n.jsx(wm,{className:"w-4 h-4 mr-2"}),"Back to Dashboard"]})}),n.jsxs(me,{onClick:N,className:"bg-primary-navy hover:opacity-90",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Page"]})]}),n.jsx(me,{onClick:A,disabled:h,className:"bg-purple-600 hover:bg-purple-700 text-white font-semibold",children:h?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Generating..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Generate Full System Report"]})})]}),f&&n.jsx(_e,{className:"mb-6 bg-gradient-to-br from-purple-50 to-indigo-50 border-2 border-purple-200",children:n.jsx(Ce,{className:"p-6",children:n.jsx("div",{className:"flex items-start justify-between mb-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mr,{className:"w-6 h-6 text-purple-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-2",children:"AI System Report Generated"}),n.jsx("p",{className:"text-gray-700 mb-4",children:f.executive_summary}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Overall Health Score"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:`text-3xl font-bold ${f.overall_health_score>=75?"text-green-600":f.overall_health_score>=60?"text-yellow-600":"text-red-600"}`,children:[f.overall_health_score,"/100"]}),n.jsx("span",{className:`px-3 py-1 rounded-full text-sm font-semibold ${f.health_status==="Excellent"?"bg-green-200 text-green-800":f.health_status==="Good"?"bg-blue-200 text-blue-800":f.health_status==="Fair"?"bg-yellow-200 text-yellow-800":f.health_status==="Poor"?"bg-orange-200 text-orange-800":"bg-red-200 text-red-800"}`,children:f.health_status})]})]}),n.jsx("div",{className:"space-y-2",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-semibold text-gray-600 mb-1",children:"Key Strengths"}),n.jsx("ul",{className:"text-sm space-y-1",children:(k=f.key_strengths)==null?void 0:k.slice(0,2).map((P,O)=>n.jsxs("li",{className:"text-green-700",children:["✓ ",P]},O))})]})})]}),n.jsxs("details",{className:"cursor-pointer",children:[n.jsx("summary",{className:"text-sm font-semibold text-purple-700 hover:text-purple-900",children:"View Full Report →"}),n.jsxs("div",{className:"mt-4 space-y-6 bg-white p-4 rounded-lg border border-purple-200",children:[f.critical_weaknesses&&f.critical_weaknesses.length>0&&n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-red-700 mb-2",children:"Critical Weaknesses"}),n.jsx("ul",{className:"space-y-1",children:f.critical_weaknesses.map((P,O)=>n.jsxs("li",{className:"text-sm text-gray-700",children:["⚠ ",P]},O))})]}),f.immediate_actions&&f.immediate_actions.length>0&&n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-blue-700 mb-2",children:"Immediate Action Items"}),n.jsx("ul",{className:"space-y-1",children:f.immediate_actions.map((P,O)=>n.jsxs("li",{className:"text-sm text-gray-700",children:["→ ",P]},O))})]}),f.seo_analysis&&n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-primary-navy mb-2",children:"SEO Analysis"}),n.jsx("p",{className:"text-sm text-gray-700 mb-2",children:f.seo_analysis.current_health}),f.seo_analysis.recommendations&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Recommendations"}),n.jsx("ul",{className:"text-sm space-y-1",children:f.seo_analysis.recommendations.map((P,O)=>n.jsxs("li",{className:"text-gray-700",children:["• ",P]},O))})]})]}),f.content_marketing_analysis&&n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-primary-navy mb-2",children:"Content & Marketing"}),n.jsx("p",{className:"text-sm text-gray-700 mb-2",children:f.content_marketing_analysis.publishing_cadence}),f.content_marketing_analysis.content_gaps&&f.content_marketing_analysis.content_gaps.length>0&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-1",children:"Content Gaps"}),n.jsx("ul",{className:"text-sm space-y-1",children:f.content_marketing_analysis.content_gaps.map((P,O)=>n.jsxs("li",{className:"text-gray-700",children:["• ",P]},O))})]})]}),f.ninety_day_roadmap&&n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-primary-navy mb-2",children:"90-Day Improvement Roadmap"}),n.jsxs("div",{className:"space-y-3",children:[f.ninety_day_roadmap.phase_1_days_0_30&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-blue-700 mb-1",children:"Phase 1: Days 0-30 (Quick Wins)"}),n.jsx("ul",{className:"text-xs space-y-1",children:f.ninety_day_roadmap.phase_1_days_0_30.map((P,O)=>n.jsxs("li",{className:"text-gray-700",children:["• ",P]},O))})]}),f.ninety_day_roadmap.phase_2_days_30_60&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-green-700 mb-1",children:"Phase 2: Days 30-60 (Strategic)"}),n.jsx("ul",{className:"text-xs space-y-1",children:f.ninety_day_roadmap.phase_2_days_30_60.map((P,O)=>n.jsxs("li",{className:"text-gray-700",children:["• ",P]},O))})]}),f.ninety_day_roadmap.phase_3_days_60_90&&n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-semibold text-purple-700 mb-1",children:"Phase 3: Days 60-90 (Long-term)"}),n.jsx("ul",{className:"text-xs space-y-1",children:f.ninety_day_roadmap.phase_3_days_60_90.map((P,O)=>n.jsxs("li",{className:"text-gray-700",children:["• ",P]},O))})]})]})]})]})]})]})]})})})}),n.jsx(_e,{className:"mb-6",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(y1,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),n.jsx(Me,{type:"text",placeholder:"Search pages...",value:e,onCh
1381ange:P=>t(P.target.value),className:"pl-10"})]}),n.jsxs(Qt,{value:r,onValueChange:a,children:[n.jsx(Kt,{className:"w-[200px]",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"priority",children:"Sort by Importance"}),n.jsx(Ae,{value:"seo_score",children:"Sort by SEO Score"})]})]})]})})}),n.jsx("div",{className:"grid gap-6",children:y?n.jsx(_e,{children:n.jsx(Ce,{className:"p-12 text-center text-gray-500",children:"Loading SEO configurations..."})}):M.length===0?n.jsx(_e,{children:n.jsx(Ce,{className:"p-12 text-center text-gray-500",children:'No pages found. Click "Add Page" to create SEO configuration for a page.'})}):M.map(P=>n.jsx(_e,{className:"hover:shadow-lg transition-shadow",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:P.page_name}),P.is_active?n.jsxs(dt,{className:"bg-green-100 text-green-800",children:[n.jsx(Vy,{className:"w-3 h-3 mr-1"}),"Active"]}):n.jsxs(dt,{variant:"secondary",children:[n.jsx(o3,{className:"w-3 h-3 mr-1"}),"Inactive"]}),!P.robots_index&&n.jsx(dt,{variant:"destructive",children:"No Index"}),(()=>{const O=P.seo_score||T(P);return n.jsxs(dt,{className:O>=90?"bg-green-600 text-white":O>=75?"bg-blue-600 text-white":O>=60?"bg-yellow-600 text-white":O>=40?"bg-orange-600 text-white":"bg-red-600 text-white",children:[n.jsx(ka,{className:"w-3 h-3 mr-1"}),"SEO Score: ",O,"/100 ",!P.seo_score&&"(Basic)"]})})()]}),n.jsxs("div",{className:"space-y-2 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-gray-700",children:"Title:"})," ",n.jsx("span",{className:"text-gray-600",children:P.meta_title||"Not set"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-gray-700",children:"Description:"})," ",n.jsx("span",{className:"text-gray-600",children:P.meta_description||"Not set"})]}),P.keywords&&P.keywords.length>0&&n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-gray-700",children:"Keywords:"})," ",n.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:P.keywords.map((O,F)=>n.jsx(dt,{variant:"outline",className:"text-xs",children:O},F))})]})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(me,{onClick:()=>R(P),disabled:c,size:"sm",className:"bg-indigo-600 hover:bg-indigo-700 text-white",children:c?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Analyzing..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ia,{className:"w-4 h-4 mr-2"}),"Analyze SEO"]})}),n.jsxs(me,{onClick:()=>j(P),variant:"outline",size:"sm",children:[n.jsx(Gw,{className:"w-4 h-4 mr-2"}),"Edit"]})]})]}),P.seo_analysis&&n.jsx("div",{className:"border-t pt-6 mt-6",children:n.jsxs("div",{className:"bg-gradient-to-br from-indigo-50 via-purple-50 to-blue-50 rounded-xl p-6 border-2 border-indigo-200",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{children:[n.jsxs("h4",{className:"text-lg font-bold text-primary-navy mb-1 flex items-center gap-2",children:[n.jsx(Ia,{className:"w-5 h-5 text-indigo-600"}),"AI SEO Analysis"]}),n.jsxs("p",{className:"text-sm text-gray-600",children:["Last analyzed: ",new Date(P.seo_analysis.analyzed_at).toLocaleDateString()]})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:`text-5xl font-bold ${P.seo_score>
1381=90?"text-green-600":P.seo_score>=75?"text-blue-600":P.seo_score>=60?"text-yellow-600":P.seo_score>=40?"text-orange-600":"text-red-600"}`,children:P.seo_score}),n.jsx("div",{className:"text-sm text-gray-600 font-semibold",children:"out of 100"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3 mb-6",children:[n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Title Optimization"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.title_optimization,n.jsx("span",{className:"text-sm text-gray-500",children:"/20"})]})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Description Quality"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.description_quality,n.jsx("span",{className:"text-sm text-gray-500",children:"/20"})]})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Keywords"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.keywords_targeting,n.jsx("span",{className:"text-sm text-gray-500",children:"/15"})]})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Social Media"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.social_optimization,n.jsx("span",{className:"text-sm text-gray-500",children:"/15"})]})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Technical SEO"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.technical_seo,n.jsx("span",{className:"text-sm text-gray-500",children:"/15"})]})]}),n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:"Content Signals"}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[P.seo_analysis.content_signals,n.jsx("span",{className:"text-sm text-gray-500",children:"/15"})]})]})]}),P.seo_analysis.summary&&n.jsxs("div",{className:"bg-white rounded-lg p-4 border border-indigo-200 mb-4",children:[n.jsx("div",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Summary:"}),n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:P.seo_analysis.summary})]}),P.seo_analysis.recommendations&&P.seo_analysis.recommendations.length>0&&n.jsxs("div",{children:[n.jsx("h5",{className:"font-bold text-primary-navy mb-3",children:"Recommendations to Improve SEO:"}),n.jsx("div",{className:"space-y-2",children:P.seo_analysis.recommendations.map((O,F)=>n.jsx("div",{className:"bg-white rounded-lg p-4 border-l-4 border-indigo-400",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(dt,{className:O.priority==="High"?"bg-red-600 text-white":O.priority==="Medium"?"bg-yellow-600 text-white":"bg-blue-600 text-white",children:O.priority}),n.jsx("p",{className:"text-sm text-gray-700 flex-1",children:O.recommendation})]})},F))})]})]})})]})},P.id))})]})})}function Y3e(){const[e,t]=L.useState("risks"),[r,a]=L.useState(!1),[s,i]=L.useState(null),[o,l]=L.useState(null),[c,d]=L.useState({}),[h,u]=L.useState(!1),f=Sr(),{data:m=[]}=xt({queryKey:["riskRegister"],queryFn:()=>pe.entities.RiskRegister.list("-created_date",100)}),b=Tt({mutationFn:B=>pe.entities.RiskRegister.create(B),onSuccess:()=>{f.invalidateQueries({queryKey:["riskRegister"]}),a(!1),l(null)}}),g=Tt({mutationFn:B=>pe.entities.RiskRegister.delete(B),onSuccess:()=>f.invalidateQueries({queryKey:["riskRegister"]})}),{data:y=[]}=xt({queryKey:["insuranceDocuments"],queryFn:()=>pe.entities.InsuranceDocument.list("expiry_date",100)}),x=Tt({mutationFn:B=>pe.entities.InsuranceDocument.create(B),onSuccess:()=>{f.invalidateQueries({queryKey:["insuranceDocuments"]}),a(!1),l(null)}}),w=Tt({mutationFn:B=>pe.entities.InsuranceDocument.delete(B),onSuccess:()=>
1381f.invalidateQueries({queryKey:["insuranceDocuments"]})}),{data:j=[]}=xt({queryKey:["safeguardingNotes"],queryFn:()=>pe.entities.SafeguardingNote.list("-created_date",100)}),N=Tt({mutationFn:B=>pe.entities.SafeguardingNote.create(B),onSuccess:()=>{f.invalidateQueries({queryKey:["safeguardingNotes"]}),a(!1),l(null)}}),_=Tt({mutationFn:B=>pe.entities.SafeguardingNote.delete(B),onSuccess:()=>f.invalidateQueries({queryKey:["safeguardingNotes"]})}),{data:S=[]}=xt({queryKey:["incidentLogs"],queryFn:()=>pe.entities.IncidentLog.list("-incident_date",100)}),A=Tt({mutationFn:B=>pe.entities.IncidentLog.create(B),onSuccess:()=>{f.invalidateQueries({queryKey:["incidentLogs"]}),a(!1),l(null)}}),T=Tt({mutationFn:B=>pe.entities.IncidentLog.delete(B),onSuccess:()=>f.invalidateQueries({queryKey:["incidentLogs"]})}),R=(B,Y)=>{const ee={low:1,medium:2,high:3,critical:4},J=(ee[B]||0)*(ee[Y]||0);return J>=9?"bg-red-50 border-red-200":J>=6?"bg-orange-50 border-orange-200":J>=4?"bg-yellow-50 border-yellow-200":"bg-green-50 border-green-200"},M=B=>({active:"bg-red-100 text-red-800",mitigated:"bg-yellow-100 text-yellow-800",monitoring:"bg-blue-100 text-blue-800",closed:"bg-green-100 text-green-800",open:"bg-red-100 text-red-800",under_review:"bg-blue-100 text-blue-800",resolved:"bg-green-100 text-green-800",escalated:"bg-orange-100 text-orange-800",in_progress:"bg-blue-100 text-blue-800",completed:"bg-green-100 text-green-800"})[B]||"bg-gray-100 text-gray-800",k=B=>{const Y=Math.ceil((new Date(B)-new Date)/864e5);return Y<=30&&Y>0},P=B=>{i(B),l(null),d({}),a(!0)},O=B=>{B.preventDefault(),o?a(!1):s==="risk"?b.mutate(c):s==="insurance"?x.mutate(c):s==="safeguarding"?N.mutate(c):s==="incident"&&A.mutate(c)},F=({label:B,name:Y,type:ee="text",required:J=!1})=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{children:[B," ",J&&"*"]}),n.jsx(Me,{type:ee,value:c[Y]||"",onChange:H=>d({...c,[Y]:H.target.value}),required:J})]}),$=({label:B,name:Y,options:ee,required:J=!1})=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{children:[B," ",J&&"*"]}),n.jsxs(Qt,{value:c[Y]||"",onValueChange:H=>d({...c,[Y]:H}),children:[n.jsx(Kt,{children:n.jsx(Xt,{placeholder:"Select..."})}),n.jsx(Gt,{children:ee.map(H=>n.jsx(Ae,{value:H.value,children:H.label},H.value))})]})]}),G=({label:B,name:Y,accept:ee=".pdf,.doc,.docx"})=>n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:B}),n.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-4 text-center hover:border-primary-navy transition-colors",children:[n.jsx("input",{id:`file-${Y}`,type:"file",accept:ee,onChange:async J=>{var q;const H=(q=J.target.files)==null?void 0:q[0];if(H){u(!0);try{const K=await pe.integrations.Core.UploadFile({file:H});d({...c,[Y]:K.file_url})}catch(K){console.error("Upload failed:",K)}finally{u(!1)}}},className:"hidden",disabled:h}),n.jsxs("label",{htmlFor:`file-${Y}`,className:"cursor-pointer block",children:[n.jsx(Al,{className:"w-5 h-5 mx-auto mb-2 text-gray-400"}),n.jsx("p",{className:"text-sm text-gray-600",children:h?"Uploading...":c[Y]?"✓ File uploaded":"Click to upload or drag & drop"})]})]})]});return n.jsxs("div",{className:"space-y-6",children:[n.jsxs(nl,{value:e,onValueChange:t,className:"w-full",children:[n.jsxs(wo,{className:"grid w-full grid-cols-4 bg-gray-100",children:[n.jsxs(ln,{value:"risks",className:"flex items-center gap-2",children:[n.jsx(eo,{className:"w-4 h-4"}),n.jsx("span",{className:"hidden sm:inline",children:"Risks"})]}),n.jsxs(ln,{value:"insurance",className:"flex items-center gap-2",children:[n.jsx(pr,{className:"w-4 h-4"}),n.jsx("span",{className:"hidden sm:inline",children:"Insurance"})]}),n.jsxs(ln,{value:"safeguarding",className:"flex items-center gap-2",children:[n.jsx(ps,{className:"w-4 h-4"}),n.jsx("span",{className:"hidden sm:inline",children:"Safeguarding"})]}),n.jsxs(ln,{value:"incidents",className:"flex items-center gap-2",children:[n.jsx(Mr,{className:"w-4 h-4"}),n.jsx("span",{className:"hidden sm:inline",children:"Incidents"})]})]}),n.jsxs(cn,{value:"risks",className:"space-y-4",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("h3",{className:"text-xl font-bold",children:"Risk Register"}),n.jsxs(me,{onClick:()=>P("risk"),className:"bg-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"})," Add Risk"]})]}),n.jsx("div",{className:"grid gap-4",children:m.map(B=>n.jsxs(lt.div,{initial:{opacity:0,y:10}
1381,animate:{opacity:1,y:0},className:`p-4 border rounded-lg ${R(B.likelihood,B.impact)}`,children:[n.jsxs("div",{className:"flex justify-between items-start mb-2",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-lg",children:B.risk_title}),n.jsx("p",{className:"text-sm text-gray-600",children:B.description})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{l(B),a(!0)},children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>g.mutate(B.id),children:n.jsx(tr,{className:"w-4 h-4"})})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-3 text-sm",children:[n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["Cat: ",B.category]}),n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["L: ",B.likelihood]}),n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["I: ",B.impact]}),n.jsx("span",{className:`px-3 py-1 rounded ${M(B.status)}`,children:B.status})]}),B.mitigation_plan&&n.jsxs("p",{className:"text-sm mt-2",children:[n.jsx("strong",{children:"Mitigation:"})," ",B.mitigation_plan]})]},B.id))})]}),n.jsxs(cn,{value:"insurance",className:"space-y-4",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("h3",{className:"text-xl font-bold",children:"Insurance Policies"}),n.jsxs(me,{onClick:()=>P("insurance"),className:"bg-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"})," Add Policy"]})]}),n.jsx("div",{className:"grid gap-4",children:y.map(B=>{var Y;return n.jsxs(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`p-4 border rounded-lg ${k(B.expiry_date)?"bg-orange-50 border-orange-200":"bg-blue-50 border-blue-200"}`,children:[n.jsxs("div",{className:"flex justify-between items-start mb-2",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-lg",children:B.policy_name}),n.jsx("p",{className:"text-sm text-gray-600",children:B.provider})]}),n.jsxs("div",{className:"flex gap-2",children:[B.document_url&&n.jsx("a",{href:B.document_url,target:"_blank",rel:"noopener noreferrer",children:n.jsx(me,{variant:"ghost",size:"sm",children:n.jsx(Pl,{className:"w-4 h-4"})})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>w.mutate(B.id),children:n.jsx(tr,{className:"w-4 h-4"})})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-3 text-sm",children:[n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["Policy: ",B.policy_number]}),n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["Coverage: £",(Y=B.coverage_amount)==null?void 0:Y.toLocaleString()]}),n.jsxs("span",{className:k(B.expiry_date)?"bg-orange-200 text-orange-800 px-3 py-1 rounded font-bold":"bg-white px-3 py-1 rounded",children:["Expires: ",new Date(B.expiry_date).toLocaleDateString()]})]})]},B.id)})})]}),n.jsxs(cn,{value:"safeguarding",className:"space-y-4",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("h3",{className:"text-xl font-bold",children:"Safeguarding Records"}),n.jsxs(me,{onClick:()=>P("safeguarding"),className:"bg-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"})," Add Note"]})]}),n.jsx("div",{className:"grid gap-4",children:j.map(B=>n.jsxs(lt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"p-4 border border-purple-200 bg-purple-50 rounded-lg",children:[n.jsxs("div",{className:"flex justify-between items-start mb-2",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-lg",children:B.title}),n.jsx("p",{className:"text-sm text-gray-600",children:B.description})]}),n.jsx("div",{className:"flex gap-2",children:n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>_.mutate(B.id),children:n.jsx(tr,{className:"w-4 h-4"})})})]}),n.jsxs("div",{className:"flex flex-wrap gap-3 text-sm",children:[n.jsx("span",{className:"bg-white px-3 py-1 rounded",children:B.note_type}),n.jsx("span",{className:`px-3 py-1 rounded ${M(B.status)}`,children:B.status}),n.jsxs("span",{className:"bg-white px-3 py-1 rounded",children:["Conf: ",B.confidentiality_level]})]})]},B.id))})]}),n.jsxs(cn,{value:"incidents",className:"space-y-4",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx("h3",{className:"text-xl font-bold",children:"Incident Logs"}),n.jsxs(me,{onClick:()=>P("incident"),className:"bg-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"})," Log Incident"]})]}),n.jsx("div",{className:"grid gap-4",children:S.map(B=>n.jsxs(lt.div,{initial:{opacity:0,y:10}
1381,animate:{opacity:1,y:0},className:`p-4 border rounded-lg ${B.severity==="critical"?"bg-red-50 border-red-300":B.severity==="high"?"bg-orange-50 border-orange-200":"bg-yellow-50 border-yellow-200"}`,children:[n.jsxs("div",{className:"flex justify-between items-start mb-2",children:[n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-lg",children:B.incident_title}),n.jsx("p",{className:"text-sm text-gray-600",children:B.description})]}),n.jsx("div",{className:"flex gap-2",children:n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>T.mutate(B.id),children:n.jsx(tr,{className:"w-4 h-4"})})})]}),n.jsxs("div",{className:"flex flex-wrap gap-3 text-sm",children:[n.jsx("span",{className:"bg-white px-3 py-1 rounded",children:B.incident_type}),n.jsx("span",{className:`px-3 py-1 rounded font-bold ${B.severity==="critical"?"bg-red-200 text-red-900":B.severity==="high"?"bg-orange-200 text-orange-900":"bg-yellow-200 text-yellow-900"}`,children:B.severity}),n.jsx("span",{className:`px-3 py-1 rounded ${M(B.investigation_status)}`,children:B.investigation_status}),B.insurance_claim&&n.jsx("span",{className:"bg-blue-200 text-blue-900 px-3 py-1 rounded",children:"Insurance Claim Filed"})]})]},B.id))})]})]}),n.jsx(Nn,{open:r,onOpenChange:a,children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsxs(Sn,{children:[s==="risk"&&"Add Risk",s==="insurance"&&"Add Insurance Policy",s==="safeguarding"&&"Add Safeguarding Note",s==="incident"&&"Log Incident"]})}),n.jsxs("form",{onSubmit:O,className:"space-y-4",children:[s==="risk"&&n.jsxs(n.Fragment,{children:[n.jsx(F,{label:"Risk Title",name:"risk_title",required:!0}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Description *"}),n.jsx(en,{value:c.description||"",onChange:B=>d({...c,description:B.target.value}),required:!0})]}),n.jsx($,{label:"Category",name:"category",options:[{value:"operational",label:"Operational"},{value:"financial",label:"Financial"},{value:"reputational",label:"Reputational"},{value:"legal",label:"Legal"},{value:"safeguarding",label:"Safeguarding"},{value:"other",label:"Other"}],required:!0}),n.jsx($,{label:"Likelihood",name:"likelihood",options:[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"critical",label:"Critical"}],required:!0}),n.jsx($,{label:"Impact",name:"impact",options:[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"critical",label:"Critical"}],required:!0}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Mitigation Plan"}),n.jsx(en,{value:c.mitigation_plan||"",onChange:B=>d({...c,mitigation_plan:B.target.value})})]}),n.jsx(F,{label:"Owner",name:"owner"}),n.jsx($,{label:"Status",name:"status",options:[{value:"active",label:"Active"},{value:"mitigated",label:"Mitigated"},{value:"monitoring",label:"Monitoring"},{value:"closed",label:"Closed"}]}),n.jsx(G,{label:"Supporting Document",name:"document_url"})]}),s==="insurance"&&n.jsxs(n.Fragment,{children:[n.jsx(F,{label:"Policy Name",name:"policy_name",required:!0}),n.jsx($,{label:"Policy Type",name:"policy_type",options:[{value:"general_liability",label:"General Liability"},{value:"professional_indemnity",label:"Professional Indemnity"},{value:"event_insurance",label:"Event Insurance"},{value:"cyber",label:"Cyber"},{value:"directors_officers",label:"Directors & Officers"},{value:"other",label:"Other"}],required:!0}),n.jsx(F,{label:"Provider",name:"provider",required:!0}),n.jsx(F,{label:"Policy Number",name:"policy_number"}),n.jsx(F,{label:"Coverage Amount (£)",name:"coverage_amount",type:"number"}),n.jsx(F,{label:"Expiry Date",name:"expiry_date",type:"date",required:!0}),n.jsx(F,{label:"Policy Document URL",name:"document_url"}),n.jsx(F,{label:"Contact Person",name:"contact_person"}),n.jsx(F,{label:"Contact Email",name:"contact_email",type:"email"}),n.jsx(F,{label:"Premium Amount (£)",name:"premium_amount",type:"number"})]}),s==="safeguarding"&&n.jsxs(n.Fragment,{children:[n.jsx(F,{label:"Title",name:"title",required:!0}),n.jsx($,{label:"Type",name:"note_type",options:[{value:"incident",label:"Incident"},{value:"concern",label:"Concern"},{value:"policy_update",label:"Policy Update"},{value:"training",label:"Training"},{value:"review",label:"Review"},{value:"other",label:"Other"}],required:!0}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Description *"}),n.jsx(en,{value:c.description||"",onChange:B=>d({...c,description:B.target.value}),required:!0})]}),n.jsx(F,{label:"Date Reported",name:"date_reported",type:"date"}),n.jsx(F,{label:"Reported By",name:"reported_by"}),n.jsx(F,{label:"Individuals Involved",name:"individuals_involved"}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Action Taken"}),n.jsx(en,{value:c.action_taken||"",onChange:B=>d({...c,action_taken:B.target.value})})]}),n.jsx($,{label:"Status",name:"status",options:[{value:"open",label:"Open"},{value:"under_review",label:"Under Review"},{value:"resolved",label:"Resolved"},{value:"escalated",label:"Escalated"}]}),n.jsx(G,{label:"Supporting Document",name:"supporting_document"})]}),s==="incident"&&n.jsxs(n.Fragment,{children:[n.jsx(F,{label:"Incident Title",name:"incident_title",required:!0}),n.jsx(F,{label:"Incident Date",name:"incident_date",type:"date",required:!0}),n.jsx($,{label:"Incident Type",name:"incident_type",options:[{value:"data_breach",label:"Data Breach"},{value:"system_failure",label:"System Failure"},{value:"financial_discrepancy",label:"Financial Discrepancy"},{value:"safeguarding",label:"Safeguarding"},{value:"health_safety",label:"Health & Safety"},{value:"damage",label:"Damage"},{value:"security",label:"Security"},{value:"other",label:"Other"}],required:!0}),n.jsx($,{label:"Severity",name:"severity",options:[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"critical",label:"Critical"}]}),n.jsx(F,{label:"Location",name:"location"}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Description *"}),n.jsx(en,{value:c.description||"",onChange:B=>d({...c,description:B.target.value}),required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Immediate Actions"}),n.jsx(en,{value:c.immediate_actions||"",onChange:B=>d({...c,immediate_actions:B.target.value})})]}),n.jsx($,{label:"Investigation Status",name:"investigation_status",options:[{value:"open",label:"Open"},{value:"in_progress",label:"In Progress"},{value:"completed",label:"Completed"},{value:"closed",label:"Closed"}]}),n.jsx(G,{label:"Incident Report Document",name:"report_document"})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>a(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-primary-navy",children:"Create"})]})]})]})})]})}var Dp={},J4,M9;function Q3e(){return M9||(M9=1,J4=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),J4}var Z4={},Lh={},L9;function np(){if(L9)return Lh;L9=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];
vendor: 27,825 bytes, lines 1381-1388
1381return Lh.getSymbolSize=function(a){if(!a)throw new Error('"version" cannot be null or undefined');if(a<1||a>40)throw new Error('"version" should be in range from 1 to 40');return a*4+17},Lh.getSymbolTotalCodewords=function(a){return t[a]},Lh.getBCHDigit=function(r){let a=0;for(;r!==0;)a++,r>>>=1;return a},Lh.setToSJISFunction=function(a){if(typeof a!="function")throw new Error('"toSJISFunc" is not a valid function.');e=a},Lh.isKanjiModeEnabled=function(){return typeof e<"u"},Lh.toSJIS=function(a){return e(a)},Lh}var eC={},R9;function rE(){return R9||(R9=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(a){return a&&typeof a.bit<"u"&&a.bit>=0&&a.bit<4},e.from=function(a,s){if(e.isValid(a))return a;try{return t(a)}catch{return s}}})(eC)),eC}var tC,I9;function X3e(){if(I9)return tC;I9=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const r=Math.floor(t/8);return(this.buffer[r]>>>7-t%8&1)===1},put:function(t,r){for(let a=0;a<r;a++)this.putBit((t>>>r-a-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),t&&(this.buffer[r]|=128>>>this.length%8),this.length++}},tC=e,tC}var nC,D9;function J3e(){if(D9)return nC;D9=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,r,a,s){const i=t*this.size+r;this.data[i]=a,s&&(this.reservedBit[i]=!0)},e.prototype.get=function(t,r){return this.data[t*this.size+r]},e.prototype.xor=function(t,r,a){this.data[t*this.size+r]^=a},e.prototype.isReserved=function(t,r){return this.reservedBit[t*this.size+r]},nC=e,nC}var rC={},F9;function Z3e(){return F9||(F9=1,(function(e){const t=np().getSymbolSize;e.getRowColCoords=function(a){if(a===1)return[];const s=Math.floor(a/7)+2,i=t(a),o=i===145?26:Math.ceil((i-13)/(2*s-2))*2,l=[i-7];for(let c=1;c<s-1;c++)l[c]=l[c-1]-o;return l.push(6),l.reverse()},e.getPositions=function(a){const s=[],i=e.getRowColCoords(a),o=i.length;for(let l=0;l<o;l++)for(let c=0;c<o;c++)l===0&&c===0||l===0&&c===o-1||l===o-1&&c===0||s.push([i[l],i[c]]);return s}})(rC)),rC}var aC={},q9;function e6e(){if(q9)return aC;q9=1;const e=np().getSymbolSize,t=7;return aC.getPositions=function(a){const s=e(a);return[[0,0],[s-t,0],[0,s-t]]},aC}var sC={},B9;function t6e(){return B9||(B9=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const i=s.size;let o=0,l=0,c=0,d=null,h=null;for(let u=0;u<i;u++){l=c=0,d=h=null;for(let f=0;f<i;f++){let m=s.get(u,f);m===d?l++:(l>=5&&(o+=t.N1+(l-5)),d=m,l=1),m=s.get(f,u),m===h?c++:(c>=5&&(o+=t.N1+(c-5)),h=m,c=1)}l>=5&&(o+=t.N1+(l-5)),c>=5&&(o+=t.N1+(c-5))}return o},e.getPenaltyN2=function(s){const i=s.size;let o=0;for(let l=0;l<i-1;l++)for(let c=0;c<i-1;c++){const d=s.get(l,c)+s.get(l,c+1)+s.get(l+1,c)+s.get(l+1,c+1);(d===4||d===0)&&o++}return o*t.N2},e.getPenaltyN3=function(s){const i=s.size;let o=0,l=0,c=0;for(let d=0;d<i;d++){l=c=0;for(let h=0;h<i;h++)l=l<<1&2047|s.get(d,h),h>=10&&(l===1488||l===93)&&o++,c=c<<1&2047|s.get(h,d),h>=10&&(c===1488||c===93)&&o++}return o*t.N3},e.getPenaltyN4=function(s){let i=0;const o=s.data.length;for(let c=0;c<o;c++)i+=s.data[c];return Math.abs(Math.ceil(i*100/o/5)-10)*t.N4};function r(a,s,i){switch(a){case e.Patterns.PATTERN000:return(s+i)%2===0;case e.Patterns.PATTERN001:return s%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(s+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return s*i%2+s*i%3===0;case e.Patterns.PATTERN110:return(s*i%2+s*i%3)%2===0;case e.Patterns.PATTERN111:return(s*i%3+(s+i)%2)%2===0;default:throw new Error("bad maskPattern:"+a)}}e.applyMask=function(s,i){const o=i.size;for(let l=0;l<o;l++)for(let c=0;c<o;c++)i.isReserved(c,l)||i.xor(c,l,r(s,c,l))},e.getBestMask=function(s,i){const o=Object.keys(e.Patterns).length;let l=0,c=1/0;for(let d=0;d<o;d++){i(d),e.applyMask(d,s);const h=e.getPenaltyN1(s)+e.getPenaltyN2(s)+e.getPenaltyN3(s)+e.getPenaltyN4(s);e.applyMask(d,s),h<c&&(c=h,l=d)}return l}})(sC)),sC}var Vb={},$9;function SY(){if($9)return Vb;$9=1;const e=rE(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Vb.getBlocksCount=function(s,i){switch(i){case e.L:return t[(s-1)*4+0];case e.M:return t[(s-1)*4+1];case e.Q:return t[(s-1)*4+2];case e.H:return t[(s-1)*4+3];default:return}},Vb.getTotalCodewordsCount=function(s,i){switch(i){case e.L:return r[(s-1)*4+0];case e.M:return r[(s-1)*4+1];case e.Q:return r[(s-1)*4+2];case e.H:return r[(s-1)*4+3];default:return}},Vb}var iC={},py={},U9;function n6e(){if(U9)return py;U9=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let a=1;for(let s=0;s<255;s++)e[s]=a,t[a]=s,a<<=1,a&256&&(a^=285);for(let s=255;s<512;s++)e[s]=e[s-255]})(),py.log=function(a){if(a<1)throw new Error("log("+a+")");return t[a]},py.exp=function(a){return e[a]},py.mul=function(a,s){return a===0||s===0?0:e[t[a]+t[s]]},py}var z9;function r6e(){return z9||(z9=1,(function(e){const t=n6e();e.mul=function(a,s){const i=new Uint8Array(a.length+s.length-1);for(let o=0;o<a.length;o++)for(let l=0;l<s.length;l++)i[o+l]^=t.mul(a[o],s[l]);return i},e.mod=function(a,s){let i=new Uint8Array(a);for(;i.length-s.length>=0;){const o=i[0];for(let c=0;c<s.length;c++)i[c]^=t.mul(s[c],o);let l=0;for(;l<i.length&&i[l]===0;)l++;i=i.slice(l)}return i},e.generateECPolynomial=function(a){let s=new Uint8Array([1]);for(let i=0;i<a;i++)s=e.mul(s,new Uint8Array([1,t.exp(i)]));return s}})(iC)),iC}var oC,V9;function a6e(){if(V9)return oC;V9=1;const e=r6e();function t(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(a){this.degree=a,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(a){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(a.length+this.degree);s.set(a);const i=e.mod(s,this.genPoly),o=this.degree-i.length;if(o>0){const l=new Uint8Array(this.degree);return l.set(i,o),l}return i},oC=t,oC}var lC={},cC={},dC={},H9;function CY(){return H9||(H9=1,dC.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),dC}var Md={},W9;function AY(){if(W9)return Md;W9=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const a="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
1382]))+`;Md.KANJI=new RegExp(r,"g"),Md.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Md.BYTE=new RegExp(a,"g"),Md.NUMERIC=new RegExp(e,"g"),Md.ALPHANUMERIC=new RegExp(t,"g");const s=new RegExp("^"+r+"$"),i=new RegExp("^"+e+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Md.testKanji=function(c){return s.test(c)},Md.testNumeric=function(c){return i.test(c)},Md.testAlphanumeric=function(c){return o.test(c)},Md}var K9;function rp(){return K9||(K9=1,(function(e){const t=CY(),r=AY();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,o){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?i.ccBits[0]:o<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function a(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(i,o){if(e.isValid(i))return i;try{return a(i)}catch{return o}}})(cC)),cC}var G9;function s6e(){return G9||(G9=1,(function(e){const t=np(),r=SY(),a=rE(),s=rp(),i=CY(),o=7973,l=t.getBCHDigit(o);function c(f,m,b){for(let g=1;g<=40;g++)if(m<=e.getCapacity(g,b,f))return g}function d(f,m){return s.getCharCountIndicator(f,m)+4}function h(f,m){let b=0;return f.forEach(function(g){const y=d(g.mode,m);b+=y+g.getBitsLength()}),b}function u(f,m){for(let b=1;b<=40;b++)if(h(f,b)<=e.getCapacity(b,m,s.MIXED))return b}e.from=function(m,b){return i.isValid(m)?parseInt(m,10):b},e.getCapacity=function(m,b,g){if(!i.isValid(m))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=s.BYTE);const y=t.getSymbolTotalCodewords(m),x=r.getTotalCodewordsCount(m,b),w=(y-x)*8;if(g===s.MIXED)return w;const j=w-d(g,m);switch(g){case s.NUMERIC:return Math.floor(j/10*3);case s.ALPHANUMERIC:return Math.floor(j/11*2);case s.KANJI:return Math.floor(j/13);case s.BYTE:default:return Math.floor(j/8)}},e.getBestVersionForData=function(m,b){let g;const y=a.from(b,a.M);if(Array.isArray(m)){if(m.length>1)return u(m,y);if(m.length===0)return 1;g=m[0]}else g=m;return c(g.mode,g.getLength(),y)},e.getEncodedBits=function(m){if(!i.isValid(m)||m<7)throw new Error("Invalid QR Code version");let b=m<<12;for(;t.getBCHDigit(b)-l>=0;)b^=o<<t.getBCHDigit(b)-l;return m<<12|b}})(lC)),lC}var uC={},Y9;function i6e(){if(Y9)return uC;Y9=1;const e=np(),t=1335,r=21522,a=e.getBCHDigit(t);return uC.getEncodedBits=function(i,o){const l=i.bit<<3|o;let c=l<<10;for(;e.getBCHDigit(c)-a>=0;)c^=t<<e.getBCHDigit(c)-a;return(l<<10|c)^r},uC}var hC={},fC,Q9;function o6e(){if(Q9)return fC;Q9=1;const e=rp();function t(r){this.mode=e.NUMERIC,this.data=r.toString()}return t.getBitsLength=function(a){return 10*Math.floor(a/3)+(a%3?a%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(a){let s,i,o;for(s=0;s+3<=this.data.length;s+=3)i=this.data.substr(s,3),o=parseInt(i,10),a.put(o,10);const l=this.data.length-s;l>0&&(i=this.data.substr(s),o=parseInt(i,10),a.put(o,l*3+1))},fC=t,fC}var mC,X9;function l6e(){if(X9)return mC;X9=1;const e=rp(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function r(a){this.mode=e.ALPHANUMERIC,this.data=a}return r.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(s){let i;for(i=0;i+2<=this.data.length;i+=2){let o=t.indexOf(this.data[i])*45;o+=t.indexOf(this.data[i+1]),s.put(o,11)}this.data.length%2&&s.put(t.indexOf(this.data[i]),6)},mC=r,mC}var pC,J9;function c6e(){if(J9)return pC;J9=1;const e=rp();function t(r){this.mode=e.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return t.getBitsLength=function(a){return a*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){for(let a=0,s=this.data.length;a<s;a++)r.put(this.data[a],8)},pC=t,pC}var gC,Z9;function d6e(){if(Z9)return gC;Z9=1;const e=rp(),t=np();function r(a){this.mode=e.KANJI,this.data=a}return r.getBitsLength=function(s){return s*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(a){let s;for(s=0;s<this.data.length;s++){let i=t.toSJIS(this.data[s]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
1383Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),a.put(i,13)}},gC=r,gC}var xC={exports:{}},eq;function u6e(){return eq||(eq=1,(function(e){var t={single_source_shortest_paths:function(r,a,s){var i={},o={};o[a]=0;var l=t.PriorityQueue.make();l.push(a,0);for(var c,d,h,u,f,m,b,g,y;!l.empty();){c=l.pop(),d=c.value,u=c.cost,f=r[d]||{};for(h in f)f.hasOwnProperty(h)&&(m=f[h],b=u+m,g=o[h],y=typeof o[h]>"u",(y||g>b)&&(o[h]=b,l.push(h,b),i[h]=d))}if(typeof s<"u"&&typeof o[s]>"u"){var x=["Could not find a path from ",a," to ",s,"."].join("");throw new Error(x)}return i},extract_shortest_path_from_predecessor_list:function(r,a){for(var s=[],i=a;i;)s.push(i),r[i],i=r[i];return s.reverse(),s},find_path:function(r,a,s){var i=t.single_source_shortest_paths(r,a,s);return t.extract_shortest_path_from_predecessor_list(i,s)},PriorityQueue:{make:function(r){var a=t.PriorityQueue,s={},i;r=r||{};for(i in a)a.hasOwnProperty(i)&&(s[i]=a[i]);return s.queue=[],s.sorter=r.sorter||a.default_sorter,s},default_sorter:function(r,a){return r.cost-a.cost},push:function(r,a){var s={value:r,cost:a};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(xC)),xC.exports}var tq;function h6e(){return tq||(tq=1,(function(e){const t=rp(),r=o6e(),a=l6e(),s=c6e(),i=d6e(),o=AY(),l=np(),c=u6e();function d(x){return unescape(encodeURIComponent(x)).length}function h(x,w,j){const N=[];let _;for(;(_=x.exec(j))!==null;)N.push({data:_[0],index:_.index,mode:w,length:_[0].length});return N}function u(x){const w=h(o.NUMERIC,t.NUMERIC,x),j=h(o.ALPHANUMERIC,t.ALPHANUMERIC,x);let N,_;return l.isKanjiModeEnabled()?(N=h(o.BYTE,t.BYTE,x),_=h(o.KANJI,t.KANJI,x)):(N=h(o.BYTE_KANJI,t.BYTE,x),_=[]),w.concat(j,N,_).sort(function(A,T){return A.index-T.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function f(x,w){switch(w){case t.NUMERIC:return r.getBitsLength(x);case t.ALPHANUMERIC:return a.getBitsLength(x);case t.KANJI:return i.getBitsLength(x);case t.BYTE:return s.getBitsLength(x)}}function m(x){return x.reduce(function(w,j){const N=w.length-1>=0?w[w.length-1]:null;return N&&N.mode===j.mode?(w[w.length-1].data+=j.data,w):(w.push(j),w)},[])}function b(x){const w=[];for(let j=0;j<x.length;j++){const N=x[j];switch(N.mode){case t.NUMERIC:w.push([N,{data:N.data,mode:t.ALPHANUMERIC,length:N.length},{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.ALPHANUMERIC:w.push([N,{data:N.data,mode:t.BYTE,length:N.length}]);break;case t.KANJI:w.push([N,{data:N.data,mode:t.BYTE,length:d(N.data)}]);break;case t.BYTE:w.push([{data:N.data,mode:t.BYTE,length:d(N.data)}])}}return w}function g(x,w){const j={},N={start:{}};let _=["start"];for(let S=0;S<x.length;S++){const A=x[S],T=[];for(let R=0;R<A.length;R++){const M=A[R],k=""+S+R;T.push(k),j[k]={node:M,lastCount:0},N[k]={};for(let P=0;P<_.length;P++){const O=_[P];j[O]&&j[O].node.mode===M.mode?(N[O][k]=f(j[O].lastCount+M.length,M.mode)-f(j[O].lastCount,M.mode),j[O].lastCount+=M.length):(j[O]&&(j[O].lastCount=M.length),N[O][k]=f(M.length,M.mode)+4+t.getCharCountIndicator(M.mode,w))}}_=T}for(let S=0;S<_.length;S++)N[_[S]].end=0;return{map:N,table:j}}function y(x,w){let j;const N=t.getBestModeForData(x);if(j=t.from(w,N),j!==t.BYTE&&j.bit<N.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(j)+`.
1384 Suggested mode is: `+t.toString(N));switch(j===t.KANJI&&!l.isKanjiModeEnabled()&&(j=t.BYTE),j){case t.NUMERIC:return new r(x);case t.ALPHANUMERIC:return new a(x);case t.KANJI:return new i(x);case t.BYTE:return new s(x)}}e.fromArray=function(w){return w.reduce(function(j,N){return typeof N=="string"?j.push(y(N,null)):N.data&&j.push(y(N.data,N.mode)),j},[])},e.fromString=function(w,j){const N=u(w,l.isKanjiModeEnabled()),_=b(N),S=g(_,j),A=c.find_path(S.map,"start","end"),T=[];for(let R=1;R<A.length-1;R++)T.push(S.table[A[R]].node);return e.fromArray(m(T))},e.rawSplit=function(w){return e.fromArray(u(w,l.isKanjiModeEnabled()))}})(hC)),hC}var nq;function f6e(){if(nq)return Z4;nq=1;const e=np(),t=rE(),r=X3e(),a=J3e(),s=Z3e(),i=e6e(),o=t6e(),l=SY(),c=a6e(),d=s6e(),h=i6e(),u=rp(),f=h6e();function m(S,A){const T=S.size,R=i.getPositions(A);for(let M=0;M<R.length;M++){const k=R[M][0],P=R[M][1];for(let O=-1;O<=7;O++)if(!(k+O<=-1||T<=k+O))for(let F=-1;F<=7;F++)P+F<=-1||T<=P+F||(O>=0&&O<=6&&(F===0||F===6)||F>=0&&F<=6&&(O===0||O===6)||O>=2&&O<=4&&F>=2&&F<=4?S.set(k+O,P+F,!0,!0):S.set(k+O,P+F,!1,!0))}}function b(S){const A=S.size;for(let T=8;T<A-8;T++){const R=T%2===0;S.set(T,6,R,!0),S.set(6,T,R,!0)}}function g(S,A){const T=s.getPositions(A);for(let R=0;R<T.length;R++){const M=T[R][0],k=T[R][1];for(let P=-2;P<=2;P++)for(let O=-2;O<=2;O++)P===-2||P===2||O===-2||O===2||P===0&&O===0?S.set(M+P,k+O,!0,!0):S.set(M+P,k+O,!1,!0)}}function y(S,A){const T=S.size,R=d.getEncodedBits(A);let M,k,P;for(let O=0;O<18;O++)M=Math.floor(O/3),k=O%3+T-8-3,P=(R>>O&1)===1,S.set(M,k,P,!0),S.set(k,M,P,!0)}function x(S,A,T){const R=S.size,M=h.getEncodedBits(A,T);let k,P;for(k=0;k<15;k++)P=(M>>k&1)===1,k<6?S.set(k,8,P,!0):k<8?S.set(k+1,8,P,!0):S.set(R-15+k,8,P,!0),k<8?S.set(8,R-k-1,P,!0):k<9?S.set(8,15-k-1+1,P,!0):S.set(8,15-k-1,P,!0);S.set(R-8,8,1,!0)}function w(S,A){const T=S.size;let R=-1,M=T-1,k=7,P=0;for(let O=T-1;O>0;O-=2)for(O===6&&O--;;){for(let F=0;F<2;F++)if(!S.isReserved(M,O-F)){let $=!1;P<A.length&&($=(A[P]>>>k&1)===1),S.set(M,O-F,$),k--,k===-1&&(P++,k=7)}if(M+=R,M<0||T<=M){M-=R,R=-R;break}}}function j(S,A,T){const R=new r;T.forEach(function(F){R.put(F.mode.bit,4),R.put(F.getLength(),u.getCharCountIndicator(F.mode,S)),F.write(R)});const M=e.getSymbolTotalCodewords(S),k=l.getTotalCodewordsCount(S,A),P=(M-k)*8;for(R.getLengthInBits()+4<=P&&R.put(0,4);R.getLengthInBits()%8!==0;)R.putBit(0);const O=(P-R.getLengthInBits())/8;for(let F=0;F<O;F++)R.put(F%2?17:236,8);return N(R,S,A)}function N(S,A,T){const R=e.getSymbolTotalCodewords(A),M=l.getTotalCodewordsCount(A,T),k=R-M,P=l.getBlocksCount(A,T),O=R%P,F=P-O,$=Math.floor(R/P),G=Math.floor(k/P),B=G+1,Y=$-G,ee=new c(Y);let J=0;const H=new Array(P),q=new Array(P);let K=0;const te=new Uint8Array(S.buffer);for(let ae=0;ae<P;ae++){const le=ae<F?G:B;H[ae]=te.slice(J,J+le),q[ae]=ee.encode(H[ae]),J+=le,K=Math.max(K,le)}const re=new Uint8Array(R);let Q=0,ne,oe;for(ne=0;ne<K;ne++)for(oe=0;oe<P;oe++)ne<H[oe].length&&(re[Q++]=H[oe][ne]);for(ne=0;ne<Y;ne++)for(oe=0;oe<P;oe++)re[Q++]=q[oe][ne];return re}function _(S,A,T,R){let M;if(Array.isArray(S))M=f.fromArray(S);else if(typeof S=="string"){let $=A;if(!$){const G=f.rawSplit(S);$=d.getBestVersionForData(G,T)}M=f.fromString(S,$||40)}else throw new Error("Invalid data");const k=d.getBestVersionForData(M,T);if(!k)throw new Error("The amount of data is too big to be stored in a QR Code");if(!A)A=k;else if(A<k)throw new Error(`
1385The chosen QR Code version cannot contain this amount of data.
1386Minimum version required to store current data is: `+k+`.
1387`);const P=j(A,T,M),O=e.getSymbolSize(A),F=new a(O);return m(F,A),b(F),g(F,A),x(F,T,0),A>=7&&y(F,A),w(F,P),isNaN(R)&&(R=o.getBestMask(F,x.bind(null,F,T))),o.applyMask(R,F),x(F,T,R),{modules:F,version:A,errorCorrectionLevel:T,maskPattern:R,segments:M}}return Z4.create=function(A,T){if(typeof A>"u"||A==="")throw new Error("No input text");let R=t.M,M,k;return typeof T<"u"&&(R=t.from(T.errorCorrectionLevel,t.M),M=d.from(T.version),k=o.from(T.maskPattern),T.toSJISFunc&&e.setToSJISFunction(T.toSJISFunc)),_(A,M,R,k)},Z4}var yC={},vC={},rq;function kY(){return rq||(rq=1,(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let a=r.slice().replace("#","").split("");if(a.length<3||a.length===5||a.length>8)throw new Error("Invalid hex color: "+r);(a.length===3||a.length===4)&&(a=Array.prototype.concat.apply([],a.map(function(i){return[i,i]}))),a.length===6&&a.push("F","F");const s=parseInt(a.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+a.slice(0,6).join("")}}e.getOptions=function(a){a||(a={}),a.color||(a.color={});const s=typeof a.margin>"u"||a.margin===null||a.margin<0?4:a.margin,i=a.width&&a.width>=21?a.width:void 0,o=a.scale||4;return{width:i,scale:i?4:o,margin:s,color:{dark:t(a.color.dark||"#000000ff"),light:t(a.color.light||"#ffffffff")},type:a.type,rendererOpts:a.rendererOpts||{}}},e.getScale=function(a,s){return s.width&&s.width>=a+s.margin*2?s.width/(a+s.margin*2):s.scale},e.getImageWidth=function(a,s){const i=e.getScale(a,s);return Math.floor((a+s.margin*2)*i)},e.qrToImageData=function(a,s,i){const o=s.modules.size,l=s.modules.data,c=e.getScale(o,i),d=Math.floor((o+i.margin*2)*c),h=i.margin*c,u=[i.color.light,i.color.dark];for(let f=0;f<d;f++)for(let m=0;m<d;m++){let b=(f*d+m)*4,g=i.color.light;if(f>=h&&m>=h&&f<d-h&&m<d-h){const y=Math.floor((f-h)/c),x=Math.floor((m-h)/c);g=u[l[y*o+x]?1:0]}a[b++]=g.r,a[b++]=g.g,a[b++]=g.b,a[b]=g.a}}})(vC)),vC}var aq;function m6e(){return aq||(aq=1,(function(e){const t=kY();function r(s,i,o){s.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=o,i.width=o,i.style.height=o+"px",i.style.width=o+"px"}function a(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,o,l){let c=l,d=o;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(d=a()),c=t.getOptions(c);const h=t.getImageWidth(i.modules.size,c),u=d.getContext("2d"),f=u.createImageData(h,h);return t.qrToImageData(f.data,i,c),r(u,d,h),u.putImageData(f,0,0),d},e.renderToDataURL=function(i,o,l){let c=l;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const d=e.render(i,o,c),h=c.type||"image/png",u=c.rendererOpts||{};return d.toDataURL(h,u.quality)}})(yC)),yC}var bC={},sq;function p6e(){if(sq)return bC;sq=1;const e=kY();function t(s,i){const o=s.a/255,l=i+'="'+s.hex+'"';return o<1?l+" "+i+'-opacity="'+o.toFixed(2).slice(1)+'"':l}function r(s,i,o){let l=s+i;return typeof o<"u"&&(l+=" "+o),l}function a(s,i,o){let l="",c=0,d=!1,h=0;for(let u=0;u<s.length;u++){const f=Math.floor(u%i),m=Math.floor(u/i);!f&&!d&&(d=!0),s[u]?(h++,u>0&&f>0&&s[u-1]||(l+=d?r("M",f+o,.5+m+o):r("m",c,0),c=0,d=!1),f+1<i&&s[u+1]||(l+=r("h",h),h=0)):c++}return l}return bC.render=function(i,o,l){const c=e.getOptions(o),d=i.modules.size,h=i.modules.data,u=d+c.margin*2,f=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",m="<path "+t(c.color.dark,"stroke")+' d="'+a(h,d,c.margin)+'"/>',b='viewBox="0 0 '+u+" "+u+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+b+' shape-rendering="crispEdges">'+f+m+`</svg>
1388`;return typeof l=="function"&&l(null,y),y},bC}var iq;function g6e(){if(iq)return Dp;iq=1;const e=Q3e(),t=f6e(),r=m6e(),a=p6e();function s(i,o,l,c,d){const h=[].slice.call(arguments,1),u=h.length,f=typeof h[u-1]=="function";if(!f&&!e())throw new Error("Callback required as last argument");if(f){if(u<2)throw new Error("Too few arguments provided");u===2?(d=l,l=o,o=c=void 0):u===3&&(o.getContext&&typeof d>"u"?(d=c,c=void 0):(d=c,c=l,l=o,o=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(l=o,o=c=void 0):u===2&&!o.getContext&&(c=l,l=o,o=void 0),new Promise(function(m,b){try{const g=t.create(l,c);m(i(g,o,c))}catch(g){b(g)}})}try{const m=t.create(l,c);d(null,i(m,o,c))}catch(m){d(m)}}return Dp.create=t.create,Dp.toCanvas=s.bind(null,r.render),Dp.toDataURL=s.bind(null,r.renderToDataURL),Dp.toString=s.bind(null,function(i,o,l){return a.render(i,l)}),Dp}var x6e=g6e();const oq=Lr(x6e),y6e=lx("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),dm=L.forwardRef(({className:e,variant:t,...r},a)=>n.jsx("div",{ref:a,role:"alert",className:Ln(y6e({variant:t}),e),...r}));dm.displayName="Alert";const v6e=L.forwardRef(({className:e,...t},r)=>n.jsx("h5",{ref:r,className:Ln("mb-1 font-medium leading-none tracking-tight",e),...t}));v6e.displayName="AlertTitle";const um=L.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:Ln("text-sm [&_p]:leading-relaxed",e),...t}));um.displayName="AlertDescription";function b6e(){const e=Sr(),[t,r]=L.useState(""),a=[{page_name:"Home",display_name:"Home",display_order:1},{page_name:"Nominations",display_name:"Nominations",display_order:2},{page_name:"Categories",display_name:"Categories",display_order:3},{page_name:"PastWinners",display_name:"Past Winners",display_order:4},{page_name:"Schedule",display_name:"Schedule",display_order:5},{page_name:"Sponsors",display_name:"Sponsors",display_order:6},{page_name:"News",display_name:"News",display_order:7},{page_name:"FAQs",display_name:"FAQs",display_order:8},{page_name:"Press",display_name:"Press",display_order:9},{page_name:"Contact",display_name:"Contact",display_order:10},{page_name:"History",display_name:"History",display_order:11},{page_name:"Founder",display_name:"The Founder",display_order:12},{page_name:"Venue",display_name:"Venue",display_order:13},{page_name:"Testimonials",display_name:"Testimonials",display_order:14},{page_name:"Gallery",display_name:"Gallery",display_order:15},{page_name:"PeoplesChoiceVote",display_name:"People's Choice Vote",display_order:16},{page_name:"NominationJourney",display_name:"Nomination Journey",display_order:17},{page_name:"JamesESmithAward",display_name:"James E. Smith Award",display_order:18},{page_name:"SinclairMethodUK",display_name:"Main Sponsor",display_order:19},{page_name:"CategorySponsorship",display_name:"Category Sponsorship",display_order:20},{page_name:"PurchaseTable",display_name:"Purchase Table",display_order:21},{page_name:"ManageGuests",display_name:"Manage Guests",display_order:22},{page_name:"Terms",display_name:"Terms & Conditions",display_order:23}],{data:s=[],isLoading:i}=xt({queryKey:["pageVisibility"],queryFn:async()=>await pe.entities.PageVisibility.list("display_order")}),o=Tt({mutationFn:async({id:h,data:u})=>h?await pe.entities.PageVisibility.update(h,u):await pe.entities.PageVisibility.create(u),onSuccess:()=>
1388{e.invalidateQueries({queryKey:["pageVisibility"]}),r("Page visibility updated successfully!"),setTimeout(()=>r(""),3e3)}}),l=Tt({mutationFn:async()=>{const h=new Set(s.map(f=>f.page_name)),u=a.filter(f=>!h.has(f.page_name));u.length>0&&await pe.entities.PageVisibility.bulkCreate(u.map(f=>({...f,is_visible:!0,show_in_navigation:!0})))},onSuccess:()=>{e.invalidateQueries({queryKey:["pageVisibility"]}),r("Pages initialized successfully!"),setTimeout(()=>r(""),3e3)}}),c=async(h,u)=>{const f=h[u]??!0;await o.mutateAsync({id:h.id,data:{[u]:!f}})},d=a.map(h=>s.find(f=>f.page_name===h.page_name)||{...h,is_visible:!0,show_in_navigation:!0});return i?n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsx(Pt,{children:"Page Visibility Control"})}),n.jsx(Ce,{children:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Gy,{className:"w-6 h-6 animate-spin text-gray-400"})})})]}):n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx(Pt,{children:"Page Visibility Control"}),n.jsx(wr,{children:"Control which pages are visible to the public and appear in navigation menus"})]}),s.length===0&&n.jsxs(me,{onClick:()=>l.mutate(),disabled:l.isPending,children:[n.jsx(Gy,{className:`w-4 h-4 mr-2 ${l.isPending?"animate-spin":""}`}),"Initialize Pages"]})]})}),n.jsxs(Ce,{children:[t&&n.jsx(dm,{className:"mb-4 bg-green-50 border-green-200",children:n.jsx(um,{className:"text-green-800",children:t})}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"grid grid-cols-12 gap-4 pb-2 border-b font-semibold text-sm text-gray-600",children:[n.jsx("div",{className:"col-span-5",children:"Page"}),n.jsx("div",{className:"col-span-3 text-center",children:"Page Accessible"}),n.jsx("div",{className:"col-span-4 text-center",children:"Show in Navigation"})]}),d.map(h=>n.jsxs("div",{className:"grid grid-cols-12 gap-4 items-center py-3 border-b hover:bg-gray-50 transition-colors",children:[n.jsxs("div",{className:"col-span-5",children:[n.jsx("div",{className:"font-medium text-gray-900",children:h.display_name}),n.jsx("div",{className:"text-xs text-gray-500",children:h.page_name})]}),n.jsx("div",{className:"col-span-3 flex items-center justify-center",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cs,{checked:h.is_visible??!0,onCheckedChange:()=>c(h,"is_visible"),disabled:o.isPending}),h.is_visible?n.jsx(sd,{className:"w-4 h-4 text-green-600"}):n.jsx(Ey,{className:"w-4 h-4 text-gray-400"})]})}),n.jsx("div",{className:"col-span-4 flex items-center justify-center",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cs,{checked:h.show_in_navigation??!0,onCheckedChange:()=>c(h,"show_in_navigation"),disabled:o.isPending||!h.is_visible}),n.jsx("span",{className:"text-sm text-gray-600",children:h.show_in_navigation?"Visible":"Hidden"})]})})]},h.page_name))]}),n.jsx("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:n.jsxs("p",{className:"text-sm text-blue-900",children:[n.jsx("strong",{children:"Note:"}),` When "Page Accessible" is off, the page cannot be accessed by anyone (except admins). When "Show in Navigation" is off, the page is still accessible via direct URL but won't appear in menus.`]})})]})]})}function w6e(){const e=Sr(),[t,r]=L.useState(null),[a,s]=L.useState(!1),[i,o]=L.useState("editor"),[l,c]=L.useState(null),[d,h]=L.useState({template_name:"",subject:"",body:"",template_type:"nomination",is_active:!0,available_variables:[],description:"",attachments:[]}),[u,f]=L.useState(!1),m=async k=>{var F;if(!k)return;const P=10*1024*1024;if(k.size>P){alert("File is too large. Maximum size is 10MB.");return}if(!["application/pdf","image/png","image/jpeg","image/jpg","image/gif"].includes(k.type)){alert("Invalid file type. Please upload PDF, PNG, JPG, or GIF files.");return}f(!0);try{const $=await pe.integrations.Core.UploadFile({file:k});console.log("Upload response:",$);const G=((F=$==null?void 0:$.data)==null?void 0:F.file_url)||($==null?void 0:$.file_url);if(!G)throw new Error("Upload failed - no file URL returned");const B={filename:k.name,url:G,size:k.size,type:k.type};h(Y=>({...Y,attachments:[...Y.attachments||[],B]})),alert(`✓ File "${k.name}" uploaded successfully!`)}catch($){console.error("Upload error:",$),alert("Failed to upload file: "+($.message||"Unknown error"))}finally{f(!1)}},b=k=>{k.preventDefault();const P=k.dataTransfer.files[0];P&&m(P)},g=k=>{k.preventDefault()},y=k=>{h(P=>({...P,attachments:P.attachments.filter((O,F)=>F!==k)}))},x=k=>k<1024?k+" B":k<1024*1024?(k/1024).toFixed(1)+" KB":(k/(1024*1024)).toFixed(1)+" MB",{data:w=[]}=xt({queryKey:["emailTemplates"],queryFn:()=>pe.entities.EmailTemplate.list("-created_date",50)}),j=Tt({mutationFn:k=>pe.entities.EmailTemplate.create(k),onSuccess:()=>
1388{e.invalidateQueries({queryKey:["emailTemplates"]}),s(!1),S(),alert("✓ Email template created successfully!")}}),N=Tt({mutationFn:({id:k,data:P})=>pe.entities.EmailTemplate.update(k,P),onSuccess:()=>{e.invalidateQueries({queryKey:["emailTemplates"]}),s(!1),r(null),S(),alert("✓ Email template updated successfully!")}}),_=Tt({mutationFn:k=>pe.entities.EmailTemplate.delete(k),onSuccess:()=>{e.invalidateQueries({queryKey:["emailTemplates"]})}}),S=()=>{h({template_name:"",subject:"",body:"",template_type:"nomination",is_active:!0,available_variables:[],description:"",attachments:[]})},A=k=>{r(k),h({template_name:k.template_name,subject:k.subject,body:k.body,template_type:k.template_type,is_active:k.is_active,available_variables:k.available_variables||[],description:k.description||"",attachments:k.attachments||[]}),s(!0)},T=k=>{k.preventDefault(),t?N.mutate({id:t.id,data:d}):j.mutate(d)},R=k=>{let P=k||d.body;const O={"{{nominee_name}}":"Jane Smith","{{nominee_organization}}":"Example Charity","{{nominator_name}}":"John Doe","{{category}}":"Charity of the Year","{{nominator_email}}":"[email protected]","{{submission_date}}":new Date().toLocaleDateString("en-GB")};return Object.entries(O).forEach(([F,$])=>{P=P.replaceAll(F,`<span style="background: #fef3c7; padding: 2px 6px; border-radius: 4px; font-weight: 600;">${$}</span>`)}),P},M=[{name:"Nomination Confirmation",template_name:"nomination_confirmation",description:"Sent to nominators after successful submission",variables:["{{nominator_name}}","{{nominee_name}}","{{nominee_organization}}","{{category}}","{{submission_date}}"]},{name:"Admin Notification",template_name:"admin_notification",description:"Sent to admin team when new nomination received",variables:["{{nominee_name}}","{{nominee_organization}}","{{category}}","{{nominator_name}}","{{nominator_email}}","{{submission_date}}"]}];return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-2xl font-bold text-primary-navy",children:"Email Templates"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Customize automated email responses with HTML formatting"})]}),n.jsxs(me,{onClick:()=>{r(null),S(),s(!0)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create Template"]})]}),n.jsx(_e,{className:"border-2 border-blue-200 bg-gradient-to-r from-blue-50 to-white",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mr,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"font-bold text-blue-900 mb-2",children:"Getting Started"}),n.jsxs("p",{className:"text-sm text-blue-800 mb-3",children:["Create email templates below for different types of automated emails. Use merge variables like ",n.jsx("code",{className:"bg-white px-2 py-1 rounded text-xs",children:"{{nominee_name}}"})," to personalize content."]}),n.jsx("div",{className:"grid md:grid-cols-2 gap-3 mt-3",children:M.map((k,P)=>n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-blue-200",children:[n.jsx("div",{className:"font-semibold text-gray-900 text-sm mb-1",children:k.name}),n.jsx("div",{className:"text-xs text-gray-600 mb-2",children:k.description}),n.jsx("div",{className:"flex flex-wrap gap-1",children:k.variables.map((O,F)=>n.jsx("code",{className:"text-xs bg-gray-100 px-2 py-0.5 rounded",children:O},F))})]},P))})]})]})})}),w.length===0?n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Xr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{className:"text-gray-500 mb-4",children:"No email templates created yet."}),n.jsx("p",{className:"text-sm text-gray-400",children:"Create your first template to customize automated emails"})]})}):n.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:w.map(k=>n.jsxs(_e,{className:"hover:shadow-xl transition-all border-2 border-gray-200 hover:border-primary-navy cursor-pointer",onClick:()=>c(k),children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(Pt,{className:"text-lg text-primary-navy mb-2",children:k.template_name}),n.jsx("p",{className:"text-sm text-gray-600",children:k.description||"No description"})]}),n.jsxs("div",{className:"flex gap-1",onClick:P=>P.stopPropagation(),children:[n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>
1388A(k),children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>{window.confirm("Delete this email template?")&&_.mutate(k.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:"Subject Line:"}),n.jsx("div",{className:"text-sm text-gray-900 font-medium",children:k.subject})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-semibold text-gray-500 mb-1",children:"Preview:"}),n.jsxs("div",{className:"text-sm text-gray-700 line-clamp-3 bg-gray-50 p-3 rounded border",children:[k.body.replace(/<[^>]*>/g,"").substring(0,150),"..."]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(dt,{className:k.is_active?"bg-green-500 text-white":"bg-gray-400 text-white",children:k.is_active?"Active":"Inactive"}),n.jsx(dt,{variant:"outline",className:"text-xs",children:k.template_type})]})]})})]},k.id))}),n.jsx(Nn,{open:a,onOpenChange:k=>{s(k),k||(r(null),S())},children:n.jsxs(vn,{className:"max-w-5xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:t?"Edit Email Template":"Create Email Template"}),n.jsxs(_s,{children:["Use HTML with inline styles for rich formatting. Insert merge variables like ","{{nominee_name}}"," to personalize emails. Toggle preview to see how it looks."]})]}),n.jsxs("form",{onSubmit:T,className:"space-y-6 py-4",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"template-name",children:"Template Identifier *"}),n.jsx(Me,{id:"template-name",value:d.template_name,onChange:k=>h({...d,template_name:k.target.value}),placeholder:"e.g., nomination_confirmation",required:!0}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Use underscores, no spaces (e.g., admin_notification)"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"template-type",children:"Template Type *"}),n.jsxs("select",{id:"template-type",value:d.template_type,onChange:k=>h({...d,template_type:k.target.value}),className:"w-full h-10 px-3 rounded-md border border-gray-300 text-sm",required:!0,children:[n.jsx("option",{value:"nomination",children:"Nomination"}),n.jsx("option",{value:"decline",children:"Decline Notification"}),n.jsx("option",{value:"contact",children:"Contact Form"}),n.jsx("option",{value:"ticket",children:"Ticket/Event"}),n.jsx("option",{value:"system",children:"System"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"template-description",children:"Description"}),n.jsx(Me,{id:"template-description",value:d.description,onChange:k=>h({...d,description:k.target.value}),placeholder:"When is this template used?"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"template-subject",children:"Email Subject Line *"}),n.jsx(Me,{id:"template-subject",value:d.subject,onChange:k=>h({...d,subject:k.target.value}),placeholder:"Thank You For Your Nomination - National Charity Today Awards™",required:!0})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx(ye,{htmlFor:"template-body",children:"Email Body *"}),n.jsxs(me,{type:"button",variant:i==="preview"?"default":"outline",size:"sm",onClick:()=>o(i==="editor"?"preview":"editor"),className:i==="preview"?"bg-primary-navy":"",children:[n.jsx(sd,{className:"w-4 h-4 mr-1"}),i==="editor"?"Preview":"Edit"]})]}),i==="editor"?n.jsx("div",{className:"bg-white border rounded-lg",children:n.jsx("textarea",{value:d.body,onChange:k=>h({...d,body:k.target.value}),placeholder:"Paste your HTML email template here. Use inline styles for formatting...",className:"w-full min-h-[400px] p-4 font-mono text-sm border-0 focus:ring-2 focus:ring-primary-navy rounded-lg resize-y",spellCheck:"false"})}):n.jsx("div",{className:"border rounded-lg p-6 bg-white min-h-[400px] overflow-auto",dangerouslySetInnerHTML:{__html:R()}})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Email Attachments (Optional)"}),n.jsxs("div",{onDrop:b,onDragOver:g,className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center hover:border-primary-navy transition-colors cursor-pointer bg-gray-50",children:[n.jsx("input",{type:"file",id:"file-upload",className:"hidden",accept:".pdf,.png,.jpg,.jpeg,.gif",onChange:k=>m(k.target.files[0]),disabled:u}),n.jsxs("label",{htmlFor:"file-upload",className:"cursor-pointer",children:[n.jsx(Al,{className:"w-12 h-12 mx-auto mb-3 text-gray-400"}),n.jsx("p",{className:"text-sm font-medium text-gray-700 mb-1",children:u?"Uploading...":"Drop file here or click to upload"}),n.jsx("p",{className:"text-xs text-gray-500",children:"Supports: PDF, PNG, JPG, GIF (max 10MB)"})]})]}),d.attachments&&d.attachments.length>0&&n.jsx("div",{className:"mt-4 space-y-2",children:d.attachments.map((k,P)=>{var O;return n.jsxs("div",{className:"flex items-center justify-between bg-white border rounded-lg p-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[(O=k.type)!=null&&O.includes("image")?n.jsx(Cg,{className:"w-5 h-5 text-blue-600"}):n.jsx(pr,{className:"w-5 h-5 text-red-600"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:k.filename}),n.jsx("div",{className:"text-xs text-gray-500",children:x(k.size)})]})]}),n.jsx(me,{type:"button",variant:"ghost",size:"icon",onClick:()=>y(P),className:"text-red-600 hover:bg-red-50",children:n.jsx(Ei,{className:"w-4 h-4"})})]},P)})})]}),n.jsx(_e,{className:"bg-gray-50 border-gray-200",children:n.jsx(Ce,{className:"p-4",children:n.jsxs("div",{className:"text-sm",children:[n.jsx("div",{className:"font-semibold text-gray-900 mb-2",children:"Available Merge Variables:"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:["{{nominee_name}}","{{nominee_organization}}","{{nominator_name}}","{{nominator_email}}","{{category}}","{{submission_date}}"].map(k=>n.jsx("button",{type:"button",onClick:()=>{h(P=>({...P,body:P.body+k}))},className:"bg-white border border-gray-300 hover:border-primary-navy px-3 py-1 rounded text-xs font-mono transition-colors",children:k},k))}),n.jsx("p",{className:"text-xs text-gray-600 mt-3",children:"Click any variable to insert it into your template. These will be replaced with actual data when emails are sent."})]})})}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{s(!1),r(null),S()},className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-bold",disabled:j.isPending||N.isPending,children:j.isPending||N.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),t?"Update Template":"Create Template"]})})]})]})]})}),n.jsx(Nn,{open:!!l,onOpenChange:k=>!k&&c(null),children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:l==null?void 0:l.template_name}),n.jsx(_s,{children:(l==null?void 0:l.description)||"Email template preview with sample data"})]}),l&&n.jsxs("div",{className:"space-y-6 py-4",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Subject Line:"}),n.jsx("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 font-medium",children:l.subject})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Email Content:"}),n.jsx("div",{className:"border border-gray-200 rounded-lg p-6 bg-white prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:R(l.body)}})]}),l.attachments&&l.attachments.length>0&&n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Attachments:"}),n.jsx("div",{className:"space-y-2",children:l.attachments.map((k,P)=>{var O;return n.jsxs("div",{className:"flex items-center gap-3 bg-gray-50 border rounded-lg p-3",children:[(O=k.type)!=null&&O.includes("image")?n.jsx(Cg,{className:"w-5 h-5 text-blue-600"}):n.jsx(pr,{className:"w-5 h-5 text-red-600"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-gray-900",children:k.filename}),n.jsx("div",{className:"text-xs text-gray-500",children:x(k.size)})]})]},P)})})]}),n.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(dt,{className:l.is_active?"bg-green-500 text-white":"bg-gray-400 text-white",children:l.is_active?"Active":"Inactive"}),n.jsx(dt,{variant:"outline",children:l.template_type})]}),n.jsxs(me,{onClick:()=>{c(null),A(l)},className:"bg-primary-navy hover:opacity-90",children:[n.jsx(xa,{
1388className:"w-4 h-4 mr-2"}),"Edit Template"]})]})]})]})})]})}function j6e(){const e=Sr(),[t,r]=L.useState(!1),[a,s]=L.useState(null),[i,o]=L.useState({question:"",answer:"",category:"general",display_order:0}),[l,c]=L.useState("all"),{data:d=[]}=xt({queryKey:["faqs"],queryFn:()=>pe.entities.FAQ.list("display_order",100),staleTime:3e4,refetchOnWindowFocus:!1}),h=Tt({mutationFn:N=>pe.entities.FAQ.create(N),onSuccess:()=>{e.invalidateQueries({queryKey:["faqs"]}),r(!1),m()}}),u=Tt({mutationFn:({id:N,faqData:_})=>pe.entities.FAQ.update(N,_),onSuccess:()=>{e.invalidateQueries({queryKey:["faqs"]}),r(!1),m()}}),f=Tt({mutationFn:N=>pe.entities.FAQ.delete(N),onSuccess:()=>{e.invalidateQueries({queryKey:["faqs"]})}}),m=()=>{s(null),o({question:"",answer:"",category:"general",display_order:0})},b=N=>{s(N),o({question:N.question||"",answer:N.answer||"",category:N.category||"general",display_order:N.display_order||0}),r(!0)},g=N=>{N.preventDefault(),a?u.mutate({id:a.id,faqData:i}):h.mutate(i)},y=N=>{window.confirm("Are you sure you want to delete this FAQ? This action cannot be undone.")&&f.mutate(N)},x=l==="all"?d:d.filter(N=>N.category===l),w={nominations:"bg-blue-100 text-blue-800",eligibility:"bg-purple-100 text-purple-800",judging:"bg-orange-100 text-orange-800",event:"bg-green-100 text-green-800",general:"bg-gray-100 text-gray-800"},j=N=>d.filter(_=>_.category===N).length;return n.jsxs(n.Fragment,{children:[n.jsx(Nn,{open:t,onOpenChange:N=>{r(N),N||m()},children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:a?"Edit FAQ":"Create New FAQ"})}),n.jsxs("form",{onSubmit:g,className:"py-4 space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"faq-question",children:"Question *"}),n.jsx("style",{children:`
1389                .faq-question-editor .ql-toolbar {
1390                  border-radius: 8px 8px 0 0;
1391                  background: #f9fafb;
1392                }
1393                .faq-question-editor .ql-container {
1394                  border-radius: 0 0 8px 8px;
1395                  min-height: 80px;
1396                }
1397              `}),n.jsx("div",{className:"border rounded-lg overflow-hidden mt-2 faq-question-editor",children:n.jsx(sx,{value:i.question,onChange:N=>o({...i,question:N}),modules:{toolbar:[["bold","italic","underline"],[{color:[]}],["clean"]]},placeholder:"Enter the FAQ question...",theme:"snow"})}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"You can use basic formatting for the question"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"faq-answer",children:"Answer *"}),n.jsx("style",{children:`
1398                .faq-answer-editor .ql-toolbar {
1399                  position: sticky;
1400                  top: 0;
1401                  z-index: 10;
1402                  background: #f9fafb;
1403                  border-bottom: 2px solid #e5e7eb !important;
1404                  border-radius: 8px 8px 0 0;
1405                }
1406                .faq-answer-editor .ql-container {
1407                  border-radius: 0 0 8px 8px;
1408                  min-height: 250px;
1409                }
1410              `}),n.jsx("div",{className:"border rounded-lg overflow-hidden mt-2 faq-answer-editor",children:n.jsx(sx,{value:i.answer,onChange:N=>o({...i,answer:N}),modules:{toolbar:[[{header:[1,2,3,4,5,6,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["blockquote","code-block"],["link"],["clean"]],clipboard:{matchVisual:!1}},placeholder:"Write the detailed answer with formatting...",theme:"snow"})}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Full rich text editor with formatting, lists, links, and more"})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"faq-category",children:"Category *"}),n.jsxs(Qt,{value:i.category,onValueChange:N=>o({...i,category:N}),children:[n.jsx(Kt,{id:"faq-category",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"nominations",children:"Nominations"}),n.jsx(Ae,{value:"eligibility",children:"Eligibility"}),n.jsx(Ae,{value:"judging",children:"Judging"}),n.jsx(Ae,{value:"event",children:"Event"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"faq-order",children:"Display Order"}),n.jsx(Me,{id:"faq-order",type:"number",value:i.display_order,onChange:N=>o({...i,display_order:parseInt(N.target.value)||0}),placeholder:"0"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lower numbers appear first"})]})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>r(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-indigo-600 hover:bg-indigo-700 text-white font-bold",disabled:h.isPending||u.isPending,children:h.isPending||u.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),a?"Update FAQ":"Create FAQ"]})})]})]})]})}),n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{className:"text-2xl",children:"FAQs Management"}),n.jsxs("div",{className:"flex gap-3 items-center",children:[n.jsxs(Qt,{value:l,onValueChange:c,children:[n.jsx(Kt,{className:"w-[200px]",children:n.jsx(Xt,{placeholder:"Filter by category"})}),n.jsxs(Gt,{children:[n.jsxs(Ae,{value:"all",children:["All Categories (",d.length,")"]}),n.jsxs(Ae,{value:"nominations",children:["Nominations (",j("nominations"),")"]}),n.jsxs(Ae,{value:"eligibility",children:["Eligibility (",j("eligibility"),")"]}),n.jsxs(Ae,{value:"judging",children:["Judging (",j("judging"),")"]}),n.jsxs(Ae,{value:"event",children:["Event (",j("event"),")"]}),n.jsxs(Ae,{value:"general",children:["General (",j("general"),")"]})]})]}),n.jsxs(me,{onClick:()=>{m(),r(!0)},className:"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add FAQ"]})]})]})}),n.jsx(Ce,{children:x.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx($h,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:l==="all"?"No FAQs yet. Create your first FAQ!":"No FAQs in this category."})]}):n.jsx("div",{className:"space-y-4",children:x.map(N=>n.jsx(_e,{className:"border-2 border-gray-200 hover:border-indigo-300 transition-all",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[n.jsx(dt,{className:w[N.category],children:N.category}),n.jsxs("span",{className:"text-xs text-gray-500",children:["Order: ",N.display_order]})]}),n.jsx("div",{className:"text-lg font-bold text-primary-navy mb-3",dangerouslySetInnerHTML:{__html:N.question}}),n.jsx("div",{className:"text-gray-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:N.answer}})]}),n.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[n.jsx(me,{variant:"outline",size:"sm",onClick:()=>
1410b(N),className:"hover:bg-indigo-50",children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"outline",size:"sm",onClick:()=>y(N.id),className:"text-red-600 border-red-300 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})})},N.id))})})]})]})}function N6e(){const e=Sr(),[t,r]=L.useState(!1),[a,s]=L.useState(null),[i,o]=L.useState({type:"text",content:"",bullet_points:[""],style:"default",button_link:"",file_name:"",display_order:0}),[l,c]=L.useState(!1),[d,h]=L.useState(!1),{data:u=[]}=xt({queryKey:["nominationConfirmationPage"],queryFn:()=>pe.entities.NominationConfirmationPage.list("-created_date",1)}),f=u[0],m=(f==null?void 0:f.content_items)||[],b=[...m].sort((M,k)=>M.display_order-k.display_order),g=Tt({mutationFn:async M=>f?pe.entities.NominationConfirmationPage.update(f.id,M):pe.entities.NominationConfirmationPage.create(M),onSuccess:()=>{e.invalidateQueries({queryKey:["nominationConfirmationPage"]})}}),y=()=>{s(null),o({type:"text",content:"",bullet_points:[""],style:"default",button_link:"",file_name:"",display_order:m.length}),r(!0)},x=(M,k)=>{s(k),o({type:M.type,content:M.content||"",bullet_points:M.bullet_points||[""],style:M.style||"default",button_link:M.button_link||"",file_name:M.file_name||"",display_order:M.display_order}),r(!0)},w=()=>{const M={...i,bullet_points:i.type==="bullet_list"?i.bullet_points.filter(P=>P.trim()):void 0};let k;a!==null?(k=[...m],k[a]=M):k=[...m,M],g.mutate({content_items:k,is_active:!0}),r(!1)},j=M=>{if(!confirm("Delete this content item?"))return;const k=m.filter((P,O)=>O!==M);g.mutate({content_items:k,is_active:!0})},N=(M,k)=>{const P=[...m],O=k==="up"?M-1:M+1;O<0||O>=P.length||([P[M],P[O]]=[P[O],P[M]],P.forEach((F,$)=>{F.display_order=$}),g.mutate({content_items:P,is_active:!0}))},_=async(M,k)=>{const P=M.target.files[0];if(P){c(!0);try{const O=await pe.integrations.Core.UploadFile({file:P});o(F=>({...F,content:O.file_url,file_name:P.name}))}catch{alert("Failed to upload file")}c(!1)}},S=()=>{o(M=>({...M,bullet_points:[...M.bullet_points,""]}))},A=(M,k)=>{const P=[...i.bullet_points];P[M]=k,o(O=>({...O,bullet_points:P}))},T=M=>{o(k=>({...k,bullet_points:k.bullet_points.filter((P,O)=>O!==M)}))},R=M=>{switch(M){case"heading":return n.jsx(KJ,{className:"w-5 h-5"});case"text":return n.jsx(pr,{className:"w-5 h-5"});case"bullet_list":return n.jsx(aJ,{className:"w-5 h-5"});case"pdf":return n.jsx(pr,{className:"w-5 h-5"});case"image":return n.jsx(Cg,{className:"w-5 h-5"});case"button":return n.jsx(Dq,{className:"w-5 h-5"});default:return n.jsx(pr,{className:"w-5 h-5"})}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-2xl font-bold text-primary-navy",children:"Confirmation Page Editor"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Customize the page shown after nomination submission"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(me,{onClick:()=>h(!0),variant:"outline",className:"border-primary-navy text-primary-navy",children:[n.jsx(sd,{className:"w-4 h-4 mr-2"}),"Preview Page"]}),n.jsxs(me,{onClick:y,className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Content"]})]})]}),n.jsxs(_e,{children:[n.jsxs(Nt,{children:[n.jsxs(Pt,{children:["Page Content (",m.length," items)"]}),n.jsx(wr,{children:"Drag to reorder, or use arrow buttons"})]}),n.jsx(Ce,{children:m.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:'No content items yet. Click "Add Content" to get started.'})]}):n.jsx("div",{className:"space-y-3",children:b.map((M,k)=>{var P;return n.jsx("div",{className:"border-2 border-gray-200 rounded-lg p-4 bg-white hover:border-accent-gold transition-all",children:n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>N(k,"up"),disabled:k===0,className:"h-8 w-8",children:n.jsx(Y0,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>N(k,"down"),disabled:k===b.length-1,className:"h-8 w-8",children:n.jsx(Wm,{className:"w-4 h-4"})})]}),n.jsx("div",{className:"flex-1",children:n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy rounded-lg flex items-center justify-center text-white",children:R(M.type)}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(dt,{variant:"outline",children:M.type.replace("_"," ")}),M.style!=="default"&&n.jsx(dt,{className:"bg-blue-500 text-white",children:M.style})]}),M.type==="heading"&&n.jsx("div",{className:"text-lg font-bold text-gray-900",children:M.content}),M.type==="text"&&n.jsx("div",{className:"text-sm text-gray-700 line-clamp-2",children:M.content}),M.type==="bullet_list"&&n.jsxs("div",{className:"text-sm text-gray-700",children:[((P=M.bullet_points)==null?void 0:P.length)||0," bullet points"]}),M.type==="pdf"&&n.jsxs("div",{className:"text-sm text-gray-700 flex items-center gap-2",children:[n.jsx(pr,{className:"w-4 h-4"}),M.file_name||"PDF Document"]}),M.type==="image"&&n.jsx("div",{className:"text-sm text-gray-700",children:n.jsx("img",{src:M.content,alt:"Preview",className:"h-16 w-auto rounded border"})}),M.type==="button"&&n.jsxs("div",{className:"text-sm text-gray-700",children:["Button: ",M.content," → ",M.button_link]})]})]})}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(me,{variant:"outline",size:"sm",onClick:()=>x(M,k),children:"Edit"}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>j(k),className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})},k)})})})]}),n.jsx(Nn,{open:t,onOpenChange:r,children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{children:a!==null?"Edit Content Item":"Add Content Item"}),n.jsx(_s,{children:"Configure the content to display on the confirmation page"})]}),n.jsxs("div",{className:"space-y-6 py-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Content Type"}),n.jsxs(Qt,{value:i.type,onValueChange:M=>o({...i,type:M}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"heading",children:"Heading"}),n.jsx(Ae,{value:"text",children:"Text Paragraph"}),n.jsx(Ae,{value:"bullet_list",children:"Bullet List"}),n.jsx(Ae,{value:"pdf",children:"PDF Document"}),n.jsx(Ae,{value:"image",children:"Image"}),n.jsx(Ae,{value:"button",children:"Button Link"})]})]})]}),(i.type==="heading"||i.type==="text")&&n.jsxs("div",{children:[n.jsx(ye,{children:i.type==="heading"?"Heading Text":"Paragraph Text"}),i.type==="heading"?n.jsx(Me,{value:i.content,onChange:M=>o({...i,content:M.target.value}),placeholder:"Enter heading text"}):n.jsx(en,{value:i.content,onChange:M=>o({...i,content:M.target.value}),placeholder:"Enter paragraph text",rows:4})]}),i.type==="bullet_list"&&n.jsxs("div",{className:"space-y-3",children:[n.jsx(ye,{children:"Bullet Points"}),i.bullet_points.map((M,k)=>n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Me,{value:M,onChange:P=>A(k,P.target.value),placeholder:`Bullet point ${k+1}`,className:"flex-1"}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>T(k),disabled:i.bullet_points.length===1,className:"text-red-600",children:n.jsx(tr,{className:"w-4 h-4"})})]},k)),n.jsxs(me,{type:"button",variant:"outline",size:"sm",onClick:S,children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Bullet Point"]})]}),i.type==="pdf"&&n.jsxs("div",{className:"space-y-3",children:[n.jsx(ye,{children:"PDF Document"}),n.jsx(Me,{value:i.content,onChange:M=>o({...i,content:M.target.value}),placeholder:"Or paste PDF URL"}),n.jsx("div",{className:"border-2 border-dashed rounded-lg p-6",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Al,{className:"w-12 h-12 mx-auto mb-3 text-gray-400"}),n.jsx("label",{className:"cursor-pointer",children:n.jsx(me,{type:"button",variant:"outline",disabled:l,onClick:()=>document.getElementById("pdf-upload").click(),children:l?"Uploading...":"Upload PDF"})}),n.jsx("input",{id:"pdf-upload",type:"file",accept:".pdf",onChange:M=>_(M),className:"hidden"})]})}),n.jsxs("div",{children:[n.jsx(ye,{children:"Display Name"}),n.jsx(Me,{value:i.file_name,onChange:M=>o({...i,file_name:M.target.value}),placeholder:"e.g., Nomination Guidelines"})]})]}),i.type==="image"&&n.jsxs("div",{className:"space-y-3",children:[n.jsx(ye,{children:"Image"}),n.jsx(Me,{value:i.content,onChange:M=>o({...i,content:M.target.value}),placeholder:"Or paste image URL"}),n.jsx("div",{className:"border-2 border-dashed rounded-lg p-6",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Al,{className:"w-12 h-12 mx-auto mb-3 text-gray-400"}),n.jsx("label",{className:"cursor-pointer",children:n.jsx(me,{type:"button",variant:"outline",disabled:l,onClick:()=>document.getElementById("image-upload").click(),children:l?"Uploading...":"Upload Image"})}),n.jsx("input",{id:"image-upload",type:"file",accept:"image/*",onChange:M=>_(M),className:"hidden"})]})}),i.content&&n.jsx("div",{className:"border rounded-lg p-2",children:n.jsx("img",{src:i.content,alt:"Preview",className:"max-h-40 mx-auto"})})]}),i.type==="button"&&n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Button Text"}),n.jsx(Me,{value:i.content,onChange:M=>o({...i,content:M.target.value}),placeholder:"e.g., Submit Another Nomination"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Button Link"}),n.jsx(Me,{value:i.button_link,onChange:M=>o({...i,button_link:M.target.value}),placeholder:"e.g., /Nominations or https://example.com"})]})]}),(i.type==="text"||i.type==="heading")&&n.jsxs("div",{children:[n.jsx(ye,{children:"Style"}),n.jsxs(Qt,{value:i.style,onValueChange:M=>o({...i,style:M}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"default",children:"Default"}),n.jsx(Ae,{value:"highlight",children:"Highlight Box"}),n.jsx(Ae,{value:"success",children:"Success (Green)"}
1410),n.jsx(Ae,{value:"info",children:"Info (Blue)"})]})]})]}),n.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[n.jsx(me,{variant:"outline",onClick:()=>r(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{onClick:w,disabled:g.isPending,className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",children:g.isPending?"Saving...":"Save Content"})]})]})]})}),n.jsx(Nn,{open:d,onOpenChange:h,children:n.jsxs(vn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{children:"Confirmation Page Preview"}),n.jsx(_s,{children:"This is how the page will appear to users after nomination"})]}),n.jsx("div",{className:"py-6 bg-gradient-to-br from-emerald-50 to-blue-50 rounded-lg p-8",children:n.jsxs("div",{className:"max-w-2xl mx-auto",children:[n.jsxs("div",{className:"text-center mb-6",children:[n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"NCTA Logo",className:"w-32 h-32 mx-auto mb-8"}),n.jsx("h1",{className:"text-4xl font-bold text-emerald-600 mb-4",children:"Nomination Submitted Successfully!"})]}),n.jsx("div",{className:"space-y-4",children:b.map((M,k)=>{var P;if(M.type==="heading")return n.jsx("h2",{className:`text-2xl font-bold ${M.style==="success"?"text-green-600":M.style==="info"?"text-blue-600":"text-gray-900"}`,children:M.content},k);if(M.type==="text"){const O="text-gray-700 leading-relaxed";return M.style==="highlight"?n.jsx("div",{className:"bg-white rounded-lg p-4 border-2 border-accent-gold",children:n.jsx("p",{className:O,children:M.content})},k):M.style==="success"?n.jsx("div",{className:"bg-emerald-50 rounded-lg p-4 border border-emerald-200",children:n.jsx("p",{className:"text-emerald-900",children:M.content})},k):M.style==="info"?n.jsx("div",{className:"bg-blue-50 rounded-lg p-4 border border-blue-200",children:n.jsx("p",{className:"text-blue-900",children:M.content})},k):n.jsx("p",{className:O,children:M.content},k)}return M.type==="bullet_list"?n.jsx("div",{className:"bg-white rounded-xl p-6 shadow-lg",children:n.jsx("ul",{className:"space-y-3 text-gray-700",children:(P=M.bullet_points)==null?void 0:P.map((O,F)=>n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:O})]},F))})},k):M.type==="pdf"?n.jsx("a",{href:M.content,target:"_blank",rel:"noopener noreferrer",className:"block bg-white rounded-lg p-4 border-2 border-gray-200 hover:border-primary-navy transition-all",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(pr,{className:"w-8 h-8 text-red-600"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold text-gray-900",children:M.file_name||"Download PDF"}),n.jsx("div",{className:"text-sm text-gray-600",children:"Click to download"})]})]})},k):M.type==="image"?n.jsx("div",{className:"text-center",children:n.jsx("img",{src:M.content,alt:"Content",className:"max-w-full rounded-lg shadow-lg mx-auto"})},k):M.type==="button"?n.jsx("div",{className:"text-center",children:n.jsx(me,{className:"bg-primary-navy hover:opacity-90 text-white",children:M.content})},k):null})})]})})]})})]})}function _6e(){const[e,t]=L.useState(!1),[r,a]=L.useState(!1),[s,i]=L.useState(null),[o,l]=L.useState({title:"Terms and Conditions",content:"",version:"1.0",is_active:!0}),c=Sr(),{data:d=[],isLoading:h}=xt({queryKey:["terms-all"],queryFn:()=>pe.entities.TermsAndConditions.list("-updated_date")}),u=Tt({mutationFn:j=>pe.entities.TermsAndConditions.create(j),onSuccess:()=>{c.invalidateQueries(["terms-all"]),t(!1),m()}}),f=Tt({mutationFn:({id:j,data:N})=>pe.entities.TermsAndConditions.update(j,N),onSuccess:()=>{c.invalidateQueries(["terms-all"]),t(!1),m()}}),m=()=>{l({title:"Terms and Conditions",content:"",version:"1.0",is_active:!0}),i(null)},b=()=>{m(),t(!0)},g=j=>{i(j),l({title:j.title||"Terms and Conditions",content:j.content||"",version:j.version||"1.0",is_active:j.is_active??!0}),t(!0)},y=()=>{const j={...o,last_updated:new Date().toISOString().split("T")[0]};s?f.mutate({id:s.id,data:j}):u.mutate(j)},x=j=>{f.mutate({id:j.id,data:{is_active:!j.is_active}})},w={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],["link"],[{color:[]},{background:[]}],[{align:[]}],["clean"]]};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Terms & Conditions"}),n.jsx("p",{className:"text-gray-600 mt-1",children:"Manage the terms and conditions displayed on your website"})]}),n.jsxs(me,{onClick:b,className:"bg-primary-navy hover:opacity-90",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create New Version"]})]}),h?n.jsx(_e,{children:n.jsx(Ce,{className:"p-12",children:n.jsxs("div",{className:"animate-pulse space-y-4",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded w-1/3"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"})]})})}):d.length===0?n.jsx(_e,{children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Terms & Conditions Yet"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"Create your first terms and conditions document."}),n.jsxs(me,{onClick:b,className:"bg-primary-navy hover:opacity-90",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create Terms"]})]})}):n.jsx("div",{className:"grid gap-4",children:d.map(j=>n.jsx(_e,{className:j.is_active?"border-accent-gold border-2":"",children:n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs(Pt,{className:"flex items-center gap-3",children:[j.title||"Terms and Conditions",j.is_active&&n.jsx("span",{className:"px-3 py-1 bg-accent-gold text-primary-navy text-xs font-semibold rounded-full",children:"Active"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4 mt-2 text-sm text-gray-600",children:[j.version&&n.jsxs("span",{children:["Version ",j.version]}),j.last_updated&&n.jsxs("span",{children:["Updated ",yt(new Date(j.last_updated),"MMM d, yyyy")]})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>{i(j),a(!0)},children:[n.jsx(sd,{className:"w-4 h-4 mr-1"}),"Preview"]}),n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>g(j),children:[n.jsx(Gw,{className:"w-4 h-4 mr-1"}),"Edit"]}),n.jsx(me,{variant:j.is_active?"outline":"default",size:"sm",onClick:()=>x(j),className:j.is_active?"":"bg-accent-gold hover:opacity-90",children:j.is_active?"Deactivate":"Activate"})]})]})})},j.id))}),n.jsx(Nn,{open:e,onOpenChange:t,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{children:s?"Edit Terms & Conditions":"Create Terms & Conditions"})}),n.jsxs("div",{className:"space-y-6 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Title"}),n.jsx(Me,{value:o.title,onChange:j=>l({...o,title:j.target.value}),placeholder:"Terms and Conditions"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Version"}),n.jsx(Me,{value:o.version,onChange:j=>l({...o,version:j.target.value}),placeholder:"1.0"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Content"}),n.jsx("div",{className:"mt-2 border rounded-lg overflow-hidden",children:n.jsx(sx,{theme:"snow",value:o.content,onChange:j=>l({...o,content:j}),modules:w,style:{height:"400px",marginBottom:"50px"},placeholder:"Enter your terms and conditions here..."})})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"checkbox",id:"is_active",checked:o.is_active,onChange:j=>l({...o,is_active:j.target.checked}),className:"w-4 h-4"}),n.jsx(ye,{htmlFor:"is_active",children:"Set as active version (shown on website)"})]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[n.jsxs(me,{variant:"outline",onClick:()=>t(!1),children:[n.jsx(Ei,{className:"w-4 h-4 mr-2"}),"Cancel"]}),n.jsxs(me,{onClick:y,className:"bg-primary-navy hover:opacity-90",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),s?"Update":"Create"]})]})]})]})}),n.jsx(Nn,{open:r,onOpenChange:a,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsxs(Sn,{children:["Preview: ",(s==null?void 0:s.title)||"Terms and Conditions"]})}),n.jsx("div",{className:"py-4",children:s&&n.jsxs("div",{children:[n.jsxs("div",{className:"mb-6 pb-4 border-b text-sm text-gray-600",children:[s.version&&n.jsxs("div",{children:["Version ",s.version]}),s.last_updated&&n.jsxs("div",{children:["Last Updated: ",yt(new Date(s.last_updated),"MMMM d, yyyy")]})]}),n.jsx("div",{className:"prose prose-lg max-w-none",dangerouslySetInnerHTML:{__html:s.content}})]})})]})})]})}function PY({open:e,onOpenChange:t,nomination:r,onConfirm:a,loading:s}){const[i,o]=L.useState(""),[l,c]=L.useState(""),[d,h]=L.useState(""),u=()=>{if(h(""),i!=="[email protected]"){h("Email verification failed. Please enter the correct admin email.");return}a(l.trim()||null),o(""),c("")},f=m=>{m||(o(""),c(""),h("")),t(m)};return n.jsx(Nn,{open:e,onOpenChange:f,children:n.jsxs(vn,{className:"max-w-md",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(Mr,{className:"w-5 h-5 text-red-600"}),"Resend Reminder - Admin Verification"]}),n.jsx(_s,{children:"A reminder has already been sent to this nomination. Verify your admin email to resend."})]}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-3",children:[n.jsxs("p",{className:"text-sm text-orange-900",children:[n.jsx("strong",{children:"Nomination:"}
1410)," ",r==null?void 0:r.nominee_name," (",r==null?void 0:r.category,")"]}),n.jsxs("p",{className:"text-xs text-orange-800 mt-1",children:["Original recipient: ",n.jsx("strong",{children:r==null?void 0:r.nominator_email})]}),n.jsxs("p",{className:"text-xs text-orange-800 mt-1",children:["Last reminder sent: ",n.jsx("strong",{children:r!=null&&r.reminder_sent_date?new Date(r.reminder_sent_date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"Unknown"})]})]}),n.jsxs("div",{children:[n.jsxs(ye,{htmlFor:"override-email",className:"text-sm font-semibold",children:["Send to different email? ",n.jsx("span",{className:"text-gray-500 font-normal",children:"(optional)"})]}),n.jsx(Me,{id:"override-email",type:"email",placeholder:(r==null?void 0:r.nominator_email)||"Leave blank to use original email",value:l,onChange:m=>c(m.target.value),className:"mt-2"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave blank to resend to the original nominator email."})]}),n.jsxs("div",{children:[n.jsxs(ye,{htmlFor:"admin-email",className:"text-sm font-semibold",children:["Enter admin email to verify: ",n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsx(Me,{id:"admin-email",type:"email",placeholder:"[email protected]",value:i,onChange:m=>{o(m.target.value),h("")},className:"mt-2",autoComplete:"email"}),d&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:d})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{variant:"outline",onClick:()=>f(!1),className:"flex-1",disabled:s,children:"Cancel"}),n.jsx(me,{onClick:u,className:"flex-1 bg-red-600 hover:bg-red-700 text-white",disabled:!i||s,children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-2 border-white border-t-transparent mr-2"}),"Sending..."]}):"Resend Reminder"})]})]})]})})}function S6e({nomination:e,selectedNominationIds:t,setSelectedNominationIds:r,onView:a,onSendReminder:s,sendingReminder:i}){const[o,l]=L.useState(!1),[c,d]=L.useState(!1),h=async()=>{const y=!e.menu_choice_email_sent;if(window.confirm(y?`Mark "${e.nominee_name}" as having received the menu choices email?`:`Unmark "${e.nominee_name}" as having received the menu choices email?`)){d(!0);try{await pe.entities.Nomination.update(e.id,{menu_choice_email_sent:y,menu_choice_email_sent_date:y?new Date().toISOString():null}),g3.invalidateQueries({queryKey:["nominations"]})}catch(x){alert("Error: "+x.message)}d(!1)}},u=e.status==="shortlisted"?new Date(e.shortlisted_date||e.updated_date):null;let f=null,m=null,b=!1;u&&(e.reminder_sent_date?(f=new Date(e.reminder_sent_date),f.setDate(f.getDate()+7),m=Math.ceil((f-new Date)/(1e3*60*60*24))):(f=new Date(u),f.setDate(f.getDate()+28),m=Math.ceil((f-new Date)/(1e3*60*60*24))),b=m<0);const g=()=>{e.reminder_sent_date?l(!0):s(e)};return n.jsxs(_e,{className:`hover:shadow-xl transition-all duration-300 border-2 relative ${e.status==="pending_deleti
1410on"?"border-red-300 bg-red-50/40 hover:border-red-500":"border-gray-200 hover:border-primary-navy"}`,children:[n.jsx(Nt,{className:"pb-3",children:n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("div",{className:"flex-shrink-0",onClick:y=>y.stopPropagation(),children:n.jsx(Zr,{checked:t.includes(e.id),onCheckedChange:y=>{r(y?[...t,e.id]:t.filter(x=>x!==e.id))},className:"w-5 h-5"})}),n.jsx(dt,{variant:"outline",className:"text-xs font-medium bg-primary-navy text-white border-primary-navy px-2 py-0.5",children:e.category}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[e.quality_score&&n.jsxs(dt,{className:`text-xs px-2 py-0.5 font-semibold ${e.quality_score>=85?"bg-green-600 text-white":e.quality_score>=70?"bg-blue-600 text-white":e.quality_score>=50?"bg-orange-500 text-white":"bg-red-500 text-white"}`,children:[e.quality_score,"/100"]}),n.jsx(dt,{className:`text-xs px-2 py-0.5 font-medium ${e.status==="finalist"?"bg-purple-500 text-white":e.status==="shortlisted"?"bg-blue-500 text-white":e.status==="under_review"?"bg-orange-500 text-white":e.status==="declined"?"bg-gray-500 text-white":e.status==="pending_deleti
1410on"?"bg-red-700 text-white":"bg-gray-400 text-white"}`,children:e.status==="pending_deletion"?"Pending Deletion":e.status.replace("_"," ")})]})]}),e.status==="shortlisted"&&f&&n.jsxs("div",{className:`mt-2 p-2 rounded-lg text-xs font-semibold ${b?"bg-red-100 text-red-800 border border-red-300":m<=7?"bg-orange-100 text-orange-800 border border-orange-300":"bg-blue-100 text-blue-800 border border-blue-300"}`,children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(la,{className:"w-3 h-3"}),b?"Withdrawal period expired":`${m} day${m!==1?"s":""} to withdraw`]}),n.jsxs("div",{className:"text-[10px] opacity-80 mt-0.5",children:["Withdraw by: ",yt(f,"d MMM yyyy")]})]}),n.jsxs("div",{className:"cursor-pointer",onClick:a,children:[n.jsx(Pt,{className:"text-lg text-primary-navy line-clamp-2 leading-tight",children:e.nominee_name}),n.jsx("p",{className:"text-sm text-gray-600 font-medium mt-1",children:e.nominee_organization})]})]})}),n.jsxs(Ce,{className:"cursor-pointer",onClick:a,children:[n.jsx("p",{className:"text-sm text-gray-700 line-clamp-3 mb-3",children:e.nomination_statement}),n.jsxs("div",{className:"space-y-1 text-xs text-gray-500",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Hd,{className:"w-3 h-3"}),"Nominated by: ",e.nominator_name]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(za,{className:"w-3 h-3"}),yt(new Date(e.created_date),"MMM d, yyyy")]}),e.supporting_files&&e.supporting_files.length>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(pr,{className:"w-3 h-3"}),e.supporting_files.length," file",e.supporting_files.length!==1?"s":""," attached"]}),e.table_requirement&&n.jsxs("div",{className:"flex items-center gap-2 font-medium text-blue-700",children:[n.jsx(Om,{className:"w-3 h-3"}),"Need: ",e.table_requirement==="half_table"?"Half table (5 seats)":"Full table (10 seats)"]})]}),n.jsxs("div",{className:"flex gap-2 mt-4",onClick:y=>y.stopPropagation(),children:[n.jsx(me,{className:"flex-1 bg-primary-navy hover:opacity-90",size:"sm",onClick:a,children:"View Details"}),e.status==="shortlisted"&&n.jsxs(me,{size:"sm",variant:e.reminder_sent_date?"outline":"default",disabled:i===e.id||!!e.reminder_sent_date,onClick:g,className:`text-xs ${e.reminder_sent_date?"border-gray-400 text-gray-600 bg-gray-50 hover:bg-gray-100 cursor-not-allowed":"border-orange-400 text-orange-700 hover:bg-orange-50"}`,title:e.reminder_sent_date?"Locked - requires admin verification to resend":"Send 7-day withdrawal reminder",children:[i===e.id?n.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-2 border-orange-500 border-t-transparent"}):n.jsx(Xr,{className:"w-3 h-3"}),e.reminder_sent_date?"Locked":"Remind"]})]}),e.status==="finalist"&&n.jsx("div",{className:"mt-3",onClick:y=>y.stopPropagation(),children:e.menu_choice_email_sent?n.jsxs("div",{className:"flex items-center justify-between gap-2 bg-green-50 border border-green-200 rounded-md px-2.5 py-1.5",children:[n.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-semibold text-green-700",children:[n.jsx(Pm,{className:"w-3.5 h-3.5"}),"Menu sent",e.menu_choice_email_sent_date?` · ${yt(new Date(e.menu_choice_email_sent_date),"d MMM yyyy")}`:""]}),n.jsx(me,{size:"sm",variant:"ghost",disabled:c,onClick:h,className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-700 hover:bg-green-100",title:"Unmark menu sent",children:c?"…":"Undo"})]}):n.jsxs(me,{size:"sm",variant:"outline",disabled:c,onClick:h,className:"w-full text-xs border-amber-400 text-amber-700 hover:bg-amber-50",title:"Mark that the menu choices email has been sent to this finalist",children:[c?n.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-2 border-amber-500 border-t-transparent"}):n.jsx(Qy,{className:"w-3.5 h-3.5"}),"Mark menu sent"]})}),e.status==="shortlisted"&&e.reminder_sent_date&&n.jsxs("p",{className:"text-[10px] text-gray-400 mt-1",children:["Reminder sent: ",yt(new Date(e.reminder_sent_date),"d MMM yyyy")]})]}),n.jsx(PY,{open:o,onOpenChange:l,nomination:e,onConfirm:()=>{s(e),l(!1)},loading:i===e.id})]})}
1410function C6e({open:e,onOpenChange:t,nominations:r,allCategories:a=[],selectedStatusFilter:s,nominationSortBy:i,setNominationSortBy:o,nominationSortOrder:l,setNominationSortOrder:c,getSortedNominations:d,onView:h,onSendReminder:u,sendingReminder:f,blockClose:m,onDeleteNominations:b}){const[g,y]=L.useState(!1),[x,w]=L.useState(null),[j,N]=L.useState([]),[_,S]=L.useState(!1),[A,T]=L.useState(!1),[R,M]=L.useState([]),[k,P]=L.useState(!1),[O,F]=L.useState(!1),$=async le=>{const je=!le.menu_choice_email_sent;if(window.confirm(je?`Mark "${le.nominee_name}" as having received the menu choices email?`:`Unmark "${le.nominee_name}" as having received the menu choices email?`)){F(le.id);try{await pe.entities.Nomination.update(le.id,{menu_choice_email_sent:je,menu_choice_email_sent_date:je?new Date().toISOString():null}),g3.invalidateQueries({queryKey:["nominations"]})}catch(xe){alert("Error: "+xe.message)}F(!1)}},G=s==="under_review",B=s==="pending_deletion",Y=s==="finalist";L.useEffect(()=>{e&&Y&&pe.entities.Category.list("display_order",100).then(M).catch(()=>{})},[e,Y]);const ee=G||B,J=()=>{const le=Q.reduce((Ne,ue)=>{const rt=ue.category||"Uncategorised";return Ne[rt]||(Ne[rt]=[]),Ne[rt].push(ue),Ne},{}),je=R.length>0?R:a,xe=je.length>0?je.map(Ne=>Ne.title).sort():[...new Set(Q.map(Ne=>Ne.category||"Uncategorised"))].sort(),Fe=`<!DOCTYPE html>
1411<html>
1412<head>
1413  <meta charset="utf-8">
1414  <title>Finalists by Category</title>
1415  <style>
1416    @page { margin: 20mm; }
1417    body { font-family: Arial, sans-serif; color: #111; }
1418    .header { text-align: center; margin-bottom: 32px; }
1419    .header h1 { font-size: 22px; color: #06053e; margin: 8px 0 4px; }
1420    .header h2 { font-size: 16px; color: #555; margin: 0 0 4px; font-weight: normal; }
1421    .header p { font-size: 11px; color: #888; margin: 0; }
1422    .logo { height: 72px; }
1423    .category-heading { background: #06053e; color: #dec069; padding: 8px 14px; border-radius: 5px; margin: 24px 0 10px; }
1424    .category-heading h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
1425    .category-heading span { font-size: 11px; color: #f0d89a; }
1426    table { width: 100%; border-collapse: collapse; font-size: 12px; }
1427    thead tr { background: #f9f9f9; border-bottom: 2px solid #dec069; }
1428    th { text-align: left; padding: 7px 10px; color: #06053e; font-weight: bold; }
1429    tbody tr:nth-child(odd) { background: #fff; }
1430    tbody tr:nth-child(even) { background: #fafafa; }
1431    td { padding: 7px 10px; border-bottom: 1px solid #eee; }
1432    .name { font-weight: 600; }
1433    .org { font-size: 11px; color: #555; }
1434    .footer { border-top: 2px solid #dec069; padding-top: 12px; margin-top: 32px; text-align: center; font-size: 10px; color: #888; }
1435  </style>
1436</head>
1437<body>
1438  <div class="header">
1439    <img class="logo" src="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png" alt="NCTA Logo">
1440    <h1>National Charity Today Awards™</h1>
1441    <h2>Finalists ${new Date().getFullYear()}</h2>
1442    <p>Printed ${new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}</p>
1443  </div>
1444  ${xe.map(Ne=>{const ue=le[Ne]||[];return`
1445    <div class="category-heading">
1446      <h3>${Ne}</h3>
1447      <span>${ue.length} finalist${ue.length!==1?"s":""}</span>
1448    </div>
1449    ${ue.length===0?'<p style="font-size:12px;color:#888;font-style:italic;margin:4px 0 0 2px;">None</p>':`<table>
1450      <thead><tr><th>Nominee / Organisation</th><th>Nominator</th><th>Contact Email</th></tr></thead>
1451      <tbody>
1452        ${ue.map(rt=>`
1453          <tr>
1454            <td><div class="name">${rt.nominee_name}</div><div class="org">${rt.nominee_organization||""}</div></td>
1455            <td>${rt.nominator_name||""}</td>
1456            <td>${rt.nominee_email||""}</td>
1457          </tr>
1458        `).join("")}
1459      </tbody>
1460    </table>`}
1461  `}).join("")}
1462  <div class="footer">© ${new Date().getFullYear()} National Charity Today Awards™ · Charity Today · Confidential</div>
1463</body>
1464</html>`,he=window.open("","_blank");he.document.write(Fe),he.document.close(),setTimeout(()=>he.print(),400)},H=async()=>{const le=[...new Set(Q.map(xe=>
1464xe.nominee_email).filter(Boolean))];if(le.length===0)return;const je=le.join(", ");try{await navigator.clipboard.writeText(je)}catch{const Fe=document.createElement("textarea");Fe.value=je,Fe.style.position="fixed",Fe.style.opacity="0",document.body.appendChild(Fe),Fe.select(),document.execCommand("copy"),document.body.removeChild(Fe)}P(!0),setTimeout(()=>P(!1),2e3)},q=le=>{N(je=>je.includes(le)?je.filter(xe=>xe!==le):[...je,le])},K=()=>{j.length===Q.length?N([]):N(Q.map(le=>le.id))},te=async()=>{T(!0),await b(j),N([]),S(!1),T(!1)},re=s==="all"?r:r.filter(le=>le.status===s),Q=d(re),ne=s==="all"?"All Nominations":s.replace("_"," ").charAt(0).toUpperCase()+s.replace("_"," ").slice(1)+" Nominations",oe=le=>{le.reminder_sent_date?(w(le),y(!0)):u(le)},ae=le=>{x&&(u(x,le),y(!1),w(null))};return n.jsxs(Nn,{open:e,onOpenChange:le=>{le===!1&&m||t(le)},children:[n.jsxs(vn,{className:"max-w-6xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(bn,{className:"w-6 h-6 text-accent-gold"}),ne]}),n.jsxs(_s,{children:["View all nominations with status: ",s==="all"?"All":s.replace("_"," ")]})]}),n.jsx("div",{className:"py-4",children:re.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No nominations with this status."})]}):n.jsxs("div",{className:"space-y-4",children:[ee&&n.jsxs("div",{className:"flex items-center gap-3 bg-red-50 border border-red-200 rounded-lg p-3",children:[n.jsx(Zr,{checked:j.length===Q.length&&Q.length>0,onCheckedChange:K,id:"select-all"}),n.jsx("label",{htmlFor:"select-all",className:"text-sm font-medium text-gray-700 cursor-pointer select-none",children:j.length===0?"Select all to delete":`${j.length} selected`}),j.length>0&&!_&&n.jsxs(me,{size:"sm",variant:"destructive",className:"ml-auto flex items-center gap-1",onClick:()=>S(!0),children:[n.jsx(tr,{className:"w-3 h-3"})," Delete Selected (",j.length,")"]}),_&&n.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[n.jsxs("span",{className:"text-sm font-semibold text-red-700",children:["Permanently delete ",j.length," nomination",j.length!==1?"s":"","?"]}),n.jsx(me,{size:"sm",variant:"outline",onClick:()=>S(!1),disabled:A,children:"Cancel"}),n.jsx(me,{size:"sm",variant:"destructive",onClick:te,disabled:A,children:A?"Deleting...":"Yes, Delete"})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3 bg-gray-50 rounded-lg p-3 border",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-700",children:"Sort:"}),n.jsxs(Qt,{value:i,onValueChange:o,children:[n.jsx(Kt,{className:"w-44 h-8 text-sm",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"date",children:"Date Submitted"}),n.jsx(Ae,{value:"score",children:"Quality Score"}),n.jsx(Ae,{value:"status",children:"Status"}),n.jsx(Ae,{value:"withdrawal",children:"Withdrawal Deadline"})]})]}),n.jsxs(Qt,{value:l,onValueChange:c,children:[n.jsx(Kt,{className:"w-36 h-8 text-sm",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"desc",children:i==="score"?"Highest First":i==="withdrawal"?"Soonest First":"Newest First"}),n.jsx(Ae,{value:"asc",children:i==="score"?"Lowest First":i==="withdrawal"?"Latest First":"Oldest First"})]})]}),n.jsxs("span",{className:"text-xs text-gray-500 ml-auto",children:[Q.length," nomination",Q.length!==1?"s":""]}),Y&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:J,className:"flex items-center gap-1.5 text-xs font-semibold text-purple-700 bg-purple-100 hover:bg-purple-200 px-3 py-1.5 rounded-md transition-colors",children:[n.jsx(qq,{className:"w-3.5 h-3.5"}),"Print / Save as PDF"]}),n.jsxs("button",{onClick:H,className:"flex items-center gap-1.5 text-xs font-semibold text-blue-700 bg-blue-100 hover:bg-blue-200 px-3 py-1.5 rounded-md transition-colors",children:[k?n.jsx(Pm,{className:"w-3.5 h-3.5"}):n.jsx(Hy,{className:"w-3.5 h-3.5"}),k?"Copied!":"Copy Email Addresses"]})]})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:Q.map(le=>{let je,xe,Fe;if(le.status==="shortlisted"){const he=new Date(le.shortlisted_date||le.updated_date);le.reminder_sent_date?(je=new Date(le.reminder_sent_date),je.setDate(je.getDate()+7),xe=Math.ceil((je-new Date)/(1e3*60*60*24))):(je=new Date(he),je.setDate(je.getDate()+28),xe=Math.ceil((je-new Date)/(1e3*60*60*24))),Fe=xe<0}return n.jsxs(_e,{className:`hover:shadow-xl transition-all duration-300 border-2 flex flex-col relative ${ee&&j.includes(le.i
1464d)?"border-red-400 bg-red-50":le.status==="pending_deletion"?"border-red-300 bg-red-50/50":"border-gray-200 hover:border-primary-navy"}`,children:[ee&&n.jsx("div",{className:"absolute top-3 left-3 z-10",onClick:he=>he.stopPropagation(),children:n.jsx(Zr,{checked:j.includes(le.id),onCheckedChange:()=>q(le.id)})}),n.jsxs(Nt,{className:`cursor-pointer pb-2 ${ee?"pl-9":""}`,onClick:()=>h(le),children:[n.jsxs("div",{className:"flex items-start justify-between mb-2 gap-2",children:[n.jsx(dt,{className:"text-xs px-2 py-1 bg-primary-navy text-white border-none line-clamp-1",children:le.category}),n.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[le.quality_score&&n.jsxs(dt,{className:`text-xs ${le.quality_score>=85?"bg-green-600 text-white":le.quality_score>=70?"bg-blue-600 text-white":le.quality_score>=50?"bg-orange-500 text-white":"bg-red-500 text-white"}`,children:[le.quality_score,"/100"]}),n.jsx(dt,{className:`text-xs ${le.status==="finalist"?"bg-purple-500 text-white":le.status==="shortlisted"?"bg-blue-500 text-white":le.status==="under_review"?"bg-orange-500 text-white":le.status==="declined"?"bg-gray-500 text-white":le.status==="pending_deleti
1464on"?"bg-red-700 text-white":"bg-gray-400 text-white"}`,children:le.status==="pending_deletion"?"Pending Deletion":le.status.replace("_"," ")})]})]}),n.jsx(Pt,{className:"text-base text-primary-navy line-clamp-2",children:le.nominee_name}),n.jsx("p",{className:"text-sm text-gray-600 font-medium",children:le.nominee_organization})]}),n.jsxs(Ce,{className:"flex flex-col flex-1 pt-0",children:[n.jsx("p",{className:"text-sm text-gray-700 line-clamp-3 mb-3 cursor-pointer",onClick:()=>h(le),children:le.nomination_statement}),n.jsxs("div",{className:"space-y-1 text-xs text-gray-500 cursor-pointer",onClick:()=>h(le),children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Hd,{className:"w-3 h-3"}),"Nominated by: ",le.nominator_name]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(za,{className:"w-3 h-3"}),le.created_date?yt(new Date(le.created_date),"d MMM yyyy"):"Unknown"]}),le.table_requirement&&n.jsxs("div",{className:"flex items-center gap-2 font-medium text-blue-700",children:[n.jsx(Om,{className:"w-3 h-3"}),"Need: ",le.table_requirement==="half_table"?"Half table (5 seats)":"Full table (10 seats)"]})]}),le.status==="shortlisted"&&n.jsxs("div",{className:`mt-3 p-2 rounded-lg text-xs font-semibold ${Fe?"bg-red-100 text-red-800 border border-red-300":xe<=7?"bg-orange-100 text-orange-800 border border-orange-300":"bg-blue-100 text-blue-800 border border-blue-300"}`,children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(la,{className:"w-3 h-3"}),Fe?"Withdrawal period expired":`${xe} day${xe!==1?"s":""} to withdraw`]}),n.jsxs("div",{className:"text-[10px] opacity-80 mt-0.5",children:["Withdraw by: ",yt(je,"d MMM yyyy")]})]}),n.jsxs("div",{className:"flex gap-2 mt-4",children:[n.jsx(me,{className:"flex-1 bg-primary-navy hover:opacity-90",size:"sm",onClick:()=>h(le),children:"View Details"}),le.status==="shortlisted"&&n.jsx(me,{size:"sm",onClick:he=>{he.stopPropagation(),oe(le)},disabled:f===le.id,className:`text-white flex-shrink-0 ${le.reminder_sent_date?"bg-gray-400 hover:bg-gray-500 cursor-not-allowed":"bg-orange-500 hover:bg-orange-600"}`,title:le.reminder_sent_date?"Locked - requires admin verification to resend":"Send 7-day withdrawal reminder",children:f===le.id?n.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-2 border-white border-t-transparent"}):n.jsx(Xr,{className:"w-3 h-3"})})]}),le.status==="finalist"&&n.jsx("div",{className:"mt-3",onClick:he=>he.stopPropagation(),children:le.menu_choice_email_sent?n.jsxs("div",{className:"flex items-center justify-between gap-2 bg-green-50 border border-green-200 rounded-md px-2.5 py-1.5",children:[n.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-semibold text-green-700",children:[n.jsx(Pm,{className:"w-3.5 h-3.5"}),"Menu sent",le.menu_choice_email_sent_date?` · ${yt(new Date(le.menu_choice_email_sent_date),"d MMM yyyy")}`:""]}),n.jsx(me,{size:"sm",variant:"ghost",disabled:O===le.id,onClick:()=>$(le),className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-700 hover:bg-green-100",title:"Unmark menu sent",children:O===le.id?"…":"Undo"})]}):n.jsxs(me,{size:"sm",variant:"outline",disabled:O===le.id,onClick:()=>$(le),className:"w-full text-xs border-amber-400 text-amber-700 hover:bg-amber-50",title:"Mark that the menu choices email has been sent to this finalist",children:[O===le.id?n.jsx("div",{className:"animate-spin rounded-full h-3 w-3 border-2 border-amber-500 border-t-transparent"}):n.jsx(Qy,{className:"w-3.5 h-3.5"}),"Mark menu sent"]})}),le.reminder_sent_date&&n.jsxs("p",{className:"text-[10px] text-orange-600 mt-1 text-right",children:["Reminder sent ",yt(new Date(le.reminder_sent_date),"d MMM yyyy")]})]})]},le.id)})})]})}),n.jsx("div",{className:"flex justify-end pt-4 border-t",children:n.jsx(me,{onClick:()=>t(!1),children:"Close"})})]}),n.jsx(PY,{open:g,onOpenChange:y,nomination:x,onConfirm:ae,loading:f===(x==null?void 0:x.id)})]})}function A6e({open:e,onOpenChange:t,editingWinner:r,winnerFormData:a,setWinnerFormData:s,onSubmit:i,uploadingWinnerImage:o,onImageUpload:l,categories:c}){return n.jsx(Nn,{open:e,onOpenChange:d=>{t(d),d||s({year:new Date().getFullYear(),categories:[],winner_name:"",organization:"",description:"",image_url:"",website_url:"",featured:!1})},children:n.jsxs(vn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:r?"Edit Winner":"Add New Winner"})}),n.jsxs("form",{onSubmit:i,className:"py-4 space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"winner-year",children:"Year *"}),n.jsx(Me,{id:"winner-year",type:"number",value:a.year,onChange:d=>s({...a,year:parseInt(d.target.value)}),required:!0})]}),n.jsxs("div",{children:[n.jsxs(ye,{children:["Categories * ",n.jsx("span",{className:"text-sm font-normal text-gray-500",children:"(Select all that apply)"})]}),n.jsx("div",{className:"grid md:grid-cols-2 gap-3 mt-2 max-h-60 overflow-y-auto p-4 bg-gray-50 rounded-lg border border-gray-200",children:c.map(d=>{const h=a.categories.includes(d.title);return n.jsx("div",{onClick:()=>{s(u=>({...u,categories:h?u.categories.filter(f=>f!==d.title):[...u.categories,d.title]}))},className:`p-3 rounded-lg border-2 cursor-pointer transition-all ${h?"bg-green-50 border-green-500":"bg-white border-gray-200 hover:border-gray-300"}`,children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-5 h-5 rounded border-2 flex items-center justify-center ${h?"bg-green-500 border-green-500":"border-gray-300"}`,children:h&&n.jsx(Cn,{className:"w-4 h-4 text-white"})}),n.jsx("span",{className:`text-sm font-medium ${h?"text-green-900":"text-gray-700"}`,children:d.title})]})},d.id)})}),n.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:[a.categories.length||0," categor",a.categories.length===1?"y":"ies"," selected"]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"winner-name",children:"Winner Name *"}),n.jsx(Me,{id:"winner-name",value:a.winner_name,onChange:d=>s({...a,winner_name:d.target.value}),placeholder:"Name of the winner",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"winner-org",children:"Organization *"}),n.jsx(Me,{id:"winner-org",value:a.organization,onChange:d=>s({...a,organization:d.target.value}),placeholder:"Organization name",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"winner-description",children:"Description"}),n.jsx(en,{id:"winner-description",value:a.description,onChange:d=>s({...a,description:d.target.value}),placeholder:"Why they won - their achievement",rows:4})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Winner Image"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(Me,{id:"winner-image-url",value:a.image_url,onChange:d=>s({...a,image_url:d.target.value}),placeholder:"Or paste direct image URL"}),n.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 hover:border-accent-gold transition-colors",children:n.jsxs("div",{className:"text-center",children:[n.jsx(x1,{className:"w-12 h-12 mx-auto mb-3 text-gray-400"}),n.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Upload winner photo or logo"}),n.jsx(me,{type:"button",variant:"outline",disabled:o,onClick:()=>document.getElementById("winner-image-file").click(),children:o?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2"}),"Choose Image"]})}),n.jsx("input",{id:"winner-image-file",type:"file",accept:"image/*",onChange:l,className:"hidden"})]})}),a.image_url&&n.jsx("div",{className:"border rounded-lg p-2 bg-gray-50",children:n.jsx("img",{src:a.image_url,alt:"Winner preview",className:"max-h-64 mx-auto object-contain rounded"})})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"winner-website",children:"Website URL"}),n.jsx(Me,{id:"winner-website",type:"url",value:a.website_url,onChange:d=>s({...a,website_url:d.target.value}),placeholder:"https://example.org"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"winner-featured",checked:a.featured,onCheckedChange:d=>s({...a,featured:d})}),n.jsx(ye,{htmlFor:"winner-featured",children:"Feature on Homepage"})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>t(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:o,children:o?"Uploading...":r?"Update Winner":"Add Winner"})]})]})]})})}
1464function k6e({open:e,onOpenChange:t,editingTestimonial:r,testimonialFormData:a,setTestimonialFormData:s,onSubmit:i,uploadingTestimonialImage:o,onImageUpload:l}){return n.jsx(Nn,{open:e,onOpenChange:c=>{t(c),c||s({name:"",role:"",organization:"",quote:"",category:"winner",awards:[],year:new Date().getFullYear(),image_url:"",is_featured:!1,is_active:!0,display_order:0})},children:n.jsxs(vn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:r?"Edit Testimonial":"Add New Testimonial"})}),n.jsxs("form",{onSubmit:i,className:"py-4 space-y-6",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-name",children:"Name *"}),n.jsx(Me,{id:"testimonial-name",value:a.name,onChange:c=>s({...a,name:c.target.value}),placeholder:"Full name",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-role",children:"Role/Title"}),n.jsx(Me,{id:"testimonial-role",value:a.role,onChange:c=>s({...a,role:c.target.value}),placeholder:"e.g., CEO, Founder"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-org",children:"Organization"}),n.jsx(Me,{id:"testimonial-org",value:a.organization,onChange:c=>s({...a,organization:c.target.value}),placeholder:"Organization name"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-quote",children:"Testimonial Quote *"}),n.jsx(en,{id:"testimonial-quote",value:a.quote,onChange:c=>s({...a,quote:c.target.value}),placeholder:"Enter the testimonial text...",rows:4,required:!0})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-category",children:"Category *"}),n.jsxs(Qt,{value:a.category,onValueChange:c=>s({...a,category:c}),children:[n.jsx(Kt,{id:"testimonial-category",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"winner",children:"Winner"}),n.jsx(Ae,{value:"finalist",children:"Finalist"}),n.jsx(Ae,{value:"sponsor",children:"Sponsor"}),n.jsx(Ae,{value:"attendee",children:"Attendee"}),n.jsx(Ae,{value:"nominator",children:"Nominator"})]})]})]}),n.jsxs("div",{children:[n.jsxs(ye,{htmlFor:"testimonial-awards",children:["Awards ",n.jsx("span",{className:"text-xs text-gray-500",children:"(comma-separated)"})]}),n.jsx(Me,{id:"testimonial-awards",value:(a.awards||[]).join(", "),onChange:c=>s({...a,awards:c.target.value.split(",").map(d=>d.trim())}),placeholder:"Award 1, Award 2"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-year",children:"Year"}),n.jsx(Me,{id:"testimonial-year",type:"number",value:a.year,onChange:c=>s({...a,year:parseInt(c.target.value)})})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Photo"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(Me,{value:a.image_url,onChange:c=>s({...a,image_url:c.target.value}),placeholder:"Or paste image URL"}),n.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-4 hover:border-purple-400 transition-colors",children:n.jsxs("div",{className:"text-center",children:[n.jsx(x1,{className:"w-10 h-10 mx-auto mb-2 text-gray-400"}),n.jsx(me,{type:"button",variant:"outline",size:"sm",disabled:o,onClick:()=>document.getElementById("testimonial-image-file").click(),children:o?"Uploading...":"Upload Photo"}),n.jsx("input",{id:"testimonial-image-file",type:"file",accept:"image/*",onChange:l,className:"hidden"})]})}),a.image_url&&n.jsx("div",{className:"border rounded-lg p-2 bg-gray-50",children:n.jsx("img",{src:a.image_url,alt:"Preview",className:"w-24 h-24 mx-auto object-cover rounded-full"})})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"testimonial-featured",checked:a.is_featured,onCheckedChange:c=>s({...a,is_featured:c})}),n.jsx(ye,{htmlFor:"testimonial-featured",children:"Featured on Homepage"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"testimonial-active",checked:a.is_active,onCheckedChange:c=>s({...a,is_active:c})}),n.jsx(ye,{htmlFor:"testimonial-active",children:"Active/Visible"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"testimonial-order",children:"Display Order"}),n.jsx(Me,{id:"testimonial-order",type:"number",value:a.display_order,onChange:c=>s({...a,display_order:parseInt(c.target.value)||0}),placeholder:"0"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lower numbers appear first"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>t(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-purple-600 hover:bg-purple-700 text-white font-bold",disabled:o,children:o?"Uploading...":r?"Update Testimonial":"Add Testimonial"})]})]})]})})}function P6e({open:e,onOpenChange:t,selectedNomination:r,nominationStatusUpdate:a,setNominationStatusUpdate:s,editingNomination:i,setEditingNomination:o,nominationFormData:l,setN
1464ominationFormData:c,categories:d,updateNominationMutation:h,setPendingStatusChange:u,setShowStatusConfirmDialog:f,scoringNomination:m,generateQualityScore:b}){const g=async()=>{try{const x=await pe.functions.invoke("generateNominationPDF",{nominationData:r}),w=new Blob([x.data],{type:"application/pdf"}),j=window.URL.createObjectURL(w),N=document.createElement("a");N.href=j,N.download=`Nomination_${r.nominee_name.replace(/[^a-z0-9]/gi,"_")}.pdf`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(j)}catch{alert("Failed to download PDF. Please try again.")}},y=async()=>{try{const x=await pe.functions.invoke("generateEvidencePDF",{nominationId:r.id}),w=new Blob([x.data],{type:"application/pdf"}),j=window.URL.createObjectURL(w),N=document.createElement("a");N.href=j,N.download=`NCTA-Evidence-${r.nominee_name.replace(/[^a-z0-9]/gi,"_")}-${r.id.slice(0,8)}.pdf`,document.body.appendChild(N),N.click(),document.body.removeChild(N),window.URL.revokeObjectURL(j)}catch{alert("Failed to download evidence PDF. Please try again.")}};return r?n.jsx(Nn,{open:e,onOpenChange:t,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:"Nomination Details"}),n.jsx(_s,{children:"Full details of this nomination submission"})]}),n.jsxs("div",{className:"py-4 space-y-6",children:[r.quality_score?n.jsxs("div",{className:"bg-gradient-to-br from-indigo-50 via-purple-50 to-blue-50 rounded-xl p-6 border-2 border-indigo-200",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-1",children:"AI Quality Assessment"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Automated scoring based on completeness, detail, evidence, and impact clarity"})]}),n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:`text-5xl font-bold ${r.quality_score>=85?"text-green-600":r.quality_score>=70?"text-blue-600":r.quality_score>=50?"text-orange-500":"text-red-500"}`,children:r.quality_score}),n.jsx("div",{className:"text-sm text-gray-600 font-semibold",children:"out of 100"})]})]}),r.quality_breakdown&&n.jsxs("div",{className:"space-y-3 mt-6",children:[n.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Completeness",val:r.quality_breakdown.completeness,max:15},{label:"Detail Quality",val:r.quality_breakdown.detail_quality,max:25},{label:"Evidence",val:r.quality_breakdown.evidence_strength,max:20},{label:"Impact Clarity",val:r.quality_breakdown.impact_clarity,max:20},{label:"Video Quality",val:r.quality_breakdown.video_quality,max:10},{label:"Image Quality",val:r.quality_breakdown.image_quality,max:10}].map(({label:x,val:w,max:j})=>n.jsxs("div",{className:"bg-white rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"text-xs text-gray-600 mb-1",children:x}),n.jsxs("div",{className:"text-2xl font-bold text-primary-navy",children:[w,n.jsxs("span",{className:"text-sm text-gray-500",children:["/",j]})]})]},x))}),r.quality_breakdown.summary&&n.jsxs("div",{className:"bg-white rounded-lg p-4 border border-indigo-200",children:[n.jsx("div",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Scoring Rationale:"}),n.jsx("p",{className:"text-sm text-gray-700 leading-relaxed",children:r.quality_breakdown.summary})]})]})]}):n.jsx("div",{className:"bg-gradient-to-br from-gray-50 to-blue-50 rounded-xl p-6 border-2 border-gray-200",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-1",children:"AI Quality Assessment"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Generate an automated quality score for this nomination"})]}),n.jsx(me,{onClick:()=>b(r),disabled:m,className:"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold",children:m?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Analyzing..."]}):n.jsxs(n.Fragment,{children:[n.jsx(ka,{className:"w-4 h-4 mr-2"}),"Generate Score"]})})]})}),n.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-purple-50 rounded-xl p-6 border-2 border-blue-200",children:n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Update Nomination Status"}),n.jsxs(Qt,{value:a||r.status,onValueChange:s,children:[n.jsx(Kt,{className:"w-full",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"under_review",children:"Under Review"}),n.jsx(Ae,{value:"shortlisted",children:"Shortlisted"}),n.jsx(Ae,{value:"finalist",children:"Finalist"}
1464),n.jsx(Ae,{value:"pending_deletion",children:"Pending Deletion"}),n.jsx(Ae,{value:"declined",children:"Declined"})]})]})]}),n.jsx(me,{onClick:()=>{const x=a||r.status;x==="pending_deletion"?h.mutate({id:r.id,data:{status:x}}):(u({nominationId:r.id,oldStatus:r.status,newStatus:x}),f(!0))},disabled:h.isPending||!a||a===r.status,className:"bg-primary-navy hover:opacity-90 text-white font-semibold mt-6",children:h.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Updating..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Update Status"]})})]})}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs(dt,{className:`text-base px-4 py-2 ${r.status==="finalist"?"bg-purple-500 text-white":r.status==="shortlisted"?"bg-blue-500 text-white":r.status==="under_review"?"bg-orange-500 text-white":r.status==="declined"?"bg-gray-500 text-white":r.status==="pending_deletion"?"bg-red-700 text-white":"bg-gray-400 text-white"}
1464`,children:["Current Status: ",r.status==="pending_deletion"?"PENDING DELETION":r.status.replace("_"," ").toUpperCase()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:["Submitted: ",r.created_date?yt(new Date(r.created_date),"d MMMM yyyy h:mm a"):"Unknown date"]})]}),n.jsxs("div",{className:"flex flex-wrap justify-end gap-3",children:[n.jsxs(me,{variant:"outline",onClick:g,className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold",children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Download Nomination PDF"]}),n.jsxs(me,{variant:"outline",onClick:y,title:"Download official evidence report with IP address, timestamps and all submission data – for use in disputes",className:"border-2 border-red-400 text-red-700 hover:bg-red-600 hover:text-white font-semibold",children:[n.jsx(ps,{className:"w-4 h-4 mr-2"}),"Download Evidence PDF"]}),n.jsxs(me,{variant:i?"default":"outline",onClick:()=>{i||c({category:r.category,nominee_name:r.nominee_name,nominee_organization:r.nominee_organization,nominee_email:r.nominee_email,nominee_phone:r.nominee_phone||"",nominator_name:r.nominator_name,nominator_email:r.nominator_email,billing_address:r.billing_address||"",nomination_statement:r.nomination_statement,supporting_evidence:r.supporting_evidence||"",video_url:r.video_url||"",image_1_url:r.image_1_url||"",image_2_url:r.image_2_url||"",admin_notes:r.admin_notes||""}),o(!i)},className:i?"bg-orange-500 hover:bg-orange-600":"",children:[n.jsx(xa,{className:"w-4 h-4 mr-2"}),i?"Cancel Editing":"Edit Nomination"]})]}),n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Category"}),i?n.jsxs(Qt,{value:l.category,onValueChange:x=>c({...l,category:x}),children:[n.jsx(Kt,{className:"mt-1",children:n.jsx(Xt,{})}),n.jsx(Gt,{children:d.map(x=>n.jsx(Ae,{value:x.title,children:x.title},x.id))})]}):n.jsx("p",{className:"text-lg font-bold text-primary-navy mt-1",children:r.category})]}),n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Nominee Information"}),n.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[{label:"Name",field:"nominee_name",type:"text"},{label:"Organization",field:"nominee_organization",type:"text"},{label:"Email",field:"nominee_email",type:"email"},{label:"Phone",field:"nominee_phone",type:"text"}].map(({label:x,field:w,type:j})=>n.jsxs("div",{children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:x}),i?n.jsx(Me,{type:j,value:l[w]||"",onChange:N=>c({...l,[w]:N.target.value}),className:"mt-1"}):n.jsx("p",{className:"text-gray-900 mt-1",children:r[w]||"Not provided"})]},w))})]}),n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Nominator Information"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Name"}),i?n.jsx(Me,{value:l.nominator_name,onChange:x=>c({...l,nominator_name:x.target.value}),className:"mt-1"}):n.jsx("p",{className:"text-gray-900 mt-1",children:r.nominator_name})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Email"}),i?n.jsx(Me,{type:"email",value:l.nominator_email,onChange:x=>c({...l,nominator_email:x.target.value}),className:"mt-1"}):n.jsx("p",{className:"text-gray-900 mt-1",children:r.nominator_email})]}),n.jsxs("div",{className:"md:col-span-2",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Billing Address"}),i?n.jsx("textarea",{value:l.billing_address||"",onChange:x=>c({...l,billing_address:x.target.value}),className:"mt-1 w-full border rounded-md p-2 text-sm min-h-[80px]",placeholder:"Billing address..."}):n.jsx("p",{className:"text-gray-900 mt-1 whitespace-pre-wrap",children:r.billing_address||"Not provided"})]})]}),(r.submitter_ip||r.submitter_user_agent)&&n.jsxs("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:[n.jsxs("div",{className:"text-xs font-semibold text-red-700 mb-1 flex items-center gap-1",children:[n.jsx(ps,{className:"w-3 h-3"})," Submission Fingerprint"]}),r.submitter_ip&&n.jsxs("div",{className:"text-xs text-gray-700",children:[n.jsx("span",{className:"font-medium",children:"IP Address:"})," ",r.submitter_ip]}),r.submitter_user_agent&&n.jsx("div",{className:"text-xs text-gray-500 mt-1 break-all",children:r.submitter_user_agent})]})]}),n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Nomination Statement"}),i?n.jsx(en,{value:l.nomination_statement,onChange:x=>c({...l,nomination_statement:x.target.value}),rows:8}):n.jsx("p",{className:"text-gray-700 whitespace-pre-wrap leading-relaxed",children:r.nomination_statement})]}),n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Supporting Evidence"}),i?n.jsx(en,{value:l.supporting_evidence,onChange:x=>c({...l,supporting_evidence:x.target.value}),rows:4,placeholder:"Additional evidence..."}):n.jsx("p",{className:"text-gray-700 whitespace-pre-wrap leading-relaxed",children:r.supp
1464orting_evidence||"No supporting evidence provided"})]}),n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:"Media"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Video URL"}),i?n.jsx(Me,{value:l.video_url,onChange:x=>c({...l,video_url:x.target.value}),className:"mt-1",placeholder:"YouTube or Vimeo URL"}):n.jsx("p",{className:"text-gray-900 mt-1",children:r.video_url?n.jsxs("a",{href:r.video_url,target:"_blank",rel:"noopener noreferrer",className:"text-primary-navy hover:underline flex items-center gap-1",children:[r.video_url,n.jsx(Pl,{className:"w-3 h-3"})]}):"Not provided"})]}),n.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[{field:"image_1_url",label:"Image 1 URL"},{field:"image_2_url",label:"Image 2 URL"}].map(({field:x,label:w})=>n.jsxs("div",{children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:w}),i?n.jsx(Me,{value:l[x],onChange:j=>c({...l,[x]:j.target.value}),className:"mt-1",placeholder:"Image URL"}):r[x]?n.jsxs("div",{className:"mt-2 space-y-2",children:[n.jsx("a",{href:r[x],target:"_blank",rel:"noopener noreferrer",className:"block group cursor-pointer",children:n.jsx("img",{src:r[x],alt:w,className:"max-h-32 rounded-lg object-cover border-2 border-gray-200 hover:border-accent-gold transition-all group-hover:shadow-lg"})}),n.jsx("div",{className:"flex gap-2",children:n.jsxs(me,{type:"button",size:"sm",variant:"outline",onClick:()=>window.open(r[x],"_blank"),className:"flex-1 text-xs",children:[n.jsx(sd,{className:"w-3 h-3 mr-1"}),"Open"]})})]}):n.jsx("p",{className:"text-gray-500 mt-1",children:"Not provided"})]},x))})]})]}),r.table_requirement&&n.jsxs("div",{className:"border rounded-lg p-6 bg-gradient-to-br from-blue-50 to-white",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4 flex items-center gap-2",children:[n.jsx(Jr,{className:"w-5 h-5 text-blue-600"}),"Event Logistics (Planning Only)"]}),n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-blue-200",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Table Requirement"}),n.jsx("p",{className:"text-lg font-bold text-primary-navy mt-2",children:r.table_requirement==="half_table"?"🪑 Half table (5 seats)":"🪑 Full table (10 seats)"})]})]}),n.jsxs("div",{className:"border-2 border-amber-200 rounded-lg p-6 bg-amber-50",children:[n.jsxs("h3",{className:"text-lg font-bold text-amber-900 mb-4 flex items-center gap-2",children:[n.jsx($h,{className:"w-5 h-5"}),"Admin Notes (Internal Only)"]}),i?n.jsx(en,{value:l.admin_notes,onChange:x=>c({...l,admin_notes:x.target.value}),rows:4,placeholder:"Add internal notes...",className:"bg-white"}):n.jsx("p",{className:"text-gray-700 whitespace-pre-wrap leading-relaxed",children:r.admin_notes||"No admin notes yet"})]}),i&&n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx(me,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),n.jsx(me,{onClick:()=>h.mutate({id:r.id,data:l}),disabled:h.isPending,className:"bg-green-600 hover:bg-green-700 text-white",children:h.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save All Changes"]})})]}),r.supporting_files&&r.supporting_files.length>0&&n.jsxs("div",{className:"border rounded-lg p-6 bg-white",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4",children:["Supporting Files (",r.supporting_files.length,")"]}),n.jsx("div",{className:"space-y-2",children:r.supporting_files.map((x,w)=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(pr,{className:"w-5 h-5 text-gray-600"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-gray-900",children:x.filename}),n.jsxs("p",{className:"text-xs text-gray-500",children:[(x.size/1024).toFixed(1)," KB"]}
1464)]})]}),n.jsx("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-navy hover:text-accent-gold font-medium",children:n.jsx(Pl,{className:"w-4 h-4"})})]},w))})]})]}),n.jsx("div",{className:"flex justify-end pt-4 border-t",children:n.jsx(me,{onClick:()=>t(!1),children:"Close"})})]})}):null}const lq={revised_contract_process_enabled:!1,awards_year:new Date().getFullYear(),participation_commitment_amount:75,withdrawal_admin_charge_amount:295,half_table_amount:965,full_table_amount:1826,withdrawal_invoice_payment_window_days:28,finalist_payment_deadline_days:14,finalist_action_deadline_days:14,terms_version:"2.0",event_name:"National Charity Today Awards™",event_date:"",venue:"",contact_email:"",small_charity_turnover_threshold:25e4,small_charity_scheme_active:!0,small_charity_contact_url:"/contact",marketing_consent_required:!1,notes:""};function Eu({label:e,value:t,onChange:r,hint:a}){return n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(ye,{className:"text-sm font-semibold",children:e}),n.jsx(Me,{type:"number",value:t??"",onChange:s=>r(Number(s.target.value)),className:"text-base"}),a&&n.jsx("p",{className:"text-xs text-gray-500",children:a})]})}function Fp({label:e,value:t,onChange:r,placeholder:a,hint:s,type:i="text"}){return n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(ye,{className:"text-sm font-semibold",children:e}),n.jsx(Me,{type:i,value:t??"",onChange:o=>r(o.target.value),placeholder:a,className:"text-base"}),s&&n.jsx("p",{className:"text-xs text-gray-500",children:s})]})}function EY(){const{toast:e}=Pq(),t=Sr(),[r,a]=L.useState(lq),[s,i]=L.useState(null),{data:o=[],isLoading:l}=xt({queryKey:["contract-settings"],queryFn:()=>pe.entities.ContractSettings.list("-created_date",1)});L.useEffect(()=>{if(o&&o.length>0){const f=o[0];i(f.id),a({...lq,...f})}},[o]);const c=(f,m)=>a(b=>({...b,[f]:m})),d=Tt({mutationFn:async f=>s?pe.entities.ContractSettings.update(s,f):pe.entities.ContractSettings.create(f),onSuccess:f=>{!s&&(f!=null&&f.id)&&i(f.id),t.invalidateQueries(["contract-settings"]),t.invalidateQueries(["contractSettings"]),e({title:"Contract settings saved"})},onError:f=>{e({title:"Couldn't save settings",description:(f==null?void 0:f.message)||"Unknown error",variant:"destructive"})}}),h=()=>{const f={...r};f.marketing_consent_required=!1,d.mutate(f)};if(l)return n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-4 border-primary-navy border-t-transparent"})});const u=!!r.revised_contract_process_enabled;return n.jsxs("div",{className:"space-y-5",children:[n.jsx(_e,{className:u?"border-2 border-amber-400":"",children:n.jsxs(Ce,{className:"p-6 space-y-4",children:[n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy flex items-center gap-2",children:"Revised nomination journey — feature flag"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"When ON, the public nomination form shows the revised contract section, declarations and updated payment button (replace the original Section 6). When OFF, the original flow continues to render."})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(dt,{variant:u?"default":"secondary",className:u?"bg-amber-500 text-white":"",children:u?"LIVE PREVIEW":"OFF"}),n.jsx(Cs,{checked:u,onCheckedChange:f=>c("revised_contract_process_enabled",f)})]})]}),u&&n.jsxs("div",{className:"flex items-start gap-3 rounded-lg bg-amber-50 border border-amber-300 p-4",children:[n.jsx(eo,{className:"w-5 h-5 text-amber-700 mt-0.5 flex-shrink-0"}),n.jsx("p",{className:"text-sm text-amber-900",children:'Flag is ON. All public visitors will see the revised contract section, costs panel, declarations and the new "Pay £75 and submit nomination" button on the nomination page.'})]})]})}),n.jsx(_e,{children:n.jsxs(Ce,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy",children:"Commercial figures (GBP)"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(Eu,{label:"Participation Commitment",value:r.participation_commitment_amount,onChange:f=>c("participation_commitment_amount",f)}),n.jsx(Eu,{label:"Withdrawal & admin charge",value:r.withdrawal_admin_charge_amount,onChange:f=>c("withdrawal_admin_charge_amount",f)}),n.jsx(Eu,{label:"Half table (5 seats)",value:r.half_table_amount,onChange:f=>c("half_table_amount",f)}),n.jsx(Eu,{label:"Full table (10 seats)",value:r.full_table_amount,onChange:f=>c("full_table_amount",f)})]})]})}),n.jsx(_e,{children:n.jsxs(Ce,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy",children:"Deadlines (days)"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[n.jsx(Eu,{label:"Finalist action deadline",value:r.finalist_action_deadline_days,onChange:f=>c("finalist_action_deadline_days",f),hint:"Days after shortlisting"}),n.jsx(Eu,{label:"Finalist payment deadline",value:r.finalist_payment_deadline_days,onChange:f=>c("finalist_payment_deadline_days",f),hint:"Days after finalist acceptance"}),n.jsx(Eu,{label:"Withdrawal invoice window",value:r.withdrawal_invoice_payment_window_days,onChange:f=>c("withdrawal_invoice_payment_window_days",f),hint:"Days after invoice issue"})]})]})}),n.jsx(_e,{children:n.jsxs(Ce,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy",children:"Event & Terms"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[n.jsx(Fp,{label:"Event name",value:r.event_name,onChange:f=>c("event_name",f)}),n.jsx(Fp,{label:"Venue",value:r.venue,onChange:f=>c("venue",f)}),n.jsx(Fp,{label:"Event date",type:"date",value:r.event_date,onChange:f=>c("event_date",f)}),n.jsx(Fp,{label:"Contact email",type:"email",value:r.contact_email,onChange:f=>c("contact_email",f)}),n.jsx(Eu,{label:"Awards year",value:r.awards_year,onChange:f=>c("awards_year",f)}),n.jsx(Fp,{label:"Terms version",value:r.terms_version,onChange:f=>c("terms_version",f),hint:"e.g. 2.0 — also publish the matching Terms content"})]})]})}),n.jsx(_e,{children:n.jsxs(Ce,{className:"p-6 space-y-4",children:[n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy",children:"Small Charity Ticket Scheme"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Eligibility threshold and contact URL shown on the nomination form."})]}),n.jsx(Cs,{checked:!!r.small_charity_scheme_active,onCheckedChange:f=>c("small_charity_scheme_active",f)})]}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[n.jsx(Eu,{label:"Annual turnover threshold (£)",value:r.small_charity_turnover_threshold,onChange:f=>c("small_charity_turnover_threshold",f)}),n.jsx(Fp,{label:"Contact URL",value:r.small_charity_contact_url,onChange:f=>c("small_charity_contact_url",f),placeholder:"/contact"})]})]})}),n.jsx(_e,{children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Qu,{className:"w-5 h-5 text-gray-500 mt-0.5 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-base font-bold text-primary-navy",children:"Marketing consent"}),n.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Marketing consent is always optional, never preselected, and never a condition of nomination or finalist acceptance. This setting is locked to ",n.jsx("strong",{children:"false"}),"."]})]})]})})}),n.jsx(_e,{children:n.jsxs(Ce,{className:"p-6 space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ty,{className:"w-4 h-4 text-gray-500"}),n.jsx("h3",{className:"text-base font-bold text-primary-navy",children:"Internal notes"})]}),n.jsx(en,{value:r.notes||"",onChange:f=>c("notes",f.target.value),placeholder:"Optional internal notes about these settings",className:"min-h-[80px]"})]})}),n.jsx("div",{className:"flex justify-end gap-3",children:n.jsxs(me,{onClick:h,disabled:d.isPending,className:"bg-primary-navy hover:opacity-90 px-8",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),d.isPending?"Saving…":"Save settings"]})})]})}function E6e({user:e,restore:t,landing:r,onReset:a,isResetting:s}){const{points:i=[],creating:o=!1,restoring:l=!1,create:c,restore:d,delete:h}=t||{},{form:u,setForm:f,toggle:m,submit:b,saving:g=!1}=r||{};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(ps,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Settings & Configuration"}),n.jsx("p",{className:"text-lg text-gray-600",children:"System settings, landing page, and global preferences"})]})]}),n.jsxs(Ede,{type:"multiple",className:"space-y-4",children:[n.jsxs(Up,{value:"terms-editor",className:"border-none shadow-xl rounded-lg bg-white",children:[n.jsx(zp,{className:"px-6 hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(pr,{className:"w-6 h-6 text-indigo-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"text-xl font-semibold text-primary-navy",children:"Terms & Conditions Editor"}),n.jsx("div",{className:"text-sm text-gray-600 font-normal",children:"Create and edit terms with rich text formatting"})]})]})}),n.jsx(Vp,{children:n.jsx("div",{className:"px-6 pb-6",children:n.jsx(_6e,{})})})]}),n.jsxs(Up,{value:"contract-settings",className:"border-none shadow-xl rounded-lg bg-white",children:[n.jsx(zp,{className:"px-6 hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(pr,{className:"w-6 h-6 text-indigo-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"text-xl font-semibold text-primary-navy",children:"Contract & Commercial Settings"}),n.jsx("div",{className:"text-sm text-gray-600 font-normal",children:"Revised nomination journey flag, prices, deadlines and Terms version"})]})]})}),n.jsx(Vp,{children:n.jsx("div",{className:"px-6 pb-6",children:n.jsx(EY,{})})})]}),n.jsxs(Up,{value:"page-visibility",className:"border-none shadow-xl rounded-lg bg-white",children:[n.jsx(zp,{className:"px-6 hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(sd,{className:"w-6 h-6 text-indigo-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"text-xl font-semibold text-primary-navy",children:"Page Visibility Control"}),n.jsx("div",{className:"text-sm text-gray-600 font-normal",children:"Turn pages on/off and control navigation menu"})]})]})}),n.jsx(Vp,{children:n.jsx("div",{className:"px-6 pb-6",children:n.jsx(b6e,{})})})]}),n.jsxs(Up,{value:"restore",className:"border-none shadow-xl rounded-lg bg-white",children:[n.jsx(zp,{className:"px-6 hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(la,{className:"w-6 h-6 text-blue-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"text-xl font-semibold text-primary-navy",children:"System Restore Points"}),n.jsx("div",{className:"text-sm text-gray-600 font-normal",children:"Auto-backup runs daily at 8:00 PM"})]})]})}),n.jsx(Vp,{children:n.jsxs(_e,{className:"border-none shadow-none",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsxs(Pt,{className:"text-xl flex items-center gap-2",children:[n.jsx(la,{className:"w-6 h-6 text-blue-600"}),"System Restore Points"]}),n.jsx("p",{className:"text-gray-600 mt-2 text-sm",children:"Auto-backup runs daily at 8:00 PM. Up to 10 restore points are kept (
1464oldest deleted automatically)."})]}),n.jsx(me,{onClick:()=>c==null?void 0:c("manual"),disabled:o,className:"bg-blue-600 hover:bg-blue-700 text-white font-semibold",children:o?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Creating..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Create Manual Backup"]})})]})}),n.jsxs(Ce,{children:[i.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(la,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No restore points yet. The first auto-backup will be created at 8:00 PM today."})]}):n.jsx("div",{className:"space-y-3",children:i.map((y,x)=>{var w,j,N,_,S,A,T,R;return n.jsx("div",{className:`border-2 rounded-lg p-4 transition-all ${x===0?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("h4",{className:"font-bold text-gray-900",children:y.restore_point_name}),n.jsx(dt,{className:y.backup_type==="auto"?"bg-green-500 text-white":"bg-purple-500 text-white",children:y.backup_type==="auto"?"Auto":"Manual"}),x===0&&n.jsx(dt,{className:"bg-blue-600 text-white",children:"Most Recent"})]}),n.jsxs("div",{className:"text-sm text-gray-600",children:["Created:"," ",y.created_timestamp||y.created_date?yt(new Date(y.created_timestamp||y.created_date),"d MMMM yyyy, h:mm a"):"Unknown date"]}),n.jsxs("div",{className:"flex gap-4 mt-2 text-xs text-gray-500",children:[n.jsxs("span",{children:[((j=(w=y.snapshot_data)==null?void 0:w.nominations)==null?void 0:j.length)||0," nominations"]}),n.jsxs("span",{children:[((_=(N=y.snapshot_data)==null?void 0:N.tasks)==null?void 0:_.length)||0," tasks"]}),n.jsxs("span",{children:[((A=(S=y.snapshot_data)==null?void 0:S.tableBookings)==null?void 0:A.length)||0," tables"]}),n.jsxs("span",{children:[((R=(T=y.snapshot_data)==null?void 0:T.sponsors)==null?void 0:R.length)||0," sponsors"]})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>d==null?void 0:d(y),disabled:l,className:"border-blue-500 text-blue-600 hover:bg-blue-50",children:[n.jsx(Tl,{className:"w-4 h-4 mr-1"}),"Restore"]}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>h==null?void 0:h(y.id),className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})},y.id)})}),n.jsx("div",{className:"mt-6 p-4 bg-blue-50 border-2 border-blue-200 rounded-lg",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mr,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm text-blue-800",children:[n.jsx("p",{className:"font-semibold mb-1",children:"How Auto-Restore Works:"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[n.jsx("li",{children:"Automatic backups run daily at 8:00 PM"}),n.jsx("li",{children:"System maintains up to 10 restore points maximum"}),n.jsx("li",{children:"Oldest restore point is automatically deleted when limit is reached"}),n.jsx("li",{children:"You can create manual backups anytime"}),n.jsx("li",{children:"Restoring will replace all current data with backup data"})]})]})]})})]})]})})]}),n.jsxs(Up,{value:"landing",className:"border-none shadow-xl rounded-lg bg-white",children:[n.jsx(zp,{className:"px-6 hover:no-underline",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(sd,{className:"w-6 h-6 text-purple-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"text-xl font-semibold text-primary-navy",children:"Premium Landing Page Configuration"}),n.jsx("div",{className:"text-sm text-gray-600 font-normal",children:'Configure your temporary "Coming Soon" holding page'})]})]})}),n.jsx(Vp,{children:n.jsxs(_e,{className:"border-none shadow-none",children:[n.jsxs(Nt,{children:[n.jsx(Pt,{className:"text-xl",children:"Premium Landing Page Configuration"}),n.jsx("p",{className:"text-gray-600 mt-2",children:'Configure your temporary "Coming Soon" holding page. When enabled, this premium landing page will be shown to all public visitors while you work on the site. Admin users always have full access.'})]}),n.jsx(Ce,{children:n.jsxs("form",{onSubmit:b,className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 bg-gradient-to-r from-blue-50 to-purple-50 rounded-xl border-2 border-blue-200",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-1",children:"Enable Landing Page Mode"}),n.jsx("p",{className:"text-sm text-gray-600",children:"When enabled, all public visitors will see only the landing page. You and other admins will still have full access to the site."})]}),n.jsx(Cs,{checked:u.is_active,onCheckedChange:m,className:"ml-4"})]}),n.jsx("div",{className:`p-4 rounded-lg border-2 ${u.is_active?"bg-green-50 border-green-300":"bg-gray-50 border-gray-300"}`,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-3 h-3 rounded-full ${u.is_active?"bg-green-500 animate-pulse":"bg-gray-400"}`}),n.jsxs("span",{className:"font-semibold text-gray-800",children:["Landing Page is currently ",u.is_active?"ACTIVE":"INACTIVE"]})]})}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"border-t pt-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy mb-4",children:"Page Content"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"lp-heading",children:"Main Headline (H1) *"}),n.jsx(Me,{id:"lp-heading",value:u.heading,onChange:y=>f({...u,heading:y.target.value}),placeholder:"The New National Charity Today Awards™ Website Is Coming Soon",className:"text-lg"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Large heading displayed below the logo"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"lp-subheading",children:"Subheading / Introduction Text *"}),n.jsx(en,{id:"lp-subheading",value:u.subheading,onChange:y=>f({...u,subheading:y.target.value}),placeholder:"We're building a new digital home for the UK's premier national charity awards programme...",rows:4}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Main description paragraph"})]})]})]}),n.jsxs("div",{className:"border-t pt-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy mb-4",children:"Call-to-Action Button"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[n.jsx(Zr,{id:"show-cta",checked:u.show_cta,onCheckedChange:y=>f({...u,show_cta:y})}),n.jsx(ye,{htmlFor:"show-cta",className:"cursor-pointer",children:"Show Call-to-Action Button"})]}),u.show_cta&&n.jsxs("div",{className:"grid md:grid-cols-2 gap-4 pl-4 border-l-4 border-accent-gold",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"cta-label",children:"Button Label"}),n.jsx(Me,{id:"cta-label",value:u.cta_label,onChange:y=>f({...u,cta_label:y.target.value}),placeholder:"Contact the Awards Team"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"cta-url",children:"Button Link"}),n.jsx(Me,{id:"cta-url",type:"url",value:u.cta_url,onChange:y=>f({...u,cta_url:y.target.value}),placeholder:"mailto:[email protected]"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Supports mailto: links and URLs"})]})]})]})]}),n.jsxs("div",{className:"border-t pt-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy mb-4",children:"Footer & Contact"}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"footer-email",children:"Contact Email Address"}),n.jsx(Me,{id:"footer-email",type:"email",value:u.footer_email,onChange:y=>f({...u,footer_email:y.target.value}),placeholder:"[email protected]"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:'Displayed in footer
1464: "Questions? Contact the Awards Team at [email]"'})]})]}),n.jsxs("div",{className:"border-t pt-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy mb-4",children:"Logo (Optional)"}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"lp-logo",children:"Custom Logo URL"}),n.jsx(Me,{id:"lp-logo",type:"url",value:u.logo_url,onChange:y=>f({...u,logo_url:y.target.value}),placeholder:"Leave blank to use default National Charity Today Awards™ logo"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave blank to use the default NCTA logo with enhanced styling"})]})]})]}),n.jsx("div",{className:"flex gap-3 pt-6 border-t",children:n.jsx(me,{type:"submit",className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:g,children:g?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-primary-navy border-t-transparent mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save Landing Page Settings"]})})}),u.is_active&&n.jsx("div",{className:"mt-6 p-6 bg-yellow-50 border-2 border-yellow-300 rounded-xl",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Mr,{className:"w-6 h-6 text-yellow-600 flex-shrink-0 mt-1"}),n.jsxs("div",{children:[n.jsx("h4",{className:"font-bold text-yellow-900 mb-2",children:"⚠️ Landing Page is Active"}),n.jsx("p",{className:"text-sm text-yellow-800",children:"Public visitors are currently seeing the premium landing page. The main site content is hidden from non-admin users. You can still access all admin functions normally. The landing page includes noindex/nofollow tags to protect your SEO."})]})]})})]})})]})})]})]}),n.jsx(_e,{className:"border-2 border-blue-200 bg-gradient-to-r from-blue-50 to-purple-50 mt-6",children:n.jsx(Ce,{className:"p-6",children:n.jsx("div",{className:"flex items-start justify-between",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("div",{className:"w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center",children:n.jsx(Hd,{className:"w-5 h-5 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-blue-900",children:"Account Management"})]}),n.jsx("p",{className:"text-sm text-blue-700 mb-4",children:"Manage your account settings and data. Warning: Account deletion is permanent and cannot be undone."}),n.jsx("div",{className:"flex gap-3",children:n.jsxs(me,{onClick:async()=>{if(window.confirm("⚠️ WARNING: This will permanently delete your account and all associated data. This action CANNOT be undone. Are you absolutely sure?"))if(prompt('Type "DELETE MY ACCOUNT" to confirm account deletion:')==="DELETE MY ACCOUNT")try{await pe.asServiceRole.entities.User.delete(e.id),await pe.auth.logout(),alert("Your account has been deleted. You will be logged out now."),window.location.href="/"}catch(x){console.error("Account deletion error:",x),alert("Failed to delete account. Please contact support.")}else alert("Account deletion cancelled. Confirmation text did not match.")},variant:"outline",className:"border-2 border-red-500 text-red-700 hover:bg-red-500 hover:text-white font-semibold",children:[n.jsx(tr,{className:"w-4 h-4 mr-2"}
1464),"Delete My Account"]})})]})})})}),n.jsx(_e,{className:"border-2 border-red-200 bg-gradient-to-r from-red-50 to-orange-50 mt-6",children:n.jsx(Ce,{className:"p-6",children:n.jsx("div",{className:"flex items-start justify-between",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("div",{className:"w-10 h-10 bg-red-500 rounded-full flex items-center justify-center",children:n.jsx(Mr,{className:"w-5 h-5 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-red-900",children:"System Tools"})]}),n.jsx("p",{className:"text-sm text-red-700 mb-4",children:"Powerful admin functions to manage system-wide operations. Use with caution."}),n.jsx("div",{className:"flex gap-3",children:n.jsx(me,{onClick:a,variant:"outline",className:"border-2 border-red-500 text-red-700 hover:bg-red-500 hover:text-white font-semibold",disabled:s,children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Resetting System..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Mr,{className:"w-4 h-4 mr-2"}),"Reset All Tasks & Tables to Default"]})})})]})})})})]})}function T6e(){const e=Sr(),[t,r]=L.useState(null),{data:a,isLoading:s}=xt({queryKey:["nominationsWindow"],queryFn:async()=>(await pe.entities.NominationsWindow.list("-updated_date",1))[0]||null}),o=(()=>{if(!a)return"Open";if(a.status==="Closed"||a.status==="Upcoming")return a.status;const u=new Date,f=a.opensAt?new Date(a.opensAt):null,m=a.closesAt?new Date(a.closesAt):null;return f&&u<f?"Upcoming":m&&u>m?"Closed":"Open"})(),l=Tt({mutationFn:async({open:u})=>{const f=await pe.auth.me(),m={...a||{},updatedByUserId:f.id,manualOverrideEnabled:!0};return u?(m.status="Open",m.closureReason=null,m.closedAt=null):(m.status="Closed",m.closureReason="ManuallyClosed",m.closedAt=new Date().toISOString(),m.opensAt||(m.opensAt=new Date().toISOString()),m.closesAt||(m.closesAt=new Date(Date.now()+1e3*60*60*24*30).toISOString())),a?pe.entities.NominationsWindow.update(a.id,m):pe.entities.NominationsWindow.create(m)},onSuccess:()=>{e.invalidateQueries({queryKey:["nominationsWindow"]}),r(null)}});if(s)return n.jsxs("div",{className:"bg-white rounded-lg p-5 shadow-md border border-gray-200 flex items-center gap-3",children:[n.jsx(Ky,{className:"w-5 h-5 animate-spin text-gray-400"}),n.jsx("span",{className:"text-sm text-gray-500",children:"Loading nomination window…"})]});const c={Open:{bg:"bg-green-500",icon:Cn,label:"Open"},Closed:{bg:"bg-red-500",icon:o3,label:"Closed"},Upcoming:{bg:"bg-blue-500",icon:la,label:"Upcoming"}}[o],d=c.icon,h=o==="Closed";return n.jsxs("div",{className:"bg-white rounded-lg p-5 shadow-md border border-gray-200",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:`w-11 h-11 rounded-full flex items-center justify-center ${c.bg}`,children:h?n.jsx(Qu,{className:"w-5 h-5 text-white"}):n.jsx(NT,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsxs("h3",{className:"font-bold text-gray-900 flex items-center gap-2",children:["Nominations Window",n.jsxs(dt,{className:`${c.bg} text-white`,children:[n.jsx(d,{className:"w-3.5 h-3.5 mr-1"}),c.label]})]}),n.jsxs("p",{className:"text-sm text-gray-600",children:[h?"Public nomination form is locked. No new submissions accepted.":o==="Upcoming"?"Nominations are scheduled but not yet open.":"Nominations are live and accepting submissions.",(a==null?void 0:a.closureReason)==="ManuallyClosed"&&h&&" (manually closed by admin.)"]})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-sm font-semibold text-gray-700",children:h?"Closed":"Open"}),n.jsx(Cs,{checked:!h,disabled:l.isPending,onCheckedChange:u=>{r(u?"open":"close")}}),n.jsxs(me,{size:"sm",variant:h?"default":"destructive",disabled:l.isPending,onClick:()=>r(h?"open":"close"),className:h?"bg-green-600 hover:bg-green-700 text-white":"",children:[l.isPending?n.jsx(Ky,{className:"w-4 h-4 mr-2 animate-spin"}):h?n.jsx(NT,{className:"w-4 h-4 mr-2"}):n.jsx(Qu,{className:"w-4 h-4 mr-2"}),h?"Open Nominations":"Close Nominations"]})]})]}),t&&n.jsxs("div",{className:"mt-4 p-4 rounded-lg border-2 border-amber-200 bg-amber-50 flex items-center justify-between gap-4",children:[n.jsx("p",{className:"text-sm text-amber-900",children:t==="close"?"This will immediately lock the public nomination form. No new nominations can be submitted until you reopen.":"This will immediately reopen nominations. The public form will accept submissions again."}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(me,{variant:"outline",size:"sm",onClick:()=>r(null),disabled:l.isPending,children:"Cancel"}),n.jsx(me,{size:"sm",variant:t==="close"?"destructive":"default",className:t==="open"?"bg-green-600 hover:bg-green-700 text-white":"",disabled:l.isPending,onClick:()=>l.mutate({open:t==="open"}),children:t==="close"?"Yes, Close Now":"Yes, Open Now"})]})]})]})}function O6e(){var $o,Uo,xl,Wa;const[e,t]=L.useState(null),[r,a]=L.useState(!0),[s,i]=L.useState(""),[o,l]=L.useState(!1),[c,d]=L.useState(!1),[h,u]=L.useState(null),[f,m]=L.useState({title:"",description:"",assigned_to:"",status:"not_started",priority:"medium",due_date:"",category:"general",progress_percentage:0,notes:"",is_recurring:!1,recurrence_pattern:"weekly",recurrence_interval:1,recurrence_end_date:""}),[b,g]=L.useState(!1),[y,x]=L.useState(null),[w,j]=L.useState({name:"",logo_url:"",website_url:"",tier:"partner",description:"",mission:"",impact:"",sponsored_categories:[],display_order:0,is_active:!0}),[N,_]=L.useState(!1),[S,A]=L.useState("Jaime"),[T,R]=L.useState({Jaime:"",Lee:""}),[M,k]=L.useState(""),[P,O]=L.useState(!1),[F,$]=L.useState(!1),[G,B]=L.useState(!1),[Y,ee]=L.useState(!1),[J,H]=L.useState(!1),[q,K]=L.useState(!1),[te,re]=L.useState(!1),[Q,ne]=L.useState(!1),[oe,ae]=L.useState(null),[le,je]=L.useState(null),[xe,Fe]=L.useState({title:"",author:"",content:"",excerpt:"",image_url:"",image_caption:"",category:"general",published_date:"",is_featured:!1,is_published:!1,meta_title:"",meta_description:"",keywords:"",og_title:"",og_description:""}),[he,Ne]=L.useState(!1),[ue,rt]=L.useState(!1),[Te,Pe]=L.useState(!1),[$e,Ve]=L.useState("all"),[be,We]=L.useState("list"),Ze=L.useRef(null),[st,Mt]=L.useState(!1),[Ht,Yt]=L.useState(null),[on,It]=L.useState(!1),[_t,xr]=L.useState(null),[xn,Rr]=L.useState({post_content:"",platforms:[],scheduled_date_time:"",status:"draft",image_url:"",post_type:"general",hashtags:"#NationalCharityTodayAwards #CharityTodayAwards #CharityTodayAwards2026 #CharityAwardsUK #CharityToday #charityawards #nationalcharityawards",notes:""}),[Wn,lr]=L.useState(""),[Ha,Rn]=L.useState(null),[ta,fr]=L.useState({is_active:!1,heading:"The New National Charity Today Awards™ Website Is Coming Soon",subheading:"We're building a new digital home for the UK's premier national charity awards programme. Please check back soon for full details, categories, and how to enter.",show_cta:!0,cta_label:"Contact the Awards Team",cta_url:"mailto:[email protected]",footer_email:"[email protected]",logo_url:""}),[na,Ea]=L.useState("all"),[Kn,St]=L.useState(null),[hn,yr]=L.useState(!1),[Gn,da]=L.useState(""),[cr,Dt]=L.useState(!1),[va,ar]=L.useState("all"),[dr,jr]=L.useState("due_date"),[Yn,Ta]=L.useState("asc"),[ro,hi]=L.useState(!1),[ra,ks]=L.useState("date"),[ua,Ps]=L.useState("desc"),[xs,Ye]=L.useState(!1),[nt,Vr]=L.useState({}),[aa,Da]=L.useState(!1),[ur,fi]=L.useState(null),[$n,Ue]=L.useState([]),[Wt,ys]=L.useState(!1),[Fa,mi]=L.useState(null),[Il,ao]=L.useState(!1),vs=async(U,ke)=>{var wt,kt;const ze=ke||U.nominator_email;if(window.confirm(`Send withdrawal reminder to ${ze}?`)){ao(U.id);
1464try{const zt=ke?{nominationId:U.id,testEmail:ke}:{nominationId:U.id},Zn=await pe.functions.invoke("sendWithdrawalReminder",zt);(wt=Zn.data)!=null&&wt.success?(fn.invalidateQueries({queryKey:["nominations"]}),(Kn==null?void 0:Kn.id)===U.id&&St(ja=>({...ja,reminder_sent_date:Zn.data.reminder_sent_date})),alert("✓ Reminder sent to "+ze)):alert("Failed: "+((kt=Zn.data)==null?void 0:kt.error))}catch(zt){alert("Error: "+zt.message)}ao(!1)}},[ol,es]=L.useState(!1),[Qn,Yr]=L.useState(!1),[So,Co]=L.useState(!1),[Ao,ko]=L.useState(null),[bs,Po]=L.useState({year:new Date().getFullYear(),categories:[],winner_name:"",organization:"",description:"",image_url:"",website_url:"",featured:!1}),[Ks,Dl]=L.useState(!1),[Fl,uu]=L.useState(""),[ql,dh]=L.useState(!1),[pd,sr]=L.useState(!1),[Bl,jc]=L.useState(null),[Nc,$l]=L.useState({name:"",role:"",organization:"",quote:"",category:"winner",awards:[],year:new Date().getFullYear(),image_url:"",is_featured:!1,is_active:!0,display_order:0}),[Eo,Ul]=L.useState(!1),[zl,Mi]=L.useState(!1),[Ir,Gs]=L.useState(null),[Ys,yn]=L.useState(""),[ll,To]=L.useState("all"),[Xn,ba]=L.useState({contact_name:"",job_title:"",company_name:"",email:"",phone:"",linkedin_url:"",contact_type:"other",company_size:"",industry:"",notes:"",last_contact_date:"",next_follow_up_date:""}),[Es,cl]=L.useState("news"),fn=Sr();L.useEffect(()=>{gd()},[]);const gd=async()=>{try{const U=await pe.auth.me();t(U),l(!0),(U==null?void 0:U.role)!=="admin"&&i("Access denied. Admin privileges required.")}catch(U){console.error("Auth check error:",U),i("Please log in to access the admin dashboard."),l(!0)}finally{a(!1)}},{data:Dr=[]}=xt({queryKey:["tasks"],queryFn:()=>pe.entities.Task.list("-due_date",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:Hr=[],isLoading:dl}=xt({queryKey:["nominations"],queryFn:()=>pe.entities.Nomination.list("-created_date",500),enabled:(e==null?void 0:e.role)==="admin"}),{data:Oo=[]}=xt({queryKey:["ticketSales"],queryFn:()=>pe.entities.TicketSale.list("-created_date",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:wa=[]}=xt({queryKey:["tableBookings"],queryFn:()=>pe.entities.TableBooking.list("table_number",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:ts=[]}=xt({queryKey:["sponsors"],queryFn:()=>pe.entities.Sponsor.list("display_order",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:Qs=[]}=xt({queryKey:["categories"],queryFn:()=>pe.entities.Category.list("display_order",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:ul=[]}=xt({queryKey:["teamNotes"],queryFn:()=>pe.entities.TeamNotes.list(),enabled:(e==null?void 0:e.role)==="admin"});L.useEffect(()=>{Array.isArray(ul)&&ul.length>0&&R(U=>{const ke={...U};return ul.forEach(ze=>{ze.team_member_name in ke&&(ke[ze.team_member_name]=ze.notes)}),ke})},[ul]);const{data:pi=[],isLoading:Vl}=xt({queryKey:["newsArticles"],queryFn:()=>pe.entities.NewsArticle.list("-created_date",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:Li=[]}=xt({queryKey:["socialMediaPosts"],queryFn:()=>pe.entities.SocialMediaPost.list("-scheduled_date_time",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:Hl=[]}=xt({queryKey:["landingPageConfig"],queryFn:()=>pe.entities.LandingPageConfig.list("-created_date",1),enabled:(e==null?void 0:e.role)==="admin"}),{data:Ts=[]}=xt({queryKey:["winners"],queryFn:()=>pe.entities.Winner.list("-year",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:ns=[]}=xt({queryKey:["testimonials"],queryFn:()=>pe.entities.Testimonial.list("display_order",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:gi=[]}=xt({queryKey:["faqs"],queryFn:()=>pe.entities.FAQ.list("display_order",100),enabled:(e==null?void 0:e.role)==="admin",staleTime:3e4,refetchOnWindowFocus:!1}),{data:uh=[]}=xt({queryKey:["popupNotification"],queryFn:()=>pe.entities.PopupNotification.list("-created_date",1),enabled:(e==null?void 0:e.role)==="admin"}),Oa=uh[0],{data:Xs=[]}=xt({queryKey:["contacts"],queryFn:()=>pe.entities.Contact.list("-created_date",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:Js=[]}=xt({queryKey:["contactSubmissions"],queryFn:()=>pe.entities.Contact.filter({subject:{$exists:!0}},"-submitted_date",100),enabled:(e==null?void 0:e.role)==="admin"}),{data:qa=[]}=xt({queryKey:["restorePoints"],queryFn:()=>pe.entities.SystemRestorePoint.list("-created_date",20),enabled:(e==null?void 0:e.role)==="admin"});L.useEffect(()=>{if(Hl&&Hl.length>0){const U=Hl[0];Rn(U),fr({is_active:U.is_active||!1,heading:U.heading||"The New National Charity Today Awards™ Website Is Coming Soon",subheading:U.subheading||"We're building a new digital home for the UK's premier national charity awards programme. Please check back soon for full details, categories, and how to enter.",show_cta:U.show_cta!==!1,cta_label:U.cta_label||"Contact the Awards Team",cta_url:U.cta_url||"mailto:[email protected]",footer_email:U.footer_email||"[email protected]",logo_url:U.logo_url||""})}},[Hl]);const so=Tt({mutationFn:U=>pe.entities.Task.create(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["tasks"]}),d(!1),m({title:"",description:"",assigned_to:"",status:"not_started",priority:"medium",due_date:"",category:"general",progress_percentage:0,notes:"",is_recurring:!1,recurrence_pattern:"weekly",recurrence_interval:1,recurrence_end_date:""})}}),Ri=Tt({mutationFn:({id:U,taskData:ke})=>pe.entities.Task.update(U,ke),onMutate:async({id:U,taskData:ke})=>{await fn.cancelQueries({queryKey:["tasks"]});const ze=fn.getQueryData(["tasks"]);return fn.setQueryData(["tasks"],wt=>wt==null?void 0:wt.map(kt=>kt.id===U?{...kt,...ke}:kt)),{previousTasks:ze}},onError:(U,ke,ze)=>
1464{fn.setQueryData(["tasks"],ze.previousTasks)},onSuccess:(U,ke)=>{fn.invalidateQueries({queryKey:["tasks"]}),d(!1),u(null);const ze=Dr.find(wt=>wt.id===ke.id);ze&&ze.status!=="completed"&&ke.taskData.status==="completed"&&(Yt(U),Mt(!0)),m({title:"",description:"",assigned_to:"",status:"not_started",priority:"medium",due_date:"",category:"general",progress_percentage:0,notes:"",is_recurring:!1,recurrence_pattern:"weekly",recurrence_interval:1,recurrence_end_date:""})}}),_c=Tt({mutationFn:U=>pe.entities.Task.delete(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["tasks"]})}}),Wl=Tt({mutationFn:U=>pe.entities.Sponsor.create(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["sponsors"]}),g(!1),j({name:"",logo_url:"",website_url:"",tier:"partner",description:"",mission:"",impact:"",sponsored_categories:[],display_order:0,is_active:!0})}}),io=Tt({mutationFn:({id:U,sponsorData:ke})=>pe.entities.Sponsor.update(U,ke),onSuccess:()=>{fn.invalidateQueries({queryKey:["sponsors"]}),g(!1),x(null),j({name:"",logo_url:"",website_url:"",tier:"partner",description:"",mission:"",impact:"",sponsored_categories:[],display_order:0,is_active:!0})}}),xd=Tt({mutationFn:U=>pe.entities.Sponsor.delete(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["sponsors"]})}}),Mo=Tt({mutationFn:async({bookingId:U,seatNumber:ke,checked_in:ze})=>{const kt=wa.find(zt=>zt.id===U).seats_detail.map(zt=>zt.seat_number===ke?{...zt,checked_in:ze,checked_in_time:ze?new Date().toISOString():null}:zt);return pe.entities.TableBooking.update(U,{seats_detail:kt})},onSuccess:()=>{fn.invalidateQueries({queryKey:["tableBookings"]})}}),Lo=Tt({mutationFn:async({teamMemberName:U,notes:ke})=>{const ze=ul.find(wt=>wt.team_member_name===U);return ze?pe.entities.TeamNotes.update(ze.id,{notes:ke,last_updated:new Date().toISOString()}):pe.entities.TeamNotes.create({team_member_name:U,notes:ke,last_updated:new Date().toISOString()})},onSuccess:(U,ke)=>{fn.invalidateQueries({queryKey:["teamNotes"]}),R(ze=>({...ze,[ke.teamMemberName]:ke.notes}))}}),Kl=Tt({mutationFn:U=>pe.entities.SocialMediaPost.create(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["socialMediaPosts"]}),It(!1),xr(null),fl()}}),yd=Tt({mutationFn:({id:U,postData:ke})=>pe.entities.SocialMediaPost.update(U,ke),onSuccess:()=>{fn.invalidateQueries({queryKey:["socialMediaPosts"]}),It(!1),xr(null),fl()}}),_f=Tt({mutationFn:U=>pe.entities.SocialMediaPost.delete(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["socialMediaPosts"]})}}),hl=Tt({mutationFn:U=>pe.entities.Contact.create(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["contacts"]}),Mi(!1),ba({contact_name:"",job_title:"",company_name:"",email:"",phone:"",linkedin_url:"",contact_type:"other",company_size:"",industry:"",notes:"",last_contact_date:"",next_follow_up_date:""})}}),Ii=Tt({mutationFn:({id:U,contactData:ke})=>pe.entities.Contact.update(U,ke),onSuccess:()=>{fn.invalidateQueries({queryKey:["contacts"]}),Mi(!1),Gs(null),ba({contact_name:"",job_title:"",company_name:"",email:"",phone:"",linkedin_url:"",contact_type:"other",company_size:"",industry:"",notes:"",last_contact_date:"",next_follow_up_date:""})}}),hu=Tt({mutationFn:U=>pe.entities.Contact.delete(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["contacts"]})}}),Ro=Tt({mutationFn:async U=>Ha?pe.entities.LandingPageConfig.update(Ha.id,U):pe.entities.LandingPageConfig.create(U),onSuccess:U=>{fn.invalidateQueries({queryKey:["landingPageConfig"]}),Rn(U),alert("Landing page settings saved successfully!")}}),fu=Tt({mutationFn:async U=>Oa?pe.entities.PopupNotification.update(Oa.id,U):pe.entities.PopupNotification.create(U),onSuccess:()=>{fn.invalidateQueries({queryKey:["popupNotification"]}),alert("Popup notification settings saved successfully!")}}),z=async U=>{const ke={...Oa||{},is_enabled:U};fu.mutate(ke)},ie=()=>{const U=Oa||{title:"Nominations Are Now Open!",message:"The National Charity Today Awards™ 2026 nominations are officially open. Nominate an outstanding charity or individual making a difference in the UK.",button_text:"Submit Your Nomination",show_secondary_button:!0,secondary_button_text:"View Categories",secondary_button_link:"Categories"},ke=U.show_secondary_button?`<a href="https://nationalcharitytodayawards.co.uk/${U.secondary_button_link}
1464" class="ncta-button ncta-button-secondary" onclick="closeNctaPopup()">${U.secondary_button_text}</a>`:"",ze=`<!-- National Charity Today Awards™ Popup Notification -->
1465<div id="ncta-popup-container"></div>
1466<script>
1467(function() {
1468  if (localStorage.getItem('ncta_popup_seen')) return;
1469  
1470  var popupHTML = '<style>' +
1471    '#ncta-popup-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }' +
1472    '#ncta-popup { background: linear-gradient(to bottom right, #ffffff, #f9fafb); border-radius: 24px; border: 4px solid #dec069; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); max-width: 512px; width: 100%; position: relative; overflow: hidden; }' +
1473    '.ncta-gold-bar { height: 12px; background: linear-gradient(to right, #dec069, #f4e285, #dec069); }' +
1474    '.ncta-popup-content { padding: 40px; text-align: center; }' +
1475    '.ncta-close-btn { position: absolute; top: 24px; right: 24px; width: 48px; height: 48px; background: #f3f4f6; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #374151; transition: all 0.3s; z-index: 10; }' +
1476    '.ncta-close-btn:hover { background: #e5e7eb; transform: rotate(90deg); }' +
1477    '.ncta-logo { width: 192px; height: 192px; margin: 0 auto 24px; filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.15)); }' +
1478    '.ncta-title { font-size: 2.5rem; font-weight: 700; color: #06053e; margin-bottom: 24px; line-height: 1.2; letter-spacing: -0.025em; }' +
1479    '.ncta-message { font-size: 1.25rem; color: #4b5563; margin-bottom: 32px; line-height: 1.75; font-weight: 300; max-width: 32rem; margin-left: auto; margin-right: auto; }' +
1480    '.ncta-button { display: block; width: 100%; background: #dec069; color: #06053e; font-size: 1.125rem; font-weight: 700; padding: 24px 32px; border: none; border-radius: 8px; cursor: pointer; text-decoration: none; text-align: center; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); transition: all 0.3s; margin-bottom: 12px; }' +
1481    '.ncta-button:hover { background: #d4b860; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15); }' +
1482    '.ncta-button-secondary { background: white; border: 2px solid #06053e; color: #06053e; font-weight: 600; }' +
1483    '.ncta-button-secondary:hover { background: #06053e; color: white; }' +
1484    '@media (max-width: 640px) { .ncta-title { font-size: 2rem; } .ncta-message { font-size: 1rem; } .ncta-popup-content { padding: 24px; } }' +
1485    '</style>' +
1486    '<div id="ncta-popup-backdrop">' +
1487    '<div id="ncta-popup">' +
1488    '<button class="ncta-close-btn" onclick="closeNctaPopup()">×</button>' +
1489    '<div class="ncta-gold-bar"></div>' +
1490    '<div class="ncta-popup-content">' +
1491    '<img src="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png" alt="National Charity Today Awards™" class="ncta-logo">' +
1492    '<h2 class="ncta-title">${U.title}</h2>' +
1493    '<p class="ncta-message">${U.message}</p>' +
1494    '<a href="https://nationalcharitytodayawards.co.uk/Nominations" class="ncta-button" onclick="closeNctaPopup()">${U.button_text}</a>' +
1495    '${ke}' +
1496    '</div>' +
1497    '<div class="ncta-gold-bar"></div>' +
1498    '</div>' +
1499    '</div>';
1500  
1501  document.getElementById('ncta-popup-container').innerHTML = popupHTML;
1502  
1503  window.closeNctaPopup = function() {
1504    document.getElementById('ncta-popup-container').innerHTML = '';
1505    localStorage.setItem('ncta_popup_seen', 'true');
1506  };
1507})();
1508<\/script>
1509<!-- End NCTA Popup -->`;navigator.clipboard.writeText(ze),dh(!0),setTimeout(()=>dh(!1),3e3)},Ee=Tt({mutationFn:async({id:U,data:ke})=>{const ze=Hr.find(kt=>kt.id===U);return ke.status==="shortlisted"&&(ze==null?void 0:ze.status)!=="shortlisted"&&(ke.shortlisted_date=new Date().toISOString()),ke.status&&ke.status!=="shortlisted"&&(ze==null?void 0:ze.status)==="shortlisted"&&(ke.shortlisted_date=null),await pe.entities.Nomination.update(U,ke)},onMutate:async({id:U,data:ke})=>{await fn.cancelQueries({queryKey:["nominations"]});
1509const ze=fn.getQueryData(["nominations"]);return fn.setQueryData(["nominations"],wt=>wt==null?void 0:wt.map(kt=>kt.id===U?{...kt,...ke}:kt)),{previousNominations:ze}},onError:(U,ke,ze)=>{fn.setQueryData(["nominations"],ze.previousNominations)},onSuccess:U=>{fn.invalidateQueries({queryKey:["nominations"]}),St(U),Ye(!1),da(""),alert("Nomination updated successfully!")}}),Re=U=>{U.preventDefault(),Ro.mutate(ta)},Qe=async U=>{const ke={...ta,is_active:U};fr(ke),Ro.mutate(ke)},ot=Tt({mutationFn:async()=>{const U=Dr.filter(kt=>kt.status==="completed"||kt.status==="in_progress"||kt.status==="on_hold"||kt.status==="not_started"),ke=new Date;ke.setDate(ke.getDate()+30);const ze=ke.toISOString().split("T")[0];for(const kt of U)await pe.entities.Task.update(kt.id,{status:"not_started",due_date:ze,progress_percentage:0});for(const kt of wa)await pe.entities.TableBooking.delete(kt.id);const wt=await pe.entities.TablePurchaseOrder.list();for(const kt of wt)await pe.entities.TablePurchaseOrder.delete(kt.id);return{tasksReset:U.length,bookingsCleared:wa.length,ordersCleared:wt.length}},onSuccess:U=>{fn.invalidateQueries({queryKey:["tasks"]}),fn.invalidateQueries({queryKey:["tableBookings"]}),O(!1),alert(`✅ System Reset Complete!
1510
1511${U.tasksReset} tasks reset to default
1512${U.bookingsCleared} table bookings cleared
1513${U.ordersCleared} purchase orders cleared
1514
1515System is ready for the next event cycle.`)},onError:U=>{alert(`❌ Reset Failed: ${U.message}
1516
1517Please try again or contact support.`)}}),vt=()=>{const U=Dr.length>0?Math.round(ei.completed/Dr.length*100):0;let ke="data:text/csv;charset=utf-8,";ke+=`NATIONAL CHARITY TODAY AWARDS - TASK MANAGEMENT REPORT
1518`,ke+=`Generated: ${new Date().toLocaleString("en-GB")}
1519`,ke+=`Total Tasks: ${Dr.length}
1520`,ke+=`Completed: ${ei.completed}
1521`,ke+=`In Progress: ${ei.in_progress}
1522`,ke+=`Not Started: ${ei.not_started}
1523`,ke+=`On Hold: ${ei.on_hold}
1524`,ke+=`Overall Completion: ${U}%
1525`,ke+=`
1526`,ke+=`Title,Description,Status,Priority,Assigned To,Due Date,Category,Progress %,Notes
1527`,Dr.forEach(kt=>{var Zn,ja,co;const zt=[`"${((Zn=kt.title)==null?void 0:Zn.replace(/"/g,'""'))||""}"`,`"${((ja=kt.description)==null?void 0:ja.replace(/"/g,'""'))||""}"`,kt.status||"",kt.priority||"",kt.assigned_to||"",kt.due_date||"",kt.category||"",`${kt.progress_percentage||0}%`,`"${((co=kt.notes)==null?void 0:co.replace(/"/g,'""'))||""}"`].join(",");ke+=zt+`
1528`});const ze=encodeURI(ke),wt=document.createElement("a");wt.setAttribute("href",ze),wt.setAttribute("download",`NCTA_Task_Report_${new Date().toISOString().split("T")[0]}.csv`),document.body.appendChild(wt),wt.click(),document.body.removeChild(wt)},qt=()=>{k(""),O(!0)},un=async U=>{try{const ke=`${window.location.origin}/CheckIn?ticket=${U.ticket_number}&table=${encodeURIComponent(U.table_number)}`,ze=await oq.toDataURL(ke),wt=`
1529        <!DOCTYPE html>
1530        <html>
1531        <head>
1532          <style>
1533            body {
1534              font-family: Arial, sans-serif;
1535              margin: 0;
1536              padding: 20px;
1537              background: white;
1538            }
1539            .ticket {
1540              width: 600px;
1541              margin: 0 auto;
1542              border: 3px solid #dec069;
1543              border-radius: 12px;
1544              overflow: hidden;
1545            }
1546            .ticket-header {
1547              background: linear-gradient(135deg, #06053e 0%, #dec069 100%);
1548              color: white;
1549              padding: 30px;
1550              text-align: center;
1551            }
1552            .ticket-header h1 {
1553              margin: 0 0 10px 0;
1554              font-size: 24px;
1555            }
1556            .ticket-header p {
1557              margin: 5px 0;
1558              opacity: 0.9;
1559            }
1560            .ticket-body {
1561              padding: 30px;
1562              background: white;
1563            }
1564            .ticket-number {
1565              background: #dec069;
1566              color: #06053e;
1567              padding: 15px;
1568              text-align: center;
1569              font-size: 32px;
1570              font-weight: bold;
1571              border-radius: 8px;
1572              margin-bottom: 25px;
1573            }
1574            .ticket-details {
1575              margin: 20px 0;
1576            }
1577            .detail-row {
1578              display: flex;
1579              padding: 12px 0;
1580              border-bottom: 1px solid #f0f0f0;
1581            }
1582            .detail-label {
1583              font-weight: bold;
1584              color: #06053e;
1585              width: 150px;
1586            }
1587            .detail-value {
1588              color: #333;
1589            }
1590            .ticket-footer {
1591              background: #f8f9fa;
1592              padding: 20px;
1593              text-align: center;
1594              font-size: 12px;
1595              color: #666;
1596            }
1597          </style>
1598        </head>
1599        <body>
1600          <div class="ticket">
1601            <div class="ticket-header">
1602              <h1>🏆 National Charity Today Awards™ 🏆</h1>
1603              <p>Gala Lunch Ceremony</p>
1604              <p>14 October 2026 • 12:00 PM</p>
1605              <p>Holiday Inn Peterborough West</p>
1606            </div>
1607            <div class="ticket-body">
1608              <div class="ticket-number">
1609                TICKET #${U.ticket_number}
1610              </div>
1611              <div class="ticket-details">
1612                <div class="detail-row">
1613                  <div class="detail-label">Guest Name:</div>
1614                  <div class="detail-value">${U.guest_name}</div>
1615                </div>
1616                <div class="detail-row">
1617                  <div class="detail-label">Organisation:</div>
1618                  <div class="detail-value">${U.organization}</div>
1619                </div>
1620                <div class="detail-row">
1621                  <div class="detail-label">Table Number:</div>
1622                  <div class="detail-value">${U.table_number}</div>
1623                </div>
1624                <div class="detail-row">
1625                  <div class="detail-label">Venue:</div>
1626                  <div class="detail-value">Holiday Inn Peterborough West, Thorpe Wood, PE3 6SG</div>
1627                </div>
1628                <div class="detail-row">
1629                  <div class="detail-label">Dress Code:</div>
1630                  <div class="detail-value">Black Tie</div>
1631                </div>
1632              </div>
1633              <div style="text-align: center; margin-top: 25px;">
1634                <img src="${ze}" alt="Ticket QR Code" />
1635                <p style="font-size: 11px; color: #666; margin-top: 5px;">Scan for event check-in</p>
1636              </div>
1637            </div>
1638            <div class="ticket-footer">
1639              <p>Please bring this ticket with you to the event</p>
1640              <p>© ${new Date().getFullYear()} National Charity Today Awards™ • Charity Today</p>
1641            </div>
1642          </div>
1643        </body>
1644        </html>
1645      `,kt=window.open("","_blank");kt.document.write(wt),kt.document.close(),setTimeout(()=>{kt.print()},250)}catch(ke){console.error("Error generating ticket:",ke),alert("Failed to generate ticket. Please try again.")}},On=async U=>{try{if(!U.buyer_email){alert("No email address found for this guest.");return}const ke=`${window.location.origin}/CheckIn?ticket=${U.ticket_number}&table=${encodeURIComponent(U.table_number)}`,ze=await oq.toDataURL(ke),wt=`
1646        <!DOCTYPE html>
1647        <html>
1648        <head>
1649          <style>
1650            body {
1651              font-family: Arial, sans-serif;
1652              margin: 0;
1653              padding: 20px;
1654              background: #f5f5f5;
1655            }
1656            .ticket {
1657              max-width: 600px;
1658              margin: 0 auto;
1659              border: 3px solid #dec069;
1660              border-radius: 12px;
1661              overflow: hidden;
1662              background: white;
1663            }
1664            .ticket-header {
1665              background: linear-gradient(135deg, #06053e 0%, #dec069 100%);
1666              color: white;
1667              padding: 30px;
1668              text-align: center;
1669            }
1670            .ticket-header h1 {
1671              margin: 0 0 10px 0;
1672              font-size: 24px;
1673            }
1674            .ticket-header p {
1675              margin: 5px 0;
1676              opacity: 0.9;
1677            }
1678            .ticket-body {
1679              padding: 30px;
1680              background: white;
1681            }
1682            .ticket-number {
1683              background: #dec069;
1684              color: #06053e;
1685              padding: 15px;
1686              text-align: center;
1687              font-size: 32px;
1688              font-weight: bold;
1689              border-radius: 8px;
1690              margin-bottom: 25px;
1691            }
1692            .ticket-details {
1693              margin: 20px 0;
1694            }
1695            .detail-row {
1696              display: flex;
1697              padding: 12px 0;
1698              border-bottom: 1px solid #f0f0f0;
1699            }
1700            .detail-label {
1701              font-weight: bold;
1702              color: #06053e;
1703              width: 150px;
1704            }
1705            .detail-value {
1706              color: #333;
1707            }
1708            .ticket-footer {
1709              background: #f8f9fa;
1710              padding: 20px;
1711              text-align: center;
1712              font-size: 12px;
1713              color: #666;
1714            }
1715          </style>
1716        </head>
1717        <body>
1718          <div class="ticket">
1719            <div class="ticket-header">
1720              <h1>🏆 National Charity Today Awards™ 🏆</h1>
1721              <p>Gala Lunch Ceremony</p>
1722              <p>14 October 2026 • 12:00 PM</p>
1723              <p>Holiday Inn Peterborough West</p>
1724            </div>
1725            <div class="ticket-body">
1726              <div class="ticket-number">
1727                TICKET #${U.ticket_number}
1728              </div>
1729              <div class="ticket-details">
1730                <div class="detail-row">
1731                  <div class="detail-label">Guest Name:</div>
1732                  <div class="detail-value">${U.guest_name}</div>
1733                </div>
1734                <div class="detail-row">
1735                  <div class="detail-label">Organisation:</div>
1736                  <div class="detail-value">${U.organization}</div>
1737                </div>
1738                <div class="detail-row">
1739                  <div class="detail-label">Table Number:</div>
1740                  <div class="detail-value">${U.table_number}</div>
1741                </div>
1742                <div class="detail-row">
1743                  <div class="detail-label">Venue:</div>
1744                  <div class="detail-value">Holiday Inn Peterborough West, Thorpe Wood, PE3 6SG</div>
1745                </div>
1746                <div class="detail-row">
1747                  <div class="detail-label">Dress Code:</div>
1748                  <div class="detail-value">Black Tie</div>
1749                </div>
1750              </div>
1751              <div style="text-align: center; margin-top: 25px;">
1752                <img src="${ze}" alt="Ticket QR Code" />
1753                <p style="font-size: 11px; color: #666; margin-top: 5px;">Scan for event check-in</p>
1754              </div>
1755            </div>
1756            <div class="ticket-footer">
1757              <p>Please bring this ticket with you to the event</p>
1758              <p>© ${new Date().getFullYear()} National Charity Today Awards™ • Charity Today</p>
1759            </div>
1760          </div>
1761        </body>
1762        </html>
1763      `;await pe.integrations.Core.SendEmail({to:U.buyer_email,subject:`Your Ticket - National Charity Today Awards™ (Ticket #${U.ticket_number})`,body:wt}),alert(`✓ Ticket successfully emailed to ${U.guest_name} at ${U.buyer_email}`)}catch(ke){console.error("Error emailing ticket:",ke),alert("Failed to email ticket. Please try again.")}},gn=U=>{u(U),m({title:U.title||"",description:U.description||"",assigned_to:U.assigned_to||"",status:U.status||"not_started",priority:U.priority||"medium",due_date:U.due_date||"",category:U.category||"general",progress_percentage:U.progress_percentage||0,notes:U.notes||"",is_recurring:U.is_recurring||!1,recurrence_pattern:U.recurrence_pattern||"weekly",recurrence_interval:U.recurrence_interval||1,recurrence_end_date:U.recurrence_end_date||""}),d(!0)},Jn=async U=>{U.preventDefault(),h?Ri.mutate({id:h.id,taskData:f}):so.mutate(f)},sa=U=>{x(U),j({name:U.name||"",logo_url:U.logo_url||"",website_url:U.website_url||"",tier:U.tier||"partner",description:U.description||"",mission:U.mission||"",impact:U.impact||"",sponsored_categories:U.sponsored_categories||[],display_order:U.display_order||0,is_active:U.is_active!==void 0?U.is_active:!0}),g(!0)},ha=U=>{U.preventDefault(),y?io.mutate({id:y.id,sponsorData:w}):Wl.mutate(w)},Ma=U=>{j(ke=>{const ze=ke.sponsored_categories||[];return ze.includes(U)?{...ke,sponsored_categories:ze.filter(wt=>wt!==U)}:{...ke,sponsored_categories:[...ze,U]}})},rs=U=>{R(ke=>({...ke,[S]:U})),Ze.current&&clearTimeout(Ze.current),Ze.current=setTimeout(()=>{S&&Lo.mutate({teamMemberName:S,notes:U})},1e3)},La=U=>{var ke;je(U),Fe({title:U.title||"",author:U.author||"",content:U.content||"",excerpt:U.excerpt||"",image_url:U.image_url||"",image_caption:U.image_caption||"",category:U.category||"general",published_date:((ke=U.published_date)==null?void 0:ke.split("T")[0])||"",is_featured:U.is_featured||!1,is_published:U.is_published||!1,meta_title:U.meta_title||"",meta_description:U.meta_description||"",keywords:U.keywords||"",og_title:U.og_title||"",og_description:U.og_description||""}),ae(!0)},oo=async U=>{U.preventDefault();try{const ke=xe.is_published&&!xe.published_date?{...xe,published_date:new Date().toISOString().split("T")[0]}:xe;le?await pe.entities.NewsArticle.update(le.id,ke):await pe.entities.NewsArticle.create(ke),fn.invalidateQueries({queryKey:["newsArticles"]}
1763),ae(!1),je(null),Fe({title:"",author:"",content:"",excerpt:"",image_url:"",image_caption:"",category:"general",published_date:"",is_featured:!1,is_published:!1,meta_title:"",meta_description:"",keywords:"",og_title:"",og_description:""})}catch(ke){console.error("Failed to save article:",ke),alert(`Failed to save article: ${ke.message}`)}},Os=async U=>{if(window.confirm("Are you sure you want to delete this article? This action cannot be undone."))try{await pe.entities.NewsArticle.delete(U),fn.invalidateQueries({queryKey:["newsArticles"]})}catch(ke){console.error("Failed to delete article:",ke),alert(`Failed to delete article: ${ke.message}`)}},Zs=async U=>{try{await pe.entities.NewsArticle.update(U.id,{...U,is_published:!0,published_date:U.published_date&&new Date(U.published_date)>new Date?U.published_date:new Date().toISOString().split("T")[0]}),fn.invalidateQueries({queryKey:["newsArticles"]})}catch(ke){console.error("Failed to publish article:",ke),alert(`Failed to publish article: ${ke.message}`)}},Io=async U=>{try{await pe.entities.NewsArticle.update(U.id,{...U,is_published:!1}),fn.invalidateQueries({queryKey:["newsArticles"]})}catch(ke){console.error("Failed to unpublish article:",ke),alert(`Failed to unpublish article: ${ke.message}`)}},mu=async U=>{const ke=U.target.files[0];if(ke){Ne(!0);try{const ze=await pe.integrations.Core.UploadFile({file:ke});Fe(wt=>({...wt,image_url:ze.file_url}))}catch(ze){console.error("Failed to upload image:",ze),alert(`Failed to upload image: ${ze.message}`)}Ne(!1)}},Ms=U=>U.is_published?U.published_date&&new Date(U.published_date)>new Date?"scheduled":"published":"draft",lo=pi.filter(U=>{const ke=Ms(U);return $e==="all"?!0:ke===$e}),fl=()=>{Rr({post_content:"",platforms:[],scheduled_date_time:"",status:"draft",image_url:"",post_type:"general",hashtags:"#NationalCharityTodayAwards #CharityTodayAwards #CharityTodayAwards2026 #CharityAwardsUK #CharityToday #charityawards #nationalcharityawards",notes:""})},vd=U=>{U.preventDefault(),_t?yd.mutate({id:_t.id,postData:xn}):Kl.mutate(xn)},Sc=U=>{xr(U),Rr({post_content:U.post_content||"",platforms:U.platforms||[],scheduled_date_time:U.scheduled_date_time?yt(new Date(U.scheduled_date_time),"yyyy-MM-dd'T'HH:mm"):"",status:U.status||"draft",image_url:U.image_url||"",post_type:U.post_type||"general",hashtags:U.hashtags||"",notes:U.notes||""})},fa=U=>{confirm("Are you sure you want to delete this post?")&&_f.mutate(U)},bd=U=>{Rr(ke=>({...ke,platforms:(ke.platforms||[]).includes(U)?(ke.platforms||[]).filter(ze=>ze!==U):[...ke.platforms||[],U]}))},Cc=U=>({Facebook:Wy,Twitter:Yy,LinkedIn:Yu,YouTube:d3,Instagram:l3})[U]||Jh,wd=U=>{ko(U),Po({year:U.year||new Date().getFullYear(),categories:U.categories||[],winner_name:U.winner_name||"",organization:U.organization||"",description:U.description||"",image_url:U.image_url||"",website_url:U.website_url||"",featured:U.featured||!1}),Co(!0)},jd=async U=>{const ke=U.target.files[0];if(ke){Dl(!0);try{const ze=await pe.integrations.Core.UploadFile({file:ke});Po(wt=>({...wt,image_url:ze.file_url}))}catch(ze){console.error("Failed to upload image:",ze),alert(`Failed to upload image: ${ze.message}`)}Dl(!1)}},Ls=async U=>{U.preventDefault();try{Ao?await pe.entities.Winner.update(Ao.id,bs):await pe.entities.Winner.create(bs),fn.invalidateQueries({queryKey:["winners"]}),Co(!1),ko(null),Po({year:new Date().getFullYear(),categories:[],winner_name:"",organization:"",description:"",image_url:"",website_url:"",featured:!1})}catch(ke){console.error("Failed to save winner:",ke),alert(`Failed to save winner: ${ke.message}`)}},Ac=async U=>{if(window.confirm("Are you sure you want to delete this winner? This action cannot be undone."))try{await pe.entities.Winner.delete(U),fn.invalidateQueries({queryKey:["winners"]})}catch(ke){console.error("Failed to delete winner:",ke),alert(`Failed to delete winner: ${ke.message}`)}},Do=Ts.filter(U=>{var ze,wt,kt;if(!Fl)return!0;const ke=Fl.toLowerCase();return((ze=U.winner_name)==null?void 0:ze.toLowerCase().includes(ke))||((wt=U.organization)==null?void 0:wt.toLowerCase().includes(ke))||((kt=U.category)==null?void 0:kt.toLowerCase().includes(ke))}),pu={client:"bg-blue-100 text-blue-800",sponsor:"bg-purple-100 text-purple-800",partner:"bg-green-100 text-green-800",prospect:"bg-orange-100 text-orange-800",other:"bg-gray-100 text-gray-800"},Rs=U=>{Gs(U),ba({contact_name:U.contact_name||"",job_title:U.job_title||"",company_name:U.company_name||"",email:U.email||"",phone:U.phone||"",linkedin_url:U.linkedin_url||"",contact_type:U.contact_type||"other",company_
1763size:U.company_size||"",industry:U.industry||"",notes:U.notes||"",last_contact_date:U.last_contact_date||"",next_follow_up_date:U.next_follow_up_date||""}),Mi(!0)},Nd=U=>{U.preventDefault(),Ir?Ii.mutate({id:Ir.id,contactData:Xn}):hl.mutate(Xn)},kc=Xs.filter(U=>{var wt,kt;const ke=!Ys||((wt=U.contact_name)==null?void 0:wt.toLowerCase().includes(Ys.toLowerCase()))||((kt=U.company_name)==null?void 0:kt.toLowerCase().includes(Ys.toLowerCase())),ze=ll==="all"||U.contact_type===ll;return ke&&ze}),_d=U=>{jc(U),$l({name:U.name||"",role:U.role||"",organization:U.organization||"",quote:U.quote||"",category:U.category||"winner",awards:U.awards||(U.award?[U.award]:[]),year:U.year||new Date().getFullYear(),image_url:U.image_url||"",is_featured:U.is_featured||!1,is_active:U.is_active!==void 0?U.is_active:!0,display_order:U.display_order||0}),sr(!0)},Fo=async U=>{const ke=U.target.files[0];if(ke){Ul(!0);try{const ze=await pe.integrations.Core.UploadFile({file:ke});$l(wt=>({...wt,image_url:ze.file_url}))}catch(ze){console.error("Failed to upload image:",ze),alert("Failed to upload image")}Ul(!1)}},Gl=async U=>{U.preventDefault();try{const ke={...Nc,awards:(Nc.awards||[]).filter(ze=>ze)};Bl?await pe.entities.Testimonial.update(Bl.id,ke):await pe.entities.Testimonial.create(ke),fn.invalidateQueries({queryKey:["testimonials"]}),sr(!1),jc(null),$l({name:"",role:"",organization:"",quote:"",category:"winner",award:"",year:new Date().getFullYear(),image_url:"",is_featured:!1,is_active:!0,display_order:0})}catch(ke){console.error("Failed to save testimonial:",ke),alert(`Failed to save testimonial: ${ke.message}`)}},Is=async U=>{if(window.confirm("Are you sure you want to delete this testimonial? This action cannot be undone."))try{await pe.entities.Testimonial.delete(U),fn.invalidateQueries({queryKey:["testimonials"]})}catch(ke){console.error("Failed to delete testimonial:",ke),alert(`Failed to delete testimonial: ${ke.message}`)}};L.useEffect(()=>{if((e==null?void 0:e.role)!=="admin")return;const ke=setInterval(async()=>{const ze=new Date;if(ze.getHours()===20){const kt=ze.toISOString().split("T")[0],zt="last_auto_backup_date";localStorage.getItem(zt)!==kt&&(await as("auto"),localStorage.setItem(zt,kt))}},3600*1e3);return()=>clearInterval(ke)},[e]);const as=async(U="manual")=>{es(!0);try{const ke={nominations:Hr||[],tasks:Dr||[],tableBookings:wa||[],sponsors:ts||[],newsArticles:pi||[],winners:Ts||[],testimonials:ns||[],socialMediaPosts:Li||[]},ze=new Date,wt=U==="auto"?`Auto Backup - ${yt(ze,"d MMM yyyy HH:mm")}`:`Manual Backup - ${yt(ze,"d MMM yyyy HH:mm")}`;await pe.entities.SystemRestorePoint.create({restore_point_name:wt,snapshot_data:ke,backup_type:U,created_timestamp:ze.toISOString()});const kt=await pe.entities.SystemRestorePoint.list("-created_date",100);if(kt.length>10){const zt=kt.slice(10);for(const Zn of zt)await pe.entities.SystemRestorePoint.delete(Zn.id)}fn.invalidateQueries({queryKey:["restorePoints"]}),alert("✓ Restore point created successfully!")}catch(ke){console.error("Error creating restore point:",ke),alert(`Failed to create restore point: ${ke.message}`)}es(!1)},Yl=async U=>{var ke,ze,wt,kt,zt,Zn,ja,co;if(window.confirm(`Are you sure you want to restore the system to "${U.restore_point_name}"? This will replace all current data with the backup data. This action cannot be undone.`)){Yr(!0);try{const Cr=U.snapshot_data;for(const zn of Hr)await pe.entities.Nomination.delete(zn.id);for(const zn of Dr)await pe.entities.Task.delete(zn.id);for(const zn of wa)await pe.entities.TableBooking.delete(zn.id);for(const zn of ts)await pe.entities.Sponsor.delete(zn.id);for(const zn of pi)await pe.entities.NewsArticle.delete(zn.id);for(const zn of Ts)await pe.entities.Winner.delete(zn.id);for(const zn of ns)await pe.entities.Testimonial.delete(zn.id);for(const zn of Li)await pe.entities.SocialMediaPost.delete(zn.id);(ke=Cr.nominations)!=null&&ke.length&&await pe.entities.Nomination.bulkCreate(Cr.nominations.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(ze=Cr.tasks)!=null&&ze.length&&await pe.entities.Task.bulkCreate(Cr.tasks.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(wt=Cr.tableBookings)!=null&&wt.length&&await pe.entities.TableBooking.bulkCreate(Cr.tableBookings.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(kt=Cr.sponsors)!=null&&kt.length&&await pe.entities.Sponsor.bulkCreate(Cr.sponsors.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(zt=Cr.newsArticles)!=null&&zt.length&&await pe.entities.NewsArticle.bulkCreate(Cr.newsArticles.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}
1763))),(Zn=Cr.winners)!=null&&Zn.length&&await pe.entities.Winner.bulkCreate(Cr.winners.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(ja=Cr.testimonials)!=null&&ja.length&&await pe.entities.Testimonial.bulkCreate(Cr.testimonials.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),(co=Cr.socialMediaPosts)!=null&&co.length&&await pe.entities.SocialMediaPost.bulkCreate(Cr.socialMediaPosts.map(zn=>({...zn,id:void 0,created_date:void 0,updated_date:void 0,created_by:void 0}))),fn.invalidateQueries(),alert(`✓ System successfully restored to "${U.restore_point_name}"`),window.location.reload()}catch(Cr){console.error("Error restoring data:",Cr),alert(`Failed to restore data: ${Cr.message}`)}Yr(!1)}},ml=async U=>{if(window.confirm("Are you sure you want to delete this restore point?"))try{await pe.entities.SystemRestorePoint.delete(U),fn.invalidateQueries({queryKey:["restorePoints"]}),alert("✓ Restore point deleted")}catch(ke){console.error("Error deleting restore point:",ke),alert(`Failed to delete restore point: ${ke.message}`)}},pl=async()=>{if(confirm(`This will re-score all ${Hr.length} nominations using the updated AI scoring criteria. This may take several minutes. Continue?`)){Da(!0),fi(null);try{const U=await pe.functions.invoke("scoreNomination",{nominationIds:[]});fi(U.data),fn.invalidateQueries({queryKey:["nominations"]})}catch(U){fi({success:!1,error:U.message||"Failed to rescore nominations"})}Da(!1)}},Sd=()=>na==="all"?Hr:Hr.filter(U=>U.category===na),Un={total:Hr.length,under_review:Hr.filter(U=>U.status==="under_review").length,shortlisted:Hr.filter(U=>U.status==="shortlisted").length,finalist:Hr.filter(U=>U.status==="finalist").length,declined:Hr.filter(U=>
1763U.status==="declined").length,pending_deletion:Hr.filter(U=>U.status==="pending_deletion").length},qo=Sd(),ss=U=>{const ke=[...U];return ke.sort((ze,wt)=>{let kt=0;if(ra==="date")kt=new Date(wt.created_date)-new Date(ze.created_date);else if(ra==="score")kt=(wt.quality_score||0)-(ze.quality_score||0);else if(ra==="status"){const zt={under_review:1,shortlisted:2,finalist:3,declined:4,draft:5};kt=zt[ze.status]-zt[wt.status]}else if(ra==="withdrawal"){const zt=Zn=>{if(Zn.status!=="shortlisted")return 1/0;const ja=new Date(Zn.shortlisted_date||Zn.updated_date);return ja.setDate(ja.getDate()+28),ja.getTime()};kt=zt(ze)-zt(wt)}return ua==="asc"?-kt:kt}),ke},xi=ss(qo),Pc=async U=>{hi(!0);try{await pe.functions.invoke("scoreNomination",{nominationIds:[U.id]}),fn.invalidateQueries({queryKey:["nominations"]}),alert("✓ Quality score generated successfully!")}catch(ke){console.error("Error generating quality score:",ke),alert("Failed to generate quality score. Please try again.")}hi(!1)},ei={not_started:Dr.filter(U=>U.status==="not_started").length,in_progress:Dr.filter(U=>U.status==="in_progress").length,completed:Dr.filter(U=>U.status==="completed").length,on_hold:Dr.filter(U=>U.status==="on_hold").length},Xl=Dr.filter(U=>U.status!=="completed"),Jl=Dr.filter(U=>U.status==="completed"),Ec=U=>{const ke=[...U];return ke.sort((ze,wt)=>{let kt=0;if(dr==="due_date")kt=new Date(ze.due_date)-new Date(wt.due_date);else if(dr==="priority"){const zt={urgent:1,high:2,medium:3,low:4};kt=zt[ze.priority]-zt[wt.priority]}else if(dr==="status"){const zt={not_started:1,in_progress:2,on_hold:3,completed:4};kt=zt[ze.status]-zt[wt.status]}return Yn==="asc"?kt:-kt}),ke},Ds={low:"bg-blue-100 text-blue-800",medium:"bg-yellow-100 text-yellow-800",high:"bg-orange-100 text-orange-800",urgent:"bg-red-100 text-red-800"},gl={not_started:"bg-gray-100 text-gray-800",in_progress:"bg-orange-100 text-orange-800",completed:"bg-green-100 text-green-800",on_hold:"bg-red-100 text-red-800"},Bo={draft:"bg-gray-100 text-gray-800",scheduled:"bg-blue-100 text-blue-800",posted:"bg-green-100 text-green-800",cancelled:"bg-red-100 text-red-800"};return r||!o?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-accent-gold border-t-transparent mx-auto mb-4"}),n.jsx("p",{className:"text-gray-600",children:"Loading admin dashboard..."})]})}):s||!e||(e==null?void 0:e.role)!=="admin"?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md w-full border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(ps,{className:"w-16 h-16 mx-auto mb-6 text-red-600"}),n.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-4",children:s?"Access Denied":"Authentication Required"}),n.jsx("p",{className:"text-gray-600 mb-6",children:s||"You do not have permission to access the admin dashboard."}),n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx(me,{onClick:()=>pe.auth.redirectToLogin(window.location.pathname),className:"bg-primary-navy",children:"Log In"}),n.jsx(me,{onClick:()=>window.location.href="/",variant:"outline",children:"Return to Home"})]})]})})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx(Gm,{children:st&&n.jsx(xge,{task:Ht,onClose:()=>Mt(!1)})}),n.jsx(Nn,{open:zl,onOpenChange:U=>{Mi(U),U||(Gs(null),ba({contact_name:"",job_title:"",company_name:"",email:"",phone:"",linkedin_url:"",contact_type:"other",company_size:"",industry:"",notes:"",last_contact_date:"",next_follow_up_date:""}))},children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:Ir?"Edit Contact":"Add New Contact"})}),n.jsxs("form",{onSubmit:Nd,className:"py-4 space-y-4",children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-name",children:"Contact Name *"}),n.jsx(Me,{id:"contact-name",value:Xn.contact_name,onChange:U=>ba({...Xn,contact_name:U.target.value}),placeholder:"Full name",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-company",children:"Company Name *"}),n.jsx(Me,{id:"contact-company",value:Xn.company_name,onChange:U=>ba({...Xn,company_name:U.target.value}),placeholder:"Company name",required:!0})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-job-title",children:"Job Title"}),n.jsx(Me,{id:"contact-job-title",value:Xn.job_title,onChange:U=>ba({...Xn,job_title:U.target.value}),placeholder:"Job title"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-type",children:"Contact Type *"}),n.jsxs(Qt,{value:Xn.contact_type,onValueChange:U=>ba({...Xn,contact_type:U}),children:[n.jsx(Kt,{id:"contact-type",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"client",children:"Client"}),n.jsx(Ae,{value:"sponsor",children:"Sponsor"}),n.jsx(Ae,{value:"partner",children:"Partner"}),n.jsx(Ae,{value:"prospect",children:"Prospect"}),n.jsx(Ae,{value:"other",children:"Other"})]})]})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-email",children:"Email"}),n.jsx(Me,{id:"contact-email",type:"email",value:Xn.email,onChange:U=>ba({...Xn,email:U.target.value}),placeholder:"Email address"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-phone",children:"Phone"}),n.jsx(Me,{id:"contact-phone",value:Xn.phone,onChange:U=>ba({...Xn,phone:U.target.value}),placeholder:"Phone number"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-linkedin",children:"LinkedIn URL"}),n.jsx(Me,{id:"contact-linkedin",value:Xn.linkedin_url,onChange:U=>ba({...Xn,linkedin_url:U.target.value}),placeholder:"https://linkedin.com/in/..."})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-industry",children:"Industry"}),n.jsx(Me,{id:"contact-industry",value:Xn.industry,onChange:U=>ba({...Xn,industry:U.target.value}),placeholder:"Industry"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-company-size",children:"Company Size"}
1763),n.jsxs(Qt,{value:Xn.company_size,onValueChange:U=>ba({...Xn,company_size:U}),children:[n.jsx(Kt,{id:"contact-company-size",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"startup",children:"Startup"}),n.jsx(Ae,{value:"small",children:"Small"}),n.jsx(Ae,{value:"medium",children:"Medium"}),n.jsx(Ae,{value:"large",children:"Large"}),n.jsx(Ae,{value:"enterprise",children:"Enterprise"})]})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-notes",children:"Notes"}),n.jsx(en,{id:"contact-notes",value:Xn.notes,onChange:U=>ba({...Xn,notes:U.target.value}),placeholder:"Internal notes...",rows:3})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-last-contact",children:"Last Contact Date"}),n.jsx(Me,{id:"contact-last-contact",type:"date",value:Xn.last_contact_date,onChange:U=>ba({...Xn,last_contact_date:U.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"contact-next-followup",children:"Next Follow-Up Date"}),n.jsx(Me,{id:"contact-next-followup",type:"date",value:Xn.next_follow_up_date,onChange:U=>ba({...Xn,next_follow_up_date:U.target.value})})]})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{Mi(!1),Gs(null)},className:"flex-1",disabled:hl.isPending||Ii.isPending,children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:hl.isPending||Ii.isPending,children:hl.isPending||Ii.isPending?"Saving...":Ir?"Update Contact":"Add Contact"})]})]})]})}),n.jsx(Nn,{open:c,onOpenChange:U=>{d(U),U||(u(null),m({title:"",description:"",assigned_to:"",status:"not_started",priority:"medium",due_date:"",category:"general",progress_percentage:0,notes:"",is_recurring:!1,recurrence_pattern:"weekly",recurrence_interval:1,recurrence_end_date:""}))},children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:h?"Edit Task":"Create New Task"})}),n.jsxs("form",{onSubmit:Jn,className:"py-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-title",children:"Task Title *"}),n.jsx(Me,{id:"task-title",value:f.title,onChange:U=>m({...f,title:U.target.value}),placeholder:"Enter task title",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-description",children:"Description"}),n.jsx(en,{id:"task-description",value:f.description,onChange:U=>m({...f,description:U.target.value}),placeholder:"Task description (optional)",rows:3})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-assigned",children:"Assigned To *"}),n.jsx(Me,{id:"task-assigned",type:"text",value:f.assigned_to,onChange:U=>m({...f,assigned_to:U.target.value}),placeholder:"Enter assignee's name",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-due-date",children:"Due Date *"}),n.jsx(Me,{id:"task-due-date",type:"date",value:f.due_date,onChange:U=>m({...f,due_date:U.target.value}),required:!0})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-priority",children:"Priority"}),n.jsxs(Qt,{value:f.priority,onValueChange:U=>m({...f,priority:U}),children:[n.jsx(Kt,{id:"task-priority",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"low",children:"Low"}),n.jsx(Ae,{value:"medium",children:"Medium"}),n.jsx(Ae,{value:"high",children:"High"}),n.jsx(Ae,{value:"urgent",children:"Urgent"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-status",children:"Status"}),n.jsxs(Qt,{value:f.status,onValueChange:U=>m({...f,status:U}),children:[n.jsx(Kt,{id:"task-status",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"not_started",children:"Not Started"}),n.jsx(Ae,{value:"in_progress",children:"In Progress"}),n.jsx(Ae,{value:"completed",children:"Completed"}),n.jsx(Ae,{value:"on_hold",children:"On Hold"})]})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-category",children:"Category"}),n.jsxs(Qt,{value:f.category,onValueChange:U=>m({...f,category:U}),children:[n.jsx(Kt,{id:"task-category",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"nominations",children:"Nominations"}),n.jsx(Ae,{value:"judging",children:"Judging"}),n.jsx(Ae,{value:"event_planning",children:"Event Planning"}),n.jsx(Ae,{value:"marketing",children:"Marketing"}),n.jsx(Ae,{value:"sponsorship",children:"Sponsorship"}),n.jsx(Ae,{value:"logistics",children:"Logistics"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"task-notes",children:"Notes (Internal Only)"}),n.jsx(en,{id:"task-notes",value:f.notes,onChange:U=>m({...f,notes:U.target.value}),placeholder:"Add any internal notes for this task...",rows:3})]}),n.jsxs("div",{className:"border-t pt-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Zr,{id:"is-recurring",checked:f.is_recurring,onCheckedChange:U=>m({...f,is_recurring:U})}),n.jsx(ye,{htmlFor:"is-recurring",className:"font-semibold cursor-pointer",children:"Recurring Task"})]}),f.is_recurring&&n.jsxs("div",{className:"space-y-4 pl-6 border-l-4 border-blue-200",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"recurrence-pattern",children:"Repeat Pattern"}),n.jsxs(Qt,{value:f.recurrence_pattern,onValueChange:U=>m({...f,recurrence_pattern:U}),children:[n.jsx(Kt,{id:"recurrence-pattern",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"daily",children:"Daily"}),n.jsx(Ae,{value:"weekly",children:"Weekly"}),n.jsx(Ae,{value:"monthly",children:"Monthly"}),n.jsx(Ae,{value:"annual",children:"Annual"}),n.jsx(Ae,{value:"custom",children:"Custom"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"recurrence-interval",children:"Repeat Every"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Me,{id:"recurrence-interval",type:"number",min:"1",value:f.recurrence_interval,onChange:U=>m({...f,recurrence_interval:parseInt(U.target.value)||1}),className:"w-20"}),n.jsx("span",{className:"text-sm text-gray-600",children:f.recurrence_pattern==="daily"?"day(s)":f.recurrence_pattern==="weekly"?"week(s)":f.recurrence_pattern==="monthly"?"month(s)":f.recurrence_pattern==="annual"?"year(s)":"interval(s)"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"recurrence-end",children:"End Date (Optional)"}),n.jsx(Me,{id:"recurrence-end",type:"date",value:f.recurrence_end_date,onChange:U=>m({...f,recurrence_end_date:U.target.value})}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave blank to repeat indefinitely"})]})]})]})]}),n.jsxs("div",{className:"flex gap-3 mt-6",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{d(!1),u(null)},className:"flex-1",disabled:so.isPending||Ri.isPending,children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:so.isPending||Ri.isPending,children:so.isPending||Ri.isPending?"Saving...":h?"Update Task":"Create Task"})]})]})]})}),n.jsx(Nn,{open:b,onOpenChange:U=>{g(U),U||(x(null),j({name:"",logo_url:"",website_url:"",tier:"partner",description:"",mission:"",impact:"",sponsored_categories:[],display_order:0,is_active:!0}))},children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:y?"Edit Sponsor":"Add New Sponsor"})}),n.jsxs("form",{onSubmit:ha,className:"py-4",children:[n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy border-b pb-2",children:"Basic Information"}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-name",children:"Sponsor Name *"}),n.jsx(Me,{id:"sponsor-name",value:w.name,onChange:U=>j({...w,name:U.target.value}),placeholder:"e.g., Sinclair Method UK",required:!0})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-tier",children:"Sponsorship Tier *"}),n.jsxs(Qt,{value:w.tier,onValueChange:U=>j({...w,tier:U}),children:[n.jsx(Kt,{id:"sponsor-tier",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"headline",children:"Headline Sponsor"}),n.jsx(Ae,{value:"gold",children:"Gold Sponsor"}),n.jsx(Ae,{value:"silver",children:"Silver Sponsor"}),n.jsx(Ae,{value:"bronze",children:"Bronze Sponsor"}),n.jsx(Ae,{value:"partner",children:"Supporting Partner"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-active",children:"Status"}),n.jsxs(Qt,{value:w.is_active?"active":"inactive",onValueChange:U=>j({...w,is_active:U==="active"}),children:[n.jsx(Kt,{id:"sponsor-active",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"active",children:"Active"}),n.jsx(Ae,{value:"inactive",children:"Inactive"})]})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-logo",children:"Sponsor Logo"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(Me,{id:"sponsor-logo",value:w.logo_url,onChange:U=>j({...w,logo_url:U.target.value}),placeholder:"Or paste direct logo URL"}),n.jsx("div",{className:`border-2 border-dashed rounded-lg p-6 transition-all ${Te?"border-accent-gold bg-accent-gold/10 scale-105":"border-gray-300 hover:border-accent-gold"}`,onDragOver:U=>{U.preventDefault(),U.stopPropagation(),Pe(!0)},onDragEnter:U=>{U.preventDefault(),U.stopPropagation(),Pe(!0)},onDragLeave:U=>{U.preventDefault(),U.stopPropagation(),Pe(!1)},onDrop:async U=>{U.preventDefault(),U.stopPropagation(),Pe(!1);const ke=U.dataTransfer.files[0];if(ke){if(!ke.type.startsWith("image/")){alert("Please upload an image file");return}rt(!0);try{const ze=await pe.integrations.Core.UploadFile({file:ke});j({...w,logo_url:ze.file_url})}catch(ze){console.error("Failed to upload logo:",ze),alert("Failed to upload logo")}rt(!1)}},children:n.jsxs("div",{className:"text-center",children:[n.jsx(x1,{className:`w-12 h-12 mx-auto mb-3 transition-colors ${Te?"text-accent-gold":"text-gray-400"}`}),n.jsx("p",{className:"text-sm text-gray-600 mb-1 font-medium",children:Te?"Drop logo here":"Drag & drop logo here"}),n.jsx("p",{className:"text-xs text-gray-500 mb-3",children:"or"}),n.jsx("label",{className:"cursor-pointer",children:n.jsx(me,{type:"button",variant:"outline",disabled:ue,onClick:()=>document.getElementById("sponsor-logo-file").click(),children:ue?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2"}),"Choose Logo"]})})}),n.jsx("input",{id:"sponsor-logo-file",type:"file",accept:"image/*",onChange:async U=>{const ke=U.target.files[0];if(ke){rt(!0);try{const ze=await pe.integrations.Core.UploadFile({file:ke});j({...w,logo_url:ze.file_url})}catch(ze){console.error("Failed to upload logo:",ze),alert("Failed to upload logo")}rt(!1),U.target.value=""}},className:"hidden"})]})}),w.logo_url&&n.jsx("div",{className:"mt-2 p-4 bg-gray-50 rounded-lg border",children:n.jsx("img",{src:w.logo_url,alt:"Logo preview",className:"h-20 mx-auto object-contain"})})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-website",children:"Website URL"}),n.jsx(Me,{id:"sponsor-website",value:w.website_url,onChange:U=>j({...w,website_url:U.target.value}),placeholder:"https://example.com"})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy border-b pb-2",children:"Description & Impact"}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-description",children:"Description"}),n.jsx(en,{id:"sponsor-description",value:w.description,onChange:U=>j({...w,description:U.target.value}),placeholder:"Brief description of the sponsor...",rows:3})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-mission",children:"Mission Statement"}),n.jsx(en,{id:"sponsor-mission",value:w.mission,onChange:U=>j({...w,mission:U.target.value}),placeholder:"Sponsor's mission statement...",rows:3})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-impact",children:"Impact & Contribution"}),n.jsx(en,{id:"sponsor-impact",value:w.impact,onChange:U=>j({...w,impact:U.target.value}),placeholder:"Their impact and contribution to the charity sector...",rows:3})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-primary-navy border-b pb-2",children:"Sponsored Categories"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Select the award categories this 
1763sponsor is supporting:"}),n.jsx("div",{className:"grid md:grid-cols-2 gap-3 max-h-60 overflow-y-auto p-4 bg-gray-50 rounded-lg",children:Qs.map(U=>{var ze;const ke=(ze=w.sponsored_categories)==null?void 0:ze.includes(U.title);return n.jsx("div",{onClick:()=>Ma(U.title),className:`p-3 rounded-lg border-2 cursor-pointer transition-all ${ke?"bg-green-50 border-green-500":"bg-white border-gray-200 hover:border-gray-300"}`,children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-5 h-5 rounded border-2 flex items-center justify-center ${ke?"bg-green-500 border-green-500":"border-gray-300"}`,children:ke&&n.jsx(Cn,{className:"w-4 h-4 text-white"})}),n.jsx("span",{className:`text-sm font-medium ${ke?"text-green-900":"text-gray-700"}`,children:U.title})]})},U.id)})}),n.jsxs("p",{className:"text-xs text-gray-500",children:[(($o=w.sponsored_categories)==null?void 0:$o.length)||0," categor",((Uo=w.sponsored_categories)==null?void 0:Uo.length)===1?"y":"ies"," selected"]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"sponsor-order",children:"Display Order"}),n.jsx(Me,{id:"sponsor-order",type:"number",value:w.display_order,onChange:U=>j({...w,display_order:parseInt(U.target.value)||0}),placeholder:"0"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Lower numbers appear first"})]})]}),n.jsxs("div",{className:"flex gap-3 mt-6",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{g(!1),x(null)},className:"flex-1",disabled:Wl.isPending||io.isPending,children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:Wl.isPending||io.isPending,children:Wl.isPending||io.isPending?"Saving...":y?"Update Sponsor":"Add Sponsor"})]})]})]})}),n.jsx(Nn,{open:F,onOpenChange:$,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(Cn,{className:"w-6 h-6 text-green-500"})," Completed Tasks"]}),n.jsx(_s,{children:"A list of all tasks that have been marked as completed."})]}),n.jsx("div",{className:"py-4",children:Jl.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Cn,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No completed tasks yet."})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Task Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Completed Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Assigned To"})]})}),n.jsx("tbody",{children:Jl.sort((U,ke)=>new Date(ke.updated_date||ke.created_date)-new Date(U.updated_date||U.created_date)).map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} hover:bg-green-50 cursor-pointer transition-colors border-b border-gray-100`,onClick:()=>gn(U),children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:U.title}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.updated_date&&U.updated_date!==""?yt(new Date(U.updated_date),"d MMMM yyyy"):"N/A"}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.assigned_to})]},U.id))})]})})})]})}),n.jsx(Nn,{open:G,onOpenChange:B,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(ob,{className:"w-6 h-6 text-gray-500"})," Not Started Tasks"]}),n.jsx(_s,{children:"Tasks that are yet to be commenced."})]}),n.jsx("div",{className:"py-4",children:Dr.filter(U=>U.status==="not_started").length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(ob,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:'No tasks are currently "Not Started".'})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Task Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Assigned To"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Priority"})]})}),n.jsx("tbody",{children:Dr.filter(U=>U.status==="not_started").sort((U,ke)=>new Date(U.due_date)-new Date(ke.due_date)).map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} hover:bg-gray-50 cursor-pointer transition-colors border-b border-gray-100`,onClick:()=>gn(U),children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:U.title}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.due_date?yt(new Date(U.due_date),"d MMMM yyyy"):"No date"}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.assigned_to}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:Ds[U.priority],children:U.priority})})]},U.id))})]})})})]})}),n.jsx(Nn,{open:Y,onOpenChange:ee,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(ka,{className:"w-6 h-6 text-orange-500"})," In Progress Tasks"]}),n.jsx(_s,{children:"Tasks that are currently being worked on."})]}),n.jsx("div",{className:"py-4",children:Dr.filter(U=>U.status==="in_progress").length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(ka,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:'No tasks are currently "In Progress".'})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Task Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Assigned To"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Progress"})]})}),n.jsx("tbody",{children:Dr.filter(U=>U.status==="in_progress").sort((U,ke)=>new Date(U.due_date)-new Date(ke.due_date)).map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} hover:bg-orange-50 cursor-pointer transition-colors border-b border-gray-100`,onClick:()=>gn(U),children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:U.title}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.due_date?yt(new Date(U.due_date),"d MMMM yyyy"):"No date"}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.assigned_to}),n.jsxs("td",{className:"py-3 px-4",children:[U.progress_percentage,"%"]})]},U.id))})]})})})]})}),n.jsx(Nn,{open:J,onOpenChange:H,children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(la,{className:"w-6 h-6 text-red-500"})," On Hold Tasks"]}),n.jsx(_s,{children:"Tasks that are temporarily paused."})]}),n.jsx("div",{className:"py-4",children:Dr.filter(U=>U.status==="on_hold").length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(la,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:'No tasks are currently "On Hold".'})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Task Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Assigned To"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Priority"})]})}),n.jsx("tbody",{children:Dr.filter(U=>U.status==="on_hold").sort((U,ke)=>new Date(U.due_date)-new Date(ke.due_date)).map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} hover:bg-red-50 cursor-pointer transition-colors border-b border-gray-100`,onClick:()=>gn(U),children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:U.title}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.due_date?yt(new Date(U.due_date),"d MMMM yyyy"):"No date"}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.assigned_to}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:Ds[U.priority],children:U.priority})})]},U.id))})]})})})]})}),n.jsx(Nn,{open:q,onOpenChange:K,children:n.jsxs(vn,{className:"max-w-xl",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(jm,{className:"w-6 h-6 text-blue-500"})," Press Releases"]}),n.jsx(_s,{children:"Manage official announcements and media communications."})]}),n.jsxs("div",{className:"py-4 text-center text-gray-600",children:[n.jsx(jm,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"This feature is currently under development."}),n.jsx("p",{className:"mt-2 text-sm",children:"Please check back later for press release management tools."})]}),n.jsx("div",{className:"flex justify-end pt-4",children:n.jsx(me,{onClick:()=>K(!1),children:"Close"})})]})}),n.jsx(Nn,{open:te,onOpenChange:re,children:n.jsxs(vn,{className:"max-w-6xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-green-500 flex items-center gap-2",children:[n.jsx(pr,{className:"w-6 h-6 text-green-500"})," News & Blog Articles"]}),n.jsx(_s,{children:"Create, edit, publish, and manage all news articles and blog posts."})]}),n.jsxs("div",{className:"py-4",children:[n.jsxs("div",{className:"flex justify-between items-center mb-6",children:[n.jsxs("div",{className:"flex gap-3 items-center",children:[n.jsxs(Qt,{value:$e,onValueChange:Ve,children:[n.jsx(Kt,{className:"w-[180px]",children:n.jsx(Xt,{placeholder:"Filter by status"})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Articles"}),n.jsx(Ae,{value:"published",children:"Published"}),n.jsx(Ae,{value:"scheduled",children:"Scheduled"}),n.jsx(Ae,{value:"draft",children:"Draft"})]})]}),n.jsxs("div",{className:"flex gap-1 border rounded-lg p-1",children:[n.jsx(me,{variant:be==="list"?"default":"ghost",size:"sm",onClick:()=>We("list"),className:be==="list"?"bg-primary-navy":"",children:"List"}),n.jsx(me,{variant:be==="cards"?"default":"ghost",size:"sm",onClick:()=>We("cards"),className:be==="cards"?"bg-primary-navy":"",children:"Cards"})]})]}),n.jsxs(me,{onClick:()=>
1763{je(null),Fe({title:"",content:"",excerpt:"",image_url:"",category:"general",published_date:"",is_featured:!1,is_published:!1,meta_title:"",meta_description:"",keywords:"",og_title:"",og_description:""}),ae(!0)},className:"bg-green-600 hover:bg-green-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create New Article"]})]}),Vl?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-4 border-green-500 border-t-transparent"})}):lo.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No articles found for the selected filter."})]}):be==="list"?n.jsx("div",{className:"border rounded-lg overflow-hidden bg-white",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700 w-12"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Title"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Published"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:lo.map((U,ke)=>{var ze;return n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} border-b border-gray-100 hover:bg-blue-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4",children:U.image_url&&n.jsx("img",{src:U.image_url,alt:U.title,className:"w-10 h-10 object-cover rounded"})}),n.jsxs("td",{className:"py-3 px-4",children:[n.jsx("div",{className:"font-semibold text-gray-900 line-clamp-1",children:U.title}),n.jsx("div",{className:"text-xs text-gray-500 line-clamp-1 mt-1",children:U.excerpt||((ze=U.content)==null?void 0:ze.replace(/<[^>]*>/g,"").substring(0,100))})]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{variant:"outline",className:"text-xs",children:U.category})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex flex-wrap gap-1",children:[Ms(U)==="draft"&&n.jsx(dt,{className:"bg-gray-400 text-white text-xs",children:"Draft"}),Ms(U)==="scheduled"&&n.jsx(dt,{className:"bg-blue-400 text-white text-xs",children:"Scheduled"}),Ms(U)==="published"&&n.jsx(dt,{className:"bg-green-500 text-white text-xs",children:"Published"}),U.is_featured&&n.jsx(dt,{className:"bg-yellow-500 text-white text-xs",children:"Featured"})]})}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:U.published_date&&U.published_date!==""?yt(new Date(U.published_date),"d MMM yyyy"):"-"}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex justify-end gap-1",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>
1763La(U),className:"hover:bg-blue-50",children:n.jsx(xa,{className:"w-4 h-4"})}),U.is_published?n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Io(U),className:"hover:bg-yellow-50",children:n.jsx(Ey,{className:"w-4 h-4"})}):n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Zs(U),className:"hover:bg-green-50",children:n.jsx(sd,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Os(U.id),className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},U.id)})})]})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:lo.map(U=>{var ke;return n.jsxs(_e,{className:"relative group hover:shadow-lg transition-all duration-300",children:[U.image_url&&n.jsx("div",{className:"h-40 overflow-hidden rounded-t-lg",children:n.jsx("img",{src:U.image_url,alt:U.title,className:"w-full h-full object-cover transition-transform group-hover:scale-105"})}),n.jsxs(Ce,{className:"p-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx(dt,{className:"bg-gray-200 text-gray-800",children:U.category}),n.jsxs("div",{className:"flex items-center gap-2",children:[Ms(U)==="draft"&&n.jsx(dt,{className:"bg-gray-400 text-white",children:"Draft"}),Ms(U)==="scheduled"&&n.jsx(dt,{className:"bg-blue-400 text-white",children:"Scheduled"}),Ms(U)==="published"&&n.jsx(dt,{className:"bg-green-500 text-white",children:"Published"}),U.is_featured&&n.jsx(dt,{className:"bg-yellow-500 text-white",children:"Featured"})]})]}),n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-2 line-clamp-2",children:U.title}),n.jsx("p",{className:"text-sm text-gray-600 line-clamp-3",children:U.excerpt||((ke=U.content)==null?void 0:ke.replace(/<[^>]*>/g,"").substring(0,150))}),n.jsx("p",{className:"text-xs text-gray-500 mt-2",children:U.published_date?`Published: ${yt(new Date(U.published_date),"d MMMM yyyy")}`:"Not published"}),n.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[n.jsx(me,{variant:"outline",size:"sm",onClick:ze=>{ze.stopPropagation(),La(U)}
1763,className:"hover:bg-blue-50",children:n.jsx(xa,{className:"w-4 h-4"})}),U.is_published?n.jsx(me,{variant:"outline",size:"sm",onClick:ze=>{ze.stopPropagation(),Io(U)},className:"hover:bg-yellow-50",children:n.jsx(Ey,{className:"w-4 h-4"})}):n.jsx(me,{variant:"outline",size:"sm",onClick:ze=>{ze.stopPropagation(),Zs(U)},className:"hover:bg-green-50",children:n.jsx(sd,{className:"w-4 h-4"})}),n.jsx(me,{variant:"outline",size:"sm",onClick:ze=>{ze.stopPropagation(),Os(U.id)},className:"text-red-600 border-red-300 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})]},U.id)})})]})]})}),n.jsx(Nn,{open:oe,onOpenChange:U=>{ae(U),U||(je(null),Fe({title:"",author:"",content:"",excerpt:"",image_url:"",image_caption:"",category:"general",published_date:"",is_featured:!1,is_published:!1,meta_title:"",meta_description:"",keywords:"",og_title:"",og_description:""}))},children:n.jsxs(vn,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:le?"Edit Article":"Create New Article"}),n.jsx(_s,{children:le?"Update an existing news article or blog post.":"Draft a new news article or blog post."})]}),n.jsxs("form",{onSubmit:oo,className:"py-4 space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-title",children:"Title *"}),n.jsx(Me,{id:"article-title",value:xe.title,onChange:U=>Fe({...xe,title:U.target.value}),placeholder:"Enter article title",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-author",children:"Author"}),n.jsx(Me,{id:"article-author",value:xe.author,onChange:U=>Fe({...xe,author:U.target.value}),placeholder:"Enter author name (optional)"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-excerpt",children:"Excerpt"}),n.jsx(en,{id:"article-excerpt",value:xe.excerpt,onChange:U=>Fe({...xe,excerpt:U.target.value}),placeholder:"A short summary of the article (optional)",rows:2})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-content",children:"Content *"}),n.jsx("style",{children:`
1764                .sticky-quill-toolbar .ql-toolbar {
1765                  position: sticky;
1766                  top: 0;
1767                  z-index: 10;
1768                  background: white;
1769                  border-bottom: 2px solid #e5e7eb !important;
1770                }
1771              `}),n.jsx("div",{className:"border rounded-lg overflow-hidden mt-2 sticky-quill-toolbar",children:n.jsx(sx,{value:xe.content,onChange:U=>Fe({...xe,content:U}),modules:{toolbar:[[{header:[1,2,3,4,5,6,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["blockquote","code-block"],["link","image","video"],["clean"]],clipboard:{matchVisual:!1}},placeholder:"Write the full article content here...",theme:"snow",style:{minHeight:"300px"}})})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-image",children:"Featured Image URL"}),n.jsx(Me,{id:"article-image-url",value:xe.image_url,onChange:U=>Fe({...xe,image_url:U.target.value}),placeholder:"Direct URL to image (e.g., https://example.com/image.jpg)",className:"mb-2"}),n.jsx("input",{id:"article-image-upload",type:"file",accept:"image/*",onChange:mu,className:`block w-full text-sm text-gray-500
1772                  file:mr-4 file:py-2 file:px-4
1773                  file:rounded-full file:border-0
1774                  file:text-sm file:font-semibold
1775                  file:bg-blue-50 file:text-blue-700
1776                  hover:file:bg-blue-100`,disabled:he}),he&&n.jsxs("p",{className:"text-sm text-gray-500 mt-2 flex items-center",children:[n.jsx(x1,{className:"w-4 h-4 mr-1 animate-pulse"})," Uploading image..."]}),xe.image_url&&n.jsx("div",{className:"mt-4 border rounded-lg p-2 bg-gray-50 flex items-center justify-center",children:n.jsx("img",{src:xe.image_url,alt:"Article preview",className:"max-h-48 object-contain"})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(ye,{htmlFor:"article-image-caption",children:"Image Caption"}),n.jsx(Me,{id:"article-image-caption",value:xe.image_caption,onChange:U=>Fe({...xe,image_caption:U.target.value}),placeholder:"Description to display under the featured image"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Optional caption shown below the featured image on the article page"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"article-category",children:"Category"}),n.jsxs(Qt,{value:xe.category,onValueChange:U=>Fe({...xe,category:U}),children:[n.jsx(Kt,{id:"article-category",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"News and Updates",children:"News and Updates"}),n.jsx(Ae,{value:"Guidance and How To Content",children:"Guidance and How To Content"}),n.jsx(Ae,{value:"Sponsorship and Partner Focus",children:"Sponsorship and Partner Focus"}),n.jsx(Ae,{value:"Impact and Legacy Stories",children:"Impact and Legacy Stories"}),n.jsx(Ae,{value:"Behind the Scenes",children:"Behind the Scenes"}),n.jsx(Ae,{value:"Event and Awards Day Content",children:"Event and Awards Day Content"}),n.jsx(Ae,{value:"Strategic Thought Leadership",children:"Strategic Thought Leadership"})]})]})]}),n.jsxs("div",{className:"border-2 border-blue-200 rounded-lg p-6 bg-gradient-to-r from-blue-50 to-purple-50",children:[n.jsxs("h3",{className:"text-lg font-bold text-primary-navy mb-4 flex items-center gap-2",children:[n.jsx(la,{className:"w-5 h-5 text-blue-600"}),"Publishing Options"]}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"Control when and how this article appears on the website"}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"bg-white rounded-lg p-4 border-2 border-gray-200",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:"is-published",checked:xe.is_published,onCheckedChange:U=>Fe({...xe,is_published:U}),className:"mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx(ye,{htmlFor:"is-published",className:"text-base font-semibold cursor-pointer",children:xe.is_published?"✅ Published":"Publish"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:xe.is_published?"Article is visible on the News page. Uncheck to save as draft.":"Article is saved but not visible to public. Check to publish."})]})]})}),xe.is_published&&n.jsxs("div",{className:"bg-white rounded-lg p-4 border-2 border-blue-200",children:[n.jsx(ye,{htmlFor:"article-published-date",className:"text-base font-semibold mb-2 block",children:"📅 Scheduled Publication Date"}),n.jsx(Me,{id:"article-published-date",type:"date",value:xe.published_date,onChange:U=>Fe({...xe,published_date:U.target.value}),className:"mb-2"}),n.jsx("p",{className:"text-sm text-gray-600",children:xe.published_date?new Date(xe.published_date)>new Date?n.jsxs("span",{className:"text-blue-600 font-semibold",children:["⏰ Scheduled for: ",yt(new Date(xe.published_date),"d MMMM yyyy")," (Future)"]}):n.jsxs("span",{className:"text-green-600 font-semibold",children:["✓ Published on: ",yt(new Date(xe.published_date),"d MMMM yyyy")]}):"Leave blank to publish immediately, or set a future date to schedule"})]}),n.jsx("div",{className:"bg-white rounded-lg p-4 border-2 border-gray-200",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:"is-featured",checked:xe.is_featured,onCheckedChange:U=>Fe({...xe,is_featured:U}),className:"mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx(ye,{htmlFor:"is-featured",className:"text-base font-semibold cursor-pointer",children:"⭐ Feature on Homepage"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Featured articles appear prominently on the homepage"})]})]})})]}),n.jsx("div",{className:"mt-4 p-4 bg-gray-900 rounded-lg text-white",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"font-semibold",children:"Current Status:"}),xe.is_published?xe.published_date&&new Date(xe.published_date)>new Date?n.jsxs(dt,{className:"bg-blue-500 text-white",children:["⏰ Scheduled for ",yt(new Date(xe.published_date),"d MMM yyyy")]}):n.jsx(dt,{className:"bg-green-500 text-white",children:"✅ Published & Live"}):n.jsx(dt,{className:"bg-gray-500 text-white",children:"📝 Draft (Not Visible)"}),xe.is_featured&&n.jsx(dt,{className:"bg-yellow-500 text-white",children:"⭐ Featured"})]})})]}),n.jsxs("div",{className:"border-t pt-6 space-y-4",children:[n.jsxs("h3",{className:"text-lg font-semibold text-primary-navy flex items-center gap-2",children:[n.jsx(y1,{className:"w-5 h-5 text-indigo-600"}),"SEO Optimization"]}),n.jsx("p",{className:"text-sm text-gray-600",children:"Configure SEO metadata to improve search rankings and s
1776ocial media sharing."}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"meta-title",children:"Meta Title"}),n.jsx(Me,{id:"meta-title",value:xe.meta_title,onChange:U=>Fe({...xe,meta_title:U.target.value}),placeholder:"Leave blank to use article title (50-60 characters recommended)",maxLength:60}),n.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[xe.meta_title.length,"/60 characters"]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"meta-description",children:"Meta Description"}),n.jsx(en,{id:"meta-description",value:xe.meta_description,onChange:U=>Fe({...xe,meta_description:U.target.value}),placeholder:"Leave blank to use article excerpt (150-160 characters recommended)",rows:2,maxLength:160}),n.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[xe.meta_description.length,"/160 characters"]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"keywords",children:"Keywords (comma-separated)"}),n.jsx(Me,{id:"keywords",value:xe.keywords,onChange:U=>Fe({...xe,keywords:U.target.value}),placeholder:"e.g., charity awards, UK charities, nonprofit excellence"})]}),n.jsxs("div",{className:"border-t pt-4",children:[n.jsx("h4",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Social Media (Open Graph)"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"og-title",children:"Social Share Title"}),n.jsx(Me,{id:"og-title",value:xe.og_title,onChange:U=>Fe({...xe,og_title:U.target.value}),placeholder:"Leave blank to use article title"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"og-description",children:"Social Share Description"}),n.jsx(en,{id:"og-description",value:xe.og_description,onChange:U=>Fe({...xe,og_description:U.target.value}),placeholder:"Leave blank to use article excerpt",rows:2})]})]})]})]}),n.jsxs("div",{className:"flex gap-3 mt-6",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>ae(!1),className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",className:"flex-1 bg-green-600 hover:bg-green-700 text-white font-bold",disabled:he,children:he?"Uploading Image...":le?"Update Article":"Create Article"})]})]})]})}),n.jsx(Nn,{open:Q,onOpenChange:ne,children:n.jsxs(vn,{className:"max-w-6xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx(Xr,{className:"w-6 h-6 text-orange-500"})," Website Contact Form Submissions"]}),n.jsx(_s,{children:"Messages submitted through the website contact form"})]}),n.jsx("div",{className:"py-4",children:Js.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Xr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No contact form submissions yet."})]}):n.jsx("div",{className:"space-y-4",children:Js.map(U=>n.jsx(_e,{className:"border-2 border-gray-200 hover:border-orange-300 transition-all",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start justify-between mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("h3",{className:"text-lg font-bold text-gray-900",children:U.subject}),n.jsx(dt,{className:U.status==="new"?"bg-green-500 text-white":U.status==="read"?"bg-blue-500 text-white":U.status==="responded"?"bg-purple-500 text-white":"bg-gray-500 text-white",children:U.status||"new"})]}),n.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600",children:[n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Hd,{className:"w-4 h-4"}),U.name]}),n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(Xr,{className:"w-4 h-4"}),n.jsx("a",{href:`mailto:${U.email}`,className:"text-primary-navy hover:underline",children:U.email})]}),U.phone&&n.jsxs("div",{className:"flex items-center gap-1",children:["📞 ",U.phone]})]})]}),n.jsx("div",{className:"text-right text-sm text-gray-500",children:U.submitted_date?yt(new Date(U.submitted_date),"d MMM yyyy, HH:mm"):yt(new Date(U.created_date),"d MMM yyyy, HH:mm")})]}),n.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-4",children:n.jsx("p",{className:"text-gray-700 whitespace-pre-wrap",children:U.message})}),U.admin_notes&&n.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4",children:[n.jsx("div",{className:"text-xs font-semibold text-amber-900 mb
1776-1",children:"Admin Notes:"}),n.jsx("p",{className:"text-sm text-amber-800",children:U.admin_notes})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Qt,{value:U.status||"new",onValueChange:async ke=>{await pe.entities.Contact.update(U.id,{status:ke}),fn.invalidateQueries({queryKey:["contactSubmissions"]})},children:[n.jsx(Kt,{className:"w-40",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"new",children:"New"}),n.jsx(Ae,{value:"read",children:"Read"}),n.jsx(Ae,{value:"responded",children:"Responded"}),n.jsx(Ae,{value:"resolved",children:"Resolved"})]})]}),n.jsxs(me,{variant:"outline",size:"sm",onClick:async()=>{const ke=prompt("Add admin notes for this submission:",U.admin_notes||"");ke!==null&&(await pe.entities.Contact.update(U.id,{admin_notes:ke}),fn.invalidateQueries({queryKey:["contactSubmissions"]}))},children:[n.jsx(xa,{className:"w-4 h-4 mr-1"}),"Add Note"]}),n.jsx(me,{variant:"ghost",size:"sm",onClick:async()=>{window.confirm("Delete this submission?")&&(await pe.entities.Contact.delete(U.id),fn.invalidateQueries({queryKey:["contactSubmissions"]}))},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})},U.id))})}),n.jsx("div",{className:"flex justify-end pt-4",children:n.jsx(me,{onClick:()=>ne(!1),children:"Close"})})]})}),n.jsx(Nn,{open:N,onOpenChange:_,children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-primary-navy flex items-center gap-2",children:[n.jsx($h,{className:"w-6 h-6 text-blue-500"}),S?`${S}'s Notes`:"Team Notes"]}),n.jsx(_s,{children:"Private notes for internal team communication."})]}),n.jsxs(nl,{defaultValue:S||"Jaime",className:"w-full",children:[n.jsxs(wo,{className:"grid w-full grid-cols-2",children:[n.jsx(ln,{value:"Jaime",onClick:()=>A("Jaime"),children:"Jaime's Notes"}),n.jsx(ln,{value:"Lee",onClick:()=>A("Lee"),children:"Lee's Notes"})]}),n.jsxs(cn,{value:"Jaime",className:"mt-4",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-2",children:"Notes for Jaime"}),n.jsx(en,{value:T.Jaime,onChange:U=>rs(U.target.value),placeholder:"Write notes for Jaime here...",rows:6,className:"w-full"}),n.jsx("div",{className:"flex justify-between items-center mt-2",children:n.jsxs("span",{className:"text-sm text-gray-50",children:["Notes auto-saved ",Lo.isPending&&S==="Jaime"?" (Saving...)":""]})})]}),n.jsxs(cn,{value:"Lee",className:"mt-4",children:[n.jsx("h3",{className:"text-lg font-bold text-primary-navy mb-2",children:"Notes for Lee"}),n.jsx(en,{value:T.Lee,onChange:U=>rs(U.target.value),placeholder:"Write notes for Lee here...",rows:6,className:"w-full"}),n.jsx("div",{className:"flex justify-between items-center mt-2",children:n.jsxs("span",{className:"text-sm text-gray-500",children:["Notes auto-saved ",Lo.isPending&&S==="Lee"?" (Saving...)":""]})})]})]}),n.jsx("div",{className:"flex justify-end pt-4",children:n.jsx(me,{onClick:()=>_(!1),variant:"outline",children:"Close Notes"})})]})}),n.jsx(Nn,{open:P,onOpenChange:O,children:n.jsxs(vn,{className:"max-w-md",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-red-700 flex items-center gap-2",children:[n.jsx(Mr,{className:"w-6 h-6 text-red-500"})," Confirm System Reset"]}),n.jsx(_s,{className:"text-red-600 font-medium",children:"This action cannot be undone. Are you absolutely sure you want to reset the entire system? This will clear all tasks (reset to 'not_started'), delete all table bookings, and clear all table purchase orders."})]}),n.jsxs("div",{className:"flex flex-col gap-4 py-4",children:[n.jsx("p",{className:"text-gray-700 text-sm",children:'Please type "RESET SYSTEM" below to confirm.'}),n.jsx(Me,{type:"text",placeholder:"Type 'RESET SYSTEM' to confirm",className:"border-red-300 focus:border-red-500 focus:ring-red-500",onChange:U=>k(U.target.value),value:M})]}),n.jsxs("div",{className:"flex gap-3 justify-end mt-4",children:[n.jsx(me,{variant:"outline",onClick:()=>O(!1),disabled:ot.isPending,children:"Cancel"}),n.jsx(me,{onClick:()=>{M==="RESET SYSTEM"?(ot.mutate(),k("")):alert("Incorrect confirmation text. Please type 'RESET SYSTEM' exactly.")},className:"bg-red-600 hover:bg-red-700 text-white",disabled:ot.isPending||M!=="RESET SYSTEM",children:ot.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Resetting..."]}):"Confirm Reset"})]})]})}),n.jsx(Nn,{open:on,onOpenChange:U=>{It(U),U||(xr(null),fl())},children:n.jsxs(vn,{className:"max-w-7xl max-h-[90vh] overflow-y-auto",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-purple-600 flex items-center gap-2",children:[n.jsx(Jh,{className:"w-6 h-6"}
1776),"Social Media Planning"]}),n.jsx(_s,{children:"Plan, schedule, and manage your social media posts across various platforms."})]}),n.jsxs(nl,{defaultValue:"posts",className:"mt-4",children:[n.jsxs(wo,{children:[n.jsx(ln,{value:"posts",children:"All Posts"}),n.jsx(ln,{value:"create",children:"Create New Post"})]}),n.jsxs(cn,{value:"posts",className:"space-y-4 mt-4",children:[n.jsx("div",{className:"flex items-center justify-between mb-4",children:n.jsxs("div",{className:"text-sm text-gray-600",children:[Li.length," post",Li.length!==1?"s":""]})}),Li.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Jh,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),n.jsx("p",{children:"No social media posts yet. Create your first post!"})]}):n.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:Li.map(U=>{var ke;return n.jsxs(_e,{className:"hover:shadow-lg transition-shadow",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(dt,{className:Bo[U.status],children:U.status.replace("_"," ")}),U.scheduled_date_time&&n.jsxs("p",{className:"text-sm text-gray-600 mt-2 flex items-center gap-1",children:[n.jsx(la,{className:"w-4 h-4"}),U.scheduled_date_time?yt(new Date(U.scheduled_date_time),"d MMMM yyyy h:mm a"):"Not scheduled"]})]}),n.jsxs("div",{className:"flex gap-1",children:[n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>{var ze;Sc(U),(ze=document.querySelector('button[data-state="inactive"][value="create"]'))==null||ze.click()}
1776,children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>fa(U.id),className:"text-red-600 hover:text-red-700",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})}),n.jsxs(Ce,{children:[n.jsx("p",{className:"text-gray-700 mb-4 line-clamp-3",children:U.post_content}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:(ke=U.platforms)==null?void 0:ke.map(ze=>{const wt=Cc(ze);return n.jsxs(dt,{variant:"outline",className:"flex items-center gap-1",children:[n.jsx(wt,{className:"w-3 h-3"}),ze]},ze)})}),U.hashtags&&n.jsx("p",{className:"text-sm text-blue-600 mb-2",children:U.hashtags}),U.post_type&&n.jsx(dt,{variant:"secondary",className:"text-xs",children:U.post_type.replace("_"," ")})]})]},U.id)})})]}),n.jsx(cn,{value:"create",className:"mt-4",children:n.jsxs("form",{onSubmit:vd,className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Post Content *"}),n.jsx(en,{value:xn.post_content,onChange:U=>Rr(ke=>({...ke,post_content:U.target.value})),placeholder:"What would you like to share?",className:"min-h-[120px]",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Platforms *"}),n.jsx("div",{className:"grid grid-cols-2 gap-3",children:["Facebook","Twitter","LinkedIn","Instagram","YouTube"].map(U=>{var ze;const ke=Cc(U);return n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:`platform-${U}`,checked:((ze=xn.platforms)==null?void 0:ze.includes(U))||!1,onCheckedChange:()=>bd(U)}),n.jsxs("label",{htmlFor:`platform-${U}`,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(ke,{className:"w-4 h-4"}),U]})]},U)})})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Scheduled Date & Time *"}),n.jsx(Me,{type:"datetime-local",value:xn.scheduled_date_time,onChange:U=>Rr(ke=>({...ke,scheduled_date_time:U.target.value})),required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Status"}),n.jsxs(Qt,{value:xn.status,onValueChange:U=>Rr(ke=>({...ke,status:U})),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"draft",children:"Draft"}),n.jsx(Ae,{value:"scheduled",children:"Scheduled"}),n.jsx(Ae,{value:"posted",children:"Posted"}),n.jsx(Ae,{value:"cancelled",children:"Cancelled"})]})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Post Type"}),n.jsxs(Qt,{value:xn.post_type,onValueChange:U=>Rr(ke=>({...ke,post_type:U})),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"announcement",children:"Announcement"}),n.jsx(Ae,{value:"nomination_reminder",children:"Nomination Reminder"}),n.jsx(Ae,{value:"winner_reveal",children:"Winner Reveal"}),n.jsx(Ae,{value:"event_update",children:"Event Update"}),n.jsx(Ae,{value:"sponsor_highlight",children:"Sponsor Highlight"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Hashtags"}),n.jsx(Me,{value:xn.hashtags,onChange:U=>Rr(ke=>({...ke,hashtags:U.target.value})),placeholder:"#CharityAwards #NCTA2025"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Image URL"}),n.jsx(Me,{value:xn.image_url,onChange:U=>Rr(ke=>({...ke,image_url:U.target.value})),placeholder:"https://example.com/image.jpg"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Internal Notes"}),n.jsx(en,{value:xn.notes,onChange:U=>Rr(ke=>({...ke,notes:U.target.value})),placeholder:"Any internal notes about this post..."})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{It(!1),xr(null),fl()},className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",disabled:Kl.isPending||yd.isPending||!xn.platforms||xn.platforms.length===0,className:"flex-1 bg-purple-600 hover:bg-purple-700 text-white font-bold",children:Kl.isPending||yd.isPending?"Saving...":_t?"Update Post":"Create Post"})]})]})})]})]})}),n.jsx(C6e,{open:cr,onOpenChange:Dt,nominations:Hr,selectedStatusFilter:va,nominationSortBy:ra,setNominationSortBy:ks,nominationSortOrder:ua,setNominationSortOrder:Ps,getSortedNominations:ss,onView:U=>{St(U),yr(!0)},onSendReminder:vs,sendingReminder:Il,blockClose:hn,onDeleteNominations:async U=>{await Promise.all(U.map(ke=>pe.entities.Nomination.delete(ke))),fn.invalidateQueries({queryKey:["nominations"]})}}),n.jsx(Nn,{open:Wt,onOpenChange:ys,children:n.jsxs(vn,{className:"max-w-md",children:[n.jsxs(_n,{children:[n.jsxs(Sn,{className:"text-2xl font-bold text-amber-700 flex items-center gap-2",children:[n.jsx(Mr,{className:"w-6 h-6 text-amber-500"})," Confirm Status Change"]}),n.jsx(_s,{className:"text-gray-700 font-medium",children:"Please confirm you want to change this nomination's status. This action will trigger an automated email to the nominator."})]}),Fa&&n.jsxs("div",{className:"py-4 space-y-4",children:[n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 border border-gray-200",children:[n.jsx("div",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Status Change:"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(dt,{className:"bg-orange-500 text-white",children:Fa.oldStatus.replace("_"," ").toUpperCase()}),n.jsx("span",{className:"text-gray-400",children:"→"}),n.jsx(dt,{className:Fa.newStatus==="finalist"?"bg-purple-500 text-white":Fa.newStatus==="shortlisted"?"bg-blue-500 text-white":Fa.newStatus==="under_review"?"bg-orange-500 text-white":"bg-gray-500 text-white",children:Fa.newStatus.replace("_"," ").toUpperCase()})]})]}),n.jsx("div",{className:"bg-blue-50 rounded-lg p-4 border border-blue-200",children:n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Xr,{className:"w-5 h-5 text-blue-600 flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm text-blue-800",children:[n.jsx("p",{className:"font-semibold mb-1",children:"Email Notification Will Be Sent"}),n.jsx("p",{children:"The nominator will receive an automated email informing them of this status change."})]})]})})]}),n.jsxs("div",{className:"flex gap-3 justify-end mt-4",children:[n.jsx(me,{variant:"outline",onClick:()=>{ys(!1),mi(null)},disabled:Ee.isPending,children:"Cancel"}),n.jsx(me,{onClick:()=>{Ee.mutate({id:Fa.nominationId,data:{status:Fa.newStatus}}),ys(!1),mi(null)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold",disabled:Ee.isPending,children:Ee.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-primary-navy border-t-transparent mr-2"}
1776),"Updating..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Cn,{className:"w-4 h-4 mr-2"}),"Confirm Change"]})})]})]})}),n.jsx(P6e,{open:hn,onOpenChange:U=>{yr(U),U?Kn&&!Kn.admin_viewed&&(pe.entities.Nomination.update(Kn.id,{admin_viewed:!0}),fn.invalidateQueries({queryKey:["nominations"]})):(da(""),Ye(!1))},selectedNomination:Kn,nominationStatusUpdate:Gn,setNominationStatusUpdate:da,editingNomination:xs,setEditingNomination:Ye,nominationFormData:nt,setNominationFormData:Vr,categories:Qs,updateNominationMutation:Ee,setPendingStatusChange:mi,setShowStatusConfirmDialog:ys,scoringNomination:ro,generateQualityScore:Pc}),n.jsx("section",{className:"py-8",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(nl,{defaultValue:"dashboard",className:"space-y-6",children:[n.jsx("style",{children:`
1777              .admin-tabs [role="tab"][data-state="active"] {
1778                background-color: #06053e !important;
1779                color: white !important;
1780              }
1781            `}),n.jsxs(wo,{className:"admin-tabs bg-white shadow-lg flex-wrap h-auto p-2 gap-1 rounded-xl border-2 border-gray-200",children:[n.jsx(ln,{value:"dashboard",children:"Dashboard"}),n.jsx(ln,{value:"finance",children:"Finance"}),n.jsx(ln,{value:"calendar",children:"Calendar"}),n.jsx(ln,{value:"tasks",children:"Tasks"}),n.jsxs(ln,{value:"nominations",children:["Nominations",Hr.filter(U=>U.status==="under_review").length>0&&n.jsx(dt,{className:"ml-2 bg-red-500 text-white",children:Hr.filter(U=>U.status==="under_review").length})]}),n.jsx(ln,{value:"sales",children:"Tickets"}),n.jsx(ln,{value:"attendance",children:"Attendance"}),n.jsx(ln,{value:"sponsors",children:"Sponsors"}),n.jsx(ln,{value:"contacts",children:"Contacts"}),n.jsx(ln,{value:"peopleschoice",children:"People's Choice"}),n.jsx(ln,{value:"content",children:"Website Content"}),n.jsxs(ln,{value:"communications",children:["Marketing & Communications",Js.length>0&&n.jsx(dt,{className:"ml-2 bg-orange-500 text-white",children:Js.length})]}),n.jsx(ln,{value:"analytics",children:"Analytics"}),n.jsx(ln,{value:"seo",children:"SEO"}),n.jsx(ln,{value:"risk",children:"Risk & Compliance"}),n.jsx(ln,{value:"settings",children:"Settings"})]}),n.jsx(cn,{value:"dashboard",children:n.jsx(F3e,{tasks:Dr,nominations:Hr,tableBookings:wa,sponsors:ts,categories:Qs,socialPosts:Li,newsArticles:pi})}),n.jsx(cn,{value:"finance",children:n.jsx(NY,{})}),n.jsx(cn,{value:"calendar",children:n.jsx(tY,{})}),n.jsx(cn,{value:"tasks",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(ob,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Task Management"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Organize team workload and track progress across all Awards operations"})]})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"All Tasks"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs(me,{onClick:vt,variant:"outline",className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold",children:[n.jsx(Tl,{className:"w-4 h-4 mr-2"}),"Download Task List"]}),n.jsxs(me,{onClick:()=>{u(null),d(!0)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create New Task"]})]})]}),n.jsxs("div",{className:"hidden md:grid grid-cols-2 md:grid-cols-4 gap-6",children:[n.jsx(_e,{className:"cursor-pointer hover:shadow-lg transition-all duration-300 border-2 border-gray-200 bg-white",onClick:()=>B(!0),children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold text-gray-900 mb-3",children:ei.not_started}),n.jsx("div",{className:"text-sm font-semibold text-gray-600",children:"Not Started"})]})}),n.jsx(_e,{className:"cursor-pointer hover:shadow-lg transition-all duration-300 border-2 border-orange-200 bg-gradient-to-br from-orange-50 to-white",onClick:()=>ee(!0),children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold text-orange-600 mb-3",children:ei.in_progress}),n.jsx("div",{className:"text-sm font-semibold text-orange-700",children:"In Progress"})]})}),n.jsx(_e,{className:"cursor-pointer hover:shadow-lg transition-all duration-300 border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",onClick:()=>$(!0),children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold text-green-600 mb-3",children:ei.completed}),n.jsx("div",{className:"text-sm font-semibold text-green-700 mb-2",children:"Completed"}),n.jsx("div",{className:"text-xs font-semibold text-green-800 bg-green-100 px-3 py-1.5 rounded-full inline-block",children:Dr.length>0?`${Math.round(ei.completed/Dr.length*100)}% Complete`:"0% Complete"})]})}),n.jsx(_e,{className:"cursor-pointer hover:shadow-lg transition-all duration-300 border-2 border-red-200 bg-gradient-to-br from-red-50 to-white",onClick:()=>H(!0),children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold text-red-600 mb-3",children:ei.on_hold}),n.jsx("div",{className:"text-sm font-semibold text-red-700",children:"On Hold"})]})})]}),n.jsx(_e,{className:"bg-white border-none shadow-md",children:n.jsx(Ce,{className:"p-4",children:n.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700",children:"Sort by:"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(Qt,{value:dr,onValueChange:jr,children:[n.jsx(Kt,{className:"w-40",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"due_date",children:"Due Date"}),n.jsx(Ae,{value:"priority",children:"Priority"}),n.jsx(Ae,{value:"status",children:"Status"})]})]}),n.jsxs(Qt,{value:Yn,onValueChange:Ta,children:[n.jsx(Kt,{className:"w-36",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"asc",children:"Ascending"}),n.jsx(Ae,{value:"desc",children:"Descending"})]})]})]})]})})}),n.jsx("div",{className:"border rounded-lg overflow-hidden mt-6",children:Xl.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(ob,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No active tasks."})]}):n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700 w-12"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Task Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Due Date"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Priority"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:Ec(Xl).map((U,ke)=>{const ze=new Date(U.due_date)<new Date&&U.status!=="completed";return n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} hover:bg-blue-50 transition-colors border-b border-gray-100`,children:[n.jsx("td",{className:"py-3 px-4",onClick:wt=>wt.stopPropagation(),children:n.jsx(Zr,{checked:U.status==="completed",onCheckedChange:wt=>{Ri.mutate({id:U.id,taskData:{...U,status:wt?"completed":"in_progress",progress_percentage:wt?100:U.progress_percentage}})},className:"w-5 h-5"})}),n.jsx("td",{className:"py-3 px-4 cursor-pointer",onClick:()=>gn(U),children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:`font-medium ${U.status==="completed"?"line-through text-gray-500":"text-gray-900"}`,children:U.title}),U.is_recurring&&n.jsxs(dt,{variant:"outline",className:"text-xs bg-blue-50 text-blue-700 border-blue-300",children:["🔄 ",U.recurrence_pattern]}),ze&&U.status!=="completed"&&n.jsx(dt,{className:"bg-red-600 text-white font-bold",children:"Overdue!"})]})}),n.jsx("td",{className:"py-3 px-4 text-gray-600 cursor-pointer",onClick:()=>gn(U),children:U.due_date?yt(new Date(U.due_date),"d MMMM yyyy"):"No date"}),n.jsx("td",{className:"py-3 px-4 cursor-pointer",onClick:()=>gn(U),children:n.jsx(dt,{className:Ds[U.priority],children:U.priority})}),n.jsx("td",{className:"py-3 px-4 cursor-pointer",onClick:()=>gn(U),children:n.jsx(dt,{className:gl[U.status],children:U.status.replace("_"," ")})}),n.jsx("td",{className:"py-3 px-4 text-right",children:n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{window.confirm(`Are you sure you want to delete "${U.title}"?`)&&_c.mutate(U.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})})]},U.id)})})]})})]})}),n.jsx(cn,{value:"nominations",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(bn,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Nominations Management"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Review submissions, update statuses, and manage the nomination pipeline"})]})]}),n.jsxs(nl,{defaultValue:"submissions",className:"space-y-6",children:[n.jsxs(wo,{className:"bg-white shadow-md",children:[n.jsx(ln,{value:"submissions",children:"Submissions"}),n.jsx(ln,{value:"confirmation-page",children:"Confirmation Page"})]}),n.jsx(cn,{value:"submissions",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:"All Nominations"}),n.jsxs("div",{className:"flex items-center gap-4",children:[$n.length>0&&n.jsxs(me,{onClick:()=>{window.confirm(`Are you sure you want to delete ${$n.length} selected nomination${$n.length!==1?"s":""}? This action cannot be undone.`)&&Promise.all($n.map(U=>pe.entities.Nomination.delete(U))).then(()=>{fn.invalidateQueries({queryKey:["nominations"]}),Ue([]),alert(`✓ Deleted ${$n.length} nomination${$n.length!==1?"s":""} successfully`)}).catch(U=>{alert(`Failed to delete nominations: ${U.message}`)})},className:"bg-red-600 hover:bg-red-700 text-white font-semibold",children:[n.jsx(tr,{className:"w-4 h-4 mr-2"}),"Delete Selected (",$n.length,")"]}),n.jsx(me,{onClick:pl,disabled:aa||Hr.length===0,className:"bg-indigo-600 hover:bg-indigo-700 text-white font-semibold",children:aa?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Re-scoring... (",Hr.length," nominations)"]}):n.jsxs(n.Fragment,{children:[n.jsx(Gy,{className:"w-4 h-4 mr-2"}),"Regenerate All Nominations"]})}),n.jsxs("div",{className:"text-sm text-gray-600",children:[Hr.length," total nomination",Hr.length!==1?"s":""]})]})]}),ur&&n.jsx("div",{className:`rounded-lg p-6 border-2 ${ur.success?"bg-green-50 border-green-300":"bg-red-50 border-red-300"}`,children:n.jsxs("div",{className:"flex items-start gap-3",children:[ur.success?n.jsx(Cn,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-0.5"}):n.jsx(Mr,{className:"w-6 h-6 text-red-600 flex-shrink-0 mt-0.5"}),n.jsx("div",{className:"flex-1",children:ur.success?n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"font-bold text-green-900 text-lg",children:ur.message}),n.jsxs("div",{className:"text-sm text-green-800",children:[n.jsxs("div",{children:["✓ Processed: ",((xl=ur.results)==null?void 0:xl.processed)||0]}),((Wa=ur.results)==null?void 0:Wa.failed)>0&&n.jsxs("div",{className:"text-amber-700",children:["⚠ Failed: ",ur.results.failed]})]})]}):n.jsxs("div",{className:"font-bold text-red-900",children:["Error: ",ur.error]})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>fi(null),className:"flex-shrink-0",children:n.jsx(Ei,{className:"w-4 h-4"})})]})}),n.jsxs("div",{className:"bg-white rounded-lg p-6 shadow-md border border-gray-200 flex items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-10 h-10 bg-purple-600 rounded-full flex items-center justify-center flex-shrink-0",children:n.jsx(bn,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-gray-900",children:"Visitor Popup Notification"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Show a professional popup to all visitors announcing that nominations are open. The popup appears once per browser and can be customized in the Data section."})]})]}),n.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cs,{checked:(Oa==null?void 0:Oa.is_enabled)||!1,onCheckedChange:z}),n.jsxs("span",{className:"text-sm font-semibold text-gray-800",children:["Popup is ",Oa!=null&&Oa.is_enabled?"ENABLED":"DISABLED"]})]}),n.jsx(me,{onClick:ie,variant:"outline",size:"sm",className:"border-purple-300 text-purple-700 hover:bg-purple-50",children:ql?n.jsxs(n.Fragment,{children:[n.jsx(Cn,{className:"w-4 h-4 mr-2"}),"Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsx(pr,{className:"w-4 h-4 mr-2"}),"Copy HTML for WordPress"]})})]})]}),n.jsx(T6e,{}
1781),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4",children:[n.jsx(_e,{className:"bg-white border-2 border-gray-200 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>{ar("all"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-gray-900 mb-2",children:Un.total}),n.jsx("div",{className:"text-xs font-semibold text-gray-600",children:"Total"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-orange-50 to-white border-2 border-orange-200 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>{ar("under_review"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-600 mb-2",children:Un.under_review}),n.jsx("div",{className:"text-xs font-semibold text-orange-700",children:"Under Review"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-blue-50 to-white border-2 border-blue-200 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>{ar("shortlisted"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-2",children:Un.shortlisted}),n.jsx("div",{className:"text-xs font-semibold text-blue-700",children:"Shortlisted"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-purple-50 to-white border-2 border-purple-200 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>{ar("finalist"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-purple-600 mb-2",children:Un.finalist}),n.jsx("div",{className:"text-xs font-semibold text-purple-700",children:"Finalists"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-gray-50 to-white border-2 border-gray-200 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>{ar("declined"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-gray-600 mb-2",children:Un.declined}),n.jsx("div",{className:"text-xs font-semibold text-gray-700",children:"Declined"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-red-50 to-white border-2 border-red-300 cursor-pointer hover:shadow-lg transition-all hover:scale-105",onClick:()=>
1781{ar("pending_deletion"),Dt(!0)},children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-700 mb-2",children:Un.pending_deletion}),n.jsx("div",{className:"text-xs font-semibold text-red-700",children:"Pending Deletion"})]})})]}),n.jsx(_e,{className:"bg-white border-none shadow-lg",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex flex-wrap items-end gap-6",children:[n.jsxs("div",{className:"flex-1 min-w-[200px]",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Filter by Category"}),n.jsxs(Qt,{value:na,onValueChange:Ea,children:[n.jsx(Kt,{className:"w-full",children:n.jsx(Xt,{placeholder:"Select category"})}),n.jsxs(Gt,{children:[n.jsxs(Ae,{value:"all",children:["All Categories (",Hr.length,")"]}),Qs.map(U=>{const ke=Hr.filter(ze=>ze.category===U.title).length;return n.jsxs(Ae,{value:U.title,children:[U.title," (",ke,")"]},U.id)})]})]})]}),n.jsxs("div",{className:"min-w-[150px]",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Sort By"}),n.jsxs(Qt,{value:ra,onValueChange:ks,children:[n.jsx(Kt,{className:"w-full",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"date",children:"Date Submitted"}),n.jsx(Ae,{value:"score",children:"Quality Score"}),n.jsx(Ae,{value:"status",children:"Status"}),n.jsx(Ae,{value:"withdrawal",children:"Withdrawal Deadline"})]})]})]}),n.jsxs("div",{className:"min-w-[120px]",children:[n.jsx(ye,{className:"text-sm font-semibold text-gray-700 mb-2 block",children:"Order"}),n.jsxs(Qt,{value:ua,onValueChange:Ps,children:[n.jsx(Kt,{className:"w-full",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"desc",children:ra==="score"?"Highest First":ra==="withdrawal"?"Soonest First":"Newest First"}),n.jsx(Ae,{value:"asc",children:ra==="score"?"Lowest First":ra==="withdrawal"?"Latest First":"Oldest First"})]})]})]})]})})}),dl?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-4 border-primary-navy border-t-transparent"})}):qo.length===0?n.jsx(_e,{className:"bg-white border-none shadow-lg",children:n.jsxs(Ce,{className:"p-12 text-center text-gray-500",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{className:"text-lg",children:"No nominations found for this category."})]})}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:xi.map((U,ke)=>n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:ke*.05},children:n.jsx(S6e,{nomination:U,selectedNominationIds:$n,setSelectedNominationIds:Ue,onView:()=>{St(U),yr(!0)},onSendReminder:vs,sendingReminder:Il})},U.id))})]})}),n.jsx(cn,{value:"confirmation-page",children:n.jsx(N6e,{})})]})]})}),n.jsxs(cn,{value:"sales",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(Om,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Ticket Sales"}),n.jsx("p",{className:"text-lg text-gray-600",children:"View all sold tickets and download individual ticket PDFs"})]})]}),n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"text-xl",children:"Sold Tickets"})}),n.jsx(Ce,{children:(()=>{const U=[];return wa.forEach(ke=>{ke.seats_detail&&Array.isArray(ke.seats_detail)&&ke.seats_detail.forEach(ze=>{ze.guest_name&&ze.guest_name.trim()!==""&&U.push({ticket_number:ze.ticket_number,guest_name:ze.guest_name,table_number:ke.table_number,organization:ze.buyer_organization||ke.organization,buyer_email:ze.buyer_email})})}),U.sort((ke,ze)=>(ke.ticket_number||0)-(ze.ticket_number||0)),U.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Om,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No ticket sales recorded yet."})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Ticket Number"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Guest Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Table Number"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Organisation"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Download"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Email Ticket"})]})}),n.jsx("tbody",{children:U.map((ke,ze)=>n.jsxs("tr",{className:`${ze%2===0?"bg-white":"bg-gray-50"} border-b border-gray-100`,children:[n.jsxs("td",{className:"py-3 px-4 font-medium text-gray-900",children:["#",ke.ticket_number]}),n.jsx("td",{className:"py-3 px-4 text-gray-900",children:ke.guest_name}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:ke.table_number}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:ke.organization}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs(me,{size:"sm",variant:"outline",onClick:()=>un(ke),className:"text-primary-navy border-primary-navy hover:bg-primary-navy hover:!text-white",children:[n.jsx(Tl,{className:"w-4 h-4 mr-1"}),"Download Ticket"]})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs(me,{size:"sm",variant:"outline",onClick:()=>On(ke),disabled:!ke.buyer_email,className:"text-green-700 border-green-600 hover:bg-green-600 hover:text-white disabled:opacity-50",children:[n.jsx(Xr,{className:"w-4 h-4 mr-1"}),"Email to Guest"]})})]},`${ke.table_number}-${ke.ticket_number}`))})]})})})()})]})]}),n.jsx(cn,{value:"attendance",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(Cn,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Attendance Register"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Track guest arrivals and check-ins for the event"})]})]}),n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"text-xl",children:"Guest Check-Ins"})}),n.jsxs(Ce,{children:[n.jsx("div",{className:"space-y-4 mb-6",children:n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Search Guests"}),n.jsx(Me,{placeholder:"Search by guest name...",value:Wn,onChange:U=>lr(U.target.value)})]})}),(()=>{const U=[],ke={};
1781wa.forEach(zt=>{zt.seats_detail&&Array.isArray(zt.seats_detail)&&zt.seats_detail.forEach(Zn=>{if(Zn.guest_name&&Zn.guest_name.trim()!==""){const ja={bookingId:zt.id,seatNumber:Zn.seat_number,ticket_number:Zn.ticket_number,guest_name:Zn.guest_name,table_number:zt.table_number,organization:Zn.buyer_organization||zt.organization,checked_in:Zn.checked_in||!1,checked_in_time:Zn.checked_in_time};U.push(ja),ke[`${zt.id}-${Zn.seat_number}`]=!0}})});const ze=U.filter(zt=>zt.guest_name.toLowerCase().includes(Wn.toLowerCase())),wt=ze.filter(zt=>zt.checked_in).length,kt=ze.length;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[n.jsx(_e,{className:"bg-gradient-to-br from-blue-50 to-white border-2 border-blue-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-blue-600 mb-1",children:kt}),n.jsx("div",{className:"text-sm font-medium text-gray-600",children:"Total Guests"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-green-50 to-white border-2 border-green-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-600 mb-1",children:wt}),n.jsx("div",{className:"text-sm font-medium text-gray-600",children:"Checked In"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-orange-50 to-white border-2 border-orange-200",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-600 mb-1",children:kt-wt}),n.jsx("div",{className:"text-sm font-medium text-gray-600",children:"Pending"})]})})]}),n.jsx("div",{className:"border rounded-lg overflow-hidden",children:ze.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(Hd,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:Wn?"No guests match your search.":"No guests registered yet."})]}):n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Guest Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Organization"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Table"}),n.jsx("th",{className:"text-center py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Check-in Time"})]})}),n.jsx("tbody",{children:ze.sort((zt,Zn)=>Zn.checked_in?1:-1).map((zt,Zn)=>n.jsxs("tr",{className:`${Zn%2===0?"bg-white":"bg-gray-50"} border-b border-gray-100 ${zt.checked_in?"bg-green-50":""}`,children:[n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:zt.guest_name}),n.jsx("td",{className:"py-3 px-4 text-gray-600 text-sm",children:zt.organization}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:zt.table_number}),n.jsx("td",{className:"py-3 px-4 text-center",children:n.jsxs(Qt,{value:zt.checked_in?"checked_in":"pending",onValueChange:ja=>{const co=ja==="checked_in";Mo.mutate({bookingId:zt.bookingId,seatNumber:zt.seatNumber,checked_in:co})},children:[n.jsx(Kt,{className:"w-32",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"pending",children:n.jsx("div",{className:"flex items-center gap-2",children:"Pending"})}),n.jsx(Ae,{value:"checked_in",children:n.jsx("div",{className:"flex items-center gap-2",children:"Arrived"})})]})]})}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:zt.checked_in_time&&zt.checked_in_time!==""?yt(new Date(zt.checked_in_time),"HH:mm:ss"):"-"})]},`${zt.table_number}-${zt.ticket_number}`))})]})})]})})()]})]})]})}),n.jsx(cn,{value:"contacts",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(Jr,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Contacts Database"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage clients, sponsors, partners, and key contacts"})]})]}),n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs(Pt,{children:["All Contacts (",kc.length,")"]}),n.jsxs(me,{onClick:()=>{Gs(null),ba({contact_name:"",job_title:"",company_name:"",email:"",ph
1781one:"",linkedin_url:"",contact_type:"other",company_size:"",industry:"",notes:"",last_contact_date:"",next_follow_up_date:""}),Mi(!0)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Contact"]})]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Search"}),n.jsx(Me,{placeholder:"Search by name or company...",value:Ys,onChange:U=>yn(U.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Contact Type"}),n.jsxs(Qt,{value:ll,onValueChange:To,children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Types"}),n.jsx(Ae,{value:"client",children:"Client"}),n.jsx(Ae,{value:"sponsor",children:"Sponsor"}),n.jsx(Ae,{value:"partner",children:"Partner"}),n.jsx(Ae,{value:"prospect",children:"Prospect"}),n.jsx(Ae,{value:"other",children:"Other"})]})]})]})]}),n.jsx("div",{className:"overflow-x-auto border rounded-lg",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{className:"bg-gray-100 border-b",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Contact"}),n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Company"}),n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Email"}),n.jsx("th",{className:"text-center px-4 py-3 font-semibold",children:"Type"}),n.jsx("th",{className:"text-center px-4 py-3 font-semibold",children:"Actions"})]})}),n.jsx("tbody",{children:kc.length===0?n.jsx("tr",{className:"border-b hover:bg-gray-50",children:n.jsx("td",{colSpan:"5",className:"text-center py-12 text-gray-500",children:"No contacts found. Add your first contact to get started."})}):kc.map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} border-b hover:bg-blue-50 transition-colors`,children:[n.jsx("td",{className:"px-4 py-3 font-medium text-gray-900",children:U.contact_name}),n.jsx("td",{className:"px-4 py-3 text-gray-600",children:U.company_name}),n.jsx("td",{className:"px-4 py-3 text-gray-600",children:U.email||"-"}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx(dt,{className:pu[U.contact_type]||pu.other,children:U.contact_type})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsxs("div",{className:"flex justify-center gap-2",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>
1781Rs(U),className:"hover:bg-blue-50",children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:ze=>{ze.stopPropagation(),window.confirm(`Are you sure you want to delete ${U.contact_name}?`)&&hu.mutate(U.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},U.id))})]})})]})]})]})}),n.jsxs(cn,{value:"sponsors",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(ms,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Sponsorship Management"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage sponsors, allocate category sponsorships, and track partnership value"})]})]}),n.jsx(Sge,{categories:Qs}),n.jsxs(_e,{className:"border-none shadow-xl mt-6",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{className:"text-xl",children:"Current Sponsors"}),n.jsxs(me,{onClick:()=>g(!0),className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Sponsor"]})]})}),n.jsxs(Ce,{children:[n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4 mb-6",children:[n.jsxs("div",{className:"bg-amber-50 rounded-lg p-4 text-center border-2 border-amber-200",children:[n.jsx("div",{className:"text-2xl font-bold text-amber-900",children:ts.filter(U=>U.tier==="headline"&&U.is_active).length}),n.jsx("div",{className:"text-sm text-amber-600",children:"Headline"})]}),n.jsxs("div",{className:"bg-yellow-50 rounded-lg p-4 text-center border-2 border-yellow-200",children:[n.jsx("div",{className:"text-2xl font-bold text-yellow-900",children:ts.filter(U=>U.tier==="gold"&&U.is_active).length}),n.jsx("div",{className:"text-sm text-yellow-600",children:"Gold"})]}),n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 text-center border-2 border-gray-200",children:[n.jsx("div",{className:"text-2xl font-bold text-gray-900",children:ts.filter(U=>U.tier==="silver"&&U.is_active).length}),n.jsx("div",{className:"text-sm text-gray-600",children:"Silver"})]}),n.jsxs("div",{className:"bg-orange-50 rounded-lg p-4 text-center border-2 border-orange-200",children:[n.jsx("div",{className:"text-2xl font-bold text-orange-900",children:ts.filter(U=>U.tier==="bronze"&&U.is_active).length}),n.jsx("div",{className:"text-sm text-orange-600",children:"Bronze"})]}),n.jsxs("div",{className:"bg-blue-50 rounded-lg p-4 text-center border-2 border-blue-200",children:[n.jsx("div",{className:"text-2xl font-bold text-blue-900",children:ts.filter(U=>U.tier==="partner"&&U.is_active).length}),n.jsx("div",{className:"text-sm text-blue-600",children:"Partners"})]})]}),n.jsx("div",{className:"border rounded-lg overflow-hidden",children:ts.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(ms,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No sponsors recorded yet."})]}):n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Logo"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Sponsor Name"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Tier"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Sponsored Categories"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:ts.sort((U,ke)=>{const ze={headline:1,gold:2,silver:3,bronze:4,partner:5};return ze[U.tier]-ze[ke.tier]}).map((U,ke)=>n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} border-b border-gray-100 hover:bg-blue-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4",children:U.logo_url?n.jsx("img",{src:U.logo_url,alt:U.name,className:"h-12 w-24 object-contain"}):n.jsx("div",{className:"h-12 w-24 bg-gray-100 rounded flex items-center justify-center",children:n.jsx(ms,{className:"w-8 h-8 text-gray-300"})})}),n.jsx("td",{className:"py-3 px-4 font-medium text-gray-900",children:U.name}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:U.tier==="headline"?"bg-amber-500 text-white":U.tier==="gold"?"bg-yellow-500 text-white":U.tier==="silver"?"bg-gray-400 text-white":U.tier==="bronze"?"bg-orange-600 text-white":"bg-blue-500 text-white",children:U.tier.charAt(0).toUpperCase()+U.tier.slice(1)})}),n.jsx("td",{className:"py-3 px-4 text-gray-600",children:U.sponsored_categories&&U.sponsored_categories.length>0?n.jsx("div",{className:"flex flex-wrap gap-1",children:U.sponsored_categories.map((ze,wt)=>n.jsx(dt,{variant:"outline",className:"text-xs",children:ze},wt))}):n.jsx("span",{className:"text-gray-400 italic",children:"No categories"})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs(Qt,{value:U.is_active?"active":"inactive",onValueChange:ze=>{io.mutate({id:U.id,sponsorData:{...U,is_active:ze==="active"}}
1781)},children:[n.jsx(Kt,{className:"w-32",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"active",children:"Active"}),n.jsx(Ae,{value:"inactive",children:"Inactive"})]})]})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>sa(U),className:"hover:bg-blue-50",children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:ze=>{ze.stopPropagation(),window.confirm(`Are you sure you want to delete ${U.name}? This action cannot be undone.`)&&xd.mutate(U.id)},className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},U.id))})]})}),n.jsxs("div",{className:"mt-8",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-4",children:"Category Sponsorship Overview"}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:Qs.map(U=>{const ke=ts.filter(wt=>wt.is_active&&wt.sponsored_categories&&wt.sponsored_categories.includes(U.title)),ze=ke.length>0;return n.jsx(_e,{className:`${ze?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200"} border-2`,children:n.jsxs(Ce,{className:"p-4",children:[n.jsxs("div",{className:"flex items-start justify-between mb-2",children:[n.jsx("h4",{className:"font-semibold text-primary-navy text-sm line-clamp-2 flex-1",children:U.title}),n.jsx(dt,{className:ze?"bg-green-500 text-white ml-2":"bg-gray-400 text-white ml-2",children:ze?"Sponsored":"Available"})]}),ze&&ke.map((wt,kt)=>n.jsxs("div",{className:"mt-2 text-sm text-gray-700 font-medium",children:["By: ",wt.name]},kt))]})},U.id)})})]})]})]})]}),n.jsxs(cn,{value:"communications",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx($h,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Marketing & Communications"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage press releases, news articles, social media, and email campaigns"})]})]}),n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsx(Pt,{className:"text-xl",children:"Communication Channels"})}),n.jsxs(Ce,{children:[n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsx(_e,{className:"cursor-pointer hover:shadow-xl transition-all duration-300 border-2 border-blue-200 bg-gradient-to-br from-blue-50 to-white",onClick:()=>K(!0),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-blue-500 rounded-full flex items-center justify-center",children:n.jsx(jm,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Press Releases"}),n.jsx("p",{className:"text-gray-600",children:"Manage press releases and media announcements"})]})})}),n.jsx(_e,{className:"cursor-pointer hover:shadow-xl transition-all duration-300 border-2 border-green-200 bg-gradient-to-br from-green-50 to-white",onClick:()=>re(!0),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-green-500 rounded-full flex items-center justify-center",children:n.jsx(pr,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"News & Blogs"}),n.jsx("p",{className:"text-gray-600",children:"Create and manage news articles and blog posts"})]})})}),n.jsx(_e,{className:"bg-white border-2 border-purple-200 shadow-lg cursor-pointer hover:shadow-xl transition-all hover:scale-105",onClick:()=>It(!0),children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-purple-600 rounded-full flex items-center justify-center",children:n.jsx(Jh,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"font-bold text-gray-900 mb-2",children:"Social Media Planning"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Plan and schedule social media posts across platforms"})]})}),n.jsx(_e,{className:"cursor-pointer hover:shadow-xl transition-all duration-300 border-2 border-orange-200 bg-gradient-to-br from-orange-50 to-white",onClick:()=>ne(!0),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsxs("div",{className:"w-16 h-16 bg-orange-500 rounded-full flex items-center justify-center relative",children:[n.jsx(Xr,{className:"w-8 h-8 text-white"}),Js.length>0&&n.jsx(dt,{className:"absolute -top-2 -right-2 bg-red-500 text-white px-2 py-1 text-xs font-bold",children:Js.length})]}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Website Emails"}),n.jsx("p",{className:"text-gray-600",children:"View and manage website contact form submissions"}),Js.length>0&&n.jsxs(dt,{className:"bg-orange-500 text-white",children:[Js.length," new submission",Js.length!==1?"s":""]})]})})})]}),n.jsx("div",{className:"col-span-full mt-8",children:n.jsx(w6e,{})})]})]})]}),n.jsx(cn,{value:"content",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(pr,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Website Content Management"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Create and manage news articles, testimonials, and past winners gallery"})]})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsx(_e,{className:`curs
1781or-pointer hover:shadow-xl transition-all duration-300 border-2 ${Es==="news"?"border-green-500 bg-gradient-to-br from-green-100 to-white shadow-lg scale-105":"border-green-200 bg-gradient-to-br from-green-50 to-white"}`,onClick:()=>cl("news"),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-green-500 rounded-full flex items-center justify-center",children:n.jsx(pr,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"News & Articles"}),n.jsx("p",{className:"text-gray-600",children:"Create and manage news articles and blog posts"}),n.jsxs(dt,{className:"bg-green-500 text-white",children:[pi.length," article",pi.length!==1?"s":""]})]})})}),n.jsx(_e,{className:`cursor-pointer hover:shadow-xl transition-all duration-300 border-2 ${Es==="testimonials"?"border-purple-500 bg-gradient-to-br from-purple-100 to-white shadow-lg scale-105":"border-purple-200 bg-gradient-to-br from-purple-50 to-white"}`,onClick:()=>cl("testimonials"),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-purple-500 rounded-full flex items-center justify-center",children:n.jsx($h,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Testimonials"}),n.jsx("p",{className:"text-gray-600",children:"Manage testimonials from winners and sponsors"}),n.jsxs(dt,{className:"bg-purple-500 text-white",children:[ns.length," testimonial",ns.length!==1?"s":""]})]})})}),n.jsx(_e,{className:`cursor-pointer hover:shadow-xl transition-all duration-300 border-2 ${Es==="winners"?"border-amber-500 bg-gradient-to-br from-amber-100 to-white shadow-lg scale-105":"border-amber-200 bg-gradient-to-br from-amber-50 to-white"}`,onClick:()=>cl("winners"),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-amber-500 rounded-full flex items-center justify-center",children:n.jsx(bn,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"Winners Gallery"}),n.jsx("p",{className:"text-gray-600",children:"Add and manage past award winners"}),n.jsxs(dt,{className:"bg-amber-500 text-white",children:[Ts.length," winner",Ts.length!==1?"s":""]})]})})}),n.jsx(_e,{className:`cursor-pointer hover:shadow-xl transition-all duration-300 border-2 ${Es==="faqs"?"border-indigo-500 bg-gradient-to-br from-indigo-100 to-white shadow-lg scale-105":"border-indigo-200 bg-gradient-to-br from-indigo-50 to-white"}`,onClick:()=>cl("faqs"),children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("div",{className:"w-16 h-16 bg-indigo-500 rounded-full flex items-center justify-center",children:n.jsx($h,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy",children:"FAQs"}),n.jsx("p",{className:"text-gray-600",children:"Manage frequently asked questions with rich text"}),n.jsxs(dt,{className:"bg-indigo-500 text-white",children:[gi.length," FAQ",gi.length!==1?"s":""]})]})})})]}),Es==="news"&&n.jsx(n.Fragment,{children:n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{className:"text-2xl",children:"News & Articles Management"}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(Qt,{value:$e,onValueChange:Ve,children:[n.jsx(Kt,{className:"w-[180px]",children:n.jsx(Xt,{placeholder:"Filter by status"})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Articles"}),n.jsx(Ae,{value:"published",children:"Published"}),n.jsx(Ae,{value:"scheduled",children:"Scheduled"}),n.jsx(Ae,{value:"draft",children:"Draft"})]})]}),n.jsxs(me,{onClick:()=>
1781{je(null),Fe({title:"",author:"",content:"",excerpt:"",image_url:"",image_caption:"",category:"general",published_date:"",is_featured:!1,is_published:!1,meta_title:"",meta_description:"",keywords:"",og_title:"",og_description:""}),ae(!0)},className:"bg-green-600 hover:bg-green-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Create New Article"]})]})]})}),n.jsx(Ce,{children:Vl?n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-4 border-green-500 border-t-transparent"})}):lo.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No articles found for the selected filter."})]}):n.jsx("div",{className:"border rounded-lg overflow-hidden bg-white",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{className:"bg-gray-50 border-b-2 border-gray-200",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700 w-12"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Title"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Category"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Status"}),n.jsx("th",{className:"text-left py-3 px-4 font-semibold text-gray-700",children:"Published"}),n.jsx("th",{className:"text-right py-3 px-4 font-semibold text-gray-700",children:"Actions"})]})}),n.jsx("tbody",{children:lo.map((U,ke)=>{var ze;return n.jsxs("tr",{className:`${ke%2===0?"bg-white":"bg-gray-50"} border-b border-gray-100 hover:bg-blue-50 transition-colors`,children:[n.jsx("td",{className:"py-3 px-4",children:U.image_url&&n.jsx("img",{src:U.image_url,alt:U.title,className:"w-10 h-10 object-cover rounded"})}),n.jsxs("td",{className:"py-3 px-4",children:[n.jsx("div",{className:"font-semibold text-gray-900 line-clamp-1",children:U.title}),n.jsx("div",{className:"text-xs text-gray-500 line-clamp-1 mt-1",children:U.excerpt||((ze=U.content)==null?void 0:ze.replace(/<[^>]*>/g,"").substring(0,100))})]}),n.jsx("td",{className:"py-3 px-4",children:n.jsx(dt,{className:"bg-accent-gold text-primary-navy text-xs font-semibold",children:U.category})}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex flex-wrap gap-1",children:[Ms(U)==="draft"&&n.jsx(dt,{className:"bg-gray-400 text-white text-xs",children:"Draft"}),Ms(U)==="scheduled"&&n.jsx(dt,{className:"bg-blue-400 text-white text-xs",children:"Scheduled"}),Ms(U)==="published"&&n.jsx(dt,{className:"bg-green-500 text-white text-xs",children:"Published"}),U.is_featured&&n.jsx(dt,{className:"bg-yellow-500 text-white text-xs",children:"Featured"})]})}),n.jsx("td",{className:"py-3 px-4 text-sm text-gray-600",children:U.published_date&&U.published_date!==""?yt(new Date(U.published_date),"d MMM yyyy"):"-"}),n.jsx("td",{className:"py-3 px-4",children:n.jsxs("div",{className:"flex justify-end gap-1",children:[n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>
1781La(U),className:"hover:bg-blue-50",children:n.jsx(xa,{className:"w-4 h-4"})}),U.is_published?n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Io(U),className:"hover:bg-yellow-50",children:n.jsx(Ey,{className:"w-4 h-4"})}):n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Zs(U),className:"hover:bg-green-50",children:n.jsx(sd,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>Os(U.id),className:"text-red-600 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})})]},U.id)})})]})})})]})}),Es==="testimonials"&&n.jsxs(_e,{className:"border-none shadow-xl mt-8",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{className:"text-2xl",children:"Testimonials Management"}),n.jsxs(me,{onClick:()=>{jc(null),$l({name:"",role:"",organization:"",quote:"",category:"winner",awards:[],year:new Date().getFullYear(),image_url:"",is_featured:!1,is_active:!0,display_order:0}),sr(!0)},className:"bg-purple-600 hover:bg-purple-700 text-white font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Testimonial"]})]})}),n.jsx(Ce,{children:ns.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx($h,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:"No testimonials yet. Create your first testimonial!"})]}):n.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:ns.map(U=>n.jsx(_e,{className:"hover:shadow-lg transition-shadow",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[U.image_url?n.jsx("img",{src:U.image_url,alt:U.name,className:"w-16 h-16 rounded-full object-cover border-2 border-accent-gold"}):n.jsx("div",{className:"w-16 h-16 rounded-full bg-gray-200 flex items-center justify-center",children:n.jsx(Hd,{className:"w-8 h-8 text-gray-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"font-bold text-gray-900",children:U.name}),n.jsx("p",{className:"text-sm text-gray-600",children:U.role}),n.jsx("p",{className:"text-xs text-gray-500",children:U.organization})]}),n.jsxs("div",{className:"flex gap-1",children:[n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>
1781_d(U),children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>Is(U.id),className:"text-red-600 hover:text-red-700",children:n.jsx(tr,{className:"w-4 h-4"})})]})]}),n.jsxs("p",{className:"text-gray-700 italic text-sm mb-3",children:['"',U.quote,'"']}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx(dt,{variant:"outline",children:U.category}),U.award&&n.jsx(dt,{className:"bg-accent-gold text-primary-navy",children:U.award}),U.is_featured&&n.jsx(dt,{className:"bg-yellow-500 text-white",children:"Featured"}),!U.is_active&&n.jsx(dt,{className:"bg-gray-500 text-white",children:"Inactive"})]})]})},U.id))})})]}),Es==="faqs"&&n.jsx("div",{className:"mt-8",children:n.jsx(j6e,{})}),Es==="winners"&&n.jsxs(_e,{className:"border-none shadow-xl mt-8",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{className:"text-2xl",children:"Winners Gallery Management"}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(Me,{type:"text",placeholder:"Search winners...",value:Fl,onChange:U=>uu(U.target.value),className:"w-64"}),n.jsxs(me,{onClick:()=>{ko(null),Po({year:new Date().getFullYear(),categories:[],winner_name:"",organization:"",description:"",image_url:"",website_url:"",featured:!1}),Co(!0)},className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Winner"]})]})]})}),n.jsx(Ce,{children:Do.length===0?n.jsxs("div",{className:"text-center py-12 text-gray-500",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("p",{children:Fl?"No winners match your search":"No winners recorded yet."})]}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:Do.map(U=>n.jsx(_e,{className:"hover:shadow-xl transition-all duration-300 border-2 border-gray-200 hover:border-primary-navy",children:n.jsxs(Ce,{className:"p-6",children:[U.image_url&&n.jsx("div",{className:"mb-4 rounded-lg overflow-hidden h-48",children:n.jsx("img",{src:U.image_url,alt:U.winner_name,className:"w-full h-full object-cover"})}),n.jsxs("div",{className:"flex items-start justify-between mb-3",children:[n.jsx(dt,{className:"bg-accent-gold text-primary-navy",children:U.year}),U.featured&&n.jsx(dt,{className:"bg-yellow-500 text-white",children:"Featured"})]}),n.jsx("div",{className:"mb-2",children:U.categories&&U.categories.length>0?U.categories.map((ke,ze)=>n.jsxs("h3",{className:"text-lg font-bold text-primary-navy",children:[ke,ze<U.categories.length-1?" & ":""]},ze)):n.jsx("h3",{className:"text-lg font-bold text-gray-400",children:"No category"})}),n.jsx("p",{className:"text-base text-gray-700 font-medium mb-4",children:U.winner_name}),n.jsx("p",{className:"text-sm text-gray-600 line-clamp-3 mb-4",children:U.description}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>wd(U),className:"flex-1",children:[n.jsx(xa,{className:"w-4 h-4 mr-1"}),"Edit"]}),n.jsx(me,{variant:"outline",size:"sm",onClick:()=>Ac(U.id),className:"text-red-600 border-red-300 hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})},U.id))})})]})]})}),n.jsx(cn,{value:"settings",children:n.jsx(E6e,{user:e,onReset:qt,isResetting:ot.isPending,restore:{points:qa,creating:ol,restoring:Qn,create:as,restore:Yl,delete:ml},landing:{form:ta,setForm:fr,toggle:Qe,submit:Re,saving:Ro.isPending}})}),n.jsx(cn,{value:"peopleschoice",children:n.jsx(Nge,{})}),n.jsx(cn,{value:"analytics",children:n.jsx(Ake,{nominations:Hr,tableBookings:wa,sponsors:ts,categories:Qs})}),n.jsx(cn,{value:"seo",children:n.jsx(_Y,{})}),n.jsx(cn,{value:"risk",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(ps,{className:"w-8 h-8 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Risk & Compliance"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage risks, insurance, safeguarding, and incident logs"})]})]}),n.jsx(Y3e,{})]})})]})})}),n.jsx(A6e,{open:So,onOpenChange:U=>{Co(U),U||ko(null)},editingWinner:Ao,winnerFormData:bs,setWinnerFormData:Po,onSubmit:Ls,uploadingWinnerImage:Ks,onImageUpload:jd,categories:Qs}),n.jsx(k6e,{open:pd,onOpenChange:U=>{sr(U),U||jc(null)},editingTestimonial:Bl,testimonialFormData:Nc,setTestimonialFormData:$l,onSubmit:Gl,uploadingTestimonialImage:Eo,onImageUpload:Fo})]})}function ht({contentKey:e,defaultValue:t="",page:r="general",description:a="",type:s="text",className:i="",as:o="span"}){const[l,c]=L.useState(!1),[d,h]=L.useState(!1),[u,f]=L.useState(""),m=Sr();L.useEffect(()=>{(async()=>{try{const S=await pe.auth.me();c((S==null?void 0:S.role)==="admin")}catch{c(!1)}})()},[]);const{data:b}=xt({queryKey:["websiteContent",e],queryFn:async()=>(await pe.entities.WebsiteContent.filter({content_key:e}
1781,"-updated_date",1))[0]||null,staleTime:3e4}),g=Tt({mutationFn:async _=>b!=null&&b.id?await pe.entities.WebsiteContent.update(b.id,{content_value:_}):await pe.entities.WebsiteContent.create({content_key:e,content_value:_,page:r,description:a,content_type:s}),onSuccess:()=>{m.invalidateQueries({queryKey:["websiteContent",e]}),h(!1)}}),y=(b==null?void 0:b.content_value)||t,x=_=>{_.preventDefault(),_.stopPropagation(),f(y),h(!0)},w=()=>{g.mutate(u)},j={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["link"],["clean"]]},N=["header","bold","italic","underline","strike","list","bullet","align","link"];return n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:`${i} ${l?"relative inline-block group":""}`,children:[n.jsx("span",{dangerouslySetInnerHTML:{__html:y}}),l&&n.jsx("button",{onClick:x,className:"ml-2 inline-flex items-center justify-center w-7 h-7 bg-blue-500 hover:bg-blue-600 text-white rounded-full shadow-lg opacity-60 group-hover:opacity-100 transition-opacity align-middle",title:"Edit this text",children:n.jsx(xa,{
1781className:"w-4 h-4"})})]}),n.jsx(Nn,{open:d,onOpenChange:h,children:n.jsxs(vn,{className:"max-w-2xl",children:[n.jsx(_n,{children:n.jsx(Sn,{children:"Edit Content"})}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"text-sm font-medium text-gray-600 block mb-2",children:["Content Key: ",n.jsx("span",{className:"text-gray-900",children:e})]}),a&&n.jsx("p",{className:"text-sm text-gray-500 mb-3",children:a})]}),s==="paragraph"||s==="text"&&y.length>100?n.jsx("div",{className:"border rounded-md",children:n.jsx(sx,{theme:"snow",value:u,onChange:f,modules:j,formats:N,className:"bg-white",style:{minHeight:"200px"}})}):s==="heading"?n.jsx(Me,{value:u,onChange:_=>f(_.target.value),placeholder:"Enter heading...",className:"text-lg font-semibold"}):n.jsx(Me,{value:u,onChange:_=>f(_.target.value),placeholder:"Enter content..."}),n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsxs(me,{variant:"outline",onClick:()=>h(!1),children:[n.jsx(Ei,{className:"w-4 h-4 mr-2"}),"Cancel"]}),n.jsx(me,{onClick:w,disabled:g.isPending,className:"bg-blue-600 hover:bg-blue-700",children:g.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save Changes"]})})]})]})]})})]})}const M6e={trophy:Vd,star:ki,heart:Sg,users:Jr,target:Tm,trending:ka,lightbulb:XX,sparkles:Ia,shield:ps,globe:Iq};function L6e(){const{data:e=[],isLoading:t}=xt({queryKey:["categories"],queryFn:()=>pe.entities.Category.filter({is_active:!0},"display_order",50)}),{data:r=[]}=xt({queryKey:["activeSponsors"],queryFn:()=>pe.entities.Sponsor.filter({is_active:!0},"display_order",100)}),a=s=>r.filter(i=>i.sponsored_categories&&i.sponsored_categories.includes(s));return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(bn,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Award Categories"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"categories_hero_title",defaultValue:"Recognising Excellence Across the UK Charity Sector",page:"Categories",description:"Main heading on Categories page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"categories_hero_subtitle",defaultValue:"The
1781se prestigious award categories define excellence, spotlighting the groundbreaking achievements and profound contributions that elevate the UK charity sector.",page:"Categories",description:"Hero subtitle on Categories page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t?n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(s=>n.jsx(_e,{className:"animate-pulse",children:n.jsxs(Nt,{children:[n.jsx("div",{className:"w-12 h-12 bg-gray-200 rounded-full mb-4"}),n.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4 mb-2"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full"})]})},s))}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:e.map((s,i)=>{const o=M6e[s.icon]||bn,l=a(s.title);return n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:i*.1},viewport:{once:!0},children:n.jsxs(_e,{className:"h-full hover:shadow-2xl transition-all duration-300 group border-none shadow-lg",children:[n.jsxs(Nt,{children:[n.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",children:n.jsx(o,{className:"w-7 h-7 text-accent-gold"})}),n.jsx(Pt,{className:"text-2xl text-primary-navy group-hover:text-accent-gold transition-colors",children:s.title}),n.jsx(wr,{className:"text-base text-gray-600 leading-relaxed",children:s.description})]}),n.jsxs(Ce,{children:[s.criteria&&n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 mb-4",children:[n.jsx("h4",{className:"font-semibold text-sm text-primary-navy mb-2",children:"Eligibility Criteria:"}),n.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:s.criteria})]}),l.length>0&&n.jsxs("div",{className:"mb-4 p-4 bg-gradient-to-r from-accent-gold/10 to-accent-gold/5 rounded-lg border border-accent-gold/20",children:[n.jsx("p",{className:"text-xs font-semibold text-primary-navy/70 mb-2",children:"SPONSORED BY"}),l.map((c,d)=>n.jsx("div",{className:d>0?"mt-3 pt-3 border-t border-accent-gold/20":"",children:c.logo_url?n.jsxs("div",{className:"space-y-2",children:[c.website_url?n.jsx("a",{href:c.website_url,target:"_blank",rel:"noopener noreferrer",className:"block hover:opacity-80 transition-opacity",children:n.jsx("img",{src:c.logo_url,alt:c.name,className:"w-full h-auto object-cover"})}):n.jsx("img",{src:c.logo_url,alt:c.name,className:"w-full h-auto object-cover"}),c.website_url&&n.jsx("div",{className:"text-right",children:n.jsx("a",{href:c.website_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary-navy hover:text-accent-gold font-medium",children:"Visit →"})})]}):n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ms,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-semibold text-primary-navy",children:c.name})]}),c.website_url&&n.jsx("a",{href:c.website_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary-navy hover:text-accent-gold font-medium",children:"Visit →"})]})},c.id))]}),n.jsx(Rt,{to:`${Ct("Nominations")}?category=${encodeURIComponent(s.title)}`,children:n.jsxs(me,{className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold [&:hover]:text-primary-navy",children:["Nominate for This Category",n.jsx(Ci,{className:"ml-2 w-4 h-4"})]})})]})]})},s.id)})}),!t&&e.length===0&&n.jsxs("div",{className:"text-center py-16",children:[n.jsx(bn,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No categories available at the moment."})]})]})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Vd,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4 text-white",children:"Ready to Submit a Nomination?"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Recognise the outstanding work happening across the UK charity sector. Your nomination could help celebrate those making a real difference."}),n.jsx(Rt,{to:Ct("Nominations"),children:n.jsxs(me,{size:"lg",className:"bg-white hover:bg-gray-100 text-primary-navy font-semibold px-10 py-6 text-lg shadow-2xl hover:scale-105 transition-all duration-300 [&:hover]:text-primary-navy",children:["Submit Nomination",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})]})})})})]})}function R6e(){const[e,t]=L.useState(""),[r,a]=L.useState(!1),[s,i]=L.useState(""),o="ncta2025",{data:l=[]}=xt({queryKey:["categories"],queryFn:()=>pe.entities.Category.filter({is_active:!0},"display_order",50),enabled:r}),{data:c=[]}=xt({queryKey:["sponsors"],queryFn:()=>pe.entities.Sponsor.filter({is_active:!0},"display_order",100),enabled:r}),d=m=>{m.preventDefault(),e===o?(a(!0),i("")):i("Incorrect password. Please try again.")},h=m=>{const b=c.filter(g=>g.sponsored_categories&&g.sponsored_categories.includes(m));return{isSponsored:b.length>0,sponsors:b}};if(!r)return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(lt.div,{initial:{opacity:0,scale:.95}
1781,animate:{opacity:1,scale:1},className:"w-full max-w-md",children:n.jsxs(_e,{className:"border-none shadow-2xl",children:[n.jsxs(Nt,{className:"text-center pb-8 pt-12",children:[n.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-primary-navy to-accent-gold rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg",children:n.jsx(Qu,{className:"w-10 h-10 text-white"})}),n.jsx(Pt,{className:"text-3xl text-primary-navy mb-2",children:"Category Sponsorship"}),n.jsx("p",{className:"text-gray-600",children:"This page contains confidential sponsorship information"})]}),n.jsx(Ce,{className:"px-12 pb-12",children:n.jsxs("form",{onSubmit:d,className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"password",className:"text-base font-semibold",children:"Enter Password"}),n.jsx(Me,{id:"password",type:"password",value:e,onChange:m=>t(m.target.value),placeholder:"••••••••",className:"h-12 text-lg",required:!0}),s&&n.jsx("p",{className:"text-red-600 text-sm mt-2",children:s})]}),n.jsx(me,{type:"submit",size:"lg",className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold text-lg py-6",children:"Access Sponsorship Information"})]})})]})})});const u=l.filter(m=>!h(m.title).isSponsored),f=l.filter(m=>h(m.title).isSponsored);return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 backdrop-blur-sm border border-accent-gold/40 rounded-full px-6 py-3 mb-6 shadow-xl",children:[n.jsx(ms,{className:"w-5 h-5 text-accent-gold"}),n.jsx("span",{className:"text-sm font-bold text-accent-gold uppercase tracking-wider",children:"Sponsorship Opportunities"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"sponsorship_hero_title",defaultValue:"Category Sponsorship Packages",page:"CategorySponsorship",description:"Main heading on Category Sponsorship page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed mb-12",children:n.jsx(ht,{contentKey:"sponsorship_hero_subtitle",defaultValue:"Align your brand with excellence and make a lasting impact in the UK charity sector",page:"CategorySponsorship",description:"Hero subtitle on Category Sponsorship page",type:"paragraph"})}),n.jsxs("div",{className:"mt-12",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-6",children:"Investment & Package Details"}),n.jsxs("div",{className:"bg-white/10 backdrop-blur-sm rounded-2xl p-8 mb-8 border border-white/20",children:[n.jsx("div",{className:"text-5xl lg:text-6xl font-bold text-accent-gold mb-2",children:"£1,290"}),n.jsx("div",{className:"text-xl text-white/90",children:"per category"})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-8 text-center",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl lg:text-5xl font-bold text-accent-gold mb-2",children:"500+"}),n.jsx("div",{className:"text-lg text-white/80",children:"Nominations"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl lg:text-5xl font-bold text-accent-gold mb-2",children:"100-150"}),n.jsx("div",{className:"text-lg text-white/80",children:"Gala Lunch Attendees, our winning guests"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl lg:text-5xl font-bold text-accent-gold mb-2",children:"500K+"}),n.jsx("div",{className:"text-lg text-white/80",children:"Monthly Online Reach"})]})]})]})]})})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"What Category Sponsorship Includes"}),n.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:"Comprehensive brand exposure and recognition across all award touchpoints"})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[{icon:bn,title:"Category Sponsorship",description:"Your brand exclusively associated with your chosen award category"},{icon:Jr,title:"Two Ceremony Tickets",description:"Two tickets to the awards ceremony including two three-course meals"},{icon:ka,title:"Networking Opportunities",description:"Valuable networking with charity leaders, decision-makers and sector professionals from across the UK"},{icon:ki,title:"Present the Award",description:"The opportunity to present the award on stage at the ceremony"},{icon:Ia,title:"Brand Visibility",description:"Logo displayed on the awards presentation screen and featured on the official awards media backdrop"},{icon:Cn,title:"Digital Presence",description:"Logo, profile and website link on the awards website and app"},{icon:Xr,title:"Partnership Article",description:"Dedicated Charity Today partnership article promoting your organisation"},{icon:ms,title:"Featured Video",description:"Professionally produced featured video with Charity Today TV *subject to timescales"}].map((m,b)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:b*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full border-none shadow-xl hover:shadow-2xl transition-all duration-300 group",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-6 bg-accent-gold rounded-2xl flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform",children:n.jsx(m.icon,{className:"w-8 h-8 text-primary-navy"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-3",children:m.title}),n.jsx("p",{className:"text-gray-600 leading-relaxed",children:m.description})]})})},b))})]})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Available Categories"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Secure your category sponsorship and align with sector excellence"})]}),u.length>0?n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:u.map((m,b)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:b*.1},viewport:{once:!0},children:n.jsxs(_e,{className:"h-full border-2 border-emerald-200 bg-white shadow-lg hover:shadow-xl transition-all",children:[n.jsxs(Nt,{children:[n.jsxs("div",{className:"flex items-start justify-between mb-2",children:[n.jsx(Pt,{className:"text-xl text-primary-navy flex-1",children:m.title}),n.jsx(dt,{className:"bg-emerald-500 text-white",children:"Available"})]}),n.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:m.description})]}),n.jsxs(Ce,{children:[n.jsx("div",{className:"bg-accent-gold/10 rounded-lg p-4 mb-4",children:n.jsx("p",{className:"text-sm text-primary-navy font-semibold",children:"Investment: £1,290"})}),n.jsx(me,{className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold",onClick:()=>window.location.href=`mailto:[email protected]?subject=Category Sponsorship Enquiry - ${m.title}`,children:"Enquire Now"})]})]})},m.id))}):n.jsx(_e,{className:"bg-white border-2 border-gray-200 shadow-lg",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),n.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"All categories are currently sponsored"}),n.jsx("p",{className:"text-gray-500",children:"Please contact us to discu
1781ss future opportunities or other sponsorship packages"})]})})]})}),f.length>0&&n.jsx("section",{className:"py-20 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Currently Sponsored Categories"}),n.jsx("p",{className:"text-lg text-gray-600",children:"These categories have been secured by our valued sponsors"})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:f.map((m,b)=>{const{sponsors:g}=h(m.title);return n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:b*.1},viewport:{once:!0},children:n.jsxs(_e,{className:"h-full border-2 border-gray-200 bg-gray-50 shadow-lg",children:[n.jsxs(Nt,{children:[n.jsxs("div",{className:"flex items-start justify-between mb-2",children:[n.jsx(Pt,{className:"text-xl text-primary-navy flex-1",children:m.title}),n.jsx(dt,{className:"bg-gray-500 text-white",children:"Sponsored"})]}),n.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:m.description})]}),n.jsx(Ce,{children:g.map((y,x)=>n.jsx("div",{className:"bg-white rounded-lg p-4 border border-accent-gold/20",children:y.logo_url?n.jsx("img",{src:y.logo_url,alt:y.name,className:"h-12 object-contain mx-auto"}):n.jsx("p",{className:"text-sm font-semibold text-primary-navy text-center",children:y.name})},x))})]})},m.id)})})]})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-gray-50 to-blue-50 border-2 border-accent-gold/20 shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Xr,{className:"w-16 h-16 mx-auto mb-6 text-primary-navy"}),n.jsx("h2",{className:"text-3xl font-bold text-primary-navy mb-6",children:"Ready to Sponsor a Category?"}),n.jsx("p",{className:"text-xl text-gray-700 mb-8 leading-relaxed",children:"Contact our sponsorship team to discuss category availability and secure your partnership"}),n.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg",onClick:()=>window.location.href="mailto:[email protected]?subject=Category Sponsorship Enquiry",children:[n.jsx(Xr,{className:"mr-2 w-5 h-5"}),"Email Sponsorship Team"]})}),n.jsx("div",{className:"mt-8 pt-8 border-t border-gray-200",children:n.jsxs("p",{className:"text-gray-600",children:[n.jsx("strong",{children:"Email:"})," [email protected]",n.jsx("br",{}),n.jsx("strong",{children:"Phone:"})," +44 (0)1733 687196"]})})]})})})})]})}function I6e(){var u,f,m;const[e,t]=L.useState(null),[r,a]=L.useState(!0),[s,i]=L.useState(""),[o,l]=L.useState(!1),[c,d]=L.useState(!1);L.useEffect(()=>{const b=new URLSearchParams(window.location.search),g=parseInt(b.get("ticket")),y=b.get("table");if(!g||!y){i("Invalid ticket or table information. QR code may be damaged."),a(!1);return}(async()=>{var w;try{const N=(await pe.entities.TableBooking.list("",100)).find(S=>S.table_number===y);if(!N){i("Table not found");return}const _=(w=N.seats_detail)==null?void 0:w.find(S=>S.ticket_number===g);if(!_){i("Ticket not found for this table");return}t({..._,tableNumber:N.table_number,bookingId:N.id})}catch{i("Failed to load ticket information")}finally{a(!1)}})()},[]);const h=async()=>{if(e){l(!0);try{const g=(await pe.entities.TableBooking.read(e.bookingId)).seats_detail.map(y=>y.seat_number===e.seat_number?{...y,checked_in:!0,checked_in_time:new Date().toISOString()}:y);await pe.entities.TableBooking.update(e.bookingId,{seats_detail:g}),t({...e,checked_in:!0,checked_in_time:new Date().toISOString()}),d(!0),setTimeout(()=>d(!1),3e3)}catch{i("Failed to check in guest")}finally{l(!1)}}};return r?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-4 border-primary-navy border-t-transparent"})}):s?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md w-full border-2 border-red-200 bg-red-50",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"flex justify-center mb-4",children:n.jsx(Mr,{className:"w-16 h-16 text-red-600"})}),n.jsx("h1",{className:"text-2xl font-bold text-red-900 text-center mb-2",children:"Invalid Ticket"}),n.jsx("p",{className:"text-red-800 text-center text-sm",children:s})]})})}):e?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsxs(_e,{className:`max-w-md w-full border-2 transition-all ${e.checked_in?"border-green-300 bg-green-50":"border-blue-300 bg-blue-50"}`,children:[n.jsxs(Nt,{className:"text-center",children:[e.checked_in&&n.jsx("div",{className:"flex justify-center mb-3",children:n.jsx(Cn,{className:"w-16 h-16 text-green-600"})}),n.jsx(Pt,{className:e.checked_in?"text-green-900":"text-primary-navy",children:e.checked_in?"✓ Checked In":"Welcome"})]}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"bg-white rounded-lg p-4 space-y-3",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Hd,{className:"w-5 h-5 text-primary-navy flex-shrink-0 mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-xs text-gray-600",children:"Guest Name"}),n.jsx("p",{className:"text-lg font-bold text-gray-900",children:e.guest_name})]})]}),n.jsxs("div",{className:"border-t pt-3 flex items-start gap-3",children:[n.jsx(ms,{className:"w-5 h-5 text-primary-navy flex-shrink-0 mt-1"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-xs text-gray-600",children:"Organization"}),n.jsx("p",{className:"font-medium text-gray-900",children:e.buyer_organization||"Not specified"})]})]}),n.jsxs("div",{className:"border-t pt-3",children:[n.jsx("p",{className:"text-xs text-gray-600 mb-2",children:"Ticket & Table Info"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(dt,{className:"bg-primary-navy text-white",children:["Ticket #",e.ticket_number]}),n.jsx(dt,{variant:"outline",children:e.tableNumber})]})]}),n.jsx("div",{className:"border-t pt-3",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(eZ,{className:"w-5 h-5 text-primary-navy flex-shrink-0 mt-1"}),n.jsxs("div",{className:"flex-1 space-y-2",children:[n.jsx("p",{className:"text-xs text-gray-600",children:"Meal Selections"}),n.jsxs("div",{className:"space-y-1 text-sm text-gray-700",children:[n.jsxs("p",{children:[n.jsx("span",{className:"font-medium",children:"Starter:"})," ",((u=e.starter_choice)==null?void 0:u.replace(/_/g," "))||"N/A"]}),n.jsxs("p",{children:[n.jsx("span",{className:"font-medium",children:"Main:"})," ",((f=e.main_choice)==null?void 0:f.replace(/_/g," "))||"N/A"]}),n.jsxs("p",{children:[n.jsx("span",{className:"font-medium",children:"Dessert:"})," ",((m=e.dessert_choice)==null?void 0:m.replace(/_/g," "))||"N/A"]})]})]})]})}),e.dietary_requirements&&n.jsxs("div",{className:"border-t pt-3",children:[n.jsx("p",{className:"text-xs text-gray-600 mb-1",children:"Dietary Requirements"}),n.jsx("p",{className:"text-sm bg-yellow-50 text-yellow-900 p-2 rounded border border-yellow-200",children:e.dietary_requirements})]})]}),e.checked_in&&n.jsx("div",{className:"bg-green-100 border border-green-300 rounded-lg p-3 text-center",children:n.jsxs("p",{className:"text-sm text-green-900 font-medium",children:["Checked in at ",yt(new Date(e.checked_in_time),"HH:mm:ss")]})}),!e.checked_in&&n.jsx(me,{onClick:h,disabled:o,className:"w-full bg-primary-navy hover:opacity-90 text-white font-bold h-12 text-lg",children:o?"Checking In...":"Mark As Arrived"}),c&&n.jsx("div",{className:"bg-green-100 border border-green-300 rounded-lg p-3 text-center",children:n.jsx("p",{className:"text-sm text-green-900 font-medium",children:"✓ Guest checked in successfully!"})})]})]})}):n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md w-full border-2 border-gray-200",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx(Mr,{className:"w-16 h-16 mx-auto mb-4 text-gray-400"}),n.jsx("p",{className:"text-gray-600",children:"Guest information not found"})]})})})}
1781function D6e(){const[e,t]=L.useState({name:"",email:"",phone:"",subject:"",message:""}),[r,a]=L.useState(!1),[s,i]=L.useState(!1),[o,l]=L.useState(null),c=(h,u)=>{t(f=>({...f,[h]:u}))},d=async h=>{h.preventDefault(),a(!0),l(null);try{await pe.entities.Contact.create({name:e.name,email:e.email,phone:e.phone,subject:e.subject,message:e.message,submitted_date:new Date().toISOString(),status:"new"}),i(!0),t({name:"",email:"",phone:"",subject:"",message:""})}catch(u){console.error("Error submitting contact form:",u),l(`Failed to send message: ${u.message||"Unknown error"}. Please email us directly at [email protected]`)}a(!1)};return s?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 to-blue-50 py-20",children:n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-emerald-500 to-emerald-600 rounded-full flex items-center justify-center mx-auto mb-6 shadow-lg",children:n.jsx(Cn,{className:"w-12 h-12 text-white"})}),n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-4",children:"Message Sent Successfully!"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Thank you for getting in touch. We'll respond to your enquiry as soon as possible, typically within 1-2 business days."}),n.jsx(me,{size:"lg",onClick:()=>i(!1),className:"bg-primary-navy hover:opacity-90 text-white",children:"Send Another Message"})]})})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(Xr,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"contact_hero_title",defaultValue:"Get in Touch",page:"Contact",description:"Main heading on Contact page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"contact_hero_subtitle",defaultValue:"Have questions about the awards? Want to discuss sponsorship opportunities? We're here to help.",page:"Contact",description:"Hero subtitle on Contact page",type:"text"})})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[n.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[n.jsxs("div",{className:"w-12 h-12 bg-gradient-to-br from-primary-navy to-accent-gold rounded-xl flex items-center justify-center flex-shrink-0",children:[n.jsx(Xr,{className:"w-6 h-6 text-accent-gold"})," "]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-semibold text-primary-navy mb-1",children:"Email"}),n.jsx("a",{href:"mailto:[email protected]",className:"text-accent-gold hover:text-primary-navy transition-colors",children:"[email protected]"})," "]})]}),n.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[n.jsxs("div",{className:"w-12 h-12 bg-gradient-to-br from-primary-navy to-accent-gold rounded-xl flex items-center justify-center flex-shrink-0",children:[n.jsx(Kw,{className:"w-6 h-6 text-accent-gold"})," "]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-semibold text-primary-navy mb-1",children:"Phone"}),n.jsx("p",{className:"text-gray-600",children:"+44 (0)1733 687196"})," ",n.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Mon-Fri, 9am-5pm GMT"})]})]}),n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"w-12 h-12 bg-gradient-to-br from-primary-navy to-accent-gold rounded-xl flex items-center justify-center flex-shrink-0",children:[n.jsx(Xu,{className:"w-6 h-6 text-accent-gold"})," "]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-semibold text-primary-navy mb-1",children:"Address"}),n.jsxs("p",{className:"text-gray-600 text-sm leading-relaxed",children:["CTN Media & Awards Ltd",n.jsx("br",{}),"Registered Office:",n.jsx("br",{}),"124 City Road",n.jsx("br",{}),"London, EC1V 2NX"]})," "]})]})]})}),n.jsx(_e,{className:"border-none shadow-xl bg-gradient-to-br from-primary-navy to-accent-gold text-white",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("h3",{className:"font-semibold text-lg mb-3 text-primary-navy",children:"Office Hours"}),n.jsxs("div",{className:"space-y-2 text-sm text-primary-navy",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{children:"Monday - Friday"}),n.jsx("span",{className:"font-medium",children:"9:00 - 15:00"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{children:"Saturday - Sunday"}),n.jsx("span",{className:"font-medium",children:"Closed"})]})]})]})})]}),n.jsx("div",{className:"lg:col-span-2",children:n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsxs(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 rounded-t-lg border-b-2 border-accent-gold/20",children:[n.jsx(Pt,{className:"text-2xl text-primary-navy",children:"Send Us a Message"}
1781),n.jsx(wr,{className:"text-primary-navy/70 text-base font-medium",children:"Fill out the form below and we'll get back to you shortly"})]}),n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"mb-6 p-4 bg-blue-50 border-l-4 border-blue-500 rounded",children:n.jsxs("p",{className:"text-sm text-blue-900",children:[n.jsx("strong",{children:"Before contacting us,"})," please check our"," ",n.jsx(Rt,{to:Ct("FAQs"),className:"text-blue-700 hover:text-blue-900 underline font-semibold",children:"FAQs page"})," ","for answers to common questions."]})}),n.jsxs("form",{onSubmit:d,className:"space-y-6",children:[o&&n.jsx("div",{className:"p-4 bg-red-50 border-l-4 border-red-500 rounded",children:n.jsx("p",{className:"text-sm text-red-900",children:o})}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"name",className:"font-semibold",children:"Your Name *"}),n.jsx(Me,{id:"name",value:e.name,onChange:h=>c("name",h.target.value),placeholder:"John Smith",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"email",className:"font-semibold",children:"Email Address *"}),n.jsx(Me,{id:"email",type:"email",value:e.email,onChange:h=>c("email",h.target.value),placeholder:"[email protected]",className:"h-12",required:!0})]})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"phone",className:"font-semibold",children:"Phone Number"}),n.jsx(Me,{id:"phone",value:e.phone,onChange:h=>c("phone",h.target.value),placeholder:"+44 20 1234 5678",className:"h-12"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"subject",className:"font-semibold",children:"Subject *"}),n.jsx(Me,{id:"subject",value:e.subject,onChange:h=>c("subject",h.target.value),placeholder:"General Enquiry",className:"h-12",required:!0})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"message",className:"font-semibold",children:"Message *"}),n.jsx(en,{id:"message",value:e.message,onChange:h=>c("message",h.target.value),placeholder:"Tell us how we can help you...",className:"min-h-[200px] text-base",required:!0})]}),n.jsx(me,{type:"submit",size:"lg",disabled:r,className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold py-6 text-lg shadow-lg",children:r?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-navy mr-2"}),"Sending..."]}):n.jsxs(n.Fragment,{children:[n.jsx($q,{className:"mr-2 w-5 h-5"}),"Send Message"]})})]})]})]})})]})})})]})}function n3({title:e,description:t,keywords:r=[],ogTitle:a,ogDescription:s,ogImage:i,twitterTitle:o,twitterDescription:l,twitterImage:c,canonical:d,robotsIndex:h=!0,robotsFollow:u=!0,structuredData:f}){const m=window.location.origin,b=window.location.href,g=a||e,y=s||t,x=i||`${m}/og-default.png`,w=o||e,j=l||t,N=c||x,_=d||b,S=`${h?"index":"noindex"}, ${u?"follow":"nofollow"}`;return L.useEffect(()=>{document.title=e;const A=(R,M,k=!1)=>{const P=k?"property":"name";let O=document.querySelector(`meta[${P}="${R}"]`);O||(O=document.createElement("meta"),O.setAttribute(P,R),document.head.appendChild(O)),O.setAttribute("content",M)};A("description",t),r.length>0&&A("keywords",r.join(", ")),A("robots",S),A("og:type","website",!0),A("og:url",b,!0),A("og:title",g,!0),A("og:description",y,!0),A("og:image",x,!0),A("og:site_name","National Charity Today Awards™",!0),A("twitter:card","summary_large_image"),A("twitter:url",b),A("twitter:title",w),A("twitter:description",j),A("twitter:image",N);let T=document.querySelector('link[rel="canonical"]');if(T||(T=document.createElement("link"),T.setAttribute("rel","canonical"),document.head.appendChild(T)),T.setAttribute("href",_),f){let R=document.querySelector('script[type="application/ld+json"]');R||(R=document.createElement("script"),R.setAttribute("type","application/ld+json"),document.head.appendChild(R)),R.textContent=JSON.stringify(f)}},[e,t,r,S,g,y,x,w,j,N,_,f]),null}function F6e({faqs:e=[]}){const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(r=>
1781({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};return L.useEffect(()=>{const r=document.createElement("script");return r.type="application/ld+json",r.textContent=JSON.stringify(t),document.head.appendChild(r),()=>{document.head.contains(r)&&document.head.removeChild(r)}},[e]),null}function TY(e){const{data:t,isLoading:r}=xt({queryKey:["pageSEO",e],queryFn:async()=>{const a=await pe.entities.PageSEO.filter({page_name:e,is_active:!0},"-updated_date",1);return a&&a.length>0?a[0]:null},staleTime:3e5});return{seoData:t,isLoading:r}}function q6e(){const[e,t]=L.useState("all"),[r,a]=L.useState(null),{seoData:s}=TY("FAQs"),{data:i=[],isLoading:o}=xt({queryKey:["faqs"],queryFn:()=>pe.entities.FAQ.list("display_order",100)}),l=[{value:"all",label:"All"},{value:"nominations",label:"Nominations"},{value:"eligibility",label:"Eligibility"},{value:"judging",label:"Judging"},{value:"event",label:"Event"},{value:"general",label:"General"}],c=e==="all"?i:i.filter(h=>h.category===e),d=h=>{a(r===h?null:h)};return n.jsxs(n.Fragment,{children:[n.jsx(n3,{title:(s==null?void 0:s.meta_title)||"FAQs | National Charity Today Awards™",description:(s==null?void 0:s.meta_description)||"Find answers to frequently asked questions about nominations, eligibility, judging, and the National Charity Today Awards ceremony.",keywords:(s==null?void 0:s.keywords)||["charity awards FAQs","nomination questions","awards eligibility","judging process"],ogTitle:s==null?void 0:s.og_title,ogDescription:s==null?void 0:s.og_description,robotsIndex:s==null?void 0:s.robots_index,robotsFollow:s==null?void 0:s.robots_follow}),n.jsx(F6e,{faqs:c}),n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(aN,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"faqs_hero_title",defaultValue:"Frequently Asked Questions",page:"FAQs",description:"Main heading on FAQs page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"faqs_hero_subtitle",defaultValue:"Find answers to common questions about nominations, eligibility, judging, and the awards ceremony.",page:"FAQs",description:"Hero subtitle on FAQs page",type:"text"})})]})})}),n.jsx("section",{className:"py-8 bg-white border-b sticky top-20 z-40 shadow-sm",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-4",children:n.jsx(nl,{value:e,onValueChange:t,children:n.jsx(wo,{className:"bg-gray-100 flex-wrap h-auto",children:l.map(h=>n.jsx(ln,{value:h.value,children:h.label},h.value))})})})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:o?n.jsx("div",{className:"space-y-4",children:[1,2,3,4,5].map(h=>n.jsx(_e,{className:"animate-pulse",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded mb-2"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4"})]})},h))}):c.length===0?n.jsxs("div",{className:"text-center py-16",children:[n.jsx(aN,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No FAQs found for this category."})]}):n.jsx("div",{className:"space-y-4",children:c.map((h,u)=>n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.05},children:n.jsx(_e,{className:`cursor-pointer hover:shadow-lg transition-all duration-300 border-none shadow ${r===h.id?"shadow-xl":""}`,onClick:()=>d(h.id),children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex justify-between items-start gap-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-gray-900 flex-1",dangerouslySetInnerHTML:{__html:h.question}}),n.jsx("div",{className:"flex-shrink-0",children:r===h.id?n.jsx(Y0,{className:"w-5 h-5 text-blue-700"}):n.jsx(Wm,{className:"w-5 h-5 text-gray-400"})})]}),n.jsx(Gm,{children:r===h.id&&n.jsx(lt.div,{initial:{opacity:0,height:0}
1781,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.3},className:"overflow-hidden",children:n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200",children:n.jsx("div",{className:"text-gray-700 prose prose-sm max-w-none leading-relaxed",dangerouslySetInnerHTML:{__html:h.answer}})})})})]})})},h.id))})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(aN,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4 text-white",children:"Still Have Questions?"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Can't find the answer you're looking for? Our team is here to help."}),n.jsx("a",{href:"/contact",children:n.jsx("button",{className:"bg-white hover:bg-gray-100 text-primary-navy font-semibold px-10 py-4 rounded-lg shadow-lg transition-all duration-300 hover:scale-105",children:"Contact Us"})})]})})})})]})]})}function B6e(){const[e,t]=L.useState(!1);L.useEffect(()=>{(async()=>{try{const s=await pe.auth.me();t((s==null?void 0:s.role)==="admin")}catch{t(!1)}})()},[]);const r=["Fairness and impartiality in all stages of the judging process","Transparency in how we operate and make decisions","Independence from commercial influence in editorial and judging matters","Recognition of genuine impact and excellence in the charity sector","Commitment to upholding the highest standards of integrity"];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-primary-navy text-white py-20",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:n.jsx(ht,{contentKey:"founder_hero_title",defaultValue:"The Founder",page:"founder",description:"Main page title",type:"heading"})}),n.jsx("p",{className:"text-xl text-gray-200 max-w-3xl mx-auto leading-relaxed",children:n.jsx(ht,{contentKey:"founder_hero_subtitle",defaultValue:"Understanding the vision, values, and standards behind the UK's National Charity Today Awards™",page:"founder",description:"Hero subtitle",type:"paragraph"})})]})}),n.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16 space-y-12",children:[n.jsx("section",{children:n.jsxs(_e,{className:"shadow-lg border-none",children:[n.jsx(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:n.jsxs(Pt,{className:"text-2xl text-primary-navy flex items-center gap-3",children:[n.jsx(Jr,{className:"w-7 h-7 text-accent-gold"}),n.jsx(ht,{contentKey:"founder_about_title",defaultValue:"About the Founder",page:"founder",description:"About the Founder section title",type:"heading"})]})}),n.jsxs(Ce,{className:"pt-8 pb-10",children:[n.jsxs("div",{className:"rounded-xl p-8 mb-10 text-center shadow-xl",style:{background:"linear-gradient(to bottom right, #06053e, #1e3a8a)"},children:[n.jsx("h3",{className:"text-4xl md:text-5xl font-bold mb-3",style:{color:"#ffffff"},children:n.jsx("span",{style:{color:"#ffffff"},children:n.jsx(ht,{contentKey:"founder_name",defaultValue:"Lee B. Rayment",page:"founder",description:"Founder's name",type:"heading"})})}),n.jsx("div",{className:"w-24 h-1 mx-auto mb-4",style:{backgroundColor:"#dec069"}}),n.jsx("p",{className:"text-xl font-medium",style:{color:"#ffffff"},children:n.jsx("span",{style:{color:"#ffffff"},children:n.jsx(ht,{contentKey:"founder_title",defaultValue:"Founder, National Charity Today Awards™",page:"founder",description:"Founder's title",type:"text"})})})]}),n.jsxs("div",{children:[n.jsx("div",{className:"md:float-right md:ml-8 mb-6 md:w-80 mx-auto md:mx-0 max-w-sm md:max-w-none",children:n.jsxs("div",{className:"aspect-[3/4] bg-gradient-to-br from-gray-200 to-gray-300 rounded-2xl shadow-xl flex items-center justify-center text-gray-500 text-sm border-4 border-white overflow-hidden",children:[e&&n.jsx("p",{className:"text-center px-6 text-gray-600",children:"[Placeholder: Founder Photo - Replace via admin editing when ready]"}),!e&&n.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary-navy
1781/20 to-accent-gold/20"})]})}),n.jsx("p",{className:"text-gray-700 leading-relaxed text-justify text-lg",children:n.jsx(ht,{contentKey:"founder_bio_content",defaultValue:"Lee Rayment is the Founder of the National Charity Today Awards™, established to recognise excellence, integrity and impact across the UK charity sector.<br><br>With a background in charity sector journalism and media, Lee founded Charity Today as an independent national platform dedicated to informing, supporting and championing charities, social enterprises and those working to create positive change in communities across the UK. Through this work, he has developed a deep understanding of the challenges facing the sector, alongside a strong commitment to fair, transparent and credible recognition. Lee is also the Founder of UK Charity Week, a national awareness initiative created to celebrate and promote the vital work of charities across the country. Since its launch, UK Charity Week has gone on to help raise millions of pounds for good causes across the UK, supporting charities of all sizes through increased public engagement, collaboration and awareness.<br><br>The National Charity Today Awards™ were created in response to a clear need for awards that prioritise substance over status, impact over profile, and integrity over commercial influence. The awards are designed to be inclusive and accessible, recognising organisations based on their work and the difference they make, not their size or budget.",page:"founder",description:"Founder biography",type:"paragraph",className:"inline"})}),n.jsx("div",{className:"clear-both"})]})]})]})}),n.jsx("section",{children:n.jsxs(_e,{className:"shadow-lg border-none",children:[n.jsx(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:n.jsxs(Pt,{className:"text-2xl text-primary-navy flex items-center gap-3",children:[n.jsx(bn,{className:"w-7 h-7 text-accent-gold"}),n.jsx(ht,{contentKey:"founder_statement_title",defaultValue:"Founder's Statement",page:"founder",description:"Founder's statement section title",type:"heading"})]})}),n.jsxs(Ce,{className:"pt-6",children:[n.jsx("div",{className:"prose prose-lg max-w-none text-gray-700 leading-relaxed",children:n.jsx(ht,{contentKey:"founder_statement_content",defaultValue:"The National Charity Today Awards™ exists to recognise and celebrate the extraordinary work taking place across the UK charity sector. Our purpose is to shine a light on the organisations and individuals making a genuine difference—those whose impact extends beyond headlines and whose dedication sets the standard for excellence. These awards are built on a foundation of fairness, transparency, and independence. Every nomination is treated with respect, every category is judged on merit, and every decision is made free from commercial influence. We are committed to upholding the highest standards of integrity because the sector deserves nothing less.",page:"founder",description:"Founder's statement main content",type:"paragraph",className:"block"})}),n.jsxs("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[n.jsx("p",{className:"text-2xl font-bold text-primary-navy mb-1",style:{fontFamily:"cursive"},children:"Lee B. Rayment"}),n.jsx("p",{className:"text-sm text-gray-600 font-medium",children:"Founder, National Charity Today Awards™"})]})]})]})}),n.jsx("section",{children:n.jsxs(_e,{className:"shadow-lg border-none",children:[n.jsx(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:n.jsxs(Pt,{className:"text-2xl text-primary-navy flex items-center gap-3",children:[n.jsx(ps,{className:"w-7 h-7 text-accent-gold"}),n.jsx(ht,{contentKey:"founder_independence_title",defaultValue:"Independence and Integrity",page:"founder",description:"Independence section title",type:"heading"})]})}),n.jsx(Ce,{className:"pt-6",children:n.jsx("div",{className:"prose prose-lg max-w-none text-gray-700 leading-relaxed space-y-4",children:n.jsx(ht,{contentKey:"founder_independence_content",defaultValue:"The credibility of the National Charity Today Awards™ depends on maintaining clear boundaries between sponsorship and judging. Sponsors support the awards financially and through partnership, but they play no role in the judging process or the selection of winners. All judging decisions are made independently, based on merit and the published criteria for each category. This separation ensures that the awards remain fair, transparent, and free from conflicts of interest. We are transparent about how we operate, and we hold ourselves accountable to the same standards we expect from the charities we celebrate.",page:"founder",description:"Independence and integrity explanation",type:"paragraph",className:"block"})})})]})}),n.jsx("section",{children:n.jsxs(_e,{className:"shadow-lg border-none",children:[n.jsx(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:n.jsxs(Pt,{className:"text-2xl text-primary-navy flex items-center gap-3",children:[n.jsx(Sg,{className:"w-7 h-7 text-accent-gold"}),n.jsx(ht,{contentKey:"founder_values_title",defaultValue:"Core Values and Standards",page:"founder",description:"Values section title",type:"heading"})]})}),n.jsx(Ce,{className:"pt-6",children:n.jsx("div",{className:"space-y-4",children:r.map((a,s)=>n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-6 h-6 text-accent-gold flex-shrink-0 mt-1"}),n.jsx("p",{className:"text-gray-700 text-lg leading-relaxed",children:a})]},s))})})]})}),n.jsx("section",{children:n.jsxs(_e,{className:"shadow-lg border-none",children:[n.jsx(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:n.jsx(Pt,{className:"text-2xl text-primary-navy",children:n.jsx(ht,{contentKey:"founder_charity_today_title",defaultValue:"Relationship to Charity Today",page:"founder",description:"Charity Today relationship section title",type:"heading"})})}),n.jsx(Ce,{className:"pt-6",children:n.jsx("div",{className:"prose prose-lg max-w-none text-gray-700 leading-relaxed",children:n.jsx(ht,{contentKey:"founder_charity_today_content",defaultValue:"The National Charity Today Awards™ is an initiative of Charity Today, a trusted publication serving the UK charity sector. While the awards benefit from Charity Today's sector knowledge and reach, editorial independence is maintained throughout the judging process. This structure ensures transparency while allowing the awards to operate with integrity and credibility.",page:"founder",description:"Explanation of Charity Today relationship",type:"paragraph",className:"block"})})})]})}),n.jsx("section",{children:n.jsx(_e,{className:"shadow-lg border-none bg-gradient-to-r from-primary-navy via-purple-900 to-accent-gold text-white",children:n.jsx(Ce,{className:"py-12 px-8 text-center",children:n.jsx("div",{className:"prose prose-lg max-w-none text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"founder_closing_note",defaultValue:"Thank y
1781ou to everyone who has supported the National Charity Today Awards™—the nominees, sponsors, partners, and supporters who share our commitment to celebrating excellence in the charity sector. Your participation helps us recognise the remarkable work taking place across the UK and strengthens the platform we provide for organisations making a real difference. We look forward to continuing this important work together.",page:"founder",description:"Closing thank you message",type:"paragraph",className:"block text-white"})})})})})]})]})}function $6e(){const[e,t]=L.useState(null),[r,a]=L.useState("all"),s=[{id:1,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/d4eddaa39_MartinHouseUKCharityoftheYear.jpg",title:"Martin House - UK Charity of the Year",category:"winners",year:2025},{id:2,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/617033a95_PercyHedleyFoundationDisabilityImpactAward.jpg",title:"Percy Hedley Foundation - Disability Impact Award",category:"winners",year:2025},{id:3,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/a773033d4_PeterboroughsJamesHopgoodUKVolunteeroftheYearWinenr.jpg",title:"James Hopgood - UK Volunteer of the Year",category:"winners",year:2025},{id:4,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/a61b88105_Still2025-10-20110623_131.jpg",title:"Awards Ceremony Celebration",category:"ceremony",year:2025},{id:5,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/a6346a160_Still2025-10-20110623_1141.jpg",title:"Winner Announcement Moment",category:"ceremony",year:2025},{id:6,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/bd17a5a23_Still2025-10-20110623_1151.jpg",title:"Team Celebration",category:"ceremony",year:2025},{id:7,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/9e723c2c4_Still2025-10-20110623_1181.jpg",title:"Proud Award Recipients",category:"winners",year:2025},{id:8,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/dbbfd49ef_Still2025-10-20110623_1231.jpg",title:"Celebrating Excellence Together",category:"ceremony",year:2025},{id:9,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/bc63427a0_Still2025-10-20110623_1232.jpg",title:"Award Winner Recognition",category:"winners",year:2025},{id:10,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/d8bf374af_Still2025-10-20110623_1261.jpg",title:"Joyful Award Moment",category:"ceremony",year:2025},{id:11,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/4fbc227d9_SyedMuhammadFaisalSamijpg.jpg",title:"Award Winner Portrait",category:"winners",year:2025},{id:12,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/1d72d87df_Screenshot2025-10-20at154134.png",title:"Ceremony Highlights",category:"ceremony",year:2025},{id:13,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/e9d7c8df3_Screenshot2025-10-20at154456.png",title:"Awards Gala Atmosphere",category:"atmosphere",year:2025},{id:14,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/320cada63_Screenshot2025-10-20at154813.png",title:"Event Venue & Decor",category:"atmosphere",year:2025},{id:15,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/26b8d461d_Screenshot2025-10-20at154903.png",title:"Stage & Awards Backdrop",category:"atmosphere",year:2025},{id:16,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/f7bccdcce_Screenshot2025-10-20at155934.png",title:"Gala Lunc
1781h Setting",category:"atmosphere",year:2025},{id:17,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/1d8f8fd16_Screenshot2025-10-20at160727.png",title:"Attendees & Networking",category:"atmosphere",year:2025},{id:18,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/50eaad558_Screenshot2025-10-20at161257.png",title:"Ceremony in Progress",category:"ceremony",year:2025},{id:19,url:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/a64a1d752_Screenshot2025-10-20at162435.png",title:"Award Presentation",category:"ceremony",year:2025}],i=[{value:"all",label:"All Photos",icon:ng},{value:"winners",label:"Winners",icon:Vd},{value:"ceremony",label:"Ceremony",icon:bn},{value:"atmosphere",label:"Atmosphere",icon:Ia}],o=r==="all"?s:s.filter(l=>l.category===r);return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"NCTA Logo",className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(ng,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Photo Gallery"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"gallery_hero_title",defaultValue:"Capturing Moments of Excellence",page:"Gallery",description:"Main heading on Gallery page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"gallery_hero_subtitle",defaultValue:"Relive the magic of the National Charity Today Awards™ through our collection of ceremony highlights, winner celebrations, and unforgettable moments",page:"Gallery",description:"Hero subtitle on Gallery page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-12 -mt-16 relative z-10",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("div",{className:"text-4xl font-bold text-primary-navy mb-2",children:s.length}),n.jsx("div",{className:"text-sm text-gray-600 font-medium",children:"Photos"})]})}),n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("div",{className:"text-4xl font-bold text-primary-navy mb-2",children:"2025"}),n.jsx("div",{className:"text-sm text-gray-600 font-medium",children:"Awards Year"})]})}),n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("div",{className:"text-4xl font-bold text-primary-navy mb-2",children:"12+"}),n.jsx("div",{className:"text-sm text-gray-600 font-medium",children:"Award Categories"})]})})]})})}),n.jsx("section",{className:"py-8 bg-white border-y sticky top-20 z-40 shadow-sm",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4",children:[n.jsxs("div",{className:"text-lg font-semibold text-primary-navy",children:[o.length," Photo",o.length!==1?"s":""]}),n.jsx(nl,{value:r,onValueChange:a,children:n.jsx(wo,{className:"bg-gray-100",children:i.map(l=>{const c=l.icon;return n.jsxs(ln,{value:l.value,className:"gap-2",children:[n.jsx(c,{className:"w-4 h-4"}),l.label]},l.value)})})})]})})}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map((l,c)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:c*.05},viewport:{once:!0},className:"group cursor-pointer",onClick:()=>t(l),children:n.jsx(_e,{className:"overflow-hidden border-none shadow-xl hover:shadow-2xl transition-all duration-300",children:n.jsxs("div",{className:"relative overflow-hidden",children:[n.jsx("img",{src:l.url,alt:l.title,className:"w-full h-auto object-cover group-hover:scale-110 transition-transform duration-500"}),n.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end",children:n.jsx("div",{className:"p-6 w-full",children:n.jsxs("div",{className:"flex items-center justify-between text-white",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"font-bold text-lg mb-1",children:l.title}),n.jsx("p",{className:"text-sm text-white/80",children:l.year})]}),n.jsx(xZ,{className:"w-6 h-6 flex-shrink-0"})]})})}),n.jsx("div",{className:"absolute top-4 left-4",children:n.jsx("div",{className:"bg-accent-gold text-primary-navy px-3 py-1 rounded-full text-xs font-bold shadow-lg backdrop-blur-sm",children:l.category==="winners"?"WINNER":l.category==="ceremony"?"CEREMONY":"ATMOSPHERE"})})]})})},l.id))}),o.length===0&&n.jsxs("div",{className:"text-center py-16",children:[n.jsx(ng,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No photos foun
1781d for this category."})]})]})}),n.jsx(Nn,{open:!!e,onOpenChange:()=>t(null),children:n.jsx(vn,{className:"max-w-7xl w-full p-0 bg-black/95 border-none",children:n.jsx(Gm,{children:e&&n.jsxs(lt.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"relative",children:[n.jsx("button",{onClick:()=>t(null),className:"absolute top-4 right-4 z-50 w-12 h-12 bg-white/10 backdrop-blur-sm hover:bg-white/20 rounded-full flex items-center justify-center transition-all group",children:n.jsx(Ei,{className:"w-6 h-6 text-white group-hover:scale-110 transition-transform"})}),n.jsx("a",{href:e.url,download:!0,target:"_blank",rel:"noopener noreferrer",className:"absolute top-4 right-20 z-50 w-12 h-12 bg-white/10 backdrop-blur-sm hover:bg-white/20 rounded-full flex items-center justify-center transition-all group",onClick:l=>l.stopPropagation(),children:n.jsx(Tl,{className:"w-6 h-6 text-white group-hover:scale-110 transition-transform"})}),n.jsx("div",{className:"flex items-center justify-center min-h-[70vh] p-8",children:n.jsx("img",{src:e.url,alt:e.title,className:"max-h-[80vh] w-auto max-w-full object-contain rounded-lg shadow-2xl"})}),n.jsx("div",{className:"bg-gradient-to-t from-black/90 to-transparent p-8 absolute bottom-0 left-0 right-0",children:n.jsx("div",{className:"max-w-4xl mx-auto",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:e.title}),n.jsxs("div",{className:"flex items-center gap-3 text-white/80",children:[n.jsx("span",{className:"text-sm",children:e.year}),n.jsx("span",{className:"text-sm",children:"•"}),n.jsx("span",{className:"text-sm capitalize",children:e.category})]})]}),n.jsx("div",{className:"flex items-center gap-2",children:n.jsxs("div",{className:"bg-accent-gold text-primary-navy px-4 py-2 rounded-full text-sm font-bold",children:[s.findIndex(l=>l.id===e.id)+1," / ",s.length]})})]})})})]})})})})]})}function U6e(){const[e,t]=L.useState(!1),[r,a]=L.useState(null),[s,i]=L.useState(!1),[o,l]=L.useState(!1),[c,d]=L.useState(0),h=Sr();L.useEffect(()=>{(async()=>{try{const j=await pe.auth.me();t((j==null?void 0:j.role)==="admin")}catch{t(!1)}})()},[]),L.useEffect(()=>{const w=()=>{l(window.scrollY>400);const j=document.getElementById("timeline-container");if(j){const N=j.getBoundingClientRect(),_=N.top+window.scrollY,S=N.height,A=window.scrollY-_+window.innerHeight/2,T=Math.max(0,Math.min(100,A/S*100));d(T)}};return window.addEventListener("scroll",w),w(),()=>window.removeEventListener("scroll",w)},[]);const u=()=>{window.scrollTo({top:0,behavior:"smooth"})},{data:f=[]}=xt({queryKey:["timeline-events"],queryFn:async()=>await pe.entities.TimelineEvent.list("display_order",100)||[]}),m=Tt({mutationFn:w=>pe.entities.TimelineEvent.create(w),onSuccess:()=>{h.invalidateQueries(["timeline-events"]),a(null)}}),b=Tt({mutationFn:({id:w,data:j})=>pe.entities.TimelineEvent.update(w,j),onSuccess:()=>{h.invalidateQueries(["timeline-events"]),a(null)}}),g=Tt({mutationFn:w=>pe.entities.TimelineEvent.delete(w),onSuccess:()=>h.invalidateQueries(["timeline-events"])}),y=async w=>{var N;const j=(N=w.target.files)==null?void 0:N[0];if(j){i(!0);try{const{file_url:_}=await pe.integrations.Core.UploadFile({file:j});a({...r,image_url:_})}catch(_){console.error("Upload failed:",_)}i(!1)}},x=()=>{r&&(r.id?b.mutate({id:r.id,data:r}):m.mutate(r))};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-slate-100",children:[n.jsxs("section",{className:"relative bg-gradient-to-r from-primary-navy via-indigo-900 to-primary-navy text-white py-24 overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 opacity-10",children:n.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(222,192,105,0.3),transparent_50%)]"})}),n.jsxs("div",{className:"relative max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsx("div",{className:"w-20 h-20 bg-accent-gold/20 rounded-full flex items-center justify-center mx-auto mb-6 backdrop-blur-sm border-2 border-accent-gold/30",children:n.jsx(za,{className:"w-10 h-10 text-accent-gold"})}),n.jsx("h1",{className:"text-5xl md:text-6xl font-bold mb-6 tracking-tight",children:n.jsx(ht,{contentKey:"history_hero_title",defaultValue:"Our History",page:"History",description:"Main heading on History page",type:"heading"})}),n.jsx("p",{className:"text-xl text-gray-200 max-w-3xl mx-auto leading-relaxed",children:n.jsx(ht,{contentKey:"history_hero_subtitle",defaultValue:"The journey of the National Charity Today Awards™ from vision to reality, celebrating excellence in the UK charity sector.",page:"History",description:"Hero subtitle on History page",type:"paragraph",className:"text-white/90"})})]})]}),n.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-20",children:[n.jsxs("div",{className:"mb-20 text-center",children:[n.jsx("div",{className:"inline-block px-6 py-2 bg-accent-gold/10 rounded-full mb-6",children:n.jsx("span",{className:"text-primary-navy font-semibold text-sm uppercase tracking-wider",children:n.jsx(ht,{contentKey:"history_story_label",defaultValue:"Our Story",page:"History",description:"Section label before introduction",type:"text"})})}),n.jsx("p",{className:"text-xl text-gray-700 leading-relaxed max-w-4xl mx-auto",children:n.jsx(ht,{contentKey:"history_story_text",defaultValue:"Since our inception, the National Charity Today Awards™ has been committed to recognising and celebrating the remarkable work of charities across the United Kingdom. Our journey reflects our dedication to fairness, transparency, and independence in honouring those who make a genuine difference.",page:"History",description:"Introduction paragraph on History page",type:"paragraph"})})]}),e&&n.jsx("div",{className:"mb-12 flex justify-center",children:n.jsxs(Nn,{children:[n.jsx(M1,{asChild:!0,children:n.jsxs(me,{onClick:()=>a({year:"",title:"",description:"",image_url:"",display_order:f.length}),className:"bg-accent-gold text-primary-navy hover:bg-accent-gold/90 font-semibold shadow-lg",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Timeline Event"]})}),n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{children:r!=null&&r.id?"Edit Timeline Event":"Add Timeline Event"})}
1781),r&&n.jsxs("div",{className:"space-y-4 mt-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Year"}),n.jsx(Me,{value:(r==null?void 0:r.year)||"",onChange:w=>a({...r,year:w.target.value}),placeholder:"e.g., 2024"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Title"}),n.jsx(Me,{value:(r==null?void 0:r.title)||"",onChange:w=>a({...r,title:w.target.value}),placeholder:"Event title"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Description"}),n.jsx(en,{value:(r==null?void 0:r.description)||"",onChange:w=>a({...r,description:w.target.value}),placeholder:"Event description",rows:4})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Image"}),(r==null?void 0:r.image_url)&&n.jsx("img",{src:r.image_url,alt:"Preview",className:"w-full h-48 object-cover rounded-lg mb-3"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(Me,{type:"file",accept:"image/*",onChange:y,disabled:s,className:"flex-1"}),s&&n.jsx("span",{className:"text-sm text-gray-500",children:"Uploading..."})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Display Order"}),n.jsx(Me,{type:"number",value:(r==null?void 0:r.display_order)||0,onChange:w=>a({...r,display_order:parseInt(w.target.value)})})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{onClick:x,className:"flex-1 bg-primary-navy text-white",children:"Save Event"}),n.jsx(me,{variant:"outline",onClick:()=>a(null),className:"flex-1",children:"Cancel"})]})]})]})]})}),n.jsxs("div",{id:"timeline-container",className:"relative",children:[n.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 h-full w-1 bg-accent-gold hidden md:block shadow-lg"}),n.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-1 bg-primary-navy hidden md:block shadow-lg transition-all duration-100 ease-out",style:{height:`${c}%`,top:0}}),n.jsxs("div",{className:"space-y-16",children:[f.map((w,j)=>{const N=j%2===0;return n.jsx("div",{className:"relative",children:n.jsxs("div",{className:`flex items-center ${N?"md:flex-row":"md:flex-row-reverse"} flex-col gap-8`,children:[n.jsx("div",{className:"w-full md:w-5/12",children:n.jsxs(_e,{className:"shadow-2xl border-none hover:shadow-3xl transition-all duration-500 overflow-hidden group bg-white",children:[w.image_url&&n.jsx("div",{className:"h-56 overflow-hidden",children:n.jsx("img",{src:w.image_url,alt:w.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"})}),n.jsxs(Ce,{className:"pt-8 pb-8 px-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("div",{className:"flex items-center gap-4",children:n.jsx("div",{className:"inline-block bg-accent-gold px-6 py-3 rounded-lg shadow-md",children:n.jsx("div",{className:"text-4xl font-bold text-primary-navy",children:w.year})})}),e&&n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(Nn,{children:[n.jsx(M1,{asChild:!0,children:n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>a(w),className:"hover:bg-accent-gold/10",children:n.jsx(c3,{className:"w-4 h-4 text-primary-navy"})})}),n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{children:"Edit Timeline Event"})}),r&&n.jsxs("div",{className:"space-y-4 mt-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Year"}),n.jsx(Me,{value:(r==null?void 0:r.year)||"",onChange:_=>a({...r,year:_.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Title"}),n.jsx(Me,{value:(r==null?void 0:r.title)||"",onChange:_=>a({...r,title:_.target.value})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Description"}),n.jsx(en,{value:(r==null?void 0:r.description)||"",onChange:_=>a({...r,description:_.target.value}),rows:4})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Image"}),(r==null?void 0:r.image_url)&&n.jsx("img",{src:r.image_url,alt:"Preview",className:"w-full h-48 object-cover rounded-lg mb-3"}),n.jsx(Me,{type:"file",accept:"image/*",onChange:y,disabled:s})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium mb-2",children:"Display Order"}),n.jsx(Me,{type:"number",value:(r==null?void 0:r.display_order)||0,onChange:_=>a({...r,display_order:parseInt(_.target.value)})})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsx(me,{onClick:x,className:"flex-1 bg-primary-navy text-white",children:"Save Changes"}),n.jsx(me,{variant:"outline",onClick:()=>a(null),className:"flex-1",children:"Cancel"})]})]})]})]}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>{confirm("Delete this timeline event?")&&g.mutate(w.id)},className:"hover:bg-red-50",children:n.jsx(tr,{className:"w-4 h-4 text-red-600"})})]})]}),n.jsx("h3",{className:"text-2xl font-bold text-primary-navy mb-4 leading-tight",children:w.title}),n.jsx("p",{className:"text-gray-700 leading-relaxed text-lg",children:w.description})]})]})}),n.jsx("div",{className:"hidden md:block w-2/12 flex-shrink-0",children:n.jsx("div",{className:"relative",children:n.jsx("div",{className:"w-10 h-10 bg-accent-gold rounded-full border-4 border-white shadow-2xl mx-auto relative z-10"})})}
1781),n.jsx("div",{className:"hidden md:block w-5/12"})]})},w.id)}),n.jsx("div",{className:"relative mt-32 md:mt-40 mb-40",children:n.jsx("div",{className:"flex items-center justify-center",children:n.jsxs("div",{className:"relative pb-28",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold rounded-full border-4 border-white shadow-2xl flex items-center justify-center relative z-10",children:n.jsx(Xu,{className:"w-8 h-8 text-primary-navy",fill:"currentColor"})}),n.jsx("div",{className:"absolute top-20 left-1/2 transform -translate-x-1/2",children:n.jsxs(Rt,{to:Ct("Nominations"),className:"block hover:scale-105 transition-transform",children:[n.jsxs("div",{className:"bg-primary-navy text-white px-6 py-3 rounded-lg shadow-lg font-semibold text-sm text-center max-w-sm",children:[n.jsx("div",{className:"font-bold mb-1",children:"You Are Here"}),n.jsx("div",{className:"text-xs text-gray-300",children:"Now is your time to shine, nominate today!"})]}),n.jsx("div",{className:"w-0 h-0 border-l-4 border-r-4 border-b-4 border-transparent border-b-primary-navy absolute -top-1 left-1/2 transform -translate-x-1/2 rotate-180"})]})})]})})})]})]}),n.jsx("div",{className:"mt-24",children:n.jsxs(_e,{className:"shadow-2xl border-none bg-gradient-to-r from-primary-navy via-indigo-900 to-primary-navy text-white overflow-hidden relative",children:[n.jsx("div",{className:"absolute inset-0 opacity-10",children:n.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_30%_50%,rgba(222,192,105,0.4),transparent_60%)]"})}),n.jsxs(Ce,{className:"py-16 px-8 text-center relative z-10",children:[n.jsx("div",{className:"w-16 h-16 bg-accent-gold/20 rounded-full flex items-center justify-center mx-auto mb-6 backdrop-blur-sm border-2 border-accent-gold/30",children:n.jsx(bn,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("h2",{className:"text-4xl font-bold mb-6",children:n.jsx(ht,{contentKey:"history_future_title",defaultValue:"Looking to the Future",page:"History",description:"Future section heading on History page",type:"heading",className:"text-white"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed max-w-3xl mx-auto",children:n.jsx(ht,{contentKey:"history_future_text",defaultValue:"As we continue to grow, our commitment remains unchanged: to provide a platform that recognises genuine excellence, maintains the highest standards of integrity, and celebrates the incredible work being done across the UK charity sector. We look forward to many more years of honouring those who make a real difference.",page:"History",description:"Future section paragraph on History page",type:"paragraph",className:"text-white/90"})})]})]})})]})]}),o&&n.jsx("button",{onClick:u,className:"fixed bottom-8 right-8 w-14 h-14 bg-accent-gold hover:bg-accent-gold/90 text-primary-navy rounded-full shadow-2xl flex items-center justify-center transition-all duration-300 hover:scale-110 z-50 group","aria-label":"Back to top",children:n.jsx(Oq,{className:"w-6 h-6 group-hover:-translate-y-0.5 transition-transform"})})]})}const ix=(e,t)=>{if(!e||!t)return"";const r=e.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,""),a=t.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"").substring(0,100);return`${r}-${a}`},z6e=e=>{if(!e)return{category:null,titleSlug:null};const t={"news-and-updates":"News and Updates","guidance-and-how-to-content":"Guidance and How To Content","sponsorship-and-partner-focus":"Sponsorship and Partner Focus","impact-and-legacy-stories":"Impact and Legacy Stories","behind-the-scenes":"Behind the Scenes","event-and-awards-day-content":"Event and Awards Day Content","strategic-thought-leadership":"Strategic Thought Leadership"},r=Object.keys(t);let a=null,s=null;for(const i of r)if(e.startsWith(i+"-")){a=t[i],s=e.substring(i.length+1);break}return{category:a,titleSlug:s}};function V6e(){var S;const[e,t]=we.useState(!1),[r,a]=we.useState({days:0,hours:0,minutes:0,seconds:0}),[s,i]=we.useState(!1),{data:o=[]}=xt({queryKey:["featuredWinners"],queryFn:()=>pe.entities.Winner.filter({featured:!0},"-year",3)}),{data:l=[]}=xt({queryKey:["featuredNews"],queryFn:()=>pe.entities.NewsArticle.filter({is_featured:!0,is_published:!0},"-published_date",3)}),{data:c=[]}=xt({queryKey:["activeSponsors"],queryFn:()=>pe.entities.Sponsor.filter({is_active:!0},"display_order",6)}),{data:d=[]}=xt({queryKey:["homeVideos"],queryFn:()=>pe.entities.HomeVideo.filter({is_active:!0},"display_order",1)}),{data:h=[]}=xt({queryKey:["homePageConfig"],queryFn:()=>pe.entities.HomePageConfig.list("-created_date",1)}),{data:u=[]}=xt({queryKey:["featuredTestimonialsHome"],queryFn:()=>pe.entities.Testimonial.filter({is_featured:!0,is_active:!0},"display_order",3)}),{data:f=[]}=xt({queryKey:["categoriesForSchema"],queryFn:()=>pe.entities.Category.filter({is_active:!0},"display_order",50)}),{data:m=[]}=xt({queryKey:["nominationsWindow"],queryFn:()=>pe.entities.NominationsWindow.list("-updated_date",1)}),b=m[0]||null,g=(()=>
1781{if(!b)return"Open";if(b.manualOverrideEnabled||b.status==="Closed"||b.status==="Upcoming")return b.status;const A=new Date,T=b.opensAt?new Date(b.opensAt):null,R=b.closesAt?new Date(b.closesAt):null;return T&&A<T?"Upcoming":R&&A>R?"Closed":"Open"})(),y=d[0],x=((S=h[0])==null?void 0:S.show_sponsors_section)!==!1;we.useEffect(()=>{(async()=>{try{const T=await pe.auth.me();i((T==null?void 0:T.role)==="admin")}catch{i(!1)}})()},[]),we.useEffect(()=>{const A=new Date("2026-10-14T12:00:00").getTime(),T=()=>{const M=new Date().getTime(),k=A-M;k>0?a({days:Math.floor(k/(1e3*60*60*24)),hours:Math.floor(k%(1e3*60*60*24)/(1e3*60*60)),minutes:Math.floor(k%(1e3*60*60)/(1e3*60)),seconds:Math.floor(k%(1e3*60)/1e3)}):a({days:0,hours:0,minutes:0,seconds:0})};T();const R=setInterval(T,1e3);return()=>clearInterval(R)},[]);const w=()=>{const A={title:"The National Charity Today Awards™ Gala Lunch",description:"Join us for the prestigious National Charity Today Awards ceremony celebrating excellence in the UK charity sector.",location:"Holiday Inn Peterborough West, Thorpe Wood, Peterborough PE3 6SG",start:"2026-10-14T12:00:00",end:"2026-10-14T17:00:00"},T=`BEGIN:VCALENDAR
1782VERSION:2.0
1783PRODID:-//National Charity Today Awards//EN
1784BEGIN:VEVENT
1785UID:[email protected]
1786DTSTAMP:${new Date().toISOString().replace(/[-:]/g,"").split(".")[0]}Z
1787DTSTART:${A.start.replace(/[-:]/g,"")}
1788DTEND:${A.end.replace(/[-:]/g,"")}
1789SUMMARY:${A.title}
1790DESCRIPTION:${A.description}
1791LOCATION:${A.location}
1792STATUS:CONFIRMED
1793SEQUENCE:0
1794END:VEVENT
1795END:VCALENDAR`,R=new Blob([T],{type:"text/calendar;charset=utf-8"}),M=document.createElement("a");M.href=window.URL.createObjectURL(R),M.download="NCTA-Gala-Lunch-2026.ics",document.body.appendChild(M),M.click(),document.body.removeChild(M)},j=A=>{var T,R,M;return A?A.includes("youtube.com")||A.includes("youtu.be")?`https://www.youtube.com/embed/${A.includes("youtu.be")?(T=A.split("youtu.be/")[1])==null?void 0:T.split("?")[0]:(R=A.split("v=")[1])==null?void 0:R.split("&")[0]}?${e?"autoplay=1&modestbranding=1&rel=0&controls=1&showinfo=0&fs=1":"modestbranding=1&rel=0&controls=0&showinfo=0"}`:A.includes("vimeo.com")?`https://player.vimeo.com/video/${(M=A.split("vimeo.com/")[1])==null?void 0:M.split("?")[0]}?${e?"autoplay=1&color=dec069&title=0&byline=0&portrait=0":"color=dec069&title=0&byline=0&portrait=0"}`:A:null},N=A=>{var T,R;return A&&(A.includes("youtube.com")||A.includes("youtu.be"))?`https://img.youtube.com/vi/${A.includes("youtu.be")?(T=A.split("youtu.be/")[1])==null?void 0:T.split("?")[0]:(R=A.split("v=")[1])==null?void 0:R.split("&")[0]}/maxresdefault.jpg`:null},_=async()=>{var R;const A=(R=h[0])==null?void 0:R.id,T=!x;A?await pe.entities.HomePageConfig.update(A,{show_sponsors_section:T}):await pe.entities.HomePageConfig.create({show_sponsors_section:T}),window.location.reload()};return n.jsxs("div",{className:"overflow-hidden",children:[n.jsx("style",{children:`
1796        @keyframes sparkle-sweep {
1797          0% {
1798            background-position: -100% center;
1799          }
1800          100% {
1801            background-position: 200% center;
1802          }
1803        }
1804        
1805        @keyframes twinkle {
1806          0%, 100% {
1807            opacity: 0;
1808          }
1809          50% {
1810            opacity: 1;
1811          }
1812        }
1813        
1814        .sparkle-text {
1815          background: linear-gradient(
1816            90deg,
1817            #dec069 0%,
1818            #dec069 40%,
1819            #ffffff 50%,
1820            #dec069 60%,
1821            #dec069 100%
1822          );
1823          background-size: 200% auto;
1824          background-clip: text;
1825          -webkit-background-clip: text;
1826          -webkit-text-fill-color: transparent;
1827          animation: sparkle-sweep 4s linear infinite;
1828        }
1829      `}),n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white",children:[n.jsx("div",{className:"absolute inset-0 bg-[url('https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/9d5c51f60_Screenshot2025-10-20at162435.png')] bg-cover bg-center opacity-5"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-4 pb-16 lg:pt-8 lg:pb-40",children:n.jsxs(lt.div,{initial:{opacity:0,y:30}
1829,animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-4xl mx-auto",children:[n.jsx("div",{className:"flex justify-center mb-8",children:n.jsxs("div",{className:"relative inline-block",children:[n.jsx("div",{className:"absolute -inset-8 bg-gradient-to-r from-accent-gold via-yellow-400 to-accent-gold rounded-full blur-3xl opacity-40 animate-pulse"}),n.jsx("div",{className:"relative",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-64 h-64 object-contain drop-shadow-2xl"})})]})}),n.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-7xl font-bold mb-6 leading-tight",children:n.jsx(ht,{contentKey:"home_hero_title",defaultValue:"Celebrating Excellence in the UK Charity Sector",page:"Home",description:"Main hero heading on homepage",type:"heading"})}),n.jsx("p",{className:"text-lg sm:text-xl text-white/90 mb-10 leading-relaxed max-w-3xl mx-auto",children:n.jsx(ht,{contentKey:"home_hero_subtitle",defaultValue:"The National Charity Today Awards™ recognise outstanding achievements, innovation, and impact across the UK's vital charity sector. Join us in honouring those who make a difference.",page:"Home",description:"Hero subtitle on homepage",type:"paragraph"})}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center items-center relative z-10",children:[n.jsx(Rt,{to:Ct("Nominations"),className:"w-full sm:w-auto",children:n.jsxs(me,{size:"lg",className:"w-full sm:w-auto bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-7 text-lg shadow-2xl shadow-accent-gold/50 hover:shadow-accent-gold/70 transition-all duration-300 border-2 border-accent-gold hover:scale-105 [&:hover]:text-primary-navy",children:["Submit Your Nomination",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})}),n.jsx(Rt,{to:Ct("Categories"),className:"w-full sm:w-auto block",children:n.jsx(me,{size:"lg",className:"w-full sm:w-auto bg-white/10 backdrop-blur-sm text-white font-semibold px-10 py-7 text-lg border-2 border-white/50 transition-all duration-300 hover:scale-105 shadow-lg hover:bg-white hover:border-white [&:hover]:text-[#06053e]",children:"View Award Categories"})})]}),n.jsx("div",{className:"hidden sm:flex justify-center mt-8 relative z-50",children:g==="Closed"?n.jsxs("div",{className:"inline-flex items-center gap-2 bg-red-900/40 backdrop-blur-sm border-2 border-red-400/60 rounded-full px-6 py-3",children:[n.jsx(Qu,{className:"w-5 h-5 text-red-400"}),n.jsx("span",{className:"text-base font-bold text-red-300 uppercase tracking-wider",children:"Nominations Closed"})]}):s?n.jsxs("div",{className:"inline-flex items-center gap-2 bg-emerald-900/40 backdrop-blur-sm border-2 border-emerald-400/60 rounded-full px-6 py-3",children:[n.jsx(Ia,{className:"w-5 h-5 text-emerald-400"}),n.jsx(ht,{contentKey:"home_hero_badge",defaultValue:"Nominations Now Open for 2026!",page:"Home",description:"Badge text in hero section",type:"text",className:"text-base font-semibold text-emerald-300"})]}):n.jsxs(Rt,{to:Ct("NominationJourney"),className:"inline-flex items-center gap-2 bg-emerald-900/40 backdrop-blur-sm border-2 border-emerald-400/60 rounded-full px-6 py-3 hover:bg-emerald-900/60 transition-all cursor-pointer",children:[n.jsx(Ia,{className:"w-5 h-5 text-emerald-400"}),n.jsx(ht,{contentKey:"home_hero_badge",defaultValue:"Nominations Now Open for 2026!",page:"Home",description:"Badge text in hero section",type:"text",className:"text-base font-semibold text-emerald-300"})]})})]})}),n.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-48 bg-gradient-to-b from-transparent via-[#8b7446] to-primary-navy pointer-events-none"})]}),y&&n.jsxs("section",{className:"py-12 lg:py-20 bg-gradient-to-br from-primary-navy via-[#1a1560] to-primary-navy relative overflow-hidden",children:[n.jsxs("div",{className:"absolute top-0 left-0 w-full h-full opacity-10",children:[n.jsx("div",{className:"absolute top-20 left-20 w-64 h-64 bg-accent-gold rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-20 right-20 w-96 h-96 bg-accent-gold rounded-full blur-3xl"})]}),n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-12",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 backdrop-blur-sm border border-accent-gold/40 rounded-full px-6 py-3 mb-6 shadow-xl",children:[n.jsx(ST,{className:"w-5 h-5 text-accent-gold"}),n.jsx("span",{className:"text-sm font-bold text-accent-gold uppercase tracking-wider",children:"Exclusive Showreel"})]}),n.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-white mb-6",children:n.jsx(ht,{contentKey:"home_video_title",defaultValue:"The Magic of the National Charity Today Awards™",page:"Home",description:"Video section title",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/80 max-w-3xl mx-auto leading-relaxed",children:n.jsx(ht,{contentKey:"home_video_subtitle",defaultValue:"A celebration of the people and organisations transforming lives across the UK.",page:"Home",description:"Video section subtitle",type:"text"})})]}),n.jsxs(lt.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},className:"relative max-w-6xl mx-auto",children:[n.jsx("div",{className:"absolute -inset-4 bg-gradient-to-r from-accent-gold via-yellow-400 to-accent-gold rounded-3xl blur-2xl opacity-30 animate-pulse"}),n.jsx("div",{className:"relative bg-gradient-to-br from-accent-gold via-yellow-300 to-accent-gold p-1 rounded-2xl shadow-2xl",children:n.jsx("div",{className:"bg-primary-navy p-4 rounded-2xl",children:n.jsxs("div",{className:"relative aspect-video rounded-xl overflow-hidden shadow-2xl border-4 border-accent-gold/30",children:[!e&&n.jsxs(n.Fragment,{children:[n.jsx("img",{src:N(y.video_url)||"https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=1920",alt:y.title,className:"absolute inset-0 w-full h-full object-cover"}),n.jsx("div",{className:"absolute inset-0 bg-black/40"}),n.jsx("button",{onClick:()=>t(!0),className:"absolute inset-0 flex items-center justify-center group cursor-pointer",children:n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute inset-0 bg-accent-gold rounded-full blur-3xl op
1829acity-50 group-hover:opacity-70 transition-opacity animate-pulse"}),n.jsx("div",{className:"relative w-24 h-24 bg-gradient-to-br from-accent-gold to-[#e8ca7a] rounded-full flex items-center justify-center shadow-2xl group-hover:scale-110 transition-transform duration-300",children:n.jsx(ST,{className:"w-12 h-12 text-primary-navy ml-2 fill-current"})})]})})]}),e&&n.jsx("iframe",{src:j(y.video_url),title:y.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full"})]})})}),n.jsx("div",{className:"absolute -top-6 -left-6 w-24 h-24 border-t-4 border-l-4 border-accent-gold rounded-tl-3xl opacity-60"}),n.jsx("div",{className:"absolute -top-6 -right-6 w-24 h-24 border-t-4 border-r-4 border-accent-gold rounded-tr-3xl opacity-60"}),n.jsx("div",{className:"absolute -bottom-6 -left-6 w-24 h-24 border-b-4 border-l-4 border-accent-gold rounded-bl-3xl opacity-60"}),n.jsx("div",{className:"absolute -bottom-6 -right-6 w-24 h-24 border-b-4 border-r-4 border-accent-gold rounded-br-3xl opacity-60"})]}),n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.3},className:"text-center mt-12",children:n.jsx("p",{className:"sparkle-text font-semibold text-2xl tracking-wide",children:"✦ Celebrating Over A Decade Of UK Charity Sector Excellence ✦"})})]})]}),n.jsxs("section",{className:"py-12 lg:py-20 bg-gradient-to-br from-accent-gold via-[#e8ca7a] to-accent-gold relative overflow-hidden",children:[n.jsxs("div",{className:"absolute top-0 left-0 w-full h-full opacity-10",children:[n.jsx("div",{className:"absolute top-20 left-20 w-64 h-64 bg-primary-navy rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-20 right-20 w-96 h-96 bg-primary-navy rounded-full blur-3xl"})]}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center",children:[n.jsxs("button",{onClick:w,"aria-label":"Download calendar event for the 2026 awards gala",className:"inline-flex items-center gap-2 bg-primary-navy/20 backdrop-blur-sm border border-primary-navy/30 rounded-full px-6 py-3 mb-6 shadow-xl hover:bg-primary-navy/30 transition-all cursor-pointer [&:hover]:text-primary-navy focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2",children:[n.jsx(za,{className:"w-5 h-5 text-primary-navy","aria-hidden":"true"}),n.jsx("span",{className:"text-sm font-bold text-primary-navy uppercase tracking-wider",children:"Save The Date"})]}),n.jsx("h2",{className:"text-4xl lg:text-6xl font-bold text-primary-navy mb-6",children:n.jsx(ht,{contentKey:"home_event_title",defaultValue:"The National Charity Today Awards™ Gala Lunch",page:"Home",description:"Event title on countdown section",type:"heading"})}),n.jsx("p",{className:"text-xl text-primary-navy/80 mb-4",children:n.jsx(ht,{contentKey:"home_event_datetime",defaultValue:"14 October 2026 • Doors Open 12:00 PM",page:"Home",description:"Event date and time",type:"text"})}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-8 max-w-4xl mx-auto mt-12",children:[{value:r.days,label:"Days"},{value:r.hours,label:"Hours"},{value:r.minutes,label:"Minutes"},{value:r.seconds,label:"Seconds"}].map((A,T)=>n.jsxs(lt.div,{initial:{opacity:0,scale:.8},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{delay:T*.1},className:"bg-primary-navy text-white rounded-2xl p-6 shadow-2xl",children:[n.jsx("div",{className:"text-5xl md:text-6xl font-bold mb-2 text-accent-gold",children:A.value.toString().padStart(2,"0")}),n.jsx("div",{className:"text-sm md:text-base font-semibold uppercase tracking-wider text-white/80",children:A.label})]},A.label))}),n.jsxs("div",{className:"mt-12 flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsx(Rt,{to:Ct("Schedule"),children:n.jsxs(me,{size:"lg",className:"bg-primary-navy text-white font-bold px-10 py-6 text-lg shadow-2xl transition-all duration-300 hover:scale-105 hover:bg-[#0f0d5e] hover:shadow-
1829primary-navy/50 hover:!text-white [&_svg]:!text-white",children:[n.jsx(la,{className:"mr-2 w-5 h-5"}),"View Event Schedule"]})}),n.jsx(Rt,{to:Ct("Venue"),children:n.jsxs(me,{size:"lg",className:"bg-white text-primary-navy font-bold px-10 py-6 text-lg shadow-xl transition-all duration-300 hover:scale-105 border-2 border-primary-navy hover:bg-primary-navy hover:border-primary-navy hover:!text-white [&_svg]:!text-white",children:["Venue Information",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})]})]})})]}),n.jsx("section",{className:"hidden md:block pt-12 pb-12 bg-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:[{icon:bn,label:"Award Categories",value:"13+"},{icon:Jr,label:"Charities Recognised",value:"150+"},{icon:ka,label:"Years Running",value:"12+"},{icon:ki,label:"Nominations 2025",value:"1,200+"}].map((A,T)=>n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:T*.1},viewport:{once:!0},className:"text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-primary-navy rounded-2xl flex items-center justify-center shadow-lg",children:n.jsx(A.icon,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("div",{className:"text-3xl font-bold text-primary-navy mb-1",children:A.value}),n.jsx("div",{className:"text-gray-600 font-medium",children:A.label})]},T))})})}),n.jsx("section",{className:"hidden lg:block py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[n.jsxs(lt.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:[n.jsx("h2",{className:"text-3xl lg:text-5xl font-bold text-primary-navy mb-6",children:n.jsx(ht,{contentKey:"home_about_title",defaultValue:"The UK's Premier Charity Awards Programme",page:"Home",description:"About section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-700 mb-6 leading-relaxed",children:n.jsx(ht,{contentKey:"home_about_p1",defaultValue:"Since our inception, the National Charity Today Awards™ have become the benchmark for excellence in the UK charity sector. We celebrate organisations and individuals who demonstrate exceptional impact, innovation, and dedication to making our communities better.",page:"Home",description:"About section paragraph 1",type:"paragraph"})}),n.jsx("p",{className:"text-lg text-gray-700 mb-8 leading-relaxed",children:n.jsx(ht,{contentKey:"home_about_p2",defaultValue:"Our rigorous judging process, featuring industry experts and sector leaders, ensures that every winner represents the very best in charitable work across the nation.",page:"Home",description:"About section paragraph 2",type:"paragraph"})}),n.jsx(Rt,{to:Ct("Categories"),children:n.jsxs(me,{size:"lg",className:"bg-primary-navy text-white font-semibold px-10 py-6 hover:bg-[#0f0d5e] hover:!text-white [&_svg]:!text-white",children:["Explore Categories",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})]}),n.jsx(lt.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"relative flex items-center justify-center",children:n.jsxs("div",{className:"relative",children:[n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards",className:"w-full max-w-md mx-auto drop-shadow-2xl"}),n.jsx("div",{className:"absolute -bottom-6 -left-6 bg-white p-6 rounded-xl shadow-lg border-2 border-accent-gold/20",children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-12 h-12 bg-accent-gold rounded-full flex items-center justify-center",children:n.jsx(bn,{className:"w-6 h-6 text-primary-navy"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-2xl font-bold text-primary-navy",children:"2026"}),n.jsx("div",{className:"text-sm text-gray-600",children:"Awards Season"})]})]})})]})})]})})}),o.length>0&&n.jsx("section",{className:"py-12 lg:py-20 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"home_winners_title",defaultValue:"Celebrating Our Winners",page:"Home",description:"Featured winners section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:n.jsx(ht,{contentKey:"home_winners_subtitle",defaultValue:"Recognising exceptional charities and individuals who have made outstanding contributions to society",page:"Home",description:"Featured winners section subtitle",type:"paragraph"})})]}),n.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:o.map(A=>n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"bg-gradient-to-br from-gray-50 to-blue-50 rounded-2xl p-8 hover:shadow-xl transition-shadow duration-300 border-2 border-transparent hover:border-accent-gold/20",children:[A.image_url&&n.jsx("img",{src:A.image_url,alt:A.winner_name,className:"w-full h-48 object-cover rounded-xl mb-6"}),n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(bn,{className:"w-5 h-5 text-accent-gold"}),n.jsxs("span",{className:"text-sm font-semibold text-accent-gold",children:[A.year," Winner"]})]}),A.categories&&A.categories.length>0?n.jsx("div",{className:"mb-2",children:A.categories.map((T,R)=>n.jsxs("h3",{className:"text-xl font-bold text-primary-navy",children:[T,R<A.categories.length-1?" & ":""]},R))}):A.category?n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-2",children:A.category}
1829):null,n.jsx("p",{className:"text-primary-navy/70 font-medium mb-3",children:A.winner_name}),n.jsx("p",{className:"text-gray-600 leading-relaxed",children:A.description})]},A.id))}),n.jsx("div",{className:"text-center mt-12",children:n.jsx(Rt,{to:Ct("PastWinners"),children:n.jsxs(me,{size:"lg",className:"bg-white text-primary-navy border-2 border-primary-navy font-semibold px-10 py-6 hover:bg-primary-navy hover:border-primary-navy hover:!text-white [&_svg]:!text-white",children:["View All Winners",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})})]})}),l.length>0&&n.jsx("section",{className:"py-12 lg:py-20 bg-gray-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"home_news_title",defaultValue:"Latest News & Updates",page:"Home",description:"Featured news section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600",children:n.jsx(ht,{contentKey:"home_news_subtitle",defaultValue:"Stay informed about announcements, judging updates, and event details",page:"Home",description:"Featured news section subtitle",type:"text"})})]}),n.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:l.map(A=>n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"bg-white rounded-xl overflow-hidden shadow-lg hover:shadow-2xl transition-shadow duration-300",children:[A.image_url&&n.jsx("img",{src:A.image_url,alt:A.title,className:"w-full h-48 object-cover"}),n.jsxs("div",{className:"p-6",children:[n.jsx("div",{className:"text-sm text-accent-gold font-semibold mb-2",children:A.category}),n.jsx(Rt,{to:`${Ct("NewsDetail")}?slug=${ix(A.category,A.title)}`,children:n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-3 cursor-pointer hover:text-accent-gold transition-colors",children:A.title})}),n.jsx("p",{className:"text-gray-600 mb-4",children:A.excerpt}),n.jsx(Rt,{to:`${Ct("NewsDetail")}?slug=${ix(A.category,A.title)}`,children:n.jsxs(me,{variant:"link",className:"text-primary-navy p-0",children:["Read more ",n.jsx(Ci,{className:"ml-1 w-4 h-4"})]})})]})]},A.id))}),n.jsx("div",{className:"text-center mt-12",children:n.jsx(Rt,{to:Ct("News"),children:n.jsxs(me,{size:"lg",className:"bg-white text-primary-navy border-2 border-gray-300 font-semibold px-10 py-6 hover:bg-primary-navy hover:border-primary-navy hover:!text-white [&_svg]:!text-white",children:["View All News",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})})]})}),c.length>0&&x&&n.jsxs("section",{className:"py-12 lg:py-20 bg-gradient-to-br from-primary-navy via-[#1a1560] to-primary-navy relative overflow-hidden",children:[n.jsxs("div",{className:"absolute top-0 left-0 w-full h-full opacity-5",children:[n.jsx("div",{className:"absolute top-20 left-20 w-64 h-64 bg-accent-gold rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-20 right-20 w-96 h-96 bg-accent-gold rounded-full blur-3xl"})]}),n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 backdrop-blur-sm border border-accent-gold/40 rounded-full px-6 py-3 mb-6 shadow-xl",children:[n.jsx(ki,{className:"w-5 h-5 text-accent-gold"}),n.jsx("span",{className:"text-sm font-bold text-accent-gold uppercase tracking-wider",children:"Our Prestigious Partners"}),s&&n.jsx("button",{onClick:_,className:"ml-2 p-1.5 bg-white/20 hover:bg-white/30 rounded-full transition-colors",title:"Hide sponsors section",children:n.jsx(Ey,{className:"w-4 h-4 text-white"})})]}),n.jsx("h2",{className:"text-4xl lg:text-5xl font-bold text-white mb-6",children:n.jsx(ht,{contentKey:"home_sponsors_title",defaultValue:"Supporting Excellence Together",page:"Home",description:"Sponsors section title",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/80 max-w-2xl mx-auto",children:n.jsx(ht,{contentKey:"home_sponsors_subtitle",defaultValue:"We're proud to partner with leading organisations who share our commitment to celebrating excellence in the UK charity sector",page:"Home",description:"Sponsors section subtitle",type:"paragraph"})})]}),n.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-8 py-8",children:c.map(A=>n.jsx("a",{href:A.website_url||"#",target:"_blank",rel:"noopener noreferrer",children:n.jsxs("div",{className:"bg-white/95 backdrop-blur-sm rounded-xl md:rounded-2xl p-4 md:p-8 h-32 md:h-48 flex items-center justify-center shadow-lg md:shadow-2xl border border-accent-gold/20 hover:border-accent-gold hover:scale-105 transition-all duration-300 group cursor-pointer relative overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-transparent via-accent-gold/20 to-transparent translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700"}),A.logo_url?n.jsx("img",{src:A.logo_url,alt:A.name,className:"max-h-full max-w-full w-auto object-contain relative z-10 hover:opacity-80 transition-opacity"}):n.jsxs("div",{className:"flex flex-col items-center justify-center text-center relative z-10",children:[n.jsx(ms,{className:"w-10 h-10 md:w-16 md:h-16 text-gray-400 group-hover:text-primary-navy transition-colors mb-2 md:mb-3"}),n.jsx("span",{className:"text-gray-600 font-semibold text-sm md:text-base group-hover:text-primary-navy transition-colors line-clamp-2",children:A.name})]})]})},A.id))}),n.jsx("div",{className:"text-center mt-8",children:n.jsx(Rt,{to:Ct("Sponsors"),children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg shadow-2xl hover:shadow-accent-gold/50 transition-all duration-300 hover:scale-105 [&:hover]:text-primary-navy",children:["View All Partners",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})})]})]}),s&&!x&&c.length>0&&n.jsx("section",{className:"py-8 bg-gray-100",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:n.jsxs(me,{onClick:_,size:"lg",className:"bg-white text-primary-navy border-2 border-primary-navy font-semibold px-10 py-6 hover:bg-primary-navy hover:border-primary-navy hover:!text-white [&_svg]:!text-white",children:[n.jsx(sd,{className:"w-5 h-5 mr-2"}),"Show Sponsors Section"]})})}),n.jsx("section",{className:"py-12 lg:py-20 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(tm,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"What People Say"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"home_testimonials_title",defaultValue:"Voices from the Community",page:"Home",description:"Testimonials section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:n.jsx(ht,{contentKey:"home_testimonials_subtitle",defaultValue:"Hear from winners, finalists, and sponsors about their experience with the National Charity Today Awards™",page:"Home",description:"Testimonials section subtitle",type:"paragraph"})})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:u.map((A,T)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:T*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full border-none shadow-xl hover:shadow-2xl transition-all duration-300",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[A.image_url?n.jsx("img",{src:A.image_url,alt:A.name,className:"w-14 h-14 roun
1829ded-full border-2 border-accent-gold shadow-lg object-cover"}):n.jsx("div",{className:"w-14 h-14 rounded-full border-2 border-accent-gold shadow-lg bg-gray-200 flex items-center justify-center",children:n.jsx(tm,{className:"w-6 h-6 text-gray-400"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-primary-navy",children:A.name}),A.role&&n.jsx("p",{className:"text-gray-600 text-sm",children:A.role}),A.organization&&n.jsx("p",{className:"text-gray-500 text-xs",children:A.organization})]})]}),n.jsxs("p",{className:"text-gray-700 leading-relaxed mb-4 italic text-sm",children:['"',A.quote,'"']}),n.jsxs("div",{className:"flex flex-col gap-2",children:[A.category&&n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-primary-navy/10 rounded-lg px-3 py-2 border border-primary-navy/20",children:[n.jsx(bn,{className:"w-4 h-4 text-primary-navy"}),n.jsx("span",{className:"font-semibold text-primary-navy capitalize",children:A.category})]}),A.awards&&A.awards.length>0&&A.awards.map((R,M)=>n.jsxs("div",{className:"flex items-center gap-2 text-xs bg-accent-gold/10 rounded-lg px-3 py-2 border border-accent-gold/20",children:[n.jsx(bn,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"font-semibold text-primary-navy",children:R})]},M))]})]})})},A.id))}),n.jsx("div",{className:"text-center mt-8 lg:mt-12",children:n.jsx(Rt,{to:Ct("Testimonials"),children:n.jsxs(me,{size:"lg",className:"bg-white text-primary-navy border-2 border-primary-navy font-semibold px-10 py-6 hover:bg-primary-navy hover:border-primary-navy hover:!text-white [&_svg]:!text-white",children:["View All Testimonials",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})})]})})]})}function H6e(e){if(!e)return"Open";if(e.manualOverrideEnabled||e.status==="Closed"||e.status==="Upcoming")return e.status;const t=new Date,r=e.opensAt?new Date(e.opensAt):null,a=e.closesAt?new Date(e.closesAt):null;return r&&t<r?"Upcoming":a&&t>a?"Closed":"Open"}function W6e({children:e,className:t="",size:r="lg",closedLabel:a="Nominations Closed"}){const{data:s=[]}=xt({queryKey:["nominationsWindow"],queryFn:()=>pe.entities.NominationsWindow.list("-updated_date",1),staleTime:3e4});return H6e(s[0]||null)==="Closed"?n.jsxs(me,{size:r,disabled:!0,className:"bg-red-600/90 text-white opacity-90 cursor-not-allowed font-bold px-10 py-6 text-lg shadow-xl",children:[n.jsx(Qu,{className:"mr-2 w-5 h-5"}),a]}):n.jsx(Rt,{to:Ct("Nominations"),children:n.jsx(me,{size:r,className:t,children:e})})}function K6e(){return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1569025690938-a00729c9e1f9?w=1920')] bg-cover bg-center"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 backdrop-blur-sm border border-accent-gold/40 rounded-full px-6 py-3 mb-6 shadow-xl",children:[n.jsx(ps,{className:"w-5 h-5 text-accent-gold"}),n.jsx("span",{className:"text-sm font-bold text-accent-gold uppercase tracking-wider",children:"Special Recognition"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"james_smith_hero_title",defaultValue:"The James E. Smith Special Recognition Award",page:"JamesESmithAward",description:"Main heading on James E Smith Award page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"james_smith_hero_subtitle",defaultValue:"Honouring extraordinary commitment, courage, and impact in the charity sector",page:"JamesESmithAward",description:"Hero subtitle on James E Smith Award page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[n.jsxs(lt.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary-navy
1829/10 rounded-full px-4 py-2 mb-6",children:[n.jsx(ps,{className:"w-5 h-5 text-primary-navy"}),n.jsx("span",{className:"text-sm font-bold text-primary-navy uppercase tracking-wider",children:"In Loving Memory"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-6",children:n.jsx(ht,{contentKey:"james_smith_tribute_name",defaultValue:"Private James E. Smith",page:"JamesESmithAward",description:"Tribute section name",type:"heading"})}),n.jsxs("div",{className:"space-y-4 text-lg text-gray-700 leading-relaxed",children:[n.jsx("p",{className:"font-semibold text-primary-navy",children:n.jsx(ht,{contentKey:"james_smith_tribute_dates",defaultValue:"January 1919 - December 2013 (Aged 94)",page:"JamesESmithAward",description:"Life dates",type:"text"})}),n.jsx("p",{children:n.jsx(ht,{contentKey:"james_smith_tribute_p1",defaultValue:"Private James E. Smith was a respected veteran of the British Army who served bravely in the Burma Campaign during World War II. A symbol of resilience, dedication, and unwavering courage, his legacy continues to inspire generations.",page:"JamesESmithAward",description:"Tribute paragraph 1",type:"paragraph"})}),n.jsx("p",{children:n.jsx(ht,{contentKey:"james_smith_tribute_p2",defaultValue:"He was the much-loved grandfather of National Charity Today Awards Founder, Lee B. Rayment, whose dedication to recognising excellence in the charity sector was deeply influenced by his grandfather's values of service, commitment, and compassion.",page:"JamesESmithAward",description:"Tribute paragraph 2",type:"paragraph"})}),n.jsx("p",{className:"italic text-gray-600",children:n.jsx(ht,{contentKey:"james_smith_tribute_quote",defaultValue:'"His bravery, strength, and dedication to serving others serve as the foundation for this special recognition award."',page:"JamesESmithAward",description:"Tribute quote",type:"text"})})]})]}),n.jsx(lt.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"relative",children:n.jsxs("div",{className:"relative",children:[n.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-primary-navy via-accent-gold to-primary-navy rounded-2xl opacity-20 blur-xl"}),n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/f5e415b0f_Jim.jpg",alt:"Private James E. Smith",className:"relative rounded-2xl shadow-2xl w-full"}),n.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-primary-navy to-transparent p-6 rounded-b-2xl",children:[n.jsx("p",{className:"text-white font-semibold text-center",children:"Private James E. Smith"}),n.jsx("p",{className:"text-white/80 text-sm text-center",children:"Burma Campaign, WWII Veteran"})]})]})})]})})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"james_smith_purpose_title",defaultValue:"Purpose of the Award",page:"JamesESmithAward",description:"Award purpose section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600 max-w-3xl mx-auto leading-relaxed",children:n.jsx(ht,{contentKey:"james_smith_purpose_description",defaultValue:"Named in honour of Private James E. Smith, this prestigious award recognises individuals or organisations who have demonstrated extraordinary commitment, courage, or impact in their charitable efforts, going above and beyond to create meaningful change.",page:"JamesESmithAward",description:"Award purpose description",type:"paragraph"})})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-8",children:[{icon:ps,title:"Exceptional Bravery",description:"Acts of exceptional bravery, determination, or leadership in the face of adversity",color:"from-red-500 to-red-600"},{icon:Sg,title:"Long-term Commitment",description:"Sustained dedication to a cause or community over an extended period",color:"from-pink-500 to-pink-600"},{icon:Jr,title:"Positive Impact",description:"Significant and measurable positive impact on the lives of others",color:"from-blue-500 to-blue-600"},{icon:ki,title:"Inspiring Stories",description:"Unique stories of overcoming challenges or achieving extraordinary results",color:"from-
1829amber-500 to-amber-600"}].map((e,t)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:t*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full border-none shadow-xl hover:shadow-2xl transition-all duration-300 group",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:`w-16 h-16 mx-auto mb-6 bg-gradient-to-br ${e.color} rounded-2xl flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform`,children:n.jsx(e.icon,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-3",children:e.title}),n.jsx("p",{className:"text-gray-600 leading-relaxed",children:e.description})]})})},t))})]})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-gray-50 to-blue-50 border-2 border-accent-gold/20 shadow-2xl",children:n.jsxs(Ce,{className:"pt-12 px-12 pb-8 text-center",children:[n.jsx("h2",{className:"text-3xl font-bold text-primary-navy mb-6",children:n.jsx(ht,{contentKey:"james_smith_cta_title",defaultValue:"Nominate Someone Extraordinary",page:"JamesESmithAward",description:"CTA section title",type:"heading"})}),n.jsx("p",{className:"text-xl text-gray-700 mb-8 leading-relaxed",children:n.jsx(ht,{contentKey:"james_smith_cta_description",defaultValue:"Know someone who embodies the spirit of Private James E. Smith? Submit a nomination for the special recognition award and help us celebrate their remarkable contributions.",page:"JamesESmithAward",description:"CTA description",type:"paragraph"})}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsxs(W6e,{className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg shadow-xl",children:["Submit Nomination",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]}),n.jsx(Rt,{to:Ct("Categories"),children:n.jsx(me,{size:"lg",variant:"outline",className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold px-10 py-6 text-lg",children:"View All Categories"})})]})]})})})})]})}function OY({config:e}){const t=(e==null?void 0:e.heading)||"The New National Charity Today Awards™ Website Is Coming Soon",r=(e==null?void 0:e.subheading)||"We're building a new digital home for the UK's premier national charity awards programme. Please check back soon for full details, categories, and how to enter.",a=(e==null?void 0:e.show_cta)!==!1,s=(e==null?void 0:e.cta_label)||"Contact the Awards Team",i=(e==null?void 0:e.cta_url)||"mailto:[email protected]",o=(e==null?void 0:e.footer_email)||"[email protected]",l=(e==null?void 0:e.logo_url)||"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png";return L.useEffect(()=>{const c=document.createElement("meta");return c.name="robots",c.content="noindex, nofollow",document.head.appendChild(c),()=>{document.head.removeChild(c)}},[]),n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-blue-50 flex flex-col items-center justify-center p-4 relative overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 opacity-[0.02]",style:{backgroundImage:"radial-gradient(circle at 2px 2px, #06053e 1px, transparent 0)",backgroundSize:"40px 40px"}}),n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center max-w-4xl relative z-10",children:[n.jsxs(lt.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.2,duration:.6},className:"mb-12",children:[n.jsxs("div",{className:"relative inline-block",children:[n.jsx("div",{className:"absolute inset-0 -m-16 bg-gradient-radial from-accent-gold/20 via-accent-gold/5 to-transparent rounded-full blur-3xl"}),n.jsx("div",{className:"relative",children:n.jsx("img",{src:l,alt:"National Charity Today Awards™",className:"w-64 sm:w-80 md:w-96 h-auto mx-auto drop-shadow-2xl",style:{filter:"drop-shadow(0 20px 40px rgba(6, 5, 62, 0.15)
1829)"}})})]}),n.jsx(lt.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4,duration:.6},className:"text-gray-600 text-sm sm:text-base mt-6 font-medium tracking-wide",children:"In partnership with Sinclair Method UK"})]}),n.jsx(lt.h1,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5,duration:.6},className:"text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold mb-8 leading-tight px-4 text-center",style:{color:"#06053e"},children:t}),n.jsx(lt.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6,duration:.6},className:"text-base sm:text-lg md:text-xl text-gray-700 mb-12 leading-relaxed max-w-3xl mx-auto px-4 text-center",children:r}),a&&n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7,duration:.6},className:"mb-16",children:n.jsxs("a",{href:i,className:"inline-flex items-center gap-3 px-8 py-4 text-lg font-bold rounded-xl transition-all duration-300 shadow-lg hover:shadow-2xl hover:scale-105",style:{backgroundColor:"#dec069",color:"#06053e",border:"2px solid #06053e"},children:[n.jsx(Xr,{className:"w-5 h-5"}),s]})}),n.jsxs(lt.div,{initial:{opacity:0}
1829,animate:{opacity:1},transition:{delay:.8,duration:.6},className:"text-sm text-gray-600 px-4 text-center",children:["Questions? Contact the Awards Team at"," ",n.jsx("a",{href:`mailto:${o}`,className:"font-semibold hover:underline",style:{color:"#06053e"},children:o})]}),n.jsx(lt.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1,duration:.6},className:"mt-12 flex justify-center gap-2",children:[0,1,2].map(c=>n.jsx(lt.div,{animate:{scale:[1,1.3,1],opacity:[.4,1,.4]},transition:{duration:2,repeat:1/0,delay:c*.3},className:"w-2 h-2 rounded-full",style:{backgroundColor:"#06053e"}},c))})]}),n.jsxs(lt.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.2,duration:.6},className:"absolute bottom-8 text-xs text-gray-500 text-center w-full",children:["© ",new Date().getFullYear()," National Charity Today Awards™ • A Charity Today Initiative"]}),n.jsx("style",{children:`
1830        .bg-gradient-radial {
1831          background: radial-gradient(circle, var(--tw-gradient-stops));
1832        }
1833      `})]})}function G6e(){const[e,t]=L.useState(null),[r,a]=L.useState(null),[s,i]=L.useState(null),[o,l]=L.useState(!0),[c,d]=L.useState(null),[h,u]=L.useState({}),[f,m]=L.useState(!1),b=Sr();L.useEffect(()=>{const N=new URLSearchParams(window.location.search).get("token");if(!N){d("Invalid access link. Please use the link from your confirmation email."),l(!1);return}t(N),g(N)},[]);const g=async j=>{try{const N=await pe.entities.TablePurchaseOrder.filter({access_token:j});if(!N||N.length===0){d("Booking not found. Please check your access link."),l(!1);return}const _=N[0];a(_);const S=await pe.entities.TableBooking.filter({table_number:_.assigned_table_number,contact_email:_.buyer_email});if(S&&S.length>0){i(S[0]);const A={},T=S[0].seats_detail||[];for(let R=1;R<=_.seats_purchased;R++){const M=T.find(k=>k.seat_number===R);A[R]=M||{seat_number:R,status:"reserved",guest_name:"",buyer_organization:_.buyer_organization,buyer_email:_.buyer_email,starter_choice:"bruschetta_tomatoes_peppers",main_choice:"salmon_herb_potatoes",dessert_choice:"chocolate_orange_tart",dietary_requirements:""}}u(A)}l(!1)}catch(N){console.error("Error loading booking:",N),d("Unable to load booking details. Please try again later."),l(!1)}};Tt({mutationFn:async j=>{const N=[...s.seats_detail||[]],_=N.findIndex(S=>S.seat_number===j.seat_number);return _>-1?N[_]=j:N.push(j),await pe.entities.TableBooking.update(s.id,{seats_detail:N})},onSuccess:j=>{i(j),b.invalidateQueries(["tableBookings"])}});const y=Tt({mutationFn:async()=>{const j=Object.values(h);return await pe.entities.TableBooking.update(s.id,{seats_detail:j,status:"confirmed"}),await pe.entities.TablePurchaseOrder.update(r.id,{guest_details_completed:!0}),await pe.integrations.Core.SendEmail({to:r.buyer_email,subject:`Guest Details Confirmed - ${r.assigned_table_number}`,body:`
1834Dear ${r.buyer_name},
1835
1836Thank you for submitting your guest details for the National Charity Today Awards™!
1837
1838BOOKING SUMMARY
1839━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1840Order Reference: ${r.order_reference}
1841Table Number: ${r.assigned_table_number}
1842Seats: ${r.seats_purchased}
1843Status: ✓ CONFIRMED
1844
1845Your guest details and menu selections have been confirmed. You can still update them anytime using your secure management link:
1846
1847${window.location.origin}/manage-guests?token=${e}
1848
1849EVENT DETAILS
1850━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1851Date: [Event Date]
1852Venue: Holiday Inn Peterborough West
1853Address: Thorpe Wood, Peterborough, PE3 6SG
1854Dress Code: Black Tie
1855
1856We look forward to celebrating with you and your guests!
1857
1858Best regards,
1859The NCTA Team
1860
1861━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1862© ${new Date().getFullYear()} National Charity Today Awards™
1863        `}),!0},onSuccess:()=>{m(!0),g(e)}}),x=(j,N,_)=>{u(S=>({...S,[j]:{...S[j],[N]:_}}))},w=()=>{if(!Object.values(h).every(N=>N.guest_name&&N.guest_name.trim()!==""&&N.buyer_email&&N.buyer_email.trim()!=="")){alert("Please ensure all guests have a name and email address before submitting.");return}y.mutate()};return o?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-accent-gold border-t-transparent mx-auto mb-4"}),n.jsx("p",{className:"text-gray-600",children:"Loading your booking..."})]})}):c?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Mr,{className:"w-16 h-16 mx-auto mb-6 text-red-600"}),n.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Access Error"}),n.jsx("p",{className:"text-gray-600 mb-6",children:c}),n.jsx(me,{onClick:()=>window.location.href="/",className:"bg-primary-navy",children:"Return to Home"})]})})}):f?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 to-blue-50 py-20",children:n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95}
1863,animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("div",{className:"w-24 h-24 bg-gradient-to-br from-green-500 to-emerald-500 rounded-full flex items-center justify-center mx-auto mb-6 shadow-2xl",children:n.jsx(Cn,{className:"w-14 h-14 text-white"})}),n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-4",children:"Guest Details Confirmed! ✓"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8",children:"All guest information has been submitted successfully"}),n.jsx(_e,{className:"border-none shadow-2xl mb-8",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"bg-gradient-to-br from-primary-navy to-accent-gold text-white rounded-xl p-6 mb-6",children:[n.jsx("div",{className:"text-sm font-semibold mb-2",children:"Your Table"}),n.jsx("div",{className:"text-3xl font-bold",children:r.assigned_table_number}),n.jsxs("div",{className:"text-sm opacity-90 mt-2",children:[r.seats_purchased," Confirmed Seats"]})]}),n.jsxs("div",{className:"text-left space-y-4",children:[n.jsxs("div",{className:"flex items-start gap-3 bg-green-50 border-2 border-green-200 rounded-lg p-4",children:[n.jsx(Cn,{className:"w-6 h-6 text-green-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"text-sm text-gray-700",children:[n.jsx("p",{className:"font-semibold text-primary-navy mb-1",children:"Confirmation Email Sent"}),n.jsxs("p",{children:["We've sent a confirmation to ",r.buyer_email]})]})]}),n.jsxs("div",{className:"flex items-start gap-3 bg-blue-50 border-2 border-blue-200 rounded-lg p-4",children:[n.jsx(Ia,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"text-sm text-gray-700",children:[n.jsx("p",{className:"font-semibold text-primary-navy mb-1",children:"You Can Still Make Changes"}),n.jsx("p",{children:"Use this page anytime to update guest details or menu choices"})]})]})]})]})}),n.jsx(me,{size:"lg",onClick:()=>m(!1),className:"bg-primary-navy hover:opacity-90 text-white",children:"View / Edit Guest Details"})]})})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-16",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm border border-white/30 rounded-full px-4 py-2 mb-4",children:[n.jsx(ps,{className:"w-4 h-4"}),n.jsx("span",{className:"text-sm font-medium",children:"Secure Guest Management"})]}),n.jsx("h1",{className:"text-3xl lg:text-5xl font-bold mb-4",children:n.jsx(ht,{contentKey:"manage_guests_hero_title",defaultValue:"Manage Your Guest List",page:"ManageGuests",description:"Main heading on Manage Guests page",type:"heading"})}),n.jsx("p",{className:"text-lg text-white/90",children:n.jsx(ht,{contentKey:"manage_guests_hero_subtitle",defaultValue:"Add names, menu preferences, and dietary requirements for your guests",page:"ManageGuests",description:"Hero subtitle on Manage Guests page",type:"paragraph"})})]})})}),n.jsx("section",{className:"py-8 -mt-8 relative z-10",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-4 gap-6",children:[n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(Jr,{className:"w-8 h-8 mx-auto mb-2 text-accent-gold"}),n.jsx("div",{className:"text-2xl font-bold text-primary-navy",children:r.assigned_table_number}),n.jsx("div",{className:"text-sm text-gray-600",children:"Your Table"})]})}),n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(ms,{className:"w-8 h-8 mx-auto mb-2 text-accent-gold"}),n.jsx("div",{className:"text-lg font-bold text-primary-navy",children:r.buyer_organization}),n.jsx("div",{className:"text-sm text-gray-600",children:"Organization"})]})}),n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(za,{className:"w-8 h-8 mx-auto mb-2 text-accent-gold"}),n.jsxs("div",{className:"text-lg font-bold text-primary-navy",children:[r.seats_purchased," Seats"]}),n.jsx("div",{className:"text-sm text-gray-600",children:r.seats_purchased===10?"Full Table":"Half Table"})]})}),n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx(dt,{className:r.guest_details_completed?"bg-green-100 text-green-800 text-sm px-3 py-1":"bg-yellow-100 text-yellow-800 text-sm px-3 py-1",children:r.guest_details_completed?"✓ Confirmed":"Pending Details"}),n.jsx("div",{className:"text-sm text-gray-600 mt-2",children:"Status"})]})})]})})}),n.jsx("section",{className:"py-12",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs(_e,{className:"border-none shadow-2xl mb-8",children:[n.jsxs(Nt,{className:"bg-gradient-to-r from-gray-50 to-blue-50 border-b-2 border-accent-gold/20",children:[n.jsx(Pt,{className:"text-2xl text-primary-navy",children:"Guest Information"}
1863),n.jsxs(wr,{className:"text-primary-navy/70 text-base font-medium",children:["Please provide details for all ",r.seats_purchased," seats at your table"]})]}),n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"space-y-8",children:Object.entries(h).map(([j,N])=>n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:parseInt(j)*.05},children:n.jsxs(_e,{className:"border-2 border-gray-200 hover:border-accent-gold transition-colors",children:[n.jsx(Nt,{className:"pb-4",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 bg-accent-gold rounded-full flex items-center justify-center text-primary-navy font-bold",children:j}),n.jsxs("div",{children:[n.jsxs(Pt,{className:"text-lg",children:["Seat ",j]}),N.guest_name&&n.jsx(wr,{className:"font-semibold text-primary-navy",children:N.guest_name})]})]}),N.guest_name&&N.buyer_email&&n.jsxs(dt,{className:"bg-green-100 text-green-800",children:[n.jsx(Cn,{className:"w-3 h-3 mr-1"}),"Completed"]})]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"grid gap-6",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`guest_name_${j}`,className:"font-semibold",children:"Guest Name *"}),n.jsx(Me,{id:`guest_name_${j}`,name:`guest_name_${j}`,value:N.guest_name,onChange:_=>x(parseInt(j),"guest_name",_.target.value),placeholder:"Enter guest name",className:"h-11",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`buyer_organization_${j}`,className:"font-semibold",children:"Organisation (if different)"}),n.jsx(Me,{id:`buyer_organization_${j}`,name:`buyer_organization_${j}`,value:N.buyer_organization,onChange:_=>x(parseInt(j),"buyer_organization",_.target.value),placeholder:r.buyer_organization,className:"h-11"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`buyer_email_${j}`,className:"font-semibold",children:"Email Address *"}),n.jsx(Me,{id:`buyer_email_${j}`,name:`buyer_email_${j}`,type:"email",value:N.buyer_email,onChange:_=>x(parseInt(j),"buyer_email",_.target.value),placeholder:"[email protected]",className:"h-11",required:!0})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`starter_choice_${j}`,className:"font-semibold",children:"Starter Choice *"}),n.jsxs(Qt,{value:N.starter_choice,onValueChange:_=>x(parseInt(j),"starter_choice",_),children:[n.jsx(Kt,{id:`starter_choice_${j}`,name:`starter_choice_${j}`,className:"h-11",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"bruschetta_tomatoes_peppers",children:"Bruschetta, vine tomatoes, grilled peppers, basil Pesto"}),n.jsx(Ae,{value:"ham_hock_fennel",children:"Ham hock, fennel, peas & pea shoot salad"}),n.jsx(Ae,{value:"vegetable_soup",children:"Vegetable Soup & Bread Rolls"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`main_choice_${j}`,className:"font-semibold",children:"Main Course *"}),n.jsxs(Qt,{value:N.main_choice,onValueChange:_=>x(parseInt(j),"main_choice",_),children:[n.jsx(Kt,{id:`main_choice_${j}`,name:`main_choice_${j}`,className:"h-11",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"salmon_herb_potatoes",children:"Grilled herb-crusted salmon, herb potatoes, carrots, broccoli, tarragon hollandaise"}),n.jsx(Ae,{value:"chicken_fillet_potatoes",children:"Chicken fillet, crushed new potatoes, carrots, beans broccoli, tarragon beurre blanc"}),n.jsx(Ae,{value:"mushroom_gnocchi",children:"Wild Mushroom & Thyme Potato Gnocchi, king oyster mushrooms, cheese sauce"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`dessert_choice_${j}`,className:"font-semibold",children:"Dessert *"}),n.jsxs(Qt,{value:N.dessert_choice,onValueChange:_=>x(parseInt(j),"dessert_choice",_),children:[n.jsx(Kt,{id:`dessert_choice_${j}`,name:`dessert_choice_${j}`,className:"h-11",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"chocolate_orange_tart",children:"Chocolate & Orange Tart, mango coulis"}),n.jsx(Ae,{value:"salted_caramel_cheesecake",children:"Salted Caramel Cheesecake, chocolate shavings, raspberry coulis"}),n.jsx(Ae,{value:"cream_profiteroles",children:"Cream Filled Profiteroles, chocolate sauce"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:`dietary_requirements_${j}`,className:"font-semibold",children:"Dietary Requirements / Allergies"}),n.jsx(en,{id:`dietary_requirements_${j}`,name:`dietary_requirements_${j}`,value:N.dietary_requirements,onChange:_=>x(parseInt(j),"dietary_requirements",_.target.value),placeholder:"Please specify any dietary requirements or allergies...",rows:3,className:"resize-none"})]})]})})]})}
1863,j))}),n.jsxs("div",{className:"mt-8 bg-blue-50 border-2 border-blue-200 rounded-lg p-6",children:[n.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[n.jsx(Mr,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"text-sm text-gray-700",children:[n.jsx("p",{className:"font-semibold text-primary-navy mb-2",children:"Before Submitting"}),n.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[n.jsx("li",{children:"Ensure all guest names and email addresses are entered"}),n.jsx("li",{children:"Verify menu choices for each guest"}),n.jsx("li",{children:"Include any dietary requirements or allergies"}),n.jsx("li",{children:"You can update details anytime using this secure link"})]})]})]}),n.jsx(me,{size:"lg",onClick:w,disabled:y.isPending,className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold py-6 text-lg shadow-xl",children:y.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-navy mr-2"}),"Submitting Guest Details..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Cn,{className:"mr-2 w-5 h-5"}),"Confirm All Guest Details"]})})]})]})]}),n.jsx(_e,{className:"border-none shadow-xl bg-gradient-to-br from-primary-navy to-accent-gold text-white",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("h3",{className:"text-2xl font-bold mb-6",children:"Event Information"}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(za,{className:"w-6 h-6 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold mb-1",children:"Event Date"}),n.jsx("div",{className:"text-sm text-white/90",children:"[Event Date]"})]})]}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Xu,{className:"w-6 h-6 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold mb-1",children:"Venue"}),n.jsx("div",{className:"text-sm text-white/90",children:"Holiday Inn Peterborough West"})]})]}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(la,{className:"w-6 h-6 flex-shrink-0"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold mb-1",children:"Dress Code"}),n.jsx("div",{className:"text-sm text-white/90",children:"Black Tie"})]})]})]}),n.jsxs("div",{className:"mt-6 pt-6 border-t border-white/20",children:[n.jsx("p",{className:"text-sm text-white/90 mb-2",children:"Need help? Contact us:"}),n.jsxs("div",{className:"flex flex-wrap gap-4 text-sm",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Xr,{className:"w-4 h-4"}),n.jsx("span",{children:"[email protected]"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Kw,{className:"w-4 h-4"}),n.jsx("span",{children:"+44 (0)1733 687196"})]})]})]})]})})]})})]})}function Y6e(){const[e,t]=L.useState("all"),{data:r=[],isLoading:a}=xt({queryKey:["news"],queryFn:()=>pe.entities.NewsArticle.filter({is_published:!0},"-published_date",100)}),s=[{value:"all",label:"All News"},{value:"News and Updates",label:"News and Updates"},{value:"Guidance and How To Content",label:"Guidance and How To Content"},{value:"Sponsorship and Partner Focus",label:"Sponsorship and Partner Focus"},{value:"Impact and Legacy Stories",label:"Impact and Legacy Stories"},{value:"Behind the Scenes",label:"Behind the Scenes"},{value:"Event and Awards Day Content",label:"Event and Awards Day Content"},{value:"Strategic Thought Leadership",label:"Strategic Thought Leadership"}],i=e==="all"?r:r.filter(l=>l.category===e),o={"News and Updates":"bg-accent-gold text-primary-navy border-accent-gold","Guidance and How To Content":"bg-accent-gold text-primary-navy border-accent-gold","Sponsorship and Partner Focus":"bg-accent-gold text-primary-navy border-accent-gold","Impact and Legacy Stories":"bg-accent-gold text-primary-navy border-accent-gold","Behind the Scenes":"bg-accent-gold text-primary-navy border-accent-gold","Event and Awards Day Content":"bg-accent-gold text-primary-navy border-accent-gold","Strategic Thought Leadership":"bg-
1863accent-gold text-primary-navy border-accent-gold"};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(jm,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"news_hero_title",defaultValue:"News & Updates",page:"News",description:"Main heading on News page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"news_hero_subtitle",defaultValue:"Stay up to date with the latest announcements, judging updates, event details, and news from the National Charity Today Awards™.",page:"News",description:"Hero subtitle on News page",type:"paragraph"})})]})})}),n.jsx("section",{className:"py-8 bg-white border-b sticky top-20 z-40 shadow-sm",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4",children:[n.jsxs("div",{className:"text-lg font-semibold text-primary-navy",children:[i.length," Article",i.length!==1?"s":""]}),n.jsxs(Qt,{value:e,onValueChange:t,children:[n.jsx(Kt,{className:"w-64 bg-white border-gray-300",children:n.jsx(Xt,{})}),n.jsx(Gt,{children:s.map(l=>n.jsx(Ae,{value:l.value,children:l.label},l.value))})]})]})})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a?n.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:[1,2,3,4].map(l=>n.jsxs(_e,{className:"animate-pulse",children:[n.jsx("div",{className:"h-80 bg-gray-200"}),n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded mb-3"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-4"}),n.jsx("div",{className:"h-24 bg-gray-200 rounded"})]})]},l))}):i.length===0?n.jsxs("div",{className:"text-center py-20",children:[n.jsx(jm,{className:"w-20 h-20 text-gray-400 mx-auto mb-6"}),n.jsx("p",{className:"text-2xl text-gray-600 font-medium",children:"No news articles found in this category."})]}):n.jsx("div",{className:"grid md:grid-cols-2 gap-10",children:i.map((l,c)=>{var d,h;return n.jsx(lt.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{delay:c*.1,duration:.5},viewport:{once:!0},children:n.jsx(Rt,{to:`${Ct("NewsDetail")}?slug=${ix(l.category,l.title)}`,className:"block group",children:n.jsxs("article",{className:"bg-white rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-500 border border-gray-100 h-full flex flex-col",children:[l.image_url?n.jsxs("div",{className:"relative h-80 overflow-hidden",children:[n.jsx("img",{src:l.image_url,alt:l.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"}),n.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"}),n.jsx("div",{className:"absolute bottom-2.5 left-6 right-6",children:n.jsx("div",{className:`inline-block px-3 py-1.5 rounded-full border ${o[l.category]} backdrop-blur-md mb-1.5`,children:n.jsx("span",{className:"text-xs font-bold uppercase tracking-wide",children:(d=l.category)==null?void 0:d.replace("_"," ")})})})]}):n.jsxs("div",{className:"h-80 bg-gradient-to-br from-primary-navy to-accent-gold flex items-center justify-center relative",children:[n.jsx(jm,{className:"w-24 h-24 text-white/30"}),n.jsx("div",{className:"absolute bottom-2.5 left-6",children:n.jsx("div",{className:`inline-block px-3 py-1.5 rounded-full border ${o[l.category]} backdrop-blur-md`,children:n.jsx("span",{className:"text-xs font-bold uppercase tracking-wide",children:(h=l.category)==null?void 0:h.replace("_"," ")})})})]}),n.jsxs("div",{className:"p-8 flex-1 flex flex-col",children:[n.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-500 mb-4",children:[n.jsx(za,{className:"w-4 h-4"}),n.jsx("time",{className:"font-medium",children:l.published_date?yt(new Date(l.published_date),"d MMMM yyyy"):yt(new Date(l.created_date),"d MMMM yyyy")})]}),n.jsx(Rt,{to:`${Ct("NewsDetail")}?slug=${ix(l.category,l.title)}`,children:n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-4 group-hover:text-accent-gold transition-colors leading-tight line-clamp-2 cursor-pointer hover:underline",children:l.title})}),n.jsx("p",{className:"text-gray-600 leading-relaxed text-base mb-6 line-clamp-3 flex-1",children:l.excerpt}),n.jsxs("div",{className:"flex items-center text-primary-navy group-hover:text-accent-gold font-semibold text-sm transition-colors",children:[n.jsx("span",{children:"Read Full Article"}),n.jsx("span",{className:"ml-2 group-hover:translate-x-2 transition-transform duration-300",children:"→"})]})]})]})})},l.id)})})})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx("div",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold rounded-3xl shadow-2xl overflow-hidden",children:n.jsxs("div",{className:"p-12 md:p-16 text-center",children:[n.jsx("div",{className:"w-20 h-20 mx-auto mb-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center border-2 border-white/30",children:n.jsx(Yw,{
1863className:"w-10 h-10 text-white"})}),n.jsx("h2",{className:"text-4xl font-bold mb-6 text-white",children:"Stay Informed"}),n.jsx("p",{className:"text-xl text-white/90 mb-10 leading-relaxed max-w-2xl mx-auto",children:"Subscribe to receive the latest news, updates, and announcements about the National Charity Today Awards™ directly to your inbox."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 max-w-xl mx-auto",children:[n.jsx("input",{type:"email",placeholder:"Enter your email address",className:"flex-1 px-6 py-4 rounded-xl text-gray-900 focus:outline-none focus:ring-4 focus:ring-white/30 text-lg"}),n.jsx("button",{className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-4 rounded-xl shadow-xl transition-all duration-300 hover:scale-105 text-lg [&:hover]:text-primary-navy",children:"Subscribe"})]})]})})})})]})}function MY({articleSlugFromPath:e}){const t=new URLSearchParams(window.location.search),r=e||t.get("slug")||"",a=t.get("id"),s=Sr(),[i,o]=L.useState(!1),[l,c]=L.useState(!1),[d,h]=L.useState({}),[u,f]=L.useState(!1),m=typeof window<"u"?window.location.href:"",{category:b,titleSlug:g}=r?z6e(r):{category:null,titleSlug:null},{data:y,isLoading:x}=xt({queryKey:["newsArticle",r||a],queryFn:async()=>a?await pe.entities.NewsArticle.filter({id:a}):r?(await pe.entities.NewsArticle.filter({is_published:!0})).filter(P=>ix(P.category,P.title)===r):[],enabled:!!r||!!a}),w=y==null?void 0:y[0];L.useEffect(()=>{(async()=>{try{const P=await pe.auth.me();o((P==null?void 0:P.role)==="admin")}catch{o(!1)}})()},[]),L.useEffect(()=>{if(!w)return;const k=(P,O)=>{let F=document.querySelector(`meta[property="${P}"]`);F||(F=document.createElement("meta"),F.setAttribute("property",P),document.head.appendChild(F)),F.setAttribute("content",O)};return k("og:title",w.og_title||w.title),k("og:description",w.og_description||w.excerpt||""),k("og:image",w.image_url||""),k("og:url",m),k("og:type","article"),document.title=w.title,()=>{document.title="National Charity Today Awards™"}},[w,m]);const j=()=>{window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(m)}`,"_blank")},N=()=>{const k=(w==null?void 0:w.title)||"";window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(m)}&text=${encodeURIComponent(k)}`,"_blank")},_=()=>{window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(m)}`,"_blank")},S=()=>{navigator.clipboard.writeText(m),alert("Link copied to clipboard!")},A=Tt({mutationFn:({id:k,data:P})=>pe.entities.NewsArticle.update(k,P),onSuccess:()=>{s.invalidateQueries({queryKey:["newsArticle",r]}),c(!1)}}),T=async k=>{const P=k.target.files[0];if(P){f(!0);try{const O=await pe.integrations.Core.UploadFile({file:P});h(F=>({...F,image_url:O.file_url}))}catch(O){console.error("Failed to upload image:",O),alert("Failed to upload image")}f(!1)}},R=()=>{var k;h({title:w.title||"",author:w.author||"",content:w.content||"",excerpt:w.excerpt||"",image_url:w.image_url||"",image_caption:w.image_caption||"",category:w.category||"general",published_date:((k=w.published_date)==null?void 0:k.split("T")[0])||"",is_featured:w.is_featured||!1,is_published:w.is_published||!1}),c(!0)},M=()=>{A.mutate({id:w.id,data:d})};return x?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-primary-navy border-t-transparent"})}):w?n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"py-6 bg-white border-b",children:n.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(Rt,{to:Ct("News"),children:n.jsxs("button",{className:"inline-flex items-center gap-2 text-primary-navy hover:text-accent-gold transition-colors font-medium",children:[n.jsx(wm,{className:"w-4 h-4"}),"Back to News"]})}),i&&!l&&n.jsxs(me,{onClick:R,className:"bg-blue-600 hover:bg-blue-700 text-white",children:[n.jsx(xa,{
1863className:"w-4 h-4 mr-2"}),"Edit Article"]}),i&&l&&n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{onClick:()=>c(!1),variant:"outline",children:[n.jsx(Ei,{className:"w-4 h-4 mr-2"}),"Cancel"]}),n.jsx(me,{onClick:M,disabled:A.isPending,className:"bg-green-600 hover:bg-green-700 text-white",children:A.isPending?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Saving..."]}):n.jsxs(n.Fragment,{children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save Changes"]})})]})]})})}),n.jsx("section",{className:"py-12 bg-white",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[l?n.jsx("div",{className:"space-y-6",children:n.jsx(_e,{className:"border-2 border-blue-200",children:n.jsxs(Ce,{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Title *"}),n.jsx(Me,{value:d.title,onChange:k=>h({...d,title:k.target.value}),className:"text-2xl font-bold"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Author"}),n.jsx(Me,{value:d.author,onChange:k=>h({...d,author:k.target.value}),placeholder:"Author name"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Excerpt"}),n.jsx(en,{value:d.excerpt,onChange:k=>h({...d,excerpt:k.target.value}),rows:3,placeholder:"Brief summary"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Featured Image"}),n.jsx(Me,{value:d.image_url,onChange:k=>h({...d,image_url:k.target.value}),placeholder:"Image URL",className:"mb-2"}),n.jsx("input",{type:"file",accept:"image/*",onChange:T,className:"block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",disabled:u}),d.image_url&&n.jsx("img",{src:d.image_url,alt:"Preview",className:"mt-4 max-h-64 rounded-lg"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Image Caption"}),n.jsx(Me,{value:d.image_caption,onChange:k=>h({...d,image_caption:k.target.value}),placeholder:"Caption for the image"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Content *"}),n.jsx("style",{children:`
1864                      .sticky-quill-toolbar .ql-toolbar {
1865                        position: sticky;
1866                        top: 0;
1867                        z-index: 10;
1868                        background: white;
1869                        border-bottom: 2px solid #e5e7eb !important;
1870                      }
1871                    `}),n.jsx("div",{className:"border rounded-lg overflow-hidden sticky-quill-toolbar",children:n.jsx(sx,{value:d.content,onChange:k=>h({...d,content:k}),modules:{toolbar:[[{header:[1,2,3,4,5,6,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["blockquote","code-block"],["link","image","video"],["clean"]]},placeholder:"Write your article content here...",theme:"snow",style:{minHeight:"400px"}})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Category"}),n.jsxs(Qt,{value:d.category,onValueChange:k=>h({...d,category:k}),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"News and Updates",children:"News and Updates"}),n.jsx(Ae,{value:"Guidance and How To Content",children:"Guidance and How To Content"}),n.jsx(Ae,{value:"Sponsorship and Partner Focus",children:"Sponsorship and Partner Focus"}),n.jsx(Ae,{value:"Impact and Legacy Stories",children:"Impact and Legacy Stories"}),n.jsx(Ae,{value:"Behind the Scenes",children:"Behind the Scenes"}),n.jsx(Ae,{value:"Event and Awards Day Content",children:"Event and Awards Day Content"}),n.jsx(Ae,{value:"Strategic Thought Leadership",children:"Strategic Thought Leadership"})]})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Published Date"}),n.jsx(Me,{type:"date",value:d.published_date,onChange:k=>h({...d,published_date:k.target.value})})]})]}),n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"is-featured",checked:d.is_featured,onCheckedChange:k=>h({...d,is_featured:k})}),n.jsx(ye,{htmlFor:"is-featured",children:"Featured Article"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:"is-published",checked:d.is_published,onCheckedChange:k=>h({...d,is_published:k})}),n.jsx(ye,{htmlFor:"is-published",children:"Published"})]})]})]})})}):n.jsxs(lt.article,{initial:{opacity:0,y:30}
1871,animate:{opacity:1,y:0},transition:{duration:.6},className:"bg-white",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h1",{className:"text-5xl md:text-6xl font-bold text-primary-navy mb-6 leading-tight",children:w.title}),w.author&&n.jsxs("p",{className:"text-lg text-gray-600",children:["By ",n.jsx("span",{className:"font-semibold text-primary-navy",children:w.author})]}),n.jsx("p",{className:"text-base text-gray-500 mb-4",children:w.published_date?yt(new Date(w.published_date),"d MMMM yyyy"):yt(new Date(w.created_date),"d MMMM yyyy")}),n.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[n.jsx("span",{className:"text-sm font-semibold text-primary-navy",children:"Share Article:"}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:j,className:"w-12 h-12 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on Facebook",children:n.jsx(Wy,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:N,className:"w-12 h-12 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on Twitter",children:n.jsx(Yy,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:_,className:"w-12 h-12 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on LinkedIn",children:n.jsx(Yu,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:S,className:"w-12 h-12 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Copy link",children:n.jsx(Jh,{className:"w-5 h-5 text-white"})})]})]}),w.excerpt&&n.jsx("p",{className:"text-2xl text-gray-600 leading-relaxed font-light border-l-4 border-accent-gold pl-8 py-4",children:w.excerpt})]}),w.image_url&&n.jsxs("div",{className:"mb-12",children:[n.jsx("div",{className:"relative h-[500px] overflow-hidden shadow-2xl",children:n.jsx("img",{src:w.image_url,alt:w.title,className:"w-full h-full object-cover"})}),w.image_caption&&n.jsx("p",{className:"text-sm text-gray-500 italic mt-3 px-2",children:w.image_caption})]}),n.jsx("div",{className:"prose prose-xl max-w-none",children:n.jsx("div",{className:"text-gray-700 leading-relaxed text-lg",style:{lineHeight:"1.8"},dangerouslySetInnerHTML:{__html:w.content}})}),n.jsx("div",{className:"my-16 border-t-2 border-gray-200"}),n.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6 py-8",children:[n.jsxs("div",{className:"text-gray-500 text-sm",children:["Published on ",w.published_date?yt(new Date(w.published_date),"d MMMM yyyy"):yt(new Date(w.created_date),"d MMMM yyyy")]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-sm font-semibold text-primary-navy",children:"Share Article:"}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:j,className:"w-10 h-10 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on Facebook",children:n.jsx(Wy,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:N,className:"w-10 h-10 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on Twitter",children:n.jsx(Yy,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:_,className:"w-10 h-10 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Share on LinkedIn",children:n.jsx(Yu,{className:"w-5 h-5 text-white"})}),n.jsx("button",{onClick:S,className:"w-10 h-10 bg-primary-navy hover:bg-accent-gold rounded-full flex items-center justify-center transition-all duration-300 hover:scale-110 shadow-md","aria-label":"Copy link",children:n.jsx(Jh,{className:"w-5 h-5 text-white"})})]})]})]})]}),n.jsx("div",{className:"mt-16 text-center",children:n.jsx(Rt,{to:Ct("News"),children:n.jsx("button",{className:"bg-primary-navy hover:bg-[#0f0d5e] text-white px-10 py-5 rounded-xl font-bold text-lg shadow-xl transition-all duration-300 hover:scale-105",children:"← Back to All News"})})})]})})]}):n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx(_e,{className:"max-w-md",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Article Not Found"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"The article you're looking for doesn't exist."}),n.jsx(Rt,{to:Ct("News"),children:n.jsx("button",{className:"bg-primary-navy text-white px-6 py-3 rounded-lg hover:opacity-90 transition-all",children:"Back to News"})})]})})})}function Q6e(){const[e,t]=L.useState(null),[r,a]=L.useState(null),[s,i]=L.useState({title:"",description:"",timeline:""}),o=Sr(),l=(e==null?void 0:e.role)==="admin";L.useEffect(()=>{(async()=>{try{const x=await pe.auth.me();t(x)}catch{t(null)}})()},[]);const{data:c=[]}=xt({queryKey:["nominationJourneyContent"],queryFn:()=>pe.entities.NominationJourneyContent.list()}),d=Tt({mutationFn:async y=>{const x=c.find(w=>w.section===y.section);return x?pe.entities.NominationJourneyContent.update(x.id,y):pe.entities.NominationJourneyContent.create(y)},onSuccess:()=>{o.invalidateQueries({queryKey:["nominationJourneyContent"]}),a(null)}}),h=(y,x,w)=>{const j=c.find(N=>N.section===y);return(j==null?void 0:j[x])||w},u=(y,x)=>{const w=c.find(j=>j.section===y);i({title:(w==null?void 0:w.title)||x.title||"",description:(w==null?void 0:w.description)||x.description||"",timeline:(w==null?void 0:w.timeline)||x.timeline||""}),a(y)},f=()=>{d.mutate({section:r,...s})},m=({section:y,defaults:x})=>l?n.jsx("button",{onClick:()=>u(y,x),className:"ml-2 p-1 text-gray-400 hover:text-accent-gold transition-colors",title:"Edit this section",children:n.jsx(c3,{className:"w-4 h-4"})}):null,b=["from-[#f5e6b8] to-[#e8d69a]","from-[#edd98c] to-[#e5c97a]","from-[#e8ca6e] to-[#ddb85a]","from-[#dec069] to-[#d4a94a]","from-[#d4a94a] to-[#c9983a]","from-[#c9983a] to-[#b8872a]"],g=[{number:1,icon:pr,title:"Nomination Submitted",description:"Your nomination is received and enters our review queue. Each submission is carefully logged and assigned for initial assessment.",timeline:"Immediate"},{number:2,icon:Cn,title:"Verification Stage",description:"Your submission is verified for eligibility and completeness. Each nomination is checked against our entry criteria before progressing. Outcome: Accepted or Rejected.",timeline:"Within 3-5 working days"},{number:3,icon:jT,title:"Initial Review Stage",description:"Our team conducts a thorough quality review against our scoring criteria, assessing the completeness, clarity, and strength of your submission. Outcome: Accepted or Rejected.",timeline:"Within 5-7 working days"},{number:4,icon:Jr,title:"Judging Stage",description:"Nominations that pass the initial review are evaluated by our independent panel of sector experts and industry leaders who assess impact, innovation, and excellence. Outcome: Shortlisted or Rejected.",timeline:"2-3 weeks"},{number:5,icon:ki,title:"Status Confirmation",description:"All nominees are contacted directly with their official status confirmation, whether shortlisted or not. We aim to provide clear, timely feedback at this stage.",timeline:"30-45 days before event"},{number:6,icon:Vd,title:"Finalist",description:"Congratulations! Shortlisted nominees are officially announced as finalists and receive full event details, including table purchase requirements and the Awards Gala 
1871Lunch information.",timeline:"Awards Ceremony"}];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx(Nn,{open:!!r,onOpenChange:()=>a(null),children:n.jsxs(vn,{className:"max-w-lg",children:[n.jsx(_n,{children:n.jsxs(Sn,{children:["Edit Section: ",r]})}),n.jsxs("div",{className:"space-y-4 mt-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 mb-1 block",children:"Title"}),n.jsx(Me,{value:s.title,onChange:y=>i({...s,title:y.target.value}),placeholder:"Section title"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 mb-1 block",children:"Description"}),n.jsx(en,{value:s.description,onChange:y=>i({...s,description:y.target.value}),placeholder:"Section description",rows:4})]}),(r==null?void 0:r.startsWith("step"))&&n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium text-gray-700 mb-1 block",children:"Timeline"}),n.jsx(Me,{value:s.timeline,onChange:y=>i({...s,timeline:y.target.value}),placeholder:"e.g. Within 5-7 working days"})]}),n.jsxs("div",{className:"flex gap-3 pt-4",children:[n.jsxs(me,{onClick:f,disabled:d.isPending,className:"bg-accent-gold text-primary-navy hover:bg-[#e8ca7a]",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),d.isPending?"Saving...":"Save Changes"]}),n.jsx(me,{variant:"outline",onClick:()=>a(null),children:"Cancel"})]})]})]})}),n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"NCTA Logo",className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(bn,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Behind The Scenes"})]}),n.jsxs("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:[h("hero","title","The Nomination Journey"),n.jsx(m,{section:"hero",defaults:{title:"The Nomination Journey",description:"Ever wondered what happens after you submit your nomination? This transparent look breaks down each step of our awards process – from the moment your entry lands to the final announcement of the winners."}})]}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:h("hero","description","Ever wondered what happens after you submit your nomination? This transparent look breaks down each step of our awards process – from the moment your entry lands to the final announcement of the winners.")})]})})]}),n.jsx("section",{className:"py-16 bg-white",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-12",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-blue-100 border border-blue-200 rounded-full px-4 py-2 mb-4",children:[n.jsx(jT,{className:"w-5 h-5 text-blue-700"}),n.jsx("span",{className:"text-sm font-semibold text-blue-700",children:"OUR APPROACH"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"A First-Past-the-Post Format"})]}),n.jsx(_e,{className:"border-none shadow-xl mb-8",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("p",{className:"text-lg text-gray-700 leading-relaxed mb-6",children:["At the National Charity Today Awards, we are committed to a process that is ",n.jsx("strong",{children:"fair, transparent, and efficient"}),". That's why we operate a ",n.jsx("strong",{className:"text-primary-navy",children:"first-past-the-post nomination format"}),"."]}),n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed mb-6",children:"This means nominations are reviewed and scored as they are received, rather than waiting until the deadline has passed. Strong entr
1871ies that meet our scoring threshold are promptly progressed to the judging stage."}),n.jsx("div",{className:"bg-blue-50 rounded-lg p-6 border-2 border-blue-200",children:n.jsxs("p",{className:"text-base text-gray-700 leading-relaxed font-medium",children:[n.jsx("strong",{className:"text-blue-700",children:"Important:"})," Nominations remain open until either all category finalist places are filled or 60 days before the event—whichever comes first."]})})]})})]})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[n.jsx("h2",{className:"text-3xl lg:text-5xl font-bold text-primary-navy mb-6",children:"Your Nomination Journey: Step by Step"}),n.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"A clear, transparent path designed to reward quality, speed up feedback, and ensure the best nominees rise to the top."})]}),n.jsx("div",{className:"relative",children:n.jsx("div",{className:"flex flex-col gap-6",children:g.map((y,x)=>{const w=y.icon,j=g.length-1-x;return n.jsxs(lt.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:j*.1},className:"relative",children:[x!==g.length-1&&n.jsx("div",{className:"hidden lg:block absolute left-1/2 transform -translate-x-1/2 -bottom-6 w-1 h-6 bg-gradient-to-b from-gray-300 to-gray-200"}),n.jsxs("div",{className:"flex items-center gap-6",children:[n.jsx("div",{className:"w-16 h-16 md:w-20 md:h-20 bg-primary-navy rounded-full flex items-center justify-center shadow-xl flex-shrink-0 border-4 border-accent-gold",children:n.jsx("span",{className:"text-2xl md:text-3xl font-bold text-accent-gold",children:y.number})}),n.jsx(_e,{className:"border-none shadow-xl flex-1",children:n.jsxs(Ce,{className:"p-6 md:p-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-3",children:[n.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${b[y.number-1]} rounded-xl flex items-center justify-center flex-shrink-0 shadow-lg`,children:n.jsx(w,{className:"w-6 h-6 text-primary-navy"})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"text-xs font-bold text-gray-500 mb-1",children:["STEP ",y.number]}),n.jsxs("h3",{className:"text-xl md:text-2xl font-bold text-primary-navy inline-flex items-center",children:[h(`step${y.number}`,"title",y.title),n.jsx(m,{section:`step${y.number}`,defaults:{title:y.title,description:y.description,timeline:y.timeline}})]})]})]}),n.jsx("p",{className:"text-gray-600 leading-relaxed mb-3 text-sm md:text-base",children:h(`step${y.number}`,"description",y.description)}),n.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.jsx(la,{className:"w-4 h-4 text-accent-gold"}),n.jsxs("span",{className:"font-semibold text-primary-navy",children:["Timeline: ",h(`step${y.number}`,"timeline",y.timeline)]})]})]})})]})]},x)})})})]})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx(Ia,{className:"w-16 h-16 mx-auto mb-4 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Why This System Works"}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:"By adopting this rolling system, we ensure a more responsive experience for nominees and a smoother, more professional Awards process for everyone involved."})]}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mt-8",children:[n.jsxs("div",{className:"text-center",children:[n.jsx(Cn,{className:"w-12 h-12 mx-auto mb-3 text-accent-gold"}),n.jsx("h3",{className:"font-bold text-lg mb-2",children:"Quality First"}),n.jsx("p",{className:"text-white/80 text-sm",children:"Only the strongest nominations progress to our expert judging panel"})]}),n.jsxs("div",{className:"text-center",children:[n.jsx(Cn,{className:"w-12 h-12 mx-auto mb-3 text-accent-gold"}),n.jsx("h3",{className:"font-bold text-lg mb-2",children:"No Waiting Game"}),n.jsx("p",{className:"text-white/80 text-sm",children:"Early excellence is recognised promptly, not held back until deadlines"})]}),n.jsxs("div",{className:"text-center",children:[n.jsx(Cn,{className:"w-12 h-12 mx-auto mb-3 text-accent-gold"}),n.jsx("h3",{className:"font-bold text-lg mb-2",children:"Fair Process"}),n.jsx("p",{className:"text-white/80 text-sm",children:"Every nomination is asse
1871ssed using the same rigorous criteria"})]})]})]})})})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:[n.jsx(Vd,{className:"w-16 h-16 mx-auto mb-6 text-primary-navy"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-6",children:"Ready to Start Your Journey?"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Submit your nomination today and join the ranks of organisations and individuals making a real difference in the UK charity sector."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsx(Rt,{to:Ct("Nominations"),children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg shadow-lg",children:["Submit Your Nomination",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})}),n.jsx(Rt,{to:Ct("Categories"),children:n.jsx(me,{size:"lg",variant:"outline",className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-bold px-10 py-6 text-lg",children:"View Award Categories"})})]})]})})})]})}function LY({open:e,onOpenChange:t}){const r=[{number:"1",title:"Nomination Submitted",description:"Your nomination is received and enters our review queue."},{number:"2",title:"Verification Stage",description:"Your submission is verified for eligibility and completeness. Outcome: Accepted or Rejected."},{number:"3",title:"Initial Review Stage",description:"Our team conducts an initial quality review of your nomination. Outcome: Accepted or Rejected."},{number:"4",title:"Judging Stage",description:"Independent sector experts evaluate each nomination. Outcome: Shortlisted or Rejected."},{number:"5",title:"Status Confirmation",description:"Nominees are contacted directly with their official status confirmation."},{number:"6",title:"Finalist",description:"Successful nominees are announced as finalists and receive full event details."}];return n.jsx(Nn,{open:e,onOpenChange:t,children:n.jsxs(vn,{className:"max-w-2xl",children:[n.jsx(_n,{children:n.jsxs(Sn,{className:"flex items-center gap-2 text-xl",children:[n.jsx(pr,{className:"w-5 h-5 text-indigo-600"}),"The Nomination Journey"]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Your nomination goes through a rigorous, transparent process to ensure fairness and excellence in every category:"}),n.jsx("div",{className:"grid grid-cols-1 gap-3 text-sm",children:r.map(a=>n.jsx("div",{className:"bg-indigo-50 rounded-lg p-4 border border-indigo-200",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"flex-shrink-0 w-8 h-8 bg-indigo-600 text-white rounded-full flex items-center justify-center font-bold text-sm",children:a.number}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"font-bold text-indigo-900",children:a.title}),n.jsx("div",{className:"text-indigo-700 mt-1",children:a.description})]})]})},a.number))})]})]})})}function X6e(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const J6e=e=>{switch(e){case"success":return tPe;case"info":return rPe;case"warning":return nPe;case"error":return aPe;default:return null}},Z6e=Array(12).fill(0),ePe=({visible:e,className:t})=>we.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},we.createElement("div",{className:"sonner-spinner"},Z6e.map((r,a)=>we.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),tPe=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),nPe=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1871currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rPe=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aPe=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),sPe=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},we.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),we.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),iPe=()=>{const[e,t]=we.useState(document.hidden);return we.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let r3=1;class oPe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...s}=t,i=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:r3++,o=this.toasts.find(c=>c.id===i),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...t,id:i,title:a}),{...c,...t,id:i,dismissible:l,title:a}):c):this.addToast({title:a,...s,dismissible:l,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,o;const l=s.then(async d=>{if(o=["resolve",d],we.isValidElement(d))i=!1,this.create({id:a,type:"default",message:d});else if(cPe(d)&&!d.ok){i=!1;const u=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,f=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description,b=typeof u=="object"&&!we.isValidElement(u)?u:{message:u};this.create({id:a,type:"error",description:f,...b})}else if(d instanceof Error){i=!1;const u=typeof r.error=="function"?await r.error(d):r.error,f=typeof r.description=="function"?await r.description(d):r.de
vendor: 1,681 bytes, line 1871
1871scription,b=typeof u=="object"&&!we.isValidElement(u)?u:{message:u};this.create({id:a,type:"error",description:f,...b})}else if(r.success!==void 0){i=!1;const u=typeof r.success=="function"?await r.success(d):r.success,f=typeof r.description=="function"?await r.description(d):r.description,b=typeof u=="object"&&!we.isValidElement(u)?u:{message:u};this.create({id:a,type:"success",description:f,...b})}}).catch(async d=>{if(o=["reject",d],r.error!==void 0){i=!1;const h=typeof r.error=="function"?await r.error(d):r.error,u=typeof r.description=="function"?await r.description(d):r.description,m=typeof h=="object"&&!we.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:u,...m})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((d,h)=>l.then(()=>o[0]==="reject"?h(o[1]):d(o[1])).catch(h));return typeof a!="string"&&typeof a!="number"?{unwrap:c}:Object.assign(a,{unwrap:c})},this.custom=(t,r)=>{const a=(r==null?void 0:r.id)||r3++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const tl=new oPe,lPe=(e,t)=>{const r=(t==null?void 0:t.id)||r3++;return tl.addToast({title:e,...t,id:r}),r},cPe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dPe=lPe,uPe=()=>tl.toasts,hPe=()=>tl.getActiveToasts(),js=Object.assign(dPe,{success:tl.success,info:tl.info,warning:tl.warning,error:tl.error,custom:tl.custom,message:tl.message,promise:tl.promise,dismiss:tl.dismiss,loading:tl.loading},{getHistory:uPe,getToasts:hPe});X6
vendor: 14,874 bytes, line 1871
1871e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 13,710 bytes, line 1871
1871Hb(e){return e.label!==void 0}const fPe=3,mPe="24px",pPe="16px",cq=4e3,gPe=356,xPe=14,yPe=45,vPe=200;function Ld(...e){return e.filter(Boolean).join(" ")}function bPe(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const wPe=e=>{var t,r,a,s,i,o,l,c,d;const{invert:h,toast:u,unstyled:f,interacting:m,setHeights:b,visibleToasts:g,heights:y,index:x,toasts:w,expanded:j,removeToast:N,defaultRichColors:_,closeButton:S,style:A,cancelButtonStyle:T,actionButtonStyle:R,className:M="",descriptionClassName:k="",duration:P,position:O,gap:F,expandByDefault:$,classNames:G,icons:B,closeButtonAriaLabel:Y="Close toast"}=e,[ee,J]=we.useState(null),[H,q]=we.useState(null),[K,te]=we.useState(!1),[re,Q]=we.useState(!1),[ne,oe]=we.useState(!1),[ae,le]=we.useState(!1),[je,xe]=we.useState(!1),[Fe,he]=we.useState(0),[Ne,ue]=we.useState(0),rt=we.useRef(u.duration||P||cq),Te=we.useRef(null),Pe=we.useRef(null),$e=x===0,Ve=x+1<=g,be=u.type,We=u.dismissible!==!1,Ze=u.className||"",st=u.descriptionClassName||"",Mt=we.useMemo(()=>y.findIndex(St=>St.toastId===u.id)||0,[y,u.id]),Ht=we.useMemo(()=>{var St;return(St=u.closeButton)!=null?St:S},[u.closeButton,S]),Yt=we.useMemo(()=>u.duration||P||cq,[u.duration,P]),on=we.useRef(0),It=we.useRef(0),_t=we.useRef(0),xr=we.useRef(null),[xn,Rr]=O.split("-"),Wn=we.useMemo(()=>y.reduce((St,hn,yr)=>yr>=Mt?St:St+hn.height,0),[y,Mt]),lr=iPe(),Ha=u.invert||h,Rn=be==="loading";It.current=we.useMemo(()=>Mt*F+Wn,[Mt,Wn]),we.useEffect(()=>{rt.current=Yt},[Yt]),we.useEffect(()=>{te(!0)},[]),we.useEffect(()=>{const St=Pe.current;if(St){const hn=St.getBoundingClientRect().height;return ue(hn),b(yr=>[{toastId:u.id,height:hn,position:u.position},...yr]),()=>b(yr=>yr.filter(Gn=>Gn.toastId!==u.id))}},[b,u.id]),we.useLayoutEffect(()=>{if(!K)return;const St=Pe.current,hn=St.style.height;St.style.height="auto";const yr=St.getBoundingClientRect().height;St.style.height=hn,ue(yr),b(Gn=>Gn.find(cr=>cr.toastId===u.id)?Gn.map(cr=>cr.toastId===u.id?{...cr,height:yr}:cr):[{toastId:u.id,height:yr,position:u.position},...Gn])},[K,u.title,u.description,b,u.id,u.jsx,u.action,u.cancel]);const ta=we.useCallback(()=>{Q(!0),he(It.current),b(St=>St.filter(hn=>hn.toastId!==u.id)),setTimeout(()=>{N(u)},vPe)},[u,N,b,It]);we.useEffect(()=>{if(u.promise&&be==="loading"||u.duration===1/0||u.type==="loading")return;let St;return j||m||lr?(()=>{if(_t.current<on.current){const Gn=new Date().getTime()-on.current;rt.current=rt.current-Gn}_t.current=new Date().getTime()})():(()=>{rt.current!==1/0&&(on.current=new Date().getTime(),St=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),ta()},rt.current))})(),()=>clearTimeout(St)},[j,m,u,be,lr,ta]),we.useEffect(()=>{u.delete&&(ta(),u.onDismiss==null||u.onDismiss.call(u,u))},[ta,u.delete]);function fr(){var St;if(B!=null&&B.loading){var hn;return we.createElement("div",{className:Ld(G==null?void 0:G.loader,u==null||(hn=u.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":be==="loading"},B.loading)}return we.createElement(ePe,{className:Ld(G==null?void 0:G.loader,u==null||(St=u.classNames)==null?void 0:St.loader),visible:be==="loading"})}const na=u.icon||(B==null?void 0:B[be])||J6e(be);var Ea,Kn;return we.createElement("li",{tabIndex:0,ref:Pe,className:Ld(M,Ze,G==null?void 0:G.toast,u==null||(t=u.classNames)==null?void 0:t.toast,G==null?void 0:G.default,G==null?void 0:G[be],u==null||(r=u.classNames)==null?void 0:r[be]),"data-sonner-toast":"","data-rich-colors":(Ea=u.richColors)!=null?Ea:_,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":K,"data-promise":!!u.promise,"data-swiped":je,"data-removed":re,"data-visible":Ve,"data-y-position":xn,"data-x-position":Rr,"data-index":x,"data-front":$e,"data-swiping":ne,"data-dismissible":We,"data-type":be,"data-invert":Ha,"data-swipe-out":ae,"data-swipe-direction":H,"data-expanded":!!(j||$&&K),"data-testid":u.testId,style:{"--index":x,"--toasts-before":x,"--z-index":w.length-x,"--offset":`${re?Fe:It.current}px`,"--initial-height":$?"auto":`${Ne}px`,...A,...u.style},onDragEnd:()=>{oe(!1),J(null),xr.current=null},onPointerDown:St=>{St.button!==2&&(Rn||!We||(Te.current=new Date,he(It.current),St.target.setPointerCapture(St.pointerId),St.target.tagName!=="BUTTON"&&(oe(!0),xr.current={x:St.clientX,y:St.clientY})))},onPointerUp:()=>{var St,hn,yr;if(ae||!We)return;xr.current=null;const Gn=Number(((St=Pe.current)==null?void 0:St.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),da=Number(((hn=Pe.current)==null?void 0:hn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),cr=new Date().getTime()-((yr=Te.current)==null?void 0:yr.getTime()),Dt=ee==="x"?Gn:da,va=Math.abs(Dt)/cr;if(Math.abs(Dt)>=yPe||va>.11){he(It.current),u.onDismiss==null||u.onDismiss.call(u,u),q(ee==="x"?Gn>0?"right":"left":da>0?"down":"up"),ta(),le(!0);return}else{var ar,dr;(ar=Pe.current)==null||ar.style.setProperty("--swipe-amount-x","0px"),(dr=Pe.current)==null||dr.style.setProperty("--swipe-amount-y","0px")}xe(!1),oe(!1),J(null)},onPointerMove:St=>{var hn,yr,Gn;if(!xr.current||!We||((hn=window.getSelection())==null?void 0:hn.toString().length)>0)return;const cr=St.clientY-xr.current.y,Dt=St.clientX-xr.current.x;var va;const ar=(va=e.swipeDirections)!=null?va:bPe(O);!ee&&(Math.abs(Dt)>1||Math.abs(cr)>1)&&J(Math.abs(Dt)>Math.abs(cr)?"x":"y");let dr={x:0,y:0};const jr=Yn=>1/(1.5+Math.abs(Yn)/20);if(ee==="y"){if(ar.includes("top")||ar.includes("bottom"))if(ar.includes("top")&&cr<0||ar.includes("bottom")&&cr>0)dr.y=cr;else{const Yn=cr*jr(cr);dr.y=Math.abs(Yn)<Math.abs(cr)?Yn:cr}}else if(ee==="x"&&(ar.includes("left")||ar.includes("right")))if(ar.includes("left")&&Dt<0||ar.includes("right")&&Dt>0)dr.x=Dt;else{const Yn=Dt*jr(Dt);dr.x=Math.abs(Yn)<Math.abs(Dt)?Yn:Dt}(Math.abs(dr.x)>0||Math.abs(dr.y)>0)&&xe(!0),(yr=Pe.current)==null||yr.style.setProperty("--swipe-amount-x",`${dr.x}px`),(Gn=Pe.current)==null||Gn.style.setProperty("--swipe-amount-y",`${dr.y}px`)}},Ht&&!u.jsx&&be!=="loading"?we.createElement("button",{"aria-label":Y,"data-disabled":Rn,"data-close-button":!0,onClick:Rn||!We?()=>{}:()=>{ta(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ld(G==null?void 0:G.closeButton,u==null||(a=u.classNames)==null?void 0:a.closeButton)},(Kn=B==null?void 0:B.close)!=null?Kn:sPe):null,(be||u.icon||u.promise)&&u.icon!==null&&((B==null?void 0:B[be])!==null||u.icon)?we.createElement("div",{"data-icon":"",className:Ld(G==null?void 0:G.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||fr():null,u.type!=="loading"?na:null):null,we.createElement("div",{"data-content":"",className:Ld(G==null?void 0:G.content,u==null||(i=u.classNames)==null?void 0:i.content)},we.createElement("div",{"data-title":"",className:Ld(G==null?void 0:G.title,u==null||(o=u.classNames)==null?void 0:o.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?we.createElement("div",{"data-description":"",className:Ld(k,st,G==null?void 0:G.description,u==null||(l=u.classNames)==null?void 0:l.description)},typeof u.description=="function"?u.description():u.description):null),we.isValidElement(u.cancel)?u.cancel:u.cancel&&Hb(u.cancel)?we.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||T,onClick:St=>{Hb(u.cancel)&&We&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,St),ta())},className:Ld(G==null?void 0:G.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,we.isValidElement(u.action)?u.action:u.action&&Hb(u.action)?we.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||R,onClick:St=>{Hb(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,St),!St.defaultPrevented&&ta())},className:Ld(G==null?void 0:G.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function dq(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function jPe(e,t){const r={};return[e,t].forEach((a,s)=>{const i=s===1,o=i?"--mobile-offset":"--offset",l=i?pPe:mPe;function c(d){["top","right","bottom","left"].forEach(h=>{r[`${o}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof a=="number"||typeof a=="string"?c(a):typeof a=="object"?["top","right","bottom","left"].forEach(d=>{a[d]===void 0?r[`${o}-${d}`]=l:r[`${o}-${d}`]=typeof a[d]=="number"?`${a[d]}px`:a[d]}):c(l)}),r}const uq=we.forwardRef(function(t,r){const{id:a,invert:s,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:h,mobileOffset:u,theme:f="light",richColors:m,duration:b,style:g,visibleToasts:y=fPe,toastOptions:x,dir:w=dq(),gap:j=xPe,icons:N,containerAriaLabel:_="Notifications"}=t,[S,A]=we.useState([]),T=we.useMemo(()=>a?S.filter(K=>K.toasterId===a):S.filter(K=>!K.toasterId),[S,a]),R=we.useMemo(()=>Array.from(new Set([i].concat(T.filter(K=>K.position).map(K=>K.position)))),[T,i]),[M,k]=we.useState([]),[P,O]=we.useState(!1),[F,$]=we.useState(!1),[G,B]=we.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=we.useRef(null),ee=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=we.useRef(null),H=we.useRef(!1),q=we.useCallback(K=>{A(te=>{var re;return(re=te.find(Q=>Q.id===K.id))!=null&&re.delete||tl.dismiss(K.id),te.filter(({id:Q})=>Q!==K.id)})},[]);return we.useEffect(()=>tl.subscribe(K=>{if(K.dismiss){requestAnimationFrame(()=>{A(te=>te.map(re=>re.id===K.id?{...re,delete:!0}:re))});return}setTimeout(()=>{LB.flushSync(()=>{A(te=>{const re=te.findIndex(Q=>Q.id===K.id);return re!==-1?[...te.slice(0,re),{...te[re],...K},...te.slice(re+1)]:[K,...te]})})})}),[S]),we.useEffect(()=>{if(f!=="system"){B(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;const K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:te})=>{B(te?"dark":"light")})}catch{K.addListener(({matches:re})=>{try{B(re?"dark":"light")}catch(Q){console.error(Q)}})}},[f]),we.useEffect(()=>{S.length<=1&&O(!1)},[S]),we.useEffect(()=>{const K=te=>{var re;if(o.every(oe=>te[oe]||te.code===oe)){var ne;O(!0),(ne=Y.current)==null||ne.focus()}te.code==="Escape"&&(document.activeElement===Y.current||(re=Y.current)!=null&&re.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[o]),we.useEffect(()=>{if(Y.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,H.current=!1)}},[Y.current]),we.createElement("section",{ref:r,"aria-label":`${_} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((K,te)=>{var re;const[Q,ne]=K.split("-");return T.length?we.createElement("ol",{key:K,dir:w==="auto"?dq():w,tabIndex:-1,ref:Y,className:d,"data-sonner-toaster":!0,"data-sonner-theme":G,"data-y-position":Q,"data-x-position":ne,style:{"--front-toast-height":`${((re=M[0])==null?void 0:re.height)||0}px`,"--width":`${gPe}px`,"--gap":`${j}px`,...g,...jPe(h,u)},onBlur:oe=>{H.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(H.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||H.current||(H.current=!0,J.current=oe.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{F||O(!1)},onDragEnd:()=>O(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},T.filter(oe=>!oe.position&&te===0||oe.position===K).map((oe,ae)=>{var le,je;return we.createElement(wPe,{key:oe.id,icons:N,index:ae,toast:oe,defaultRichColors:m,duration:(le=x==null?void 0:x.duration)!=null?le:b,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:s,visibleToasts:y,closeButton:(je=x==null?void 0:x.closeButton)!=null?je:c,interacting:F,position:K,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:q,toasts:T.filter(xe=>xe.position==oe.position),heights:M.filter(xe=>xe.position==oe.position),setHeights:k,expandByDefault:l,gap:j,expanded:P,swipeDirections:t.swipeDirections})})):null}))}),NPe={revised_contract_process_enabled:!1,awards_year:null,participation_commitment_amount:75,withdrawal_admin_charge_amount:295,half_table_amount:965,full_table_amount:1826,withdrawal_invoice_payment_window_days:28,finalist_payment_deadline_days:14,finalist_action_deadline_days:14,terms_version:"1.0",terms_snapshot:"",terms_snapshot_hash:"",event_name:"National Charity Today Awards™",event_date:null,venue:"",small_charity_turnover_threshold:25e4,small_charity_scheme_active:!0,small_charity_contact_url:"/contact",marketing_consent_required:!1,contact_email:"[email protected]",notes:""};function _Pe(){const{data:e,isLoading:t,error:r,refetch:a}=xt({queryKey:["contractSettings"],queryFn:async()=>{try{return(await pe.entities.ContractSettings.list("-updated_date",1))[0]||null}catch{return null}},staleTime:6e4}),s={...NPe,...e||{}},i=!!s.revised_contract_process_enabled;return{settings:s,isLoading:t,error:r,refetch:a,isRevisedFlowEnabled:i}}function hc(e){return e==null||Number.isNaN(Number(e))?"":"£"+Number(e).toLocaleStr
1871ing("en-GB",{minimumFractionDigits:0,maximumFractionDigits:0})}const SPe=[{value:"self",label:"I am nominating myself",description:"You accept the contractual commitments personally."},{value:"authorised_organisation",label:"I am authorised to act for the nominated organisation",description:"You confirm you have authority to accept the financial commitments for the organisation."},{value:"unauthorised_third_party",label:"I am submitting a third party nomination and am not authorised to bind the nominee or organisation",description:"You are responsible for the £75 Participation Commitment only. The nominee or an authorised organisation representative must separately accept any finalist offer before finalist status is confirmed."}];function CPe(e){return["Submitting a nomination causes the National Charity Today Awards™ to begin administrative and assessment work. This includes software and processing costs, staff time, eligibility checks, judging administration, communications and event planning.",`A ${hc(e.participation_commitment_amount)} Participation Commitment is payable when this nomination is submitted. This payment is non refundable except where a refund or cancellation right applies by law. If the entry is shortlisted, the ${hc(e.participation_commitment_amount)} will be credited against the cost of finalist attendance.`,`If an accepted entry is shortlisted and is subsequently withdrawn, or the required finalist actions are not completed within the stated deadline, a fixed ${hc(e.withdrawal_admin_charge_amount)} withdrawal and administration charge will become payable.`,`The ${hc(e.withdrawal_admin_charge_amount)} charge represents a reasonable estimate of the software, administration, assessment, promotional and event planning costs associated with processing and preparing a shortlisted entry. It also protects the Awards’ legitimate interest in managing finalist places, event capacity and programme planning. It is not intended as a punishment.`,"Do not submit this nomination unless you understand and accept the financial commitments that apply to you."]}function Rh({id:e,checked:t,onChange:r,children:a}){return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:e,checked:t,onCheckedChange:s=>r(!!s),className:"mt-0.5","aria-required":"true"}),n.jsx("label",{htmlFor:e,className:"cursor-pointer leading-snug text-sm text-gray-900",children:a})]})}function qp({id:e,label:t,value:r,onChange:a,placeholder:s,required:i,type:o="text"}){return n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{htmlFor:e,className:"font-semibold text-sm",children:[t," ",i&&n.jsx("span",{className:"text-red-600",children:"*"})]}),n.jsx(Me,{id:e,type:o,value:r||"",onChange:l=>a(l.target.value),placeholder:s,className:"h-11",required:i})]})}function APe({settings:e,values:t,onChange:r,submitDisabled:a,submitLoading:s,windowStatus:i}){const o=CPe(e),l=t.contracting_party==="authorised_organisation",c=t.contracting_party==="unauthorised_third_party",d=u=>f=>r(u,f),h=hc(e.participation_commitment_amount);return n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Who is accepting the nomination commitments?"}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"A person must never be treated as having bound another individual or organisation merely because they submitted that person or organisation for an award. Select the option that applies to you."}),n.jsx("div",{className:"space-y-3 mb-6",children:SPe.map(u=>{const f=t.contracting_party===u.value;return n.jsx("label",{htmlFor:`contracting_party_${u.value}`,className:`block p-4 rounded-lg border-2 cursor-pointer transition-all ${f?"border-accent-gold bg-accent-gold/10":"border-gray-200 hover:border-accent-gold/50"}`,children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("input",{type:"radio",id:`contracting_party_${u.value}`,name:"contracting_party",value:u.value,checked:f,onChange:()=>r("contracting_party",u.value),className:"mt-1 w-4 h-4 cursor-pointer",required:!0}),n.jsxs("div",{children:[n.jsx("div",{className:"font-semibold text-sm text-gray-900",children:u.label}),n.jsx("div",{className:"text-xs text-gray-600 mt-1",children:u.description})]})]})},u.value)})}),l&&n.jsxs("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-5 mb-6",children:[n.jsx("p",{className:"text-sm font-semibold text-gray-900 mb-4",children:"Confirm your authority to act for the organisation"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-5",children:[n.jsx(qp,{id:"contracting_full_name",label:"Your full name",value:t.contracting_full_name,onChange:d("contracting_full_name"),placeholder:"Full name",required:!0}),n.jsx(qp,{id:"contracting_organisation_legal_name",label:"Organisation's legal name",value:t.contracting_organisation_legal_name,onChange:d("contracting_organisation_legal_name"),placeholder:"Registered legal name",required:!0}),n.jsx(qp,{id:"contracting_position_or_role",label:"Position or role",value:t.contracting_position_or_role,onChange:d("contracting_position_or_role"),placeholder:"e.g. Chief Executive, Trustee",required:!0}),n.jsx(qp,{id:"contracting_email",label:"Email address",type:"email",value:t.contracting_email,onChange:d("contracting_email"),placeholder:"[email protected]",required:!0}),n.jsx(qp,{id:"contracting_telephone",label:"Telephone number",value:t.contracting_telephone,onChange:d("contracting_telephone"),placeholder:"+44 20 1234 5678",required:!0}
1871),n.jsx(qp,{id:"contracting_registered_charity_or_company_number",label:"Registered charity or company number (where applicable)",value:t.contracting_registered_charity_or_company_number,onChange:d("contracting_registered_charity_or_company_number"),placeholder:"e.g. 1234567"}),n.jsxs("div",{className:"md:col-span-2 space-y-2",children:[n.jsxs(ye,{htmlFor:"contracting_billing_address",className:"font-semibold text-sm",children:["Billing address ",n.jsx("span",{className:"text-red-600",children:"*"})]}),n.jsx(Me,{id:"contracting_billing_address",value:t.contracting_billing_address||"",onChange:u=>r("contracting_billing_address",u.target.value),placeholder:"Full billing address",className:"min-h-[100px] text-base",required:!0})]})]})]}),c&&n.jsx("div",{className:"rounded-lg border-2 border-amber-300 bg-amber-50 p-5 mb-6",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Ty,{className:"w-5 h-5 text-amber-700 mt-0.5 flex-shrink-0"}),n.jsxs("div",{className:"text-sm text-amber-900",children:[n.jsx("p",{className:"font-semibold mb-1",children:"You are responsible only for the £75 Participation Commitment."}),n.jsxs("p",{children:["If this entry is shortlisted, a separate finalist offer will be sent to the nominee or an authorised organisation representative. Finalist status will only be confirmed once that representative separately accepts the finalist offer, attendance commitment and ",hc(e.withdrawal_admin_charge_amount)," withdrawal condition. The nominee or organisation will not be invoiced for ",hc(e.withdrawal_admin_charge_amount)," solely because of this nomination, and will not be announced or promoted as a confirmed finalist until that acceptance has been received."]})]})]})}),n.jsxs("div",{className:"rounded-xl border-2 border-primary-navy bg-white shadow-sm p-6 mb-6",role:"region","aria-label":"Important costs and commitments",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[n.jsx(Qu,{className:"w-5 h-5 text-primary-navy"}),n.jsx("h4",{className:"text-lg font-bold text-primary-navy",children:"Important costs and commitments"})]}),n.jsxs("div",{className:"space-y-4 text-sm leading-relaxed text-gray-900",children:[o.map((u,f)=>n.jsx("p",{children:u},f)),n.jsxs("div",{className:"rounded-lg bg-gray-50 border border-gray-200 p-4",children:[n.jsx("p",{className:"font-semibold text-gray-900 mb-2",children:"Current finalist attendance options"}),n.jsxs("ul",{className:"space-y-1 text-sm text-gray-800",children:[n.jsxs("li",{children:["Half table: ",n.jsx("strong",{children:hc(e.half_table_amount)})]}),n.jsxs("li",{children:["Full table: ",n.jsx("strong",{children:hc(e.full_table_amount)})]})]}),n.jsxs("p",{className:"text-sm text-gray-700 mt-3",children:["The ",hc(e.participation_commitment_amount)," Participation Commitment will be credited against the selected attendance option if the entry is shortlisted."]}),e.small_charity_scheme_active&&n.jsxs("p",{className:"text-xs text-gray-600 mt-2",children:["Small charity ticket arrangements may be available, subject to eligibility and availability. Please"," ",n.jsx(Rt,{to:e.small_charity_contact_url||"/contact",className:"text-primary-navy underline font-medium",children:"contact us"})," ","for further details."]})]})]})]}),n.jsxs("div",{className:"space-y-5 mb-6","aria-label":"Required declarations",role:"group",children:[n.jsx(Rh,{id:"decl_accurate_info",checked:t.declaration_accurate_info,onChange:u=>r("declaration_accurate_info",u),children:"I confirm that the information supplied is accurate and that I have permission to provide the personal information contained in this nomination."}),n.jsxs(Rh,{id:"decl_terms",checked:t.declaration_terms,onChange:u=>r("declaration_terms",u),children:["I confirm that I have read and agree to the National Charity Today Awards™"," ",n.jsx(Rt,{to:Ct("Terms"),target:"_blank",rel:"noopener noreferrer",className:"text-primary-navy underline font-semibold",children:"Terms and Conditions"}),"."]}),n.jsxs(Rh,{id:"decl_75_commitment",checked:t.declaration_75_commitment,onChange:u=>r("declaration_75_commitment",u),children:["I understand that submitting this nomination requires payment of the ",hc(e.participation_commitment_amount)," Participation Commitment."]}),n.jsxs(Rh,{id:"decl_295_withdrawal",checked:t.declaration_295_withdrawal,onCh
1871ange:u=>r("declaration_295_withdrawal",u),children:["I understand and expressly agree that, if this entry is shortlisted and is subsequently withdrawn, or the required finalist actions are not completed by the stated deadline, a fixed ",hc(e.withdrawal_admin_charge_amount)," withdrawal and administration charge will become payable, subject to the contracting party and finalist acceptance requirements explained above."]}),n.jsx(Rh,{id:"decl_voluntary_accept_costs",checked:t.declaration_voluntary_accept_costs,onChange:u=>r("declaration_voluntary_accept_costs",u),children:"I confirm that I am entering voluntarily and have read the important costs and commitments displayed immediately above."}),l&&n.jsx(Rh,{id:"decl_org_authority",checked:t.declaration_org_authority,onChange:u=>r("declaration_org_authority",u),children:"I confirm that I am authorised to submit this nomination and accept these financial commitments on behalf of the organisation named in this form."}),n.jsx(Rh,{id:"decl_request_services_during_cancellation",checked:t.declaration_request_services_during_cancellation,onChange:u=>r("declaration_request_services_during_cancellation",u),children:"I expressly request that the National Charity Today Awards™ begin the nomination administration and assessment services during the applicable cancellation period."}),n.jsx("p",{className:"text-xs text-gray-600 -mt-3 ml-8",children:"If you ask us to begin providing services during an applicable cancellation period and then cancel, you may be required to pay a proportionate amount for services already supplied where permitted by law. Your statutory rights are not affected."}),n.jsx(Rh,{id:"marketing_consent",checked:t.marketing_consent,onChange:u=>r("marketing_consent",u),children:"I would like to receive occasional marketing and news updates from the National Charity Today Awards™ (optional)."})]}),n.jsxs("div",{children:[n.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-amber-600 mb-4",children:[n.jsx(Mr,{className:"w-3.5 h-3.5 flex-shrink-0"}),"This form does not auto-save. Please complete your nomination in one session."]}),n.jsx("button",{type:"submit",disabled:a,className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold py-6 text-base sm:text-lg shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed rounded-lg border-2 border-primary-navy inline-flex items-center justify-center gap-2",children:s?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-navy"}),"Paying ",h," and submitting…"]}):n.jsxs(n.Fragment,{children:[n.jsx(bn,{className:"w-5 h-5"}),"Pay ",h," and submit nomination"]})}),n.jsx("p",{className:"text-xs text-gray-600 mt-3 text-center leading-snug",children:"By selecting this button, you are submitting a paid nomination and entering into the commitments expressly accepted above."})]})]})}function kPe(){const{seoData:e}=TY("Nominations");Sr();const[t,r]=L.useState({categories:[],nominee_name:"",nominee_organization:"",nominee_email:"",nominee_phone:"",nominator_name:"",nominator_email:"",billing_address:"",nomination_statement:"",supporting_evidence:"",supporting_files:[],video_url:"",image_1_url:"",image_2_url:"",table_requirement:"",small_charity_scheme_application:"",small_charity_turnover_confirmed:!1,small_charity_turnover_amount:"",small_charity_accounts_url:"",small_charity_accounts_files:[],submission_year:new Date().getFullYear()}),[a,s]=L.useState(!1),[i,o]=L.useState(!1),[l,c]=L.useState(!1),[d,h]=L.useState(!1),[u,f]=L.useState(!1),[m,b]=L.useState(!1),[g,y]=L.useState(!1),[x,w]=L.useState(!1),[j,N]=L.useState(!1),[_,S]=L.useState(!1),{settings:A,isRevisedFlowEnabled:T}=_Pe(),[R,M]=L.useState({contracting_party:"",contracting_full_name:"",contracting_organisation_legal_name:"",contracting_position_or_role:"",contracting_email:"",contracting_telephone:"",contracting_billing_address:"",contracting_registered_charity_or_company_number:"",declaration_accurate_info:!1,declaration_terms:!1,declaration_75_commitment:!1,declaration_295_withdrawal:!1,declaration_voluntary_accept_costs:!1,declaration_org_authority:!1,declaration_request_services_during_cancellation:!1,marketing_consent:!1}),k=(be,We)=>M(Ze=>({...Ze,[be]:We})),[P,O]=L.useState(!1),[F,$]=L.useState(!1),[G,B]=L.useState(null),[Y,ee]=L.useState(!1),[J,H]=L.useState(null),[q,K]=L.useState(null),[te,re]=L.useState(!1),{data:Q=[]}=xt({queryKey:["activeCategories"],queryFn:()=>pe.entities.Category.filter({is_active:!0},"display_order",50)}),{data:ne}=xt({queryKey:["nominationsWindow"],queryFn:async()=>(await pe.entities.NominationsWindow.list("-updated_date",1))[0]||null}),ae=(()=>
1871{if(!ne)return"Open";if(ne.manualOverrideEnabled||ne.status==="Closed"||ne.status==="Upcoming")return ne.status;const be=new Date,We=ne.opensAt?new Date(ne.opensAt):null,Ze=ne.closesAt?new Date(ne.closesAt):null;return We&&be<We?"Upcoming":Ze&&be>Ze?"Closed":"Open"})();L.useEffect(()=>{const We=new URLSearchParams(window.location.search).get("category");We&&t.categories.length===0&&r(Ze=>({...Ze,categories:[We]}))},[]),L.useEffect(()=>{const We=new URLSearchParams(window.location.search).get("payment");We==="success"?(h(!0),window.scrollTo({top:0,behavior:"smooth"}),window.history.replaceState({},"",window.location.pathname)):We==="cancelled"&&(js.error("Payment was cancelled. Your nomination has not been submitted. Please complete the form and try again.",{duration:6e3,position:"top-center"}),window.history.replaceState({},"",window.location.pathname))},[]);const le=async be=>{if(be.preventDefault(),ae!=="Open"){js.error("Nominations are currently not open. Please check back during the nomination window.");return}if(!t.small_charity_scheme_application){js.error("Please indicate whether you wish to apply for the Small Charity Ticket Scheme.");return}if(t.small_charity_scheme_application==="yes"){if(!t.small_charity_turnover_confirmed){js.error("Please confirm your annual turnover is less than £250,000 to apply for the Small Charity Ticket Scheme.");return}const We=t.small_charity_accounts_files&&t.small_charity_accounts_files.length>0,Ze=t.small_charity_accounts_url&&t.small_charity_accounts_url.trim()!=="";if(!We&&!Ze){js.error("Please upload or link your most recently filed accounts to apply for the Small Charity Ticket Scheme.");return}}if(T){const We=R;if(!We.contracting_party){js.error("Please confirm who is accepting the nomination commitments.");return}if(We.contracting_party==="authorised_organisation"){if(!We.contracting_full_name||!We.contracting_organisation_legal_name||!We.contracting_position_or_role||!We.contracting_email||!We.contracting_telephone||!We.contracting_billing_address){js.error("Please complete all required organisation authority fields.");return}if(!We.declaration_org_authority){js.error("Please confirm you are authorised to accept the financial commitments on behalf of the organisation.");return}}const Ze={declaration_accurate_info:"Please confirm the information supplied is accurate.",declaration_terms:"Please confirm you have read and agree to the Terms and Conditions.",declaration_75_commitment:"Please confirm you understand the £75 Participation Commitment is payable.",declaration_295_withdrawal:"Please confirm you understand the £295 withdrawal and administration charge.",declaration_voluntary_accept_costs:"Please confirm you are entering voluntarily and accept the costs and commitments."};for(const[st,Mt]of Object.entries(Ze))if(!We[st]){js.error(Mt);return}if(!t.categories||t.categories.length===0){js.error("Please select at least one award category.");return}}else{if(!x){js.error("Please acknowledge the table pricing for the awards ceremony.");return}if(!j){js.error("Please acknowledge the £75 Participation Commitment before proceeding.");return}if(!g){js.error("Please agree to the Terms and Conditions before submitting your nomination.");return}if(!t.categories||t.categories.length===0){js.error("Please select at least one award category.");return}if(!t.table_requirement){js.error("Please select your attendance requirement (half table or full table) in Section 6.");return}}if(window.self!==window.top){js.error("Payment checkout only works from the published app, not the preview. Please open the published app to complete your nomination.",{duration:8e3,position:"top-center"});return}S(!0),js.loading("Preparing secure payment...",{id:"checkout",position:"top-center"});try{const We=await pe.functions.invoke("createNominationCheckout",{nominationData:t,acceptanceData:T?R:null}),{url:Ze}=We.data;if(Ze)js.dismiss("checkout"),window.location.href=Ze;else throw new Error("No checkout URL returned")}catch(We){js.dismiss("checkout"),js.error("Failed to initiate payment. Please try again.",{duration:5e3,position:"top-center"}),console.error("Checkout error:",We)}finally{S(!1)}},je=(be,We)=>{r(Ze=>({...Ze,[be]:We}))},xe=async be=>{const We=Array.from(be.target.files);if(We.length!==0){f(!0);try{const Ze=[];for(const st of We){if(!["application/pdf","image/jpeg","image/jpg","image/png","image/gif","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(st.type)){alert(`File ${st.
1871name} is not a supported format. Please upload PDF, images, or Word documents.`);continue}if(st.size>10*1024*1024){alert(`File ${st.name} is too large. Maximum file size is 10MB.`);continue}const Ht=await pe.integrations.Core.UploadFile({file:st});Ze.push({filename:st.name,url:Ht.file_url,size:st.size})}r(st=>({...st,supporting_files:[...st.supporting_files,...Ze]}))}catch{alert("Failed to upload files. Please try again.")}f(!1),be.target.value=""}},Fe=be=>{be.preventDefault(),b(!0)},he=be=>{be.preventDefault(),b(!1)},Ne=async be=>{be.preventDefault(),b(!1);const We=Array.from(be.dataTransfer.files);if(We.length!==0){f(!0);try{const Ze=[];for(const st of We){if(!["application/pdf","image/jpeg","image/jpg","image/png","image/gif","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(st.type)){alert(`File ${st.name} is not a supported format. Please upload PDF, images, or Word documents.`);continue}if(st.size>10*1024*1024){alert(`File ${st.name} is too large. Maximum file size is 10MB.`);continue}const Ht=await pe.integrations.Core.UploadFile({file:st});Ze.push({filename:st.name,url:Ht.file_url,size:st.size})}r(st=>({...st,supporting_files:[...st.supporting_files,...Ze]}))}catch{alert("Failed to upload files. Please try again.")}f(!1)}},ue=be=>{r(We=>({...We,supporting_files:We.supporting_files.filter((Ze,st)=>st!==be)}))},rt=be=>{const We=be.split(".").pop().toLowerCase();return["jpg","jpeg","png","gif"].includes(We)?Cg:We==="pdf"?pr:FX},Te=be=>be<1024?be+" B":be<1024*1024?(be/1024).toFixed(1)+" KB":(be/(1024*1024)).toFixed(1)+" MB",{data:Pe=[]}=xt({queryKey:["nominationConfirmationPage"],queryFn:()=>pe.entities.NominationConfirmationPage.list("-created_date",1)}),$e=Pe[0],Ve=($e==null?void 0:$e.content_items)||[];if(d){const be=[...Ve].sort((Ze,st)=>Ze.display_order-st.display_order),We=be.length>0;return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 to-blue-50 py-20",children:n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-32 h-32 mx-auto mb-8 drop-shadow-xl"}),n.jsx("h1",{className:"text-4xl font-bold text-emerald-600 mb-4",children:"Nomination Submitted Successfully!"}),We?n.jsx("div",{className:"space-y-6 mb-8",children:be.map((Ze,st)=>{var Mt;if(Ze.type==="heading")return n.jsx("h2",{className:`text-2xl font-bold ${Ze.style==="success"?"text-green-600":Ze.style==="info"?"text-blue-600":"text-gray-900"}`,children:Ze.content},st);if(Ze.type==="text"){const Ht="text-lg leading-relaxed";return Ze.style==="highlight"?n.jsx("div",{className:"bg-white rounded-lg p-6 border-2 border-accent-gold shadow-lg",children:n.jsx("p",{className:`${Ht} text-gray-900`,children:Ze.content})},st):Ze.style==="success"?n.jsx("div",{className:"bg-emerald-50 rounded-lg p-6 border border-emerald-200 shadow-lg",children:n.jsx("p",{className:`${Ht} text-emerald-900`,children:Ze.content})},st):Ze.style==="info"?n.jsx("div",{className:"bg-blue-50 rounded-lg p-6 border border-blue-200 shadow-lg",children:n.jsx("p",{className:`${Ht} text-blue-900`,children:Ze.content})},st):n.jsx("p",{className:`${Ht} text-gray-600`,children:Ze.content},st)}return Ze.type==="bullet_list"?n.jsx("div",{className:"bg-white rounded-xl p-8 shadow-lg",children:n.jsx("ul",{className:"text-left space-y-3 text-gray-700",children:(Mt=Ze.bullet_points)==null?void 0:Mt.map((Ht,Yt)=>n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:Ht})]},Yt))})},st):Ze.type==="pdf"?n.jsx("a",{href:Ze.content,target:"_blank",rel:"noopener noreferrer",className:"block bg-white rounded-lg p-6 border-2 border-gray-200 hover:border-primary-navy hover:shadow-xl transition-all",children:n.jsxs("div",{className:"flex items-center gap-3 justify-center",children:[n.jsx(pr,{className:"w-8 h-8 text-red-600"}),n.jsxs("div",{className:"text-left",children:[n.jsx("div",{className:"font-semibold text-gray-900 text-lg",children:Ze.file_name||"Download PDF"}),n.jsx("div",{className:"text-sm text-gray-600",children:"Click to download"})]})]})},st):Ze.type==="image"?n.jsx("div",{className:"text-center",children:n.jsx("img",{src:Ze.content,alt:"Content",className:"max-w-full rounded-lg shadow-lg mx-auto"})},st):Ze.type==="button"?n.jsx("div",{className:"text-center",children:n.jsx("a",{href:Ze.button_link,children:n.jsx(me,{size:"lg",className:"bg-primary-navy hover:opacity-90",children:Ze.content})})},st):null})}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Thank y
1871ou for taking the time to nominate."}),n.jsxs("div",{className:"bg-white rounded-xl p-8 shadow-lg mb-8",children:[n.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"What Happens Next"}),n.jsxs("ul",{className:"text-left space-y-3 text-gray-700",children:[n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Confirmation email sent"})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Quality check within 48 hours"})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Judges review within 7 to 14 days"})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Finalists contacted directly"})]}),n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Winners announced at the Awards ceremony"})]})]}),n.jsxs("p",{className:"mt-4 text-sm text-gray-600",children:["If you have any other questions, please visit our ",n.jsx(Rt,{to:Ct("FAQs"),className:"text-primary-navy hover:text-accent-gold underline font-medium",children:"FAQs page"}),"."]})]}),n.jsx(me,{size:"lg",onClick:()=>{h(!1),r({categories:[],nominee_name:"",nominee_organization:"",nominee_email:"",nominee_phone:"",nominator_name:"",nominator_email:"",billing_address:"",nomination_statement:"",supporting_evidence:"",supporting_files:[],video_url:"",image_1_url:"",image_2_url:"",table_requirement:"",small_charity_scheme_application:"",small_charity_turnover_confirmed:!1,small_charity_turnover_amount:"",small_charity_accounts_url:"",small_charity_accounts_files:[],submission_year:new Date().getFullYear()}),y(!1),w(!1),N(!1)},className:"bg-primary-navy hover:opacity-90",children:"Submit Another Nomination"})]})]})})})}return ae==="Closed"?n.jsxs(n.Fragment,{children:[n.jsx(uq,{position:"top-center"}),n.jsx(n3,{title:(e==null?void 0:e.meta_title)||"Submit Your Nomination | National Charity Today Awards™",description:(e==null?void 0:e.meta_description)||"Submit your nomination for the National Charity Today Awards 2026. Recognise an outstanding charity, individual or organisation making a difference in the UK.",keywords:(e==null?void 0:e.keywords)||["charity nominations","charity awards","award nominations","UK charity"],ogTitle:e==null?void 0:e.og_title,ogDescription:e==null?void 0:e.og_description,robotsIndex:e==null?void 0:e.robots_index,robotsFollow:e==null?void 0:e.robots_follow}),n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center px-4 py-20",children:n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-2xl w-full text-center",children:n.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl border border-gray-100 p-10 sm:p-14",children:[n.jsx("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-red-100 flex items-center justify-center",children:n.jsx(Qu,{className:"w-10 h-10 text-red-600"})}),n.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-gray-900 mb-4",children:"Nominations Are Now Closed"}),n.jsxs("p",{className:"text-lg text-gray-600 leading-relaxed mb-8",children:["Thank you for your interest in the National Charity Today Awards™. The nomination window has closed and we are no longer accepting submissions for this year's awards.",(ne==null?void 0:ne.closure_reason)==="capacity"&&" Finalist capacity has been reached."]}),n.jsxs("div",{className:"bg-gray-50 rounded-xl p-6 mb-8 text-left",children:[n.jsxs("h2",{className:"font-semibold text-gray-900 mb-3 flex items-center gap-2",children:[n.jsx(Ty,{className:"w-5 h-5 text-primary-navy"}),"What happens next?"]}),n.jsxs("ul",{className:"space-y-2 text-gray-700",children:[n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Our judges are reviewing all submitted nominations."})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Finalists will be contacted directly with further details."})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600 mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Winners will be announced at the Awards ceremony."})]})]})]}),n.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Please check back when nominations reopen, or contact us with any questions."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[n.jsx(Rt,{to:Ct("Home"),children:n.jsx(me,{size:"lg",className:"bg-primary-navy hover:opacity-90 w-full sm:w-auto",children:"Return to Home"})}),n.jsx(Rt,{to:Ct("Contact"),children:n.jsx(me,{size:"lg",variant:"outline",className:"w-full sm:w-auto",children:"Contact Us"})})]})]})})})]}):n.jsxs(n.Fragment,{children:[n.jsx(uq,{position:"top-center"}),n.jsx(n3,{title:(e==null?void 0:e.meta_title)||"Submit Your Nomination | National Charity Today Awards™",description:(e==null?void 0:e.meta_description)||"Submit your nomination for the National Charity Today Awards 2026. Recognise an outstanding charity, individual or organisation making a difference in the UK.",keywords:(e==null?void 0:e.keywords)||["charity nominations","charity awards","award nominations","UK charity"],ogTitle:e==null?void 0:e.og_title,ogDescription:e==null?void 0:e.og_description,robotsIndex:e==null?void 0:e.robots_index,robotsFollow:e==null?void 0:e.robots_follow}),n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 overflow-x-hidden",children:[n.jsx(LY,{open:te,onOpenChange:re}),ae!=="Open"&&n.jsx("div",{className:`${ae==="Upcoming"?"bg-blue-600":"bg-red-600"} text-white py-4`,children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex items-center justify-center gap-3 text-center",children:[n.jsx(Mr,{className:"w-6 h-6"}),n.jsxs("div",{children:[ae==="Upcoming"&&ne&&ne.opensAt&&n.jsxs("p",{className:"font-semibold text-lg",children:["Nominations open on ",yt(new Date(ne.opensAt),"d MMMM yyyy")]}),ae==="Closed"&&n.jsxs("p",{className:"font-semibold text-lg",children:["Nominations are now closed",(ne==null?void 0:ne.closureReason)==="CapacityReached"&&" - Finalist capacity filled"]})]})]})})}),n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-[#3a2a60] text-white pt-5 pb-5 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-0 right-0 opacity-10 h-full flex items-center",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"",className:"w-72 h-72 object-contain"})}),n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 text-center",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
1871,animate:{opacity:1,y:0},children:[n.jsxs("div",{className:`inline-flex items-center gap-2 ${ae==="Open"?"bg-green-800/60 border-green-600/50":ae==="Upcoming"?"bg-blue-800/60 border-blue-600/50":"bg-red-800/60 border-red-600/50"} border rounded-full px-4 py-1.5 mb-2`,children:[n.jsx(bn,{className:`w-4 h-4 ${ae==="Open"?"text-green-400":ae==="Upcoming"?"text-blue-400":"text-red-400"}`}),n.jsxs("span",{className:`text-sm font-semibold ${ae==="Open"?"text-green-300":ae==="Upcoming"?"text-blue-300":"text-red-300"}`,children:[ae==="Open"&&"Nominations Open",ae==="Upcoming"&&"Nominations Opening Soon",ae==="Closed"&&"Nominations Closed"]})]}),n.jsx("h1",{className:"text-4xl lg:text-5xl font-bold mb-1.5",children:"Submit Your Nomination"}),n.jsx("p",{className:"text-base text-white/80 leading-relaxed mb-1 max-w-xl mx-auto",children:"Recognise outstanding achievement across the UK charity sector."}),n.jsx("p",{className:"text-xs text-white/50 mb-2",children:"Nominations close when full or 60 days before the awards ceremony."})]})})]}),n.jsx("section",{className:"py-6 w-full",children:n.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 w-full",children:[ae!=="Open"&&n.jsxs(dm,{className:`mb-6 ${ae==="Upcoming"?"border-blue-200 bg-blue-50":"border-red-200 bg-red-50"}`,children:[n.jsx(Mr,{className:`h-5 w-5 ${ae==="Upcoming"?"text-blue-600":"text-red-600"}`}),n.jsxs(um,{className:ae==="Upcoming"?"text-blue-900":"text-red-900",children:[ae==="Upcoming"&&ne&&n.jsxs("div",{children:[n.jsx("p",{className:"font-semibold mb-1",children:"Nominations are not yet open"}),n.jsxs("p",{children:["Submissions will be accepted from ",yt(new Date(ne.opening_date),"d MMMM yyyy 'at' HH:mm")]})]}),ae==="Closed"&&n.jsxs("div",{children:[n.jsx("p",{className:"font-semibold mb-1",children:"Nominations are closed"}),n.jsx("p",{className:"mb-2",children:"Thank you for your interest. The nomination window for this year has ended."}),(ne==null?void 0:ne.closure_reason)==="capacity"&&n.jsx("p",{className:"text-sm italic",children:"Nominations closed early due to finalist capacity being reached."})]})]})]}),n.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-center gap-x-6 gap-y-2 text-sm",children:[n.jsxs("button",{onClick:()=>re(!0),className:"flex items-center gap-1.5 text-indigo-600 font-medium hover:text-indigo-800 transition-colors",children:[n.jsx(pr,{className:"w-3.5 h-3.5"}),"Nomination Journey"]}),n.jsxs(Nn,{children:[n.jsx(M1,{asChild:!0,children:n.jsxs("button",{className:"flex items-center gap-1.5 text-amber-600 font-medium hover:text-amber-800 transition-colors",children:[n.jsx(bn,{className:"w-3.5 h-3.5"}),"How Nominations Are Scored"]})}),n.jsxs(vn,{className:"max-w-md",children:[n.jsx(_n,{children:n.jsxs(Sn,{className:"flex items-center gap-2 text-xl",children:[n.jsx(Ty,{className:"w-5 h-5 text-indigo-600"}),"How Nominations Are Scored"]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-gray-600",children:"Nominations are assessed by our AI quality system and judging panel across 6 criteria:"}),n.jsx("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[{label:"Completeness",pts:"15 points"},{label:"Detail Quality",pts:"25 points"},{label:"Evidence",pts:"20 points"},{label:"Impact Clarity",pts:"20 points"},{label:"Video Quality",pts:"10 points"},{label:"Image Quality",pts:"10 points"}].map(({label:be,pts:We})=>n.jsxs("div",{className:"bg-indigo-50 rounded-lg p-3 border border-indigo-200",children:[n.jsx("div",{className:"font-bold text-indigo-900",children:be}),n.jsx("div",{className:"text-indigo-600",children:We})]},be))}),n.jsx("p",{className:"text-xs text-indigo-700 bg-indigo-50 p-3 rounded-lg",children:"Tip: Include a video and high-quality images to maximise your score!"})]})]})]}),n.jsxs(Rt,{to:Ct("FAQs"),className:"flex items-center gap-1.5 text-emerald-600 font-medium hover:text-emerald-800 transition-colors",children:[n.jsx(Ty,{className:"w-3.5 h-3.5"}),"Frequently Asked Questions"]})]}),n.jsxs(_e,{className:"shadow-sm border border-gray-200",children:[n.jsxs(Nt,{className:"border-b border-gray-100 px-8 pt-7 pb-5",children:[n.jsx(Pt,{className:"text-xl font-bold text-primary-navy",children:"Nominee Details and Impact"}),n.jsx(wr,{className:"text-gray-500 text-sm mt-1",children:"Fields marked * are required."})]}),n.jsx(Ce,{className:"p-8",children:n.jsxs("form",{onSubmit:le,className:"space-y-8",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"1. Nominee Information"}),n.jsx("p",{className:"text-sm text-gray-600 mb-6",children:"The nominee is the charity, individual, business, or group you are putt
1871ing forward for this award."}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominee_name",className:"font-semibold",children:"Name of Nominee *"}),n.jsx(Me,{id:"nominee_name",value:t.nominee_name,onChange:be=>je("nominee_name",be.target.value),placeholder:"Full name or charity name",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominee_organization",className:"font-semibold",children:"Organisation *"}),n.jsx(Me,{id:"nominee_organization",value:t.nominee_organization,onChange:be=>je("nominee_organization",be.target.value),placeholder:"Organisation name",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominee_email",className:"font-semibold",children:"Email Address *"}),n.jsx(Me,{id:"nominee_email",type:"email",value:t.nominee_email,onChange:be=>je("nominee_email",be.target.value),placeholder:"[email protected]",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominee_phone",className:"font-semibold",children:"Telephone Number *"}),n.jsx(Me,{id:"nominee_phone",value:t.nominee_phone,onChange:be=>je("nominee_phone",be.target.value),placeholder:"+44 20 1234 5678",className:"h-12",required:!0})]})]})]}),n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"2. Nominator's Information"}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominator_name",className:"font-semibold",children:"Your Name *"}),n.jsx(Me,{id:"nominator_name",value:t.nominator_name,onChange:be=>je("nominator_name",be.target.value),placeholder:"Your full name",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nominator_email",className:"font-semibold",children:"Your Email *"}),n.jsx(Me,{id:"nominator_email",type:"email",value:t.nominator_email,onChange:be=>je("nominator_email",be.target.value),placeholder:"[email protected]",className:"h-12",required:!0})]}),n.jsxs("div",{className:"space-y-2 md:col-span-2",children:[n.jsx(ye,{htmlFor:"billing_address",className:"font-semibold",children:"Billing Address *"}),n.jsx(en,{id:"billing_address",value:t.billing_address||"",onChange:be=>je("billing_address",be.target.value),placeholder:"Enter your full billing address",className:"min-h-[100px] text-base",required:!0})]})]})]}),n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"3. Award Categories"}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs(ye,{className:"text-base font-semibold",children:["Select Category * ",n.jsx("span",{className:"text-sm font-normal text-gray-500",children:"(Select up to 2)"})]}),n.jsx("p",{className:"text-sm text-gray-600",children:"Select the category or categories that best reflect the nominee's impact:"}),n.jsx("div",{className:"grid md:grid-cols-2 gap-3",role:"group","aria-label":"Select award categories",children:Q.map(be=>{const We=t.categories.includes(be.title),Ze=!We&&t.categories.length>=2;return n.jsx("div",{role:"checkbox","aria-checked":We,"aria-disabled":Ze,tabIndex:Ze?-1:0,onClick:()=>{Ze||(We?je("categories",t.categories.filter(st=>st!==be.title)):je("categories",[...t.categories,be.title]))},onKeyDown:st=>{if(st.key==="Enter"||st.key===" "){if(st.preventDefault(),Ze)return;We?je("categories",t.categories.filter(Mt=>Mt!==be.title)):je("categories",[...t.categories,be.title])}},className:`p-4 rounded-lg border-2 cursor-pointer transition-all focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 ${We?"border-accent-gold bg-accent-gold/10":Ze?"border-gray-200 bg-gray-50 opacity-50 cursor-not-allowed":"border-gray-200 hover:border-accent-gold/50 hover:bg-gray-50"}`,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-5 h-5 rounded border-2 flex items-center justify-center ${We?"border-accent-gold bg-accent-gold":"border-gray-300"}`,children:We&&n.jsx(Cn,{className:"w-4 h-4 text-white"})}),n.jsx("span",{className:`font-medium ${We?"text-primary-navy":"text-gray-700"}`,children:be.title})]})},be.id)})}),t.categories.length>0&&n.jsxs("div",{className:"flex flex-wrap gap-2 mt-2",children:[n.jsx("span",{className:"text-sm text-gray-600",children:"Selected:"}),t.categories.map((be,We)=>n.jsx("span",{className:"text-sm bg-accent-gold/20 text-primary-navy px-3 py-1 rounded-full font-medium",children:be},We))]}),n.jsx("p",{className:"text-sm text-gray-500",children:t.categories.length===0?"Select at least one category for this nomination":t.categories.length===1?"You can select one more category if applicable":"Maximum categories selected"}),t.categories.length===2&&n.jsx("p",{className:"text-xs text-blue-600",children:"ℹ️ Your nomination will be entered into both categories as 
1871separate entries for judging purposes."})]})]}),n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"4. Nomination Statement"}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"nomination_statement",className:"font-semibold",children:"Why does this nominee deserve to win? *"}),n.jsx(en,{id:"nomination_statement",value:t.nomination_statement,onChange:be=>je("nomination_statement",be.target.value),placeholder:"Provide a clear and compelling overview of their achievements, impact, and what sets them apart. Please include specific examples where possible...",className:"min-h-[200px] text-base",required:!0}),n.jsx("p",{className:"text-sm text-gray-500",children:"Minimum 200 words."})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"supporting_evidence",className:"font-semibold",children:"Supporting Evidence (Optional)"}),n.jsx(en,{id:"supporting_evidence",value:t.supporting_evidence,onChange:be=>je("supporting_evidence",be.target.value),placeholder:"Include any additional information such as statistics, awards, media coverage, or testimonials to strengthen your nomination.",className:"min-h-[150px] text-base"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{className:"font-semibold",children:"Supporting Files (Optional)"}),n.jsx("div",{className:`border-2 border-dashed rounded-lg p-6 transition-colors ${m?"border-accent-gold bg-accent-gold/10":"border-gray-300 hover:border-accent-gold"}`,onDragOver:Fe,onDragLeave:he,onDrop:Ne,children:n.jsxs("div",{className:"text-center",children:[n.jsx(Al,{className:"w-12 h-12 mx-auto mb-4 text-gray-400"}),n.jsx("p",{className:"text-sm text-gray-600 mb-2",children:m?"Drop files here":"Drag & drop files here or click to browse"}),n.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Upload relevant documents (PDF, JPG, PNG, GIF, DOC, DOCX – up to 10MB each)"}),n.jsxs("label",{htmlFor:"file-upload",className:"cursor-pointer inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",children:[u?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2","aria-hidden":"true"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2","aria-hidden":"true"}),"Choose Files"]}),n.jsx("input",{id:"file-upload",type:"file",multiple:!0,onChange:xe,accept:".pdf,.jpg,.jpeg,.png,.gif,.doc,.docx",className:"sr-only","aria-label":"Upload supporting files",disabled:u})]})]})}),t.supporting_files&&t.supporting_files.length>0&&n.jsxs("div",{className:"mt-4 space-y-2",children:[n.jsxs("p",{className:"text-sm font-semibold text-gray-700",children:["Uploaded Files (",t.supporting_files.length,")"]}),t.supporting_files.map((be,We)=>{const Ze=rt(be.filename);return n.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded-lg p-3 border border-gray-200",children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy rounded-lg flex items-center justify-center flex-shrink-0",children:n.jsx(Ze,{className:"w-5 h-5 text-accent-gold"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:be.filename}),n.jsx("p",{className:"text-xs text-gray-500",children:Te(be.size)})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("a",{href:be.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary-navy hover:text-accent-gold text-sm font-medium",children:"View"}),n.jsx(me,{type:"button",variant:"ghost",size:"icon",onClick:()=>ue(We),className:"text-red-500 hover:text-red-700 hover:bg-red-50","aria-label":`Remove file ${be.filename}`,children:n.jsx(Ei,{className:"w-4 h-4","aria-hidden":"true"})})]})]},We)})]})]})]})]}),n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"5. Media"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"Enhance your nomination with visual content to supp
1871ort your submission."}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{htmlFor:"video_url",className:"font-semibold flex items-center gap-2",children:[n.jsx(rZ,{className:"w-4 h-4 text-red-500"}),"Video URL (Up to 10 points)"]}),n.jsx(Me,{id:"video_url",value:t.video_url,onChange:be=>je("video_url",be.target.value),placeholder:"https://www.youtube.com/watch?v=... or https://vimeo.com/...",className:"h-12"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Paste a YouTube or Vimeo link showcasing the nominee's work, impact, or achievements."})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{className:"font-semibold flex items-center gap-2",children:[n.jsx(ib,{className:"w-4 h-4 text-blue-500"}),"Image 1 (Up to 5 points)"]}),t.image_1_url?n.jsxs("div",{className:"relative border-2 border-green-300 rounded-lg p-2 bg-green-50",children:[n.jsx("img",{src:t.image_1_url,alt:"Supporting image 1",className:"w-full h-40 object-cover rounded-lg"}),n.jsx(me,{type:"button",variant:"destructive",size:"sm",className:"absolute top-4 right-4",onClick:()=>je("image_1_url",""),children:n.jsx(Ei,{className:"w-4 h-4"})})]}):n.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 hover:border-blue-400 transition-colors",children:n.jsxs("div",{className:"text-center",children:[n.jsx(ib,{className:"w-10 h-10 mx-auto mb-3 text-gray-400"}),n.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Upload supporting image"}),n.jsxs("label",{className:"cursor-pointer inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-3",children:[a?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2"}),"Choose Image"]}),n.jsx("input",{id:"image-1-upload",type:"file",accept:"image/*",className:"sr-only","aria-label":"Upload first supporting image",disabled:a,onChange:async be=>{const We=be.target.files[0];if(We){s(!0);try{const Ze=await pe.integrations.Core.UploadFile({file:We});je("image_1_url",Ze.file_url)}catch{alert("Failed to upload image. Please try again.")}s(!1),be.target.value=""}}})]})]})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(ye,{className:"font-semibold flex items-center gap-2",children:[n.jsx(ib,{className:"w-4 h-4 text-blue-500"}),"Image 2 (Up to 5 points)"]}),t.image_2_url?n.jsxs("div",{className:"relative border-2 border-green-300 rounded-lg p-2 bg-green-50",children:[n.jsx("img",{src:t.image_2_url,alt:"Supporting image 2",className:"w-full h-40 object-cover rounded-lg"}),n.jsx(me,{type:"button",variant:"destructive",size:"sm",className:"absolute top-4 right-4",onClick:()=>je("image_2_url",""),children:n.jsx(Ei,{className:"w-4 h-4"})})]}):n.jsx("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-6 hover:border-blue-400 transition-colors",children:n.jsxs("div",{className:"text-center",children:[n.jsx(ib,{className:"w-10 h-10 mx-auto mb-3 text-gray-400"}),n.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Upload supporting image"}),n.jsxs("label",{className:"cursor-pointer inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-3",children:[i?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2"}),"Choose Image"]}),n.jsx("input",{id:"image-2-upload",type:"file",accept:"image/*",className:"sr-only","aria-label":"Upload second supporting image",disabled:i,onChange:async be=>{const We=be.target.files[0];if(We){o(!0);try{const Ze=await pe.integrations.Core.UploadFile({file:We});je("image_2_url",Ze.file_url)}catch{alert("Failed to upload image. Please try again.")}o(!1),be.target.value=""}}})]})]})})]})]}),n.jsx("p",{className:"text-sm text-gray-500",children:"High-quality visuals showcasing impact, team, or delivery will strengthen your nomination."})]})]}),!T&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"border-t pt-8",children:[n.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"6. Attendance & Agreements"}),n.jsxs("div",{className:"space-y-5 text-sm text-gray-700",children:[n.jsxs("div",{children:[n.jsx("p",{className:"font-semibold text-gray-900 mb-3",children:"Finalist Attendance Requirements"}),n.jsxs("div",{className:"space-y-2.5 pl-1",children:[n.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"table_requirement_pricing",value:"half_table",checked:t.table_requirement==="half_table",onCh
1871ange:be=>je("table_requirement",be.target.value),className:"w-4 h-4 cursor-pointer"}),n.jsxs("span",{children:["Half table (5 seats): ",n.jsx("strong",{children:"£965"})]})]}),n.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"table_requirement_pricing",value:"full_table",checked:t.table_requirement==="full_table",onChange:be=>je("table_requirement",be.target.value),className:"w-4 h-4 cursor-pointer"}),n.jsxs("span",{children:["Full table (10 seats): ",n.jsx("strong",{children:"£1,826"})]})]})]}),n.jsx("div",{className:"mt-3 text-xs text-gray-500",children:n.jsxs(Nn,{children:[n.jsx(M1,{asChild:!0,children:n.jsx("button",{className:"text-blue-600 underline hover:text-blue-800 transition-colors text-left",children:"Eligible Small Charity Ticket Scheme for charities with an annual turnover below £250,000"})}),n.jsxs(vn,{className:"max-w-md",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-blue-900",children:"Eligible Small Charity Ticket Scheme"})}),n.jsxs("p",{className:"text-blue-800 text-sm",children:["To support smaller organisations, a limited allocation of discounted individual tickets is available to charities with an annual turnover below £250,000. Eligibility is assessed using the charity's most recently submitted accounts. Please ",n.jsx("a",{href:"/contact",className:"underline font-semibold hover:text-blue-900",children:"contact us"})," for further details."]})]})]})}),n.jsxs("div",{className:"rounded-lg border-2 border-blue-200 bg-blue-50/30 p-5 mt-5",children:[n.jsx("p",{className:"font-semibold text-gray-900",children:"Small Charity Ticket Scheme"}),n.jsx("p",{className:"text-sm text-gray-600 mt-1 mb-4",children:"The Small Charity Ticket Scheme is available to charities with an annual turnover of less than £250,000, based on their most recently filed accounts."}),n.jsxs("div",{className:"space-y-2 mb-1",children:[n.jsx("p",{className:"text-sm font-medium text-gray-700",children:"Would you like to apply for the Small Charity Ticket Scheme? *"}),n.jsxs("div",{className:"flex gap-6",children:[n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"small_charity_scheme",value:"yes",checked:t.small_charity_scheme_application==="yes",onChange:be=>je("small_charity_scheme_application",be.target.value),className:"w-4 h-4 cursor-pointer"}),n.jsx("span",{children:"Yes"})]}),n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"small_charity_scheme",value:"no",checked:t.small_charity_scheme_application==="no",onChange:be=>je("small_charity_scheme_application",be.target.value),className:"w-4 h-4 cursor-pointer"}),n.jsx("span",{children:"No"})]})]})]}),t.small_charity_scheme_application==="yes"&&n.jsxs("div",{className:"space-y-4 mt-4 border-t border-blue-200 pt-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{className:"font-semibold",children:"Confirm your annual turnover *"}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:"small_charity_turnover_confirmed",checked:t.small_charity_turnover_confirmed,onCheckedChange:be=>je("small_charity_turnover_confirmed",be),className:"mt-0.5"}),n.jsx("label",{htmlFor:"small_charity_turnover_confirmed",className:"cursor-pointer leading-snug text-sm",children:"I confirm that, based on our most recently filed accounts, the charity's annual turnover is less than £250,000."})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(ye,{htmlFor:"small_charity_turnover_amount",className:"text-sm font-medium",children:"Annual turnover (GBP)"}),n.jsx(Me,{id:"small_charity_turnover_amount",type:"number",min:"0",step:"1",value:t.small_charity_turnover_amount,onChange:be=>je("small_charity_turnover_amount",be.target.value),placeholder:"e.g. 120000",className:"h-10"})]}),n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(ye,{htmlFor:"small_charity_accounts_url",className:"text-sm font-medium",children:"Link to most recently filed accounts"}),n.jsx(Me,{id:"small_charity_accounts_url",type:"url",value:t.small_charity_accounts_url,onChange:be=>je("small_charity_accounts_url",be.target.value),placeholder:"https://register-of-charities.charitycommission.gov.uk/...",className:"h-10"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{className:"font-semibold",children:"Upload most recently filed accounts"}),n.jsx("p",{className:"text-sm text-gray-600",children:"PDF, images or Word documents up to 10MB each."}),n.jsxs("label",{htmlFor:"accounts-upload",className:"cursor-pointer inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 px-4 py-2",children:[l?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-primary-navy mr-2"}),"Uploading..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Al,{className:"w-4 h-4 mr-2"}),"Choose Accounts"]}),n.jsx("input",{id:"accounts-upload",type:"file",multiple:!0,accept:".pdf,.jpg,.jpeg,.png,.gif,.doc,.docx",className:"sr-only","aria-label":"Upload most recently filed accounts",disabled:l,onChange:async be=>{const We=Array.from(be.target.files);if(We.length===0)return;const Ze=["application/pdf","image/jpeg","image/jpg","image/png","image/gif","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"];c(!0);try{const st=[];for(const Mt of We){if(!Ze.includes(Mt.type)){alert(`File ${Mt.name} is not a supported format. Please upload PDF, images, or Word documents.`);continue}if(Mt.size>10*1024*1024){alert(`File ${Mt.name} is too large. Maximum file size is 10MB.`);continue}const Ht=await pe.integrations.Core.UploadFile({file:Mt});st.push({filename:Mt.name,url:Ht.file_url,size:Mt.size})}r(Mt=>({...Mt,small_charity_accounts_files:[...Mt.small_charity_accounts_files||[],...st]}))}catch{alert("Failed to upload accounts. Please try again.")}c(!1),be.target.value=""}})]}),t.small_charity_accounts_files&&t.small_charity_accounts_files.length>0&&n.jsx("div",{className:"mt-2 space-y-2",children:t.small_charity_accounts_files.map((be,We)=>{const Ze=rt(be.filename);return n.jsxs("div",{className:"flex items-center justify-between bg-gray-50 rounded-lg p-3 border border-gray-200",children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy rounded-lg flex items-center justify-center flex-shrink-0",children:n.jsx(Ze,{className:"w-5 h-5 text-accent-gold"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:be.filename}),n.jsx("p",{className:"text-xs text-gray-500",children:Te(be.size)})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("a",{href:be.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary-navy hover:text-accent-gold text-sm font-medium",children:"View"}),n.jsx(me,{type:"button",variant:"ghost",size:"icon",onClick:()=>r(st=>({...st,small_charity_accounts_files:st.small_charity_accounts_files.filter((Mt,Ht)=>Ht!==We)})),className:"text-red-500 hover:text-red-700 hover:bg-red-50","aria-label":`Remove ${be.filename}`,children:n.jsx(Ei,{className:"w-4 h-4"})})]})]},We)}
1871)})]}),n.jsx("p",{className:"text-xs text-blue-700 bg-blue-100 p-3 rounded-lg",children:"Eligibility is subject to review and confirmation by the awards team."})]})]})]}),n.jsxs("div",{className:"flex items-start gap-3 px-1",children:[n.jsx(Zr,{id:"pricing",checked:x,onCheckedChange:w,className:"mt-0.5"}),n.jsx("label",{htmlFor:"pricing",className:"cursor-pointer leading-snug",onClick:()=>w(be=>!be),children:"I understand that finalists are required to attend the National Charity Today Awards Gala Lunch and that participation normally requires the purchase of a half table (£965) or full table (£1,826). *"})]}),n.jsxs("div",{className:"rounded-lg border-2 border-amber-300 bg-amber-50/60 p-5",children:[n.jsx("p",{className:"text-xs font-semibold text-amber-700 uppercase tracking-wide mb-2",children:"Participation Commitment"}),n.jsxs("p",{className:"text-amber-900 text-sm mb-4",children:["A non-refundable ",n.jsx("strong",{children:"£75 Participation Commitment"})," is required before nominations progress to judging. If selected as a finalist, the full £75 will be credited against your attendance booking."]}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:"commitment",checked:j,onCheckedChange:N,className:"mt-0.5 border-amber-500"}),n.jsx("label",{htmlFor:"commitment",className:"cursor-pointer leading-snug text-amber-900 text-sm",children:"I understand that the £75 Participation Commitment is non-refundable and will only be credited against attendance costs if the nominee is shortlisted. *"})]})]}),n.jsxs("div",{className:"flex items-start gap-3 px-1",children:[n.jsx(Zr,{id:"terms",checked:g,onCheckedChange:y,className:"mt-0.5"}),n.jsxs("label",{htmlFor:"terms",className:"cursor-pointer leading-snug",children:["I confirm all information is accurate and I agree to the"," ",n.jsx(Rt,{to:Ct("Terms"),target:"_blank",rel:"noopener noreferrer",className:"text-primary-navy underline font-semibold",children:"Terms and Conditions"})," *"]})]})]})]}),n.jsxs("div",{className:"border-t pt-8",children:[n.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-amber-600 mb-4",children:[n.jsx(Mr,{className:"w-3.5 h-3.5 flex-shrink-0"}),"This form does not auto-save. Please complete your nomination in one session."]}),n.jsx(me,{type:"submit",size:"lg",disabled:_||!g||!x||!j||ae!=="Open",className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold py-6 text-base sm:text-lg shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:_?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-navy mr-2"}),"Preparing Payment..."]}):n.jsxs(n.Fragment,{children:[n.jsx(bn,{className:"mr-2 w-5 h-5"}),"Continue to Secure Payment"]})})]})]}),T&&n.jsx(APe,{settings:A,values:R,onChange:k,submitDisabled:_||ae!=="Open",submitLoading:_,windowStatus:ae})]})})]}),n.jsxs("div",{className:"mt-8 bg-white rounded-xl p-6 shadow-lg",children:[n.jsx("h3",{className:"font-semibold text-gray-900 mb-3",children:"Need Help?"}),n.jsx("p",{className:"text-gray-600 mb-4",children:"If you have questions about the nomination process, eligibility criteria, or need assistance completing this form, please visit our FAQs page or contact us directly."}),n.jsxs("div",{className:"flex gap-4",children:[n.jsx(me,{variant:"outline",onClick:()=>window.location.href="/faqs",children:"View FAQs"}),n.jsx(me,{variant:"outline",onClick:()=>window.location.href="/contact",children:"Contact Us"})]})]})]})})]})]})}function PPe(){const[e,t]=L.useState("all"),[r,a]=L.useState(null),{data:s=[],isLoading:i}=xt({queryKey:["winners"],queryFn:()=>pe.entities.Winner.list("-year",100)}),o=[...new Set(s.map(c=>c.year))].sort((c,d)=>d-c),l=e==="all"?s:s.filter(c=>c.year.toString()===e);return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
1871,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(Vd,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"past_winners_hero_title",defaultValue:"Celebrating Our Winners",page:"PastWinners",description:"Main heading on Past Winners page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"past_winners_hero_subtitle",defaultValue:"Honouring the charities and individuals who have demonstrated outstanding achievement, innovation, and impact in the UK charity sector.",page:"PastWinners",description:"Hero subtitle on Past Winners page",type:"text"})})]})})]}),n.jsx("section",{className:"py-8 bg-white border-b sticky top-20 z-40 shadow-sm",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4",children:[n.jsxs("div",{className:"text-lg font-semibold text-primary-navy",children:[l.length," Winner",l.length!==1?"s":""]}),n.jsx(nl,{value:e,onValueChange:t,children:n.jsxs(wo,{className:"bg-gray-100",children:[n.jsx(ln,{value:"all",children:"All Years"}),o.slice(0,5).map(c=>n.jsx(ln,{value:c.toString(),children:c},c))]})})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:i?n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(c=>n.jsxs(_e,{className:"animate-pulse",children:[n.jsx("div",{className:"h-48 bg-gray-200"}),n.jsxs(Ce,{className:"p-6",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded mb-2"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-4"}),n.jsx("div",{className:"h-20 bg-gray-200 rounded"})]})]},c))}):l.length===0?n.jsxs("div",{className:"text-center py-16",children:[n.jsx(Vd,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No winners found for the selected year."})]}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:l.map((c,d)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:d*.05},viewport:{once:!0},children:n.jsxs(_e,{className:"h-full hover:shadow-2xl transition-all duration-300 overflow-hidden group border-none shadow-lg",children:[c.image_url?n.jsxs("div",{className:"relative h-56 overflow-hidden",children:[n.jsx("img",{src:c.image_url,alt:c.winner_name,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),n.jsxs("div",{className:"absolute bottom-4 left-4 bg-gradient-to-r from-accent-gold to-[#e8ca7a] text-primary-navy px-3 py-1 rounded-full flex items-center gap-1 shadow-lg",children:[n.jsx(ki,{className:"w-4 h-4 fill-current"}),n.jsxs("span",{className:"text-sm font-semibold",children:[c.year," Winner"]})]})]}):n.jsx("div",{className:"h-56 bg-gradient-to-br from-gray-100 to-blue-100 flex items-center justify-center",children:n.jsx(bn,{className:"w-20 h-20 text-primary-navy/20"})}),n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsxs("div",{className:"mb-3",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-1 group-hover:text-accent-gold transition-colors",children:c.winner_name}),c.organization&&c.organization.toLowerCase()!==c.winner_name.toLowerCase()&&n.jsx("p",{className:"text-sm font-medium text-gray-600",children:c.organization})]}),n.jsx("div",{className:"mb-4 flex flex-wrap gap-2 justify-center",children:c.categories&&c.categories.length>0?n.jsx(n.Fragment,{children:c.categories.map((h,u)=>n.jsx("span",{className:"text-sm font-semibold text-primary-navy bg-accent-gold/20 px-3 py-1 rounded-full",children:h},u))}):c.category?n.jsx("span",{className:"text-sm font-semibold text-primary-navy bg-accent-gold/20 px-3 py-1 rounded-full",children:c.category}):null}),n.jsx("p",{className:"text-gray-600 leading-relaxed mb-4 line-clamp-4",children:c.description}),n.jsxs("div",{className:"flex flex-col gap-3",children:[c.description&&n.jsx(me,{onClick:()=>a(c),variant:"outline",className:"border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white text-sm font-medium",children:"Read Full Description"}),c.website_url&&n.jsxs("a",{href:c.website_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 text-primary-navy hover:text-accent-gold font-medium text-sm transition-colors",children:["Visit Website",n.jsx(Pl,{className:"w-4 h-4"})]})]})]})]})},c.id))})})}),n.jsx(Nn,{open:!!r,onOpenChange:c=>!c&&a(null),children:n.jsxs(vn,{className:"max-w-2xl",children:[n.jsxs(_n,{children:[n.jsx(Sn,{className:"text-2xl font-bold text-primary-navy",children:r==null?void 0:r.winner_name}),n.jsx(ode,{})]}),r&&n.jsxs("div",{className:"space-y-4",children:[r.image_url&&n.jsx("img",{src:r.image_url,alt:r.winner_name,className:"w-full h-64 object-cover rounded-lg"}),r.organization&&r.organization.toLowerCase()!==r.winner_name.toLowerCase()&&n.jsx("p",{className:"text-lg font-semibold text-gray-700",children:r.organization}),r.categories&&r.categories.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:r.categories.map((c,d)=>n.jsx("span",{className:"text-sm font-semibold text-primary-navy bg-accent-gold/20 px-3 py-1 rounded-full",children:c},d))}),n.jsx("div",{className:"py-4 border-t border-b",children:n.jsx("p",{className:"text-gray-700 leading-relaxed whitespace-pre-line",children:r.description})}),n.jsx("div",{className:"text-sm text-gray-600",children:n.jsxs("p",{className:"font-semibold mb-1",children:["Award Year: ",r.year]})}),r.website_url&&n.jsxs("a",{href:r.website_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary-navy hover:text-accent-gold font-medium transition-colors",children:["Visit Website",n.jsx(Pl,{className:"w-4 h-4"})]})]})]})})]})}
1871function EPe(){var O;const[e,t]=L.useState(null),[r,a]=L.useState(""),[s,i]=L.useState(""),[o,l]=L.useState({a:0,b:0}),[c,d]=L.useState(!1),[h,u]=L.useState(!1),[f,m]=L.useState(!1),[b,g]=L.useState(null);L.useEffect(()=>{l({a:Math.floor(Math.random()*10)+1,b:Math.floor(Math.random()*10)+1})},[]);const{data:y=[],isLoading:x}=xt({queryKey:["peoplesChoiceFinalists"],queryFn:()=>pe.entities.PeoplesChoiceFinalist.filter({is_active:!0},"display_order",4)}),{data:w=[],isLoading:j}=xt({queryKey:["peoplesChoiceConfig"],queryFn:()=>pe.entities.PeoplesChoiceConfig.filter({is_active:!0},"-created_date",1)}),N=w[0],_=N==null?void 0:N.is_public,S=new Date,A=N!=null&&N.voting_start?new Date(N.voting_start):null,T=N!=null&&N.voting_end?new Date(N.voting_end):null,R=(N==null?void 0:N.is_active)&&(!A&&!T||A&&T&&S>=A&&S<=T),M=A&&S<A,k=T&&S>T,P=async F=>{var G,B;F.preventDefault(),g(null);const $=o.a+o.b;if(parseInt(s)!==$){g("Incorrect answer to the security question. Please try again."),l({a:Math.floor(Math.random()*10)+1,b:Math.floor(Math.random()*10)+1}),i("");return}if(!e){g("Please select a finalist to vote for.");return}if(!r||!r.includes("@")){g("Please enter a valid email address.");return}if(!c){g("Please agree to the terms to submit your vote.");return}u(!0);try{let Y="unknown";try{Y=(await(await fetch("https://api.ipify.org?format=json")).json()).ip}catch{console.log("Could not fetch IP")}const ee=y.find(H=>H.id===e),J={finalist_id:e,finalist_name:(ee==null?void 0:ee.name)||"Unknown",voter_email:r.toLowerCase().trim(),ip_address:Y,user_agent:navigator.userAgent,vote_timestamp:new Date().toISOString(),is_valid:!0};await pe.entities.PeoplesChoiceVote.create(J),await pe.integrations.Core.SendEmail({to:r,subject:"Thank y
1871ou for voting - National Charity Today Awards™ People's Choice",body:`
1872Dear Voter,
1873
1874Thank you for casting your vote in the National Charity Today Awards™ People's Choice Award!
1875
1876Your vote for "${ee==null?void 0:ee.name}" has been recorded.
1877
1878The winner will be announced ${N!=null&&N.winner_announcement_date?`on ${new Date(N.winner_announcement_date).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}`:"at the awards ceremony"}.
1879
1880Thank you for supporting excellence in the UK charity sector.
1881
1882Best regards,
1883The National Charity Today Awards™ Team
1884        `}),m(!0)}catch(Y){(G=Y.message)!=null&&G.includes("duplicate")||(B=Y.message)!=null&&B.includes("already voted")?g("It looks like a vote has already been submitted from your location or email address. Only one vote per person is allowed."):g("There was an error submitting your vote. Please try again.")}u(!1)};return x||j?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-navy"})}):_?f?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 to-blue-50 py-20",children:n.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("div",{className:"w-24 h-24 bg-gradient-to-br from-emerald-500 to-emerald-600 rounded-full flex items-center justify-center mx-auto mb-8 shadow-xl",children:n.jsx(Cn,{className:"w-14 h-14 text-white"})}),n.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Thank You for Voting!"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8 leading-relaxed",children:"Your vote has been recorded successfully. A confirmation email has been sent to your inbox."}),n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx(la,{className:"w-6 h-6 text-accent-gold"}),n.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"What happens next?"})]}),n.jsxs("p",{className:"text-gray-600 text-left",children:["The winner of the People's Choice Award will be announced",N!=null&&N.winner_announcement_date?` on ${new Date(N.winner_announcement_date).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}`:" at the awards ceremony",". Results are not shown during voting to ensure fairness."]})]})})]})})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx(bn,{className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(Oy,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Public Vote"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"peoples_choice_hero_title",defaultValue:"People's Choice Award",page:"PeoplesChoiceVote",description:"Main heading on People's Choice Vote page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"peoples_choice_hero_subtitle",defaultValue:(N==null?void 0:N.intro_text)||"Have your say! Vote for your favourite finalist in this year's People's Choice Award. The winner will be decided by you, the public.",page:"PeoplesChoiceVote",description:"Hero subtitle on People's Choice Vote page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-8 bg-white border-b",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy
1884/10 rounded-full flex items-center justify-center flex-shrink-0",children:n.jsx(Jr,{className:"w-5 h-5 text-primary-navy"})}),n.jsx("span",{className:"text-sm",children:"One vote per person"})]}),n.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy/10 rounded-full flex items-center justify-center flex-shrink-0",children:n.jsx(ps,{className:"w-5 h-5 text-primary-navy"})}),n.jsx("span",{className:"text-sm",children:"One vote per IP address"})]}),n.jsxs("div",{className:"flex items-center gap-3 text-gray-700",children:[n.jsx("div",{className:"w-10 h-10 bg-primary-navy/10 rounded-full flex items-center justify-center flex-shrink-0",children:n.jsx(la,{className:"w-5 h-5 text-primary-navy"})}),n.jsxs("span",{className:"text-sm",children:["Results announced ",N!=null&&N.winner_announcement_date?new Date(N.winner_announcement_date).toLocaleDateString("en-GB",{day:"numeric",month:"long"}):"at ceremony"]})]})]})})}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[M&&n.jsxs(dm,{className:"mb-8 border-blue-200 bg-blue-50",children:[n.jsx(la,{className:"h-5 w-5 text-blue-600"}),n.jsxs(um,{className:"text-blue-900",children:[n.jsx("strong",{children:"Voting opens soon!"})," Voting will begin on ",A.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})," at ",A.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"}),"."]})]}),k&&n.jsxs(dm,{className:"mb-8 border-amber-200 bg-amber-50",children:[n.jsx(Mr,{className:"h-5 w-5 text-amber-600"}),n.jsxs(um,{className:"text-amber-900",children:[n.jsx("strong",{children:"Voting has now closed."})," Thank you to everyone who participated. The winner will be announced ",N!=null&&N.winner_announcement_date?`on ${new Date(N.winner_announcement_date).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}`:"at the awards ceremony","."]})]}),!(N!=null&&N.is_active)&&!k&&!M&&n.jsxs(dm,{className:"mb-8 border-gray-200 bg-gray-50",children:[n.jsx(Mr,{className:"h-5 w-5 text-gray-600"}),n.jsxs(um,{className:"text-gray-900",children:[n.jsx("strong",{children:"Voting is currently unavailable."})," Please check back later."]})]}),n.jsxs("div",{className:"mb-12",children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-6 text-center",children:R?"Select Your Favourite Finalist":"The Finalists"}),y.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(bn,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-gray-600",children:"Finalists will be announced soon."})]}):n.jsx("div",{className:"grid md:grid-cols-2 gap-6",role:"radiogroup","aria-label":"Select a finalist to vote for",children:y.map((F,$)=>n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:$*.1},children:n.jsx(_e,{role:"radio","aria-checked":e===F.id,"aria-disabled":!R,tabIndex:R?0:-1,onKeyDown:G=>{R&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),t(F.id))},className:`cursor-pointer transition-all duration-300 border-2 focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 ${e===F.id?"border-accent-gold bg-accent-gold/5 shadow-xl ring-2 ring-accent-gold/30":"border-gray-200 hover:border-accent-gold/50 hover:shadow-lg"} ${R?"":"cursor-default"}`,onClick:()=>R&&t(F.id),children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start gap-4",children:[R&&n.jsx("div",{className:`w-6 h-6 rounded-full border-2 flex items-center justify-center flex-shrink-0 mt-1 ${e===F.id?"border-accent-gold bg-accent-gold":"border-gray-300"}`,children:e===F.id&&n.jsx(Cn,{className:"w-4 h-4 text-white"})}),n.jsxs("div",{className:"flex-1",children:[F.image_url&&n.jsx("img",{src:F.image_url,alt:`Photo of ${F.name}`,className:"w-full h-40 object-contain bg-gray-50 rounded-lg mb-4"}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-2",children:F.name}),n.jsx("p",{className:"text-gray-600 leading-relaxed",children:F.description})]})]})})})},F.id))})]}),R&&y.length>0&&n.jsx(lt.div,{initial:{opacity:0,y:20}
1884,animate:{opacity:1,y:0},transition:{delay:.4},children:n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-6",children:"Submit Your Vote"}),b&&n.jsxs(dm,{className:"mb-6 border-red-200 bg-red-50",children:[n.jsx(Mr,{className:"h-5 w-5 text-red-600"}),n.jsx(um,{className:"text-red-900",children:b})]}),n.jsxs("form",{onSubmit:P,className:"space-y-6",children:[e&&n.jsxs("div",{className:"p-4 bg-accent-gold/10 rounded-lg border border-accent-gold/30",children:[n.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"You are voting for:"}),n.jsx("p",{className:"font-bold text-primary-navy",children:(O=y.find(F=>F.id===e))==null?void 0:O.name})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"email",className:"font-semibold",children:"Email Address *"}),n.jsx(Me,{id:"email",type:"email",value:r,onChange:F=>a(F.target.value),placeholder:"[email protected]",className:"h-12",required:!0}),n.jsx("p",{className:"text-xs text-gray-500",children:"Your email will only be used to send a confirmation and prevent duplicate votes."})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{htmlFor:"captcha",className:"font-semibold",children:"Security Check *"}),n.jsxs("p",{className:"text-sm text-gray-600 mb-2",children:["What is ",o.a," + ",o.b,"?"]}),n.jsx(Me,{id:"captcha",type:"number",value:s,onChange:F=>i(F.target.value),placeholder:"Enter your answer",className:"h-12 w-40",required:!0})]}),n.jsxs("div",{className:"flex items-start gap-3 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[n.jsx(Zr,{id:"terms",checked:c,onCheckedChange:d,className:"mt-1"}),n.jsx("label",{htmlFor:"terms",className:"text-sm text-gray-700 cursor-pointer",children:"I confirm that I have not already voted and I agree that my vote data (email, IP address) will be stored securely for vote integrity purposes in accordance with GDPR. I understand that only one vote per person is allowed."})]}),n.jsx(me,{type:"submit",size:"lg",disabled:h||!e||!r||!s||!c,className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold py-6 text-lg shadow-lg hover:shadow-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:h?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-primary-navy mr-2"}),"Submitting Vote..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Oy,{className:"mr-2 w-5 h-5"}),"Submit My Vote"]})})]})]})})}),n.jsx("div",{className:"mt-8 text-center text-sm text-gray-500",children:n.jsx("p",{children:"Your vote is confidential. We collect your email and IP address solely to prevent duplicate voting. This data is stored securely, will not be shared with third parties, and will be deleted upon conclusion of the awards event."})})]})})]}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx(bn,{className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(Oy,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Coming Soon"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:"People's Choice Award"}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:"The People's Choice Award voting will open soon. Check back later to cast your vote for your favourite finalist!"})]})})]}),n.jsx("section",{className:"py-20",children:n.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95}
1884,animate:{opacity:1,scale:1},children:[n.jsx("div",{className:"w-24 h-24 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full flex items-center justify-center mx-auto mb-8 shadow-xl",children:n.jsx(la,{className:"w-14 h-14 text-white"})}),n.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Voting Not Yet Open"}),n.jsx("p",{className:"text-lg text-gray-600 mb-8 leading-relaxed",children:"The People's Choice Award voting period has not yet begun. Please check back soon for your chance to vote for your favourite charity finalist."}),n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"What is the People's Choice Award?"}),n.jsx("p",{className:"text-gray-600 text-left leading-relaxed",children:"The People's Choice Award gives the public a chance to vote for their favourite finalist across all categories. Unlike other awards which are decided by our expert judging panel, this special award is decided entirely by you – the public!"})]})})]})})})]})}function TPe(){const e=[{icon:pr,title:"Press Kit",description:"Comprehensive information about the awards programme",size:"2.4 MB"},{icon:Cg,title:"High-Resolution Logos",description:"Award logos and branding assets in various formats",size:"5.1 MB"},{icon:Cg,title:"Event Photography",description:"Professional photos from previous ceremonies",size:"12.8 MB"},{icon:pr,title:"Media Guidelines",description:"Brand guidelines and usage instructions",size:"1.2 MB"}],t="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",r="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/9bb3b7c9e_Screenshot2025-11-29at014645.png",[a,s]=we.useState(null),i=[{id:"standard",title:"Standard Signature",subtitle:"Celebrating Excellence in the UK Charity Sector",badgeText:null,badgeColor:null,imageUrl:r},{id:"finalist",title:"Finalist 2026",subtitle:"Celebrating Excellence in the UK Charity Sector",badgeText:"FINALIST 2026",badgeColor:"#dec069",imageUrl:r},{id:"winner",title:"Winner 2026",subtitle:"Celebrating Excellence in the UK Charity Sector",badgeText:"WINNER 2026",badgeColor:"#dec069",imageUrl:r}],o=c=>{const d=c.badgeText?`
1885      <div style="display: inline-block; background-color: ${c.badgeColor}; color: #06053e; font-size: 15px; font-weight: bold; padding: 4px 12px; border-radius: 4px; margin-top: 6px; letter-spacing: 1px;">${c.badgeText}</div>`:"";return`<a href="https://nationalcharitytodayawards.co.uk/" target="_blank" style="text-decoration: none;">
1886<table cellpadding="0" cellspacing="0" border="0" style="font-family: Arial, sans-serif;">
1887  <tr>
1888    <td style="padding-right: 10px; vertical-align: middle;">
1889      <img src="${t}" alt="National Charity Today Awards" width="100" height="100" style="display: block; border: 0;" />
1890    </td>
1891    <td style="vertical-align: middle; border-left: 3px solid #06053e; padding-left: 15px;">
1892      <div style="font-size: 22px; font-weight: bold; color: #06053e; font-style: italic;">National Charity Today Awards™</div>
1893      <div style="font-size: 16px; color: #666; font-style: italic; margin-top: 2px;">${c.subtitle}</div>${d}
1894    </td>
1895  </tr>
1896</table>
1897</a>`},l=c=>{const d=i.find(h=>h.id===c);navigator.clipboard.writeText(o(d)),s(c),setTimeout(()=>s(null),2e3)};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(jm,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"press_hero_title",defaultValue:"Press & Media Centre",page:"Press",description:"Main heading on Press page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white leading-relaxed",children:n.jsx(ht,{contentKey:"press_hero_subtitle",defaultValue:"Resources and information for journalists, media professionals, and content creators covering the National Charity Today Awards™.",page:"Press",description:"Hero subtitle on Press page",type:"paragraph"})})]})})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-4 gap-8 text-center",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl font-bold text-blue-900 mb-2",children:"10+"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"Years Running"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl font-bold text-purple-900 mb-2",children:"500+"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"Charities Recognised"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl font-bold text-emerald-900 mb-2",children:"12+"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"Award Categories"})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-4xl font-bold text-amber-900 mb
1897-2",children:"National"}),n.jsx("div",{className:"text-gray-600 font-medium",children:"UK-Wide Recognition"})]})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsxs(Nt,{children:[n.jsx(Pt,{className:"text-3xl",children:"About the Awards"}),n.jsx(wr,{className:"text-lg",children:"Background information for media coverage"})]}),n.jsxs(Ce,{className:"space-y-4 text-gray-700 leading-relaxed",children:[n.jsx("p",{children:"The National Charity Today Awards™ are the UK's premier recognition programme for excellence in the charity sector. Established over a decade ago, the awards celebrate organisations and individuals who demonstrate outstanding achievement, innovation, and impact in their work to benefit communities across the United Kingdom."}),n.jsx("p",{children:"Each year, hundreds of nominations are received across more than 12 award categories, representing the full spectrum of charitable work being undertaken nationwide. Our rigorous judging process features industry experts, sector leaders, and independent panellists who assess nominations based on impact, innovation, sustainability, and excellence."}),n.jsx("p",{children:"The awards ceremony brings together charity leaders, philanthropists, corporate partners, and government representatives to celebrate the vital work of the UK's third sector. Winners receive national recognition and join an alumni network of exceptional organisations making a lasting difference in society."})]})]})})}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Media Resources"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Download assets and materials for your coverage"})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:n.jsx(_e,{className:"hover:shadow-xl transition-all duration-300 border-none shadow-lg bg-gradient-to-br from-primary-navy to-accent-gold text-white",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex flex-col items-center text-center gap-4",children:[n.jsx("img",{src:t,alt:"National Charity Today Awards™",className:"w-32 h-32 object-contain"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl font-bold mb-2",children:"Official Awards Logo"}),n.jsx("p",{className:"text-white mb-3",children:"High-resolution PNG format suitable for print and digital use"}),n.jsx("a",{href:t,download:!0,target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{variant:"outline",size:"sm",className:"gap-2 bg-white text-primary-navy hover:bg-gray-100 border-white",children:[n.jsx(Tl,{className:"w-4 h-4"}),"Download Logo"]})})]})]})})})}),e.map((c,d)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:d*.1},viewport:{once:!0},children:n.jsx(_e,{className:"hover:shadow-xl transition-all duration-300 border-none shadow-lg",children:n.jsx(Ce,{className:"p-6",children:n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-primary-navy to-accent-gold rounded-xl flex items-center justify-center flex-shrink-0",children:n.jsx(c.icon,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-2",children:c.title}),n.jsx("p",{className:"text-gray-600 mb-3",children:c.description}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-sm text-gray-500",children:c.size}),n.jsxs(me,{variant:"outline",size:"sm",className:"gap-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white",children:[n.jsx(Tl,{className:"w-4 h-4"}),"Download"]})]})]})]})})})},d))]})]})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Email Signatures"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Download official NCTA email signatures for your correspondence"})]}),n.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:i.map(c=>n.jsx(_e,{className:"border-none shadow-xl overflow-hidden",children:n.jsxs(Ce,{className:"p-6",children:[n.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 mb-4 border border-gray-200",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("img",{src:t,alt:"NCTA Logo",className:"w-14 h-14 object-contain"}),n.jsxs("div",{className:"border-l-4 border-primary-navy pl-3",children:[n.jsx("div",{className:"text-sm font-bold text-primary-navy italic",children:"National Charity Today Awards™"}),n.jsx("div",{className:"text-xs text-gray-600 italic",children:"Celebrating Excellence in the UK Charity Sector"}),c.badgeText&&n.jsx("div",{className:"inline-block bg-accent-gold text-primary-navy text-[10px] font-bold px-2 py-1 rounded mt-1 tracking-wide",children:c.badgeText})]})]}),n.jsx("div",{className:"h-1 bg-primary-navy mt-3 rounded-full"})]}),n.jsx("h3",{className:"font-bold text-primary-navy text-center mb-3",children:c.title}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("a",{href:c.imageUrl||r,download:`NCTA-${c.id}-signature.png`,target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-semibold gap-2",children:[n.jsx(Tl,{className:"w-4 h-4"}),"Download PNG"]})}),n.jsxs(me,{onClick:()=>l(c.id),variant:"outline",className:"w-full border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold gap-2",children:[a===c.id?n.jsx(Pm,{className:"w-4 h-4"}):n.jsx(Hy,{className:"w-4 h-4"}),a===c.id?"Copied!":"Copy HTML Code"]})]})]})},c.id))}),n.jsx("p",{className:"text-sm text-gray-500 mt-6 text-center",children:"Copy the HTML code and paste it into your email client's signature settings."})]})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(_e,{className:"border-none shadow-xl",children:[n.jsxs(Nt,{children:[n.jsx(Pt,{className:"text-3xl",children:"Key Dates for 2025"}),n.jsx(wr,{className:"text-lg",children:"Important milestones in the awards calendar"})]}),n.jsx(Ce,{children:n.jsx("div",{className:"space-y-6",children:[{date:"January 2025",event:"Nominations Open"},{date:"March 2025",event:"Nominations Close"}
1897,{date:"April 2025",event:"Judging Period"},{date:"May 2025",event:"Shortlist Announced"},{date:"June 2025",event:"Awards Ceremony"}].map((c,d)=>n.jsxs("div",{className:"flex items-center gap-4 pb-6 border-b border-gray-200 last:border-0",children:[n.jsx("div",{className:"w-32 flex-shrink-0",children:n.jsx("span",{className:"text-sm font-semibold text-blue-700",children:c.date})}),n.jsx("div",{className:"flex-1",children:n.jsx("span",{className:"text-gray-900 font-medium",children:c.event})})]},d))})})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Xr,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4 text-white",children:"Media Enquiries"}),n.jsx("p",{className:"text-xl text-white mb-8 leading-relaxed",children:"For press releases, interview requests, or additional information, please contact our media team."}),n.jsxs("div",{className:"space-y-3 text-lg",children:[n.jsxs("p",{children:[n.jsx("span",{className:"text-white",children:"Email:"})," ",n.jsx("a",{href:"mailto:[email protected]",className:"text-white hover:text-accent-gold font-medium transition-colors",children:"[email protected]"})]}),n.jsxs("p",{children:[n.jsx("span",{className:"text-white",children:"Phone:"})," ",n.jsx("span",{className:"text-white font-medium",children:"+44 (0)20 1234 5678"})]})]})]})})})})]})}function OPe(){var c;const{data:e=[],isLoading:t}=xt({queryKey:["schedule"],queryFn:async()=>(await pe.entities.EventSchedule.filter({is_active:!0},"display_order",100)).sort((h,u)=>h.event_time?u.event_time?h.event_time.localeCompare(u.event_time):-1:1)}),{data:r=[]}=xt({queryKey:["venueContent"],queryFn:()=>pe.entities.WebsiteContent.filter({page:"Venue"},"",100)}),{data:a=[]}=xt({queryKey:["importantInfo"],queryFn:()=>pe.entities.ImportantInformation.filter({is_active:!0},"display_order",100)});L.useEffect(()=>{!t&&e.length>0&&setTimeout(()=>window.print(),1e3)},[t,e]);const s=(d,h)=>{const u=r.find(f=>f.content_key===d);return u?u.text_content:h};if(t)return n.jsx("div",{className:"flex items-center justify-center min-h-screen",children:n.jsx("div",{className:"text-xl",children:"Loading schedule..."})});const i=(c=e[0])==null?void 0:c.event_date,o=s("venue_hero_title","Holiday Inn Peterborough West"),l=s("venue_map_address","Holiday Inn Peterborough West, Thorpe Wood, Peterborough PE3 6SG");return n.jsxs(n.Fragment,{children:[n.jsx("style",{children:`
1898        @media screen {
1899          body {
1900            background: #f5f5f5 !important;
1901          }
1902          body > header, 
1903          body > footer, 
1904          body > nav, 
1905          body > div > header,
1906          body > div > footer,
1907          body > div > nav {
1908            display: none !important;
1909          }
1910          .print-container {
1911            max-width: 210mm;
1912            margin: 20px auto;
1913            padding: 0;
1914            background: white;
1915            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1916          }
1917        }
1918        
1919        @media print {
1920          * {
1921            -webkit-print-color-adjust: exact !important;
1922            print-color-adjust: exact !important;
1923          }
1924          html, body {
1925            margin: 0 !important;
1926            padding: 0 !important;
1927            background: white !important;
1928          }
1929          body > header, 
1930          body > footer, 
1931          body > nav, 
1932          body > div > header,
1933          body > div > footer,
1934          body > div > nav {
1935            display: none !important;
1936          }
1937          .print-container {
1938            max-width: 100%;
1939            margin: 0;
1940            padding: 0;
1941            box-shadow: none;
1942          }
1943          .no-print {
1944            display: none !important;
1945          }
1946          .page-break {
1947            page-break-before: always;
1948          }
1949        }
1950        
1951        @page {
1952          size: A4;
1953          margin: 15mm;
1954        }
1955      `}),n.jsxs("div",{className:"print-container bg-white p-12",children:[n.jsxs("div",{className:"text-center mb-8 pb-6 border-b-4 border-[#dec069]",children:[n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-32 h-32 mx-auto mb-4"}),n.jsx("h1",{className:"text-4xl font-bold text-[#06053e] mb-2",children:"National Charity Today Awards™ 2026"}),n.jsx("h2",{className:"text-2xl font-semibold text-[#dec069] mb-4",children:"Gala Lunc
1955h Ceremony"}),i&&n.jsx("p",{className:"text-xl text-gray-700",children:yt(new Date(i),"EEEE, d MMMM yyyy")})]}),n.jsxs("div",{className:"mb-8 p-6 bg-gray-50 rounded-lg border-2 border-[#dec069]",children:[n.jsxs("h3",{className:"text-2xl font-bold text-[#06053e] mb-4 flex items-center gap-2",children:[n.jsx(Xu,{className:"w-6 h-6"}),"Venue Details"]}),n.jsxs("div",{className:"space-y-2 text-gray-700",children:[n.jsx("p",{className:"text-xl font-semibold",children:o}),n.jsx("p",{children:l}),n.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[n.jsx(Kw,{className:"w-4 h-4"}),n.jsx("span",{children:"01733 289988"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Xr,{className:"w-4 h-4"}),n.jsx("span",{children:"[email protected]"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(gy,{className:"w-4 h-4"}),n.jsx("span",{children:"Free parking available - register your vehicle at reception"})]})]})]}),n.jsx("div",{className:"mb-8 p-4 bg-[#06053e] text-white rounded-lg",children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsx(la,{className:"w-6 h-6"}),n.jsx("span",{className:"text-xl font-semibold",children:"Event Duration: 11:30 AM - 5:00 PM"})]})}),n.jsxs("div",{className:"mb-8",children:[n.jsx("h3",{className:"text-3xl font-bold text-[#06053e] mb-6 pb-2 border-b-2 border-[#dec069]",children:"Order of Proceedings"}),n.jsx("div",{className:"space-y-3",children:e.map((d,h)=>n.jsxs("div",{className:"flex gap-4 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[n.jsx("div",{className:"flex-shrink-0 w-20 font-bold text-[#06053e] text-lg",children:d.event_time}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"font-bold text-gray-900 text-lg mb-1",children:d.event_name}),d.description&&n.jsx("p",{className:"text-gray-600 text-sm",children:d.description}),d.location&&n.jsxs("p",{className:"text-gray-500 text-sm mt-1",children:[n.jsx(Xu,{className:"w-3 h-3 inline mr-1"}),d.location]}),d.duration_minutes&&n.jsxs("p",{className:"text-gray-500 text-sm",children:["Duration: ",d.duration_minutes," minutes"]})]})]},h))})]}),a.length>0&&n.jsxs("div",{className:"mb-8 p-6 bg-yellow-50 rounded-lg border-2 border-yellow-300",children:[n.jsx("h3",{className:"text-2xl font-bold text-[#06053e] mb-4",children:"Important Information"}),n.jsx("ul",{className:"space-y-3 text-gray-700",children:a.map((d,h)=>n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"font-bold text-[#dec069] text-xl",children:"•"}),n.jsxs("span",{children:[n.jsxs("strong",{children:[d.item_label,":"]})," ",d.item_content]})]},h))})]}),n.jsxs("div",{className:"mt-8 pt-6 border-t-2 border-gray-200 text-center text-gray-600",children:[n.jsx("p",{className:"mb-2",children:"For any queries, please contact:"}),n.jsxs("div",{className:"flex items-center justify-center gap-2",children:[n.jsx(Xr,{className:"w-4 h-4"}),n.jsx("a",{href:"mailto:[email protected]",className:"text-[#06053e] font-semibold",children:"[email protected]"})]}),n.jsx("p",{className:"mt-4 text-sm",children:"© 2026 National Charity Today Awards™ - A Charity Today initiative"})]})]})]})}function MPe(){const e=[{title:"1. Introduction",content:`The National Charity Today Awards™ is committed to protecting your privacy and handling your personal data responsibly and transparently.
1956
1957This Privacy Policy explains how we collect, use, store and protect personal information when you visit our website, submit an award nomination, purchase tickets, engage with sponsorship opportunities, or otherwise interact with the National Charity Today Awards™.
1958
1959We process personal data in accordance with the UK General Data Protection Regulation (UK GDPR) and the Data Protection Act 2018.`},{title:"2. Who We Are",content:`The National Charity Today Awards™ is operated by CTN Events Ltd.
1960
1961For the purposes of data protection law, CTN Events Ltd is the data controller for all personal data collected through this website.`},{title:"3. What Personal Data We Collect",content:`We may collect and process the following types of personal information.
1962
1963a. Website visitors
1964When you visit our website, we may collect:
1965• IP address
1966• Browser type and device information
1967• Pages visited and interaction data
1968• Cookies and similar technologies
1969
1970b. Award nominations
1971When you submit a nomination, we may collect:
1972• Name
1973• Email address
1974• Organisation name
1975• Role or position
1976• Nominee details
1977• Supporting statements and uploaded documents
1978
1979Where nomination information includes personal data about third parties, you confirm you have authority to provide this information.
1980
1981c. Ticket purchases
1982When purchasing tickets, we may collect:
1983• Name
1984• Email address
1985• Organisation
1986• Billing details
1987• Attendance and dietary information
1988
1989Payment details are processed securely by third party payment providers. We do not store full card details.
1990
1991d. Sponsorship enquiries and purchases
1992When enquiring about or purchasing sponsorship, we may collect:
1993• Contact name
1994• Organisation details
1995• Email address and telephone number
1996• Billing and invoicing information`},{title:"4. How We Use Your Data",content:`We use personal data to:
1997• Administer award nominations and judging processes
1998• Manage ticket sales and event attendance
1999• Process sponsorship enquiries and agreements
2000• Communicate important information about the Awards
2001• Meet legal and regulatory obligations
2002• Improve our website and services`},{title:"5. Lawful Basis for Processing",content:`We rely on the following lawful bases under UK GDPR:
2003• Consent
2004• Contractual necessity
2005• Legitimate interests
2006• Legal obligation
2007
2008Where consent is relied upon, it may be withdrawn at any time.`},{title:"6. Sharing Your Data",content:`We do not sell personal data.
2009
2010We may share data with:
2011• Trusted service providers including ticketing, payment and email platforms
2012• Judges and assessment panels where required for the awards process
2013• Professional advisers where necessary
2014
2015All third parties are required to handle data securely and lawfully.`},{title:"7. Data Storage and Security",content:`Appropriate technical and organisational measures are in place to protect personal data against unauthorised access, loss or misuse.
2016
2017Data is stored securely and retained only for as long as necessary.`},{title:"8. How Long We Keep Your Data",content:`• Nomination data is retained for the duration of the Awards cycle and a reasonable period afterwards
2018• Ticket and financial data is retained in line with legal and accounting requirements
2019• Marketing data is retained until you opt out`},{title:"9. Your Rights",content:`You have the right to:
2020• Access your personal data
2021• Request correction or deletion
2022• Restrict or object to processing
2023• Request data portability
2024• Withdraw consent`},{title:"10. Cookies",content:"We use cookies to ensure our website functions properly and to improve performance. You can manage cookie preferences via your browser settings."},{title:"11. Third Party Links",content:"Our website may contain links to external websites. We are not responsible for their privacy practices."},{title:"12. Changes to This Policy",content:"This policy may be updated from time to time. The latest version will always be available on our website."},{title:"13. Contact Us",content:`For questions about this Privacy Policy or how your data is handled, please contact:
2025
2026CTN Events Ltd
2027Email: [email protected]
2028
2029Website: https://www.nationalcharitytodayawards.co.uk`}];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-slate-100",children:[n.jsxs("section",{className:"relative bg-gradient-to-r from-primary-navy via-indigo-900 to-primary-navy text-white py-24 overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 opacity-10",children:n.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(222,192,105,0.3),transparent_50%)]"})}),n.jsxs("div",{className:"relative max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsx("div",{className:"w-20 h-20 bg-accent-gold/20 rounded-full flex items-center justify-center mx-auto mb-6 backdrop-blur-sm border-2 border-accent-gold/30",children:n.jsx(ps,{className:"w-10 h-10 text-accent-gold"})}),n.jsx("h1",{className:"text-5xl md:text-6xl font-bold mb-6 tracking-tight",children:"Privacy Policy"}),n.jsx("p",{className:"text-xl text-gray-200 max-w-3xl mx-auto leading-relaxed",children:"National Charity Today Awards™ is committed to protecting your privacy and handling your personal data responsibly and transparently."})]})]}),n.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20",children:[n.jsx("div",{className:"mb-12 p-4 bg-blue-50 border-l-4 border-accent-gold rounded",children:n.jsxs("p",{className:"text-sm text-gray-600",children:[n.jsx("span",{className:"font-semibold",children:"Last Updated:"})," January 2026"]}
2029)}),n.jsx("div",{className:"space-y-8",children:e.map((t,r)=>n.jsx(_e,{className:"border-none shadow-lg hover:shadow-xl transition-shadow duration-300",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:`privacy_policy_title_${r}`,defaultValue:t.title,contentType:"text"})}),n.jsx("div",{className:"text-gray-700 leading-relaxed whitespace-pre-line",children:n.jsx(ht,{contentKey:`privacy_policy_section_${r}`,defaultValue:t.content,contentType:"richtext"})})]})},r))}),n.jsxs("div",{className:"mt-16 p-8 bg-gradient-to-r from-primary-navy via-indigo-900 to-primary-navy text-white rounded-xl text-center",children:[n.jsxs("p",{className:"text-sm opacity-90",children:["© ",new Date().getFullYear()," National Charity Today Awards™ • CTN Events Ltd"]}),n.jsx("p",{className:"text-sm opacity-90 mt-2",children:"For questions or concerns about data privacy, please contact us at [email protected]"})]})]})]})}function LPe(){const[e,t]=L.useState(null),[r,a]=L.useState(!0);L.useEffect(()=>{(async()=>{try{const o=await pe.auth.me();t(o)}catch(o){console.error("Error loading user:",o)}finally{a(!1)}})()},[]);const s=async()=>{if(!window.confirm("⚠️ WARNING: This will permanently delete your account and all associated data. This action CANNOT be undone. Are you absolutely sure?"))return;if(prompt('Type "DELETE MY ACCOUNT" to confirm account deletion:')!=="DELETE MY ACCOUNT"){alert("Account deletion cancelled. Confirmation text did not match.");return}try{await pe.asServiceRole.entities.User.delete(e.id),await pe.auth.logout(),alert("Your account has been deleted. You will be logged out now."),window.location.href="/"}catch(o){console.error("Account deletion error:",o),alert("Failed to delete account. Please contact support.")}};return r?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-primary-navy border-t-transparent"})}):e?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 py-8 px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"max-w-3xl mx-auto",children:[n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-2",children:"My Profile"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Manage your account settings and information"})]}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:n.jsxs(_e,{className:"border-none shadow-xl mb-6",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2",children:[n.jsx(Hd,{className:"w-5 h-5 text-primary-navy"}),"Account Information"]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Full Name"}),n.jsx(Me,{value:e.full_name||"",disabled:!0,className:"mt-1 bg-gray-50"})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Email Address"}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx(Xr,{className:"w-4 h-4 text-gray-400"}),n.jsx(Me,{value:e.email||"",disabled:!0,className:"bg-gray-50"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Account Role"}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx(ps,{className:"w-4 h-4 text-gray-400"}),n.jsx(Me,{value:e.role==="admin"?"Administrator":"User",disabled:!0,className:"bg-gray-50"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Member Since"}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx(za,{className:"w-4 h-4 text-gray-400"}),n.jsx(Me,{value:e.created_date?yt(new Date(e.created_date),"d MMMM yyyy"):"Unknown",disabled:!0,className:"bg-gray-50"})]})]})]})]})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsxs(_e,{className:"border-2 border-red-200 bg-gradient-to-r from-red-50 to-orange-50",children:[n.jsx(Nt,{children:n.jsxs(Pt,{className:"flex items-center gap-2 text-red-900",children:[n.jsx(Mr,{className:"w-5 h-5 text-red-600"}),"Danger Zone"]})}),n.jsx(Ce,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsx("p",{className:"text-sm text-red-700",children:"Deleting your account is permanent and cannot be undone. All your data will be permanently removed from our systems."}),n.jsxs(me,{onClick:s,variant:"outline",className:"border-2 border-red-500 text-red-700 hover:bg-red-500 hover:text-white font-semibold min-h-[44px]",children:[n.jsx(tr,{className:"w-4 h-4 mr-2"}
2029),"Delete My Account"]})]})})]})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"mt-6",children:n.jsx(me,{onClick:()=>pe.auth.logout(),variant:"outline",className:"w-full border-2 border-gray-300 hover:bg-gray-100 min-h-[44px]",children:"Log Out"})})]})}):n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center p-4",children:n.jsx(_e,{className:"max-w-md w-full",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Hd,{className:"w-16 h-16 mx-auto mb-6 text-gray-400"}),n.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Authentication Required"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"Please log in to view your profile."}),n.jsx(me,{onClick:()=>pe.auth.redirectToLogin(window.location.pathname),className:"bg-primary-navy",children:"Log In"})]})})})}function RPe(){const[e,t]=L.useState(1),[r,a]=L.useState(null),[s,i]=L.useState({buyer_name:"",buyer_email:"",buyer_phone:"",buyer_organization:"",seats_purchased:10,special_requests:""});we.useEffect(()=>{const l=new URLSearchParams(window.location.search);l.get("success")==="true"?(l.get("session_id"),t(2)):l.get("cancelled")},[]);const{data:o=[]}=xt({queryKey:["websiteContent"],queryFn:()=>pe.entities.WebsiteContent.list()});return Tt({mutationFn:async l=>{if(window.self!==window.top)throw alert("Payment checkout is only available in the published app. Please open your app in a new tab to complete the booking."),new Error("Checkout not available in preview mode");const c=await pe.entities.WebsiteContent.list(),d=l.seats_purchased===10?"full_table_price":"half_table_price",h=c.find(b=>b.content_key===d&&b.page==="PurchaseTable"),u=(h==null?void 0:h.content_value)||(l.seats_purchased===10?"1690":"895"),f=parseInt(u.toString().replace(/,/g,""));if(console.log("Fresh price lookup:",{key:d,found:!!h,value:u,parsed:f,seats:l.seats_purchased,isValid:!isNaN(f)&&f>0}),isNaN(f)||f<=0)throw new Error(`Invalid price calculated: ${f}. Please contact support.`);const m=await pe.functions.invoke("createTableCheckout",{buyer_name:"Table Booking",buyer_email:"[email protected]",buyer_phone:"+44 (0)1733 687196",buyer_organization:"Awards Attendee",seats_purchased:l.seats_purchased,special_requests:"",amount:f});return console.log("Checkout response:",m.data),m.data},onSuccess:l=>{window.location.href=l.checkout_url}}),e===2?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 to-green-50 py-20",children:n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("div",{className:"w-24 h-24 bg-gradient-to-br from-green-500 to-emerald-500 rounded-full flex items-center justify-center mx-auto mb-6 shadow-2xl",children:n.jsx(Cn,{className:"w-14 h-14 text-white"})}),n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-4",children:"Payment Successful! 🎉"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8",children:"Your table booking is being processed"}),n.jsx(_e,{className:"border-none shadow-2xl mb-8",children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start gap-3 bg-blue-50 border-2 border-blue-200 rounded-lg p-4",children:[n.jsx(Xr,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"text-sm text-gray-700 text-left",children:[n.jsx("p",{className:"font-semibold text-primary-navy mb-2",children:"Confirmation Email on the Way"}),n.jsxs("p",{children:["We're processing your payment and allocating your table. You'll receive a confirmation email at ",n.jsx("span",{className:"font-semibold",children:s.buyer_email})," within the next few minutes with:"]}),n.jsxs("ul",{className:"mt-2 space-y-1 ml-4",children:[n.jsx("li",{children:"• Your table assignment"}),n.jsx("li",{children:"• Order reference number"}),n.jsx("li",{children:"• Secure link to manage guest details"})]})]})]}),n.jsxs("div",{className:"bg-accent-gold/10 border-2 border-accent-gold rounded-lg p-6",children:[n.jsxs("h3",{className:"font-bold text-primary-navy text-lg mb-3 flex items-center gap-2",children:[n.jsx(Ia,{className:"w-5 h-5"}),"What Happens Next?"]}),n.jsxs("ol",{className:"text-left text-gray-700 space-y-2",children:[n.jsxs("li",{children:["1. ",n.jsx("strong",{children:"Check your email"})," for the confirmation with your table number"]}),n.jsxs("li",{children:["2. ",n.jsx("strong",{children:"Click the link"})," in the email to access guest management"]}),n.jsxs("li",{children:["3. ",n.jsx("strong",{children:"Add guest details"})," including names and menu choices"]}),n.jsxs("li",{children:["4. ",n.jsx("strong",{children:"Submit by the deadline"})," - at least 14 days before the event"]})]})]})]})})}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6 text-left",children:[n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx(za,{className:"w-8 h-8 text-accent-gold mb-3"}),n.jsx("h4",{className:"font-semibold text-primary-navy mb-2",children:"Event Details"}),n.jsxs("p",{className:"text-sm text-gray-600",children:["Holiday Inn Peterborough West",n.jsx("br",{}),"Black Tie Event"]})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx(Xr,{className:"w-8 h-8 text-accent-gold mb-3"}),n.jsx("h4",{className:"font-semibold text-primary-navy mb-2",children:"Need Help?"}),n.jsxs("p",{className:"text-sm text-gray-600",children:["[email protected]",n.jsx("br",{}),"+44 (0)1733 687196"]})]})})]})]})})}):e===3&&r?n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-emerald-50 to-blue-50 py-20",children:n.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,scale:.95}
2029,animate:{opacity:1,scale:1},className:"text-center",children:[n.jsx("div",{className:"w-24 h-24 bg-gradient-to-br from-green-500 to-emerald-500 rounded-full flex items-center justify-center mx-auto mb-6 shadow-2xl",children:n.jsx(Cn,{className:"w-14 h-14 text-white"})}),n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-4",children:"Booking Confirmed! 🎉"}),n.jsx("p",{className:"text-xl text-gray-600 mb-8",children:"Your table has been reserved for the National Charity Today Awards™"}),n.jsx(_e,{className:"border-none shadow-2xl mb-8",children:n.jsx(Ce,{className:"p-8",children:n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-gradient-to-br from-primary-navy to-accent-gold text-white rounded-xl p-6",children:[n.jsx("div",{className:"text-sm font-semibold mb-2",children:"Order Reference"}),n.jsx("div",{className:"text-3xl font-bold",children:r.purchaseOrder.order_reference})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-6 text-left",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Assigned Table"}),n.jsx("div",{className:"text-2xl font-bold text-primary-navy",children:r.assignedTable})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Seats Reserved"}),n.jsx("div",{className:"text-2xl font-bold text-primary-navy",children:s.seats_purchased})]})]}),n.jsxs("div",{className:"border-t-2 border-gray-200 pt-6",children:[n.jsxs("div",{className:"flex items-start gap-3 bg-blue-50 border-2 border-blue-200 rounded-lg p-4 mb-4",children:[n.jsx(Xr,{className:"w-6 h-6 text-blue-600 flex-shrink-0 mt-1"}),n.jsxs("div",{className:"text-sm text-gray-700",children:[n.jsx("p",{className:"font-semibold text-primary-navy mb-1",children:"Confirmation Email Sent"}),n.jsxs("p",{children:["We've sent a detailed confirmation email to ",n.jsx("span",{className:"font-semibold",children:s.buyer_email})," with your guest management link."]})]})]}),n.jsxs("div",{className:"bg-accent-gold/10 border-2 border-accent-gold rounded-lg p-6",children:[n.jsxs("h3",{className:"font-bold text-primary-navy text-lg mb-3 flex items-center gap-2",children:[n.jsx(Ia,{className:"w-5 h-5"}),"Next Steps: Add Your Guests"]}),n.jsx("p",{className:"text-gray-700 mb-4",children:"Use the secure link below to add guest names, menu preferences, and dietary requirements:"}),n.jsx("a",{href:r.guestManagementUrl,className:"block w-full",children:n.jsxs(me,{size:"lg",className:"w-full bg-primary-navy hover:opacity-90 text-white font-bold py-6",children:[n.jsx(ps,{className:"w-5 h-5 mr-2"}),"Manage Guest Details"]})}),n.jsx("p",{className:"text-xs text-gray-600 mt-3 text-center",children:"🔒 This link has been emailed to you for future access"})]})]})]})})}),n.jsxs("div",{className:"grid md:grid-cols-3 gap-6 text-left",children:[n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx(za,{className:"w-8 h-8 text-accent-gold mb-3"}),n.jsx("h4",{className:"font-semibold text-primary-navy mb-2",children:"Event Date"}),n.jsx("p",{className:"text-sm text-gray-600",children:"[Event Date] at Holiday Inn Peterborough West"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx(la,{className:"w-8 h-8 text-accent-gold mb-3"}),n.jsx("h4",{className:"font-semibold text-primary-navy mb-2",children:"Guest Details Deadline"}),n.jsx("p",{className:"text-sm text-gray-600",children:"Please submit at least 14 days before event"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx(Lq,{className:"w-8 h-8 text-accent-gold mb-3"}),n.jsx("h4",{className:"font-semibold text-primary-navy mb-2",children:"Payment"}),n.jsxs("p",{className:"text-sm text-gray-600",children:["£",n.jsx(ht,{contentKey:s.seats_purchased===10?"full_table_price":"half_table_price",defaultValue:s.seats_purchased===10?"1,690":"895",page:"PurchaseTable",description:`Price in confirmation for ${s.seats_purchased===10?"full":"half"} table`,type:"input",as:"span"})," - Invoice to follow"]})]})})]})]})})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
2029,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(Jr,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"purchase_table_hero_title",defaultValue:"Book Your Table",page:"PurchaseTable",description:"Main heading on Purchase Table page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"purchase_table_hero_subtitle",defaultValue:"Reserve your table for The National Charity Today Awards™ Gala Lunch ceremony",page:"PurchaseTable",description:"Hero subtitle on Purchase Table page",type:"paragraph"})})]})})}),n.jsx("section",{className:"py-20 relative",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("h2",{className:"text-4xl font-bold text-primary-navy mb-4",children:"Choose Your Table"}),n.jsx("p",{className:"text-xl text-gray-600",children:"Select the option that best suits your needs"})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-10 max-w-5xl mx-auto",children:[n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:n.jsxs(_e,{className:"border border-gray-200 transition-all hover:shadow-2xl hover:border-primary-navy bg-white overflow-hidden",children:[n.jsxs(Nt,{className:"text-center pb-6 pt-8 bg-gradient-to-br from-gray-50 to-white",children:[n.jsx("div",{className:"inline-block bg-primary-navy text-white px-5 py-2 rounded-full text-sm font-bold mb-6 tracking-wide",children:"HALF TABLE"}),n.jsxs(Pt,{className:"text-5xl font-bold text-primary-navy mb-3",children:["£",n.jsx(ht,{contentKey:"half_table_price",defaultValue:"895",page:"PurchaseTable",description:"Price for half table (5 seats)",type:"input",as:"span"})]}),n.jsx(wr,{className:"text-lg text-gray-600 font-medium",children:n.jsx(ht,{contentKey:"half_table_description",defaultValue:"5 seats at your reserved table",page:"PurchaseTable",description:"Half table description",type:"input",as:"span"})}),n.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-gray-300 to-transparent mt-6"})]}),n.jsxs(Ce,{className:"px-8 pb-8 pt-6",children:[n.jsxs("div",{className:"text-gray-700 text-left mb-8",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_1",defaultValue:"Non-Alcohol Drinks reception on arrival",page:"PurchaseTable",description:"Half table offering 1",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_2",defaultValue:"Red Carpet Photograph",page:"PurchaseTable",description:"Half table offering 2",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_3",defaultValue:"Three-course lunch",page:"PurchaseTable",description:"Half table offering 3",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_4",defaultValue:"Tea, Coffee & Water",page:"PurchaseTable",description:"Half table offering 4",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_5",defaultValue:"Awards ceremony",page:"PurchaseTable",description:"Half table offering 5",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_6",defaultValue:"Live entertainment",page:"PurchaseTable",description:"Half table offering 6",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"half_offering_7",defaultValue:"Networking with fellow finalists and special guests",page:"PurchaseTable",description:"Half table offering 7",type:"input",as:"span"})})]})]}),n.jsx("p",{className:"text-xs text-gray-500 pt-6 italic border-t border-gray-200 mt-6",children:n.jsx(ht,{contentKey:"bar_note",defaultValue:"Bar available on site for guests to purchase alcoholic drinks throughout the event",page:"PurchaseTable",description:"Bar availability note",type:"input",as:"span"})})]}),n.jsx(me,{onClick:()=>{window.location.href="https://book.stripe.com/cNifZh0zR2fQ7ulfg0cQU02"},className:"w-full bg-primary-navy hover:bg-[#0f0d5e] text-white font-bold py-6 text-lg shadow-lg transition-all",children:"Book Half Table"})]})]})}),n.jsx(lt.div,{initial:{opacity:0,y:20}
2029,animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsxs(_e,{className:"border-2 border-accent-gold transition-all hover:shadow-2xl shadow-xl bg-white overflow-hidden relative",children:[n.jsx("div",{className:"absolute top-0 right-0 bg-accent-gold text-primary-navy px-4 py-1 text-xs font-bold tracking-wider",children:"POPULAR CHOICE"}),n.jsxs(Nt,{className:"text-center pb-6 pt-8 bg-gradient-to-br from-accent-gold/5 to-white",children:[n.jsx("div",{className:"inline-block bg-accent-gold text-primary-navy px-5 py-2 rounded-full text-sm font-bold mb-6 tracking-wide",children:"FULL TABLE"}),n.jsxs(Pt,{className:"text-5xl font-bold text-primary-navy mb-3",children:["£",n.jsx(ht,{contentKey:"full_table_price",defaultValue:"1,690",page:"PurchaseTable",description:"Price for full table (10 seats)",type:"input",as:"span"})]}),n.jsx(wr,{className:"text-lg text-gray-600 font-medium",children:n.jsx(ht,{contentKey:"full_table_description",defaultValue:"10 seats - exclusive table",page:"PurchaseTable",description:"Full table description",type:"input",as:"span"})}),n.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-accent-gold to-transparent mt-6"})]}),n.jsxs(Ce,{className:"px-8 pb-8 pt-6",children:[n.jsxs("div",{className:"text-gray-700 text-left mb-8",children:[n.jsxs("div",{className:"space-y-3",children:[n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_1",defaultValue:"Non-Alcohol Drinks reception on arrival",page:"PurchaseTable",description:"Full table offering 1",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_2",defaultValue:"Red Carpet Photograph",page:"PurchaseTable",description:"Full table offering 2",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_3",defaultValue:"Three-course lunch",page:"PurchaseTable",description:"Full table offering 3",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_4",defaultValue:"Tea, Coffee & Water",page:"PurchaseTable",description:"Full table offering 4",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_5",defaultValue:"Awards ceremony",page:"PurchaseTable",description:"Full table offering 5",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_6",defaultValue:"Live entertainment",page:"PurchaseTable",description:"Full table offering 6",type:"input",as:"span"})})]}),n.jsxs("p",{className:"flex items-start gap-3",children:[n.jsx("span",{className:"text-green-600 font-bold text-lg",children:"✓"}),n.jsx("span",{children:n.jsx(ht,{contentKey:"full_offering_7",defaultValue:"Networking with fellow finalists and special guests",page:"PurchaseTable",description:"Full table offering 7",type:"input",as:"span"})})]})]}),n.jsx("p",{className:"text-xs text-gray-500 pt-6 italic border-t border-gray-200 mt-6",children:n.jsx(ht,{contentKey:"bar_note",defaultValue:"Bar available on site for guests to purchase alcoholic drinks throughout the event",page:"PurchaseTable",description:"Bar availability note",type:"input",as:"span"})})]}),n.jsx(me,{onClick:()=>
2029{window.location.href="https://book.stripe.com/eVqdR93M307I8ypebWcQU03"},className:"w-full bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold py-6 text-lg shadow-lg transition-all",children:"Book Full Table"})]})]})})]})]})})]})}function IPe(){const e=Sr(),[t,r]=L.useState(!1),[a,s]=L.useState(null),[i,o]=L.useState({}),[l,c]=L.useState(null),[d,h]=L.useState({});L.useEffect(()=>{(async()=>{try{const G=await pe.auth.me();r((G==null?void 0:G.role)==="admin")}catch{r(!1)}})()},[]);const{data:u=[],isLoading:f}=xt({queryKey:["schedule"],queryFn:async()=>(await pe.entities.EventSchedule.filter({is_active:!0},"display_order",100)).sort((G,B)=>G.event_time?B.event_time?G.event_time.localeCompare(B.event_time):-1:1)}),{data:m=[],isLoading:b}=xt({queryKey:["importantInfo"],queryFn:()=>pe.entities.ImportantInformation.filter({is_active:!0},"display_order",100)}),g=Tt({mutationFn:({id:$,data:G})=>pe.entities.EventSchedule.update($,G),onSuccess:()=>{e.invalidateQueries({queryKey:["schedule"]}),s(null)}}),y=Tt({mutationFn:$=>pe.entities.EventSchedule.create($),onSuccess:()=>{e.invalidateQueries({queryKey:["schedule"]}),s(null)}}),x=Tt({mutationFn:$=>pe.entities.EventSchedule.delete($),onSuccess:()=>{e.invalidateQueries({queryKey:["schedule"]})}}),w=Tt({mutationFn:({id:$,data:G})=>pe.entities.ImportantInformation.update($,G),onSuccess:()=>{e.invalidateQueries({queryKey:["importantInfo"]}),c(null)}}),j=Tt({mutationFn:$=>pe.entities.ImportantInformation.create($),onSuccess:()=>{e.invalidateQueries({queryKey:["importantInfo"]}),c(null)}}),N=Tt({mutationFn:$=>pe.entities.ImportantInformation.delete($),onSuccess:()=>{e.invalidateQueries({queryKey:["importantInfo"]})}}),_=$=>{s($.id),o($)},S=()=>{g.mutate({id:a,data:i})},A=()=>{var G;const $={event_name:"New Event",event_date:((G=u[0])==null?void 0:G.event_date)||new Date().toISOString().split("T")[0],event_time:"12:00",event_type:"presentation",is_active:!0};y.mutate($)},T=$=>{confirm("Are you sure you want to delete this schedule item?")&&x.mutate($)}
2029,R=$=>{c($.id),h($)},M=()=>{w.mutate({id:l,data:d})},k=()=>{const $={item_label:"New Item",item_content:"Item details",display_order:m.length+1,is_active:!0};j.mutate($)},P=$=>{confirm("Are you sure you want to delete this item?")&&N.mutate($)};u.reduce(($,G)=>{const B=G.event_date||"TBA";return $[B]||($[B]=[]),$[B].push(G),$},{});const O={registration:Jr,reception:Ia,speech:Jr,presentation:bn,awards:Vd,dinner:Qy,entertainment:_T,networking:Jr,closing:tm,raffle_auction:Om,photographs_interviews:ng},F={registration:"from-blue-500 to-blue-700",reception:"from-purple-500 to-purple-700",speech:"from-emerald-500 to-emerald-700",presentation:"from-amber-500 to-amber-700",awards:"from-yellow-500 to-yellow-700",dinner:"from-rose-500 to-rose-700",entertainment:"from-pink-500 to-pink-700",networking:"from-cyan-500 to-cyan-700",closing:"from-indigo-500 to-indigo-700",raffle_auction:"from-orange-500 to-orange-700",photographs_interviews:"from-teal-500 to-teal-700"};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=1920')] bg-cover bg-center"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm border border-white/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(za,{className:"w-4 h-4 text-white"}),n.jsx("span",{className:"text-sm font-medium text-white",children:n.jsx(ht,{contentKey:"schedule_ceremony_year_badge",defaultValue:"2025 Ceremony Schedule",page:"Schedule",description:"Badge text showing ceremony year and schedule label",type:"text"})})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"schedule_hero_title",defaultValue:"Awards Ceremony Schedule",page:"Schedule",description:"Main heading on the Schedule page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"schedule_hero_subtitle",defaultValue:"Join us for an unforgettable day celebrating excellence in the UK charity sector.",page:"Schedule",description:"Hero subtitle on the Schedule page",type:"text"})})]})})]}),n.jsx("section",{className:"py-12 -mt-16 relative z-10",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{icon:za,title:"Event Date",valueKey:"schedule_event_date_value",defaultValue:"14 October 2026",descriptionKey:"schedule_event_date_subtitle",defaultDescription:"Save the date"},{icon:la,title:"Duration",valueKey:"schedule_duration_value",defaultValue:"12:00 PM - 5:00 PM",descriptionKey:"schedule_duration_subtitle",defaultDescription:"Gala lunch celebration"},{icon:Xu,title:"Venue",valueKey:"schedule_venue_value",defaultValue:"Holiday Inn Peterborough West",descriptionKey:"schedule_venue_subtitle",defaultDescription:"Thorpe Wood, Peterborough"}].map(($,G)=>n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:G*.1},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center shadow-lg",children:n.jsx($.icon,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("h3",{className:"font-semibold text-gray-600 text-sm mb-1",children:$.title}),n.jsx("div",{className:`font-bold text-primary-navy mb-1 ${G===2?"text-xl":"text-2xl"}`,children:n.jsx(ht,{contentKey:$.valueKey,defaultValue:$.defaultValue,page:"Schedule",description:`${$.title} value in key info cards`,type:"text"})}),n.jsx("p",{className:"text-sm text-gray-500",children:n.jsx(ht,{contentKey:$.descriptionKey,defaultValue:$.defaultDescription,page:"Schedule",description:`${$.title} subtitle in key info cards`,type:"text"})})]})})},G))})})}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"schedule_proceedings_title",defaultValue:"Order of Proceedings",page:"Schedule",description:"Section title for the schedule timeline",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600 mb-4",children:n.jsx(ht,{contentKey:"schedule_proceedings_description",defaultValue:"An overview of the afternoon's schedule and key moments.",page:"Schedule",description:"Description for the schedule timeline section",type:"text"})}),n.jsx("div",{className:"mb-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:n.jsxs("p",{className:"text-sm text-gray-700 leading-relaxed",children:[n.jsx("strong",{children:"Please note:"})," This programme is subject to change. Any amendments to timings will be communicated to all attendees. No changes to scheduled times will be made later than ninety days before the event. Full"," ",n.jsx("a",{href:Ct("Terms"),className:"text-primary-navy hover:text-accent-gold underline font-medium",children:"terms and conditions"})," ","apply."]})}),n.jsx("a",{href:Ct("PrintSchedule"),target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{className:"bg-primary-navy hover:bg-[#0f0d5e] text-white",children:[n.jsx(qq,{className:"w-4 h-4 mr-2"}),"Print Schedule"]})}),t&&n.jsxs(me,{onClick:A,className:"mt-4 bg-accent-gold hover:bg-accent-gold/90 text-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Schedule Item"]})]}),f?n.jsx("div",{className:"space-y-6",children:[1,2,3,4,5].map($=>n.jsx(_e,{className:"animate-pulse border-none shadow-lg",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded mb-2 w-1/4"}),n.jsx("div",{className:"h-8 bg-gray-200 rounded mb-4 w-3/4"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full"})]})},$))}):u.length===0?n.jsxs("div",{className:"text-center py-16",children:[n.jsx(za,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"Schedule will be announced soon."})]}):n.jsx("div",{className:"space-y-6",children:u.map(($,G)=>{const B=O[$.event_type]||bn,Y=F[$.event_type]||"from-gray-500 to-gray-700",ee=a===$.id;return n.jsx(lt.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},transition:{delay:G*.05},viewport:{once:!0},className:"relative",children:n.jsxs(_e,{className:"border-none shadow-xl hover:shadow-2xl transition-all duration-300 overflow-hidden group w-full",children:[n.jsx("div",{className:`h-1.5 bg-gradient-to-r ${Y}`}),n.jsxs(Ce,{className:"p-5 sm:p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-12 h-12 sm:w-14 sm:h-14 roun
2029ded-xl bg-gradient-to-br ${Y} flex items-center justify-center shadow-lg`,children:n.jsx(B,{className:"w-6 h-6 sm:w-7 sm:h-7 text-white"})}),ee?n.jsx(Me,{type:"time",value:i.event_time||"",onChange:J=>o({...i,event_time:J.target.value}),className:"h-10 w-24 text-base font-bold"}):n.jsxs("div",{className:"flex items-center gap-2 bg-gray-50 px-4 py-2 rounded-lg",children:[n.jsx(la,{className:"w-4 h-4 text-primary-navy"}),n.jsx("span",{className:"text-lg font-bold text-primary-navy",children:$.event_time})]})]}),t&&!ee&&n.jsxs("div",{className:"flex gap-1",children:[n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>_($),className:"text-blue-600 hover:text-blue-700 min-h-[44px] min-w-[44px] p-0",children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>T($.id),className:"text-red-600 hover:text-red-700 min-h-[44px] min-w-[44px] p-0",children:n.jsx(tr,{className:"w-4 h-4"})})]})]}),ee?n.jsxs("div",{className:"space-y-4",children:[n.jsx(Me,{value:i.event_name||"",onChange:J=>o({...i,event_name:J.target.value}),placeholder:"Event name",className:"text-xl font-bold"}),n.jsx(en,{value:i.description||"",onChange:J=>o({...i,description:J.target.value}),placeholder:"Description",className:"min-h-[80px]"}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Event Type & Icon"}),n.jsxs(Qt,{value:i.event_type||"presentation",onValueChange:J=>o({...i,event_type:J}),children:[n.jsx(Kt,{children:n.jsx(Xt,{children:n.jsxs("div",{className:"flex items-center gap-2",children:[we.createElement(O[i.event_type||"presentation"],{className:"w-4 h-4"}),n.jsx("span",{className:"capitalize",children:(i.event_type||"presentation").replace("_"," ")})]})})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"registration",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-4 h-4"}),n.jsx("span",{children:"Registration"})]})}),n.jsx(Ae,{value:"reception",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Ia,{className:"w-4 h-4"}),n.jsx("span",{children:"Reception"})]})}),n.jsx(Ae,{value:"speech",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-4 h-4"}),n.jsx("span",{children:"Speech"})]})}),n.jsx(Ae,{value:"presentation",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-4 h-4"}),n.jsx("span",{children:"Presentation"})]})}),n.jsx(Ae,{value:"awards",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Vd,{className:"w-4 h-4"}),n.jsx("span",{children:"Awards"})]})}),n.jsx(Ae,{value:"dinner",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Qy,{className:"w-4 h-4"}),n.jsx("span",{children:"Dinner"})]})}),n.jsx(Ae,{value:"entertainment",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_T,{className:"w-4 h-4"}),n.jsx("span",{children:"Entertainment"})]})}),n.jsx(Ae,{value:"networking",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jr,{className:"w-4 h-4"}),n.jsx("span",{children:"Networking"})]})}),n.jsx(Ae,{value:"closing",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-4 h-4"}),n.jsx("span",{children:"Closing"})]})}),n.jsx(Ae,{value:"raffle_auction",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Om,{className:"w-4 h-4"}),n.jsx("span",{children:"Raffle & Auction"})]})}),n.jsx(Ae,{value:"photographs_interviews",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ng,{className:"w-4 h-4"}),n.jsx("span",{children:"Photographs & Interviews"})]})})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm font-medium mb-1 block",children:"Duration (min)"}),n.jsx(Me,{type:"number",value:i.duration_minutes||"",onChange:J=>o({...i,duration_minutes:parseInt(J.target.value)}),placeholder:"60"})]})]}),n.jsx(Me,{value:i.location||"",onChange:J=>o({...i,location:J.target.value}),placeholder:"Location"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{onClick:S,className:"bg-green-600 hover:bg-green-700",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save"]}),n.jsx(me,{onClick:()=>s(null),variant:"outline",children:"Cancel"})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("h3",{className:"text-xl sm:text-2xl font-bold text-primary-navy mb-3 leading-tight",children:$.event_name}),$.description&&n.jsx("p",{className:"text-gray-600 text-sm sm:text-base leading-relaxed mb-4",children:$.description}),($.location||$.duration_minutes)&&n.jsxs("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-3 sm:gap-4 text-sm bg-gray-50 p-3 rounded-lg",children:[$.location&&n.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[n.jsx(Xu,{className:"w-4 h-4 text-accent-gold flex-shrink-0"}),n.jsx("span",{className:"font-medium",children:$.location})]}),$.duration_minutes&&n.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[n.jsx(la,{className:"w-4 h-4 text-accent-gold flex-shrink-0"}),n.jsxs("span",{className:"font-medium",children:[$.duration_minutes," minutes"]})]})]})]})]})]})},$.id)})})]})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"border-none shadow-xl bg-gradient-to-br from-blue-50 to-purple-50 border-2 border-accent-gold/20",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsxs("h3",{className:"text-2xl font-bold text-primary-navy flex items-center gap-3",children:[n.jsx(Ia,{className:"w-8 h-8 text-accent-gold"}),"Important Information"]}),t&&n.jsxs(me,{onClick:k,size:"sm",className:"bg-accent-gold hover:bg-accent-gold/90 text-primary-navy",children:[n.jsx(gr,{className:"w-4 h-4 mr-2"}),"Add Item"]})]}),b?n.jsx("div",{className:"space-y-4",children:[1,2,3].map($=>n.jsxs("div",{className:"animate-pulse flex items-start gap-3",children:[n.jsx("div",{className:"w-5 h-5 bg-gray-200 rounded"}),n.jsx("div",{className:"flex-1 h-4 bg-gray-200 rounded"})]},$))}):n.jsx("ul",{className:"space-y-4",children:m.map($=>{const G=l===$.id;return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(Em,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),G?n.jsxs("div",{className:"flex-1 space-y-3",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Label (bold part):"}),n.jsx(Me,{value:d.item_label||"",onChange:B=>h({...d,item_label:B.target.value}),placeholder:"e.g., Dress Code"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-xs font-medium text-gray-600",children:"Content:"}),n.jsx(en,{value:d.item_content||"",onChange:B=>h({...d,item_content:B.target.value}
2029),placeholder:"e.g., Navy and Gold theme",className:"min-h-[60px]"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(me,{onClick:M,size:"sm",className:"bg-green-600 hover:bg-green-700",children:[n.jsx(No,{className:"w-4 h-4 mr-2"}),"Save"]}),n.jsx(me,{onClick:()=>c(null),size:"sm",variant:"outline",children:"Cancel"})]})]}):n.jsxs("div",{className:"flex-1 flex items-start justify-between gap-4",children:[n.jsxs("span",{className:"text-gray-700",children:[n.jsxs("strong",{children:[$.item_label,":"]})," ",$.item_content]}),t&&n.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>R($),className:"h-8 w-8 p-0 text-blue-600 hover:text-blue-700",children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>P($.id),className:"h-8 w-8 p-0 text-red-600 hover:text-red-700",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})]},$.id)})})]})})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(Vd,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-4",children:"Questions About the Event?"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"For more information about the ceremony, venue details, or accessibility requirements, please get in touch with our events team."}),n.jsx("a",{href:"/contact",children:n.jsxs("button",{className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-4 rounded-lg text-lg shadow-2xl transition-all duration-300 hover:scale-105",children:["Contact Us",n.jsx(Em,{className:"inline-block ml-2 w-5 h-5"})]})})]})})})})]})}function DPe(){return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 overflow-hidden",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?w=1920')] bg-cover bg-center"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 backdrop-blur-sm border border-accent-gold/40 rounded-full px-6 py-3 mb-6 shadow-xl",children:[n.jsx(ki,{className:"w-5 h-5 text-accent-gold"}),n.jsx("span",{className:"text-sm font-bold text-accent-gold uppercase tracking-wider",children:"Main Sponsor"})]}),n.jsx("div",{className:"mb-8",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/4b09eaeba_the-sinclair-method-uk-og.jpg",alt:"Sinclair Method UK",className:"max-w-2xl w-full mx-auto drop-shadow-2xl"})}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"sinclair_hero_title",defaultValue:"Sinclair Method UK",page:"SinclairMethodUK",description:"Main heading on Sinclair Method UK page",type:"heading"})}),n.jsx("p",{className:"text-2xl text-white/90 mb-4 font-semibold",children:n.jsx(ht,{contentKey:"sinclair_hero_tagline",defaultValue:"Regain Control of Your Drinking Without Quitting Overnight",page:"SinclairMethodUK",description:"Tagline on Sinclair Method UK page",type:"text"})}),n.jsx("p",{className:"text-xl text-white/80 leading-relaxed",children:n.jsx(ht,{contentKey:"sinclair_hero_subtitle",defaultValue:"The UK's leading science-backed alcohol reduction programme. Medically supervised, private and judgment-free.",page:"SinclairMethodUK",description:"Hero subtitle on Sinclair Method UK page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[n.jsxs(lt.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary-navy
2029/10 rounded-full px-4 py-2 mb-6",children:[n.jsx(bn,{className:"w-5 h-5 text-primary-navy"}),n.jsx("span",{className:"text-sm font-bold text-primary-navy uppercase tracking-wider",children:"The Original & Longest-Going in the UK"})]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-6",children:"What is the Sinclair Method?"}),n.jsx("p",{className:"text-lg text-gray-700 mb-6 leading-relaxed",children:"The Sinclair Method is a proven, medical approach for cutting down on alcohol without the need for rehab or going cold turkey. After a private, confidential online consultation, you may be prescribed Naltrexone, a safe, non-addictive medication that helps reduce the urge to drink."}),n.jsx("p",{className:"text-lg text-gray-700 mb-8 leading-relaxed",children:"This treatment works quietly in the background, supporting you to regain control at your own pace and rebuild healthier habits. Founded in 2019 and originating from Dr David Sinclair and Dr Roy Eskapa, Sinclair Method UK has supported over 80,000 successful clients."}),n.jsxs("div",{className:"flex flex-wrap gap-4",children:[n.jsx("a",{href:"https://www.sinclairmethoduk.com/",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold shadow-lg",children:["Visit Website",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})}),n.jsx("a",{href:"https://www.sinclairmethoduk.com/start-your-journey.htm",target:"_blank",rel:"noopener noreferrer",children:n.jsx(me,{size:"lg",variant:"outline",className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold",children:"Start Your Journey"})})]})]}),n.jsx(lt.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},className:"relative",children:n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy to-[#1a1560] text-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold text-accent-gold mb-2",children:"80K+"}),n.jsx("div",{className:"text-primary-navy font-medium bg-white px-3 py-1 rounded-lg",children:"Successful Clients"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-accent-gold to-[#e8ca7a] text-primary-navy border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold mb-2",children:"78%"}),n.jsx("div",{className:"font-medium",children:"Success Rate"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-emerald-500 to-emerald-600 text-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold mb-2",children:"5K+"}),n.jsx("div",{className:"font-medium",children:"Active Users"})]})}),n.jsx(_e,{className:"bg-gradient-to-br from-blue-500 to-blue-600 text-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8 text-center",children:[n.jsx("div",{className:"text-5xl font-bold mb-2",children:"4.9"}),n.jsx("div",{className:"font-medium",children:"Trustpilot Rating"})]})})]})})]})})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-16",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Why Choose Sinclair Method UK?"}),n.jsx("p",{className:"text-lg text-gray-600 max-w-2xl mx-auto",children:"Evidence-based support that fits around your life"})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[{icon:ps,title:"NHS-Approved Medication",description:"Safe, non-addictive medication prescribed by UK doctors to help reduce alcohol cravings",color:"from-blue-500 to-blue-600"},{icon:Jr,title:"Doctor-Led Support",description:"Private GP consultation and personalised guidance throughout your journey",color:"from-purple-500 to-purple-600"},{icon:Sg,title:"Private & Confidential",description:"Judgment-free support delivered discreetly via phone, video, or email",color:"from-pink-500 to-pink-600"},{icon:Cn,title:"Flexible Approach",description:"No need to quit overnight - regain control at your own pace",color:"from-emerald-500 to-emerald-600"},{icon:bn,title:"Proven Results",description:"78% success rate backed by medical research and real client stories",color:"from-
2029amber-500 to-amber-600"},{icon:Ia,title:"Life-Changing Impact",description:"Rebuild healthier habits and improve your quality of life",color:"from-indigo-500 to-indigo-600"}].map((e,t)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:t*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full border-none shadow-xl hover:shadow-2xl transition-all duration-300 group",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:`w-16 h-16 mx-auto mb-6 bg-gradient-to-br ${e.color} rounded-2xl flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform`,children:n.jsx(e.icon,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"text-xl font-bold text-primary-navy mb-3 text-center",children:e.title}),n.jsx("p",{className:"text-gray-600 leading-relaxed text-center",children:e.description})]})})},t))})]})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:"Featured in National Press"}),n.jsx("p",{className:"text-lg text-gray-600",children:"Trusted coverage from leading UK media outlets"})]}),n.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:[{outlet:"The Times Magazine",date:"15th June 2024",description:"Esther Walker shares her journey of reducing alcohol consumption with the Sinclair Method"},{outlet:"Daily Mail",date:"14th October 2024",description:"Annabel Fenwick Elliott continues her Sinclair Method story and success"},{outlet:"The Sun",date:"18th February 2025",description:"Ongoing progress story featuring the Sinclair Method's effectiveness"}].map((e,t)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:t*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full border-none shadow-lg hover:shadow-xl transition-all",children:n.jsxs(Ce,{className:"p-6",children:[n.jsx("div",{className:"text-accent-gold font-bold mb-2",children:e.outlet}),n.jsx("div",{className:"text-sm text-gray-500 mb-3",children:e.date}),n.jsx("p",{className:"text-gray-700 leading-relaxed",children:e.description})]})})},t))})]})}),n.jsx("section",{className:"py-20 bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx("div",{className:"text-center max-w-3xl mx-auto",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-6",children:"Main Sponsor of the National Charity Today Awards™"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Sinclair Method UK is proud to be the main sponsor of the 2025 National Charity Today Awards, supporting excellence and innovation across the UK charity sector."}),n.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:n.jsx("a",{href:"https://www.sinclairmethoduk.com/charitable-impact-2024.htm",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-6 text-lg shadow-2xl",children:["Learn About Our Charitable Impact",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})})})]})})})}),n.jsx("section",{className:"py-20 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-gray-50 to-blue-50 border-2 border-accent-gold/20 shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx("h2",{className:"text-3xl font-bold text-primary-navy mb-6",children:"Ready to Take the First Step?"}),n.jsx("p",{className:"text-xl text-gray-700 mb-8 leading-relaxed",children:"Start with a free, confidential online suitability check. No commitment required."}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[n.jsx("a",{href:"https://www.sinclairmethoduk.com/start-your-journey.htm",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg shadow-xl",children:["Start Your Journey",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})}),n.jsx("a",{href:"https://www.sinclairmethoduk.com/what-is-the-sinclair-method.htm",target:"_blank",rel:"noopener noreferrer",children:n.jsx(me,{size:"lg",variant:"outline",className:"border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold px-10 py-6 text-lg",children:"Learn More"})})]}),n.jsx("div",{className:"mt-8 pt-8 border-t border-gray-200",children:n.jsxs("div",{className:"flex justify-center items-center gap-8 text-sm text-gray-600",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600"}),n.jsx("span",{children:"Free Online Check"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600"}),n.jsx("span",{children:"Private & Confidential"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Cn,{className:"w-5 h-5 text-emerald-600"}),n.jsx("span",{children:"UK Doctors"})]})]})})]})})})}),n.jsx("section",{className:"py-16 bg-gradient-to-br from-gray-50 to-blue-50",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-3 gap-8 text-center",children:[n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"w-12 h-12 bg-primary-navy rounded-xl flex items-center justify-center mx-auto mb-4",children:n.jsx(Pl,{className:"w-6 h-6 text-accent-gold"})}),n.jsx("h3",{className:"font-bold text-primary-navy mb-2",children:"Website"}),n.jsx("a",{href:"https://www.sinclairmethoduk.com/",target:"_blank",rel:"noopener noreferrer",className:"text-accent-gold hover:text-primary-navy",children:"sinclairmethoduk.com"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"w-12 h-12 bg-primary-navy rounded-xl flex items-center justify-center mx-auto mb-4",children:n.jsx(Sg,{className:"w-6 h-6 text-accent-gold"})}),n.jsx("h3",{className:"font-bold text-primary-navy mb-2",children:"Email"}),n.jsx("a",{href:"mailto:[email protected]",className:"text-accent-gold hover:text-primary-navy",children:"[email protected]"})]})}),n.jsx(_e,{className:"border-none shadow-lg",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"w-12 h-12 bg-primary-navy rounded-xl flex items-center justify-center mx-auto mb-4",children:n.jsx(bn,{className:"w-6 h-6 text-accent-gold"})}),n.jsx("h3",{className:"font-bold text-primary-navy mb-2",children:"Head Office"}),n.jsxs("p",{className:"text-gray-600 text-sm",children:["No.4 St. Pauls Square",n.jsx("br",{}),"Liverpool, L3 9SJ"]})]})})]})})})]})}function FPe(){const e=Sr(),[t,r]=L.useState(!1),[a,s]=L.useState(null),[i,o]=L.useState("all"),[l,c]=L.useState({post_content:"",platforms:[],scheduled_date_time:"",status:"draft",image_url:"",post_type:"general",hashtags:"",notes:""}),{data:d=[],isLoading:h}=xt({queryKey:["socialMediaPosts"],queryFn:()=>pe.entities.SocialMediaPost.list("-scheduled_date_time",100)}),u=Tt({mutationFn:S=>pe.entities.SocialMediaPost.create(S),onSuccess:()=>
2029{e.invalidateQueries({queryKey:["socialMediaPosts"]}),r(!1),b()}}),f=Tt({mutationFn:({id:S,postData:A})=>pe.entities.SocialMediaPost.update(S,A),onSuccess:()=>{e.invalidateQueries({queryKey:["socialMediaPosts"]}),r(!1),s(null),b()}}),m=Tt({mutationFn:S=>pe.entities.SocialMediaPost.delete(S),onSuccess:()=>{e.invalidateQueries({queryKey:["socialMediaPosts"]})}}),b=()=>{c({post_content:"",platforms:[],scheduled_date_time:"",status:"draft",image_url:"",post_type:"general",hashtags:"",notes:""})},g=S=>{S.preventDefault(),a?f.mutate({id:a.id,postData:l}):u.mutate(l)},y=S=>{s(S),c({post_content:S.post_content||"",platforms:S.platforms||[],scheduled_date_time:S.scheduled_date_time||"",status:S.status||"draft",image_url:S.image_url||"",post_type:S.post_type||"general",hashtags:S.hashtags||"",notes:S.notes||""}),r(!0)},x=S=>{confirm("Are you sure you want to delete this post?")&&m.mutate(S)},w=S=>{c(A=>({...A,platforms:A.platforms.includes(S)?A.platforms.filter(T=>T!==S):[...A.platforms,S]}))},j=S=>({Facebook:Wy,Twitter:Yy,LinkedIn:Yu,Instagram:l3,YouTube:d3})[S]||Jh,N={draft:"bg-gray-100 text-gray-800",scheduled:"bg-blue-100 text-blue-800",posted:"bg-green-100 text-green-800",cancelled:"bg-red-100 text-red-800"},_=i==="all"?d:d.filter(S=>S.status===i);return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 p-6",children:n.jsxs("div",{className:"max-w-7xl mx-auto",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-4xl font-bold text-primary-navy mb-2",children:"Social Media Planning"}),n.jsx("p",{className:"text-gray-600",children:"Plan and schedule social media posts across platforms"})]}),n.jsxs(me,{onClick:()=>{s(null),b(),r(!0)},className:"bg-purple-600 hover:bg-purple-700 text-white",children:[n.jsx(gr,{className:"w-5 h-5 mr-2"}),"New Post"]})]}),n.jsx("div",{className:"flex gap-2",children:[{value:"all",label:"All Posts"},{value:"draft",label:"Drafts"},{value:"scheduled",label:"Scheduled"},{value:"posted",label:"Posted"}].map(S=>n.jsx(me,{variant:i===S.value?"default":"outline",onClick:()=>o(S.value),className:i===S.value?"bg-purple-600 hover:bg-purple-700":"",children:S.label},S.value))})]}),h?n.jsx("div",{className:"text-center py-12",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-purple-600 mx-auto"})}):_.length===0?n.jsxs(_e,{className:"p-12 text-center",children:[n.jsx(Jh,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No posts found"}),n.jsx("p",{className:"text-gray-500 mt-2",children:"Create your first social media post to get started"})]}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:_.map(S=>{var A;return n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:n.jsxs(_e,{className:"hover:shadow-xl transition-shadow",children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(dt,{className:N[S.status],children:S.status}),n.jsxs("p",{className:"text-sm text-gray-600 mt-2 flex items-center gap-1",children:[n.jsx(la,{className:"w-4 h-4"}),yt(new Date(S.scheduled_date_time),"MMM d, yyyy h:mm a")]})]}),n.jsxs("div",{className:"flex gap-1",children:[n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>
2029y(S),children:n.jsx(xa,{className:"w-4 h-4"})}),n.jsx(me,{variant:"ghost",size:"icon",onClick:()=>x(S.id),className:"text-red-600 hover:text-red-700",children:n.jsx(tr,{className:"w-4 h-4"})})]})]})}),n.jsxs(Ce,{children:[n.jsx("p",{className:"text-gray-700 mb-4 line-clamp-3",children:S.post_content}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:(A=S.platforms)==null?void 0:A.map(T=>{const R=j(T);return n.jsxs(dt,{variant:"outline",className:"flex items-center gap-1",children:[n.jsx(R,{className:"w-3 h-3"}),T]},T)})}),S.hashtags&&n.jsx("p",{className:"text-sm text-blue-600 mb-2",children:S.hashtags}),S.post_type&&n.jsx(dt,{variant:"secondary",className:"text-xs",children:S.post_type.replace("_"," ")})]})]})},S.id)})}),n.jsx(Nn,{open:t,onOpenChange:r,children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsx(Sn,{className:"text-2xl font-bold text-purple-600",children:a?"Edit Post":"Create New Post"})}),n.jsxs("form",{onSubmit:g,className:"space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Post Content *"}),n.jsx(en,{value:l.post_content,onChange:S=>c(A=>({...A,post_content:S.target.value})),placeholder:"What would you like to share?",className:"min-h-[120px]",required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Platforms *"}),n.jsx("div",{className:"grid grid-cols-2 gap-3",children:["Facebook","Twitter","LinkedIn","Instagram","YouTube"].map(S=>{const A=j(S);return n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Zr,{id:S,checked:l.platforms.includes(S),onCheckedChange:()=>w(S)}),n.jsxs("label",{htmlFor:S,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(A,{className:"w-4 h-4"}),S]})]},S)})})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Scheduled Date & Time *"}),n.jsx(Me,{type:"datetime-local",value:l.scheduled_date_time,onChange:S=>c(A=>({...A,scheduled_date_time:S.target.value})),required:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Status"}),n.jsxs(Qt,{value:l.status,onValueChange:S=>c(A=>({...A,status:S})),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"draft",children:"Draft"}),n.jsx(Ae,{value:"scheduled",children:"Scheduled"}),n.jsx(Ae,{value:"posted",children:"Posted"}),n.jsx(Ae,{value:"cancelled",children:"Cancelled"})]})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Post Type"}),n.jsxs(Qt,{value:l.post_type,onValueChange:S=>c(A=>({...A,post_type:S})),children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"announcement",children:"Announcement"}),n.jsx(Ae,{value:"nomination_reminder",children:"Nomination Reminder"}),n.jsx(Ae,{value:"winner_reveal",children:"Winner Reveal"}),n.jsx(Ae,{value:"event_update",children:"Event Update"}),n.jsx(Ae,{value:"sponsor_highlight",children:"Sponsor Highlight"}),n.jsx(Ae,{value:"general",children:"General"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Hashtags"}),n.jsx(Me,{value:l.hashtags,onChange:S=>c(A=>({...A,hashtags:S.target.value})),placeholder:"#CharityAwards #NCTA2025"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Image URL"}),n.jsx(Me,{value:l.image_url,onChange:S=>c(A=>({...A,image_url:S.target.value})),placeholder:"https://example.com/image.jpg"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(ye,{children:"Internal Notes"}),n.jsx(en,{value:l.notes,onChange:S=>c(A=>({...A,notes:S.target.value})),placeholder:"Any internal notes about this post..."})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx(me,{type:"button",variant:"outline",onClick:()=>{r(!1),s(null),b()},className:"flex-1",children:"Cancel"}),n.jsx(me,{type:"submit",disabled:u.isPending||f.isPending,className:"flex-1 bg-purple-600 hover:bg-purple-700",children:a?"Update Post":"Create Post"})]})]})]})})]})})}function qPe(){const t=new URLSearchParams(window.location.search).get("id"),{data:r,isLoading:a}=xt({queryKey:["sponsor",t],queryFn:async()=>(await pe.entities.Sponsor.list()).find(l=>l.id===t),enabled:!!t}
2029),s={headline:{title:"Headline Sponsor",color:"from-amber-500 to-yellow-600",textColor:"text-amber-700",bgColor:"bg-amber-50",borderColor:"border-amber-200",badge:"bg-gradient-to-r from-amber-400 to-yellow-500"},gold:{title:"Gold Sponsor",color:"from-yellow-500 to-amber-500",textColor:"text-yellow-700",bgColor:"bg-yellow-50",borderColor:"border-yellow-200",badge:"bg-gradient-to-r from-yellow-400 to-amber-400"},silver:{title:"Silver Sponsor",color:"from-gray-400 to-gray-600",textColor:"text-gray-700",bgColor:"bg-gray-50",borderColor:"border-gray-200",badge:"bg-gradient-to-r from-gray-300 to-gray-400"},bronze:{title:"Bronze Sponsor",color:"from-orange-600 to-amber-700",textColor:"text-orange-700",bgColor:"bg-orange-50",borderColor:"border-orange-200",badge:"bg-gradient-to-r from-orange-500 to-amber-600"},partner:{title:"Supporting Partner",color:"from-blue-500 to-purple-600",textColor:"text-blue-700",bgColor:"bg-blue-50",borderColor:"border-blue-200",badge:"bg-gradient-to-r from-blue-500 to-purple-500"}};if(a)return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-accent-gold border-t-transparent"})});if(!r)return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50 py-20",children:n.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[n.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Sponsor Not Found"}),n.jsx(Rt,{to:Ct("Sponsors"),children:n.jsxs(me,{className:"bg-primary-navy hover:bg-primary-navy/90 text-white",children:[n.jsx(wm,{className:"mr-2 w-4 h-4"}),"Back to Sponsors"]})})]})});const i=s[r.tier];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-16",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1920')] bg-cover bg-center"}),n.jsxs("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsx(Rt,{to:Ct("Sponsors"),children:n.jsxs(me,{variant:"ghost",className:"text-white hover:text-accent-gold mb-6",children:[n.jsx(wm,{className:"mr-2 w-4 h-4"}),"Back to All Sponsors"]})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center",children:n.jsxs("div",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-full ${i.badge} text-white font-semibold mb-6 shadow-lg`,children:[n.jsx(bn,{className:"w-5 h-5"}),n.jsx("span",{children:i.title})]})})]})]}),n.jsx("section",{className:"py-16 -mt-12",children:n.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsxs(_e,{className:"border-none shadow-2xl overflow-hidden",children:[n.jsx("div",{className:`${i.bgColor} border-b-4 ${i.borderColor} p-12`,children:r.logo_url?n.jsx("div",{className:"bg-white rounded-2xl p-8 shadow-lg max-w-2xl mx-auto",children:n.jsx("img",{src:r.logo_url,alt:r.name,className:"w-full h-40 object-contain"})}):n.jsx("div",{className:"bg-white rounded-2xl p-12 shadow-lg max-w-2xl mx-auto flex items-center justify-center",children:n.jsx(ms,{className:"w-32 h-32 text-gray-300"})})}),n.jsxs(Ce,{className:"p-12",children:[n.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-primary-navy mb-8 text-center",children:r.name}),r.mission&&n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"mb-8",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${i.color} rounded-xl flex items-center justify-center shadow-lg`,children:n.jsx(Tm,{className:"w-6 h-6 text-white"})}),n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Our Mission"})]}),n.jsx("div",{className:`${i.bgColor} border-l-4 ${i.borderColor} rounded-r-xl p-6`,children:n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed",children:r.mission})})]}),r.impact&&n.jsxs(lt.div,{initial:{opacity:0,y:20}
2029,animate:{opacity:1,y:0},transition:{delay:.4},className:"mb-8",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${i.color} rounded-xl flex items-center justify-center shadow-lg`,children:n.jsx(ka,{className:"w-6 h-6 text-white"})}),n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"Impact & Contribution"})]}),n.jsx("div",{className:`${i.bgColor} border-l-4 ${i.borderColor} rounded-r-xl p-6`,children:n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed",children:r.impact})})]}),r.description&&n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"mb-8",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{className:`w-12 h-12 bg-gradient-to-br ${i.color} rounded-xl flex items-center justify-center shadow-lg`,children:n.jsx(Sg,{className:"w-6 h-6 text-white"})}),n.jsx("h2",{className:"text-2xl font-bold text-primary-navy",children:"About Us"})]}),n.jsx("div",{className:"prose prose-lg max-w-none",children:n.jsx("p",{className:"text-lg text-gray-700 leading-relaxed",children:r.description})})]}),r.website_url&&n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"text-center mt-10",children:n.jsx("a",{href:r.website_url,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold px-10 py-6 text-lg shadow-xl hover:shadow-2xl transition-all duration-300 hover:scale-105",children:["Visit Our Website",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})})}),r.sponsored_categories&&r.sponsored_categories.length>0&&n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7},className:"mt-12 pt-8 border-t border-gray-200",children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-6 text-center",children:"Sponsored Award Categories"}),n.jsx("div",{className:"flex flex-wrap gap-3 justify-center",children:r.sponsored_categories.map((o,l)=>n.jsx("div",{className:`px-4 py-2 ${i.bgColor} ${i.borderColor} border-2 rounded-full font-semibold ${i.textColor}`,children:o},l))})]}),n.jsxs("div",{className:"mt-12 pt-8 border-t border-gray-200",children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-6 text-center",children:"Supporting Excellence in the Charity Sector"}),n.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{icon:bn,title:"Recognition",description:"Prominent brand visibility throughout the awards programme"},{icon:ms,title:"Impact",description:"Supporting the celebration of charitable excellence"},{icon:Pl,title:"Engagement",description:"Connecting with sector leaders and charities"}].map((o,l)=>n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.8+l*.1},className:`${i.bgColor} rounded-xl p-6 text-center border-2 ${i.borderColor}`,children:[n.jsx("div",{className:`w-16 h-16 mx-auto mb-4 bg-gradient-to-br ${i.color} rounded-2xl flex items-center justify-center shadow-lg`,children:n.jsx(o.icon,{className:"w-8 h-8 text-white"})}),n.jsx("h3",{className:"font-bold text-primary-navy mb-2",children:o.title}),n.jsx("p",{className:"text-sm text-gray-600",children:o.description})]},l))})]})]})]})})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Become a Sponsor"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:"Join our prestigious partners in celebrating excellence across the UK charity sector. Sponsorship opportunities are available for the 2025 awards."}),n.jsx(Rt,{to:Ct("Contact"),children:n.jsxs(me,{size:"lg",className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-6 text-lg shadow-2xl hover:shadow-white/20 transition-all duration-300 hover:scale-105",children:["Enquire About Sponsorship",n.jsx(wm,{className:"ml-2 w-5 h-5 rotate-180"})]})})]})})})})]})}function BPe(){const[e,t]=L.useState("all"),[r,a]=L.useState("all"),[s,i]=L.useState(""),o=Sr(),{data:l=[],isLoading:c}=xt({queryKey:["sponsorProspects"],queryFn:()=>pe.entities.SponsorProspect.list("-updated_date",100),staleTime:3e4}),d=Tt({mutationFn:m=>pe.entities.SponsorProspect.delete(m),onSuccess:()=>{o.invalidateQueries({queryKey:["sponsorProspects"]})}}),h=Tt({mutationFn:({prospectId:m,status:b})=>pe.entities.SponsorProspect.update(m,{status:b}),onSuccess:()=>{o.invalidateQueries({queryKey:["sponsorProspects"]})}}),u=Tt({mutationFn:m=>pe.entities.Contact.create({contact_name:m.contact_name,job_title:m.job_title,company_name:m.company_name,email:m.email||"",phone:m.phone||"",linkedin_url:m.linkedin_url,contact_type:"prospect"}),onSuccess:()=>{o.invalidateQueries({queryKey:["contacts"]})}}),f=l.filter(m=>{var x;const b=e==="all"||m.status===e,g=r==="all"||m.priority===r,y=!s||((x=m.company_name)==null?void 0:x.toLowerCase().includes(s.toLowerCase()));return b&&g&&y});return n.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 p-6",children:n.jsxs("div",{className:"max-w-7xl mx-auto",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx(ka,{className:"w-8 h-8 text-blue-600"}),n.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"AI Sponsorship Intelligence & Database"})]}),n.jsx("p",{className:"text-gray-600",children:"Manage and track all sponsorship prospects for outreach and engagement"})]}),n.jsxs(_e,{children:[n.jsx(Nt,{children:n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsx(Pt,{children:"All Prospects"}),n.jsx("div",{className:"text-2xl font-bold text-blue-600",children:f.length})]})}),n.jsxs(Ce,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Search Company"}),n.jsx("input",{type:"text",placeholder:"Filter by company name...",value:s,onChange:m=>i(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Status"}),n.jsxs(Qt,{value:e,onValueChange:t,children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Status"}),n.jsx(Ae,{value:"new",children:"New"}),n.jsx(Ae,{value:"researched",children:"Researched"}),n.jsx(Ae,{value:"contacted",children:"Contacted"}),n.jsx(Ae,{value:"interested",children:"Interested"}),n.jsx(Ae,{value:"negotiating",children:"Negotiating"}),n.jsx(Ae,{value:"closed",children:"Closed"}),n.jsx(Ae,{value:"declined",children:"Declined"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("label",{className:"text-sm font-medium",children:"Priority"}),n.jsxs(Qt,{value:r,onValueChange:a,children:[n.jsx(Kt,{children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"all",children:"All Priority"}),n.jsx(Ae,{value:"high",children:"High"}),n.jsx(Ae,{value:"medium",children:"Medium"}),n.jsx(Ae,{value:"low",children:"Low"})]})]})]})]}),n.jsxs("div",{className:"overflow-x-auto border rounded-lg",children:[n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{className:"bg-gray-100 border-b",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Contact"}),n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Company"}),n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Department"}),n.jsx("th",{className:"text-left px-4 py-3 font-semibold",children:"Status"}),n.jsx("th",{className:"text-center px-4 py-3 font-semibold",children:"Score"}),n.jsx("th",{className:"text-center px-4 py-3 font-semibold",children:"Priority"}),n.jsx("th",{className:"text-center px-4 py-3 font-semibold",children:"Actions"})]})}),n.jsx("tbody",{children:f.map(m=>{var b;return n.jsxs("tr",{className:"border-b hover:bg-gray-50",children:[n.jsxs("td",{className:"px-4 py-3",children:[n.jsx("div",{className:"font-medium",children:m.contact_name}),n.jsx("div",{className:"text-xs text-gray-500",children:m.job_title})]}),n.jsx("td",{className:"px-4 py-3",children:m.company_name}),n.jsx("td",{className:"px-4 py-3 text-xs text-gray-600",children:m.department||"-"}),n.jsx("td",{className:"px-4 py-3",children:n.jsxs(Qt,{value:m.status,onValueChange:g=>h.mutate({prospectId:m.id,status:g}),children:[n.jsx(Kt,{className:"w-32 h-8 text-xs",children:n.jsx(Xt,{})}),n.jsxs(Gt,{children:[n.jsx(Ae,{value:"new",children:"New"}),n.jsx(Ae,{value:"researched",children:"Researched"}),n.jsx(Ae,{value:"contacted",children:"Contacted"}),n.jsx(Ae,{value:"interested",children:"Interested"}),n.jsx(Ae,{value:"negotiating",children:"Negotiating"}),n.jsx(Ae,{value:"closed",children:"Closed"}),n.jsx(Ae,{value:"declined",children:"Declined"})]})]})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx(dt,{variant:"outline",children:m.decision_maker_score})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsx(dt,{className:m.priority==="high"?"bg-red-100 text-red-800":m.priority==="medium"?"bg-yellow-100 text-yellow-800":"bg-gray-100 text-gray-800",children:m.priority})}),n.jsx("td",{className:"px-4 py-3 text-center",children:n.jsxs("div",{className:"flex justify-center gap-2",children:[n.jsx("a",{href:(b=m.linkedin_url)!=null&&b.startsWith("http")?m.linkedin_url:`https://linkedin.com${m.linkedin_url}`,target:"_blank",rel:"noopener noreferrer",className:"p-1 hover:bg-blue-100 rounded transition",title:"View LinkedIn",children:n.jsx(Yu,{className:"w-4 h-4 text-blue-600"})}),n.jsx("button",{onClick:()=>u.mutate(m),className:"p-1 hover:bg-green-100 rounded transition",title:"Add to contacts",disabled:u.isPending,children:n.jsx(QJ,{className:"w-4 h-4 text-green-600"})}),n.jsx("button",{onClick:()=>d.mutate(m.id),className:"p-1 hover:bg-red-100 rounded transition",title:"Delete prospect",children:n.jsx(tr,{className:"w-4 h-4 text-red-600"})})]})})]},m.id)})})]}),f.length===0&&n.jsx("div",{className:"text-center py-8 text-gray-500",children:"No prospects match your filters"})]})]})]})]})})}const $Pe=[{icon:Iq,title:"Brand Visibility",color:"from-blue-900 to-blue-800",items:["Official Drinks Sponsor designation across all event materials","Logo featured on the awards website","Inclusion in the awards programme","Recognition in all sponsor communications and newsletters","Social media promotion to a national audience","Sponsor branding on event screens throughout the ceremony"]},{icon:Yb,title:"Event Experience",color:"from-[#06053e] to-[#0f0d5e]",items:["Exclusive branding at the drinks reception","Opportunity to provide branded welcome drinks","Branding at all drinks service areas","On-stage acknowledgement during the awards ceremony","Opportunity to showcase products directly to guests"]}
2029,{icon:ng,title:"Media & Editorial",color:"from-amber-700 to-amber-600",items:["Dedicated sponsor announcement article on Charity Today","Inclusion in all awards-related press activity","Prominent visibility across official event photography","Featured in post-event editorial coverage and documentation"]},{icon:Jr,title:"Hospitality & Networking",color:"from-emerald-800 to-emerald-700",items:["Complimentary guest places at the awards dinner","Direct access to charity sector decision-makers and leaders","Networking throughout the afternoon with finalists, sponsors and sector partners"]}];function UPe(){const[e,t]=L.useState({name:"",organisation:"",email:"",telephone:"",message:""}),[r,a]=L.useState(!1),[s,i]=L.useState(!1),[o,l]=L.useState(""),c=h=>t(u=>({...u,[h.target.name]:h.target.value})),d=async h=>{h.preventDefault(),a(!0),l("");try{await pe.integrations.Core.SendEmail({to:"[email protected]",subject:`Drinks Sponsor Enquiry: ${e.name} (${e.organisation})`,body:`
2030<h2>Official Drinks Sponsor Enquiry</h2>
2031<p><strong>Name:</strong> ${e.name}</p>
2032<p><strong>Organisation:</strong> ${e.organisation}</p>
2033<p><strong>Email:</strong> ${e.email}</p>
2034<p><strong>Telephone:</strong> ${e.telephone}</p>
2035<p><strong>Message:</strong></p>
2036<p>${e.message}</p>
2037        `.trim()}),i(!0)}catch{l("Sorry, there was a problem submitting your enquiry. Please email us directly at [email protected]")}finally{a(!1)}};return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsxs("section",{className:"relative overflow-hidden min-h-[500px]",children:[n.jsx("img",{src:"https://media.base44.com/images/public/6903417e7dc050165abb6978/85437f59e_Screenshot2026-06-17at165440.png",alt:"",className:"absolute inset-0 w-full h-full object-cover"},"champagne-hero"),n.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, rgba(6,5,62,0.88) 0%, rgba(15,13,94,0.82) 50%, rgba(6,5,62,0.88) 100%)"}}),n.jsxs("div",{className:"relative max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-24 lg:py-36 text-center",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full border border-[#dec069]/40 text-[#dec069] text-sm font-semibold mb-8",style:{backgroundColor:"rgba(222,192,105,0.1)"},children:[n.jsx(Yb,{className:"w-4 h-4"}),"Exclusive Sponsorship Opportunity"]}),n.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-white leading-tight mb-4",children:"Official Drinks Sponsor"}),n.jsx("p",{className:"text-xl sm:text-2xl font-semibold mb-6",style:{color:"#dec069"},children:"National Charity Today Awards 2026"}),n.jsx("p",{className:"text-lg text-gray-300 max-w-2xl mx-auto mb-6 leading-relaxed",children:"An exclusive opportunity to place your brand at the heart of the UK's premier charity sector awards afternoon, welcoming an audie
2037nce of sector leaders, decision-makers and change-makers from across the nation."}),n.jsxs("div",{className:"flex flex-col items-center gap-6 mb-2",children:[n.jsxs("div",{className:"inline-flex items-center gap-3 px-6 py-3 rounded-full",style:{backgroundColor:"rgba(222,192,105,0.15)",border:"1px solid rgba(222,192,105,0.4)"},children:[n.jsx("span",{className:"text-2xl font-bold",style:{color:"#dec069"},children:"£2,500"}),n.jsx("span",{className:"text-gray-300 text-sm",children:"· Exclusive sponsorship package · 2026"})]}),n.jsx("a",{href:"#register",children:n.jsxs("button",{className:"inline-flex items-center gap-2 text-base font-bold px-8 py-4 rounded-lg shadow-xl transition-all duration-200 hover:scale-105 hover:shadow-2xl",style:{backgroundColor:"#dec069",color:"#06053e",border:"2px solid #c9a84f"},children:["Register Your Interest",n.jsx(Em,{className:"w-5 h-5"})]})})]})]})]}),n.jsx("section",{className:"py-16 lg:py-24",style:{backgroundColor:"#f8f7ff"},children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-14",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-semibold mb-3",style:{color:"#dec069"},children:[n.jsx(Ia,{className:"w-4 h-4"}),"What's Included"]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-4",style:{color:"#06053e"},children:"Sponsorship Benefits"}),n.jsx("p",{className:"text-gray-600 max-w-xl mx-auto",children:"As the sole Official Drinks Sponsor, your brand holds a unique and exclusive position that is not available to any other partner."})]}),n.jsx("div",{className:"grid sm:grid-cols-2 gap-6",children:$Pe.map(({icon:h,title:u,color:f,items:m})=>n.jsxs("div",{className:"rounded-2xl overflow-hidden shadow-lg hover:shadow-xl transition-shadow bg-white",children:[n.jsxs("div",{className:`bg-gradient-to-r ${f} px-6 py-5 flex items-center gap-3`,children:[n.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center",style:{backgroundColor:"rgba(222,192,105,0.2)"},children:n.jsx(h,{className:"w-5 h-5",style:{color:"#dec069"}})}),n.jsx("h3",{className:"text-lg font-bold text-white",children:u})]}),n.jsx("ul",{className:"p-6 space-y-3",children:m.map(b=>n.jsxs("li",{className:"flex items-start gap-3 text-sm text-gray-700",children:[n.jsx(Vy,{className:"w-4 h-4 mt-0.5 flex-shrink-0",style:{color:"#dec069"}}),b]},b))})]},u))})]})}),n.jsx("section",{id:"register",className:"py-16 lg:py-24 bg-white",children:n.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-semibold mb-3",style:{color:"#c9a84f"},children:[n.jsx(Xr,{className:"w-4 h-4"}),"Get in Touch"]}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-4",style:{color:"#06053e"},children:"Register Your Interest"}),n.jsx("p",{className:"text-gray-600 leading-relaxed",children:"To discuss this opportunity or request a sponsorship pack, please complete the form below. A member of the awards team will respond within two working days."})]}),n.jsxs("div",{className:"rounded-2xl shadow-2xl overflow-hidden",children:[n.jsx("div",{className:"px-8 py-6",style:{background:"linear-gradient(135deg, #06053e, #0f0d5e)"},children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center",style:{backgroundColor:"rgba(222,192,105,0.2)"},children:n.jsx(Yb,{className:"w-5 h-5",style:{color:"#dec069"}})}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-white",children:"Official Drinks Sponsorship"}),n.jsx("p",{className:"text-xs text-gray-400",children:"National Charity Today Awards 2026"})]})]})}),n.jsx("div",{className:"bg-white p-8",children:s?n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:"#06053e"},children:n.jsx(Vy,{className:"w-8 h-8",style:{color:"#dec069"}})}),n.jsx("h3",{className:"text-xl font-bold mb-2",style:{color:"#06053e"},children:"Enquiry Received"}
2037),n.jsx("p",{className:"text-gray-600",children:"Thank you for your interest. A member of the awards team will be in touch shortly."})]}):n.jsxs("form",{onSubmit:d,className:"space-y-5",children:[n.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-semibold mb-1.5",style:{color:"#06053e"},children:"Your Name *"}),n.jsx("input",{type:"text",name:"name",required:!0,value:e.name,onChange:c,placeholder:"Full name",className:"w-full px-4 py-3 rounded-lg border border-gray-200 text-sm focus:outline-none focus:ring-2 transition-all"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-semibold mb-1.5",style:{color:"#06053e"},children:"Organisation *"}),n.jsx("input",{type:"text",name:"organisation",required:!0,value:e.organisation,onChange:c,placeholder:"Company or organisation name",className:"w-full px-4 py-3 rounded-lg border border-gray-200 text-sm focus:outline-none focus:ring-2 transition-all"})]})]}),n.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-semibold mb-1.5",style:{color:"#06053e"},children:"Email Address *"}),n.jsx("input",{type:"email",name:"email",required:!0,value:e.email,onChange:c,placeholder:"[email protected]",className:"w-full px-4 py-3 rounded-lg border border-gray-200 text-sm focus:outline-none focus:ring-2 transition-all"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-semibold mb-1.5",style:{color:"#06053e"},children:"Telephone"}),n.jsx("input",{type:"tel",name:"telephone",value:e.telephone,onChange:c,placeholder:"+44 (0)...",className:"w-full px-4 py-3 rounded-lg border border-gray-200 text-sm focus:outline-none focus:ring-2 transition-all"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-semibold mb-1.5",style:{color:"#06053e"},children:"Message"}),n.jsx("textarea",{name:"message",value:e.message,onChange:c,rows:4,placeholder:"Tell us about your organisation and your interest in this opportunity...",className:"w-full px-4 py-3 rounded-lg border border-gray-200 text-sm focus:outline-none focus:ring-2 transition-all resize-none"})]}),o&&n.jsx("p",{className:"text-red-600 text-sm",children:o}),n.jsx("button",{type:"submit",disabled:r,className:"w-full py-4 rounded-lg font-bold text-base flex items-center justify-center gap-2 transition-all duration-200 hover:scale-[1.02] hover:shadow-xl disabled:opacity-60",style:{backgroundColor:"#dec069",color:"#06053e",border:"2px solid #c9a84f"},children:r?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"w-4 h-4 border-2 border-[#06053e] border-t-transparent rounded-full animate-spin"})," Sending..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Yb,{className:"w-5 h-5"})," Submit Enquiry"]})})]})})]})]})})]})}function zPe(){const{data:e=[],isLoading:t}=xt({queryKey:["sponsors"],queryFn:()=>pe.entities.Sponsor.filter({is_active:!0},"display_order",100)}),r={headline:1,gold:2,silver:3,bronze:4,partner:5},a=e.reduce((i,o)=>(i[o.tier]||(i[o.tier]=[]),i[o.tier].push(o),i),{}),s={headline:{title:"Headline Sponsor",description:"Our principal partner supporting the National Charity Today Awards",color:"from-amber-500 to-yellow-600",textColor:"text-amber-700",bgColor:"bg-amber-50",borderColor:"border-amber-200",badge:"bg-gradient-to-r from-amber-400 to-yellow-500"},gold:{title:"Gold Sponsors",description:"Premier partners championing excellence in the charity sector",color:"from-yellow-500 to-amber-500",textColor:"text-yellow-700",bgColor:"bg-yellow-50",borderColor:"border-yellow-200",badge:"bg-gradient-to-r from-yellow-400 to-amber-400"},silver:{title:"Silver Sponsors",description:"Valued partners supporting charitable achievement",color:"from-gray-400 to-gray-600",textColor:"text-gray-700",bgColor:"bg-gray-50",borderColor:"border-gray-200",badge:"bg-gradient-to-r from-gray-300 to-gray-400"},bronze:{title:"Bronze Sponsors",description:"Dedicated supporters of sector recognition",color:"from-orange-600 to-amber-700",textColor:"text-orange-700",bgColor:"bg-orange-50",borderColor:"border-orange-200",badge:"bg-gradient-to-r from-orange-500 to-amber-600"},partner:{title:"Supporting Partners",description:"Committed allies in celebrating charitable excellence",color:"from-blue-500 to-purple-600",textColor:"text-blue-700",bgColor:"bg-blue-50",borderColor:"border-blue-200",badge:"bg-gradient-to-r from-blue-500 to-purple-500"}};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1920')] bg-cover bg-center"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
2037,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm border border-white/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(bn,{className:"w-4 h-4 text-white"}),n.jsx("span",{className:"text-sm font-medium text-white",children:"Our Prestigious Partners"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"sponsors_hero_title",defaultValue:"Our Valued Sponsors & Partners",page:"Sponsors",description:"Main heading on Sponsors page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"sponsors_hero_subtitle",defaultValue:"The National Charity Today Awards™ are made possible through the generous support of organisations who share our commitment to celebrating excellence in the UK charity sector.",page:"Sponsors",description:"Hero subtitle on Sponsors page",type:"paragraph"})})]})})]}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 space-y-20",children:[Object.keys(s).sort((i,o)=>r[i]-r[o]).map(i=>{const o=a[i];if(!o||o.length===0)return null;const l=s[i],c=i==="headline";return n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:[n.jsxs("div",{className:"text-center mb-10",children:[n.jsxs("div",{className:`inline-flex items-center gap-2 px-6 py-3 rounded-full ${l.badge} text-white font-bold shadow-xl mb-4`,children:[n.jsx(bn,{className:"w-6 h-6"}),n.jsx("span",{className:"text-lg",children:l.title})]}),n.jsx("p",{className:"text-gray-600 text-lg max-w-2xl mx-auto",children:l.description})]}),n.jsx("div",{className:`grid ${c?"md:grid-cols-1":"md:grid-cols-2 lg:grid-cols-3"} gap-8`,children:o.map((d,h)=>n.jsx(lt.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{delay:h*.1},viewport:{once:!0},children:n.jsxs(_e,{className:`h-full hover:shadow-2xl transition-all duration-300 border-none shadow-lg group ${c?"max-w-3xl mx-auto":""}`,children:[n.jsx(Nt,{className:`${l.bgColor} border-b-4 ${l.borderColor} pb-8`,children:d.logo_url?n.jsx("a",{href:d.website_url||"#",target:"_blank",rel:"noopener noreferrer",className:"block cursor-pointer",children:n.jsx("div",{className:`${c?"h-48":"h-32"} flex items-center justify-center bg-white rounded-xl p-6 shadow-md group-hover:shadow-xl transition-shadow`,children:n.jsx("img",{src:d.logo_url,alt:d.name,className:"max-h-full max-w-full object-contain hover:opacity-80 transition-opacity"})})}):n.jsx("div",{className:`${c?"h-48":"h-32"} flex items-center justify-center bg-white rounded-xl shadow-md group-hover:shadow-xl transition-shadow`,children:n.jsx(ms,{className:"w-20 h-20 text-gray-300"})})}),n.jsxs(Ce,{className:"p-8",children:[n.jsx("h3",{className:`${c?"text-3xl":"text-2xl"} font-bold text-primary-navy text-center mb-4 group-hover:text-accent-gold transition-colors`,children:d.name}),d.description&&n.jsx("p",{className:`text-gray-600 leading-relaxed text-center ${i==="partner"?"":"mb-6"} ${c?"text-lg":"text-base"} line-clamp-3`,children:d.description}),i!=="partner"&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Rt,{to:`${Ct("SponsorDetail")}?id=${d.id}`,children:n.jsxs(me,{className:"bg-primary-navy text-white font-semibold group-hover:shadow-xl transition-all hover:bg-accent-gold [&:hover]:text-primary-navy",children:["View Profile",n.jsx(Ci,{className:"ml-2 w-4 h-4"})]})})})]})]})},d.id))})]},i)}),e.length===0&&!t&&n.jsxs("div",{className:"text-center py-16",children:[n.jsx(bn,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"Sponsor information coming soon."})]})]})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl overflow-hidden",children:n.jsxs(Ce,{className:"p-12 text-center relative",children:[n.jsx("div",{className:"absolute inset-0 opacity-5 bg-[url('https://images.unsplash.com/photo-1557804506-669a67965ba0?w=1920')] bg-cover bg-center"}),n.jsxs("div",{className:"relative",children:[n.jsx(ms,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-4",children:"Become a Sponsor"}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed max-w-2xl mx-auto",children:"Join us in celebrating excellence across the UK charity sector. Sponsorship opportunities are available for the 2025 awards."}),n.jsx(Rt,{to:Ct("Contact"),children:n.jsxs(me,{size:"lg",className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-6 text-lg shadow-2xl hover:shadow-white/20 transition-all duration-300 hover:scale-105 [&:hover]:text-primary-navy",children:["Get in Touch",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})]})]})})})})]})}function VPe(){const{data:e=[],isLoading:t}=xt({queryKey:["terms"],queryFn:()=>pe.entities.TermsAndConditions.filter({is_active:!0},"-updated_date",1)}),r=e[0];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
2037,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:"Terms and Conditions"}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:"Please read these terms carefully before participating in or attending the National Charity Today Awards™."})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:t?n.jsx(_e,{className:"border-none shadow-xl",children:n.jsx(Ce,{className:"p-12",children:n.jsxs("div",{className:"animate-pulse space-y-4",children:[n.jsx("div",{className:"h-6 bg-gray-200 rounded w-3/4"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"})]})})}):r?n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-12",children:[(r.last_updated||r.version)&&n.jsxs("div",{className:"flex flex-wrap items-center gap-4 mb-8 pb-8 border-b border-gray-200",children:[r.last_updated&&n.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[n.jsx(za,{className:"w-4 h-4 text-accent-gold"}),n.jsxs("span",{children:["Last Updated: ",yt(new Date(r.last_updated),"d MMMM, yyyy")]})]}),r.version&&n.jsxs("div",{className:"text-sm text-gray-600",children:["Version ",r.version]})]}),n.jsx("div",{className:`prose prose-lg max-w-none text-gray-700 
2038                    [&_h1]:text-3xl [&_h1]:font-bold [&_h1]:text-primary-navy [&_h1]:mb-4 [&_h1]:mt-6
2039                    [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:text-primary-navy [&_h2]:mb-3 [&_h2]:mt-5
2040                    [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:text-primary-navy [&_h3]:mb-2 [&_h3]:mt-4
2041                    [&_p]:mb-4 [&_p]:leading-relaxed
2042                    [&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4 [&_ul]:space-y-2
2043                    [&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4 [&_ol]:space-y-2
2044                    [&_strong]:font-bold [&_strong]:text-gray-900
2045                    [&_em]:italic
2046                    [&_a]:text-primary-navy [&_a]:underline [&_a]:hover:text-accent-gold`,dangerouslySetInnerHTML:{__html:r.content}})]})})}):n.jsx(_e,{className:"border-none shadow-xl",children:n.jsx(Ce,{className:"p-12",children:n.jsxs("div",{className:"prose prose-lg max-w-none",children:[n.jsx("h2",{className:"text-2xl font-bold text-primary-navy mb-4",children:"Intellectual Property & Content Protection"}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"1. Copyright & Trademarks"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"All content on this website, including but not limited to text, graphics, logos, images, the AI Nomination Assistant, website design, nomination processes, judging criteria, and award methodologies are the exclusive property of National Charity Today Awards™ and are protected by UK and international copyright laws."}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:'"National Charity Today Awards™", the NCTA seal, and all associated branding are trademarks. Unauthorized use is strictly prohibited.'}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"2. Proprietary Technology"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"The AI Nomination Assistant, including its algorithms, prompts, logic, and user interface, constitutes proprietary technology and trade secrets of National Charity Today Awards™. Any attempt to reverse-engineer, replicate, or create derivative works based on this technology is expressly forbidden and may result in legal action."}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"3. Prohibited Activities"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"You may not:"}),n.jsxs("ul",{className:"list-disc pl-6 text-gray-700 space-y-2 mb-4",children:[n.jsx("li",{children:"Copy, reproduce, or distribute any content from this website without written permission"}),n.jsx("li",{children:"Scrape, harvest, or extract data using automated tools"}),n.jsx("li",{children:"Replicate or imitate the awards programme, processes, or branding"}
2046),n.jsx("li",{children:"Reverse-engineer any proprietary technology, including the AI Assistant"}),n.jsx("li",{children:"Create derivative works or competing award programmes based on our methodology"}),n.jsx("li",{children:"Use our trademarks, logos, or seal without authorization"})]}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"4. Nomination Content"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"By submitting a nomination, you grant National Charity Today Awards™ a non-exclusive license to use the submitted content for evaluation, promotion, and archival purposes. You retain ownership of your submission, but warrant that it is original and does not infringe any third-party rights."}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"5. Use of NCTA Seal"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"Winners and finalists may use the official NCTA seal on their marketing materials and websites, subject to brand guidelines. Unauthorized use by non-winners or misrepresentation of award status is prohibited."}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"6. Legal Enforcement"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"We actively monitor for unauthorized use of our intellectual property. Violations will be pursued through appropriate legal channels, including cease and desist notices, takedown requests, and litigation where necessary."}),n.jsx("h3",{className:"text-xl font-semibold text-primary-navy mt-6 mb-3",children:"7. Governing Law"}),n.jsx("p",{className:"text-gray-700 leading-relaxed mb-4",children:"These terms are governed by the laws of England and Wales. Any disputes shall be subject to the exclusive jurisdiction of the courts of England and Wales."}),n.jsxs("div",{className:"mt-8 p-6 bg-primary-navy text-white rounded-xl",children:[n.jsxs("p",{className:"font-semibold mb-2",children:["© ",new Date().getFullYear()," National Charity Today Awards™"]}),n.jsx("p",{className:"text-sm text-white/80",children:"All rights reserved. Protected by copyright, trademark, and trade secret laws. Unauthorized reproduction or use is prohibited."})]})]})})})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy to-accent-gold border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(pr,{className:"w-16 h-16 mx-auto mb-6 text-primary-navy"}),n.jsx("h2",{className:"text-3xl font-bold mb-4 text-primary-navy",children:"Questions About Our Terms?"}),n.jsx("p",{className:"text-xl text-primary-navy/80 mb-8 leading-relaxed",children:"If you have any questions or need clarification about our terms and conditions, please don't hesitate to contact us."}),n.jsx("a",{href:"/contact",children:n.jsx("button",{className:"bg-white hover:bg-gray-100 text-primary-navy font-semibold px-10 py-4 rounded-lg shadow-lg transition-all duration-300",children:"Contact Us"})})]})})})})]})}function HPe(){const[e,t]=L.useState(!1),[r,a]=L.useState(!1),s=Sr();L.useEffect(()=>{(async()=>{try{const u=await pe.auth.me();t((u==null?void 0:u.role)==="admin")}catch{t(!1)}})()},[]);const{data:i=[],isLoading:o}=xt({queryKey:["activeTestimonials"],queryFn:()=>pe.entities.Testimonial.filter({is_active:!0},"display_order",100)}),l=Tt({mutationFn:async({oldId:h,newId:u})=>{const f=[];h&&f.push(pe.entities.Testimonial.update(h,{is_featured:!1})),u&&f.push(pe.entities.Testimonial.update(u,{is_featured:!0})),await Promise.all(f)},onSuccess:()=>{s.invalidateQueries(["activeTestimonials"]),a(!1)}}),c=i.find(h=>h.is_featured),d=h=>{l.mutate({oldId:c==null?void 0:c.id,newId:h})};return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20 relative overflow-hidden",children:[n.jsx("div",{className:"absolute top-10 right-10 opacity-10",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"NCTA Logo",className:"w-64 h-64"})}),n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
2046,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(tm,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Testimonials"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"testimonials_hero_title",defaultValue:"Voices From the Awards",page:"Testimonials",description:"Main heading on Testimonials page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed",children:n.jsx(ht,{contentKey:"testimonials_hero_subtitle",defaultValue:"Hear from past winners, finalists, sponsors, and attendees about their experience with the National Charity Today Awards.",page:"Testimonials",description:"Hero subtitle on Testimonials page",type:"paragraph"})})]})})]}),c&&n.jsx("section",{className:"py-12",children:n.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:n.jsxs(_e,{className:"border-none shadow-2xl bg-white relative",children:[e&&n.jsx("div",{className:"absolute top-4 right-4 z-10",children:r?n.jsxs("div",{className:"flex items-center gap-2 bg-white p-2 rounded-lg shadow-lg",children:[n.jsxs(Qt,{value:c.id,onValueChange:d,children:[n.jsx(Kt,{className:"w-64",children:n.jsx(Xt,{placeholder:"Select testimonial"})}),n.jsx(Gt,{children:i.map(h=>n.jsxs(Ae,{value:h.id,children:[h.name," - ",h.organization]},h.id))})]}),n.jsx(me,{variant:"ghost",size:"sm",onClick:()=>a(!1),children:"Cancel"})]}):n.jsxs(me,{variant:"outline",size:"sm",onClick:()=>a(!0),className:"bg-white hover:bg-gray-50",children:[n.jsx(Gw,{className:"w-4 h-4 mr-2"}),"Change Featured"]})}),n.jsx(Ce,{className:"p-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx(tm,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsxs("blockquote",{className:"text-2xl md:text-3xl font-light text-gray-700 mb-8 leading-relaxed italic",children:['"',c.quote,'"']}),n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[c.image_url&&n.jsx("img",{src:c.image_url,alt:c.name,className:"w-20 h-20 rounded-full object-cover border-4 border-accent-gold"}),n.jsxs("div",{className:"text-left",children:[n.jsx("p",{className:"text-xl font-bold text-primary-navy",children:c.name}),c.role&&n.jsx("p",{className:"text-accent-gold font-medium",children:c.role}),c.organization&&n.jsx("p",{className:"text-gray-600 text-sm",children:c.organization}),n.jsxs("div",{className:"flex gap-2 mt-2 flex-wrap",children:[c.category&&n.jsx(dt,{className:"bg-primary-navy/10 text-primary-navy capitalize",children:c.category}),c.awards&&c.awards.length>0&&c.awards.map((h,u)=>n.jsx(dt,{className:"bg-accent-gold text-primary-navy",children:h},u)),c.year&&n.jsx(dt,{variant:"outline",children:c.year})]})]})]})]})})]})})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o?n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(h=>n.jsx(_e,{className:"animate-pulse",children:n.jsxs(Ce,{className:"p-8",children:[n.jsx("div",{className:"w-20 h-20 bg-gray-200 rounded-full mx-auto mb-4"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mx-auto mb-2"}),n.jsx("div",{className:"h-4 bg-gray-200 rounded w-full mb-4"})]})},h))}):i.length===0?n.jsxs("div",{className:"text-center py-20",children:[n.jsx(tm,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("p",{className:"text-xl text-gray-600",children:"No testimonials found in this category."})]}):n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map((h,u)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:u*.1},viewport:{once:!0},children:n.jsx(_e,{className:"h-full hover:shadow-2xl transition-all duration-300 border-none shadow-lg bg-white",children:n.jsxs(Ce,{className:"p-8",children:[h.image_url&&n.jsx("div",{className:"flex justify-center mb-6",children:n.jsx("img",{src:h.image_url,alt:h.name,className:"w-24 h-24 rounded-full object-cover border-4 border-accent-gold 
2046shadow-lg"})}),n.jsxs("div",{className:"text-center mb-6",children:[n.jsx(tm,{className:"w-8 h-8 text-accent-gold mx-auto mb-4"}),n.jsxs("blockquote",{className:"text-gray-700 italic leading-relaxed mb-6",children:['"',h.quote,'"']})]}),n.jsxs("div",{className:"text-center border-t border-gray-100 pt-6",children:[n.jsx("h3",{className:"font-bold text-primary-navy text-lg mb-1",children:h.name}),h.role&&n.jsx("p",{className:"text-accent-gold font-semibold text-sm mb-1",children:h.role}),h.organization&&n.jsx("p",{className:"text-gray-600 text-sm mb-3",children:h.organization}),n.jsxs("div",{className:"flex justify-center flex-wrap gap-2",children:[h.category&&n.jsx(dt,{className:"bg-primary-navy/10 text-primary-navy capitalize",children:h.category}),h.awards&&h.awards.length>0&&h.awards.map((f,m)=>n.jsx(dt,{className:"bg-accent-gold text-primary-navy",children:f},m)),h.year&&n.jsx(dt,{variant:"outline",children:h.year})]})]})]})})},h.id))})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(bn,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl font-bold mb-4 text-white",children:n.jsx(ht,{contentKey:"testimonials_cta_title",defaultValue:"Be Part of This Legacy",page:"Testimonials",description:"CTA section title on Testimonials page",type:"heading",className:"text-white"})}),n.jsx("p",{className:"text-xl text-white/90 mb-8 leading-relaxed",children:n.jsx(ht,{contentKey:"testimonials_cta_subtitle",defaultValue:"Join the prestigious community of award winners and nominees making a difference across the UK charity sector.",page:"Testimonials",description:"CTA section subtitle on Testimonials page",type:"paragraph",className:"text-white/90"})}),n.jsx("a",{href:"/Nominations",children:n.jsx("button",{className:"bg-white hover:bg-gray-100 text-primary-navy font-semibold px-10 py-6 text-lg rounded-lg shadow-2xl hover:scale-105 transition-all duration-300 [&:hover]:text-primary-navy",children:"Submit Your Nomination"})})]})})})})]})}function WPe(){const e=[{icon:ms,label:"13 Flexible Meeting Rooms"},{icon:lZ,label:"Indoor Swimming Pool"},{icon:CX,label:"Fully Equipped Gym"},{icon:Ia,label:"Spa & Beauty Treatments"},{icon:Qy,label:"On-site Restaurant"},{icon:gy,label:"Free On-site Parking"},{icon:dZ,label:"Complimentary WiFi"},{icon:ki,label:"AA 4-Star Hotel"}],t=["Banqueting suite with space for up to 450 guests","Set in beautifully landscaped gardens","Just 5 minutes from Peterborough city centre","Close to A1(M) and A47 for easy access","Direct train to London in under 45 minutes","Modern facilities with air conditioning","Professional event management team","Ample parking with EV charging stations"];return n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsxs("section",{className:"relative bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-20",children:[n.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://digital.ihg.com/is/image/ihg/holiday-inn-peterborough-6614438035-4x3')] bg-cover bg-center"}),n.jsx("div",{className:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm border border-white/30 rounded-full px-4 py-2 mb-6",children:[n.jsx(Xu,{className:"w-4 h-4 text-white"}),n.jsx("span",{className:"text-sm font-medium text-white",children:"Awards Ceremony Venue"})]}),n.jsx("h1",{className:"text-4xl lg:text-6xl font-bold mb-6",children:n.jsx(ht,{contentKey:"venue_hero_title",defaultValue:"Holiday Inn Peterborough West",page:"Venue",description:"Main heading on Venue page",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 leading-relaxed mb-6",children:n.jsx(ht,{contentKey:"venue_hero_subtitle",defaultValue:"A modern AA 4-star hotel providing the perfect setting for the National Charity Today Awards™ ceremony",page:"Venue",description:"Hero subtitle on Venue page",type:"paragraph"})}),n.jsxs("div",{className:"flex items-center justify-center gap-2 text-accent-gold",children:[n.jsx(ki,{className:"w-5 h-5 fill-current"}),n.jsx(ki,{className:"w-5 h-5 fill-current"}),n.jsx(ki,{className:"w-5 h-5 fill-current"}),n.jsx(ki,{className:"w-5 h-5 fill-current"}),n.jsx("span",{className:"text-white/90 ml-2",children:"4.4 Rating (1,779 reviews)"})]})]})})]}),n.jsx("section",{className:"py-12 -mt-16 relative z-10",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[n.jsx(lt.div,{initial:{opacity:0,y:20}
2046,animate:{opacity:1,y:0},transition:{delay:.1},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center shadow-lg",children:n.jsx(Xu,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("h3",{className:"font-semibold text-gray-600 text-sm mb-1",children:"Address"}),n.jsx("div",{className:"text-lg font-bold text-primary-navy mb-1",children:"Thorpe Wood"}),n.jsx("p",{className:"text-sm text-gray-500",children:"Peterborough, PE3 6SG"})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center shadow-lg",children:n.jsx(Kw,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("h3",{className:"font-semibold text-gray-600 text-sm mb-1",children:"Phone"}),n.jsx("a",{href:"tel:+441733289988",className:"text-lg font-bold text-primary-navy hover:text-accent-gold transition-colors",children:"+44 1733 289988"})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:n.jsx(_e,{className:"bg-white border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center shadow-lg",children:n.jsx(Xr,{className:"w-8 h-8 text-accent-gold"})}),n.jsx("h3",{className:"font-semibold text-gray-600 text-sm mb-1",children:"Email"}),n.jsx("a",{href:"mailto:[email protected]",className:"text-sm font-bold text-primary-navy hover:text-accent-gold transition-colors break-all",children:"[email protected]"})]})})})]})})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[n.jsx(lt.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:n.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl",children:[n.jsx("img",{src:"https://digital.ihg.com/is/image/ihg/holiday-inn-peterborough-9840769799-4x3",alt:"Holiday Inn Peterborough West Event Space",className:"w-full h-[400px] object-cover"}),n.jsx("div",{className:"absolute top-4 right-4 bg-accent-gold text-primary-navy px-4 py-2 rounded-full font-bold shadow-lg",children:"AA 4-Star"})]})}),n.jsxs(lt.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-6",children:n.jsx(ht,{contentKey:"venue_location_title",defaultValue:"Perfectly Located & Easily Accessible",page:"Venue",description:"Section title - location",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-700 mb-6 leading-relaxed",children:n.jsx(ht,{contentKey:"venue_location_desc1",defaultValue:"The Holiday Inn Peterborough West is a modern AA 4-star hotel set in beautifully landscaped gardens, offering the perfect blend of contemporary elegance and timeless charm for our prestigious awards ceremony.",page:"Venue",description:"Location section - first paragraph",type:"paragraph"})}),n.jsx("p",{className:"text-lg text-gray-700 mb-6 leading-relaxed",children:n.jsx(ht,{contentKey:"venue_location_desc2",defaultValue:"Located just 5 minutes from Peterborough city centre and with excellent transport links, the hotel features a magnificent banqueting suite capable of hosting up to 450 guests, making it the ideal venue for celebrating excellence in the UK charity sector.",page:"Venue",description:"Location section - second paragraph",type:"paragraph"})}),n.jsx("div",{className:"space-y-3",children:t.slice(0,4).map((r,a)=>n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Pm,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{className:"text-gray-700",children:r})]},a))})]})]})})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"venue_amenities_title",defaultValue:"World-Class Facilities",page:"Venue",description:"Amenities section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600",children:n.jsx(ht,{contentKey:"venue_amenities_desc",defaultValue:"Everything you need for an exceptional awards ceremony experience",page:"Venue",description:"Amenities section subtitle",type:"paragraph"})})]}),n.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((r,a)=>n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{delay:a*.05},viewport:{once:!0},children:n.jsx(_e,{className:"border-none shadow-lg hover:shadow-xl transition-all duration-300 group",children:n.jsxs(Ce,{className:"p-6 text-center",children:[n.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center group-hover:scale-110 transition-transform duration-300",children:n.jsx(r.icon,{className:"w-7 h-7 text-accent-gold"})}),n.jsx("p",{className:"text-sm font-semibold text-gray-700",children:r.label})]})})},a))})]})}),n.jsx("section",{className:"py-16",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"venue_transport_title",defaultValue:"How to Get There",page:"Venue",description:"Transport section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600",children:n.jsx(ht,{contentKey:"venue_transport_desc",defaultValue:"Excellent transport links make the venue easily accessible",page:"Venue",description:"Transport section subtitle",type:"paragraph"})})]}),n.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[n.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(gy,{className:"w-7 h-7 text-accent-gold"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-2xl font-bold text-primary-navy mb-2",children:"By Car"}),n.jsx("p",{className:"text-gray-600",children:"Easily accessible from major routes"})]})]}),n.jsxs("ul",{className:"space-y-3 text-gray-700",children:[n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(sN,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Close to A1(M) and A47 motorways"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(sN,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"5 minutes from Peterborough city centre"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(gy,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Ample free on-site parking available"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(Ia,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"EV charging stations on-site"})]})]})]})})}),n.jsx(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:.1},children:n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8",children:[n.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[n.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-primary-navy to-accent-gold rounded-2xl flex items-center justify-center flex-shrink-0",children:n.jsx(CT,{className:"w-7 h-7 text-accent-gold"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-2xl font-bold text-primary-navy mb-2",children:"By Train"}),n.jsx("p",{className:"text-gray-600",children:"Excellent rail connections"})]})]}),n.jsxs("ul",{className:"space-y-3 text-gray-700",children:[n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(CT,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Peterborough Station nearby"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(la,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Direct trains to London in under 45 minutes"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(sN,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Easy connections from across the UK"})]}),n.jsxs("li",{className:"flex items-start gap-2",children:[n.jsx(gy,{className:"w-5 h-5 text-accent-gold mt-0.5 flex-shrink-0"}),n.jsx("span",{children:"Short taxi ride from station to hotel"})]})]})]})})})]})]})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[n.jsxs("div",{className:"text-center mb-12",children:[n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"venue_map_title",defaultValue:"Find Us",page:"Venue",description:"Map section title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600",children:n.jsx(ht,{contentKey:"venue_map_address",defaultValue:"Holiday Inn Peterborough West, Thorpe Wood, Peterborough PE3 6SG",page:"Venue",description:"Venue full address",type:"paragraph"})})]}),n.jsx(_e,{className:"border-none shadow-2xl overflow-hidden",children:n.jsx(Ce,{className:"p-0",children:n.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2426.8843157769534!2d-0.2867687842385!3d52.58544037982!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x4877f1c7c7c7c7c7%3A0x4877f1c7c7c7c7c7!2sHoliday%20Inn%20Peterborough%20-%20West!5e0!3m2!1sen!2suk!4v1234567890123",width:"100%",height:"500",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Holiday Inn Peterborough West Location"})})}),n.jsx("div",{className:"text-center mt-8",children:n.jsx("a",{href:"https://www.google.com/maps/dir//Holiday+Inn+Peterborough+-+West,+Thorpe+Wood,+Peterborough+PE3 6SG",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-primary-navy hover:opacity-90 text-white",children:["Get Directions",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})})})]})}),n.jsx("section",{className:"py-16",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:n.jsx(_e,{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white border-none shadow-2xl",children:n.jsxs(Ce,{className:"p-12 text-center",children:[n.jsx(ms,{className:"w-16 h-16 mx-auto mb-6 text-white"}),n.jsx("h2",{className:"text-3xl lg:text-4xl font-bold mb-4 text-white",children:n.jsx(ht,{contentKey:"venue_booking_title",defaultValue:"Book Your Stay",page:"Venue",description:"Hotel booking CTA title",type:"heading"})}),n.jsx("p",{className:"text-xl text-white/90 mb-4 leading-relaxed",children:n.jsx(ht,{contentKey:"venue_booking_desc",defaultValue:"Attending the awards ceremony? Book your accommodation at the venue hotel.",page:"Venue",description:"Hotel booking CTA description",type:"paragraph"})}),n.jsx("p",{className:"text-white/80 mb-8",children:n.jsx(ht,{contentKey:"venue_booking_hours",defaultValue:"Room Check-In: 3:00 PM | Room Check-Out: 11:00 AM",page:"Venue",description:"Hotel check-in/out times",type:"paragraph"})}),n.jsx("a",{href:"https://www.ihg.com/holidayinn/hotels/gb/en/peterborough/ptrwe/hoteldetail",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-white hover:bg-gray-100 text-primary-navy font-bold px-10 py-6 text-lg shadow-2xl hover:scale-105 transition-all duration-300",children:["Book Hotel Online",n.jsx(Pl,{className:"ml-2 w-5 h-5"})]})})]})})})}),n.jsx("section",{className:"py-16 bg-white",children:n.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:n.jsxs(lt.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},children:[n.jsx(Ia,{className:"w-16 h-16 mx-auto mb-6 text-accent-gold"}),n.jsx("h2",{className:"text-3xl font-bold text-primary-navy mb-4",children:n.jsx(ht,{contentKey:"venue_tour_title",defaultValue:"Take a Virtual Tour",page:"Venue",description:"Virtual tour CTA title",type:"heading"})}),n.jsx("p",{className:"text-lg text-gray-600 mb-8 leading-relaxed",children:n.jsx(ht,{contentKey:"venue_tour_desc",defaultValue:"Explore the venue from the comfort of your chair with the interactive 360° virtual tour.",page:"Venue",description:"Virtual tour CTA description",type:"paragraph"})}),n.jsx("a",{href:"https://holidayinn.visualizer360.com/peterborough",target:"_blank",rel:"noopener noreferrer",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold shadow-lg",children:["Start Virtual Tour",n.jsx(Ci,{className:"ml-2 w-5 h-5"})]})})]})})})]})}const RY=Oz,IY=Mz,KPe=Lz,DY=L.forwardRef(({className:e,...t},r)=>n.jsx(mj,{className:Ln("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,ref:r}));
2046DY.displayName=mj.displayName;const GPe=lx("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),aE=L.forwardRef(({side:e="right",className:t,children:r,...a},s)=>n.jsxs(KPe,{children:[n.jsx(DY,{}),n.jsxs(pj,{ref:s,className:Ln(GPe({side:e}),t),...a,children:[n.jsxs(t6,{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-secondary",children:[n.jsx(Ei,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));aE.displayName=pj.displayName;const FY=({className:e,...t})=>n.jsx("div",{className:Ln("flex flex-col space-y-2 text-center sm:text-left",e),...t});FY.displayName="SheetHeader";const qY=L.forwardRef(({className:e,...t},r)=>n.jsx(gj,{ref:r,className:Ln("text-lg font-semibold text-foreground",e),...t}));qY.displayName=gj.displayName;const YPe=L.forwardRef(({className:e,...t},r)=>n.jsx(xj,{ref:r,className:Ln("text-sm text-muted-foreground",e),...t}));YPe.displayName=xj.displayName;function QPe(){const[e,t]=L.useState(!1),[r,a]=L.useState(!1),{data:s=[]}=xt({queryKey:["popupNotification"],queryFn:()=>pe.entities.PopupNotification.list("-created_date",1)}),i=s[0];L.useEffect(()=>{if(localStorage.getItem("popup_notification_seen")){a(!0);return}if(i!=null&&i.is_enabled&&!r){const c=setTimeout(()=>{t(!0)},1e3);return()=>clearTimeout(c)}},[i,r]);const o=()=>{t(!1),localStorage.setItem("popup_notification_seen","true"),a(!0)};return!(i!=null&&i.is_enabled)||r?null:n.jsx(Gm,{children:e&&n.jsxs(n.Fragment,{children:[n.jsx(lt.div,{initial:{opacity:0}
2046,animate:{opacity:1},exit:{opacity:0},onClick:o,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-[100]","aria-hidden":"true"}),n.jsx("div",{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"popup-title","aria-describedby":"popup-description",children:n.jsx(lt.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{type:"spring",duration:.5},className:"w-full max-w-lg",children:n.jsxs("div",{className:"relative bg-gradient-to-br from-white to-gray-50 rounded-3xl shadow-2xl overflow-hidden border-4 border-accent-gold",children:[n.jsx("button",{onClick:o,"aria-label":"Close notification",className:"absolute top-6 right-6 z-10 w-12 h-12 bg-gray-100 hover:bg-gray-200 rounded-full flex items-center justify-center transition-all hover:rotate-90 shadow-lg focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2",children:n.jsx(Ei,{className:"w-6 h-6 text-gray-700","aria-hidden":"true"})}),n.jsx("div",{className:"h-3 bg-gradient-to-r from-accent-gold via-yellow-400 to-accent-gold"}),n.jsxs("div",{className:"relative p-10 text-center",children:[n.jsx("div",{className:"flex justify-center mb-6",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-48 h-48 object-contain drop-shadow-2xl"})}),n.jsx("h2",{id:"popup-title",className:"text-4xl sm:text-5xl font-bold text-primary-navy mb-6 leading-tight tracking-tight",children:i.title}),n.jsx("p",{id:"popup-description",className:"text-lg sm:text-xl text-gray-600 mb-8 leading-relaxed font-light max-w-2xl mx-auto",children:i.message}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(Rt,{to:Ct("Nominations"),onClick:o,className:"block",children:n.jsx(me,{size:"lg",className:"w-full bg-accent-gold hover:bg-[#d4b860] text-primary-navy font-bold px-8 py-6 text-lg shadow-lg transition-all hover:shadow-xl",children:i.button_text})}),i.show_secondary_button&&n.jsx(Rt,{to:Ct(i.secondary_button_link),onClick:o,className:"block",children:n.jsx(me,{size:"lg",variant:"outline",className:"w-full border-2 border-primary-navy text-primary-navy hover:bg-primary-navy hover:text-white font-semibold px-8 py-6 text-lg transition-all",children:i.secondary_button_text})})]})]}),n.jsx("div",{className:"h-3 bg-gradient-to-r from-accent-gold via-yellow-400 to-accent-gold"})]})})})]})})}function XPe(){return n.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-[9999] focus:px-6 focus:py-3 focus:bg-accent-gold focus:text-primary-navy focus:font-bold focus:rounded-lg focus:shadow-xl focus:outline-none focus:ring-4 focus:ring-accent-gold/50",children:"Skip to main content"})}function JPe({isAdmin:e}){const t=Rl(),r=y3(),[a,s]=L.useState(!1),i=[{name:"Home",path:Ct("Home"),icon:zX},{name:"Nominate",path:Ct("Nominations"),icon:bn},{name:"Schedule",path:Ct("Schedule"),icon:za}],o=()=>{window.scrollTo({top:0,behavior:"smooth"})},l=[{name:"Home",path:Ct("Home")},{name:"Nominations",path:Ct("Nominations")},{name:"Categories",path:Ct("Categories")},{name:"Past Winners",path:Ct("PastWinners")},{name:"Schedule",path:Ct("Schedule")},{name:"Sponsors",path:Ct("Sponsors")},{name:"News",path:Ct("News")},{name:"FAQs",path:Ct("FAQs")},{name:"Contact",path:Ct("Contact")}],c=d=>t.pathname===d;return n.jsx(n.Fragment,{children:n.jsx("nav",{className:"fixed bottom-0 left-0 right-0 border-t shadow-2xl z-50 lg:hidden backdrop-blur-md",style:{paddingBottom:"env(safe-area-inset-bottom)",backgroundColor:"#06053e",borderTopColor:"#dec069"},"aria-label":"Mobile navigation",children:n.jsxs("div",{className:"flex justify-around items-center h-16",children:[i.map(d=>{const h=d.icon,u=c(d.path);return n.jsxs("button",{onClick:()=>{u?o():r(d.path)},className:"flex flex-col items-center justify-center flex-1 h-full transition-colors",style:{color:u?"#dec069":"rgba(255, 255, 255, 0.7)"},"aria-label":d.name,"aria-current":u?"page":void 0,children:[n.jsx(h,{className:"w-6 h-6 mb-1"}),n.jsx("span",{className:"text-xs font-medium",children:d.name})]},d.name)}),n.jsxs(RY,{open:a,onOpenChange:s,children:[n.jsx(IY,{asChild:!0,children:n.jsxs("button",{className:"flex flex-col items-center justify-center flex-1 h-full transition-colors",style:{color:a?"#dec069":"rgba(255, 255, 255, 0.7)"},"aria-label":"Menu",children:[a?n.jsx(Ei,{className:"w-6 h-6 mb-1"}):n.jsx(Fq,{className:"w-6 h-6 mb-1"}),n.jsx("span",{className:"text-xs font-medium",children:"Menu"})]})}),n.jsxs(aE,{side:"bottom",className:"h-[80vh] rounded-t-3xl border-t-4 border-accent-gold p-0 [&>button]:text-white [&>button]:hover:text-accent-gold [&>button]:min-h-[44px] [&>button]:min-w-[44px] [&>button]:flex [&>button]:items-center [&>button]:justify-center",style:{backgroundColor:"#06053e"},children:[n.jsx(FY,{className:"px-6 pt-6 pb-4 border-b border-white/10",children:n.jsx(qY,{className:"text-2xl font-bold text-white",children:"Navigation"})}
2046),n.jsx("div",{className:"overflow-y-auto h-[calc(100%-80px)] px-4 py-4",children:n.jsx("div",{className:"space-y-2",children:l.map(d=>{const h=c(d.path);return n.jsxs(Rt,{to:d.path,onClick:()=>s(!1),className:"flex items-center justify-between p-4 rounded-xl transition-all",style:{backgroundColor:h?"#dec069":"rgba(255, 255, 255, 0.05)",color:h?"#06053e":"white"},children:[n.jsx("span",{className:"text-lg font-medium",children:d.name}),n.jsx(Em,{className:"w-5 h-5"})]},d.name)})})})]})]})]})})})}function ZPe(){const e=y3(),t=Rl();return[Ct("Home"),Ct("Nominations"),Ct("Schedule")].includes(t.pathname)?null:n.jsxs("button",{onClick:()=>e(-1),className:"lg:hidden flex items-center gap-1 text-primary-navy hover:opacity-70 transition-opacity",style:{color:"var(--primary-navy)"},"aria-label":"Go back",children:[n.jsx(Ww,{className:"w-6 h-6"}),n.jsx("span",{className:"text-sm font-medium",children:"Back"})]})}function eEe({children:e}){const t=Rl();return n.jsx(Gm,{mode:"wait",children:n.jsx(lt.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3,ease:"easeInOut"},children:e},t.pathname)})}function tEe({children:e,onRefresh:t}){const r=L.useRef(null),[a,s]=L.useState(!1),[i,o]=L.useState(0),l=L.useRef(0),c=L.useRef(!1),[d,h]=L.useState(!1);L.useEffect(()=>{(()=>{h("ontouchstart"in window||navigator.maxTouchPoints>0)})()},[]);const u=b=>{window.scrollY===0?(c.current=!0,l.current=b.touches[0].clientY):c.current=!1},f=b=>{if(!c.current||a)return;const y=b.touches[0].clientY-l.current;y>0&&o(Math.min(y,120))},m=async()=>{if(!(!c.current||a))if(i>60){s(!0),o(80);try{await(t==null?void 0:t())}catch(b){console.error("Refresh error:",b)}finally{setTimeout(()=>{o(0),s(!1)},500)}}else o(0)};return d?n.jsx("div",{ref:r,onTouchStart:u,onTouchMove:f,onTouchEnd:m,className:"relative overflow-hidden",children:n.jsx(lt.div,{animate:{y:i},transition:{type:"spring",stiffness:200,damping:20},children:e})}):n.jsx(n.Fragment,{children:e})}function nEe(){const[e,t]=L.useState([]),[r,a]=L.useState(!0),[s,i]=L.useState(null),o=async()=>{try{const h=await pe.entities.SystemAlert.filter({is_resolved:!1},"-created_date",50);t(h)}catch(h){console.error("Failed to load system alerts:",h)}};L.useEffect(()=>{o();const h=setInterval(o,6e4);return()=>clearInterval(h)},[]);const l=async h=>{i(h.id);try{const u=await pe.auth.me();await pe.entities.SystemAlert.update(h.id,{is_resolved:!0,resolved_by:(u==null?void 0:u.email)||"admin",resolved_at:new Date().toISOString()}),t(f=>f.filter(m=>m.id!==h.id))}catch(u){console.error("Failed to resolve alert:",u)}i(null)},c=async()=>{try{const h=await pe.auth.me();await Promise.all(e.map(u=>pe.entities.SystemAlert.update(u.id,{is_resolved:!0,resolved_by:(h==null?void 0:h.email)||"admin",resolved_at:new Date().toISOString()}))),t([])}catch(h){console.error("Failed to resolve all alerts:",h)}};if(e.length===0)return null;const d=e.filter(h=>h.severity==="critical").length;return n.jsxs("div",{className:"w-full bg-red-600 border-b-4 border-red-800 shadow-2xl z-50",children:[n.jsxs("div",{className:"flex items-center justify-between px-4 py-3 cursor-pointer",onClick:()=>a(!r),children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"animate-pulse",children:n.jsx(eo,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-white font-bold text-lg",children:["🚨 ",e.length," SYSTEM ALERT",e.length>1?"S":""," REQUIRE ATTENTION"]}),d>0&&n.jsxs("span",{className:"ml-3 bg-white text-red-700 text-xs font-bold px-2 py-0.5 rounded-full",children:[d," CRITICAL"]})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(me,{size:"sm",variant:"outline",className:"border-white text-white hover:bg-red-700 hover:text-white text-xs",onClick:h=>{h.stopPropagation(),c()},children:[n.jsx(Vy,{className:"w-3 h-3 mr-1"}),"Dismiss All"]}),r?n.jsx(Y0,{className:"w-5 h-5 text-white"}):n.jsx(Wm,{className:"w-5 h-5 text-white"})]})]}),r&&n.jsx("div",{className:"px-4 pb-4 space-y-2 max-h-72 overflow-y-auto",children:e.map(h=>{var u;return n.jsxs("div",{className:"bg-white/10 border border-white/30 rounded-lg p-3 flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:`text-xs font-bold px-2 py-0.5 rounded-full ${h.severity==="critical"?"bg-red-900 text-white":h.severity==="warning"?"bg-yellow-500 text-black":"bg-blue-500 text-white"}`,children:(u=h.severity)==null?void 0:u.toUpperCase()}),n.jsx("span",{className:"text-white font-semibold text-sm",children:h.title}),n.jsx("span",{className:"text-red-200 text-xs ml-auto",children:new Date(h.created_date).toLocaleStr
2046ing("en-GB")})]}),h.related_entity_info&&n.jsxs("p",{className:"text-red-100 text-xs mb-1",children:[n.jsx("strong",{children:"Nomination:"})," ",h.related_entity_info]}),n.jsx("p",{className:"text-red-100 text-xs truncate",children:h.message}),h.function_name&&n.jsxs("p",{className:"text-red-200 text-xs mt-1",children:["Function: ",n.jsx("code",{className:"bg-red-900/50 px-1 rounded",children:h.function_name})]})]}),n.jsx(me,{size:"sm",variant:"ghost",className:"text-white hover:bg-red-700 hover:text-white shrink-0",disabled:s===h.id,onClick:()=>l(h),children:n.jsx(Ei,{className:"w-4 h-4"})})]},h.id)})})]})}function rEe({children:e,currentPageName:t}){const r=Rl(),[a,s]=L.useState(!1),[i,o]=L.useState(null),[l,c]=L.useState(null),[d,h]=L.useState(!0),[u,f]=L.useState(!1),[m,b]=L.useState({});L.useEffect(()=>{(async()=>{try{const A=await pe.auth.me();o(A)}catch{o(null)}})()},[]),L.useEffect(()=>{let S=!1;const A=async()=>{try{const[M,k]=await Promise.all([pe.entities.LandingPageConfig.list("-created_date",1),pe.entities.PageVisibility.list()]);if(S)return;M&&M.length>0&&c(M[0]);const P={};k.forEach(O=>{P[O.page_name]={is_visible:O.is_visible??!0,show_in_navigation:O.show_in_navigation??!0}}),b(P)}catch(M){console.error("Error fetching settings:",M)}S||h(!1)},T=setTimeout(()=>{S||h(!1)},3e3);A().finally(()=>clearTimeout(T));const R=pe.entities.PageVisibility.subscribe(()=>{A()});return()=>{S=!0,R()}},[]),L.useEffect(()=>{window.scrollTo(0,0)},[r.pathname]),L.useEffect(()=>{const S=document.querySelector("link[rel~='icon']")||document.createElement("link");S.type="image/png",S.rel="icon",S.href="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",document.head.appendChild(S)},[]),L.useEffect(()=>{const S={Home:"Home",Nominations:"Submit Nomination",Categories:"Award Categories",PastWinners:"Past Winners",Schedule:"Event Schedule",Sponsors:"Our Sponsors",News:"News & Updates",NewsDetail:"News Article",FAQs:"Frequently Asked Questions",Press:"Press & Media",Contact:"Contact Us",PurchaseTable:"Purchase Table",ManageGuests:"Manage Guest Details",NominationJourney:"The Nomination Journey",JamesESmithAward:"James E. Smith Award",Testimonials:"Testimonials",Venue:"Venue Information",Gallery:"Photo Gallery",SinclairMethodUK:"Our Main Sponsor",CategorySponsorship:"Category Sponsorship",History:"History",Founder:"The Founder",Terms:"Terms & Conditions",PrivacyPolicy:"Privacy Policy",PeoplesChoiceVote:"People's Choice Award",Profile:"My Profile",SponsorDetail:"Sponsor Details"},A=new Set(["AdminDashboard","FinanceDashboard","SEOManager","MasterCalendar","SocialMediaPlanning","SponsorProspectsManagement","CheckIn","ManageGuests","PrintSchedule","DrinksSponsor","MenuSelection","MenuSelectionAdmin"]),T=r.pathname.replace(/^\//,"").split("/")[0],R=A.has(T);let M=document.querySelector('meta[name="robots"]');if(R?(M||(M=document.createElement("meta"),M.setAttribute("name","robots"),document.head.appendChild(M)),M.setAttribute("content","noindex, nofollow")):M&&M.remove(),R)document.title="National Charity Today Awards™";else{const k=S[t]||t||"Home";document.title=`${k} | National Charity Today Awards™`}},[t,r.pathname]);const g=t==="AdminDashboard",y=(i==null?void 0:i.role)==="admin",x=!d&&(l==null?void 0:l.is_active)&&!g&&!y,j=[{name:"Home",path:Ct("Home"),pageName:"Home"},{name:"Nominations",path:Ct("Nominations"),pageName:"Nominations"},{name:"Categories",path:Ct("Categories"),pageName:"Categories"},{name:"Past Winners",path:Ct("PastWinners"),pageName:"PastWinners"},{name:"Schedule",path:Ct("Schedule"),pageName:"Schedule"},{name:"Sponsors",path:Ct("Sponsors"),pageName:"Sponsors"},{name:"News",path:Ct("News"),pageName:"News"},{name:"FAQs",path:Ct("FAQs"),pageName:"FAQs"},{name:"Press",path:Ct("Press"),pageName:"Press"},{name:"Contact",path:Ct("Contact"),pageName:"Contact"}].filter(S=>{const A=m[S.pageName];return A?A.show_in_navigation!==!1:!0}),N=S=>{const A=m[S];return A?A.show_in_navigation!==!1:!0},_=S=>r.pathname===S;if(d)return n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-primary-navy border-t-transparent"})});if(x)return n.jsx(OY,{config:l});if(!y&&t){const S=m[t];if(S&&S.is_visible===!1)return n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-gray-50 to-blue-50 p-4",children:n.jsxs("div",{className:"text-center max-w-md",children:[n.jsx(bn,{className:"w-24 h-24 mx-auto mb-6 text-gray-300"}),n.jsx("h1",{className:"text-3xl font-bold text-primary-navy mb-3",children:"Page Not Available"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"This page is currently not accessible. Please check back later."}),n.jsx(Rt,{to:Ct("Home"),children:n.jsx(me,{className:"bg-primary-navy hover:opacity-90",children:"Return to Home"})})]})})}return n.jsxs("div",{className:"min-h-screen overflow-x-hidden mobile-bottom-nav-spacing",style:{backgroundColor:"var(--bg-primary)"},children:[n.jsx(XPe,{}),n.jsx(QPe,{}),n.jsx(LY,{open:u,onOpenChange:f}),n.jsx("style",{children:`
2047        :root {
2048          --primary-navy: #06053e;
2049          --accent-gold: #dec069;
2050          --primary-navy-light: #0f0d5e;
2051          --accent-gold-dark: #c9a84f;
2052        }
2053        
2054        .bg-primary-navy {
2055          background-color: #06053e !important;
2056        }
2057        
2058        .bg-accent-gold {
2059          background-color: #dec069 !important;
2060        }
2061        
2062        .text-primary-navy {
2063          color: #06053e !important;
2064        }
2065        
2066        .text-accent-gold {
2067          color: #dec069 !important;
2068        }
2069        
2070        .border-accent-gold {
2071          border-color: #dec069 !important;
2072        }
2073        
2074        .hover\\:bg-primary-navy:hover {
2075          background-color: #06053e !important;
2076        }
2077        
2078        .hover\\:bg-accent-gold:hover {
2079          background-color: #dec069 !important;
2080        }
2081        
2082        .from-primary-navy {
2083          --tw-gradient-from: #06053e !important;
2084        }
2085        
2086        .to-primary-navy {
2087          --tw-gradient-to: #06053e !important;
2088        }
2089        
2090        .from-accent-gold {
2091          --tw-gradient-from: #dec069 !important;
2092        }
2093        
2094        .to-accent-gold {
2095          --tw-gradient-to: #dec069 !important;
2096        }
2097
2098        @keyframes scroll-left {
2099          0% {
2100            transform: translateX(0);
2101          }
2102          100% {
2103            transform: translateX(-50%);
2104          }
2105        }
2106        
2107        .animate-scroll-left {
2108          animation: scroll-left 40s linear infinite;
2109        }
2110        
2111        .animate-scroll-left:hover {
2112          animation-play-state: paused;
2113        }
2114      `}),n.jsx("header",{className:"sticky top-0 z-50 border-b shadow-sm safe-area-top",style:{backgroundColor:"var(--bg-primary)",borderBottomColor:"var(--border-color)"},role:"banner",children:n.jsx("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8","aria-label":"Main navigation",children:n.jsxs("div",{className:"flex justify-between items-center h-16 lg:h-20",children:[t!=="Home"&&n.jsx(ZPe,{}),n.jsxs(Rt,{to:Ct("Home"),className:"flex items-center gap-2 lg:gap-3 group",children:[n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"h-12 lg:h-16 w-auto object-contain transition-transform group-hover:scale-105"}),n.jsxs("div",{className:"hidden sm:block",children:[n.jsx("div",{className:"text-xl font-bold",style:{color:"#06053e"},children:"National Charity Today Awards™"}),n.jsx("div",{className:"text-xs text-gray-600 font-medium tracking-wide",children:"Celebrating Excellence in the UK Charity Sector"})]})]}),n.jsxs("div",{className:"hidden lg:flex items-center gap-1",children:[j.slice(0,6).map(S=>n.jsx(Rt,{to:S.path,"aria-current":_(S.path)?"page":void 0,style:{backgroundColor:_(S.path)?"#06053e":"transparent",color:_(S.path)?"white":"#374151"},className:"px-4 py-2 rounded-lg text-sm font-medium transition-all duration-200 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2",children:S.name},S.name)),n.jsx("div",{className:"ml-4",children:n.jsx(Rt,{to:Ct("Nominations"),children:n.jsx("button",{"aria-label":"Submit your nomination for the 2026 awards",style:{backgroundColor:"#dec069",color:"#06053e",fontWeight:"bold",fontSize:"14px",padding:"10px 20px",borderRadius:"8px",border:"2px s
2114olid #06053e"},className:"shadow-lg hover:shadow-xl transition-all duration-300 hover:bg-[#e8ca7a] [&:hover]:text-[#06053e] focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2",children:"Submit Nomination"})})})]}),n.jsxs(RY,{open:a,onOpenChange:s,children:[n.jsx(IY,{asChild:!0,className:"lg:hidden",children:n.jsx("button",{className:"p-2 focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 rounded","aria-label":"Open navigation menu","aria-expanded":a,children:n.jsx(Fq,{className:"h-6 w-6",style:{color:"#06053e"}})})}),n.jsx(aE,{side:"right",className:"w-[300px] sm:w-[400px] overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col gap-4 mt-8 pb-8","aria-label":"Mobile navigation",children:[j.map(S=>n.jsx(Rt,{to:S.path,onClick:()=>s(!1),"aria-current":_(S.path)?"page":void 0,style:{backgroundColor:_(S.path)?"#06053e":"transparent",color:_(S.path)?"white":"#374151"},className:"px-4 py-3 rounded-lg text-base font-medium transition-colors hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2",children:S.name},S.name)),n.jsx(Rt,{to:Ct("Nominations"),onClick:()=>s(!1),children:n.jsx("button",{style:{backgroundColor:"#dec069",color:"#06053e",fontWeight:"bold",border:"2px solid #06053e",width:"100%",padding:"12px",borderRadius:"8px"},className:"hover:bg-[#e8ca7a] [&:hover]:text-[#06053e]",children:"Submit Nomination"})})]})})]})]})})}),y&&n.jsx(nEe,{}),n.jsx("main",{id:"main-content",role:"main",children:n.jsx(tEe,{onRefresh:()=>window.location.reload(),children:n.jsx(eEe,{children:e})})}),n.jsx(JPe,{isAdmin:y}),!g&&!r.pathname.includes("/purchasetable")&&!r.pathname.includes("/nominations")&&!r.pathname.includes("/categories")&&!r.pathname.includes("/pastwinners")&&!r.pathname.includes("/sponsors")&&!r.pathname.includes("/jamesesmithaward")&&!r.pathname.includes("/nominationjourney")&&!r.pathname.includes("/gallery")&&!r.pathname.includes("/news")&&!r.pathname.includes("/MenuSelection")&&!r.pathname.includes("/MenuSelectionAdmin")&&!r.pathname.includes("/contact")&&n.jsx(Rt,{to:Ct("PurchaseTable"),children:n.jsx(lt.div,{initial:{scale:0},animate:{scale:1},transition:{delay:1,type:"spring",stiffness:200},className:"hidden lg:block fixed bottom-24 right-8 z-40",children:n.jsxs(me,{size:"lg",className:"bg-accent-gold hover:bg-[#e8ca7a] text-primary-navy font-bold shadow-2xl px-6 py-6 text-base rounded-full flex items-center gap-2 border-2 border-primary-navy",children:[n.jsx(Jr,{className:"w-5 h-5"}),"Book Your Table"]})})}),n.jsx("footer",{className:"text-white mt-20 pb-20 lg:pb-0 safe-area-bottom",style:{backgroundColor:"var(--primary-navy)"},role:"contentinfo",children:n.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-8 gap-x-6 gap-y-10",children:[n.jsxs("div",{className:"md:col-span-3 lg:col-span-2 text-center md:text-left",children:[n.jsx("div",{className:"mb-6 flex justify-center md:justify-start",children:n.jsx("img",{src:"https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",alt:"National Charity Today Awards™",className:"w-full h-auto object-contain max-w-[220px]"})}),n.jsx("p",{className:"text-gray-300 text-sm leading-relaxed mb-6",children:"The UK's leading awards programme celebrating excellence, innovation, and impact in the charity sector."}),n.jsxs("div",{className:"flex gap-3 mb-6 justify-center md:justify-start",role:"list","aria-label":"Social media links",children:[n.jsx("a",{href:"https://facebook.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit our Facebook page",className:"w-10 h-10 bg-white/10 hover:bg-accent-gold rounded-full flex items-center justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 focus:ring-offset-primary-navy",children:n.jsx(Wy,{className:"w-5 h-5 text-white","aria-hidden":"true"})}),n.jsx("a",{href:"https://twitter.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit our Twitter page",className:"w-10 h-10 bg-white/10 hover:bg-accent-gold rounded-full flex items-center justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 focus:ring-offset-primary-navy",children:n.jsx(Yy,{className:"w-5 h-5 text-white","aria-hidden":"true"})}),n.jsx("a",{href:"https://linkedin.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit our LinkedIn page",className:"w-10 h-10 bg-white/10 hover:bg-accent-gold rounded-full flex items-center justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 focus:ring-offset-primary-navy",children:n.jsx(Yu,{className:"w-5 h-5 text-white","aria-hidden":"true"})}),n.jsx("a",{href:"https://instagram.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit our Instagram page",className:"w-10 h-10 bg-white/10 hover:bg-accent-gold rounded-full flex items-center justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 focus:ring-offset-primary-navy",children:n.jsx(l3,{className:"w-5 h-5 text-white","aria-hidden":"true"})}),n.jsx("a",{href:"https://youtube.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit our YouTube channel",className:"w-10 h-10 bg-white/10 hover:bg-accent-gold rounded-full flex items-center justify-center transition-colors focus:outline-none focus:ring-2 focus:ring-accent-gold focus:ring-offset-2 focus:ring-offset-primary-navy",children:n.jsx(d3,{className:"w-5 h-5 text-white","aria-hidden":"true"})})]}),(i==null?void 0:i.role)==="admin"&&n.jsx(Rt,{to:Ct("AdminDashboard"),
2114className:"block mb-3",children:n.jsxs(me,{variant:"outline",className:"w-full bg-white/10 border-accent-gold text-accent-gold hover:bg-accent-gold hover:text-primary-navy font-semibold",children:[n.jsx(ps,{className:"w-4 h-4 mr-2"}),"Admin Portal"]})}),(i==null?void 0:i.role)==="admin"&&n.jsx(Rt,{to:"/contractsettings",className:"block mb-3",children:n.jsxs(me,{variant:"outline",className:"w-full bg-white/10 border-accent-gold text-accent-gold hover:bg-accent-gold hover:text-primary-navy font-semibold",children:[n.jsx(pr,{className:"w-4 h-4 mr-2"}),"Contract Settings"]})}),(i==null?void 0:i.role)==="admin"&&n.jsx(Rt,{to:"/MenuSelectionAdmin",className:"block mb-3",children:n.jsxs(me,{variant:"outline",className:"w-full bg-white/10 border-accent-gold text-accent-gold hover:bg-accent-gold hover:text-primary-navy font-semibold",children:[n.jsx(pr,{className:"w-4 h-4 mr-2"}),"Gala Menu Admin"]})})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Nominations & Awards"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("Nominations")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Nominations"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Submit a Nomination"})}),N("Categories")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Categories"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Award Categories"})}),N("PeoplesChoiceVote")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("PeoplesChoiceVote"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"People's Choice Award"})}),N("NominationJourney")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("NominationJourney"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"The Nomination Journey"})}),N("JamesESmithAward")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("JamesESmithAward"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"James E. Smith Award"})})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Event & Ceremony"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("Schedule")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Schedule"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Event Schedule"})}),N("Venue")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Venue"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Venue Information"})}),N("Gallery")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Gallery"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Photo Gallery"})})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Winners & Recognition"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("PastWinners")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("PastWinners"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Past Winners"})}),N("Testimonials")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Testimonials"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Testimonials"})})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Bookings & Attendance"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("PurchaseTable")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("PurchaseTable"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Purchase Table"})}),N("ManageGuests")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("ManageGuests"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Manage Guest Details"})}),n.jsx("li",{children:n.jsx(Rt,{to:"/MenuSelection",className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Menu Selection"})})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Partners & Sponsorship"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("SinclairMethodUK")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("SinclairMethodUK"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Main Sponsor"})}),N("Sponsors")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Sponsors"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Our Sponsors"})}),N("CategorySponsorship")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("CategorySponsorship"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Category Sponsorship"})}),n.jsx("li",{children:n.jsx(Rt,{to:Ct("DrinksSponsor"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Official Drinks Sponsor"})})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"News & Media"}),n.jsxs("ul",{className:"space-y-3 text-sm mb-8",children:[N("News")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("News"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"News & Updates"})}),N("Press")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Press"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Press & Media"})})]}),n.jsx("h3",{className:"font-bold text-accent-gold mb-5 text-sm uppercase tracking-wider",children:"Support & Information"}),n.jsxs("ul",{className:"space-y-3 text-sm",children:[N("History")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("History"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"History"})}),N("Founder")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Founder"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"The Founder"})}),N("FAQs")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("FAQs"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"FAQs"})}),N("Contact")&&n.jsx("li",{children:n.jsx(Rt,{to:Ct("Contact"),className:"text-gray-300 hover:text-[#06053e] hover:bg-accent-gold transition-all block py-1 px-2 rounded",children:"Contact Us"})})]})]})]}),n.jsx("div",{className:"border-t border-white/10 mt-8 pt-8",children:n.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4",children:[n.jsxs("p",{className:"text-gray-400 text-sm text-center sm:text-left",children:["© ",new Date().getFullYear()," National Charity Today Awards™. All rights reserved. A Charity Today initiative."]}),n.jsxs("div",{className:"flex gap-4 text-sm",children:[n.jsx(Rt,{to:Ct("Terms"),className:"text-gray-400 hover:text-white transition-colors",children:"Terms & Conditions"}),n.jsx("span",{className:"text-gray-600",children:"•"}),n.jsx(Rt,{to:Ct("PrivacyPolicy"),className:"text-gray-400 hover:text-white transition-colors",children:"Privacy Policy"}),n.jsx("span",{className:"text-gray-600",children:"•"}),n.jsx("span",{className:"text-gray-400",children:"🔒 Protected Content"})]})]})})]})})]})}const aEe={AdminDashboard:O6e,Categories:L6e,CategorySponsorship:R6e,CheckIn:I6e,Contact:D6e,FAQs:q6e,FinanceDashboard:NY,Founder:B6e,Gallery:$6e,History:U6e,Home:V6e,JamesESmithAward:K6e,LandingPage:OY,ManageGuests:G6e,MasterCalendar:tY,News:Y6e,NewsDetail:MY,NominationJourney:Q6e,Nominations:kPe,PastWinners:PPe,PeoplesChoiceVote:EPe,Press:TPe,PrintSchedule:OPe,PrivacyPolicy:MPe,Profile:LPe,PurchaseTable:RPe,SEOManager:_Y,Schedule:IPe,SinclairMethodUK:DPe,SocialMediaPlanning:FPe,SponsorDetail:qPe,SponsorProspectsManagement:BPe,DrinksSponsor:UPe,Sponsors:zPe,Terms:VPe,Testimonials:HPe,Venue:WPe},BY={mainPage:"Home",Pages:aEe,Layout:rEe};function sEe(){const e=Rl(),{isAuthenticated:t}=k$(),{Pages:r,mainPage:a}=BY,s=a;return L.useEffect(()=>{var i;(i=window.parent)==null||i.postMessage({type:"app_changed_url",url:window.location.href},"*")},[e]),L.useEffect(()=>{const i=e.pathname;let o;if(i==="/"||i==="")o=s;else{const l=i.replace(/^\//,"").split("/")[0];o=Object.keys(r).find(h=>h.toLowerCase()===l.toLowerCase())||null}t&&o&&pe.appLogs.logUserInApp(o).catch(()=>{})},[e,t,r,s]),null}function iEe(){const[e,t]=L.useState({checking:!0,isAdmin:!1});return L.useEffect(()=>{(async()=>{try{const r=await pe.auth.me();t({checking:!1,isAdmin:(r==null?void 0:r.role)==="admin"})}catch{t({checking:!1,isAdmin:!1})}})()},[]),e.checking?n.jsx("div",{className:"min-h-screen flex items-center justify-center",children:n.jsx(Ky,{className:"w-8 h-8 animate-spin text-primary-navy"})}):e.isAdmin?n.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-10",children:[n.jsxs(Rt,{to:"/admindashboard",className:"inline-flex items-center text-sm text-gray-600 hover:text-primary-navy mb-6",children:[n.jsx(wm,{className:"w-4 h-4 mr-1.5"}),"Back to Admin Portal"]}),n.jsx("h1",{className:"text-3xl font-bold text-primary-navy mb-2",children:"Contract & Commercial Settings"}),n.jsx("p",{className:"text-gray-600 mb-8",children:"Control the revised nomination journey flag, commercial figures, deadlines, event info and Terms version."}),n.jsx(EY,{})]}):n.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 p-6",children:n.jsxs("div",{className:"text-center max-w-md",children:[n.jsx(ps,{className:"w-16 h-16 mx-auto mb-4 text-gray-300"}),n.jsx("h1",{className:"text-2xl font-bold text-primary-navy mb-2",children:"Admin only"}),n.jsx("p",{className:"text-gray-600",children:"You must be signed in as an admin to view this page."}),n.jsx(Rt,{to:"/",className:"inline-block mt-6",children:n.jsx(me,{className:"bg-primary-navy hover:opacity-90",children:"Return home"})})]})})}const oi={starters:[{value:"smoked_salmon_prawn_mango_salad",label:"Smoked 
2114salmon, prawn and mango salad (GF)"},{value:"vegetable_soup_roll",label:"Vegetable soup and roll"},{value:"twice_baked_cheddar_souffle",label:"Twice baked Cheddar cheese and chive soufflé with apple, walnut and red chard salad (V)"}],mains:[{value:"grilled_salmon_leeks_spinach",label:"Grilled salmon with leeks, spinach and beans, gratin potato and lobster sauce (GF)"},{value:"portobello_mushroom_steaks",label:"Portobello mushroom steaks with butterbean mash, sautéed leeks and spinach, roast carrots and red wine sauce (V, VE, GF)"},{value:"roast_chicken_fillet",label:"Roast chicken fillet with crushed new potatoes, carrots, fine beans and tarragon butter sauce (GF)"}],desserts:[{value:"sticky_toffee_pudding",label:"Sticky toffee pudding with toffee sauce and clotted cream ice cream (GF)"},{value:"warm_chocolate_fondant",label:"Warm chocolate fondant with chocolate sauce and salted caramel ice cream"},{value:"mango_passion_fruit_delice",label:"Mango and passion fruit delice with mango sauce and fresh strawberries"}]},oEe={smoked_salmon_prawn_mango_salad:"Smoked salmon, prawn and mango salad (GF)",vegetable_soup_roll:"Vegetable soup and roll",twice_baked_cheddar_souffle:"Twice baked Cheddar cheese and chive soufflé with apple, walnut and red chard salad (V)",grilled_salmon_leeks_spinach:"Grilled salmon with leeks, spinach and beans, gratin potato and lobster sauce (GF)",portobello_mushroom_steaks:"Portobello mushroom steaks with butterbean mash, sautéed leeks and spinach, roast carrots and red wine sauce (V, VE, GF)",roast_chicken_fillet:"Roast chicken fillet with crushed new potatoes, carrots, fine beans and tarragon butter sauce (GF)",sticky_toffee_pudding:"Sticky toffee pudding with toffee sauce and clotted cream ice cream (GF)",warm_chocolate_fondant:"Warm chocolate fondant with chocolate sauce and salted caramel ice cream",mango_passion_fruit_delice:"Mango and passion fruit delice with mango sauce and fresh strawberries"};function di(e){return oEe[e]||e||""}const lEe="https://qtrypzzcjebvfcihiynt.supabase.co/storage/v1/object/public/base44-prod/public/6903417e7dc050165abb6978/5627a5791_UKNCTA-Logo.png",cEe="#06053e",dEe="#dec069",zy=[{key:"full_name",label:"Guest Full Name"},{key:"email",label:"Email Address"},{key:"organisation",label:"Organisation"},{key:"booking_reference",label:"Booking Name or Reference"},{key:"table_number",label:"Table Number"},{key:"starter_choice",label:"Starter Choice",transform:di},{key:"main_choice",label:"Main Course Choice",transform:di},{key:"dessert_choice",label:"Dessert Choice",transform:di},{key:"has_dietary_requirements",label:"Allergy or Dietary Requirement",transform:e=>e?"Yes":"No"},{key:"dietary_details",label:"Full Dietary and Allergen Details"},{key:"acknowledgement",label:"Acknowledgement Recorded",transform:e=>e?"Yes":"No"},{key:"submitted_at",label:"Submission Date and Time",transform:a3},{key:"last_amended_at",label:"Last Amended Date and Time",transform:a3},{key:"submission_reference",label:"Unique Submission Reference"}];function a3(e){if(!e)return"";try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?"":t.toLocaleString("en-GB",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}}function uEe(e){if(!e)return"";try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?"":t.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}catch{return""}}function $Y(e){const t=e.replace("#","");return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}const c2=$Y(cEe),hEe=$Y(dEe);let Wb=null;async function fEe(){if(Wb!==null)return Wb;try{const e=await fetch(lEe);if(!e.ok)throw new Error("logo fetch failed");const t=await e.blob(),r=await new Promise((a,s)=>{const i=new FileReader;i.onloadend=()=>a(i.result),i.onerror=s,i.readAsDataURL(t)});return Wb=r,r}catch{return Wb=!1,!1}}async function bv(e,t,r){const a=e.internal.pageSize.getWidth(),s=20,i=await fEe();if(i)try{e.addImage(i,"PNG",40,s,46,46)}catch{}const o=e.splitTextToSize(t||"National Charity Today Awards™ Gala Lunc
2114h",a-100);e.setFont("helvetica","bold"),e.setFontSize(15),e.setTextColor(...c2),e.text(o,a-40,s+12,{align:"right"});const l=s+12+(o.length-1)*16;e.setFont("helvetica","normal"),e.setFontSize(11),e.setTextColor(120,120,120),e.text(r,a-40,l+16,{align:"right"});const c=Math.max(s+46,l+26);return e.setDrawColor(...hEe),e.setLineWidth(1.2),e.line(40,c,a-40,c),c+20}function wv(e){const t=e.internal.pageSize.getWidth(),r=e.internal.pageSize.getHeight(),a=e.internal.getNumberOfPages();for(let s=1;s<=a;s++){e.setPage(s),e.setFont("helvetica","normal"),e.setFontSize(8),e.setTextColor(150,150,150);const i=`Created ${uEe(new Date)}`;e.text(i,40,r-16),e.text(`Page ${s} of ${a}`,t-40,r-16,{align:"right"})}}function jv(){return new An({unit:"pt",format:"a4"})}async function mEe(e,t){const r=jv(),a=(t==null?void 0:t.event_name)||"National Charity Today Awards™ Gala Lunch";let s=await bv(r,a,"Guest Menu Confirmation");const i=r.internal.pageSize.getWidth(),o=50,l=i-50,c=(l-o)/2;r.setFont("helvetica","normal"),r.setFontSize(11),r.setTextColor(40,40,40);const d={sponsor:"Sponsor",supplier:"Supplier",guest_of_organisers:"Guest of Organisers",guest_of_finalist:"Guest of Finalist",finalist:"Finalist"},h=[["Reference",e.submission_reference],["Full name",e.full_name],["Email",e.email],["Organisation",e.organisation],["Attending as",d[e.attendance_capacity]||e.attendance_capacity||""],["Booked by",e.booked_by]];r.setFont("helvetica","bold"),r.text("Guest details",o,s),s+=16,r.setFont("helvetica","normal"),h.forEach(([w,j])=>{r.setTextColor(90,90,90),r.text(w,o,s),r.setTextColor(30,30,30);const N=r.splitTextToSize(String(j||""),c-10);r.text(N,o+150,s),s+=Math.max(16,N.length*13)});const u=l-o-150;s+=12,r.setFont("helvetica","bold"),r.setFontSize(11),r.setTextColor(30,30,30),r.text("Menu choices",o,s),s+=16;const f=[["Starter:",di(e.starter_choice)],["Main course:",di(e.main_choice)],["Dessert:",di(e.dessert_choice)]];r.setFont("helvetica","normal"),f.forEach(([w,j])=>{r.setTextColor(90,90,90),r.text(w,o,s),r.setTextColor(30,30,30);const N=r.splitTextToSize(String(j||""),u);r.text(N,o+150,s),s+=Math.max(18,N.length*14)}),s+=8,r.setFont("helvetica","bold"),r.setTextColor(30,30,30),r.text("Dietary information",o,s),s+=16,r.setFont("helvetica","normal");const m=e.has_dietary_requirements?"Yes — "+(e.dietary_details||""):"No dietary requirements declared",b=r.splitTextToSize(m,l-o);r.text(b,o,s),s+=b.length*14+12,r.setFont("helvetica","bold"),r.setFontSize(9);const y=r.splitTextToSize("If you have a food allergy, intolerance or other dietary requirement, you must inform the hotel directly upon arrival. The hotel is responsible for preparing and serving all food, including the management of allergens.",l-o-20),x=28+y.length*12;r.setFillColor(254,243,199),r.roundedRect(o,s,l-o,x,6,6,"F"),r.text("Important dietary and allergen notice",o+10,s+14),r.setFont("helvetica","normal"),r.text(y,o+10,s+28),wv(r),r.save(`Menu-Confirmation-${e.submission_reference||e.full_name||"guest"}.pdf`)}function ox(e,t,r,a,s){e.setFillColor(...c2),e.rect(t,r,s.reduce((o,l)=>o+l,0),18,"F"),e.setFont("helvetica","bold"),e.setFontSize(9),e.setTextColor(255,255,255);let i=t+4;return a.forEach((o,l)=>{e.text(o,i,r+12),i+=s[l]}),r+18}function sE(e,t,r,a,s,i){i?(e.setFillColor(254,226,226),e.rect(t,r,s.reduce((l,c)=>l+c,0),16,"F")):Math.floor(r/16)%2===0&&(e.setFillColor(245,247,250),e.rect(t,r,s.reduce((l,c)=>l+c,0),16,"F")),e.setFont("helvetica","normal"),e.setFontSize(9),e.setTextColor(40,40,40);let o=t+4;return a.forEach((l,c)=>{const d=e.splitTextToSize(String(l||""),s[c]-8);e.text(d.length>2?d.slice(0,2).concat(["…"]):d,o,r+11),o+=s[c]}),r+16}async function pEe(e,t){const r=jv(),a=(t==null?void 0:t.event_name)||"National Charity Today Awards™ Gala Lunch";let s=await bv(r,a,"Complete Guest Menu Report");const i=40;r.internal.pageSize.getWidth();const o=[120,160,110,100,30],l=["Guest","Organisation","Starter","Main / Dessert","Table"];s=ox(r,i,s,l,o),e.forEach(c=>{s>r.internal.pageSize.getHeight()-40&&(r.addPage(),s=50,s=ox(r,i,s,l,o)),s=sE(r,i,s,[c.full_name,c.organisation,di(c.starter_choice),di(c.main_choice)+" / "+di(c.dessert_choice),c.table_number||""],o,c.has_dietary_requirements)}),wv(r),r.save("Complete-Guest-Menu-Report.pdf")}async function gEe(e,t){const r=jv(),a=(t==null?void 0:t.event_name)||"National Charity Today Awards™ Gala Lunc
2114h";let s=await bv(r,a,"Kitchen Summary — Dish Totals");const i=(d,h)=>h.map(u=>{const f=e.filter(m=>m[d]===u.value).length;return{label:u.label,count:f}}),o=[{title:"Starters",rows:i("starter_choice",oi.starters)},{title:"Main Courses",rows:i("main_choice",oi.mains)},{title:"Desserts",rows:i("dessert_choice",oi.desserts)}],l=50,c=e.filter(d=>d.has_dietary_requirements).length;r.setFont("helvetica","normal"),r.setFontSize(11),r.text(`Total attendees: ${e.length}`,l,s),s+=16,r.text(`Guests with dietary requirements: ${c}`,l,s),s+=24,o.forEach(d=>{r.setFont("helvetica","bold"),r.setFontSize(12),r.setTextColor(...c2),r.text(d.title,l,s),s+=16,r.setFont("helvetica","normal"),r.setFontSize(10),r.setTextColor(40,40,40),d.rows.forEach(h=>{r.text(`${h.count}`,l,s),r.text(h.label,l+40,s),s+=16}),s+=8}),wv(r),r.save("Kitchen-Summary.pdf")}async function xEe(e,t){const r=jv(),a=(t==null?void 0:t.event_name)||"National Charity Today Awards™ Gala Lunch";let s=await bv(r,a,"Dietary and Allergen Report");const i=e.filter(h=>h.has_dietary_requirements),o=40,c=[120,120,80,r.internal.pageSize.getWidth()-o-320],d=["Guest","Organisation","Table","Dietary details"];r.setFont("helvetica","normal"),r.setFontSize(11),r.text(`Guests requiring attention: ${i.length} of ${e.length}`,o,s),s+=20,s=ox(r,o,s,d,c),i.forEach(h=>{s>r.internal.pageSize.getHeight()-40&&(r.addPage(),s=50,s=ox(r,o,s,d,c)),s=sE(r,o,s,[h.full_name,h.organisation,h.table_number||"",h.dietary_details||""],c,!0)}),wv(r),r.save("Dietary-and-Allergen-Report.pdf")}async function yEe(e,t){const r=jv(),a=(t==null?void 0:t.event_name)||"National Charity Today Awards™ Gala Lunch";let s=await bv(r,a,"Table-by-Table Menu Report");const i=40,o={};e.forEach(d=>{const h=d.table_number||"Unassigned";o[h]||(o[h]=[]),o[h].push(d)});const l=Object.keys(o).sort((d,h)=>{if(d==="Unassigned")return 1;if(h==="Unassigned")return-1;const u=parseInt(d,10),f=parseInt(h,10);return!isNaN(u)&&!isNaN(f)?u-f:d.localeCompare(h)}),c=[140,130,110,110];l.forEach(d=>{s>r.internal.pageSize.getHeight()-60&&(r.addPage(),s=50),r.setFont("helvetica","bold"),r.setFontSize(12),r.setTextColor(...c2),r.text(`Table ${d} (${o[d].length} guests)`,i,s),s+=16;const h=["Guest","Starter","Main","Dessert"];let u=ox(r,i,s,h,c);o[d].forEach(f=>{u>r.internal.pageSize.getHeight()-40&&(r.addPage(),u=50,u=ox(r,i,u,h,c)),u=sE(r,i,u,[f.full_name,di(f.starter_choice),di(f.main_choice),di(f.dessert_choice)],c,f.has_dietary_requirements)}),s=u+14}),wv(r),r.save("Table-by-Table-Menu-Report.pdf")}const vEe=[{value:"sponsor",label:"Sponsor"},{value:"supplier",label:"Supplier"},{value:"guest_of_organisers",label:"Guest of Organisers"},{value:"guest_of_finalist",label:"Guest of Finalist"},{value:"finalist",label:"Finalist"}];function bEe({formData:e,setField:t,errors:r,config:a}){[a==null?void 0:a.hotel_name,a==null?void 0:a.hotel_telephone,a==null?void 0:a.hotel_email].filter(Boolean).join(" · ");const s=(i,o)=>n.jsxs("fieldset",{className:"mb-6",children:[n.jsx("legend",{className:"sr-only",children:i}),n.jsx("div",{className:"space-y-2.5",children:o.map(l=>{const c=`${i}-${l.value}`;return n.jsxs("label",{htmlFor:c,className:`flex items-start gap-3 p-3 rounded-lg border cursor-pointer transition-colors ${e[i]===l.value?"border-[#dec069] bg-amber-50":"border-gray-200 hover:border-gray-300 bg-white"}`,children:[n.jsx("input",{type:"radio",id:c,name:i,value:l.value,checked:e[i]===l.value,onChange:()=>t(i,l.value),className:"mt-1 w-4 h-4 cursor-pointer"}),n.jsx("span",{className:"text-sm text-gray-700 leading-snug",children:l.label})]},l.value)})})]});return n.jsxs("div",{className:"space-y-8",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-semibold text-[#06053e] mb-4",children:"Your details"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"full_name",children:"Full name *"}),n.jsx(Me,{id:"full_name",value:e.full_name||"",onChange:i=>t("full_name",i.target.value),className:"mt-1"}),r.full_name&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.full_name})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"email",children:"Email address *"}),n.jsx(Me,{id:"email",type:"email",value:e.email||"",onChange:i=>t("email",i.target.value),className:"mt-1"}),r.email&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.email})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"organisation",children:"Finalist's Name (if applicable)"}),n.jsx(Me,{id:"organisation",value:e.organisation||"",onChange:i=>t("organisation",i.target.value),className:"mt-1"}),r.organisation&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.organisation})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"attendance_capacity",children:"I am attending as a *"}),n.jsxs(Qt,{value:e.attendance_capacity||"",onValueChange:i=>t("attendance_capacity",i),children:[n.jsx(Kt,{id:"attendance_capacity",className:"mt-1 w-full",children:n.jsx(Xt,{placeholder:"Select an option"})}),n.jsx(Gt,{children:vEe.map(i=>n.jsx(Ae,{value:i.value,children:i.label},i.value))})]}),r.attendance_capacity&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.attendance_capacity})]}),n.jsxs("div",{className:"sm:col-span-2",children:[n.jsx(ye,{htmlFor:"booked_by",children:"Name of person/organisation that made the booking *"}),n.jsx(Me,{id:"booked_by",value:e.booked_by||"",onChange:i=>t("booked_by",i.target.value),className:"mt-1"}),r.booked_by&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.booked_by})]})]})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-semibold text-[#06053e] mb-1",children:"Menu choices"}),n.jsx("p",{className:"text-sm text-gray-500 mb-5",children:"You must select at least one option from each of the three courses."}
2114),n.jsx("h4",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Starters"}),s("starter_choice",oi.starters),r.starter_choice&&n.jsx("p",{className:"text-xs text-red-600 -mt-4 mb-4",children:r.starter_choice}),n.jsx("h4",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Main Courses"}),s("main_choice",oi.mains),r.main_choice&&n.jsx("p",{className:"text-xs text-red-600 -mt-4 mb-4",children:r.main_choice}),n.jsx("h4",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Desserts"}),s("dessert_choice",oi.desserts),r.dessert_choice&&n.jsx("p",{className:"text-xs text-red-600 -mt-4 mb-4",children:r.dessert_choice})]}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-semibold text-[#06053e] mb-4",children:"Dietary and allergen information"}),n.jsx("p",{className:"text-sm font-medium text-gray-700 mb-2",children:"Do you have any allergies, intolerances or dietary requirements? *"}),n.jsxs("div",{className:"flex gap-6 mb-4",children:[n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"has_dietary",value:"yes",checked:e.has_dietary_requirements===!0,onChange:()=>t("has_dietary_requirements",!0),className:"w-4 h-4 cursor-pointer"}),n.jsx("span",{className:"text-sm",children:"Yes"})]}),n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[n.jsx("input",{type:"radio",name:"has_dietary",value:"no",checked:e.has_dietary_requirements===!1,onChange:()=>t("has_dietary_requirements",!1),className:"w-4 h-4 cursor-pointer"}),n.jsx("span",{className:"text-sm",children:"No"})]})]}),r.has_dietary_requirements&&n.jsx("p",{className:"text-xs text-red-600 mb-2",children:r.has_dietary_requirements}),e.has_dietary_requirements&&n.jsxs("div",{className:"mb-4",children:[n.jsx(ye,{htmlFor:"dietary_details",children:"Please provide full details *"}),n.jsx(en,{id:"dietary_details",value:e.dietary_details||"",onChange:i=>t("dietary_details",i.target.value),className:"mt-1",rows:3}),r.dietary_details&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.dietary_details})]}),n.jsxs("div",{className:"rounded-lg border-2 border-amber-300 bg-amber-50/60 p-5 mb-4",children:[n.jsx("p",{className:"text-xs font-semibold text-amber-700 uppercase tracking-wide mb-2",children:"Important dietary and allergen notice"}),n.jsx("p",{className:"text-sm text-amber-900 mb-2",children:"The information submitted through this form will be passed to the hotel. Guests with allergies, intolerances or other dietary requirements must also make the hotel aware directly on the day of their allergies or requirements."}),n.jsx("p",{className:"text-sm text-amber-900 mb-2",children:"The hotel is responsible for food preparation, ingredient information and allergen management. The event organisers cannot guarantee that any menu item will be free from a particular ingredient or allergen."})]}),n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(Zr,{id:"ack",checked:e.acknowledgement||!1,onCheckedChange:i=>t("acknowledgement",i===!0),className:"mt-0.5"}),n.jsx("label",{htmlFor:"ack",className:"text-sm text-gray-700 leading-snug cursor-pointer",children:"I confirm that my menu choices and dietary information are accurate. If I have an allergy, intolerance or dietary requirement, I understand that I must inform the hotel directly on the day. *"})]}),r.acknowledgement&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:r.acknowledgement})]})]})}function wEe({deadline:e}){const t=e?new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}):"26 September 2026";return n.jsxs("div",{className:"max-w-xl mx-auto flex items-start gap-4 roun
2114ded-xl shadow-lg border-l-4 px-6 py-5 text-left",style:{backgroundColor:"#312e5c",borderColor:"#d97706"},children:[n.jsx(la,{className:"w-6 h-6 flex-shrink-0 mt-0.5",style:{color:"#fbbf24"},strokeWidth:1.5,"aria-hidden":"true"}),n.jsxs("div",{children:[n.jsxs("h2",{className:"text-base sm:text-lg font-bold text-white mb-1",children:["Submit your choices by ",t]}),n.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#d1d1d1"},children:"Each attendee must complete this form individually. After the deadline, the chef’s default menu will be provided."})]})]})}const jEe={full_name:"",email:"",organisation:"",attendance_capacity:"",booked_by:"",starter_choice:"",main_choice:"",dessert_choice:"",has_dietary_requirements:null,dietary_details:"",acknowledgement:!1};function NEe(){var J,H;const[e,t]=L.useState("loading"),[r,a]=L.useState(null),[s,i]=L.useState(""),[o,l]=L.useState(""),[c,d]=L.useState(!1),[h,u]=L.useState(null),[f,m]=L.useState(jEe),[b,g]=L.useState({}),[y,x]=L.useState("form"),[w,j]=L.useState(!1),[N,_]=L.useState(""),[S,A]=L.useState(null),[T,R]=L.useState(null);L.useEffect(()=>{let q=!0;const te=new URLSearchParams(window.location.search).get("amend");return(async()=>{try{const Q=(await pe.functions.invoke("menuSelection",{action:"publicConfig"})).data;if(!q)return;if(a(Q),te){u(te);const ne=await pe.functions.invoke("menuSelection",{action:"get",amendment_token:te});ne.data&&ne.data.submission?ne.data.deadlinePassed?(t("amendClosed"),a(oe=>({...oe,organiser_email:ne.data.organiser_email,...Q}))):(m({full_name:ne.data.submission.full_name||"",email:ne.data.submission.email||"",organisation:ne.data.submission.organisation||"",attendance_capacity:ne.data.submission.attendance_capacity||"",booked_by:ne.data.submission.booked_by||"",starter_choice:ne.data.submission.starter_choice||"",main_choice:ne.data.submission.main_choice||"",dessert_choice:ne.data.submission.dessert_choice||"",has_dietary_requirements:!!ne.data.submission.has_dietary_requirements,dietary_details:ne.data.submission.dietary_details||"",acknowledgement:!!ne.data.submission.acknowledgement}),t("form"),x("form")):t("amendNotFound")}else!Q||!Q.has_config?t("closed"):Q.is_active?t("gate"):t("closed")}catch{t("closed")}})(),()=>{q=!1}},[]);const M=(q,K)=>{m(te=>({...te,[q]:K})),g(te=>({...te,[q]:void 0}))},k=()=>{const q={};return f.full_name.trim()||(q.full_name="Required"),f.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f.email)||(q.email="Enter a valid email"):q.email="Required",f.attendance_capacity||(q.attendance_capacity="Please select how you are attending"),f.booked_by.trim()||(q.booked_by="Required"),f.starter_choice||(q.starter_choice="Please choose a starter"),f.main_choice||(q.main_choice="Please choose a main course"),f.dessert_choice||(q.dessert_choice="Please choose a dessert"),f.has_dietary_requirements===null&&(q.has_dietary_requirements="Please select Yes or No"),f.has_dietary_requirements&&!f.dietary_details.trim()&&(q.dietary_details="Please provide full details"),f.acknowledgement||(q.acknowledgement="You must confirm this to continue"),g(q),Object.keys(q).length===0},P=async()=>{d(!0),l("");try{const K=(await pe.functions.invoke("menuSelection",{action:"validateAccess",access_code:s})).data;K.valid?K.deadlinePassed?t("deadlinePassedGate"):t("form"):K.reason==="not_open"?t("closed"):l("Invalid access code. Please check and try again.")}catch{l("Something went wrong. Please try again.")}d(!1)},O=()=>{k()&&(x("review"),window.scrollTo(0,0))},F=async(q=!1)=>{var K,te;j(!0),_(""),R(null);try{const re=window.location.origin,Q=!!h,ne={action:Q?"amend":"create",data:{...f,has_dietary_requirements:!!f.has_dietary_requirements},appUrl:re};Q?ne.amendment_token=h:(ne.access_code=s,q&&(ne.confirm_duplicate=!0));const ae=(await pe.functions.invoke("menuSelection",ne)).data;ae&&ae.duplicate_name?(R(ae.matches),window.scrollTo(0,0)):ae&&(ae.success||ae.submission)?(A(ae),x("submitted"),window.scrollTo(0,0)):ae&&ae.error?_(ae.error):_("Submission failed. Please try again.")}catch(re){const Q=((te=(K=re==null?void 0:re.response)==null?void 0:K.data)==null?void 0:te.error)||(re==null?void 0:re.message)||"Submission failed. Please try again.";_(Q)}j(!1)},$=()=>{S&&S.submission&&mEe(S.submission,r)},G={sponsor:"Sponsor",supplier:"Supplier",guest_of_organisers:"Guest of Organisers",guest_of_finalist:"Guest of Finalist",finalist:"Finalist"},B=[["Full name",f.full_name],["Email",f.email],["Organisation",f.organisation],["Attending as",G[f.attendance_capacity]||f.attendance_capacity],["Booked by",f.booked_by],["Starter",di(f.starter_choice)],["Main course",di(f.main_choice)],["Dessert",di(f.dessert_choice)],["Dietary requirements",f.has_dietary_requirements?`Yes — ${f.dietary_details}`:"No"]];return e==="loading"?n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-4 border-[#06053e] border-t-transparent"})}):n.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-blue-50",children:[n.jsx("section",{className:"bg-gradient-to-br from-primary-navy via-[#1a1560] to-accent-gold text-white py-14 lg:py-16 relative overflow-hidden",children:n.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10",children:n.jsxs(lt.div,{initial:{opacity:0,y:20}
2114,animate:{opacity:1,y:0},className:"text-center max-w-4xl mx-auto",children:[n.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent-gold/20 border border-accent-gold/30 rounded-full px-4 py-1.5 mb-4",children:[n.jsx(za,{className:"w-4 h-4 text-accent-gold"}),n.jsx("span",{className:"text-sm font-medium text-accent-gold",children:"Gala Lunch"})]}),n.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-4 leading-tight",children:["National Charity Today Awards™",n.jsx("span",{className:"block text-accent-gold mt-1",children:"Gala Lunch Menu Selection"})]})]})})}),n.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-10",children:[e==="closed"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-10 text-center",children:[n.jsx(Qu,{className:"w-12 h-12 mx-auto mb-4 text-gray-300"}),n.jsx("h2",{className:"text-xl font-semibold text-[#06053e] mb-2",children:"Menu selection is not currently available"}),n.jsx("p",{className:"text-gray-600",children:"If you have been invited to select your menu, please check your invitation or contact the organiser."})]})}),e==="deadlinePassedGate"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-10 text-center",children:[n.jsx(eo,{className:"w-12 h-12 mx-auto mb-4 text-amber-500"}),n.jsx("h2",{className:"text-xl font-semibold text-[#06053e] mb-2",children:"The deadline has passed"}),n.jsx("p",{className:"text-gray-600",children:"Menu selection is now closed. Please contact the organiser if you need to make changes."})]})}),e==="amendClosed"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-10 text-center",children:[n.jsx(eo,{className:"w-12 h-12 mx-auto mb-4 text-amber-500"}),n.jsx("h2",{className:"text-xl font-semibold text-[#06053e] mb-2",children:"Amendments are closed"}),n.jsxs("p",{className:"text-gray-600",children:["The deadline for changing your menu choices has passed. Please contact the organiser",r!=null&&r.organiser_email?` at ${r.organiser_email}`:"","."]})]})}),e==="amendNotFound"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-10 text-center",children:[n.jsx(eo,{className:"w-12 h-12 mx-auto mb-4 text-red-400"}),n.jsx("h2",{className:"text-xl font-semibold text-[#06053e] mb-2",children:"Link not recognised"}),n.jsx("p",{className:"text-gray-600",children:"This amendment link is invalid or has expired. Please use the link from your confirmation email."})]})}),e==="gate"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-8 sm:p-10",children:[n.jsxs("div",{className:"mb-6",children:[n.jsx(ye,{htmlFor:"accessCode",className:"mb-2 block",children:"Enter your access code"}),n.jsx(Me,{id:"accessCode",type:"text",value:s,onChange:q=>i(q.target.value),onKeyDown:q=>q.key==="Enter"&&P(),placeholder:"Access code"}),o&&n.jsx("p",{className:"text-xs text-red-600 mt-1",children:o})]}),n.jsx(me,{onClick:P,disabled:c||!s,className:"w-full bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:c?"Checking…":"Continue"}),(r==null?void 0:r.privacy_notice)&&n.jsxs("div",{className:"mt-6 rounded-lg bg-gray-50 border border-gray-200 p-4",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1",children:"Privacy notice"}),n.jsx("p",{className:"text-sm text-gray-600 whitespace-pre-line",children:r.privacy_notice})]})]})}),e==="form"&&n.jsx(_e,{className:"border-none shadow-xl",children:n.jsxs(Ce,{className:"p-6 sm:p-10",children:[y==="form"&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"mb-6",children:n.jsx(wEe,{deadline:r==null?void 0:r.submission_deadline})}),h&&n.jsx("div",{className:"rounded-lg bg-blue-50 border border-blue-200 p-3 mb-6 text-sm text-blue-800",children:"You are amending an existing menu selection. Your email address cannot be changed."}),n.jsx(bEe,{formData:f,setField:M,errors:b,config:r}),N&&n.jsx("div",{className:"mt-6 rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700",children:N}),n.jsx("div",{className:"mt-8",children:n.jsx(me,{onClick:O,className:"w-full bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:"Review your choices"})}),(r==null?void 0:r.privacy_notice)&&n.jsxs("div",{className:"mt-6 rounded-lg bg-gray-50 border border-gray-200 p-4",children:[n.jsx("p",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1",children:"Privacy notice"}),n.jsx("p",{className:"text-sm text-gray-600 whitespace-pre-line",children:r.privacy_notice})]})]}),y==="review"&&n.jsxs(n.Fragment,{children:[n.jsx("h2",{className:"text-xl font-semibold text-[#06053e] mb-4",children:"Please review your details"}),n.jsx("dl",{className:"divide-y divide-gray-100 mb-6",children:B.map(([q,K])=>n.jsxs("div",{className:"py-3 grid grid-cols-1 sm:grid-cols-3 gap-1",children:[n.jsx("dt",{className:"text-sm font-medium text-gray-500",children:q}),n.jsx("dd",{className:"text-sm text-gray-800 sm:col-span-2",children:K||"—"})]},q))}),T&&n.jsxs("div",{className:"mb-4 rounded-lg bg-amber-50 border border-amber-300 p-4",children:[n.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[n.jsx(eo,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),n.jsxs("p",{className:"text-sm text-amber-800",children:["A menu selection has already been submitted for the name ",n.jsx("strong",{children:f.full_name}),". If this is a different person, you can submit again."]})]}),n.jsx("ul",{className:"text-xs text-amber-700 ml-7 mb-3 space-y-1",children:T.map((q,K)=>n.jsxs("li",{children:[q.full_name,q.email?` — ${q.email}`:""," (",q.submission_reference,")"]},K))}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 ml-7",children:[n.jsx(me,{size:"sm",onClick:()=>F(!0),disabled:w,className:"bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:w?"Submitting…":"Submit anyway"}),n.jsx(me,{size:"sm",variant:"outline",onClick:()=>{R(null),x("form"),window.scrollTo(0,0)},children:"Edit details"})]})]}),n.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[n.jsx(me,{variant:"outline",onClick:()=>{x("form"),window.scrollTo(0,0)},className:"flex-1",children:"Edit"}),n.jsx(me,{onClick:()=>F(),disabled:w,className:"flex-1 bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:w?"Submitting…":"Confirm and submit"})]}),N&&n.jsx("div",{className:"mt-4 rounded-lg bg-red-50 border border-red-200 p-3 text-sm text-red-700",children:N})]}),y==="submitted"&&S&&n.jsxs("div",{className:"text-center py-6",children:[n.jsx(Cn,{className:"w-16 h-16 mx-auto mb-4 text-green-500"}),n.jsx("h2",{className:"text-2xl font-semibold text-[#06053e] mb-2",children:"Thank y
2114ou — your menu selection is confirmed"}),n.jsx("p",{className:"text-gray-600 mb-1",children:"Your reference number is"}),n.jsx("p",{className:"text-xl font-bold text-[#06053e] mb-6",children:S.reference||((J=S.submission)==null?void 0:J.submission_reference)}),n.jsxs("p",{className:"text-gray-600 mb-6 text-sm",children:["A confirmation email has been sent to ",(H=S.submission)==null?void 0:H.email,". You can amend your choices using the secure link in that email until the deadline."]}),n.jsx("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:n.jsxs(me,{onClick:$,variant:"outline",className:"border-[#06053e] text-[#06053e] hover:bg-gray-50",children:[n.jsx(Rq,{className:"w-4 h-4 mr-2"})," Download / print confirmation"]})})]})]})})]})]})}function _Ee({submissions:e,config:t,reload:r}){const[a,s]=L.useState(""),[i,o]=L.useState(""),[l,c]=L.useState(""),[d,h]=L.useState(""),[u,f]=L.useState(""),[m,b]=L.useState(!1),[g,y]=L.useState(null),[x,w]=L.useState(!1),[j,N]=L.useState(null),[_,S]=L.useState(!1),A=async()=>{if(j){S(!0);try{await pe.entities.MenuSubmission.delete(j.id),N(null),r()}catch(O){alert("Error deleting: "+O.message)}S(!1)}},T=L.useMemo(()=>e.filter(O=>{if(!m&&O.is_test||i&&O.starter_choice!==i||l&&O.main_choice!==l||d&&O.dessert_choice!==d||u==="yes"&&!O.has_dietary_requirements||u==="no"&&O.has_dietary_requirements)return!1;if(a){const F=a.toLowerCase();if(![O.full_name,O.organisation,O.booking_reference,O.table_number,O.email,O.submission_reference].join(" ").toLowerCase().includes(F))return!1}return!0}),[e,a,i,l,d,u,m]),R=L.useMemo(()=>{const O=new Set,F={};return e.forEach($=>{F[$.email]=(F[$.email]||0)+1,$.booking_reference&&(O[$.booking_reference]=(O[$.booking_reference]||0)+1)}),{emails:F,refs:O}},[e]),M=O=>R.emails[O.email]>1||O.booking_reference&&R.refs[O.booking_reference]>1,k=async()=>{w(!0);try{await pe.entities.MenuSubmission.update(g.id,{full_name:g.full_name,organisation:g.organisation,booking_reference:g.booking_reference,table_number:g.table_number,booked_by:g.booked_by,starter_choice:g.starter_choice,main_choice:g.main_choice,dessert_choice:g.dessert_choice,has_dietary_requirements:!!g.has_dietary_requirements,dietary_details:g.has_dietary_requirements&&g.dietary_details||"",last_amended_at:new Date().toISOString()}),y(null),r()}catch(O){alert("Error saving: "+O.message)}w(!1)},P=L.useMemo(()=>{const O=T;return{total:O.length,starters:oi.starters.map(F=>O.filter($=>$.starter_choice===F.value).length),mains:oi.mains.map(F=>O.filter($=>$.main_choice===F.value).length),desserts:oi.desserts.map(F=>O.filter($=>$.dessert_choice===F.value).length),dietary:O.filter(F=>F.has_dietary_requirements).length}},[T]);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"rounded-lg border border-gray-200 p-4",children:[n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"sm:col-span-2 lg:col-span-1",children:[n.jsx(ye,{className:"text-xs",children:"Search"}),n.jsxs("div",{className:"relative mt-1",children:[n.jsx(y1,{className:"w-4 h-4 absolute left-2 top-2.5 text-gray-400"}),n.jsx(Me,{value:a,onChange:O=>s(O.target.value),placeholder:"Name, org, ref, table…",className:"pl-8"})]})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Starter"}),n.jsxs("select",{value:i,onChange:O=>o(O.target.value),className:"mt-1 w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"All"}),oi.starters.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Main"}),n.jsxs("select",{value:l,onChange:O=>c(O.target.value),className:"mt-1 w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"All"}),oi.mains.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]}),n.jsxs("div",{children:[n.jsx(ye,{className:"text-xs",children:"Dessert"}),n.jsxs("select",{value:d,onChange:O=>h(O.target.value),className:"mt-1 w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"All"}),oi.desserts.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ye,{className:"text-xs",children:"Dietary:"}),n.jsxs("select",{value:u,onChange:O=>f(O.target.value),className:"h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"All"}),n.jsx("option",{value:"yes",children:"Yes"}),n.jsx("option",{value:"no",children:"No"})]})]}),n.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:m,onChange:O=>b(O.target.checked),className:"w-4 h-4"}),"Include test submissions"]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:[n.jsxs("div",{className:"rounded-lg bg-[#06053e] text-white p-3",children:[n.jsx("p",{className:"text-xs opacity-80",children:"Total guests"}),n.jsx("p",{className:"text-2xl font-bold",children:P.total})]}),n.jsxs("div",{className:"rounded-lg bg-amber-50 border border-amber-200 p-3",children:[n.jsx("p",{className:"text-xs text-amber-700",children:"Dietary"}),n.jsx("p",{className:"text-2xl font-bold text-amber-700",children:P.dietary})]})]}),[{title:"Starters",options:oi.starters,counts:P.starters},{title:"Mains",options:oi.mains,counts:P.mains},{title:"Desserts",options:oi.desserts,counts:P.desserts}].map(O=>n.jsxs("div",{className:"rounded-lg border border-gray-200 p-3",children:[n.jsx("p",{className:"text-xs font-semibold text-[#06053e] uppercase tracking-wide mb-2",children:O.title}),n.jsx("div",{className:"grid grid-cols-3 gap-3",children:O.options.map((F,$)=>n.jsxs("div",{className:"rounded-lg bg-gray-50 border border-gray-200 p-3",children:[n.jsx("p",{className:"text-xs text-gray-500 truncate",title:F.label,children:F.label.replace(/\s*\([A-Z, ]+\)\s*$/,"")}),n.jsx("p",{className:"text-2xl font-bold text-gray-700",children:O.counts[$]})]},F.value))})]},O.title)),n.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{className:"bg-gray-50 text-gray-600",children:n.jsxs("tr",{children:[n.jsx("th",{className:"text-left p-2 font-medium",children:"Guest"}),n.jsx("th",{className:"text-left p-2 font-medium hidden md:table-cell",children:"Organisation"}),n.jsx("th",{className:"text-left p-2 font-medium hidden lg:table-cell",children:"Booking"}),n.jsx("th",{className:"text-left p-2 font-medium",children:"Starter"}),n.jsx("th",{className:"text-left p-2 font-medium hidden md:table-cell",children:"Main"}),n.jsx("th",{className:"text-left p-2 font-medium hidden lg:table-cell",children:"Dessert"}),n.jsx("th",{className:"text-left p-2 font-medium",children:"Dietary"}),n.jsx("th",{className:"text-left p-2 font-medium hidden lg:table-cell",children:"Submitted"}),n.jsx("th",{className:"p-2"})]})}),n.jsxs("tbody",{children:[T.map(O=>n.jsxs("tr",{className:`border-t ${O.has_dietary_requirements?"bg-red-50":""} ${M(O)?"bg-yellow-50":""}`,children:[n.jsxs("td",{className:"p-2",children:[n.jsxs("p",{className:"font-medium text-gray-800",children:[O.full_name," ",M(O)&&n.jsx(Hy,{className:"w-3 h-3 inline text-yellow-600"})]}),n.jsx("p",{className:"text-xs text-gray-500",children:O.email}),n.jsx("p",{className:"text-xs text-gray-400",children:O.submission_reference}),O.is_test&&n.jsx("span",{className:"text-xs text-purple-600",children:"TEST"})]}),n.jsx("td",{className:"p-2 hidden md:table-cell",children:O.organisation}),n.jsxs("td",{className:"p-2 hidden lg:table-cell text-xs",children:[O.booking_reference,O.table_number?` · T${O.table_number}`:""]}),n.jsx("td",{className:"p-2 text-xs",children:di(O.starter_choice)}),n.jsx("td",{className:"p-2 hidden md:table-cell text-xs",children:di(O.main_choice)}),n.jsx("td",{className:"p-2 hidden lg:table-cell text-xs",children:di(O.dessert_choice)}),n.jsx("td",{className:"p-2",children:O.has_dietary_requirements?n.jsxs("span",{className:"inline-flex items-center gap-1 text-red-600 text-xs",children:[n.jsx(eo,{className:"w-3 h-3"})," Yes"]}):n.jsx("span",{className:"text-gray-400 text-xs",children:"No"})}),n.jsx("td",{className:"p-2 hidden lg:table-cell text-xs text-gray-500",children:a3(O.submitted_at)}),n.jsx("td",{className:"p-2",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>y({...O}),children:n.jsx(c3,{className:"w-3.5 h-3.5"})}),n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>N(O),className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:n.jsx(tr,{className:"w-3.5 h-3.5"})})]})})]},O.id)),T.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:9,className:"p-8 text-center text-gray-400",children:"No submissions match your filters."})})]})]})}),g&&n.jsx(Nn,{open:!0,onOpenChange:O=>!O&&y(null),children:n.jsxs(vn,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[n.jsx(_n,{children:n.jsxs(Sn,{children:["Edit submission — ",g.submission_reference]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx(ye,{children:"Full name"}),n.jsx(Me,{value:g.full_name||"",onChange:O=>y({...g,full_name:O.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Organisation"}),n.jsx(Me,{value:g.organisation||"",onChange:O=>y({...g,organisation:O.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Booking reference"}),n.jsx(Me,{value:g.booking_reference||"",onChange:O=>y({...g,booking_reference:O.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Table number"}),n.jsx(Me,{value:g.table_number||"",onChange:O=>y({...g,table_number:O.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Booked by"}),n.jsx(Me,{value:g.booked_by||"",onChange:O=>y({...g,booked_by:O.target.value})})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Starter"}),n.jsxs("select",{value:g.starter_choice||"",onChange:O=>y({...g,starter_choice:O.target.value}),className:"w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"—"}),oi.starters.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Main"}),n.jsxs("select",{value:g.main_choice||"",onChange:O=>y({...g,main_choice:O.target.value}),className:"w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"—"}),oi.mains.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]}),n.jsxs("div",{children:[n.jsx(ye,{children:"Dessert"}
2114),n.jsxs("select",{value:g.dessert_choice||"",onChange:O=>y({...g,dessert_choice:O.target.value}),className:"w-full h-9 rounded-md border border-gray-200 px-2 text-sm",children:[n.jsx("option",{value:"",children:"—"}),oi.desserts.map(O=>n.jsx("option",{value:O.value,children:O.label},O.value))]})]})]}),n.jsx("div",{className:"flex items-center gap-2",children:n.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:!!g.has_dietary_requirements,onChange:O=>y({...g,has_dietary_requirements:O.target.checked}),className:"w-4 h-4"}),"Has dietary requirements"]})}),g.has_dietary_requirements&&n.jsxs("div",{children:[n.jsx(ye,{children:"Dietary details"}),n.jsx(en,{value:g.dietary_details||"",onChange:O=>y({...g,dietary_details:O.target.value}),rows:2})]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[n.jsx(me,{variant:"outline",onClick:()=>y(null),children:"Cancel"}),n.jsx(me,{onClick:k,disabled:x,className:"bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:x?"Saving…":"Save changes"})]})]})]})}),j&&n.jsx(Nn,{open:!0,onOpenChange:O=>!O&&!_&&N(null),children:n.jsxs(vn,{className:"max-w-md",children:[n.jsx(_n,{children:n.jsx(Sn,{children:"Delete submission?"})}),n.jsxs("p",{className:"text-sm text-gray-600",children:["This will permanently delete the menu selection for ",n.jsx("strong",{children:j.full_name})," (",j.submission_reference,").",j.is_test?" This is a test entry.":" This is a real entry."," This action cannot be undone."]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[n.jsx(me,{variant:"outline",onClick:()=>N(null),disabled:_,children:"Cancel"}),n.jsx(me,{onClick:A,disabled:_,className:"bg-red-600 hover:bg-red-700 text-white",children:_?"Deleting…":"Delete"})]})]})})]})}function hq(e){const t=String(e??"");return/[",\n\r]/.test(t)?'"'+t.replace(/"/g,'""')+'"':t}function SEe(e,t){const r=t&&t.creventa_column_mapping||{},a=t&&t.creventa_column_order&&t.creventa_column_order.length?t.creventa_column_order:zy.map(l=>l.key),s={};zy.forEach(l=>{s[l.key]=l});const o=[a.map(l=>r[l]||(s[l]?s[l].label:l)).map(hq).join(",")];return e.forEach(l=>{const c=a.map(d=>{const h=s[d];let u=l[d];return h&&h.transform&&(u=h.transform(u)),hq(u)});o.push(c.join(","))}),"\uFEFF"+o.join(`\r
2115`)}function CEe(e,t){const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>URL.revokeObjectURL(a),1e3)}function AEe({submissions:e,config:t}){const[r,a]=L.useState(""),s=e.filter(l=>!l.is_test),i=async(l,c)=>{a(l);try{await c(s,t)}catch(d){alert("Error generating "+l+": "+d.message)}a("")},o=[{label:"Complete guest menu report",fn:pEe},{label:"Kitchen summary (dish totals)",fn:gEe},{label:"Dietary & allergen report",fn:xEe},{label:"Table-by-table menu report",fn:yEe}];return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"rounded-lg border border-gray-200 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-[#06053e] mb-1",children:"Exports & reports"}),n.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Reports exclude test submissions. PDFs include the logo, event name, creation date and page numbers."}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[o.map(l=>n.jsxs(me,{variant:"outline",onClick:()=>i(l.label,l.fn),disabled:!!r,className:"justify-start",children:[n.jsx(Rq,{className:"w-4 h-4 mr-2"})," ",l.label]},l.label)),n.jsxs(me,{variant:"outline",onClick:()=>{a("CSV");try{CEe("Creventa-Menu-Export.csv",SEe(s,t))}catch(l){alert(l.message)}a("")},disabled:!!r,className:"justify-start",children:[n.jsx(RX,{className:"w-4 h-4 mr-2"})," Creventa CSV export (",s.length," guests)"]})]}),r&&n.jsxs("p",{className:"text-sm text-gray-500 mt-3",children:["Generating ",r,"…"]})]}),n.jsxs("div",{className:"rounded-lg border-2 border-red-200 bg-red-50/40 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-red-700 mb-2",children:"Dietary & allergen summary"}),n.jsx("p",{className:"text-sm text-red-700 mb-3",children:"Guests requiring attention are highlighted in the table and the dietary report."}),n.jsxs("div",{className:"space-y-1",children:[s.filter(l=>l.has_dietary_requirements).map(l=>n.jsxs("div",{className:"text-sm bg-white rounded border border-red-100 p-2",children:[n.jsx("span",{className:"font-medium text-gray-800",children:l.full_name}),n.jsxs("span",{className:"text-gray-500",children:[" · ",l.organisation||"No organisation"]}),l.table_number&&n.jsxs("span",{className:"text-gray-500",children:[" · Table ",l.table_number]}),n.jsxs("span",{className:"block text-red-700 mt-1",children:["⚠ ",l.dietary_details||"Details not provided"]})]},l.id)),s.filter(l=>l.has_dietary_requirements).length===0&&n.jsx("p",{className:"text-sm text-gray-500",children:"No dietary requirements declared."})]})]})]})}function kEe({onSaved:e}){const[t,r]=L.useState(null),[a,s]=L.useState(!1),[i,o]=L.useState(""),[l,c]=L.useState(zy.map(y=>y.key)),[d,h]=L.useState({});L.useEffect(()=>{(async()=>{const x=(await pe.entities.MenuSelectionConfig.list("-updated_date",1))[0]||null;r(x||{}),x&&(c(x.creventa_column_order&&x.creventa_column_order.length?x.creventa_column_order:zy.map(w=>w.key)),h(x.creventa_column_mapping||{}))})()},[]);const u=(y,x)=>r(w=>({...w,[y]:x})),f=(y,x)=>{const w=y+x;if(w<0||w>=l.length)return;const j=[...l];[j[y],j[w]]=[j[w],j[y]],c(j)},m=(y,x)=>h(w=>({...w,[y]:x})),b=async()=>{s(!0),o("");try{const y={is_active:!!t.is_active,access_code:t.access_code||"",submission_deadline:t.submission_deadline||"",organiser_email:t.organiser_email||"",hotel_name:t.hotel_name||"",hotel_telephone:t.hotel_telephone||"",hotel_email:t.hotel_email||"",event_name:t.event_name||"National Charity Today Awards™ Gala Lunc
2115h",testing_mode:!!t.testing_mode,privacy_notice:t.privacy_notice||"",creventa_column_mapping:d,creventa_column_order:l};if(t.id)await pe.entities.MenuSelectionConfig.update(t.id,y);else{const x=await pe.entities.MenuSelectionConfig.create({...y,access_code:y.access_code||"NCTA-MENU"});r(w=>({...w,...x,id:x.id}))}o("Saved successfully."),e&&e()}catch(y){o("Error: "+(y.message||"Could not save"))}s(!1)},g=async()=>{if(confirm("Delete ALL test submissions? This cannot be undone."))try{await pe.entities.MenuSubmission.deleteMany({is_test:!0}),o("Test submissions cleared."),e&&e()}catch(y){o("Error clearing: "+y.message)}};return t?n.jsxs("div",{className:"space-y-8",children:[i&&n.jsx("div",{className:"rounded-lg bg-green-50 border border-green-200 p-3 text-sm text-green-700",children:i}),n.jsxs("section",{className:"rounded-lg border border-gray-200 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-[#06053e] mb-4",children:"Page status & access"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"font-medium text-sm",children:"Menu selection open to guests"}),n.jsx("p",{className:"text-xs text-gray-500",children:"Turn on when ready to receive submissions."})]}),n.jsx(Cs,{checked:!!t.is_active,onCheckedChange:y=>u("is_active",y)})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"font-medium text-sm",children:"Testing mode"}),n.jsx("p",{className:"text-xs text-gray-500",children:"Submissions are flagged as test data and excluded from live reports."})]}),n.jsx(Cs,{checked:!!t.testing_mode,onCheckedChange:y=>u("testing_mode",y)})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"access_code",children:"Access code"}),n.jsx(Me,{id:"access_code",value:t.access_code||"",onChange:y=>u("access_code",y.target.value),className:"mt-1 max-w-xs",placeholder:"e.g. NCTA-GALA-2026"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"submission_deadline",children:"Submission deadline"}),n.jsx(Me,{id:"submission_deadline",type:"datetime-local",value:t.submission_deadline?new Date(t.submission_deadline).toISOString().slice(0,16):"",onChange:y=>u("submission_deadline",y.target.value?new Date(y.target.value).toISOString():""),className:"mt-1 max-w-xs"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"organiser_email",children:"Organiser email (receives copies)"}),n.jsx(Me,{id:"organiser_email",type:"email",value:t.organiser_email||"",onChange:y=>u("organiser_email",y.target.value),className:"mt-1 max-w-md"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"event_name",children:"Event name"}),n.jsx(Me,{id:"event_name",value:t.event_name||"",onChange:y=>u("event_name",y.target.value),className:"mt-1 max-w-md"})]})]})]}),n.jsxs("section",{className:"rounded-lg border border-gray-200 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-[#06053e] mb-4",children:"Hotel contact details"}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"hotel_name",children:"Hotel name"}),n.jsx(Me,{id:"hotel_name",value:t.hotel_name||"",onChange:y=>u("hotel_name",y.target.value),className:"mt-1"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"hotel_telephone",children:"Hotel telephone"}),n.jsx(Me,{id:"hotel_telephone",value:t.hotel_telephone||"",onChange:y=>u("hotel_telephone",y.target.value),className:"mt-1"})]}),n.jsxs("div",{children:[n.jsx(ye,{htmlFor:"hotel_email",children:"Hotel email"}),n.jsx(Me,{id:"hotel_email",type:"email",value:t.hotel_email||"",onChange:y=>u("hotel_email",y.target.value),className:"mt-1"})]})]})]}),n.jsxs("section",{className:"rounded-lg border border-gray-200 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-[#06053e] mb-2",children:"Privacy notice"}),n.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Shown to guests. Explain why information is collected, who receives it and when it is deleted."}),n.jsx(en,{value:t.privacy_notice||"",onChange:y=>u("privacy_notice",y.target.value),rows:4})]}),n.jsxs("section",{className:"rounded-lg border border-gray-200 p-5",children:[n.jsx("h3",{className:"text-base font-semibold text-[#06053e] mb-1",children:"Creventa CSV column mapping"}),n.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"Match each form field to the corresponding Creventa column heading. Adjust the order to match your Creventa import template."}),n.jsx("div",{className:"space-y-2",children:l.map((y,x)=>{const w=zy.find(j=>j.key===y);return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex flex-col",children:[n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>f(x,-1),disabled:x===0,className:"h-6 px-1",children:n.jsx(Oq,{className:"w-3 h-3"})}),n.jsx(me,{size:"sm",variant:"ghost",onClick:()=>f(x,1),disabled:x===l.length-1,className:"h-6 px-1",children:n.jsx(VQ,{className:"w-3 h-3"})})]}),n.jsx("span",{className:"text-xs text-gray-400 w-6 text-center",children:x+1}),n.jsx("span",{className:"text-sm text-gray-700 w-56 truncate",children:w?w.label:y}),n.jsx("span",{className:"text-gray-300",children:"→"}),n.jsx(Me,{value:d[y]||"",onChange:j=>m(y,j.target.value),placeholder:w?w.label:y,className:"flex-1"})]},y)})})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[n.jsxs(me,{onClick:b,disabled:a,className:"bg-[#06053e] hover:bg-[#0f0d5e] text-white",children:[n.jsx(No,{className:"w-4 h-4 mr-2"})," ",a?"Saving…":"Save configuration"]}),n.jsxs(me,{onClick:g,variant:"outline",className:"text-red-600 border-red-200 hover:bg-red-50",children:[n.jsx(tr,{className:"w-4 h-4 mr-2"})," Clear test submissions"]})]})]}):n.jsx("div",{className:"p-8 text-center text-gray-500",children:"Loading configuration…"})}function PEe(){const[e,t]=L.useState(null),[r,a]=L.useState(!0),[s,i]=L.useState("submissions"),[o,l]=L.useState([]),[c,d]=L.useState(null),[h,u]=L.useState(!0),f=async()=>{u(!0);try{const[b,g]=await Promise.all([pe.entities.MenuSubmission.list("-submitted_at",500),pe.entities.MenuSelectionConfig.list("-updated_date",1)]);l(b||[]),d(g[0]||null)}catch(b){console.error("load error",b)}u(!1)};if(L.useEffect(()=>{(async()=>{try{const b=await pe.auth.me();t(b),b&&b.role==="admin"&&await f()}catch{t(null)}a(!1)})()},[]),r)return n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-4 border-[#06053e] border-t-transparent"})});if(!e||e.role!=="admin")return n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center p-4",children:n.jsxs(_e,{className:"max-w-md p-10 text-center border-none shadow-xl",children:[n.jsx(ps,{className:"w-12 h-12 mx-auto mb-4 text-gray-300"}),n.jsx("h1",{className:"text-xl font-semibold text-[#06053e] mb-2",children:"Access restricted"}),n.jsx("p",{className:"text-gray-600 mb-6",children:"This area is for authorised organisers only. Please sign in with an admin account."}),n.jsx("button",{onClick:()=>pe.auth.redirectToLogin(),className:"bg-[#06053e] text-white px-6 py-3 rounded-lg font-medium hover:bg-[#0f0d5e]",children:"Sign in"})]})});const m=[{key:"submissions",label:"Submissions",icon:tJ},{key:"reports",label:"Reports & exports",icon:OX},{key:"config",label:"Configuration",icon:Uq}];return n.jsxs("div",{className:"min-h-screen bg-gray-50 pb-20",children:[n.jsx("div",{className:"bg-[#06053e] text-white py-8",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4",children:[n.jsx("h1",{className:"text-2xl font-bold",children:"Gala Lunc
2115h Menu Selection — Administration"}),n.jsx("p",{className:"text-white/70 text-sm mt-1",children:"Secure administration area. Not indexed or linked publicly."})]})}),n.jsxs("div",{className:"max-w-6xl mx-auto px-4 -mt-6",children:[n.jsx("div",{className:"flex gap-1 mb-6 bg-white rounded-lg shadow-sm border border-gray-100 p-1 overflow-x-auto",children:m.map(b=>n.jsxs("button",{onClick:()=>i(b.key),className:`flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium whitespace-nowrap transition-colors ${s===b.key?"bg-[#06053e] text-white":"text-gray-600 hover:bg-gray-100"}`,children:[n.jsx(b.icon,{className:"w-4 h-4"})," ",b.label]},b.key))}),h?n.jsx("div",{className:"flex justify-center py-20",children:n.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-4 border-[#06053e] border-t-transparent"})}):n.jsxs(n.Fragment,{children:[s==="submissions"&&n.jsx(_Ee,{submissions:o,config:c,reload:f}),s==="reports"&&n.jsx(AEe,{submissions:o,config:c}),s==="config"&&n.jsx(kEe,{onSaved:f})]})]})]})}function EEe(){XZ&&(window.removeEventListener("unhandledrejection",fq),window.removeEventListener("error",mq),window.addEventListener("unhandledrejection",fq),window.addEventListener("error",mq))}function UY({title:e,details:t,componentName:r,originalError:a}){var s,i;((s=a==null?void 0:a.response)==null?void 0:s.status)!==402&&((i=window.parent)==null||i.postMessage({type:"app_error",error:{title:e.toString(),details:t==null?void 0:t.toString(),componentName:r==null?void 0:r.toString()}},"*"))}function fq(e){var s;const r=(s=e.reason.stack.match(/at\s+(\w+)\s+\(eval/))==null?void 0:s[1],a=r?`Error in ${r}: ${e.reason.toString()}`:e.reason.toString();UY({title:a,details:e.reason.toString(),componentName:r,originalError:e.reason})}function mq(e){var s,i;let r=(i=((s=e.error)==null?void 0:s.stack).match(/at\s+(\w+)\s+\(eval/))==null?void 0:i[1];r==="eval"&&(r=null);const a=r?`in ${r}: ${e.error.toString()}`:e.error.toString();UY({title:a,details:e.error.toString(),componentName:r,originalError:e.error})}function TEe({}){var o;const t=Rl().pathname.substring(1),{data:r,isLoading:a}=xt({queryKey:["articleByPath",t],queryFn:async()=>t&&(await pe.entities.NewsArticle.filter({is_published:!0})).find(d=>ix(d.category,d.title)===t)||null}),{data:s,isFetched:i}=xt({queryKey:["user"],queryFn:async()=>{try{return{user:await pe.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return r&&!a?n.jsx(L.Suspense,{fallback:n.jsx("div",{className:"min-h-screen flex items-center justify-center",children:n.jsx("div",{className:"animate-spin rounded-full h-16 w-16 border-4 border-primary-navy border-t-transparent"})}),children:n.jsx(MY,{articleSlugFromPath:t})}):n.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:n.jsx("div",{className:"max-w-md w-full",children:n.jsxs("div",{className:"text-center space-y-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),n.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),n.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",n.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),i&&s.isAuthenticated&&((o=s.user)==null?void 0:o.role)==="admin"&&n.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:n.jsxs("div",{className:"flex items-start space-x-3",children:[n.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:n.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),n.jsxs("div",{className:"text-left space-y-1",children:[n.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),n.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),n.jsx("div",{className:"pt-6",children:n.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[n.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const OEe=()=>n.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:n.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:n.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),n.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),n.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),n.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[n.jsx("p",{children:"If you believe this is an error, you can:"}),n.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[n.jsx("li",{children:"Verify you are logged in with the correct account"}),n.jsx("li",{children:"Contact the app administrator for access"}),n.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),{Pages:zY,Layout:pq,mainPage:MEe}
2115=BY,VY=MEe,LEe=zY[VY];EEe();const REe=({children:e,currentPageName:t})=>pq?n.jsx(pq,{currentPageName:t,children:e}):n.jsx(n.Fragment,{children:e}),IEe=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:r,isAuthenticated:a,navigateToLogin:s}=k$();if(t||e)return n.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:n.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return n.jsx(OEe,{});if(r.type==="auth_required")return s(),null}return n.jsx(REe,{currentPageName:VY,children:n.jsxs(Cte,{children:[n.jsx(Hf,{path:"/",element:n.jsx(LEe,{})}),Object.entries(zY).map(([i,o])=>n.jsx(Hf,{path:`/${i}`,element:n.jsx(o,{})},i)),n.jsx(Hf,{path:"/contractsettings",element:n.jsx(iEe,{})}),n.jsx(Hf,{path:"/MenuSelection",element:n.jsx(NEe,{})}),n.jsx(Hf,{path:"/MenuSelectionAdmin",element:n.jsx(PEe,{})}),n.jsx(Hf,{path:"*",element:n.jsx(TEe,{})})]})})};function DEe(){return n.jsx(die,{children:n.jsxs(_ee,{client:g3,children:[n.jsxs(Yte,{children:[n.jsx(sEe,{}),n.jsx(IEe,{})]}),n.jsx(eee,{}),n.jsx(Iee,{})]})})}LQ.createRoot(document.getElementById("root")).render(n.jsx(DEe,{}));export{Gr as _,ab as c,Lr as g};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.