vendor: 1,643 bytes, lines 1-9
1(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 o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var tte=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tx={exports:{}},Nu={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and 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 s3;function vT(){if(s3)return Nu;s3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Nu.Fragment=t,Nu.jsx=n,Nu.jsxs=n,Nu}var i3;function wT(){return i3||(i3=1,Tx.exports=vT()),Tx.exports}
vendor: 20,093 bytes, lines 9-41
9var i=wT(),Mx={exports:{}},Ze={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and 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 l3;function ST(){if(l3)return Ze;l3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),b=Symbol.iterator;function v(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,T={};function E(R,J,P){this.props=R,this.context=J,this.refs=T,this.updater=P||N}E.prototype.isReactComponent={},E.prototype.setState=function(R,J){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,J,"setState")},E.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function D(){}D.prototype=E.prototype;function k(R,J,P){this.props=R,this.context=J,this.refs=T,this.updater=P||N}var M=k.prototype=new D;M.constructor=k,j(M,E.prototype),M.isPureReactComponent=!0;var B=Array.isArray;function _(){}var U={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function W(R,J,P){var ge=P.ref;return{$$typeof:e,type:R,key:J,ref:ge!==void 0?ge:null,props:P}}function ae(R,J){return W(R.type,J,R.props)}function le(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function re(R){var J={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(P){return J[P]})}var xe=/\/+/g;function te(R,J){return typeof R=="object"&&R!==null&&R.key!=null?re(""+R.key):J.toString(36)}function H(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(_,_):(R.status="pending",R.then(function(J){R.status==="pending"&&(R.status="fulfilled",R.value=J)},function(J){R.status==="pending"&&(R.status="rejected",R.reason=J)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function V(R,J,P,ge,Ee){var Te=typeof R;(Te==="undefined"||Te==="boolean")&&(R=null);var Ve=!1;if(R===null)Ve=!0;else switch(Te){case"bigint":case"string":case"number":Ve=!0;break;case"object":switch(R.$$typeof){case e:case t:Ve=!0;break;case p:return Ve=R._init,V(Ve(R._payload),J,P,ge,Ee)}}if(Ve)return Ee=Ee(R),Ve=ge===""?"."+te(R,0):ge,B(Ee)?(P="",Ve!=null&&(P=Ve.replace(xe,"$&/")+"/"),V(Ee,J,P,"",function(kt){return kt})):Ee!=null&&(le(Ee)&&(Ee=ae(Ee,P+(Ee.key==null||R&&R.key===Ee.key?"":(""+Ee.key).replace(xe,"$&/")+"/")+Ve)),J.push(Ee)),1;Ve=0;var et=ge===""?".":ge+":";if(B(R))for(var Re=0;Re<R.length;Re++)ge=R[Re],Te=et+te(ge,Re),Ve+=V(ge,J,P,Te,Ee);else if(Re=v(R),typeof Re=="function")for(R=Re.call(R),Re=0;!(ge=R.next()).done;)ge=ge.value,Te=et+te(ge,Re++),Ve+=V(ge,J,P,Te,Ee);else if(Te==="object"){if(typeof R.then=="function")return V(H(R),J,P,ge,Ee);throw J=String(R),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Ve}function ne(R,J,P){if(R==null)return R;var ge=[],Ee=0;return V(R,ge,"","",function(Te){return J.call(P,Te,Ee++)}),ge}function Z(R){if(R._status===-1){var J=R._result;J=J(),J.then(function(P){(R._status===0||R._status===-1)&&(R._status=1,R._result=P)},function(P){(R._status===0||R._status===-1)&&(R._status=2,R._result=P)}),R._status===-1&&(R._status=0,R._result=J)}if(R._status===1)return R._result.default;throw R._result}var Y=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},I={map:ne,forEach:function(R,J,P){ne(R,function(){J.apply(this,arguments)},P)},count:function(R){var J=0;return ne(R,function(){J++}),J},toArray:function(R){return ne(R,function(J){return J})||[]},only:function(R){if(!le(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ze.Activity=x,Ze.Children=I,Ze.Component=E,Ze.Fragment=n,Ze.Profiler=s,Ze.PureComponent=k,Ze.StrictMode=a,Ze.Suspense=h,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(R){return U.H.useMemoCache(R)}},Ze.cache=function(R){return function(){return R.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(R,J,P){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ge=j({},R.props),Ee=R.key;if(J!=null)for(Te in J.key!==void 0&&(Ee=""+J.key),J)!F.call(J,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&J.ref===void 0||(ge[Te]=J[Te]);var Te=arguments.length-2;if(Te===1)ge.children=P;else if(1<Te){for(var Ve=Array(Te),et=0;et<Te;et++)Ve[et]=arguments[et+2];ge.children=Ve}return W(R.type,Ee,ge)},Ze.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},Ze.createElement=function(R,J,P){var ge,Ee={},Te=null;if(J!=null)for(ge in J.key!==void 0&&(Te=""+J.key),J)F.call(J,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(Ee[ge]=J[ge]);var Ve=arguments.length-2;if(Ve===1)Ee.children=P;else if(1<Ve){for(var et=Array(Ve),Re=0;Re<Ve;Re++)et[Re]=arguments[Re+2];Ee.children=et}if(R&&R.defaultProps)for(ge in Ve=R.defaultProps,Ve)Ee[ge]===void 0&&(Ee[ge]=Ve[ge]);return W(R,Te,Ee)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(R){return{$$typeof:d,render:R}},Ze.isValidElement=le,Ze.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:Z}},Ze.memo=function(R,J){return{$$typeof:f,type:R,compare:J===void 0?null:J}},Ze.startTransition=function(R){var J=U.T,P={};U.T=P;try{var ge=R(),Ee=U.S;Ee!==null&&Ee(P,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(_,Y)}catch(Te){Y(Te)}finally{J!==null&&P.types!==null&&(J.types=P.types),U.T=J}},Ze.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ze.use=function(R){return U.H.use(R)},Ze.useActionState=function(R,J,P){return U.H.useActionState(R,J,P)},Ze.useCallback=function(R,J){return U.H.useCallback(R,J)},Ze.useContext=function(R){return U.H.useContext(R)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(R,J){return U.H.useDeferredValue(R,J)},Ze.useEffect=function(R,J){return U.H.useEffect(R,J)},Ze.useEffectEvent=function(R){return U.H.useEffectEvent(R)},Ze.useId=function(){return U.H.useId()},Ze.useImperativeHandle=function(R,J,P){return U.H.useImperativeHandle(R,J,P)},Ze.useInsertionEffect=function(R,J){return U.H.useInsertionEffect(R,J)},Ze.useLayoutEffect=function(R,J){return U.H.useLayoutEffect(R,J)},Ze.useMemo=function(R,J){return U.H.useMemo(R,J)},Ze.useOptimistic=function(R,J){return U.H.useOptimistic(R,J)},Ze.useReducer=function(R,J,P){return U.H.useReducer(R,J,P)},Ze.useRef=function(R){return U.H.useRef(R)},Ze.useState=function(R){return U.H.useState(R)},Ze.useSyncExternalStore=function(R,J,P){return U.H.useSyncExternalStore(R,J,P)},Ze.useTransition=function(){return U.H.useTransition()},Ze.version="19.2.6",Ze}var o3;function Cb(){return o3||(o3=1,Mx.exports=ST()),Mx.exports}var w=Cb(),Ix={exports:{}},ju={},zx={exports:{}},_x={};/** 18 * @license React 19 * scheduler.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and 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 c3;function NT(){return c3||(c3=1,(function(e){function t(V,ne){var Z=V.length;V.push(ne);e:for(;0<Z;){var Y=Z-1>>>1,I=V[Y];if(0<s(I,ne))V[Y]=ne,V[Z]=I,Z=Y;else break e}}function n(V){return V.length===0?null:V[0]}function a(V){if(V.length===0)return null;var ne=V[0],Z=V.pop();if(Z!==ne){V[0]=Z;e:for(var Y=0,I=V.length,R=I>>>1;Y<R;){var J=2*(Y+1)-1,P=V[J],ge=J+1,Ee=V[ge];if(0>s(P,Z))ge<I&&0>s(Ee,P)?(V[Y]=Ee,V[ge]=Z,Y=ge):(V[Y]=P,V[J]=Z,Y=J);else if(ge<I&&0>s(Ee,Z))V[Y]=Ee,V[ge]=Z,Y=ge;else break e}}return ne}function s(V,ne){var Z=V.sortIndex-ne.sortIndex;return Z!==0?Z:V.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var h=[],f=[],p=1,x=null,b=3,v=!1,N=!1,j=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function M(V){for(var ne=n(f);ne!==null;){if(ne.callback===null)a(f);else if(ne.startTime<=V)a(f),ne.sortIndex=ne.expirationTime,t(h,ne);else break;ne=n(f)}}function B(V){if(j=!1,M(V),!N)if(n(h)!==null)N=!0,_||(_=!0,re());else{var ne=n(f);ne!==null&&H(B,ne.startTime-V)}}var _=!1,U=-1,F=5,W=-1;function ae(){return T?!0:!(e.unstable_now()-W<F)}function le(){if(T=!1,_){var V=e.unstable_now();W=V;var ne=!0;try{e:{N=!1,j&&(j=!1,D(U),U=-1),v=!0;var Z=b;try{t:{for(M(V),x=n(h);x!==null&&!(x.expirationTime>V&&ae());){var Y=x.callback;if(typeof Y=="function"){x.callback=null,b=x.priorityLevel;var I=Y(x.expirationTime<=V);if(V=e.unstable_now(),typeof I=="function"){x.callback=I,M(V),ne=!0;break t}x===n(h)&&a(h),M(V)}else a(h);x=n(h)}if(x!==null)ne=!0;else{var R=n(f);R!==null&&H(B,R.startTime-V),ne=!1}}break e}finally{x=null,b=Z,v=!1}ne=void 0}}finally{ne?re():_=!1}}}var re;if(typeof k=="function")re=function(){k(le)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,te=xe.port2;xe.port1.onmessage=le,re=function(){te.postMessage(null)}}else re=function(){E(le,0)};function H(V,ne){U=E(function(){V(e.unstable_now())},ne)}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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(V){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var Z=b;b=ne;try{return V()}finally{b=Z}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(V,ne){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Z=b;b=V;try{return ne()}finally{b=Z}},e.unstable_scheduleCallback=function(V,ne,Z){var Y=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?Y+Z:Y):Z=Y,V){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=Z+I,V={id:p++,callback:ne,priorityLevel:V,startTime:Z,expirationTime:I,sortIndex:-1},Z>Y?(V.sortIndex=Z,t(f,V),n(h)===null&&V===n(f)&&(j?(D(U),U=-1):j=!0,H(B,Z-Y))):(V.sortIndex=I,t(h,V),N||v||(N=!0,_||(_=!0,re()))),V},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(V){var ne=b;return function(){var Z=b;b=ne;try{return V.apply(this,arguments)}finally{b=Z}}}})(_x)),_x}var u3;function jT(){return u3||(u3=1,zx.exports=NT()),zx.exports}var Dx={exports:{}},aa={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and 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 d3;function kT(){if(d3)return aa;d3=1;var e=Cb();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(h,f,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:h,containerInfo:f,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return aa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,aa.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(h,f,null,p)},aa.flushSync=function(h){var f=c.T,p=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=f,a.p=p,a.d.f()}},aa.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(h,f))},aa.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},aa.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,x=d(p,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:x,integrity:b,fetchPriority:v}):p==="script"&&a.d.X(h,{crossOrigin:x,integrity:b,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},aa.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=d(f.as,f.crossOrigin);a.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(h)},aa.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,x=d(p,f.crossOrigin);a.d.L(h,p,{crossOrigin:x,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},aa.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=d(f.as,f.crossOrigin);a.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(h)},aa.requestFormReset=function(h){a.d.r(h)},aa.unstable_batchedUpdates=function(h,f){return h(f)},aa.useFormState=function(h,f,p){return c.H.useFormState(h,f,p)},aa.useFormStatus=function(){return c.H.useHostTransitionStatus()},aa.version="19.2.6",aa}var h3;function CT(){if(h3)return Dx.exports;h3=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(),Dx.exports=kT(),Dx.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var m3;function AT(){if(m3)return ju;m3=1;var e=jT(),t=Cb(),n=CT();function a(r){var l="https://react.dev/errors/"+r;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)l+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function o(r){var l=r,u=r;if(r.alternate)for(;l.return;)l=l.return;else{r=l;do l=r,(l.flags&4098)!==0&&(u=l.return),r=l.return;while(r)}return l.tag===3?u:null}function c(r){if(r.tag===13){var l=r.memoizedState;if(l===null&&(r=r.alternate,r!==null&&(l=r.memoizedState)),l!==null)return l.dehydrated}return null}function d(r){if(r.tag===31){var l=r.memoizedState;if(l===null&&(r=r.alternate,r!==null&&(l=r.memoizedState)),l!==null)return l.dehydrated}return null}function h(r){if(o(r)!==r)throw Error(a(188))}function f(r){var l=r.alternate;if(!l){if(l=o(r),l===null)throw Error(a(188));return l!==r?null:r}for(var u=r,m=l;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(m=g.return,m!==null){u=m;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return h(g),r;if(y===m)return h(g),l;y=y.sibling}throw Error(a(188))}if(u.return!==m.return)u=g,m=y;else{for(var A=!1,O=g.child;O;){if(O===u){A=!0,u=g,m=y;break}if(O===m){A=!0,m=g,u=y;break}O=O.sibling}if(!A){for(O=y.child;O;){if(O===u){A=!0,u=y,m=g;break}if(O===m){A=!0,m=y,u=g;break}O=O.sibling}if(!A)throw Error(a(189))}}if(u.alternate!==m)throw Error(a(190))}if(u.tag!==3)throw Error(a(188));return u.stateNode.current===u?r:l}function p(r){var l=r.tag;if(l===5||l===26||l===27||l===6)return r;for(r=r.child;r!==null;){if(l=p(r),l!==null)return l;r=r.sibling}return null}var x=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),k=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function re(r){return r===null||typeof r!="object"?null:(r=le&&r[le]||r["@@iterator"],typeof r=="function"?r:null)}var xe=Symbol.for("react.client.reference");function te(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===xe?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case j:return"Fragment";case E:return"Profiler";case T:return"StrictMode";case B:return"Suspense";case _:return"SuspenseList";case W:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case N:return"Portal";case k:return r.displayName||"Context";case D:return(r._context.displayName||"Context")+".Consumer";case M:var l=r.render;return r=r.displayName,r||(r=l.displayName||l.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return l=r.displayName||null,l!==null?l:te(r.type)||"Memo";case F:l=r._payload,r=r._init;try{return te(r(l))}catch{}}return null}var H=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},Y=[],I=-1;function R(r){return{current:r}}function J(r){0>I||(r.current=Y[I],Y[I]=null,I--)}function P(r,l){I++,Y[I]=r.current,r.current=l}var ge=R(null),Ee=R(null),Te=R(null),Ve=R(null);function et(r,l){switch(P(Te,l),P(Ee,r),P(ge,null),l.nodeType){case 9:case 11:r=(r=l.documentElement)&&(r=r.namespaceURI)?Ev(r):0;break;default:if(r=l.tagName,l=l.namespaceURI)l=Ev(l),r=Tv(l,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}J(ge),P(ge,r)}function Re(){J(ge),J(Ee),J(Te)}
vendor: 11,142 bytes, lines 41-48
41function kt(r){r.memoizedState!==null&&P(Ve,r);var l=ge.current,u=Tv(l,r.type);l!==u&&(P(Ee,r),P(ge,u))}function yt(r){Ee.current===r&&(J(ge),J(Ee)),Ve.current===r&&(J(Ve),yu._currentValue=Z)}var Yt,cn;function vt(r){if(Yt===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);Yt=l&&l[1]||"",cn=-1<u.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+Yt+r+cn}var Ae=!1;function it(r,l){if(!r||Ae)return"";Ae=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(ce){var oe=ce}Reflect.construct(r,[],pe)}else{try{pe.call()}catch(ce){oe=ce}r.call(pe.prototype)}}else{try{throw Error()}catch(ce){oe=ce}(pe=r())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(ce){if(ce&&oe&&typeof ce.stack=="string")return[ce.stack,oe.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=m.DetermineComponentFrameRoot(),A=y[0],O=y[1];if(A&&O){var G=A.split(` 44`),ie=O.split(` 45`);for(g=m=0;m<G.length&&!G[m].includes("DetermineComponentFrameRoot");)m++;for(;g<ie.length&&!ie[g].includes("DetermineComponentFrameRoot");)g++;if(m===G.length||g===ie.length)for(m=G.length-1,g=ie.length-1;1<=m&&0<=g&&G[m]!==ie[g];)g--;for(;1<=m&&0<=g;m--,g--)if(G[m]!==ie[g]){if(m!==1||g!==1)do if(m--,g--,0>g||G[m]!==ie[g]){var me=` 46`+G[m].replace(" at new "," at ");return r.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",r.displayName)),me}while(1<=m&&0<=g);break}}}finally{Ae=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?vt(u):""}function de(r,l){switch(r.tag){case 26:case 27:case 5:return vt(r.type);case 16:return vt("Lazy");case 13:return r.child!==l&&l!==null?vt("Suspense Fallback"):vt("Suspense");case 19:return vt("SuspenseList");case 0:case 15:return it(r.type,!1);case 11:return it(r.type.render,!1);case 1:return it(r.type,!0);case 31:return vt("Activity");default:return""}}function Me(r){try{var l="",u=null;do l+=de(r,u),u=r,r=r.return;while(r);return l}catch(m){return` 47Error generating stack: `+m.message+` 48`+m.stack}}var Bt=Object.prototype.hasOwnProperty,xn=e.unstable_scheduleCallback,Vn=e.unstable_cancelCallback,Da=e.unstable_shouldYield,Zt=e.unstable_requestPaint,Ct=e.unstable_now,Ba=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,we=e.unstable_UserBlockingPriority,Ue=e.unstable_NormalPriority,Le=e.unstable_LowPriority,st=e.unstable_IdlePriority,na=e.log,oa=e.unstable_setDisableYieldValue,Hn=null,Wt=null;function In(r){if(typeof na=="function"&&oa(r),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(Hn,r)}catch{}}var Tt=Math.clz32?Math.clz32:zn,Cr=Math.log,ca=Math.LN2;function zn(r){return r>>>=0,r===0?32:31-(Cr(r)/ca|0)|0}var un=256,Xl=262144,nl=4194304;function Pr(r){var l=r&42;if(l!==0)return l;switch(r&-r){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Kl(r,l,u){var m=r.pendingLanes;if(m===0)return 0;var g=0,y=r.suspendedLanes,A=r.pingedLanes;r=r.warmLanes;var O=m&134217727;return O!==0?(m=O&~y,m!==0?g=Pr(m):(A&=O,A!==0?g=Pr(A):u||(u=O&~r,u!==0&&(g=Pr(u))))):(O=m&~y,O!==0?g=Pr(O):A!==0?g=Pr(A):u||(u=m&~r,u!==0&&(g=Pr(u)))),g===0?0:l!==0&&l!==g&&(l&y)===0&&(y=g&-g,u=l&-l,y>=u||y===32&&(u&4194048)!==0)?l:g}function Ur(r,l){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&l)===0}function Y0(r,l){switch(r){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ic(){var r=nl;return nl<<=1,(nl&62914560)===0&&(nl=4194304),r}function al(r){for(var l=[],u=0;31>u;u++)l.push(r);return l}function rl(r,l){r.pendingLanes|=l,l!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function wf(r,l,u,m,g,y){var A=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var O=r.entanglements,G=r.expirationTimes,ie=r.hiddenUpdates;for(u=A&~u;0<u;){var me=31-Tt(u),pe=1<<me;O[me]=0,G[me]=-1;var oe=ie[me];if(oe!==null)for(ie[me]=null,me=0;me<oe.length;me++){var ce=oe[me];ce!==null&&(ce.lane&=-536870913)}u&=~pe}m!==0&&zc(r,m,0),y!==0&&g===0&&r.tag!==0&&(r.suspendedLanes|=y&~(A&~l))}function zc(r,l,u){r.pendingLanes|=l,r.suspendedLanes&=~l;var m=31-Tt(l);r.entangledLanes|=l,r.entanglements[m]=r.entanglements[m]|1073741824|u&261930}function _c(r,l){var u=r.entangledLanes|=l;for(r=r.entanglements;u;){var m=31-Tt(u),g=1<<m;g&l|r[m]&l&&(r[m]|=l),u&=~g}}function Dc(r,l){var u=l&-l;return u=(u&42)!==0?1:Fr(u),(u&(r.suspendedLanes|l))!==0?0:u}function Fr(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Qs(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function W0(){var r=ne.p;return r!==0?r:(r=window.event,r===void 0?32:Jv(r.type))}function Bc(r,l){var u=ne.p;try{return ne.p=r,l()}finally{ne.p=u}}var Ar=Math.random().toString(36).slice(2),gn="__reactFiber$"+Ar,$n="__reactProps$"+Ar,xs="__reactContainer$"+Ar,Ql="__reactEvents$"+Ar,X0="__reactListeners$"+Ar,K0="__reactHandles$"+Ar,Q="__reactResources$"+Ar,be="__reactMarker$"+Ar;function De(r){delete r[gn],delete r[$n],delete r[Ql],delete r[X0],delete r[K0]}function He(r){var l=r[gn];if(l)return l;for(var u=r.parentNode;u;){if(l=u[xs]||u[gn]){if(u=l.alternate,l.child!==null||u!==null&&u.child!==null)for(r=Rv(r);r!==null;){if(u=r[gn])return u;r=Rv(r)}return l}r=u,u=r.parentNode}return null}function Rt(r){if(r=r[gn]||r[xs]){var l=r.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return r}return null}function ot(r){var l=r.tag;if(l===5||l===26||l===27||l===6)return r.stateNode;throw Error(a(33))}function nn(r){var l=r[Q];return l||(l=r[Q]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function pt(r){r[be]=!0}var ua=new Set,bn={};function At(r,l){nr(r,l),nr(r+"Capture",l)}function nr(r,l){for(bn[r]=l,r=0;r<l.length;r++)ua.add(l[r])}var Gn=RegExp("^[: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]*$"),ar={},va={};function hA(r){return Bt.call(va,r)?!0:Bt.call(ar,r)?!1:Gn.test(r)?va[r]=!0:(ar[r]=!0,!1)}function Q0(r,l,u){if(hA(l))if(u===null)r.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(l);return;case"boolean":var m=l.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(l);return}}r.setAttribute(l,""+u)}}function J0(r,l,u){if(u===null)r.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttribute(l,""+u)}}function gs(r,l,u,m){if(m===null)r.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(l,u,""+m)}}function rr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function v2(r){var l=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function mA(r,l,u){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,l);if(!r.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var g=m.get,y=m.set;return Object.defineProperty(r,l,{configurable:!0,get:function(){return g.call(this)},set:function(A){u=""+A,y.call(this,A)}}),Object.defineProperty(r,l,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){r._valueTracker=null,delete r[l]}}}}function Sf(r){if(!r._valueTracker){var l=v2(r)?"checked":"value";r._valueTracker=mA(r,l,""+r[l])}}function w2(r){if(!r)return!1;var l=r._valueTracker;if(!l)return!0;var u=l.getValue(),m="";return r&&(m=v2(r)?r.checked?"true":"false":r.value),r=m,r!==u?(l.setValue(r),!0):!1}function Z0(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var fA=/[\n"\\]/g;function sr(r){return r.replace(fA,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Nf(r,l,u,m,g,y,A,O){r.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.type=A:r.removeAttribute("type"),l!=null?A==="number"?(l===0&&r.value===""||r.value!=l)&&(r.value=""+rr(l)):r.value!==""+rr(l)&&(r.value=""+rr(l)):A!=="submit"&&A!=="reset"||r.removeAttribute("value"),l!=null?jf(r,A,rr(l)):u!=null?jf(r,A,rr(u)):m!=null&&r.removeAttribute("value"),g==null&&y!=null&&(r.defaultChecked=!!y),g!=null&&(r.checked=g&&typeof g!="function"&&typeof g!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?r.name=""+rr(O):r.removeAttribute("name")}function S2(r,l,u,m,g,y,A,O){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(r.type=y),l!=null||u!=null){if(!(y!=="submit"&&y!=="reset"||l!=null)){Sf(r);return}u=u!=null?""+rr(u):"",l=l!=null?""+rr(l):u,O||l===r.value||(r.value=l),r.defaultValue=l}m=m??g,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=O?r.checked:!!m,r.defaultChecked=!!m,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(r.name=A),Sf(r)}function jf(r,l,u){l==="number"&&Z0(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Jl(r,l,u,m){if(r=r.options,l){l={};for(var g=0;g<u.length;g++)l["$"+u[g]]=!0;for(u=0;
vendor: 4,872 bytes, line 48
48u<r.length;u++)g=l.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&m&&(r[u].defaultSelected=!0)}else{for(u=""+rr(u),l=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,m&&(r[g].defaultSelected=!0);return}l!==null||r[g].disabled||(l=r[g])}l!==null&&(l.selected=!0)}}function N2(r,l,u){if(l!=null&&(l=""+rr(l),l!==r.value&&(r.value=l),u==null)){r.defaultValue!==l&&(r.defaultValue=l);return}r.defaultValue=u!=null?""+rr(u):""}function j2(r,l,u,m){if(l==null){if(m!=null){if(u!=null)throw Error(a(92));if(H(m)){if(1<m.length)throw Error(a(93));m=m[0]}u=m}u==null&&(u=""),l=u}u=rr(l),r.defaultValue=u,m=r.textContent,m===u&&m!==""&&m!==null&&(r.value=m),Sf(r)}function Zl(r,l){if(l){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=l;return}}r.textContent=l}var pA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function k2(r,l,u){var m=l.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?r.setProperty(l,""):l==="float"?r.cssFloat="":r[l]="":m?r.setProperty(l,u):typeof u!="number"||u===0||pA.has(l)?l==="float"?r.cssFloat=u:r[l]=(""+u).trim():r[l]=u+"px"}function C2(r,l,u){if(l!=null&&typeof l!="object")throw Error(a(62));if(r=r.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||l!=null&&l.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var g in l)m=l[g],l.hasOwnProperty(g)&&u[g]!==m&&k2(r,g,m)}else for(var y in l)l.hasOwnProperty(y)&&k2(r,y,l[y])}function kf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 xA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
48-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ed(r){return gA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function bs(){}var Cf=null;function Af(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var eo=null,to=null;function A2(r){var l=Rt(r);if(l&&(r=l.stateNode)){var u=r[$n]||null;e:switch(r=l.stateNode,l.type){case"input":if(Nf(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),l=u.name,u.type==="radio"&&l!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+sr(""+l)+'"][type="radio"]'),l=0;l<u.length;l++){var m=u[l];if(m!==r&&m.form===r.form){var g=m[$n]||null;if(!g)throw Error(a(90));Nf(m,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(l=0;l<u.length;l++)m=u[l],m.form===r.form&&w2(m)}break e;case"textarea":N2(r,u.value,u.defaultValue);break e;case"select":l=u.value,l!=null&&Jl(r,!!u.multiple,l,!1)}}}var Ef=!1;function E2(r,l,u){if(Ef)return r(l,u);Ef=!0;try{var m=r(l);return m}finally{if(Ef=!1,(eo!==null||to!==null)&&(Fd(),eo&&(l=eo,r=to,to=eo=null,A2(l),r)))for(l=0;l<r.length;l++)A2(r[l])}}function Rc(r,l){var u=r.stateNode;if(u===null)return null;var m=u[$n]||null;if(m===null)return null;u=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(a(231,l,typeof u));return u}var ys=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tf=!1;if(ys)try{var Oc={};Object.defineProperty(Oc,"passive",{get:function(){Tf=!0}}),window.addEventListener("test",Oc,Oc),window.removeEventListener("test",Oc,Oc)}catch{Tf=!1}var Js=null,Mf=null,td=null;function T2(){if(td)return td;var r,l=Mf,u=l.length,m,g="value"in Js?Js.value:Js.textContent,y=g.length;for(r=0;r<u&&l[r]===g[r];r++);var A=u-r;for(m=1;m<=A&&l[u-m]===g[y-m];m++);return td=g.slice(r,1<m?1-m:void 0)}function nd(r){var l=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&l===13&&(r=13)):r=l,r===10&&(r=13),32<=r||r===13?r:0}function ad(){return!0}function M2(){return!1}function wa(r){function l(u,m,g,y,A){this._reactName=u,this._targetInst=g,this.type=m,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var O in r)r.hasOwnProperty(O)&&(u=r[O],this[O]=u?u(y):y[O]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?ad:M2,this.isPropagationStopped=M2,this}return x(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ad)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ad)},persist:function(){},isPersistent:ad}),l}var sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rd=wa(sl),Lc=x({},sl,{view:0,detail:0}),bA=wa(Lc),If,zf,Pc,sd=x({},Lc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Pc&&(Pc&&r.type==="mousemove"?(If=r.screenX-Pc.screenX,zf=r.screenY-Pc.screenY):zf=If=0,Pc=r),If)},movementY:function(r){return"movementY"in r?r.movementY:zf}}),I2=wa(sd),yA=x({},sd,{dataTransfer:0}),vA=wa(yA),wA=x({},Lc,{relatedTarget:0}),_f=wa(wA),SA=x({},sl,{animationName:0,elapsedTime:0,pseudoElement:0}),NA=wa(SA),jA=x({},sl,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),kA=wa(jA),CA=x({},sl,{data:0}),z2=wa(CA),AA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EA={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"},TA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MA(r){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(r):(r=TA[r])?!!l[r]:!1}function Df(){return MA}var IA=x({},Lc,{key:function(r){if(r.key){var l=AA[r.key]||r.key;if(l!=="Unidentified")return l}
vendor: 5,186 bytes, line 48
48return r.type==="keypress"?(r=nd(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?EA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(r){return r.type==="keypress"?nd(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?nd(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),zA=wa(IA),_A=x({},sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_2=wa(_A),DA=x({},Lc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),BA=wa(DA),RA=x({},sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),OA=wa(RA),LA=x({},sd,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),PA=wa(LA),UA=x({},sl,{newState:0,oldState:0}),FA=wa(UA),VA=[9,13,27,32],Bf=ys&&"CompositionEvent"in window,Uc=null;ys&&"documentMode"in document&&(Uc=document.documentMode);var qA=ys&&"TextEvent"in window&&!Uc,D2=ys&&(!Bf||Uc&&8<Uc&&11>=Uc),B2=" ",R2=!1;function O2(r,l){switch(r){case"keyup":return VA.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L2(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var no=!1;function HA(r,l){switch(r){case"compositionend":return L2(l);case"keypress":return l.which!==32?null:(R2=!0,B2);case"textInput":return r=l.data,r===B2&&R2?null:r;default:return null}}function $A(r,l){if(no)return r==="compositionend"||!Bf&&O2(r,l)?(r=T2(),td=Mf=Js=null,no=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return D2&&l.locale!=="ko"?null:l.data;default:return null}}var GA={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 P2(r){var l=r&&r.nodeName&&r.nodeName.toLowerCase();return l==="input"?!!GA[r.type]:l==="textarea"}function U2(r,l,u,m){eo?to?to.push(m):to=[m]:eo=m,l=Wd(l,"onChange"),0<l.length&&(u=new rd("onChange","change",null,u,m),r.push({event:u,listeners:l}))}var Fc=null,Vc=null;function YA(r){Sv(r,0)}function id(r){var l=ot(r);if(w2(l))return r}function F2(r,l){if(r==="change")return l}var V2=!1;if(ys){var Rf;if(ys){var Of="oninput"in document;if(!Of){var q2=document.createElement("div");q2.setAttribute("oninput","return;"),Of=typeof q2.oninput=="function"}Rf=Of}else Rf=!1;V2=Rf&&(!document.documentMode||9<document.documentMode)}function H2(){Fc&&(Fc.detachEvent("onpropertychange",$2),Vc=Fc=null)}function $2(r){if(r.propertyName==="value"&&id(Vc)){var l=[];U2(l,Vc,r,Af(r)),E2(YA,l)}}function WA(r,l,u){r==="focusin"?(H2(),Fc=l,Vc=u,Fc.attachEvent("onpropertychange",$2)):r==="focusout"&&H2()}function XA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return id(Vc)}function KA(r,l){if(r==="click")return id(l)}function QA(r,l){if(r==="input"||r==="change")return id(l)}function JA(r,l){return r===l&&(r!==0||1/r===1/l)||r!==r&&l!==l}var Ra=typeof Object.is=="function"?Object.is:JA;function qc(r,l){if(Ra(r,l))return!0;if(typeof r!="object"||r===null||typeof l!="object"||l===null)return!1;var u=Object.keys(r),m=Object.keys(l);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var g=u[m];if(!Bt.call(l,g)||!Ra(r[g],l[g]))return!1}return!0}function G2(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Y2(r,l){var u=G2(r);r=0;for(var m;u;){if(u.nodeType===3){if(m=r+u.textContent.length,r<=l&&m>=l)return{node:u,offset:l-r};r=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=G2(u)}}function W2(r,l){return r&&l?r===l?!0:r&&r.nodeType===3?!1:l&&l.nodeType===3?W2(r,l.parentNode):"contains"in r?r.contains(l):r.compareDocumentPosition?!!(r.compareDocumentPosition(l)&16):!1:!1}function X2(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var l=Z0(r.document);l instanceof r.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch{u=!1}if(u)r=l.contentWindow;else break;l=Z0(r.document)}return l}function Lf(r){var l=r&&r.nodeName&&r.nodeName.toLowerCase();return l&&(l==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||l==="textarea"||r.contentEditable==="true")}var ZA=ys&&"documentMode"in document&&11>=document.documentMode,ao=null,Pf=null,Hc=null,Uf=!1;function K2(r,l,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Uf||ao==null||ao!==Z0(m)||(m=ao,"selectionStart"in m&&Lf(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focu
vendor: 19,156 bytes, line 48
48sNode:m.focusNode,focusOffset:m.focusOffset}),Hc&&qc(Hc,m)||(Hc=m,m=Wd(Pf,"onSelect"),0<m.length&&(l=new rd("onSelect","select",null,l,u),r.push({event:l,listeners:m}),l.target=ao)))}function il(r,l){var u={};return u[r.toLowerCase()]=l.toLowerCase(),u["Webkit"+r]="webkit"+l,u["Moz"+r]="moz"+l,u}var ro={animationend:il("Animation","AnimationEnd"),animationiteration:il("Animation","AnimationIteration"),animationstart:il("Animation","AnimationStart"),transitionrun:il("Transition","TransitionRun"),transitionstart:il("Transition","TransitionStart"),transitioncancel:il("Transition","TransitionCancel"),transitionend:il("Transition","TransitionEnd")},Ff={},Q2={};ys&&(Q2=document.createElement("div").style,"AnimationEvent"in window||(delete ro.animationend.animation,delete ro.animationiteration.animation,delete ro.animationstart.animation),"TransitionEvent"in window||delete ro.transitionend.transition);function ll(r){if(Ff[r])return Ff[r];if(!ro[r])return r;var l=ro[r],u;for(u in l)if(l.hasOwnProperty(u)&&u in Q2)return Ff[r]=l[u];return r}var J2=ll("animationend"),Z2=ll("animationiteration"),e5=ll("animationstart"),eE=ll("transitionrun"),tE=ll("transitionstart"),nE=ll("transitioncancel"),t5=ll("transitionend"),n5=new Map,Vf="abort auxClick beforeToggle 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(" ");Vf.push("scrollEnd");function Er(r,l){n5.set(r,l),At(l,[r])}var ld=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},ir=[],so=0,qf=0;function od(){for(var r=so,l=qf=so=0;l<r;){var u=ir[l];ir[l++]=null;var m=ir[l];ir[l++]=null;var g=ir[l];ir[l++]=null;var y=ir[l];if(ir[l++]=null,m!==null&&g!==null){var A=m.pending;A===null?g.next=g:(g.next=A.next,A.next=g),m.pending=g}y!==0&&a5(u,g,y)}}function cd(r,l,u,m){ir[so++]=r,ir[so++]=l,ir[so++]=u,ir[so++]=m,qf|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function Hf(r,l,u,m){return cd(r,l,u,m),ud(r)}function ol(r,l){return cd(r,null,null,l),ud(r)}function a5(r,l,u){r.lanes|=u;var m=r.alternate;m!==null&&(m.lanes|=u);for(var g=!1,y=r.return;y!==null;)y.childLanes|=u,m=y.alternate,m!==null&&(m.childLanes|=u),y.tag===22&&(r=y.stateNode,r===null||r._visibility&1||(g=!0)),r=y,y=y.return;return r.tag===3?(y=r.stateNode,g&&l!==null&&(g=31-Tt(u),r=y.hiddenUpdates,m=r[g],m===null?r[g]=[l]:m.push(l),l.lane=u|536870912),y):null}function ud(r){if(50<hu)throw hu=0,Zp=null,Error(a(185));for(var l=r.return;l!==null;)r=l,l=r.return;return r.tag===3?r.stateNode:null}var io={};function aE(r,l,u,m){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(r,l,u,m){return new aE(r,l,u,m)}function $f(r){return r=r.prototype,!(!r||!r.isReactComponent)}function vs(r,l){var u=r.alternate;return u===null?(u=Oa(r.tag,l,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=l,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,l=r.dependencies,u.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function r5(r,l){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=l,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,l=u.dependencies,r.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),r}function dd(r,l,u,m,g,y){var A=0;if(m=r,typeof r=="function")$f(r)&&(A=1);else if(typeof r=="string")A=oT(r,u,ge.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case W:return r=Oa(31,u,l,g),r.elementType=W,r.lanes=y,r;case j:return cl(u.children,g,y,l);case T:A=8,g|=24;break;case E:return r=Oa(12,u,l,g|2),r.elementType=E,r.lanes=y,r;case B:return r=Oa(13,u,l,g),r.elementType=B,r.lanes=y,r;case _:return r=Oa(19,u,l,g),r.elementType=_,r.lanes=y,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:A=10;break e;case D:A=9;break e;case M:A=11;break e;case U:A=14;break e;case F:A=16,m=null;break e}A=29,u=Error(a(130,r===null?"null":typeof r,"")),m=null}return l=Oa(A,u,l,g),l.elementType=r,l.type=m,l.lanes=y,l}function cl(r,l,u,m){return r=Oa(7,r,m,l),r.lanes=u,r}function Gf(r,l,u){return r=Oa(6,r,null,l),r.lanes=u,r}function s5(r){var l=Oa(18,null,null,0);return l.stateNode=r,l}function Yf(r,l,u){return l=Oa(4,r.children!==null?r.children:[],r.key,l),l.lanes=u,l.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},l}var i5=new WeakMap;function lr(r,l){if(typeof r=="object"&&r!==null){var u=i5.get(r);return u!==void 0?u:(l={value:r,source:l,stack:Me(l)},i5.set(r,l),l)}return{value:r,source:l,stack:Me(l)}}var lo=[],oo=0,hd=null,$c=0,or=[],cr=0,Zs=null,Vr=1,qr="";function ws(r,l){lo[oo++]=$c,lo[oo++]=hd,hd=r,$c=l}function l5(r,l,u){or[cr++]=Vr,or[cr++]=qr,or[cr++]=Zs,Zs=r;var m=Vr;r=qr;var g=32-Tt(m)-1;m&=~(1<<g),u+=1;var y=32-Tt(l)+g;if(30<y){var A=g-g%5;y=(m&(1<<A)-1).toString(32),m>>=A,g-=A,Vr=1<<32-Tt(l)+g|u<<g|m,qr=y+r}else Vr=1<<y|u<<g|m,qr=r}function Wf(r){r.return!==null&&(ws(r,1),l5(r,1,0))}function Xf(r){for(;r===hd;)hd=lo[--oo],lo[oo]=null,$c=lo[--oo],lo[oo]=null;for(;r===Zs;)Zs=or[--cr],or[cr]=null,qr=or[--cr],or[cr]=null,Vr=or[--cr],or[cr]=null}function o5(r,l){or[cr++]=Vr,or[cr++]=qr,or[cr++]=Zs,Vr=l.id,qr=l.overflow,Zs=r}var Yn=null,Vt=null,mt=!1,ei=null,ur=!1,Kf=Error(a(519));function ti(r){var l=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gc(lr(l,r)),Kf}function c5(r){var l=r.stateNode,u=r.type,m=r.memoizedProps;switch(l[gn]=r,l[$n]=m,u){case"dialog":ut("cancel",l),ut("close",l);break;case"iframe":case"object":case"embed":ut("load",l);break;case"video":case"audio":for(u=0;u<fu.length;u++)ut(fu[u],l);break;case"source":ut("error",l);break;case"img":case"image":case"link":ut("error",l),ut("load",l);break;case"details":ut("toggle",l);break;case"input":ut("invalid",l),S2(l,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":ut("invalid",l);break;case"textarea":ut("invalid",l),j2(l,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||l.textContent===""+u||m.suppressHydrationWarning===!0||Cv(l.textContent,u)?(m.popover!=null&&(ut("beforetoggle",l),ut("toggle",l)),m.onScroll!=null&&ut("scroll",l),m.onScrollEnd!=null&&ut("scrollend",l),m.onClick!=null&&(l.onclick=bs),l=!0):l=!1,l||ti(r,!0)}function u5(r){for(Yn=r.return;Yn;)switch(Yn.tag){case 5:case 31:case 13:ur=!1;return;case 27:case 3:ur=!0;return;default:Yn=Yn.return}}function co(r){if(r!==Yn)return!1;if(!mt)return u5(r),mt=!0,!1;var l=r.tag,u;if((u=l!==3&&l!==27)&&((u=l===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||fx(r.type,r.memoizedProps)),u=!u),u&&Vt&&ti(r),u5(r),l===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Vt=Bv(r)}else if(l===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Vt=Bv(r)}else l===27?(l=Vt,pi(r.type)?(r=yx,yx=null,Vt=r):Vt=l):Vt=Yn?hr(r.stateNode.nextSibling):null;return!0}function ul(){Vt=Yn=null,mt=!1}function Qf(){var r=ei;return r!==null&&(ka===null?ka=r:ka.push.apply(ka,r),ei=null),r}function Gc(r){ei===null?ei=[r]:ei.push(r)}var Jf=R(null),dl=null,Ss=null;function ni(r,l,u){P(Jf,l._currentValue),l._currentValue=u}function Ns(r){r._currentValue=Jf.current,J(Jf)}function Zf(r,l,u){for(;r!==null;){var m=r.alternate;if((r.childLanes&l)!==l?(r.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),r===u)break;r=r.return}}function ep(r,l,u,m){var g=r.child;for(g!==null&&(g.return=r);g!==null;){var y=g.dependencies;if(y!==null){var A=g.child;y=y.firstContext;e:for(;y!==null;){var O=y;y=g;for(var G=0;G<l.length;G++)if(O.context===l[G]){y.lanes|=u,O=y.alternate,O!==null&&(O.lanes|=u),Zf(y.return,u,r),m||(A=null);break e}y=O.next}}else if(g.tag===18){if(A=g.return,A===null)throw Error(a(341));A.lanes|=u,y=A.alternate,y!==null&&(y.lanes|=u),Zf(A,u,r),A=null}else A=g.child;if(A!==null)A.return=g;else for(A=g;A!==null;){if(A===r){A=null;break}if(g=A.sibling,g!==null){g.return=A.return,A=g;break}A=A.return}g=A}}function uo(r,l,u,m){r=null;for(var g=l,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var A=g.alternate;if(A===null)throw Error(a(387));if(A=A.memoizedProps,A!==null){var O=g.type;Ra(g.pendingProps.value,A.value)||(r!==null?r.push(O):r=[O])}}else if(g===Ve.current){if(A=g.alternate,A===null)throw Error(a(387));A.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(r!==null?r.push(yu):r=[yu])}g=g.return}r!==null&&ep(l,r,u,m),l.flags|=262144}function md(r){for(r=r.firstContext;r!==null;){if(!Ra(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function hl(r){dl=r,Ss=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Wn(r){return d5(dl,r)}function fd(r,l){return dl===null&&hl(r),d5(r,l)}function d5(r,l){var u=l._currentValue;if(l={context:l,memoizedValue:u,next:null},Ss===null){if(r===null)throw Error(a(308));Ss=l,r.dependencies={lanes:0,firstContext:l},r.flags|=524288}else Ss=Ss.next=l;return u}var rE=typeof AbortController<"u"?AbortController:function(){var r=[],l=this.signal={aborted:!1,addEventListener:function(u,m){r.push(m)}};this.abort=function(){l.aborted=!0,r.forEach(function(u){return u()})}},sE=e.unstable_scheduleCallback,iE=e.unstable_NormalPriority,yn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tp(){return{controller:new rE,data:new Map,refCount:0}}function Yc(r){r.refCount--,r.refCount===0&&sE(iE,function(){r.controller.abort()})}var Wc=null,np=0,ho=0,mo=null;function lE(r,l){if(Wc===null){var u=Wc=[];np=0,ho=sx(),mo={status:"pending",value:void 0,then:function(m){u.push(m)}}}return np++,l.then(h5,h5),l}function h5(){if(--np===0&&Wc!==null){mo!==null&&(mo.status="fulfilled");var r=Wc;Wc=null,ho=0,mo=null;for(var l=0;l<r.length;l++)(0,r[l])()}}function oE(r,l){var u=[],m={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return r.then(function(){m.status="fulfilled",m.value=l;for(var g=0;g<u.length;g++)(0,u[g])(l)},function(g){for(m.status="rejected",m.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),m}var m5=V.S;V.S=function(r,l){K4=Ct(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&lE(r,l),m5!==null&&m5(r,l)};var ml=R(null);function ap(){var r=ml.current;return r!==null?r:Ot.pooledCache}function pd(r,l){l===null?P(ml,ml.current):P(ml,l.pool)}function f5(){var r=ap();return r===null?null:{parent:yn._currentValue,pool:r}}var fo=Error(a(460)),rp=Error(a(474)),xd=Error(a(542)),gd={then:function(){}};function p5(r){return r=r.status,r==="fulfilled"||r==="rejected"}function x5(r,l,u){switch(u=r[u],u===void 0?r.push(l):u!==l&&(l.then(bs,bs),l=u),l.status){case"fulfilled":return l.value;case"rejected":throw r=l.reason,b5(r),r;default:if(typeof l.status=="string")l.then(bs,bs);else{if(r=Ot,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=l,r.status="pending",r.then(function(m){if(l.status==="pending"){var g=l;g.status="fulfilled",g.value=m}},function(m){if(l.status==="pending"){var g=l;g.status="rejected",g.reason=m}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw r=l.reason,b5(r),r}throw pl=l,fo}}function fl(r){try{var l=r._init;return l(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(pl=u,fo):u}}var pl=null;function g5(){if(pl===null)throw Error(a(459));var r=pl;return pl=null,r}function b5(r){if(r===fo||r===xd)throw Error(a(483))}var po=null,Xc=0;function bd(r){var l=Xc;return Xc+=1,po===null&&(po=[]),x5(po,r,l)}function Kc(r,l){l=l.props.ref,r.ref=l!==void 0?l:null}function yd(r,l){throw l.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(l),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":r)))}function y5(r){function l(ee,X){if(r){var se=ee.deletions;se===null?(ee.deletions=[X],ee.flags|=16):se.push(X)}}function u(ee,X){if(!r)return null;for(;X!==null;)l(ee,X),X=X.sibling;return null}function m(ee){for(var X=new Map;ee!==null;)ee.key!==null?X.set(ee.key,ee):X.set(ee.index,ee),ee=ee.sibling;return X}function g(ee,X){return ee=vs(ee,X),ee.index=0,ee.sibling=null,ee}function y(ee,X,se){return ee.index=se,r?(se=ee.alternate,se!==null?(se=se.index,se<X?(ee.flags|=67108866,X):se):(ee.flags|=67108866,X)):(ee.flags|=1048576,X)}function A(ee){return r&&ee.alternate===null&&(ee.flags|=67108866),ee}function O(ee,X,se,fe){return X===null||X.tag!==6?(X=Gf(se,ee.mode,fe),X.return=ee,X):(X=g(X,se),X.return=ee,X)}function G(ee,X,se,fe){var $e=se.type;return $e===j?me(ee,X,se.props.children,fe,se.key):X!==null&&(X.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===F&&fl($e)===X.type)?(X=g(X,se.props),Kc(X,se),X.return=ee,X):(X=dd(se.type,se.key,se.props,null,ee.mode,fe),Kc(X,se),X.return=ee,X)}function ie(ee,X,se,fe){return X===null||X.tag!==4||X.stateNode.containerInfo!==se.containerInfo||X.stateNode.implementation!==se.implementation?(X=Yf(se,ee.mode,fe),X.return=ee,X):(X=g(X,se.children||[]),X.return=ee,X)}function me(ee,X,se,fe,$e){return X===null||X.tag!==7?(X=cl(se,ee.mode,fe,$e),X.return=ee,X):(X=g(X,se),X.return=ee,X)}function pe(ee,X,se){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Gf(""+X,ee.mode,se),X.return=ee,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return se=dd(X.type,X.key,X.props,null,ee.mode,se),Kc(se,X),se.return=ee,se;case N:return X=Yf(X,ee.mode,se),X.return=ee,X;case F:return X=fl(X),pe(ee,X,se)}if(H(X)||re(X))return X=cl(X,ee.mode,se,null),X.return=ee,X;if(typeof X.then=="function")return pe(ee,bd(X),se);if(X.$$typeof===k)return pe(ee,fd(ee,X),se);yd(ee,X)}return null}function oe(ee,X,se,fe){var $e=X!==null?X.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return $e!==null?null:O(ee,X,""+se,fe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return se.key===$e?G(ee,X,se,fe):null;case N:return se.key===$e?ie(ee,X,se,fe):null;case F:return se=fl(se),oe(ee,X,se,fe)}if(H(se)||re(se))return $e!==null?null:me(ee,X,se,fe,null);if(typeof se.then=="function")return oe(ee,X,bd(se),fe);if(se.$$typeof===k)return oe(ee,X,fd(ee,se),fe);yd(ee,se)}return null}function ce(ee,X,se,fe,$e){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return ee=ee.get(se)||null,O(X,ee,""+fe,$e);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:return ee=ee.get(fe.key===null?se:fe.key)||null,G(X,ee,fe,$e);case N:return ee=ee.get(fe.key===null?se:fe.key)||null,ie(X,ee,fe,$e);case F:return fe=fl(fe),ce(ee,X,se,fe,$e)}if(H(fe)||re(fe))return ee=ee.get(se)||null,me(X,ee,fe,$e,null);if(typeof fe.then=="function")return ce(ee,X,se,bd(fe),$e);if(fe.$$typeof===k)return ce(ee,X,se,fd(X,fe),$e);yd(X,fe)}return null}function Pe(ee,X,se,fe){for(var $e=null,xt=null,qe=X,nt=X=0,ht=null;qe!==null&&nt<se.length;nt++){qe.index>nt?(ht=qe,qe=null):ht=qe.sibling;var gt=oe(ee,qe,se[nt],fe);if(gt===null){qe===null&&(qe=ht);break}r&&qe&>.alternate===null&&l(ee,qe),X=y(gt,X,nt),xt===null?$e=gt:xt.sibling=gt,xt=gt,qe=ht}if(nt===se.length)return u(ee,qe),mt&&ws(ee,nt),$e;if(qe===null){for(;nt<se.length;nt++)qe=pe(ee,se[nt],fe),qe!==null&&(X=y(qe,X,nt),xt===null?$e=qe:xt.sibling=qe,xt=qe);return mt&&ws(ee,nt),$e}for(qe=m(qe);nt<se.length;nt++)ht=ce(qe,ee,nt,se[nt],fe),ht!==null&&(r&&ht.alternate!==null&&qe.delete(ht.key===null?nt:ht.key),X=y(ht,X,nt),xt===null?$e=ht:xt.sibling=ht,xt=ht);return r&&qe.forEach(function(vi){return l(ee,vi)}),mt&&ws(ee,nt),$e}function We(ee,X,se,fe){if(se==null)throw Error(a(151));for(var $e=null,xt=null,qe=X,nt=X=0,ht=null,gt=se.next();qe!==null&&!gt.done;nt++,gt=se.next()){qe.index>nt?(ht=qe,qe=null):ht=qe.sibling;var vi=oe(ee,qe,gt.value,fe);if(vi===null){qe===null&&(qe=ht);break}r&&qe&&vi.alternate===null&&l(ee,qe),X=y(vi,X,nt),xt===null?$e=vi:xt.sibling=vi,xt=vi,qe=ht}if(gt.done)return u(ee,qe),mt&&ws(ee,nt),$e;if(qe===null){for(;!gt.done;nt++,gt=se.next())gt=pe(ee,gt.value,fe),gt!==null&&(X=y(gt,X,nt),xt===null?$e=gt:xt.sibling=gt,xt=gt);return mt&&ws(ee,nt),$e}for(qe=m(qe);!gt.done;nt++,gt=se.next())gt=ce(qe,ee,nt,gt.value,fe),gt!==null&&(r&>.alternate!==null&&qe.delete(gt.key===null?nt:gt.key),X=y(gt,X,nt),xt===null?$e=gt:xt.sibling=gt,xt=gt);return r&&qe.forEach(function(yT){return l(ee,yT)}),mt&&ws(ee,nt),$e}function Dt(ee,X,se,fe){if(typeof se=="object"&&se!==null&&se.type===j&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case v:e:{for(var $e=se.key;X!==null;){if(X.key===$e){if($e=se.type,$e===j){if(X.tag===7){u(ee,X.sibling),fe=g(X,se.props.children),fe.return=ee,ee=fe;break e}}else if(X.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===F&&fl($e)===X.type){u(ee,X.sibling),fe=g(X,se.props),Kc(fe,se),fe.return=ee,ee=fe;break e}u(ee,X);break}else l(ee,X);X=X.sibling}se.type===j?(fe=cl(se.props.children,ee.mode,fe,se.key),fe.return=ee,ee=fe):(fe=dd(se.type,se.key,se.props,null,ee.mode,fe),Kc(fe,se),fe.return=ee,ee=fe)}return A(ee);case N:e:{for($e=se.key;X!==null;){if(X.key===$e)if(X.tag===4&&X.stateNode.containerInfo===se.containerInfo&&X.stateNode.implementation===se.implementation){u(ee,X.sibling),fe=g(X,se.children||[]),fe.return=ee,ee=fe;break e}else{u(ee,X);break}else l(ee,X);X=X.sibling}fe=Yf(se,ee.mode,fe),fe.return=ee,ee=fe}return A(ee);case F:return se=fl(se),Dt(ee,X,se,fe)}if(H(se))return Pe(ee,X,se,fe);
vendor: 6,518 bytes, line 48
48if(re(se)){if($e=re(se),typeof $e!="function")throw Error(a(150));return se=$e.call(se),We(ee,X,se,fe)}if(typeof se.then=="function")return Dt(ee,X,bd(se),fe);if(se.$$typeof===k)return Dt(ee,X,fd(ee,se),fe);yd(ee,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,X!==null&&X.tag===6?(u(ee,X.sibling),fe=g(X,se),fe.return=ee,ee=fe):(u(ee,X),fe=Gf(se,ee.mode,fe),fe.return=ee,ee=fe),A(ee)):u(ee,X)}return function(ee,X,se,fe){try{Xc=0;var $e=Dt(ee,X,se,fe);return po=null,$e}catch(qe){if(qe===fo||qe===xd)throw qe;var xt=Oa(29,qe,null,ee.mode);return xt.lanes=fe,xt.return=ee,xt}finally{}}}var xl=y5(!0),v5=y5(!1),ai=!1;function sp(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ip(r,l){r=r.updateQueue,l.updateQueue===r&&(l.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ri(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function si(r,l,u){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(wt&2)!==0){var g=m.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),m.pending=l,l=ud(r),a5(r,null,u),l}return cd(r,m,l,u),ud(r)}function Qc(r,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194048)!==0)){var m=l.lanes;m&=r.pendingLanes,u|=m,l.lanes=u,_c(r,u)}}function lp(r,l){var u=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};y===null?g=y=A:y=y.next=A,u=u.next}while(u!==null);y===null?g=y=l:y=y.next=l}else g=y=l;u={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:m.shared,callbacks:m.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=l:r.next=l,u.lastBaseUpdate=l}var op=!1;function Jc(){if(op){var r=mo;if(r!==null)throw r}}function Zc(r,l,u,m){op=!1;var g=r.updateQueue;ai=!1;var y=g.firstBaseUpdate,A=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var G=O,ie=G.next;G.next=null,A===null?y=ie:A.next=ie,A=G;var me=r.alternate;me!==null&&(me=me.updateQueue,O=me.lastBaseUpdate,O!==A&&(O===null?me.firstBaseUpdate=ie:O.next=ie,me.lastBaseUpdate=G))}if(y!==null){var pe=g.baseState;A=0,me=ie=G=null,O=y;do{var oe=O.lane&-536870913,ce=oe!==O.lane;if(ce?(dt&oe)===oe:(m&oe)===oe){oe!==0&&oe===ho&&(op=!0),me!==null&&(me=me.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Pe=r,We=O;oe=l;var Dt=u;switch(We.tag){case 1:if(Pe=We.payload,typeof Pe=="function"){pe=Pe.call(Dt,pe,oe);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=We.payload,oe=typeof Pe=="function"?Pe.call(Dt,pe,oe):Pe,oe==null)break e;pe=x({},pe,oe);break e;case 2:ai=!0}}oe=O.callback,oe!==null&&(r.flags|=64,ce&&(r.flags|=8192),ce=g.callbacks,ce===null?g.callbacks=[oe]:ce.push(oe))}else ce={lane:oe,tag:O.tag,payload:O.payload,callback:O.callback,next:null},me===null?(ie=me=ce,G=pe):me=me.next=ce,A|=oe;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ce=O,O=ce.next,ce.next=null,g.lastBaseUpdate=ce,g.shared.pending=null}}while(!0);me===null&&(G=pe),g.baseState=G,g.firstBaseUpdate=ie,g.lastBaseUpdate=me,y===null&&(g.shared.lanes=0),ui|=A,r.lanes=A,r.memoizedState=pe}}function w5(r,l){if(typeof r!="function")throw Error(a(191,r));r.call(l)}function S5(r,l){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)w5(u[r],l)}var xo=R(null),vd=R(0);function N5(r,l){r=zs,P(vd,r),P(xo,l),zs=r|l.baseLanes}function cp(){P(vd,zs),P(xo,xo.current)}function up(){zs=vd.current,J(xo),J(vd)}var La=R(null),dr=null;function ii(r){var l=r.alternate;P(dn,dn.current&1),P(La,r),dr===null&&(l===null||xo.current!==null||l.memoizedState!==null)&&(dr=r)}function dp(r){P(dn,dn.current),P(La,r),dr===null&&(dr=r)}function j5(r){r.tag===22?(P(dn,dn.current),P(La,r),dr===null&&(dr=r)):li()}function li(){P(dn,dn.current),P(La,La.current)}function Pa(r){J(La),dr===r&&(dr=null),J(dn)}var dn=R(0);function wd(r){for(var l=r;l!==null;){if(l.tag===13){var u=l.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||gx(u)||bx(u)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break;for(;l.sibling===null;){if(l.return===null||l.return===r)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var js=0,tt=null,zt=null,vn=null,Sd=!1,go=!1,gl=!1,Nd=0,eu=0,bo=null,cE=0;function an(){throw Error(a(321))}function hp(r,l){if(l===null)return!1;for(var u=0;u<l.length&&u<r.length;u++)if(!Ra(r[u],l[u]))return!1;return!0}function mp(r,l,u,m,g,y){return js=y,tt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,V.H=r===null||r.memoizedState===null?l4:Ep,gl=!1,y=u(m,g),gl=!1,go&&(y=C5(l,u,m,g)),k5(r),y}function k5(r){V.H=au;var l=zt!==null&&zt.next!==null;if(js=0,vn=zt=tt=null,Sd=!1,eu=0,bo=null,l)throw Error(a(300));r===null||wn||(r=r.dependencies,r!==null&&md(r)&&(wn=!0))}function C5(r,l,u,m){tt=r;var g=0;do{if(go&&(bo=null),eu=0,go=!1,25<=g)throw Error(a(301));if(g+=1,vn=zt=null,r.updateQueue!=null){var y=r.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}V.H=o4,y=l(u,m)}while(go);return y}function uE(){var r=V.H,l=r.useState()[0];return l=typeof l.then=="function"?tu(l):l,r=r.useState()[0],(zt!==null?zt.memoizedState:null)!==r&&(tt.flags|=1024),l}function fp(){var r=Nd!==0;return Nd=0,r}function pp(r,l,u){l.updateQueue=r.updateQueue,l.flags&=-2053,r.lanes&=~u}function xp(r){if(Sd){for(r=r.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Sd=!1}js=0,vn=zt=tt=null,go=!1,eu=Nd=0,bo=null}function da(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vn===null?tt.memoizedState=vn=r:vn=vn.next=r,vn}function hn(){if(zt===null){var r=tt.alternate;r=r!==null?r.memoizedState:null}else r=zt.next;var l=vn===null?tt.memoizedState:vn.next;if(l!==null)vn=l,zt=r;else{if(r===null)throw tt.alternate===null?Error(a(467)):Error(a(310));zt=r,r={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},vn===null?tt.memoizedState=vn=r:vn=vn.next=r}return vn}
vendor: 17,256 bytes, line 48
48function jd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tu(r){var l=eu;return eu+=1,bo===null&&(bo=[]),r=x5(bo,r,l),l=tt,(vn===null?l.memoizedState:vn.next)===null&&(l=l.alternate,V.H=l===null||l.memoizedState===null?l4:Ep),r}function kd(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return tu(r);if(r.$$typeof===k)return Wn(r)}throw Error(a(438,String(r)))}function gp(r){var l=null,u=tt.updateQueue;if(u!==null&&(l=u.memoCache),l==null){var m=tt.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(l={data:m.data.map(function(g){return g.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),u===null&&(u=jd(),tt.updateQueue=u),u.memoCache=l,u=l.data[l.index],u===void 0)for(u=l.data[l.index]=Array(r),m=0;m<r;m++)u[m]=ae;return l.index++,u}function ks(r,l){return typeof l=="function"?l(r):l}function Cd(r){var l=hn();return bp(l,zt,r)}function bp(r,l,u){var m=r.queue;if(m===null)throw Error(a(311));m.lastRenderedReducer=u;var g=r.baseQueue,y=m.pending;if(y!==null){if(g!==null){var A=g.next;g.next=y.next,y.next=A}l.baseQueue=g=y,m.pending=null}if(y=r.baseState,g===null)r.memoizedState=y;else{l=g.next;var O=A=null,G=null,ie=l,me=!1;do{var pe=ie.lane&-536870913;if(pe!==ie.lane?(dt&pe)===pe:(js&pe)===pe){var oe=ie.revertLane;if(oe===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),pe===ho&&(me=!0);else if((js&oe)===oe){ie=ie.next,oe===ho&&(me=!0);continue}else pe={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},G===null?(O=G=pe,A=y):G=G.next=pe,tt.lanes|=oe,ui|=oe;pe=ie.action,gl&&u(y,pe),y=ie.hasEagerState?ie.eagerState:u(y,pe)}else oe={lane:pe,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},G===null?(O=G=oe,A=y):G=G.next=oe,tt.lanes|=pe,ui|=pe;ie=ie.next}while(ie!==null&&ie!==l);if(G===null?A=y:G.next=O,!Ra(y,r.memoizedState)&&(wn=!0,me&&(u=mo,u!==null)))throw u;r.memoizedState=y,r.baseState=A,r.baseQueue=G,m.lastRenderedState=y}return g===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function yp(r){var l=hn(),u=l.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=r;var m=u.dispatch,g=u.pending,y=l.memoizedState;if(g!==null){u.pending=null;var A=g=g.next;do y=r(y,A.action),A=A.next;while(A!==g);Ra(y,l.memoizedState)||(wn=!0),l.memoizedState=y,l.baseQueue===null&&(l.baseState=y),u.lastRenderedState=y}return[y,m]}function A5(r,l,u){var m=tt,g=hn(),y=mt;if(y){if(u===void 0)throw Error(a(407));u=u()}else u=l();var A=!Ra((zt||g).memoizedState,u);if(A&&(g.memoizedState=u,wn=!0),g=g.queue,Sp(M5.bind(null,m,g,r),[r]),g.getSnapshot!==l||A||vn!==null&&vn.memoizedState.tag&1){if(m.flags|=2048,yo(9,{destroy:void 0},T5.bind(null,m,g,u,l),null),Ot===null)throw Error(a(349));y||(js&127)!==0||E5(m,l,u)}return u}function E5(r,l,u){r.flags|=16384,r={getSnapshot:l,value:u},l=tt.updateQueue,l===null?(l=jd(),tt.updateQueue=l,l.stores=[r]):(u=l.stores,u===null?l.stores=[r]:u.push(r))}function T5(r,l,u,m){l.value=u,l.getSnapshot=m,I5(l)&&z5(r)}function M5(r,l,u){return u(function(){I5(l)&&z5(r)})}function I5(r){var l=r.getSnapshot;r=r.value;try{var u=l();return!Ra(r,u)}catch{return!0}}function z5(r){var l=ol(r,2);l!==null&&Ca(l,r,2)}function vp(r){var l=da();if(typeof r=="function"){var u=r;if(r=u(),gl){In(!0);try{u()}finally{In(!1)}}}return l.memoizedState=l.baseState=r,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:r},l}function _5(r,l,u,m){return r.baseState=u,bp(r,zt,typeof m=="function"?m:ks)}function dE(r,l,u,m,g){if(Td(r))throw Error(a(485));if(r=l.action,r!==null){var y={payload:g,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};V.T!==null?u(!0):y.isTransition=!1,m(y),u=l.pending,u===null?(y.next=l.pending=y,D5(l,y)):(y.next=u.next,l.pending=u.next=y)}}function D5(r,l){var u=l.action,m=l.payload,g=r.state;if(l.isTransition){var y=V.T,A={};V.T=A;try{var O=u(g,m),G=V.S;G!==null&&G(A,O),B5(r,l,O)}catch(ie){wp(r,l,ie)}finally{y!==null&&A.types!==null&&(y.types=A.types),V.T=y}}else try{y=u(g,m),B5(r,l,y)}catch(ie){wp(r,l,ie)}}function B5(r,l,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){R5(r,l,m)},function(m){return wp(r,l,m)}):R5(r,l,u)}function R5(r,l,u){l.status="fulfilled",l.value=u,O5(l),r.state=u,l=r.pending,l!==null&&(u=l.next,u===l?r.pending=null:(u=u.next,l.next=u,D5(r,u)))}function wp(r,l,u){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do l.status="rejected",l.reason=u,O5(l),l=l.next;while(l!==m)}r.action=null}function O5(r){r=r.listeners;for(var l=0;l<r.length;l++)(0,r[l])()}function L5(r,l){return l}function P5(r,l){if(mt){var u=Ot.formState;if(u!==null){e:{var m=tt;if(mt){if(Vt){t:{for(var g=Vt,y=ur;g.nodeType!==8;){if(!y){g=null;break t}if(g=hr(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){Vt=hr(g.nextSibling),m=g.data==="F!";break e}}ti(m)}m=!1}m&&(l=u[0])}}return u=da(),u.memoizedState=u.baseState=l,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:L5,lastRenderedState:l},u.queue=m,u=r4.bind(null,tt,m),m.dispatch=u,m=vp(!1),y=Ap.bind(null,tt,!1,m.queue),m=da(),g={state:l,dispatch:null,action:r,pending:null},m.queue=g,u=dE.bind(null,tt,g,y,u),g.dispatch=u,m.memoizedState=r,[l,u,!1]}function U5(r){var l=hn();return F5(l,zt,r)}function F5(r,l,u){if(l=bp(r,l,L5)[0],r=Cd(ks)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var m=tu(l)}catch(A){throw A===fo?xd:A}else m=l;l=hn();var g=l.queue,y=g.dispatch;return u!==l.memoizedState&&(tt.flags|=2048,yo(9,{destroy:void 0},hE.bind(null,g,u),null)),[m,y,r]}function hE(r,l){r.action=l}function V5(r){var l=hn(),u=zt;if(u!==null)return F5(l,u,r);hn(),l=l.memoizedState,u=hn();var m=u.queue.dispatch;return u.memoizedState=r,[l,m,!1]}function yo(r,l,u,m){return r={tag:r,create:u,deps:m,inst:l,next:null},l=tt.updateQueue,l===null&&(l=jd(),tt.updateQueue=l),u=l.lastEffect,u===null?l.lastEffect=r.next=r:(m=u.next,u.next=r,r.next=m,l.lastEffect=r),r}function q5(){return hn().memoizedState}function Ad(r,l,u,m){var g=da();tt.flags|=r,g.memoizedState=yo(1|l,{destroy:void 0},u,m===void 0?null:m)}function Ed(r,l,u,m){var g=hn();m=m===void 0?null:m;var y=g.memoizedState.inst;zt!==null&&m!==null&&hp(m,zt.memoizedState.deps)?g.memoizedState=yo(l,y,u,m):(tt.flags|=r,g.memoizedState=yo(1|l,y,u,m))}function H5(r,l){Ad(8390656,8,r,l)}function Sp(r,l){Ed(2048,8,r,l)}function mE(r){tt.flags|=4;var l=tt.updateQueue;if(l===null)l=jd(),tt.updateQueue=l,l.events=[r];else{var u=l.events;u===null?l.events=[r]:u.push(r)}}function $5(r){var l=hn().memoizedState;return mE({ref:l,nextImpl:r}),function(){if((wt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}function G5(r,l){return Ed(4,2,r,l)}function Y5(r,l){return Ed(4,4,r,l)}function W5(r,l){if(typeof l=="function"){r=r();var u=l(r);return function(){typeof u=="function"?u():l(null)}}if(l!=null)return r=r(),l.current=r,function(){l.current=null}}function X5(r,l,u){u=u!=null?u.concat([r]):null,Ed(4,4,W5.bind(null,l,r),u)}function Np(){}function K5(r,l){var u=hn();l=l===void 0?null:l;var m=u.memoizedState;return l!==null&&hp(l,m[1])?m[0]:(u.memoizedState=[r,l],r)}function Q5(r,l){var u=hn();l=l===void 0?null:l;var m=u.memoizedState;if(l!==null&&hp(l,m[1]))return m[0];if(m=r(),gl){In(!0);try{r()}finally{In(!1)}}return u.memoizedState=[m,l],m}function jp(r,l,u){return u===void 0||(js&1073741824)!==0&&(dt&261930)===0?r.memoizedState=l:(r.memoizedState=u,r=J4(),tt.lanes|=r,ui|=r,u)}function J5(r,l,u,m){return Ra(u,l)?u:xo.current!==null?(r=jp(r,u,m),Ra(r,l)||(wn=!0),r):(js&42)===0||(js&1073741824)!==0&&(dt&261930)===0?(wn=!0,r.memoizedState=u):(r=J4(),tt.lanes|=r,ui|=r,l)}function Z5(r,l,u,m,g){var y=ne.p;ne.p=y!==0&&8>y?y:8;var A=V.T,O={};V.T=O,Ap(r,!1,l,u);try{var G=g(),ie=V.S;if(ie!==null&&ie(O,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=oE(G,m);nu(r,l,me,Va(r))}else nu(r,l,m,Va(r))}catch(pe){nu(r,l,{then:function(){},status:"rejected",reason:pe},Va())}finally{ne.p=y,A!==null&&O.types!==null&&(A.types=O.types),V.T=A}}function fE(){}function kp(r,l,u,m){if(r.tag!==5)throw Error(a(476));var g=e4(r).queue;Z5(r,g,l,Z,u===null?fE:function(){return t4(r),u(m)})}function e4(r){var l=r.memoizedState;if(l!==null)return l;l={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:Z},next:null};var u={};return l.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:u},next:null},r.memoizedState=l,r=r.alternate,r!==null&&(r.memoizedState=l),l}function t4(r){var l=e4(r);l.next===null&&(l=r.alternate.memoizedState),nu(r,l.next.queue,{},Va())}function Cp(){return Wn(yu)}function n4(){return hn().memoizedState}function a4(){return hn().memoizedState}function pE(r){for(var l=r.return;l!==null;){switch(l.tag){case 24:case 3:var u=Va();r=ri(u);var m=si(l,r,u);m!==null&&(Ca(m,l,u),Qc(m,l,u)),l={cache:tp()},r.payload=l;return}l=l.return}}function xE(r,l,u){var m=Va();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Td(r)?s4(l,u):(u=Hf(r,l,u,m),u!==null&&(Ca(u,r,m),i4(u,l,m)))}function r4(r,l,u){var m=Va();nu(r,l,u,m)}function nu(r,l,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Td(r))s4(l,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=l.lastRenderedReducer,y!==null))try{var A=l.lastRenderedState,O=y(A,u);if(g.hasEagerState=!0,g.eagerState=O,Ra(O,A))return cd(r,l,g,0),Ot===null&&od(),!1}catch{}finally{}if(u=Hf(r,l,g,m),u!==null)return Ca(u,r,m),i4(u,l,m),!0}return!1}function Ap(r,l,u,m){if(m={lane:2,revertLane:sx(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Td(r)){if(l)throw Error(a(479))}else l=Hf(r,u,m,2),l!==null&&Ca(l,r,2)}function Td(r){var l=r.alternate;return r===tt||l!==null&&l===tt}function s4(r,l){go=Sd=!0;var u=r.pending;u===null?l.next=l:(l.next=u.next,u.next=l),r.pending=l}function i4(r,l,u){if((u&4194048)!==0){var m=l.lanes;m&=r.pendingLanes,u|=m,l.lanes=u,_c(r,u)}}var au={readContext:Wn,use:kd,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useLayoutEffect:an,useInsertionEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useSyncExternalStore:an,useId:an,useHostTransitionStatus:an,useFormState:an,useActionState:an,useOptimistic:an,useMemoCache:an,useCacheRefresh:an};au.useEffectEvent=an;var l4={readContext:Wn,use:kd,useCallback:function(r,l){return da().memoizedState=[r,l===void 0?null:l],r},useContext:Wn,useEffect:H5,useImperativeHandle:function(r,l,u){u=u!=null?u.concat([r]):null,Ad(4194308,4,W5.bind(null,l,r),u)},useLayoutEffect:function(r,l){return Ad(4194308,4,r,l)},useInsertionEffect:function(r,l){Ad(4,2,r,l)},useMemo:function(r,l){var u=da();l=l===void 0?null:l;var m=r();if(gl){In(!0);try{r()}finally{In(!1)}}return u.memoizedState=[m,l],m},useReducer:function(r,l,u){var m=da();if(u!==void 0){var g=u(l);if(gl){In(!0);try{u(l)}finally{In(!1)}}}else g=l;return m.memoizedState=m.baseState=g,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:g},m.queue=r,r=r.dispatch=xE.bind(null,tt,r),[m.memoizedState,r]},useRef:function(r){var l=da();return r={current:r},l.memoizedState=r},useState:function(r){r=vp(r);var l=r.queue,u=r4.bind(null,tt,l);return l.dispatch=u,[r.memoizedState,u]},useDebugValue:Np,useDeferredValue:function(r,l){var u=da();return jp(u,r,l)},useTransition:function(){var r=vp(!1);return r=Z5.bind(null,tt,r.queue,!0,!1),da().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,l,u){var m=tt,g=da();if(mt){if(u===void 0)throw Error(a(407));u=u()}else{if(u=l(),Ot===null)throw Error(a(349));(dt&127)!==0||E5(m,l,u)}g.memoizedState=u;var y={value:u,getSnapshot:l};return g.queue=y,H5(M5.bind(null,m,y,r),[r]),m.flags|=2048,yo(9,{destroy:void 0},T5.bind(null,m,y,u,l),null),u},useId:function(){var r=da(),l=Ot.identifierPrefix;if(mt){var u=qr,m=Vr;u=(m&~(1<<32-Tt(m)-1)).toString(32)+u,l="_"+l+"R_"+u,u=Nd++,0<u&&(l+="H"+u.toString(32)),l+="_"}else u=cE++,l="_"+l+"r_"+u.toString(32)+"_";return r.memoizedState=l},useHostTransitionStatus:Cp,useFormState:P5,useActionState:P5,useOptimistic:function(r){var l=da();l.memoizedState=l.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=u,l=Ap.bind(null,tt,!0,u),u.dispatch=l,[r,l]},useMemoCache:gp,useCacheRefresh:function(){return da().memoizedState=pE.bind(null,tt)},useEffectEvent:function(r){var l=da(),u={impl:r};return l.memoizedState=u,function(){if((wt&2)!==0)throw Error(a(440));return u.impl.apply(void 0,arguments)}}},Ep={readContext:Wn,use:kd,useCallback:K5,useContext:Wn,useEffect:Sp,useImperativeHandle:X5,useInsertionEffect:G5,useLayoutEffect:Y5,useMemo:Q5,useReducer:Cd,useRef:q5,useState:function(){return Cd(ks)},useDebugValue:Np,useDeferredValue:function(r,l){var u=hn();return J5(u,zt.memoizedState,r,l)},useTransition:function(){var r=Cd(ks)[0],l=hn().memoizedState;return[typeof r=="boolean"?r:tu(r),l]},useSyncExternalStore:A5,useId:n4,useHostTransitionStatus:Cp,useFormState:U5,useActionState:U5,useOptimistic:function(r,l){var u=hn();return _5(u,zt,r,l)},useMemoCache:gp,useCacheRefresh:a4};Ep.useEffectEvent=$5;var o4={readContext:Wn,use:kd,useCallback:K5,useContext:Wn,useEffect:Sp,useImperativeHandle:X5,useInsertionEffect:G5,useLayoutEffect:Y5,useMemo:Q5,useReducer:yp,useRef:q5,useState:function(){return yp(ks)},useDebugValue:Np,useDeferredValue:function(r,l){var u=hn();return zt===null?jp(u,r,l):J5(u,zt.memoizedState,r,l)},useTransition:function(){var r=yp(ks)[0],l=hn().memoizedState;return[typeof r=="boolean"?r:tu(r),l]},useSyncExternalStore:A5,useId:n4,useHostTransitionStatus:Cp,useFormState:V5,useActionState:V5,useOptimistic:function(r,l){var u=hn();return zt!==null?_5(u,zt,r,l):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:gp,useCacheRefresh:a4};o4.useEffectEvent=$5;function Tp(r,l,u,m){l=r.memoizedState,u=u(m,l),u=u==null?l:x({},l,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Mp={enqueueSetState:function(r,l,u){r=r._reactInternals;var m=Va(),g=ri(m);g.payload=l,u!=null&&(g.callback=u),l=si(r,g,m),l!==null&&(Ca(l,r,m),Qc(l,r,m))},enqueueReplaceState:function(r,l,u){r=r._reactInternals;var m=Va(),g=ri(m);g.tag=1,g.payload=l,u!=null&&(g.callback=u),l=si(r,g,m),l!==null&&(Ca(l,r,m),Qc(l,r,m))},enqueueForceUpdate:function(r,l){r=r._reactInternals;var u=Va(),m=ri(u);m.tag=2,l!=null&&(m.callback=l),l=si(r,m,u),l!==null&&(Ca(l,r,u),Qc(l,r,u))}};function c4(r,l,u,m,g,y,A){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,y,A):l.prototype&&l.prototype.isPureReactComponent?!qc(u,m)||!qc(g,y):!0}function u4(r,l,u,m){r=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(u,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(u,m),l.state!==r&&Mp.enqueueReplaceState(l,l.state,null)}function bl(r,l){var u=l;if("ref"in l){u={};for(var m in l)m!=="ref"&&(u[m]=l[m])}if(r=r.defaultProps){u===l&&(u=x({},u));for(var g in r)u[g]===void 0&&(u[g]=r[g])}return u}function d4(r){ld(r)}function h4(r){console.error(r)}function m4(r){ld(r)}function Md(r,l){try{var u=r.onUncaughtError;u(l.value,{componentStack:l.stack})}catch(m){setTimeout(function(){throw m})}}function f4(r,l,u){try{var m=r.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Ip(r,l,u){return u=ri(u),u.tag=3,u.payload={element:null},u.callback=function(){Md(r,l)},u}function p4(r){return r=ri(r),r.tag=3,r}function x4(r,l,u,m){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var y=m.value;r.payload=function(){return g(y)},r.callback=function(){f4(l,u,m)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(r.callback=function(){f4(l,u,m),typeof g!="function"&&(di===null?di=new Set([this]):di.add(this));var O=m.stack;this.componentDidCatch(m.value,{componentStack:O!==null?O:""})})}function gE(r,l,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(l=u.alternate,l!==null&&uo(l,u,g,!0),u=La.current,u!==null){switch(u.tag){case 31:case 13:return dr===null?Vd():u.alternate===null&&rn===0&&(rn=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===gd?u.flags|=16384:(l=u.updateQueue,l===null?u.updateQueue=new Set([m]):l.add(m),nx(r,m,g)),!1;case 22:return u.flags|=65536,m===gd?u.flags|=16384:(l=u.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=l):(u=l.retryQueue,u===null?l.retryQueue=new Set([m]):u.add(m)),nx(r,m,g)),!1}throw Error(a(435,u.tag))}return nx(r,m,g),Vd(),!1}if(mt)return l=La.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=g,m!==Kf&&(r=Error(a(422),{cause:m}),Gc(lr(r,u)))):(m!==Kf&&(l=Error(a(423),{cause:m}
vendor: 10,869 bytes, line 48
48),Gc(lr(l,u))),r=r.current.alternate,r.flags|=65536,g&=-g,r.lanes|=g,m=lr(m,u),g=Ip(r.stateNode,m,g),lp(r,g),rn!==4&&(rn=2)),!1;var y=Error(a(520),{cause:m});if(y=lr(y,u),du===null?du=[y]:du.push(y),rn!==4&&(rn=2),l===null)return!0;m=lr(m,u),u=l;do{switch(u.tag){case 3:return u.flags|=65536,r=g&-g,u.lanes|=r,r=Ip(u.stateNode,m,r),lp(u,r),!1;case 1:if(l=u.type,y=u.stateNode,(u.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(di===null||!di.has(y))))return u.flags|=65536,g&=-g,u.lanes|=g,g=p4(g),x4(g,r,u,m),lp(u,g),!1}u=u.return}while(u!==null);return!1}var zp=Error(a(461)),wn=!1;function Xn(r,l,u,m){l.child=r===null?v5(l,null,u,m):xl(l,r.child,u,m)}function g4(r,l,u,m,g){u=u.render;var y=l.ref;if("ref"in m){var A={};for(var O in m)O!=="ref"&&(A[O]=m[O])}else A=m;return hl(l),m=mp(r,l,u,A,y,g),O=fp(),r!==null&&!wn?(pp(r,l,g),Cs(r,l,g)):(mt&&O&&Wf(l),l.flags|=1,Xn(r,l,m,g),l.child)}function b4(r,l,u,m,g){if(r===null){var y=u.type;return typeof y=="function"&&!$f(y)&&y.defaultProps===void 0&&u.compare===null?(l.tag=15,l.type=y,y4(r,l,y,m,g)):(r=dd(u.type,null,m,l,l.mode,g),r.ref=l.ref,r.return=l,l.child=r)}if(y=r.child,!Up(r,g)){var A=y.memoizedProps;if(u=u.compare,u=u!==null?u:qc,u(A,m)&&r.ref===l.ref)return Cs(r,l,g)}return l.flags|=1,r=vs(y,m),r.ref=l.ref,r.return=l,l.child=r}function y4(r,l,u,m,g){if(r!==null){var y=r.memoizedProps;if(qc(y,m)&&r.ref===l.ref)if(wn=!1,l.pendingProps=m=y,Up(r,g))(r.flags&131072)!==0&&(wn=!0);else return l.lanes=r.lanes,Cs(r,l,g)}return _p(r,l,u,m,g)}function v4(r,l,u,m){var g=m.children,y=r!==null?r.memoizedState:null;if(r===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((l.flags&128)!==0){if(y=y!==null?y.baseLanes|u:u,r!==null){for(m=l.child=r.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;m=g&~y}else m=0,l.child=null;return w4(r,l,y,u,m)}if((u&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},r!==null&&pd(l,y!==null?y.cachePool:null),y!==null?N5(l,y):cp(),j5(l);else return m=l.lanes=536870912,w4(r,l,y!==null?y.baseLanes|u:u,u,m)}else y!==null?(pd(l,y.cachePool),N5(l,y),li(),l.memoizedState=null):(r!==null&&pd(l,null),cp(),li());return Xn(r,l,g,u),l.child}function ru(r,l){return r!==null&&r.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function w4(r,l,u,m,g){var y=ap();return y=y===null?null:{parent:yn._currentValue,pool:y},l.memoizedState={baseLanes:u,cachePool:y},r!==null&&pd(l,null),cp(),j5(l),r!==null&&uo(r,l,m,!0),l.childLanes=g,null}function Id(r,l){return l=_d({mode:l.mode,children:l.children},r.mode),l.ref=r.ref,r.child=l,l.return=r,l}function S4(r,l,u){return xl(l,r.child,null,u),r=Id(l,l.pendingProps),r.flags|=2,Pa(l),l.memoizedState=null,r}function bE(r,l,u){var m=l.pendingProps,g=(l.flags&128)!==0;if(l.flags&=-129,r===null){if(mt){if(m.mode==="hidden")return r=Id(l,m),l.lanes=536870912,ru(null,r);if(dp(l),(r=Vt)?(r=Dv(r,ur),r=r!==null&&r.data==="&"?r:null,r!==null&&(l.memoizedState={dehydrated:r,treeContext:Zs!==null?{id:Vr,overflow:qr}:null,retryLane:536870912,hydrationErrors:null},u=s5(r),u.return=l,l.child=u,Yn=l,Vt=null)):r=null,r===null)throw ti(l);return l.lanes=536870912,null}return Id(l,m)}var y=r.memoizedState;if(y!==null){var A=y.dehydrated;if(dp(l),g)if(l.flags&256)l.flags&=-257,l=S4(r,l,u);else if(l.memoizedState!==null)l.child=r.child,l.flags|=128,l=null;else throw Error(a(558));else if(wn||uo(r,l,u,!1),g=(u&r.childLanes)!==0,wn||g){if(m=Ot,m!==null&&(A=Dc(m,u),A!==0&&A!==y.retryLane))throw y.retryLane=A,ol(r,A),Ca(m,r,A),zp;Vd(),l=S4(r,l,u)}else r=y.treeContext,Vt=hr(A.nextSibling),Yn=l,mt=!0,ei=null,ur=!1,r!==null&&o5(l,r),l=Id(l,m),l.flags|=4096;return l}return r=vs(r.child,{mode:m.mode,children:m.children}),r.ref=l.ref,l.child=r,r.return=l,r}function zd(r,l){var u=l.ref;if(u===null)r!==null&&r.ref!==null&&(l.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(a(284));(r===null||r.ref!==u)&&(l.flags|=4194816)}}function _p(r,l,u,m,g){return hl(l),u=mp(r,l,u,m,void 0,g),m=fp(),r!==null&&!wn?(pp(r,l,g),Cs(r,l,g)):(mt&&m&&Wf(l),l.flags|=1,Xn(r,l,u,g),l.child)}function N4(r,l,u,m,g,y){return hl(l),l.updateQueue=null,u=C5(l,m,u,g),k5(r),m=fp(),r!==null&&!wn?(pp(r,l,y),Cs(r,l,y)):(mt&&m&&Wf(l),l.flags|=1,Xn(r,l,u,y),l.child)}function j4(r,l,u,m,g){if(hl(l),l.stateNode===null){var y=io,A=u.contextType;typeof A=="object"&&A!==null&&(y=Wn(A)),y=new u(m,y),l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Mp,l.stateNode=y,y._reactInternals=l,y=l.stateNode,y.props=m,y.state=l.memoizedState,y.refs={},sp(l),A=u.contextType,y.context=typeof A=="object"&&A!==null?Wn(A):io,y.state=l.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Tp(l,u,A,m),y.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&Mp.enqueueReplaceState(y,y.state,null),Zc(l,m,y,g),Jc(),y.state=l.memoizedState),typeof y.componentDidMount=="function"&&(l.flags|=4194308),m=!0}else if(r===null){y=l.stateNode;var O=l.memoizedProps,G=bl(u,O);y.props=G;var ie=y.context,me=u.contextType;A=io,typeof me=="object"&&me!==null&&(A=Wn(me));var pe=u.getDerivedStateFromProps;me=typeof pe=="function"||typeof y.getSnapshotBeforeUpdate=="function",O=l.pendingProps!==O,me||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(O||ie!==A)&&u4(l,y,m,A),ai=!1;var oe=l.memoizedState;y.state=oe,Zc(l,m,y,g),Jc(),ie=l.memoizedState,O||oe!==ie||ai?(typeof pe=="function"&&(Tp(l,u,pe,m),ie=l.memoizedState),(G=ai||c4(l,u,G,m,oe,ie,A))?(me||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(l.flags|=4194308)):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=ie),y.props=m,y.state=ie,y.context=A,m=G):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{y=l.stateNode,ip(r,l),A=l.memoizedProps,me=bl(u,A),y.props=me,pe=l.pendingProps,oe=y.context,ie=u.contextType,G=io,typeof ie=="object"&&ie!==null&&(G=Wn(ie)),O=u.getDerivedStateFromProps,(ie=typeof O=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==pe||oe!==G)&&u4(l,y,m,G),ai=!1,oe=l.memoizedState,y.state=oe,Zc(l,m,y,g),Jc();var ce=l.memoizedState;A!==pe||oe!==ce||ai||r!==null&&r.dependencies!==null&&md(r.dependencies)?(typeof O=="function"&&(Tp(l,u,O,m),ce=l.memoizedState),(me=ai||c4(l,u,me,m,oe,ce,G)||r!==null&&r.dependencies!==null&&md(r.dependencies))?(ie||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(m,ce,G),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(m,ce,G)),typeof y.componentDidUpdate=="function"&&(l.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=ce),y.props=m,y.state=ce,y.context=G,m=me):(typeof y.componentDidUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(l.flags|=1024),m=!1)}return y=m,zd(r,l),m=(l.flags&128)!==0,y||m?(y=l.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:y.render(),l.flags|=1,r!==null&&m?(l.child=xl(l,r.child,null,g),l.child=xl(l,null,u,g)):Xn(r,l,u,g),l.memoizedState=y.state,r=l.child):r=Cs(r,l,g),r}function k4(r,l,u,m){return ul(),l.flags|=256,Xn(r,l,u,m),l.child}var Dp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bp(r){return{baseLanes:r,cachePool:f5()}}function Rp(r,l,u){return r=r!==null?r.childLanes&~u:0,l&&(r|=Fa),r}function C4(r,l,u){var m=l.pendingProps,g=!1,y=(l.flags&128)!==0,A;if((A=y)||(A=r!==null&&r.memoizedState===null?!1:(dn.current&2)!==0),A&&(g=!0,l.flags&=-129),A=(l.flags&32)!==0,l.flags&=-33,r===null){if(mt){if(g?ii(l):li(),(r=Vt)?(r=Dv(r,ur),r=r!==null&&r.data!=="&"?r:null,r!==null&&(l.memoizedState={dehydrated:r,treeContext:Zs!==null?{id:Vr,overflow:qr}:null,retryLane:536870912,hydrationErrors:null},u=s5(r),u.return=l,l.child=u,Yn=l,Vt=null)):r=null,r===null)throw ti(l);return bx(r)?l.lanes=32:l.lanes=536870912,null}var O=m.children;return m=m.fallback,g?(li(),g=l.mode,O=_d({mode:"hidden",children:O},g),m=cl(m,g,u,null),O.return=l,m.return=l,O.sibling=m,l.child=O,m=l.child,m.memoizedState=Bp(u),m.childLanes=Rp(r,A,u),l.memoizedState=Dp,ru(null,m)):(ii(l),Op(l,O))}var G=r.memoizedState;if(G!==null&&(O=G.dehydrated,O!==null)){if(y)l.flags&256?(ii(l),l.flags&=-257,l=Lp(r,l,u)):l.memoizedState!==null?(li(),l.child=r.child,l.flags|=128,l=null):(li(),O=m.fallback,g=l.mode,m=_d({mode:"visible",children:m.children},g),O=cl(O,g,u,null),O.flags|=2,m.return=l,O.return=l,m.sibling=O,l.child=m,xl(l,r.child,null,u),m=l.child,m.memoizedState=Bp(u),m.childLanes=Rp(r,A,u),l.memoizedState=Dp,l=ru(null,m));else if(ii(l),bx(O)){if(A=O.nextSibling&&O.nextSibling.dataset,A)var ie=A.dgst;A=ie,m=Error(a(419)),m.stack="",m.digest=A,Gc({value:m,source:null,stack:null}),l=Lp(r,l,u)}else if(wn||uo(r,l,u,!1),A=(u&r.childLanes)!==0,wn||A){if(A=Ot,A!==null&&(m=Dc(A,u),m!==0&&m!==G.retryLane))throw G.retryLane=m,ol(r,m),Ca(A,r,m),zp;gx(O)||Vd(),l=Lp(r,l,u)}else gx(O)?(l.flags|=192,l.child=r.child,l=null):(r=G.treeContext,Vt=hr(O.nextSibling),Yn=l,mt=!0,ei=null,ur=!1,r!==null&&o5(l,r),l=Op(l,m.children),l.flags|=4096);return l}return g?(li(),O=m.fallback,g=l.mode,G=r.child,ie=G.sibling,m=vs(G,{mode:"hidden",children:m.children}),m.subtreeFlags=G.subtreeFlags&65011712,ie!==null?O=vs(ie,O):(O=cl(O,g,u,null),O.flags|=2),O.return=l,m.return=l,m.sibling=O,l.child=m,ru(null,m),m=l.child,O=r.child.memoizedState,O===null?O=Bp(u):(g=O.cachePool,g!==null?(G=yn._currentValue,g=g.parent!==G?{parent:G,pool:G}:g):g=f5(),O={baseLanes:O.baseLanes|u,cachePool:g}),m.memoizedState=O,m.childLanes=Rp(r,A,u),l.memoizedState=Dp,ru(r.child,m)):(ii(l),u=r.child,r=u.sibling,u=vs(u,{mode:"visible",children:m.children}
vendor: 6,079 bytes, line 48
48),u.return=l,u.sibling=null,r!==null&&(A=l.deletions,A===null?(l.deletions=[r],l.flags|=16):A.push(r)),l.child=u,l.memoizedState=null,u)}function Op(r,l){return l=_d({mode:"visible",children:l},r.mode),l.return=r,r.child=l}function _d(r,l){return r=Oa(22,r,null,l),r.lanes=0,r}function Lp(r,l,u){return xl(l,r.child,null,u),r=Op(l,l.pendingProps.children),r.flags|=2,l.memoizedState=null,r}function A4(r,l,u){r.lanes|=l;var m=r.alternate;m!==null&&(m.lanes|=l),Zf(r.return,l,u)}function Pp(r,l,u,m,g,y){var A=r.memoizedState;A===null?r.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:g,treeForkCount:y}:(A.isBackwards=l,A.rendering=null,A.renderingStartTime=0,A.last=m,A.tail=u,A.tailMode=g,A.treeForkCount=y)}function E4(r,l,u){var m=l.pendingProps,g=m.revealOrder,y=m.tail;m=m.children;var A=dn.current,O=(A&2)!==0;if(O?(A=A&1|2,l.flags|=128):A&=1,P(dn,A),Xn(r,l,m,u),m=mt?$c:0,!O&&r!==null&&(r.flags&128)!==0)e:for(r=l.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&A4(r,u,l);else if(r.tag===19)A4(r,u,l);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===l)break e;for(;r.sibling===null;){if(r.return===null||r.return===l)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(g){case"forwards":for(u=l.child,g=null;u!==null;)r=u.alternate,r!==null&&wd(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=l.child,l.child=null):(g=u.sibling,u.sibling=null),Pp(l,!1,g,u,y,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=l.child,l.child=null;g!==null;){if(r=g.alternate,r!==null&&wd(r)===null){l.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}Pp(l,!0,u,null,y,m);break;case"together":Pp(l,!1,null,null,void 0,m);break;default:l.memoizedState=null}return l.child}function Cs(r,l,u){if(r!==null&&(l.dependencies=r.dependencies),ui|=l.lanes,(u&l.childLanes)===0)if(r!==null){if(uo(r,l,u,!1),(u&l.childLanes)===0)return null}else return null;if(r!==null&&l.child!==r.child)throw Error(a(153));if(l.child!==null){for(r=l.child,u=vs(r,r.pendingProps),l.child=u,u.return=l;r.sibling!==null;)r=r.sibling,u=u.sibling=vs(r,r.pendingProps),u.return=l;u.sibling=null}return l.child}function Up(r,l){return(r.lanes&l)!==0?!0:(r=r.dependencies,!!(r!==null&&md(r)))}function yE(r,l,u){switch(l.tag){case 3:et(l,l.stateNode.containerInfo),ni(l,yn,r.memoizedState.cache),ul();break;case 27:case 5:kt(l);break;case 4:et(l,l.stateNode.containerInfo);break;case 10:ni(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,dp(l),null;break;case 13:var m=l.memoizedState;if(m!==null)return m.dehydrated!==null?(ii(l),l.flags|=128,null):(u&l.child.childLanes)!==0?C4(r,l,u):(ii(l),r=Cs(r,l,u),r!==null?r.sibling:null);ii(l);break;case 19:var g=(r.flags&128)!==0;if(m=(u&l.childLanes)!==0,m||(uo(r,l,u,!1),m=(u&l.childLanes)!==0),g){if(m)return E4(r,l,u);l.flags|=128}if(g=l.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),P(dn,dn.current),m)break;return null;case 22:return l.lanes=0,v4(r,l,u,l.pendingProps);case 24:ni(l,yn,r.memoizedState.cache)}return Cs(r,l,u)}function T4(r,l,u){if(r!==null)if(r.memoizedProps!==l.pendingProps)wn=!0;else{if(!Up(r,u)&&(l.flags&128)===0)return wn=!1,yE(r,l,u);wn=(r.flags&131072)!==0}else wn=!1,mt&&(l.flags&1048576)!==0&&l5(l,$c,l.index);switch(l.lanes=0,l.tag){case 16:e:{var m=l.pendingProps;if(r=fl(l.elementType),l.type=r,typeof r=="function")$f(r)?(m=bl(r,m),l.tag=1,l=j4(null,l,r,m,u)):(l.tag=0,l=_p(null,l,r,m,u));else{if(r!=null){var g=r.$$typeof;if(g===M){l.tag=11,l=g4(null,l,r,m,u);break e}else if(g===U){l.tag=14,l=b4(null,l,r,m,u);break e}}throw l=te(r)||r,Error(a(306,l,""))}}return l;case 0:return _p(r,l,l.type,l.pendingProps,u);case 1:return m=l.type,g=bl(m,l.pendingProps),j4(r,l,m,g,u);case 3:e:{if(et(l,l.stateNode.containerInfo),r===null)throw Error(a(387));m=l.pendingProps;var y=l.memoizedState;g=y.element,ip(r,l),Zc(l,m,null,u);var A=l.memoizedState;if(m=A.cache,ni(l,yn,m),m!==y.cache&&ep(l,[yn],u,!0),Jc(),m=A.element,y.isDehydrated)if(y={element:m,isDehydrated:!1,cache:A.cache},l.updateQueue.baseState=y,l.memoizedState=y,l.flags&256){l=k4(r,l,m,u);break e}else if(m!==g){g=lr(Error(a(424)),l),Gc(g),l=k4(r,l,m,u);break e}else{switch(r=l.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Vt=hr(r.firstChild),Yn=l,mt=!0,ei=null,ur=!0,u=v5(l,null,m,u),l.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ul(),m===g){l=Cs(r,l,u);break e}Xn(r,l,m,u)}l=l.child}return l;case 26:return zd(r,l),r===null?(u=Uv(l.type,null,l.pendingProps,null))?l.memoizedState=u:mt||(u=l.type,r=l.pendingProps,m=Xd(Te.current).createElement(u),m[gn]=l,m[$n]=r,Kn(m,u,r),pt(m),l.stateNode=m):l.memoizedState=Uv(l.type,r.memoizedProps,l.pendingProps,r.memoizedState),null;case 27:return kt(l),r===null&&mt&&(m=l.stateNode=Ov(l.type,l.pendingProps,Te.current),Yn=l,ur=!0,g=Vt,pi(l.type)?(yx=g,Vt=hr(m.firstChild)):Vt=g),Xn(r,l,l.pendingProps.children,u),zd(r,l),r===null&&(l.flags|=4194304),l.child;case 5:return r===null&&mt&&((g=m=Vt)&&(m=XE(m,l.type,l.pendingProps,ur),m!==null?(l.stateNode=m,Yn=l,Vt=hr(m.firstChild),ur=!1,g=!0):g=!1),g||ti(l)),kt(l),g=l.type,y=l.pendingProps,A=r!==null?r.memoizedProps:null,m=y.children,fx(g,y)?m=null:A!==null&&fx(g,A)&&(l.flags|=32),l.memoizedState!==null&&(g=mp(r,l,uE,null,null,u),yu._currentValue=g),zd(r,l),Xn(r,l,m,u),l.child;case 6:return r===null&&mt&&((r=u=Vt)&&(u=KE(u,l.pendingProps,ur),u!==null?(l.stateNode=u,Yn=l,Vt=null,r=!0):r=!1),r||ti(l)),null;case 13:return C4(r,l,u);case 4:return et(l,l.stateNode.containerInfo),m=l.pendingProps,r===null?l.child=xl(l,null,m,u):Xn(r,l,m,u),l.child;case 11:return g4(r,l,l.type,l.pendingProps,u);case 7:return Xn(r,l,l.pendingProps,u),l.child;case 8:return Xn(r,l,l.pendingProps.children,u),l.child;case 12:return Xn(r,l,l.pendingProps.children,u),l.child;case 10:return m=l.pendingProps,ni(l,l.type,m.value),Xn(r,l,m.children,u),l.child;case 9:return g=l.type._context,m=l.pendingProps.children,hl(l),g=Wn(g),m=m(g),l.flags|=1,Xn(r,l,m,u),l.child;
vendor: 5,090 bytes, line 48
48case 14:return b4(r,l,l.type,l.pendingProps,u);case 15:return y4(r,l,l.type,l.pendingProps,u);case 19:return E4(r,l,u);case 31:return bE(r,l,u);case 22:return v4(r,l,u,l.pendingProps);case 24:return hl(l),m=Wn(yn),r===null?(g=ap(),g===null&&(g=Ot,y=tp(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=u),g=y),l.memoizedState={parent:m,cache:g},sp(l),ni(l,yn,g)):((r.lanes&u)!==0&&(ip(r,l),Zc(l,null,null,u),Jc()),g=r.memoizedState,y=l.memoizedState,g.parent!==m?(g={parent:m,cache:m},l.memoizedState=g,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=g),ni(l,yn,m)):(m=y.cache,ni(l,yn,m),m!==g.cache&&ep(l,[yn],u,!0))),Xn(r,l,l.pendingProps.children,u),l.child;case 29:throw l.pendingProps}throw Error(a(156,l.tag))}function As(r){r.flags|=4}function Fp(r,l,u,m,g){if((l=(r.mode&32)!==0)&&(l=!1),l){if(r.flags|=16777216,(g&335544128)===g)if(r.stateNode.complete)r.flags|=8192;else if(nv())r.flags|=8192;else throw pl=gd,rp}else r.flags&=-16777217}function M4(r,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!$v(l))if(nv())r.flags|=8192;else throw pl=gd,rp}function Dd(r,l){l!==null&&(r.flags|=4),r.flags&16384&&(l=r.tag!==22?Ic():536870912,r.lanes|=l,No|=l)}function su(r,l){if(!mt)switch(r.tailMode){case"hidden":l=r.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?l||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function qt(r){var l=r.alternate!==null&&r.alternate.child===r.child,u=0,m=0;if(l)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags&65011712,m|=g.flags&65011712,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=m,r.childLanes=u,l}function vE(r,l,u){var m=l.pendingProps;switch(Xf(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(l),null;case 1:return qt(l),null;case 3:return u=l.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),Ns(yn),Re(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(co(l)?As(l):r===null||r.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Qf())),qt(l),null;case 26:var g=l.type,y=l.memoizedState;return r===null?(As(l),y!==null?(qt(l),M4(l,y)):(qt(l),Fp(l,g,null,m,u))):y?y!==r.memoizedState?(As(l),qt(l),M4(l,y)):(qt(l),l.flags&=-16777217):(r=r.memoizedProps,r!==m&&As(l),qt(l),Fp(l,g,r,m,u)),null;case 27:if(yt(l),u=Te.current,g=l.type,r!==null&&l.stateNode!=null)r.memoizedProps!==m&&As(l);else{if(!m){if(l.stateNode===null)throw Error(a(166));return qt(l),null}r=ge.current,co(l)?c5(l):(r=Ov(g,m,u),l.stateNode=r,As(l))}return qt(l),null;case 5:if(yt(l),g=l.type,r!==null&&l.stateNode!=null)r.memoizedProps!==m&&As(l);else{if(!m){if(l.stateNode===null)throw Error(a(166));return qt(l),null}if(y=ge.current,co(l))c5(l);else{var A=Xd(Te.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof m.is=="string"?A.createElement("select",{is:m.is}):A.createElement("select"),m.multiple?y.multiple=!0:m.size&&(y.size=m.size);break;default:y=typeof m.is=="string"?A.createElement(g,{is:m.is}):A.createElement(g)}}y[gn]=l,y[$n]=m;e:for(A=l.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===l)break e;for(;A.sibling===null;){if(A.return===null||A.return===l)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}l.stateNode=y;e:switch(Kn(y,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&As(l)}}return qt(l),Fp(l,l.type,r===null?null:r.memoizedProps,l.pendingProps,u),null;case 6:if(r&&l.stateNode!=null)r.memoizedProps!==m&&As(l);else{if(typeof m!="string"&&l.stateNode===null)throw Error(a(166));if(r=Te.current,co(l)){if(r=l.stateNode,u=l.memoizedProps,m=null,g=Yn,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}r[gn]=l,r=!!(r.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||Cv(r.nodeValue,u)),r||ti(l,!0)}else r=Xd(r).createTextNode(m),r[gn]=l,l.stateNode=r}return qt(l),null;case 31:if(u=l.memoizedState,r===null||r.memoizedState!==null){if(m=co(l),u!==null){if(r===null){if(!m)throw Error(a(318));if(r=l.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[gn]=l}else ul(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;qt(l),r=!1}else u=Qf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;
vendor: 23,251 bytes, line 48
48if(!r)return l.flags&256?(Pa(l),l):(Pa(l),null);if((l.flags&128)!==0)throw Error(a(558))}return qt(l),null;case 13:if(m=l.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(g=co(l),m!==null&&m.dehydrated!==null){if(r===null){if(!g)throw Error(a(318));if(g=l.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(a(317));g[gn]=l}else ul(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;qt(l),g=!1}else g=Qf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=g),g=!0;if(!g)return l.flags&256?(Pa(l),l):(Pa(l),null)}return Pa(l),(l.flags&128)!==0?(l.lanes=u,l):(u=m!==null,r=r!==null&&r.memoizedState!==null,u&&(m=l.child,g=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(g=m.alternate.memoizedState.cachePool.pool),y=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(y=m.memoizedState.cachePool.pool),y!==g&&(m.flags|=2048)),u!==r&&u&&(l.child.flags|=8192),Dd(l,l.updateQueue),qt(l),null);case 4:return Re(),r===null&&cx(l.stateNode.containerInfo),qt(l),null;case 10:return Ns(l.type),qt(l),null;case 19:if(J(dn),m=l.memoizedState,m===null)return qt(l),null;if(g=(l.flags&128)!==0,y=m.rendering,y===null)if(g)su(m,!1);else{if(rn!==0||r!==null&&(r.flags&128)!==0)for(r=l.child;r!==null;){if(y=wd(r),y!==null){for(l.flags|=128,su(m,!1),r=y.updateQueue,l.updateQueue=r,Dd(l,r),l.subtreeFlags=0,r=u,u=l.child;u!==null;)r5(u,r),u=u.sibling;return P(dn,dn.current&1|2),mt&&ws(l,m.treeForkCount),l.child}r=r.sibling}m.tail!==null&&Ct()>Pd&&(l.flags|=128,g=!0,su(m,!1),l.lanes=4194304)}else{if(!g)if(r=wd(y),r!==null){if(l.flags|=128,g=!0,r=r.updateQueue,l.updateQueue=r,Dd(l,r),su(m,!0),m.tail===null&&m.tailMode==="hidden"&&!y.alternate&&!mt)return qt(l),null}else 2*Ct()-m.renderingStartTime>Pd&&u!==536870912&&(l.flags|=128,g=!0,su(m,!1),l.lanes=4194304);m.isBackwards?(y.sibling=l.child,l.child=y):(r=m.last,r!==null?r.sibling=y:l.child=y,m.last=y)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Ct(),r.sibling=null,u=dn.current,P(dn,g?u&1|2:u&1),mt&&ws(l,m.treeForkCount),r):(qt(l),null);case 22:case 23:return Pa(l),up(),m=l.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(l.flags|=8192):m&&(l.flags|=8192),m?(u&536870912)!==0&&(l.flags&128)===0&&(qt(l),l.subtreeFlags&6&&(l.flags|=8192)):qt(l),u=l.updateQueue,u!==null&&Dd(l,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==u&&(l.flags|=2048),r!==null&&J(ml),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),l.memoizedState.cache!==u&&(l.flags|=2048),Ns(yn),qt(l),null;case 25:return null;case 30:return null}throw Error(a(156,l.tag))}function wE(r,l){switch(Xf(l),l.tag){case 1:return r=l.flags,r&65536?(l.flags=r&-65537|128,l):null;case 3:return Ns(yn),Re(),r=l.flags,(r&65536)!==0&&(r&128)===0?(l.flags=r&-65537|128,l):null;case 26:case 27:case 5:return yt(l),null;case 31:if(l.memoizedState!==null){if(Pa(l),l.alternate===null)throw Error(a(340));ul()}return r=l.flags,r&65536?(l.flags=r&-65537|128,l):null;case 13:if(Pa(l),r=l.memoizedState,r!==null&&r.dehydrated!==null){if(l.alternate===null)throw Error(a(340));ul()}return r=l.flags,r&65536?(l.flags=r&-65537|128,l):null;case 19:return J(dn),null;case 4:return Re(),null;case 10:return Ns(l.type),null;case 22:case 23:return Pa(l),up(),r!==null&&J(ml),r=l.flags,r&65536?(l.flags=r&-65537|128,l):null;case 24:return Ns(yn),null;case 25:return null;default:return null}}function I4(r,l){switch(Xf(l),l.tag){case 3:Ns(yn),Re();break;case 26:case 27:case 5:yt(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Pa(l);break;case 13:Pa(l);break;case 19:J(dn);break;case 10:Ns(l.type);break;case 22:case 23:Pa(l),up(),r!==null&&J(ml);break;case 24:Ns(yn)}}function iu(r,l){try{var u=l.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&r)===r){m=void 0;var y=u.create,A=u.inst;m=y(),A.destroy=m}u=u.next}while(u!==g)}}catch(O){It(l,l.return,O)}}function oi(r,l,u){try{var m=l.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var y=g.next;m=y;do{if((m.tag&r)===r){var A=m.inst,O=A.destroy;if(O!==void 0){A.destroy=void 0,g=l;var G=u,ie=O;try{ie()}catch(me){It(g,G,me)}}}m=m.next}while(m!==y)}}catch(me){It(l,l.return,me)}}function z4(r){var l=r.updateQueue;if(l!==null){var u=r.stateNode;try{S5(l,u)}catch(m){It(r,r.return,m)}}}function _4(r,l,u){u.props=bl(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(m){It(r,l,m)}}function lu(r,l){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof u=="function"?r.refCleanup=u(m):u.current=m}}catch(g){It(r,l,g)}}function Hr(r,l){var u=r.ref,m=r.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(g){It(r,l,g)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){It(r,l,g)}else u.current=null}function D4(r){var l=r.type,u=r.memoizedProps,m=r.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(g){It(r,r.return,g)}}function Vp(r,l,u){try{var m=r.stateNode;qE(m,r.type,u,l),m[$n]=l}catch(g){It(r,r.return,g)}}function B4(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&pi(r.type)||r.tag===4}function qp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||B4(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&pi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Hp(r,l,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,l?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,l):(l=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,l.appendChild(r),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=bs));else if(m!==4&&(m===27&&pi(r.type)&&(u=r.stateNode,l=null),r=r.child,r!==null))for(Hp(r,l,u),r=r.sibling;r!==null;)Hp(r,l,u),r=r.sibling}function Bd(r,l,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,l?u.insertBefore(r,l):u.appendChild(r);else if(m!==4&&(m===27&&pi(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Bd(r,l,u),r=r.sibling;r!==null;)Bd(r,l,u),r=r.sibling}function R4(r){var l=r.stateNode,u=r.memoizedProps;try{for(var m=r.type,g=l.attributes;g.length;)l.removeAttributeNode(g[0]);Kn(l,m,u),l[gn]=r,l[$n]=u}catch(y){It(r,r.return,y)}}var Es=!1,Sn=!1,$p=!1,O4=typeof WeakSet=="function"?WeakSet:Set,qn=null;function SE(r,l){if(r=r.containerInfo,hx=nh,r=X2(r),Lf(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var g=m.anchorOffset,y=m.focusNode;m=m.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var A=0,O=-1,G=-1,ie=0,me=0,pe=r,oe=null;t:for(;;){for(var ce;pe!==u||g!==0&&pe.nodeType!==3||(O=A+g),pe!==y||m!==0&&pe.nodeType!==3||(G=A+m),pe.nodeType===3&&(A+=pe.nodeValue.length),(ce=pe.firstChild)!==null;)oe=pe,pe=ce;for(;;){if(pe===r)break t;if(oe===u&&++ie===g&&(O=A),oe===y&&++me===m&&(G=A),(ce=pe.nextSibling)!==null)break;pe=oe,oe=pe.parentNode}pe=ce}u=O===-1||G===-1?null:{start:O,end:G}}else u=null}u=u||{start:0,end:0}}else u=null;for(mx={focusedElem:r,selectionRange:u},nh=!1,qn=l;qn!==null;)if(l=qn,r=l.child,(l.subtreeFlags&1028)!==0&&r!==null)r.return=l,qn=r;else for(;qn!==null;){switch(l=qn,y=l.alternate,r=l.flags,l.tag){case 0:if((r&4)!==0&&(r=l.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)g=r[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&y!==null){r=void 0,u=l,g=y.memoizedProps,y=y.memoizedState,m=u.stateNode;try{var Pe=bl(u.type,g);r=m.getSnapshotBeforeUpdate(Pe,y),m.__reactInternalSnapshotBeforeUpdate=r}catch(We){It(u,u.return,We)}}break;case 3:if((r&1024)!==0){if(r=l.stateNode.containerInfo,u=r.nodeType,u===9)xx(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":xx(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=l.sibling,r!==null){r.return=l.return,qn=r;break}qn=l.return}}function L4(r,l,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Ms(r,u),m&4&&iu(5,u);break;case 1:if(Ms(r,u),m&4)if(r=u.stateNode,l===null)try{r.componentDidMount()}catch(A){It(u,u.return,A)}else{var g=bl(u.type,l.memoizedProps);l=l.memoizedState;try{r.componentDidUpdate(g,l,r.__reactInternalSnapshotBeforeUpdate)}catch(A){It(u,u.return,A)}}m&64&&z4(u),m&512&&lu(u,u.return);break;case 3:if(Ms(r,u),m&64&&(r=u.updateQueue,r!==null)){if(l=null,u.child!==null)switch(u.child.tag){case 27:case 5:l=u.child.stateNode;break;case 1:l=u.child.stateNode}try{S5(r,l)}catch(A){It(u,u.return,A)}}break;case 27:l===null&&m&4&&R4(u);case 26:case 5:Ms(r,u),l===null&&m&4&&D4(u),m&512&&lu(u,u.return);break;case 12:Ms(r,u);break;case 31:Ms(r,u),m&4&&F4(r,u);break;case 13:Ms(r,u),m&4&&V4(r,u),m&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=IE.bind(null,u),QE(r,u))));break;case 22:if(m=u.memoizedState!==null||Es,!m){l=l!==null&&l.memoizedState!==null||Sn,g=Es;var y=Sn;Es=m,(Sn=l)&&!y?Is(r,u,(u.subtreeFlags&8772)!==0):Ms(r,u),Es=g,Sn=y}break;case 30:break;default:Ms(r,u)}}function P4(r){var l=r.alternate;l!==null&&(r.alternate=null,P4(l)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(l=r.stateNode,l!==null&&De(l)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Xt=null,Sa=!1;function Ts(r,l,u){for(u=u.child;u!==null;)U4(r,l,u),u=u.sibling}function U4(r,l,u){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Hn,u)}catch{}switch(u.tag){case 26:Sn||Hr(u,l),Ts(r,l,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Sn||Hr(u,l);var m=Xt,g=Sa;pi(u.type)&&(Xt=u.stateNode,Sa=!1),Ts(r,l,u),xu(u.stateNode),Xt=m,Sa=g;break;case 5:Sn||Hr(u,l);case 6:if(m=Xt,g=Sa,Xt=null,Ts(r,l,u),Xt=m,Sa=g,Xt!==null)if(Sa)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(u.stateNode)}catch(y){It(u,l,y)}else try{Xt.removeChild(u.stateNode)}catch(y){It(u,l,y)}break;case 18:Xt!==null&&(Sa?(r=Xt,zv(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),Io(r)):zv(Xt,u.stateNode));break;case 4:m=Xt,g=Sa,Xt=u.stateNode.containerInfo,Sa=!0,Ts(r,l,u),Xt=m,Sa=g;break;case 0:case 11:case 14:case 15:oi(2,u,l),Sn||oi(4,u,l),Ts(r,l,u);break;case 1:Sn||(Hr(u,l),m=u.stateNode,typeof m.componentWillUnmount=="function"&&_4(u,l,m)),Ts(r,l,u);break;case 21:Ts(r,l,u);break;case 22:Sn=(m=Sn)||u.memoizedState!==null,Ts(r,l,u),Sn=m;break;default:Ts(r,l,u)}}function F4(r,l){if(l.memoizedState===null&&(r=l.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Io(r)}catch(u){It(l,l.return,u)}}}function V4(r,l){if(l.memoizedState===null&&(r=l.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Io(r)}catch(u){It(l,l.return,u)}}function NE(r){switch(r.tag){case 31:case 13:case 19:var l=r.stateNode;return l===null&&(l=r.stateNode=new O4),l;case 22:return r=r.stateNode,l=r._retryCache,l===null&&(l=r._retryCache=new O4),l;default:throw Error(a(435,r.tag))}}function Rd(r,l){var u=NE(r);l.forEach(function(m){if(!u.has(m)){u.add(m);var g=zE.bind(null,r,m);m.then(g,g)}})}function Na(r,l){var u=l.deletions;if(u!==null)for(var m=0;m<u.length;m++){var g=u[m],y=r,A=l,O=A;e:for(;O!==null;){switch(O.tag){case 27:if(pi(O.type)){Xt=O.stateNode,Sa=!1;break e}break;case 5:Xt=O.stateNode,Sa=!1;break e;case 3:case 4:Xt=O.stateNode.containerInfo,Sa=!0;break e}O=O.return}if(Xt===null)throw Error(a(160));U4(y,A,g),Xt=null,Sa=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)q4(l,r),l=l.sibling}var Tr=null;function q4(r,l){var u=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Na(l,r),ja(r),m&4&&(oi(3,r,r.return),iu(3,r),oi(5,r,r.return));break;case 1:Na(l,r),ja(r),m&512&&(Sn||u===null||Hr(u,u.return)),m&64&&Es&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var g=Tr;if(Na(l,r),ja(r),m&512&&(Sn||u===null||Hr(u,u.return)),m&4){var y=u!==null?u.memoizedState:null;if(m=r.memoizedState,u===null)if(m===null)if(r.stateNode===null){e:{m=r.type,u=r.memoizedProps,g=g.ownerDocument||g;t:switch(m){case"title":y=g.getElementsByTagName("title")[0],(!y||y[be]||y[gn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(m),g.head.insertBefore(y,g.querySelector("head > title"))),Kn(y,m,u),y[gn]=r,pt(y),m=y;break e;case"link":var A=qv("link","href",g).get(m+(u.href||""));if(A){for(var O=0;O<A.length;O++)if(y=A[O],y.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&y.getAttribute("rel")===(u.rel==null?null:u.rel)&&y.getAttribute("title")===(u.title==null?null:u.title)&&y.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(O,1);break t}}y=g.createElement(m),Kn(y,m,u),g.head.appendChild(y);break;case"meta":if(A=qv("meta","content",g).get(m+(u.content||""))){for(O=0;O<A.length;O++)if(y=A[O],y.getAttribute("content")===(u.content==null?null:""+u.content)&&y.getAttribute("name")===(u.name==null?null:u.name)&&y.getAttribute("property")===(u.property==null?null:u.property)&&y.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&y.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(O,1);break t}}y=g.createElement(m),Kn(y,m,u),g.head.appendChild(y);break;default:throw Error(a(468,m))}y[gn]=r,pt(y),m=y}r.stateNode=m}else Hv(g,r.type,r.stateNode);else r.stateNode=Vv(g,m,r.memoizedProps);else y!==m?(y===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):y.count--,m===null?Hv(g,r.type,r.stateNode):Vv(g,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Vp(r,r.memoizedProps,u.memoizedProps)}break;case 27:Na(l,r),ja(r),m&512&&(Sn||u===null||Hr(u,u.return)),u!==null&&m&4&&Vp(r,r.memoizedProps,u.memoizedProps);break;case 5:if(Na(l,r),ja(r),m&512&&(Sn||u===null||Hr(u,u.return)),r.flags&32){g=r.stateNode;try{Zl(g,"")}catch(Pe){It(r,r.return,Pe)}}m&4&&r.stateNode!=null&&(g=r.memoizedProps,Vp(r,g,u!==null?u.memoizedProps:g)),m&1024&&($p=!0);break;case 6:if(Na(l,r),ja(r),m&4){if(r.stateNode===null)throw Error(a(162));m=r.memoizedProps,u=r.stateNode;try{u.nodeValue=m}catch(Pe){It(r,r.return,Pe)}}break;case 3:if(Jd=null,g=Tr,Tr=Kd(l.containerInfo),Na(l,r),Tr=g,ja(r),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Io(l.containerInfo)}catch(Pe){It(r,r.return,Pe)}$p&&($p=!1,H4(r));break;case 4:m=Tr,Tr=Kd(r.stateNode.containerInfo),Na(l,r),ja(r),Tr=m;break;case 12:Na(l,r),ja(r);break;case 31:Na(l,r),ja(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 13:Na(l,r),ja(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Ld=Ct()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 22:g=r.memoizedState!==null;var G=u!==null&&u.memoizedState!==null,ie=Es,me=Sn;if(Es=ie||g,Sn=me||G,Na(l,r),Sn=me,Es=ie,ja(r),m&8192)e:for(l=r.stateNode,l._visibility=g?l._visibility&-2:l._visibility|1,g&&(u===null||G||Es||Sn||yl(r)),u=null,l=r;;){if(l.tag===5||l.tag===26){if(u===null){G=u=l;try{if(y=G.stateNode,g)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{O=G.stateNode;var pe=G.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;O.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Pe){It(G,G.return,Pe)}}}else if(l.tag===6){if(u===null){G=l;try{G.stateNode.nodeValue=g?"":G.memoizedProps}catch(Pe){It(G,G.return,Pe)}}}else if(l.tag===18){if(u===null){G=l;try{var ce=G.stateNode;g?_v(ce,!0):_v(G.stateNode,!1)}catch(Pe){It(G,G.return,Pe)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===r)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===r)break e;for(;l.sibling===null;){if(l.return===null||l.return===r)break e;u===l&&(u=null),l=l.return}u===l&&(u=null),l.sibling.return=l.return,l=l.sibling}m&4&&(m=r.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Rd(r,u))));break;case 19:Na(l,r),ja(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 30:break;case 21:break;default:Na(l,r),ja(r)}}function ja(r){var l=r.flags;if(l&2){try{for(var u,m=r.return;m!==null;){if(B4(m)){u=m;break}m=m.return}if(u==null)throw Error(a(160));switch(u.tag){case 27:var g=u.stateNode,y=qp(r);Bd(r,y,g);break;case 5:var A=u.stateNode;u.flags&32&&(Zl(A,""),u.flags&=-33);var O=qp(r);Bd(r,O,A);break;case 3:case 4:var G=u.stateNode.containerInfo,ie=qp(r);Hp(r,ie,G);break;default:throw Error(a(161))}}catch(me){It(r,r.return,me)}r.flags&=-3}l&4096&&(r.flags&=-4097)}function H4(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var l=r;H4(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),r=r.sibling}}function Ms(r,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)L4(r,l.alternate,l),l=l.sibling}function yl(r){for(r=r.child;r!==null;){var l=r;switch(l.tag){case 0:case 11:case 14:case 15:oi(4,l,l.return),yl(l);break;case 1:Hr(l,l.return);var u=l.stateNode;typeof u.componentWillUnmount=="function"&&_4(l,l.return,u),yl(l);break;case 27:xu(l.stateNode);case 26:case 5:Hr(l,l.return),yl(l);break;case 22:l.memoizedState===null&&yl(l);break;case 30:yl(l);break;default:yl(l)}r=r.sibling}}function Is(r,l,u){for(u=u&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var m=l.alternate,g=r,y=l,A=y.flags;switch(y.tag){case 0:case 11:case 15:Is(g,y,u),iu(4,y);break;case 1:if(Is(g,y,u),m=y,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(ie){It(m,m.return,ie)}if(m=y,g=m.updateQueue,g!==null){var O=m.stateNode;try{var G=g.shared.hiddenCallbacks;if(G!==null)for(g.shared.hiddenCallbacks=null,g=0;g<G.length;g++)w5(G[g],O)}catch(ie){It(m,m.return,ie)}}u&&A&64&&z4(y),lu(y,y.return);break;case 27:R4(y);case 26:case 5:Is(g,y,u),u&&m===null&&A&4&&D4(y),lu(y,y.return);break;case 12:Is(g,y,u);break;case 31:Is(g,y,u),u&&A&4&&F4(g,y);break;case 13:Is(g,y,u),u&&A&4&&V4(g,y);break;case 22:y.memoizedState===null&&Is(g,y,u),lu(y,y.return);break;case 30:break;default:Is(g,y,u)}l=l.sibling}}function Gp(r,l){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&Yc(u))}function Yp(r,l){r=null,l.alternate!==null&&(r=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==r&&(l.refCount++,r!=null&&Yc(r))}function Mr(r,l,u,m){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)$4(r,l,u,m),l=l.sibling}function $4(r,l,u,m){var g=l.flags;switch(l.tag){case 0:case 11:case 15:Mr(r,l,u,m),g&2048&&iu(9,l);break;case 1:Mr(r,l,u,m);break;case 3:Mr(r,l,u,m),g&2048&&(r=null,l.alternate!==null&&(r=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==r&&(l.refCount++,r!=null&&Yc(r)));break;case 12:if(g&2048){Mr(r,l,u,m),r=l.stateNode;try{var y=l.memoizedProps,A=y.id,O=y.onPostCommit;typeof O=="function"&&O(A,l.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(G){It(l,l.return,G)}}else Mr(r,l,u,m);break;case 31:Mr(r,l,u,m);break;case 13:Mr(r,l,u,m);break;case 23:break;case 22:y=l.stateNode,A=l.alternate,l.memoizedState!==null?y._visibility&2?Mr(r,l,u,m):ou(r,l):y._visibility&2?Mr(r,l,u,m):(y._visibility|=2,vo(r,l,u,m,(l.subtreeFlags&10256)!==0||!1)),g&2048&&Gp(A,l);break;case 24:Mr(r,l,u,m),g&2048&&Yp(l.alternate,l);break;default:Mr(r,l,u,m)}}function vo(r,l,u,m,g){for(g=g&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var y=r,A=l,O=u,G=m,ie=A.flags;switch(A.tag){case 0:case 11:case 15:vo(y,A,O,G,g),iu(8,A);break;case 23:break;case 22:var me=A.stateNode;A.memoizedState!==null?me._visibility&2?vo(y,A,O,G,g):ou(y,A):(me._visibility|=2,vo(y,A,O,G,g)),g&&ie&2048&&Gp(A.alternate,A);break;case 24:vo(y,A,O,G,g),g&&ie&2048&&Yp(A.alternate,A);break;default:vo(y,A,O,G,g)}l=l.sibling}}function ou(r,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var u=r,m=l,g=m.flags;switch(m.tag){case 22:ou(u,m),g&2048&&Gp(m.alternate,m);break;case 24:ou(u,m),g&2048&&Yp(m.alternate,m);break;default:ou(u,m)}l=l.sibling}}var cu=8192;function wo(r,l,u){if(r.subtreeFlags&cu)for(r=r.child;r!==null;)G4(r,l,u),r=r.sibling}function G4(r,l,u){switch(r.tag){case 26:wo(r,l,u),r.flags&cu&&r.memoizedState!==null&&cT(u,Tr,r.memoizedState,r.memoizedProps);break;case 5:wo(r,l,u);break;case 3:case 4:var m=Tr;Tr=Kd(r.stateNode.containerInfo),wo(r,l,u),Tr=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=cu,cu=16777216,wo(r,l,u),cu=m):wo(r,l,u));break;default:wo(r,l,u)}}function Y4(r){var l=r.alternate;if(l!==null&&(r=l.child,r!==null)){l.child=null;do l=r.sibling,r.sibling=null,r=l;while(r!==null)}}function uu(r){var l=r.deletions;if((r.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var m=l[u];qn=m,X4(m,r)}Y4(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)W4(r),r=r.sibling}function W4(r){switch(r.tag){case 0:case 11:case 15:uu(r),r.flags&2048&&oi(9,r,r.return);break;case 3:uu(r);break;case 12:uu(r);break;case 22:var l=r.stateNode;r.memoizedState!==null&&l._visibility&2&&(r.return===null||r.return.tag!==13)?(l._visibility&=-3,Od(r)):uu(r);break;default:uu(r)}}function Od(r){var l=r.deletions;if((r.flags&16)!==0){if(l!==null)for(var u=0;u<l.length;u++){var m=l[u];qn=m,X4(m,r)}Y4(r)}for(r=r.child;r!==null;){switch(l=r,l.tag){case 0:case 11:case 15:oi(8,l,l.return),Od(l);break;case 22:u=l.stateNode,u._visibility&2&&(u._visibility&=-3,Od(l));break;default:Od(l)}r=r.sibling}}function X4(r,l){for(;qn!==null;){var u=qn;switch(u.tag){case 0:case 11:case 15:oi(8,u,l);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Yc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,qn=m;else e:for(u=r;qn!==null;){m=qn;var g=m.sibling,y=m.return;if(P4(m),m===u){qn=null;break e}if(g!==null){g.return=y,qn=g;break e}qn=y}}}var jE={getCacheForType:function(r){var l=Wn(yn),u=l.data.get(r);return u===void 0&&(u=r(),l.data.set(r,u)),u},cacheSignal:function(){return Wn(yn).controller.signal}},kE=typeof WeakMap=="function"?WeakMap:Map,wt=0,Ot=null,ct=null,dt=0,Mt=0,Ua=null,ci=!1,So=!1,Wp=!1,zs=0,rn=0,ui=0,vl=0,Xp=0,Fa=0,No=0,du=null,ka=null,Kp=!1,Ld=0,K4=0,Pd=1/0,Ud=null,di=null,_n=0,hi=null,jo=null,_s=0,Qp=0,Jp=null,Q4=null,hu=0,Zp=null;function Va(){return(wt&2)!==0&&dt!==0?dt&-dt:V.T!==null?sx():W0()}function J4(){if(Fa===0)if((dt&536870912)===0||mt){var r=Xl;
vendor: 2,549 bytes, line 48
48Xl<<=1,(Xl&3932160)===0&&(Xl=262144),Fa=r}else Fa=536870912;return r=La.current,r!==null&&(r.flags|=32),Fa}function Ca(r,l,u){(r===Ot&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)&&(ko(r,0),mi(r,dt,Fa,!1)),rl(r,u),((wt&2)===0||r!==Ot)&&(r===Ot&&((wt&2)===0&&(vl|=u),rn===4&&mi(r,dt,Fa,!1)),$r(r))}function Z4(r,l,u){if((wt&6)!==0)throw Error(a(327));var m=!u&&(l&127)===0&&(l&r.expiredLanes)===0||Ur(r,l),g=m?EE(r,l):tx(r,l,!0),y=m;do{if(g===0){So&&!m&&mi(r,l,0,!1);break}else{if(u=r.current.alternate,y&&!CE(u)){g=tx(r,l,!1),y=!1;continue}if(g===2){if(y=l,r.errorRecoveryDisabledLanes&y)var A=0;else A=r.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){l=A;e:{var O=r;g=du;var G=O.current.memoizedState.isDehydrated;if(G&&(ko(O,A).flags|=256),A=tx(O,A,!1),A!==2){if(Wp&&!G){O.errorRecoveryDisabledLanes|=y,vl|=y,g=4;break e}y=ka,ka=g,y!==null&&(ka===null?ka=y:ka.push.apply(ka,y))}g=A}if(y=!1,g!==2)continue}}if(g===1){ko(r,0),mi(r,l,0,!0);break}e:{switch(m=r,y=g,y){case 0:case 1:throw Error(a(345));case 4:if((l&4194048)!==l)break;case 6:mi(m,l,Fa,!ci);break e;case 2:ka=null;break;case 3:case 5:break;default:throw Error(a(329))}if((l&62914560)===l&&(g=Ld+300-Ct(),10<g)){if(mi(m,l,Fa,!ci),Kl(m,0,!0)!==0)break e;_s=l,m.timeoutHandle=Mv(ev.bind(null,m,u,ka,Ud,Kp,l,Fa,vl,No,ci,y,"Throttled",-0,0),g);break e}ev(m,u,ka,Ud,Kp,l,Fa,vl,No,ci,y,null,-0,0)}}break}while(!0);$r(r)}function ev(r,l,u,m,g,y,A,O,G,ie,me,pe,oe,ce){if(r.timeoutHandle=-1,pe=l.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bs},G4(l,y,pe);var Pe=(y&62914560)===y?Ld-Ct():(y&4194048)===y?K4-Ct():0;if(Pe=uT(pe,Pe),Pe!==null){_s=y,r.cancelPendingCommit=Pe(ov.bind(null,r,l,y,u,m,g,A,O,G,me,pe,null,oe,ce)),mi(r,y,A,!ie);return}}ov(r,l,y,u,m,g,A,O,G)}function CE(r){for(var l=r;;){var u=l.tag;if((u===0||u===11||u===15)&&l.flags&16384&&(u=l.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var g=u[m],y=g.getSnapshot;g=g.value;try{if(!Ra(y(),g))return!1}catch{return!1}}if(u=l.child,l.subtreeFlags&16384&&u!==null)u.return=l,l=u;else{if(l===r)break;for(;l.sibling===null;){if(l.return===null||l.return===r)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function mi(r,l,u,m){l&=~Xp,l&=~vl,r.suspendedLanes|=l,r.pingedLanes&=~l,m&&(r.warmLanes|=l),m=r.expirationTimes;for(var g=l;0<g;){var y=31-Tt(g),A=1<<y;m[y]=-1,g&=~A}u!==0&&zc(r,u,l)}function Fd(){return(wt&6)===0?(mu(0),!1):!0}
vendor: 2,070 bytes, line 48
48function ex(){if(ct!==null){if(Mt===0)var r=ct.return;else r=ct,Ss=dl=null,xp(r),po=null,Xc=0,r=ct;for(;r!==null;)I4(r.alternate,r),r=r.return;ct=null}}function ko(r,l){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,GE(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),_s=0,ex(),Ot=r,ct=u=vs(r.current,null),dt=l,Mt=0,Ua=null,ci=!1,So=Ur(r,l),Wp=!1,No=Fa=Xp=vl=ui=rn=0,ka=du=null,Kp=!1,(l&8)!==0&&(l|=l&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=l;0<m;){var g=31-Tt(m),y=1<<g;l|=r[g],m&=~y}return zs=l,od(),u}function tv(r,l){tt=null,V.H=au,l===fo||l===xd?(l=g5(),Mt=3):l===rp?(l=g5(),Mt=4):Mt=l===zp?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ua=l,ct===null&&(rn=1,Md(r,lr(l,r.current)))}function nv(){var r=La.current;return r===null?!0:(dt&4194048)===dt?dr===null:(dt&62914560)===dt||(dt&536870912)!==0?r===dr:!1}function av(){var r=V.H;return V.H=au,r===null?au:r}function rv(){var r=V.A;return V.A=jE,r}function Vd(){rn=4,ci||(dt&4194048)!==dt&&La.current!==null||(So=!0),(ui&134217727)===0&&(vl&134217727)===0||Ot===null||mi(Ot,dt,Fa,!1)}function tx(r,l,u){var m=wt;wt|=2;var g=av(),y=rv();(Ot!==r||dt!==l)&&(Ud=null,ko(r,l)),l=!1;var A=rn;e:do try{if(Mt!==0&&ct!==null){var O=ct,G=Ua;switch(Mt){case 8:ex(),A=6;break e;case 3:case 2:case 9:case 6:La.current===null&&(l=!0);var ie=Mt;if(Mt=0,Ua=null,Co(r,O,G,ie),u&&So){A=0;break e}break;default:ie=Mt,Mt=0,Ua=null,Co(r,O,G,ie)}}AE(),A=rn;break}catch(me){tv(r,me)}while(!0);return l&&r.shellSuspendCounter++,Ss=dl=null,wt=m,V.H=g,V.A=y,ct===null&&(Ot=null,dt=0,od()),A}function AE(){for(;ct!==null;)sv(ct)}function EE(r,l){var u=wt;wt|=2;var m=av(),g=rv();Ot!==r||dt!==l?(Ud=null,Pd=Ct()+500,ko(r,l)):So=Ur(r,l);e:do try{if(Mt!==0&&ct!==null){l=ct;var y=Ua;t:switch(Mt){case 1:Mt=0,Ua=null,Co(r,l,y,1);break;case 2:case 9:if(p5(y)){Mt=0,Ua=null,iv(l);break}l=function(){Mt!==2&&Mt!==9||Ot!==r||(Mt=7),$r(r)},y.then(l,l);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:p5(y)?(Mt=0,Ua=null,iv(l)):(Mt=0,Ua=null,Co(r,l,y,7));break;case 5:var A=null;
vendor: 9,936 bytes, line 48
48switch(ct.tag){case 26:A=ct.memoizedState;case 5:case 27:var O=ct;if(A?$v(A):O.stateNode.complete){Mt=0,Ua=null;var G=O.sibling;if(G!==null)ct=G;else{var ie=O.return;ie!==null?(ct=ie,qd(ie)):ct=null}break t}}Mt=0,Ua=null,Co(r,l,y,5);break;case 6:Mt=0,Ua=null,Co(r,l,y,6);break;case 8:ex(),rn=6;break e;default:throw Error(a(462))}}TE();break}catch(me){tv(r,me)}while(!0);return Ss=dl=null,V.H=m,V.A=g,wt=u,ct!==null?0:(Ot=null,dt=0,od(),rn)}function TE(){for(;ct!==null&&!Da();)sv(ct)}function sv(r){var l=T4(r.alternate,r,zs);r.memoizedProps=r.pendingProps,l===null?qd(r):ct=l}function iv(r){var l=r,u=l.alternate;switch(l.tag){case 15:case 0:l=N4(u,l,l.pendingProps,l.type,void 0,dt);break;case 11:l=N4(u,l,l.pendingProps,l.type.render,l.ref,dt);break;case 5:xp(l);default:I4(u,l),l=ct=r5(l,zs),l=T4(u,l,zs)}r.memoizedProps=r.pendingProps,l===null?qd(r):ct=l}function Co(r,l,u,m){Ss=dl=null,xp(l),po=null,Xc=0;var g=l.return;try{if(gE(r,g,l,u,dt)){rn=1,Md(r,lr(u,r.current)),ct=null;return}}catch(y){if(g!==null)throw ct=g,y;rn=1,Md(r,lr(u,r.current)),ct=null;return}l.flags&32768?(mt||m===1?r=!0:So||(dt&536870912)!==0?r=!1:(ci=r=!0,(m===2||m===9||m===3||m===6)&&(m=La.current,m!==null&&m.tag===13&&(m.flags|=16384))),lv(l,r)):qd(l)}function qd(r){var l=r;do{if((l.flags&32768)!==0){lv(l,ci);return}r=l.return;var u=vE(l.alternate,l,zs);if(u!==null){ct=u;return}if(l=l.sibling,l!==null){ct=l;return}ct=l=r}while(l!==null);rn===0&&(rn=5)}function lv(r,l){do{var u=wE(r.alternate,r);if(u!==null){u.flags&=32767,ct=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!l&&(r=r.sibling,r!==null)){ct=r;return}ct=r=u}while(r!==null);rn=6,ct=null}function ov(r,l,u,m,g,y,A,O,G){r.cancelPendingCommit=null;do Hd();while(_n!==0);if((wt&6)!==0)throw Error(a(327));if(l!==null){if(l===r.current)throw Error(a(177));if(y=l.lanes|l.childLanes,y|=qf,wf(r,u,y,A,O,G),r===Ot&&(ct=Ot=null,dt=0),jo=l,hi=r,_s=u,Qp=y,Jp=g,Q4=m,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,_E(Ue,function(){return mv(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||m){m=V.T,V.T=null,g=ne.p,ne.p=2,A=wt,wt|=4;try{SE(r,l,u)}finally{wt=A,ne.p=g,V.T=m}}_n=1,cv(),uv(),dv()}}function cv(){if(_n===1){_n=0;var r=hi,l=jo,u=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||u){u=V.T,V.T=null;var m=ne.p;ne.p=2;var g=wt;wt|=4;try{q4(l,r);var y=mx,A=X2(r.containerInfo),O=y.focusedElem,G=y.selectionRange;if(A!==O&&O&&O.ownerDocument&&W2(O.ownerDocument.documentElement,O)){if(G!==null&&Lf(O)){var ie=G.start,me=G.end;if(me===void 0&&(me=ie),"selectionStart"in O)O.selectionStart=ie,O.selectionEnd=Math.min(me,O.value.length);else{var pe=O.ownerDocument||document,oe=pe&&pe.defaultView||window;if(oe.getSelection){var ce=oe.getSelection(),Pe=O.textContent.length,We=Math.min(G.start,Pe),Dt=G.end===void 0?We:Math.min(G.end,Pe);!ce.extend&&We>Dt&&(A=Dt,Dt=We,We=A);var ee=Y2(O,We),X=Y2(O,Dt);if(ee&&X&&(ce.rangeCount!==1||ce.anchorNode!==ee.node||ce.anchorOffset!==ee.offset||ce.focusNode!==X.node||ce.focusOffset!==X.offset)){var se=pe.createRange();se.setStart(ee.node,ee.offset),ce.removeAllRanges(),We>Dt?(ce.addRange(se),ce.extend(X.node,X.offset)):(se.setEnd(X.node,X.offset),ce.addRange(se))}}}}for(pe=[],ce=O;ce=ce.parentNode;)ce.nodeType===1&&pe.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<pe.length;O++){var fe=pe[O];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}nh=!!hx,mx=hx=null}finally{wt=g,ne.p=m,V.T=u}}r.current=l,_n=2}}function uv(){if(_n===2){_n=0;var r=hi,l=jo,u=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||u){u=V.T,V.T=null;var m=ne.p;ne.p=2;var g=wt;wt|=4;try{L4(r,l.alternate,l)}finally{wt=g,ne.p=m,V.T=u}}_n=3}}function dv(){if(_n===4||_n===3){_n=0,Zt();var r=hi,l=jo,u=_s,m=Q4;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?_n=5:(_n=0,jo=hi=null,hv(r,r.pendingLanes));var g=r.pendingLanes;if(g===0&&(di=null),Qs(u),l=l.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(Hn,l,void 0,(l.current.flags&128)===128)}catch{}if(m!==null){l=V.T,g=ne.p,ne.p=2,V.T=null;try{for(var y=r.onRecoverableError,A=0;A<m.length;A++){var O=m[A];y(O.value,{componentStack:O.stack})}}finally{V.T=l,ne.p=g}}(_s&3)!==0&&Hd(),$r(r),g=r.pendingLanes,(u&261930)!==0&&(g&42)!==0?r===Zp?hu++:(hu=0,Zp=r):hu=0,mu(0)}}function hv(r,l){(r.pooledCacheLanes&=l)===0&&(l=r.pooledCache,l!=null&&(r.pooledCache=null,Yc(l)))}function Hd(){return cv(),uv(),dv(),mv()}function mv(){if(_n!==5)return!1;var r=hi,l=Qp;Qp=0;var u=Qs(_s),m=V.T,g=ne.p;try{ne.p=32>u?32:u,V.T=null,u=Jp,Jp=null;var y=hi,A=_s;if(_n=0,jo=hi=null,_s=0,(wt&6)!==0)throw Error(a(331));var O=wt;if(wt|=4,W4(y.current),$4(y,y.current,A,u),wt=O,mu(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(Hn,y)}catch{}return!0}finally{ne.p=g,V.T=m,hv(r,l)}}function fv(r,l,u){l=lr(u,l),l=Ip(r.stateNode,l,2),r=si(r,l,2),r!==null&&(rl(r,2),$r(r))}function It(r,l,u){if(r.tag===3)fv(r,r,u);else for(;l!==null;){if(l.tag===3){fv(l,r,u);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(di===null||!di.has(m))){r=lr(u,r),u=p4(2),m=si(l,u,2),m!==null&&(x4(u,m,l,r),rl(m,2),$r(m));break}}l=l.return}}function nx(r,l,u){var m=r.pingCache;if(m===null){m=r.pingCache=new kE;var g=new Set;m.set(l,g)}else g=m.get(l),g===void 0&&(g=new Set,m.set(l,g));g.has(u)||(Wp=!0,g.add(u),r=ME.bind(null,r,l,u),l.then(r,r))}function ME(r,l,u){var m=r.pingCache;m!==null&&m.delete(l),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Ot===r&&(dt&u)===u&&(rn===4||rn===3&&(dt&62914560)===dt&&300>Ct()-Ld?(wt&2)===0&&ko(r,0):Xp|=u,No===dt&&(No=0)),$r(r)}function pv(r,l){l===0&&(l=Ic()),r=ol(r,l),r!==null&&(rl(r,l),$r(r))}function IE(r){var l=r.memoizedState,u=0;l!==null&&(u=l.retryLane),pv(r,u)}function zE(r,l){var u=0;switch(r.tag){case 31:case 13:var m=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(a(314))}m!==null&&m.delete(l),pv(r,u)}function _E(r,l){return xn(r,l)}var $d=null,Ao=null,ax=!1,Gd=!1,rx=!1,fi=0;function $r(r){r!==Ao&&r.next===null&&(Ao===null?$d=Ao=r:Ao=Ao.next=r),Gd=!0,ax||(ax=!0,BE())}function mu(r,l){if(!rx&&Gd){rx=!0;do for(var u=!1,m=$d;m!==null;){if(r!==0){var g=m.pendingLanes;if(g===0)var y=0;else{var A=m.suspendedLanes,O=m.pingedLanes;y=(1<<31-Tt(42|r)+1)-1,y&=g&~(A&~O),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(u=!0,yv(m,y))}else y=dt,y=Kl(m,m===Ot?y:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(y&3)===0||Ur(m,y)||(u=!0,yv(m,y));m=m.next}while(u);rx=!1}}function DE(){xv()}function xv(){Gd=ax=!1;var r=0;fi!==0&&$E()&&(r=fi);for(var l=Ct(),u=null,m=$d;m!==null;){var g=m.next,y=gv(m,l);y===0?(m.next=null,u===null?$d=g:u.next=g,g===null&&(Ao=u)):(u=m,(r!==0||(y&3)!==0)&&(Gd=!0)),m=g}_n!==0&&_n!==5||mu(r),fi!==0&&(fi=0)}function gv(r,l){for(var u=r.suspendedLanes,m=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes&-62914561;0<y;){var A=31-Tt(y),O=1<<A,G=g[A];G===-1?((O&u)===0||(O&m)!==0)&&(g[A]=Y0(O,l)):G<=l&&(r.expiredLanes|=O),y&=~O}if(l=Ot,u=dt,u=Kl(r,r===l?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,u===0||r===l&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&Vn(m),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||Ur(r,u)){if(l=u&-u,l===r.callbackPriority)return l;switch(m!==null&&Vn(m),Qs(u)){case 2:case 8:u=we;break;case 32:u=Ue;break;case 268435456:u=st;break;default:u=Ue}return m=bv.bind(null,r),u=xn(u,m),r.callbackPriority=l,r.callbackNode=u,l}return m!==null&&m!==null&&Vn(m),r.callbackPriority=2,r.callbackNode=null,2}function bv(r,l){if(_n!==0&&_n!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Hd()&&r.callbackNode!==u)return null;var m=dt;return m=Kl(r,r===Ot?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(Z4(r,m,l),gv(r,Ct()),r.callbackNode!=null&&r.callbackNode===u?bv.bind(null,r):null)}function yv(r,l){if(Hd())return null;Z4(r,l,!0)}function BE(){YE(function(){(wt&6)!==0?xn(ue,DE):xv()})}function sx(){if(fi===0){var r=ho;r===0&&(r=un,un<<=1,(un&261888)===0&&(un=256)),fi=r}return fi}function vv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:ed(""+r)}function wv(r,l){var u=l.ownerDocument.createElement("input");return u.name=l.name,u.value=l.value,r.id&&u.setAttribute("form",r.id),l.parentNode.insertBefore(u,l),r=new FormData(r),u.parentNode.removeChild(u),r}function RE(r,l,u,m,g){if(l==="submit"&&u&&u.stateNode===g){var y=vv((g[$n]||null).action),A=m.submitter;A&&(l=(l=A[$n]||null)?vv(l.formAction):A.getAttribute("formAction"),l!==null&&(y=l,A=null));var O=new rd("action","action",null,m,g);r.push({event:O,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(fi!==0){var G=A?wv(g,A):new FormData(g);kp(u,{pending:!0,data:G,method:g.method,action:y},null,G)}}else typeof y=="function"&&(O.preventDefault(),G=A?wv(g,A):new FormData(g),kp(u,{pending:!0,data:G,method:g.method,action:y},y,G))},currentTarget:g}]})}}for(var ix=0;ix<Vf.length;ix++){var lx=Vf[ix],OE=lx.toLowerCase(),LE=lx[0].toUpperCase()+lx.slice(1);Er(OE,"on"+LE)}Er(J2,"onAnimationEnd"),Er(Z2,"onAnimationIteration"),Er(e5,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(eE,"onTransitionRun"),Er(tE,"onTransitionStart"),Er(nE,"onTransitionCancel"),Er(t5,"onTransitionEnd"),nr("onMouseEnter",["mouseout","mouseover"]),nr("onMouseLeave",["mouseout","mouseover"]),nr("onPointerEnter",["pointerout","pointerover"]),nr("onPointerLeave",["pointerout","pointerover"]),At("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),At("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),At("onBeforeInput",["compositionend","keypress","textInput","paste"]),At("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),At("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),At("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fu="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(" "),PE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fu));function Sv(r,l){l=(l&4)!==0;for(var u=0;u<r.length;u++){var m=r[u],g=m.event;m=m.listeners;e:{var y=void 0;if(l)for(var A=m.length-1;0<=A;A--){var O=m[A],G=O.instance,ie=O.currentTarget;if(O=O.listener,G!==y&&g.isPropagationStopped())break e;y=O,g.currentTarget=ie;try{y(g)}catch(me){ld(me)}g.currentTarget=null,y=G}else for(A=0;A<m.length;A++){if(O=m[A],G=O.instance,ie=O.currentTarget,O=O.listener,G!==y&&g.isPropagationStopped())break e;y=O,g.currentTarget=ie;try{y(g)}catch(me){ld(me)}g.currentTarget=null,y=G}}}}function ut(r,l){var u=l[Ql];u===void 0&&(u=l[Ql]=new Set);var m=r+"__bubble";u.has(m)||(Nv(l,r,2,!1),u.add(m))}function ox(r,l,u){var m=0;l&&(m|=4),Nv(u,r,m,l)}var Yd="_reactListening"+Math.random().toString(36).slice(2);function cx(r){if(!r[Yd]){r[Yd]=!0,ua.forEach(function(u){u!=="selectionchange"&&(PE.has(u)||ox(u,!1,r),ox(u,!0,r))});var l=r.nodeType===9?r:r.ownerDocument;l===null||l[Yd]||(l[Yd]=!0,ox("selectionchange",!1,l))}}function Nv(r,l,u,m){switch(Jv(l)){case 2:var g=mT;break;case 8:g=fT;break;default:g=jx}u=g.bind(null,l,u,r),g=void 0,!Tf||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(g=!0),m?g!==void 0?r.addEventListener(l,u,{capture:!0,passive:g}):r.addEventListener(l,u,!0):g!==void 0?r.addEventListener(l,u,{passive:g}):r.addEventListener(l,u,!1)}function ux(r,l,u,m,g){var y=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var A=m.tag;if(A===3||A===4){var O=m.stateNode.containerInfo;if(O===g)break;if(A===4)for(A=m.return;A!==null;){var G=A.tag;if((G===3||G===4)&&A.stateNode.containerInfo===g)return;A=A.return}for(;O!==null;){if(A=He(O),A===null)return;if(G=A.tag,G===5||G===6||G===26||G===27){m=y=A;continue e}O=O.parentNode}}m=m.return}E2(function(){var ie=y,me=Af(u),pe=[];e:{var oe=n5.get(r);if(oe!==void 0){var ce=rd,Pe=r;switch(r){case"keypress":if(nd(u)===0)break e;case"keydown":case"keyup":ce=zA;break;case"focusin":Pe="focus",ce=_f;break;case"focusout":Pe="blur",ce=_f;break;case"beforeblur":case"afterblur":ce=_f;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=I2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=vA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=BA;break;case J2:case Z2:case e5:ce=NA;break;case t5:ce=OA;break;case"scroll":case"scrollend":ce=bA;break;case"wheel":ce=PA;break;case"copy":case"cut":case"paste":ce=kA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=_2;break;case"toggle":case"beforetoggle":ce=FA}var We=(l&4)!==0,Dt=!We&&(r==="scroll"||r==="scrollend"),ee=We?oe!==null?oe+"Capture":null:oe;We=[];for(var X=ie,se;X!==null;){var fe=X;if(se=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||se===null||ee===null||(fe=Rc(X,ee),fe!=null&&We.push(pu(X,fe,se))),Dt)break;X=X.return}0<We.length&&(oe=new ce(oe,Pe,null,u,me),pe.push({event:oe,listeners:We}))}}if((l&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",ce=r==="mouseout"||r==="pointerout",oe&&u!==Cf&&(Pe=u.relatedTarget||u.fromElement)&&(He(Pe)||Pe[xs]))break e;if((ce||oe)&&(oe=me.window===me?me:(oe=me.ownerDocument)?oe.defaultView||oe.parentWindow:window,ce?(Pe=u.relatedTarget||u.toElement,ce=ie,Pe=Pe?He(Pe):null,Pe!==null&&(Dt=o(Pe),We=Pe.tag,Pe!==Dt||We!==5&&We!==27&&We!==6)&&(Pe=null)):(ce=null,Pe=ie),ce!==Pe)){if(We=I2,fe="onMouseLeave",ee="onMouseEnter",X="mouse",(r==="pointerout"||r==="pointerover")&&(We=_2,fe="onPointerLeave",ee="onPointerEnter",X="pointer"),Dt=ce==null?oe:ot(ce),se=Pe==null?oe:ot(Pe),oe=new We(fe,X+"leave",ce,u,me),oe.target=Dt,oe.relatedTarget=se,fe=null,He(me)===ie&&(We=new We(ee,X+"enter",Pe,u,me),We.target=se,We.relatedTarget=Dt,fe=We),Dt=fe,ce&&Pe)t:{for(We=UE,ee=ce,X=Pe,se=0,fe=ee;fe;fe=We(fe))se++;fe=0;for(var $e=X;$e;$e=We($e))fe++;for(;0<se-fe;)ee=We(ee),se--;for(;0<fe-se;)X=We(X),fe--;for(;se--;){if(ee===X||X!==null&&ee===X.alternate){We=ee;break t}ee=We(ee),X=We(X)}We=null}else We=null;ce!==null&&jv(pe,oe,ce,We,!1),Pe!==null&&Dt!==null&&jv(pe,Dt,Pe,We,!0)}}
vendor: 5,244 bytes, lines 48-49
48e:{if(oe=ie?ot(ie):window,ce=oe.nodeName&&oe.nodeName.toLowerCase(),ce==="select"||ce==="input"&&oe.type==="file")var xt=F2;else if(P2(oe))if(V2)xt=QA;else{xt=XA;var qe=WA}else ce=oe.nodeName,!ce||ce.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ie&&kf(ie.elementType)&&(xt=F2):xt=KA;if(xt&&(xt=xt(r,ie))){U2(pe,xt,u,me);break e}qe&&qe(r,oe,ie),r==="focusout"&&ie&&oe.type==="number"&&ie.memoizedProps.value!=null&&jf(oe,"number",oe.value)}switch(qe=ie?ot(ie):window,r){case"focusin":(P2(qe)||qe.contentEditable==="true")&&(ao=qe,Pf=ie,Hc=null);break;case"focusout":Hc=Pf=ao=null;break;case"mousedown":Uf=!0;break;case"contextmenu":case"mouseup":case"dragend":Uf=!1,K2(pe,u,me);break;case"selectionchange":if(ZA)break;case"keydown":case"keyup":K2(pe,u,me)}var nt;if(Bf)e:{switch(r){case"compositionstart":var ht="onCompositionStart";break e;case"compositionend":ht="onCompositionEnd";break e;case"compositionupdate":ht="onCompositionUpdate";break e}ht=void 0}else no?O2(r,u)&&(ht="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(ht="onCompositionStart");ht&&(D2&&u.locale!=="ko"&&(no||ht!=="onCompositionStart"?ht==="onCompositionEnd"&&no&&(nt=T2()):(Js=me,Mf="value"in Js?Js.value:Js.textContent,no=!0)),qe=Wd(ie,ht),0<qe.length&&(ht=new z2(ht,r,null,u,me),pe.push({event:ht,listeners:qe}),nt?ht.data=nt:(nt=L2(u),nt!==null&&(ht.data=nt)))),(nt=qA?HA(r,u):$A(r,u))&&(ht=Wd(ie,"onBeforeInput"),0<ht.length&&(qe=new z2("onBeforeInput","beforeinput",null,u,me),pe.push({event:qe,listeners:ht}),qe.data=nt)),RE(pe,r,ie,u,me)}Sv(pe,l)})}function pu(r,l,u){return{instance:r,listener:l,currentTarget:u}}function Wd(r,l){for(var u=l+"Capture",m=[];r!==null;){var g=r,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=Rc(r,u),g!=null&&m.unshift(pu(r,g,y)),g=Rc(r,l),g!=null&&m.push(pu(r,g,y))),r.tag===3)return m;r=r.return}return[]}function UE(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function jv(r,l,u,m,g){for(var y=l._reactName,A=[];u!==null&&u!==m;){var O=u,G=O.alternate,ie=O.stateNode;if(O=O.tag,G!==null&&G===m)break;O!==5&&O!==26&&O!==27||ie===null||(G=ie,g?(ie=Rc(u,y),ie!=null&&A.unshift(pu(u,ie,G))):g||(ie=Rc(u,y),ie!=null&&A.push(pu(u,ie,G)))),u=u.return}A.length!==0&&r.push({event:l,listeners:A})}var FE=/\r\n?/g,VE=/\u0000|\uFFFD/g;function kv(r){return(typeof r=="string"?r:""+r).replace(FE,` 49`).replace(VE,"")}function Cv(r,l){return l=kv(l),kv(r)===l}function _t(r,l,u,m,g,y){switch(u){case"children":typeof m=="string"?l==="body"||l==="textarea"&&m===""||Zl(r,m):(typeof m=="number"||typeof m=="bigint")&&l!=="body"&&Zl(r,""+m);break;case"className":J0(r,"class",m);break;case"tabIndex":J0(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":J0(r,u,m);break;case"style":C2(r,m,y);break;case"data":if(l!=="object"){J0(r,"data",m);break}case"src":case"href":if(m===""&&(l!=="a"||u!=="href")){r.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=ed(""+m),r.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(u==="formAction"?(l!=="input"&&_t(r,l,"name",g.name,g,null),_t(r,l,"formEncType",g.formEncType,g,null),_t(r,l,"formMethod",g.formMethod,g,null),_t(r,l,"formTarget",g.formTarget,g,null)):(_t(r,l,"encType",g.encType,g,null),_t(r,l,"method",g.method,g,null),_t(r,l,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=ed(""+m),r.setAttribute(u,m);break;case"onClick":m!=null&&(r.onclick=bs);break;case"onScroll":m!=null&&ut("scroll",r);break;case"onScrollEnd":m!=null&&ut("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(a(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=u}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}u=ed(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,""+m):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":m===!0?r.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,m):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(u,m):r.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(u):r.setAttribute(u,m);break;case"popover":ut("beforetoggle",r),ut("toggle",r),Q0(r,"popover",m);break;case"xlinkActuate":gs(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":gs(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":gs(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":gs(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":gs(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":gs(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":gs(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":gs(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":gs(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Q0(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=xA.get(u)||u,Q0(r,u,m))}}function dx(r,l,u,m,g,y){switch(u){case"style":C2(r,m,y);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(a(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=u}}break;case"children":typeof m=="string"?Zl(r,m):(typeof m=="number"||typeof m=="bigint")&&Zl(r,""+m);break;case"onScroll":m!=null&&ut("scroll",r);break;case"onScrollEnd":m!=null&&ut("scrollend",r);break;case"onClick":m!=null&&(r.onclick=bs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bn.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),l=u.slice(2,g?u.length-7:void 0),y=r[$n]||null,y=y!=null?y[u]:null,typeof y=="function"&&r.removeEventListener(l,y,g),typeof m=="function")){typeof y!="function"&&y!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(l,m,g);break e}u in r?r[u]=m:m===!0?r.setAttribute(u,""):Q0(r,u,m)}}}function Kn(r,l,u){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ut("error",r),ut("load",r);var m=!1,g=!1,y;for(y in u)if(u.hasOwnProperty(y)){var A=u[y];if(A!=null)switch(y){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,l));default:_t(r,l,y,A,u,null)}}g&&_t(r,l,"srcSet",u.srcSet,u,null),m&&_t(r,l,"src",u.src,u,null);return;case"input":ut("invalid",r);var O=y=A=g=null,G=null,ie=null;for(m in u)if(u.hasOwnProperty(m)){var me=u[m];if(me!=null)switch(m){case"name":g=me;break;case"type":A=me;break;case"checked":G=me;break;case"defaultChecked":ie=me;break;case"value":y=me;break;case"defaultValue":O=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,l));break;default:_t(r,l,m,me,u,null)}}S2(r,y,O,G,ie,A,g,!1);return;case"select":ut("invalid",r),m=A=y=null;for(g in u)if(u.hasOwnProperty(g)&&(O=u[g],O!=null))switch(g){case"value":y=O;break;case"defaultValue":A=O;break;case"multiple":m=O;default:_t(r,l,g,O,u,null)}l=y,u=A,r.multiple=!!m,l!=null?Jl(r,!!m,l,!1):u!=null&&Jl(r,!!m,u,!0);return;case"textarea":ut("invalid",r),y=g=m=null;for(A in u)if(u.hasOwnProperty(A)&&(O=u[A],O!=null))switch(A){case"value":m=O;break;case"defaultValue":g=O;break;case"children":y=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(a(91));break;default:_t(r,l,A,O,u,null)}j2(r,m,g,y);return;case"option":for(G in u)if(u.hasOwnProperty(G)&&(m=u[G],m!=null))switch(G){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:_t(r,l,G,m,u,null)}return;case"dialog":ut("beforetoggle",r),ut("toggle",r),ut("cancel",r),ut("close",r);break;case"iframe":case"object":ut("load",r);break;case"video":case"audio":for(m=0;m<fu.length;m++)ut(fu[m],r);break;case"image":ut("error",r),ut("load",r);break;case"details":ut("toggle",r);break;case"embed":case"source":case"link":ut("error",r),ut("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in u)if(u.hasOwnProperty(ie)&&(m=u[ie],m!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,l));default:_t(r,l,ie,m,u,null)}return;default:if(kf(l)){for(me in u)u.hasOwnProperty(me)&&(m=u[me],m!==void 0&&dx(r,l,me,m,u,void 0));return}}for(O in u)u.hasOwnProperty(O)&&(m=u[O],m!=null&&_t(r,l,O,m,u,null))}function qE(r,l,u,m){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,A=null,O=null,G=null,ie=null,me=null;for(ce in u){var pe=u[ce];
vendor: 7,821 bytes, line 49
49if(u.hasOwnProperty(ce)&&pe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":G=pe;default:m.hasOwnProperty(ce)||_t(r,l,ce,null,m,pe)}}for(var oe in m){var ce=m[oe];if(pe=u[oe],m.hasOwnProperty(oe)&&(ce!=null||pe!=null))switch(oe){case"type":y=ce;break;case"name":g=ce;break;case"checked":ie=ce;break;case"defaultChecked":me=ce;break;case"value":A=ce;break;case"defaultValue":O=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(a(137,l));break;default:ce!==pe&&_t(r,l,oe,ce,m,pe)}}Nf(r,A,O,G,ie,me,y,g);return;case"select":ce=A=O=oe=null;for(y in u)if(G=u[y],u.hasOwnProperty(y)&&G!=null)switch(y){case"value":break;case"multiple":ce=G;default:m.hasOwnProperty(y)||_t(r,l,y,null,m,G)}for(g in m)if(y=m[g],G=u[g],m.hasOwnProperty(g)&&(y!=null||G!=null))switch(g){case"value":oe=y;break;case"defaultValue":O=y;break;case"multiple":A=y;default:y!==G&&_t(r,l,g,y,m,G)}l=O,u=A,m=ce,oe!=null?Jl(r,!!u,oe,!1):!!m!=!!u&&(l!=null?Jl(r,!!u,l,!0):Jl(r,!!u,u?[]:"",!1));return;case"textarea":ce=oe=null;for(O in u)if(g=u[O],u.hasOwnProperty(O)&&g!=null&&!m.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:_t(r,l,O,null,m,g)}for(A in m)if(g=m[A],y=u[A],m.hasOwnProperty(A)&&(g!=null||y!=null))switch(A){case"value":oe=g;break;case"defaultValue":ce=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==y&&_t(r,l,A,g,m,y)}N2(r,oe,ce);return;case"option":for(var Pe in u)if(oe=u[Pe],u.hasOwnProperty(Pe)&&oe!=null&&!m.hasOwnProperty(Pe))switch(Pe){case"selected":r.selected=!1;break;default:_t(r,l,Pe,null,m,oe)}for(G in m)if(oe=m[G],ce=u[G],m.hasOwnProperty(G)&&oe!==ce&&(oe!=null||ce!=null))switch(G){case"selected":r.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:_t(r,l,G,oe,m,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var We in u)oe=u[We],u.hasOwnProperty(We)&&oe!=null&&!m.hasOwnProperty(We)&&_t(r,l,We,null,m,oe);for(ie in m)if(oe=m[ie],ce=u[ie],m.hasOwnProperty(ie)&&oe!==ce&&(oe!=null||ce!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,l));break;default:_t(r,l,ie,oe,m,ce)}return;default:if(kf(l)){for(var Dt in u)oe=u[Dt],u.hasOwnProperty(Dt)&&oe!==void 0&&!m.hasOwnProperty(Dt)&&dx(r,l,Dt,void 0,m,oe);for(me in m)oe=m[me],ce=u[me],!m.hasOwnProperty(me)||oe===ce||oe===void 0&&ce===void 0||dx(r,l,me,oe,m,ce);return}}for(var ee in u)oe=u[ee],u.hasOwnProperty(ee)&&oe!=null&&!m.hasOwnProperty(ee)&&_t(r,l,ee,null,m,oe);for(pe in m)oe=m[pe],ce=u[pe],!m.hasOwnProperty(pe)||oe===ce||oe==null&&ce==null||_t(r,l,pe,oe,m,ce)}function Av(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HE(){if(typeof performance.getEntriesByType=="function"){for(var r=0,l=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var g=u[m],y=g.transferSize,A=g.initiatorType,O=g.duration;if(y&&O&&Av(A)){for(A=0,O=g.responseEnd,m+=1;m<u.length;m++){var G=u[m],ie=G.startTime;if(ie>O)break;var me=G.transferSize,pe=G.initiatorType;me&&Av(pe)&&(G=G.responseEnd,A+=me*(G<O?1:(O-ie)/(G-ie)))}if(--m,l+=8*(y+A)/(g.duration/1e3),r++,10<r)break}}if(0<r)return l/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var hx=null,mx=null;function Xd(r){return r.nodeType===9?r:r.ownerDocument}function Ev(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tv(r,l){if(r===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&l==="foreignObject"?0:r}function fx(r,l){return r==="textarea"||r==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var px=null;function $E(){var r=window.event;return r&&r.type==="popstate"?r===px?!1:(px=r,!0):(px=null,!1)}var Mv=typeof setTimeout=="function"?setTimeout:void 0,GE=typeof clearTimeout=="function"?clearTimeout:void 0,Iv=typeof Promise=="function"?Promise:void 0,YE=typeof queueMicrotask=="function"?queueMicrotask:typeof Iv<"u"?function(r){return Iv.resolve(null).then(r).catch(WE)}:Mv;function WE(r){setTimeout(function(){throw r})}function pi(r){return r==="head"}function zv(r,l){var u=l,m=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){r.removeChild(g),Io(l);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")xu(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,xu(u);for(var y=u.firstChild;y;){var A=y.nextSibling,O=y.nodeName;y[be]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&y.rel.toLowerCase()==="stylesheet"||u.removeChild(y),y=A}}else u==="body"&&xu(r.ownerDocument.body);u=g}while(u);Io(l)}function _v(r,l){var u=r;r=0;do{var m=u.nextSibling;if(u.nodeType===1?l?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(l?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=m}while(u)}function xx(r){var l=r.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var u=l;switch(l=l.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":xx(u),De(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function XE(r,l,u,m){for(;r.nodeType===1;){var g=u;if(r.nodeName.toLowerCase()!==l.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[be])switch(l){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(y=r.getAttribute("rel"),y==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(y!==g.rel||r.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||r.getAttribute("title")!==(g.title==null?null:g.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(y=r.getAttribute("src"),(y!==(g.src==null?null:g.src)||r.getAttribute("type")!==(g.type==null?null:g.type)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(l==="input"&&r.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&r.getAttribute("name")===y)return r}else return r;if(r=hr(r.nextSibling),r===null)break}return null}function KE(r,l,u){if(l==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=hr(r.nextSibling),r===null))return null;return r}function Dv(r,l){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=hr(r.nextSibling),r===null))return null;return r}function gx(r){return r.data==="$?"||r.data==="$~"}function bx(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function QE(r,l){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=l;else if(r.data!=="$?"||u.readyState!=="loading")l();else{var m=function(){l(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function hr(r){for(;r!=null;r=r.nextSibling){var l=r.nodeType;if(l===1||l===3)break;if(l===8){if(l=r.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;
vendor: 12,033 bytes, line 49
49if(l==="/$"||l==="/&")return null}}return r}var yx=null;function Bv(r){r=r.nextSibling;for(var l=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(l===0)return hr(r.nextSibling);l--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||l++}r=r.nextSibling}return null}function Rv(r){r=r.previousSibling;for(var l=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(l===0)return r;l--}else u!=="/$"&&u!=="/&"||l++}r=r.previousSibling}return null}function Ov(r,l,u){switch(l=Xd(u),r){case"html":if(r=l.documentElement,!r)throw Error(a(452));return r;case"head":if(r=l.head,!r)throw Error(a(453));return r;case"body":if(r=l.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function xu(r){for(var l=r.attributes;l.length;)r.removeAttributeNode(l[0]);De(r)}var mr=new Map,Lv=new Set;function Kd(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ds=ne.d;ne.d={f:JE,r:ZE,D:eT,C:tT,L:nT,m:aT,X:sT,S:rT,M:iT};function JE(){var r=Ds.f(),l=Fd();return r||l}function ZE(r){var l=Rt(r);l!==null&&l.tag===5&&l.type==="form"?t4(l):Ds.r(r)}var Eo=typeof document>"u"?null:document;function Pv(r,l,u){var m=Eo;if(m&&typeof l=="string"&&l){var g=sr(l);g='link[rel="'+r+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),Lv.has(g)||(Lv.add(g),r={rel:r,crossOrigin:u,href:l},m.querySelector(g)===null&&(l=m.createElement("link"),Kn(l,"link",r),pt(l),m.head.appendChild(l)))}}function eT(r){Ds.D(r),Pv("dns-prefetch",r,null)}function tT(r,l){Ds.C(r,l),Pv("preconnect",r,l)}function nT(r,l,u){Ds.L(r,l,u);var m=Eo;if(m&&r&&l){var g='link[rel="preload"][as="'+sr(l)+'"]';l==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+sr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+sr(u.imageSizes)+'"]')):g+='[href="'+sr(r)+'"]';var y=g;switch(l){case"style":y=To(r);break;case"script":y=Mo(r)}mr.has(y)||(r=x({rel:"preload",href:l==="image"&&u&&u.imageSrcSet?void 0:r,as:l},u),mr.set(y,r),m.querySelector(g)!==null||l==="style"&&m.querySelector(gu(y))||l==="script"&&m.querySelector(bu(y))||(l=m.createElement("link"),Kn(l,"link",r),pt(l),m.head.appendChild(l)))}}function aT(r,l){Ds.m(r,l);var u=Eo;if(u&&r){var m=l&&typeof l.as=="string"?l.as:"script",g='link[rel="modulepreload"][as="'+sr(m)+'"][href="'+sr(r)+'"]',y=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Mo(r)}if(!mr.has(y)&&(r=x({rel:"modulepreload",href:r},l),mr.set(y,r),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(bu(y)))return}m=u.createElement("link"),Kn(m,"link",r),pt(m),u.head.appendChild(m)}}}function rT(r,l,u){Ds.S(r,l,u);var m=Eo;if(m&&r){var g=nn(m).hoistableStyles,y=To(r);l=l||"default";var A=g.get(y);if(!A){var O={loading:0,preload:null};if(A=m.querySelector(gu(y)))O.loading=5;else{r=x({rel:"stylesheet",href:r,"data-precedence":l},u),(u=mr.get(y))&&vx(r,u);var G=A=m.createElement("link");pt(G),Kn(G,"link",r),G._p=new Promise(function(ie,me){G.onload=ie,G.onerror=me}),G.addEventListener("load",function(){O.loading|=1}),G.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Qd(A,l,m)}A={type:"stylesheet",instance:A,count:1,state:O},g.set(y,A)}}}function sT(r,l){Ds.X(r,l);var u=Eo;if(u&&r){var m=nn(u).hoistableScripts,g=Mo(r),y=m.get(g);y||(y=u.querySelector(bu(g)),y||(r=x({src:r,async:!0},l),(l=mr.get(g))&&wx(r,l),y=u.createElement("script"),pt(y),Kn(y,"link",r),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},m.set(g,y))}}function iT(r,l){Ds.M(r,l);var u=Eo;if(u&&r){var m=nn(u).hoistableScripts,g=Mo(r),y=m.get(g);y||(y=u.querySelector(bu(g)),y||(r=x({src:r,async:!0,type:"module"},l),(l=mr.get(g))&&wx(r,l),y=u.createElement("script"),pt(y),Kn(y,"link",r),u.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},m.set(g,y))}}function Uv(r,l,u,m){var g=(g=Te.current)?Kd(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(l=To(u.href),u=nn(g).hoistableStyles,m=u.get(l),m||(m={type:"style",instance:null,count:0,state:null},u.set(l,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=To(u.href);var y=nn(g).hoistableStyles,A=y.get(r);if(A||(g=g.ownerDocument||g,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(r,A),(y=g.querySelector(gu(r)))&&!y._p&&(A.instance=y,A.state.loading=5),mr.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},mr.set(r,u),y||lT(g,r,u,A.state))),l&&m===null)throw Error(a(528,""));return A}if(l&&m!==null)throw Error(a(529,""));return null;case"script":return l=u.async,u=u.src,typeof u=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Mo(u),u=nn(g).hoistableScripts,m=u.get(l),m||(m={type:"script",instance:null,count:0,state:null},u.set(l,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function To(r){return'href="'+sr(r)+'"'}function gu(r){return'link[rel="stylesheet"]['+r+"]"}function Fv(r){return x({},r,{"data-precedence":r.precedence,precedence:null})}function lT(r,l,u,m){r.querySelector('link[rel="preload"][as="style"]['+l+"]")?m.loading=1:(l=r.createElement("link"),m.preload=l,l.addEventListener("load",function(){return m.loading|=1}),l.addEventListener("error",function(){return m.loading|=2}),Kn(l,"link",u),pt(l),r.head.appendChild(l))}function Mo(r){return'[src="'+sr(r)+'"]'}function bu(r){return"script[async]"+r}function Vv(r,l,u){if(l.count++,l.instance===null)switch(l.type){case"style":var m=r.querySelector('style[data-href~="'+sr(u.href)+'"]');if(m)return l.instance=m,pt(m),m;var g=x({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),pt(m),Kn(m,"style",g),Qd(m,u.precedence,r),l.instance=m;case"stylesheet":g=To(u.href);var y=r.querySelector(gu(g));if(y)return l.state.loading|=4,l.instance=y,pt(y),y;m=Fv(u),(g=mr.get(g))&&vx(m,g),y=(r.ownerDocument||r).createElement("link"),pt(y);var A=y;return A._p=new Promise(function(O,G){A.onload=O,A.onerror=G}),Kn(y,"link",m),l.state.loading|=4,Qd(y,u.precedence,r),l.instance=y;case"script":return y=Mo(u.src),(g=r.querySelector(bu(y)))?(l.instance=g,pt(g),g):(m=u,(g=mr.get(y))&&(m=x({},u),wx(m,g)),r=r.ownerDocument||r,g=r.createElement("script"),pt(g),Kn(g,"link",m),r.head.appendChild(g),l.instance=g);case"void":return null;default:throw Error(a(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(m=l.instance,l.state.loading|=4,Qd(m,u.precedence,r));return l.instance}function Qd(r,l,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=m.length?m[m.length-1]:null,y=g,A=0;A<m.length;A++){var O=m[A];if(O.dataset.precedence===l)y=O;else if(y!==g)break}y?y.parentNode.insertBefore(r,y.nextSibling):(l=u.nodeType===9?u.head:u,l.insertBefore(r,l.firstChild))}function vx(r,l){r.crossOrigin==null&&(r.crossOrigin=l.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=l.referrerPolicy),r.title==null&&(r.title=l.title)}function wx(r,l){r.crossOrigin==null&&(r.crossOrigin=l.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=l.referrerPolicy),r.integrity==null&&(r.integrity=l.integrity)}var Jd=null;function qv(r,l,u){if(Jd===null){var m=new Map,g=Jd=new Map;g.set(u,m)}else g=Jd,m=g.get(u),m||(m=new Map,g.set(u,m));if(m.has(r))return m;for(m.set(r,null),u=u.getElementsByTagName(r),g=0;g<u.length;g++){var y=u[g];if(!(y[be]||y[gn]||r==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(l)||"";A=r+A;var O=m.get(A);O?O.push(y):m.set(A,[y])}}return m}function Hv(r,l,u){r=r.ownerDocument||r,r.head.insertBefore(u,l==="title"?r.querySelector("head > title"):null)}function oT(r,l,u){if(u===1||l.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return r=l.disabled,typeof l.precedence=="string"&&r==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function $v(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function cT(r,l,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=To(m.href),y=l.querySelector(gu(g));if(y){l=y._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(r.count++,r=Zd.bind(r),l.then(r,r)),u.state.loading|=4,u.instance=y,pt(y);return}y=l.ownerDocument||l,m=Fv(m),(g=mr.get(g))&&vx(m,g),y=y.createElement("link"),pt(y);var A=y;A._p=new Promise(function(O,G){A.onload=O,A.onerror=G}),Kn(y,"link",m),u.instance=y}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,l),(l=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=Zd.bind(r),l.addEventListener("load",u),l.addEventListener("error",u))}}var Sx=0;function uT(r,l){return r.stylesheets&&r.count===0&&th(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var m=setTimeout(function(){if(r.stylesheets&&th(r,r.stylesheets),r.unsuspend){var y=r.unsuspend;r.unsuspend=null,y()}},6e4+l);0<r.imgBytes&&Sx===0&&(Sx=62500*HE());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&th(r,r.stylesheets),r.unsuspend)){var y=r.unsuspend;r.unsuspend=null,y()}},(r.imgBytes>Sx?50:800)+l);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function Zd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)th(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var eh=null;function th(r,l){r.stylesheets=null,r.unsuspend!==null&&(r.count++,eh=new Map,l.forEach(dT,r),eh=null,Zd.call(r))}function dT(r,l){if(!(l.state.loading&4)){var u=eh.get(r);if(u)var m=u.get(null);else{u=new Map,eh.set(r,u);for(var g=r.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var A=g[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),m=A)}m&&u.set(null,m)}g=l.instance,A=g.getAttribute("data-precedence"),y=u.get(A)||m,y===m&&u.set(null,g),u.set(A,g),this.count++,m=Zd.bind(this),g.addEventListener("load",m),g.addEventListener("error",m),y?y.parentNode.insertBefore(g,y.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),l.state.loading|=4}}var yu={$$typeof:k,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function hT(r,l,u,m,g,y,A,O,G){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=al(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=al(0),this.hiddenUpdates=al(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Gv(r,l,u,m,g,y,A,O,G,ie,me,pe){return r=new hT(r,l,u,A,G,ie,me,pe,O),l=1,y===!0&&(l|=24),y=Oa(3,null,null,l),r.current=y,y.stateNode=r,l=tp(),l.refCount++,r.pooledCache=l,l.refCount++,y.memoizedState={element:m,isDehydrated:u,cac
vendor: 8,175 bytes, line 49
49he:l},sp(y),r}function Yv(r){return r?(r=io,r):io}function Wv(r,l,u,m,g,y){g=Yv(g),m.context===null?m.context=g:m.pendingContext=g,m=ri(l),m.payload={element:u},y=y===void 0?null:y,y!==null&&(m.callback=y),u=si(r,m,l),u!==null&&(Ca(u,r,l),Qc(u,r,l))}function Xv(r,l){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<l?u:l}}function Nx(r,l){Xv(r,l),(r=r.alternate)&&Xv(r,l)}function Kv(r){if(r.tag===13||r.tag===31){var l=ol(r,67108864);l!==null&&Ca(l,r,67108864),Nx(r,67108864)}}function Qv(r){if(r.tag===13||r.tag===31){var l=Va();l=Fr(l);var u=ol(r,l);u!==null&&Ca(u,r,l),Nx(r,l)}}var nh=!0;function mT(r,l,u,m){var g=V.T;V.T=null;var y=ne.p;try{ne.p=2,jx(r,l,u,m)}finally{ne.p=y,V.T=g}}function fT(r,l,u,m){var g=V.T;V.T=null;var y=ne.p;try{ne.p=8,jx(r,l,u,m)}finally{ne.p=y,V.T=g}}function jx(r,l,u,m){if(nh){var g=kx(m);if(g===null)ux(r,l,m,ah,u),Zv(r,m);else if(xT(g,r,l,u,m))m.stopPropagation();else if(Zv(r,m),l&4&&-1<pT.indexOf(r)){for(;g!==null;){var y=Rt(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Pr(y.pendingLanes);if(A!==0){var O=y;for(O.pendingLanes|=2,O.entangledLanes|=2;A;){var G=1<<31-Tt(A);O.entanglements[1]|=G,A&=~G}$r(y),(wt&6)===0&&(Pd=Ct()+500,mu(0))}}break;case 31:case 13:O=ol(y,2),O!==null&&Ca(O,y,2),Fd(),Nx(y,2)}if(y=kx(m),y===null&&ux(r,l,m,ah,u),y===g)break;g=y}g!==null&&m.stopPropagation()}else ux(r,l,m,null,u)}}function kx(r){return r=Af(r),Cx(r)}var ah=null;function Cx(r){if(ah=null,r=He(r),r!==null){var l=o(r);if(l===null)r=null;else{var u=l.tag;if(u===13){if(r=c(l),r!==null)return r;r=null}else if(u===31){if(r=d(l),r!==null)return r;r=null}else if(u===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;r=null}else l!==r&&(r=null)}}return ah=r,null}function Jv(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ba()){case ue:return 2;case we:return 8;case Ue:case Le:return 32;case st:return 268435456;default:return 32}default:return 32}}var Ax=!1,xi=null,gi=null,bi=null,vu=new Map,wu=new Map,yi=[],pT="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".split(" ");function Zv(r,l){switch(r){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":vu.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":wu.delete(l.pointerId)}}function Su(r,l,u,m,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:l,domEventName:u,eventSystemFlags:m,nativeEvent:y,targetContainers:[g]},l!==null&&(l=Rt(l),l!==null&&Kv(l)),r):(r.eventSystemFlags|=m,l=r.targetContainers,g!==null&&l.indexOf(g)===-1&&l.push(g),r)}function xT(r,l,u,m,g){switch(l){case"focusin":return xi=Su(xi,r,l,u,m,g),!0;case"dragenter":return gi=Su(gi,r,l,u,m,g),!0;case"mouseover":return bi=Su(bi,r,l,u,m,g),!0;case"pointerover":var y=g.pointerId;return vu.set(y,Su(vu.get(y)||null,r,l,u,m,g)),!0;case"gotpointercapture":return y=g.pointerId,wu.set(y,Su(wu.get(y)||null,r,l,u,m,g)),!0}return!1}function e3(r){var l=He(r.target);if(l!==null){var u=o(l);if(u!==null){if(l=u.tag,l===13){if(l=c(u),l!==null){r.blockedOn=l,Bc(r.priority,function(){Qv(u)});return}}else if(l===31){if(l=d(u),l!==null){r.blockedOn=l,Bc(r.priority,function(){Qv(u)});return}}else if(l===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function rh(r){if(r.blockedOn!==null)return!1;for(var l=r.targetContainers;0<l.length;){var u=kx(r.nativeEvent);if(u===null){u=r.nativeEvent;var m=new u.constructor(u.type,u);Cf=m,u.target.dispatchEvent(m),Cf=null}else return l=Rt(u),l!==null&&Kv(l),r.blockedOn=u,!1;l.shift()}return!0}function t3(r,l,u){rh(r)&&u.delete(l)}function gT(){Ax=!1,xi!==null&&rh(xi)&&(xi=null),gi!==null&&rh(gi)&&(gi=null),bi!==null&&rh(bi)&&(bi=null),vu.forEach(t3),wu.forEach(t3)}function sh(r,l){r.blockedOn===l&&(r.blockedOn=null,Ax||(Ax=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,gT)))}var ih=null;function n3(r){ih!==r&&(ih=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ih===r&&(ih=null);for(var l=0;l<r.length;l+=3){var u=r[l],m=r[l+1],g=r[l+2];if(typeof m!="function"){if(Cx(m||u)===null)continue;break}var y=Rt(u);y!==null&&(r.splice(l,3),l-=3,kp(y,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function Io(r){function l(G){return sh(G,r)}xi!==null&&sh(xi,r),gi!==null&&sh(gi,r),bi!==null&&sh(bi,r),vu.forEach(l),wu.forEach(l);for(var u=0;u<yi.length;u++){var m=yi[u];m.blockedOn===r&&(m.blockedOn=null)}for(;0<yi.length&&(u=yi[0],u.blockedOn===null);)e3(u),u.blockedOn===null&&yi.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var g=u[m],y=u[m+1],A=g[$n]||null;if(typeof y=="function")A||n3(u);else if(A){var O=null;if(y&&y.hasAttribute("formAction")){if(g=y,A=y[$n]||null)O=A.formAction;else if(Cx(g)!==null)continue}else O=A.action;typeof O=="function"?u[m+1]=O:(u.splice(m,3),m-=3),n3(u)}}}function a3(){function r(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return g=A})},focusReset:"manual",scroll:"manual"})}function l(){g!==null&&(g(),g=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),g!==null&&(g(),g=null)}}}function Ex(r){this._internalRoot=r}lh.prototype.render=Ex.prototype.render=function(r){var l=this._internalRoot;if(l===null)throw Error(a(409));var u=l.current,m=Va();Wv(u,m,r,l,null,null)},lh.prototype.unmount=Ex.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var l=r.containerInfo;Wv(r.current,2,null,r,null,null),Fd(),l[xs]=null}};function lh(r){this._internalRoot=r}lh.prototype.unstable_scheduleHydration=function(r){if(r){var l=W0();r={blockedOn:null,target:r,priority:l};for(var u=0;u<yi.length&&l!==0&&l<yi[u].priority;u++);yi.splice(u,0,r),u===0&&e3(r)}};var r3=t.version;if(r3!=="19.2.6")throw Error(a(527,r3,"19.2.6"));ne.findDOMNode=function(r){var l=r._reactInternals;if(l===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(l),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var bT={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};
49if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oh.isDisabled&&oh.supportsFiber)try{Hn=oh.inject(bT),Wt=oh}catch{}}return ju.createRoot=function(r,l){if(!s(r))throw Error(a(299));var u=!1,m="",g=d4,y=h4,A=m4;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError)),l=Gv(r,1,!1,null,null,u,m,null,g,y,A,a3),r[xs]=l.current,cx(r),new Ex(l)},ju.hydrateRoot=function(r,l,u){if(!s(r))throw Error(a(299));var m=!1,g="",y=d4,A=h4,O=m4,G=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(O=u.onRecoverableError),u.formState!==void 0&&(G=u.formState)),l=Gv(r,1,!0,l,u??null,m,g,G,y,A,O,a3),l.context=Yv(null),u=l.current,m=Va(),m=Fr(m),g=ri(m),g.callback=null,si(u,g,m),u=m,l.current.lanes=u,rl(l,u),$r(l),r[xs]=l.current,cx(r),new lh(l)},ju.version="19.2.6",ju}var f3;function ET(){if(f3)return Ix.exports;f3=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(),Ix.exports=AT(),Ix.exports}var TT=ET();/** 50 * react-router v7.15.1 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */var p3="popstate";function x3(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function MT(e={}){function t(a,s){var f;let o=(f=s.state)==null?void 0:f.masked,{pathname:c,search:d,hash:h}=o||a.location;return Y1("",{pathname:c,search:d,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:e0(s)}return zT(t,n,null,e)}function Kt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function IT(){return Math.random().toString(36).substring(2,10)}function g3(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Y1(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?fc(t):t,state:n,key:t&&t.key||a||IT(),mask:s}}function e0({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function fc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function zT(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,d="POP",h=null,f=p();f==null&&(f=0,c.replaceState({...c.state,idx:f},""));function p(){return(c.state||{idx:null}).idx}function x(){d="POP";let T=p(),E=T==null?null:T-f;f=T,h&&h({action:d,location:j.location,delta:E})}function b(T,E){d="PUSH";let D=x3(T)?T:Y1(j.location,T,E);f=p()+1;let k=g3(D,f),M=j.createHref(D.mask||D);try{c.pushState(k,"",M)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(M)}o&&h&&h({action:d,location:j.location,delta:1})}function v(T,E){d="REPLACE";let D=x3(T)?T:Y1(j.location,T,E);f=p();let k=g3(D,f),M=j.createHref(D.mask||D);c.replaceState(k,"",M),o&&h&&h({action:d,location:j.location,delta:0})}function N(T){return _T(T)}let j={get action(){return d},get location(){return e(s,c)},listen(T){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(p3,x),h=T,()=>{s.removeEventListener(p3,x),h=null}},createHref(T){return t(s,T)},createURL:N,encodeLocation(T){let E=N(T);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:b,replace:v,go(T){return c.go(T)}};return j}function _T(e,t=!1){let n="http://localhost";
58typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Kt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:e0(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function Y7(e,t,n="/"){return DT(e,t,n,!1)}function DT(e,t,n,a,s){let o=typeof t=="string"?fc(t):t,c=Vs(o.pathname||"/",n);if(c==null)return null;let d=BT(e),h=null,f=YT(c);for(let p=0;h==null&&p<d.length;++p)h=$T(d[p],f,a);return h}function BT(e){let t=W7(e);return RT(t),t}function W7(e,t=[],n=[],a="",s=!1){let o=(c,d,h=s,f)=>{let p={relativePath:f===void 0?c.path||"":f,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(a)&&h)return;Kt(p.relativePath.startsWith(a),`Absolute route path "${p.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(a.length)}let x=Dr([a,p.relativePath]),b=n.concat(p);c.children&&c.children.length>0&&(Kt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),W7(c.children,t,b,x,h)),!(c.path==null&&!c.index)&&t.push({path:x,score:qT(x,c.index),routesMeta:b})};return e.forEach((c,d)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,d);else for(let f of X7(c.path))o(c,d,!0,f)}),t}function X7(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=X7(a.join("/")),d=[];return d.push(...c.map(h=>h===""?o:[o,h].join("/"))),s&&d.push(...c),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function RT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:HT(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var OT=/^:[\w-]+$/,LT=3,PT=2,UT=1,FT=10,VT=-2,b3=e=>e==="*";function qT(e,t){let n=e.split("/"),a=n.length;return n.some(b3)&&(a+=VT),t&&(a+=PT),n.filter(s=>!b3(s)).reduce((s,o)=>s+(OT.test(o)?LT:o===""?UT:FT),a)}function HT(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 $T(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let d=0;d<a.length;++d){let h=a[d],f=d===a.length-1,p=o==="/"?t:t.slice(o.length)||"/",x=em({path:h.relativePath,caseSensitive:h.caseSensitive,end:f},p),b=h.route;if(!x&&f&&n&&!a[a.length-1].route.index&&(x=em({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},p)),!x)return null;
58Object.assign(s,x.params),c.push({params:s,pathname:Dr([o,x.pathname]),pathnameBase:QT(Dr([o,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(o=Dr([o,x.pathnameBase]))}return c}function em(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=GT(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:a.reduce((f,{paramName:p,isOptional:x},b)=>{if(p==="*"){let N=d[b]||"";c=o.slice(0,o.length-N.length).replace(/(.)\/+$/,"$1")}const v=d[b];return x&&!v?f[p]=void 0:f[p]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:c,pattern:e}}function GT(e,t=!1,n=!0){wr(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,(c,d,h,f,p)=>{if(a.push({paramName:d,isOptional:h!=null}),h){let x=p.charAt(f+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function YT(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wr(!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 Vs(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var WT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function XT(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?fc(e):e,o;return n?(n=K7(n),n.startsWith("/")?o=y3(n.substring(1),"/"):o=y3(n,t)):o=t,{pathname:o,search:JT(a),hash:ZT(s)}}function y3(e,t){let n=tm(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Bx(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function KT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ab(e){let t=KT(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Pm(e,t,n,a=!1){let s;typeof e=="string"?s=fc(e):(s={...e},Kt(!s.pathname||!s.pathname.includes("?"),Bx("?","pathname","search",s)),Kt(!s.pathname||!s.pathname.includes("#"),Bx("#","pathname","hash",s)),Kt(!s.search||!s.search.includes("#"),Bx("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!a&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),x-=1;s.pathname=b.join("/")}d=x>=0?t[x]:"/"}let h=XT(s,d),f=c&&c!=="/"&&c.endsWith("/"),p=(o||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(f||p)&&(h.pathname+="/"),h}var K7=e=>e.replace(/\/\/+/g,"/"),Dr=e=>K7(e.join("/")),tm=e=>e.replace(/\/+$/,""),QT=e=>tm(e).replace(/^\/*/,"/"),JT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ZT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,eM=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function tM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function nM(e){let t=e.map(n=>n.route.path).filter(Boolean);return Dr(t)||"/"}var Q7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J7(e,t){let n=e;if(typeof n!="string"||!WT.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(Q7)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),d=Vs(c.pathname,t);c.origin===o.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{wr(!1,`<Link to="${n}">
58 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z7=["POST","PUT","PATCH","DELETE"];new Set(Z7);var aM=["GET",...Z7];new Set(aM);var pc=w.createContext(null);pc.displayName="DataRouter";var Um=w.createContext(null);Um.displayName="DataRouterState";var e9=w.createContext(!1);function rM(){return w.useContext(e9)}var t9=w.createContext({isTransitioning:!1});t9.displayName="ViewTransition";var sM=w.createContext(new Map);sM.displayName="Fetchers";var iM=w.createContext(null);iM.displayName="Await";var Ja=w.createContext(null);Ja.displayName="Navigation";var v0=w.createContext(null);v0.displayName="Location";var Lr=w.createContext({outlet:null,matches:[],isDataRoute:!1});Lr.displayName="Route";var Eb=w.createContext(null);Eb.displayName="RouteError";var n9="REACT_ROUTER_ERROR",lM="REDIRECT",oM="ROUTE_ERROR_RESPONSE";function cM(e){if(e.startsWith(`${n9}:${lM}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function uM(e){if(e.startsWith(`${n9}:${oM}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new eM(t.status,t.statusText,t.data)}catch{}}function dM(e,{relative:t}={}){Kt(xc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=w.useContext(Ja),{hash:s,pathname:o,search:c}=w0(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:Dr([n,o])),a.createHref({pathname:d,search:c,hash:s})}function xc(){return w.useContext(v0)!=null}function jr(){return Kt(xc(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(v0).location}var a9="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function r9(e){w.useContext(Ja).static||w.useLayoutEffect(e)}function ea(){let{isDataRoute:e}=w.useContext(Lr);return e?jM():hM()}function hM(){Kt(xc(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(pc),{basename:t,navigator:n}=w.useContext(Ja),{matches:a}=w.useContext(Lr),{pathname:s}=jr(),o=JSON.stringify(Ab(a)),c=w.useRef(!1);return r9(()=>{c.current=!0}),w.useCallback((h,f={})=>{if(wr(c.current,a9),!c.current)return;if(typeof h=="number"){n.go(h);return}let p=Pm(h,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Dr([t,p.pathname])),(f.replace?n.replace:n.push)(p,f.state,f)},[t,n,o,s,e])}w.createContext(null);function s9(){let{matches:e}=w.useContext(Lr),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function w0(e,{relative:t}={}){let{matches:n}=w.useContext(Lr),{pathname:a}=jr(),s=JSON.stringify(Ab(n));return w.useMemo(()=>Pm(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function mM(e,t){return i9(e,t)}function i9(e,t,n){var T;Kt(xc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=w.useContext(Ja),{matches:s}=w.useContext(Lr),o=s[s.length-1],c=o?o.params:{},d=o?o.pathname:"/",h=o?o.pathnameBase:"/",f=o&&o.route;{let E=f&&f.path||"";o9(d,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) 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. 59 60Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let p=jr(),x;if(t){let E=typeof t=="string"?fc(t):t;Kt(h==="/"||((T=E.pathname)==null?void 0:T.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 "${E.pathname}" was given in the \`location\` prop.`),x=E}else x=p;let b=x.pathname||"/",v=b;if(h!=="/"){let E=h.replace(/^\//,"").split("/");v="/"+b.replace(/^\//,"").split("/").slice(E.length).join("/")}let N=n&&n.state.matches.length?n.state.matches.map(E=>Object.assign(E,{route:n.manifest[E.route.id]||E.route})):Y7(e,{pathname:v});wr(f||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),wr(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.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 j=bM(N&&N.map(E=>Object.assign({},E,{params:Object.assign({},c,E.params),pathname:Dr([h,a.encodeLocation?a.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?h:Dr([h,a.encodeLocation?a.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,n);return t&&j?w.createElement(v0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},j):j}function fM(){let e=NM(),t=tM(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"ð¿ Hey developer ð"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application
60Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:s},n):null,c)}var pM=w.createElement(fM,null),l9=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=uM(e.digest);n&&(e=n)}let t=e!==void 0?w.createElement(Lr.Provider,{value:this.props.routeContext},w.createElement(Eb.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(xM,{error:e},t):t}};l9.contextType=e9;var Rx=new WeakMap;function xM({children:e,error:t}){let{basename:n}=w.useContext(Ja);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=cM(t.digest);if(a){let s=Rx.get(t);if(s)throw s;let o=J7(a.location,n);if(Q7&&!Rx.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Rx.set(t,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function gM({routeContext:e,match:t,children:n}){let a=w.useContext(pc);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Lr.Provider,{value:e},n)}function bM(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let p=s.findIndex(x=>x.route.id&&(o==null?void 0:o[x.route.id])!==void 0);Kt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,p+1))}let c=!1,d=-1;if(n&&a){c=a.renderFallback;for(let p=0;p<s.length;p++){let x=s[p];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=p),x.route.id){let{loaderData:b,errors:v}=a,N=x.route.loader&&!b.hasOwnProperty(x.route.id)&&(!v||v[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let h=n==null?void 0:n.onError,f=a&&h?(p,x)=>{var b,v;h(p,{location:a.location,params:((v=(b=a.matches)==null?void 0:b[0])==null?void 0:v.params)??{},pattern:nM(a.matches),errorInfo:x})}:void 0;return s.reduceRight((p,x,b)=>{let v,N=!1,j=null,T=null;a&&(v=o&&x.route.id?o[x.route.id]:void 0,j=x.route.errorElement||pM,c&&(d<0&&b===0?(o9("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,T=null):d===b&&(N=!0,T=x.route.hydrateFallbackElement||null)));let E=t.concat(s.slice(0,b+1)),D=()=>{let k;return v?k=j:N?k=T:x.route.Component?k=w.createElement(x.route.Component,null):x.route.element?k=x.route.element:k=p,w.createElement(gM,{match:x,routeContext:{outlet:p,matches:E,isDataRoute:a!=null},children:k})};return a&&(x.route.ErrorBoundary||x.route.errorElement||b===0)?w.createElement(l9,{location:a.location,revalidation:a.revalidation,component:j,error:v,children:D(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):D()},null)}function Tb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yM(e){let t=w.useContext(pc);return Kt(t,Tb(e)),t}function vM(e){let t=w.useContext(Um);return Kt(t,Tb(e)),t}function wM(e){let t=w.useContext(Lr);return Kt(t,Tb(e)),t}function Mb(e){let t=wM(e),n=t.matches[t.matches.length-1];return Kt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function SM(){return Mb("useRouteId")}function NM(){var a;let e=w.useContext(Eb),t=vM("useRouteError"),n=Mb("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function jM(){let{router:e}=yM("useNavigate"),t=Mb("useNavigate"),n=w.useRef(!1);return r9(()=>{n.current=!0}),w.useCallback(async(s,o={})=>{wr(n.current,a9),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var v3={};function o9(e,t,n){!t&&!v3[e]&&(v3[e]=!0,wr(!1,n))}w.memo(kM);function kM({routes:e,manifest:t,future:n,state:a,isStatic:s,onError:o}){return i9(e,void 0,{manifest:t,state:a,isStatic:s,onError:o})}function Gt({to:e,replace:t,state:n,relative:a}){Kt(xc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=w.useContext(Ja);wr(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=w.useContext(Lr),{pathname:c}=jr(),d=ea(),h=Pm(e,Ab(o),c,a==="path"),f=JSON.stringify(h);return w.useEffect(()=>{d(JSON.parse(f),{replace:t,state:n,relative:a})},[d,f,a,t,n]),null}function ft(e){Kt(!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 CM({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,useTransitions:c}){Kt(!xc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=w.useMemo(()=>({basename:d,navigator:s,static:o,useTransitions:c,future:{}}),[d,s,o,c]);typeof n=="string"&&(n=fc(n));let{pathname:f="/",search:p="",hash:x="",state:b=null,key:v="default",mask:N}=n,j=w.useMemo(()=>{let T=Vs(f,d);return T==null?null:{location:{pathname:T,search:p,hash:x,state:b,key:v,mask:N},navigationType:a}},[d,f,p,x,b,v,a,N]);
60return wr(j!=null,`<Router basename="${d}"> is not able to match the URL "${f}${p}${x}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:w.createElement(Ja.Provider,{value:h},w.createElement(v0.Provider,{children:t,value:j}))}function Fm({children:e,location:t}){return mM(W1(e),t)}function W1(e,t=[]){let n=[];return w.Children.forEach(e,(a,s)=>{if(!w.isValidElement(a))return;let o=[...t,s];if(a.type===w.Fragment){n.push.apply(n,W1(a.props.children,o));return}Kt(a.type===ft,`[${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>`),Kt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,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&&(c.children=W1(a.props.children,o)),n.push(c)}),n}var Bh="get",Rh="application/x-www-form-urlencoded";function Vm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function AM(e){return Vm(e)&&e.tagName.toLowerCase()==="button"}function EM(e){return Vm(e)&&e.tagName.toLowerCase()==="form"}function TM(e){return Vm(e)&&e.tagName.toLowerCase()==="input"}function MM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function IM(e,t){return e.button===0&&(!t||t==="_self")&&!MM(e)}function X1(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function zM(e,t){let n=X1(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var ch=null;function _M(){if(ch===null)try{new FormData(document.createElement("form"),0),ch=!1}catch{ch=!0}return ch}var DM=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ox(e){return e!=null&&!DM.has(e)?(wr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rh}"`),null):e}function BM(e,t){let n,a,s,o,c;if(EM(e)){let d=e.getAttribute("action");a=d?Vs(d,t):null,n=e.getAttribute("method")||Bh,s=Ox(e.getAttribute("enctype"))||Rh,o=new FormData(e)}else if(AM(e)||TM(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(a=h?Vs(h,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Bh,s=Ox(e.getAttribute("formenctype"))||Ox(d.getAttribute("enctype"))||Rh,o=new FormData(d,e),!_M()){let{name:f,type:p,value:x}=e;if(p==="image"){let b=f?`${f}.`:"";o.append(`${b}x`,"0"),o.append(`${b}y`,"0")}else f&&o.append(f,x)}}else{if(Vm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Bh,a=null,s=Rh,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ib(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function c9(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Vs(s.pathname,t)==="/"?s.pathname=`${tm(t)}/_root.${a}`:s.pathname=`${tm(s.pathname)}.${a}`,s}async function RM(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
60isSpaMode,window.location.reload(),new Promise(()=>{})}}function OM(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 LM(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await RM(o,n);return c.links?c.links():[]}return[]}));return VM(a.flat(1).filter(OM).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function w3(e,t,n,a,s,o){let c=(h,f)=>n[f]?h.route.id!==n[f].route.id:!0,d=(h,f)=>{var p;return n[f].pathname!==h.pathname||((p=n[f].route.path)==null?void 0:p.endsWith("*"))&&n[f].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,f)=>c(h,f)||d(h,f)):o==="data"?t.filter((h,f)=>{var x;let p=a.routes[h.route.id];if(!p||!p.hasLoader)return!1;if(c(h,f)||d(h,f))return!0;if(h.route.shouldRevalidate){let b=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function PM(e,t,{includeHydrateFallback:n}={}){return UM(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function UM(e){return[...new Set(e)]}function FM(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function VM(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(FM(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function zb(){let e=w.useContext(pc);return Ib(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function qM(){let e=w.useContext(Um);return Ib(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _b=w.createContext(void 0);_b.displayName="FrameworkContext";function Db(){let e=w.useContext(_b);return Ib(e,"You must render this element inside a <HydratedRouter> element"),e}function HM(e,t){let n=w.useContext(_b),[a,s]=w.useState(!1),[o,c]=w.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:f,onMouseLeave:p,onTouchStart:x}=t,b=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let j=E=>{E.forEach(D=>{c(D.isIntersecting)})},T=new IntersectionObserver(j,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[e]),w.useEffect(()=>{if(a){let j=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(j)}}},[a]);let v=()=>{s(!0)},N=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,b,{}]:[o,b,{onFocus:ku(d,v),onBlur:ku(h,N),onMouseEnter:ku(f,v),onMouseLeave:ku(p,N),onTouchStart:ku(x,v)}]:[!1,b,{}]}function ku(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $M({page:e,...t}){let n=rM(),{router:a}=zb(),s=w.useMemo(()=>Y7(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?w.createElement(YM,{page:e,matches:s,...t}):w.createElement(WM,{page:e,matches:s,...t}):null}function GM(e){let{manifest:t,routeModules:n}=Db(),[a,s]=w.useState([]);return w.useEffect(()=>{let o=!1;return LM(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function YM({page:e,matches:t,...n}){let a=jr(),{future:s}=Db(),{basename:o}=zb(),c=w.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=c9(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,f=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?h=!0:f.push(p.route.id);return h&&f.length>0&&d.searchParams.set("_routes",f.join(",")),[d.pathname+d.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return w.createElement(w.Fragment,null,c.map(d=>w.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function WM({page:e,matches:t,...n}){let a=jr(),{future:s,manifest:o,routeModules:c}=Db(),{basename:d}=zb(),{loaderData:h,matches:f}=qM(),p=w.useMemo(()=>w3(e,t,f,o,a,"data"),[e,t,f,o,a]),x=w.useMemo(()=>w3(e,t,f,o,a,"assets"),[e,t,f,o,a]),b=w.useMemo(()=>
60{if(e===a.pathname+a.search+a.hash)return[];let j=new Set,T=!1;if(t.forEach(D=>{var M;let k=o.routes[D.route.id];!k||!k.hasLoader||(!p.some(B=>B.route.id===D.route.id)&&D.route.id in h&&((M=c[D.route.id])!=null&&M.shouldRevalidate)||k.hasClientLoader?T=!0:j.add(D.route.id))}),j.size===0)return[];let E=c9(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return T&&j.size>0&&E.searchParams.set("_routes",t.filter(D=>j.has(D.route.id)).map(D=>D.route.id).join(",")),[E.pathname+E.search]},[d,s.unstable_trailingSlashAwareDataRequests,h,a,o,p,t,e,c]),v=w.useMemo(()=>PM(x,o),[x,o]),N=GM(x);return w.createElement(w.Fragment,null,b.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...n})),v.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...n})),N.map(({key:j,link:T})=>w.createElement("link",{key:j,nonce:n.nonce,...T,crossOrigin:T.crossOrigin??n.crossOrigin})))}function XM(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var KM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{KM&&(window.__reactRouterVersion="7.15.1")}catch{}function QM({basename:e,children:t,useTransitions:n,window:a}){let s=w.useRef();s.current==null&&(s.current=MT({window:a,v5Compat:!0}));let o=s.current,[c,d]=w.useState({action:o.action,location:o.location}),h=w.useCallback(f=>{n===!1?d(f):w.startTransition(()=>d(f))},[n]);return w.useLayoutEffect(()=>o.listen(h),[o,h]),w.createElement(CM,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,useTransitions:n})}var u9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ma=w.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,mask:d,state:h,target:f,to:p,preventScrollReset:x,viewTransition:b,defaultShouldRevalidate:v,...N},j){let{basename:T,navigator:E,useTransitions:D}=w.useContext(Ja),k=typeof p=="string"&&u9.test(p),M=J7(p,T);p=M.to;let B=dM(p,{relative:s}),_=jr(),U=null;if(d){let H=Pm(d,[],_.mask?_.mask.pathname:"/",!0);T!=="/"&&(H.pathname=H.pathname==="/"?T:Dr([T,H.pathname])),U=E.createHref(H)}let[F,W,ae]=HM(a,N),le=eI(p,{replace:c,mask:d,state:h,target:f,preventScrollReset:x,relative:s,viewTransition:b,defaultShouldRevalidate:v,useTransitions:D});function re(H){t&&t(H),H.defaultPrevented||le(H)}let xe=!(M.isExternal||o),te=w.createElement("a",{...N,...ae,href:(xe?U:void 0)||M.absoluteURL||B,onClick:xe?re:t,ref:XM(j,W),target:f,"data-discover":!k&&n==="render"?"true":void 0});return F&&!k?w.createElement(w.Fragment,null,te,w.createElement($M,{page:B})):te});Ma.displayName="Link";var Yo=w.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:d,children:h,...f},p){let x=w0(c,{relative:f.relative}),b=jr(),v=w.useContext(Um),{navigator:N,basename:j}=w.useContext(Ja),T=v!=null&&sI(x)&&d===!0,E=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,D=b.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(D=D.toLowerCase(),k=k?k.toLowerCase():null,E=E.toLowerCase()),k&&j&&(k=Vs(k,j)||k);const M=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let B=D===E||!s&&D.startsWith(E)&&D.charAt(M)==="/",_=k!=null&&(k===E||!s&&k.startsWith(E)&&k.charAt(E.length)==="/"),U={isActive:B,isPending:_,isTransitioning:T},F=B?t:void 0,W;typeof a=="function"?W=a(U):W=[a,B?"active":null,_?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let ae=typeof o=="function"?o(U):o;return w.createElement(Ma,{...f,"aria-current":F,className:W,ref:p,style:ae,to:c,viewTransition:d},typeof h=="function"?h(U):h)});Yo.displayName="NavLink";var JM=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=Bh,action:d,onSubmit:h,relative:f,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:b,...v},N)=>{let{useTransitions:j}=w.useContext(Ja),T=aI(),E=rI(d,{relative:f}),D=c.toLowerCase()==="get"?"get":"post",k=typeof d=="string"&&u9.test(d),M=B=>{if(h&&h(B),B.defaultPrevented)return;B.preventDefault();let _=B.nativeEvent.submitter,U=(_==null?void 0:_.getAttribute("formmethod"))||c,F=()=>T(_||B.currentTarget,{fetcherKey:t,method:U,navigate:n,replace:s,state:o,relative:f,preventScrollReset:p,viewTransition:x,defaultShouldRevalidate:b});j&&n!==!1?w.startTransition(()=>F()):F()};return w.createElement("form",{ref:N,method:D,action:E,onSubmit:a?h:M,...v,"data-discover":!k&&e==="render"?"true":void 0})});JM.displayName="Form";function ZM(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function d9(e){let t=w.useContext(pc);return Kt(t,ZM(e)),t}function eI(e,{target:t,replace:n,mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,defaultShouldRevalidate:h,useTransitions:f}={}){let p=ea(),x=jr(),b=w0(e,{relative:c}
60);return w.useCallback(v=>{if(IM(v,t)){v.preventDefault();let N=n!==void 0?n:e0(x)===e0(b),j=()=>p(e,{replace:N,mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,defaultShouldRevalidate:h});f?w.startTransition(()=>j()):j()}},[x,p,b,n,a,s,t,e,o,c,d,h,f])}function h9(e){wr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=w.useRef(X1(e)),n=w.useRef(!1),a=jr(),s=w.useMemo(()=>zM(a.search,n.current?null:t.current),[a.search]),o=ea(),c=w.useCallback((d,h)=>{const f=X1(typeof d=="function"?d(new URLSearchParams(s)):d);n.current=!0,o("?"+f,h)},[o,s]);return[s,c]}var tI=0,nI=()=>`__${String(++tI)}__`;function aI(){let{router:e}=d9("useSubmit"),{basename:t}=w.useContext(Ja),n=SM(),a=e.fetch,s=e.navigate;return w.useCallback(async(o,c={})=>{let{action:d,method:h,encType:f,formData:p,body:x}=BM(o,t);if(c.navigate===!1){let b=c.fetcherKey||nI();await a(b,n,c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||h,formEncType:c.encType||f,flushSync:c.flushSync})}else await s(c.action||d,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:p,body:x,formMethod:c.method||h,formEncType:c.encType||f,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function rI(e,{relative:t}={}){let{basename:n}=w.useContext(Ja),a=w.useContext(Lr);Kt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...w0(e||".",{relative:t})},c=jr();if(e==null){o.search=c.search;let d=new URLSearchParams(o.search),h=d.getAll("index");if(h.some(p=>p==="")){d.delete("index"),h.filter(x=>x).forEach(x=>d.append("index",x));let p=d.toString();o.search=p?`?${p}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Dr([n,o.pathname])),e0(o)}function sI(e,{relative:t}={}){let n=w.useContext(t9);Kt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=d9("useViewTransitionState"),s=w0(e,{relative:t});if(!n.isTransitioning)return!1;let o=Vs(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Vs(n.nextLocation.pathname,a)||n.nextLocation.pathname;return em(s.pathname,c)!=null||em(s.pathname,o)!=null}const iI=()=>{};var S3={};/** 61 * @license 62 * Copyright 2017 Google LLC 63 * 64 * Licensed under the Apache License, Version 2.0 (the "License"); 65 * you may not use this file except in compliance with the License. 66 * You may obtain a copy of the License at 67 * 68 * http://www.apache.org/licenses/LICENSE-2.0 69 * 70 * Unless required by applicable law or agreed to in writing, software 71 * distributed under the License is distributed on an "AS IS" BASIS, 72 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 73 * See the License for the specific language governing permissions and 74 * limitations under the License. 75 */const m9=function(e){const t=[];let n=0;for(let a=0;a<e.length;a++){let s=e.charCodeAt(a);s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=s&63|128):(s&64512)===55296&&a+1<e.length&&(e.charCodeAt(a+1)&64512)===56320?(s=65536+((s&1023)<<10)+(e.charCodeAt(++a)&1023),t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=s&63|128):(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=s&63|128)}return t},lI=function(e){const t=[];let n=0,a=0;for(;n<e.length;){const s=e[n++];if(s<128)t[a++]=String.fromCharCode(s);else if(s>191&&s<224){const o=e[n++];t[a++]=String.fromCharCode((s&31)<<6|o&63)}else if(s>239&&s<365){const o=e[n++],c=e[n++],d=e[n++],h=((s&7)<<18|(o&63)<<12|(c&63)<<6|d&63)-65536;t[a++]=String.fromCharCode(55296+(h>>10)),t[a++]=String.fromCharCode(56320+(h&1023))}else{const o=e[n++],c=e[n++];t[a++]=String.fromCharCode((s&15)<<12|(o&63)<<6|c&63)}}return t.join("")},f9={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,a=[];for(let s=0;s<e.length;s+=3){const o=e[s],c=s+1<e.length,d=c?e[s+1]:0,h=s+2<e.length,f=h?e[s+2]:0,p=o>>2,x=(o&3)<<4|d>>4;let b=(d&15)<<2|f>>6,v=f&63;h||(v=64,c||(b=64)),a.push(n[p],n[x],n[b],n[v])}return a.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(m9(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):lI(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,a=[];for(let s=0;s<e.length;){const o=n[e.charAt(s++)],d=s<e.length?n[e.charAt(s)]:0;++s;const f=s<e.length?n[e.charAt(s)]:64;++s;const x=s<e.length?n[e.charAt(s)]:64;if(++s,o==null||d==null||f==null||x==null)throw new oI;const b=o<<2|d>>4;if(a.push(b),f!==64){const v=d<<4&240|f>>2;if(a.push(v),x!==64){const N=f<<6&192|x;a.push(N)}}}return a},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
75class oI extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const cI=function(e){const t=m9(e);return f9.encodeByteArray(t,!0)},p9=function(e){return cI(e).replace(/\./g,"")},x9=function(e){try{return f9.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** 76 * @license 77 * Copyright 2022 Google LLC 78 * 79 * Licensed under the Apache License, Version 2.0 (the "License"); 80 * you may not use this file except in compliance with the License. 81 * You may obtain a copy of the License at 82 * 83 * http://www.apache.org/licenses/LICENSE-2.0 84 * 85 * Unless required by applicable law or agreed to in writing, software 86 * distributed under the License is distributed on an "AS IS" BASIS, 87 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 88 * See the License for the specific language governing permissions and 89 * limitations under the License. 90 */function uI(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** 91 * @license 92 * Copyright 2022 Google LLC 93 * 94 * Licensed under the Apache License, Version 2.0 (the "License"); 95 * you may not use this file except in compliance with the License. 96 * You may obtain a copy of the License at 97 * 98 * http://www.apache.org/licenses/LICENSE-2.0 99 * 100 * Unless required by applicable law or agreed to in writing, software 101 * distributed under the License is distributed on an "AS IS" BASIS, 102 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 103 * See the License for the specific language governing permissions and 104 * limitations under the License. 105 */const dI=()=>uI().__FIREBASE_DEFAULTS__,hI=()=>{if(typeof process>"u"||typeof S3>"u")return;const e=S3.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},mI=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&x9(e[1]);return t&&JSON.parse(t)},Bb=()=>{try{return iI()||dI()||hI()||mI()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},fI=e=>{var t,n;return(n=(t=Bb())==null?void 0:t.emulatorHosts)==null?void 0:n[e]},g9=()=>{var e;return(e=Bb())==null?void 0:e.config},b9=e=>{var t;return(t=Bb())==null?void 0:t[`_${e}`]};/** 106 * @license 107 * Copyright 2017 Google LLC 108 * 109 * Licensed under the Apache License, Version 2.0 (the "License"); 110 * you may not use this file except in compliance with the License. 111 * You may obtain a copy of the License at 112 * 113 * http://www.apache.org/licenses/LICENSE-2.0 114 * 115 * Unless required by applicable law or agreed to in writing, software 116 * distributed under the License is distributed on an "AS IS" BASIS, 117 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 118 * See the License for the specific language governing permissions and 119 * limitations under the License. 120 */class pI{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,a)=>{n?this.reject(n):this.resolve(a),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,a))}}}/** 121 * @license 122 * Copyright 2017 Google LLC 123 * 124 * Licensed under the Apache License, Version 2.0 (the "License"); 125 * you may not use this file except in compliance with the License. 126 * You may obtain a copy of the License at 127 * 128 * http://www.apache.org/licenses/LICENSE-2.0 129 * 130 * Unless required by applicable law or agreed to in writing, software 131 * distributed under the License is distributed on an "AS IS" BASIS, 132 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133 * See the License for the specific language governing permissions and 134 * limitations under the License. 135 */function ba(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function xI(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(ba())}function gI(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function bI(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function yI(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function vI(){const e=ba();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function wI(){try{return typeof indexedDB=="object"}catch{return!1}}function SI(){return new Promise((e,t)=>
135{try{let n=!0;const a="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(a);s.onsuccess=()=>{s.result.close(),n||self.indexedDB.deleteDatabase(a),e(!0)},s.onupgradeneeded=()=>{n=!1},s.onerror=()=>{var o;t(((o=s.error)==null?void 0:o.message)||"")}}catch(n){t(n)}})}/** 136 * @license 137 * Copyright 2017 Google LLC 138 * 139 * Licensed under the Apache License, Version 2.0 (the "License"); 140 * you may not use this file except in compliance with the License. 141 * You may obtain a copy of the License at 142 * 143 * http://www.apache.org/licenses/LICENSE-2.0 144 * 145 * Unless required by applicable law or agreed to in writing, software 146 * distributed under the License is distributed on an "AS IS" BASIS, 147 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 148 * See the License for the specific language governing permissions and 149 * limitations under the License. 150 */const NI="FirebaseError";class Qi extends Error{constructor(t,n,a){super(n),this.code=t,this.customData=a,this.name=NI,Object.setPrototypeOf(this,Qi.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,S0.prototype.create)}}class S0{constructor(t,n,a){this.service=t,this.serviceName=n,this.errors=a}create(t,...n){const a=n[0]||{},s=`${this.service}/${t}`,o=this.errors[t],c=o?jI(o,a):"Error",d=`${this.serviceName}: ${c} (${s}).`;return new Qi(s,d,a)}}function jI(e,t){try{let n=0,a="";for(;n<e.length;){const s=e.indexOf("{$",n);if(s===-1){a+=e.substring(n);break}const o=e.indexOf("}",s+2);if(o===-1){a+=e.substring(n);break}const c=e.substring(s+2,o),d=t[c];a+=e.substring(n,s)+(d!=null?String(d):`<${c}?>`),n=o+1}return a}catch{return e}}function kI(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function rc(e,t){if(e===t)return!0;const n=Object.keys(e),a=Object.keys(t);for(const s of n){if(!a.includes(s))return!1;const o=e[s],c=t[s];if(N3(o)&&N3(c)){if(!rc(o,c))return!1}else if(o!==c)return!1}for(const s of a)if(!n.includes(s))return!1;return!0}function N3(e){return e!==null&&typeof e=="object"}/** 151 * @license 152 * Copyright 2017 Google LLC 153 * 154 * Licensed under the Apache License, Version 2.0 (the "License"); 155 * you may not use this file except in compliance with the License. 156 * You may obtain a copy of the License at 157 * 158 * http://www.apache.org/licenses/LICENSE-2.0 159 * 160 * Unless required by applicable law or agreed to in writing, software 161 * distributed under the License is distributed on an "AS IS" BASIS, 162 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 163 * See the License for the specific language governing permissions and 164 * limitations under the License. 165 */function N0(e){const t=[];for(const[n,a]of Object.entries(e))Array.isArray(a)?a.forEach(s=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(s))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(a));return t.length?"&"+t.join("&"):""}function CI(e,t){const n=new AI(e,t);return n.subscribe.bind(n)}class AI{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(a=>{this.error(a)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,a){let s;if(t===void 0&&n===void 0&&a===void 0)throw new Error("Missing Observer.");EI(t,["next","error","complete"])?s=t:s={next:t,error:n,complete:a},s.next===void 0&&(s.next=Lx),s.error===void 0&&(s.error=Lx),s.complete===void 0&&(s.complete=Lx);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>
165{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(a){typeof console<"u"&&console.error&&console.error(a)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function EI(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function Lx(){}/** 166 * @license 167 * Copyright 2021 Google LLC 168 * 169 * Licensed under the Apache License, Version 2.0 (the "License"); 170 * you may not use this file except in compliance with the License. 171 * You may obtain a copy of the License at 172 * 173 * http://www.apache.org/licenses/LICENSE-2.0 174 * 175 * Unless required by applicable law or agreed to in writing, software 176 * distributed under the License is distributed on an "AS IS" BASIS, 177 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 178 * See the License for the specific language governing permissions and 179 * limitations under the License. 180 */function Vl(e){return e&&e._delegate?e._delegate:e}/** 181 * @license 182 * Copyright 2025 Google LLC 183 * 184 * Licensed under the Apache License, Version 2.0 (the "License"); 185 * you may not use this file except in compliance with the License. 186 * You may obtain a copy of the License at 187 * 188 * http://www.apache.org/licenses/LICENSE-2.0 189 * 190 * Unless required by applicable law or agreed to in writing, software 191 * distributed under the License is distributed on an "AS IS" BASIS, 192 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 193 * See the License for the specific language governing permissions and 194 * limitations under the License. 195 */function Rb(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function TI(e){return(await fetch(e,{credentials:"include"})).ok}class sc{constructor(t,n,a){this.name=t,this.instanceFactory=n,this.type=a,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/** 196 * @license 197 * Copyright 2019 Google LLC 198 * 199 * Licensed under the Apache License, Version 2.0 (the "License"); 200 * you may not use this file except in compliance with the License. 201 * You may obtain a copy of the License at 202 * 203 * http://www.apache.org/licenses/LICENSE-2.0 204 * 205 * Unless required by applicable law or agreed to in writing, software 206 * distributed under the License is distributed on an "AS IS" BASIS, 207 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 208 * See the License for the specific language governing permissions and 209 * limitations under the License. 210 */const Al="[DEFAULT]";/** 211 * @license 212 * Copyright 2019 Google LLC 213 * 214 * Licensed under the Apache License, Version 2.0 (the "License"); 215 * you may not use this file except in compliance with the License. 216 * You may obtain a copy of the License at 217 * 218 * http://www.apache.org/licenses/LICENSE-2.0 219 * 220 * Unless required by applicable law or agreed to in writing, software 221 * distributed under the License is distributed on an "AS IS" BASIS, 222 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 223 * See the License for the specific language governing permissions and 224 * limitations under the License. 225 */class MI{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const a=new pI;if(this.instancesDeferred.set(n,a),this.isInitialized(n)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:n});s&&a.resolve(s)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),a=(t==null?void 0:t.optional)??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(a)return null;throw s}else{if(a)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(zI(t))try{this.getOrInitializeService({instanceIdentifier:Al})}catch{}for(const[n,a]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:s});a.resolve(o)}catch{}}}}clearInstance(t=Al){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Al){return this.instances.has(t)}getOptions(t=Al){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,a=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(a))throw Error(`${this.name}(${a}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:a,options:n});for(const[o,c]of this.instancesDeferred.entries()){const d=this.normalizeInstanceIdentifier(o);a===d&&c.resolve(s)}return s}onInit(t,n){const a=this.normalizeInstanceIdentifier(n),s=this.onInitCallbacks.get(a)??new Set;s.add(t),this.onInitCallbacks.set(a,s);const o=this.instances.get(a);return o&&t(o,a),()=>{s.delete(t)}}invokeOnInitCallbacks(t,n){const a=this.onInitCallbacks.get(n);if(a)for(const s of a)try{s(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let a=this.instances.get(t);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:II(t),options:n}),this.instances.set(t,a),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(a,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,a)}catch{}return a||null}normalizeInstanceIdentifier(t=Al){return this.component?this.component.multipleInstances?t:Al:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function II(e){return e===Al?void 0:e}function zI(e){return e.instantiationMode==="EAGER"}/** 226 * @license 227 * Copyright 2019 Google LLC 228 * 229 * Licensed under the Apache License, Version 2.0 (the "License");
230 * you may not use this file except in compliance with the License. 231 * You may obtain a copy of the License at 232 * 233 * http://www.apache.org/licenses/LICENSE-2.0 234 * 235 * Unless required by applicable law or agreed to in writing, software 236 * distributed under the License is distributed on an "AS IS" BASIS, 237 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 238 * See the License for the specific language governing permissions and 239 * limitations under the License. 240 */class _I{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new MI(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/** 241 * @license 242 * Copyright 2017 Google LLC 243 * 244 * Licensed under the Apache License, Version 2.0 (the "License"); 245 * you may not use this file except in compliance with the License. 246 * You may obtain a copy of the License at 247 * 248 * http://www.apache.org/licenses/LICENSE-2.0 249 * 250 * Unless required by applicable law or agreed to in writing, software 251 * distributed under the License is distributed on an "AS IS" BASIS, 252 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 253 * See the License for the specific language governing permissions and 254 * limitations under the License. 255 */var Lt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Lt||(Lt={}));const DI={debug:Lt.DEBUG,verbose:Lt.VERBOSE,info:Lt.INFO,warn:Lt.WARN,error:Lt.ERROR,silent:Lt.SILENT},BI=Lt.INFO,RI={[Lt.DEBUG]:"log",[Lt.VERBOSE]:"log",[Lt.INFO]:"info",[Lt.WARN]:"warn",[Lt.ERROR]:"error"},OI=(e,t,...n)=>{if(t<e.logLevel)return;const a=new Date().toISOString(),s=RI[t];if(s)console[s](`[${a}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class y9{constructor(t){this.name=t,this._logLevel=BI,this._logHandler=OI,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Lt))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?DI[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Lt.DEBUG,...t),this._logHandler(this,Lt.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Lt.VERBOSE,...t),this._logHandler(this,Lt.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Lt.INFO,...t),this._logHandler(this,Lt.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Lt.WARN,...t),this._logHandler(this,Lt.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Lt.ERROR,...t),this._logHandler(this,Lt.ERROR,...t)}}const LI=(e,t)=>t.some(n=>e instanceof n);let j3,k3;function PI(){return j3||(j3=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function UI(){return k3||(k3=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const v9=new WeakMap,K1=new WeakMap,w9=new WeakMap,Px=new WeakMap,Ob=new WeakMap;function FI(e){const t=new Promise((n,a)=>{const s=()=>{e.removeEventListener("success",o),e.removeEventListener("error",c)},o=()=>{n(Ri(e.result)),s()},c=()=>{a(e.error),s()};e.addEventListener("success",o),e.addEventListener("error",c)});return t.then(n=>{n instanceof IDBCursor&&v9.set(n,e)}).catch(()=>{}),Ob.set(t,e),t}function VI(e){if(K1.has(e))return;const t=new Promise((n,a)=>{const s=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",c),e.removeEventListener("abort",c)},o=()=>{n(),s()},c=()=>{a(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",o),e.addEventListener("error",c),e.addEventListener("abort",c)});K1.set(e,t)}let Q1={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return K1.get(e);if(t==="objectStoreNames")return e.objectStoreNames||w9.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ri(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function qI(e){Q1=e(Q1)}function HI(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const a=e.call(Ux(this),t,...n);return w9.set(a,t.sort?t.sort():[t]),Ri(a)}:UI().includes(e)?function(...t){return e.apply(Ux(this),t),Ri(v9.get(this))}:function(...t){return Ri(e.apply(Ux(this),t))}}function $I(e){return typeof e=="function"?HI(e):(e instanceof IDBTransaction&&VI(e),LI(e,PI())?new Proxy(e,Q1):e)}function Ri(e){if(e instanceof IDBRequest)return FI(e);if(Px.has(e))return Px.get(e);const t=$I(e);return t!==e&&(Px.set(e,t),Ob.set(t,e)),t}const Ux=e=>Ob.get(e);function GI(e,t,{blocked:n,upgrade:a,blocking:s,terminated:o}={}){const c=indexedDB.open(e,t),d=Ri(c);return a&&c.addEventListener("upgradeneeded",h=>{a(Ri(c.result),h.oldVersion,h.newVersion,Ri(c.transaction),h)}),n&&c.addEventListener("blocked",h=>n(h.oldVersion,h.newVersion,h)),d.then(h=>{o&&h.addEventListener("close",()=>o()),s&&h.addEventListener("versionchange",f=>s(f.oldVersion,f.newVersion,f))}).catch(()=>{}),d}const YI=["get","getKey","getAll","getAllKeys","count"],WI=["put","add","delete","clear"],Fx=new Map;function C3(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Fx.get(t))return Fx.get(t);const n=t.replace(/FromIndex$/,""),a=t!==n,s=WI.includes(n);if(!(n in(a?IDBIndex:IDBObjectStore).prototype)||!(s||YI.includes(n)))return;const o=async function(c,...d){const h=this.transaction(c,s?"readwrite":"readonly");let f=h.store;
255return a&&(f=f.index(d.shift())),(await Promise.all([f[n](...d),s&&h.done]))[0]};return Fx.set(t,o),o}qI(e=>({...e,get:(t,n,a)=>C3(t,n)||e.get(t,n,a),has:(t,n)=>!!C3(t,n)||e.has(t,n)}));/** 256 * @license 257 * Copyright 2019 Google LLC 258 * 259 * Licensed under the Apache License, Version 2.0 (the "License"); 260 * you may not use this file except in compliance with the License. 261 * You may obtain a copy of the License at 262 * 263 * http://www.apache.org/licenses/LICENSE-2.0 264 * 265 * Unless required by applicable law or agreed to in writing, software 266 * distributed under the License is distributed on an "AS IS" BASIS, 267 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 268 * See the License for the specific language governing permissions and 269 * limitations under the License. 270 */class XI{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(KI(n)){const a=n.getImmediate();return`${a.library}/${a.version}`}else return null}).filter(n=>n).join(" ")}}function KI(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const J1="@firebase/app",A3="0.16.1";/** 271 * @license 272 * Copyright 2019 Google LLC 273 * 274 * Licensed under the Apache License, Version 2.0 (the "License"); 275 * you may not use this file except in compliance with the License. 276 * You may obtain a copy of the License at 277 * 278 * http://www.apache.org/licenses/LICENSE-2.0 279 * 280 * Unless required by applicable law or agreed to in writing, software 281 * distributed under the License is distributed on an "AS IS" BASIS, 282 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 283 * See the License for the specific language governing permissions and 284 * limitations under the License. 285 */const qs=new y9("@firebase/app"),QI="@firebase/app-compat",JI="@firebase/analytics-compat",ZI="@firebase/analytics",ez="@firebase/app-check-compat",tz="@firebase/app-check",nz="@firebase/auth",az="@firebase/auth-compat",rz="@firebase/database",sz="@firebase/data-connect",iz="@firebase/database-compat",lz="@firebase/functions",oz="@firebase/functions-compat",cz="@firebase/installations",uz="@firebase/installations-compat",dz="@firebase/messaging",hz="@firebase/messaging-compat",mz="@firebase/performance",fz="@firebase/performance-compat",pz="@firebase/remote-config",xz="@firebase/remote-config-compat",gz="@firebase/storage",bz="@firebase/storage-compat",yz="@firebase/firestore",vz="@firebase/ai",wz="@firebase/firestore-compat",Sz="firebase",Nz="12.18.0";/** 286 * @license 287 * Copyright 2019 Google LLC 288 * 289 * Licensed under the Apache License, Version 2.0 (the "License"); 290 * you may not use this file except in compliance with the License. 291 * You may obtain a copy of the License at 292 * 293 * http://www.apache.org/licenses/LICENSE-2.0 294 * 295 * Unless required by applicable law or agreed to in writing, software 296 * distributed under the License is distributed on an "AS IS" BASIS, 297 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 298 * See the License for the specific language governing permissions and 299 * limitations under the License. 300 */const Z1="[DEFAULT]",jz={[J1]:"fire-core",[QI]:"fire-core-compat",[ZI]:"fire-analytics",[JI]:"fire-analytics-compat",[tz]:"fire-app-check",[ez]:"fire-app-check-compat",[nz]:"fire-auth",[az]:"fire-auth-compat",[rz]:"fire-rtdb",[sz]:"fire-data-connect",[iz]:"fire-rtdb-compat",[lz]:"fire-fn",[oz]:"fire-fn-compat",[cz]:"fire-iid",[uz]:"fire-iid-compat",[dz]:"fire-fcm",[hz]:"fire-fcm-compat",[mz]:"fire-perf",[fz]:"fire-perf-compat",[pz]:"fire-rc",[xz]:"fire-rc-compat",[gz]:"fire-gcs",[bz]:"fire-gcs-compat",[yz]:"fire-fst",[wz]:"fire-fst-compat",[vz]:"fire-vertex","fire-js":"fire-js",[Sz]:"fire-js-all"};/** 301 * @license 302 * Copyright 2019 Google LLC 303 * 304 * Licensed under the Apache License, Version 2.0 (the "License"); 305 * you may not use this file except in compliance with the License. 306 * You may obtain a copy of the License at 307 * 308 * http://www.apache.org/licenses/LICENSE-2.0 309 * 310 * Unless required by applicable law or agreed to in writing, software 311 * distributed under the License is distributed on an "AS IS" BASIS, 312 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 313 * See the License for the specific language governing permissions and 314 * limitations under the License. 315 */const nm=new Map,kz=new Map,eg=new Map;function E3(e,t){try{e.container.addComponent(t)}catch(n){qs.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function t0(e){const t=e.name;if(eg.has(t))return qs.debug(`There were multiple attempts to register component ${t}.`),!1;eg.set(t,e);for(const n of nm.values())E3(n,e);for(const n of kz.values())E3(n,e);return!0}function S9(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Zr(e){return e==null?!1:e.settings!==void 0}/** 316 * @license 317 * Copyright 2019 Google LLC 318 * 319 * Licensed under the Apache License, Version 2.0 (the "License");
320 * you may not use this file except in compliance with the License. 321 * You may obtain a copy of the License at 322 * 323 * http://www.apache.org/licenses/LICENSE-2.0 324 * 325 * Unless required by applicable law or agreed to in writing, software 326 * distributed under the License is distributed on an "AS IS" BASIS, 327 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 328 * See the License for the specific language governing permissions and 329 * limitations under the License. 330 */const Cz={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different {$mismatchedParam}. Existing: '{$oldValue}'. New: '{$newValue}'.","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
330d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Ls=new S0("app","Firebase",Cz);/** 331 * @license 332 * Copyright 2019 Google LLC 333 * 334 * Licensed under the Apache License, Version 2.0 (the "License"); 335 * you may not use this file except in compliance with the License. 336 * You may obtain a copy of the License at 337 * 338 * http://www.apache.org/licenses/LICENSE-2.0 339 * 340 * Unless required by applicable law or agreed to in writing, software 341 * distributed under the License is distributed on an "AS IS" BASIS, 342 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 343 * See the License for the specific language governing permissions and 344 * limitations under the License. 345 */class Az{constructor(t,n,a){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=a,this.container.addComponent(new sc("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Ls.create("app-deleted",{appName:this._name})}}/** 346 * @license 347 * Copyright 2019 Google LLC 348 * 349 * Licensed under the Apache License, Version 2.0 (the "License"); 350 * you may not use this file except in compliance with the License. 351 * You may obtain a copy of the License at 352 * 353 * http://www.apache.org/licenses/LICENSE-2.0 354 * 355 * Unless required by applicable law or agreed to in writing, software 356 * distributed under the License is distributed on an "AS IS" BASIS, 357 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 358 * See the License for the specific language governing permissions and 359 * limitations under the License. 360 */const j0=Nz;function N9(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const a={name:Z1,automaticDataCollectionEnabled:!0,...t},s=a.name;if(typeof s!="string"||!s)throw Ls.create("bad-app-name",{appName:String(s)});if(n||(n=g9()),!n)throw Ls.create("no-options");const o=nm.get(s);if(o)if(rc(n,o.options)){if(rc(a,o.config))return o;throw Ls.create("duplicate-app",{appName:s,mismatchedParam:"config",oldValue:JSON.stringify(o.config),newValue:JSON.stringify(a)})}else throw Ls.create("duplicate-app",{appName:s,mismatchedParam:"options",oldValue:JSON.stringify(o.options),newValue:JSON.stringify(n)});const c=new _I(s);for(const h of eg.values())c.addComponent(h);const d=new Az(n,a,c);return nm.set(s,d),d}function Ez(e=Z1){const t=nm.get(e);if(!t&&e===Z1&&g9())return N9();if(!t)throw Ls.create("no-app",{appName:e});return t}function Wo(e,t,n){let a=jz[e]??e;n&&(a+=`-${n}`);const s=a.match(/\s|\//),o=t.match(/\s|\//);if(s||o){const c=[`Unable to register library "${a}" with version "${t}":`];s&&c.push(`library name "${a}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${t}" contains illegal characters (whitespace or "/")`),qs.warn(c.join(" "));return}t0(new sc(`${a}-version`,()=>({library:a,version:t}),"VERSION"))}/** 361 * @license 362 * Copyright 2021 Google LLC 363 * 364 * Licensed under the Apache License, Version 2.0 (the "License");
365 * you may not use this file except in compliance with the License. 366 * You may obtain a copy of the License at 367 * 368 * http://www.apache.org/licenses/LICENSE-2.0 369 * 370 * Unless required by applicable law or agreed to in writing, software 371 * distributed under the License is distributed on an "AS IS" BASIS, 372 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 373 * See the License for the specific language governing permissions and 374 * limitations under the License. 375 */const Tz="firebase-heartbeat-database",Mz=1,n0="firebase-heartbeat-store";let Vx=null;function j9(){return Vx||(Vx=GI(Tz,Mz,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(n0)}catch(n){console.warn(n)}}}}).catch(e=>{throw Ls.create("idb-open",{originalErrorMessage:e.message})})),Vx}async function Iz(e){try{const n=(await j9()).transaction(n0),a=await n.objectStore(n0).get(k9(e));return await n.done,a}catch(t){if(t instanceof Qi)qs.warn(t.message);else{const n=Ls.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});qs.warn(n.message)}}}async function T3(e,t){try{const a=(await j9()).transaction(n0,"readwrite");await a.objectStore(n0).put(t,k9(e)),await a.done}catch(n){if(n instanceof Qi)qs.warn(n.message);else{const a=Ls.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});qs.warn(a.message)}}}function k9(e){return`${e.name}!${e.options.appId}`}/** 376 * @license 377 * Copyright 2021 Google LLC 378 * 379 * Licensed under the Apache License, Version 2.0 (the "License"); 380 * you may not use this file except in compliance with the License. 381 * You may obtain a copy of the License at 382 * 383 * http://www.apache.org/licenses/LICENSE-2.0 384 * 385 * Unless required by applicable law or agreed to in writing, software 386 * distributed under the License is distributed on an "AS IS" BASIS, 387 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 388 * See the License for the specific language governing permissions and 389 * limitations under the License. 390 */const zz=1024,_z=30;class Dz{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new Rz(n),this._heartbeatsCachePromise=this._storage.read().then(a=>(this._heartbeatsCache=a,a))}async triggerHeartbeat(){var t,n;try{const s=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=M3();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)==null?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===o||this._heartbeatsCache.heartbeats.some(c=>c.date===o))return;if(this._heartbeatsCache.heartbeats.push({date:o,agent:s}),this._heartbeatsCache.heartbeats.length>_z){const c=Oz(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(c,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(a){qs.warn(a)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=M3(),{heartbeatsToSend:a,unsentEntries:s}=Bz(this._heartbeatsCache.heartbeats),o=p9(JSON.stringify({version:2,heartbeats:a}));return this._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(n){return qs.warn(n),""}}}function M3(){return new Date().toISOString().substring(0,10)}function Bz(e,t=zz){const n=[];let a=e.slice();for(const s of e){const o=n.find(c=>c.agent===s.agent);if(o){if(o.dates.push(s.date),I3(n)>t){o.dates.pop();break}}else if(n.push({agent:s.agent,dates:[s.date]}),I3(n)>t){n.pop();break}a=a.slice(1)}return{heartbeatsToSend:n,unsentEntries:a}}class Rz{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return wI()?SI().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await Iz(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const a=await this.read();return T3(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const a=await this.read();return T3(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??a.lastSentHeartbeatDate,heartbeats:[...a.heartbeats,...t.heartbeats]})}else return}}function I3(e){return p9(JSON.stringify({version:2,heartbeats:e})).length}function Oz(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let a=1;a<e.length;a++)e[a].date<n&&(n=e[a].date,t=a);return t}/** 391 * @license 392 * Copyright 2019 Google LLC 393 * 394 * Licensed under the Apache License, Version 2.0 (the "License");
395 * you may not use this file except in compliance with the License. 396 * You may obtain a copy of the License at 397 * 398 * http://www.apache.org/licenses/LICENSE-2.0 399 * 400 * Unless required by applicable law or agreed to in writing, software 401 * distributed under the License is distributed on an "AS IS" BASIS, 402 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 403 * See the License for the specific language governing permissions and 404 * limitations under the License. 405 */function Lz(e){t0(new sc("platform-logger",t=>new XI(t),"PRIVATE")),t0(new sc("heartbeat",t=>new Dz(t),"PRIVATE")),Wo(J1,A3,e),Wo(J1,A3,"esm2020"),Wo("fire-js","")}/** 406 * @license 407 * Copyright 2019 Google LLC 408 * 409 * Licensed under the Apache License, Version 2.0 (the "License"); 410 * you may not use this file except in compliance with the License. 411 * You may obtain a copy of the License at 412 * 413 * http://www.apache.org/licenses/LICENSE-2.0 414 * 415 * Unless required by applicable law or agreed to in writing, software 416 * distributed under the License is distributed on an "AS IS" BASIS, 417 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 418 * See the License for the specific language governing permissions and 419 * limitations under the License. 420 */Lz("");function C9(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const Pz=C9,A9=new S0("auth","Firebase",C9());/** 421 * @license 422 * Copyright 2020 Google LLC 423 * 424 * Licensed under the Apache License, Version 2.0 (the "License"); 425 * you may not use this file except in compliance with the License. 426 * You may obtain a copy of the License at 427 * 428 * http://www.apache.org/licenses/LICENSE-2.0 429 * 430 * Unless required by applicable law or agreed to in writing, software 431 * distributed under the License is distributed on an "AS IS" BASIS, 432 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 433 * See the License for the specific language governing permissions and 434 * limitations under the License. 435 */const am=new y9("@firebase/auth");function E9(e,...t){am.logLevel<=Lt.WARN&&am.warn(`Auth (${j0}): ${e}`,...t)}function Oh(e,...t){am.logLevel<=Lt.ERROR&&am.error(`Auth (${j0}): ${e}`,...t)}/** 436 * @license 437 * Copyright 2020 Google LLC 438 * 439 * Licensed under the Apache License, Version 2.0 (the "License"); 440 * you may not use this file except in compliance with the License. 441 * You may obtain a copy of the License at 442 * 443 * http://www.apache.org/licenses/LICENSE-2.0 444 * 445 * Unless required by applicable law or agreed to in writing, software 446 * distributed under the License is distributed on an "AS IS" BASIS, 447 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 448 * See the License for the specific language governing permissions and 449 * limitations under the License. 450 */function is(e,...t){throw Pb(e,...t)}function Br(e,...t){return Pb(e,...t)}function Lb(e,t,n){const a={...Pz(),[t]:n};return new S0("auth","Firebase",a).create(t,{appName:e.name})}function Bl(e){return Lb(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Uz(e,t,n){const a=n;if(!(t instanceof a))throw a.name!==t.constructor.name&&is(e,"argument-error"),Lb(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Pb(e,...t){if(typeof e!="string"){const n=t[0],a=[...t.slice(1)];return a[0]&&(a[0].appName=e.name),e._errorFactory.create(n,...a)}return A9.create(e,...t)}function Ke(e,t,...n){if(!e)throw Pb(t,...n)}function Ps(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Oh(t),new Error(t)}function Hs(e,t){e||Ps(t)}/** 451 * @license 452 * Copyright 2020 Google LLC 453 * 454 * Licensed under the Apache License, Version 2.0 (the "License"); 455 * you may not use this file except in compliance with the License. 456 * You may obtain a copy of the License at 457 * 458 * http://www.apache.org/licenses/LICENSE-2.0 459 * 460 * Unless required by applicable law or agreed to in writing, softw
460are 461 * distributed under the License is distributed on an "AS IS" BASIS, 462 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 463 * See the License for the specific language governing permissions and 464 * limitations under the License. 465 */function tg(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.href)||""}function Fz(){return z3()==="http:"||z3()==="https:"}function z3(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.protocol)||null}/** 466 * @license 467 * Copyright 2020 Google LLC 468 * 469 * Licensed under the Apache License, Version 2.0 (the "License"); 470 * you may not use this file except in compliance with the License. 471 * You may obtain a copy of the License at 472 * 473 * http://www.apache.org/licenses/LICENSE-2.0 474 * 475 * Unless required by applicable law or agreed to in writing, software 476 * distributed under the License is distributed on an "AS IS" BASIS, 477 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 478 * See the License for the specific language governing permissions and 479 * limitations under the License. 480 */function Vz(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Fz()||bI()||"connection"in navigator)?navigator.onLine:!0}function qz(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/** 481 * @license 482 * Copyright 2020 Google LLC 483 * 484 * Licensed under the Apache License, Version 2.0 (the "License"); 485 * you may not use this file except in compliance with the License. 486 * You may obtain a copy of the License at 487 * 488 * http://www.apache.org/licenses/LICENSE-2.0 489 * 490 * Unless required by applicable law or agreed to in writing, software 491 * distributed under the License is distributed on an "AS IS" BASIS, 492 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 493 * See the License for the specific language governing permissions and 494 * limitations under the License. 495 */class k0{constructor(t,n){this.shortDelay=t,this.longDelay=n,Hs(n>t,"Short delay should be less than long delay!"),this.isMobile=xI()||yI()}get(){return Vz()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 496 * @license 497 * Copyright 2020 Google LLC 498 * 499 * Licensed under the Apache License, Version 2.0 (the "License"); 500 * you may not use this file except in compliance with the License. 501 * You may obtain a copy of the License at 502 * 503 * http://www.apache.org/licenses/LICENSE-2.0 504 * 505 * Unless required by applicable law or agreed to in writing, software 506 * distributed under the License is distributed on an "AS IS" BASIS, 507 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 508 * See the License for the specific language governing permissions and 509 * limitations under the License. 510 */function Ub(e,t){Hs(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/** 511 * @license 512 * Copyright 2020 Google LLC 513 * 514 * Licensed under the Apache License, Version 2.0 (the "License"); 515 * you may not use this file except in compliance with the License. 516 * You may obtain a copy of the License at 517 * 518 * http://www.apache.org/licenses/LICENSE-2.0 519 * 520 * Unless required by applicable law or agreed to in writing, software 521 * distributed under the License is distributed on an "AS IS" BASIS, 522 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 523 * See the License for the specific language governing permissions and 524 * limitations under the License. 525 */class T9{static initialize(t,n,a){this.fetchImpl=t,n&&(this.headersImpl=n),a&&(this.responseImpl=a)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Ps("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Ps("Could not find Headers implementation, make sure you call FetchProvi
525der.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Ps("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 526 * @license 527 * Copyright 2020 Google LLC 528 * 529 * Licensed under the Apache License, Version 2.0 (the "License"); 530 * you may not use this file except in compliance with the License. 531 * You may obtain a copy of the License at 532 * 533 * http://www.apache.org/licenses/LICENSE-2.0 534 * 535 * Unless required by applicable law or agreed to in writing, software 536 * distributed under the License is distributed on an "AS IS" BASIS, 537 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 538 * See the License for the specific language governing permissions and 539 * limitations under the License. 540 */const Hz={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/** 541 * @license 542 * Copyright 2020 Google LLC 543 * 544 * Licensed under the Apache License, Version 2.0 (the "License"); 545 * you may not use this file except in compliance with the License. 546 * You may obtain a copy of the License at 547 * 548 * http://www.apache.org/licenses/LICENSE-2.0 549 * 550 * Unless required by applicable law or agreed to in writing, software 551 * distributed under the License is distributed on an "AS IS" BASIS, 552 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 553 * See the License for the specific language governing permissions and 554 * limitations under the License. 555 */const $z=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],Gz=new k0(3e4,6e4);function Fb(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function gc(e,t,n,a,s={}){return M9(e,s,async()=>{let o={},c={};a&&(t==="GET"?c=a:o={body:JSON.stringify(a)});const d=N0({...c,key:e.config.apiKey}).slice(1),h=await e._getAdditionalHeaders();h["Content-Type"]="application/json",e.languageCode&&(h["X-Firebase-Locale"]=e.languageCode);const f={method:t,headers:h,...o};
555return gI()||(f.referrerPolicy="strict-origin-when-cross-origin"),e.emulatorConfig&&Rb(e.emulatorConfig.host)&&(f.credentials="include"),T9.fetch()(await I9(e,e.config.apiHost,n,d),f)})}async function M9(e,t,n){e._canInitEmulator=!1;const a={...Hz,...t};try{const s=new Wz(e),o=await Promise.race([n(),s.promise]);s.clearNetworkTimeout();const c=await o.json();if("needConfirmation"in c)throw uh(e,"account-exists-with-different-credential",c);if(o.ok&&!("errorMessage"in c))return c;{const d=o.ok?c.errorMessage:c.error.message,[h,f]=d.split(" : ");if(h==="FEDERATED_USER_ID_ALREADY_LINKED")throw uh(e,"credential-already-in-use",c);if(h==="EMAIL_EXISTS")throw uh(e,"email-already-in-use",c);if(h==="USER_DISABLED")throw uh(e,"user-disabled",c);const p=a[h]||h.toLowerCase().replace(/[_\s]+/g,"-");if(f)throw Lb(e,p,f);is(e,p)}}catch(s){if(s instanceof Qi)throw s;is(e,"network-request-failed",{message:String(s)})}}async function Yz(e,t,n,a,s={}){const o=await gc(e,t,n,a,s);return"mfaPendingCredential"in o&&is(e,"multi-factor-auth-required",{_serverResponse:o}),o}async function I9(e,t,n,a){const s=`${t}${n}?${a}`,o=e,c=o.config.emulator?Ub(e.config,s):`${e.config.apiScheme}://${s}`;return $z.includes(n)&&(await o._persistenceManagerAvailable,o._getPersistenceType()==="COOKIE")?o._getPersistence()._getFinalTarget(c).toString():c}class Wz{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,a)=>{this.timer=setTimeout(()=>a(Br(this.auth,"network-request-failed")),Gz.get())})}}function uh(e,t,n){const a={appName:e.name};n.email&&(a.email=n.email),n.phoneNumber&&(a.phoneNumber=n.phoneNumber);const s=Br(e,t,a);return s.customData._tokenResponse=n,s}/** 556 * @license 557 * Copyright 2020 Google LLC 558 * 559 * Licensed under the Apache License, Version 2.0 (the "License"); 560 * you may not use this file except in compliance with the License. 561 * You may obtain a copy of the License at 562 * 563 * http://www.apache.org/licenses/LICENSE-2.0 564 * 565 * Unless required by applicable law or agreed to in writing, software 566 * distributed under the License is distributed on an "AS IS" BASIS, 567 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 568 * See the License for the specific language governing permissions and 569 * limitations under the License. 570 */async function Xz(e,t){return gc(e,"POST","/v1/accounts:delete",t)}async function rm(e,t){return gc(e,"POST","/v1/accounts:lookup",t)}/** 571 * @license 572 * Copyright 2020 Google LLC 573 * 574 * Licensed under the Apache License, Version 2.0 (the "License"); 575 * you may not use this file except in compliance with the License. 576 * You may obtain a copy of the License at 577 * 578 * http://www.apache.org/licenses/LICENSE-2.0 579 * 580 * Unless required by applicable law or agreed to in writing, software 581 * distributed under the License is distributed on an "AS IS" BASIS, 582 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 583 * See the License for the specific language governing permissions and 584 * limitations under the License. 585 */function Uu(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function Kz(e,t=!1){const n=Vl(e),a=await n.getIdToken(t),s=Vb(a);Ke(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const o=typeof s.firebase=="object"?s.firebase:void 0,c=o==null?void 0:o.sign_in_provider;return{claims:s,token:a,authTime:Uu(qx(s.auth_time)),issuedAtTime:Uu(qx(s.iat)),expirationTime:Uu(qx(s.exp)),signInProvider:c||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function qx(e){return Number(e)*1e3}function Vb(e){const[t,n,a]=e.split(".");if(t===void 0||n===void 0||a===void 0)return Oh("JWT malformed, contained fewer than 3 sections"),null;try{const s=x9(n);return s?JSON.parse(s):(Oh("Failed to decode base64 JWT payload"),null)}catch(s){return Oh("Caught error parsing JWT payload as JSON",s==null?void 0:s.toString()),null}}function _3(e){const t=Vb(e);return Ke(t,"internal-error"),Ke(typeof t.exp<"u","internal-error"),Ke(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/** 586 * @license 587 * Copyright 2020 Google LLC 588 * 589 * Licensed under the Apache License, Version 2.0 (the "License");
590 * you may not use this file except in compliance with the License. 591 * You may obtain a copy of the License at 592 * 593 * http://www.apache.org/licenses/LICENSE-2.0 594 * 595 * Unless required by applicable law or agreed to in writing, software 596 * distributed under the License is distributed on an "AS IS" BASIS, 597 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 598 * See the License for the specific language governing permissions and 599 * limitations under the License. 600 */async function a0(e,t,n=!1){if(n)return t;try{return await t}catch(a){throw a instanceof Qi&&Qz(a)&&e.auth.currentUser===e&&await e.auth.signOut(),a}}function Qz({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/** 601 * @license 602 * Copyright 2020 Google LLC 603 * 604 * Licensed under the Apache License, Version 2.0 (the "License"); 605 * you may not use this file except in compliance with the License. 606 * You may obtain a copy of the License at 607 * 608 * http://www.apache.org/licenses/LICENSE-2.0 609 * 610 * Unless required by applicable law or agreed to in writing, software 611 * distributed under the License is distributed on an "AS IS" BASIS, 612 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 613 * See the License for the specific language governing permissions and 614 * limitations under the License. 615 */class Jz{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const a=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,a)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 616 * @license 617 * Copyright 2020 Google LLC 618 * 619 * Licensed under the Apache License, Version 2.0 (the "License"); 620 * you may not use this file except in compliance with the License. 621 * You may obtain a copy of the License at 622 * 623 * http://www.apache.org/licenses/LICENSE-2.0 624 * 625 * Unless required by applicable law or agreed to in writing, software 626 * distributed under the License is distributed on an "AS IS" BASIS, 627 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 628 * See the License for the specific language governing permissions and 629 * limitations under the License. 630 */class ng{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Uu(this.lastLoginAt),this.creationTime=Uu(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 631 * @license 632 * Copyright 2019 Google LLC 633 * 634 * Licensed under the Apache License, Version 2.0 (the "License"); 635 * you may not use this file except in compliance with the License. 636 * You may obtain a copy of the License at 637 * 638 * http://www.apache.org/licenses/LICENSE-2.0 639 * 640 * Unless required by applicable law or agreed to in writing, software 641 * distributed under the License is distributed on an "AS IS" BASIS, 642 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 643 * See the License for the specific language governing permissions and 644 * limitations under the License. 645 */async function sm(e){var x;const t=e.auth,n=await e.getIdToken(),a=await a0(e,rm(t,{idToken:n}));Ke(a==null?void 0:a.users.length,t,"internal-error");const s=a.users[0];e._notifyReloadListener(s);const o=(x=s.providerUserInfo)!=null&&x.length?z9(s.providerUserInfo):[],c=e_(e.providerData,o),d=e.isAnonymous,h=!(e.email&&s.passwordHash)&&!(c!=null&&c.length),f=d?h:!1,p={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:c,metadata:new ng(s.createdAt,s.lastLoginAt),isAnonymous:f};Object.assign(e,p)}async function Zz(e){const t=Vl(e);await sm(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function e_(e,t){return[...e.filter(a=>!t.some(s=>s.providerId===a.providerId)),...t]}function z9(e){return e.map(({providerId:t,...n})=>
645({providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}/** 646 * @license 647 * Copyright 2020 Google LLC 648 * 649 * Licensed under the Apache License, Version 2.0 (the "License"); 650 * you may not use this file except in compliance with the License. 651 * You may obtain a copy of the License at 652 * 653 * http://www.apache.org/licenses/LICENSE-2.0 654 * 655 * Unless required by applicable law or agreed to in writing, software 656 * distributed under the License is distributed on an "AS IS" BASIS, 657 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 658 * See the License for the specific language governing permissions and 659 * limitations under the License. 660 */async function t_(e,t){const n=await M9(e,{},async()=>{const a=N0({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:s,apiKey:o}=e.config,c=await I9(e,s,"/v1/token",`key=${o}`),d=await e._getAdditionalHeaders();d["Content-Type"]="application/x-www-form-urlencoded";const h={method:"POST",headers:d,body:a};return e.emulatorConfig&&Rb(e.emulatorConfig.host)&&(h.credentials="include"),T9.fetch()(c,h)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function n_(e,t){return gc(e,"POST","/v2/accounts:revokeToken",Fb(e,t))}/** 661 * @license 662 * Copyright 2020 Google LLC 663 * 664 * Licensed under the Apache License, Version 2.0 (the "License"); 665 * you may not use this file except in compliance with the License. 666 * You may obtain a copy of the License at 667 * 668 * http://www.apache.org/licenses/LICENSE-2.0 669 * 670 * Unless required by applicable law or agreed to in writing, software 671 * distributed under the License is distributed on an "AS IS" BASIS, 672 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 673 * See the License for the specific language governing permissions and 674 * limitations under the License. 675 */class Xo{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){Ke(t.idToken,"internal-error"),Ke(typeof t.idToken<"u","internal-error"),Ke(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):_3(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){Ke(t.length!==0,"internal-error");const n=_3(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(Ke(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:a,refreshToken:s,expiresIn:o}=await t_(t,n);this.updateTokensAndExpiration(a,s,Number(o))}updateTokensAndExpiration(t,n,a){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+a*1e3}static fromJSON(t,n){const{refreshToken:a,accessToken:s,expirationTime:o}=n,c=new Xo;return a&&(Ke(typeof a=="string","internal-error",{appName:t}),c.refreshToken=a),s&&(Ke(typeof s=="string","internal-error",{appName:t}),c.accessToken=s),o&&(Ke(typeof o=="number","internal-error",{appName:t}),c.expirationTime=o),c}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new Xo,this.toJSON())}_performRefresh(){return Ps("not implemented")}}/** 676 * @license 677 * Copyright 2020 Google LLC 678 * 679 * Licensed under the Apache License, Version 2.0 (the "License"); 680 * you may not use this file except in compliance with the License. 681 * You may obtain a copy of the License at 682 * 683 * http://www.apache.org/licenses/LICENSE-2.0 684 * 685 * Unless required by applicable law or agreed to in writing, software 686 * distributed under the License is distributed on an "AS IS" BASIS, 687 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 688 * See the License for the specific language governing permissions and 689 * limitations under the License. 690 */function wi(e,t){Ke(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class _r{constructor({uid:t,auth:n,stsTokenManager:a,...s}){this.providerId="firebase",this.proactiveRefresh=new Jz(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=a,this.accessToken=a.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new ng(s.createdAt||void 0,s.lastLoginAt||void 0)}async getIdToken(t){const n=await a0(this,this.stsTokenManager.getToken(this.auth,t));return Ke(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return Kz(this,t)}reload(){return Zz(this)}_assign(t){this!==t&&(Ke(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>({...n})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new _r({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(t){Ke(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let a=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),a=!0),n&&await sm(this),await this.auth._persistUserIfCurrent(this),a&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(Zr(this.auth.app))return Promise.reject(Bl(this.auth));const t=await this.getIdToken();return await a0(this,Xz(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
690nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){const a=n.displayName??void 0,s=n.email??void 0,o=n.phoneNumber??void 0,c=n.photoURL??void 0,d=n.tenantId??void 0,h=n._redirectEventId??void 0,f=n.createdAt??void 0,p=n.lastLoginAt??void 0,{uid:x,emailVerified:b,isAnonymous:v,providerData:N,stsTokenManager:j}=n;Ke(x&&j,t,"internal-error");const T=Xo.fromJSON(this.name,j);Ke(typeof x=="string",t,"internal-error"),wi(a,t.name),wi(s,t.name),Ke(typeof b=="boolean",t,"internal-error"),Ke(typeof v=="boolean",t,"internal-error"),wi(o,t.name),wi(c,t.name),wi(d,t.name),wi(h,t.name),wi(f,t.name),wi(p,t.name);const E=new _r({uid:x,auth:t,email:s,emailVerified:b,displayName:a,isAnonymous:v,photoURL:c,phoneNumber:o,tenantId:d,stsTokenManager:T,createdAt:f,lastLoginAt:p});return N&&Array.isArray(N)&&(E.providerData=N.map(D=>({...D}))),h&&(E._redirectEventId=h),E}static async _fromIdTokenResponse(t,n,a=!1){const s=new Xo;s.updateFromServerResponse(n);const o=new _r({uid:n.localId,auth:t,stsTokenManager:s,isAnonymous:a});return await sm(o),o}static async _fromGetAccountInfoResponse(t,n,a){const s=n.users[0];Ke(s.localId!==void 0,"internal-error");const o=s.providerUserInfo!==void 0?z9(s.providerUserInfo):[],c=!(s.email&&s.passwordHash)&&!(o!=null&&o.length),d=new Xo;d.updateFromIdToken(a);const h=new _r({uid:s.localId,auth:t,stsTokenManager:d,isAnonymous:c}),f={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:o,metadata:new ng(s.createdAt,s.lastLoginAt),isAnonymous:!(s.email&&s.passwordHash)&&!(o!=null&&o.length)};return Object.assign(h,f),h}}/** 691 * @license 692 * Copyright 2020 Google LLC 693 * 694 * Licensed under the Apache License, Version 2.0 (the "License"); 695 * you may not use this file except in compliance with the License. 696 * You may obtain a copy of the License at 697 * 698 * http://www.apache.org/licenses/LICENSE-2.0 699 * 700 * Unless required by applicable law or agreed to in writing, software 701 * distributed under the License is distributed on an "AS IS" BASIS, 702 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 703 * See the License for the specific language governing permissions and 704 * limitations under the License. 705 */const D3=new Map;function Us(e){Hs(e instanceof Function,"Expected a class definition");let t=D3.get(e);return t?(Hs(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,D3.set(e,t),t)}/** 706 * @license 707 * Copyright 2019 Google LLC 708 * 709 * Licensed under the Apache License, Version 2.0 (the "License"); 710 * you may not use this file except in compliance with the License. 711 * You may obtain a copy of the License at 712 * 713 * http://www.apache.org/licenses/LICENSE-2.0 714 * 715 * Unless required by applicable law or agreed to in writing, software 716 * distributed under the License is distributed on an "AS IS" BASIS, 717 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 718 * See the License for the specific language governing permissions and 719 * limitations under the License. 720 */class _9{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}_9.type="NONE";const B3=_9;/** 721 * @license 722 * Copyright 2019 Google LLC 723 * 724 * Licensed under the Apache License, Version 2.0 (the "License"); 725 * you may not use this file except in compliance with the License. 726 * You may obtain a copy of the License at 727 * 728 * http://www.apache.org/licenses/LICENSE-2.0 729 * 730 * Unless required by applicable law or agreed to in writing, softw
730are 731 * distributed under the License is distributed on an "AS IS" BASIS, 732 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 733 * See the License for the specific language governing permissions and 734 * limitations under the License. 735 */function Lh(e,t,n){return`firebase:${e}:${t}:${n}`}class Ko{constructor(t,n,a){this.persistence=t,this.auth=n,this.userKey=a;const{config:s,name:o}=this.auth;this.fullUserKey=Lh(this.userKey,s.apiKey,o),this.fullPersistenceKey=Lh("persistence",s.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const n=await rm(this.auth,{idToken:t}).catch(()=>{});return n?_r._fromGetAccountInfoResponse(this.auth,n,t):null}return _r._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,a="authUser"){if(!n.length)return new Ko(Us(B3),t,a);const s=(await Promise.all(n.map(async f=>{if(await f._isAvailable())return f}))).filter(f=>f);let o=s[0]||Us(B3);const c=Lh(a,t.config.apiKey,t.name);let d=null;for(const f of n)try{const p=await f._get(c);if(p){let x;if(typeof p=="string"){const b=await rm(t,{idToken:p}).catch(()=>{});if(!b)break;x=await _r._fromGetAccountInfoResponse(t,b,p)}else x=_r._fromJSON(t,p);f!==o&&(d=x),o=f;break}}catch{}const h=s.filter(f=>f._shouldAllowMigration);return!o._shouldAllowMigration||!h.length?new Ko(o,t,a):(o=h[0],d&&await o._set(c,d.toJSON()),await Promise.all(n.map(async f=>{if(f!==o)try{await f._remove(c)}catch{}})),new Ko(o,t,a))}}/** 736 * @license 737 * Copyright 2020 Google LLC 738 * 739 * Licensed under the Apache License, Version 2.0 (the "License"); 740 * you may not use this file except in compliance with the License. 741 * You may obtain a copy of the License at 742 * 743 * http://www.apache.org/licenses/LICENSE-2.0 744 * 745 * Unless required by applicable law or agreed to in writing, software 746 * distributed under the License is distributed on an "AS IS" BASIS, 747 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 748 * See the License for the specific language governing permissions and 749 * limitations under the License. 750 */function R3(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(O9(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(D9(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(P9(t))return"Blackberry";if(U9(t))return"Webos";if(B9(t))return"Safari";if((t.includes("chrome/")||R9(t))&&!t.includes("edge/"))return"Chrome";if(L9(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,a=e.match(n);if((a==null?void 0:a.length)===2)return a[1]}return"Other"}function D9(e=ba()){return/firefox\//i.test(e)}function B9(e=ba()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function R9(e=ba()){return/crios\//i.test(e)}function O9(e=ba()){return/iemobile/i.test(e)}function L9(e=ba()){return/android/i.test(e)}function P9(e=ba()){return/blackberry/i.test(e)}function U9(e=ba()){return/webos/i.test(e)}function qb(e=ba()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function a_(e=ba()){var t;return qb(e)&&!!((t=window.navigator)!=null&&t.standalone)}function r_(){return vI()&&document.documentMode===10}function F9(e=ba()){return qb(e)||L9(e)||U9(e)||P9(e)||/windows phone/i.test(e)||O9(e)}/** 751 * @license 752 * Copyright 2020 Google LLC 753 * 754 * Licensed under the Apache License, Version 2.0 (the "License");
755 * you may not use this file except in compliance with the License. 756 * You may obtain a copy of the License at 757 * 758 * http://www.apache.org/licenses/LICENSE-2.0 759 * 760 * Unless required by applicable law or agreed to in writing, software 761 * distributed under the License is distributed on an "AS IS" BASIS, 762 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 763 * See the License for the specific language governing permissions and 764 * limitations under the License. 765 */function V9(e,t=[]){let n;switch(e){case"Browser":n=R3(ba());break;case"Worker":n=`${R3(ba())}-${e}`;break;default:n=e}const a=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${j0}/${a}`}/** 766 * @license 767 * Copyright 2022 Google LLC 768 * 769 * Licensed under the Apache License, Version 2.0 (the "License"); 770 * you may not use this file except in compliance with the License. 771 * You may obtain a copy of the License at 772 * 773 * http://www.apache.org/licenses/LICENSE-2.0 774 * 775 * Unless required by applicable law or agreed to in writing, software 776 * distributed under the License is distributed on an "AS IS" BASIS, 777 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 778 * See the License for the specific language governing permissions and 779 * limitations under the License. 780 */class s_{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const a=o=>new Promise((c,d)=>{try{const h=t(o);c(h)}catch(h){d(h)}});a.onAbort=n,this.queue.push(a);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const a of this.queue)await a(t),a.onAbort&&n.push(a.onAbort)}catch(a){n.reverse();for(const s of n)try{s()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:a==null?void 0:a.message})}}}/** 781 * @license 782 * Copyright 2023 Google LLC 783 * 784 * Licensed under the Apache License, Version 2.0 (the "License"); 785 * you may not use this file except in compliance with the License. 786 * You may obtain a copy of the License at 787 * 788 * http://www.apache.org/licenses/LICENSE-2.0 789 * 790 * Unless required by applicable law or agreed to in writing, software 791 * distributed under the License is distributed on an "AS IS" BASIS, 792 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 793 * See the License for the specific language governing permissions and 794 * limitations under the License. 795 */async function i_(e,t={}){return gc(e,"GET","/v2/passwordPolicy",Fb(e,t))}/** 796 * @license 797 * Copyright 2023 Google LLC 798 * 799 * Licensed under the Apache License, Version 2.0 (the "License"); 800 * you may not use this file except in compliance with the License. 801 * You may obtain a copy of the License at 802 * 803 * http://www.apache.org/licenses/LICENSE-2.0 804 * 805 * Unless required by applicable law or agreed to in writing, software 806 * distributed under the License is distributed on an "AS IS" BASIS, 807 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 808 * See the License for the specific language governing permissions and 809 * limitations under the License. 810 */const l_=6;class o_{constructor(t){var a;const n=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??l_,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((a=t.allowedNonAlphanumericCharacters)==null?void 0:a.join(""))??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,n),this.validatePasswordCharacterOptions(t,n),n.isValid&&
810(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(t,n){const a=this.customStrengthOptions.minPasswordLength,s=this.customStrengthOptions.maxPasswordLength;a&&(n.meetsMinPasswordLength=t.length>=a),s&&(n.meetsMaxPasswordLength=t.length<=s)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,!1,!1,!1);let a;for(let s=0;s<t.length;s++)a=t.charAt(s),this.updatePasswordCharacterOptionsStatuses(n,a>="a"&&a<="z",a>="A"&&a<="Z",a>="0"&&a<="9",this.allowedNonAlphanumericCharacters.includes(a))}updatePasswordCharacterOptionsStatuses(t,n,a,s,o){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=a)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=s)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=o))}}/** 811 * @license 812 * Copyright 2020 Google LLC 813 * 814 * Licensed under the Apache License, Version 2.0 (the "License"); 815 * you may not use this file except in compliance with the License. 816 * You may obtain a copy of the License at 817 * 818 * http://www.apache.org/licenses/LICENSE-2.0 819 * 820 * Unless required by applicable law or agreed to in writing, software 821 * distributed under the License is distributed on an "AS IS" BASIS, 822 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 823 * See the License for the specific language governing permissions and 824 * limitations under the License. 825 */class c_{constructor(t,n,a,s){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=a,this.config=s,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new O3(this),this.idTokenSubscription=new O3(this),this.beforeStateQueue=new s_(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=A9,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=s.sdkClientVersion,this._persistenceManagerAvailable=new Promise(o=>this._resolvePersistenceManagerAvailable=o)}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Us(n)),this._initializationPromise=this.queue(async()=>{var a,s,o;if(!this._deleted&&(this.persistenceManager=await Ko.create(this,t),(a=this._resolvePersistenceManagerAvailable)==null||a.call(this),!this._deleted)){if((s=this._popupRedirectResolver)!=null&&s._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((o=this.currentUser)==null?void 0:o.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await rm(this,{idToken:t}),a=await _r._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(a)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var o;if(Zr(this.app)){const c=this.app.settings.authIdToken;return c?new Promise(d=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(c).then(d,d))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let a=n,s=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const c=(o=this.redirectUser)==null?void 0:o._redirectEventId,d=a==null?void 0:a._redirectEventId,h=await this.tryRedirectSignIn(t);(!c||c===d)&&(h!=null&&h.user)&&(a=h.user,s=!0)}if(!a)return this.directlySetCurrentUser(null);
825if(!a._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(a)}catch(c){a=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(c))}return a?this.reloadAndSetCurrentUserOrClear(a):this.directlySetCurrentUser(null)}return Ke(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===a._redirectEventId?this.directlySetCurrentUser(a):this.reloadAndSetCurrentUserOrClear(a)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await sm(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=qz()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(Zr(this.app))return Promise.reject(Bl(this));const n=t?Vl(t):null;return n&&Ke(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&Ke(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return Zr(this.app)?Promise.reject(Bl(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return Zr(this.app)?Promise.reject(Bl(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Us(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await i_(this),n=new o_(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new S0("auth","Firebase",t())}onAuthStateChanged(t,n,a){return this.registerStateListener(this.authStateSubscription,t,n,a)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,a){return this.registerStateListener(this.idTokenSubscription,t,n,a)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const a=this.onAuthStateChanged(()=>{a(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),a={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(a.tenantId=this.tenantId),await n_(this,a)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)==null?void 0:t.toJSON()}}async _setRedirectUser(t,n){const a=await this.getOrInitRedirectPersistenceManager(n);return t===null?a.removeCurrentUser():a.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&Us(t)||this._popupRedirectResolver;Ke(n,this,"argument-error"),this.redirectPersistenceManager=await Ko.create(this,[Us(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var n,a;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)==null?void 0:n._redirectEventId)===t?this._currentUser:((a=this.redirectUser)==null?void 0:a._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=((n=this.currentUser)==null?void 0:n.uid)??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}
825registerStateListener(t,n,a,s){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let c=!1;const d=this._isInitialized?Promise.resolve():this._initializationPromise;if(Ke(d,this,"internal-error"),d.then(()=>{c||o(this.currentUser)}),typeof n=="function"){const h=t.addObserver(n,a,s);return()=>{c=!0,h()}}else{const h=t.addObserver(n);return()=>{c=!0,h()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return Ke(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=V9(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var s;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await((s=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:s.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const a=await this._getAppCheckToken();return a&&(t["X-Firebase-AppCheck"]=a),t}async _getAppCheckToken(){var n;if(Zr(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await((n=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:n.getToken());return t!=null&&t.error&&E9(`Error while retrieving App Check token: ${t.error}`),t==null?void 0:t.token}}function bc(e){return Vl(e)}class O3{constructor(t){this.auth=t,this.observer=null,this.addObserver=CI(n=>this.observer=n)}get next(){return Ke(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 826 * @license 827 * Copyright 2020 Google LLC 828 * 829 * Licensed under the Apache License, Version 2.0 (the "License"); 830 * you may not use this file except in compliance with the License. 831 * You may obtain a copy of the License at 832 * 833 * http://www.apache.org/licenses/LICENSE-2.0 834 * 835 * Unless required by applicable law or agreed to in writing, software 836 * distributed under the License is distributed on an "AS IS" BASIS, 837 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 838 * See the License for the specific language governing permissions and 839 * limitations under the License. 840 */let Hb={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function u_(e){Hb=e}function d_(e){return Hb.loadJS(e)}function h_(){return Hb.gapiScript}function m_(e){return`__${e}${Math.floor(Math.random()*1e6)}`}/** 841 * @license 842 * Copyright 2020 Google LLC 843 * 844 * Licensed under the Apache License, Version 2.0 (the "License"); 845 * you may not use this file except in compliance with the License. 846 * You may obtain a copy of the License at 847 * 848 * http://www.apache.org/licenses/LICENSE-2.0 849 * 850 * Unless required by applicable law or agreed to in writing, software 851 * distributed under the License is distributed on an "AS IS" BASIS, 852 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 853 * See the License for the specific language governing permissions and 854 * limitations under the License. 855 */function ag(e,t){const n=S9(e,"auth");if(n.isInitialized()){const s=n.getImmediate(),o=n.getOptions();if(rc(o,t??{}))return s;is(s,"already-initialized")}return n.initialize({options:t})}function f_(e,t){const n=(t==null?void 0:t.persistence)||[],a=(Array.isArray(n)?n:[n]).map(Us);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(a,t==null?void 0:t.popupRedirectResolver)}function p_(e,t,n){const a=bc(e);Ke(/^https?:\/\//.test(t),a,"invalid-emulator-scheme");const s=!1,o=q9(t),{host:c,port:d}=x_(t),h=d===null?"":`:${d}`,f={url:`${o}//${c}${h}/`},p=Object.freeze({host:c,port:d,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!a._canInitEmulator){Ke(a.config.emulator&&a.emulatorConfig,a,"emulator-config-failed"),Ke(rc(f,a.config.emulator)&&rc(p,a.emulatorConfig),a,"emulator-config-failed");return}a.config.emulator=f,a.emulatorConfig=p,a.settings.appVerificationDisabledForTesting=!0,Rb(c)?TI(`${o}//${c}${h}`):g_()}function q9(e){const t=e.indexOf(":");
855return t<0?"":e.substr(0,t+1)}function x_(e){const t=q9(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const a=n[2].split("@").pop()||"",s=/^(\[[^\]]+\])(:|$)/.exec(a);if(s){const o=s[1];return{host:o,port:L3(a.substr(o.length+1))}}else{const[o,c]=a.split(":");return{host:o,port:L3(c)}}}function L3(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function g_(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/** 856 * @license 857 * Copyright 2020 Google LLC 858 * 859 * Licensed under the Apache License, Version 2.0 (the "License"); 860 * you may not use this file except in compliance with the License. 861 * You may obtain a copy of the License at 862 * 863 * http://www.apache.org/licenses/LICENSE-2.0 864 * 865 * Unless required by applicable law or agreed to in writing, software 866 * distributed under the License is distributed on an "AS IS" BASIS, 867 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 868 * See the License for the specific language governing permissions and 869 * limitations under the License. 870 */class H9{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return Ps("not implemented")}_getIdTokenResponse(t){return Ps("not implemented")}_linkToIdToken(t,n){return Ps("not implemented")}_getReauthenticationResolver(t){return Ps("not implemented")}}/** 871 * @license 872 * Copyright 2020 Google LLC 873 * 874 * Licensed under the Apache License, Version 2.0 (the "License"); 875 * you may not use this file except in compliance with the License. 876 * You may obtain a copy of the License at 877 * 878 * http://www.apache.org/licenses/LICENSE-2.0 879 * 880 * Unless required by applicable law or agreed to in writing, software 881 * distributed under the License is distributed on an "AS IS" BASIS, 882 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 883 * See the License for the specific language governing permissions and 884 * limitations under the License. 885 */async function Qo(e,t){return Yz(e,"POST","/v1/accounts:signInWithIdp",Fb(e,t))}/** 886 * @license 887 * Copyright 2020 Google LLC 888 * 889 * Licensed under the Apache License, Version 2.0 (the "License"); 890 * you may not use this file except in compliance with the License. 891 * You may obtain a copy of the License at 892 * 893 * http://www.apache.org/licenses/LICENSE-2.0 894 * 895 * Unless required by applicable law or agreed to in writing, software 896 * distributed under the License is distributed on an "AS IS" BASIS, 897 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 898 * See the License for the specific language governing permissions and 899 * limitations under the License. 900 */const b_="http://localhost";class Ll extends H9{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new Ll(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):is("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
900once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:a,signInMethod:s,...o}=n;if(!a||!s)return null;const c=new Ll(a,s);return c.idToken=o.idToken||void 0,c.accessToken=o.accessToken||void 0,c.secret=o.secret,c.nonce=o.nonce,c.pendingToken=o.pendingToken||null,c}_getIdTokenResponse(t){const n=this.buildRequest();return Qo(t,n)}_linkToIdToken(t,n){const a=this.buildRequest();return a.idToken=n,Qo(t,a)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,Qo(t,n)}buildRequest(){const t={requestUri:b_,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=N0(n)}return t}}/** 901 * @license 902 * Copyright 2020 Google LLC 903 * 904 * Licensed under the Apache License, Version 2.0 (the "License"); 905 * you may not use this file except in compliance with the License. 906 * You may obtain a copy of the License at 907 * 908 * http://www.apache.org/licenses/LICENSE-2.0 909 * 910 * Unless required by applicable law or agreed to in writing, software 911 * distributed under the License is distributed on an "AS IS" BASIS, 912 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 913 * See the License for the specific language governing permissions and 914 * limitations under the License. 915 */class $b{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/** 916 * @license 917 * Copyright 2019 Google LLC 918 * 919 * Licensed under the Apache License, Version 2.0 (the "License"); 920 * you may not use this file except in compliance with the License. 921 * You may obtain a copy of the License at 922 * 923 * http://www.apache.org/licenses/LICENSE-2.0 924 * 925 * Unless required by applicable law or agreed to in writing, software 926 * distributed under the License is distributed on an "AS IS" BASIS, 927 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 928 * See the License for the specific language governing permissions and 929 * limitations under the License. 930 */class C0 extends $b{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/** 931 * @license 932 * Copyright 2020 Google LLC 933 * 934 * Licensed under the Apache License, Version 2.0 (the "License"); 935 * you may not use this file except in compliance with the License. 936 * You may obtain a copy of the License at 937 * 938 * http://www.apache.org/licenses/LICENSE-2.0 939 * 940 * Unless required by applicable law or agreed to in writing, software 941 * distributed under the License is distributed on an "AS IS" BASIS, 942 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 943 * See the License for the specific language governing permissions and 944 * limitations under the License. 945 */class Mi extends C0{constructor(){super("facebook.com")}static credential(t){return Ll._fromParams({providerId:Mi.PROVIDER_ID,signInMethod:Mi.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Mi.credentialFromTaggedObject(t)}static credentialFromError(t){return Mi.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Mi.credential(t.oauthAccessToken)}catch{return null}}}Mi.FACEBOOK_SIGN_IN_METHOD="facebook.com";Mi.PROVIDER_ID="facebook.com";/** 946 * @license 947 * Copyright 2020 Google LLC 948 * 949 * Licensed under the Apache License, Version 2.0 (the "License"); 950 * you may not use this file except in compliance with the License. 951 * You may obtain a copy of the License at 952 * 953 * http://www.apache.org/licenses/LICENSE-2.0 954 * 955 * Unless required by applicable law or agreed to in writing, softw
955are 956 * distributed under the License is distributed on an "AS IS" BASIS, 957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 958 * See the License for the specific language governing permissions and 959 * limitations under the License. 960 */class Ga extends C0{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return Ll._fromParams({providerId:Ga.PROVIDER_ID,signInMethod:Ga.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return Ga.credentialFromTaggedObject(t)}static credentialFromError(t){return Ga.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:a}=t;if(!n&&!a)return null;try{return Ga.credential(n,a)}catch{return null}}}Ga.GOOGLE_SIGN_IN_METHOD="google.com";Ga.PROVIDER_ID="google.com";/** 961 * @license 962 * Copyright 2020 Google LLC 963 * 964 * Licensed under the Apache License, Version 2.0 (the "License"); 965 * you may not use this file except in compliance with the License. 966 * You may obtain a copy of the License at 967 * 968 * http://www.apache.org/licenses/LICENSE-2.0 969 * 970 * Unless required by applicable law or agreed to in writing, software 971 * distributed under the License is distributed on an "AS IS" BASIS, 972 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 973 * See the License for the specific language governing permissions and 974 * limitations under the License. 975 */class Ii extends C0{constructor(){super("github.com")}static credential(t){return Ll._fromParams({providerId:Ii.PROVIDER_ID,signInMethod:Ii.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Ii.credentialFromTaggedObject(t)}static credentialFromError(t){return Ii.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Ii.credential(t.oauthAccessToken)}catch{return null}}}Ii.GITHUB_SIGN_IN_METHOD="github.com";Ii.PROVIDER_ID="github.com";/** 976 * @license 977 * Copyright 2020 Google LLC 978 * 979 * Licensed under the Apache License, Version 2.0 (the "License"); 980 * you may not use this file except in compliance with the License. 981 * You may obtain a copy of the License at 982 * 983 * http://www.apache.org/licenses/LICENSE-2.0 984 * 985 * Unless required by applicable law or agreed to in writing, software 986 * distributed under the License is distributed on an "AS IS" BASIS, 987 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 988 * See the License for the specific language governing permissions and 989 * limitations under the License. 990 */class zi extends C0{constructor(){super("twitter.com")}static credential(t,n){return Ll._fromParams({providerId:zi.PROVIDER_ID,signInMethod:zi.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return zi.credentialFromTaggedObject(t)}static credentialFromError(t){return zi.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:a}=t;if(!n||!a)return null;try{return zi.credential(n,a)}catch{return null}}}zi.TWITTER_SIGN_IN_METHOD="twitter.com";zi.PROVIDER_ID="twitter.com";/** 991 * @license 992 * Copyright 2020 Google LLC 993 * 994 * Licensed under the Apache License, Version 2.0 (the "License"); 995 * you may not use this file except in compliance with the License. 996 * You may obtain a copy of the License at 997 * 998 * http://www.apache.org/licenses/LICENSE-2.0 999 * 1000 * Unless required by applicable law or agreed to in writing, software 1001 * distributed under the License is distributed on an "AS IS" BASIS, 1002 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1003 * See the License for the specific language governing permissions and 1004 * limitations under the License. 1005 */class ic{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,a,s=!1){const o=await _r._fromIdTokenResponse(t,a,s),c=P3(a);return new ic({user:o,providerId:c,_tokenResponse:a,operationType:n})}static async _forOperation(t,n,a){await t._updateTokensIfNecessary(a,!0);const s=P3(a);return new ic({user:t,providerId:s,_tokenResponse:a,operationType:n})}}function P3(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/** 1006 * @license 1007 * Copyright 2020 Google LLC 1008 * 1009 * Licensed under the Apache License, Version 2.0 (the "License");
1010 * you may not use this file except in compliance with the License. 1011 * You may obtain a copy of the License at 1012 * 1013 * http://www.apache.org/licenses/LICENSE-2.0 1014 * 1015 * Unless required by applicable law or agreed to in writing, software 1016 * distributed under the License is distributed on an "AS IS" BASIS, 1017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1018 * See the License for the specific language governing permissions and 1019 * limitations under the License. 1020 */class im extends Qi{constructor(t,n,a,s){super(n.code,n.message),this.operationType=a,this.user=s,Object.setPrototypeOf(this,im.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:a}}static _fromErrorAndOperation(t,n,a,s){return new im(t,n,a,s)}}function $9(e,t,n,a){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?im._fromErrorAndOperation(e,o,t,a):o})}async function y_(e,t,n=!1){const a=await a0(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return ic._forOperation(e,"link",a)}/** 1021 * @license 1022 * Copyright 2019 Google LLC 1023 * 1024 * Licensed under the Apache License, Version 2.0 (the "License"); 1025 * you may not use this file except in compliance with the License. 1026 * You may obtain a copy of the License at 1027 * 1028 * http://www.apache.org/licenses/LICENSE-2.0 1029 * 1030 * Unless required by applicable law or agreed to in writing, software 1031 * distributed under the License is distributed on an "AS IS" BASIS, 1032 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1033 * See the License for the specific language governing permissions and 1034 * limitations under the License. 1035 */async function v_(e,t,n=!1){const{auth:a}=e;if(Zr(a.app))return Promise.reject(Bl(a));const s="reauthenticate";try{const o=await a0(e,$9(a,s,t,e),n);Ke(o.idToken,a,"internal-error");const c=Vb(o.idToken);Ke(c,a,"internal-error");const{sub:d}=c;return Ke(e.uid===d,a,"user-mismatch"),ic._forOperation(e,s,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&is(a,"user-mismatch"),o}}/** 1036 * @license 1037 * Copyright 2020 Google LLC 1038 * 1039 * Licensed under the Apache License, Version 2.0 (the "License"); 1040 * you may not use this file except in compliance with the License. 1041 * You may obtain a copy of the License at 1042 * 1043 * http://www.apache.org/licenses/LICENSE-2.0 1044 * 1045 * Unless required by applicable law or agreed to in writing, software 1046 * distributed under the License is distributed on an "AS IS" BASIS, 1047 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1048 * See the License for the specific language governing permissions and 1049 * limitations under the License. 1050 */async function G9(e,t,n=!1){if(Zr(e.app))return Promise.reject(Bl(e));const a="signIn",s=await $9(e,a,t),o=await ic._fromIdTokenResponse(e,a,s);return n||await e._updateCurrentUser(o.user),o}async function w_(e,t){return G9(bc(e),t)}function S_(e,t,n,a){return Vl(e).onIdTokenChanged(t,n,a)}function N_(e,t,n){return Vl(e).beforeAuthStateChanged(t,n)}function U3(e){return Vl(e).signOut()}const lm="__sak";/** 1051 * @license 1052 * Copyright 2019 Google LLC 1053 * 1054 * Licensed under the Apache License, Version 2.0 (the "License"); 1055 * you may not use this file except in compliance with the License. 1056 * You may obtain a copy of the License at 1057 * 1058 * http://www.apache.org/licenses/LICENSE-2.0 1059 * 1060 * Unless required by applicable law or agreed to in writing, software 1061 * distributed under the License is distributed on an "AS IS" BASIS, 1062 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1063 * See the License for the specific language governing permissions and 1064 * limitations under the License. 1065 */class Y9{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(lm,"1"),this.storage.removeItem(lm),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1066 * @license 1067 * Copyright 2020 Google LLC 1068 * 1069 * Licensed under the Apache License, Version 2.0 (the "License");
1070 * you may not use this file except in compliance with the License. 1071 * You may obtain a copy of the License at 1072 * 1073 * http://www.apache.org/licenses/LICENSE-2.0 1074 * 1075 * Unless required by applicable law or agreed to in writing, software 1076 * distributed under the License is distributed on an "AS IS" BASIS, 1077 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1078 * See the License for the specific language governing permissions and 1079 * limitations under the License. 1080 */const j_=1e3,k_=10;class W9 extends Y9{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=F9(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const a=this.storage.getItem(n),s=this.localCache[n];a!==s&&t(n,s,a)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((c,d,h)=>{this.notifyListeners(c,h)});return}const a=t.key;n?this.detachListener():this.stopPolling();const s=()=>{const c=this.storage.getItem(a);!n&&this.localCache[a]===c||this.notifyListeners(a,c)},o=this.storage.getItem(a);r_()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(s,k_):s()}notifyListeners(t,n){this.localCache[t]=n;const a=this.listeners[t];if(a)for(const s of Array.from(a))s(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,a)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:a}),!0)})},j_)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}W9.type="LOCAL";const X9=W9;/** 1081 * @license 1082 * Copyright 2020 Google LLC 1083 * 1084 * Licensed under the Apache License, Version 2.0 (the "License"); 1085 * you may not use this file except in compliance with the License. 1086 * You may obtain a copy of the License at 1087 * 1088 * http://www.apache.org/licenses/LICENSE-2.0 1089 * 1090 * Unless required by applicable law or agreed to in writing, software 1091 * distributed under the License is distributed on an "AS IS" BASIS, 1092 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1093 * See the License for the specific language governing permissions and 1094 * limitations under the License. 1095 */class K9 extends Y9{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}K9.type="SESSION";const Q9=K9;/** 1096 * @license 1097 * Copyright 2019 Google LLC 1098 * 1099 * Licensed under the Apache License, Version 2.0 (the "License"); 1100 * you may not use this file except in compliance with the License. 1101 * You may obtain a copy of the License at 1102 * 1103 * http://www.apache.org/licenses/LICENSE-2.0 1104 * 1105 * Unless required by applicable law or agreed to in writing, software 1106 * distributed under the License is distributed on an "AS IS" BASIS, 1107 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1108 * See the License for the specific language governing permissions and 1109 * limitations under the License. 1110 */function C_(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}/** 1111 * @license 1112 * Copyright 2019 Google LLC 1113 * 1114 * Licensed under the Apache License, Version 2.0 (the "License");
1115 * you may not use this file except in compliance with the License. 1116 * You may obtain a copy of the License at 1117 * 1118 * http://www.apache.org/licenses/LICENSE-2.0 1119 * 1120 * Unless required by applicable law or agreed to in writing, software 1121 * distributed under the License is distributed on an "AS IS" BASIS, 1122 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1123 * See the License for the specific language governing permissions and 1124 * limitations under the License. 1125 */class qm{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(s=>s.isListeningto(t));if(n)return n;const a=new qm(t);return this.receivers.push(a),a}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:a,eventType:s,data:o}=n.data,c=this.handlersMap[s];if(!(c!=null&&c.size))return;n.ports[0].postMessage({status:"ack",eventId:a,eventType:s});const d=Array.from(c).map(async f=>f(n.origin,o)),h=await C_(d);n.ports[0].postMessage({status:"done",eventId:a,eventType:s,response:h})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}qm.receivers=[];/** 1126 * @license 1127 * Copyright 2020 Google LLC 1128 * 1129 * Licensed under the Apache License, Version 2.0 (the "License"); 1130 * you may not use this file except in compliance with the License. 1131 * You may obtain a copy of the License at 1132 * 1133 * http://www.apache.org/licenses/LICENSE-2.0 1134 * 1135 * Unless required by applicable law or agreed to in writing, software 1136 * distributed under the License is distributed on an "AS IS" BASIS, 1137 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1138 * See the License for the specific language governing permissions and 1139 * limitations under the License. 1140 */function Gb(e="",t=10){let n="";for(let a=0;a<t;a++)n+=Math.floor(Math.random()*10);return e+n}/** 1141 * @license 1142 * Copyright 2019 Google LLC 1143 * 1144 * Licensed under the Apache License, Version 2.0 (the "License"); 1145 * you may not use this file except in compliance with the License. 1146 * You may obtain a copy of the License at 1147 * 1148 * http://www.apache.org/licenses/LICENSE-2.0 1149 * 1150 * Unless required by applicable law or agreed to in writing, software 1151 * distributed under the License is distributed on an "AS IS" BASIS, 1152 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1153 * See the License for the specific language governing permissions and 1154 * limitations under the License. 1155 */class A_{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,n,a=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let o,c;return new Promise((d,h)=>{const f=Gb("",20);s.port1.start();const p=setTimeout(()=>{h(new Error("unsupported_event"))},a);c={messageChannel:s,onMessage(x){const b=x;if(b.data.eventId===f)switch(b.data.status){case"ack":clearTimeout(p),o=setTimeout(()=>{h(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),d(b.data.response);break;default:clearTimeout(p),clearTimeout(o),h(new Error("invalid_response"));break}}},this.handlers.add(c),s.port1.addEventListener("message",c.onMessage),this.target.postMessage({eventType:t,eventId:f,data:n},[s.port2])}).finally(()=>{c&&this.removeMessageHandler(c)})}}/** 1156 * @license 1157 * Copyright 2020 Google LLC 1158 * 1159 * Licensed under the Apache License, Version 2.0 (the "License"); 1160 * you may not use this file except in compliance with the License. 1161 * You may obtain a copy of the License at 1162 * 1163 * http://www.apache.org/licenses/LICENSE-2.0 1164 * 1165 * Unless required by applicable law or agreed to in writing, softw
1165are 1166 * distributed under the License is distributed on an "AS IS" BASIS, 1167 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1168 * See the License for the specific language governing permissions and 1169 * limitations under the License. 1170 */function rs(){return window}function E_(e){rs().location.href=e}/** 1171 * @license 1172 * Copyright 2020 Google LLC. 1173 * 1174 * Licensed under the Apache License, Version 2.0 (the "License"); 1175 * you may not use this file except in compliance with the License. 1176 * You may obtain a copy of the License at 1177 * 1178 * http://www.apache.org/licenses/LICENSE-2.0 1179 * 1180 * Unless required by applicable law or agreed to in writing, software 1181 * distributed under the License is distributed on an "AS IS" BASIS, 1182 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1183 * See the License for the specific language governing permissions and 1184 * limitations under the License. 1185 */function J9(){return typeof rs().WorkerGlobalScope<"u"&&typeof rs().importScripts=="function"}async function T_(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function M_(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)==null?void 0:e.controller)||null}function I_(){return J9()?self:null}/** 1186 * @license 1187 * Copyright 2019 Google LLC 1188 * 1189 * Licensed under the Apache License, Version 2.0 (the "License"); 1190 * you may not use this file except in compliance with the License. 1191 * You may obtain a copy of the License at 1192 * 1193 * http://www.apache.org/licenses/LICENSE-2.0 1194 * 1195 * Unless required by applicable law or agreed to in writing, software 1196 * distributed under the License is distributed on an "AS IS" BASIS, 1197 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1198 * See the License for the specific language governing permissions and 1199 * limitations under the License. 1200 */const Z9="firebaseLocalStorageDb",z_=1,om="firebaseLocalStorage",eS="fbase_key";class A0{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function Hm(e,t){return e.transaction([om],t?"readwrite":"readonly").objectStore(om)}function __(){const e=indexedDB.deleteDatabase(Z9);
1200return new A0(e).toPromise()}function tS(){const e=indexedDB.open(Z9,z_);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const a=e.result;try{a.createObjectStore(om,{keyPath:eS})}catch(s){n(s)}}),e.addEventListener("success",async()=>{const a=e.result;a.objectStoreNames.contains(om)?t(a):(a.close(),await __(),t(await tS()))})})}async function F3(e,t,n){const a=Hm(e,!0).put({[eS]:t,value:n});return new A0(a).toPromise()}async function D_(e,t){const n=Hm(e,!1).get(t),a=await new A0(n).toPromise();return a===void 0?null:a.value}function V3(e,t){const n=Hm(e,!0).delete(t);return new A0(n).toPromise()}const B_=800,R_=3;class nS{registerLifecycleListeners(){typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("pagehide",this.onPageHide),window.addEventListener("pageshow",this.onPageShow))}unregisterLifecycleListeners(){typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("pagehide",this.onPageHide),window.removeEventListener("pageshow",this.onPageShow))}constructor(){this.type="LOCAL",this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.isClosing=!1,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this.onPageHide=()=>{this.isClosing=!0,this.stopPolling(),this.dbPromise&&(this.dbPromise.then(t=>t.close()).catch(()=>{}),this.dbPromise=null)},this.onPageShow=()=>{this.isClosing&&(this.isClosing=!1,Object.keys(this.listeners).length>0&&this.startPolling())},this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){if(this.isClosing)throw new Error("Database is closing");return this.dbPromise?this.dbPromise:(this.dbPromise=tS(),this.dbPromise.catch(()=>{this.dbPromise=null}),this.dbPromise)}async _withRetries(t){let n=0;for(;;)try{const a=await this._openDb();return await t(a)}catch(a){if(this.isClosing||n++>R_)throw a;this.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return J9()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=qm._getInstance(I_()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
1200)),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){var n,a;if(this.activeServiceWorker=await T_(),!this.activeServiceWorker)return;this.sender=new A_(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&(n=t[0])!=null&&n.fulfilled&&(a=t[0])!=null&&a.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||M_()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{return indexedDB?(await this._withRetries(async t=>{await F3(t,lm,"1"),await V3(t,lm)}),!0):!1}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(a=>F3(a,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(a=>D_(a,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>V3(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){if(this.isClosing)return[];try{const t=await this._withRetries(s=>{const o=Hm(s,!1).getAll();return new A0(o).toPromise()});if(this.isClosing)return[];if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],a=new Set;if(t.length!==0)for(const{fbase_key:s,value:o}of t)a.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),n.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!a.has(s)&&(this.notifyListeners(s,null),n.push(s));return n}catch(t){return this.isClosing||E9(`Firebase Auth cross-tab polling failed with error: ${t}`),[]}}notifyListeners(t,n){this.localCache[t]=n;const a=this.listeners[t];if(a)for(const s of Array.from(a))s(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),B_)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.startPolling(),this.registerLifecycleListeners()),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.stopPolling(),this.unregisterLifecycleListeners())}}nS.type="LOCAL";const aS=nS;new k0(3e4,6e4);/** 1201 * @license 1202 * Copyright 2021 Google LLC 1203 * 1204 * Licensed under the Apache License, Version 2.0 (the "License"); 1205 * you may not use this file except in compliance with the License. 1206 * You may obtain a copy of the License at 1207 * 1208 * http://www.apache.org/licenses/LICENSE-2.0 1209 * 1210 * Unless required by applicable law or agreed to in writing, software 1211 * distributed under the License is distributed on an "AS IS" BASIS, 1212 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1213 * See the License for the specific language governing permissions and 1214 * limitations under the License. 1215 */function rS(e,t){return t?Us(t):(Ke(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/** 1216 * @license 1217 * Copyright 2019 Google LLC 1218 * 1219 * Licensed under the Apache License, Version 2.0 (the "License"); 1220 * you may not use this file except in compliance with the License. 1221 * You may obtain a copy of the License at 1222 * 1223 * http://www.apache.org/licenses/LICENSE-2.0 1224 * 1225 * Unless required by applicable law or agreed to in writing, software 1226 * distributed under the License is distributed on an "AS IS" BASIS, 1227 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1228 * See the License for the specific language governing permissions and 1229 * limitations under the License. 1230 */class Yb extends H9{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Qo(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Qo(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Qo(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function O_(e){return G9(e.auth,new Yb(e),e.bypassAuthState)}function L_(e){const{auth:t,user:n}=e;return Ke(n,t,"internal-error"),v_(n,new Yb(e),e.bypassAuthState)}async function P_(e){const{auth:t,user:n}=e;return Ke(n,t,"internal-error"),y_(n,new Yb(e),e.bypassAuthState)}/** 1231 * @license 1232 * Copyright 2020 Google LLC 1233 * 1234 * Licensed under the Apache License, Version 2.0 (the "License");
1235 * you may not use this file except in compliance with the License. 1236 * You may obtain a copy of the License at 1237 * 1238 * http://www.apache.org/licenses/LICENSE-2.0 1239 * 1240 * Unless required by applicable law or agreed to in writing, software 1241 * distributed under the License is distributed on an "AS IS" BASIS, 1242 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1243 * See the License for the specific language governing permissions and 1244 * limitations under the License. 1245 */class sS{constructor(t,n,a,s,o=!1){this.auth=t,this.resolver=a,this.user=s,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(a){this.reject(a)}})}async onAuthEvent(t){const{urlResponse:n,sessionId:a,postBody:s,tenantId:o,error:c,type:d}=t;if(c){this.reject(c);return}const h={auth:this.auth,requestUri:n,sessionId:a,tenantId:o||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(d)(h))}catch(f){this.reject(f)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return O_;case"linkViaPopup":case"linkViaRedirect":return P_;case"reauthViaPopup":case"reauthViaRedirect":return L_;default:is(this.auth,"internal-error")}}resolve(t){Hs(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Hs(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 1246 * @license 1247 * Copyright 2020 Google LLC 1248 * 1249 * Licensed under the Apache License, Version 2.0 (the "License"); 1250 * you may not use this file except in compliance with the License. 1251 * You may obtain a copy of the License at 1252 * 1253 * http://www.apache.org/licenses/LICENSE-2.0 1254 * 1255 * Unless required by applicable law or agreed to in writing, software 1256 * distributed under the License is distributed on an "AS IS" BASIS, 1257 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1258 * See the License for the specific language governing permissions and 1259 * limitations under the License. 1260 */const U_=new k0(2e3,1e4);async function rg(e,t,n){if(Zr(e.app))return Promise.reject(Br(e,"operation-not-supported-in-this-environment"));const a=bc(e);Uz(e,t,$b);const s=rS(a,n);return new zl(a,"signInViaPopup",t,s).executeNotNull()}class zl extends sS{constructor(t,n,a,s,o){super(t,n,s,o),this.provider=a,this.authWindow=null,this.pollId=null,zl.currentPopupAction&&zl.currentPopupAction.cancel(),zl.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return Ke(t,this.auth,"internal-error"),t}async onExecution(){Hs(this.filter.length===1,"Popup operations only handle one event");const t=Gb();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Br(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)==null?void 0:t.associatedEvent)||null}cancel(){this.reject(Br(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,zl.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,a;if((a=(n=this.authWindow)==null?void 0:n.window)!=null&&a.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Br(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,U_.get())};t()}}zl.currentPopupAction=null;/** 1261 * @license 1262 * Copyright 2020 Google LLC 1263 * 1264 * Licensed under the Apache License, Version 2.0 (the "License");
1265 * you may not use this file except in compliance with the License. 1266 * You may obtain a copy of the License at 1267 * 1268 * http://www.apache.org/licenses/LICENSE-2.0 1269 * 1270 * Unless required by applicable law or agreed to in writing, software 1271 * distributed under the License is distributed on an "AS IS" BASIS, 1272 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1273 * See the License for the specific language governing permissions and 1274 * limitations under the License. 1275 */const F_="pendingRedirect",Ph=new Map;class V_ extends sS{constructor(t,n,a=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,a),this.eventId=null}async execute(){let t=Ph.get(this.auth._key());if(!t){try{const a=await q_(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(a)}catch(n){t=()=>Promise.reject(n)}Ph.set(this.auth._key(),t)}return this.bypassAuthState||Ph.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function q_(e,t){const n=G_(t),a=$_(e);if(!await a._isAvailable())return!1;const s=await a._get(n)==="true";return await a._remove(n),s}function H_(e,t){Ph.set(e._key(),t)}function $_(e){return Us(e._redirectPersistence)}function G_(e){return Lh(F_,e.config.apiKey,e.name)}async function iS(e,t){return await bc(e)._initializationPromise,lS(e,t,!1)}async function lS(e,t,n=!1){if(Zr(e.app))return Promise.reject(Bl(e));const a=bc(e),s=rS(a,t),c=await new V_(a,s,n).execute();return c&&!n&&(delete c.user._redirectEventId,await a._persistUserIfCurrent(c.user),await a._setRedirectUser(null,t)),c}/** 1276 * @license 1277 * Copyright 2020 Google LLC 1278 * 1279 * Licensed under the Apache License, Version 2.0 (the "License"); 1280 * you may not use this file except in compliance with the License. 1281 * You may obtain a copy of the License at 1282 * 1283 * http://www.apache.org/licenses/LICENSE-2.0 1284 * 1285 * Unless required by applicable law or agreed to in writing, software 1286 * distributed under the License is distributed on an "AS IS" BASIS, 1287 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1288 * See the License for the specific language governing permissions and 1289 * limitations under the License. 1290 */const Y_=600*1e3;class W_{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(a=>{this.isEventForConsumer(t,a)&&(n=!0,this.sendToConsumer(t,a),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!X_(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){var a;if(t.error&&!oS(t)){const s=((a=t.error.code)==null?void 0:a.split("auth/")[1])||"internal-error";n.onError(Br(this.auth,s))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const a=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&a}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=Y_&&this.cachedEventUids.clear(),this.cachedEventUids.has(q3(t))}saveEventToCache(t){this.cachedEventUids.add(q3(t)),this.lastProcessedEventTime=Date.now()}}function q3(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function oS({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function X_(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return oS(e);default:return!1}}/** 1291 * @license 1292 * Copyright 2020 Google LLC 1293 * 1294 * Licensed under the Apache License, Version 2.0 (the "License");
1295 * you may not use this file except in compliance with the License. 1296 * You may obtain a copy of the License at 1297 * 1298 * http://www.apache.org/licenses/LICENSE-2.0 1299 * 1300 * Unless required by applicable law or agreed to in writing, software 1301 * distributed under the License is distributed on an "AS IS" BASIS, 1302 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1303 * See the License for the specific language governing permissions and 1304 * limitations under the License. 1305 */async function K_(e,t={}){return gc(e,"GET","/v1/projects",t)}/** 1306 * @license 1307 * Copyright 2020 Google LLC 1308 * 1309 * Licensed under the Apache License, Version 2.0 (the "License"); 1310 * you may not use this file except in compliance with the License. 1311 * You may obtain a copy of the License at 1312 * 1313 * http://www.apache.org/licenses/LICENSE-2.0 1314 * 1315 * Unless required by applicable law or agreed to in writing, software 1316 * distributed under the License is distributed on an "AS IS" BASIS, 1317 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1318 * See the License for the specific language governing permissions and 1319 * limitations under the License. 1320 */const Q_=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,J_=/^https?/;async function Z_(e){if(e.config.emulator)return;const{authorizedDomains:t}=await K_(e);for(const n of t)try{if(eD(n))return}catch{}is(e,"unauthorized-domain")}function eD(e){const t=tg(),{protocol:n,hostname:a}=new URL(t);if(e.startsWith("chrome-extension://")){const c=new URL(e);return c.hostname===""&&a===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&c.hostname===a}if(!J_.test(n))return!1;if(Q_.test(e))return a===e;const s=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(a)}/** 1321 * @license 1322 * Copyright 2020 Google LLC. 1323 * 1324 * Licensed under the Apache License, Version 2.0 (the "License"); 1325 * you may not use this file except in compliance with the License. 1326 * You may obtain a copy of the License at 1327 * 1328 * http://www.apache.org/licenses/LICENSE-2.0 1329 * 1330 * Unless required by applicable law or agreed to in writing, software 1331 * distributed under the License is distributed on an "AS IS" BASIS, 1332 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1333 * See the License for the specific language governing permissions and 1334 * limitations under the License. 1335 */const tD=new k0(3e4,6e4);function H3(){const e=rs().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function nD(e){return new Promise((t,n)=>{var s,o,c;function a(){H3(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{H3(),n(Br(e,"network-request-failed"))},timeout:tD.get()})}if((o=(s=rs().gapi)==null?void 0:s.iframes)!=null&&o.Iframe)t(gapi.iframes.getContext());else if((c=rs().gapi)!=null&&c.load)a();else{const d=m_("iframefcb");return rs()[d]=()=>{gapi.load?a():n(Br(e,"network-request-failed"))},d_(`${h_()}?onload=${d}`).catch(h=>n(h))}}).catch(t=>{throw Uh=null,t})}let Uh=null;function aD(e){return Uh=Uh||nD(e),Uh}/** 1336 * @license 1337 * Copyright 2020 Google LLC. 1338 * 1339 * Licensed under the Apache License, Version 2.0 (the "License"); 1340 * you may not use this file except in compliance with the License. 1341 * You may obtain a copy of the License at 1342 * 1343 * http://www.apache.org/licenses/LICENSE-2.0 1344 * 1345 * Unless required by applicable law or agreed to in writing, software 1346 * distributed under the License is distributed on an "AS IS" BASIS, 1347 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1348 * See the License for the specific language governing permissions and 1349 * limitations under the License. 1350 */const rD=new k0(5e3,15e3),sD="__/auth/iframe",iD="emulator/auth/iframe",lD={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},oD=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function cD(e){const t=e.config;Ke(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Ub(t,iD):`https://${e.config.authDomain}/${sD}
1350`,a={apiKey:t.apiKey,appName:e.name,v:j0},s=oD.get(e.config.apiHost);s&&(a.eid=s);const o=e._getFrameworks();return o.length&&(a.fw=o.join(",")),`${n}?${N0(a).slice(1)}`}async function uD(e){const t=await aD(e),n=rs().gapi;return Ke(n,e,"internal-error"),t.open({where:document.body,url:cD(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:lD,dontclear:!0},a=>new Promise(async(s,o)=>{await a.restyle({setHideOnLeave:!1});const c=Br(e,"network-request-failed"),d=rs().setTimeout(()=>{o(c)},rD.get());function h(){rs().clearTimeout(d),s(a)}a.ping(h).then(h,()=>{o(c)})}))}/** 1351 * @license 1352 * Copyright 2020 Google LLC. 1353 * 1354 * Licensed under the Apache License, Version 2.0 (the "License"); 1355 * you may not use this file except in compliance with the License. 1356 * You may obtain a copy of the License at 1357 * 1358 * http://www.apache.org/licenses/LICENSE-2.0 1359 * 1360 * Unless required by applicable law or agreed to in writing, software 1361 * distributed under the License is distributed on an "AS IS" BASIS, 1362 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1363 * See the License for the specific language governing permissions and 1364 * limitations under the License. 1365 */const dD={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},hD=500,mD=600,fD="_blank",pD="http://localhost";class $3{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function xD(e,t,n,a=hD,s=mD){const o=Math.max((window.screen.availHeight-s)/2,0).toString(),c=Math.max((window.screen.availWidth-a)/2,0).toString();let d="";const h={...dD,width:a.toString(),height:s.toString(),top:o,left:c},f=ba().toLowerCase();n&&(d=R9(f)?fD:n),D9(f)&&(t=t||pD,h.scrollbars="yes");const p=Object.entries(h).reduce((b,[v,N])=>`${b}${v}=${N},`,"");if(a_(f)&&d!=="_self")return gD(t||"",d),new $3(null);const x=window.open(t||"",d,p);Ke(x,e,"popup-blocked");try{x.focus()}catch{}return new $3(x)}function gD(e,t){const n=document.createElement("a");n.href=e,n.target=t;const a=document.createEvent("MouseEvent");a.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(a)}/** 1366 * @license 1367 * Copyright 2021 Google LLC 1368 * 1369 * Licensed under the Apache License, Version 2.0 (the "License"); 1370 * you may not use this file except in compliance with the License. 1371 * You may obtain a copy of the License at 1372 * 1373 * http://www.apache.org/licenses/LICENSE-2.0 1374 * 1375 * Unless required by applicable law or agreed to in writing, software 1376 * distributed under the License is distributed on an "AS IS" BASIS, 1377 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1378 * See the License for the specific language governing permissions and 1379 * limitations under the License. 1380 */const bD="__/auth/handler",yD="emulator/auth/handler",vD=encodeURIComponent("fac");async function G3(e,t,n,a,s,o){Ke(e.config.authDomain,e,"auth-domain-config-required"),Ke(e.config.apiKey,e,"invalid-api-key");const c={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:a,v:j0,eventId:s};if(t instanceof $b){t.setDefaultLanguage(e.languageCode),c.providerId=t.providerId||"",kI(t.getCustomParameters())||(c.customParameters=JSON.stringify(t.getCustomParameters()));for(const[p,x]of Object.entries({}))c[p]=x}if(t instanceof C0){const p=t.getScopes().filter(x=>x!=="");p.length>0&&(c.scopes=p.join(","))}e.tenantId&&(c.tid=e.tenantId);const d=c;for(const p of Object.keys(d))d[p]===void 0&&delete d[p];const h=await e._getAppCheckToken(),f=h?`#${vD}=${encodeURIComponent(h)}`:"";return`${wD(e)}?${N0(d).slice(1)}${f}`}function wD({config:e}){return e.emulator?Ub(e,yD):`https://${e.authDomain}/${bD}`}/** 1381 * @license 1382 * Copyright 2020 Google LLC 1383 * 1384 * Licensed under the Apache License, Version 2.0 (the "License"); 1385 * you may not use this file except in compliance with the License. 1386 * You may obtain a copy of the License at 1387 * 1388 * http://www.apache.org/licenses/LICENSE-2.0 1389 * 1390 * Unless required by applicable law or agreed to in writing, software 1391 * distributed under the License is distributed on an "AS IS" BASIS, 1392 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1393 * See the License for the specific language governing permissions and 1394 * limitations under the License. 1395 */const Hx="webStorageSupport";class SD{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Q9,this._completeRedirectFn=lS,this._overrideRedirectResult=H_}async _openPopup(t,n,a,s){var c;Hs((c=this.eventManagers[t._key()])==null?void 0:c.manager,"_initialize() not called before _openPopup()");const o=await G3(t,n,a,tg(),s);return xD(t,o,Gb())}async _openRedirect(t,n,a,s){await this._originValidation(t);const o=await G3(t,n,a,tg(),s);return E_(o),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:s,promise:o}=this.eventManagers[n];return s?Promise.resolve(s):(Hs(o,"If manager is not set, promise should be"),o)}const a=this.initAndGetManager(t);return this.eventManagers[n]={promise:a},a.catch(()=>{delete this.eventManagers[n]}),a}async initAndGetManager(t){const n=await uD(t),a=new W_(t);return n.register("authEvent",s=>
1395(Ke(s==null?void 0:s.authEvent,t,"invalid-auth-event"),{status:a.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:a},this.iframes[t._key()]=n,a}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Hx,{type:Hx},s=>{var c;const o=(c=s==null?void 0:s[0])==null?void 0:c[Hx];o!==void 0&&n(!!o),is(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Z_(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return F9()||B9()||qb()}}const sg=SD;var Y3="@firebase/auth",W3="1.13.5";/** 1396 * @license 1397 * Copyright 2020 Google LLC 1398 * 1399 * Licensed under the Apache License, Version 2.0 (the "License"); 1400 * you may not use this file except in compliance with the License. 1401 * You may obtain a copy of the License at 1402 * 1403 * http://www.apache.org/licenses/LICENSE-2.0 1404 * 1405 * Unless required by applicable law or agreed to in writing, software 1406 * distributed under the License is distributed on an "AS IS" BASIS, 1407 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1408 * See the License for the specific language governing permissions and 1409 * limitations under the License. 1410 */class ND{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)==null?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(a=>{t((a==null?void 0:a.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){Ke(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1411 * @license 1412 * Copyright 2020 Google LLC 1413 * 1414 * Licensed under the Apache License, Version 2.0 (the "License"); 1415 * you may not use this file except in compliance with the License. 1416 * You may obtain a copy of the License at 1417 * 1418 * http://www.apache.org/licenses/LICENSE-2.0 1419 * 1420 * Unless required by applicable law or agreed to in writing, software 1421 * distributed under the License is distributed on an "AS IS" BASIS, 1422 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1423 * See the License for the specific language governing permissions and 1424 * limitations under the License. 1425 */function jD(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function kD(e){t0(new sc("auth",(t,{options:n})=>{const a=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:c,authDomain:d}=a.options;Ke(c&&!c.includes(":"),"invalid-api-key",{appName:a.name});const h={apiKey:c,authDomain:d,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:V9(e)},f=new c_(a,s,o,h);return f_(f,n),f},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,a)=>{t.getProvider("auth-internal").initialize()})),t0(new sc("auth-internal",t=>{const n=bc(t.getProvider("auth").getImmediate());return(a=>new ND(a))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),Wo(Y3,W3,jD(e)),Wo(Y3,W3,"esm2020")}/** 1426 * @license 1427 * Copyright 2021 Google LLC 1428 * 1429 * Licensed under the Apache License, Version 2.0 (the "License"); 1430 * you may not use this file except in compliance with the License. 1431 * You may obtain a copy of the License at 1432 * 1433 * http://www.apache.org/licenses/LICENSE-2.0 1434 * 1435 * Unless required by applicable law or agreed to in writing, softw
1435are 1436 * distributed under the License is distributed on an "AS IS" BASIS, 1437 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1438 * See the License for the specific language governing permissions and 1439 * limitations under the License. 1440 */const CD=300,AD=b9("authIdTokenMaxAge")||CD;let X3=null;const ED=e=>async t=>{const n=t&&await t.getIdTokenResult(),a=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(a&&a>AD)return;const s=n==null?void 0:n.token;X3!==s&&(X3=s,await fetch(e,{method:s?"POST":"DELETE",headers:s?{Authorization:`Bearer ${s}`}:{}}))};function $x(e=Ez()){const t=S9(e,"auth");if(t.isInitialized())return t.getImmediate();const n=ag(e,{popupRedirectResolver:sg,persistence:[aS,X9,Q9]}),a=b9("authTokenSyncURL");if(a&&typeof isSecureContext=="boolean"&&isSecureContext){const o=new URL(a,location.origin);if(location.origin===o.origin){const c=ED(o.toString());N_(n,c,()=>c(n.currentUser)),S_(n,d=>c(d))}}const s=fI("auth");return s&&p_(n,`http://${s}`),n}function TD(){var e;return((e=document.getElementsByTagName("head"))==null?void 0:e[0])??document}u_({loadJS(e){return new Promise((t,n)=>{const a=document.createElement("script");a.setAttribute("src",e),a.onload=t,a.onerror=s=>{const o=Br("internal-error");o.customData=s,n(o)},a.type="text/javascript",a.charset="UTF-8",TD().appendChild(a)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});kD("Browser");
1440class cS extends Error{constructor(t,n){super(t),this.name="ApiError",this.status=n}}const ig="socratech_ws_token";function _i(e){if(!e){localStorage.removeItem(ig);return}localStorage.setItem(ig,e)}function E0(){return localStorage.getItem(ig)}async function T0(e,t={}){const n=new Headers(t.headers);t.body&&!(t.body instanceof FormData)&&!n.has("Content-Type")&&n.set("Content-Type","application/json");const a=E0();a&&!n.has("Authorization")&&n.set("Authorization",`Bearer ${a}`);const s=await fetch(e,{...t,headers:n,credentials:"include"});if(!s.ok){const o=await s.json().catch(()=>({}));throw new cS(o.error||`Request failed (${s.status})`,s.status)}if(s.status!==204)return await s.json()}async function Un(e){return T0(e)}async function kn(e,t){return T0(e,{method:"POST",body:t===void 0?void 0:JSON.stringify(t)})}async function MD(e,t){return T0(e,{method:"PUT",body:t===void 0?void 0:JSON.stringify(t)})}async function Wb(e,t){return T0(e,{method:"PATCH",body:t===void 0?void 0:JSON.stringify(t)})}async function M0(e){return T0(e,{method:"DELETE"})}function I0(e){const t=new Headers(e),n=E0();return n&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${n}`),t}function Pn(){if(typeof window>"u")return!1;const e=window.location.protocol;if(e==="file:"||e==="cdvfile:")return!0;const t=window;return typeof t.cordova<"u"||t.IsCordova===!0}function uS(){return typeof navigator>"u"?!1:/SocratechAI\//i.test(navigator.userAgent||"")}function ID(){return typeof window>"u"?!1:window.location.hostname==="androidapp.socratech.ai"}function $m(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"";return/Android/i.test(e)&&/; wv\)/.test(e)}function dS(){return ID()||$m()||uS()}function Fu(){return typeof window>"u"?!1:Pn()||$m()}function zD(){return`${window.location.origin}/auth/google`}async function hS(e=2e3){if(Pn())return!0;const t=Date.now()+Math.max(0,e);for(;Date.now()<t;)if(await new Promise(n=>window.setTimeout(n,100)),Pn())return!0;return Pn()}function _D(){var t,n;if(!Pn())return Promise.resolve();const e=window;return!e.cordova||(n=(t=e.cordova)==null?void 0:t.plugins)!=null&&n.browsertab?Promise.resolve():new Promise(a=>{const s=()=>a();document.addEventListener("deviceready",s,{once:!0}),window.setTimeout(s,8e3)})}const DD="https://androidapp.socratech.ai";function BD(e){var a,s;const t=JSON.stringify(e),n=window;try{if((s=(a=n.webkit)==null?void 0:a.messageHandlers)!=null&&s.cordova_iab)return n.webkit.messageHandlers.cordova_iab.postMessage(t),!0;if(typeof n.cordova_iab<"u")return n.cordova_iab.postMessage(t),!0}catch{return!1}return!1}function RD(){return`${typeof window<"u"&&window.location.hostname==="androidapp.socratech.ai"?window.location.origin:DD}/sign-in?appLogin=true`}function Vu(){var n,a;const e=RD(),t="intent://sign-in?appLogin=true#Intent;scheme=https;authority=androidapp.socratech.ai;package=com.android.chrome;S.browser_fallback_url="+encodeURIComponent(e)+";end";try{const s=(a=(n=window.cordova)==null?void 0:n.plugins)==null?void 0:a.AdvancedWebView;if(s&&typeof s.openSystem=="function")return s.openSystem(e),!0}catch{}if(BD({action:"openSystem",url:e}))return!0;try{return window.location.href=t,!0}catch{try{return window.open(e,"_system"),!0}catch{return!1}}}function OD(e){const t=encodeURIComponent(e);return{intentUrl:`intent://login?token=${t}#Intent;scheme=socratechai;package=com.geektheory.socratechai;end`,schemeUrl:`socratechai://login?token=${t}`}}function K3(e){const{intentUrl:t,schemeUrl:n}=OD(e);try{window.location.href=t}catch{}window.setTimeout(()=>{try{window.location.href=n}catch{}},900)}function LD(e){const t=String(e||"");if(!/socratechai:\/\/login/i.test(t)&&!/scheme=socratechai/i.test(t))return"";const n=t.split("?")[1]||"";return(new URLSearchParams(n.split("#")[0]).get("token")||"").trim()}async function PD(e){return Pn()?(await _D(),iS(e)):null}function Gx(e){const t=e&&typeof e=="object"&&"code"in e?String(e.code):"";return t==="auth/invalid-cordova-configuration"?"App OAuth plugins are missing. Install cordova-plugin-browsertab, cordova-plugin-inappbrowser, cordova-plugin-buildinfo, and cordova-universal-links-plugin-fix â see cordova/README.md.":t==="auth/redirect-cancelled-by-user"?"Google sign-in was cancelled. Tap Continue with Google to try again.":t==="auth/unauthorized-domain"?"This app package is not authorized in Firebase. Add your Android package name and SHA
1440-1 in Firebase Console.":t==="auth/invalid-credential"||t==="auth/invalid-id-token"?"Google ID token was rejected. Use the Web client ID from this Firebase project (Authentication â Google â Web SDK configuration).":e instanceof Error?e.message:"Login failed. Please try again."}const mS=0,Pl=1,UD=0,fS=1;function z0(e){return e?e.onboardingStatus===mS:!1}function Xb(e){return e?e.onboardingStatus===Pl&&e.welcomeSeen===UD:!1}function pS(e){return e?e.onboardingStatus===Pl&&e.welcomeSeen===fS:!1}function Q3(){return!1}new Date().toISOString();var FD="firebase",VD="12.18.0";/** 1441 * @license 1442 * Copyright 2020 Google LLC 1443 * 1444 * Licensed under the Apache License, Version 2.0 (the "License"); 1445 * you may not use this file except in compliance with the License. 1446 * You may obtain a copy of the License at 1447 * 1448 * http://www.apache.org/licenses/LICENSE-2.0 1449 * 1450 * Unless required by applicable law or agreed to in writing, software 1451 * distributed under the License is distributed on an "AS IS" BASIS, 1452 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1453 * See the License for the specific language governing permissions and 1454 * limitations under the License. 1455 */Wo(FD,VD,"app");const qD="gen-lang-client-0445442071",HD="1:675462205997:web:f1a47184508fc673685ea4",$D="AIzaSyAD6zuAmAOv23lMR90gCb2nRQMofPLCMfs",GD="gen-lang-client-0445442071.firebaseapp.com",YD="gen-lang-client-0445442071.firebasestorage.app",WD="675462205997",zo={projectId:qD,appId:HD,apiKey:$D,authDomain:GD,storageBucket:YD,messagingSenderId:WD},Cu=N9({apiKey:zo.apiKey,authDomain:zo.authDomain,projectId:zo.projectId,storageBucket:zo.storageBucket,messagingSenderId:zo.messagingSenderId,appId:zo.appId});function XD(){if(Pn())try{return ag(Cu,{persistence:aS,popupRedirectResolver:sg})}catch{return $x(Cu)}if(dS())try{return ag(Cu,{persistence:X9,popupRedirectResolver:sg})}catch{return $x(Cu)}return $x(Cu)}const Yr=XD();async function KD(){var e;try{const t=await Un("/api/auth/me");return!t.authenticated||!((e=t.user)!=null&&e.uid)?null:{uid:t.user.uid,displayName:String(t.user.displayName??""),email:String(t.user.email??""),selectedExams:Array.isArray(t.user.selectedExams)?t.user.selectedExams.map(String):[]}}catch{return null}}function QD(){const e={"Content-Type":"application/json"},t=E0();return t&&(e.Authorization=`Bearer ${t}`),e}async function JD(e){let t=e;if(!t){const a=await KD();if(!a)return;t={userId:a.uid,displayName:a.displayName,selectedExams:a.selectedExams}}const n=await fetch("/api/notifications/lifecycle/onboarding-complete",{method:"POST",credentials:"include",headers:QD(),body:JSON.stringify(t)});if(!n.ok){const a=await n.json().catch(()=>({}));throw new Error(a.error??"Failed to send onboarding notification")}}const xS=w.createContext(null),lg="socratech_session";function Si(e){if(!e){localStorage.removeItem(lg);return}localStorage.setItem(lg,JSON.stringify(e))}function ZD(){try{const e=localStorage.getItem(lg);return e?JSON.parse(e):null}catch{return null}}function dh(e){return{uid:String(e.uid??""),email:String(e.email??""),displayName:String(e.displayName??""),photoURL:String(e.photoURL??""),selectedExams:Array.isArray(e.selectedExams)?e.selectedExams.map(String):[],ongoingLearningPath:String(e.ongoingLearningPath??""),isRegisteredInDb:!0,accountStatus:e.accountStatus||"active",onboardingStatus:Number(e.onboardingStatus??0),welcomeSeen:Number(e.welcomeSeen??0),onboardingCompleted:Number(e.onboardingStatus??0)===Pl,onboardingAnswers:e.onboardingAnswers??null,botLicenses:e.botLicenses||{},unlockedBots:Array.isArray(e.unlockedBots)?e.unlockedBots.map(String):[],botAccessExpiry:e.botAccessExpiry||{},isPremium:e.isPremium===!0,activePlanId:e.activePlanId??null,activePlanName:e.activePlanName??null,billingCycle:e.billingCycle??null,premiumSince:e.premiumSince??null,premiumExpiresAt:e.premiumExpiresAt??null,lastPaymentId:e.lastPaymentId??null,lastInvoiceId:e.lastInvoiceId??null,lastPaymentAmountInr:e.lastPaymentAmountInr??null}}function eB({children:e}){const[t,n]=w.useState(()=>ZD()),[a,s]=w.useState(!0),[o,c]=w.useState(!1),[d,h]=w.useState(""),f=w.useCallback(async()=>{const k=await Un("/api/auth/me");if(!k.authenticated||!k.user){Si(null),n(null),_i(null);return}k.token&&_i(k.token);const M=dh(k.user);Si(M),n(M)},[]);w.useEffect(()=>{let k=!1;return(async()=>{try{await f()}catch{}finally{k||s(!1)}})(),()=>{k=!0}},[f]);const p=w.useCallback(async(k,M)=>{const B=await kn("/api/auth/firebase",{idToken:k,...M!=null&&M.appBridge?{appBridge:!0}:{}});_i(B.token);const _=dh(B.user);return Si(_),n(_),{user:_,token:B.token,code:B.code}},[]);w.useEffect(()=>{let k=!1;return(async()=>
1455{if(typeof window<"u"){const M=window.location.pathname;if(M.startsWith("/auth/google")||M.startsWith("/auth/complete")||window.location.hostname==="androidapp.socratech.ai")return}try{const M=Pn()?await PD(Yr):await iS(Yr);if(!(M!=null&&M.user)||k)return;c(!0);const B=await M.user.getIdToken(!0),{token:_,user:U}=await p(B);if(new URLSearchParams(window.location.search).get("appLogin")==="true"&&_){const W=U.onboardingStatus===0?"/onboarding":U.welcomeSeen===0?"/welcome":"/app/guide";window.location.replace(`/auth/complete?token=${encodeURIComponent(_)}&next=${encodeURIComponent(W)}&app=1`)}}catch(M){k||h(Gx(M))}finally{k||c(!1)}})(),()=>{k=!0}},[p]),w.useEffect(()=>{const k=async U=>{const{token:F,user:W}=await p(U),ae=W.onboardingStatus===0?"/onboarding":W.welcomeSeen===0?"/welcome":"/app/guide";window.location.replace(`/auth/complete?token=${encodeURIComponent(F||"")}&next=${encodeURIComponent(ae)}&app=1`)},M=async U=>{const F=LD(U);if(F)try{c(!0),h("");try{const W=Ga.credential(F),le=await(await w_(Yr,W)).user.getIdToken(!0);await k(le);return}catch{await k(F)}}catch(W){c(!1),h(Gx(W))}},B=window;B.onDeepLinkReceived=U=>{M(U)},B.handleOpenURL=U=>{M(U)},B.pendingDeepLink&&(M(B.pendingDeepLink),B.pendingDeepLink="");const _=()=>{B.pendingDeepLink&&(M(B.pendingDeepLink),B.pendingDeepLink="")};return document.addEventListener("resume",_),()=>{B.onDeepLinkReceived&&(B.onDeepLinkReceived=void 0),B.handleOpenURL&&(B.handleOpenURL=void 0),document.removeEventListener("resume",_)}},[p]),w.useEffect(()=>{},[p]);const x=w.useCallback(async()=>{h(""),c(!0);try{const k=new URLSearchParams(window.location.search).get("appLogin")==="true";if(Pn()){const U=Vu();h(U?"":"Could not open Chrome. Install Google Chrome and try again."),c(!1);return}if(Fu()){window.location.assign(`${window.location.origin}/auth/google`);return}const M=new Ga;if(M.setCustomParameters({prompt:"select_account"}),k&&Yr.currentUser){const U=await Yr.currentUser.getIdToken(!0);K3(U);return}let B=await rg(Yr,M);if(k){let U=Ga.credentialFromResult(B),F=String((U==null?void 0:U.idToken)||"").trim();if(F||(await U3(Yr),B=await rg(Yr,M),U=Ga.credentialFromResult(B),F=String((U==null?void 0:U.idToken)||"").trim()),!F&&B.user&&(F=await B.user.getIdToken(!0)),!F){h("Google did not return an ID token to open the installed app. Tap Open the app and choose your Google account again.");return}K3(F);return}const _=await B.user.getIdToken(!0);await p(_)}catch(k){const M=k&&typeof k=="object"&&"code"in k?String(k.code):"";if(M==="auth/cancelled-popup-request")return;if(M==="auth/popup-closed-by-user"){h("Sign-in cancelled. Tap the button below to try again.");return}if(M==="auth/popup-blocked"){h("Pop-up was blocked. Allow pop-ups for this site and try again.");return}if(M==="auth/unauthorized-domain"){h(`Sign-in is blocked for "${window.location.hostname}". Add it under Firebase â Authorized domains.`);return}h(k instanceof Error?k.message:Gx(k))}finally{c(!1)}},[p]),b=w.useCallback(async()=>{if(Q3()){h(""),c(!0);try{const k=await kn("/api/auth/dev-login");_i(k.token);const M=dh(k.user);Si(M),n(M)}catch(k){h(k instanceof Error?k.message:"Dev login failed")}finally{c(!1)}}},[]),v=w.useCallback(async()=>{try{await kn("/api/auth/logout")}catch{}try{await U3(Yr)}catch{}_i(null),Si(null),n(null)},[]),N=w.useCallback(async k=>{if(!t)return{ok:!1,error:"Not signed in."};const M=t,B={...t,...k};k.onboardingStatus!==void 0&&(B.onboardingCompleted=k.onboardingStatus===Pl),Si(B),n(B);try{const _=await Wb("/api/users/me",k),U=dh(_.user);return Si(U),n(U),{ok:!0}}catch(_){return Si(M),n(M),{ok:!1,error:_ instanceof Error?_.message:"Could not save changes."}}},[t]),j=w.useCallback(async()=>{await f()},[f]),T=w.useCallback(async(k,M)=>{const B=await N({selectedExams:k,onboardingAnswers:{...M,completedAt:new Date().toISOString()},onboardingStatus:Pl});return B.ok&&t&&JD({userId:t.uid,displayName:t.displayName,selectedExams:k}).catch(()=>{}),B},[N,t]),E=w.useCallback(async k=>N({displayName:k.trim()||(t==null?void 0:t.displayName)||"Student",welcomeSeen:fS}),[N,t==null?void 0:t.displayName]),D=Q3();return i.jsx(xS.Provider,{value:{user:t,loading:a,oauthInProgress:o,loginError:d,setLoginError:h,handleLogin:x,handleDevLogin:b,digLoginEnabled:D,devLoginEnabled:D,handleLogout:v,updateUser:N,applyBotPurchase:j,refreshUserProfile:f,completeOnboarding:T,completeWelcome:E},children:e})}function za(){const e=w.useContext(xS);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const Kb=w.createContext({});function Qb(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const tB=typeof window<"u",gS=tB?w.useLayoutEffect:w.useEffect,Gm=w.createContext(null);function Jb(e,t){e.indexOf(t)===-1&&e.push(t)}function cm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ls=(e,t,n)=>n>t?t:n<e?e:n;let Zb=()=>{};const Pi={},bS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yS(e){return typeof e=="object"&&e!==null}const vS=e=>/^0[^.\s]+$/u.test(e);function wS(e){let t;return()=>(t===void 0&&(t=e()),t)}const yr=e=>e,nB=(e,t)=>n=>t(e(n)),_0=(...e)=>e.reduce(nB),r0=(e,t,n)=>{const a=t-e;return a===0?1:(n-e)/a};class ey{constructor(){this.subscriptions=[]}add(t){return Jb(this.subscriptions,t),()=>cm(this.subscriptions,t)}notify(t,n,a){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,a);else for(let o=0;o<s;o++){const c=this.subscriptions[o];c&&c(t,n,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wa=e=>e*1e3,xr=e=>e/1e3;function SS(e,t){return t?e*(1e3/t):0}const NS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,aB=1e-7,rB=12;function sB(e,t,n,a,s){let o,c,d=0;do c=t+(n-t)/2,o=NS(c,a,s)-e,o>0?n=c:t=c;while(Math.abs(o)>aB&&++d<rB);return c}function D0(e,t,n,a){if(e===t&&n===a)return yr;const s=o=>sB(o,0,1,e,n);return o=>o===0||o===1?o:NS(s(o),t,a)}const jS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kS=e=>t=>1-e(1-t),CS=D0(.33,1.53,.69,.99),ty=kS(CS),AS=jS(ty),ES=e=>e>=1?1:(e*=2)<1?.5*ty(e):.5*(2-Math.pow(2,-10*(e-1))),ny=e=>1-Math.sin(Math.acos(e)),TS=kS(ny),MS=jS(ny),iB=D0(.42,0,1,1),lB=D0(0,0,.58,1),IS=D0(.42,0,.58,1),oB=e=>Array.isArray(e)&&typeof e[0]!="number",zS=e=>Array.isArray(e)&&typeof e[0]=="number",cB={linear:yr,easeIn:iB,easeInOut:IS,easeOut:lB,circIn:ny,circInOut:MS,circOut:TS,backIn:ty,backInOut:AS,backOut:CS,anticipate:ES},uB=e=>typeof e=="string",J3=e=>{if(zS(e)){Zb(e.length===4);const[t,n,a,s]=e;return D0(t,n,a,s)}else if(uB(e))return cB[e];return e},hh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function dB(e,t){let n=new Set,a=new Set,s=!1,o=!1;const c=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};
vendor: 26,851 bytes, line 1455
1455function h(p){c.has(p)&&(f.schedule(p),e()),p(d)}const f={schedule:(p,x=!1,b=!1)=>{const N=b&&s?n:a;return x&&c.add(p),N.add(p),p},cancel:p=>{a.delete(p),c.delete(p)},process:p=>{if(d=p,s){o=!0;return}s=!0;const x=n;n=a,a=x,n.forEach(h),n.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const hB=40;function _S(e,t){let n=!1,a=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,c=hh.reduce((k,M)=>(k[M]=dB(o),k),{}),{setup:d,read:h,resolveKeyframes:f,preUpdate:p,update:x,preRender:b,render:v,postRender:N}=c,j=()=>{const k=Pi.useManualTiming,M=k?s.timestamp:performance.now();n=!1,k||(s.delta=a?1e3/60:Math.max(Math.min(M-s.timestamp,hB),1)),s.timestamp=M,s.isProcessing=!0,d.process(s),h.process(s),f.process(s),p.process(s),x.process(s),b.process(s),v.process(s),N.process(s),s.isProcessing=!1,n&&t&&(a=!1,e(j))},T=()=>{n=!0,a=!0,s.isProcessing||e(j)};return{schedule:hh.reduce((k,M)=>{const B=c[M];return k[M]=(_,U=!1,F=!1)=>(n||T(),B.schedule(_,U,F)),k},{}),cancel:k=>{for(let M=0;M<hh.length;M++)c[hh[M]].cancel(k)},state:s,steps:c}}const{schedule:Pt,cancel:Ui,state:Qn,steps:Yx}=_S(typeof requestAnimationFrame<"u"?requestAnimationFrame:yr,!0);let Fh;function mB(){Fh=void 0}const pa={now:()=>(Fh===void 0&&pa.set(Qn.isProcessing||Pi.useManualTiming?Qn.timestamp:performance.now()),Fh),set:e=>{Fh=e,queueMicrotask(mB)}},DS=e=>t=>typeof t=="string"&&t.startsWith(e),BS=DS("--"),fB=DS("var(--"),ay=e=>fB(e)?pB.test(e.split("/*")[0].trim()):!1,pB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Z3(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const yc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},s0={...yc,transform:e=>ls(0,1,e)},mh={...yc,default:1},qu=e=>Math.round(e*1e5)/1e5,ry=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xB(e){return e==null}const gB=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sy=(e,t)=>n=>!!(typeof n=="string"&&gB.test(n)&&n.startsWith(e)||t&&!xB(n)&&Object.prototype.hasOwnProperty.call(n,t)),RS=(e,t,n)=>a=>{if(typeof a!="string")return a;const[s,o,c,d]=a.match(ry);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},bB=e=>ls(0,255,e),Wx={...yc,transform:e=>Math.round(bB(e))},_l={test:sy("rgb","red"),parse:RS("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:a=1})=>"rgba("+Wx.transform(e)+", "+Wx.transform(t)+", "+Wx.transform(n)+", "+qu(s0.transform(a))+")"};function yB(e){let t="",n="",a="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),a=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),a=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,a+=a,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(a,16),alpha:s?parseInt(s,16)/255:1}}const og={test:sy("#"),parse:yB,transform:_l.transform},B0=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ei=B0("deg"),ss=B0("%"),Fe=B0("px"),vB=B0("vh"),wB=B0("vw"),e6={...ss,parse:e=>ss.parse(e)/100,transform:e=>ss.transform(e*100)},qo={test:sy("hsl","hue"),parse:RS("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:a=1})=>"hsla("+Math.round(e)+", "+ss.transform(qu(t))+", "+ss.transform(qu(n))+", "+qu(s0.transform(a))+")"},jn={test:e=>_l.test(e)||og.test(e)||qo.test(e),parse:e=>_l.test(e)?_l.parse(e):qo.test(e)?qo.parse(e):og.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_l.transform(e):qo.transform(e),getAnimatableNone:e=>{const t=jn.parse(e);return t.alpha=0,jn.transform(t)}},SB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NB(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ry))==null?void 0:t.length)||0)+(((n=e.match(SB))==null?void 0:n.length)||0)>0}const OS="number",LS="color",jB="var",kB="var(",t6="${}",CB=/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 lc(e){const t=e.toString(),n=[],a={color:[],number:[],var:[]},s=[];let o=0;const d=t.replace(CB,h=>(jn.test(h)?(a.color.push(o),s.push(LS),n.push(jn.parse(h))):h.startsWith(kB)?(a.var.push(o),s.push(jB),n.push(h)):(a.number.push(o),s.push(OS),n.push(parseFloat(h))),++o,t6)).split(t6);return{values:n,split:d,indexes:a,types:s}}function AB(e){return lc(e).values}function PS({split:e,types:t}){const n=e.length;return a=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],a[o]!==void 0){const c=t[o];c===OS?s+=qu(a[o]):c===LS?s+=jn.transform(a[o]):s+=a[o]}return s}}function EB(e){return PS(lc(e))}const TB=e=>typeof e=="number"?0:jn.test(e)?jn.getAnimatableNone(e):e,MB=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:TB(e);function IB(e){const t=lc(e);return PS(t)(t.values.map((a,s)=>MB(a,t.split[s])))}const Rr={test:NB,parse:AB,createTransformer:EB,getAnimatableNone:IB};function Xx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function zB({hue:e,saturation:t,lightness:n,alpha:a}){e/=360,t/=100,n/=100;let s=0,o=0,c=0;if(!t)s=o=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,h=2*n-d;s=Xx(h,d,e+1/3),o=Xx(h,d,e),c=Xx(h,d,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(c*255),alpha:a}}function um(e,t){return n=>n>0?t:e}const $t=(e,t,n)=>e+(t-e)*n,Kx=(e,t,n)=>{const a=e*e,s=n*(t*t-a)+a;return s<0?0:Math.sqrt(s)},_B=[og,_l,qo],DB=e=>_B.find(t=>t.test(e));function n6(e){const t=DB(e);if(!t)return!1;let n=t.parse(e);return t===qo&&(n=zB(n)),n}const a6=(e,t)=>{const n=n6(e),a=n6(t);if(!n||!a)return um(e,t);const s={...n};return o=>(s.red=Kx(n.red,a.red,o),s.green=Kx(n.green,a.green,o),s.blue=Kx(n.blue,a.blue,o),s.alpha=$t(n.alpha,a.alpha,o),_l.transform(s))},cg=new Set(["none","hidden"]);function BB(e,t){return cg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function RB(e,t){return n=>$t(e,t,n)}function iy(e){return typeof e=="number"?RB:typeof e=="string"?ay(e)?um:jn.test(e)?a6:PB:Array.isArray(e)?US:typeof e=="object"?jn.test(e)?a6:OB:um}function US(e,t){const n=[...e],a=n.length,s=e.map((o,c)=>iy(o)(o,t[c]));return o=>{for(let c=0;c<a;c++)n[c]=s[c](o);return n}}function OB(e,t){const n={...e,...t},a={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(a[s]=iy(e[s])(e[s],t[s]));return s=>{for(const o in a)n[o]=a[o](s);return n}}function LB(e,t){const n=[],a={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],c=e.indexes[o][a[o]],d=e.values[c]??0;n[s]=d,a[o]++}return n}const PB=(e,t)=>{const n=Rr.createTransformer(t),a=lc(e),s=lc(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?cg.has(e)&&!s.values.length||cg.has(t)&&!a.values.length?BB(e,t):_0(US(LB(a,s),s.values),n):um(e,t)};function FS(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?$t(e,t,n):iy(e)(e,t)}const UB=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Pt.update(t,n),stop:()=>Ui(t),now:()=>Qn.isProcessing?Qn.timestamp:pa.now()}},VS=(e,t,n=10)=>{let a="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)a+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${a.substring(0,a.length-2)})`},dm=2e4;function ly(e){let t=0;const n=50;let a=e.next(t);for(;!a.done&&t<dm;)t+=n,a=e.next(t);return t>=dm?1/0:t}function FB(e,t=100,n){const a=n({...e,keyframes:[0,t]}),s=Math.min(ly(a),dm);return{type:"keyframes",ease:o=>a.next(s*o).value/t,duration:xr(s)}}const ln={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};function ug(e,t){return e*Math.sqrt(1-t*t)}const VB=12;function qB(e,t,n){let a=n;for(let s=1;s<VB;s++)a=a-e(a)/t(a);return a}const Qx=.001;function HB({duration:e=ln.duration,bounce:t=ln.bounce,velocity:n=ln.velocity,mass:a=ln.mass}){let s,o,c=1-t;c=ls(ln.minDamping,ln.maxDamping,c),e=ls(ln.minDuration,ln.maxDuration,xr(e)),c<1?(s=f=>{const p=f*c,x=p*e,b=p-n,v=ug(f,c),N=Math.exp(-x);return Qx-b/v*N},o=f=>{const x=f*c*e,b=x*n+n,v=Math.pow(c,2)*Math.pow(f,2)*e,N=Math.exp(-x),j=ug(Math.pow(f,2),c);return(-s(f)+Qx>0?-1:1)*((b-v)*N)/j}):(s=f=>{const p=Math.exp(-f*e),x=(f-n)*e+1;return-Qx+p*x},o=f=>{const p=Math.exp(-f*e),x=(n-f)*(e*e);return p*x});const d=5/e,h=qB(s,o,d);if(e=Wa(e),isNaN(h))return{stiffness:ln.stiffness,damping:ln.damping,duration:e};{const f=Math.pow(h,2)*a;return{stiffness:f,damping:c*2*Math.sqrt(a*f),duration:e}}}const $B=["duration","bounce"],GB=["stiffness","damping","mass"];function r6(e,t){return t.some(n=>e[n]!==void 0)}function YB(e){let t={velocity:ln.velocity,stiffness:ln.stiffness,damping:ln.damping,mass:ln.mass,isResolvedFromDuration:!1,...e};if(!r6(e,GB)&&r6(e,$B))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,a=2*Math.PI/(n*1.2),s=a*a,o=2*ls(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ln.mass,stiffness:s,damping:o}}else{const n=HB({...e,velocity:0});t={...t,...n,mass:ln.mass},t.isResolvedFromDuration=!0}return t}function hm(e=ln.visualDuration,t=ln.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:a,restDelta:s}=n;const o=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:o},{stiffness:h,damping:f,mass:p,duration:x,velocity:b,isResolvedFromDuration:v}=YB({...n,velocity:-xr(n.velocity||0)}),N=b||0,j=f/(2*Math.sqrt(h*p)),T=c-o,E=xr(Math.sqrt(h/p)),D=Math.abs(T)<5;a||(a=D?ln.restSpeed.granular:ln.restSpeed.default),s||(s=D?ln.restDelta.granular:ln.restDelta.default);let k,M,B,_,U,F;if(j<1)B=ug(E,j),_=(N+j*E*T)/B,k=ae=>{const le=Math.exp(-j*E*ae);return c-le*(_*Math.sin(B*ae)+T*Math.cos(B*ae))},U=j*E*_+T*B,F=j*E*T-_*B,M=ae=>Math.exp(-j*E*ae)*(U*Math.sin(B*ae)+F*Math.cos(B*ae));else if(j===1){k=le=>c-Math.exp(-E*le)*(T+(N+E*T)*le);const ae=N+E*T;M=le=>Math.exp(-E*le)*(E*ae*le-N)}else{const ae=E*Math.sqrt(j*j-1);k=te=>{const H=Math.exp(-j*E*te),V=Math.min(ae*te,300);return c-H*((N+j*E*T)*Math.sinh(V)+ae*T*Math.cosh(V))/ae};const le=(N+j*E*T)/ae,re=j*E*le-T*ae,xe=j*E*T-le*ae;M=te=>{const H=Math.exp(-j*E*te),V=Math.min(ae*te,300);return H*(re*Math.sinh(V)+xe*Math.cosh(V))}}const W={calculatedDuration:v&&x||null,velocity:ae=>Wa(M(ae)),next:ae=>{if(!v&&j<1){const re=Math.exp(-j*E*ae),xe=Math.sin(B*ae),te=Math.cos(B*ae),H=c-re*(_*xe+T*te),V=Wa(re*(U*xe+F*te));return d.done=Math.abs(V)<=a&&Math.abs(c-H)<=s,d.value=d.done?c:H,d}const le=k(ae);if(v)d.done=ae>=x;else{const re=Wa(M(ae));d.done=Math.abs(re)<=a&&Math.abs(c-le)<=s}return d.value=d.done?c:le,d},toString:()=>{const ae=Math.min(ly(W),dm),le=VS(re=>W.next(ae*re).value,ae,30);return ae+"ms "+le},toTransition:()=>{}};return W}hm.applyToOptions=e=>{const t=FB(e,100,hm);return e.ease=t.ease,e.duration=Wa(t.duration),e.type="keyframes",e};const WB=5;function qS(e,t,n){const a=Math.max(t-WB,0);return SS(n-e(a),t-a)}function dg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:a=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:c,min:d,max:h,restDelta:f=.5,restSpeed:p}){const x=e[0],b={done:!1,value:x},v=F=>d!==void 0&&F<d||h!==void 0&&F>h,N=F=>d===void 0?h:h===void 0||Math.abs(d-F)<Math.abs(h-F)?d:h;let j=n*t;const T=x+j,E=c===void 0?T:c(T);E!==T&&(j=E-x);const D=F=>-j*Math.exp(-F/a),k=F=>E+D(F),M=F=>{const W=D(F),ae=k(F);b.done=Math.abs(W)<=f,b.value=b.done?E:ae};let B,_;const U=F=>{v(b.value)&&(B=F,_=hm({keyframes:[b.value,N(b.value)],velocity:qS(k,F,b.value),damping:s,stiffness:o,restDelta:f,restSpeed:p}))};return U(0),{calculatedDuration:null,next:F=>{let W=!1;return!_&&B===void 0&&(W=!0,M(F),U(F)),B!==void 0&&F>=B?_.next(F-B):(!W&&M(F),b)}}}function XB(e,t,n){const a=[],s=n||Pi.mix||FS,o=e.length-1;for(let c=0;c<o;c++){let d=s(e[c],e[c+1]);if(t){const h=Array.isArray(t)?t[c]||yr:t;d=_0(h,d)}a.push(d)}return a}function KB(e,t,{clamp:n=!0,ease:a,mixer:s}={}){const o=e.length;if(Zb(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=XB(t,a,s),h=d.length,f=p=>{if(c&&p<e[0])return t[0];let x=0;if(h>1)for(;x<e.length-2&&!(p<e[x+1]);x++);const b=r0(e[x],e[x+1],p);return d[x](b)};return n?p=>f(ls(e[0],e[o-1],p)):f}function QB(e,t){const n=e[e.length-1];for(let a=1;a<=t;a++){const s=r0(0,t,a);e.push($t(n,1,s))}}function JB(e){const t=[0];return QB(t,e.length-1),t}function ZB(e,t){return e.map(n=>n*t)}function eR(e,t){return e.map(()=>t||IS).splice(0,e.length-1)}function Hu({duration:e=300,keyframes:t,times:n,ease:a="easeInOut"}){const s=oB(a)?a.map(J3):J3(a),o={done:!1,value:t[0]},c=ZB(n&&n.length===t.length?n:JB(t),e),d=KB(c,t,{ease:Array.isArray(s)?s:eR(t,s)});return{calculatedDuration:e,next:h=>(o.value=d(h),o.done=h>=e,o)}}const tR=e=>e!==null;function Ym(e,{repeat:t,repeatType:n="loop"},a,s=1){const o=e.filter(tR),d=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!d||a===void 0?o[d]:a}const nR={decay:dg,inertia:dg,tween:Hu,keyframes:Hu,spring:hm};function HS(e){typeof e.type=="string"&&(e.type=nR[e.type])}class oy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const aR=e=>e/100;class mm extends oy{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var a,s;const{motionValue:n}=this.options;n&&n.updatedAt!==pa.now()&&this.tick(pa.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(a=this.options).onStop)==null||s.call(a))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;HS(t);const{type:n=Hu,repeat:a=0,repeatDelay:s=0,repeatType:o,velocity:c=0}=t;let{keyframes:d}=t;const h=n||Hu;h!==Hu&&typeof d[0]!="number"&&(this.mixKeyframes=_0(aR,FS(d[0],d[1])),d=[0,100]);const f=h({...t,keyframes:d});o==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...d].reverse(),velocity:-c})),f.calculatedDuration===null&&(f.calculatedDuration=ly(f));const{calculatedDuration:p}=f;this.calculatedDuration=p,this.resolvedDuration=p+s,this.totalDuration=this.resolvedDuration*(a+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:a,totalDuration:s,mixKeyframes:o,mirroredGenerator:c,resolvedDuration:d,calculatedDuration:h}=this;if(this.startTime===null)return a.next(0);const{delay:f=0,keyframes:p,repeat:x,repeatType:b,repeatDelay:v,type:N,onUpdate:j,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-f*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?E<0:E>s;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let k=this.currentTime,M=a;if(x){const F=Math.min(this.currentTime,s)/d;let W=Math.floor(F),ae=F%1;!ae&&F>=1&&(ae=1),ae===1&&W--,W=Math.min(W,x+1),!!(W%2)&&(b==="reverse"?(ae=1-ae,v&&(ae-=v/d)):b==="mirror"&&(M=c)),k=ls(0,1,ae)*d}let B;D?(this.delayState.value=p[0],B=this.delayState):B=M.next(k),o&&!D&&(B.value=o(B.value));let{done:_}=B;!D&&h!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const U=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return U&&N!==dg&&(B.value=Ym(p,this.options,T,this.speed)),j&&j(B.value),U&&this.finish(),B}then(t,n){return this.finished.then(t,n)}get duration(){return xr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xr(t)}get time(){return xr(this.currentTime)}set time(t){t=Wa(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return qS(a=>this.generator.next(a).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(pa.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=xr(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=UB,startTime:n}=this.options;this.driver||(this.driver=t(c=>this.tick(c))),(o=(s=this.options).onPlay)==null||o.call(s);const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime||(this.startTime=n??a),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(pa.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function rR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Dl=e=>e*180/Math.PI,hg=e=>{const t=Dl(Math.atan2(e[1],e[0]));return mg(t)},sR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hg,rotateZ:hg,skewX:e=>Dl(Math.atan(e[1])),skewY:e=>Dl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mg=e=>(e=e%360,e<0&&(e+=360),e),s6=hg,i6=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),l6=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),iR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:i6,scaleY:l6,scale:e=>(i6(e)+l6(e))/2,rotateX:e=>mg(Dl(Math.atan2(e[6],e[5]))),rotateY:e=>mg(Dl(Math.atan2(-e[2],e[0]))),rotateZ:s6,rotate:s6,skewX:e=>Dl(Math.atan(e[4])),skewY:e=>Dl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fg(e){return e.includes("scale")?1:0}function pg(e,t){if(!e||e==="none")return fg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let a,s;if(n)a=iR,s=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);a=sR,s=d}if(!s)return fg(t);const o=a[t],c=s[1].split(",").map(oR);return typeof o=="function"?o(c):c[o]}const lR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return pg(n,t)};function oR(e){return parseFloat(e.trim())}const vc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wc=new Set(vc),o6=e=>e===yc||e===Fe,cR=new Set(["x","y","z"]),uR=vc.filter(e=>!cR.has(e));function dR(e){const t=[];return uR.forEach(n=>{const a=e.getValue(n);a!==void 0&&(t.push([n,a.get()]),a.set(n.startsWith("scale")?1:0))}),t}const Di={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:a})=>{const s=e.max-e.min;return a==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>pg(t,"x"),y:(e,{transform:t})=>pg(t,"y")};Di.translateX=Di.x;Di.translateY=Di.y;const Rl=new Set;let xg=!1,gg=!1,bg=!1;function $S(){if(gg){const e=Array.from(Rl).filter(a=>a.needsMeasurement),t=new Set(e.map(a=>a.element)),n=new Map;t.forEach(a=>{const s=dR(a);s.length&&(n.set(a,s),a.render())}),e.forEach(a=>a.measureInitialState()),t.forEach(a=>{a.render();const s=n.get(a);s&&s.forEach(([o,c])=>{var d;(d=a.getValue(o))==null||d.set(c)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}gg=!1,xg=!1,Rl.forEach(e=>e.complete(bg)),Rl.clear()}function GS(){Rl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gg=!0)})}function hR(){bg=!0,GS(),$S(),bg=!1}class cy{constructor(t,n,a,s,o,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=a,this.motionValue=s,this.element=o,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Rl.add(this),xg||(xg=!0,Pt.read(GS),Pt.resolveKeyframes($S))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:a,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),c=t[t.length-1];if(o!==void 0)t[0]=o;else if(a&&n){const d=a.readValue(n,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),s&&o===void 0&&s.set(t[0])}rR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rl.delete(this)}cancel(){this.state==="scheduled"&&(Rl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const mR=e=>e.startsWith("--");function YS(e,t,n){mR(t)?e.style.setProperty(t,n):e.style[t]=n}const fR={};function WS(e,t){const n=wS(e);return()=>fR[t]??n()}const pR=WS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),XS=WS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Lu=([e,t,n,a])=>`cubic-bezier(${e}, ${t}, ${n}, ${a})`,c6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lu([0,.65,.55,1]),circOut:Lu([.55,0,1,.45]),backIn:Lu([.31,.01,.66,-.59]),backOut:Lu([.33,1.53,.69,.99])};function KS(e,t){if(e)return typeof e=="function"?XS()?VS(e,t):"ease-out":zS(e)?Lu(e):Array.isArray(e)?e.map(n=>KS(n,t)||c6.easeOut):c6[e]}function xR(e,t,n,{delay:a=0,duration:s=300,repeat:o=0,repeatType:c="loop",ease:d="easeOut",times:h}={},f=void 0){const p={[t]:n};h&&(p.offset=h);const x=KS(d,s);Array.isArray(x)&&(p.easing=x);const b={delay:a,duration:s,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:o+1,direction:c==="reverse"?"alternate":"normal"};return f&&(b.pseudoElement=f),e.animate(p,b)}function QS(e){return typeof e=="function"&&"applyToOptions"in e}function gR({type:e,...t}){return QS(e)&&XS()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class JS extends oy{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:a,keyframes:s,pseudoElement:o,allowFlatten:c=!1,finalKeyframe:d,onComplete:h}=t;this.isPseudoElement=!!o,this.allowFlatten=c,this.options=t,Zb(typeof t.type!="string");const f=gR(t);this.animation=xR(n,a,s,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const p=Ym(s,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(p),YS(n,a,p),this.animation.cancel()}h==null||h(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,a,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(a=this.animation).commitStyles)==null||s.call(a))}get duration(){var n,a;const t=((a=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:a.call(n).duration)||0;return xr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xr(t)}get time(){return xr(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wa(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:a,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&pR()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),a&&(this.animation.rangeEnd=a),yr):s(this)}}const ZS={anticipate:ES,backInOut:AS,circInOut:MS};function bR(e){return e in ZS}function yR(e){typeof e.ease=="string"&&bR(e.ease)&&(e.ease=ZS[e.ease])}const Jx=10;class vR extends JS{constructor(t){yR(t),HS(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:a,onComplete:s,element:o,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new mm({...c,autoplay:!1}),h=Math.max(Jx,pa.now()-this.startTime),f=ls(0,Jx,h-Jx),p=d.sample(h).value,{name:x}=this.options;o&&x&&YS(o,x,p),n.setWithVelocity(d.sample(Math.max(0,h-f)).value,p,f),d.stop()}}const u6=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rr.test(e)||e==="0")&&!e.startsWith("url("));function wR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function SR(e,t,n,a){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],c=u6(s,t),d=u6(o,t);return!c||!d?!1:wR(e)||(n==="spring"||QS(n))&&a}function yg(e){e.duration=0,e.type="keyframes"}const eN=new Set(["opacity","clipPath","filter","transform"]),NR=/^(?:
1455oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function jR(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&NR.test(e[t]))return!0;return!1}const kR=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),CR=wS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function AR(e){var x;const{motionValue:t,name:n,repeatDelay:a,repeatType:s,damping:o,type:c,keyframes:d}=e;if(!(((x=t==null?void 0:t.owner)==null?void 0:x.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=t.owner.getProps();return CR()&&n&&(eN.has(n)||kR.has(n)&&jR(d))&&(n!=="transform"||!p)&&!f&&!a&&s!=="mirror"&&o!==0&&c!=="inertia"}const ER=40;class TR extends oy{constructor({autoplay:t=!0,delay:n=0,type:a="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:c="loop",keyframes:d,name:h,motionValue:f,element:p,...x}){var N;super(),this.stop=()=>{var j,T;this._animation&&(this._animation.stop(),(j=this.stopTimeline)==null||j.call(this)),(T=this.keyframeResolver)==null||T.cancel()},this.createdAt=pa.now();const b={autoplay:t,delay:n,type:a,repeat:s,repeatDelay:o,repeatType:c,name:h,motionValue:f,element:p,...x},v=(p==null?void 0:p.KeyframeResolver)||cy;this.keyframeResolver=new v(d,(j,T,E)=>this.onKeyframesResolved(j,T,b,!E),h,f,p),(N=this.keyframeResolver)==null||N.scheduleResolve()}onKeyframesResolved(t,n,a,s){var E,D;this.keyframeResolver=void 0;const{name:o,type:c,velocity:d,delay:h,isHandoff:f,onUpdate:p}=a;this.resolvedAt=pa.now();let x=!0;SR(t,o,c,d)||(x=!1,(Pi.instantAnimations||!h)&&(p==null||p(Ym(t,a,n))),t[0]=t[t.length-1],yg(a),a.repeat=0);const v={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>ER?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...a,keyframes:t},N=x&&!f&&AR(v),j=(D=(E=v.motionValue)==null?void 0:E.owner)==null?void 0:D.current;let T;if(N)try{T=new vR({...v,element:j})}catch{T=new mm(v)}else T=new mm(v);T.finished.then(()=>{this.notifyFinished()}).catch(yr),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),hR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function tN(e,t,n,a=0,s=1){const o=Array.from(e).sort((f,p)=>f.sortNodePosition(p)).indexOf(t),c=e.size,d=(c-1)*a;return typeof n=="function"?n(o,c):s===1?o*a:d-o*a}const MR=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function IR(e){const t=MR.exec(e);if(!t)return[,];const[,n,a,s]=t;return[`--${n??a}`,s]}function nN(e,t,n=1){const[a,s]=IR(e);if(!a)return;const o=window.getComputedStyle(t).getPropertyValue(a);if(o){const c=o.trim();return bS(c)?parseFloat(c):c}return ay(s)?nN(s,t,n+1):s}const zR={type:"spring",stiffness:500,damping:25,restSpeed:10},_R=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),DR={type:"keyframes",duration:.8},BR={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RR=(e,{keyframes:t})=>t.length>2?DR:wc.has(e)?e.startsWith("scale")?_R(t[1]):zR:BR;function aN(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...a}=e;return{...t,...a}}return e}function uy(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?aN(n,e):n}const OR=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function LR(e){for(const t in e)if(!OR.has(t))return!0;return!1}const dy=(e,t,n,a={},s,o)=>c=>{const d=uy(a,e)||{},h=d.delay||a.delay||0;let{elapsed:f=0}=a;f=f-Wa(h);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-f,onUpdate:b=>{t.set(b),d.onUpdate&&d.onUpdate(b)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:o?void 0:s};LR(d)||Object.assign(p,RR(e,p)),p.duration&&(p.duration=Wa(p.duration)),p.repeatDelay&&(p.repeatDelay=Wa(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let x=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(yg(p),p.delay===0&&(x=!0)),(Pi.instantAnimations||Pi.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(x=!0,yg(p),p.delay=0),p.allowFlatten=!d.type&&!d.ease,x&&!o&&t.get()!==void 0){const b=Ym(p.keyframes,d);if(b!==void 0){Pt.update(()=>{p.onUpdate(b),p.onComplete()});return}}return d.isSync?new mm(p):new TR(p)};function d6(e){const t=[{},{}];
vendor: 34,816 bytes, line 1455
1455return e==null||e.values.forEach((n,a)=>{t[0][a]=n.get(),t[1][a]=n.getVelocity()}),t}function hy(e,t,n,a){if(typeof t=="function"){const[s,o]=d6(a);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=d6(a);t=t(n!==void 0?n:e.custom,s,o)}return t}function Ol(e,t,n){const a=e.getProps();return hy(a,t,n!==void 0?n:a.custom,e)}const rN=new Set(["width","height","top","left","right","bottom",...vc]),h6=30,PR=e=>!isNaN(parseFloat(e));class UR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{var o;const s=pa.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pa.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=PR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ey);const a=this.events[t].add(n);return t==="change"?()=>{a(),Pt.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,a){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pa.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>h6)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,h6);return SS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function oc(e,t){return new UR(e,t)}const vg=e=>Array.isArray(e);function FR(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oc(n))}function VR(e){return vg(e)?e[e.length-1]||0:e}function qR(e,t){const n=Ol(e,t);let{transitionEnd:a={},transition:s={},...o}=n||{};o={...o,...a};for(const c in o){const d=VR(o[c]);FR(e,c,d)}}const Jn=e=>!!(e&&e.getVelocity);function HR(e){return!!(Jn(e)&&e.add)}function wg(e,t){const n=e.getValue("willChange");if(HR(n))return n.add(t);if(!n&&Pi.WillChange){const a=new Pi.WillChange("auto");e.addValue("willChange",a),a.add(t)}}function my(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const $R="framerAppearId",sN="data-"+my($R);function iN(e){return e.props[sN]}function GR({protectedKeys:e,needsAnimating:t},n){const a=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,a}function lN(e,t,{delay:n=0,transitionOverride:a,type:s}={}){let{transition:o,transitionEnd:c,...d}=t;const h=e.getDefaultTransition();o=o?aN(o,h):h;const f=o==null?void 0:o.reduceMotion;a&&(o=a);const p=[],x=s&&e.animationState&&e.animationState.getState()[s];for(const b in d){const v=e.getValue(b,e.latestValues[b]??null),N=d[b];if(N===void 0||x&&GR(x,b))continue;const j={delay:n,...uy(o||{},b)},T=v.get();if(T!==void 0&&!v.isAnimating()&&!Array.isArray(N)&&N===T&&!j.velocity){Pt.update(()=>v.set(N));continue}let E=!1;if(window.MotionHandoffAnimation){const M=iN(e);if(M){const B=window.MotionHandoffAnimation(M,b,Pt);B!==null&&(j.startTime=B,E=!0)}}wg(e,b);const D=f??e.shouldReduceMotion;v.start(dy(b,v,N,D&&rN.has(b)?{type:!1}:j,e,E));const k=v.animation;k&&p.push(k)}if(c){const b=()=>Pt.update(()=>{c&&qR(e,c)});p.length?Promise.all(p).then(b):b()}return p}function Sg(e,t,n={}){var h;const a=Ol(e,t,n.type==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(s=n.transitionOverride);const o=a?()=>Promise.all(lN(e,a,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:p=0,staggerChildren:x,staggerDirection:b}=s;return YR(e,t,f,p,x,b,n)}:()=>Promise.resolve(),{when:d}=s;if(d){const[f,p]=d==="beforeChildren"?[o,c]:[c,o];return f().then(()=>p())}else return Promise.all([o(),c(n.delay)])}function YR(e,t,n=0,a=0,s=0,o=1,c){const d=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),d.push(Sg(h,t,{...c,delay:n+(typeof a=="function"?0:a)+tN(e.variantChildren,h,a,s,o)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(d)}function WR(e,t,n={}){e.notify("AnimationStart",t);let a;if(Array.isArray(t)){const s=t.map(o=>Sg(e,o,n));a=Promise.all(s)}else if(typeof t=="string")a=Sg(e,t,n);else{const s=typeof t=="function"?Ol(e,t,n.custom):t;a=Promise.all(lN(e,s,n))}return a.then(()=>{e.notify("AnimationComplete",t)})}const XR={test:e=>e==="auto",parse:e=>e},oN=e=>t=>t.test(e),cN=[yc,Fe,ss,Ei,wB,vB,XR],m6=e=>cN.find(oN(e));function KR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||vS(e):!0}const QR=new Set(["brightness","contrast","saturate","opacity"]);function JR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=n.match(ry)||[];if(!a)return e;const s=n.replace(a,"");let o=QR.has(t)?1:0;return a!==n&&(o*=100),t+"("+o+s+")"}const ZR=/\b([a-z-]*)\(.*?\)/gu,Ng={...Rr,getAnimatableNone:e=>{const t=e.match(ZR);return t?t.map(JR).join(" "):e}},jg={...Rr,getAnimatableNone:e=>{const t=Rr.parse(e);return Rr.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},f6={...yc,transform:Math.round},eO={rotate:Ei,rotateX:Ei,rotateY:Ei,rotateZ:Ei,scale:mh,scaleX:mh,scaleY:mh,scaleZ:mh,skew:Ei,skewX:Ei,skewY:Ei,distance:Fe,translateX:Fe,translateY:Fe,translateZ:Fe,x:Fe,y:Fe,z:Fe,perspective:Fe,transformPerspective:Fe,opacity:s0,originX:e6,originY:e6,originZ:Fe},fy={borderWidth:Fe,borderTopWidth:Fe,borderRightWidth:Fe,borderBottomWidth:Fe,borderLeftWidth:Fe,borderRadius:Fe,borderTopLeftRadius:Fe,borderTopRightRadius:Fe,borderBottomRightRadius:Fe,borderBottomLeftRadius:Fe,width:Fe,maxWidth:Fe,height:Fe,maxHeight:Fe,top:Fe,right:Fe,bottom:Fe,left:Fe,inset:Fe,insetBlock:Fe,insetBlockStart:Fe,insetBlockEnd:Fe,insetInline:Fe,insetInlineStart:Fe,insetInlineEnd:Fe,padding:Fe,paddingTop:Fe,paddingRight:Fe,paddingBottom:Fe,paddingLeft:Fe,paddingBlock:Fe,paddingBlockStart:Fe,paddingBlockEnd:Fe,paddingInline:Fe,paddingInlineStart:Fe,paddingInlineEnd:Fe,margin:Fe,marginTop:Fe,marginRight:Fe,marginBottom:Fe,marginLeft:Fe,marginBlock:Fe,marginBlockStart:Fe,marginBlockEnd:Fe,marginInline:Fe,marginInlineStart:Fe,marginInlineEnd:Fe,fontSize:Fe,backgroundPositionX:Fe,backgroundPositionY:Fe,...eO,zIndex:f6,fillOpacity:s0,strokeOpacity:s0,numOctaves:f6},tO={...fy,color:jn,backgroundColor:jn,outlineColor:jn,fill:jn,stroke:jn,borderColor:jn,borderTopColor:jn,borderRightColor:jn,borderBottomColor:jn,borderLeftColor:jn,filter:Ng,WebkitFilter:Ng,mask:jg,WebkitMask:jg},uN=e=>tO[e],nO=new Set([Ng,jg]);function dN(e,t){let n=uN(e);return nO.has(n)||(n=Rr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const aO=new Set(["auto","none","0"]);function rO(e,t,n){let a=0,s;for(;a<e.length&&!s;){const o=e[a];typeof o=="string"&&!aO.has(o)&&lc(o).values.length&&(s=e[a]),a++}if(s&&n)for(const o of t)e[o]=dN(n,s)}class sO extends cy{constructor(t,n,a,s,o){super(t,n,a,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:a}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let x=t[p];if(typeof x=="string"&&(x=x.trim(),ay(x))){const b=nN(x,n.current);b!==void 0&&(t[p]=b),p===t.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!rN.has(a)||t.length!==2)return;const[s,o]=t,c=m6(s),d=m6(o),h=Z3(s),f=Z3(o);if(h!==f&&Di[a]){this.needsMeasurement=!0;return}if(c!==d)if(o6(c)&&o6(d))for(let p=0;p<t.length;p++){const x=t[p];typeof x=="string"&&(t[p]=parseFloat(x))}else Di[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,a=[];for(let s=0;s<t.length;s++)(t[s]===null||KR(t[s]))&&a.push(s);a.length&&rO(t,a,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:a}=this;if(!t||!t.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Di[a](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(a,s).jump(s,!1)}measureEndState(){var d;const{element:t,name:n,unresolvedKeyframes:a}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=a.length-1,c=a[o];a[o]=Di[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),(d=this.removedTransforms)!=null&&d.length&&this.removedTransforms.forEach(([h,f])=>{t.getValue(h).set(f)}),this.resolveNoneKeyframes()}}function hN(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let a=document;const s=(n==null?void 0:n[e])??a.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(a=>a!=null)}const mN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Vh(e){return yS(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:py}=_S(queueMicrotask,!1),zr={x:!1,y:!1};function fN(){return zr.x||zr.y}function iO(e){return e==="x"||e==="y"?zr[e]?null:(zr[e]=!0,()=>{zr[e]=!1}):zr.x||zr.y?null:(zr.x=zr.y=!0,()=>{zr.x=zr.y=!1})}function pN(e,t){const n=hN(e),a=new AbortController,s={passive:!0,...t,signal:a.signal};return[n,s,()=>a.abort()]}function lO(e){return!(e.pointerType==="touch"||fN())}function oO(e,t,n={}){const[a,s,o]=pN(e,n);return a.forEach(c=>{let d=!1,h=!1,f;const p=()=>{c.removeEventListener("pointerleave",N)},x=T=>{f&&(f(T),f=void 0),p()},b=T=>{d=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),h&&(h=!1,x(T))},v=()=>{d=!0,window.addEventListener("pointerup",b,s),window.addEventListener("pointercancel",b,s)},N=T=>{if(T.pointerType!=="touch"){if(d){h=!0;return}x(T)}},j=T=>{if(!lO(T))return;h=!1;const E=t(c,T);typeof E=="function"&&(f=E,c.addEventListener("pointerleave",N,s))};c.addEventListener("pointerenter",j,s),c.addEventListener("pointerdown",v,s)}),o}const xN=(e,t)=>t?e===t?!0:xN(e,t.parentElement):!1,xy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function uO(e){return cO.has(e.tagName)||e.isContentEditable===!0}const dO=new Set(["INPUT","SELECT","TEXTAREA"]);function hO(e){return dO.has(e.tagName)||e.isContentEditable===!0}const qh=new WeakSet;function p6(e){return t=>{t.key==="Enter"&&e(t)}}function Zx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mO=(e,t)=>{const n=e.currentTarget;if(!n)return;const a=p6(()=>{if(qh.has(n))return;Zx(n,"down");const s=p6(()=>{Zx(n,"up")}),o=()=>Zx(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",a,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",a),t)};function x6(e){return xy(e)&&!fN()}const g6=new WeakSet;function fO(e,t,n={}){const[a,s,o]=pN(e,n),c=d=>{const h=d.currentTarget;if(!x6(d)||g6.has(d))return;qh.add(h),n.stopPropagation&&g6.add(d);const f=t(h,d),p=(v,N)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",b),qh.has(h)&&qh.delete(h),x6(v)&&typeof f=="function"&&f(v,{success:N})},x=v=>{p(v,h===window||h===document||n.useGlobalTarget||xN(h,v.target))},b=v=>{p(v,!1)};window.addEventListener("pointerup",x,s),window.addEventListener("pointercancel",b,s)};return a.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,s),Vh(d)&&(d.addEventListener("focus",f=>mO(f,s)),!uO(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),o}function gy(e){return yS(e)&&"ownerSVGElement"in e}const Hh=new WeakMap;let Ti;const gN=(e,t,n)=>(a,s)=>s&&s[0]?s[0][e+"Size"]:gy(a)&&"getBBox"in a?a.getBBox()[t]:a[n],pO=gN("inline","width","offsetWidth"),xO=gN("block","height","offsetHeight");function gO({target:e,borderBoxSize:t}){var n;(n=Hh.get(e))==null||n.forEach(a=>{a(e,{get width(){return pO(e,t)},get height(){return xO(e,t)}})})}function bO(e){e.forEach(gO)}function yO(){typeof ResizeObserver>"u"||(Ti=new ResizeObserver(bO))}function vO(e,t){Ti||yO();const n=hN(e);return n.forEach(a=>{let s=Hh.get(a);s||(s=new Set,Hh.set(a,s)),s.add(t),Ti==null||Ti.observe(a)}),()=>{n.forEach(a=>{const s=Hh.get(a);s==null||s.delete(t),s!=null&&s.size||Ti==null||Ti.unobserve(a)})}}const $h=new Set;let Ho;function wO(){Ho=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};$h.forEach(t=>t(e))},window.addEventListener("resize",Ho)}function SO(e){return $h.add(e),Ho||wO(),()=>{$h.delete(e),!$h.size&&typeof Ho=="function"&&(window.removeEventListener("resize",Ho),Ho=void 0)}}function b6(e,t){return typeof e=="function"?SO(e):vO(e,t)}function NO(e){return gy(e)&&e.tagName==="svg"}const jO=[...cN,jn,Rr],kO=e=>jO.find(oN(e)),y6=()=>({translate:0,scale:1,origin:0,originPoint:0}),$o=()=>({x:y6(),y:y6()}),v6=()=>({min:0,max:0}),Bn=()=>({x:v6(),y:v6()}),CO=new WeakMap;function Wm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function i0(e){return typeof e=="string"||Array.isArray(e)}const by=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yy=["initial",...by];function Xm(e){return Wm(e.animate)||yy.some(t=>i0(e[t]))}function bN(e){return!!(Xm(e)||e.variants)}function AO(e,t,n){for(const a in t){const s=t[a],o=n[a];if(Jn(s))e.addValue(a,s);else if(Jn(o))e.addValue(a,oc(s,{owner:e}));else if(o!==s)if(e.hasValue(a)){const c=e.getValue(a);c.liveStyle===!0?c.jump(s):c.hasAnimated||c.set(s)}else{const c=e.getStaticValue(a);e.addValue(a,oc(c!==void 0?c:s,{owner:e}))}}for(const a in n)t[a]===void 0&&e.removeValue(a);return t}const kg={current:null},yN={current:!1},EO=typeof window<"u";function TO(){if(yN.current=!0,!!EO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kg.current=e.matches;e.addEventListener("change",t),t()}else kg.current=!1}const w6=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let fm={};function vN(e){fm=e}function MO(){return fm}class IO{scrapeMotionValuesFromProps(t,n,a){return{}}constructor({parent:t,props:n,presenceContext:a,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:c,visualState:d},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 v=pa.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,Pt.render(this.render,!1,!0))};const{latestValues:f,renderState:p}=d;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=p,this.parent=t,this.props=n,this.presenceContext=a,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=h,this.blockInitialAnimation=!!c,this.isControllingVariants=Xm(n),this.isVariantNode=bN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:x,...b}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in b){const N=b[v];f[v]!==void 0&&Jn(N)&&N.set(f[v])}}mount(t){var n,a;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,CO.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((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(yN.current||TO(),this.shouldReduceMotion=kg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(a=this.parent)==null||a.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ui(this.notifyUpdate),Ui(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const a=this.features[n];a&&(a.unmount(),a.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&eN.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:h,ease:f,duration:p}=n.accelerate,x=new JS({element:this.current,name:t,keyframes:d,times:h,ease:f,duration:Wa(p)}),b=c(x);this.valueSubscriptions.set(t,()=>{b(),x.cancel()});return}const a=wc.has(t);a&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Pt.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in fm){const n=fm[t];if(!n)continue;const{isEnabled:a,Feature:s}=n;if(!this.features[t]&&s&&a(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let a=0;a<w6.length;a++){const s=w6[a];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,c=t[o];c&&(this.propEventSubscriptions[s]=this.on(s,c))}this.prevMotionValues=AO(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const a=this.values.get(t);n!==a&&(a&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let a=this.values.get(t);return a===void 0&&n!==void 0&&(a=oc(n===null?void 0:n,{owner:this}),this.addValue(t,a)),a}readValue(t,n){let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(bS(a)||vS(a))?a=parseFloat(a):!kO(a)&&Rr.test(n)&&(a=dN(t,n)),this.setBaseTarget(t,Jn(a)?a.get():a)),Jn(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let a;if(typeof n=="string"||typeof n=="object"){const c=hy(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);c&&(a=c[t])}if(n&&a!==void 0)return a;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Jn(s)?s:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ey),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){py.render(this.render)}}class wN extends IO{constructor(){super(...arguments),this.KeyframeResolver=sO}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const a=t.style;return a?a[n]:void 0}removeValueFromRenderState(t,{vars:n,style:a}){delete n[t],delete a[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Jn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ji{constructor(t){this.isMounted=!1,this.node=t}update(){}}function SN({top:e,left:t,right:n,bottom:a}){return{x:{min:t,max:n},y:{min:e,max:a}}}function zO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _O(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:a.y,right:a.x}}function e1(e){return e===void 0||e===1}function Cg({scale:e,scaleX:t,scaleY:n}){return!e1(e)||!e1(t)||!e1(n)}function El(e){return Cg(e)||NN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function NN(e){return S6(e.x)||S6(e.y)}function S6(e){return e&&e!=="0%"}function pm(e,t,n){const a=e-n,s=t*a;return n+s}function N6(e,t,n,a,s){return s!==void 0&&(e=pm(e,s,a)),pm(e,n,a)+t}function Ag(e,t=0,n=1,a,s){e.min=N6(e.min,t,n,a,s),e.max=N6(e.max,t,n,a,s)}function jN(e,{x:t,y:n}){Ag(e.x,t.translate,t.scale,t.originPoint),Ag(e.y,n.translate,n.scale,n.originPoint)}const j6=.999999999999,k6=1.0000000000001;function DO(e,t,n,a=!1){var d;const s=n.length;if(!s)return;t.x=t.y=1;let o,c;for(let h=0;h<s;h++){o=n[h],c=o.projectionDelta;const{visualElement:f}=o.options;f&&f.props.style&&f.props.style.display==="contents"||(a&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Qr(e.x,-o.scroll.offset.x),Qr(e.y,-o.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,jN(e,c)),a&&El(o.latestValues)&&Gh(e,o.latestValues,(d=o.layout)==null?void 0:d.layoutBox))}t.x<k6&&t.x>j6&&(t.x=1),t.y<k6&&t.y>j6&&(t.y=1)}function Qr(e,t){e.min+=t,e.max+=t}function C6(e,t,n,a,s=.5){const o=$t(e.min,e.max,s);Ag(e,t,n,o,a)}function A6(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Gh(e,t,n){const a=n??e;C6(e.x,A6(t.x,a.x),t.scaleX,t.scale,t.originX),C6(e.y,A6(t.y,a.y),t.scaleY,t.scale,t.originY)}function kN(e,t){return SN(_O(e.getBoundingClientRect(),t))}function BO(e,t,n){const a=kN(e,n),{scroll:s}=t;return s&&(Qr(a.x,s.offset.x),Qr(a.y,s.offset.y)),a}const RO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},OO=vc.length;function LO(e,t,n){let a="",s=!0;for(let o=0;o<OO;o++){const c=vc[o],d=e[c];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(c.startsWith("scale")?1:0);else{const f=parseFloat(d);h=c.startsWith("scale")?f===1:f===0}if(!h||n){const f=mN(d,fy[c]);if(!h){s=!1;const p=RO[c]||c;a+=`${p}(${f}) `}n&&(t[c]=f)}}return a=a.trim(),n?a=n(t,s?"":a):s&&(a="none"),a}function vy(e,t,n){const{style:a,vars:s,transformOrigin:o}=e;let c=!1,d=!1;for(const h in t){const f=t[h];if(wc.has(h)){c=!0;continue}else if(BS(h)){s[h]=f;continue}else{const p=mN(f,fy[h]);h.startsWith("origin")?(d=!0,o[h]=p):a[h]=p}}if(t.transform||(c||n?a.transform=LO(t,e.transform,n):a.transform&&(a.transform="none")),d){const{originX:h="50%",originY:f="50%",originZ:p=0}=o;a.transformOrigin=`${h} ${f} ${p}`}}function CN(e,{style:t,vars:n},a,s){const o=e.style;let c;for(c in t)o[c]=t[c];s==null||s.applyProjectionStyles(o,a);for(c in n)o.setProperty(c,n[c])}function E6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Au={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Fe.test(e))e=parseFloat(e);else return e;const n=E6(e,t.target.x),a=E6(e,t.target.y);return`${n}% ${a}%`}},PO={correct:(e,{treeScale:t,projectionDelta:n})=>{const a=e,s=Rr.parse(e);if(s.length>5)return a;const o=Rr.createTransformer(e),c=typeof s[0]!="number"?1:0,d=n.x.scale*t.x,h=n.y.scale*t.y;s[0+c]/=d,s[1+c]/=h;const f=$t(d,h,.5);return typeof s[2+c]=="number"&&(s[2+c]/=f),typeof s[3+c]=="number"&&(s[3+c]/=f),o(s)}},Eg={borderRadius:{...Au,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Au,borderTopRightRadius:Au,borderBottomLeftRadius:Au,borderBottomRightRadius:Au,boxShadow:PO};function AN(e,{layout:t,layoutId:n}){return wc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Eg[e]||e==="opacity")}function wy(e,t,n){var c;const a=e.style,s=t==null?void 0:t.style,o={};if(!a)return o;for(const d in a)(Jn(a[d])||s&&Jn(s[d])||AN(d,e)||((c=n==null?void 0:n.getValue(d))==null?void 0:c.liveStyle)!==void 0)&&(o[d]=a[d]);return o}function UO(e){return window.getComputedStyle(e)}class FO extends wN{constructor(){super(...arguments),this.type="html",this.renderInstance=CN}readValueFromInstance(t,n){var a;if(wc.has(n))return(a=this.projection)!=null&&a.isProjecting?fg(n):lR(t,n);{const s=UO(t),o=(BS(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kN(t,n)}build(t,n,a){vy(t,n,a.transformTemplate)}scrapeMotionValuesFromProps(t,n,a){return wy(t,n,a)}}const VO={offset:"stroke-dashoffset",array:"stroke-dasharray"},qO={offset:"strokeDashoffset",array:"strokeDasharray"};function HO(e,t,n=1,a=0,s=!0){e.pathLength=1;const o=s?VO:qO;e[o.offset]=`${-a}`,e[o.array]=`${t} ${n}`}const $O=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function EN(e,{attrX:t,attrY:n,attrScale:a,pathLength:s,pathSpacing:o=1,pathOffset:c=0,...d},h,f,p){if(vy(e,d,f),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:x,style:b}=e;x.transform&&(b.transform=x.transform,delete x.transform),(b.transform||x.transformOrigin)&&(b.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),b.transform&&(b.transformBox=(p==null?void 0:p.transformBox)??"fill-box",delete x.transformBox);for(const v of $O)x[v]!==void 0&&(b[v]=x[v],delete x[v]);t!==void 0&&(x.x=t),n!==void 0&&(x.y=n),a!==void 0&&(x.scale=a),s!==void 0&&HO(x,s,o,c,!1)}const TN=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"]),MN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function GO(e,t,n,a){CN(e,t,void 0,a);for(const s in t.attrs)e.setAttribute(TN.has(s)?s:my(s),t.attrs[s])}function IN(e,t,n){const a=wy(e,t,n);for(const s in e)if(Jn(e[s])||Jn(t[s])){const o=vc.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;a[o]=e[s]}return a}class YO extends wN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(wc.has(n)){const a=uN(n);return a&&a.default||0}return n=TN.has(n)?n:my(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,a){return IN(t,n,a)}build(t,n,a){EN(t,n,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,n,a,s){GO(t,n,a,s)}mount(t){this.isSVGTag=MN(t.tagName),super.mount(t)}}const WO=yy.length;function zN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<WO;n++){const a=yy[n],s=e.props[a];(i0(s)||s===!1)&&(t[a]=s)}return t}function _N(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let a=0;a<n;a++)if(t[a]!==e[a])return!1;return!0}const XO=[...by].reverse(),KO=by.length;function QO(e){return t=>Promise.all(t.map(({animation:n,options:a})=>WR(e,n,a)))}function JO(e){let t=QO(e),n=T6(),a=!0,s=!1;const o=f=>(p,x)=>{var v;const b=Ol(e,x,f==="exit"?(v=e.presenceContext)==null?void 0:v.custom:void 0);if(b){const{transition:N,transitionEnd:j,...T}=b;p={...p,...T,...j}}return p};function c(f){t=f(e)}function d(f){const{props:p}=e,x=zN(e.parent)||{},b=[],v=new Set;let N={},j=1/0;for(let E=0;E<KO;E++){const D=XO[E],k=n[D],M=p[D]!==void 0?p[D]:x[D],B=i0(M),_=D===f?k.isActive:null;_===!1&&(j=E);let U=M===x[D]&&M!==p[D]&&B;if(U&&(a||s)&&e.manuallyAnimateOnMount&&(U=!1),k.protectedKeys={...N},!k.isActive&&_===null||!M&&!k.prevProp||Wm(M)||typeof M=="boolean")continue;if(D==="exit"&&k.isActive&&_!==!0){k.prevResolvedValues&&(N={...N,...k.prevResolvedValues});continue}const F=ZO(k.prevProp,M);let W=F||D===f&&k.isActive&&!U&&B||E>j&&B,ae=!1;const le=Array.isArray(M)?M:[M];let re=le.reduce(o(D),{});_===!1&&(re={});const{prevResolvedValues:xe={}}=k,te={...xe,...re},H=Z=>{W=!0,v.has(Z)&&(ae=!0,v.delete(Z)),k.needsAnimating[Z]=!0;const Y=e.getValue(Z);Y&&(Y.liveStyle=!1)};for(const Z in te){const Y=re[Z],I=xe[Z];if(N.hasOwnProperty(Z))continue;let R=!1;vg(Y)&&vg(I)?R=!_N(Y,I):R=Y!==I,R?Y!=null?H(Z):v.add(Z):Y!==void 0&&v.has(Z)?H(Z):k.protectedKeys[Z]=!0}k.prevProp=M,k.prevResolvedValues=re,k.isActive&&(N={...N,...re}),(a||s)&&e.blockInitialAnimation&&(W=!1);const V=U&&F;W&&(!V||ae)&&b.push(...le.map(Z=>{const Y={type:D};if(typeof Z=="string"&&(a||s)&&!V&&e.manuallyAnimateOnMount&&e.parent){const{parent:I}=e,R=Ol(I,Z);if(I.enteringChildren&&R){const{delayChildren:J}=R.transition||{};Y.delay=tN(I.enteringChildren,e,J)}}return{animation:Z,options:Y}}))}if(v.size){const E={};if(typeof p.initial!="boolean"){const D=Ol(e,Array.isArray(p.initial)?p.initial[0]:p.initial);D&&D.transition&&(E.transition=D.transition)}v.forEach(D=>{const k=e.getBaseTarget(D),M=e.getValue(D);M&&(M.liveStyle=!0),E[D]=k??null}),b.push({animation:E})}let T=!!b.length;return a&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(T=!1),a=!1,s=!1,T?t(b):Promise.resolve()}function h(f,p){var b;if(n[f].isActive===p)return Promise.resolve();(b=e.variantChildren)==null||b.forEach(v=>{var N;return(N=v.animationState)==null?void 0:N.setActive(f,p)}),n[f].isActive=p;const x=d(f);for(const v in n)n[v].protectedKeys={};return x}return{animateChanges:d,setActive:h,setAnimateFunction:c,getState:()=>n,reset:()=>{n=T6(),s=!0}}}function ZO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!_N(t,e):!1}function wl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function T6(){return{animate:wl(!0),whileInView:wl(),whileHover:wl(),whileTap:wl(),whileDrag:wl(),whileFocus:wl(),exit:wl()}}function Tg(e,t){e.min=t.min,e.max=t.max}function Ir(e,t){Tg(e.x,t.x),Tg(e.y,t.y)}function M6(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const DN=1e-4,eL=1-DN,tL=1+DN,BN=.01,nL=0-BN,aL=0+BN;function xa(e){return e.max-e.min}function rL(e,t,n){return Math.abs(e-t)<=n}function I6(e,t,n,a=.5){e.origin=a,e.originPoint=$t(t.min,t.max,e.origin),e.scale=xa(n)/xa(t),e.translate=$t(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eL&&e.scale<=tL||isNaN(e.scale))&&(e.scale=1),(e.translate>=nL&&e.translate<=aL||isNaN(e.translate))&&(e.translate=0)}function $u(e,t,n,a){I6(e.x,t.x,n.x,a?a.originX:void 0),I6(e.y,t.y,n.y,a?a.originY:void 0)}function z6(e,t,n,a=0){const s=a?$t(n.min,n.max,a):n.min;e.min=s+t.min,e.max=e.min+xa(t)}function sL(e,t,n,a){z6(e.x,t.x,n.x,a==null?void 0:a.x),z6(e.y,t.y,n.y,a==null?void 0:a.y)}function _6(e,t,n,a=0){const s=a?$t(n.min,n.max,a):n.min;e.min=t.min-s,e.max=e.min+xa(t)}function xm(e,t,n,a){_6(e.x,t.x,n.x,a==null?void 0:a.x),_6(e.y,t.y,n.y,a==null?void 0:a.y)}function D6(e,t,n,a,s){return e-=t,e=pm(e,1/n,a),s!==void 0&&(e=pm(e,1/s,a)),e}function iL(e,t=0,n=1,a=.5,s,o=e,c=e){if(ss.test(t)&&(t=parseFloat(t),t=$t(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=$t(o.min,o.max,a);e===o&&(d-=t),e.min=D6(e.min,t,n,d,s),e.max=D6(e.max,t,n,d,s)}function B6(e,t,[n,a,s],o,c){iL(e,t[n],t[a],t[s],t.scale,o,c)}const lL=["x","scaleX","originX"],oL=["y","scaleY","originY"];function R6(e,t,n,a){B6(e.x,t,lL,n?n.x:void 0,a?a.x:void 0),B6(e.y,t,oL,n?n.y:void 0,a?a.y:void 0)}function O6(e){return e.translate===0&&e.scale===1}function RN(e){return O6(e.x)&&O6(e.y)}function L6(e,t){return e.min===t.min&&e.max===t.max}function cL(e,t){return L6(e.x,t.x)&&L6(e.y,t.y)}function P6(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ON(e,t){return P6(e.x,t.x)&&P6(e.y,t.y)}function U6(e){return xa(e.x)/xa(e.y)}function F6(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Wr(e){return[e("x"),e("y")]}
vendor: 1,551 bytes, line 1455
1455function uL(e,t,n){let a="";const s=e.x.translate/t.x,o=e.y.translate/t.y,c=(n==null?void 0:n.z)||0;if((s||o||c)&&(a=`translate3d(${s}px, ${o}px, ${c}px) `),(t.x!==1||t.y!==1)&&(a+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:p,rotateX:x,rotateY:b,skewX:v,skewY:N}=n;f&&(a=`perspective(${f}px) ${a}`),p&&(a+=`rotate(${p}deg) `),x&&(a+=`rotateX(${x}deg) `),b&&(a+=`rotateY(${b}deg) `),v&&(a+=`skewX(${v}deg) `),N&&(a+=`skewY(${N}deg) `)}const d=e.x.scale*t.x,h=e.y.scale*t.y;return(d!==1||h!==1)&&(a+=`scale(${d}, ${h})`),a||"none"}const LN=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],dL=LN.length,V6=e=>typeof e=="string"?parseFloat(e):e,q6=e=>typeof e=="number"||Fe.test(e);function hL(e,t,n,a,s,o){s?(e.opacity=$t(0,n.opacity??1,mL(a)),e.opacityExit=$t(t.opacity??1,0,fL(a))):o&&(e.opacity=$t(t.opacity??1,n.opacity??1,a));for(let c=0;c<dL;c++){const d=LN[c];let h=H6(t,d),f=H6(n,d);if(h===void 0&&f===void 0)continue;h||(h=0),f||(f=0),h===0||f===0||q6(h)===q6(f)?(e[d]=Math.max($t(V6(h),V6(f),a),0),(ss.test(f)||ss.test(h))&&(e[d]+="%")):e[d]=f}(t.rotate||n.rotate)&&(e.rotate=$t(t.rotate||0,n.rotate||0,a))}function H6(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mL=PN(0,.5,TS),fL=PN(.5,.95,yr);function PN(e,t,n){return a=>a<e?0:a>t?1:n(r0(e,t,a))}function pL(e,t,n){const a=Jn(e)?e:oc(e);return a.start(dy("",a,t,n)),a.animation}function l0(e,t,n,a={passive:!0}){return e.addEventListener(t,n,a),()=>e.removeEventListener(t,n)}const xL=(e,t)=>e.depth-t.depth;
vendor: 24,126 bytes, line 1455
1455class gL{constructor(){this.children=[],this.isDirty=!1}add(t){Jb(this.children,t),this.isDirty=!0}remove(t){cm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xL),this.isDirty=!1,this.children.forEach(t)}}function bL(e,t){const n=pa.now(),a=({timestamp:s})=>{const o=s-n;o>=t&&(Ui(a),e(o-t))};return Pt.setup(a,!0),()=>Ui(a)}function Yh(e){return Jn(e)?e.get():e}class yL{constructor(){this.members=[]}add(t){Jb(this.members,t);for(let n=this.members.length-1;n>=0;n--){const a=this.members[n];if(a===t||a===this.lead||a===this.prevLead)continue;const s=a.instance;(!s||s.isConnected===!1)&&!a.snapshot&&(cm(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(cm(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let a=this.members.indexOf(t)-1;a>=0;a--){const s=this.members[a];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=a.options,{layoutDependency:c}=t.options;(o===void 0||o!==c)&&(t.resumeFrom=a,n&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,a,s,o,c;(a=(n=t.options).onExitComplete)==null||a.call(n),(c=(s=t.resumingFrom)==null?void 0:(o=s.options).onExitComplete)==null||c.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Wh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},t1=["","X","Y","Z"],vL=1e3;let wL=0;function n1(e,t,n,a){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),a&&(a[e]=0))}function UN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=iN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Pt,!(s||o))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&UN(a)}function FN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:a,resetTransform:s}){return class{constructor(c={},d=t==null?void 0:t()){this.id=wL++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(jL),this.nodes.forEach(ML),this.nodes.forEach(IL),this.nodes.forEach(kL)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new gL)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new ey),this.eventHandlers.get(c).add(d)}notifyListeners(c,...d){const h=this.eventHandlers.get(c);h&&h.notify(...d)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=gy(c)&&!NO(c),this.instance=c;const{layoutId:d,layout:h,visualElement:f}=this.options;if(f&&!f.current&&f.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||d)&&(this.isLayoutDirty=!0),e){let p,x=0;const b=()=>this.root.updateBlockedByResize=!1;Pt.read(()=>{x=window.innerWidth}),e(c,()=>{const v=window.innerWidth;v!==x&&(x=v,this.root.updateBlockedByResize=!0,p&&p(),p=bL(b,250),Wh.hasAnimatedSinceResize&&(Wh.hasAnimatedSinceResize=!1,this.nodes.forEach(Y6)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&f&&(d||h)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:x,hasRelativeLayoutChanged:b,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const N=this.options.transition||f.getDefaultTransition()||RL,{onLayoutAnimationStart:j,onLayoutAnimationComplete:T}=f.getProps(),E=!this.targetLayout||!ON(this.targetLayout,v),D=!x&&b;if(this.options.layoutRoot||this.resumeFrom||D||x&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...uy(N,"layout"),onPlay:j,onComplete:T};(f.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(p,D)}else x||Y6(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ui(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(zL),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&UN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const x=this.path[p];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:d,layout:h}=this.options;if(d===void 0&&!h)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(AL),this.nodes.forEach($6);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(G6);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(EL),this.nodes.forEach(TL),this.nodes.forEach(SL),this.nodes.forEach(NL)):this.nodes.forEach(G6),this.clearAllSnapshots();const d=pa.now();Qn.delta=ls(0,1e3/60,d-Qn.timestamp),Qn.timestamp=d,Qn.isProcessing=!0,Yx.update.process(Qn),Yx.preRender.process(Qn),Yx.render.process(Qn),Qn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,py.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CL),this.sharedNodes.forEach(_L)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xa(this.snapshot.measuredBox.x)&&!xa(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Bn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const h=a(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!s)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!RN(this.projectionDelta),h=this.getTransformTemplate(),f=h?h(this.latestValues,""):void 0,p=f!==this.prevTransformTemplateValue;c&&this.instance&&(d||El(this.latestValues)||p)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const d=this.measurePageBox();let h=this.removeElementScroll(d);return c&&(h=this.removeTransform(h)),OL(h),{animationId:this.root.animationId,measuredBox:d,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:c}=this.options;if(!c)return Bn();const d=c.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(LL))){const{scroll:p}=this.root;p&&(Qr(d.x,p.offset.x),Qr(d.y,p.offset.y))}return d}removeElementScroll(c){var h;const d=Bn();if(Ir(d,c),(h=this.scroll)!=null&&h.wasRoot)return d;for(let f=0;f<this.path.length;f++){const p=this.path[f],{scroll:x,options:b}=p;p!==this.root&&x&&b.layoutScroll&&(x.wasRoot&&Ir(d,c),Qr(d.x,x.offset.x),Qr(d.y,x.offset.y))}return d}applyTransform(c,d=!1,h){var p,x;const f=h||Bn();Ir(f,c);for(let b=0;b<this.path.length;b++){const v=this.path[b];!d&&v.options.layoutScroll&&v.scroll&&v!==v.root&&(Qr(f.x,-v.scroll.offset.x),Qr(f.y,-v.scroll.offset.y)),El(v.latestValues)&&Gh(f,v.latestValues,(p=v.layout)==null?void 0:p.layoutBox)}return El(this.latestValues)&&Gh(f,this.latestValues,(x=this.layout)==null?void 0:x.layoutBox),f}removeTransform(c){var h;const d=Bn();Ir(d,c);for(let f=0;f<this.path.length;f++){const p=this.path[f];if(!El(p.latestValues))continue;let x;p.instance&&(Cg(p.latestValues)&&p.updateSnapshot(),x=Bn(),Ir(x,p.measurePageBox())),R6(d,p.latestValues,(h=p.snapshot)==null?void 0:h.layoutBox,x)}return El(this.latestValues)&&R6(d,this.latestValues),d}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==Qn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var v;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(c||h&&this.isSharedProjectionDirty||this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:x}=this.options;if(!this.layout||!(p||x))return;this.resolvedRelativeTargetAt=Qn.timestamp;const b=this.getClosestProjectingParent();b&&this.linkedParentVersion!==b.layoutVersion&&!b.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bn(),this.targetWithTransforms=Bn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sL(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ir(this.target,this.layout.layoutBox),jN(this.target,this.targetDelta)):Ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Cg(this.parent.latestValues)||NN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,d,h){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bn(),this.relativeTargetOrigin=Bn(),xm(this.relativeTargetOrigin,d,h,this.options.layoutAnchor||void 0),Ir(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var N;const c=this.getLead(),d=!!this.resumingFrom||this!==c;let h=!0;if((this.isProjectionDirty||(N=this.parent)!=null&&N.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Qn.timestamp&&(h=!1),h)return;const{layout:f,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||p))return;Ir(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,b=this.treeScale.y;DO(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Bn());const{target:v}=c;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(M6(this.prevProjectionDelta.x,this.projectionDelta.x),M6(this.prevProjectionDelta.y,this.projectionDelta.y)),$u(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==b||!F6(this.projectionDelta.x,this.prevProjectionDelta.x)||!F6(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),c){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$o(),this.projectionDelta=$o(),this.projectionDeltaWithTransform=$o()}setAnimationOrigin(c,d=!1){const h=this.snapshot,f=h?h.latestValues:{},p={...this.latestValues},x=$o();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=Bn(),v=h?h.source:void 0,N=this.layout?this.layout.source:void 0,j=v!==N,T=this.getStack(),E=!T||T.members.length<=1,D=!!(j&&!E&&this.options.crossfade===!0&&!this.path.some(BL));this.animationProgress=0;let k;this.mixTargetDelta=M=>{const B=M/1e3;W6(x.x,c.x,B),W6(x.y,c.y,B),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xm(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),DL(this.relativeTarget,this.relativeTargetOrigin,b,B),k&&cL(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Bn()),Ir(k,this.relativeTarget)),j&&(this.animationValues=p,hL(p,f,this.latestValues,B,D,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var d,h,f;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(f=(h=this.resumingFrom)==null?void 0:h.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Ui(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pt.update(()=>{Wh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=oc(0)),this.motionValue.jump(0,!1),this.currentAnimation=pL(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:p=>{this.mixTargetDelta(p),c.onUpdate&&c.onUpdate(p)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(vL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:h,layout:f,latestValues:p}=c;if(!(!d||!h||!f)){if(this!==c&&this.layout&&f&&VN(this.options.animationType,this.layout.layoutBox,f.layoutBox)){h=this.target||Bn();const x=xa(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+x;const b=xa(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+b}Ir(d,h),Gh(d,p),$u(this.projectionDeltaWithTransform,this.layoutCorrected,d,p)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new yL),this.sharedNodes.get(c).add(d);const f=d.options.initialPromotionConfig;d.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var d;const{layoutId:c}=this.options;return c?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:c}=this.options;return c?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:h}={}){const f=this.getStack();f&&f.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(d=!0),!d)return;const f={};h.z&&n1("z",c,f,this.animationValues);for(let p=0;p<t1.length;p++)n1(`rotate${t1[p]}`,c,f,this.animationValues),n1(`skew${t1[p]}`,c,f,this.animationValues);c.render();for(const p in f)c.setStaticValue(p,f[p]),this.animationValues&&(this.animationValues[p]=f[p]);c.scheduleRender()}applyProjectionStyles(c,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Yh(d==null?void 0:d.pointerEvents)||"",c.transform=h?h(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Yh(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!El(this.latestValues)&&(c.transform=h?h({},""):"none",this.hasProjected=!1);return}c.visibility="";const p=f.animationValues||f.latestValues;this.applyTransformsToTarget();let x=uL(this.projectionDeltaWithTransform,this.treeScale,p);h&&(x=h(p,x)),c.transform=x;const{x:b,y:v}=this.projectionDelta;c.transformOrigin=`${b.origin*100}% ${v.origin*100}% 0`,f.animationValues?c.opacity=f===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const N in Eg){if(p[N]===void 0)continue;const{correct:j,applyTo:T,isCSSVariable:E}=Eg[N],D=x==="none"?p[N]:j(p[N],f);if(T){const k=T.length;for(let M=0;M<k;M++)c[T[M]]=D}else E?this.options.visualElement.renderState.vars[N]=D:c[N]=D}this.options.layoutId&&(c.pointerEvents=f===this?Yh(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var d;return(d=c.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach($6),this.root.sharedNodes.clear()}}}function SL(e){e.updateLayout()}function NL(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:a,measuredBox:s}=e.layout,{animationType:o}=e.options,c=t.source!==e.layout.source;if(o==="size")Wr(x=>{const b=c?t.measuredBox[x]:t.layoutBox[x],v=xa(b);b.min=a[x].min,b.max=b.min+v});else if(o==="x"||o==="y"){const x=o==="x"?"y":"x";Tg(c?t.measuredBox[x]:t.layoutBox[x],a[x])}else VN(o,t.layoutBox,a)&&Wr(x=>{const b=c?t.measuredBox[x]:t.layoutBox[x],v=xa(a[x]);b.max=b.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[x].max=e.relativeTarget[x].min+v)});const d=$o();$u(d,a,t.layoutBox);const h=$o();c?$u(h,e.applyTransform(s,!0),t.measuredBox):$u(h,a,t.layoutBox);const f=!RN(d);let p=!1;if(!e.resumeFrom){const x=e.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:b,layout:v}=x;if(b&&v){const N=e.options.layoutAnchor||void 0,j=Bn();xm(j,t.layoutBox,b.layoutBox,N);const T=Bn();xm(T,a,v.layoutBox,N),ON(j,T)||(p=!0),x.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=j,e.relativeParent=x)}}}e.notifyListeners("didUpdate",{layout:a,snapshot:t,delta:h,layoutDelta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:a}=e.options;a&&a()}e.options.transition=void 0}function jL(e){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 kL(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CL(e){e.clearSnapshot()}function $6(e){e.clearMeasurements()}function AL(e){e.isLayoutDirty=!0,e.updateLayout()}function G6(e){e.isLayoutDirty=!1}function EL(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function TL(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Y6(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ML(e){e.resolveTargetDelta()}function IL(e){e.calcProjection()}
1455function zL(e){e.resetSkewAndRotation()}function _L(e){e.removeLeadSnapshot()}function W6(e,t,n){e.translate=$t(t.translate,0,n),e.scale=$t(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function X6(e,t,n,a){e.min=$t(t.min,n.min,a),e.max=$t(t.max,n.max,a)}function DL(e,t,n,a){X6(e.x,t.x,n.x,a),X6(e.y,t.y,n.y,a)}function BL(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const RL={duration:.45,ease:[.4,0,.1,1]},K6=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Q6=K6("applewebkit/")&&!K6("chrome/")?Math.round:yr;function J6(e){e.min=Q6(e.min),e.max=Q6(e.max)}function OL(e){J6(e.x),J6(e.y)}function VN(e,t,n){return e==="position"||e==="preserve-aspect"&&!rL(U6(t),U6(n),.2)}function LL(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const PL=FN({attachResizeListener:(e,t)=>l0(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),a1={current:void 0},qN=FN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!a1.current){const e=new PL({});e.mount(window),e.setOptions({layoutScroll:!0}),a1.current=e}return a1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sy=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Z6(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function UL(...e){return t=>{let n=!1;const a=e.map(s=>{const o=Z6(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<a.length;s++){const o=a[s];typeof o=="function"?o():Z6(e[s],null)}}}}function FL(...e){return w.useCallback(UL(...e),e)}class VL extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Vh(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=n.offsetParent,s=Vh(a)&&a.offsetWidth||0,o=Vh(a)&&a.offsetHeight||0,c=getComputedStyle(n),d=this.props.sizeRef.current;d.height=parseFloat(c.height),d.width=parseFloat(c.width),d.top=n.offsetTop,d.left=n.offsetLeft,d.right=s-d.width-d.left,d.bottom=o-d.height-d.top}return null}componentDidUpdate(){}render(){return this.props.children}}function qL({children:e,isPresent:t,anchorX:n,anchorY:a,root:s,pop:o}){var b;const c=w.useId(),d=w.useRef(null),h=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=w.useContext(Sy),p=((b=e.props)==null?void 0:b.ref)??(e==null?void 0:e.ref),x=FL(d,p);return w.useInsertionEffect(()=>{const{width:v,height:N,top:j,left:T,right:E,bottom:D}=h.current;if(t||o===!1||!d.current||!v||!N)return;const k=n==="left"?`left: ${T}`:`right: ${E}`,M=a==="bottom"?`bottom: ${D}`:`top: ${j}`;d.current.dataset.motionPopId=c;const B=document.createElement("style");f&&(B.nonce=f);const _=s??document.head;return _.appendChild(B),B.sheet&&B.sheet.insertRule(` 1456 [data-motion-pop-id="${c}"] { 1457 position: absolute !important; 1458 width: ${v}px !important; 1459 height: ${N}px !important; 1460 ${k}px !important; 1461 ${M}px !important; 1462 } 1463 `),()=>{var U;(U=d.current)==null||U.removeAttribute("data-motion-pop-id"),_.contains(B)&&_.removeChild(B)}},[t]),i.jsx(VL,{isPresent:t,childRef:d,sizeRef:h,pop:o,children:o===!1?e:w.cloneElement(e,{ref:x})})}const HL=({children:e,initial:t,isPresent:n,onExitComplete:a,custom:s,presenceAffectsLayout:o,mode:c,anchorX:d,anchorY:h,root:f})=>{const p=Qb($L),x=w.useId();let b=!0,v=w.useMemo(()=>(b=!1,{id:x,initial:t,isPresent:n,custom:s,onExitComplete:N=>{p.set(N,!0);for(const j of p.values())if(!j)return;a&&a()},register:N=>(p.set(N,!1),()=>p.delete(N))}),[n,p,a]);return o&&b&&(v={...v}),w.useMemo(()=>{p.forEach((N,j)=>p.set(j,!1))},[n]),w.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),e=i.jsx(qL,{pop:c==="popLayout",isPresent:n,anchorX:d,anchorY:h,root:f,children:e}),i.jsx(Gm.Provider,{value:v,children:e})};function $L(){return new Map}function HN(e=!0){const t=w.useContext(Gm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:s}=t,o=w.useId();w.useEffect(()=>{if(e)return s(o)},[e]);const c=w.useCallback(()=>e&&a&&a(o),[o,a,e]);return!n&&a?[!1,c]:[!0]}const fh=e=>e.key||"";function ew(e){const t=[];
vendor: 6,799 bytes, line 1463
1463return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const bt=({children:e,custom:t,initial:n=!0,onExitComplete:a,presenceAffectsLayout:s=!0,mode:o="sync",propagate:c=!1,anchorX:d="left",anchorY:h="top",root:f})=>{const[p,x]=HN(c),b=w.useMemo(()=>ew(e),[e]),v=c&&!p?[]:b.map(fh),N=w.useRef(!0),j=w.useRef(b),T=Qb(()=>new Map),E=w.useRef(new Set),[D,k]=w.useState(b),[M,B]=w.useState(b);gS(()=>{N.current=!1,j.current=b;for(let F=0;F<M.length;F++){const W=fh(M[F]);v.includes(W)?(T.delete(W),E.current.delete(W)):T.get(W)!==!0&&T.set(W,!1)}},[M,v.length,v.join("-")]);const _=[];if(b!==D){let F=[...b];for(let W=0;W<M.length;W++){const ae=M[W],le=fh(ae);v.includes(le)||(F.splice(W,0,ae),_.push(ae))}return o==="wait"&&_.length&&(F=_),B(ew(F)),k(b),null}const{forceRender:U}=w.useContext(Kb);return i.jsx(i.Fragment,{children:M.map(F=>{const W=fh(F),ae=c&&!p?!1:b===M||v.includes(W),le=()=>{if(E.current.has(W))return;if(T.has(W))E.current.add(W),T.set(W,!0);else return;let re=!0;T.forEach(xe=>{xe||(re=!1)}),re&&(U==null||U(),B(j.current),c&&(x==null||x()),a&&a())};return i.jsx(HL,{isPresent:ae,initial:!N.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:ae?void 0:le,anchorX:d,anchorY:h,children:F},W)})})},$N=w.createContext({strict:!1}),tw={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"]};let nw=!1;function GL(){if(nw)return;const e={};for(const t in tw)e[t]={isEnabled:n=>tw[t].some(a=>!!n[a])};vN(e),nw=!0}function GN(){return GL(),MO()}function YL(e){const t=GN();for(const n in e)t[n]={...t[n],...e[n]};vN(t)}const WL=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","propagate","ignoreStrict","viewport"]);function gm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||WL.has(e)}let YN=e=>!gm(e);function XL(e){typeof e=="function"&&(YN=t=>t.startsWith("on")?!gm(t):e(t))}try{XL(require("@emotion/is-prop-valid").default)}catch{}function KL(e,t,n){const a={};for(const s in e)s==="values"&&typeof e.values=="object"||Jn(e[s])||(YN(s)||n===!0&&gm(s)||!t&&!gm(s)||e.draggable&&s.startsWith("onDrag"))&&(a[s]=e[s]);return a}const Km=w.createContext({});function QL(e,t){if(Xm(e)){const{initial:n,animate:a}=e;return{initial:n===!1||i0(n)?n:void 0,animate:i0(a)?a:void 0}}return e.inherit!==!1?t:{}}function JL(e){const{initial:t,animate:n}=QL(e,w.useContext(Km));return w.useMemo(()=>({initial:t,animate:n}),[aw(t),aw(n)])}function aw(e){return Array.isArray(e)?e.join(" "):e}const Ny=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function WN(e,t,n){for(const a in t)!Jn(t[a])&&!AN(a,n)&&(e[a]=t[a])}function ZL({transformTemplate:e},t){return w.useMemo(()=>{const n=Ny();return vy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eP(e,t){const n=e.style||{},a={};return WN(a,n,e),Object.assign(a,ZL(e,t)),a}function tP(e,t){const n={},a=eP(e,t);return e.drag&&e.dragListener!==!1&&(n.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)&&(n.tabIndex=0),n.style=a,n}const XN=()=>({...Ny(),attrs:{}});function nP(e,t,n,a){const s=w.useMemo(()=>{const o=XN();return EN(o,t,MN(a),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};WN(o,e.style,e),s.style={...o,...s.style}}return s}const aP=["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 jy(e){return typeof e!="string"||e.includes("-")?!1:!!(aP.indexOf(e)>-1||/[A-Z]/u.test(e))}function rP(e,t,n,{latestValues:a},s,o=!1,c){const h=(c??jy(e)?nP:tP)(t,a,s,e),f=KL(t,typeof e=="string",o),p=e!==w.Fragment?{...f,...h,ref:n}:{},{children:x}=t,b=w.useMemo(()=>Jn(x)?x.get():x,[x]);return w.createElement(e,{...p,children:b})}function sP({scrapeMotionValuesFromProps:e,createRenderState:t},n,a,s){return{latestValues:iP(n,a,s,e),renderState:t()}}function iP(e,t,n,a){const s={},o=a(e,{});for(const b in o)s[b]=Yh(o[b]);let{initial:c,animate:d}=e;const h=Xm(e),f=bN(e);t&&f&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let p=n?n.initial===!1:!1;p=p||c===!1;const x=p?d:c;if(x&&typeof x!="boolean"&&!Wm(x)){const b=Array.isArray(x)?x:[x];for(let v=0;v<b.length;v++){const N=hy(e,b[v]);if(N){const{transitionEnd:j,transition:T,...E}=N;for(const D in E){let k=E[D];if(Array.isArray(k)){const M=p?k.length-1:0;k=k[M]}k!==null&&(s[D]=k)}for(const D in j)s[D]=j[D]}}}return s}const KN=e=>(t,n)=>{const a=w.useContext(Km),s=w.useContext(Gm),o=()=>sP(e,t,a,s);return n?o():Qb(o)},lP=KN({scrapeMotionValuesFromProps:wy,createRenderState:Ny}),oP=KN({scrapeMotionValuesFromProps:IN,createRenderState:XN}),cP=Symbol.for("motionComponentSymbol");function uP(e,t,n){const a=w.useRef(n);w.useInsertionEffect(()=>{a.current=n});const s=w.useRef(null);return w.useCallback(o=>{var d;o&&((d=e.onMount)==null||d.call(e,o));const c=a.current;if(typeof c=="function")if(o){const h=c(o);typeof h=="function"&&(s.current=h)}else s.current?(s.current(),s.current=null):c(o);else c&&(c.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const QN=w.createContext({});function Uo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dP(e,t,n,a,s,o){var k,M;const{visualElement:c}=w.useContext(Km),d=w.useContext($N),h=w.useContext(Gm),f=w.useContext(Sy),p=f.reducedMotion,x=f.skipAnimations,b=w.useRef(null),v=w.useRef(!1);a=a||d.renderer,!b.current&&a&&(b.current=a(e,{visualState:t,parent:c,props:n,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:p,skipAnimations:x,isSVG:o}),v.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const N=b.current,j=w.useContext(QN);N&&!N.projection&&s&&(N.type==="html"||N.type==="svg")&&hP(b.current,n,s,j);const T=w.useRef(!1);w.useInsertionEffect(()=>{N&&T.current&&N.update(n,h)});
vendor: 20,084 bytes, line 1463
1463const E=n[sN],D=w.useRef(!!E&&typeof window<"u"&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,E))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,E)));return gS(()=>{v.current=!0,N&&(T.current=!0,window.MotionIsMounted=!0,N.updateFeatures(),N.scheduleRenderMicrotask(),D.current&&N.animationState&&N.animationState.animateChanges())}),w.useEffect(()=>{N&&(!D.current&&N.animationState&&N.animationState.animateChanges(),D.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)==null||B.call(window,E)}),D.current=!1),N.enteringChildren=void 0)}),N}function hP(e,t,n,a){const{layoutId:s,layout:o,drag:c,dragConstraints:d,layoutScroll:h,layoutRoot:f,layoutAnchor:p,layoutCrossfade:x}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:JN(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!c||d&&Uo(d),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:a,crossfade:x,layoutScroll:h,layoutRoot:f,layoutAnchor:p})}function JN(e){if(e)return e.options.allowProjection!==!1?e.projection:JN(e.parent)}function r1(e,{forwardMotionProps:t=!1,type:n}={},a,s){a&&YL(a);const o=n?n==="svg":jy(e),c=o?oP:lP;function d(f,p){let x;const b={...w.useContext(Sy),...f,layoutId:mP(f)},{isStatic:v}=b,N=JL(f),j=c(f,v);if(!v&&typeof window<"u"){fP();const T=pP(b);x=T.MeasureLayout,N.visualElement=dP(e,j,b,s,T.ProjectionNode,o)}return i.jsxs(Km.Provider,{value:N,children:[x&&N.visualElement?i.jsx(x,{visualElement:N.visualElement,...b}):null,rP(e,f,uP(j,N.visualElement,p),j,v,t,o)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=w.forwardRef(d);return h[cP]=e,h}function mP({layoutId:e}){const t=w.useContext(Kb).id;return t&&e!==void 0?t+"-"+e:e}function fP(e,t){w.useContext($N).strict}function pP(e){const t=GN(),{drag:n,layout:a}=t;if(!n&&!a)return{};const s={...n,...a};return{MeasureLayout:n!=null&&n.isEnabled(e)||a!=null&&a.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xP(e,t){if(typeof Proxy>"u")return r1;const n=new Map,a=(o,c)=>r1(o,c,e,t),s=(o,c)=>a(o,c);return new Proxy(s,{get:(o,c)=>c==="create"?a:(n.has(c)||n.set(c,r1(c,void 0,e,t)),n.get(c))})}const gP=(e,t)=>t.isSVG??jy(e)?new YO(t):new FO(t,{allowProjection:e!==w.Fragment});class bP extends Ji{constructor(t){super(t),t.animationState||(t.animationState=JO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let yP=0;class vP extends Ji{constructor(){super(...arguments),this.id=yP++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===a)return;if(t&&a===!1){if(this.isExitComplete){const{initial:c,custom:d}=this.node.getProps();if(typeof c=="string"){const h=Ol(this.node,c,d);if(h){const{transition:f,transitionEnd:p,...x}=h;for(const b in x)(o=this.node.getValue(b))==null||o.jump(x[b])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const wP={animation:{Feature:bP},exit:{Feature:vP}};function R0(e){return{point:{x:e.pageX,y:e.pageY}}}const SP=e=>t=>xy(t)&&e(t,R0(t));function Gu(e,t,n,a){return l0(e,t,SP(n),a)}const ZN=({current:e})=>e?e.ownerDocument.defaultView:null,rw=(e,t)=>Math.abs(e-t);function NP(e,t){const n=rw(e.x,t.x),a=rw(e.y,t.y);return Math.sqrt(n**2+a**2)}const sw=new Set(["auto","scroll"]);class ej{constructor(t,n,{transformPagePoint:a,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:c=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ph(this.lastRawMoveEventInfo,this.transformPagePoint));const v=s1(this.lastMoveEventInfo,this.history),N=this.startEvent!==null,j=NP(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!N&&!j)return;const{point:T}=v,{timestamp:E}=Qn;this.history.push({...T,timestamp:E});const{onStart:D,onMove:k}=this.handlers;N||(D&&D(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,v)},this.handlePointerMove=(v,N)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=N,this.lastMoveEventInfo=ph(N,this.transformPagePoint),Pt.update(this.updatePoint,!0)},this.handlePointerUp=(v,N)=>{this.end();const{onEnd:j,onSessionEnd:T,resumeAnimation:E}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=s1(v.type==="pointercancel"?this.lastMoveEventInfo:ph(N,this.transformPagePoint),this.history);this.startEvent&&j&&j(v,D),T&&T(v,D)},!xy(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=c,this.contextWindow=s||window;const h=R0(t),f=ph(h,this.transformPagePoint),{point:p}=f,{timestamp:x}=Qn;this.history=[{...p,timestamp:x}];const{onSessionStart:b}=n;b&&b(t,s1(f,this.history)),this.removeListeners=_0(Gu(this.contextWindow,"pointermove",this.handlePointerMove),Gu(this.contextWindow,"pointerup",this.handlePointerUp),Gu(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const a=getComputedStyle(n);(sw.has(a.overflowX)||sw.has(a.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const a=t===window,s=a?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Pt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ui(this.updatePoint)}}function ph(e,t){return t?{point:t(e.point)}:e}function iw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function s1({point:e},t){return{point:e,delta:iw(e,tj(t)),offset:iw(e,jP(t)),velocity:kP(t,.1)}}function jP(e){return e[0]}function tj(e){return e[e.length-1]}function kP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,a=null;const s=tj(e);for(;n>=0&&(a=e[n],!(s.timestamp-a.timestamp>Wa(t)));)n--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&s.timestamp-a.timestamp>Wa(t)*2&&(a=e[1]);const o=xr(s.timestamp-a.timestamp);if(o===0)return{x:0,y:0};const c={x:(s.x-a.x)/o,y:(s.y-a.y)/o};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function CP(e,{min:t,max:n},a){return t!==void 0&&e<t?e=a?$t(t,e,a.min):Math.max(e,t):n!==void 0&&e>n&&(e=a?$t(n,e,a.max):Math.min(e,n)),e}function lw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AP(e,{top:t,left:n,bottom:a,right:s}){return{x:lw(e.x,n,s),y:lw(e.y,t,a)}}function ow(e,t){let n=t.min-e.min,a=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,a]=[a,n]),{min:n,max:a}}function EP(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function TP(e,t){let n=.5;const a=xa(e),s=xa(t);return s>a?n=r0(t.min,t.max-a,e.min):a>s&&(n=r0(e.min,e.max-s,t.min)),ls(0,1,n)}function MP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Mg=.35;function IP(e=Mg){return e===!1?e=0:e===!0&&(e=Mg),{x:cw(e,"left","right"),y:cw(e,"top","bottom")}}function cw(e,t,n){return{min:uw(e,t),max:uw(e,n)}}function uw(e,t){return typeof e=="number"?e:e[t]||0}const zP=new WeakMap;class _P{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=Bn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=x=>{n&&this.snapToCursor(R0(x).point),this.stopAnimation()},c=(x,b)=>{const{drag:v,dragPropagation:N,onDragStart:j}=this.getProps();if(v&&!N&&(this.openDragLock&&this.openDragLock(),this.openDragLock=iO(v),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Wr(E=>{let D=this.getAxisMotionValue(E).get()||0;if(ss.test(D)){const{projection:k}=this.visualElement;if(k&&k.layout){const M=k.layout.layoutBox[E];M&&(D=xa(M)*(parseFloat(D)/100))}}this.originPoint[E]=D}),j&&Pt.update(()=>j(x,b),!1,!0),wg(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},d=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b;const{dragPropagation:v,dragDirectionLock:N,onDirectionLock:j,onDrag:T}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:E}=b;if(N&&this.currentDirection===null){this.currentDirection=BP(E),this.currentDirection!==null&&j&&j(this.currentDirection);return}this.updateAxis("x",b.point,E),this.updateAxis("y",b.point,E),this.visualElement.render(),T&&Pt.update(()=>T(x,b),!1,!0)},h=(x,b)=>{this.latestPointerEvent=x,this.latestPanInfo=b,this.stop(x,b),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new ej(t,{onSessionStart:o,onStart:c,onMove:d,onSessionEnd:h,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:ZN(this.visualElement),element:this.visualElement.current})}stop(t,n){const a=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!a)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&Pt.postRender(()=>d(a,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,a){const{drag:s}=this.getProps();if(!a||!xh(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+a[t];this.constraints&&this.constraints[t]&&(c=CP(c,this.constraints[t],this.elastic[t])),o.set(c)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Uo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&a?this.constraints=AP(a.layoutBox,t):this.constraints=!1,this.elastic=IP(n),s!==this.constraints&&!Uo(t)&&a&&this.constraints&&!this.hasMutatedConstraints&&Wr(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=MP(a.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Uo(t))return!1;const a=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=BO(a,s.root,this.visualElement.getTransformPagePoint());let c=EP(s.layout.layoutBox,o);if(n){const d=n(zO(c));this.hasMutatedConstraints=!!d,d&&(c=SN(d))}return c}startAnimation(t){const{drag:n,dragMomentum:a,dragElastic:s,dragTransition:o,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),h=this.constraints||{},f=Wr(p=>{if(!xh(p,n,this.currentDirection))return;let x=h&&h[p]||{};(c===!0||c===p)&&(x={min:0,max:0});const b=s?200:1e6,v=s?40:1e7,N={type:"inertia",velocity:a?t[p]:0,bounceStiffness:b,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...x};return this.startAxisValueAnimation(p,N)});return Promise.all(f).then(d)}startAxisValueAnimation(t,n){const a=this.getAxisMotionValue(t);return wg(this.visualElement,t),a.start(dy(t,a,0,n,this.visualElement,!1))}stopAnimation(){Wr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,a=this.visualElement.getProps(),s=a[n];return s||this.visualElement.getValue(t,(a.initial?a.initial[t]:void 0)||0)}snapToCursor(t){Wr(n=>{const{drag:a}=this.getProps();if(!xh(n,a,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:c,max:d}=s.layout.layoutBox[n],h=o.get()||0;o.set(t[n]-$t(c,d,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!Uo(n)||!a||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Wr(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const h=d.get();s[c]=TP({min:h,max:h},this.constraints[c])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),Wr(c=>{if(!xh(c,t,null))return;const d=this.getAxisMotionValue(c),{min:h,max:f}=this.constraints[c];d.set($t(h,f,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;zP.set(this.visualElement,this);const t=this.visualElement.current,n=Gu(t,"pointerdown",f=>{const{drag:p,dragListener:x=!0}=this.getProps(),b=f.target,v=b!==t&&hO(b);p&&x&&!v&&this.start(f)});let a;const s=()=>{const{dragConstraints:f}=this.getProps();Uo(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),a||(a=DP(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,c=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Pt.read(s);const d=l0(window,"resize",()=>this.scalePositionWithinConstraints()),h=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(Wr(x=>{const b=this.getAxisMotionValue(x);b&&(this.originPoint[x]+=f[x].translate,b.set(b.get()+f[x].translate))}),this.visualElement.render())}));return()=>{d(),n(),c(),h&&h(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:c=Mg,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:a,dragPropagation:s,dragConstraints:o,dragElastic:c,dragMomentum:d}}}function dw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function DP(e,t,n){const a=b6(e,dw(n)),s=b6(t,dw(n));return()=>{a(),s()}}function xh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RP extends Ji{constructor(t){super(t),this.removeGroupControls=yr,this.removeListeners=yr,this.controls=new _P(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const i1=e=>(t,n)=>{e&&Pt.update(()=>e(t,n),!1,!0)};class OP extends Ji{constructor(){super(...arguments),this.removePointerDownListener=yr}onPointerDown(t){this.session=new ej(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ZN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:a,onPanEnd:s}=this.node.getProps();return{onSessionStart:i1(t),onStart:i1(n),onMove:i1(a),onEnd:(o,c)=>{delete this.session,s&&Pt.postRender(()=>s(o,c))}}}mount(){this.removePointerDownListener=Gu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let l1=!1;class LP extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),a&&a.register&&s&&a.register(o),l1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:a,drag:s,isPresent:o}=this.props,{projection:c}=a;return c&&(c.isPresent=o,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),l1=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?c.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?c.promote():c.relegate()||Pt.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:a}=t;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),py.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:s}=t;l1=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),a&&a.deregister&&a.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function nj(e){const[t,n]=HN(),a=w.useContext(Kb);return i.jsx(LP,{...e,layoutGroup:a,switchLayoutGroup:w.useContext(QN),isPresent:t,safeToRemove:n})}const PP={pan:{Feature:OP},drag:{Feature:RP,ProjectionNode:qN,MeasureLayout:nj}};function hw(e,t,n){const{props:a}=e;e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=a[s];o&&Pt.postRender(()=>o(t,R0(t)))}class UP extends Ji{mount(){const{current:t}=this.node;t&&(this.unmount=oO(t,(n,a)=>(hw(this.node,a,"Start"),s=>hw(this.node,s,"End"))))}unmount(){}}class FP extends Ji{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=_0(l0(this.node.current,"focus",()=>this.onFocus()),l0(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}
1463function mw(e,t,n){const{props:a}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&a.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=a[s];o&&Pt.postRender(()=>o(t,R0(t)))}class VP extends Ji{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=fO(t,(s,o)=>(mw(this.node,o,"Start"),(c,{success:d})=>mw(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(a==null?void 0:a.tap)===!1})}unmount(){}}const Ig=new WeakMap,o1=new WeakMap,qP=e=>{const t=Ig.get(e.target);t&&t(e)},HP=e=>{e.forEach(qP)};function $P({root:e,...t}){const n=e||document;o1.has(n)||o1.set(n,{});const a=o1.get(n),s=JSON.stringify(t);return a[s]||(a[s]=new IntersectionObserver(HP,{root:e,...t})),a[s]}function GP(e,t,n){const a=$P(t);return Ig.set(e,n),a.observe(e),()=>{Ig.delete(e),a.unobserve(e)}}const YP={some:0,all:1};class WP extends Ji{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var h;(h=this.stopObserver)==null||h.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:a,amount:s="some",once:o}=t,c={root:n?n.current:void 0,rootMargin:a,threshold:typeof s=="number"?s:YP[s]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,o&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:x,onViewportLeave:b}=this.node.getProps(),v=p?x:b;v&&v(f)};this.stopObserver=GP(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(XP(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function XP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const KP={inView:{Feature:WP},tap:{Feature:VP},focus:{Feature:FP},hover:{Feature:UP}},QP={layout:{ProjectionNode:qN,MeasureLayout:nj}},JP={...wP,...KP,...PP,...QP},ze=xP(JP,gP);/** 1464 * @license lucide-react v0.546.0 - ISC 1465 * 1466 * This source code is licensed under the ISC license. 1467 * See the LICENSE file in the root directory of this source tree. 1468 */const ZP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),fw=e=>{const t=eU(e);return t.charAt(0).toUpperCase()+t.slice(1)},aj=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),tU=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** 1469 * @license lucide-react v0.546.0 - ISC 1470 * 1471 * This source code is licensed under the ISC license. 1472 * See the LICENSE file in the root directory of this source tree. 1473 */var nU={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"};/** 1474 * @license lucide-react v0.546.0 - ISC 1475 * 1476 * This source code is licensed under the ISC license. 1477 * See the LICENSE file in the root directory of this source tree. 1478 */const aU=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},h)=>w.createElement("svg",{ref:h,...nU,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:aj("lucide",s),...!o&&!tU(d)&&{"aria-hidden":"true"},...d},[...c.map(([f,p])=>w.createElement(f,p)),...Array.isArray(o)?o:[o]]));/** 1479 * @license lucide-react v0.546.0 - ISC 1480 * 1481 * This source code is licensed under the ISC license. 1482 * See the LICENSE file in the root directory of this source tree. 1483 */const Ce=(e,t)=>{const n=w.forwardRef(({className:a,...s},o)=>w.createElement(aU,{ref:o,iconNode:t,className:aj(`lucide-${ZP(fw(e))}`,`lucide-${e}`,a),...s}));return n.displayName=fw(e),n};/** 1484 * @license lucide-react v0.546.0 - ISC 1485 * 1486 * This source code is licensed under the ISC license. 1487 * See the LICENSE file in the root directory of this source tree. 1488 */const rU=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
1488-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Qm=Ce("activity",rU);/** 1489 * @license lucide-react v0.546.0 - ISC 1490 * 1491 * This source code is licensed under the ISC license. 1492 * See the LICENSE file in the root directory of this source tree. 1493 */const sU=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ky=Ce("arrow-left",sU);/** 1494 * @license lucide-react v0.546.0 - ISC 1495 * 1496 * This source code is licensed under the ISC license. 1497 * See the LICENSE file in the root directory of this source tree. 1498 */const iU=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],pn=Ce("arrow-right",iU);/** 1499 * @license lucide-react v0.546.0 - ISC 1500 * 1501 * This source code is licensed under the ISC license. 1502 * See the LICENSE file in the root directory of this source tree. 1503 */const lU=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oU=Ce("ban",lU);/** 1504 * @license lucide-react v0.546.0 - ISC 1505 * 1506 * This source code is licensed under the ISC license. 1507 * See the LICENSE file in the root directory of this source tree. 1508 */const cU=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],uU=Ce("banknote",cU);/** 1509 * @license lucide-react v0.546.0 - ISC 1510 * 1511 * This source code is licensed under the ISC license. 1512 * See the LICENSE file in the root directory of this source tree. 1513 */const dU=[["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"}]],os=Ce("bell",dU);/** 1514 * @license lucide-react v0.546.0 - ISC 1515 * 1516 * This source code is licensed under the ISC license. 1517 * See the LICENSE file in the root directory of this source tree. 1518 */const hU=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],O0=Ce("book-open",hU);/** 1519 * @license lucide-react v0.546.0 - ISC 1520 * 1521 * This source code is licensed under the ISC license. 1522 * See the LICENSE file in the root directory of this source tree. 1523 */const mU=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],$a=Ce("brain",mU);/** 1524 * @license lucide-react v0.546.0 - ISC 1525 * 1526 * This source code is licensed under the ISC license. 1527 * See the LICENSE file in the root directory of this source tree. 1528 */const fU=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Cy=Ce("building-2",fU);/** 1529 * @license lucide-react v0.546.0 - ISC 1530 * 1531 * This source code is licensed under the ISC license. 1532 * See the LICENSE file in the root directory of this source tree. 1533 */const pU=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Yu=Ce("camera",pU);/** 1534 * @license lucide-react v0.546.0 - ISC 1535 * 1536 * This source code is licensed under the ISC license. 1537 * See the LICENSE file in the root directory of this source tree. 1538 */const xU=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],rj=Ce("check-check",xU);/** 1539 * @license lucide-react v0.546.0 - ISC 1540 * 1541 * This source code is licensed under the ISC license. 1542 * See the LICENSE file in the root directory of this source tree. 1543 */const gU=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xa=Ce("check",gU);/** 1544 * @license lucide-react v0.546.0 - ISC 1545 * 1546 * This source code is licensed under the ISC license. 1547 * See the LICENSE file in the root directory of this source tree. 1548 */const bU=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zg=Ce("chevron-down",bU);/** 1549 * @license lucide-react v0.546.0 - ISC 1550 * 1551 * This source code is licensed under the ISC license. 1552 * See the LICENSE file in the root directory of this source tree. 1553 */const yU=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sj=Ce("chevron-left",yU);/** 1554 * @license lucide-react v0.546.0 - ISC 1555 * 1556 * This source code is licensed under the ISC license. 1557 * See the LICENSE file in the root directory of this source tree. 1558 */const vU=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fi=Ce("chevron-right",vU);/** 1559 * @license lucide-react v0.546.0 - ISC 1560 * 1561 * This source code is licensed under the ISC license. 1562 * See the LICENSE file in the root directory of this source tree. 1563 */const wU=[["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"}]],ij=Ce("circle-alert",wU);/** 1564 * @license lucide-react v0.546.0 - ISC 1565 * 1566 * This source code is licensed under the ISC license. 1567 * See the LICENSE file in the root directory of this source tree. 1568 */const SU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],o0=Ce("circle-check",SU);/** 1569 * @license lucide-react v0.546.0 - ISC 1570 * 1571 * This source code is licensed under the ISC license. 1572 * See the LICENSE file in the root directory of this source tree. 1573 */const NU=[["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"}]],L0=Ce("circle-question-mark",NU);/** 1574 * @license lucide-react v0.546.0 - ISC 1575 * 1576 * This source code is licensed under the ISC license. 1577 * See the LICENSE file in the root directory of this source tree. 1578 */const jU=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],kU=Ce("circle-user",jU);/** 1579 * @license lucide-react v0.546.0 - ISC 1580 * 1581 * This source code is licensed under the ISC license. 1582 * See the LICENSE file in the root directory of this source tree. 1583 */const CU=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],AU=Ce("clock",CU);/** 1584 * @license lucide-react v0.546.0 - ISC 1585 * 1586 * This source code is licensed under the ISC license. 1587 * See the LICENSE file in the root directory of this source tree. 1588 */const EU=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
1588y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],TU=Ce("compass",EU);/** 1589 * @license lucide-react v0.546.0 - ISC 1590 * 1591 * This source code is licensed under the ISC license. 1592 * See the LICENSE file in the root directory of this source tree. 1593 */const MU=[["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"}]],IU=Ce("copy",MU);/** 1594 * @license lucide-react v0.546.0 - ISC 1595 * 1596 * This source code is licensed under the ISC license. 1597 * See the LICENSE file in the root directory of this source tree. 1598 */const zU=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],_U=Ce("cpu",zU);/** 1599 * @license lucide-react v0.546.0 - ISC 1600 * 1601 * This source code is licensed under the ISC license. 1602 * See the LICENSE file in the root directory of this source tree. 1603 */const DU=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Jm=Ce("credit-card",DU);/** 1604 * @license lucide-react v0.546.0 - ISC 1605 * 1606 * This source code is licensed under the ISC license. 1607 * See the LICENSE file in the root directory of this source tree. 1608 */const BU=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Sr=Ce("crown",BU);/** 1609 * @license lucide-react v0.546.0 - ISC 1610 * 1611 * This source code is licensed under the ISC license. 1612 * See the LICENSE file in the root directory of this source tree. 1613 */const RU=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],OU=Ce("database",RU);/** 1614 * @license lucide-react v0.546.0 - ISC 1615 * 1616 * This source code is licensed under the ISC license. 1617 * See the LICENSE file in the root directory of this source tree. 1618 */const LU=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],c0=Ce("download",LU);/** 1619 * @license lucide-react v0.546.0 - ISC 1620 * 1621 * This source code is licensed under the ISC license. 1622 * See the LICENSE file in the root directory of this source tree. 1623 */const PU=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],u0=Ce("earth",PU);/** 1624 * @license lucide-react v0.546.0 - ISC 1625 * 1626 * This source code is licensed under the ISC license. 1627 * See the LICENSE file in the root directory of this source tree. 1628 */const UU=[["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"}]],Ay=Ce("external-link",UU);/** 1629 * @license lucide-react v0.546.0 - ISC 1630 * 1631 * This source code is licensed under the ISC license. 1632 * See the LICENSE file in the root directory of this source tree. 1633 */const FU=[["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"}]],_g=Ce("eye",FU);/** 1634 * @license lucide-react v0.546.0 - ISC 1635 * 1636 * This source code is licensed under the ISC license. 1637 * See the LICENSE file in the root directory of this source tree. 1638 */const VU=[["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"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],qU=Ce("file-image",VU);/** 1639 * @license lucide-react v0.546.0 - ISC 1640 * 1641 * This source code is licensed under the ISC license. 1642 * See the LICENSE file in the root directory of this source tree. 1643 */const HU=[["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"}]],Jo=Ce("file-text",HU);/** 1644 * @license lucide-react v0.546.0 - ISC 1645 * 1646 * This source code is licensed under the ISC license. 1647 * See the LICENSE file in the root directory of this source tree. 1648 */const $U=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}
1648],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],GU=Ce("fingerprint",$U);/** 1649 * @license lucide-react v0.546.0 - ISC 1650 * 1651 * This source code is licensed under the ISC license. 1652 * See the LICENSE file in the root directory of this source tree. 1653 */const YU=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],Vi=Ce("flag",YU);/** 1654 * @license lucide-react v0.546.0 - ISC 1655 * 1656 * This source code is licensed under the ISC license. 1657 * See the LICENSE file in the root directory of this source tree. 1658 */const WU=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],XU=Ce("flame",WU);/** 1659 * @license lucide-react v0.546.0 - ISC 1660 * 1661 * This source code is licensed under the ISC license. 1662 * See the LICENSE file in the root directory of this source tree. 1663 */const KU=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],lj=Ce("gift",KU);/** 1664 * @license lucide-react v0.546.0 - ISC 1665 * 1666 * This source code is licensed under the ISC license. 1667 * See the LICENSE file in the root directory of this source tree. 1668 */const QU=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],JU=Ce("heart",QU);/** 1669 * @license lucide-react v0.546.0 - ISC 1670 * 1671 * This source code is licensed under the ISC license. 1672 * See the LICENSE file in the root directory of this source tree. 1673 */const ZU=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],pw=Ce("history",ZU);/** 1674 * @license lucide-react v0.546.0 - ISC 1675 * 1676 * This source code is licensed under the ISC license. 1677 * See the LICENSE file in the root directory of this source tree. 1678 */const eF=[["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-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],tF=Ce("house",eF);/** 1679 * @license lucide-react v0.546.0 - ISC 1680 * 1681 * This source code is licensed under the ISC license. 1682 * See the LICENSE file in the root directory of this source tree. 1683 */const nF=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],aF=Ce("inbox",nF);/** 1684 * @license lucide-react v0.546.0 - ISC 1685 * 1686 * This source code is licensed under the ISC license. 1687 * See the LICENSE file in the root directory of this source tree. 1688 */const rF=[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]],sF=Ce("indian-rupee",rF);/** 1689 * @license lucide-react v0.546.0 - ISC 1690 * 1691 * This source code is licensed under the ISC license. 1692 * See the LICENSE file in the root directory of this source tree. 1693 */const iF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],lF=Ce("info",iF);/** 1694 * @license lucide-react v0.546.0 - ISC 1695 * 1696 * This source code is licensed under the ISC license. 1697 * See the LICENSE file in the root directory of this source tree. 1698 */const oF=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],oj=Ce("layout-dashboard",oF);/** 1699 * @license lucide-react v0.546.0 - ISC 1700 * 1701 * This source code is licensed under the ISC license. 1702 * See the LICENSE file in the root directory of this source tree. 1703 */const cF=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 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"}]],uF=Ce("lightbulb",cF);/** 1704 * @license lucide-react v0.546.0 - ISC 1705 * 1706 * This source code is licensed under the ISC license. 1707 * See the LICENSE file in the root directory of this source tree. 1708 */const dF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}
1708]],Qe=Ce("loader-circle",dF);/** 1709 * @license lucide-react v0.546.0 - ISC 1710 * 1711 * This source code is licensed under the ISC license. 1712 * See the LICENSE file in the root directory of this source tree. 1713 */const hF=[["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"}]],Or=Ce("lock",hF);/** 1714 * @license lucide-react v0.546.0 - ISC 1715 * 1716 * This source code is licensed under the ISC license. 1717 * See the LICENSE file in the root directory of this source tree. 1718 */const mF=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Oi=Ce("log-out",mF);/** 1719 * @license lucide-react v0.546.0 - ISC 1720 * 1721 * This source code is licensed under the ISC license. 1722 * See the LICENSE file in the root directory of this source tree. 1723 */const fF=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Zm=Ce("mail",fF);/** 1724 * @license lucide-react v0.546.0 - ISC 1725 * 1726 * This source code is licensed under the ISC license. 1727 * See the LICENSE file in the root directory of this source tree. 1728 */const pF=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Ey=Ce("map",pF);/** 1729 * @license lucide-react v0.546.0 - ISC 1730 * 1731 * This source code is licensed under the ISC license. 1732 * See the LICENSE file in the root directory of this source tree. 1733 */const xF=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],gF=Ce("megaphone",xF);/** 1734 * @license lucide-react v0.546.0 - ISC 1735 * 1736 * This source code is licensed under the ISC license. 1737 * See the LICENSE file in the root directory of this source tree. 1738 */const bF=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],bm=Ce("menu",bF);/** 1739 * @license lucide-react v0.546.0 - ISC 1740 * 1741 * This source code is licensed under the ISC license. 1742 * See the LICENSE file in the root directory of this source tree. 1743 */const yF=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],cj=Ce("message-circle",yF);/** 1744 * @license lucide-react v0.546.0 - ISC 1745 * 1746 * This source code is licensed under the ISC license. 1747 * See the LICENSE file in the root directory of this source tree. 1748 */const vF=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],vr=Ce("message-square",vF);/** 1749 * @license lucide-react v0.546.0 - ISC 1750 * 1751 * This source code is licensed under the ISC license. 1752 * See the LICENSE file in the root directory of this source tree. 1753 */const wF=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],xw=Ce("mic",wF);/** 1754 * @license lucide-react v0.546.0 - ISC 1755 * 1756 * This source code is licensed under the ISC license. 1757 * See the LICENSE file in the root directory of this source tree. 1758 */const SF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Ty=Ce("package",SF);/** 1759 * @license lucide-react v0.546.0 - ISC 1760 * 1761 * This source code is licensed under the ISC license. 1762 * See the LICENSE file in the root directory of this source tree. 1763 */const NF=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],jF=Ce("paperclip",NF);/** 1764 * @license lucide-react v0.546.0 - ISC 1765 * 1766 * This source code is licensed under the ISC license. 1767 * See the LICENSE file in the root directory of this source tree. 1768 */const kF=[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]],CF=Ce("party-popper",kF);/** 1769 * @license lucide-react v0.546.0 - ISC 1770 * 1771 * This source code is licensed under the ISC license. 1772 * See the LICENSE file in the root directory of this source tree. 1773 */const AF=[["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"}]],P0=Ce("pencil",AF);/** 1774 * @license lucide-react v0.546.0 - ISC 1775 * 1776 * This source code is licensed under the ISC license. 1777 * See the LICENSE file in the root directory of this source tree. 1778 */const EF=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2
17780 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],TF=Ce("phone-off",EF);/** 1779 * @license lucide-react v0.546.0 - ISC 1780 * 1781 * This source code is licensed under the ISC license. 1782 * See the LICENSE file in the root directory of this source tree. 1783 */const MF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qi=Ce("plus",MF);/** 1784 * @license lucide-react v0.546.0 - ISC 1785 * 1786 * This source code is licensed under the ISC license. 1787 * See the LICENSE file in the root directory of this source tree. 1788 */const IF=[["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"}]],zF=Ce("printer",IF);/** 1789 * @license lucide-react v0.546.0 - ISC 1790 * 1791 * This source code is licensed under the ISC license. 1792 * See the LICENSE file in the root directory of this source tree. 1793 */const _F=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],uj=Ce("radio",_F);/** 1794 * @license lucide-react v0.546.0 - ISC 1795 * 1796 * This source code is licensed under the ISC license. 1797 * See the LICENSE file in the root directory of this source tree. 1798 */const DF=[["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"}]],dj=Ce("refresh-cw",DF);/** 1799 * @license lucide-react v0.546.0 - ISC 1800 * 1801 * This source code is licensed under the ISC license. 1802 * See the LICENSE file in the root directory of this source tree. 1803 */const BF=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],d0=Ce("rotate-ccw",BF);/** 1804 * @license lucide-react v0.546.0 - ISC 1805 * 1806 * This source code is licensed under the ISC license. 1807 * See the LICENSE file in the root directory of this source tree. 1808 */const RF=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],OF=Ce("rotate-cw",RF);/** 1809 * @license lucide-react v0.546.0 - ISC 1810 * 1811 * This source code is licensed under the ISC license. 1812 * See the LICENSE file in the root directory of this source tree. 1813 */const LF=[["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"}]],PF=Ce("save",LF);/** 1814 * @license lucide-react v0.546.0 - ISC 1815 * 1816 * This source code is licensed under the ISC license. 1817 * See the LICENSE file in the root directory of this source tree. 1818 */const UF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],FF=Ce("search",UF);/** 1819 * @license lucide-react v0.546.0 - ISC 1820 * 1821 * This source code is licensed under the ISC license. 1822 * See the LICENSE file in the root directory of this source tree. 1823 */const VF=[["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"}]],hj=Ce("send",VF);/** 1824 * @license lucide-react v0.546.0 - ISC 1825 * 1826 * This source code is licensed under the ISC license. 1827 * See the LICENSE file in the root directory of this source tree. 1828 */const qF=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
1828y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dg=Ce("shield-check",qF);/** 1829 * @license lucide-react v0.546.0 - ISC 1830 * 1831 * This source code is licensed under the ISC license. 1832 * See the LICENSE file in the root directory of this source tree. 1833 */const HF=[["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"}]],Ul=Ce("shield",HF);/** 1834 * @license lucide-react v0.546.0 - ISC 1835 * 1836 * This source code is licensed under the ISC license. 1837 * See the LICENSE file in the root directory of this source tree. 1838 */const $F=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Tn=Ce("sparkles",$F);/** 1839 * @license lucide-react v0.546.0 - ISC 1840 * 1841 * This source code is licensed under the ISC license. 1842 * See the LICENSE file in the root directory of this source tree. 1843 */const GF=[["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"}]],YF=Ce("star",GF);/** 1844 * @license lucide-react v0.546.0 - ISC 1845 * 1846 * This source code is licensed under the ISC license. 1847 * See the LICENSE file in the root directory of this source tree. 1848 */const WF=[["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"}]],Tl=Ce("target",WF);/** 1849 * @license lucide-react v0.546.0 - ISC 1850 * 1851 * This source code is licensed under the ISC license. 1852 * See the LICENSE file in the root directory of this source tree. 1853 */const XF=[["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"}]],mj=Ce("ticket",XF);/** 1854 * @license lucide-react v0.546.0 - ISC 1855 * 1856 * This source code is licensed under the ISC license. 1857 * See the LICENSE file in the root directory of this source tree. 1858 */const KF=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Hi=Ce("trash-2",KF);/** 1859 * @license lucide-react v0.546.0 - ISC 1860 * 1861 * This source code is licensed under the ISC license. 1862 * See the LICENSE file in the root directory of this source tree. 1863 */const QF=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ym=Ce("trending-up",QF);/** 1864 * @license lucide-react v0.546.0 - ISC 1865 * 1866 * This source code is licensed under the ISC license. 1867 * See the LICENSE file in the root directory of this source tree. 1868 */const JF=[["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"}]],My=Ce("triangle-alert",JF);/** 1869 * @license lucide-react v0.546.0 - ISC 1870 * 1871 * This source code is licensed under the ISC license. 1872 * See the LICENSE file in the root directory of this source tree. 1873 */const ZF=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],eV=Ce("upload",ZF);/** 1874 * @license lucide-react v0.546.0 - ISC 1875 * 1876 * This source code is licensed under the ISC license. 1877 * See the LICENSE file in the root directory of this source tree. 1878 */const tV=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["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"}]],nV=Ce("user-check",tV);/** 1879 * @license lucide-react v0.546.0 - ISC 1880 * 1881 * This source code is licensed under the ISC license. 1882 * See the LICENSE file in the root directory of this source tree. 1883 */const aV=[["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"}]],rV=Ce("user-plus",aV);/** 1884 * @license lucide-react v0.546.0 - ISC 1885 * 1886 * This source code is licensed under the ISC license. 1887 * See the LICENSE file in the root directory of this source tree. 1888 */const sV=[["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:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]],vm=Ce("user-x",sV);/** 1889 * @license lucide-react v0.546.0 - ISC 1890 * 1891 * This source code is licensed under the ISC license. 1892 * See the LICENSE file in the root directory of this source tree. 1893 */const iV=[["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"}]],h0=Ce("user",iV);/** 1894 * @license lucide-react v0.546.0 - ISC 1895 * 1896 * This source code is licensed under the ISC license. 1897 * See the LICENSE file in the root directory of this source tree. 1898 */const lV=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],wm=Ce("users",lV);/** 1899 * @license lucide-react v0.546.0 - ISC 1900 * 1901 * This source code is licensed under the ISC license. 1902 * See the LICENSE file in the root directory of this source tree. 1903 */const oV=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],gw=Ce("volume-2",oV);/** 1904 * @license lucide-react v0.546.0 - ISC 1905 * 1906 * This source code is licensed under the ISC license. 1907 * See the LICENSE file in the root directory of this source tree. 1908 */const cV=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],bw=Ce("volume-x",cV);/** 1909 * @license lucide-react v0.546.0 - ISC 1910 * 1911 * This source code is licensed under the ISC license. 1912 * See the LICENSE file in the root directory of this source tree. 1913 */const uV=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1913],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ln=Ce("x",uV);/** 1914 * @license lucide-react v0.546.0 - ISC 1915 * 1916 * This source code is licensed under the ISC license. 1917 * See the LICENSE file in the root directory of this source tree. 1918 */const dV=[["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"}]],Fo=Ce("zap",dV),hV="modulepreload",mV=function(e){return"/"+e},yw={},fj=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=Promise.allSettled(n.map(h=>{if(h=mV(h),h in yw)return;yw[h]=!0;const f=h.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const x=document.createElement("link");if(x.rel=f?"stylesheet":hV,f||(x.as="script"),x.crossOrigin="",x.href=h,d&&x.setAttribute("nonce",d),document.head.appendChild(x),f)return new Promise((b,v)=>{x.addEventListener("load",b),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})};function Xr(e){if(e==null||e==="")return null;if(typeof e=="string"){const t=Date.parse(e.trim());return Number.isNaN(t)?null:new Date(t).toISOString()}return e instanceof Date?Number.isNaN(e.getTime())?null:e.toISOString():null}function fV(e,t){return{id:e,userId:String(t.userId??""),userEmail:String(t.userEmail??""),userName:String(t.userName??""),planId:String(t.planId??""),planName:String(t.planName??""),botId:t.botId?String(t.botId):void 0,billingCycle:t.billingCycle??"monthly",amountInr:Number(t.amountInr??0),currency:String(t.currency??"INR"),status:t.status==="failed"?"failed":"paid",razorpayOrderId:String(t.razorpayOrderId??""),razorpayPaymentId:String(t.razorpayPaymentId??""),invoiceId:String(t.invoiceId??""),createdAt:Xr(t.createdAt),paidAt:Xr(t.paidAt)}}function pj(e,t){const n=t.lineItems,a=Array.isArray(n)?n.map(s=>{const o=s;return{label:String(o.label??""),amountInr:Number(o.amountInr??0)}}):[];return{id:e,userId:String(t.userId??""),userEmail:String(t.userEmail??""),userName:String(t.userName??""),paymentId:String(t.paymentId??""),planId:String(t.planId??""),planName:String(t.planName??""),botId:t.botId?String(t.botId):void 0,billingCycle:t.billingCycle??"monthly",lineItems:a,subtotalInr:Number(t.subtotalInr??0),totalInr:Number(t.totalInr??0),status:t.status==="void"?"void":"paid",razorpayOrderId:String(t.razorpayOrderId??""),razorpayPaymentId:String(t.razorpayPaymentId??""),issuedAt:Xr(t.issuedAt),paidAt:Xr(t.paidAt),periodStart:Xr(t.periodStart)??Xr(t.validFrom)??Xr(t.premiumSince),periodEnd:Xr(t.periodEnd)??Xr(t.validUntil)??Xr(t.premiumExpiresAt)}}function pV(e){const t=new Date().toISOString();return{id:e.invoiceId,userId:e.userId,userEmail:e.userEmail,userName:e.userName,paymentId:e.razorpayPaymentId,planId:e.planId,planName:e.planName,botId:e.botId,billingCycle:e.billingCycle,lineItems:[{label:`${e.planName}${e.botId?` · ${e.botId} tutor`:""} (${e.billingCycle})`,amountInr:e.amountInr}],subtotalInr:e.amountInr,totalInr:e.amountInr,status:"paid",razorpayOrderId:e.razorpayOrderId,razorpayPaymentId:e.razorpayPaymentId,issuedAt:t,paidAt:t,periodStart:e.periodStart,periodEnd:e.periodEnd}}async function vw(e){}async function xV(e){try{const t=await fetch("/api/payments/invoices/me",{credentials:"include",headers:I0()});return t.ok?((await t.json().catch(()=>({}))).invoices??[]).map(s=>pj(String(s.id??""),s)).sort((s,o)=>{const c=s.issuedAt?Date.parse(s.issuedAt):0;return(o.issuedAt?Date.parse(o.issuedAt):0)-c}):[]}catch{return[]}}async function gV(){try{const e=await fetch("/api/admin/payments",{credentials:"include"});return e.ok?((await e.json().catch(()=>({}))).payments??[]).map(n=>fV(String(n.id??""),n)).sort((n,a)=>{const s=n.paidAt?Date.parse(n.paidAt):0;return(a.paidAt?Date.parse(a.paidAt):0)-s}):[]}catch{return[]}}async function bV(){try{const e=await fetch("/api/admin/invoices",{credentials:"include"});return e.ok?((await e.json().catch(()=>({}))).invoices??[]).map(n=>pj(String(n.id??""),n)).sort((n,a)=>{const s=n.issuedAt?Date.parse(n.issuedAt):0;return(a.issuedAt?Date.parse(a.issuedAt):0)-s}):[]}catch{return[]}}
1918function es(e){return`â¹${e.toLocaleString("en-IN")}`}function yV(e){const t=e.paidAt??e.createdAt??new Date().toISOString();return{id:e.invoiceId||`INV-${e.id}`,userId:e.userId,userEmail:e.userEmail,userName:e.userName,paymentId:e.razorpayPaymentId||e.id,planId:e.planId,planName:e.planName,botId:e.botId,billingCycle:e.billingCycle,lineItems:[{label:`${e.planName}${e.botId?` · ${e.botId} tutor`:""} (${e.billingCycle})`,amountInr:e.amountInr}],subtotalInr:e.amountInr,totalInr:e.amountInr,status:"paid",razorpayOrderId:e.razorpayOrderId,razorpayPaymentId:e.razorpayPaymentId,issuedAt:t,paidAt:t,periodStart:t,periodEnd:t}}const Ni={legalName:"Socratech Solutions",gstin:"33BCVPG6097B1ZF",email:"[email protected]",addressLines:["Third Floor, No.3/2, Honey Villa,","3rd Canal Cross Street, Gandhi Nagar,","Near St Michael's School, Adyar,","Chennai, Tamil Nadu â 600020"],placeOfSupply:"Tamil Nadu"};function vV(e=48,t=35){return`<img src="${typeof window<"u"?`${window.location.origin}/logo/icon.png`:"/logo/icon.png"}" alt="Socratech AI" width="${e}" height="${t}" style="width:${e}px;height:${t}px;object-fit:contain;display:block;" />`}function ww(e){if(!e)return"â";try{return new Date(e).toLocaleString("en-IN",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return"â"}}function Sw(e){if(!e)return"â";try{return new Date(e).toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"})}catch{return"â"}}function wV(e,t){const n=new Date(e);return n.setMonth(n.getMonth()+t),n.toISOString()}function SV(e){let t=e.periodStart,n=e.periodEnd;return t||(t=e.paidAt??e.issuedAt),!n&&t&&(n=wV(t,e.billingCycle==="quarterly"?3:1)),{from:Sw(t),till:Sw(n)}}const Iy="font-family:Poppins,sans-serif;color:#000;",Aa=(e="")=>`style="${Iy}font-weight:400;${e}"`,qa=(e="")=>`style="${Iy}font-weight:600;${e}"`,Eu=(e="")=>`style="${Iy}font-weight:700;${e}"`;function ra(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function NV(e){return e.replace(/[^a-zA-Z0-9_-]+/g,"-").slice(0,80)}function jV(e){const t=Math.round(e/1.18*100)/100,n=Math.round((e-t)*100)/100,a=Math.round(n/2*100)/100;return{taxable:t,cgst:a,sgst:n-a,totalGst:n}}function ef(e){const t=e.lineItems.length>0?e.lineItems:[{label:`${e.planName}${e.botId?` â ${e.botId} Exam Tutor`:""} (${e.billingCycle==="quarterly"?"Quarterly":"Monthly"})`,amountInr:e.totalInr}],n=e.botId?`${e.planName} â ${e.botId} Exam Tutor`:e.planName,a=e.billingCycle==="quarterly"?"Quarterly":"Monthly",s=jV(e.totalInr),o=ra(e.id),c=SV(e),d=Ni.addressLines.map(v=>`<p ${Aa("margin:0 0 3px;font-size:12px;line-height:1.5;")}>${ra(v)}</p>`).join(""),h=(v,N)=>`<tr> 1919 <td ${Aa("padding:4px 0;font-size:12px;")}>${v}</td> 1920 <td ${qa("padding:4px 0;font-size:12px;text-align:right;")}>${N}</td> 1921 </tr>`,f=qa("padding:10px 12px;text-align:left;font-size:12px;border-bottom:2px solid #000;"),p=qa("padding:10px 12px;text-align:right;font-size:12px;border-bottom:2px solid #000;width:110px;"),x=Aa("padding:10px 12px;font-size:13px;border-top:1px solid #e8e8e8;"),b=qa("padding:10px 12px;text-align:right;font-size:13px;border-top:1px solid #e8e8e8;");return`<!DOCTYPE html> 1922<html lang="en"> 1923<head> 1924 <meta charset="utf-8"/> 1925 <meta name="viewport" content="width=device-width,initial-scale=1"/> 1926 <title>Invoice ${o}</title> 1927 <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet"/> 1928 <style> 1929 *{box-sizing:border-box;margin:0;padding:0;} 1930 html,body{background:#fff!important;color:#000;font-family:Poppins,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact;} 1931 @media print{html,body{margin:0;padding:0;background:#fff!important;}} 1932 </style> 1933</head> 1934<body style="margin:0;padding:0;background:#fff;"> 1935 1936<div class="invoice-page" style="max-width:740px;margin:0 auto;padding:28px 32px 24px;background:#fff;"> 1937 1938 <!-- Accent bar --> 1939 <div style="height:4px;background:linear-gradient(90deg,#00B5B5 0%,#0891b2 100%);border-radius:2px;margin-bottom:22px;"></div> 1940 1941 <!-- Header --> 1942 <table style="width:100%;border-collapse:collapse;margin-bottom:22px;"> 1943 <tr> 1944 <td style="vertical-align:middle;width:58%;"> 1945 <div style="display:flex;align-items:center;gap:12px;"> 1946 ${vV(48,35)} 1947 <div> 1948 <p ${Eu("font-size:20px;line-height:1.25;")}>${ra(Ni.legalName)}</p> 1949 <p ${Aa("font-size:13px;margin-top:4px;")}>Tax invoice · GST</p> 1950 </div> 1951 </div> 1952 </td> 1953 <td style="vertical-align:middle;text-align:right;"> 1954 <p ${Aa("font-size:12px;")}>Invoice no.</p> 1955 <p ${Eu("font-size:17px;margin-top:4px;")}>${o}</p> 1956 <p ${Aa("font-size:12px;margin-top:6px;")}>${ww(e.issuedAt)}</p> 1957 </td> 1958 </tr> 1959 </table> 1960 1961 <div style="height:1px;background:#000;margin-bottom:20px;"></div> 1962 1963 <!-- From / Bill to --> 1964 <table style="width:100%;border-collapse:collapse;margin-bottom:20px;border:1px solid #d4d4d4;border-radius:8px;overflow:hidden;"> 1965 <tr> 1966 <td style="width:50%;vertical-align:top;padding:16px 18px;border-right:1px solid #e8e8e8;background:#fff;"> 1967 <p ${qa("font-size:12px;margin-bottom:10px;")}>From</p> 1968 <p ${Eu("font-size:14px;margin-bottom:8px;")}>${ra(Ni.legalName)}</p> 1969 ${d} 1970 <p ${Aa("margin-top:10px;font-size:12px;")}><span ${qa()}>GSTIN:</span> ${ra(Ni.gstin)}</p> 1971 <p ${Aa("margin-top:4px;font-size:12px;")}><span ${qa()}>Email:</span> ${ra(Ni.email)}</p> 1972 </td> 1973 <td style="width:50%;vertical-align:top;padding:16px 18px;background:#fff;"> 1974 <p ${qa("font-size:12px;margin-bottom:10px;")}>Bill to</p> 1975 <p ${Eu("font-size:14px;")}>${ra(e.userName)}</p> 1976 <p ${Aa("font-size:12px;margin:4px 0 12px;word-break:break-all;")}>${ra(e.userEmail)}</p> 1977 <table style="width:100%;border-collapse:collapse;"> 1978 ${h("Plan",ra(n))} 1979 ${h("Billing",ra(a))} 1980 ${h("Valid from",c.from)} 1981 ${h("Valid till",c.till)} 1982 ${h("Place of supply",ra(Ni.placeOfSupply))} 1983 ${h("Payment status","Paid")} 1984 </table> 1985 </td> 1986 </tr> 1987 </table> 1988 1989 <!-- Line items --> 1990 <table style="width:100%;border-collapse:collapse;border:1px solid #d4d4d4;border-radius:8px;overflow:hidden;margin-bottom:12px;"> 1991 <thead> 1992 <tr> 1993 <th ${f} style="width:32px;">#</th> 1994 <th ${f}>Description</th> 1995 <th ${p}>Amount (â¹)</th> 1996 </tr> 1997 </thead> 1998 <tbody> 1999 ${t.map((v,N)=>` 2000 <tr> 2001 <td ${x}>${N+1}</td> 2002 <td ${x}>${ra(v.label)}</td> 2003 <td ${b}>${es(v.amountInr)}</td> 2004 </tr>`).join("")} 2005 <tr> 2006 <td colspan="2" ${x} style="text-align:right;">Taxable value (excl. GST)</td> 2007 <td ${b}>${es(s.taxable)}</td> 2008 </tr> 2009 <tr> 2010 <td colspan="2" ${x} style="text-align:right;">CGST @ 9%</td> 2011 <td ${b}>${es(s.cgst)}</td> 2012 </tr> 2013 <tr> 2014 <td colspan="2" ${x} style="text-align:right;">SGST @ 9%</td> 2015 <td ${b}>${es(s.sgst)}</td> 2016 </tr> 2017 <tr> 2018 <td colspan="2" ${qa("padding:14px 12px;text-align:right;font-size:14px;border-top:2px solid #000;")}>Total (GST included)</td> 2019 <td ${Eu("padding:14px 12px;text-align:right;font-size:18px;border-top:2px solid #000;")}>${es(e.totalInr)}</td> 2020 </tr> 2021 </tbody> 2022 </table> 2023 2024 <p ${Aa("font-size:11px;text-align:right;margin-bottom:16px;")}>All amounts in Indian Rupees · GST 18% inclusive</p> 2025
2026 <div style="border-top:1px solid #e8e8e8;padding-top:14px;margin-bottom:14px;"> 2027 <p ${qa("font-size:12px;margin-bottom:8px;")}>Payment reference</p> 2028 <p ${Aa("font-size:12px;margin:3px 0;")}><span ${qa()}>Order ID:</span> ${ra(e.razorpayOrderId||"â")}</p> 2029 <p ${Aa("font-size:12px;margin:3px 0;")}><span ${qa()}>Payment ID:</span> ${ra(e.razorpayPaymentId||"â")}</p> 2030 <p ${Aa("font-size:12px;margin:3px 0;")}><span ${qa()}>Paid on:</span> ${ww(e.paidAt)}</p> 2031 </div> 2032 2033 <p ${Aa("font-size:11px;text-align:center;line-height:1.65;border-top:1px solid #e8e8e8;padding-top:14px;")}> 2034 This is a computer-generated tax invoice. No physical signature is required.<br/> 2035 Payment via Razorpay · ${ra(Ni.email)} · © ${new Date().getFullYear()} ${ra(Ni.legalName)} 2036 </p> 2037 2038</div> 2039</body> 2040</html>`}function kV(e){return new Promise((t,n)=>{var h,f;const a=ef(e),s=document.createElement("iframe");s.setAttribute("title","Invoice PDF render"),s.style.cssText="position:fixed;left:-10000px;top:0;width:820px;height:1400px;border:0;",document.body.appendChild(s);const o=()=>{s.parentNode&&s.parentNode.removeChild(s)},c=async()=>{var p;try{const x=s.contentDocument??((p=s.contentWindow)==null?void 0:p.document);if(!(x!=null&&x.body))throw new Error("Invoice frame unavailable");const b=x.querySelector(".invoice-page")??x.body,{default:v}=await fj(async()=>{const{default:j}=await import("./html2canvas.esm-QH1iLAAe.js");return{default:j}},[]),N=await v(b,{scale:2,useCORS:!0,backgroundColor:"#ffffff",logging:!1});o(),t(N)}catch(x){o(),n(x)}};s.onload=()=>void c();const d=s.contentDocument??((h=s.contentWindow)==null?void 0:h.document);d?(d.open(),d.write(a),d.close(),((f=s.contentWindow)==null?void 0:f.document.readyState)==="complete"&&c()):(o(),n(new Error("Could not render invoice")))})}async function CV(e){try{const t=await kV(e),{jsPDF:n}=await fj(async()=>{const{jsPDF:N}=await import("./jspdf.es.min-qh6z_YFt.js").then(j=>j.j);return{jsPDF:N}},[]),a=t.toDataURL("image/png"),s=new n({orientation:"p",unit:"mm",format:"a4"}),o=s.internal.pageSize.getWidth(),c=s.internal.pageSize.getHeight(),d=10,h=o-d*2,f=c-d*2;let p=h,x=t.height*p/t.width;x>f&&(x=f,p=t.width*x/t.height);const b=(o-p)/2,v=d;s.addImage(a,"PNG",b,v,p,x),s.save(`${NV(e.id)}.pdf`)}catch{Bg(e)}}function Bg(e){const t=ef(e),n=new Blob([t],{type:"text/html;charset=utf-8"}),a=URL.createObjectURL(n),s=document.createElement("a");s.href=a,s.download=`${e.id}.html`,s.rel="noopener",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)}function AV(e){var c,d;const t=ef(e),n=document.createElement("iframe");n.setAttribute("title","Invoice print"),n.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0;opacity:0;pointer-events:none;",document.body.appendChild(n);const a=()=>{setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n)},800)},s=n.contentDocument??((c=n.contentWindow)==null?void 0:c.document);if(!s){a(),Bg(e);return}s.open(),s.write(t),s.close();const o=()=>{var h,f;try{(h=n.contentWindow)==null||h.focus(),(f=n.contentWindow)==null||f.print()}catch{Bg(e)}finally{a()}};((d=n.contentWindow)==null?void 0:d.document.readyState)==="complete"?o():(n.onload=o,setTimeout(o,500))}function EV({invoice:e,onClose:t,onDownload:n,onPrint:a}){const s=w.useMemo(()=>e?ef(e):"",[e]);return w.useEffect(()=>{if(!e)return;const o=c=>{c.key==="Escape"&&t()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,t]),i.jsx(bt,{children:e?i.jsx(ze.div,{className:"fixed inset-0 z-[3000] flex items-end sm:items-center justify-center p-0 sm:p-4 bg-slate-900/40 backdrop-blur-sm",initial:{opacity:0}
2040,animate:{opacity:1},exit:{opacity:0},onClick:t,children:i.jsxs(ze.div,{role:"dialog","aria-modal":!0,"aria-labelledby":"invoice-modal-title",className:"relative w-full max-w-3xl max-h-[95dvh] sm:max-h-[92vh] flex flex-col bg-white rounded-t-3xl sm:rounded-3xl shadow-2xl overflow-hidden",initial:{y:48,opacity:0,scale:.98},animate:{y:0,opacity:1,scale:1},exit:{y:24,opacity:0},transition:{type:"spring",stiffness:340,damping:30},onClick:o=>o.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between gap-3 px-5 sm:px-6 py-4 border-b border-slate-100 shrink-0 bg-white",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-[#008F8F]",children:"Tax Invoice"}),i.jsx("h2",{id:"invoice-modal-title",className:"text-sm font-bold text-slate-900 font-mono truncate mt-0.5",children:e.id})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsxs("button",{type:"button",onClick:a,className:"hidden sm:inline-flex items-center gap-1.5 px-3 py-2 rounded-xl border border-slate-200 bg-white text-xs font-bold text-slate-600 hover:bg-slate-50 cursor-pointer transition-colors",children:[i.jsx(zF,{size:13}),"Print"]}),i.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-xl bg-[#0f172a] hover:bg-[#1e293b] text-xs font-bold text-white cursor-pointer transition-colors",children:[i.jsx(c0,{size:13}),"Download PDF"]}),i.jsx("button",{type:"button",onClick:t,className:"w-8 h-8 rounded-full border border-slate-200 flex items-center justify-center text-slate-400 hover:text-slate-700 hover:bg-slate-50 cursor-pointer transition-colors","aria-label":"Close",children:i.jsx(Ln,{size:15})})]})]}),i.jsx("div",{className:"flex-1 min-h-0 bg-white p-3 sm:p-4",children:i.jsx("iframe",{title:`Invoice ${e.id}`,srcDoc:s,className:"w-full h-full min-h-[400px] rounded-lg border border-slate-200 bg-white",sandbox:"allow-same-origin allow-modals"})}),i.jsxs("div",{className:"sm:hidden flex gap-2 px-4 py-3 border-t border-slate-100 bg-white shrink-0",children:[i.jsx("button",{type:"button",onClick:a,className:"flex-1 py-2.5 rounded-xl border border-slate-200 text-xs font-bold text-slate-700 cursor-pointer hover:bg-slate-50 transition-colors",children:"Print / Save PDF"}),i.jsx("button",{type:"button",onClick:n,className:"flex-1 py-2.5 rounded-xl bg-[#0f172a] text-xs font-bold text-white cursor-pointer hover:bg-[#1e293b] transition-colors",children:"Download PDF"})]})]})}):null})}const xj=w.createContext(null);function TV({children:e}){const[t,n]=w.useState(null),[a,s]=w.useState(!1),o=w.useCallback(f=>{n(f)},[]),c=w.useCallback(f=>{a||(s(!0),CV(f).finally(()=>s(!1)))},[a]),d=w.useCallback(f=>{AV(f)},[]),h=w.useMemo(()=>({viewInvoice:o,downloadInvoice:c,printInvoice:d}),[o,c,d]);return i.jsxs(xj.Provider,{value:h,children:[e,i.jsx(EV,{invoice:t,onClose:()=>n(null),onDownload:()=>t&&c(t),onPrint:()=>t&&d(t)})]})}function zy(){const e=w.useContext(xj);if(!e)throw new Error("useInvoiceViewer must be used within InvoiceViewerProvider");return e}const _y={qa:!0,analytics:!0,vision:!0,interview:!0,premium:!0,reports:!0},sa={platform:!0,rootDomain:"localhost",usable:!0,brandName:"Socratech",primaryColor:"#00B5B5",secondaryColor:"#0F172A",accentColor:"#009999",logoUrl:"",faviconUrl:"",loginBgUrl:"",fontSans:"Inter",fontDisplay:"Outfit",copyOverrides:{},featureFlags:{..._y},supportEmail:"[email protected]",includedBots:["General","JEE","NEET","UPSC","GATE"]};function MV(){var s;if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search),t=(e.get("tenant")||e.get("slug")||"").trim().toLowerCase();if(t){try{localStorage.setItem("socratech_tenant_slug",t)}catch{}return t}const n=window.location.hostname.toLowerCase();if(n==="localhost"||n==="127.0.0.1"){try{const o=(s=localStorage.getItem("socratech_tenant_slug"))==null?void 0:s.trim().toLowerCase();if(o)return o}catch{}return null}const a=n.split(".");if(a.length>=3){const o=a[0];if(o&&!new Set(["www","app","admin","androidapp","superadmin","api","mail"]).has(o))return o}return null}function IV(){try{localStorage.removeItem("socratech_tenant_slug")}catch{}}async function zV(e){const t=e?`?slug=${encodeURIComponent(e)}`:"",n=await fetch(`/api/tenancy/branding${t}`,{credentials:"include"});if(!n.ok)return n.status===404&&e&&IV(),sa;const a=await n.json();return a.error&&!a.brandName?sa:{...sa,...a,brandName:a.brandName||a.name||sa.brandName,primaryColor:a.primaryColor||sa.primaryColor,secondaryColor:a.secondaryColor||sa.secondaryColor,accentColor:a.accentColor||sa.accentColor,logoUrl:a.logoUrl||"",faviconUrl:a.faviconUrl||a.logoUrl||"",loginBgUrl:a.loginBgUrl||"",fontSans:a.fontSans||sa.fontSans,fontDisplay:a.fontDisplay||sa.fontDisplay,copyOverrides:{...sa.copyOverrides,...a.copyOverrides||{}},featureFlags:{..._y,...a.featureFlags||{}},includedBots:a.includedBots||sa.includedBots,usable:a.usable!==!1}}function Tu(e,t,n="name"){let a=document.querySelector(`meta[${n}="${e}"]`);a||(a=document.createElement("meta"),a.setAttribute(n,e),document.head.appendChild(a)),a.content=t}function Nw(e,t,n){const a=`link[rel="${e}"]:not([sizes])`;let s=document.querySelector(a);s||(s=document.createElement("link"),s.rel=e,document.head.appendChild(s)),s.href=t}function jw(e){if(!e||e==="Inter"||e==="Outfit")return;const t=`tenant-font-${e.replace(/\s+/g,"-")}`;if(document.getElementById(t))return;const n=document.createElement("link");n.id=t,n.rel="stylesheet",n.href=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(e)}:wght@400;500;600;700;800&display=swap`,document.head.appendChild(n)}function c1(e){const t=document.documentElement;t.style.setProperty("--brand-primary",e.primaryColor),t.style.setProperty("--brand-accent",e.accentColor),t.style.setProperty("--brand-secondary",e.secondaryColor),t.style.setProperty("--brand-dark",e.secondaryColor),t.style.setProperty("--color-brand-primary",e.primaryColor),t.style.setProperty("--color-brand-accent",e.accentColor),t.style.setProperty("--color-brand-dark",e.secondaryColor);const n=e.fontSans||"Inter",a=e.fontDisplay||"Outfit";jw(n),jw(a),t.style.setProperty("--font-sans",`"${n}", ui-sans-serif, system-ui, sans-serif`),t.style.setProperty("--font-display",`"${a}", sans-serif`);const s=e.brandName||"Socratech",o=e.platform?"Socratech AI":`${s}`;document.title=e.platform?"Socratech AI â Think deeper. Learn smarter.":`${s} â Learn smarter.`,Tu("application-name",o),Tu("apple-mobile-web-app-title",s),Tu("theme-color",e.primaryColor,"name"),Tu("description",`${s} â Socratic exam workspace.`),Tu("og:title",`${o}`,"property");const c=e.faviconUrl||e.logoUrl||"/logo/icon.png";Nw("icon",c),Nw("apple-touch-icon",e.logoUrl||e.faviconUrl||"/logo/apple-touch-icon.png"),t.dataset.tenant=e.platform?"platform":e.slug||"tenant",t.dataset.brand=s,t.dataset.usable=e.usable===!1?"0":"1"}const _V=w.createContext(null);function DV({children:e}){const t=jr(),[n,a]=w.useState(sa),[s,o]=w.useState(!0),c=w.useCallback(async()=>
2040{if(t.pathname.startsWith("/superadmin")){a(sa),c1(sa),o(!1);return}const h=MV(),f=await zV(h);a(f),c1(f)},[t.pathname,t.search]);w.useEffect(()=>{let h=!1;return(async()=>{try{await c()}catch{h||(a(sa),c1(sa))}finally{h||o(!1)}})(),()=>{h=!0}},[c]);const d=w.useMemo(()=>({branding:n,loading:s,isTenant:!n.platform,usable:n.usable!==!1,unusableReason:n.unusableReason,brandName:n.brandName,primaryColor:n.primaryColor,secondaryColor:n.secondaryColor,accentColor:n.accentColor,logoUrl:n.logoUrl,faviconUrl:n.faviconUrl,loginBgUrl:n.loginBgUrl,includedBots:n.includedBots||["General"],featureFlags:n.featureFlags||_y,copyOverrides:n.copyOverrides||{},refresh:c}),[n,s,c]);return i.jsx(_V.Provider,{value:d,children:e})}function ql(e){return z0(e)?"/onboarding":Xb(e)?"/welcome":"/app/guide"}const Ht="General",Dy=["UPSC","JEE","NEET","GATE"],Hl=Dy,cc=[{id:"UPSC",name:"UPSC Socratic Focus",subtitle:"Civil Services & IAS",icon:"ðï¸",color:"from-amber-500 to-orange-600",desc:"Socratic guidance for general studies, essay logic, and polity.",paid:!0},{id:"JEE",name:"JEE Socratic Focus",subtitle:"Calculus & Proofs",icon:"âï¸",color:"from-blue-600 to-indigo-650",desc:"Physics intuition, calculus proofs, and chemical synthesis strategy.",paid:!0},{id:"NEET",name:"NEET Socratic Focus",subtitle:"Biology & Diagnostics",icon:"ð§¬",color:"from-emerald-500 to-teal-650",desc:"Active inquiry for biological mechanisms, botany, and medical logic.",paid:!0},{id:"GATE",name:"GATE Socratic Focus",subtitle:"Systems & Theory",icon:"ð»",color:"from-purple-500 to-pink-600",desc:"System engineering, algorithms, and logical proofs.",paid:!0},{id:"General",name:"General Coach",subtitle:"Free · All subjects",icon:"ð",color:"from-slate-700 to-slate-900",desc:"Universal academic coaching â free for every student.",paid:!1}];let Sm=[...cc],By=[...Dy];const $s=[...cc];function BV(e){e.length&&(Sm=e,By=e.filter(t=>t.paid&&t.id!==Ht).map(t=>t.id),$s.length=0,$s.push(...e))}function Nm(){return Sm.length?Sm:$s}function cs(){return By}function m0(e){return Sm.find(t=>t.id===e)??cc.find(t=>t.id===e)}function fn(e){if(!e||e===Ht)return!1;if(By.includes(e))return!0;const t=m0(e);return t?t.paid:Dy.includes(e)}const Rg="socratech_checkout_bot",f0="socratech_active_bot",u1=["Unlock UPSC, JEE, NEET & GATE tutors â each built for your target exam.","Specialist bots use exam-specific prompts. General Coach is free; pay only for the bot you need.","Choose a bot â Premium â Razorpay â that tutor unlocks for your plan duration."];function tf(e){return e!=null&&e.expiresAt?Date.parse(e.expiresAt)>Date.now():!1}function on(e,t){var n;return e?t===Ht?!0:fn(t)?tf((n=e.botLicenses)==null?void 0:n[t]):!1:t===Ht}function p0(e,t){var a;const n=(a=e==null?void 0:e.botLicenses)==null?void 0:a[t];return n&&tf(n)?n:null}function Sc(e){if(!(e!=null&&e.botLicenses))return[];const t=cs();return[...new Set([...t.length?t:[...Hl],...Object.keys(e.botLicenses)])].filter(a=>{var s;return a!==Ht&&tf((s=e.botLicenses)==null?void 0:s[a])})}function RV(e){const t=cs();return[...new Set([...t.length?t:[...Hl],...Object.keys(e)])].filter(a=>a!==Ht&&tf(e[a]))}function OV(e,t,n,a,s){var p;const o=new Date().toISOString(),c={botId:t,planId:n.id,planName:n.name,billingCycle:a,purchasedAt:o,expiresAt:s.premiumExpiresAt,paymentId:s.lastPaymentId,invoiceId:s.lastInvoiceId,amountInr:s.lastPaymentAmountInr},d={...e.botLicenses??{},[t]:c},h=RV(d),f={};for(const x of h){const b=(p=d[x])==null?void 0:p.expiresAt;b&&(f[x]=b)}return{botLicenses:d,unlockedBots:h,botAccessExpiry:f,isPremium:h.length>0,activePlanId:n.id,activePlanName:n.name,billingCycle:a,premiumSince:e.premiumSince??o,premiumExpiresAt:s.premiumExpiresAt,lastPaymentId:s.lastPaymentId,lastInvoiceId:s.lastInvoiceId,lastPaymentAmountInr:s.lastPaymentAmountInr}}function LV(e,t){return e.find(n=>n.botId===t&&n.active)}function uc(e){localStorage.setItem(Rg,e)}function PV(){const e=localStorage.getItem(Rg);return localStorage.removeItem(Rg),e&&fn(e)?e:null}function kw(e){const t=localStorage.getItem(f0);return t&&(t===Ht||fn(t))&&on(e,t)?t:Ht}function gr(e){try{return new Date(e).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}catch{return e}}function UV(e){return e==="admin_free"||e==="admin_offline"||e==="razorpay"?e:"unknown"}function gj(e){if(!e)return!1;const t=UV(e.source);return t==="admin_free"?!0:t==="unknown"&&(e.amountInr??0)===0}function Og(e){return gj(e)?"Free":"Paid"}function FV(e){var c,d,h,f;if(!e)return{tier:"Free",detail:"Sign in to continue",isPaid:!1};const t=Sc(e);if(t.length===0)return{tier:"Free",detail:"General Coach · upgrade for exam tutors",isPaid:!1};const n=new Set;let a=!1,s=!1;for(const p of t){const x=(c=e.botLicenses)==null?void 0:c[p],b=(d=x==null?void 0:x.planName)==null?void 0:d.trim();b&&n.add(b),gj(x)?a=!0:s=!0}const o=a&&!s?"Free":"Paid";if(n.size===1){const p=[...n][0],x=t[0],b=(h=e.botLicenses)==null?void 0:h[x];return{tier:p,detail:`${x} · ${Og(b)} access`,isPaid:o==="Paid",accessChip:o}}return n.size>
20401?{tier:"Multi-plan",detail:[...n].join(" · "),isPaid:o==="Paid",accessChip:o}:(f=e.activePlanName)!=null&&f.trim()?{tier:e.activePlanName.trim(),detail:`${t.join(", ")} active`,isPaid:!0}:{tier:"Pro",detail:`${t.join(", ")} tutor${t.length===1?"":"s"}`,isPaid:!0}}function VV(e,t){const n=Sc(t).length>0;return e==="premium"?n:e==="free"?!n:!0}function qV(e,t){return[...e,...t].sort((n,a)=>Date.parse(a.sentAt)-Date.parse(n.sentAt))}function Ry(e){return[...e].sort((t,n)=>Date.parse(n.sentAt)-Date.parse(t.sentAt))}function bj(e){return{id:String(e.id??""),title:String(e.title??""),body:String(e.body??""),sentAt:String(e.createdAt??e.sentAt??new Date().toISOString()),source:"system",type:e.type??"announcement",read:e.read===!0}}function HV(e,t,n){let a=!1;const s=async()=>{try{const c=await fetch("/api/notifications/me",{credentials:"include",headers:I0()});if(!c.ok){a||t([]);return}const d=await c.json().catch(()=>({}));if(a)return;t(Ry((d.notifications??[]).map(bj)))}catch(c){a||(t([]),n==null||n(c))}};s();const o=setInterval(()=>void s(),8e3);return()=>{a=!0,clearInterval(o)}}function $V(e,t,n){let a=!1;const s=async()=>{try{const c=await Un("/api/broadcasts/active");if(a)return;const d=[];for(const h of c.broadcasts??[]){const f=h.sentAt||h.createdAt;if(!f)continue;const p=String(h.audience??"all");VV(p,e)&&d.push({id:`broadcast_${h.id}`,title:String(h.title??""),body:String(h.body??""),audience:p,sentAt:f,source:"broadcast",type:"broadcast",read:!1})}t(Ry(d))}catch(c){console.warn("[notifications] broadcast poll:",c),n==null||n(c)}};s();const o=setInterval(()=>void s(),8e3);return()=>{a=!0,clearInterval(o)}}function GV(e,t){let n=!1;const a=async()=>{try{const o=await fetch("/api/notifications/admin",{credentials:"include"});if(!o.ok){await Un("/api/notifications/admin/unread-count").catch(()=>null),n||e([]);return}const c=await o.json().catch(()=>({}));if(n)return;e(Ry((c.notifications??[]).map(bj)))}catch(o){console.warn("[notifications] admin poll:",o),n||(e([]),t==null||t(o))}};a();const s=setInterval(()=>void a(),8e3);return()=>{n=!0,clearInterval(s)}}async function yj(e){const t=await fetch(`/api/notifications/${encodeURIComponent(e)}/read`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:"{}"});if(!t.ok&&t.status!==404){const n=await t.json().catch(()=>({}));throw new Error(n.error??`Could not mark read (${t.status})`)}}let mn=null,Wu=null;function YV(){return Wu}let Zo=null,jm=new Set,km=new Set,Cm=new Set;function WV(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/notifications`}function XV(e,t){Zo||(Zo=setTimeout(()=>{Zo=null,Oy(e)},4e3))}function vj(e){return jm.add(e),()=>jm.delete(e)}function wj(e){return km.add(e),()=>km.delete(e)}function KV(e){return Cm.add(e),()=>Cm.delete(e)}function QV(){for(const e of jm)e()}async function Oy(e,t){const n=await e();n&&(mn&&(mn.readyState===WebSocket.OPEN||mn.readyState===WebSocket.CONNECTING)||(mn==null||mn.close(),mn=new WebSocket(WV()),mn.onopen=()=>{Wu=null,mn==null||mn.send(JSON.stringify({type:"auth",token:n}))},mn.onmessage=a=>{var s,o;try{const c=JSON.parse(String(a.data));if(c.type==="connected"&&c.channel&&(Wu=c.channel),c.type==="broadcast_new"&&((s=c.broadcast)!=null&&s.id))for(const d of Cm)d(c.broadcast);if(c.type==="notification"&&((o=c.notification)!=null&&o.id)){const d=c.notification,h={id:d.id,title:d.title,body:d.body,type:d.type,read:d.read,sentAt:d.sentAt??d.createdAt??new Date().toISOString()};for(const f of km)f(h)}(c.type==="notification"||c.type==="notification_ping"||c.type==="broadcast_new")&&QV()}catch{}},mn.onclose=()=>{Wu=null,XV(e)},mn.onerror=()=>{mn==null||mn.close()}))}function Sj(){Zo&&(clearTimeout(Zo),Zo=null),mn==null||mn.close(),mn=null,Wu=null,jm.clear(),Cm.clear(),km.clear()}const Nj="socratech_notifications_read";function JV(){try{const e=localStorage.getItem(Nj);if(!e)return new Set;const t=JSON.parse(e);return new Set(Array.isArray(t)?t:[])}catch{return new Set}}function ZV(e){localStorage.setItem(Nj,JSON.stringify([...e]))}function eq(e,t){const n=`broadcast_${e.id}`;return{id:n,title:e.title,body:e.body,sentAt:e.sentAt,source:"broadcast",type:"broadcast",audience:e.audience,read:t.has(n)}}function jj(e){const[t,n]=w.useState([]),[a,s]=w.useState([]),[o,c]=w.useState(!0),[d,h]=w.useState(null),[f,p]=w.useState(()=>JV()),x=w.useCallback(k=>{const M=eq(k,f);s(B=>{const _=B.filter(U=>U.id!==M.id);return[M,..._].sort((U,F)=>Date.parse(F.sentAt)-Date.parse(U.sentAt))})},[f]);w.useEffect(()=>
2040{if(!(e!=null&&e.uid)){n([]),s([]),c(!1),h(null);return}c(!0),h(null);let k={user:!1,broadcast:!1};const M=()=>{k.user&&k.broadcast&&c(!1)},B=HV(e.uid,U=>{n(U),k.user=!0,M()},U=>{h(U instanceof Error?U.message:"Could not load notifications."),k.user=!0,M()}),_=$V(e,U=>{s(U),k.broadcast=!0,M()},U=>{console.warn("[notifications] broadcasts:",U),k.broadcast=!0,M()});return()=>{B(),_()}},[e==null?void 0:e.uid]),w.useEffect(()=>{if(!(e!=null&&e.uid))return;Oy(async()=>E0());const M=vj(()=>{}),B=KV(x),_=wj(U=>{n(F=>{const W={id:U.id,title:U.title,body:U.body,sentAt:U.sentAt,source:"system",type:U.type,read:U.read},ae=F.filter(le=>le.id!==W.id);return[W,...ae].sort((le,re)=>Date.parse(re.sentAt)-Date.parse(le.sentAt))})});return()=>{M(),B(),_(),Sj()}},[e==null?void 0:e.uid,x]);const b=w.useMemo(()=>a.map(k=>({...k,read:f.has(k.id)||k.read})),[a,f]),v=w.useMemo(()=>qV(t,b),[t,b]),N=w.useMemo(()=>v.filter(k=>!k.read).length,[v]),j=w.useCallback(async k=>{const M=v.find(B=>B.id===k);if(!(!M||M.read)){if(M.source==="broadcast"){p(B=>{const _=new Set(B);return _.add(k),ZV(_),s(U=>U.map(F=>F.id===k?{...F,read:!0}:F)),_});return}try{await yj(k),n(B=>B.map(_=>_.id===k?{..._,read:!0}:_))}catch(B){console.warn("[notifications] mark read:",B)}}},[v]),T=w.useCallback(async()=>{const k=v.filter(M=>!M.read);for(const M of k)await j(M.id)},[v,j]),E=w.useCallback(k=>{var M;return((M=v.find(B=>B.id===k))==null?void 0:M.read)??!1},[v]),D=w.useCallback(async()=>{},[]);return{items:v,loading:o,error:d,unreadCount:N,markRead:j,markAllRead:T,isRead:E,reload:D}}function Lg({user:e,onViewAll:t}){const{unreadCount:n}=jj(e);return i.jsxs("button",{type:"button",onClick:t,className:"relative w-8.5 h-8.5 rounded-lg bg-slate-50 flex items-center justify-center text-slate-500 hover:text-[#008F8F] hover:bg-teal-50 border border-slate-200 transition-all cursor-pointer active:scale-90","aria-label":n>0?`${n} unread notifications`:"Notifications",children:[i.jsx(os,{size:16}),n>0?i.jsx("span",{className:"absolute -top-1 -right-1 min-w-[16px] h-4 px-1 rounded-full bg-rose-500 text-white text-[9px] font-bold flex items-center justify-center",children:n>9?"9+":n}):null]})}let ns=null,Li=null,Vo=null,kj=0;const Pg=new Set;function Ly(){kj+=1,Pg.forEach(e=>{try{e()}catch{}})}function tq(e){return Pg.add(e),()=>{Pg.delete(e)}}function Cw(){return kj}function Cj(e){return{id:e.id,name:e.name,subtitle:e.subtitle||e.tagline||e.id,icon:e.icon||"ð",color:e.color||"from-slate-700 to-slate-900",desc:e.description||"",paid:!!e.paid}}function Aw(e){Li=e;const t=e.map(Cj);if(!t.some(n=>n.id===Ht)){const n=cc.find(a=>a.id===Ht);n&&t.push(n)}t.sort((n,a)=>n.id===Ht?1:a.id===Ht?-1:n.name.localeCompare(a.name)),BV(t),Ly()}async function Ug(){if(!(ns&&Li))return Vo||(Vo=(async()=>{try{const[e,t]=await Promise.all([Un("/api/exams"),Un("/api/bots")]);ns=e.exams??[],Aw(t.bots??[])}catch(e){console.warn("[examCatalog] failed to load, using fallbacks",e),ns=ns??[],Li?Ly():Aw([])}finally{Vo=null}})(),Vo)}function Aj(e){const t=(ns??[]).find(n=>n.id===e);return(t==null?void 0:t.name)||(t==null?void 0:t.shortLabel)||e}function nq(e){var t;return((t=(ns??[]).find(n=>n.id===e))==null?void 0:t.topicPlaceholder)||void 0}function aq(e){var s;const t=(ns??[]).find(o=>o.id===e),n=(s=t==null?void 0:t.defaultBotId)==null?void 0:s.trim();if(!n||n===Ht)return null;const a=(Li??[]).find(o=>o.id===n);return a&&!a.paid?null:n}function rq(e){if(!e.length)return[...cc];const t=e.map(Cj);if(!t.some(n=>n.id===Ht)){const n=cc.find(a=>a.id===Ht);n&&t.push(n)}return t}
vendor: 9,729 bytes, line 2040
2040function Fg(){ns=null,Li=null,Vo=null,Ly()}function sq(){return w.useSyncExternalStore(tq,Cw,Cw)}function ds(){const e=sq(),[t,n]=w.useState(!ns||!Li),[a,s]=w.useState(""),o=w.useCallback(async()=>{n(!0),s(""),Fg();try{await Ug()}catch(c){s(c instanceof Error?c.message:"Failed to load catalog")}finally{n(!1)}},[]);return w.useEffect(()=>{let c=!1;return(async()=>(n(!0),await Ug(),c||n(!1)))(),()=>{c=!0}},[]),{exams:ns??[],bots:Li??[],chatBots:rq(Li??[]),loading:t,error:a,reload:o,version:e}}function Ej(e){var t,n,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]&&(n=Ej(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function iq(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Ej(e))&&(a&&(a+=" "),a+=t);return a}const lq=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},oq=(e,t)=>({classGroupId:e,validator:t}),Tj=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Am="-",Ew=[],cq="arbitrary..",uq=e=>{const t=hq(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return dq(c);const d=c.split(Am),h=d[0]===""&&d.length>1?1:0;return Mj(d,h,t)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=a[c],f=n[c];return h?f?lq(f,h):h:f||Ew}return n[c]||Ew}}},Mj=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=Mj(e,t+1,o);if(f)return f}const c=n.validators;if(c===null)return;const d=t===0?e.join(Am):e.slice(t).join(Am),h=c.length;for(let f=0;f<h;f++){const p=c[f];if(p.validator(d))return p.classGroupId}},dq=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?cq+a:void 0})(),hq=e=>{const{theme:t,classGroups:n}=e;return mq(n,t)},mq=(e,t)=>{const n=Tj();for(const a in e){const s=e[a];Py(s,n,a,t)}return n},Py=(e,t,n,a)=>{const s=e.length;for(let o=0;o<s;o++){const c=e[o];fq(c,t,n,a)}},fq=(e,t,n,a)=>{if(typeof e=="string"){pq(e,t,n);return}if(typeof e=="function"){xq(e,t,n,a);return}gq(e,t,n,a)},pq=(e,t,n)=>{const a=e===""?t:Ij(t,e);a.classGroupId=n},xq=(e,t,n,a)=>{if(bq(e)){Py(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(oq(n,e))},gq=(e,t,n,a)=>{const s=Object.entries(e),o=s.length;for(let c=0;c<o;c++){const[d,h]=s[c];Py(h,Ij(t,d),n,a)}},Ij=(e,t)=>{let n=e;const a=t.split(Am),s=a.length;for(let o=0;o<s;o++){const c=a[o];let d=n.nextPart.get(c);d||(d=Tj(),n.nextPart.set(c,d)),n=d}return n},bq=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,yq=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(o,c)=>{n[o]=c,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let c=n[o];if(c!==void 0)return c;if((c=a[o])!==void 0)return s(o,c),c},set(o,c){o in n?n[o]=c:s(o,c)}}},Vg="!",Tw=":",vq=[],Mw=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),wq=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const o=[];let c=0,d=0,h=0,f;const p=s.length;for(let j=0;j<p;j++){const T=s[j];if(c===0&&d===0){if(T===Tw){o.push(s.slice(h,j)),h=j+1;continue}if(T==="/"){f=j;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const x=o.length===0?s:s.slice(h);let b=x,v=!1;x.endsWith(Vg)?(b=x.slice(0,-1),v=!0):x.startsWith(Vg)&&(b=x.slice(1),v=!0);const N=f&&f>h?f-h:void 0;return Mw(o,v,b,N)};if(t){const s=t+Tw,o=a;a=c=>c.startsWith(s)?o(c.slice(s.length)):Mw(vq,!1,c,void 0,!0)}if(n){const s=a;a=o=>n({className:o,parseClassName:s})}return a},Sq=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let o=0;o<n.length;o++){const c=n[o],d=c[0]==="[",h=t.has(c);d||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},Nq=e=>({cache:yq(e.cacheSize),parseClassName:wq(e),sortModifiers:Sq(e),postfixLookupClassGroupIds:jq(e),...uq(e)}),jq=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},kq=/\s+/,Cq=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:o,postfixLookupClassGroupIds:c}=t,d=[],h=e.trim().split(kq);let f="";for(let p=h.length-1;p>=0;p-=1){const x=h[p],{isExternal:b,modifiers:v,hasImportantModifier:N,baseClassName:j,maybePostfixModifierPosition:T}=n(x);if(b){f=x+(f.length>0?" "+f:f);continue}let E=!!T,D;if(E){const U=j.substring(0,T);D=a(U);const F=D&&c[D]?a(j):void 0;F&&F!==D&&(D=F,E=!1)}else D=a(j);if(!D){if(!E){f=x+(f.length>0?" "+f:f);continue}if(D=a(j),!D){f=x+(f.length>0?" "+f:f);continue}E=!1}const k=v.length===0?"":v.length===1?v[0]:o(v).join(":"),M=N?k+Vg:k,B=M+D;if(d.indexOf(B)>-1)continue;d.push(B);const _=s(D,E);for(let U=0;U<_.length;++U){const F=_[U];d.push(M+F)}f=x+(f.length>0?" "+f:f)}return f},Aq=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=zj(n))&&(s&&(s+=" "),s+=a);return s},zj=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=zj(e[a]))&&(n&&(n+=" "),n+=t);return n},Eq=(e,...t)=>{let n,a,s,o;const c=h=>{const f=t.reduce((p,x)=>x(p),e());return n=Nq(f),a=n.cache.get,s=n.cache.set,o=d,d(h)},d=h=>{const f=a(h);if(f)return f;const p=Cq(h,n);return s(h,p),p};return o=c,(...h)=>o(Aq(...h))},Tq=[],Dn=e=>{const t=n=>n[e]||Tq;return t.isThemeGetter=!0,t},_j=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Dj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mq=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zq=/\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$/,_q=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ji=e=>Mq.test(e),lt=e=>!!e&&!Number.isNaN(Number(e)),Gr=e=>!!e&&Number.isInteger(Number(e)),d1=e=>e.endsWith("%")&<(e.slice(0,-1)),Bs=e=>Iq.test(e),Bj=()=>!0,Rq=e=>zq.test(e)&&!_q.test(e),Uy=()=>!1,Oq=e=>Dq.test(e),Lq=e=>Bq.test(e),Pq=e=>!Be(e)&&!Oe(e),Uq=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Fq=e=>Zi(e,Lj,Uy),Be=e=>_j.test(e),Sl=e=>Zi(e,Pj,Rq),Iw=e=>Zi(e,Xq,lt),Vq=e=>Zi(e,Fj,Bj),qq=e=>Zi(e,Uj,Uy),zw=e=>Zi(e,Rj,Uy),Hq=e=>Zi(e,Oj,Lq),gh=e=>Zi(e,Vj,Oq),Oe=e=>Dj.test(e),Mu=e=>$l(e,Pj),$q=e=>$l(e,Uj),_w=e=>$l(e,Rj),Gq=e=>$l(e,Lj),Yq=e=>$l(e,Oj),bh=e=>$l(e,Vj,!0),Wq=e=>$l(e,Fj,!0),Zi=(e,t,n)=>{const a=_j.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},$l=(e,t,n=!1)=>{const a=Dj.exec(e);return a?a[1]?t(a[1]):n:!1},Rj=e=>e==="position"||e==="percentage",Oj=e=>e==="image"||e==="url",Lj=e=>e==="length"||e==="size"||e==="bg-size",Pj=e=>e==="length",Xq=e=>e==="number",Uj=e=>e==="family-name",Fj=e=>e==="number"||e==="weight",Vj=e=>e==="shadow",Kq=()=>{const e=Dn("color"),t=Dn("font"),n=Dn("text"),a=Dn("font-weight"),s=Dn("tracking"),o=Dn("leading"),c=Dn("breakpoint"),d=Dn("container"),h=Dn("spacing"),f=Dn("radius"),p=Dn("shadow"),x=Dn("inset-shadow"),b=Dn("text-shadow"),v=Dn("drop-shadow"),N=Dn("blur"),j=Dn("perspective"),T=Dn("aspect"),E=Dn("ease"),D=Dn("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...M(),Oe,Be],_=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],F=()=>[Oe,Be,h],W=()=>[ji,"full","auto",...F()],ae=()=>[Gr,"none","subgrid",Oe,Be],le=()=>["auto",{span:["full",Gr,Oe,Be]},Gr,Oe,Be],re=()=>[Gr,"auto",Oe,Be],xe=()=>["auto","min","max","fr",Oe,Be],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...F()],ne=()=>[ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],Z=()=>[ji,"screen","full","dvw","lvw","svw","min","max","fit",...F()],Y=()=>[ji,"screen","full","lh","dvh","lvh","svh","min","max","fit",...F()],I=()=>[e,Oe,Be],R=()=>[...M(),_w,zw,{position:[Oe,Be]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Gq,Fq,{size:[Oe,Be]}],ge=()=>[d1,Mu,Sl],Ee=()=>["","none","full",f,Oe,Be],Te=()=>["",lt,Mu,Sl],Ve=()=>["solid","dashed","dotted","double"],et=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Re=()=>[lt,d1,_w,zw],kt=()=>["","none",N,Oe,Be],yt=()=>["none",lt,Oe,Be],Yt=()=>["none",lt,Oe,Be],cn=()=>[lt,Oe,Be],vt=()=>[ji,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bs],breakpoint:[Bs],color:[Bj],container:[Bs],"drop-shadow":[Bs],ease:["in","out","in-out"],font:[Pq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bs],shadow:[Bs],spacing:["px",lt],text:[Bs],"text-shadow":[Bs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ji,Be,Oe,T]}],container:["container"],"container-type":[{"@container":["","normal","size",Oe,Be]}
vendor: 6,141 bytes, line 2040
2040],"container-named":[Uq],columns:[{columns:[lt,Be,Oe,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Gr,"auto",Oe,Be]}],basis:[{basis:[ji,"full","auto",d,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ji,"auto","initial","none",Be]}],grow:[{grow:["",lt,Oe,Be]}],shrink:[{shrink:["",lt,Oe,Be]}],order:[{order:[Gr,"first","last","none",Oe,Be]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pbs:[{pbs:F()}],pbe:[{pbe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[d,"screen",...ne()]}],"min-w":[{"min-w":[d,"screen","none",...ne()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,Mu,Sl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Wq,Vq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",d1,Be]}],"font-family":[{font:[$q,qq,t]}],"font-features":[{"font-features":[Be]}],"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,Oe,Be]}],"line-clamp":[{"line-clamp":[lt,"none",Oe,Iw]}],leading:[{leading:[o,...F()]}],"list-image":[{"list-image":["none",Oe,Be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Oe,Sl]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[lt,"auto",Oe,Be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"tab-size":[{tab:[Gr,Oe,Be]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Be]}],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",Oe,Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gr,Oe,Be],radial:["",Oe,Be],conic:[Gr,Oe,Be]},Yq,Hq]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ge()}
2040],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"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-bs":[{"border-bs":Te()}],"border-w-be":[{"border-be":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:[...Ve(),"hidden","none"]}],"divide-style":[{divide:[...Ve(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}
vendor: 5,780 bytes, line 2040
2040],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Oe,Be]}],"outline-w":[{outline:["",lt,Mu,Sl]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",p,bh,gh]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",x,bh,gh]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[lt,Sl]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",b,bh,gh]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[lt,Oe,Be]}],"mix-blend":[{"mix-blend":[...et(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":et()}],"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":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Re()}],"mask-image-linear-to-pos":[{"mask-linear-to":Re()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":Re()}],"mask-image-t-to-pos":[{"mask-t-to":Re()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":Re()}],"mask-image-r-to-pos":[{"mask-r-to":Re()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":Re()}],"mask-image-b-to-pos":[{"mask-b-to":Re()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":Re()}],"mask-image-l-to-pos":[{"mask-l-to":Re()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":Re()}],"mask-image-x-to-pos":[{"mask-x-to":Re()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":Re()}],"mask-image-y-to-pos":[{"mask-y-to":Re()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Oe,Be]}],"mask-image-radial-from-pos":[{"mask-radial-from":Re()}],"mask-image-radial-to-pos":[{"mask-radial-to":Re()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Re()}],"mask-image-conic-to-pos":[{"mask-conic-to":Re()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Be]}],filter:[{filter:["","none",Oe,Be]}],blur:[{blur:kt()}],brightness:[{brightness:[lt,Oe,Be]}],contrast:[{contrast:[lt,Oe,Be]}],"drop-shadow":[{"drop-shadow":["","none",v,bh,gh]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",lt,Oe,Be]}],"hue-rotate":[{"hue-rotate":[lt,Oe,Be]}],invert:[{invert:["",lt,Oe,Be]}],saturate:[{saturate:[lt,Oe,Be]}],sepia:[{sepia:["",lt,Oe,Be]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Be]}],"backdrop-blur":[{"backdrop-blur":kt()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Oe,Be]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Oe,Be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Oe,Be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Oe,Be]}],"backdrop-invert":[{"backdrop-invert":["",lt,Oe,Be]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Oe,Be]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Oe,Be]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Oe,Be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Oe,Be]}],ease:[{ease:["linear","initial",E,Oe,Be]}],delay:[{delay:[lt,Oe,Be]}],animate:[{animate:["none",D,Oe,Be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,Oe,Be]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:yt()}],"rotate-x":[{"rotate-x":yt()}],"rotate-y":[{"rotate-y":yt()}],"rotate-z":[{"rotate-z":yt()}],scale:[{scale:Yt()}],"scale-x":[{"scale-x":Yt()}],"scale-y":[{"scale-y":Yt()}],"scale-z":[{"scale-z":Yt()}],"scale-3d":["scale-3d"],skew:[{skew:cn()}],"skew-x":[{"skew-x":cn()}],"skew-y":[{"skew-y":cn()}],transform:[{transform:[Oe,Be,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:vt()}],"translate-x":[{"translate-x":vt()}],"translate-y":[{"translate-y":vt()}],"translate-z":[{"translate-z":vt()}],"translate-none":["translate-none"],zoom:[{zoom:[Gr,Oe,Be]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}
2040],"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",Oe,Be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mbs":[{"scroll-mbs":F()}],"scroll-mbe":[{"scroll-mbe":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pbs":[{"scroll-pbs":F()}],"scroll-pbe":[{"scroll-pbe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",Oe,Be]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[lt,Mu,Sl,Iw]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qq=Eq(Kq);function he(...e){return Qq(iq(e))}const qj="socratech_expiry_dismissed";function Hj(){try{return JSON.parse(localStorage.getItem(qj)??"{}")}catch{return{}}}function Jq(e){const t=Hj();t[e]=Date.now()+1440*60*1e3,localStorage.setItem(qj,JSON.stringify(t))}function Zq(e){const t=Hj();return!!(t[e]&&t[e]>Date.now())}function eH(e){const t=Date.parse(e)-Date.now();return Math.floor(t/(1e3*60*60*24))}function tH({user:e,onRenew:t}){const{bots:n}=ds(),[a,s]=w.useState([]),[o,c]=w.useState(0);w.useEffect(()=>{if(!(e!=null&&e.botLicenses)){s([]),c(0);return}const N=n.filter(T=>T.paid).map(T=>T.id).length>0?n.filter(T=>T.paid).map(T=>T.id):cs().length?cs():[...Hl],j=[];for(const T of N){const E=e.botLicenses[T];if(!(E!=null&&E.expiresAt)||Zq(T))continue;const D=eH(E.expiresAt);D<=3&&D>=-7&&j.push({botId:T,planName:E.planName||T,expiresAt:E.expiresAt,daysLeft:D})}j.sort((T,E)=>T.daysLeft-E.daysLeft),s(j),c(0)},[e==null?void 0:e.botLicenses,n]);const d=N=>{Jq(N),s(j=>j.filter(T=>T.botId!==N))};if(a.length===0)return null;const h=a[o],f=h.daysLeft<0,p=f?"border-rose-200 bg-rose-50":h.daysLeft===0?"border-orange-200 bg-orange-50":"border-amber-200 bg-amber-50",x=f?"text-rose-500":h.daysLeft===0?"text-orange-500":"text-amber-500",b=f?`${h.planName} plan expired`:h.daysLeft===0?`${h.planName} expires today!`:`${h.planName} expires in ${h.daysLeft} day${h.daysLeft!==1?"s":""}`,v=f?"Your access has ended. Renew now to continue using this tutor."
2040:"Renew now to avoid interruption in your study flow.";return i.jsx(bt,{children:i.jsxs(ze.div,{initial:{opacity:0,y:-16,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-12,scale:.97},transition:{type:"spring",stiffness:380,damping:30},className:he("relative flex items-start gap-3 px-4 py-3 rounded-2xl border shadow-sm mx-3 sm:mx-4 mt-2",p),children:[i.jsx("div",{className:he("shrink-0 mt-0.5",x),children:f?i.jsx(My,{size:17}):i.jsx(AU,{size:17})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-[13px] font-bold text-slate-900 leading-snug",children:b}),i.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5 leading-snug",children:v})]}),i.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[i.jsx("button",{type:"button",onClick:()=>t(h.botId),className:he("flex items-center gap-1 px-3 py-1.5 rounded-xl text-[11px] font-bold text-white cursor-pointer transition-colors",f?"bg-rose-500 hover:bg-rose-600":h.daysLeft===0?"bg-orange-500 hover:bg-orange-600":"bg-amber-500 hover:bg-amber-600"),children:f?i.jsxs(i.Fragment,{children:[i.jsx(Sr,{size:11})," Renew"]}):i.jsxs(i.Fragment,{children:[i.jsx(dj,{size:11})," Renew"]})}),i.jsx("button",{type:"button",onClick:()=>d(h.botId),className:"w-6 h-6 flex items-center justify-center rounded-lg text-slate-400 hover:text-slate-600 hover:bg-white/60 transition-colors cursor-pointer",title:"Dismiss",children:i.jsx(Ln,{size:13})})]}),a.length>1&&i.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 flex gap-1",children:a.map((N,j)=>i.jsx("button",{type:"button",onClick:()=>c(j),className:he("w-1.5 h-1.5 rounded-full transition-all cursor-pointer",j===o?"bg-slate-500":"bg-slate-300")},N.botId))})]},h.botId)})}function nH(e){try{return new Date(e).toLocaleString("en-IN",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function aH({user:e}){const{items:t,loading:n,error:a,unreadCount:s,markRead:o,markAllRead:c,isRead:d}=jj(e);return i.jsxs("div",{className:"w-full max-w-2xl md:max-w-4xl lg:max-w-6xl mx-auto space-y-6 text-left pb-8",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-black text-slate-900 tracking-tight",children:"Notifications"}),i.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Updates from Socratech AI â offers, tips, and system messages."})]}),i.jsx("div",{className:"flex gap-2",children:s>0?i.jsxs("button",{type:"button",onClick:c,className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-xl bg-[#00B5B5] text-white text-xs font-semibold hover:bg-[#00a0a0] cursor-pointer",children:[i.jsx(rj,{size:14}),"Mark all read"]}):null})]}),a?i.jsx("p",{className:"mb-4 text-sm text-rose-600 rounded-xl border border-rose-100 bg-rose-50 px-4 py-3",children:a}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):t.length===0?i.jsxs("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-white p-12 text-center",children:[i.jsx(os,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),i.jsx("p",{className:"text-sm font-semibold text-slate-700",children:"No notifications yet"}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"When admin sends a broadcast, it will show up here."})]}):i.jsx("ul",{className:"space-y-3",children:t.map((h,f)=>i.jsx(ze.li,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:f*.05},className:he("rounded-2xl border bg-white p-4 sm:p-5 shadow-sm transition-colors",d(h.id)?"border-slate-100":"border-teal-200/80 bg-teal-50/30"),children:i.jsx("button",{type:"button",onClick:()=>o(h.id),className:"w-full text-left cursor-pointer",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:he("w-9 h-9 rounded-xl flex items-center justify-center shrink-0",d(h.id)?"bg-slate-100":"bg-[#00B5B5]/15"),children:i.jsx(os,{size:16,className:d(h.id)?"text-slate-400":"text-[#00B5B5]"})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:h.title}),d(h.id)?null:i.jsx("span",{className:"text-[9px] font-bold uppercase text-[#008F8F] bg-teal-100 px-2 py-0.5 rounded-full shrink-0",children:"New"})]}),i.jsx("p",{className:"text-sm text-slate-600 mt-1 leading-relaxed whitespace-pre-wrap",children:h.body}),i.jsx("p",{className:"text-[10px] text-slate-400 mt-2",children:nH(h.sentAt)})]})]})})},h.id))})]})}async function rH(){return(await Un("/api/chat/sessions")).sessions}async function Dw(e){return(await kn("/api/chat/sessions",e)).session}async function sH(e){await M0(`/api/chat/sessions/${e}`)}async function Bw(e){return(await Un(`/api/chat/sessions/${e}/messages`)).messages}async function Rw(e,t){return(await kn(`/api/chat/sessions/${e}/messages`,t)).message}function iH({isPremium:e}){const[t,n]=w.useState(null),[a,s]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const c=((await Un("/api/broadcasts/active")).broadcasts??[]).map(d=>({id:d.id,title:String(d.title??""),body:String(d.body??""),audience:String(d.audience??"all"),sentAt:d.sentAt||d.createdAt||null})).filter(d=>d.sentAt).filter(d=>d.audience==="premium"?e===!0:d.audience==="free"?!e:!0).sort((d,h)=>h.sentAt>d.sentAt?1:-1);c[0]&&n(c[0])}catch{}})()},[e]),!t||a===t.id?null:i.jsxs("div",{className:"mb-4 rounded-2xl border border-[#00B5B5]/20 bg-gradient-to-r from-teal-50 to-white px-4 py-3 flex gap-3 items-start shadow-sm",children:[i.jsx("div",{className:"w-9 h-9 rounded-xl bg-[#00B5B5]/10 flex items-center justify-center shrink-0",children:i.jsx(os,{className:"w-4 h-4 text-[#00B5B5]"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:t.title}),i.jsx("p",{className:"text-xs text-slate-600 mt-0.5 leading-relaxed",children:t.body})]}),i.jsx("button",{type:"button",onClick:()=>s(t.id),className:"p-1 rounded-lg text-slate-400 hover:bg-slate-100 cursor-pointer shrink-0","aria-label":"Dismiss",children:i.jsx(Ln,{className:"w-4 h-4"})})]})}function $j({examLabels:e,lockedBots:t,onViewPlans:n,onUnlockBot:a}){if(t.length===0)return null;const s=e.length>0?e.join(" & "):"your target exams";return i.jsxs("div",{className:"rounded-xl border border-teal-200 bg-gradient-to-br from-teal-50 via-white to-w
2040hite p-4 space-y-3.5",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-lg bg-[#00B5B5]/15 flex items-center justify-center shrink-0",children:i.jsx(Sr,{size:18,className:"text-[#008F8F]"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("p",{className:"text-xs font-bold text-slate-900",children:["Upgrade for ",s]}),i.jsx("p",{className:"text-[11px] text-slate-600 mt-0.5 leading-snug",children:"General Coach is always free. Specialist tutors match your exam syllabus and question style."})]})]}),i.jsxs("ul",{className:"text-[10px] text-slate-600 space-y-1.5 pl-1",children:[i.jsxs("li",{className:"flex items-start gap-1.5",children:[i.jsx(Xa,{size:12,className:"text-emerald-600 shrink-0 mt-0.5"}),"Pay only for the bot you need (JEE, NEET, UPSC, or GATE)"]}),i.jsxs("li",{className:"flex items-start gap-1.5",children:[i.jsx(Xa,{size:12,className:"text-emerald-600 shrink-0 mt-0.5"}),"Secure checkout · invoice saved under Account"]})]}),i.jsx("div",{className:"flex flex-wrap gap-2 pt-0.5",children:t.map(o=>i.jsxs("button",{type:"button",disabled:!a,onClick:()=>a==null?void 0:a(o.id),className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-white border border-slate-200 text-[10px] font-bold text-slate-700 hover:border-[#00B5B5] disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:border-slate-200",children:[i.jsx("span",{children:o.icon}),"Unlock ",o.id]},o.id))}),i.jsxs("button",{type:"button",onClick:n,className:"w-full py-3 rounded-lg bg-slate-900 text-white text-xs font-bold flex items-center justify-center gap-1.5 hover:bg-[#008F8F] transition-colors mt-0.5",children:["Compare plans",i.jsx(pn,{size:14})]})]})}function Gj({user:e}){const t=Sc(e);return t.length===0?null:i.jsxs("div",{role:"status","aria-label":"Your active tutor subscriptions",className:"rounded-xl border border-dashed border-emerald-200/80 bg-emerald-50/40 px-4 py-3 flex items-start gap-3 pointer-events-none select-none",children:[i.jsx(Sr,{size:16,className:"text-emerald-700 shrink-0 mt-0.5"}),i.jsxs("div",{className:"min-w-0 text-left",children:[i.jsx("p",{className:"text-xs font-bold text-emerald-900",children:"Your active tutors"}),i.jsx("p",{className:"text-[10px] text-emerald-800 mt-0.5",children:t.map(n=>{var s;const a=(s=p0(e,n))==null?void 0:s.expiresAt;return a?`${n} (till ${gr(a)})`:n}).join(" · ")})]})]})}const Fl=[{id:"exams",subtitle:"Step 1 of 5",title:"What are you preparing for?",description:"Pick every exam track you want Socratech to tune your Socratic tutor for.",type:"multi",options:[{id:"JEE",label:"JEE Main & Advanced",description:"Engineering mechanics, calculus & conceptual physics"},{id:"NEET",label:"NEET Medical",description:"Biology, chemistry & clinical reasoning"},{id:"NCERT",label:"NCERT Boards",description:"Class 11 & 12 syllabus alignment"},{id:"Olympiads",label:"Olympiads",description:"Advanced problem solving & proofs"},{id:"UPSC",label:"UPSC / Civil Services",description:"General studies, essays & analytical writing"}]},{id:"classLevel",subtitle:"Step 2 of 5",title:"Which stage are you at?",description:"We calibrate difficulty and pacing to your academic level.",type:"single",options:[{id:"9",label:"Class 9"},{id:"10",label:"Class 10"},{id:"11",label:"Class 11"},{id:"12",label:"Class 12"},{id:"dropper",label:"Dropper / Gap year"},{id:"graduate",label:"Graduate & beyond"}]},{id:"learningStyle",subtitle:"Step 3 of 5",title:"How should your AI tutor guide you?",description:"Choose the Socratic feedback style that fits how you learn best.",type:"single",options:[{id:"strict",label:"Strict Socratic",description:"Only guiding questions â no direct answers."},{id:"balanced",label:"Balanced",description:"Questions first, then confirms your steps."},{id:"descriptive",label:"Direct guide",description:"Full explanations, then checks understanding."}]},{id:"studyHours",subtitle:"Step 4 of 5",title:"How many hours do you study weekly?",description:"Helps us suggest realistic doubt-session targets.",type:"single",options:[{id:"under5",label:"Under 5 hours"},{id:"5-10",label:"5 â 10 hours"},{id:"10-20",label:"10 â 20 hours"},{id:"20plus",label:"20+ hours"}]},{id:"studyGoal",subtitle:"Step 5 of 5",title:"What's your top goal right now?",description:"We'll prioritize features and prompts around this focus.",type:"single",options:[{id:"crack-exam",label:"Crack my target exam"}
2040,{id:"weak-topics",label:"Fix weak topics fast"},{id:"daily-doubts",label:"Daily doubt solving"},{id:"mock-tests",label:"Mock tests & revision"}]}],Ow={JEE:"JEE",NEET:"NEET",UPSC:"UPSC",NCERT:null,Olympiads:"JEE",GATE:"GATE"};function qg(e){const t=aq(e);return t||(Object.prototype.hasOwnProperty.call(Ow,e)?Ow[e]??null:fn(e)?e:null)}function Nc(e){var t;return(t=e==null?void 0:e.selectedExams)!=null&&t.length?e.selectedExams:[]}function Hg(e,t){var a;if(e==="exams"){const s=Aj(t);if(s&&s!==t)return s}const n=Fl.find(s=>s.id===e);return((a=n==null?void 0:n.options.find(s=>s.id===t))==null?void 0:a.label)??t}function Gs(e){return e.map(t=>Hg("exams",t))}function U0(e){const t=Nc(e),n=[];t.length&&n.push(Gs(t).join(", "));const a=e==null?void 0:e.onboardingAnswers;return a!=null&&a.classLevel&&n.push(Hg("classLevel",a.classLevel)),a!=null&&a.studyGoal&&n.push(Hg("studyGoal",a.studyGoal)),n.length?n.join(" · "):"Complete onboarding to personalize your feed"}function Yj(e,t){var s;if(t){const o=nq(t);if(o)return o}const n={JEE:"e.g. rotational mechanics, electrostatics",NEET:"e.g. human physiology, organic chemistry",UPSC:"e.g. polity, essay structure",NCERT:"e.g. quadratic equations, light chapter",Olympiads:"e.g. number theory, kinematics",GATE:"e.g. algorithms, digital logic"};if(t&&n[t])return n[t];const a=(s=e==null?void 0:e.onboardingAnswers)==null?void 0:s.studyGoal;return a==="weak-topics"?"e.g. your weakest chapter this week":a==="mock-tests"?"e.g. full mock review plan":"e.g. topic you want to master"}function Wj(e){const t=Nc(e),n=new Set([Ht]);for(const f of t){const p=qg(f);p&&n.add(p)}for(const f of Sc(e))n.add(f);const s=(Nm().length?Nm():$s).filter(f=>n.has(f.id)).map(f=>{const p=fn(f.id)?p0(e,f.id):null;return{id:f.id,name:f.name,subtitle:f.subtitle,icon:f.icon,unlocked:on(e,f.id),expiresLabel:p!=null&&p.expiresAt?gr(p.expiresAt):void 0}}),o=s.filter(f=>f.unlocked&&f.id!==Ht),c=s.filter(f=>!f.unlocked&&f.id!==Ht),d=s.find(f=>f.id===Ht)??{id:Ht,name:"General Coach",subtitle:"Free · All subjects",icon:"ð",unlocked:!0};let h=d;for(const f of t){const p=qg(f);if(!p)continue;const x=s.find(b=>b.id===p&&b.unlocked);if(x){h=x;break}}return h.id===Ht&&o.length>0&&(h=o[0]),{primary:h,owned:o,locked:c,general:d,examIds:t}}function lH(e,t){const n=qg(t);if(!n){const o=m0(Ht);return o?{id:Ht,name:o.name,subtitle:o.subtitle,icon:o.icon,unlocked:!0}:null}const a=m0(n);if(!a)return null;const s=p0(e,n);return{id:n,name:a.name,subtitle:a.subtitle,icon:a.icon,unlocked:on(e,n),expiresLabel:s!=null&&s.expiresAt?gr(s.expiresAt):void 0}}const Xh="socratech_road_handoff";function Xj(e){const t={...e,createdAt:Date.now()};localStorage.setItem(Xh,JSON.stringify(t))}function oH(){try{const e=localStorage.getItem(Xh);if(!e)return null;localStorage.removeItem(Xh);const t=JSON.parse(e);return!(t!=null&&t.chatPrompt)||!t.createdAt||Date.now()-t.createdAt>1800*1e3?null:t}catch{return localStorage.removeItem(Xh),null}}function Kj(e,t,n){var p,x;const a=n&&Gs([n])[0]||Gs(Nc(t))[0]||"your exam",s=((p=t==null?void 0:t.onboardingAnswers)==null?void 0:p.learningStyle)??"balanced",o=((x=t==null?void 0:t.onboardingAnswers)==null?void 0:x.studyGoal)??"",c=s==="descriptive"?`I'm studying ${e} for ${a}. Ask me what I already know before explaining anything.`:`I'm stuck on ${e} (${a}). Don't give the answer â ask what I already understand and where I get lost.`,d=s==="strict"?`Walk me through ${e} with only guiding questions. One step at a time â I want to earn the next inference.`:`Coach me on ${e} for ${a}. Questions first, then confirm each step I take.`,h=o==="mock-tests"?`Give me one exam-style question on ${e} for ${a}. Wait for my attempt before feedback.`:o==="weak-topics"?`Drill my weak spots in ${e}. Ask a short check question, then probe why I missed it.`:`Set one practice problem on ${e}. Let me attempt it; then Socratically review my method.`,f=o==="crack-exam"?`Quiz me like a viva on ${e}. I must explain the pattern in my own words â interrupt if I waffle.`:`I'll explain ${e} in my own words. Challenge every fuzzy step until the idea locks.`;return[{id:"probe",kind:"probe",title:"Probe what you know",blurb:"Surface gaps before any explanation â classic Socratic open.",chatPrompt:c,done:!1},{id:"reason",kind:"reason",title:"Reason the next step",blurb:"Earn the inference with the tutor â no answer dumps.",chatPrompt:d,done:!1},{id:"drill",kind:"drill",title:"Drill under pressure",blurb:"One problem. Your attempt first. Feedback after.",chatPrompt:h,done:!1}
2040,{id:"lock",kind:"lock",title:"Lock the pattern",blurb:"Teach it back so the next paper feels familiar.",chatPrompt:f,done:!1}]}function Qj(e,t){return`socratech_roadmap_${e}_${t}`}function cH(e,t){const n=Gs([t])[0]??t;return`${e} · ${n}`}function uH(e,t,n){const a=Kj(e.title,t,n),s=new Map(e.steps.map(c=>[c.id,c])),o=a.map((c,d)=>{const h=s.get(c.id)??e.steps[d];return{...c,done:!!(h!=null&&h.done)}});return{...e,steps:o,examId:n}}function Jj(e){var n;switch((n=e==null?void 0:e.onboardingAnswers)==null?void 0:n.studyGoal){case"crack-exam":return"Road sets this week's topic; Chat makes you earn each step â then lock it for the paper.";case"weak-topics":return"Put weak chapters on Road, probe gaps in Chat the same day, then drill until it sticks.";case"daily-doubts":return"Road holds your focus topic; open Chat when a doubt appears â don't leave it floating.";case"mock-tests":return"After each mock, park wrong topics on Road and run probe â drill â lock in Chat.";default:return"Road = this week's focus. Chat = Socratic steps. Plans = exam specialist when you need one."}}function dH({user:e,onNavigate:t,sessions:n=[],activeSessionId:a,setActiveSessionId:s}){var T;const{version:o}=ds(),c=((T=e==null?void 0:e.displayName)==null?void 0:T.split(" ")[0])||"Student",d=U0(e),h=Jj(e),f=Gs(Nc(e)),{primary:p,owned:x,locked:b,general:v}=w.useMemo(()=>Wj(e),[e,o]),N=E=>{if(!on(e,E)){E!=="General"&&uc(E),t("premium");return}localStorage.setItem("socratech_active_bot",E),t("guide")},j=x.length>0;return i.jsxs("div",{className:"pb-24 px-3 sm:px-5 w-full space-y-5 pt-3",children:[i.jsx("div",{className:"mb-1",children:i.jsx(iH,{isPremium:e==null?void 0:e.isPremium})}),i.jsxs("header",{className:"space-y-1.5",children:[i.jsxs("h1",{className:"text-lg font-black text-slate-900",children:["Hi, ",c]}),i.jsx("p",{className:"text-[11px] text-slate-500 leading-snug",children:d}),i.jsx("p",{className:"text-[11px] text-[#008F8F] leading-snug font-medium pt-0.5",children:h})]}),j?i.jsx(Gj,{user:e}):i.jsx($j,{examLabels:f,lockedBots:b,onViewPlans:()=>t("premium"),onUnlockBot:E=>N(E)}),i.jsxs("section",{className:"space-y-2.5 pt-1",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Step 1 · Doubts"}),i.jsxs("button",{type:"button",onClick:()=>N(p.id),className:"w-full flex items-center gap-3 p-4 rounded-xl bg-slate-900 text-white text-left active:scale-[0.99] transition-transform",children:[i.jsx("span",{className:"text-2xl shrink-0",children:p.icon}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-[10px] text-teal-300 font-semibold",children:p.unlocked?"Open Chat":"Start free on General Coach"}),i.jsx("p",{className:"text-sm font-bold truncate",children:p.name}),i.jsx("p",{className:"text-[10px] text-slate-400 truncate",children:p.subtitle})]}),i.jsx(vr,{size:18,className:"shrink-0 text-[#00E5E5]"})]}),!p.unlocked&&p.id!=="General"&&i.jsxs("button",{type:"button",onClick:()=>N("General"),className:"w-full px-3 py-2.5 rounded-lg border border-slate-200 bg-white text-[11px] font-bold text-slate-700 text-left mt-0.5",children:["Or use ",v.icon," ",v.name," (free)"]}),x.length>1&&i.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:x.filter(E=>E.id!==p.id).map(E=>i.jsxs("button",{type:"button",onClick:()=>N(E.id),className:"inline-flex items-center gap-1 px-2.5 py-1.5 rounded-full bg-white border border-emerald-200 text-[10px] font-bold text-emerald-800",children:[E.icon," ",E.id]},E.id))})]}),i.jsxs("section",{className:"space-y-2.5 pt-1",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Step 2 · This week's focus"}),i.jsxs("button",{type:"button",onClick:()=>t("suggestions"),className:"w-full flex items-center gap-3 p-4 rounded-xl border border-slate-200 bg-white text-left hover:border-[#00B5B5]/40",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-teal-50 text-[#008F8F] flex items-center justify-center shrink-0",children:i.jsx(Ey,{size:18})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-xs font-bold text-slate-900",children:"Open Study Road"}),i.jsxs("p",{className:"text-[10px] text-slate-500",children:["One ",f[0]??"exam"," topic · Probe â Reason â Drill â Lock in Chat"]})]}),i.jsx(pn,{size:16,className:"text-slate-400 shrink-0"})]})]}),i.jsxs("section",{className:"space-y-2.5 pt-1",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Step 3 · Practice"}),i.jsxs("button",{type:"button",onClick:()=>t("qa"),className:"w-full flex items-center gap-3 p-4 rounded-xl border border-slate-200 bg-white text-left hover:border-[#00B5B5]/40",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-teal-50 text-[#008F8F] flex items-center justify-center shrink-0",children:i.jsx(L0,{size:18})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-xs font-bold text-slate-900",children:"Q&A drills"}),i.jsx("p",{className:"text-[10px] text-slate-500",children:"Setup â question â attempt â Socratic feedback"})]}),i.jsx(pn,{size:16,className:"text-slate-400 shrink-0"})]})]}),i.jsxs("section",{className:"space-y-2.5 pt-1",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Step 4 · Your track"}),i.jsxs("button",{type:"button",onClick:()=>t("analytics"),className:"w-full flex items-center gap-3 p-4 rounded-xl border border-slate-200 bg-white text-left hover:border-[#00B5B5]/40",children:[i.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-50 text-indigo-700 flex items-center justify-center shrink-0",children:i.jsx(Qm,{size:18})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-xs font-bold text-slate-900",children:"Track & Analytics"}),i.jsx("p",{className:"text-[10px] text-slate-500",children:"Streaks, doubts, Road stages, and exam-track breakdown"})]}),i.jsx(pn,{size:16,className:"text-slate-400 shrink-0"})]})]}),n.length>0&&i.jsxs("section",{className:"space-y-2.5 pt-1",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Continue where you left off"}),i.jsx("div",{className:"space-y-2",children:n.slice(0,3).map(E=>i.jsxs("button",{type:"button",onClick:()=>{s==null||s(E.id),t("guide")},className:he("w-full px-3 py-2.5 rounded-lg border text-left flex items-center justify-between gap-2",a===E.id?"border-[#00B5B5] bg-teal-50/40":"border-slate-200 bg-white"),children:[i.jsx("span",{className:"text-xs font-semibold text-slate-800 truncate",children:E.title||"Untitled chat"}),i.jsx(pn,{size:14,className:"text-[#008F8F] shrink-0"})]},E.id))})]}),n.length===0&&!j&&b.length===0&&i.jsxs("p",{className:"text-center text-[11px] text-slate-500 py-3 flex items-center justify-center gap-1.5",children:[i.jsx(Tn,{size:14,className:"text-teal-500"}),"Tap Chat above to ask your first doubt"]})]})}function hH(){const[e,t]=w.useState(0);return w.useEffect(()=>
vendor: 4,845 bytes, line 2040
2040{const n=window.visualViewport;if(!n)return;const a=()=>{const s=window.innerHeight-n.height-n.offsetTop;t(s>80?Math.round(s):0)};return n.addEventListener("resize",a),n.addEventListener("scroll",a),a(),()=>{n.removeEventListener("resize",a),n.removeEventListener("scroll",a)}},[]),e}function Lw(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,o=!1;for(;!o;){a===-1&&(a=n.length,o=!0);const c=n.slice(s,a).trim();(c||!o)&&t.push(c),s=a+1,a=n.indexOf(",",s)}return t}function mH(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xH={};function Pw(e,t){return(xH.jsx?pH:fH).test(e)}const gH=/[ \t\n\f\r]/g;function bH(e){return typeof e=="object"?e.type==="text"?Uw(e.value):!1:Uw(e)}function Uw(e){return e.replace(gH,"")===""}class F0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}F0.prototype.normal={};F0.prototype.property={};F0.prototype.space=void 0;function Zj(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new F0(n,a,t)}function x0(e){return e.toLowerCase()}let _a=class{constructor(t,n){this.attribute=n,this.property=t}};_a.prototype.attribute="";_a.prototype.booleanish=!1;_a.prototype.boolean=!1;_a.prototype.commaOrSpaceSeparated=!1;_a.prototype.commaSeparated=!1;_a.prototype.defined=!1;_a.prototype.mustUseProperty=!1;_a.prototype.number=!1;_a.prototype.overloadedBoolean=!1;_a.prototype.property="";_a.prototype.spaceSeparated=!1;_a.prototype.space=void 0;let yH=0;const at=Gl(),Nn=Gl(),$g=Gl(),je=Gl(),Ft=Gl(),ec=Gl(),Ha=Gl();function Gl(){return 2**++yH}const Gg=Object.freeze(Object.defineProperty({__proto__:null,boolean:at,booleanish:Nn,commaOrSpaceSeparated:Ha,commaSeparated:ec,number:je,overloadedBoolean:$g,spaceSeparated:Ft},Symbol.toStringTag,{value:"Module"})),h1=Object.keys(Gg);class Fy extends _a{constructor(t,n,a,s){let o=-1;if(super(t,n),Fw(this,"space",s),typeof a=="number")for(;++o<h1.length;){const c=h1[o];Fw(this,h1[o],(a&Gg[c])===Gg[c])}}}Fy.prototype.defined=!0;function Fw(e,t,n){n&&(e[t]=n)}function jc(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new Fy(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[x0(a)]=a,n[x0(o.attribute)]=a}return new F0(t,n,e.space)}const ek=jc({properties:{ariaActiveDescendant:null,ariaAtomic:Nn,ariaAutoComplete:null,ariaBusy:Nn,ariaChecked:Nn,ariaColCount:je,ariaColIndex:je,ariaColSpan:je,ariaControls:Ft,ariaCurrent:null,ariaDescribedBy:Ft,ariaDetails:null,ariaDisabled:Nn,ariaDropEffect:Ft,ariaErrorMessage:null,ariaExpanded:Nn,ariaFlowTo:Ft,ariaGrabbed:Nn,ariaHasPopup:null,ariaHidden:Nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ft,ariaLevel:je,ariaLive:null,ariaModal:Nn,ariaMultiLine:Nn,ariaMultiSelectable:Nn,ariaOrientation:null,ariaOwns:Ft,ariaPlaceholder:null,ariaPosInSet:je,ariaPressed:Nn,ariaReadOnly:Nn,ariaRelevant:null,ariaRequired:Nn,ariaRoleDescription:Ft,ariaRowCount:je,ariaRowIndex:je,ariaRowSpan:je,ariaSelected:Nn,ariaSetSize:je,ariaSort:null,ariaValueMax:je,ariaValueMin:je,ariaValueNow:je,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function tk(e,t){return t in e?e[t]:t}function nk(e,t){return tk(e,t.toLowerCase())}const vH=jc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ec,acceptCharset:Ft,accessKey:Ft,action:null,allow:null,allowFullScreen:at,allowPaymentRequest:at,allowUserMedia:at,alt:null,as:null,async:at,autoCapitalize:null,autoComplete:Ft,autoFocus:at,autoPlay:at,blocking:Ft,capture:null,charSet:null,checked:at,cite:null,className:Ft,cols:je,colSpan:null,content:null,contentEditable:Nn,controls:at,controlsList:Ft,coords:je|ec,crossOrigin:null,data:null,dateTime:null,decoding:null,default:at,defer:at,dir:null,dirName:null,disabled:at,download:$g,draggable:Nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:at,formTarget:null,headers:Ft,height:je,hidden:$g,high:je,href:null,hrefLang:null,htmlFor:Ft,httpEquiv:Ft,id:null,imageSizes:null,imageSrcSet:null,inert:at,inputMode:null,integrity:null,is:null,isMap:at,itemId:null,itemProp:Ft,itemRef:Ft,itemScope:at,itemType:Ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:at,low:je,manifest:null,max:null,maxLength:je,media:null,method:null,min:null,minLength:je,multiple:at,muted:at,name:null,nonce:null,noModule:at,noValidate:at,onAbort:null,onAfterPrint:null,onAuxCl
2040ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:at,optimum:je,pattern:null,ping:Ft,placeholder:null,playsInline:at,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:at,referrerPolicy:null,rel:Ft,required:at,reversed:at,rows:je,rowSpan:je,sandbox:Ft,scope:null,scoped:at,seamless:at,selected:at,shadowRootClonable:at,shadowRootDelegatesFocus:at,shadowRootMode:null,shape:null,size:je,sizes:null,slot:null,span:je,spellCheck:Nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:je,step:null,style:null,tabIndex:je,target:null,title:null,translate:null,type:null,typeMustMatch:at,useMap:null,value:Nn,width:je,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ft,axis:null,background:null,bgColor:null,border:je,borderColor:null,bottomMargin:je,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:at,declare:at,event:null,face:null,frame:null,frameBorder:null,hSpace:je,leftMargin:je,link:null,longDesc:null,lowSrc:null,marginHeight:je,marginWidth:je,noResize:at,noHref:at,noShade:at,noWrap:at,object:null,profile:null,prompt:null,rev:null,rightMargin:je,rules:null,scheme:null,scrolling:Nn,standby:null,summary:null,text:null,topMargin:je,valueType:null,version:null,vAlign:null,vLink:null,vSpace:je,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:at,disableRemotePlayback:at,prefix:null,property:null,results:je,security:null,unselectable:null},space:"html",transform:nk}),wH=jc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
2040-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ha,accentHeight:je,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:je,amplitude:je,arabicForm:null,ascent:je,attributeName:null,attributeType:null,azimuth:je,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:je,by:null,calcMode:null,capHeight:je,className:Ft,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:je,diffuseConstant:je,direction:null,display:null,dur:null,divisor:je,dominantBaseline:null,download:at,dx:null,dy:null,edgeMode:null,editable:null,elevation:je,enableBackground:null,end:null,event:null,exponent:je,externalResourcesRequired:null,fill:null,fillOpacity:je,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ec,g2:ec,glyphName:ec,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:je,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:je,horizOriginX:je,horizOriginY:je,id:null,ideographic:je,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:je,k:je,k1:je,k2:je,k3:je,k4:je,kernelMatrix:Ha,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:je,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:je,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 5,060 bytes, lines 2040-2041
2040Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:je,overlineThickness:je,paintOrder:null,panose1:null,path:null,pathLength:je,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:je,pointsAtY:je,pointsAtZ:je,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ha,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ha,rev:Ha,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ha,requiredFeatures:Ha,requiredFonts:Ha,requiredFormats:Ha,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:je,specularExponent:je,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:je,strikethroughThickness:je,string:null,stroke:null,strokeDashArray:Ha,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:je,strokeOpacity:je,strokeWidth:null,style:null,surfaceScale:je,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ha,tabIndex:je,tableValues:null,target:null,targetX:je,targetY:je,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ha,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:je,underlineThickness:je,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:je,values:null,vAlphabetic:je,vMathematical:je,vectorEffect:null,vHanging:je,vIdeographic:je,version:null,vertAdvY:je,vertOriginX:je,vertOriginY:je,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:je,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tk}),ak=jc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),rk=jc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nk}),sk=jc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),SH={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},NH=/[A-Z]/g,Vw=/-[a-z]/g,jH=/^data[-\w.:]+$/i;function ik(e,t){const n=x0(t);let a=t,s=_a;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jH.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Vw,CH);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Vw.test(o)){let c=o.replace(NH,kH);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=Fy}return new s(a,t)}function kH(e){return"-"+e.toLowerCase()}function CH(e){return e.charAt(1).toUpperCase()}const lk=Zj([ek,vH,ak,rk,sk],"html"),nf=Zj([ek,wH,ak,rk,sk],"svg");function qw(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function AH(e){return e.join(" ").trim()}var _o={},m1,Hw;function EH(){if(Hw)return m1;Hw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,h=` 2041`,f="/",p="*",x="",b="comment",v="declaration";function N(T,E){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];E=E||{};var D=1,k=1;function M(te){var H=te.match(t);H&&(D+=H.length);var V=te.lastIndexOf(h);k=~V?te.length-V:k+te.length}function B(){var te={line:D,column:k};return function(H){return H.position=new _(te),W(),H}}function _(te){this.start=te,this.end={line:D,column:k},this.source=E.source}_.prototype.content=T;function U(te){var H=new Error(E.source+":"+D+":"+k+": "+te);if(H.reason=te,H.filename=E.source,H.line=D,H.column=k,H.source=T,!E.silent)throw H}function F(te){var H=te.exec(T);if(H){var V=H[0];return M(V),T=T.slice(V.length),H}}function W(){F(n)}function ae(te){var H;for(te=te||[];H=le();)H!==!1&&te.push(H);return te}function le(){var te=B();if(!(f!=T.charAt(0)||p!=T.charAt(1))){for(var H=2;x!=T.charAt(H)&&(p!=T.charAt(H)||f!=T.charAt(H+1));)++H;if(H+=2,x===T.charAt(H-1))return U("End of comment missing");var V=T.slice(2,H-2);return k+=2,M(V),T=T.slice(H),k+=2,te({type:b,comment:V})}}function re(){var te=B(),H=F(a);
vendor: 2,230 bytes, line 2041
2041if(H){if(le(),!F(s))return U("property missing ':'");var V=F(o),ne=te({type:v,property:j(H[0].replace(e,x)),value:V?j(V[0].replace(e,x)):x});return F(c),ne}}function xe(){var te=[];ae(te);for(var H;H=re();)H!==!1&&(te.push(H),ae(te));return te}return W(),xe()}function j(T){return T?T.replace(d,x):x}return m1=N,m1}var $w;function TH(){if($w)return _o;$w=1;var e=_o&&_o.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(_o,"__esModule",{value:!0}),_o.default=n;const t=e(EH());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:f,value:p}=h;d?s(f,p,h):p&&(o=o||{},o[f]=p)}),o}return _o}var Iu={},Gw;function MH(){if(Gw)return Iu;Gw=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},c=function(f,p){return p.toUpperCase()},d=function(f,p){return"".concat(p,"-")},h=function(f,p){return p===void 0&&(p={}),o(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(s,d):f=f.replace(a,d),f.replace(t,c))};return Iu.camelCase=h,Iu}var zu,Yw;function IH(){if(Yw)return zu;Yw=1;var e=zu&&zu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(TH()),n=MH();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,h){d&&h&&(c[(0,n.camelCase)(d,o)]=h)}),c}return a.default=a,zu=a,zu}var zH=IH();const _H=G7(zH),ok=ck("end"),Vy=ck("start");function ck(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function DH(e){const t=Vy(e),n=ok(e);if(t&&n)return{start:t,end:n}}function Xu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ww(e.position):"start"in e||"end"in e?Ww(e):"line"in e||"column"in e?Yg(e):""}function Yg(e){return Xw(e&&e.line)+":"+Xw(e&&e.column)}function Ww(e){return Yg(e&&e.start)+"-"+Yg(e&&e.end)}function Xw(e){return e&&typeof e=="number"?e:1}
vendor: 1,921 bytes, line 2041
2041class la extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=Xu(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}la.prototype.file="";la.prototype.name="";la.prototype.reason="";la.prototype.message="";la.prototype.stack="";la.prototype.column=void 0;la.prototype.line=void 0;la.prototype.ancestors=void 0;la.prototype.cause=void 0;la.prototype.fatal=void 0;la.prototype.place=void 0;la.prototype.ruleId=void 0;la.prototype.source=void 0;const qy={}.hasOwnProperty,BH=new Map,RH=/[A-Z]/g,OH=new Set(["table","tbody","thead","tfoot","tr"]),LH=new Set(["td","th"]),uk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PH(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=YH(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 5,854 bytes, line 2041
2041if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=GH(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nf:lk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=dk(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function dk(e,t,n){if(t.type==="element")return UH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return FH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qH(e,t,n);if(t.type==="mdxjsEsm")return VH(e,t);if(t.type==="root")return HH(e,t,n);if(t.type==="text")return $H(e,t)}function UH(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=nf,e.schema=s),e.ancestors.push(t);const o=mk(e,t.tagName,!1),c=WH(e,t);let d=$y(e,t);return OH.has(t.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!bH(h):!0})),hk(e,c,o,t),Hy(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function FH(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}g0(e,t.position)}function VH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);g0(e,t.position)}function qH(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=nf,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:mk(e,t.name,!0),c=XH(e,t),d=$y(e,t);return hk(e,c,o,t),Hy(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function HH(e,t,n){const a={};return Hy(a,$y(e,t)),e.create(t,e.Fragment,a,n)}function $H(e,t){return t.value}function hk(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Hy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function GH(e,t,n){return a;function a(s,o,c,d){const f=Array.isArray(c.children)?n:t;return d?f(o,c,d):f(o,c)}}function YH(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),h=Vy(a);return t(s,o,c,d,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function WH(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&qy.call(t.properties,s)){const o=KH(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&LH.has(t.tagName)?a=d:n[c]=d}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function XH(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else g0(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else g0(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function $y(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:BH;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const f=s.get(h)||0;c=h+"-"+f,s.set(h,f+1)}}const d=dk(e,o,c);d!==void 0&&n.push(d)}return n}function KH(e,t,n){const a=ik(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?mH(n):AH(n)),a.property==="style"){let s=typeof n=="object"?n:QH(e,String(n));return e.stylePropertyNameCase==="css"&&(s=JH(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?SH[a.property]||a.property:a.attribute,n]}}function QH(e,t){try{return _H(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new la("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=uk+"#cannot-parse-style-attribute",s}}function mk(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const d=Pw(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=c}else a=Pw(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return qy.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);g0(e)}function g0(e,t){const n=new la("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=uk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function JH(e){const t={};let n;for(n in e)qy.call(e,n)&&(t[ZH(n)]=e[n]);return t}function ZH(e){let t=e.replace(RH,e$);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function e$(e){return"-"+e.toLowerCase()}const f1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},t$={};function n$(e,t){const n=t$,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fk(e,a,s)}
vendor: 11,331 bytes, line 2041
2041function fk(e,t,n){if(a$(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Kw(e.children,t,n)}return Array.isArray(e)?Kw(e,t,n):""}function Kw(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=fk(e[s],t,n);return a.join("")}function a$(e){return!!(e&&typeof e=="object")}const Qw=document.createElement("i");function Gy(e){const t="&"+e+";";Qw.innerHTML=t;const n=Qw.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function us(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function pr(e,t){return e.length>0?(us(e,e.length,0,t),e):t}const Jw={}.hasOwnProperty;function r$(e){const t={};let n=-1;for(;++n<e.length;)s$(t,e[n]);return t}function s$(e,t){let n;for(n in t){const s=(Jw.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){Jw.call(s,c)||(s[c]=[]);const d=o[c];i$(s[c],Array.isArray(d)?d:d?[d]:[])}}}function i$(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);us(e,0,0,a)}function pk(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function tc(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ts=el(/[A-Za-z]/),Ya=el(/[\dA-Za-z]/),l$=el(/[#-'*+\--9=?A-Z^-~]/);function Wg(e){return e!==null&&(e<32||e===127)}const Xg=el(/\d/),o$=el(/[\dA-Fa-f]/),c$=el(/[!-/:-@[-`{-~]/);function Ge(e){return e!==null&&e<-2}function Ia(e){return e!==null&&(e<0||e===32)}function St(e){return e===-2||e===-1||e===32}const u$=el(new RegExp("\\p{P}|\\p{S}","u")),d$=el(/\s/);function el(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function kc(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&Ya(e.charCodeAt(n+1))&&Ya(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Et(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return St(h)?(e.enter(n),d(h)):t(h)}function d(h){return St(h)&&o++<s?(e.consume(h),d):(e.exit(n),t(h))}}const h$={tokenize:m$};function m$(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Et(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ge(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const f$={tokenize:p$},Zw={tokenize:x$};function p$(e){const t=this,n=[];let a=0,s,o,c;return d;function d(k){if(a<n.length){const M=n[a];return t.containerState=M[1],e.attempt(M[0].continuation,h,f)(k)}return f(k)}function h(k){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&D();const M=t.events.length;let B=M,_;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){_=t.events[B][1].end;break}E(a);let U=M;for(;U<t.events.length;)t.events[U][1].end={..._},U++;return us(t.events,B+1,0,t.events.slice(M)),t.events.length=U,f(k)}return d(k)}function f(k){if(a===n.length){if(!s)return b(k);if(s.currentConstruct&&s.currentConstruct.concrete)return N(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zw,p,x)(k)}function p(k){return s&&D(),E(a),b(k)}function x(k){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,N(k)}function b(k){return t.containerState={},e.attempt(Zw,v,N)(k)}function v(k){return a++,n.push([t.currentConstruct,t.containerState]),b(k)}function N(k){if(k===null){s&&D(),E(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),j(k)}function j(k){if(k===null){T(e.exit("chunkFlow"),!0),E(0),e.consume(k);return}return Ge(k)?(e.consume(k),T(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(k),j)}function T(k,M){const B=t.sliceStream(k);if(M&&B.push(null),k.previous=o,o&&(o.next=k),o=k,s.defineSkip(k.start),s.write(B),t.parser.lazy[k.start.line]){let _=s.events.length;for(;_--;)if(s.events[_][1].start.offset<c&&(!s.events[_][1].end||s.events[_][1].end.offset>c))return;const U=t.events.length;let F=U,W,ae;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(W){ae=t.events[F][1].end;break}W=!0}for(E(a),_=U;_<t.events.length;)t.events[_][1].end={...ae},_++;us(t.events,F+1,0,t.events.slice(U)),t.events.length=_}}function E(k){let M=n.length;for(;M-- >k;){const B=n[M];t.containerState=B[1],B[0].exit.call(t,e)}n.length=k}function D(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function x$(e,t,n){return Et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function e8(e){if(e===null||Ia(e)||d$(e))return 1;if(u$(e))return 2}function Yy(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Kg={name:"attention",resolveAll:g$,tokenize:b$};function g$(e,t){let n=-1,a,s,o,c,d,h,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[a][1].end},b={...e[n][1].start};t8(x,-h),t8(b,h),c={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...e[a][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},f=[],e[a][1].end.offset-e[a][1].start.offset&&(f=pr(f,[["enter",e[a][1],t],["exit",e[a][1],t]])),f=pr(f,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),f=pr(f,Yy(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),f=pr(f,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=pr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,us(e,a-1,n-a+3,f),n=a+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function b$(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=e8(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),d(h)}function d(h){if(h===o)return e.consume(h),d;const f=e.exit("attentionSequence"),p=e8(h),x=!p||p===2&&s||n.includes(h),b=!s||s===2&&p||n.includes(a);return f._open=!!(o===42?x:x&&(s||!b)),f._close=!!(o===42?b:b&&(p||!x)),t(h)}}function t8(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const y$={name:"autolink",tokenize:v$};function v$(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return ts(v)?(e.consume(v),c):v===64?n(v):f(v)}function c(v){return v===43||v===45||v===46||Ya(v)?(a=1,d(v)):f(v)}function d(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||Ya(v))&&a++<32?(e.consume(v),d):(a=0,f(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Wg(v)?n(v):(e.consume(v),h)}function f(v){return v===64?(e.consume(v),p):l$(v)?(e.consume(v),f):n(v)}function p(v){return Ya(v)?x(v):n(v)}function x(v){return v===46?(e.consume(v),a=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||Ya(v))&&a++<63){const N=v===45?b:x;return e.consume(v),N}return n(v)}}const af={partial:!0,tokenize:w$};function w$(e,t,n){return a;function a(o){return St(o)?Et(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Ge(o)?t(o):n(o)}}const xk={continuation:{tokenize:N$},exit:j$,name:"blockQuote",tokenize:S$};function S$(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return St(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function N$(e,t,n){const a=this;return s;function s(c){return St(c)?Et(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(xk,t,n)(c)}}function j$(e){e.exit("blockQuote")}const gk={name:"characterEscape",tokenize:k$};function k$(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return c$(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const bk={name:"characterReference",tokenize:C$};function C$(e,t,n){const a=this;let s=0,o,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),h}function h(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,c=Ya,p(x))}function f(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=o$,p):(e.enter("characterReferenceValue"),o=7,c=Xg,p(x))}function p(x){if(x===59&&s){const b=e.exit("characterReferenceValue");return c===Ya&&!Gy(a.sliceSerialize(b))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&s++<o?(e.consume(x),p):n(x)}}const n8={partial:!0,tokenize:E$},a8={concrete:!0,name:"codeFenced",tokenize:A$};function A$(e,t,n){const a=this,s={partial:!0,tokenize:B};let o=0,c=0,d;return h;function h(_){return f(_)}function f(_){const U=a.events[a.events.length-1];return o=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,d=_,e.enter("co
2041deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(_)}function p(_){return _===d?(c++,e.consume(_),p):c<3?n(_):(e.exit("codeFencedFenceSequence"),St(_)?Et(e,x,"whitespace")(_):x(_))}function x(_){return _===null||Ge(_)?(e.exit("codeFencedFence"),a.interrupt?t(_):e.check(n8,j,M)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===null||Ge(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(_)):St(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Et(e,v,"whitespace")(_)):_===96&&_===d?n(_):(e.consume(_),b)}function v(_){return _===null||Ge(_)?x(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(_))}function N(_){return _===null||Ge(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(_)):_===96&&_===d?n(_):(e.consume(_),N)}function j(_){return e.attempt(s,M,T)(_)}function T(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),E}function E(_){return o>0&&St(_)?Et(e,D,"linePrefix",o+1)(_):D(_)}function D(_){return _===null||Ge(_)?e.check(n8,j,M)(_):(e.enter("codeFlowValue"),k(_))}function k(_){return _===null||Ge(_)?(e.exit("codeFlowValue"),D(_)):(e.consume(_),k)}function M(_){return e.exit("codeFenced"),t(_)}function B(_,U,F){let W=0;return ae;function ae(H){return _.enter("lineEnding"),_.consume(H),_.exit("lineEnding"),le}function le(H){return _.enter("codeFencedFence"),St(H)?Et(_,re,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):re(H)}function re(H){return H===d?(_.enter("codeFencedFenceSequence"),xe(H)):F(H)}function xe(H){return H===d?(W++,_.consume(H),xe):W>=c?(_.exit("codeFencedFenceSequence"),St(H)?Et(_,te,"whitespace")(H):te(H)):F(H)}function te(H){return H===null||Ge(H)?(_.exit("codeFencedFence"),U(H)):F(H)}}}function E$(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const p1={name:"codeIndented",tokenize:M$},T$={partial:!0,tokenize:I$};function M$(e,t,n){const a=this;return s;function s(f){return e.enter("codeIndented"),Et(e,o,"linePrefix",5)(f)}function o(f){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?c(f):n(f)}function c(f){return f===null?h(f):Ge(f)?e.attempt(T$,c,h)(f):(e.enter("codeFlowValue"),d(f))}function d(f){return f===null||Ge(f)?(e.exit("codeFlowValue"),c(f)):(e.consume(f),d)}function h(f){return e.exit("codeIndented"),t(f)}}function I$(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Et(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Ge(c)?s(c):n(c)}}const z$={name:"codeText",previous:D$,resolve:_$,tokenize:B$};function _$(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function D$(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function B$(e,t,n){let a=0,s,o;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),a++,d):(e.exit("codeTextSequence"),h(x))}function h(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),h):x===96?(o=e.enter("codeTextSequence"),s=0,p(x)):Ge(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(x))}function f(x){return x===null||x===32||x===96||Ge(x)?(e.exit("codeTextData"),h(x)):(e.consume(x),f)}function p(x){return x===96?(e.consume(x),s++,p):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(o.type="codeTextData",f(x))}}class R${constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&_u(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),_u(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),_u(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);_u(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);_u(this.left,n.reverse())}}}function _u(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function yk(e){const t={};let n=-1,a,s,o,c,d,h,f;const p=new R$(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,O$(p,n)),n=t[n],f=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=p.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},d=p.slice(s,n),d.unshift(a),p.splice(s,n-s+1,d))}}return us(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function O$(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,h=[],f={};let p,x,b=-1,v=n,N=0,j=0;const T=[j];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(p=a.sliceStream(v),v.next||p.push(null),x&&c.defineSki
vendor: 18,617 bytes, line 2041
2041p(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(p),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=n;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(j=b+1,T.push(j),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):T.pop(),b=T.length;b--;){const E=d.slice(T[b],T[b+1]),D=o.pop();h.push([D,D+E.length-1]),e.splice(D,2,E)}for(h.reverse(),b=-1;++b<h.length;)f[N+h[b][0]]=N+h[b][1],N+=h[b][1]-h[b][0]-1;return f}const L$={resolve:U$,tokenize:F$},P$={partial:!0,tokenize:V$};function U$(e){return yk(e),e}function F$(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):Ge(d)?e.check(P$,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function V$(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Et(e,o,"linePrefix")}function o(c){if(c===null||Ge(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function vk(e,t,n,a,s,o,c,d,h){const f=h||Number.POSITIVE_INFINITY;let p=0;return x;function x(E){return E===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(E),e.exit(o),b):E===null||E===32||E===41||Wg(E)?n(E):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),j(E))}function b(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===62?(e.exit("chunkString"),e.exit(d),b(E)):E===null||E===60||Ge(E)?n(E):(e.consume(E),E===92?N:v)}function N(E){return E===60||E===62||E===92?(e.consume(E),v):v(E)}function j(E){return!p&&(E===null||E===41||Ia(E))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(E)):p<f&&E===40?(e.consume(E),p++,j):E===41?(e.consume(E),p--,j):E===null||E===32||E===40||Wg(E)?n(E):(e.consume(E),E===92?T:j)}function T(E){return E===40||E===41||E===92?(e.consume(E),j):j(E)}}function wk(e,t,n,a,s,o){const c=this;let d=0,h;return f;function f(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(o),p}function p(v){return d>999||v===null||v===91||v===93&&!h||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Ge(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||Ge(v)||d++>999?(e.exit("chunkString"),p(v)):(e.consume(v),h||(h=!St(v)),v===92?b:x)}function b(v){return v===91||v===92||v===93?(e.consume(v),d++,x):x(v)}}function Sk(e,t,n,a,s,o){let c;return d;function d(b){return b===34||b===39||b===40?(e.enter(a),e.enter(s),e.consume(b),e.exit(s),c=b===40?41:b,h):n(b)}function h(b){return b===c?(e.enter(s),e.consume(b),e.exit(s),e.exit(a),t):(e.enter(o),f(b))}function f(b){return b===c?(e.exit(o),h(c)):b===null?n(b):Ge(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Et(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===c||b===null||Ge(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?x:p)}function x(b){return b===c||b===92?(e.consume(b),p):p(b)}}function Ku(e,t){let n;return a;function a(s){return Ge(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):St(s)?Et(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const q$={name:"definition",tokenize:$$},H$={partial:!0,tokenize:G$};function $$(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return wk.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return s=tc(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):n(v)}function h(v){return Ia(v)?Ku(e,f)(v):f(v)}function f(v){return vk(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(H$,x,x)(v)}function x(v){return St(v)?Et(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Ge(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function G$(e,t,n){return a;function a(d){return Ia(d)?Ku(e,s)(d):n(d)}function s(d){return Sk(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return St(d)?Et(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Ge(d)?t(d):n(d)}}const Y$={name:"hardBreakEscape",tokenize:W$};function W$(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Ge(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const X$={name:"headingAtx",resolve:K$,tokenize:Q$};function K$(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},us(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function Q$(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),c(p)}function c(p){return p===35&&a++<6?(e.consume(p),c):p===null||Ia(p)?(e.exit("atxHeadingSequence"),d(p)):n(p)}function d(p){return p===35?(e.enter("atxHeadingSequence"),h(p)):p===null||Ge(p)?(e.exit("atxHeading"),t(p)):St(p)?Et(e,d,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function h(p){return p===35?(e.consume(p),h):(e.exit("atxHeadingSequence"),d(p))}function f(p){return p===null||p===35||Ia(p)?(e.exit("atxHeadingText"),d(p)):(e.consume(p),f)}}const J$=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],r8=["pre","script","style","textarea"],Z$={concrete:!0,name:"htmlFlow",resolveTo:nG,tokenize:aG},eG={partial:!0,tokenize:sG},tG={partial:!0,tokenize:rG};function nG(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function aG(e,t,n){const a=this;let s,o,c,d,h;return f;function f(P){return p(P)}function p(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),x}function x(P){return P===33?(e.consume(P),b):P===47?(e.consume(P),o=!0,j):P===63?(e.consume(P),s=3,a.interrupt?t:I):ts(P)?(e.consume(P),c=String.fromCharCode(P),T):n(P)}function b(P){return P===45?(e.consume(P),s=2,v):P===91?(e.consume(P),s=5,d=0,N):ts(P)?(e.consume(P),s=4,a.interrupt?t:I):n(P)}function v(P){return P===45?(e.consume(P),a.interrupt?t:I):n(P)}function N(P){const ge="CDATA[";return P===ge.charCodeAt(d++)?(e.consume(P),d===ge.length?a.interrupt?t:re:N):n(P)}function j(P){return ts(P)?(e.consume(P),c=String.fromCharCode(P),T):n(P)}function T(P){if(P===null||P===47||P===62||Ia(P)){const ge=P===47,Ee=c.toLowerCase();return!ge&&!o&&r8.includes(Ee)?(s=1,a.interrupt?t(P):re(P)):J$.includes(c.toLowerCase())?(s=6,ge?(e.consume(P),E):a.interrupt?t(P):re(P)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(P):o?D(P):k(P))}return P===45||Ya(P)?(e.consume(P),c+=String.fromCharCode(P),T):n(P)}function E(P){return P===62?(e.consume(P),a.interrupt?t:re):n(P)}function D(P){return St(P)?(e.consume(P),D):ae(P)}function k(P){return P===47?(e.consume(P),ae):P===58||P===95||ts(P)?(e.consume(P),M):St(P)?(e.consume(P),k):ae(P)}function M(P){return P===45||P===46||P===58||P===95||Ya(P)?(e.consume(P),M):B(P)}function B(P){return P===61?(e.consume(P),_):St(P)?(e.consume(P),B):k(P)}function _(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),h=P,U):St(P)?(e.consume(P),_):F(P)}function U(P){return P===h?(e.consume(P),h=null,W):P===null||Ge(P)?n(P):(e.consume(P),U)}function F(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Ia(P)?B(P):(e.consume(P),F)}function W(P){return P===47||P===62||St(P)?k(P):n(P)}function ae(P){return P===62?(e.consume(P),le):n(P)}function le(P){return P===null||Ge(P)?re(P):St(P)?(e.consume(P),le):n(P)}function re(P){return P===45&&s===2?(e.consume(P),V):P===60&&s===1?(e.consume(P),ne):P===62&&s===4?(e.consume(P),R):P===63&&s===3?(e.consume(P),I):P===93&&s===5?(e.consume(P),Y):Ge(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(eG,J,xe)(P)):P===null||Ge(P)?(e.exit("htmlFlowData"),xe(P)):(e.consume(P),re)}function xe(P){return e.check(tG,te,J)(P)}function te(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),H}function H(P){return P===null||Ge(P)?xe(P):(e.enter("htmlFlowData"),re(P))}function V(P){return P===45?(e.consume(P),I):re(P)}function ne(P){return P===47?(e.consume(P),c="",Z):re(P)}function Z(P){if(P===62){const ge=c.toLowerCase();return r8.includes(ge)?(e.consume(P),R):re(P)}return ts(P)&&c.length<8?(e.consume(P),c+=String.fromCharCode(P),Z):re(P)}function Y(P){return P===93?(e.consume(P),I):re(P)}function I(P){return P===62?(e.consume(P),R):P===45&&s===2?(e.consume(P),I):re(P)}function R(P){return P===null||Ge(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),R)}function J(P){return e.exit("htmlFlow"),t(P)}}function rG(e,t,n){const a=this;return s;function s(c){return Ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function sG(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(af,t,n)}}const iG={name:"htmlText",tokenize:lG};function lG(e,t,n){const a=this;let s,o,c;return d;function d(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),h}function h(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),B):I===63?(e.consume(I),k):ts(I)?(e.consume(I),F):n(I)}function f(I){return I===45?(e.consume(I),p):I===91?(e.consume(I),o=0,N):ts(I)?(e.consume(I),D):n(I)}function p(I){return I===45?(e.consume(I),v):n(I)}function x(I){return I===null?n(I):I===45?(e.consume(I),b):Ge(I)?(c=x,ne(I)):(e.consume(I),x)}function b(I){return I===45?(e.consume(I),v):x(I)}function v(I){return I===62?V(I):I===45?b(I):x(I)}function N(I){const R="CDATA[";return I===R.charCodeAt(o++)?(e.consume(I),o===R.length?j:N):n(I)}function j(I){return I===null?n(I):I===93?(e.consume(I),T):Ge(I)?(c=j,ne(I)):(e.consume(I),j)}function T(I){return I===93?(e.consume(I),E):j(I)}function E(I){return I===62?V(I):I===93?(e.consume(I),E):j(I)}function D(I){return I===null||I===62?V(I):Ge(I)?(c=D,ne(I)):(e.consume(I),D)}function k(I){return I===null?n(I):I===63?(e.consume(I),M):Ge(I)?(c=k,ne(I)):(e.consume(I),k)}function M(I){return I===62?V(I):k(I)}function B(I){return ts(I)?(e.consume(I),_):n(I)}function _(I){return I===45||Ya(I)?(e.consume(I),_):U(I)}function U(I){return Ge(I)?(c=U,ne(I)):St(I)?(e.consume(I),U):V(I)}function F(I){return I===45||Ya(I)?(e.consume(I),F):I===47||I===62||Ia(I)?W(I):n(I)}function W(I){return I===47?(e.consume(I),V):I===58||I===95||ts(I)?(e.consume(I),ae):Ge(I)?(c=W,ne(I)):St(I)?(e.consume(I),W):V(I)}function ae(I){return I===45||I===46||I===58||I===95||Ya(I)?(e.consume(I),ae):le(I)}function le(I){return I===61?(e.consume(I),re):Ge(I)?(c=le,ne(I)):St(I)?(e.consume(I),le):W(I)}function re(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),s=I,xe):Ge(I)?(c=re,ne(I)):St(I)?(e.consume(I),re):(e.consume(I),te)}function xe(I){return I===s?(e.consume(I),s=void 0,H):I===null?n(I):Ge(I)?(c=xe,ne(I)):(e.consume(I),xe)}function te(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Ia(I)?W(I):(e.consume(I),te)}function H(I){return I===47||I===62||Ia(I)?W(I):n(I)}function V(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function ne(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Z}function Z(I){return St(I)?Et(e,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):Y(I)}function Y(I){return e.enter("htmlTextData"),c(I)}}const Wy={name:"labelEnd",resolveAll:dG,resolveTo:hG,tokenize:mG},oG={tokenize:fG},cG={tokenize:pG},uG={tokenize:xG};function dG(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&us(e,0,e.length,n),e}function hG(e,t){let n=e.length,a=0,s,o,c,d;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},p={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",h,t],["enter",f,t]],d=pr(d,e.slice(o+1,o+a+3)),d=pr(d,[["enter",p,t]]),d=pr(d,Yy(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=pr(d,[["exit",p,t],e[c-2],e[c-1],["exit",f,t]]),d=pr(d,e.slice(c+1)),d=pr(d,[["exit",h,t]]),us(e,o,e.length,d),e}function mG(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return d;function d(b){return o?o._inactive?x(b):(c=a.parser.defined.includes(tc(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),h):n(b)}function h(b){return b===40?e.attempt(oG,p,c?p:x)(b):b===91?e.attempt(cG,p,c?f:x)(b):c?p(b):x(b)}function f(b){return e.attempt(uG,p,x)(b)}function p(b){return t(b)}function x(b){return o._balanced=!0,n(b)}}function fG(e,t,n){return a;function a(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),s}function s(x){return Ia(x)?Ku(e,o)(x):o(x)}function o(x){return x===41?p(x):vk(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Ia(x)?Ku(e,h)(x):p(x)}function d(x){return n(x)}function h(x){return x===34||x===39||x===40?Sk(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):p(x)}function f(x){return Ia(x)?Ku(e,p)(x):p(x)}function p(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function pG(e,t,n){const a=this;return s;function s(d){return wk.call(a,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(tc(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function xG(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const gG={name:"labelStartImage",resolveAll:Wy.resolveAll,tokenize:bG};function bG(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const yG={name:"labelStartLink",resolveAll:Wy.resolveAll,tokenize:vG};function vG(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const x1={name:"lineEnding",tokenize:wG};function wG(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Et(e,t,"linePrefix")}}const Kh={name:"thematicBreak",tokenize:SG};function SG(e,t,n){let a=0,s;return o;function o(f){return e.enter("thematicBreak"),c(f)}function c(f){return s=f,d(f)}function d(f){return f===s?(e.enter("thematicBreakSequence"),h(f)):a>=3&&(f===null||Ge(f))?(e.exit("thematicBreak"),t(f)):n(f)}function h(f){return f===s?(e.consume(f),a++,h):(e.exit("thematicBreakSequence"),St(f)?Et(e,d,"whitespace")(f):d(f))}}const Ea={continuation:{tokenize:CG},exit:EG,name:"list",tokenize:kG},NG={partial:!0,tokenize:TG},jG={partial:!0,tokenize:AG};function kG(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(v){const N=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Xg(v)){if(a.containerState.type||(a.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Kh,n,f)(v):f(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return n(v)}function h(v){return Xg(v)&&++c<10?(e.consume(v),h):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):n(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(af,a.interrupt?n:p,e.attempt(NG,b,x))}
vendor: 5,359 bytes, line 2041
2041function p(v){return a.containerState.initialBlankLine=!0,o++,b(v)}function x(v){return St(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function CG(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(af,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Et(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!St(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(jG,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Et(e,e.attempt(Ea,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function AG(e,t,n){const a=this;return Et(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function EG(e){e.exit(this.containerState.type)}function TG(e,t,n){const a=this;return Et(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!St(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const s8={name:"setextUnderline",resolveTo:MG,tokenize:IG};function MG(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function IG(e,t,n){const a=this;let s;return o;function o(f){let p=a.events.length,x;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){x=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(e.enter("setextHeadingLine"),s=f,c(f)):n(f)}function c(f){return e.enter("setextHeadingLineSequence"),d(f)}function d(f){return f===s?(e.consume(f),d):(e.exit("setextHeadingLineSequence"),St(f)?Et(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||Ge(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const zG={tokenize:_G};function _G(e){const t=this,n=e.attempt(af,a,e.attempt(this.parser.constructs.flowInitial,s,Et(e,e.attempt(this.parser.constructs.flow,s,e.attempt(L$,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const DG={resolveAll:jk()},BG=Nk("string"),RG=Nk("text");function Nk(e){return{resolveAll:jk(e==="text"?OG:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,d);return c;function c(p){return f(p)?o(p):d(p)}function d(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),h}function h(p){return f(p)?(n.exit("data"),o(p)):(n.consume(p),h)}function f(p){if(p===null)return!0;const x=s[p];let b=-1;if(x)for(;++b<x.length;){const v=x[b];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function jk(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function OG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,d=0,h;for(;o--;){const f=s[o];if(typeof f=="string"){for(c=f.length;f.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(f===-2)h=!0,d++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const f={type:n===e.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...f.start},a.start.offset===a.end.offset?Object.assign(a,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const LG={42:Ea,43:Ea,45:Ea,48:Ea,49:Ea,50:Ea,51:Ea,52:Ea,53:Ea,54:Ea,55:Ea,56:Ea,57:Ea,62:xk},PG={91:q$},UG={[-2]:p1,[-1]:p1,32:p1},FG={35:X$,42:Kh,45:[s8,Kh],60:Z$,61:s8,95:Kh,96:a8,126:a8},VG={38:bk,92:gk},qG={[-5]:x1,[-4]:x1,[-3]:x1,33:gG,38:bk,42:Kg,60:[y$,iG],91:yG,92:[Y$,gk],93:Wy,95:Kg,96:z$},HG={null:[Kg,DG]},$G={null:[42,95]},GG={null:[]},YG=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$G,contentInitial:PG,disable:GG,document:LG,flow:FG,flowInitial:UG,insideSpan:HG,string:VG,text:qG},Symbol.toStringTag,{value:"Module"}));function WG(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 13,180 bytes, lines 2041-2043
2041olumn:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],d=[];const h={attempt:U(B),check:U(_),consume:D,enter:k,exit:M,interrupt:U(_,{interrupt:!0})},f={code:null,containerState:{},defineSkip:j,events:[],now:N,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:x};let p=t.tokenize.call(f,h);return t.resolveAll&&o.push(t),f;function x(le){return c=pr(c,le),T(),c[c.length-1]!==null?[]:(F(t,0),f.events=Yy(o,f.events,f),f.events)}function b(le,re){return KG(v(le),re)}function v(le){return XG(c,le)}function N(){const{_bufferIndex:le,_index:re,line:xe,column:te,offset:H}=a;return{_bufferIndex:le,_index:re,line:xe,column:te,offset:H}}function j(le){s[le.line]=le.column,ae()}function T(){let le;for(;a._index<c.length;){const re=c[a._index];if(typeof re=="string")for(le=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===le&&a._bufferIndex<re.length;)E(re.charCodeAt(a._bufferIndex));else E(re)}}function E(le){p=p(le)}function D(le){Ge(le)?(a.line++,a.column=1,a.offset+=le===-3?2:1,ae()):le!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),f.previous=le}function k(le,re){const xe=re||{};return xe.type=le,xe.start=N(),f.events.push(["enter",xe,f]),d.push(xe),xe}function M(le){const re=d.pop();return re.end=N(),f.events.push(["exit",re,f]),re}function B(le,re){F(le,re.from)}function _(le,re){re.restore()}function U(le,re){return xe;function xe(te,H,V){let ne,Z,Y,I;return Array.isArray(te)?J(te):"tokenize"in te?J([te]):R(te);function R(Te){return Ve;function Ve(et){const Re=et!==null&&Te[et],kt=et!==null&&Te.null,yt=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(kt)?kt:kt?[kt]:[]];return J(yt)(et)}}function J(Te){return ne=Te,Z=0,Te.length===0?V:P(Te[Z])}function P(Te){return Ve;function Ve(et){return I=W(),Y=Te,Te.partial||(f.currentConstruct=Te),Te.name&&f.parser.constructs.disable.null.includes(Te.name)?Ee():Te.tokenize.call(re?Object.assign(Object.create(f),re):f,h,ge,Ee)(et)}}function ge(Te){return le(Y,I),H}function Ee(Te){return I.restore(),++Z<ne.length?P(ne[Z]):V}}}function F(le,re){le.resolveAll&&!o.includes(le)&&o.push(le),le.resolve&&us(f.events,re,f.events.length-re,le.resolve(f.events.slice(re),f)),le.resolveTo&&(f.events=le.resolveTo(f.events,f))}function W(){const le=N(),re=f.previous,xe=f.currentConstruct,te=f.events.length,H=Array.from(d);return{from:te,restore:V};function V(){a=le,f.previous=re,f.currentConstruct=xe,f.events.length=te,d=H,ae()}}function ae(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function XG(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function KG(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=` 2042`;break}case-3:{c=`\r 2043`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function QG(e){const a={constructs:r$([YG,...(e||{}).extensions||[]]),content:s(h$),defined:[],document:s(f$),flow:s(zG),lazy:{},string:s(BG),text:s(RG)};return a;function s(o){return c;function c(d){return WG(a,o,d)}}}function JG(e){for(;!yk(e););return e}const i8=/[\0\t\n\r]/g;function ZG(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const h=[];let f,p,x,b,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),x=0,t="",n&&(o.charCodeAt(0)===65279&&x++,n=void 0);x<o.length;){if(i8.lastIndex=x,f=i8.exec(o),b=f&&f.index!==void 0?f.index:o.length,v=o.charCodeAt(b),!f){t=o.slice(x);break}if(v===10&&x===b&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),x<b&&(h.push(o.slice(x,b)),e+=b-x),v){case 0:{h.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,h.push(-2);e++<p;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}x=b+1}return d&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const eY=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tY(e){return e.replace(eY,nY)}function nY(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return pk(n.slice(o?2:1),o?16:10)}return Gy(n)||e}const kk={}.hasOwnProperty;function aY(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),rY(n)(JG(QG(n).document().write(ZG()(e,t,!0))))}function rY(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Bt),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(Ae),blockQuote:o(kt),characterEscape:W,characterReference:W,codeFenced:o(yt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(yt,c),codeText:o(Yt,c),codeTextData:W,data:W,codeFlowValue:W,definition:o(cn),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(vt),hardBreakEscape:o(it),hardBreakTrailing:o(it),htmlFlow:o(de,c),htmlFlowData:W,htmlText:o(de,c),htmlTextData:W,image:o(Me),label:c,link:o(Bt),listItem:o(Vn),listItemValue:b,listOrdered:o(xn,x),listUnordered:o(xn),paragraph:o(Da),reference:P,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ae),strong:o(Zt),thematicBreak:o(Ba)},exit:{atxHeading:h(),atxHeadingSequence:B,autolink:h(),autolinkEmail:Re,autolinkProtocol:et,blockQuote:h(),characterEscapeValue:ae,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:Te,characterReference:Ve,codeFenced:h(T),codeFencedFence:j,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:ae,codeIndented:h(E),codeText:h(H),codeTextData:ae,data:ae,definition:h(),definitionDestinationString:M,definitionLabelString:D,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(re),hardBreakTrailing:h(re),htmlFlow:h(xe),htmlFlowData:ae,htmlText:h(te),htmlTextData:ae,image:h(ne),label:Y,labelText:Z,lineEnding:le,link:h(V),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ge,resourceDestinationString:I,resourceTitleString:R,resource:J,setextHeading:h(F),setextHeadingLineSequence:U,setextHeadingText:_,strong:h(),thematicBreak:h()}};Ck(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ue){let we={type:"root",children:[]};const Ue={stack:[we],tokenStack:[],config:t,enter:d,exit:f,buffer:c,resume:p,data:n},Le=[];let st=-1;for(;++st<ue.length;)if(ue[st][1].type==="listOrdered"||ue[st][1].type==="listUnordered")if(ue[st][0]==="enter")Le.push(st);else{const na=Le.pop();st=s(ue,na,st)}for(st=-1;++st<ue.length;){const na=t[ue[st][0]];kk.call(na,ue[st][1].type)&&na[ue[st][1].type].call(Object.assign({sliceSerialize:ue[st][2].sliceSerialize},Ue),ue[st][1])}if(Ue.tokenStack.length>0){const na=Ue.tokenStack[Ue.tokenStack.length-1];(na[1]||l8).call(Ue,void 0,na[0])}for(we.position={start:ki(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:ki(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)we=t.transforms[st](we)||we;return we}function s(ue,we,Ue){let Le=we-1,st=-1,na=!1,oa,Hn,Wt,In;for(;++Le<=Ue;){const Tt=ue[Le];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?st++:st--,In=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(oa&&!In&&!st&&!Wt&&(Wt=Le),In=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:In=void 0}if(!st&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||st===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(oa){let Cr=Le;for(Hn=void 0;Cr--;){const ca=ue[Cr];if(ca[1].type==="lineEnding"||ca[1].type==="lineEndingBlank"){if(ca[0]==="exit")continue;Hn&&(ue[Hn][1].type="lineEndingBlank",na=!0),ca[1].type="lineEnding",Hn=Cr}else if(!(ca[1].type==="linePrefix"||ca[1].type==="blockQuotePrefix"||ca[1].type==="blockQuotePrefixWhitespace"||ca[1].type==="blockQuoteMarker"||ca[1].type==="listItemIndent"))break}Wt&&(!Hn||Wt<Hn)&&(oa._spread=!0),oa.end=Object.assign({},Hn?ue[Hn][1].start:Tt[1].end),ue.splice(Hn||Le,0,["exit",oa,Tt[2]]),Le++,Ue++}if(Tt[1].type==="listItemPrefix"){const Cr={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};oa=Cr,ue.splice(Le,0,["enter",Cr,Tt[2]]),Le++,Ue++,Wt=void 0,In=!0}}}return ue[we][1]._spread=na,Ue}function o(ue,we){return Ue;function Ue(Le){d.call(this,ue(Le),Le),we&&we.call(this,Le)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ue,we,Ue){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([we,Ue||void 0]),ue.position={start:ki(we.start),end:void 0}}function h(ue){return we;function we(Ue){ue&&ue.call(this,Ue),f.call(this,Ue)}}function f(ue,we){const Ue=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==ue.type&&(we?we.call(this,ue,Le[0]):(Le[1]||l8).call(this,ue,Le[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Xu({start:ue.start,end:ue.end})+"): itâs not open");Ue.position.end=ki(ue.end)}function p(){return n$(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function b(ue){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.lang=ue}function N(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.meta=ue}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue.replace(/(\r?\n|\r)$/g,"")}function D(ue){const we=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=we,Ue.identifier=tc(this.sliceSerialize(ue)).toLowerCase()}function k(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.title=ue}function M(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.url=ue}function B(ue){const we=this.stack[this.stack.length-1];if(!we.depth){const Ue=this.sliceSerialize(ue).length;we.depth=Ue}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function U(ue){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ue){const Ue=this.stack[this.stack.length-1].children;let Le=Ue[Ue.length-1];(!Le||Le.type!=="text")&&(Le=Ct(),Le.position={start:ki(ue.start),end:void 0},Ue.push(Le)),this.stack.push(Le)}function ae(ue){const we=this.stack.pop();we.value+=this.sliceSerialize(ue),we.position.end=ki(ue.end)}function le(ue){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=we.children[we.children.length-1];Ue.position.end=ki(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(W.call(this,ue),ae.call(this,ue))}function re(){this.data.atHardBreak=!0}function xe(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function te(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function H(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.value=ue}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=we,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function ne(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=we,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Z(ue){const we=this.sliceSerialize(ue),Ue=this.stack[this.stack.length-2];Ue.label=tY(we),Ue.identifier=tc(we).toLowerCase()}function Y(){const ue=this.stack[this.stack.length-1],we=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Le=ue.children;Ue.children=Le}else Ue.alt=we}function I(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.url=ue}function R(){const ue=this.resume(),we=this.stack[this.stack.length-1];we.title=ue}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ge(ue){const we=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=we,Ue.identifier=tc(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Ee(ue){this.data.characterReferenceType=ue.type}function Te(ue){const we=this.sliceSerialize(ue),Ue=this.data.characterReferenceType;let Le;Ue?(Le=pk(we,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=Gy(we);const st=this.stack[this.stack.length-1];st.value+=Le}function Ve(ue){const we=this.stack.pop();
vendor: 8,077 bytes, lines 2043-2047
2043we.position.end=ki(ue.end)}function et(ue){ae.call(this,ue);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(ue)}function Re(ue){ae.call(this,ue);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(ue)}function kt(){return{type:"blockquote",children:[]}}function yt(){return{type:"code",lang:null,meta:null,value:""}}function Yt(){return{type:"inlineCode",value:""}}function cn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function vt(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function it(){return{type:"break"}}function de(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function Bt(){return{type:"link",title:null,url:"",children:[]}}function xn(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Vn(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Da(){return{type:"paragraph",children:[]}}function Zt(){return{type:"strong",children:[]}}function Ct(){return{type:"text",value:""}}function Ba(){return{type:"thematicBreak"}}}function ki(e){return{line:e.line,column:e.column,offset:e.offset}}function Ck(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?Ck(e,a):sY(e,a)}}function sY(e,t){let n;for(n in t)if(kk.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function l8(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is still open")}function iY(e){const t=this;t.parser=n;function n(a){return aY(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lY(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function oY(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 2044`}]}function cY(e,t){const n=t.value?t.value+` 2045`:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function uY(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dY(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hY(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=kc(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(a,d);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function mY(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fY(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ak(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function pY(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Ak(e,t);const s={src:kc(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function xY(e,t){const n={src:kc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function gY(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function bY(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Ak(e,t);const s={href:kc(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function yY(e,t){const n={href:kc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vY(e,t,n){const a=e.all(t),s=n?wY(n):Ek(t),o={},c=[];if(typeof t.checked=="boolean"){const p=a[0];let x;p&&p.type==="element"&&p.tagName==="p"?x=p:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const p=a[d];(s||d!==0||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:` 2046`}),p.type==="element"&&p.tagName==="p"&&!s?c.push(...p.children):c.push(p)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:` 2047`});const f={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,f),e.applyData(t,f)}function wY(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=Ek(n[a])}return t}function Ek(e){const t=e.spread;return t??e.children.length>1}function SY(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function NY(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jY(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function kY(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CY(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=Vy(t.children[1]),h=ok(t.children[t.children.length-1]);d&&h&&(c.position={start:d,end:h}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function AY(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let h=-1;const f=[];for(;++h<d;){const x=t.children[h],b={},v=c?c[h]:void 0;v&&(b.align=v);let N={type:"element",tagName:o,properties:b,children:[]};
vendor: 1,420 bytes, line 2047
2047x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),f.push(N)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function EY(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const o8=9,c8=32;function TY(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(u8(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(u8(t.slice(s),s>0,!1)),o.join("")}function u8(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===o8||o===c8;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===o8||o===c8;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function MY(e,t){const n={type:"text",value:TY(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IY(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const zY={blockquote:lY,break:oY,code:cY,delete:uY,emphasis:dY,footnoteReference:hY,heading:mY,html:fY,imageReference:pY,image:xY,inlineCode:gY,linkReference:bY,link:yY,listItem:vY,list:SY,paragraph:NY,root:jY,strong:kY,table:CY,tableCell:EY,tableRow:AY,text:MY,thematicBreak:IY,toml:yh,yaml:yh,definition:yh,footnoteDefinition:yh};function yh(){}const Tk=-1,rf=0,Qu=1,Em=2,Xy=3,Ky=4,Qy=5,Jy=6,Mk=7,Ik=8,_Y=typeof self=="object"?self:globalThis,d8=(e,t)=>
vendor: 2,230 bytes, line 2047
2047{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new _Y[e](t)},DY=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case rf:case Tk:return n(c,s);case Qu:{const d=n([],s);for(const h of c)d.push(a(h));return d}case Em:{const d=n({},s);for(const[h,f]of c)d[a(h)]=a(f);return d}case Xy:return n(new Date(c),s);case Ky:{const{source:d,flags:h}=c;return n(new RegExp(d,h),s)}case Qy:{const d=n(new Map,s);for(const[h,f]of c)d.set(a(h),a(f));return d}case Jy:{const d=n(new Set,s);for(const h of c)d.add(a(h));return d}case Mk:{const{name:d,message:h}=c;return n(d8(d,h),s)}case Ik:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(d8(o,c),s)};return a},h8=e=>DY(new Map,e)(0),Do="",{toString:BY}={},{keys:RY}=Object,Du=e=>{const t=typeof e;if(t!=="object"||!e)return[rf,t];const n=BY.call(e).slice(8,-1);switch(n){case"Array":return[Qu,Do];case"Object":return[Em,Do];case"Date":return[Xy,Do];case"RegExp":return[Ky,Do];case"Map":return[Qy,Do];case"Set":return[Jy,Do];case"DataView":return[Qu,n]}return n.includes("Array")?[Qu,n]:n.includes("Error")?[Mk,n]:[Em,n]},vh=([e,t])=>e===rf&&(t==="function"||t==="symbol"),OY=(e,t,n,a)=>{const s=(c,d)=>{const h=a.push(c)-1;return n.set(d,h),h},o=c=>{if(n.has(c))return n.get(c);let[d,h]=Du(c);switch(d){case rf:{let p=c;switch(h){case"bigint":d=Ik,p=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);p=null;break;case"undefined":return s([Tk],c)}return s([d,p],c)}case Qu:{if(h){let b=c;return h==="DataView"?b=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(b=new Uint8Array(c)),s([h,[...b]],c)}const p=[],x=s([d,p],c);for(const b of c)p.push(o(b));return x}case Em:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const p=[],x=s([d,p],c);for(const b of RY(c))(e||!vh(Du(c[b])))&&p.push([o(b),o(c[b])]);return x}
vendor: 1,453 bytes, line 2047
2047case Xy:return s([d,c.toISOString()],c);case Ky:{const{source:p,flags:x}=c;return s([d,{source:p,flags:x}],c)}case Qy:{const p=[],x=s([d,p],c);for(const[b,v]of c)(e||!(vh(Du(b))||vh(Du(v))))&&p.push([o(b),o(v)]);return x}case Jy:{const p=[],x=s([d,p],c);for(const b of c)(e||!vh(Du(b)))&&p.push(o(b));return x}}const{message:f}=c;return s([d,{name:h,message:f}],c)};return o},m8=(e,{json:t,lossy:n}={})=>{const a=[];return OY(!(t||n),!!t,new Map,a)(e),a},Tm=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?h8(m8(e,t)):structuredClone(e):(e,t)=>h8(m8(e,t));function LY(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function PY(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function UY(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||LY,a=e.options.footnoteBackLabel||PY,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const p=e.all(f),x=String(f.identifier).toUpperCase(),b=kc(x.toLowerCase());let v=0;const N=[],j=e.footnoteCounts.get(x);for(;j!==void 0&&++v<=j;){N.length>0&&N.push({type:"text",value:" "});let D=typeof n=="string"?n:n(h,v);
vendor: 5,826 bytes, lines 2047-2053
2047typeof D=="string"&&(D={type:"text",value:D}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(D)?D:[D]})}const T=p[p.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const D=T.children[T.children.length-1];D&&D.type==="text"?D.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...N)}else p.push(...N);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,E),d.push(E)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Tm(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` 2048`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:` 2049`}]}}const Zy=(function(e){if(e==null)return HY;if(typeof e=="function")return sf(e);if(typeof e=="object")return Array.isArray(e)?FY(e):VY(e);if(typeof e=="string")return qY(e);throw new Error("Expected function, string, or object as test")});function FY(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Zy(e[n]);return sf(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function VY(e){const t=e;return sf(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function qY(e){return sf(t);function t(n){return n&&n.type===e}}function sf(e){return t;function t(n,a,s){return!!($Y(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function HY(){return!0}function $Y(e){return e!==null&&typeof e=="object"&&"type"in e}const zk=[],GY=!0,f8=!1,_k="skip";function Dk(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=Zy(s),c=a?-1:1;d(e,void 0,[])();function d(h,f,p){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=zk,N,j,T;if((!t||o(h,f,p[p.length-1]||void 0))&&(v=YY(n(h,p)),v[0]===f8))return v;if("children"in h&&h.children){const E=h;if(E.children&&v[0]!==_k)for(j=(a?E.children.length:-1)+c,T=p.concat(E);j>-1&&j<E.children.length;){const D=E.children[j];if(N=d(D,j,T)(),N[0]===f8)return N;j=typeof N[1]=="number"?N[1]:j+c}}return v}}}function YY(e){return Array.isArray(e)?e:typeof e=="number"?[GY,e]:e==null?zk:[e]}function Bk(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),Dk(e,o,d,s);function d(h,f){const p=f[f.length-1],x=p?p.children.indexOf(h):void 0;return c(h,x,p)}}const Qg={}.hasOwnProperty,WY={};function XY(e,t){const n=t||WY,a=new Map,s=new Map,o=new Map,c={...zY,...n.handlers},d={all:f,applyData:QY,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:n,patch:KY,wrap:ZY};return Bk(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const x=p.type==="definition"?a:s,b=String(p.identifier).toUpperCase();x.has(b)||x.set(b,p)}}),d;function h(p,x){const b=p.type,v=d.handlers[b];if(Qg.call(d.handlers,b)&&v)return v(d,p,x);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in p){const{children:j,...T}=p,E=Tm(T);return E.children=d.all(p),E}return Tm(p)}return(d.options.unknownHandler||JY)(d,p,x)}function f(p){const x=[];if("children"in p){const b=p.children;let v=-1;for(;++v<b.length;){const N=d.one(b[v],p);if(N){if(v&&b[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=p8(N.value)),!Array.isArray(N)&&N.type==="element")){const j=N.children[0];j&&j.type==="text"&&(j.value=p8(j.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function KY(e,t){e.position&&(t.position=DH(e))}function QY(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,Tm(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function JY(e,t){const n=t.data||{},a="value"in t&&!(Qg.call(n,"hProperties")||Qg.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ZY(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:` 2050`});++a<e.length;)a&&n.push({type:"text",value:` 2051`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:` 2052`}),n}function p8(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function x8(e,t){const n=XY(e,t),a=n.one(e,void 0),s=UY(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:` 2053`},s),o}function eW(e,t){return e&&"run"in e?async function(n,a){const s=x8(n,{file:a,...t});await e.run(s,a)}:function(n,a){return x8(n,{file:a,...e||t})}}function g8(e){if(e)throw e}var g1,b8;function tW(){if(b8)return g1;b8=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),x=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!x)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},c=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue}
vendor: 12,995 bytes, line 2053
2053,d=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(a)return a(f,p).value}else return;return f[p]};return g1=function h(){var f,p,x,b,v,N,j=arguments[0],T=1,E=arguments.length,D=!1;for(typeof j=="boolean"&&(D=j,j=arguments[1]||{},T=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});T<E;++T)if(f=arguments[T],f!=null)for(p in f)x=d(j,p),b=d(f,p),j!==b&&(D&&b&&(o(b)||(v=s(b)))?(v?(v=!1,N=x&&s(x)?x:[]):N=x&&o(x)?x:{},c(j,{name:p,newValue:h(D,N,b)})):typeof b<"u"&&c(j,{name:p,newValue:b}));return j},g1}var nW=tW();const b1=G7(nW);function Jg(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function aW(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(h,...f){const p=e[++o];let x=-1;if(h){c(h);return}for(;++x<s.length;)(f[x]===null||f[x]===void 0)&&(f[x]=s[x]);s=f,p?rW(p,d)(...f):c(null,...f)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function rW(e,t){let n;return a;function a(...c){const d=e.length>c.length;let h;d&&c.push(s);try{h=e.apply(this,c)}catch(f){const p=f;if(d&&n)throw p;return s(p)}d||(h&&h.then&&typeof h.then=="function"?h.then(o,s):h instanceof Error?s(h):o(h))}function s(c,...d){n||(n=!0,t(c,...d))}function o(c){s(null,c)}}const Kr={basename:sW,dirname:iW,extname:lW,join:oW,sep:"/"};function sW(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');V0(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function iW(e){if(V0(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function lW(e){V0(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function oW(...e){let t=-1,n;for(;++t<e.length;)V0(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":cW(n)}function cW(e){V0(e);const t=e.codePointAt(0)===47;let n=uW(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function uW(e,t){let n="",a=0,s=-1,o=0,c=-1,d,h;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return n}function V0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dW={cwd:hW};function hW(){return"/"}function Zg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mW(e){if(typeof e=="string")e=new URL(e);else if(!Zg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fW(e)}function fW(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const y1=["history","path","basename","stem","extname","dirname"];class Rk{constructor(t){let n;t?Zg(t)?n={path:t}:typeof t=="string"||pW(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":dW.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<y1.length;){const o=y1[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)y1.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Kr.basename(this.path):void 0}set basename(t){w1(t,"basename"),v1(t,"basename"),this.path=Kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Kr.dirname(this.path):void 0}set dirname(t){y8(this.basename,"dirname"),this.path=Kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Kr.extname(this.path):void 0}set extname(t){if(v1(t,"extname"),y8(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zg(t)&&(t=mW(t)),w1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Kr.basename(this.path,this.extname):void 0}set stem(t){w1(t,"stem"),v1(t,"stem"),this.path=Kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new la(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function v1(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function w1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function y8(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function pW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xW=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),gW={}.hasOwnProperty;class e2 extends xW{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=aW()}copy(){const t=new e2;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(b1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(j1("data",this.frozen),this.namespace[t]=n,this):gW.call(this.namespace,t)&&this.namespace[t]||void 0:t?(j1("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=wh(t),a=this.parser||this.Parser;return S1("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),S1("process",this.parser||this.Parser),N1("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const d=wh(t),h=a.parse(d);a.run(h,d,function(p,x,b){if(p||!x||!b)return f(p);const v=x,N=a.stringify(v,b);vW(N)?b.value=N:b.result=N,f(p,b)});function f(p,x){p||!x?c(p):o?o(x):n(void 0,x)}}}processSync(t){let n=!1,a;return this.freeze(),S1("processSync",this.parser||this.Parser),N1("processSync",this.compiler||this.Compiler),this.process(t,s),w8("processSync","process",n),a;function s(o,c){n=!0,g8(o),a=c}}run(t,n,a){v8(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,d){const h=wh(n);s.run(t,h,f);function f(p,x,b){const v=x||t;p?d(p):c?c(v):a(void 0,v,b)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),w8("runSync","run",a),s;function o(c,d){g8(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=wh(n),s=this.compiler||this.Compiler;return N1("stringify",s),v8(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(j1("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...x]=f;h(p,x)}else c(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function c(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(f.plugins),f.settings&&(s.settings=b1(!0,s.settings,f.settings))}function d(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const x=f[p];o(x)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,p){let x=-1,b=-1;for(;++x<a.length;)if(a[x][0]===f){b=x;break}if(b===-1)a.push([f,...p]);else if(p.length>0){let[v,...N]=p;const j=a[b][1];Jg(j)&&Jg(v)&&(v=b1(!0,j,v)),a[b]=[f,v,...N]}}}}const bW=new e2().freeze();function S1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function N1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function j1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function v8(e){if(!Jg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function w8(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wh(e){return yW(e)?e:new Rk(e)}function yW(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vW(e){return typeof e=="string"||wW(e)}function wW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SW="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",S8=[],N8={allowDangerousHtml:!0},NW=/^(https?|ircs?|mailto|xmpp)$/i,jW=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function eb(e){const t=kW(e),n=CW(e);return AW(t.runSync(t.parse(n),n),e)}function kW(e){const t=e.rehypePlugins||S8,n=e.remarkPlugins||S8,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...N8}:N8;return bW().use(iY).use(n).use(eW,a).use(t)}function CW(e){const t=e.children||"",n=new Rk;return typeof t=="string"&&(n.value=t),n}function AW(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,h=t.urlTransform||EW;for(const p of jW)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+SW+p.id,void 0);return Bk(e,f),PH(e,{Fragment:i.Fragment,components:s,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function f(p,x,b){if(p.type==="raw"&&b&&typeof x=="number")return c?b.children.splice(
vendor: 6,964 bytes, lines 2053-2057
2053x,1):b.children[x]={type:"text",value:p.value},x;if(p.type==="element"){let v;for(v in f1)if(Object.hasOwn(f1,v)&&Object.hasOwn(p.properties,v)){const N=p.properties[v],j=f1[v];(j===null||j.includes(p.tagName))&&(p.properties[v]=h(String(N||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):o?o.includes(p.tagName):!1;if(!v&&a&&typeof x=="number"&&(v=!a(p,x,b)),v&&b&&typeof x=="number")return d&&p.children?b.children.splice(x,1,...p.children):b.children.splice(x,1),x}}}function EW(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||NW.test(e.slice(0,t))?e:""}function TW(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function MW(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:s,mathFlowFence:a,mathFlowFenceMeta:n,mathFlowValue:d,mathText:c,mathTextData:d}};function e(h){const f={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[f]}},h)}function t(){this.buffer()}function n(){const h=this.resume(),f=this.stack[this.stack.length-1];f.type,f.meta=h}function a(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(h){const f=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];p.type,this.exit(h),p.value=f;const x=p.data.hChildren[0];x.type,x.tagName,x.children.push({type:"text",value:f}),this.data.mathFlowInside=void 0}function o(h){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},h),this.buffer()}function c(h){const f=this.resume(),p=this.stack[this.stack.length-1];p.type,this.exit(h),p.value=f,p.data.hChildren.push({type:"text",value:f})}function d(h){this.config.enter.data.call(this,h),this.config.exit.data.call(this,h)}}function IW(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),a.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` 2054`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:a}};function n(o,c,d,h){const f=o.value||"",p=d.createTracker(h),x="$".repeat(Math.max(TW(f,"$")+1,2)),b=d.enter("mathFlow");let v=p.move(x);if(o.meta){const N=d.enter("mathFlowMeta");v+=p.move(d.safe(o.meta,{after:` 2055`,before:v,encode:["$"],...p.current()})),N()}return v+=p.move(` 2056`),f&&(v+=p.move(f+` 2057`)),v+=p.move(x),b(),v}function a(o,c,d){let h=o.value||"",f=1;for(t||f++;new RegExp("(^|[^$])"+"\\$".repeat(f)+"([^$]|$)").test(h);)f++;const p="$".repeat(f);/[^ \r\n]/.test(h)&&(/^[ \r\n]/.test(h)&&/[ \r\n]$/.test(h)||/^\$|\$$/.test(h))&&(h=" "+h+" ");let x=-1;for(;++x<d.unsafe.length;){const b=d.unsafe[x];if(!b.atBreak)continue;const v=d.compilePattern(b);let N;for(;N=v.exec(h);){let j=N.index;h.codePointAt(j)===10&&h.codePointAt(j-1)===13&&j--,h=h.slice(0,j)+" "+h.slice(N.index+1)}}return p+h+p}function s(){return"$"}}const zW={tokenize:_W,concrete:!0,name:"mathFlow"},j8={tokenize:DW,partial:!0};function _W(e,t,n){const a=this,s=a.events[a.events.length-1],o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0;let c=0;return d;function d(D){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),h(D)}function h(D){return D===36?(e.consume(D),c++,h):c<2?n(D):(e.exit("mathFlowFenceSequence"),Et(e,f,"whitespace")(D))}function f(D){return D===null||Ge(D)?x(D):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(D))}function p(D){return D===null||Ge(D)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),x(D)):D===36?n(D):(e.consume(D),p)}function x(D){return e.exit("mathFlowFence"),a.interrupt?t(D):e.attempt(j8,b,T)(D)}function b(D){return e.attempt({tokenize:E,partial:!0},T,v)(D)}function v(D){return(o?Et(e,N,"linePrefix",o+1):N)(D)}function N(D){return D===null?T(D):Ge(D)?e.attempt(j8,b,T)(D):(e.enter("mathFlowValue"),j(D))}function j(D){return D===null||Ge(D)?(e.exit("mathFlowValue"),N(D)):(e.consume(D),j)}function T(D){return e.exit("mathFlow"),t(D)}function E(D,k,M){let B=0;return Et(D,_,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function _(W){return D.enter("mathFlowFence"),D.enter("mathFlowFenceSequence"),U(W)}function U(W){return W===36?(B++,D.consume(W),U):B<c?M(W):(D.exit("mathFlowFenceSequence"),Et(D,F,"whitespace")(W))}function F(W){return W===null||Ge(W)?(D.exit("mathFlowFence"),k(W)):M(W)}}}function DW(e,t,n){const a=this;return s;function s(c){return c===null?t(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function BW(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:a,resolve:RW,previous:OW,name:"mathText"};function a(s,o,c){let d=0,h,f;return p;function p(j){return s.enter("mathText"),s.enter("mathTextSequence"),x(j)}function x(j){return j===36?(s.consume(j),d++,x):d<2&&!n?c(j):(s.exit("mathTextSequence"),b(j))}function b(j){return j===null?c(j):j===36?(f=s.enter("mathTextSequence"),h=0,N(j)):j===32?(s.enter("space"),s.consume(j),s.exit("space"),b):Ge(j)?(s.enter("lineEnding"),s.consume(j),s.exit("lineEnding"),b):(s.enter("mathTextData"),v(j))}function v(j){return j===null||j===32||j===36||Ge(j)?(s.exit("mathTextData"),b(j)):(s.consume(j),v)}function N(j){return j===36?(s.consume(j),h++,N):h===d?(s.exit("mathTextSequence"),s.exit("mathText"),o(j)):(f.type="mathTextData",v(j))}}}function RW(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="mathTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function OW(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function LW(e){return{flow:{36:zW},text:{36:BW(e)}}}const PW={};function tb(e){const t=this,n=e||PW,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(LW(n)),o.push(MW()),c.push(IW(n))}const k8=/[#.]/g;function UW(e,t){const n=e||"",a={};let s=0,o,c;for(;s<n.length;){k8.lastIndex=s;const d=k8.exec(n),h=n.slice(s,d?d.index:n.length);h&&(o?o==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:c=h,s+=h.length),d&&(o=d[0],s++)}return{type:"element",tagName:c||t||"div",properties:a,children:[]}}
vendor: 14,576 bytes, lines 2057-2059
2057function Ok(e,t,n){const a=n?HW(n):void 0;function s(o,c,...d){let h;if(o==null){h={type:"root",children:[]};const f=c;d.unshift(f)}else{h=UW(o,t);const f=h.tagName.toLowerCase(),p=a?a.get(f):void 0;if(h.tagName=p||f,FW(c))d.unshift(c);else for(const[x,b]of Object.entries(c))VW(e,h.properties,x,b)}for(const f of d)nb(h.children,f);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return s}function FW(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const o=s;for(const c of o)if(typeof c!="number"&&typeof c!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function VW(e,t,n,a){const s=ik(e,n);let o;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;o=a}else typeof a=="boolean"?o=a:typeof a=="string"?s.spaceSeparated?o=qw(a):s.commaSeparated?o=Lw(a):s.commaOrSpaceSeparated?o=qw(Lw(a).join(" ")):o=C8(s,s.property,a):Array.isArray(a)?o=[...a]:o=s.property==="style"?qW(a):String(a);if(Array.isArray(o)){const c=[];for(const d of o)c.push(C8(s,s.property,d));o=c}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function nb(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)nb(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?nb(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function C8(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||x0(n)===x0(t)))return!0}return n}function qW(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function HW(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const $W=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],GW=Ok(lk,"div"),YW=Ok(nf,"g",$W),k1={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function WW(e,t){return Lk(e,{})||{type:"root",children:[]}}function Lk(e,t){const n=XW(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function XW(e,t){switch(e.nodeType){case 1:return ZW(e,t);case 3:return QW(e);case 8:return JW(e);case 9:return A8(e,t);case 10:return KW();case 11:return A8(e,t);default:return}}function A8(e,t){return{type:"root",children:Pk(e,t)}}function KW(){return{type:"doctype"}}function QW(e){return{type:"text",value:e.nodeValue||""}}function JW(e){return{type:"comment",value:e.nodeValue||""}}function ZW(e,t){const n=e.namespaceURI,a=n===k1.svg?YW:GW,s=n===k1.html?e.tagName.toLowerCase():e.tagName,o=n===k1.html&&s==="template"?e.content:e,c=e.getAttributeNames(),d={};let h=-1;for(;++h<c.length;)d[c[h]]=e.getAttribute(c[h])||"";return a(s,d,Pk(o,t))}function Pk(e,t){const n=e.childNodes,a=[];let s=-1;for(;++s<n.length;){const o=Lk(n[s],t);o!==void 0&&a.push(o)}return a}new DOMParser;function eX(e,t){const n=tX(e);return WW(n)}function tX(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const E8=(function(e,t,n){const a=Zy(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),Yl=(function(e){if(e==null)return rX;if(typeof e=="string")return aX(e);if(typeof e=="object")return nX(e);if(typeof e=="function")return t2(e);throw new Error("Expected function, string, or array as `test`")});function nX(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Yl(e[n]);return t2(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function aX(e){return t2(t);function t(n){return n.tagName===e}}function t2(e){return t;function t(n,a,s){return!!(sX(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function rX(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function sX(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const T8=/\n/g,M8=/[\t ]+/g,ab=Yl("br"),I8=Yl(mX),iX=Yl("p"),z8=Yl("tr"),lX=Yl(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",hX,fX]),Uk=Yl(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function oX(e,t){const n=t||{},a="children"in e?e.children:[],s=Uk(e),o=qk(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Vk(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(...Fk(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?ab(a[d+1]):s}));const h=[];let f;for(d=-1;++d<c.length;){const p=c[d];typeof p=="number"?f!==void 0&&p>f&&(f=p):p&&(f!==void 0&&f>-1&&h.push(` 2058`.repeat(f)||" "),f=-1,h.push(p))}return h.join("")}function Fk(e,t,n){return e.type==="element"?cX(e,t,n):e.type==="text"?n.whitespace==="normal"?Vk(e,n):uX(e):[]}function cX(e,t,n){const a=qk(e,n),s=e.children||[];let o=-1,c=[];if(lX(e))return c;let d,h;for(ab(e)||z8(e)&&E8(t,e,z8)?h=` 2059`:iX(e)?(d=2,h=2):Uk(e)&&(d=1,h=1);++o<s.length;)c=c.concat(Fk(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?ab(s[o+1]):h}));return I8(e)&&E8(t,e,I8)&&c.push(" "),d&&c.unshift(d),h&&c.push(h),c}function Vk(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){T8.lastIndex=o;const h=T8.exec(n),f=h&&"index"in h?h.index:n.length;a.push(dX(n.slice(o,f).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,f===n.length?t.breakAfter:!0)),o=f+1}let c=-1,d;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function uX(e){return[String(e.value)]}function dX(e,t,n){const a=[];let s=0,o;for(;s<e.length;){M8.lastIndex=s;const c=M8.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function qk(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function hX(e){return!!(e.properties||{}).hidden}function mX(e){return e.tagName==="td"||e.tagName==="th"}function fX(e){return e.tagName==="dialog"&&!(e.properties||{}).open}class Se extends Error{constructor(t,n){var a="KaTeX parse error: "+t,s,o,c=n&&n.loc;if(c&&c.start<=c.end){var d=c.lexer.input;s=c.start,o=c.end,s===d.length?a+=" at end of input: ":a+=" at position "+(s+1)+": ";var h=d.slice(s,o).replace(/[^]/g,"$&̲"),f;s>15?f="â¦"+d.slice(s-15,s):f=d.slice(0,s);var p;o+15<d.length?p=d.slice(o,o+15)+"â¦":p=d.slice(o),a+=f+h+p}super(a),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,Se.prototype),this.position=s,s!=null&&o!=null&&(this.length=o-s),this.rawMessage=t}}var pX=/([A-Z])/g,xX=e=>e.replace(pX,"-$1").toLowerCase(),gX={"&":"&",">":">","<":"<",'"':""","'":"'"},bX=/[&><"']/g,ia=e=>String(e).replace(bX,t=>gX[t]),Qh=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Qh(e.body[0]):e:e.type==="font"?Qh(e.body):e,yX=new Set(["mathord","textord","atom"]),Ws=e=>yX.has(Qh(e).type),vX=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},rb={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function wX(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function SX(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return wX(t)}function NX(e,t,n,a){var s=n[t];e[t]=s!==void 0?a.processor?a.processor(s):s:SX(a)}class n2{constructor(t){t===void 0&&(t={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var n of Object.keys(rb)){var a=rb[n];a&&NX(this,n,t,a)}}reportNonstrict(t,n,a){var s=this.strict;if(typeof s=="function"&&(s=s(t,n,a)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Se("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var s=this.strict;if(typeof s=="function")try{s=s(t,n,a)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=vX(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}class Ci{constructor(t,n,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=a}sup(){return Jr[jX[this.id]]}sub(){return Jr[kX[this.id]]}fracNum(){return Jr[CX[this.id]]}fracDen(){return Jr[AX[this.id]]}cramp(){return Jr[EX[this.id]]}text(){return Jr[TX[this.id]]}isTight(){return this.size>=2}}var a2=0,Mm=1,nc=2,Fs=3,b0=4,br=5,dc=6,ga=7,Jr=[new Ci(a2,0,!1),new Ci(Mm,0,!0),new Ci(nc,1,!1),new Ci(Fs,1,!0),new Ci(b0,2,!1),new Ci(br,2,!0),new Ci(dc,3,!1),new Ci(ga,3,!0)],jX=[b0,br,b0,br,dc,ga,dc,ga],kX=[br,br,br,br,ga,ga,ga,ga],CX=[nc,Fs,b0,br,dc,ga,dc,ga],AX=[Fs,Fs,br,br,ga,ga,ga,ga],EX=[Mm,Mm,Fs,Fs,br,br,ga,ga],TX=[a2,Mm,nc,Fs,nc,Fs,nc,Fs],Je={DISPLAY:Jr[a2],TEXT:Jr[nc],SCRIPT:Jr[b0],SCRIPTSCRIPT:Jr[dc]},sb=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function MX(e){for(var t=0;t<sb.length;t++)for(var n=sb[t],a=0;a<n.blocks.length;a++){var s=n.blocks[a];if(e>=s[0]&&e<=s[1])return n.name}return null}var Jh=[];
vendor: 7,448 bytes, lines 2059-2150
2059sb.forEach(e=>e.blocks.forEach(t=>Jh.push(...t)));function Hk(e){for(var t=0;t<Jh.length;t+=2)if(e>=Jh[t]&&e<=Jh[t+1])return!0;return!1}var Rn=e=>e+" "+e,Bo=80,IX=function(t,n){return"M95,"+(622+t+n)+` 2060c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 2061c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 2062c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 2063s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 2064c69,-144,104.5,-217.7,106.5,-221 2065l`+t/2.075+" -"+t+` 2066c5.3,-9.3,12,-14,20,-14 2067H400000v`+(40+t)+`H845.2724 2068s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 2069c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z 2070M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},zX=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 2071c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 2072c340,-704.7,510.7,-1060.3,512,-1067 2073l`+t/2.084+" -"+t+` 2074c4.7,-7.3,11,-11,19,-11 2075H40000v`+(40+t)+`H1012.3 2076s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 2077c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 2078s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 2079c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z 2080M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},_X=function(t,n){return"M983 "+(10+t+n)+` 2081l`+t/3.13+" -"+t+` 2082c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` 2083H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 2084s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 2085c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 2086c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 2087c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 2088c53.7,-170.3,84.5,-266.8,92.5,-289.5z 2089M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},DX=function(t,n){return"M424,"+(2398+t+n)+` 2090c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 2091c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 2092s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 2093s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 2094l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 2095v`+(40+t)+`H1014.6 2096s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 2097c-2,6,-10,9,-24,9 2098c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` 2099h400000v`+(40+t)+"h-400000z"},BX=function(t,n){return"M473,"+(2713+t+n)+` 2100c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` 2101c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 2102s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 2103c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 2104c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 2105s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, 2106606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},RX=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},OX=function(t,n,a){var s=a-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` 2107H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 2108h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 2109c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 2110219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},LX=function(t,n,a){n=1e3*n;var s="";switch(t){case"sqrtMain":s=IX(n,Bo);break;case"sqrtSize1":s=zX(n,Bo);break;case"sqrtSize2":s=_X(n,Bo);break;case"sqrtSize3":s=DX(n,Bo);break;case"sqrtSize4":s=BX(n,Bo);break;case"sqrtTall":s=OX(n,Bo,a)}return s},PX=function(t,n){switch(t){case"â":return Rn("M291 0 H417 V"+n+" H291z");case"â£":return Rn("M145 0 H188 V"+n+" H145z");case"â¥":return Rn("M145 0 H188 V"+n+" H145z")+Rn("M367 0 H410 V"+n+" H367z");case"â":return Rn("M457 0 H583 V"+n+" H457z");case"â¢":return Rn("M319 0 H403 V"+n+" H319z");case"â¥":return Rn("M263 0 H347 V"+n+" H263z");case"âª":return Rn("M384 0 H504 V"+n+" H384z");case"â":return Rn("M312 0 H355 V"+n+" H312z");case"â":return Rn("M257 0 H300 V"+n+" H257z")+Rn("M478 0 H521 V"+n+" H478z");default:return""}},_8={doubleleftarrow:`M262 157 2111l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 2112 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 2113 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 2114c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 2115 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 2116-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 2117-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z 2118m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l 2119-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 2120 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 2121-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 2122-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 2123-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 2124c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 2125-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 2126 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 2127-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 2128c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 2129 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 2130 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 2131 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 2132-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 2133 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 2134 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 2135 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 2136-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 2137H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 2138 435 0h399565z`,leftgroupunder:`M400000 262 2139H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 2140 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 2141-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 2142-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 2143-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 2144 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 2145-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 2146-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z 2147m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 2148 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 2149 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 2150-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2
215011s5.3 5.3 12 2151 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 2152-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 2153v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 2154-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 2155-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 2156 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Rn("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Rn("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Rn("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Rn("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 2157-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 2158c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 2159 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Rn("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 2160c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 2161-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 2162 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 2163 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 2164c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 2165 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 2166 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 2167-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 2168-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z 2169m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 217060.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 2171-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z 2172m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 2173c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 2174-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z 2175m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 217685.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 2177-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z 2178m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 2179c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 2180-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 2181 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 2182 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 2183-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 2184-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 2185 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l 2186-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 2187s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 2188c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 2189 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 2190-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 2191 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 2192 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 2193-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 2194-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 2195 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 2196-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 2197 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z 2198m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 2199 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
2200-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 2201-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 2202 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 2203 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 2204-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z 2205m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 2206 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 2207-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 2208 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Rn("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Rn("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Rn("M399995 440 h-120 V150 H0 v-120 H399995z")
vendor: 6,574 bytes, lines 2208-2281
2208,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 2209 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 2210-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 2211-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 2212 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 2213-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 2214-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 2215-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 2216 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 2217c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 2218 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 2219 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 2220-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 2221 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 2222-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 2223 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 2224 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 2225-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 2226-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 2227 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 2228c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 2229 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 2230-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 2231 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 2232 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 2233 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 2234-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 2235 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 2236 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 2237 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 22383.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 223910.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 2240-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 2241-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 2242H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 2243c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 2244c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 2245-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 2246-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 2247-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, 2248-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 2249-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 2250-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, 2251-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 2252c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 2253c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 2254s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 2255121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 2256s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 2257c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z 2258M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 2259-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 226013.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 2261-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 2262-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 2263-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 2264151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 2265c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 2266c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 2267c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 2268c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z 2269M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 2270c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 2271-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 2272c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 2273M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 2274c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, 22751c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, 2276-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z 2277M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 2278c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, 2279-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 2280c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z 2281M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},
vendor: 4,686 bytes, lines 2281-2309
2281UX=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 v84 h347 v-84 2282H403z M403 1759 V0 H319 V1759 v`+n+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z 2283M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 2284c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 2285c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 2286c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 2287c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z 2288M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 2289c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 2290c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z 2291MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z 2292MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z 2293M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z 2294M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 2295c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, 2296-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, 2297949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 2298c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, 2299-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 2300l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, 2301-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, 230263,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 2303c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` 2304c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 2305c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 2306c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 2307c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 2308l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, 2309-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function FX(e){return"toText"in e}class Cc{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),n=0;n<this.children.length;n++)t.appendChild(this.children[n].toNode());return t}toMarkup(){for(var t="",n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t}toText(){return this.children.map(t=>{if(FX(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}}var ib={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},VX={ex:!0,em:!0,mu:!0},$k=function(t){return typeof t!="string"&&(t=t.unit),t in ib||t in VX||t==="ex"},tn=function(t,n){var a;if(t.unit in ib)a=ib[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")a=n.fontMetrics().cssEmPerMu;else{var s;if(n.style.isTight()?s=n.havingStyle(n.style.text()):s=n,t.unit==="ex")a=s.fontMetrics().xHeight;else if(t.unit==="em")a=s.fontMetrics().quad;else throw new Se("Invalid unit: '"+t.unit+"'");s!==n&&(a*=s.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*a,n.maxSize)},ke=function(t){return+t.toFixed(4)+"em"},$i=function(t){return t.filter(n=>n).join(" ")},r2=function(t){var n="";for(var a of Object.keys(t)){var s=t[a];s!==void 0&&(n+=xX(a)+":"+s+";")}return n},Gk=function(t,n,a){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},n){n.style.isTight()&&this.classes.push("mtight");var s=n.getColor();s&&(this.style.color=s)}},Yk=function(t){var n=document.createElement(t);n.className=$i(this.classes),Object.assign(n.style,this.style);for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n}
vendor: 4,658 bytes, line 2309
2309,qX=/[\s"'>/=\x00-\x1f]/,Wk=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+ia($i(this.classes))+'"');var a=r2(this.style);a&&(n+=' style="'+ia(a)+'"');for(var s of Object.keys(this.attributes)){if(qX.test(s))throw new Se("Invalid attribute name '"+s+"'");n+=" "+s+'="'+ia(this.attributes[s])+'"'}n+=">";for(var o=0;o<this.children.length;o++)n+=this.children[o].toMarkup();return n+="</"+t+">",n};class Ac{constructor(t,n,a,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Gk.call(this,t,a,s),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return Yk.call(this,"span")}toMarkup(){return Wk.call(this,"span")}}class lf{constructor(t,n,a,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Gk.call(this,n,s),this.children=a||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return this.classes.includes(t)}toNode(){return Yk.call(this,"a")}toMarkup(){return Wk.call(this,"a")}}class HX{constructor(t,n,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=a}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t='<img src="'+ia(this.src)+'"'+(' alt="'+ia(this.alt)+'"'),n=r2(this.style);return n&&(t+=' style="'+ia(n)+'"'),t+="'/>",t}}var $X={î:"ıÌ",ï:"ıÌ",Ã:"ıÌ",ì:"ıÌ"};class Qa{constructor(t,n,a,s,o,c,d,h){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=n||0,this.depth=a||0,this.italic=s||0,this.skew=o||0,this.width=c||0,this.classes=d||[],this.style=h||{},this.maxFontSize=0;var f=MX(this.text.charCodeAt(0));f&&this.classes.push(f+"_fallback"),/[îïÃì]/.test(this.text)&&(this.text=$X[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),n=null;return this.italic>0&&(n=document.createElement("span"),n.style.marginRight=ke(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=$i(this.classes)),Object.keys(this.style).length>0&&(n=n||document.createElement("span"),Object.assign(n.style,this.style)),n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="<span";this.classes.length&&(t=!0,n+=' class="',n+=ia($i(this.classes)),n+='"');var a="";this.italic>0&&(a+="margin-right:"+ke(this.italic)+";"),a+=r2(this.style),a&&(t=!0,n+=' style="'+ia(a)+'"');var s=ia(this.text);return t?(n+=">",n+=s,n+="</span>",n):s}}class Ys{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);for(var s=0;s<this.children.length;s++)n.appendChild(this.children[s].toNode());return n}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var n of Object.keys(this.attributes))t+=" "+n+'="'+ia(this.attributes[n])+'"';t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</svg>",t}}class Gi{constructor(t,n){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=n}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",_8[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+ia(this.alternate)+'"/>':'<path d="'+ia(_8[this.pathName])+'"/>'}}class lb{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var a of Object.keys(this.attributes))n.setAttribute(a,this.attributes[a]);return n}toMarkup(){var t="<line";for(var n of Object.keys(this.attributes))t+=" "+n+'="'+ia(this.attributes[n])+'"';return t+="/>",t}}function GX(e){if(e instanceof Qa)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function YX(e){if(e instanceof Ac)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var WX=e=>e instanceof Ac||e instanceof lf||e instanceof Cc,as
vendor: 57,629 bytes, line 2309
2309={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},
vendor: 2,083 bytes, line 2309
2309Sh={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},D8={Ã
:"A",Ã:"D",Ã:"o",Ã¥:"a",ð:"d",þ:"o",Ð:"A",Ð:"B",Ð:"B",Ð:"F",Ð:"A",Ð:"E",Ð:"K",Ð:"3",Ð:"N",Ð:"N",Ð:"K",Ð:"N",Ð:"M",Ð:"H",Ð:"O",Ð:"N",Ð :"P",С:"C",Т:"T",У:"y",Ф:"O",Ð¥:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Ð:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",Ñ:"p",Ñ:"c",Ñ:"o",Ñ:"y",Ñ:"b",Ñ
:"x",Ñ:"n",Ñ:"n",Ñ:"w",Ñ:"w",Ñ:"a",Ñ:"m",Ñ:"a",Ñ:"e",Ñ:"m",Ñ:"r"};function XX(e,t){as[e]=t}function s2(e,t,n){if(!as[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),s=as[t][a];if(!s&&e[0]in D8&&(a=D8[e[0]].charCodeAt(0),s=as[t][a]),!s&&n==="text"&&Hk(a)&&(s=as[t][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var C1={};function KX(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!C1[t]){var n=C1[t]={cssEmPerMu:Sh.quad[t]/18};for(var a in Sh)Sh.hasOwnProperty(a)&&(n[a]=Sh[a][t])}return C1[t]}var Qt={math:{},text:{}};function S(e,t,n,a,s,o){Qt[e][s]={font:t,group:n,replace:a},o&&a&&(Qt[e][a]=Qt[e][s])}var C="math",ye="text",z="main",q="ams",Jt="accent-token",_e="bin",ya="close",Ec="inner",Ye="mathord",Mn="op-token",Za="open",q0="punct",$="rel",Xs="spacing",K="textord";S(C,z,$,"â¡","\\equiv",!0);
2309S(C,z,$,"âº","\\prec",!0);S(C,z,$,"â»","\\succ",!0);S(C,z,$,"â¼","\\sim",!0);S(C,z,$,"â¥","\\perp");S(C,z,$,"⪯","\\preceq",!0);S(C,z,$,"⪰","\\succeq",!0);S(C,z,$,"â","\\simeq",!0);S(C,z,$,"â£","\\mid",!0);S(C,z,$,"âª","\\ll",!0);S(C,z,$,"â«","\\gg",!0);S(C,z,$,"â","\\asymp",!0);S(C,z,$,"â¥","\\parallel");S(C,z,$,"â","\\bowtie",!0);S(C,z,$,"â£","\\smile",!0);S(C,z,$,"â","\\sqsubseteq",!0);S(C,z,$,"â","\\sqsupseteq",!0);S(C,z,$,"â","\\doteq",!0);S(C,z,$,"â¢","\\frown",!0);S(C,z,$,"â","\\ni",!0);S(C,z,$,"â","\\propto",!0);S(C,z,$,"â¢","\\vdash",!0);S(C,z,$,"â£","\\dashv",!0);S(C,z,$,"â","\\owns");S(C,z,q0,".","\\ldotp");S(C,z,q0,"â
","\\cdotp");S(C,z,q0,"â
","·");S(ye,z,K,"â
","·");S(C,z,K,"#","\\#");S(ye,z,K,"#","\\#");S(C,z,K,"&","\\&");S(ye,z,K,"&","\\&");S(C,z,K,"âµ","\\aleph",!0);S(C,z,K,"â","\\forall",!0);S(C,z,K,"â","\\hbar",!0);S(C,z,K,"â","\\exists",!0);S(C,z,K,"â","\\nabla",!0);S(C,z,K,"â","\\flat",!0);S(C,z,K,"â","\\ell",!0);S(C,z,K,"â®","\\natural",!0);S(C,z,K,"â£","\\clubsuit",!0);S(C,z,K,"â","\\wp",!0);S(C,z,K,"â¯","\\sharp",!0);S(C,z,K,"â¢","\\diamondsuit",!0);S(C,z,K,"â","\\Re",!0);S(C,z,K,"â¡","\\heartsuit",!0);S(C,z,K,"â","\\Im",!0);S(C,z,K,"â ","\\spadesuit",!0);S(C,z,K,"§","\\S",!0);S(ye,z,K,"§","\\S");S(C,z,K,"¶","\\P",!0);S(ye,z,K,"¶","\\P");S(C,z,K,"â ","\\dag");S(ye,z,K,"â ","\\dag");S(ye,z,K,"â ","\\textdagger");S(C,z,K,"â¡","\\ddag");S(ye,z,K,"â¡","\\ddag");S(ye,z,K,"â¡","\\textdaggerdbl");S(C,z,ya,"â±","\\rmoustache",!0);S(C,z,Za,"â°","\\lmoustache",!0);S(C,z,ya,"â¯","\\rgroup",!0);S(C,z,Za,"â®","\\lgroup",!0);S(C,z,_e,"â","\\mp",!0);S(C,z,_e,"â","\\ominus",!0);S(C,z,_e,"â","\\uplus",!0);S(C,z,_e,"â","\\sqcap",!0);S(C,z,_e,"â","\\ast");S(C,z,_e,"â","\\sqcup",!0);S(C,z,_e,"â¯","\\bigcirc",!0);S(C,z,_e,"â","\\bullet",!0);S(C,z,_e,"â¡","\\ddagger");S(C,z,_e,"â","\\wr",!0);S(C,z,_e,"⨿","\\amalg");S(C,z,_e,"&","\\And");S(C,z,$,"âµ","\\longleftarrow",!0);S(C,z,$,"â","\\Leftarrow",!0);S(C,z,$,"â¸","\\Longleftarrow",!0);S(C,z,$,"â¶","\\longrightarrow",!0);S(C,z,$,"â","\\Rightarrow",!0);S(C,z,$,"â¹","\\Longrightarrow",!0);S(C,z,$,"â","\\leftrightarrow",!0);S(C,z,$,"â·","\\longleftrightarrow",!0);S(C,z,$,"â","\\Leftrightarrow",!0);S(C,z,$,"âº","\\Longleftrightarrow",!0);S(C,z,$,"â¦","\\mapsto",!0);S(C,z,$,"â¼","\\longmapsto",!0);S(C,z,$,"â","\\nearrow",!0);S(C,z,$,"â©","\\hookleftarrow",!0);S(C,z,$,"âª","\\hookrightarrow",!0);S(C,z,$,"â","\\searrow",!0);S(C,z,$,"â¼","\\leftharpoonup",!0);S(C,z,$,"â","\\rightharpoonup",!0);S(C,z,$,"â","\\swarrow",!0);S(C,z,$,"â½","\\leftharpoondown",!0);S(C,z,$,"â","\\rightharpoondown",!0);S(C,z,$,"â","\\nwarrow",!0);S(C,z,$,"â","\\rightleftharpoons",!0);S(C,q,$,"â®","\\nless",!0);S(C,q,$,"î","\\@nleqslant");S(C,q,$,"î","\\@nleqq");S(C,q,$,"âª","\\lneq",!0);S(C,q,$,"â¨","\\lneqq",!0);S(C,q,$,"î","\\@lvertneqq");S(C,q,$,"â¦","\\lnsim",!0);S(C,q,$,"âª","\\lnapprox",!0);S(C,q,$,"â","\\nprec",!0);S(C,q,$,"â ","\\npreceq",!0);S(C,q,$,"â¨","\\precnsim",!0);S(C,q,$,"⪹","\\precnapprox",!0);S(C,q,$,"â","\\nsim",!0);S(C,q,$,"î","\\@nshortmid");S(C,q,$,"â¤","\\nmid",!0);S(C,q,$,"â¬","\\nvdash",!0);S(C,q,$,"â","\\nvDash",!0);S(C,q,$,"âª","\\ntriangleleft");S(C,q,$,"â¬","\\ntrianglelefteq",!0);S(C,q,$,"â","\\subsetneq",!0);S(C,q,$,"î","\\@varsubsetneq");S(C,q,$,"â«","\\subsetneqq",!0);S(C,q,$,"î","\\@varsubsetneqq");S(C,q,$,"â¯","\\ngtr",!0);S(C,q,$,"î","\\@ngeqslant");S(C,q,$,"î","\\@ngeqq");S(C,q,$,"âª","\\gneq",!0);S(C,q,$,"â©","\\gneqq",!0);S(C,q,$,"î","\\@gvertneqq");S(C,q,$,"â§","\\gnsim",!0);S(C,q,$,"âª","\\gnapprox",!0);S(C,q,$,"â","\\nsucc",!0);S(C,q,$,"â¡","\\nsucceq",!0);S(C,q,$,"â©","\\succnsim",!0);S(C,q,$,"⪺","\\succnapprox",!0);S(C,q,$,"â","\\ncong",!0);S(C,q,$,"î","\\@nshortparallel");S(C,q,$,"â¦","\\nparallel",!0);S(C,q,$,"â¯","\\nVDash",!0);S(C,q,$,"â«","\\ntriangleright");S(C,q,$,"â","\\ntrianglerighteq",!0);S(C,q,$,"î","\\@nsupseteqq");S(C,q,$,"â","\\supsetneq",!0);S(C,q,$,"î","\\@varsupsetneq");S(C,q,$,"â«","\\supsetneqq",!0);S(C,q,$,"î","\\@varsupsetneqq");S(C,q,$,"â®","\\nVdash",!0);S(C,q,$,"⪵","\\precneqq",!0);S(C,q,$,"⪶","\\succneqq",!0);
2309S(C,q,$,"î","\\@nsubseteqq");S(C,q,_e,"â´","\\unlhd");S(C,q,_e,"âµ","\\unrhd");S(C,q,$,"â","\\nleftarrow",!0);S(C,q,$,"â","\\nrightarrow",!0);S(C,q,$,"â","\\nLeftarrow",!0);S(C,q,$,"â","\\nRightarrow",!0);S(C,q,$,"â®","\\nleftrightarrow",!0);S(C,q,$,"â","\\nLeftrightarrow",!0);S(C,q,$,"â³","\\vartriangle");S(C,q,K,"â","\\hslash");S(C,q,K,"â½","\\triangledown");S(C,q,K,"â","\\lozenge");S(C,q,K,"â","\\circledS");S(C,q,K,"®","\\circledR");S(ye,q,K,"®","\\circledR");S(C,q,K,"â¡","\\measuredangle",!0);S(C,q,K,"â","\\nexists");S(C,q,K,"â§","\\mho");S(C,q,K,"â²","\\Finv",!0);S(C,q,K,"â
","\\Game",!0);S(C,q,K,"âµ","\\backprime");S(C,q,K,"â²","\\blacktriangle");S(C,q,K,"â¼","\\blacktriangledown");S(C,q,K,"â ","\\blacksquare");S(C,q,K,"â§«","\\blacklozenge");S(C,q,K,"â
","\\bigstar");S(C,q,K,"â¢","\\sphericalangle",!0);S(C,q,K,"â","\\complement",!0);S(C,q,K,"ð","\\eth",!0);S(ye,z,K,"ð","ð");S(C,q,K,"â±","\\diagup");S(C,q,K,"â²","\\diagdown");S(C,q,K,"â¡","\\square");S(C,q,K,"â¡","\\Box");S(C,q,K,"â","\\Diamond");S(C,q,K,"Â¥","\\yen",!0);S(ye,q,K,"Â¥","\\yen",!0);S(C,q,K,"â","\\checkmark",!0);S(ye,q,K,"â","\\checkmark");S(C,q,K,"â¶","\\beth",!0);S(C,q,K,"â¸","\\daleth",!0);S(C,q,K,"â·","\\gimel",!0);S(C,q,K,"Ï","\\digamma",!0);S(C,q,K,"ϰ","\\varkappa");S(C,q,Za,"â","\\@ulcorner",!0);
2309S(C,q,ya,"â","\\@urcorner",!0);S(C,q,Za,"â","\\@llcorner",!0);S(C,q,ya,"â","\\@lrcorner",!0);S(C,q,$,"â¦","\\leqq",!0);S(C,q,$,"⩽","\\leqslant",!0);S(C,q,$,"âª","\\eqslantless",!0);S(C,q,$,"â²","\\lesssim",!0);S(C,q,$,"âª
","\\lessapprox",!0);S(C,q,$,"â","\\approxeq",!0);S(C,q,_e,"â","\\lessdot");S(C,q,$,"â","\\lll",!0);S(C,q,$,"â¶","\\lessgtr",!0);S(C,q,$,"â","\\lesseqgtr",!0);S(C,q,$,"âª","\\lesseqqgtr",!0);S(C,q,$,"â","\\doteqdot");S(C,q,$,"â","\\risingdotseq",!0);S(C,q,$,"â","\\fallingdotseq",!0);S(C,q,$,"â½","\\backsim",!0);S(C,q,$,"â","\\backsimeq",!0);S(C,q,$,"â«
","\\subseteqq",!0);S(C,q,$,"â","\\Subset",!0);S(C,q,$,"â","\\sqsubset",!0);S(C,q,$,"â¼","\\preccurlyeq",!0);S(C,q,$,"â","\\curlyeqprec",!0);S(C,q,$,"â¾","\\precsim",!0);S(C,q,$,"⪷","\\precapprox",!0);S(C,q,$,"â²","\\vartriangleleft");S(C,q,$,"â´","\\trianglelefteq");S(C,q,$,"â¨","\\vDash",!0);S(C,q,$,"âª","\\Vvdash",!0);S(C,q,$,"â£","\\smallsmile");S(C,q,$,"â¢","\\smallfrown");S(C,q,$,"â","\\bumpeq",!0);S(C,q,$,"â","\\Bumpeq",!0);S(C,q,$,"â§","\\geqq",!0);S(C,q,$,"⩾","\\geqslant",!0);S(C,q,$,"âª","\\eqslantgtr",!0);S(C,q,$,"â³","\\gtrsim",!0);S(C,q,$,"âª","\\gtrapprox",!0);S(C,q,_e,"â","\\gtrdot");S(C,q,$,"â","\\ggg",!0);S(C,q,$,"â·","\\gtrless",!0);S(C,q,$,"â","\\gtreqless",!0);S(C,q,$,"âª","\\gtreqqless",!0);S(C,q,$,"â","\\eqcirc",!0);S(C,q,$,"â","\\circeq",!0);S(C,q,$,"â","\\triangleq",!0);S(C,q,$,"â¼","\\thicksim");S(C,q,$,"â","\\thickapprox");S(C,q,$,"â«","\\supseteqq",!0);S(C,q,$,"â","\\Supset",!0);S(C,q,$,"â","\\sqsupset",!0);S(C,q,$,"â½","\\succcurlyeq",!0);S(C,q,$,"â","\\curlyeqsucc",!0);S(C,q,$,"â¿","\\succsim",!0);S(C,q,$,"⪸","\\succapprox",!0);S(C,q,$,"â³","\\vartriangleright");S(C,q,$,"âµ","\\trianglerighteq");S(C,q,$,"â©","\\Vdash",!0);S(C,q,$,"â£","\\shortmid");S(C,q,$,"â¥","\\shortparallel");S(C,q,$,"â¬","\\between",!0);S(C,q,$,"â","\\pitchfork",!0);S(C,q,$,"â","\\varpropto");S(C,q,$,"â","\\blacktriangleleft");S(C,q,$,"â´","\\therefore",!0);S(C,q,$,"â","\\backepsilon");S(C,q,$,"â¶","\\blacktriangleright");S(C,q,$,"âµ","\\because",!0);S(C,q,$,"â","\\llless");S(C,q,$,"â","\\gggtr");S(C,q,_e,"â²","\\lhd");S(C,q,_e,"â³","\\rhd");S(C,q,$,"â","\\eqsim",!0);S(C,z,$,"â","\\Join");S(C,q,$,"â","\\Doteq",!0);S(C,q,_e,"â","\\dotplus",!0);S(C,q,_e,"â","\\smallsetminus");S(C,q,_e,"â","\\Cap",!0);S(C,q,_e,"â","\\Cup",!0);S(C,q,_e,"â©","\\doublebarwedge",!0);S(C,q,_e,"â","\\boxminus",!0);S(C,q,_e,"â","\\boxplus",!0);S(C,q,_e,"â","\\divideontimes",!0);S(C,q,_e,"â","\\ltimes",!0);S(C,q,_e,"â","\\rtimes",!0);S(C,q,_e,"â","\\leftthreetimes",!0);S(C,q,_e,"â","\\rightthreetimes",!0);S(C,q,_e,"â","\\curlywedge",!0);S(C,q,_e,"â","\\curlyvee",!0);S(C,q,_e,"â","\\circleddash",!0);S(C,q,_e,"â","\\circledast",!0);S(C,q,_e,"â
","\\centerdot");S(C,q,_e,"âº","\\intercal",!0);S(C,q,_e,"â","\\doublecap");S(C,q,_e,"â","\\doublecup");S(C,q,_e,"â ","\\boxtimes",!0);S(C,q,$,"â¢","\\dashrightarrow",!0);S(C,q,$,"â ","\\dashleftarrow",!0);S(C,q,$,"â","\\leftleftarrows",!0);S(C,q,$,"â","\\leftrightarrows",!0);S(C,q,$,"â","\\Lleftarrow",!0);S(C,q,$,"â","\\twoheadleftarrow",!0);S(C,q,$,"â¢","\\leftarrowtail",!0);S(C,q,$,"â«","\\looparrowleft",!0);S(C,q,$,"â","\\leftrightharpoons",!0);S(C,q,$,"â¶","\\curvearrowleft",!0);S(C,q,$,"âº","\\circlearrowleft",!0);S(C,q,$,"â°","\\Lsh",!0);S(C,q,$,"â","\\upuparrows",!0);S(C,q,$,"â¿","\\upharpoonleft",!0);S(C,q,$,"â","\\downharpoonleft",!0);S(C,z,$,"â¶","\\origof",!0);S(C,z,$,"â·","\\imageof",!0);S(C,q,$,"â¸","\\multimap",!0);S(C,q,$,"â","\\leftrightsquigarrow",!0);S(C,q,$,"â","\\rightrightarrows",!0);S(C,q,$,"â","\\rightleftarrows",!0);S(C,q,$,"â ","\\twoheadrightarrow",!0);S(C,q,$,"â£","\\rightarrowtail",!0);S(C,q,$,"â¬","\\looparrowright",!0);S(C,q,$,"â·","\\curvearrowright",!0);S(C,q,$,"â»","\\circlearrowright",!0);S(C,q,$,"â±","\\Rsh",!0);S(C,q,$,"â","\\downdownarrows",!0);S(C,q,$,"â¾","\\upharpoonright",!0);S(C,q,$,"â","\\downharpoonright",!0);S(C,q,$,"â","\\rightsquigarrow",!0);S(C,q,$,"â","\\leadsto");S(C,q,$,"â","\\Rrightarrow",!0);S(C,q,$,"â¾","\\restriction");S(C,z,K,"â","`");S(C,z,K,"$","\\$");S(ye,z,K,"$","\\$");S(ye,z,K,"$","\\textdollar");S(C,z,K,"%","\\%");S(ye,z,K,"%","\\%");S(C,z,K,"_","\\_");S(ye,z,K,"_","\\_");S(ye,z,K,"_","\\textunderscore");S(C,z,K,"â ","\\angle",!0);S(C,z,K,"â","\\infty",!0);S(C,z,K,"â²","\\prime");S(C,z,K,"â³","\\triangle");S(C,z,K,"Î","\\Gamma",!0);S(C,z,K,"Î","\\Delta",!0);S(C,z,K,"Î","\\Theta",!0);S(C,z,K,"Î","\\Lambda",!0);S(C,z,K,"Î","\\Xi",!0);S(C,z,K,"Î ","\\Pi",!0);S(C,z,K,"Σ","\\Sigma",!0);S(C,z,K,"Î¥","\\Upsilon",!0);S(C,z,K,"Φ","\\Phi",!0);S(C,z,K,"Ψ","\\Psi",!0);S(C,z,K,"Ω","\\Omega",!0);S(C,z,K,"A","Î");S(C,z,K,"B","Î");S(C,z,K,"E","Î");S(C,z,K,"Z","Î");S(C,z,K,"H","Î");S(C,z,K,"I","Î");S(C,z,K,"K","Î");S(C,z,K,"M","Î");S(C,z,K,"N","Î");S(C,z,K,"O","Î");S(C,z,K,"P","Ρ");S(C,z,K,"T","Τ");S(C,z,K,"X","Χ");S(C,z,K,"¬","\\neg",!0);S(C,z,K,"¬","\\lnot");S(C,z,K,"â¤","\\top");S(C,z,K,"â¥","\\bot");S(C,z,K,"â
","\\emptyset");S(C,q,K,"â
","\\varnothing");S(C,z,Ye,"α","\\alpha",!0);S(C,z,Ye,"β","\\beta",!0);S(C,z,Ye,"γ","\\gamma",!0);S(C,z,Ye,"δ","\\delta",!0);S(C,z,Ye,"ϵ","\\epsilon",!0);S(C,z,Ye,"ζ","\\zeta",!0);S(C,z,Ye,"η","\\eta",!0);S(C,z,Ye,"θ","\\theta",!0);S(C,z,Ye,"ι","\\iota",!0);S(C,z,Ye,"κ","\\kappa",!0);S(C,z,Ye,"λ","\\lambda",!0);S(C,z,Ye,"μ","\\mu",!0);S(C,z,Ye,"ν","\\nu",!0);
2309S(C,z,Ye,"ξ","\\xi",!0);S(C,z,Ye,"ο","\\omicron",!0);S(C,z,Ye,"Ï","\\pi",!0);S(C,z,Ye,"Ï","\\rho",!0);S(C,z,Ye,"Ï","\\sigma",!0);S(C,z,Ye,"Ï","\\tau",!0);S(C,z,Ye,"Ï
","\\upsilon",!0);S(C,z,Ye,"Ï","\\phi",!0);S(C,z,Ye,"Ï","\\chi",!0);S(C,z,Ye,"Ï","\\psi",!0);S(C,z,Ye,"Ï","\\omega",!0);S(C,z,Ye,"ε","\\varepsilon",!0);S(C,z,Ye,"Ï","\\vartheta",!0);S(C,z,Ye,"Ï","\\varpi",!0);S(C,z,Ye,"ϱ","\\varrho",!0);S(C,z,Ye,"Ï","\\varsigma",!0);S(C,z,Ye,"Ï","\\varphi",!0);S(C,z,_e,"â","*",!0);S(C,z,_e,"+","+");S(C,z,_e,"â","-",!0);S(C,z,_e,"â
","\\cdot",!0);S(C,z,_e,"â","\\circ",!0);S(C,z,_e,"÷","\\div",!0);S(C,z,_e,"±","\\pm",!0);S(C,z,_e,"Ã","\\times",!0);S(C,z,_e,"â©","\\cap",!0);S(C,z,_e,"âª","\\cup",!0);S(C,z,_e,"â","\\setminus",!0);S(C,z,_e,"â§","\\land");S(C,z,_e,"â¨","\\lor");S(C,z,_e,"â§","\\wedge",!0);S(C,z,_e,"â¨","\\vee",!0);S(C,z,K,"â","\\surd");S(C,z,Za,"â¨","\\langle",!0);S(C,z,Za,"â£","\\lvert");S(C,z,Za,"â¥","\\lVert");S(C,z,ya,"?","?");S(C,z,ya,"!","!");S(C,z,ya,"â©","\\rangle",!0);S(C,z,ya,"â£","\\rvert");S(C,z,ya,"â¥","\\rVert");S(C,z,$,"=","=");S(C,z,$,":",":");S(C,z,$,"â","\\approx",!0);S(C,z,$,"â
","\\cong",!0);S(C,z,$,"â¥","\\ge");S(C,z,$,"â¥","\\geq",!0);S(C,z,$,"â","\\gets");S(C,z,$,">","\\gt",!0);S(C,z,$,"â","\\in",!0);S(C,z,$,"î ","\\@not");S(C,z,$,"â","\\subset",!0);S(C,z,$,"â","\\supset",!0);S(C,z,$,"â","\\subseteq",!0);S(C,z,$,"â","\\supseteq",!0);S(C,q,$,"â","\\nsubseteq",!0);S(C,q,$,"â","\\nsupseteq",!0);S(C,z,$,"â¨","\\models");S(C,z,$,"â","\\leftarrow",!0);S(C,z,$,"â¤","\\le");S(C,z,$,"â¤","\\leq",!0);S(C,z,$,"<","\\lt",!0);S(C,z,$,"â","\\rightarrow",!0);S(C,z,$,"â","\\to");S(C,q,$,"â±","\\ngeq",!0);S(C,q,$,"â°","\\nleq",!0);S(C,z,Xs," ","\\ ");S(C,z,Xs," ","\\space");S(C,z,Xs," ","\\nobreakspace");S(ye,z,Xs," ","\\ ");S(ye,z,Xs," "," ");S(ye,z,Xs," ","\\space");S(ye,z,Xs," ","\\nobreakspace");S(C,z,Xs,"","\\nobreak");S(C,z,Xs,"","\\allowbreak");S(C,z,q0,",",",");S(C,z,q0,";",";");S(C,q,_e,"â¼","\\barwedge",!0);S(C,q,_e,"â»","\\veebar",!0);S(C,z,_e,"â","\\odot",!0);S(C,z,_e,"â","\\oplus",!0);S(C,z,_e,"â","\\otimes",!0);S(C,z,K,"â","\\partial",!0);S(C,z,_e,"â","\\oslash",!0);S(C,q,_e,"â","\\circledcirc",!0);S(C,q,_e,"â¡","\\boxdot",!0);
2309S(C,z,_e,"â³","\\bigtriangleup");S(C,z,_e,"â½","\\bigtriangledown");S(C,z,_e,"â ","\\dagger");S(C,z,_e,"â","\\diamond");S(C,z,_e,"â","\\star");S(C,z,_e,"â","\\triangleleft");S(C,z,_e,"â¹","\\triangleright");S(C,z,Za,"{","\\{");S(ye,z,K,"{","\\{");S(ye,z,K,"{","\\textbraceleft");S(C,z,ya,"}","\\}");S(ye,z,K,"}","\\}");S(ye,z,K,"}","\\textbraceright");S(C,z,Za,"{","\\lbrace");S(C,z,ya,"}","\\rbrace");S(C,z,Za,"[","\\lbrack",!0);S(ye,z,K,"[","\\lbrack",!0);S(C,z,ya,"]","\\rbrack",!0);S(ye,z,K,"]","\\rbrack",!0);S(C,z,Za,"(","\\lparen",!0);S(C,z,ya,")","\\rparen",!0);S(ye,z,K,"<","\\textless",!0);S(ye,z,K,">","\\textgreater",!0);S(C,z,Za,"â","\\lfloor",!0);S(C,z,ya,"â","\\rfloor",!0);S(C,z,Za,"â","\\lceil",!0);S(C,z,ya,"â","\\rceil",!0);S(C,z,K,"\\","\\backslash");S(C,z,K,"â£","|");S(C,z,K,"â£","\\vert");S(ye,z,K,"|","\\textbar",!0);S(C,z,K,"â¥","\\|");S(C,z,K,"â¥","\\Vert");S(ye,z,K,"â¥","\\textbardbl");S(ye,z,K,"~","\\textasciitilde");S(ye,z,K,"\\","\\textbackslash");S(ye,z,K,"^","\\textasciicircum");S(C,z,$,"â","\\uparrow",!0);S(C,z,$,"â","\\Uparrow",!0);S(C,z,$,"â","\\downarrow",!0);S(C,z,$,"â","\\Downarrow",!0);S(C,z,$,"â","\\updownarrow",!0);S(C,z,$,"â","\\Updownarrow",!0);S(C,z,Mn,"â","\\coprod");S(C,z,Mn,"â","\\bigvee");S(C,z,Mn,"â","\\bigwedge");S(C,z,Mn,"â¨","\\biguplus");S(C,z,Mn,"â","\\bigcap");S(C,z,Mn,"â","\\bigcup");S(C,z,Mn,"â«","\\int");S(C,z,Mn,"â«","\\intop");S(C,z,Mn,"â¬","\\iint");S(C,z,Mn,"â","\\iiint");S(C,z,Mn,"â","\\prod");S(C,z,Mn,"â","\\sum");S(C,z,Mn,"â¨","\\bigotimes");S(C,z,Mn,"â¨","\\bigoplus");S(C,z,Mn,"â¨","\\bigodot");S(C,z,Mn,"â®","\\oint");S(C,z,Mn,"â¯","\\oiint");S(C,z,Mn,"â°","\\oiiint");S(C,z,Mn,"â¨","\\bigsqcup");S(C,z,Mn,"â«","\\smallint");S(ye,z,Ec,"â¦","\\textellipsis");S(C,z,Ec,"â¦","\\mathellipsis");S(ye,z,Ec,"â¦","\\ldots",!0);S(C,z,Ec,"â¦","\\ldots",!0);S(C,z,Ec,"â¯","\\@cdots",!0);S(C,z,Ec,"â±","\\ddots",!0);S(C,z,K,"â®","\\varvdots");S(ye,z,K,"â®","\\varvdots");S(C,z,Jt,"Ë","\\acute");S(C,z,Jt,"Ë","\\grave");S(C,z,Jt,"¨","\\ddot");S(C,z,Jt,"~","\\tilde");S(C,z,Jt,"Ë","\\bar");S(C,z,Jt,"Ë","\\breve");S(C,z,Jt,"Ë","\\check");S(C,z,Jt,"^","\\hat");S(C,z,Jt,"â","\\vec");S(C,z,Jt,"Ë","\\dot");S(C,z,Jt,"Ë","\\mathring");S(C,z,Ye,"î±","\\@imath");S(C,z,Ye,"î·","\\@jmath");S(C,z,K,"ı","ı");S(C,z,K,"È·","È·");S(ye,z,K,"ı","\\i",!0);S(ye,z,K,"È·","\\j",!0);S(ye,z,K,"Ã","\\ss",!0);S(ye,z,K,"æ","\\ae",!0);S(ye,z,K,"Å","\\oe",!0);S(ye,z,K,"ø","\\o",!0);S(ye,z,K,"Ã","\\AE",!0);S(ye,z,K,"Å","\\OE",!0);S(ye,z,K,"Ã","\\O",!0);S(ye,z,Jt,"Ë","\\'");S(ye,z,Jt,"Ë","\\`");S(ye,z,Jt,"Ë","\\^");S(ye,z,Jt,"Ë","\\~");S(ye,z,Jt,"Ë","\\=");S(ye,z,Jt,"Ë","\\u");S(ye,z,Jt,"Ë","\\.");S(ye,z,Jt,"¸","\\c");S(ye,z,Jt,"Ë","\\r");S(ye,z,Jt,"Ë","\\v");S(ye,z,Jt,"¨",'\\"');S(ye,z,Jt,"Ë","\\H");S(ye,z,Jt,"â¯","\\textcircled");var Xk={"--":!0,"---":!0,"``":!0,"''":!0};S(ye,z,K,"â","--",!0);S(ye,z,K,"â","\\textendash");S(ye,z,K,"â","---",!0);S(ye,z,K,"â","\\textemdash");S(ye,z,K,"â","`",!0);S(ye,z,K,"â","\\textquoteleft");S(ye,z,K,"â","'",!0);S(ye,z,K,"â","\\textquoteright");S(ye,z,K,"â","``",!0);S(ye,z,K,"â","\\textquotedblleft");S(ye,z,K,"â","''",!0);S(ye,z,K,"â","\\textquotedblright");S(C,z,K,"°","\\degree",!0);S(ye,z,K,"°","\\degree");
2309S(ye,z,K,"°","\\textdegree",!0);S(C,z,K,"£","\\pounds");S(C,z,K,"£","\\mathsterling",!0);S(ye,z,K,"£","\\pounds");S(ye,z,K,"£","\\textsterling",!0);S(C,q,K,"â ","\\maltese");S(ye,q,K,"â ","\\maltese");var B8='0123456789/@."';for(var A1=0;A1<B8.length;A1++){var R8=B8.charAt(A1);S(C,z,K,R8,R8)}var O8='0123456789!@*()-=+";:?/.,';for(var E1=0;E1<O8.length;E1++){var L8=O8.charAt(E1);S(ye,z,K,L8,L8)}var Im="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var T1=0;T1<Im.length;T1++){var Nh=Im.charAt(T1);S(C,z,Ye,Nh,Nh),S(ye,z,K,Nh,Nh)}S(C,q,K,"C","â");S(ye,q,K,"C","â");S(C,q,K,"H","â");S(ye,q,K,"H","â");S(C,q,K,"N","â");S(ye,q,K,"N","â");S(C,q,K,"P","â");S(ye,q,K,"P","â");S(C,q,K,"Q","â");S(ye,q,K,"Q","â");S(C,q,K,"R","â");S(ye,q,K,"R","â");S(C,q,K,"Z","â¤");S(ye,q,K,"Z","â¤");S(C,z,Ye,"h","â");S(ye,z,Ye,"h","â");var Xe;for(var ha=0;ha<Im.length;ha++){var sn=Im.charAt(ha);Xe=String.fromCharCode(55349,56320+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56372+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56424+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56580+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56684+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56736+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56788+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56840+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56944+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),ha<26&&(Xe=String.fromCharCode(55349,56632+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe),Xe=String.fromCharCode(55349,56476+ha),S(C,z,Ye,sn,Xe),S(ye,z,K,sn,Xe))}Xe="ð";S(C,z,Ye,"k",Xe);S(ye,z,K,"k",Xe);for(var Nl=0;Nl<10;Nl++){var Ai=Nl.toString();Xe=String.fromCharCode(55349,57294+Nl),S(C,z,Ye,Ai,Xe),S(ye,z,K,Ai,Xe),Xe=String.fromCharCode(55349,57314+Nl),S(C,z,Ye,Ai,Xe),S(ye,z,K,Ai,Xe),Xe=String.fromCharCode(55349,57324+Nl),S(C,z,Ye,Ai,Xe),S(ye,z,K,Ai,Xe),Xe=String.fromCharCode(55349,57334+Nl),S(C,z,Ye,Ai,Xe),S(ye,z,K,Ai,Xe)}var ob="ÃÃþ";for(var M1=0;M1<ob.length;M1++){var jh=ob.charAt(M1);S(C,z,Ye,jh,jh),S(ye,z,K,jh,jh)}var cb={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},P8={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},U8={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},QX={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Ml={mathClass:"",textClass:"",font:""},F8={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},V8={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},q8={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},ub={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},db={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},H8={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},hb={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},$8=[cb,cb,P8,P8,U8,U8,QX,Ml,Ml,Ml,F8,F8,V8,V8,q8,q8,ub,ub,db,db,H8,H8,Ml,Ml,hb,hb],JX=[cb,Ml,ub,db,hb],ZX=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),a=(t-55296)*1024+(n-56320)+65536;if(119808<=a&&a<120484){var s=Math.floor((a-119808)/26);return $8[s]}else if(120782<=a&&a<=120831){var o=Math.floor((a-120782)/10);return JX[o]}else{if(a===120485||a===120486)return $8[0];if(120486<a&&a<120782)return Ml;throw new Se("Unsupported character: "+e)}},of=function(t,n,a){if(Qt[a][t]){var s=Qt[a][t].replace;s&&(t=s)}return{value:t,metrics:s2(t,n,a)}},fa=function(t,n,a,s,o){var c=of(t,n,a),d=c.metrics;t=c.value;var h;if(d){var f=d.italic;(a==="text"||s&&s.font==="mathit")&&(f=0),h=new Qa(t,d.height,d.depth,f,d.skew,d.width,o)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+n+"' and mode '"+a+"'")),h=new Qa(t,0,0,0,0,0,o);if(s){h.maxFontSize=s.sizeMultiplier,s.style.isTight()&&h.classes.push("mtight");var p=s.getColor();p&&(h.style.color=p)}return h},i2=function(t,n,a,s){return s===void 0&&(s=[]),a.font==="boldsymbol"&&of(t,"Main-Bold",n).metrics?fa(t,"Main-Bold",n,a,s.c
vendor: 5,530 bytes, line 2309
2309oncat(["mathbf"])):t==="\\"||Qt[n][t].font==="main"?fa(t,"Main-Regular",n,a,s):fa(t,"AMS-Regular",n,a,s.concat(["amsrm"]))},eK=function(t,n,a){return a!=="textord"&&of(t,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},cf=function(t,n,a){var s=t.mode,o=t.text,c=["mord"],{font:d,fontFamily:h,fontWeight:f,fontShape:p}=n,x=s==="math"||s==="text"&&!!d,b=x?d:h,v="",N="";if(o.charCodeAt(0)===55349){var j=ZX(o);v=j.font,N=j[s+"Class"]}if(v)return fa(o,v,s,n,c.concat(N));if(b){var T,E;if(b==="boldsymbol"){var D=eK(o,s,a);T=D.fontName,E=[D.fontClass]}else x?(T=mb[d].fontName,E=[d]):(T=kh(h,f,p),E=[h,f,p]);if(of(o,T,s).metrics)return fa(o,T,s,n,c.concat(E));if(Xk.hasOwnProperty(o)&&T.slice(0,10)==="Typewriter"){for(var k=[],M=0;M<o.length;M++)k.push(fa(o[M],T,s,n,c.concat(E)));return Ks(k)}}if(a==="mathord")return fa(o,"Math-Italic",s,n,c.concat(["mathnormal"]));if(a==="textord"){var B=Qt[s][o]&&Qt[s][o].font;if(B==="ams"){var _=kh("amsrm",f,p);return fa(o,_,s,n,c.concat("amsrm",f,p))}else if(B==="main"||!B){var U=kh("textrm",f,p);return fa(o,U,s,n,c.concat(f,p))}else{var F=kh(B,f,p);return fa(o,F,s,n,c.concat(F,f,p))}}else throw new Error("unexpected type: "+a+" in makeOrd")},tK=(e,t)=>{if($i(e.classes)!==$i(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var s of Object.keys(t.style))if(e.style[s]!==t.style[s])return!1;return!0},Kk=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],a=e[t+1];n instanceof Qa&&a instanceof Qa&&tK(n,a)&&(n.text+=a.text,n.height=Math.max(n.height,a.height),n.depth=Math.max(n.depth,a.depth),n.italic=a.italic,e.splice(t+1,1),t--)}return e},l2=function(t){for(var n=0,a=0,s=0,o=0;o<t.children.length;o++){var c=t.children[o];c.height>n&&(n=c.height),c.depth>a&&(a=c.depth),c.maxFontSize>s&&(s=c.maxFontSize)}t.height=n,t.depth=a,t.maxFontSize=s},ve=function(t,n,a,s){var o=new Ac(t,n,a,s);return l2(o),o},Yi=(e,t,n,a)=>new Ac(e,t,n,a),hc=function(t,n,a){var s=ve([t],[],n);return s.height=Math.max(a||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),s.style.borderBottomWidth=ke(s.height),s.maxFontSize=1,s},nK=function(t,n,a,s){var o=new lf(t,n,a,s);return l2(o),o},Ks=function(t){var n=new Cc(t);return l2(n),n},mc=function(t,n){return t instanceof Cc?ve([],[t],n):t},aK=function(t){if(t.positionType==="individualShift"){for(var n=t.children,a=[n[0]],s=-n[0].shift-n[0].elem.depth,o=s,c=1;c<n.length;c++){var d=-n[c].shift-o-n[c].elem.depth,h=d-(n[c-1].elem.height+n[c-1].elem.depth);o=o+d,a.push({type:"kern",size:h}),a.push(n[c])}return{children:a,depth:s}}var f;if(t.positionType==="top"){for(var p=t.positionData,x=0;x<t.children.length;x++){var b=t.children[x];p-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}f=p}else if(t.positionType==="bottom")f=-t.positionData;else{var v=t.children[0];if(v.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")f=-v.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")f=-v.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:f}},Nt=function(t,n){for(var{children:a,depth:s}=aK(t),o=0,c=0;c<a.length;c++){var d=a[c];if(d.type==="elem"){var h=d.elem;o=Math.max(o,h.maxFontSize,h.height)}}o+=2;var f=ve(["pstrut"],[]);f.style.height=ke(o);for(var p=[],x=s,b=s,v=s,N=0;N<a.length;N++){var j=a[N];if(j.type==="kern")v+=j.size;else{var T=j.elem,E=j.wrapperClasses||[],D=j.wrapperStyle||{},k=ve(E,[f,T],void 0,D);k.style.top=ke(-o-v-T.depth),j.marginLeft&&(k.style.marginLeft=j.marginLeft),j.marginRight&&(k.style.marginRight=j.marginRight),p.push(k),v+=T.height+T.depth}x=Math.min(x,v),b=Math.max(b,v)}var M=ve(["vlist"],p);M.style.height=ke(b);var B;if(x<0){var _=ve([],[]),U=ve(["vlist"],[_]);U.style.height=ke(-x);var F=ve(["vlist-s"],[new Qa("â")]);B=[ve(["vlist-r"],[M,F]),ve(["vlist-r"],[U])]}else B=[ve(["vlist-r"],[M])];var W=ve(["vlist-t"],B);return B.length===2&&W.classes.push("vlist-t2"),W.height=b,W.depth=-x,W},Qk=(e,t)=>{var n=ve(["mspace"],[],t),a=tn(e,t);return n.style.marginRight=ke(a),n},kh=(e,t,n)=>{var a,s;switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return t==="textbf"&&n==="textit"?s="BoldItalic":t==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",a+"-"+s},mb={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Jk={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Zk=function(t,n){var[a,s,o]=Jk[t],c=new Gi(a),d=new Ys([c],{width:ke(s),height:ke(o),style:"width:"+ke(s),viewB
vendor: 11,015 bytes, line 2309
2309ox:"0 0 "+1e3*s+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),h=Yi(["overlay"],[d],n);return h.height=o,h.style.height=ke(o),h.style.width=ke(s),h},en={number:3,unit:"mu"},jl={number:4,unit:"mu"},Rs={number:5,unit:"mu"},rK={mord:{mop:en,mbin:jl,mrel:Rs,minner:en},mop:{mord:en,mop:en,mrel:Rs,minner:en},mbin:{mord:jl,mop:jl,mopen:jl,minner:jl},mrel:{mord:Rs,mop:Rs,mopen:Rs,minner:Rs},mopen:{},mclose:{mop:en,mbin:jl,mrel:Rs,minner:en},mpunct:{mord:en,mop:en,mrel:Rs,mopen:en,mclose:en,mpunct:en,minner:en},minner:{mord:en,mop:en,mbin:jl,mrel:Rs,mopen:en,mpunct:en,minner:en}},sK={mord:{mop:en},mop:{mord:en,mop:en},mbin:{},mrel:{},mopen:{},mclose:{mop:en},mpunct:{},minner:{mop:en}},eC={},zm={},_m={};function Ie(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:s},h=0;h<n.length;++h)eC[n[h]]=d;t&&(o&&(zm[t]=o),c&&(_m[t]=c))}function Wl(e){var{type:t,htmlBuilder:n,mathmlBuilder:a}=e;Ie({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:a})}var Dm=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Cn=function(t){return t.type==="ordgroup"?t.body:[t]},iK=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),lK=new Set(["rightmost","mrel","mclose","mpunct"]),oK={display:Je.DISPLAY,text:Je.TEXT,script:Je.SCRIPT,scriptscript:Je.SCRIPTSCRIPT},cK={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Fn=function(t,n,a,s){s===void 0&&(s=[null,null]);for(var o=[],c=0;c<t.length;c++){var d=jt(t[c],n);if(d instanceof Cc){var h=d.children;o.push(...h)}else o.push(d)}if(Kk(o),!a)return o;var f=n;if(t.length===1){var p=t[0];p.type==="sizing"?f=n.havingSize(p.size):p.type==="styling"&&(f=n.havingStyle(oK[p.style]))}var x=ve([s[0]||"leftmost"],[],n),b=ve([s[1]||"rightmost"],[],n),v=a==="root";return fb(o,(N,j)=>{var T=j.classes[0],E=N.classes[0];T==="mbin"&&lK.has(E)?j.classes[0]="mord":E==="mbin"&&iK.has(T)&&(N.classes[0]="mord")},{node:x},b,v),fb(o,(N,j)=>{var T,E,D=xb(j),k=xb(N),M=D&&k?N.hasClass("mtight")?(T=sK[D])==null?void 0:T[k]:(E=rK[D])==null?void 0:E[k]:null;if(M)return Qk(M,f)},{node:x},b,v),o},fb=function(t,n,a,s,o){s&&t.push(s);for(var c=0;c<t.length;c++){var d=t[c],h=tC(d);if(h){fb(h.children,n,a,null,o);continue}var f=!d.hasClass("mspace");if(f){var p=n(d,a.node);p&&(a.insertAfter?a.insertAfter(p):(t.unshift(p),c++))}f?a.node=d:o&&d.hasClass("newline")&&(a.node=ve(["leftmost"])),a.insertAfter=(x=>b=>{t.splice(x+1,0,b),c++})(c)}s&&t.pop()},tC=function(t){return t instanceof Cc||t instanceof lf||t instanceof Ac&&t.hasClass("enclosing")?t:null},pb=function(t,n){var a=tC(t);if(a){var s=a.children;if(s.length){if(n==="right")return pb(s[s.length-1],"right");if(n==="left")return pb(s[0],"left")}}return t},xb=function(t,n){if(!t)return null;n&&(t=pb(t,n));var a=t.classes[0];return cK[a]||null},y0=function(t,n){var a=["nulldelimiter"].concat(t.baseSizingClasses());return ve(n.concat(a))},jt=function(t,n,a){if(!t)return ve();if(zm[t.type]){var s=zm[t.type](t,n);if(a&&n.size!==a.size){s=ve(n.sizingClasses(a),[s],n);var o=n.sizeMultiplier/a.sizeMultiplier;s.height*=o,s.depth*=o}return s}else throw new Se("Got group of unknown type: '"+t.type+"'")};function Ch(e,t){var n=ve(["base"],e,t),a=ve(["strut"]);return a.style.height=ke(n.height+n.depth),n.depth&&(a.style.verticalAlign=ke(-n.depth)),n.children.unshift(a),n}function gb(e,t){var n=null;e.length===1&&e[0].type==="tag"&&(n=e[0].tag,e=e[0].body);var a=Fn(e,t,"root"),s;a.length===2&&a[1].hasClass("tag")&&(s=a.pop());for(var o=[],c=[],d=0;d<a.length;d++)if(c.push(a[d]),a[d].hasClass("mbin")||a[d].hasClass("mrel")||a[d].hasClass("allowbreak")){for(var h=!1;d<a.length-1&&a[d+1].hasClass("mspace")&&!a[d+1].hasClass("newline");)d++,c.push(a[d]),a[d].hasClass("nobreak")&&(h=!0);h||(o.push(Ch(c,t)),c=[])}else a[d].hasClass("newline")&&(c.pop(),c.length>0&&(o.push(Ch(c,t)),c=[]),o.push(a[d]));c.length>0&&o.push(Ch(c,t));var f;n?(f=Ch(Fn(n,t,!0),t),f.classes=["tag"],o.push(f)):s&&o.push(s);var p=ve(["katex-html"],o);if(p.setAttribute("aria-hidden","true"),f){var x=f.children[0];x.style.height=ke(p.height+p.depth),p.depth&&(x.style.verticalAlign=ke(-p.depth))}return p}function nC(e){return new Cc(e)}class Ne{constructor(t,n,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=a||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=$i(this.classes));for(var a=0;a<this.children.length;a++)if(this.children[a]instanceof An&&this.children[a+1]instanceof An){for(var s=this.children[a].toText()+this.children[++a].toText();this.children[a+1]instanceof An;)s+=this.children[++a].toText();t.appendChild(new An(s).toNode())}else t.appendChild(this.children[a].toNode());return t}toMarkup(){var t="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(t+=" "+n+'="',t+=ia(this.attributes[n]),t+='"');this.classes.length>0&&(t+=' class ="'+ia($i(this.classes))+'"'),t+=">";for(var a=0;a<this.children.length;a++)t+=this.children[a].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class An{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return ia(this.toText())}toText(){return this.text}}class aC{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character="â":t>=.1666&&t<=.1667?this.character="â":t>=.2222&&t<=.2223?this.character="â
":t>=.2777&&t<=.2778?this.character="â
â":t>=-.05556&&t<=-.05555?this.character="ââ£":t>=-.1667&&t<=-.1666?this.character="ââ£":t>=-.2223&&t<=-.2222?this.character="ââ£":t>=-.2778&&t<=-.2777?this.character="â
â£":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",ke(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ke(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var uK=new Set(["\\imath","\\jmath"]),dK=new Set(["mrow","mtable"]),Nr=function(t,n,a){return Qt[n][t]&&Qt[n][t].replace&&t.charCodeAt(0)!==55349&&!(Xk.hasOwnProperty(t)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(t=Qt[n][t].replace),new An(t)},o2=function(t){return t.length===1?t[0]:new Ne("mrow",t)},hK={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},c2=(e,t)=>{if(e.mode==="text"){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold"}var n=t.font;if(!n||n==="mathnormal")return null;var a=e.mode,s=hK[n];if(s)return typeof s=="function"?s(e):s;var o=e.text;if(uK.has(o))return null;if(Qt[a][o]){var c=Qt[a][o].replace;c&&(o=c)}var d=mb[n].fontName;return s2(o,d,a)?mb[n].variant:null};function I1(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof An&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof An&&n.text===","}else return!1}var er=function(t,n,a){if(t.length===1){var s=Ut(t[0],n);return a&&s instanceof Ne&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var o=[],c,d=0;d<t.length;d++){var h=Ut(t[d],n);if(h instanceof Ne&&c instanceof Ne){if(h.type==="mtext"&&c.type==="mtext"&&h.getAttribute("mathvariant")===c.getAttribute("mathvariant")){c.children.push(...h.children);continue}else if(h.type==="mn"&&c.type==="mn"){c.children.push(...h.children);continue}else if(I1(h)&&c.type==="mn"){c.children.push(...h.children);continue}else if(h.type==="mn"&&I1(c))h.children=[...c.children,...h.children],o.pop();else if((h.type==="msup"||h.type==="msub")&&h.children.length>=1&&(c.type==="mn"||I1(c))){var f=h.children[0];f instanceof Ne&&f.type==="mn"&&(f.children=[...c.children,...f.children],o.pop())}else if(c.type==="mi"&&c.children.length===1){var p=c.children[0];if(p instanceof An&&p.text==="̸"&&(h.type==="mo"||h.type==="mi"||h.type==="mn")){var x=h.children[0];x instanceof An&&x.text.length>0&&(x.text=x.text.slice(0,1)+"̸"+x.text.slice(1),o.pop())}}}o.push(h),c=h}return o},Wi=function(t,n,a){return o2(er(t,n,a))},Ut=function(t,n){if(!t)return new Ne("mrow");if(_m[t.type])return _m[t.type](t,n);throw new Se("Got group of unknown type: '"+t.type+"'")};function G8(e,t,n,a,s){var o=er(e,n),c;o.length===1&&o[0]instanceof Ne&&dK.has(o[0].type)?c=o[0]:c=new Ne("mrow",o);var d=new Ne("annotation",[new An(t)]);d.setAttribute("encoding","application/x-tex");var h=new Ne("semantics",[c,d]),f=new Ne("math",[h]);f.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&f.setAttribute("display","block");var p=s?"katex":"katex-mathml";return ve([p],[f])}var mK=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Y8=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],W8=function(t,n){return n.size<2?t:mK[t-1][n.size-1]};class Os{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Os.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Y8[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,ph
vendor: 6,716 bytes, line 2309
2309antom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new Os(n)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:W8(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Y8[t-1]})}havingBaseStyle(t){t=t||this.style.text();var n=W8(Os.BASESIZE,t);return this.size===n&&this.textSize===Os.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Os.BASESIZE?["sizing","reset-size"+this.size,"size"+Os.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=KX(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Os.BASESIZE=6;var rC=function(t){return new Os({style:t.displayMode?Je.DISPLAY:Je.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},sC=function(t,n){if(n.displayMode){var a=["katex-display"];n.leqno&&a.push("leqno"),n.fleqn&&a.push("fleqn"),t=ve(a,[t])}return t},fK=function(t,n,a){var s=rC(a),o;if(a.output==="mathml")return G8(t,n,s,a.displayMode,!0);if(a.output==="html"){var c=gb(t,s);o=ve(["katex"],[c])}else{var d=G8(t,n,s,a.displayMode,!1),h=gb(t,s);o=ve(["katex"],[d,h])}return sC(o,a)},pK=function(t,n,a){var s=rC(a),o=gb(t,s),c=ve(["katex"],[o]);return sC(c,a)},xK={widehat:"^",widecheck:"Ë",widetilde:"~",utilde:"~",overleftarrow:"â",underleftarrow:"â",xleftarrow:"â",overrightarrow:"â",underrightarrow:"â",xrightarrow:"â",underbrace:"â",overbrace:"â",underbracket:"âµ",overbracket:"â´",overgroup:"â ",undergroup:"â¡",overleftrightarrow:"â",underleftrightarrow:"â",xleftrightarrow:"â",Overrightarrow:"â",xRightarrow:"â",overleftharpoon:"â¼",xleftharpoonup:"â¼",overrightharpoon:"â",xrightharpoonup:"â",xLeftarrow:"â",xLeftrightarrow:"â",xhookleftarrow:"â©",xhookrightarrow:"âª",xmapsto:"â¦",xrightharpoondown:"â",xleftharpoondown:"â½",xrightleftharpoons:"â",xleftrightharpoons:"â",xtwoheadleftarrow:"â",xtwoheadrightarrow:"â ",xlongequal:"=",xtofrom:"â",xrightleftarrows:"â",xrightequilibrium:"â",xleftequilibrium:"â","\\cdrightarrow":"â","\\cdleftarrow":"â","\\cdlongequal":"="},uf=function(t){var n=new Ne("mo",[new An(xK[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},gK={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},bK=new Set(["widehat","widecheck","widetilde","utilde"]),df=function(t,n){function a(){var d=4e5,h=t.label.slice(1);if(bK.has(h)&&"base"in t){var f=t.base.type==="ordgroup"?t.base.body.length:1,p,x,b;if(f>5)h==="widehat"||h==="widecheck"?(p=420,d=2364,b=.42,x=h+"4"):(p=312,d=2340,b=.34,x="tilde4");else{var v=[1,1,2,2,3,3][f];h==="widehat"||h==="widecheck"?(d=[0,1062,2364,2364,2364][v],p=[0,239,300,360,420][v],b=[0,.24,.3,.3,.36,.42][v],x=h+v):(d=[0,600,1033,2339,2340][v],p=[0,260,286,306,312][v],b=[0,.26,.286,.3,.306,.34][v],x="tilde"+v)}var N=new Gi(x),j=new Ys([N],{width:"100%",height:ke(b),viewBox:"0 0 "+d+" "+p,preserveAspectRatio:"none"});return{span:Yi([],[j],n),minWidth:0,height:b}}else{var T=[],E=gK[h];if(!E)throw new Error('No SVG data for "'+h+'".');var[D,k,M]=E,B=M/1e3,_=D.length,U,F;if(_===1){if(E.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+h+'".');U=["hide-tail"],F=[E[3]]}else if(_===2)U=["halfarrow-left","halfarrow-right"],F=["xMinYMin","xMaxYMin"];else if(_===3)U=["brace-left","brace-center","brace-right"],F=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to supp
2309ort 2310 `+_+" children.");for(var W=0;W<_;W++){var ae=new Gi(D[W]),le=new Ys([ae],{width:"400em",height:ke(B),viewBox:"0 0 "+d+" "+M,preserveAspectRatio:F[W]+" slice"}),re=Yi([U[W]],[le],n);if(_===1)return{span:re,minWidth:k,height:B};re.style.height=ke(B),T.push(re)}return{span:ve(["stretchy"],T,n),minWidth:k,height:B}}}var{span:s,minWidth:o,height:c}=a();return s.height=c,s.style.height=ke(c),o>0&&(s.style.minWidth=ke(o)),s},yK=function(t,n,a,s,o){var c,d=t.height+t.depth+a+s;if(/fbox|color|angl/.test(n)){if(c=ve(["stretchy",n],[],o),n==="fbox"){var h=o.color&&o.getColor();h&&(c.style.borderColor=h)}}else{var f=[];/^[bx]cancel$/.test(n)&&f.push(new lb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&f.push(new lb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var p=new Ys(f,{width:"100%",height:ke(d)});c=Yi([],[p],o)}return c.height=d,c.style.height=ke(d),c},vK={bin:1,close:1,inner:1,open:1,punct:1,rel:1},wK={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function SK(e){return e in vK}function rt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function hf(e){var t=mf(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function mf(e){return e&&(e.type==="atom"||wK.hasOwnProperty(e.type))?e:null}var iC=e=>{if(e instanceof Qa)return e;if(WX(e)&&e.children.length===1)return iC(e.children[0])},u2=(e,t)=>{var n,a,s;e&&e.type==="supsub"?(a=rt(e.base,"accent"),n=a.base,e.base=n,s=YX(jt(e,t)),e.base=a):(a=rt(e,"accent"),n=a.base);var o=jt(n,t.havingCrampedStyle()),c=a.isShifty&&Ws(n),d=0;if(c){var h,f;d=(h=(f=iC(o))==null?void 0:f.skew)!=null?h:0}var p=a.label==="\\c",x=p?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight),b;if(a.isStretchy)b=df(a,t),b=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:b,wrapperClasses:["svg-align"],wrapperStyle:d>0?{width:"calc(100% - "+ke(2*d)+")",marginLeft:ke(2*d)}:void 0}]});else{var v,N;a.label==="\\vec"?(v=Zk("vec",t),N=Jk.vec[1]):(v=cf({mode:a.mode,text:a.label},t,"textord"),v=GX(v),v.italic=0,N=v.width,p&&(x+=v.depth)),b=ve(["accent-body"],[v]);var j=a.label==="\\textcircled";j&&(b.classes.push("accent-full"),x=o.height);var T=d;j||(T-=N/2),b.style.left=ke(T),a.label==="\\textcircled"&&(b.style.top=".2em"),b=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-x},{type:"elem",elem:b}]})}var E=ve(["mord","accent"],[b],t);return s?(s.children[0]=E,s.height=Math.max(E.height,s.height),s.classes[0]="mord",s):E},lC=(e,t)=>{var n=e.isStretchy?uf(e.label):new Ne("mo",[Nr(e.label,e.mode)]),a=new Ne("mover",[Ut(e.base,t),n]);return a.setAttribute("accent","true"),a},NK=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Ie({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Dm(t[0]),a=!NK.test(e.funcName),s=!a||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:s,base:n}},htmlBuilder:u2,mathmlBuilder:lC});Ie({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],a=e.parser.mode;return a==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:u2,mathmlBuilder:lC});Ie({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"accentUnder",mode:n.mode,label:a,base:s}},htmlBuilder:(e,t)=>{var n=jt(e.base,t),a=df(e,t),s=e.label==="\\utilde"?.12:0,o=Nt({positionType:"top",positionData:n.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:n}]});return ve(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=uf(e.label),a=new Ne("munder",[Ut(e.base,t),n]);return a.setAttribute("accentunder","true"),a}});var Ah=e=>{var t=new Ne("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ie({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a,funcName:s}=e;return{type:"xArrow",mode:a.mode,label:s,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,a=t.havingStyle(n.sup()),s=mc(jt(e.body,a,t),t),o=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(o+"-arrow-pad");var c;e.below&&(a=t.havingStyle(n.sub()),c=mc(jt(e.below,a,t),t),c.classes.push(o+"-arrow-pad"));var d=df(e,t),h=-t.fontMetrics().axisHeight+.5*d.height,f=-t.fontMetrics().axisHeight-.5*d.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(f-=s.depth);var p;if(c){var x=-t.fontMetrics().axisHeight+c.height+.5*d.height+.111;p=Nt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:f},{type:"elem",elem:d,shift:h,wrapperClasses:["svg-align"]},{type:"elem",elem:c,shift:x}]})}else p=Nt({positionType:"individualShift",children:[{type:"elem",elem:s,shift:f},{type:"elem",elem:d,shift:h,wrapperClasses:["svg-align"]}]});return ve(["mrel","x-arrow"],[p],t)},mathmlBuilder(e,t){var n=uf(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(e.body){var s=Ah(Ut(e.body,t));if(e.below){var o=Ah(Ut(e.below,t));a=new Ne("munderover",[n,o,s])}else a=new Ne("mover",[n,s])}else if(e.below){var c=Ah(Ut(e.below,t));a=new Ne("munder",[n,c])}else a=Ah(),a=new Ne("mover",[n,a]);return a}});function oC(e,t){var n=Fn(e.body,t,!0);return ve([e.mclass],n,t)}function cC(e,t){var n,a=er(e.body,t);return e.mclass==="minner"?n=new Ne("mpadded",a):e.mclass==="mord"?e.isCharacterBox?(n=a[0],n.type="mi"):n=new Ne("mi",a):(e.isCharacterBox?(n=a[0],n.type="mo"):n=new Ne("mo",a),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Ie({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+a.slice(5),body:Cn(s),isCharacterBox:Ws(s)}},htmlBuilder:oC,mathmlBuilder:cC});var ff=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Ie({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:ff(t[0]),body:Cn(t[1]),isCharacterBox:Ws(t[1])}}});Ie({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:a}=e,s=t[1],o=t[0],c;a!=="\\stackrel"?c=ff(s):c="mrel";var d={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Cn(s)},h={type:"supsub",mode:o.mode,base:d,sup:a==="\\underset"?null:o,sub:a==="\\underset"?o:null};return{type:"mclass",mode:n.mode,mclass:c,body:[h],isCharacterBox:Ws(h)}},htmlBuilder:oC,mathmlBuilder:cC});Ie({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:ff(t[0]),body:Cn(t[0])}},htmlBuilder(e,t){var n=Fn(e.body,t,!0),a=ve([e.mclass],n,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var n=er(e.body,t),a=new Ne("mstyle",n);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var jK={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},X8=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),K8=e=>e.type==="textord"&&e.text==="@",kK=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function CK(e,t,n){var a=jK[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var s=n.callFunction("\\\\cdleft",[t[0]],[]),o={type:"atom",text:a,mode:"math",family:"rel"},c=n.callFunction("\\Big",[o],[]),d=n.callFunction("\\\\cdright",[t[1]],[]),h={type:"ordgroup",mode:"math",body:[s,c,d]};return n.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);
vendor: 16,261 bytes, line 2310
2310case"\\Vert":{var f={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[f],[])}default:return{type:"textord",text:" ",mode:"math"}}}function AK(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Se("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var a=[],s=[a],o=0;o<t.length;o++){for(var c=t[o],d=X8(),h=0;h<c.length;h++)if(!K8(c[h]))d.body.push(c[h]);else{a.push(d),h+=1;var f=hf(c[h]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(f))if("<>AV".includes(f))for(var x=0;x<2;x++){for(var b=!0,v=h+1;v<c.length;v++){if(kK(c[v],f)){b=!1,h=v;break}if(K8(c[v]))throw new Se("Missing a "+f+" character to complete a CD arrow.",c[v]);p[x].body.push(c[v])}if(b)throw new Se("Missing a "+f+" character to complete a CD arrow.",c[h])}else throw new Se('Expected one of "<>AV=|." after @',c[h]);var N=CK(f,p,e),j={type:"styling",body:[N],mode:"math",style:"display",resetFont:!0};a.push(j),d=X8()}o%2===0?a.push(d):a.shift(),a=[],s.push(a)}e.gullet.endGroup(),e.gullet.endGroup();var T=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:T,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}Ie({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"cdlabel",mode:n.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),a=mc(jt(e.label,n,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=ke(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var n=new Ne("mrow",[Ut(e.label,t)]);return n=new Ne("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ne("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});Ie({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=mc(jt(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new Ne("mrow",[Ut(e.fragment,t)])}});Ie({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,a=rt(t[0],"ordgroup"),s=a.body,o="",c=0;c<s.length;c++){var d=rt(s[c],"textord");o+=d.text}var h=parseInt(o),f;if(isNaN(h))throw new Se("\\@char has non-numeric argument "+o);if(h<0||h>=1114111)throw new Se("\\@char with invalid code point "+o);return h<=65535?f=String.fromCharCode(h):(h-=65536,f=String.fromCharCode((h>>10)+55296,(h&1023)+56320)),{type:"textord",mode:n.mode,text:f}}});var uC=(e,t)=>{var n=Fn(e.body,t.withColor(e.color),!1);return Ks(n)},dC=(e,t)=>{var n=er(e.body,t.withColor(e.color)),a=new Ne("mstyle",n);return a.setAttribute("mathcolor",e.color),a};Ie({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,a=rt(t[0],"color-token").color,s=t[1];return{type:"color",mode:n.mode,color:a,body:Cn(s)}},htmlBuilder:uC,mathmlBuilder:dC});Ie({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:a}=e,s=rt(t[0],"color-token").color;n.gullet.macros.set("\\current@color",s);var o=n.parseExpression(!0,a);return{type:"color",mode:n.mode,color:s,body:o}},htmlBuilder:uC,mathmlBuilder:dC});Ie({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:a}=e,s=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,o=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:o,size:s&&rt(s,"size").value}},htmlBuilder(e,t){var n=ve(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ke(tn(e.size,t)))),n},mathmlBuilder(e,t){var n=new Ne("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ke(tn(e.size,t)))),n}});var bb={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},hC=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Se("Expected a control sequence",e);return t},EK=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},mC=(e,t,n,a)=>{var s=e.gullet.macros.get(n.text);s==null&&(n.noexpand=!0,s={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,s,a)};Ie({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var a=t.fetch();if(bb[a.text])return(n==="\\global"||n==="\\\\globallong")&&(a.text=bb[a.text]),rt(t.parseFunction(),"internal");throw new Se("Invalid token after macro prefix",a)}});Ie({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=t.gullet.popToken(),s=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Se("Expected a control sequence",a);for(var o=0,c,d=[[]];t.gullet.future().text!=="{";)if(a=t.gullet.popToken(),a.text==="#"){if(t.gullet.future().text==="{"){c=t.gullet.future(),d[o].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new Se('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==o+1)throw new Se('Argument number "'+a.text+'" out of order');o++,d.push([])}else{if(a.text==="EOF")throw new Se("Expected a macro definition");d[o].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return c&&h.unshift(c),(n==="\\edef"||n==="\\xdef")&&(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(s,{tokens:h,numArgs:o,delimiters:d},n===bb[n]),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=hC(t.gullet.popToken());t.gullet.consumeSpaces();var s=EK(t);return mC(t,a,s,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});Ie({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,a=hC(t.gullet.popToken()),s=t.gullet.popToken(),o=t.gullet.popToken();return mC(t,a,o,n==="\\\\globalfuture"),t.gullet.pushToken(o),t.gullet.pushToken(s),{type:"internal",mode:t.mode}}});var Pu=function(t,n,a){var s=Qt.math[t]&&Qt.math[t].replace,o=s2(s||t,n,a);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return o},d2=function(t,n,a,s){var o=a.havingBaseStyle(n),c=ve(s.concat(o.sizingClasses(a)),[t],a),d=o.sizeMultiplier/a.sizeMultiplier;return c.height*=d,c.depth*=d,c.maxFontSize=o.sizeMultiplier,c},fC=function(t,n,a){var s=n.havingBaseStyle(a),o=(1-n.sizeMultiplier/s.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ke(o),t.height-=o,t.depth+=o},TK=function(t,n,a,s,o,c){var d=fa(t,"Main-Regular",o,s),h=d2(d,n,s,c);return fC(h,s,n),h},MK=function(t,n,a,s){return fa(t,"Size"+n+"-Regular",a,s)},pC=function(t,n,a,s,o,c){var d=MK(t,n,o,s),h=d2(ve(["delimsizing","size"+n],[d],s),Je.TEXT,s,c);return a&&fC(h,s,Je.TEXT),h},z1=function(t,n,a){var s;n==="Size1-Regular"?s="delim-size1":s="delim-size4";var o=ve(["delimsizinginner",s],[ve([],[fa(t,n,a)])]);return{type:"elem",elem:o}},_1=function(t,n,a){var s=as["Size4-Regular"][t.charCodeAt(0)]?as["Size4-Regular"][t.charCodeAt(0)][4]:as["Size1-Regular"][t.charCodeAt(0)][4],o=new Gi("inner",PX(t,Math.round(1e3*n))),c=new Ys([o],{width:ke(s),height:ke(n),style:"width:"+ke(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),d=Yi([],[c],a);return d.height=n,d.style.height=ke(n),d.style.width=ke(s),{type:"elem",elem:d}},yb=.008,Eh={type:"kern",size:-1*yb},IK=new Set(["|","\\lvert","\\rvert","\\vert"]),zK=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),xC=function(t,n,a,s,o,c){var d,h,f,p,x="",b=0;d=f=p=t,h=null;var v="Size1-Regular";t==="\\uparrow"?f=p="â":t==="\\Uparrow"?f=p="â":t==="\\downarrow"?d=f="â":t==="\\Downarrow"?d=f="â":t==="\\updownarrow"?(d="\\uparrow",f="â",p="\\downarrow"):t==="\\Updownarrow"?(d="\\Uparrow",f="â",p="\\Downarrow"):IK.has(t)?(f="â£",x="vert",b=333):zK.has(t)?(f="â¥",x="doublevert",b=556):t==="["||t==="\\lbrack"?(d="â¡",f="â¢",p="â£",v="Size4-Regular",x="lbrack",b=667):t==="]"||t==="\\rbrack"?(d="â¤",f="â¥",p="â¦",v="Size4-Regular",x="rbrack",b=667):t==="\\lfloor"||t==="â"?(f=d="â¢",p="â£",v="Size4-Regular",x="lfloor",b=667):t==="\\lceil"||t==="â"?(d="â¡",f=p="â¢",v="Size4-Regular",x="lceil",b=667):t==="\\rfloor"||t==="â"?(f=d="â¥",p="â¦",v="Size4-Regular",x="rfloor",b=667):t==="\\rceil"||t==="â"?(d="â¤",f=p="â¥",v="Size4-Regular",x="rceil",b=667):t==="("||t==="\\lparen"?(d="â",f="â",p="â",v="Size4-Regular",x="lparen",b=875):t===")"||t==="\\rparen"?(d="â",f="â",p="â ",v="Size4-Regular",x="rparen",b=875):t==="\\{"||t==="\\lbrace"?(d="â§",h="â¨",p="â©",f="âª",v="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(d="â«",h="â¬",p="â",f="âª",v="Size4-Regular"):t==="\\lgroup"||t==="â®"?(d="â§",p="â©",f="âª",v="Size4-Regular"):t==="\\rgroup"||t==="â¯"?(d="â«",p="â",f="âª",v="Size4-Regular"):t==="\\lmoustache"||t==="â°"?(d="â§",p="â",f="âª",v="Size4-Regular"):(t==="\\rmoustache"||t==="â±")&&(d="â«",p="â©",f="âª",v="Size4-Regular");var N=Pu(d,v,o),j=N.height+N.depth,T=Pu(f,v,o),E=T.height+T.depth,D=Pu(p,v,o),k=D.height+D.depth,M=0,B=1;if(h!==null){var _=Pu(h,v,o);M=_.height+_.depth,B=2}var U=j+k+M,F=Math.max(0,Math.ceil((n-U)/(B*E))),W=U+F*B*E,ae=s.fontMetrics().axisHeight;a&&(ae*=s.sizeMultiplier);var le=W/2-ae,re=[];if(x.length>0){var xe=W-j-k,te=Math.round(W*1e3),H=UX(x,Math.round(xe*1e3)),V=new Gi(x,H),ne=ke(b/1e3),Z=ke(te/1e3),Y=new Ys([V],{width:ne,height:Z,viewBox:"0 0 "+b+" "+te}),I=Yi([],[Y],s);I.height=te/1e3,I.style.width=ne,I.style.height=Z,re.push({type:"elem",elem:I})}else{if(re.push(z1(p,v,o)),re.push(Eh),h===null){var R=W-j-k+2*yb;re.push(_1(f,R,s))}else{var J=(W-j-k-M)/2+2*yb;re.push(_1(f,J,s)),re.push(Eh),re.push(z1(h,v,o)),re.push(Eh),re.push(_1(f,J,s))}re.push(Eh),re.push(z1(d,v,o))}var P=s.havingBaseStyle(Je.TEXT),ge=Nt({positionType:"bottom",positionData:le,children:re});return d2(ve(["delimsizing","mult"],[ge],P),Je.TEXT,s,c)},D1=80,B1=.08,R1=function(t,n,a,s,o){var c=LX(t,s,a),d=new Gi(t,c),h=new Ys([d],{width:"400em",height:ke(n),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return Yi(["hide-tail"],[h],o)},_K=function(t,n){var a=n.havingBaseSizing(),s=wC("\\surd",t*a.sizeMultiplier,vC,a),o=a.sizeMultiplier,c=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),d,h,f,p,x;return s.type==="small"?(p=1e3+1e3*c+D1,t<1?o=1:t<1.4&&(o=.7),h=(1+c+B1)/o,f=(1+c)/o,d=R1("sqrtMain",h,p,c,n),d.style.minWidth="0.853em",x=.833/o):s.type==="large"?(p=(1e3+D1)*Ju[s.size],f=(Ju[s.size]+c)/o,h=(Ju[s.size]+c+B1)/o,d=R1("sqrtSize"+s.size,h,p,c,n),d.style.minWidth="1.02em",x=1/o):(h=t+c+B1,f=t+c,p=Math.floor(1e3*t+c)+D1,d=R1("sqrtTall",h,p,c,n),d.style.minWidth="0.742em",x=1.056),d.height=f,d.style.height=ke(h),{span:d,advanceWidth:x,ruleWidth:(n.fontMetrics().sqrtRuleThickness+c)*o}},gC=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","\\surd"]),DK=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±"]),bC=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Ju=[0,1.2,1.8,2.4,3],yC=function(t,n,a,s,o){if(t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle"),gC.has(t)||bC.has(t))return pC(t,n,!1,a,s,o);if(DK.has(t))return xC(t,Ju[n],!1,a,s,o);throw new Se("Illegal delimiter: '"+t+"'")},BK=[{type:"small",style:Je.SCRIPTSCRIPT},{type:"small",style:Je.SCRIPT},{type:"small",style:Je.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],RK=[{type:"small",style:Je.SCRIPTSCRIPT},{type:"small",style:Je.SCRIPT},{type:"small",style:Je.TEXT},{type:"stack"}],vC=[{type:"small",style:Je.SCRIPTSCRIPT},{type:"small",style:Je.SCRIPT},{type:"small",style:Je.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],OK=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var n=t.type;throw new Error("Add support for delim type '"+n+"' here.")},wC=function(t,n,a,s){for(var o=Math.min(2,3-s.style.size),c=o;c<a.length;c++){var d=a[c];if(d.type==="stack")break;var h=Pu(t,OK(d),"math"),f=h.height+h.depth;if(d.type==="small"){var p=s.havingBaseStyle(d.style);f*=p.sizeMultiplier}if(f>n)return d}return a[a.length-1]},vb=function(t,n,a,s,o,c){t==="<"||t==="\\lt"||t==="â¨"?t="\\langle":(t===">"||t==="\\gt"||t==="â©")&&(t="\\rangle");var d;bC.has(t)?d=BK:gC.has(t)?d=vC:d=RK;var h=wC(t,n,d,s);return h.type==="small"?TK(t,h.style,a,s,o,c):h.type==="large"?pC(t,h.size,a,s,o,c):xC(t,n,a,s,o,c)},O1=function(t,n,a,s,o,c){var d=s.fontMetrics().axisHeight*s.sizeMultiplier,h=901,f=5/s.fontMetrics().ptPerEm,p=Math.max(n-d,a+d),x=Math.max(p/500*h,2*p-f);return vb(t,x,!0,s,o,c)},Q8={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},LK=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","â","â","\\lceil","\\rceil","â","â","<",">","\\langle","â¨","\\rangle","â©","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","â®","â¯","\\lmoustache","\\rmoustache","â°","â±","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function J8(e){return"isMiddle"in e}function pf(e,t){var n=mf(e);if(n&&LK.has(n.text))return n;throw n?new Se("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Se("Invalid delimiter type '"+e.type+"'",e)}Ie({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=pf(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Q8[e.funcName].size,mclass:Q8[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?ve([e.mclass]):yC(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Nr(e.delim,e.mode));var n=new Ne("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var a=ke(Ju[e.size]);return n.setAttribute("minsize",a),n.setAttribute("maxsize",a),n}});function Z8(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ie({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");
vendor: 6,475 bytes, line 2310
2310if(n&&typeof n!="string")throw new Se("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:pf(t[0],e).text,color:n}}});Ie({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=pf(t[0],e),a=e.parser;++a.leftrightDepth;var s=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var o=rt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:s,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{Z8(e);for(var n=Fn(e.body,t,!0,["mopen","mclose"]),a=0,s=0,o=!1,c=0;c<n.length;c++){var d=n[c];J8(d)?o=!0:(a=Math.max(n[c].height,a),s=Math.max(n[c].depth,s))}a*=t.sizeMultiplier,s*=t.sizeMultiplier;var h;if(e.left==="."?h=y0(t,["mopen"]):h=O1(e.left,a,s,t,e.mode,["mopen"]),n.unshift(h),o)for(var f=1;f<n.length;f++){var p=n[f];if(J8(p)){var x=p.isMiddle;n[f]=O1(x.delim,a,s,x.options,e.mode,[])}}var b;if(e.right===".")b=y0(t,["mclose"]);else{var v=e.rightColor?t.withColor(e.rightColor):t;b=O1(e.right,a,s,v,e.mode,["mclose"])}return n.push(b),ve(["minner"],n,t)},mathmlBuilder:(e,t)=>{Z8(e);var n=er(e.body,t);if(e.left!=="."){var a=new Ne("mo",[Nr(e.left,e.mode)]);a.setAttribute("fence","true"),n.unshift(a)}if(e.right!=="."){var s=new Ne("mo",[Nr(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),n.push(s)}return o2(n)}});Ie({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=pf(t[0],e);if(!e.parser.leftrightDepth)throw new Se("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim==="."?n=y0(t,[]):(n=yC(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Nr("|","text"):Nr(e.delim,e.mode),a=new Ne("mo",[n]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var xf=(e,t)=>{var n=mc(jt(e.body,t),t),a=e.label.slice(1),s=t.sizeMultiplier,o,c,d=Ws(e.body);if(a==="sout")o=ve(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,c=-.5*t.fontMetrics().xHeight;else if(a==="phase"){var h=tn({number:.6,unit:"pt"},t),f=tn({number:.35,unit:"ex"},t),p=t.havingBaseSizing();s=s/p.sizeMultiplier;var x=n.height+n.depth+h+f;n.style.paddingLeft=ke(x/2+h);var b=Math.floor(1e3*x*s),v=RX(b),N=new Ys([new Gi("phase",v)],{width:"400em",height:ke(b/1e3),viewBox:"0 0 400000 "+b,preserveAspectRatio:"xMinYMin slice"});o=Yi(["hide-tail"],[N],t),o.style.height=ke(x),c=n.depth+h+f}else{/cancel/.test(a)?d||n.classes.push("cancel-pad"):a==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var j,T,E=0;/box/.test(a)?(E=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),j=t.fontMetrics().fboxsep+(a==="colorbox"?0:E),T=j):a==="angl"?(E=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),j=4*E,T=Math.max(0,.25-n.depth)):(j=d?.2:0,T=j),o=yK(n,a,j,T,t),/fbox|boxed|fcolorbox/.test(a)?(o.style.borderStyle="solid",o.style.borderWidth=ke(E)):a==="angl"&&E!==.049&&(o.style.borderTopWidth=ke(E),o.style.borderRightWidth=ke(E)),c=n.depth+T,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var D;if(e.backgroundColor)D=Nt({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:n,shift:0}]});else{var k=/cancel|phase/.test(a)?["svg-align"]:[];D=Nt({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:o,shift:c,wrapperClasses:k}]})}return/cancel/.test(a)&&(D.height=n.height,D.depth=n.depth),/cancel/.test(a)&&!d?ve(["mord","cancel-lap"],[D],t):ve(["mord"],[D],t)},gf=(e,t)=>{var n,a=new Ne(e.label.includes("colorbox")?"mpadded":"menclose",[Ut(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*n+"pt"),a.setAttribute("height","+"+2*n+"pt"),a.setAttribute("lspace",n+"pt"),a.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var s=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+ke(s)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};Ie({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,o=rt(t[0],"color-token").color,c=t[1];return{type:"enclose",mode:a.mode,label:s,backgroundColor:o,body:c}},htmlBuilder:xf,mathmlBuilder:gf});Ie({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,n){var{parser:a,funcName:s}=e,o=rt(t[0],"color-token").color,c=rt(t[1],"color-token").color,d=t[2];return{type:"enclose",mode:a.mode,label:s,backgroundColor:c,borderColor:o,body:d}},htmlBuilder:xf,mathmlBuilder:gf});Ie({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});Ie({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:xf,mathmlBuilder:gf});Ie({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e;n.mode==="math"&&n.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=t[0];return{type:"enclose",mode:n.mode,label:a,body:s}},htmlBuilder:xf,mathmlBuilder:gf});Ie({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var SC={};function hs(e){for(var{type:t,names:n,props:a,handler:s,htmlBuilder:o,mathmlBuilder:c}=e,d={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s}
vendor: 28,719 bytes, line 2310
2310,h=0;h<n.length;++h)SC[n[h]]=d;o&&(zm[t]=o),c&&(_m[t]=c)}var NC={};function L(e,t){NC[e]=t}class Ta{constructor(t,n,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=a}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new Ta(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}}class Ka{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new Ka(n,Ta.range(this,t))}}function e7(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n==="\\relax"&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n==="\\hline"||n==="\\hdashline";)e.consume(),t.push(n==="\\hdashline"),e.consumeSpaces(),n=e.fetch().text;return t}var bf=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Se("{"+e.envName+"} can be used only in display mode.")},PK=new Set(["gather","gather*"]);function h2(e){if(!e.includes("ed"))return!e.includes("*")}function tl(e,t,n){var{hskipBeforeAndAfter:a,addJot:s,cols:o,arraystretch:c,colSeparationType:d,autoTag:h,singleRow:f,emptySingleRow:p,maxNumCols:x,leqno:b}=t;if(e.gullet.beginGroup(),f||e.gullet.macros.set("\\cr","\\\\\\relax"),!c){var v=e.gullet.expandMacroAsText("\\arraystretch");if(v==null)c=1;else if(c=parseFloat(v),!c||c<0)throw new Se("Invalid \\arraystretch: "+v)}e.gullet.beginGroup();var N=[],j=[N],T=[],E=[],D=h!=null?[]:void 0;function k(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function M(){D&&(e.gullet.macros.get("\\df@tag")?(D.push(e.subparse([new Ka("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):D.push(!!h&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(k(),E.push(e7(e));;){var B=e.parseExpression(!1,f?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var _={type:"ordgroup",mode:e.mode,body:B};n&&(_={type:"styling",mode:e.mode,style:n,resetFont:!0,body:[_]}),N.push(_);var U=e.fetch().text;if(U==="&"){if(x&&N.length===x){if(f||d)throw new Se("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(U==="\\end"){M(),N.length===1&&_.type==="styling"&&_.body.length===1&&_.body[0].type==="ordgroup"&&_.body[0].body.length===0&&(j.length>1||!p)&&j.pop(),E.length<j.length+1&&E.push([]);break}else if(U==="\\\\"){e.consume();var F=void 0;e.gullet.future().text!==" "&&(F=e.parseSizeGroup(!0)),T.push(F?F.value:null),M(),E.push(e7(e)),N=[],j.push(N),k()}else throw new Se("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:c,body:j,cols:o,rowGaps:T,hskipBeforeAndAfter:a,hLinesBeforeRow:E,colSeparationType:d,tags:D,leqno:b}}function m2(e){return e.slice(0,1)==="d"?"display":"text"}var ms=function(t,n){var a,s,o=t.body.length,c=t.hLinesBeforeRow,d=0,h=new Array(o),f=[],p=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),x=1/n.fontMetrics().ptPerEm,b=5*x;if(t.colSeparationType&&t.colSeparationType==="small"){var v=n.havingStyle(Je.SCRIPT).sizeMultiplier;b=.2778*(v/n.sizeMultiplier)}var N=t.colSeparationType==="CD"?tn({number:3,unit:"ex"},n):12*x,j=3*x,T=t.arraystretch*N,E=.7*T,D=.3*T,k=0;function M(Ue){for(var Le=0;Le<Ue.length;++Le)Le>0&&(k+=.25),f.push({pos:k,isDashed:Ue[Le]})}for(M(c[0]),a=0;a<t.body.length;++a){var B=t.body[a],_=E,U=D;d<B.length&&(d=B.length);var F={cells:new Array(B.length),height:0,depth:0,pos:0};for(s=0;s<B.length;++s){var W=jt(B[s],n);U<W.depth&&(U=W.depth),_<W.height&&(_=W.height),F.cells[s]=W}var ae=t.rowGaps[a],le=0;ae&&(le=tn(ae,n),le>0&&(le+=D,U<le&&(U=le),le=0)),t.addJot&&a<t.body.length-1&&(U+=j),F.height=_,F.depth=U,k+=_,F.pos=k,k+=U+le,h[a]=F,M(c[a+1])}var re=k/2+n.fontMetrics().axisHeight,xe=t.cols||[],te=[],H,V,ne=[];if(t.tags&&t.tags.some(Ue=>Ue))for(a=0;a<o;++a){var Z=h[a],Y=Z.pos-re,I=t.tags[a],R=void 0;I===!0?R=ve(["eqn-num"],[],n):I===!1?R=ve([],[],n):R=ve([],Fn(I,n,!0),n),R.depth=Z.depth,R.height=Z.height,ne.push({type:"elem",elem:R,shift:Y})}for(s=0,V=0;s<d||V<xe.length;++s,++V){for(var J,P=xe[V],ge=!0;((Ee=P)==null?void 0:Ee.type)==="separator";){var Ee;if(ge||(H=ve(["arraycolsep"],[]),H.style.width=ke(n.fontMetrics().doubleRuleSep),te.push(H)),P.separator==="|"||P.separator===":"){var Te=P.separator==="|"?"solid":"dashed",Ve=ve(["vertical-separator"],[],n);Ve.style.height=ke(k),Ve.style.borderRightWidth=ke(p),Ve.style.borderRightStyle=Te,Ve.style.margin="0 "+ke(-p/2);var et=k-re;et&&(Ve.style.verticalAlign=ke(-et)),te.push(Ve)}else throw new Se("Invalid separator type: "+P.separator);V++,P=xe[V],ge=!1}if(!(s>=d)){var Re=void 0;if(s>0||t.hskipBeforeAndAfter){var kt,yt;Re=(kt=(yt=P)==null?void 0:yt.pregap)!=null?kt:b,Re!==0&&(H=ve(["arraycolsep"],[]),H.style.width=ke(Re),te.push(H))}var Yt=[];for(a=0;a<o;++a){var cn=h[a],vt=cn.cells[s];if(vt){var Ae=cn.pos-re;vt.depth=cn.depth,vt.height=cn.height,Yt.push({type:"elem",elem:vt,shift:Ae})}}var it=Nt({positionType:"individualShift",children:Yt}),de=ve(["col-align-"+(((J=P)==null?void 0:J.align)||"c")],[it]);if(te.push(de),s<d-1||t.hskipBeforeAndAfter){var Me,Bt;Re=(Me=(Bt=P)==null?void 0:Bt.postgap)!=null?Me:b,Re!==0&&(H=ve(["arraycolsep"],[]),H.style.width=ke(Re),te.push(H))}}}var xn=ve(["mtable"],te);if(f.length>0){for(var Vn=hc("hline",n,p),Da=hc("hdashline",n,p),Zt=[{type:"elem",elem:xn,shift:0}];f.length>0;){var Ct=f.pop(),Ba=Ct.pos-re;Ct.isDashed?Zt.push({type:"elem",elem:Da,shift:Ba}):Zt.push({type:"elem",elem:Vn,shift:Ba})}xn=Nt({positionType:"individualShift",children:Zt})}if(ne.length===0)return ve(["mord"],[xn],n);var ue=Nt({positionType:"individualShift",children:ne}),we=ve(["tag"],[ue],n);return Ks([xn,we])},UK={c:"center ",l:"left ",r:"right "},fs=function(t,n){for(var a=[],s=new Ne("mtd",[],["mtr-glue"]),o=new Ne("mtd",[],["mml-eqn-num"]),c=0;c<t.body.length;c++){for(var d=t.body[c],h=[],f=0;f<d.length;f++)h.push(new Ne("mtd",[Ut(d[f],n)]));t.tags&&t.tags[c]&&(h.unshift(s),h.push(s),t.leqno?h.unshift(o):h.push(o)),a.push(new Ne("mtr",h))}var p=new Ne("mtable",a),x=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);p.setAttribute("rowspacing",ke(x));var b="",v="";if(t.cols&&t.cols.length>0){var N=t.cols,j="",T=!1,E=0,D=N.length;N[0].type==="separator"&&(b+="top ",E=1),N[N.length-1].type==="separator"&&(b+="bottom ",D-=1);for(var k=E;k<D;k++){var M=N[k];M.type==="align"?(v+=UK[M.align],T&&(j+="none "),T=!0):M.type==="separator"&&T&&(j+=M.separator==="|"?"solid ":"dashed ",T=!1)}p.setAttribute("columnalign",v.trim()),/[sd]/.test(j)&&p.setAttribute("columnlines",j.trim())}if(t.colSeparationType==="align"){for(var B=t.cols||[],_="",U=1;U<B.length;U++)_+=U%2?"0em ":"1em ";p.setAttribute("columnspacing",_.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?p.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?p.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?p.setAttribute("columnspacing","0.5em"):p.setAttribute("columnspacing","1em");var F="",W=t.hLinesBeforeRow;b+=W[0].length>0?"left ":"",b+=W[W.length-1].length>0?"right ":"";for(var ae=1;ae<W.length-1;ae++)F+=W[ae].length===0?"none ":W[ae][0]?"dashed ":"solid ";return/[sd]/.test(F)&&p.setAttribute("rowlines",F.trim()),b!==""&&(p=new Ne("menclose",[p]),p.setAttribute("notation",b.trim())),t.arraystretch&&t.arraystretch<1&&(p=new Ne("mstyle",[p]),p.setAttribute("scriptlevel","1")),p},jC=function(t,n){t.envName.includes("ed")||bf(t);var a=[],s=t.envName.includes("at")?"alignat":"align",o=t.envName==="split",c=tl(t.parser,{cols:a,addJot:!0,autoTag:o?void 0:h2(t.envName),emptySingleRow:!0,colSeparationType:s,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),d=0,h=0,f={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var p="",x=0;x<n[0].body.length;x++){var b=rt(n[0].body[x],"textord");p+=b.text}d=Number(p),h=d*2}var v=!h;c.body.forEach(function(E){for(var D=1;D<E.length;D+=2){var k=rt(E[D],"styling"),M=rt(k.body[0],"ordgroup");M.body.unshift(f)}if(v)h<E.length&&(h=E.length);else{var B=E.length/2;if(d<B)throw new Se("Too many math in a row: "+("expected "+d+", but got "+B),E[0])}});for(var N=0;N<h;++N){var j="r",T=0;N%2===1?j="l":N>0&&v&&(T=1),a[N]={type:"align",align:j,pregap:T,postgap:0}}return c.colSeparationType=v?"align":"alignat",c};hs({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=mf(t[0]),a=n?[t[0]]:rt(t[0],"ordgroup").body,s=a.map(function(c){var d=hf(c),h=d.text;if("lcr".includes(h))return{type:"align",align:h};if(h==="|")return{type:"separator",separator:"|"};if(h===":")return{type:"separator",separator:":"};throw new Se("Unknown column alignment: "+h,c)}),o={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return tl(e.parser,o,m2(e.envName))},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),n=s.fetch().text,!"lcr".includes(n))throw new Se("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),a.cols=[{type:"align",align:n}]}}var o=tl(e.parser,a,m2(e.envName)),c=Math.max(0,...o.body.map(d=>d.length));return o.cols=new Array(c).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=tl(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=mf(t[0]),a=n?[t[0]]:rt(t[0],"ordgroup").body,s=a.map(function(d){var h=hf(d),f=h.text;if("lc".includes(f))return{type:"align",align:f};throw new Se("Unknown column alignment: "+f,d)});if(s.length>1)throw new Se("{subarray} can contain only one column");var o={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},c=tl(e.parser,o,"script");if(c.body.length>0&&c.body[0].length>1)throw new Se("{subarray} can contain only one column");return c},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=tl(e.parser,t,m2(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:jC,htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){PK.has(e.envName)&&bf(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:h2(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return tl(e.parser,t,"display")},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:jC,htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){bf(e);var t={autoTag:h2(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return tl(e.parser,t,"display")},htmlBuilder:ms,mathmlBuilder:fs});hs({type:"array",names:["CD"],props:{numArgs:0},handler(e){return bf(e),AK(e.parser)},htmlBuilder:ms,mathmlBuilder:fs});L("\\nonumber","\\gdef\\@eqnsw{0}");L("\\notag","\\nonumber");Ie({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Se(e.funcName+" valid only within array environment")}});var t7=SC;Ie({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];if(s.type!=="ordgroup")throw new Se("Invalid environment name",s);for(var o="",c=0;c<s.body.length;++c)o+=rt(s.body[c],"textord").text;if(a==="\\begin"){if(!t7.hasOwnProperty(o))throw new Se("No such environment: "+o,s);var d=t7[o],{args:h,optArgs:f}=n.parseArguments("\\begin{"+o+"}",d),p={mode:n.mode,envName:o,parser:n},x=d.handler(p,h,f);n.expect("\\end",!1);var b=n.nextToken,v=rt(n.parseFunction(),"environment");if(v.name!==o)throw new Se("Mismatch: \\begin{"+o+"} matched by \\end{"+v.name+"}",b);return x}return{type:"environment",mode:n.mode,name:o,nameGroup:s}}});var kC=(e,t)=>{var n=e.font,a=t.withFont(n);return jt(e.body,a)},CC=(e,t)=>{var n=e.font,a=t.withFont(n);return Ut(e.body,a)},n7={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};Ie({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=Dm(t[0]),o=a;return o in n7&&(o=n7[o]),{type:"font",mode:n.mode,font:o.slice(1),body:s}},htmlBuilder:kC,mathmlBuilder:CC});Ie({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:ff(a),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:a}],isCharacterBox:Ws(a)}}});Ie({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,breakOnTokenText:s}=e,{mode:o}=n,c=n.parseExpression(!0,s);return{type:"font",mode:o,font:"math"+a.slice(1),body:{type:"ordgroup",mode:n.mode,body:c}}},htmlBuilder:kC,mathmlBuilder:CC});var FK=(e,t)=>{var n=t.style,a=n.fracNum(),s=n.fracDen(),o;o=t.havingStyle(a);var c=jt(e.numer,o,t);if(e.continued){var d=8.5/t.fontMetrics().ptPerEm,h=3.5/t.fontMetrics().ptPerEm;c.height=c.height<d?d:c.height,c.depth=c.depth<h?h:c.depth}o=t.havingStyle(s);var f=jt(e.denom,o,t),p,x,b;e.hasBarLine?(e.barSize?(x=tn(e.barSize,t),p=hc("frac-line",t,x)):p=hc("frac-line",t),x=p.height,b=p.height):(p=null,x=0,b=t.fontMetrics().defaultRuleThickness);var v,N,j;n.size===Je.DISPLAY.size?(v=t.fontMetrics().num1,x>0?N=3*b:N=7*b,j=t.fontMetrics().denom1):(x>0?(v=t.fontMetrics().num2,N=b):(v=t.fontMetrics().num3,N=3*b),j=t.fontMetrics().denom2);var T;if(p){var D=t.fontMetrics().axisHeight;v-c.depth-(D+.5*x)<N&&(v+=N-(v-c.depth-(D+.5*x))),D-.5*x-(f.height-j)<N&&(j+=N-(D-.5*x-(f.height-j)));var k=-(D-.5*x);T=Nt({positionType:"individualShift",children:[{type:"elem",elem:f,shift:j},{type:"elem",elem:p,shift:k},{type:"elem",elem:c,shift:-v}]})}else{var E=v-c.depth-(f.height-j);E<N&&(v+=.5*(N-E),j+=.5*(N-E)),T=Nt({positionType:"individualShift",children:[{type:"elem",elem:f,shift:j},{type:"elem",elem:c,shift:-v}]})}o=t.havingStyle(n),T.height*=o.sizeMultiplier/t.sizeMultiplier,T.depth*=o.sizeMultiplier/t.sizeMultiplier;var M;n.size===Je.DISPLAY.size?M=t.fontMetrics().delim1:n.size===Je.SCRIPTSCRIPT.size?M=t.havingStyle(Je.SCRIPT).fontMetrics().delim2:M=t.fontMetrics().delim2;var B,_;return e.leftDelim==null?B=y0(t,["mopen"]):B=vb(e.leftDelim,M,!0,t.havingStyle(n),e.mode,["mopen"]),e.continued?_=ve([]):e.rightDelim==null?_=y0(t,["mclose"]):_=vb(e.rightDelim,M,!0,t.havingStyle(n),e.mode,["mclose"]),ve(["mord"].concat(o.sizingClasses(t)),[B,ve(["mfrac"],[T]),_],t)},VK=(e,t)=>{var n=new Ne("mfrac",[Ut(e.numer,t),Ut(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var a=tn(e.barSize,t);n.setAttribute("linethickness",ke(a))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var o=new Ne("mo",[new An(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(n),e.rightDelim!=null){var c=new Ne("mo",[new An(e.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),s.push(c)}return o2(s)}return n},AC=(e,t)=>{if(!t)return e;var n={type:"styling",mode:e.mode,style:t,body:[e]};return n};Ie({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],o=t[1],c,d=null,h=null;switch(a){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":c=!0;break;case"\\\\atopfrac":c=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":c=!1,d="(",h=")";break;case"\\\\bracefrac":c=!1,d="\\{",h="\\}";break;case"\\\\brackfrac":c=!1,d="[",h="]";break;default:throw new Error("Unrecognized genfrac command")}var f=a==="\\cfrac",p=null;return f||a.startsWith("\\d")?p="display":a.startsWith("\\t")&&(p="text"),AC({type:"genfrac",mode:n.mode,numer:s,denom:o,continued:f,hasBarLine:c,leftDelim:d,rightDelim:h,barSize:null},p)},htmlBuilder:FK,mathmlBuilder:VK});Ie({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:a}=e,s;switch(n){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:s,token:a}}});var a7=["display","text","script","scriptscript"],r7=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};Ie({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,a=t[4],s=t[5],o=Dm(t[0]),c=o.type==="atom"&&o.family==="open"?r7(o.text):null,d=Dm(t[1]),h=d.type==="atom"&&d.family==="close"?r7(d.text):null,f=rt(t[2],"size"),p,x=null;f.isBlank?p=!0:(x=f.value,p=x.number>0);var b=null,v=t[3];if(v.type==="ordgroup"){if(v.body.length>0){var N=rt(v.body[0],"textord");b=a7[Number(N.text)]}}else v=rt(v,"textord"),b=a7[Number(v.text)];return AC({type:"genfrac",mode:n.mode,numer:a,denom:s,continued:!1,hasBarLine:p,barSize:x,leftDelim:c,rightDelim:h},b)}});Ie({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:a,token:s}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:rt(t[0],"size").value,token:s}}});Ie({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0],o=rt(t[1],"infix").size;if(!o)throw new Error("\\\\abovefrac expected size, but got "+String(o));var c=t[2],d=o.number>0;return{type:"genfrac",mode:n.mode,numer:s,denom:c,continued:!1,hasBarLine:d,barSize:o,leftDelim:null,rightDelim:null}}});var EC=(e,t)=>{var n=t.style,a,s;e.type==="supsub"?(a=e.sup?jt(e.sup,t.havingStyle(n.sup()),t):jt(e.sub,t.havingStyle(n.sub()),t),s=rt(e.base,"horizBrace")):s=rt(e,"horizBrace");var o=jt(s.base,t.havingBaseStyle(Je.DISPLAY)),c=df(s,t),d;if(s.isOver?d=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:c,wrapperClasses:["svg-align"]}]}):d=Nt({positionType:"bottom",positionData:o.depth+.1+c.height,children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:o}]}),a){var h=ve(["minner",s.isOver?"mover":"munder"],[d],t);s.isOver?d=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]}):d=Nt({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]})}return ve(["minner",s.isOver?"mover":"munder"],[d],t)},qK=(e,t)=>{var n=uf(e.label);return new Ne(e.isOver?"mover":"munder",[Ut(e.base,t),n])};Ie({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:a}=e;return{type:"horizBrace",mode:n.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:EC,mathmlBuilder:qK});Ie({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[1],s=rt(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:n.mode,href:s,body:Cn(a)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Fn(e.body,t,!1);return nK(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Wi(e.body,t);return n instanceof Ne||(n=new Ne("mrow",[n])),n.setAttribute("href",e.href),n}});Ie({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=rt(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:a}))return n.formatUnsupportedCmd("\\url");for(var s=[],o=0;o<a.length;o++){var c=a[o];c==="~"&&(c="\\textasciitilde"),s.push({type:"textord",mode:"text",text:c})}var d={type:"text",mode:n.mode,font:"\\texttt",body:s};return{type:"href",mode:n.mode,href:a,body:Cn(d)}}});Ie({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Cn(t[0])}},htmlBuilder(e,t){var n=Fn(e.body,t.withFont(""),!1);return Ks(n)},mathmlBuilder(e,t){return new Ne("mrow",er(e.body,t.withFont("")))}});Ie({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a,token:s}=e,o=rt(t[0],"raw").string,c=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var d,h={};switch(a){case"\\htmlClass":h.class=o,d={command:"\\htmlClass",class:o};break;case"\\htmlId":h.id=o,d={command:"\\htmlId",id:o};break;case"\\htmlStyle":h.style=o,d={command:"\\htmlStyle",style:o};break;case"\\htmlData":{for(var f=o.split(","),p=0;p<f.length;p++){var x=f[p],b=x.indexOf("=");if(b<0)throw new Se("\\htmlData key/value '"+x+"' missing equals sign");var v=x.slice(0,b),N=x.slice(b+1);h["data-"+v.trim()]=N}d={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(d)?{type:"html",mode:n.mode,attributes:h,body:Cn(c)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=Fn(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var s=ve(a,n,t);for(var o in e.attributes)o!=="class"&&e.attributes.hasOwnProperty(o)&&s.setAttribute(o,e.attributes[o]);return s},mathmlBuilder:(e,t)=>Wi(e.body,t)});Ie({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Cn(t[0]),mathml:Cn(t[1])}},htmlBuilder:(e,t)=>{var n=Fn(e.html,t,!1);return Ks(n)},mathmlBuilder:(e,t)=>Wi(e.mathml,t)});var L1=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Se("Invalid size: '"+t+"' in \\includegraphics");var a={number:+(n[1]+n[2]),unit:n[3]};if(!$k(a))throw new Se("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};Ie({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:a}=e,s={number:0,unit:"em"},o={number:.9,unit:"em"},c={number:0,unit:"em"},d="";if(n[0])for(var h=rt(n[0],"raw").string,f=h.split(","),p=0;p<f.length;p++){var x=f[p].split("=");if(x.length===2){var b=x[1].trim();switch(x[0].trim()){case"alt":d=b;break;case"width":s=L1(b);break;case"height":o=L1(b);break;case"totalheight":c=L1(b);break;default:throw new Se("Invalid key: '"+x[0]+"' in \\includegraphics.")}}}var v=rt(t[0],"url").url;return d===""&&(d=v,d=d.replace(/^.*[\\/]/,""),d=d.substring(0,d.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:v})?{type:"includegraphics",mode:a.mode,alt:d,width:s,height:o,totalheight:c,src:v}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=tn(e.height,t),a=0;e.totalheight.number>0&&(a=tn(e.totalheight,t)-n);var s=0;e.width.number>0&&(s=tn(e.width,t));var o={height:ke(n+a)};s>0&&(o.width=ke(s)),a>0&&(o.verticalAlign=ke(-a));var c=new HX(e.src,e.alt,o);return c.height=n,c.depth=a,c},mathmlBuilder:(e,t)=>{var n=new Ne("mglyph",[]);n.setAttribute("alt",e.alt);var a=tn(e.height,t),s=0;if(e.totalheight.number>0&&(s=tn(e.totalheight,t)-a,n.setAttribute("valign",ke(-s))),n.setAttribute("height",ke(a+s)),e.width.number>0){var o=tn(e.width,t);n.setAttribute("width",ke(o))}return n.setAttribute("src",e.src),n}});Ie({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=rt(t[0],"size");if(n.settings.strict){var o=a[1]==="m",c=s.value.unit==="mu";o?(c||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+s.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):c&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:s.value}},htmlBuilder(e,t){return Qk(e.dimension,t)},mathmlBuilder(e,t){var n=tn(e.dimension,t);return new aC(n)}});Ie({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"lap",mode:n.mode,alignment:a.slice(5),body:s}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=ve([],[jt(e.body,t)]),n=ve(["inner"],[n],t)):n=ve(["inner"],[jt(e.body,t)]);var a=ve(["fix"],[]),s=ve([e.alignment],[n,a],t),o=ve(["strut"]);return o.style.height=ke(s.height+s.depth),s.depth&&(o.style.verticalAlign=ke(-s.depth)),s.children.unshift(o),s=ve(["thinbox"],[s],t),ve(["mord","vbox"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Ne("mpadded",[Ut(e.body,t)]);if(e.alignment!=="rlap"){var a=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",a+"width")}return n.setAttribute("width","0px"),n}});Ie({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:a}=e,s=a.mode;a.switchMode("math");var o=n==="\\("?"\\)":"$",c=a.parseExpression(!1,o);return a.expect(o),a.switchMode(s),{type:"styling",mode:a.mode,style:"text",resetFont:!0,body:c}}});Ie({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Se("Mismatched "+e.funcName)}});var s7=(e,t)=>{switch(t.style.size){case Je.DISPLAY.size:return e.display;case Je.TEXT.size:return e.text;case Je.SCRIPT.size:return e.script;case Je.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ie({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Cn(t[0]),text:Cn(t[1]),script:Cn(t[2]),scriptscript:Cn(t[3])}},htmlBuilder:(e,t)=>{var n=s7(e,t),a=Fn(n,t,!1);return Ks(a)},mathmlBuilder:(e,t)=>{var n=s7(e,t);return Wi(n,t)}});var TC=(e,t,n,a,s,o,c)=>{e=ve([],[e]);var d=n&&Ws(n),h,f;if(t){var p=jt(t,a.havingStyle(s.sup()),a);f={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-p.depth)}}if(n){var x=jt(n,a.havingStyle(s.sub()),a);h={elem:x,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-x.height)}}var b;if(f&&h){var v=a.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+c;b=Nt({positionType:"bottom",positionData:v,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:ke(-o)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:f.kern},{type:"elem",elem:f.elem,marginLeft:ke(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(h){var N=e.height-c;b=Nt({positionType:"top",positionData:N,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:ke(-o)},{type:"kern",size:h.kern},{type:"elem",elem:e}]})}else if(f){var j=e.depth+c;b=Nt({positionType:"bottom",positionData:j,children:[{type:"elem",elem:e},{type:"kern",size:f.kern},{type:"elem",elem:f.elem,marginLeft:ke(o)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else return e;var T=[b];if(h&&o!==0&&!d){var E=ve(["mspace"],[],a);E.style.marginRight=ke(o),T.unshift(E)}return ve(["mop","op-limits"],T,a)},MC=new Set(["\\smallint"]),Tc=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=rt(e.base,"op"),s=!0):o=rt(e,"o
2310p");var c=t.style,d=!1;c.size===Je.DISPLAY.size&&o.symbol&&!MC.has(o.name)&&(d=!0);var h,f;if(o.symbol){var p=d?"Size2-Regular":"Size1-Regular",x="";if((o.name==="\\oiint"||o.name==="\\oiiint")&&(x=o.name.slice(1),o.name=x==="oiint"?"\\iint":"\\iiint"),h=fa(o.name,p,"math",t,["mop","op-symbol",d?"large-op":"small-op"]),f=h.italic,x.length>0){var b=Zk(x+"Size"+(d?"2":"1"),t);h=Nt({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:b,shift:d?.08:0}]}),o.name="\\"+x,h.classes.unshift("mop"),h.italic=f}}else if(o.body){var v=Fn(o.body,t,!0);v.length===1&&v[0]instanceof Qa?(h=v[0],h.classes[0]="mop"):h=ve(["mop"],v,t)}else{for(var N=[],j=1;j<o.name.length;j++)N.push(i2(o.name[j],o.mode,t));h=ve(["mop"],N,t)}var T=0,E=0;if((h instanceof Qa||o.name==="\\oiint"||o.name==="\\oiiint")&&!o.suppressBaseShift){var D;T=(h.height-h.depth)/2-t.fontMetrics().axisHeight,E=(D=h.italic)!=null?D:0}return s?TC(h,n,a,t,c,E,T):(T&&(h.style.position="relative",h.style.top=ke(T)),h)},H0=(e,t)=>{var n;if(e.symbol)n=new Ne("mo",[Nr(e.name,e.mode)]),MC.has(e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new Ne("mo",er(e.body,t));else{n=new Ne("mi",[new An(e.name.slice(1))]);var a=new Ne("mo",[Nr("â¡","text")]);e.parentIsSupSub?n=new Ne("mrow",[n,a]):n=nC([n,a])}return n},HK={"â":"\\prod","â":"\\coprod","â":"\\sum","â":"\\bigwedge","â":"\\bigvee","â":"\\bigcap","â":"\\bigcup","â¨":"\\bigodot","â¨":"\\bigoplus","â¨":"\\bigotimes","â¨":"\\biguplus","â¨":"\\bigsqcup"};Ie({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","â","â","â","â","â","â","â","â¨","â¨","â¨","â¨","â¨"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=a;return s.length===1&&(s=HK[s]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:Tc,mathmlBuilder:H0});Ie({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Cn(a)}},htmlBuilder:Tc,mathmlBuilder:H0});var $K={"â«":"\\int","â¬":"\\iint","â":"\\iiint","â®":"\\oint","â¯":"\\oiint","â°":"\\oiiint"};Ie({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Tc,mathmlBuilder:H0});Ie({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Tc,mathmlBuilder:H0});Ie({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","â«","â¬","â","â®","â¯","â°"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,a=n;return a.length===1&&(a=$K[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Tc,mathmlBuilder:H0});var IC=(e,t)=>{var n,a,s=!1,o;e.type==="supsub"?(n=e.sup,a=e.sub,o=rt(e.base,"operatorname"),s=!0):o=rt(e,"operatorname");var c;if(o.body.length>0){for(var d=o.body.map(x=>{var b="text"in x?x.text:void 0;return typeof b=="string"?{type:"textord",mode:x.mode,text:b}:x}),h=Fn(d,t.withFont("mathrm"),!0),f=0;f<h.length;f++){var p=h[f];p instanceof Qa&&(p.text=p.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}c=ve(["mop"],h,t)}else c=ve(["mop"],[],t);return s?TC(c,n,a,t,t.style,0,0):c},GK=(e,t)=>{for(var n=er(e.body,t.withFont("mathrm")),a=!0,s=0;s<n.length;s++){var o=n[s];if(!(o instanceof aC))if(o instanceof Ne)switch(o.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var c=o.children[0];o.children.length===1&&c instanceof An?c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):a=!1;break}default:a=!1}else a=!1}if(a){var d=n.map(p=>p.toText()).join("");n=[new An(d)]}var h=new Ne("mi",n);h.setAttribute("mathvariant","normal");var f=new Ne("mo",[Nr("â¡","text")]);return e.parentIsSupSub?new Ne("mrow",[h,f]):nC([h,f])};Ie({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:a}=e,s=t[0];return{type:"operatorname",mode:n.mode,body:Cn(s),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:IC,mathmlBuilder:GK});L("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Wl({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ks(Fn(e.body,t,!1)):ve(["mord"],Fn(e.body,t,!0),t)},mathmlBuilder(e,t){return Wi(e.body,t,!0)}});Ie({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,a=t[0];return{type:"overline",mode:n.mode,body:a}},htmlBuilder(e,t){var n=jt(e.body,t.havingCrampedStyle()),a=hc("overline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*s},{type:"elem",elem:a},{type:"kern",size:s}]});return ve(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new Ne("mo",[new An("â¾")]);n.setAttribute("stretchy","true");var a=new Ne("mover",[Ut(e.body,t),n]);return a.setAttribute("accent","true"),a}});Ie({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"phantom",mode:n.mode,body:Cn(a)}},htmlBuilder:(e,t)=>{var n=Fn(e.body,t.withPhantom(),!1);return Ks(n)},mathmlBuilder:(e,t)=>{var n=er(e.body,t);
vendor: 4,285 bytes, line 2310
2310return new Ne("mphantom",n)}});L("\\hphantom","\\smash{\\phantom{#1}}");Ie({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,a=t[0];return{type:"vphantom",mode:n.mode,body:a}},htmlBuilder:(e,t)=>{var n=ve(["inner"],[jt(e.body,t.withPhantom())]),a=ve(["fix"],[]);return ve(["mord","rlap"],[n,a],t)},mathmlBuilder:(e,t)=>{var n=er(Cn(e.body),t),a=new Ne("mphantom",n),s=new Ne("mpadded",[a]);return s.setAttribute("width","0px"),s}});Ie({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,a=rt(t[0],"size").value,s=t[1];return{type:"raisebox",mode:n.mode,dy:a,body:s}},htmlBuilder(e,t){var n=jt(e.body,t),a=tn(e.dy,t);return Nt({positionType:"shift",positionData:-a,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ne("mpadded",[Ut(e.body,t)]),a=e.dy.number+e.dy.unit;return n.setAttribute("voffset",a),n}});Ie({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Ie({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:a}=e,s=n[0],o=rt(t[0],"size"),c=rt(t[1],"size");return{type:"rule",mode:a.mode,shift:s&&rt(s,"size").value,width:o.value,height:c.value}},htmlBuilder(e,t){var n=ve(["mord","rule"],[],t),a=tn(e.width,t),s=tn(e.height,t),o=e.shift?tn(e.shift,t):0;return n.style.borderRightWidth=ke(a),n.style.borderTopWidth=ke(s),n.style.bottom=ke(o),n.width=a,n.height=s+o,n.depth=-o,n.maxFontSize=s*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=tn(e.width,t),a=tn(e.height,t),s=e.shift?tn(e.shift,t):0,o=t.color&&t.getColor()||"black",c=new Ne("mspace");c.setAttribute("mathbackground",o),c.setAttribute("width",ke(n)),c.setAttribute("height",ke(a));var d=new Ne("mpadded",[c]);return s>=0?d.setAttribute("height",ke(s)):(d.setAttribute("height",ke(s)),d.setAttribute("depth",ke(-s))),d.setAttribute("voffset",ke(s)),d}});function zC(e,t,n){for(var a=Fn(e,t,!1),s=t.sizeMultiplier/n.sizeMultiplier,o=0;o<a.length;o++){var c=a[o].classes.indexOf("sizing");c<0?Array.prototype.push.apply(a[o].classes,t.sizingClasses(n)):a[o].classes[c+1]==="reset-size"+t.size&&(a[o].classes[c+1]="reset-size"+n.size),a[o].height*=s,a[o].depth*=s}return Ks(a)}var i7=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],YK=(e,t)=>{var n=t.havingSize(e.size);return zC(e.body,n,t)};Ie({type:"sizing",names:i7,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:a,parser:s}=e,o=s.parseExpression(!1,n);return{type:"sizing",mode:s.mode,size:i7.indexOf(a)+1,body:o}},htmlBuilder:YK,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),a=er(e.body,n),s=new Ne("mstyle",a);return s.setAttribute("mathsize",ke(n.sizeMultiplier)),s}});Ie({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:a}=e,s=!1,o=!1,c=n[0]&&rt(n[0],"ordgroup");if(c)for(var d,h=0;h<c.body.length;++h){var f=c.body[h];if(d=hf(f).text,d==="t")s=!0;else if(d==="b")o=!0;else{s=!1,o=!1;break}}else s=!0,o=!0;var p=t[0];return{type:"smash",mode:a.mode,body:p,smashHeight:s,smashDepth:o}},htmlBuilder:(e,t)=>{var n=ve([],[jt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return ve(["mord","smash"],[n],t);if(n.children)for(var a=0;a<n.children.length;a++)e.smashHeight&&(n.children[a].height=0),e.smashDepth&&(n.children[a].depth=0);var s=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:n}]});return ve(["mord"],[s],t)},mathmlBuilder:(e,t)=>{var n=new Ne("mpadded",[Ut(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});Ie({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:a}=e,s=n[0],o=t[0];return{type:"sqrt",mode:a.mode,body:o,index:s}},htmlBuilder(e,t){var n=jt(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=mc(n,t);var a=t.fontMetrics(),s=a.defaultRuleThickness,o=s;
vendor: 4,749 bytes, line 2310
2310t.style.id<Je.TEXT.id&&(o=t.fontMetrics().xHeight);var c=s+o/4,d=n.height+n.depth+c+s,{span:h,ruleWidth:f,advanceWidth:p}=_K(d,t),x=h.height-f;x>n.height+n.depth+c&&(c=(c+x-n.height-n.depth)/2);var b=h.height-n.height-c-f;n.style.paddingLeft=ke(p);var v=Nt({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+b)},{type:"elem",elem:h},{type:"kern",size:f}]});if(e.index){var N=t.havingStyle(Je.SCRIPTSCRIPT),j=jt(e.index,N,t),T=.6*(v.height-v.depth),E=Nt({positionType:"shift",positionData:-T,children:[{type:"elem",elem:j}]}),D=ve(["root"],[E]);return ve(["mord","sqrt"],[D,v],t)}else return ve(["mord","sqrt"],[v],t)},mathmlBuilder(e,t){var{body:n,index:a}=e;return a?new Ne("mroot",[Ut(n,t),Ut(a,t)]):new Ne("msqrt",[Ut(n,t)])}});var wb={display:Je.DISPLAY,text:Je.TEXT,script:Je.SCRIPT,scriptscript:Je.SCRIPTSCRIPT};function WK(e){return e in wb}Ie({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:a,parser:s}=e,o=s.parseExpression(!0,n),c=a.slice(1,a.length-5);if(!WK(c))throw new Error("Unknown style: "+c);return{type:"styling",mode:s.mode,style:c,body:o}},htmlBuilder(e,t){var n=wb[e.style],a=t.havingStyle(n);return e.resetFont&&(a=a.withFont("")),zC(e.body,a,t)},mathmlBuilder(e,t){var n=wb[e.style],a=t.havingStyle(n);e.resetFont&&(a=a.withFont(""));var s=er(e.body,a),o=new Ne("mstyle",s),c={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},d=c[e.style];return o.setAttribute("scriptlevel",d[0]),o.setAttribute("displaystyle",d[1]),o}});var XK=function(t,n){var a=t.base;if(a)if(a.type==="op"){var s=a.limits&&(n.style.size===Je.DISPLAY.size||a.alwaysHandleSupSub);return s?Tc:null}else if(a.type==="operatorname"){var o=a.alwaysHandleSupSub&&(n.style.size===Je.DISPLAY.size||a.limits);return o?IC:null}else{if(a.type==="accent")return Ws(a.base)?u2:null;if(a.type==="horizBrace"){var c=!t.sub;return c===a.isOver?EC:null}else return null}else return null};Wl({type:"supsub",htmlBuilder(e,t){var n=XK(e,t);if(n)return n(e,t);var{base:a,sup:s,sub:o}=e,c=jt(a,t),d,h,f=t.fontMetrics(),p=0,x=0,b=a&&Ws(a);if(s){var v=t.havingStyle(t.style.sup());d=jt(s,v,t),b||(p=c.height-v.fontMetrics().supDrop*v.sizeMultiplier/t.sizeMultiplier)}if(o){var N=t.havingStyle(t.style.sub());h=jt(o,N,t),b||(x=c.depth+N.fontMetrics().subDrop*N.sizeMultiplier/t.sizeMultiplier)}var j;t.style===Je.DISPLAY?j=f.sup1:t.style.cramped?j=f.sup3:j=f.sup2;var T=t.sizeMultiplier,E=ke(.5/f.ptPerEm/T),D=null;if(h){var k=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(c instanceof Qa||k){var M;D=ke(-((M=c.italic)!=null?M:0))}}var B;if(d&&h){p=Math.max(p,j,d.depth+.25*f.xHeight),x=Math.max(x,f.sub2);var _=f.defaultRuleThickness,U=4*_;if(p-d.depth-(h.height-x)<U){x=U-(p-d.depth)+h.height;var F=.8*f.xHeight-(p-d.depth);F>0&&(p+=F,x-=F)}var W=[{type:"elem",elem:h,shift:x,marginRight:E,marginLeft:D},{type:"elem",elem:d,shift:-p,marginRight:E}];B=Nt({positionType:"individualShift",children:W})}else if(h){x=Math.max(x,f.sub1,h.height-.8*f.xHeight);var ae=[{type:"elem",elem:h,marginLeft:D,marginRight:E}];B=Nt({positionType:"shift",positionData:x,children:ae})}else if(d)p=Math.max(p,j,d.depth+.25*f.xHeight),B=Nt({positionType:"shift",positionData:-p,children:[{type:"elem",elem:d,marginRight:E}]});else throw new Error("supsub must have either sup or sub.");var le=xb(c,"right")||"mord";return ve([le],[c,ve(["msupsub"],[B])],t)},mathmlBuilder(e,t){var n=!1,a,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(n=!0,a=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var o=[Ut(e.base,t)];e.sub&&o.push(Ut(e.sub,t)),e.sup&&o.push(Ut(e.sup,t));var c;if(n)c=a?"mover":"munder";else if(e.sub)if(e.sup){var f=e.base;f&&f.type==="op"&&f.limits&&t.style===Je.DISPLAY||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(t.style===Je.DISPLAY||f.limits)?c="munderover":c="msubsup"}else{var h=e.base;h&&h.type==="op"&&h.limits&&(t.style===Je.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||t.style===Je.DISPLAY)?c="munder":c="msub"}else{var d=e.base;d&&d.type==="op"&&d.limits&&(t.style===Je.DISPLAY||d.alwaysHandleSupSub)||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(d.limits||t.style===Je.DISPLAY)?c="mover":c="msup"}return new Ne(c,o)}});Wl({type:"atom",htmlBuilder(e,t){return i2(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new Ne("mo",[Nr(e.text,e.mode)]);if(e.family==="bin"){var a=c2(e,t);a==="bold-italic"&&n.setAttribute("mathvariant",a)}
vendor: 9,056 bytes, lines 2310-2314
2310else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var _C={mi:"italic",mn:"normal",mtext:"normal"};Wl({type:"mathord",htmlBuilder(e,t){return cf(e,t,"mathord")},mathmlBuilder(e,t){var n=new Ne("mi",[Nr(e.text,e.mode,t)]),a=c2(e,t)||"italic";return a!==_C[n.type]&&n.setAttribute("mathvariant",a),n}});Wl({type:"textord",htmlBuilder(e,t){return cf(e,t,"textord")},mathmlBuilder(e,t){var n=Nr(e.text,e.mode,t),a=c2(e,t)||"normal",s;return e.mode==="text"?s=new Ne("mtext",[n]):/[0-9]/.test(e.text)?s=new Ne("mn",[n]):e.text==="\\prime"?s=new Ne("mo",[n]):s=new Ne("mi",[n]),a!==_C[s.type]&&s.setAttribute("mathvariant",a),s}});var P1={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},U1={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Wl({type:"spacing",htmlBuilder(e,t){if(U1.hasOwnProperty(e.text)){var n=U1[e.text].className||"";if(e.mode==="text"){var a=cf(e,t,"textord");return a.classes.push(n),a}else return ve(["mspace",n],[i2(e.text,e.mode,t)],t)}else{if(P1.hasOwnProperty(e.text))return ve(["mspace",P1[e.text]],[],t);throw new Se('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(U1.hasOwnProperty(e.text))n=new Ne("mtext",[new An(" ")]);else{if(P1.hasOwnProperty(e.text))return new Ne("mspace");throw new Se('Unknown type of space "'+e.text+'"')}return n}});var l7=()=>{var e=new Ne("mtd",[]);return e.setAttribute("width","50%"),e};Wl({type:"tag",mathmlBuilder(e,t){var n=new Ne("mtable",[new Ne("mtr",[l7(),new Ne("mtd",[Wi(e.body,t)]),l7(),new Ne("mtd",[Wi(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var o7={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},c7={"\\textbf":"textbf","\\textmd":"textmd"},KK={"\\textit":"textit","\\textup":"textup"},u7=(e,t)=>{var n=e.font;if(n){if(o7[n])return t.withTextFontFamily(o7[n]);if(c7[n])return t.withTextFontWeight(c7[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(KK[n])};Ie({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:a}=e,s=t[0];return{type:"text",mode:n.mode,body:Cn(s),font:a}},htmlBuilder(e,t){var n=u7(e,t),a=Fn(e.body,n,!0);return ve(["mord","text"],a,n)},mathmlBuilder(e,t){var n=u7(e,t);return Wi(e.body,n)}});Ie({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=jt(e.body,t),a=hc("underline-line",t),s=t.fontMetrics().defaultRuleThickness,o=Nt({positionType:"top",positionData:n.height,children:[{type:"kern",size:s},{type:"elem",elem:a},{type:"kern",size:3*s},{type:"elem",elem:n}]});return ve(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new Ne("mo",[new An("â¾")]);n.setAttribute("stretchy","true");var a=new Ne("munder",[Ut(e.body,t),n]);return a.setAttribute("accentunder","true"),a}});Ie({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=jt(e.body,t),a=t.fontMetrics().axisHeight,s=.5*(n.height-a-(n.depth+a));return Nt({positionType:"shift",positionData:s,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new Ne("mpadded",[Ut(e.body,t)],["vcenter"]);return new Ne("mrow",[n])}});Ie({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Se("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=d7(e),a=[],s=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var c=n[o];c==="~"&&(c="\\textasciitilde"),a.push(fa(c,"Typewriter-Regular",e.mode,s,["mord","texttt"]))}return ve(["mord","text"].concat(s.sizingClasses(t)),Kk(a),s)},mathmlBuilder(e,t){var n=new An(d7(e)),a=new Ne("mtext",[n]);return a.setAttribute("mathvariant","monospace"),a}});var d7=e=>e.body.replace(/ /g,e.star?"â£":" "),Bi=eC,DC=`[ \r 2311 ]`,QK="\\\\[a-zA-Z@]+",JK="\\\\[^\uD800-\uDFFF]",ZK="("+QK+")"+DC+"*",eQ=`\\\\( 2312|[ \r ]+ 2313?)[ \r ]*`,Sb="[Ì-ͯ]",tQ=new RegExp(Sb+"+$"),nQ="("+DC+"+)|"+(eQ+"|")+"([!-\\[\\]-â§âª-í¿ï¤-ï¿¿]"+(Sb+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Sb+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+ZK)+("|"+JK+")");class h7{constructor(t,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=n,this.tokenRegex=new RegExp(nQ,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,n){this.catcodes[t]=n}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new Ka("EOF",new Ta(this,n,n));var a=this.tokenRegex.exec(t);if(a===null||a.index!==n)throw new Se("Unexpected character: '"+t[n]+"'",new Ka(t[n],new Ta(this,n,n+1)));var s=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[s]===14){var o=t.indexOf(` 2314`,this.tokenRegex.lastIndex);return o===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=o+1,this.lex()}return new Ka(s,new Ta(this,n,this.tokenRegex.lastIndex))}}class aQ{constructor(t,n){t===void 0&&(t={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Se("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,n,a){if(a===void 0&&(a=!1),a){for(var s=0;s<this.undefStack.length;s++)delete this.undefStack[s][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=n)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(t)&&(o[t]=this.current[t])}n==null?delete this.current[t]:this.current[t]=n}}var rQ=NC;L("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});L("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});L("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});L("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});L("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});L("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");L("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var m7={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};L("\\char",function(e){var t=e.popToken(),n,a=0;if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")a=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Se("\\char` missing argument");a=t.text.charCodeAt(0)}else n=10;if(n){if(a=m7[t.text],a==null||a>=n)throw new Se("Invalid base-"+n+" digit "+t.text);for(var s;(s=m7[e.future().text])!=null&&s<n;)a*=n,a+=s,e.popToken()}return"\\@char{"+a+"}"});var f2=(e,t,n,a)=>{var s=e.consumeArg().tokens;if(s.length!==1)throw new Se("\\newcommand's first argument must be a macro name");var o=s[0].text,c=e.isDefined(o);if(c&&!t)throw new Se("\\newcommand{"+o+"} attempting to redefine "+(o+"; use \\renewcommand"));if(!c&&!n)throw new Se("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var d=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var h="",f=e.expandNextToken();f.text!=="]"&&f.text!=="EOF";)h+=f.text,f=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new Se("Invalid number of arguments: "+h);d=parseInt(h),s=e.consumeArg().tokens}return c&&a||e.macros.set(o,{tokens:s,numArgs:d}),""};L("\\newcommand",e=>f2(e,!1,!0,!1));L("\\renewcommand",e=>f2(e,!0,!1,!1));L("\\providecommand",e=>f2(e,!0,!0,!0));L("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});L("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});L("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Bi[n],Qt.math[n],Qt.text[n]),""});L("\\bgroup","{");L("\\egroup","}");
vendor: 6,423 bytes, line 2314
2314L("~","\\nobreakspace");L("\\lq","`");L("\\rq","'");L("\\aa","\\r a");L("\\AA","\\r A");L("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");L("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");L("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");L("â¬","\\mathscr{B}");L("â°","\\mathscr{E}");L("â±","\\mathscr{F}");L("â","\\mathscr{H}");L("â","\\mathscr{I}");L("â","\\mathscr{L}");L("â³","\\mathscr{M}");L("â","\\mathscr{R}");L("â","\\mathfrak{C}");L("â","\\mathfrak{H}");L("â¨","\\mathfrak{Z}");L("\\Bbbk","\\Bbb{k}");L("\\llap","\\mathllap{\\textrm{#1}}");L("\\rlap","\\mathrlap{\\textrm{#1}}");L("\\clap","\\mathclap{\\textrm{#1}}");L("\\mathstrut","\\vphantom{(}");L("\\underbar","\\underline{\\text{#1}}");L("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');L("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`â }}");L("\\ne","\\neq");L("â ","\\neq");L("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`â}}");L("â","\\notin");L("â","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`â}}");L("â","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`â}}");L("â","\\perp");L("â¼","\\mathclose{!\\mkern-0.8mu!}");L("â","\\notni");L("â","\\ulcorner");L("â","\\urcorner");L("â","\\llcorner");L("â","\\lrcorner");L("©","\\copyright");L("®","\\textregistered");L("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');L("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');L("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');L("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');L("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");L("â®","\\vdots");L("\\varGamma","\\mathit{\\Gamma}");L("\\varDelta","\\mathit{\\Delta}");L("\\varTheta","\\mathit{\\Theta}");L("\\varLambda","\\mathit{\\Lambda}");L("\\varXi","\\mathit{\\Xi}");L("\\varPi","\\mathit{\\Pi}");L("\\varSigma","\\mathit{\\Sigma}");L("\\varUpsilon","\\mathit{\\Upsilon}");L("\\varPhi","\\mathit{\\Phi}");L("\\varPsi","\\mathit{\\Psi}");L("\\varOmega","\\mathit{\\Omega}");L("\\substack","\\begin{subarray}{c}#1\\end{subarray}");L("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");L("\\boxed","\\fbox{$\\displaystyle{#1}$}");L("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");L("\\implies","\\DOTSB\\;\\Longrightarrow\\;");L("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");L("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");L("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var f7={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},sQ=new Set(["bin","rel"]);L("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in f7?t=f7[n]:(n.slice(0,4)==="\\not"||n in Qt.math&&sQ.has(Qt.math[n].group))&&(t="\\dotsb"),t});var p2={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};L("\\dotso",function(e){var t=e.future().text;return t in p2?"\\ldots\\,":"\\ldots"});L("\\dotsc",function(e){var t=e.future().text;return t in p2&&t!==","?"\\ldots\\,":"\\ldots"});L("\\cdots",function(e){var t=e.future().text;return t in p2?"\\@cdots\\,":"\\@cdots"});L("\\dotsb","\\cdots");L("\\dotsm","\\cdots");L("\\dotsi","\\!\\cdots");L("\\dotsx","\\ldots\\,");L("\\DOTSI","\\relax");L("\\DOTSB","\\relax");L("\\DOTSX","\\relax");L("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");L("\\,","\\tmspace+{3mu}{.1667em}");L("\\thinspace","\\,");L("\\>","\\mskip{4mu}");L("\\:","\\tmspace+{4mu}{.2222em}");L("\\medspace","\\:");L("\\;","\\tmspace+{5mu}{.2777em}");L("\\thickspace","\\;");L("\\!","\\tmspace-{3mu}{.1667em}");L("\\negthinspace","\\!");L("\\negmedspace","\\tmspace-{4mu}{.2222em}");L("\\negthickspace","\\tmspace-{5mu}{.277em}");L("\\enspace","\\kern.5em ");L("\\enskip","\\hskip.5em\\relax");L("\\quad","\\hskip1em\\relax");L("\\qquad","\\hskip2em\\relax");L("\\tag","\\@ifstar\\tag@literal\\tag@paren");L("\\tag@paren","\\tag@literal{({#1})}");L("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Se("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});L("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");L("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");L("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");L("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");L("\\newline","\\\\\\relax");L("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var BC=ke(as["Main-Regular"][84][1]-.7*as["Main-Regular"][65][1]);L("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+BC+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");
2314L("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+BC+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");L("\\hspace","\\@ifstar\\@hspacer\\@hspace");L("\\@hspace","\\hskip #1\\relax");L("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");L("\\ordinarycolon",":");L("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");L("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');L("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');L("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');L("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');L("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');L("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');L("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');L("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');L("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');L("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');L("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');L("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');L("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');L("â·","\\dblcolon");L("â¹","\\eqcolon");L("â","\\coloneqq");L("â","\\eqqcolon");L("â©´","\\Coloneqq");L("\\ratio","\\vcentcolon");L("\\coloncolon","\\dblcolon");L("\\colonequals","\\coloneqq");L("\\coloncolonequals","\\Coloneqq");L("\\equalscolon","\\eqqcolon");L("\\equalscoloncolon","\\Eqqcolon");L("\\colonminus","\\coloneq");L("\\coloncolonminus","\\Coloneq");L("\\minuscolon","\\eqcolon");L("\\minuscoloncolon","\\Eqcolon");L("\\coloncolonapprox","\\Colonapprox");L("\\coloncolonsim","\\Colonsim");L("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");L("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");L("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");L("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");L("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`â}}");L("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");L("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");L("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");L("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");L("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");L("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");L("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");L("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");L("\\gvertneqq","\\html@mathml{\\@gvertneqq}{â©}");L("\\lvertneqq","\\html@mathml{\\@lvertneqq}{â¨}");L("\\ngeqq","\\html@mathml{\\@ngeqq}{â±}");L("\\ngeqslant","\\html@mathml{\\@ngeqslant}{â±}");L("\\nleqq","\\html@mathml{\\@nleqq}{â°}");L("\\nleqslant","\\html@mathml{\\@nleqslant}{â°}");L("\\nshortmid","\\html@mathml{\\@nshortmid}{â¤}");L("\\nshortparallel","\\html@mathml{\\@nshortparallel}{â¦}");L("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{â}");L("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{â}");L("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{â}");L("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{â«}");L("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{â}");L("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{â«}");L("\\imath","\\html@mathml{\\@imath}{ı}");L("\\jmath","\\html@mathml{\\@jmath}{È·}");L("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`â¦}}");L("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`â§}}");L("â¦","\\llbracket");L("â§","\\rrbracket");L("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}
2314{\\mathopen{\\char`â¦}}");L("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`â¦}}");L("â¦","\\lBrace");L("â¦","\\rBrace");L("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");L("⦵","\\minuso");L("\\darr","\\downarrow");L("\\dArr","\\Downarrow");L("\\Darr","\\Downarrow");L("\\lang","\\langle");L("\\rang","\\rangle");L("\\uarr","\\uparrow");L("\\uArr","\\Uparrow");L("\\Uarr","\\Uparrow");L("\\N","\\mathbb{N}");L("\\R","\\mathbb{R}");L("\\Z","\\mathbb{Z}");L("\\alef","\\aleph");L("\\alefsym","\\aleph");L("\\Alpha","\\mathrm{A}");L("\\Beta","\\mathrm{B}");L("\\bull","\\bullet");L("\\Chi","\\mathrm{X}");L("\\clubs","\\clubsuit");L("\\cnums","\\mathbb{C}");L("\\Complex","\\mathbb{C}");L("\\Dagger","\\ddagger");L("\\diamonds","\\diamondsuit");L("\\empty","\\emptyset");L("\\Epsilon","\\mathrm{E}");L("\\Eta","\\mathrm{H}");L("\\exist","\\exists");L("\\harr","\\leftrightarrow");L("\\hArr","\\Leftrightarrow");L("\\Harr","\\Leftrightarrow");L("\\hearts","\\heartsuit");L("\\image","\\Im");L("\\infin","\\infty");L("\\Iota","\\mathrm{I}");L("\\isin","\\in");L("\\Kappa","\\mathrm{K}");L("\\larr","\\leftarrow");L("\\lArr","\\Leftarrow");L("\\Larr","\\Leftarrow");L("\\lrarr","\\leftrightarrow");L("\\lrArr","\\Leftrightarrow");L("\\Lrarr","\\Leftrightarrow");L("\\Mu","\\mathrm{M}");L("\\natnums","\\mathbb{N}");L("\\Nu","\\mathrm{N}");L("\\Omicron","\\mathrm{O}");L("\\plusmn","\\pm");L("\\rarr","\\rightarrow");L("\\rArr","\\Rightarrow");L("\\Rarr","\\Rightarrow");L("\\real","\\Re");L("\\reals","\\mathbb{R}");L("\\Reals","\\mathbb{R}");L("\\Rho","\\mathrm{P}");L("\\sdot","\\cdot");L("\\sect","\\S");L("\\spades","\\spadesuit");L("\\sub","\\subset");L("\\sube","\\subseteq");L("\\supe","\\supseteq");L("\\Tau","\\mathrm{T}");L("\\thetasym","\\vartheta");L("\\weierp","\\wp");L("\\Zeta","\\mathrm{Z}");L("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");L("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");L("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");L("\\bra","\\mathinner{\\langle{#1}|}");L("\\ket","\\mathinner{|{#1}\\rangle}");L("\\braket","\\mathinner{\\langle{#1}\\rangle}");L("\\Bra","\\left\\langle#1\\right|");L("\\Ket","\\left|#1\\right\\rangle");var RC=e=>t=>{var n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.consumeArg().tokens,o=t.consumeArg().tokens,c=t.macros.get("|"),d=t.macros.get("\\|");t.macros.beginGroup();var h=x=>b=>{e&&(b.macros.set("|",c),s.length&&b.macros.set("\\|",d));var v=x;if(!x&&s.length){var N=b.future();N.text==="|"&&(b.popToken(),v=!0)}return{tokens:v?s:a,numArgs:0}};t.macros.set("|",h(!1)),s.length&&t.macros.set("\\|",h(!0));var f=t.consumeArg().tokens,p=t.expandTokens([...o,...f,...n]);return t.macros.endGroup(),{tokens:p.reverse(),numArgs:0}};L("\\bra@ket",RC(!1));L("\\bra@set",RC(!0));L("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");L("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");L("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");L("\\angln","{\\angl n}");L("\\blue","\\textcolor{##6495ed}{#1}");L("\\orange","\\textcolor{##ffa500}{#1}");L("\\pink","\\textcolor{##ff00af}{#1}");L("\\red","\\textcolor{##df0030}{#1}");L("\\green","\\textcolor{##28ae7b}{#1}");L("\\gray","\\textcolor{gray}{#1}");L("\\purple","\\textcolor{##9d38bd}{#1}");L("\\blueA","\\textcolor{##ccfaff}{#1}");L("\\blueB","\\textcolor{##80f6ff}{#1}");L("\\blueC","\\textcolor{##63d9ea}{#1}");L("\\blueD","\\textcolor{##11accd}{#1}");L("\\blueE","\\textcolor{##0c7f99}{#1}");L("\\tealA","\\textcolor{##94fff5}{#1}");L("\\tealB","\\textcolor{##26edd5}{#1}");L("\\tealC","\\textcolor{##01d1c1}{#1}");L("\\tealD","\\textcolor{##01a995}{#1}");L("\\tealE","\\textcolor{##208170}{#1}");L("\\greenA","\\textcolor{##b6ffb0}{#1}");L("\\greenB","\\textcolor{##8af281}{#1}");L("\\greenC","\\textcolor{##74cf70}{#1}");L("\\greenD","\\textcolor{##1fab54}{#1}");L("\\greenE","\\textcolor{##0d923f}{#1}");L("\\goldA","\\textcolor{##ffd0a9}{#1}");L("\\goldB","\\textcolor{##ffbb71}{#1}");L("\\goldC","\\textcolor{##ff9c39}{#1}");L("\\goldD","\\textcolor{##e07d10}{#1}");L("\\goldE","\\textcolor{##a75a05}{#1}");L("\\redA","\\textcolor{##fca9a9}{#1}");L("\\redB","\\textcolor{##ff8482}{#1}");L("\\redC","\\textcolor{##f9685d}{#1}");L("\\redD","\\textcolor{##e84d39}{#1}");
vendor: 3,271 bytes, line 2314
2314L("\\redE","\\textcolor{##bc2612}{#1}");L("\\maroonA","\\textcolor{##ffbde0}{#1}");L("\\maroonB","\\textcolor{##ff92c6}{#1}");L("\\maroonC","\\textcolor{##ed5fa6}{#1}");L("\\maroonD","\\textcolor{##ca337c}{#1}");L("\\maroonE","\\textcolor{##9e034e}{#1}");L("\\purpleA","\\textcolor{##ddd7ff}{#1}");L("\\purpleB","\\textcolor{##c6b9fc}{#1}");L("\\purpleC","\\textcolor{##aa87ff}{#1}");L("\\purpleD","\\textcolor{##7854ab}{#1}");L("\\purpleE","\\textcolor{##543b78}{#1}");L("\\mintA","\\textcolor{##f5f9e8}{#1}");L("\\mintB","\\textcolor{##edf2df}{#1}");L("\\mintC","\\textcolor{##e0e5cc}{#1}");L("\\grayA","\\textcolor{##f6f7f7}{#1}");L("\\grayB","\\textcolor{##f0f1f2}{#1}");L("\\grayC","\\textcolor{##e3e5e6}{#1}");L("\\grayD","\\textcolor{##d6d8da}{#1}");L("\\grayE","\\textcolor{##babec2}{#1}");L("\\grayF","\\textcolor{##888d93}{#1}");L("\\grayG","\\textcolor{##626569}{#1}");L("\\grayH","\\textcolor{##3b3e40}{#1}");L("\\grayI","\\textcolor{##21242c}{#1}");L("\\kaBlue","\\textcolor{##314453}{#1}");L("\\kaGreen","\\textcolor{##71B307}{#1}");var OC={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class iQ{constructor(t,n,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=n,this.expansionCount=0,this.feed(t),this.macros=new aQ(rQ,n.macros),this.mode=a,this.stack=[]}feed(t){this.lexer=new h7(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var n,a,s;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:s,end:a}=this.consumeArg(["]"])}else({tokens:s,start:n,end:a}=this.consumeArg());return this.pushToken(new Ka("EOF",a.loc)),this.pushTokens(s),new Ka("",Ta.range(n,a))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var n=[],a=t&&t.length>0;a||this.consumeSpaces();var s=this.future(),o,c=0,d=0;do{if(o=this.popToken(),n.push(o),o.text==="{")++c;else if(o.text==="}"){if(--c,c===-1)throw new Se("Extra }",o)}else if(o.text==="EOF")throw new Se("Unexpected end of input in a macro argument, expected '"+(t&&a?t[d]:"}")+"'",o);if(t&&a)if((c===0||c===1&&t[d]==="{")&&o.text===t[d]){if(++d,d===t.length){n.splice(-d,d);break}}else d=0}while(c!==0||a);return s.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:s,end:o}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new Se("The length of delimiters doesn't match the number of args!");for(var a=n[0],s=0;s<a.length;s++){var o=this.popToken();if(a[s]!==o.text)throw new Se("Use of the macro doesn't match its definition",o)}}for(var c=[],d=0;d<t;d++)c.push(this.consumeArg(n&&n[d+1]).tokens);return c}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new Se("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var n=this.popToken(),a=n.text,s=n.noexpand?null:this._getExpansion(a);
vendor: 1,269 bytes, line 2314
2314if(s==null||t&&s.unexpandable){if(t&&s==null&&a[0]==="\\"&&!this.isDefined(a))throw new Se("Undefined control sequence: "+a);return this.pushToken(n),!1}this.countExpansion(1);var o=s.tokens,c=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){o=o.slice();for(var d=o.length-1;d>=0;--d){var h=o[d];if(h.text==="#"){if(d===0)throw new Se("Incomplete placeholder at end of macro body",h);if(h=o[--d],h.text==="#")o.splice(d+1,1);else if(/^[1-9]$/.test(h.text))o.splice(d,2,...c[+h.text-1]);else throw new Se("Not a valid argument number",h)}}}return this.pushTokens(o),o.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Ka(t)]):void 0}expandTokens(t){var n=[],a=this.stack.length;for(this.pushTokens(t);this.stack.length>a;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),n.push(s)}return this.countExpansion(n.length),n}expandMacroAsText(t){var n=this.expandMacro(t);return n&&n.map(a=>a.text).join("")}_getExpansion(t){var n=this.macros.get(t);if(n==null)return n;if(t.length===1){var a=this.lexer.catcodes[t];
vendor: 17,281 bytes, lines 2314-2315
2314if(a!=null&&a!==13)return}var s=typeof n=="function"?n(this):n;if(typeof s=="string"){var o=0;if(s.includes("#"))for(var c=s.replace(/##/g,"");c.includes("#"+(o+1));)++o;for(var d=new h7(s,this.settings),h=[],f=d.lex();f.text!=="EOF";)h.push(f),f=d.lex();h.reverse();var p={tokens:h,numArgs:o};return p}return s}isDefined(t){return this.macros.has(t)||Bi.hasOwnProperty(t)||Qt.math.hasOwnProperty(t)||Qt.text.hasOwnProperty(t)||OC.hasOwnProperty(t)}isExpandable(t){var n=this.macros.get(t);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Bi.hasOwnProperty(t)&&!Bi[t].primitive}}var p7=/^[âââââââââââ âââââââᵢⱼââââââáµ£ââᵤᵥâᵦᵧᵨᵩᵪ]/,Th=Object.freeze({"â":"+","â":"-","â":"=","â":"(","â":")","â":"0","â":"1","â":"2","â":"3","â":"4","â ":"5","â":"6","â":"7","â":"8","â":"9","â":"a","â":"e","â":"h","áµ¢":"i","â±¼":"j","â":"k","â":"l","â":"m","â":"n","â":"o","â":"p","áµ£":"r","â":"s","â":"t","ᵤ":"u","áµ¥":"v","â":"x","ᵦ":"β","áµ§":"γ","ᵨ":"Ï","ᵩ":"Ï","ᵪ":"Ï","âº":"+","â»":"-","â¼":"=","â½":"(","â¾":")","â°":"0","¹":"1","²":"2","³":"3","â´":"4","âµ":"5","â¶":"6","â·":"7","â¸":"8","â¹":"9","á´¬":"A","á´®":"B","á´°":"D","á´±":"E","á´³":"G","á´´":"H","á´µ":"I","á´¶":"J","á´·":"K","á´¸":"L","á´¹":"M","á´º":"N","á´¼":"O","á´¾":"P","á´¿":"R","áµ":"T","áµ":"U","â±½":"V","áµ":"W","áµ":"a","áµ":"b","á¶":"c","áµ":"d","áµ":"e","á¶ ":"f","áµ":"g",ʰ:"h","â±":"i",ʲ:"j","áµ":"k",Ë¡:"l","áµ":"m",â¿:"n","áµ":"o","áµ":"p",ʳ:"r",Ë¢:"s","áµ":"t","áµ":"u","áµ":"v",Ê·:"w",Ë£:"x",ʸ:"y","á¶»":"z","áµ":"β","áµ":"γ","áµ":"δ","áµ ":"Ï","ᵡ":"Ï","á¶¿":"θ"}),F1={"Ì":{text:"\\'",math:"\\acute"},"Ì":{text:"\\`",math:"\\grave"},"Ì":{text:'\\"',math:"\\ddot"},"Ì":{text:"\\~",math:"\\tilde"},"Ì":{text:"\\=",math:"\\bar"},"Ì":{text:"\\u",math:"\\breve"},"Ì":{text:"\\v",math:"\\check"},"Ì":{text:"\\^",math:"\\hat"},"Ì":{text:"\\.",math:"\\dot"},"Ì":{text:"\\r",math:"\\mathring"},"Ì":{text:"\\H"},"̧":{text:"\\c"}},x7={á:"aÌ",à :"aÌ",ä:"aÌ",Ç:"aÌÌ",ã:"aÌ",Ä:"aÌ",Ä:"aÌ",ắ:"aÌÌ",ằ:"aÌÌ",ẵ:"aÌÌ",Ç:"aÌ",â:"aÌ",ấ:"aÌÌ",ầ:"aÌÌ",ẫ:"aÌÌ",ȧ:"aÌ",Ç¡:"aÌÌ",Ã¥:"aÌ",Ç»:"aÌÌ",á¸:"bÌ",Ä:"cÌ",á¸:"çÌ",Ä:"cÌ",Ä:"cÌ",Ä:"cÌ",ç:"ç",Ä:"dÌ",á¸:"dÌ",á¸:"ḑ",é:"eÌ",è:"eÌ",ë:"eÌ",ẽ:"eÌ",Ä:"eÌ",á¸:"eÌÌ",á¸:"eÌÌ",Ä:"eÌ",á¸:"ȩÌ",Ä:"eÌ",ê:"eÌ",ế:"eÌÌ",á»:"eÌÌ",á» :"eÌÌ",Ä:"eÌ",È©:"ȩ",á¸:"fÌ",ǵ:"gÌ",ḡ:"gÌ",Ä:"gÌ",ǧ:"gÌ",Ä:"gÌ",Ä¡:"gÌ",Ä£:"ģ",ḧ:"hÌ",È:"hÌ",Ä¥:"hÌ",ḣ:"hÌ",ḩ:"ḩ",Ã:"iÌ",ì:"iÌ",ï:"iÌ",ḯ:"iÌÌ",Ä©:"iÌ",Ä«:"iÌ",Ä:"iÌ",Ç:"iÌ",î:"iÌ",ǰ:"jÌ",ĵ:"jÌ",ḱ:"kÌ",Ç©:"kÌ",Ä·:"ķ",ĺ:"lÌ",ľ:"lÌ",ļ:"ļ",ḿ:"mÌ",á¹:"mÌ",Å:"nÌ",ǹ:"nÌ",ñ:"nÌ",Å:"nÌ",á¹ :"nÌ",Å:"ņ",ó:"oÌ",ò:"oÌ",ö:"oÌ",È«:"oÌÌ",õ:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",È:"oÌÌ",Å:"oÌ",á¹:"oÌÌ",á¹:"oÌÌ",Å:"oÌ",Ç:"oÌ",ô:"oÌ",á»:"oÌÌ",á»:"oÌÌ",á»:"oÌÌ",ȯ:"oÌ",ȱ:"oÌÌ",Å:"oÌ",á¹:"pÌ",á¹:"pÌ",Å:"rÌ",Å:"rÌ",á¹:"rÌ",Å:"ŗ",Å:"sÌ",á¹¥:"sÌÌ",Å¡:"sÌ",á¹§:"sÌÌ",Å:"sÌ",ṡ:"sÌ",Å:"ş",áº:"tÌ",Å¥:"tÌ",ṫ:"tÌ",Å£:"ţ",ú:"uÌ",ù:"uÌ",ü:"uÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Ç:"uÌÌ",Å©:"uÌ",á¹¹:"uÌÌ",Å«:"uÌ",á¹»:"uÌÌ",Å:"uÌ",Ç:"uÌ",û:"uÌ",ů:"uÌ",ű:"uÌ",á¹½:"vÌ",áº:"wÌ",áº:"wÌ",Ạ:"wÌ",ŵ:"wÌ",áº:"wÌ",áº:"wÌ",áº:"xÌ",áº:"xÌ",ý:"yÌ",ỳ:"yÌ",ÿ:"yÌ",ỹ:"yÌ",ȳ:"yÌ",Å·:"yÌ",áº:"yÌ",áº:"yÌ",ź:"zÌ",ž:"zÌ",áº:"zÌ",ż:"zÌ",Ã:"AÌ",Ã:"AÌ",Ã:"AÌ",Ç:"AÌÌ",Ã:"AÌ",Ä:"AÌ",Ä:"AÌ",Ắ:"AÌÌ",Ằ:"AÌÌ",Ẵ:"AÌÌ",Ç:"AÌ",Ã:"AÌ",Ấ:"AÌÌ",Ầ:"AÌÌ",Ẫ:"AÌÌ",Ȧ:"AÌ",Ç :"AÌÌ",à :"AÌ",Ǻ:"AÌÌ",á¸:"BÌ",Ä:"CÌ",á¸:"ÇÌ",Ä:"CÌ",Ä:"CÌ",Ä:"CÌ",Ã:"Ç",Ä:"DÌ",á¸:"DÌ",á¸:"Ḑ",Ã:"EÌ",Ã:"EÌ",Ã:"EÌ",Ẽ:"EÌ",Ä:"EÌ",á¸:"EÌÌ",á¸:"EÌÌ",Ä:"EÌ",á¸:"ȨÌ",Ä:"EÌ",Ã:"EÌ",Ế:"EÌÌ",á»:"EÌÌ",á»:"EÌÌ",Ä:"EÌ",Ȩ:"Ȩ",á¸:"FÌ",Ç´:"GÌ",Ḡ:"GÌ",Ä:"GÌ",Ǧ:"GÌ",Ä:"GÌ",Ä :"GÌ",Ä¢:"Ģ",Ḧ:"HÌ",È:"HÌ",Ĥ:"HÌ",Ḣ:"HÌ",Ḩ:"Ḩ",Ã:"IÌ",Ã:"IÌ",Ã:"IÌ",Ḯ:"IÌÌ",Ĩ:"IÌ",Ī:"IÌ",Ĭ:"IÌ",Ç:"IÌ",Ã:"IÌ",İ:"IÌ",Ä´:"JÌ",Ḱ:"KÌ",Ǩ:"KÌ",Ķ:"Ķ",Ĺ:"LÌ",Ľ:"LÌ",Ä»:"Ļ",Ḿ:"MÌ",á¹:"MÌ",Å:"NÌ",Ǹ:"NÌ",Ã:"NÌ",Å:"NÌ",á¹:"NÌ",Å :"Ņ",Ã:"OÌ",Ã:"OÌ",Ã:"OÌ",Ȫ:"OÌÌ",Ã:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Ȭ:"OÌÌ",Å:"OÌ",á¹:"OÌÌ",á¹:"OÌÌ",Å:"OÌ",Ç:"OÌ",Ã:"OÌ",á»:"OÌÌ",á»:"OÌÌ",á»:"OÌÌ",È®:"OÌ",Ȱ:"OÌÌ",Å:"OÌ",á¹:"PÌ",á¹:"PÌ",Å:"RÌ",Å:"RÌ",á¹:"RÌ",Å:"Ŗ",Å:"SÌ",Ṥ:"SÌÌ",Å :"SÌ",Ṧ:"SÌÌ",Å:"SÌ",á¹ :"SÌ",Å:"Ş",Ť:"TÌ",Ṫ:"TÌ",Å¢:"Ţ",Ã:"UÌ",Ã:"UÌ",Ã:"UÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ç:"UÌÌ",Ũ:"UÌ",Ṹ:"UÌÌ",Ū:"UÌ",Ṻ:"UÌÌ",Ŭ:"UÌ",Ç:"UÌ",Ã:"UÌ",Å®:"UÌ",Ű:"UÌ",á¹¼:"VÌ",áº:"WÌ",áº:"WÌ",áº:"WÌ",Å´:"WÌ",áº:"WÌ",áº:"XÌ",áº:"XÌ",Ã:"YÌ",Ỳ:"YÌ",Ÿ:"YÌ",Ỹ:"YÌ",Ȳ:"YÌ",Ŷ:"YÌ",áº:"YÌ",Ź:"ZÌ",Ž:"ZÌ",áº:"ZÌ",Å»:"ZÌ",ά:"αÌ",á½°:"αÌ",á¾±:"αÌ",á¾°:"αÌ",Î:"εÌ",á½²:"εÌ",ή:"ηÌ",á½´:"ηÌ",ί:"ιÌ",á½¶:"ιÌ",Ï:"ιÌ",Î:"ιÌÌ",á¿:"ιÌÌ",á¿:"ιÌ",á¿:"ιÌ",Ï:"οÌ",ὸ:"οÌ",Ï:"Ï Ì",ὺ:"Ï Ì",Ï:"Ï Ì",ΰ:"Ï ÌÌ",á¿¢:"Ï ÌÌ",á¿¡:"Ï Ì",á¿ :"Ï Ì",Ï:"ÏÌ",á½¼:"ÏÌ",Î:"Î¥Ì",Ὺ:"Î¥Ì",Ϋ:"Î¥Ì",á¿©:"Î¥Ì",Ῠ:"Î¥Ì",Î:"ΩÌ",Ὼ:"ΩÌ"};class yf{constructor(t,n){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new iQ(t,n,this.mode),this.settings=n,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new Se("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var n=this.nextToken;this.consume(),this.gullet.pushToken(new Ka("}")),this.gullet.pushTokens(t);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,a}parseExpression(t,n){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(yf.endOfExpression.has(s.text)||n&&s.text===n||t&&Bi[s.text]&&Bi[s.text].infix)break;var o=this.parseAtom(n);if(o){if(o.type==="internal")continue}else break;a.push(o)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(t){for(var n=-1,a,s=0;s<t.length;s++){var o=t[s];if(o.type==="infix"){if(n!==-1)throw new Se("only one infix operator per group",o.token);n=s,a=o.replaceWith}}if(n!==-1&&a){var c,d,h=t.slice(0,n),f=t.slice(n+1);h.length===1&&h[0].type==="ordgroup"?c=h[0]:c={type:"ordgroup",mode:this.mode,body:h},f.length===1&&f[0].type==="ordgroup"?d=f[0]:d={type:"ordgroup",mode:this.mode,body:f};var p;return a==="\\\\abovefrac"?p=this.callFunction(a,[c,t[n],d],[]):p=this.callFunction(a,[c,d],[]),[p]}else return t}handleSupSubscript(t){var n=this.fetch(),a=n.text;this.consume(),this.consumeSpaces();var s;do{var o;s=this.parseGroup(t)}while(((o=s)==null?void 0:o.type)==="internal");if(!s)throw new Se("Expected group after '"+a+"'",n);return s}formatUnsupportedCmd(t){for(var n=[],a=0;a<t.length;a++)n.push({type:"textord",mode:"text",text:t[a]});var s={type:"text",mode:this.mode,body:n},o={type:"color",mode:this.mode,color:this.settings.errorColor,body:[s]};return o}parseAtom(t){var n=this.parseGroup("atom",t);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var a,s;;){this.consumeSpaces();var o=this.fetch();if(o.text==="\\limits"||o.text==="\\nolimits"){if(n&&n.type==="op"){var c=o.text==="\\limits";n.limits=c,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=o.text==="\\limits");else throw new Se("Limit controls must follow a math operator",o);this.consume()}else if(o.text==="^"){if(a)throw new Se("Double superscript",o);a=this.handleSupSubscript("superscript")}else if(o.text==="_"){if(s)throw new Se("Double subscript",o);s=this.handleSupSubscript("subscript")}else if(o.text==="'"){if(a)throw new Se("Double superscript",o);var d={type:"textord",mode:this.mode,text:"\\prime"},h=[d];for(this.consume();this.fetch().text==="'";)h.push(d),this.consume();this.fetch().text==="^"&&h.push(this.handleSupSubscript("superscript")),a={type:"ordgroup",mode:this.mode,body:h}}else if(Th[o.text]){var f=p7.test(o.text),p=[];for(p.push(new Ka(Th[o.text])),this.consume();;){var x=this.fetch().text;if(!Th[x]||p7.test(x)!==f)break;p.unshift(new Ka(Th[x])),this.consume()}var b=this.subparse(p);f?s={type:"ordgroup",mode:"math",body:b}:a={type:"ordgroup",mode:"math",body:b}}else break}return a||s?{type:"supsub",mode:this.mode,base:n,sup:a,sub:s}:n}parseFunction(t,n){var a=this.fetch(),s=a.text,o=Bi[s];if(!o)return null;if(this.consume(),n&&n!=="atom"&&!o.allowedInArgument)throw new Se("Got function '"+s+"' with no arguments"+(n?" as "+n:""),a);if(this.mode==="text"&&!o.allowedInText)throw new Se("Can't use function '"+s+"' in text mode",a);if(this.mode==="math"&&o.allowedInMath===!1)throw new Se("Can't use function '"+s+"' in math mode",a);var{args:c,optArgs:d}=this.parseArguments(s,o);return this.callFunction(s,c,d,a,t)}callFunction(t,n,a,s,o){var c={funcName:t,parser:this,token:s,breakOnTokenText:o},d=Bi[t];if(d&&d.handler)return d.handler(c,n,a);throw new Se("No function handler for "+t)}parseArguments(t,n){var a=n.numArgs+n.numOptionalArgs;if(a===0)return{args:[],optArgs:[]};for(var s=[],o=[],c=0;c<a;c++){var d=n.argTypes&&n.argTypes[c],h=c<n.numOptionalArgs;("primitive"in n&&n.primitive&&d==null||n.type==="sqrt"&&c===1&&o[0]==null)&&(d="primitive");var f=this.parseGroupOfType("argument to '"+t+"'",d,h);if(h)o.push(f);else if(f!=null)s.push(f);else throw new Se("Null argument, please report this as a bug")}return{args:s,optArgs:o}}parseGroupOfType(t,n,a){switch(n){case"color":return this.parseColorGroup(a);case"size":return this.parseSizeGroup(a);case"url":return this.parseUrlGroup(a);case"math":case"text":return this.parseArgumentGroup(a,n);case"hbox":{var s=this.parseArgumentGroup(a,"text");return s!=null?{type:"styling",mode:s.mode,body:[s],style:"text",resetFont:!0}:null}case"raw":{var o=this.parseStringGroup("raw",a);return o!=null?{type:"raw",mode:"text",string:o.text}:null}case"primitive":{if(a)throw new Se("A primitive argument cannot be optional");var c=this.parseGroup(t);if(c==null)throw new Se("Expected group as "+t,this.fetch());return c}case"original":case null:case void 0:return this.parseArgumentGroup(a);default:throw new Se("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(t,n){var a=this.gullet.scanArgument(n);if(a==null)return null;for(var s="",o;(o=this.fetch()).text!=="EOF";)s+=o.text,this.consume();return this.consume(),a.text=s,a}parseRegexGroup(t,n){for(var a=this.fetch(),s=a,o="",c;(c=this.fetch()).text!=="EOF"&&t.test(o+c.text);)s=c,o+=s.text,this.consume();if(o==="")throw new Se("Invalid "+n+": '"+a.text+"'",a);return a.range(s,o)}parseColorGroup(t){var n=this.parseStringGroup("color",t);if(n==null)return null;var a=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!a)throw new Se("Invalid color: '"+n.text+"'",n);var s=a[0];return/^[0-9a-f]{6}$/i.test(s)&&(s="#"+s),{type:"color-token",mode:this.mode,color:s}}parseSizeGroup(t){var n,a=!1;if(this.gullet.consumeSpaces(),!t&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",t),!n)return null;!t&&n.text.length===0&&(n.text="0pt",a=!0);var s=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!s)throw new Se("Invalid size: '"+n.text+"'",n);var o={number:+(s[1]+s[2]),unit:s[3]};if(!$k(o))throw new Se("Invalid unit: '"+o.unit+"'",n);return{type:"size",mode:this.mode,value:o,isBlank:a}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var a=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:a}}parseArgumentGroup(t,n){var a=this.gullet.scanArgument(t);if(a==null)return null;var s=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var c={type:"ordgroup",mode:this.mode,loc:a.loc,body:o};return n&&this.switchMode(s),c}parseGroup(t,n){var a=this.fetch(),s=a.text,o;if(s==="{"||s==="\\begingroup"){this.consume();var c=s==="{"?"}":"\\endgroup";this.gullet.beginGroup();var d=this.parseExpression(!1,c),h=this.fetch();this.expect(c),this.gullet.endGroup(),o={type:"ordgroup",mode:this.mode,loc:Ta.range(a,h),body:d,semisimple:s==="\\begingroup"||void 0}}else if(o=this.parseFunction(n,t)||this.parseSymbol(),o==null&&s[0]==="\\"&&!OC.hasOwnProperty(s)){if(this.settings.throwOnError)throw new Se("Undefined control sequence: "+s,a);o=this.formatUnsupportedCmd(s),this.consume()}return o}formLigatures(t){for(var n=t.length-1,a=0;a<n;++a){var s=t[a];if(s.type==="textord"){var o=s.text,c=t[a+1];if(!(!c||c.type!=="textord")){if(o==="-"&&c.text==="-"){var d=t[a+2];a+1<n&&d&&d.type==="textord"&&d.text==="-"?(t.splice(a,3,{type:"textord",mode:"text",loc:Ta.range(s,d),text:"---"}),n-=2):(t.splice(a,2,{type:"textord",mode:"text",loc:Ta.range(s,c),text:"--"}),n-=1)}(o==="'"||o==="`")&&c.text===o&&(t.splice(a,2,{type:"textord",mode:"text",loc:Ta.range(s,c),text:o+o}),n-=1)}}}}parseSymbol(){var t=this.fetch(),n=t.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var a=n.slice(5),s=a.charAt(0)==="*";if(s&&(a=a.slice(1)),a.length<2||a.charAt(0)!==a.slice(-1))throw new Se(`\\verb assertion failed -- 2315 please report what input caused this bug`);return a=a.slice(1,-1),{type:"verb",mode:"text",body:a,star:s}}x7.hasOwnProperty(n[0])&&!Qt[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',t),n=x7[n[0]]+n.slice(1));var o=tQ.exec(n);o&&(n=n.substring(0,o.index),n==="i"?n="ı":n==="j"&&(n="È·"));var c;if(Qt[this.mode][n]){this.settings.strict&&this.mode==="math"&&ob.includes(n)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',t);var d=Qt[this.mode][n].group,h=Ta.range(t),f;SK(d)?f={type:"atom",mode:this.mode,family:d,loc:h,text:n}:f={type:d,mode:this.mode,loc:h,text:n},c=f}else if(n.charCodeAt(0)>=128)this.settings.strict&&(Hk(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),t)),c={type:"textord",mode:"text",loc:Ta.range(t),text:n};else return null;if(this.consume(),o)for(var p=0;p<o[0].length;p++){var x=o[0][p];if(!F1[x])throw new Se("Unknown accent ' "+x+"'",t);var b=F1[x][this.mode]||F1[x].text;if(!b)throw new Se("Accent "+x+" unsupported in "+this.mode+" mode",t);c={type:"accent",mode:this.mode,loc:Ta.range(t),label:b,isStretchy:!1,isShifty:!0,base:c}}return c}}yf.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var x2=function(t,n){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var a=new yf(t,n);delete a.gullet.macros.current["\\df@tag"];var s=a.parse();if(delete a.gullet.macros.current["\\current@color"],delete a.gullet.macros.current["\\color"],a.gullet.macros.get("\\df@tag")){if(!n.displayMode)throw new Se("\\tag works only in display equations");s=[{type:"tag",mode:"text",body:s,tag:a.subparse([new Ka("\\df@tag")])}]}return s},LC=function(t,n,a){n.textContent="";var s=g2(t,a).toNode();n.appendChild(s)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),LC=function(){throw new Se("KaTeX doesn't work in quirks mode.")});var lQ=function(t,n){var a=g2(t,n).toMarkup();return a},oQ=function(t,n){var a=new n2(n);return x2(t,a)},PC=function(t,n,a){if(a.throwOnError||!(t instanceof Se))throw t;var s=ve(["katex-error"],[new Qa(n)]);return s.setAttribute("title",t.toString()),s.setAttribute("style","color:"+a.errorColor),s},g2=function(t,n){var a=new n2(n);try{var s=x2(t,a);return fK(s,t,a)}catch(o){return PC(o,t,a)}},cQ=function(t,n){var a=new n2(n);try{var s=x2(t,a);return pK(s,t,a)}catch(o){return PC(o,t,a)}},uQ="0.16.47",dQ={Span:Ac,Anchor:lf,SymbolNode:Qa,SvgNode:Ys,PathNode:Gi,LineN
2315ode:lb},g7={version:uQ,render:LC,renderToString:lQ,ParseError:Se,SETTINGS_SCHEMA:rb,__parse:oQ,__renderToDomTree:g2,__renderToHTMLTree:cQ,__setFontMetrics:XX,__defineSymbol:S,__defineFunction:Ie,__defineMacro:L,__domTree:dQ};const hQ={},mQ=[];function Nb(e){const t=e||hQ;return function(n,a){Dk(n,"element",function(s,o){const c=Array.isArray(s.properties.className)?s.properties.className:mQ,d=c.includes("language-math"),h=c.includes("math-display"),f=c.includes("math-inline");let p=h;if(!d&&!h&&!f)return;let x=o[o.length-1],b=s;if(s.tagName==="code"&&d&&x&&x.type==="element"&&x.tagName==="pre"&&(b=x,x=o[o.length-2],p=!0),!x)return;const v=oX(b,{whitespace:"pre"});let N;try{N=g7.renderToString(v,{...t,displayMode:p,throwOnError:!0})}catch(T){const E=T,D=E.name.toLowerCase();a.message("Could not render math with KaTeX",{ancestors:[...o,s],cause:E,place:s.position,ruleId:D,source:"rehype-katex"});try{N=g7.renderToString(v,{...t,displayMode:p,strict:"ignore",throwOnError:!1})}catch{N=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(T)},children:[{type:"text",value:v}]}]}}typeof N=="string"&&(N=eX(N).children);const j=x.children.indexOf(b);return x.children.splice(j,1,...N),_k})}}class Bm extends Error{constructor(t,n){super(t),this.name="AiServiceError",this.status=n}}async function fQ(e,t){const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const o=(await n.json().catch(()=>({}))).error||`Request failed (${n.status})`;throw new Bm(o,n.status)}return(await n.json()).text??""}async function b7(e,t,n=[],a,s,o,c,d,h){try{return await fQ("/api/guide",{promptText:e,context:t,history:n,image:a,mimeType:s,selectedExams:o,ongoingLearningPath:c,sessionTopic:d,mode:h==null?void 0:h.mode,exam:h==null?void 0:h.exam,subject:h==null?void 0:h.subject,topic:h==null?void 0:h.topic,studentContext:h==null?void 0:h.studentContext})}catch(f){throw f instanceof Bm?f:(console.error("AI Guide query failure:",f),new Bm(f instanceof Error?f.message:"Could not reach Socratech AI. Check your connection.",0))}}const Rm=[{id:"bot-upsc",botId:"UPSC",name:"UPSC Socratic Tutor",priceMonthly:499,priceQuarterly:1299,description:"Civil services, polity, essay logic & GS â dedicated UPSC persona.",badge:"IAS track",features:["UPSC-focused Socratic guide","Essay & answer writing drills","Current affairs reasoning","Unlimited UPSC threads"],ctaText:"Unlock UPSC",accentClass:"border-amber-300 bg-gradient-to-br from-amber-50 to-orange-50 text-slate-900",textAccentClass:"text-amber-700",sortOrder:0,active:!0},{id:"bot-jee",botId:"JEE",name:"JEE Socratic Tutor",priceMonthly:499,priceQuarterly:1299,description:"Physics, chemistry & math with JEE Main / Advanced rigor.",badge:"Most popular",features:["JEE-calibrated problem solving","Calculus & mechanics proofs","Organic / physical chemistry strategy","Unlimited JEE threads"],ctaText:"Unlock JEE",accentClass:"border-blue-300 bg-gradient-to-br from-blue-50 to-indigo-50 text-slate-900",textAccentClass:"text-blue-700",sortOrder:1,active:!0},{id:"bot-neet",botId:"NEET",name:"NEET Socratic Tutor",priceMonthly:499,priceQuarterly:1299,description:"Biology, botany, zoology & medical reasoning for NEET.",badge:"Medical",features:["NEET biology mechanisms","Diagram-based explanations","Clinical logic pathways","Unlimited NEET threads"],ctaText:"Unlock NEET",accentClass:"border-emerald-300 bg-gradient-to-br from-emerald-50 to-teal-50 text-slate-900",textAccentClass:"text-emerald-700",sortOrder:2,active:!0},{id:"bot-gate",botId:"GATE",name:"GATE Socratic Tutor",priceMonthly:499,priceQuarterly:1299,description:"CS, algorithms, engineering math & GATE-specific proofs.",badge:"Engineering",features:["GATE CS & core subjects","Algorithm & DS coaching","Numerical aptitude drills","Unlimited GATE threads"],ctaText:"Unlock GATE",accentClass:"border-purple-300 bg-gradient-to-br from-purple-50 to-pink-50 text-slate-900",textAccentClass:"text-purple-700",sortOrder:3,active:!0}];function pQ(e){const t=e.botId?String(e.botId):null,n=t==="UPSC"||t==="JEE"||t==="NEET"||t==="GATE"?t:null;return{id:String(e.id??""),botId:n,name:String(e.name??""),priceMonthly:Number(e.priceMonthly??0),priceQuarterly:Number(e.priceQuarterly??0),description:String(e.description??""),badge:e.badge?String(e.badge):void 0,features:Array.isArray(e.features)?e.features.map(String):[],ctaText:String(e.ctaText??"Choose plan"),accentClass:String(e.accentClass??"border-slate-200 bg-white"),textAccentClass:String(e.textAccentClass??"text-slate-600"),sortOrder:Number(e.sortOrder??0),active:e.active!==!1,createdAt:e.createdAt?String(e.createdAt):null}}
2315function Om(e,t){const n=t==="quarterly";return{id:e.id,botId:e.botId??null,name:e.name,price:n?e.priceQuarterly:e.priceMonthly,period:n?"quarter":"month",desc:e.description,badge:e.badge,features:e.features,ctaText:e.ctaText,accentClass:e.accentClass,textAccentClass:e.textAccentClass}}async function xQ(){try{const t=((await Un("/api/plans")).plans??[]).map(pQ).filter(n=>n.active);return t.length===0?Rm.map(n=>({...n,createdAt:null})):t.sort((n,a)=>n.sortOrder-a.sortOrder)}catch{return Rm.map(e=>({...e,createdAt:null}))}}const gQ=Rm.map(e=>({...e,createdAt:null}));function b2(){const[e,t]=w.useState(gQ),[n,a]=w.useState(!0);return w.useEffect(()=>{let s=!1;return(async()=>{a(!0);const o=await xQ();s||(t(o),a(!1))})(),()=>{s=!0}},[]),{plans:e,loading:n}}function bQ({botId:e,onUpgrade:t,onUseGeneral:n,billingCycle:a="monthly"}){var p;const s=m0(e),{plans:o,loading:c}=b2(),d=LV(o,e),h=d?Om(d,a):null,f=m0(Ht);return i.jsxs(ze.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"flex flex-col items-center justify-center min-h-[min(420px,60vh)] px-4 py-10 text-center select-none",children:[i.jsx("div",{className:"w-20 h-20 rounded-3xl bg-gradient-to-br from-slate-100 to-slate-50 border border-slate-200 flex items-center justify-center text-4xl shadow-sm mb-5",children:(s==null?void 0:s.icon)??"ð"}),i.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-amber-50 border border-amber-200 text-[10px] font-bold text-amber-800 uppercase tracking-wide mb-3",children:[i.jsx(Or,{size:12}),"Specialist tutor locked"]}),i.jsxs("h2",{className:"text-xl sm:text-2xl font-extrabold text-slate-900 tracking-tight max-w-md",children:["Unlock ",(s==null?void 0:s.name)??e]}),i.jsxs("p",{className:"text-sm text-slate-500 mt-2 max-w-lg leading-relaxed",children:[s==null?void 0:s.desc," Purchase this exam bot on Premium with secure Razorpay checkout â access starts instantly in Guide."]}),h?i.jsxs("p",{className:"mt-4 text-2xl font-black text-slate-900",children:["â¹",h.price.toLocaleString("en-IN"),i.jsxs("span",{className:"text-sm font-semibold text-slate-400",children:[" / ",h.period]})]}):c?i.jsx("p",{className:"mt-4 text-xs text-slate-400",children:"Loading plan from adminâ¦"}):i.jsxs("p",{className:"mt-4 text-xs text-amber-700 bg-amber-50 border border-amber-100 rounded-lg px-3 py-2 max-w-sm",children:["Admin has not published a plan for ",e," yet. Ask admin to create a plan with bot"," ",e," in Admin â Plans."]}),i.jsx("ul",{className:"mt-6 space-y-2 text-left max-w-sm w-full",children:((p=d==null?void 0:d.features)!=null&&p.length?d.features.slice(0,4):["Exam-specific Socratic persona","Unlimited threads for this bot","Priority AI responses","Saved to your profile after payment"]).map(x=>i.jsxs("li",{className:"flex items-start gap-2 text-xs font-semibold text-slate-600",children:[i.jsx(Xa,{size:14,className:"text-[#00B5B5] shrink-0 mt-0.5"}),i.jsx("span",{children:x})]},x))}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mt-8 w-full max-w-sm",children:[i.jsxs("button",{type:"button",onClick:t,disabled:!d&&!c,className:"flex-1 py-3.5 px-5 rounded-xl bg-slate-900 hover:bg-[#008F8F] text-white font-bold text-sm flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed shadow-lg",children:[i.jsx(Sr,{size:16}),"Upgrade ",e,i.jsx(pn,{size:16})]}),i.jsxs("button",{type:"button",onClick:n,className:"flex-1 py-3.5 px-5 rounded-xl border border-slate-200 bg-white hover:bg-slate-50 text-slate-700 font-bold text-sm cursor-pointer",children:["Use ",f==null?void 0:f.icon," General (free)"]})]}),i.jsxs("p",{className:"mt-6 text-[10px] text-slate-400 flex items-center justify-center gap-1.5 max-w-md",children:[i.jsx(Tn,{size:12,className:"text-[#00B5B5]"}),"Payments verified on server · Opens Premium checkout for ",e]})]})}function yQ(e,t){var s;const n=(e??"").trim();if(n){const o=n.split(/\s+/).filter(Boolean);return o.length>=2?`${o[0][0]}${o[o.length-1][0]}`.toUpperCase():o[0].length>=2?o[0].slice(0,2).toUpperCase():((s=o[0][0])==null?void 0:s.toUpperCase())??"?"}const a=(t??"").trim();return a?a[0].toUpperCase():"?"}function vQ(e){if(!(e!=null&&e.trim()))return!1;const t=e.trim();return t.includes("dicebear.com")?!1:t.startsWith("http://")||t.startsWith("https://")}function Il({photoURL:e,displayName:t,email:n,className:a,textClassName:s,title:o}){const[c,d]=w.useState(!1),h=vQ(e)&&!c,f=yQ(t,n),p=o??t??n??"User";return h&&e?i.jsx("img",{src:e,alt:"",title:p,className:he("object-cover bg-slate-100",a),onError:()=>d(!0),referrerPolicy:"no-referrer"}):i.jsx("span",{title:p,className:he("inline-flex items-center justify-center font-bold uppercase bg-gradient-to-br from-[#00B5B5]/20 to-teal-100 text-[#008F8F] border border-teal-100/80 select-none",a,s??"text-[10px]"),"aria-hidden":!0,
2315children:f})}function Go(e,t={}){kn("/api/analytics/events",{eventType:e,...t}).catch(()=>{})}async function wQ(e=30){return Un(`/api/analytics/me?days=${e}`)}function V1(e){return e.replace(/[#*`~_]/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/<\/?[^>]+(>|$)/g,"").replace(/[\n\r]+/g," ").trim()}function y7({user:e,activeSessionId:t,setActiveSessionId:n,sessionTopic:a,onNavigate:s,onToggleSidebar:o,sessions:c,onDeleteSession:d,onBotChange:h}){var Ar,gn,$n,xs,Ql,X0,K0;const{chatBots:f}=ds(),p=w.useMemo(()=>f.length?f:$s,[f]),x=ea(),b=hH(),{handleLogout:v}=za(),[N,j]=w.useState(!1),[T,E]=w.useState(()=>kw(e));w.useEffect(()=>{const Q=kw(e);E(be=>be===Q?be:Q)},[e==null?void 0:e.uid,e==null?void 0:e.botLicenses,e==null?void 0:e.unlockedBots]);const[D,k]=w.useState(!1),[M,B]=w.useState(!1),[_,U]=w.useState(null),F=Q=>Q instanceof Bm?(Q.status===403&&fn(T)&&U(T),Q.message):Q instanceof cS||Q instanceof Error?Q.message:"Failed to sync with AI Shield.",[W,ae]=w.useState(0);w.useEffect(()=>{if(T!=="General")return;const Q=setInterval(()=>{ae(be=>(be+1)%u1.length)},12e3);return()=>clearInterval(Q)},[T]);const le=on(e,T);p.find(Q=>Q.id===T);const re=fn(T)?p0(e,T):null,xe=Q=>{uc(Q),k(!1),U(null),s==null||s("premium")},te=Q=>{U(null),E(Q),localStorage.setItem(f0,Q),h==null||h(Q),n(null),Go("bot_selected",{botId:Q}),!on(e,Q)&&fn(Q)},H=()=>{const Q=_??(fn(T)?T:null);Q&&xe(Q)},V=c.filter(Q=>Q.botId===T||!Q.botId&&T==="General");w.useEffect(()=>{localStorage.setItem(f0,T),h==null||h(T)},[T]);const[ne,Z]=w.useState(""),[Y,I]=w.useState(!1),[R,J]=w.useState([]),[P,ge]=w.useState(null);w.useEffect(()=>{const Q=oH();Q&&(Q.botId&&p.some(be=>be.id===Q.botId)&&on(e,Q.botId)&&E(Q.botId),Z(Q.chatPrompt),ge(`${Q.topic} · ${Q.kind[0].toUpperCase()}${Q.kind.slice(1)} stage â send to start the Socratic step`),n(null))},[]);const[Ee,Te]=w.useState(""),[Ve,et]=w.useState(""),[Re,kt]=w.useState(""),[yt,Yt]=w.useState(!1),[cn,vt]=w.useState(null),Ae=w.useRef(null),it=w.useRef(null),[de,Me]=w.useState(!1),[Bt,xn]=w.useState(null),[Vn,Da]=w.useState("user"),Zt=w.useRef(null),Ct=w.useRef(null),Ba=w.useRef(!1),[ue,we]=w.useState(!1),Ue=w.useRef(!1),[Le,st]=w.useState("idle"),[na,oa]=w.useState(""),[Hn,Wt]=w.useState(""),[In,Tt]=w.useState(!1),[Cr,ca]=w.useState(null),zn=w.useRef(null),un=w.useRef(typeof window<"u"?window.speechSynthesis:null),Xl=w.useRef(null);w.useEffect(()=>()=>{un.current&&un.current.cancel(),zn.current&&(zn.current.onend=null,zn.current.onerror=null,zn.current.onresult=null,zn.current.stop())},[]);const nl=Q=>{const be=[...Q].sort((He,Rt)=>Date.parse(He.createdAt)-Date.parse(Rt.createdAt)),De=[];for(const He of be)De.push({id:He.id+"-q",text:He.question,isAi:!1,timestamp:He.createdAt,imageUrl:He.imageUrl||void 0}),He.explanation&&De.push({id:He.id+"-a",text:He.explanation,isAi:!0,timestamp:He.createdAt});return De},Pr=async Q=>{const be=await Bw(Q);J(nl(be))};w.useEffect(()=>{if(!(e!=null&&e.uid)||!t){J([]);return}let Q=!1;const be=async()=>{try{const He=await Bw(t);Q||J(nl(He))}catch(He){console.error("[chat messages]",He)}};be();const De=setInterval(()=>void be(),8e3);return()=>{Q=!0,clearInterval(De)}},[e==null?void 0:e.uid,t]),w.useEffect(()=>{Ae.current&&Ae.current.scrollIntoView({behavior:"smooth"})},[R,Y]);const Kl=Q=>{var He;const be=(He=Q.target.files)==null?void 0:He[0];if(!be)return;if(!be.type.startsWith("image/")){alert("Invalid format. Please upload an image file (PNG/JPG).");return}Yt(!0);const De=new FileReader;De.onload=Rt=>{var nn;const ot=new Image;ot.onload=()=>{const pt=document.createElement("canvas"),ua=800;let bn=ot.width,At=ot.height;(bn>ua||At>ua)&&(bn>At?(At=Math.round(At*ua/bn),bn=ua):(bn=Math.round(bn*ua/At),At=ua)),pt.width=bn,pt.height=At;const nr=pt.getContext("2d");if(nr){nr.drawImage(ot,0,0,bn,At);const Gn="image/jpeg";let ar=.6,va=pt.toDataURL(Gn,ar);for(;va.length>7e5&&ar>.1;)ar-=.1,va=pt.toDataURL(Gn,ar);et(va),Te(va.split(",")[1]),kt(Gn)}Yt(!1)},ot.onerror=()=>{alert("Failed to process doubt image."),Yt(!1)},ot.src=(nn=Rt.target)==null?void 0:nn.result},De.readAsDataURL(be)},Ur=()=>{Te(""),et(""),kt(""),it.current&&(it.current.value="")},Y0=async()=>{const Q=Ct.current;
2315if(Q&&Q.getTracks().forEach(be=>{try{be.stop()}catch{}}),Ct.current=null,xn(null),Zt.current){try{Zt.current.pause()}catch{}Zt.current.srcObject=null}await new Promise(be=>setTimeout(be,300))},Ic=async Q=>{const be=Q??Vn;try{vt(null),Me(!0),await Y0();const De=await navigator.mediaDevices.getUserMedia({audio:!1,video:{facingMode:{ideal:be}}});if(Ct.current=De,xn(De),Zt.current){Zt.current.srcObject=De;try{await Zt.current.play()}catch{}}}catch(De){console.error("Webcam video input failed to load",De),Ct.current=null,xn(null),(De==null?void 0:De.name)==="NotAllowedError"||(De==null?void 0:De.name)==="NotFoundError"?vt({title:"Camera Access Blocked",message:"Please allow camera hardware permissions in your browser settings to use the Socratic Scanner."}):vt({title:"Camera Hardware Error",message:"Unable to start camera. Please ensure your device has a working camera hardware component."}),Me(!1)}},al=()=>{(async()=>(await Y0(),Me(!1)))()},rl=()=>{if(Ba.current||!de)return;const Q=Vn==="user"?"environment":"user";Ba.current=!0,Da(Q),(async()=>{try{await Ic(Q)}finally{Ba.current=!1}})()},wf=()=>{if(Zt.current)try{const Q=Zt.current,be=document.createElement("canvas");let De=Q.videoWidth||640,He=Q.videoHeight||480;const Rt=800;(De>Rt||He>Rt)&&(De>He?(He=Math.round(He*Rt/De),De=Rt):(De=Math.round(De*Rt/He),He=Rt)),be.width=De,be.height=He;const ot=be.getContext("2d");if(ot){Vn==="user"&&(ot.translate(be.width,0),ot.scale(-1,1)),ot.drawImage(Q,0,0,be.width,be.height);let nn=.6,pt=be.toDataURL("image/jpeg",nn);for(;pt.length>7e5&&nn>.1;)nn-=.1,pt=be.toDataURL("image/jpeg",nn);et(pt),Te(pt.split(",")[1]),kt("image/jpeg")}al()}catch(Q){console.error("Camera snapshot capture error:",Q),alert("Failed capturing snapshot from webcam video frame.")}};w.useEffect(()=>{de&&Bt&&Zt.current&&(Zt.current.srcObject=Bt)},[de,Bt]),w.useEffect(()=>()=>{const Q=Ct.current;Q&&Q.getTracks().forEach(be=>{try{be.stop()}catch{}}),Ct.current=null},[]);const zc=window.SpeechRecognition||window.webkitSpeechRecognition,_c=()=>{if(!on(e,T)){fn(T)?xe(T):U(null);return}we(!0),Ue.current=!0,st("speaking"),oa(""),Wt("Establishing Socratic neural link...");const Q="Socratic connection established! Let's begin our oral dialogue. What topic or competitive system are we calibrating today?",be=V1(Q);Wt(be),Qs(Q,()=>{Fr()})},Dc=()=>{if(we(!1),Ue.current=!1,st("idle"),un.current&&un.current.cancel(),zn.current)try{zn.current.onend=null,zn.current.onerror=null,zn.current.onresult=null,zn.current.stop()}catch(Q){console.warn("Speech recognition cancel error",Q)}},Fr=()=>{if(!zc){oa("Voice recognition is not supported in this browser environment. Try Chrome or Safari."),st("idle");return}if(zn.current)try{zn.current.onend=null,zn.current.onerror=null,zn.current.onresult=null,zn.current.onstart=null,zn.current.abort()}catch(be){console.warn("Error cleaning up previous speech instance",be)}st("listening"),oa("");const Q=new zc;Q.continuous=!1,Q.interimResults=!0,Q.lang="en-US",Q.onstart=()=>{console.log("Socratic Mic Activated")},Q.onresult=be=>{const De=be.resultIndex,He=be.results[De][0].transcript;oa(He)},Q.onerror=be=>{console.warn("Speech recognition alert",be.error),be.error==="no-speech"||be.error==="network"?setTimeout(()=>{Ue.current&&Le==="listening"&&Fr()},500):be.error==="aborted"||(be.error==="not-allowed"||be.error==="audio-capture"?(console.error(`Academic Mic error: ${be.error}`),st("idle"),we(!1),Ue.current=!1,vt({title:"Microphone Access Blocked",message:"Please allow microphone hardware permissions in your browser settings to use Socratic Voice Dialogue."})):(st("idle"),we(!1),Ue.current=!1,vt({title:"Audio Hardware Error",message:`Unable to access audio input (${be.error}). Please check your microphone hardware.`})))},Q.onend=()=>{oa(be=>{const De=be.trim();return De?(st("processing"),W0(De)):setTimeout(()=>{Ue.current&&Fr()},800),be})},zn.current=Q;try{Q.start()}catch(be){console.error(be)}},Qs=(Q,be)=>{if(!un.current){be&&be();return}if(un.current.cancel(),In){be&&be();return}const De=V1(Q),He=new SpeechSynthesisUtterance(De);Xl.current=He;const Rt=un.current.getVoices();let ot=Rt.find(At=>At.lang.startsWith("en-US")||At.lang.startsWith("en-GB")||At.name.includes("Google")),nn=.9,pt=1.05;const ua=Rt.find(At=>At.lang==="en-GB"&&(At.name.includes("Male")||At.name.includes("Google UK English Male"))),bn=Rt.find(At=>At.lang==="en-GB");ua?ot=ua:bn&&(ot=bn),ot&&(He.voice=ot),He.rate=pt,He.pitch=nn,He.onend=()=>{be&&be()},He.onerror=()=>{be&&be()},un.current.speak(He)},W0=async Q=>{if(!on(e,T)){U(T);return}try{let be=t;if(!be){let ot=Q.slice(0,40);Q.length>40&&(ot+="..."),be=(await Dw({title:ot,botId:T})).id,n(be)}const De=[];R.forEach(ot=>{De.push({role:ot.isAi?"model":"user",text:ot.text})});const He=await b7(Q,T,De,void 0,void 0,[T,...(e==null?void 0:e.selectedExams)||[]],e==null?void 0:e.ongoingLearningPath,a);await Rw(be,{question:Q,explanation:He,imageUrl:null}),await Pr(be),st("speaking");const Rt=V1(He);Wt(Rt),Qs(He,()=>
2315{Ue.current&&Fr()})}catch(be){console.error(be),st("speaking");const De=F(be);Wt(De.replace(/\*\*/g,"")),Qs(De,()=>{Ue.current&&Fr()})}},Bc=async Q=>{if(Q.preventDefault(),!ne.trim()&&!Ee||Y)return;if(!on(e,T)){U(T);return}const be=ne,De=Ee,He=Ve,Rt=Re;Z(""),Ur(),I(!0);try{let ot=t;if(!ot){let Gn=be.slice(0,40);!Gn&&De?Gn="Photo Query Attachment":be.length>40&&(Gn+="..."),ot=(await Dw({title:Gn,botId:T})).id,n(ot)}const nn=6,pt=R.slice(-nn),ua=R.slice(0,Math.max(0,R.length-nn)),bn=[];let At="";for(ua.length>0&&(At=`[SYSTEM NOTE: Earlier context summarized to save tokens. Topics discussed: ${ua.map(Gn=>Gn.text.substring(0,30).replace(/\n/g," ")).join(" | ")}...] 2316 2317`),pt.forEach((Gn,ar)=>{let va=Gn.text;ar===0&&At&&(va=At+va),va.length>2e3&&(va=va.substring(0,2e3)+` 2318...[Content truncated for context limits]`),bn.push({role:Gn.isAi?"model":"user",text:va,image:void 0})});bn.length>0&&bn[0].role!=="user";)bn.shift();const nr=await b7(be||"Examine attachment",T,bn,De||void 0,Rt||void 0,[T,...(e==null?void 0:e.selectedExams)||[]],e==null?void 0:e.ongoingLearningPath,a);try{await Rw(ot,{question:be||"Examine doubt photo attachment.",explanation:nr,imageUrl:He||null}),await Pr(ot)}catch(Gn){J(ar=>[...ar,{id:Date.now()+"-"+Math.random().toString(36).substring(7)+"-q",text:be,isAi:!1,timestamp:new Date,imageUrl:He},{id:Date.now()+"-"+Math.random().toString(36).substring(7)+"-a",text:nr,isAi:!0,timestamp:new Date}]),console.error("[chat] persist message:",Gn)}}catch(ot){console.error("AI Guide Error:",ot),J(nn=>[...nn,{id:Date.now()+"-"+Math.random().toString(36).substring(7)+"-q",text:be,isAi:!1,timestamp:new Date,imageUrl:He},{id:Date.now()+"-"+Math.random().toString(36).substring(7)+"-err",text:`â ï¸ **GUIDE RESPONSE**: ${F(ot)}`,isAi:!0,timestamp:new Date}])}finally{I(!1)}};return i.jsxs("div",{className:"flex-1 w-full flex flex-col items-center justify-center bg-[#F8FAFC] relative overflow-hidden select-none font-sans min-h-0",children:[i.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none opacity-40",children:[i.jsx("div",{className:"absolute top-[5%] left-[12%] w-[450px] h-[450px] rounded-full bg-gradient-to-tr from-teal-200/20 to-emerald-200/10 blur-[110px]"}),i.jsx("div",{className:"absolute bottom-[8%] right-[10%] w-[500px] h-[500px] rounded-full bg-gradient-to-br from-blue-200/20 to-indigo-100/10 blur-[120px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.015)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.015)_1px,transparent_1px)] bg-[size:3rem_3rem]"})]}),i.jsx("input",{type:"file",ref:it,onChange:Kl,accept:"image/*",className:"hidden"}),i.jsx(bt,{children:_?i.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4",children:[i.jsx(ze.div,{initial:{opacity:0}
2318,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-slate-900/45 backdrop-blur-sm",onClick:()=>U(null)}),i.jsxs(ze.div,{initial:{opacity:0,scale:.95,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:8},className:"relative w-full max-w-md bg-white rounded-3xl shadow-xl p-6 text-center space-y-4",children:[i.jsx("div",{className:"w-14 h-14 mx-auto rounded-2xl bg-slate-100 flex items-center justify-center text-2xl",children:(Ar=p.find(Q=>Q.id===_))==null?void 0:Ar.icon}),i.jsxs("h3",{className:"text-lg font-bold text-slate-900",children:["Unlock ",_," tutor"]}),i.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:"This exam specialist is a paid add-on. Complete secure Razorpay checkout on Premium â General Coach stays free."}),i.jsxs("div",{className:"flex gap-2 pt-2",children:[i.jsx("button",{type:"button",onClick:()=>U(null),className:"flex-1 py-2.5 rounded-xl border border-slate-200 text-sm font-semibold cursor-pointer",children:"Cancel"}),i.jsx("button",{type:"button",onClick:H,className:"flex-1 py-2.5 rounded-xl bg-slate-900 text-white text-sm font-semibold cursor-pointer hover:bg-[#008F8F]",children:"Go to checkout"})]})]})]}):null}),i.jsx(bt,{children:cn&&i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[i.jsx(ze.div,{initial:{opacity:0}
2318,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-slate-900/40 backdrop-blur-sm",onClick:()=>vt(null)}),i.jsx(ze.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},className:"relative w-full max-w-sm bg-white rounded-3xl shadow-xl overflow-hidden",children:i.jsxs("div",{className:"p-6 text-center space-y-4",children:[i.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-2xl flex items-center justify-center mx-auto text-red-500 mb-2",children:i.jsx(My,{size:28})}),i.jsx("h3",{className:"text-[14px] font-bold text-slate-800 uppercase tracking-wide",children:cn.title}),i.jsx("p",{className:"text-[12px] text-slate-500 font-medium leading-relaxed",children:cn.message}),i.jsx("div",{className:"pt-4",children:i.jsx("button",{onClick:()=>vt(null),className:"w-full py-3 bg-red-500 hover:bg-red-600 text-white rounded-xl font-bold text-[11px] uppercase tracking-wider transition-colors",children:"Dismiss"})})]})})]})}),i.jsxs("div",{className:"w-full flex-1 flex flex-col md:grid md:grid-cols-12 gap-4 md:gap-5 lg:gap-6 p-0 sm:p-4 md:p-5 lg:p-6 relative z-10 overflow-hidden min-h-0 max-w-[1600px] mx-auto transition-all duration-300",children:[i.jsxs("div",{className:"hidden md:flex flex-col md:col-span-4 lg:col-span-3 h-full gap-4 lg:gap-6 overflow-hidden",children:[i.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-6 overflow-y-auto custom-scrollbar flex-1 border-none text-slate-800",children:[i.jsx("h2",{className:"text-[10px] font-black uppercase text-slate-400 tracking-widest mb-4",children:"Tutor Persona"}),i.jsx("div",{className:"space-y-3",children:p.map(Q=>{const be=T===Q.id,De=on(e,Q.id),He=Q.paid&&fn(Q.id)?p0(e,Q.id):null;return i.jsxs("div",{onClick:()=>te(Q.id),className:he("p-4 rounded-2xl text-left cursor-pointer transition-all flex items-start gap-3.5 relative",be?"bg-[#00B5B5]/5 text-slate-900 shadow-[inset_0_0_0_1px_rgba(0,181,181,0.1)]":"bg-slate-50/50 hover:bg-slate-50 text-slate-650",!De&&"opacity-90"),children:[!De&&Q.paid?i.jsx("span",{className:"absolute top-3 right-3 text-slate-400",children:i.jsx(Or,{size:12})}):null,i.jsx("div",{className:he("w-9 h-9 rounded-xl flex items-center justify-center text-lg shrink-0 shadow-sm transition-all",be?"text-white bg-gradient-to-br "+Q.color:"bg-white text-slate-400"),children:Q.icon}),i.jsxs("div",{className:"space-y-1 flex-1 leading-none mt-0.5 min-w-0",children:[i.jsx("span",{className:"text-[11px] font-bold text-slate-800 block uppercase tracking-tight truncate",children:Q.name}),i.jsx("p",{className:"text-[9px] text-slate-400 font-semibold uppercase leading-tight pt-0.5",children:De&&He?`${He.planName} · till ${gr(He.expiresAt)}`:De?Q.subtitle:"Purchase required"}),!De&&Q.paid?i.jsx("button",{type:"button",onClick:Rt=>{Rt.stopPropagation(),fn(Q.id)&&xe(Q.id)},className:"mt-2 text-[9px] font-bold text-white bg-slate-900 hover:bg-[#008F8F] px-2.5 py-1 rounded-lg cursor-pointer uppercase tracking-wide",children:"Upgrade"}):Q.id==="General"?i.jsx("span",{className:"mt-1 inline-block text-[8px] font-bold text-emerald-600 uppercase",children:"Free"}):null]})]},Q.id)})})]}),i.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-6 border-none shrink-0 text-slate-800",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsx("h2",{className:"text-[10px] font-black uppercase text-slate-400 tracking-widest",children:"Audio Engine"}),i.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-teal-500 animate-pulse"})]}),i.jsxs("button",{type:"button",onClick:_c,disabled:!le,className:"w-full mt-4 py-3 bg-[#00B5B5]/10 text-[#00B5B5] hover:bg-[#00B5B5] hover:text-white transition-all rounded-2xl cursor-pointer flex items-center justify-center gap-2 font-bold text-[10px] uppercase tracking-wider shadow-sm disabled:opacity-40 disabled:cursor-not-allowed",children:[i.jsx(xw,{size:14,className:"animate-pulse"})," Engage Voice"]})]})]}),i.jsxs("div",{className:"col-span-12 md:col-span-8 lg:col-span-6 bg-white sm:rounded-3xl shadow-sm flex flex-col relative overflow-hidden border-none flex-1 md:h-full min-h-0 w-full",children:[i.jsxs("header",{className:"relative z-20 flex items-center justify-between gap-2 px-3 sm:px-6 py-2.5 sm:py-4 lg:py-5 pt-safe bg-white/85 backdrop-blur-md border-b border-slate-50 shrink-0 select-none min-w-0",children:[i.jsxs("div",{className:"flex md:hidden items-center justify-between gap-2 w-full min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[o?i.jsx("button",{type:"button",onClick:o,className:"touch-target flex items-center justify-center hover:bg-slate-50 rounded-xl text-slate-400 hover:text-[#00B5B5] transition-all cursor-pointer active:scale-95 shrink-0",title:"Menu",children:i.jsx(bm,{size:20})}):null,i.jsxs("div",{className:"min-w-0 text-left",children:[i.jsx("p",{className:"text-[9px] font-bold uppercase tracking-wider text-slate-400 leading-none",children:"Active tutor"}),i.jsx("h3",{className:"text-sm font-bold text-slate-900 truncate leading-tight mt-0.5",children:((gn=p.find(Q=>Q.id===T))==null?void 0:gn.name)??T}),!le&&fn(T)?i.jsx("p",{className:"text-[9px] font-semibold text-amber-600 mt-0.5",children:"Locked"}):null]})]}),i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[i.jsx(Lg,{user:e,onViewAll:()=>s==null?void 0:s("notifications")}),i.jsx("button",{type:"button",onClick:()=>k(!0),className:"touch-target flex items-center justify-center rounded-xl bg-slate-50 text-slate-500 hover:text-[#00B5B5] hover:bg-[#00B5B5]/10 active:scale-95 transition-all cursor-pointer",title:"Change tutor",children:i.jsx(Tl,{size:18})}),i.jsxs("button",{type:"button",onClick:()=>B(!0),className:"touch-target flex items-center justify-center bg-slate-50 text-slate-500 hover:text-[#00B5B5] hover:bg-[#00B5B5]/10 active:scale-95 rounded-xl transition-all cursor-pointer relative",title:"Chat history",children:[i.jsx(pw,{size:18}),V.length>0?i.jsxs("span",{className:"absolute top-1 right-1 flex h-1.5 w-1.5",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-teal-400 opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-teal-500"})]}):null]}),i.jsxs("div",{className:"relative",children:[i.jsx("button",{type:"button",onClick:()=>j(Q=>!Q),className:"relative active:scale-90 transition-all cursor-pointer w-9 h-9 rounded-xl border border-slate-200 overflow-hidden","aria-label":"Open profile menu",children:i.jsx(Il,{photoURL:e.ph
2318otoURL,displayName:e.displayName,email:e.email,className:"w-full h-full rounded-xl",textClassName:"text-[10px]"})}),i.jsx(bt,{children:N?i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>j(!1),className:"fixed inset-0 z-40 cursor-default"}),i.jsxs(ze.div,{initial:{opacity:0,y:8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.97},transition:{duration:.12},className:"absolute top-[44px] right-0 w-56 bg-white rounded-xl border border-slate-200/80 shadow-[0_4px_20px_rgba(0,0,0,0.06)] z-50 p-3 text-left",children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsxs("button",{type:"button",onClick:()=>{s==null||s("account"),j(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer active:scale-[0.98]",children:[i.jsx(h0,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"My Account"})]}),i.jsxs("button",{type:"button",onClick:()=>{s==null||s("report"),j(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg hover:bg-amber-50/80 text-amber-900 transition-colors text-xs font-semibold text-left cursor-pointer active:scale-[0.98]",children:[i.jsx(Vi,{size:14,className:"text-amber-600"}),i.jsx("span",{children:"Report an issue"})]}),i.jsxs("button",{type:"button",onClick:()=>{s==null||s("dashboard"),j(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer active:scale-[0.98]",children:[i.jsx(vr,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"Inquiry Dashboard"})]})]}),i.jsx("div",{className:"pt-2 mt-2 border-t border-slate-100",children:i.jsxs("button",{type:"button",onClick:()=>{v(),x("/splash")},className:"w-full flex items-center gap-2.5 px-2.5 py-2.5 rounded-lg hover:bg-rose-50 text-rose-600 hover:text-rose-700 transition-colors text-xs font-semibold text-left cursor-pointer active:scale-[0.98]",children:[i.jsx(Oi,{size:14,className:"text-rose-500"}),i.jsx("span",{children:"Sign Out"})]})})]})]}):null})]})]})]}),i.jsxs("div",{className:"hidden md:flex items-center justify-between gap-2 w-full min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[i.jsx("div",{className:"w-10 h-10 bg-slate-50 rounded-2xl flex items-center justify-center text-[#00B5B5] shadow-[inset_0_1px_3px_rgba(0,0,0,0.05)]",children:i.jsx($a,{size:18})}),i.jsxs("div",{className:"leading-tight text-left min-w-0",children:[i.jsx("h3",{className:"text-[11px] font-black text-slate-800 uppercase tracking-widest leading-none truncate",children:(($n=p.find(Q=>Q.id===T))==null?void 0:$n.name)??T}),i.jsx("p",{className:he("text-[9px] font-black uppercase tracking-widest leading-none mt-1 shadow-sm select-none",le?"text-[#00B5B5]":"text-amber-600"),children:le?T==="General"?"General · Free":`${T} · ${(re==null?void 0:re.planName)??"Active"}`:`${T} · Locked`}),re&&fn(T)?i.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[i.jsx("span",{className:he("text-[8px] font-extrabold uppercase px-1.5 py-0.5 rounded",Og(re)==="Free"?"bg-sky-50 text-sky-700":"bg-emerald-50 text-emerald-700"),children:Og(re)}),i.jsxs("span",{className:"text-[8px] text-slate-400 font-mono",children:["till ",gr(re.expiresAt)]})]}):null]})]}),T==="General"&&le?i.jsx("div",{className:"flex flex-1 max-w-md mx-2 px-3 py-1.5 rounded-xl bg-amber-50 border border-amber-100 text-[10px] font-semibold text-amber-900 text-center leading-snug",children:u1[W]}):null,!le&&fn(T)?i.jsxs("button",{type:"button",onClick:()=>xe(T),className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-slate-900 hover:bg-[#008F8F] text-white text-[10px] font-bold uppercase tracking-wide cursor-pointer shrink-0",children:[i.jsx(Sr,{size:14}),"Upgrade ",T]}):null]})]}),T==="General"&&le?i.jsx("div",{className:"md:hidden px-4 py-2 bg-amber-50 border-b border-amber-100 text-[10px] font-semibold text-amber-900 text-center leading-snug shrink-0",children:u1[W]}):null,!le&&fn(T)?i.jsxs("div",{className:"sm:hidden px-4 py-2 bg-slate-900 text-white flex items-center justify-between gap-2 shrink-0",children:[i.jsxs("span",{className:"text-[10px] font-bold",children:[T," locked"]}),i.jsx("button",{type:"button",onClick:()=>xe(T),className:"text-[10px] font-bold text-[#00E5E5] underline cursor-pointer",children:"Upgrade â"})]}):null,i.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-4 sm:px-6 py-6 scroll-smooth z-10 custom-scrollbar bg-white select-text relative",children:!le&&fn(T)?i.jsx(bQ,{botId:T,onUpgrade:()=>xe(T),onUseGeneral:()=>te("General")}):i.jsxs("div",{className:"space-y-6 w-full",children:[R.length===0&&!Y&&i.jsxs("div",{className:"py-6 space-y-7 text-center select-none animate-fade-in",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("div",{className:"w-10 h-10 bg-[#00B5B5]/10 rounded-full flex items-center justify-center mx-auto mb-1 text-[#00B5B5]",children:i.jsx(Tn,{size:18,className:"animate-pulse"})}),i.jsxs("h1",{className:"text-xl font-black text-slate-900 tracking-tight leading-tight",children:["Explore Socratic"," ",i.jsx("span",{className:"font-extrabold text-[#00B5B5] italic",children:"Matrix"})]}),i.jsx("p",{className:"text-slate-400 text-[10px] font-bold max-w-xs mx-auto leading-relaxed uppercase tracking-wider",children:"Ask me to isolate complex derivations, diagnose textbook proofs, or simulate exam scoring parameters."})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 max-w-3xl mx-auto",children:(()=>{switch(T){case"UPSC":return[{title:"How to approach Polity questions?",icon:Fo,topic:"UPSC"},{title:"Explain Indian Federalism",icon:$a,topic:"UPSC"},{title:"Essay writing strategy for GS",icon:Tl,topic:"UPSC"}];case"JEE":return[{title:"Explain Newton's Laws deeply",icon:Fo,topic:"JEE"},{title:"Solve a Calculus integration problem",icon:$a,topic:"JEE"},{title:"Organic Chemistry reaction chains",icon:Tl,topic:"JEE"}];case"NEET":return[{title:"Explain Cell Division (Mitosis vs Meiosis)",icon:Fo,topic:"NEET"},{title:"Human Digestive System overview",icon:$a,topic:"NEET"},{title:"Genetics and Heredity â key concepts",icon:Tl,topic:"NEET"}];case"GATE":return[{title:"Explain Time Complexity of algorithms",icon:Fo,topic:"GATE"},{title:"OS: Process vs Thread",icon:$a,topic:"GATE"},{title:"Database normalization explained",icon:Tl,topic:"GATE"}];default:return[{title:"How to build a study routine?",icon:Fo,topic:"General"},{title:"What is active recall?",icon:$a,topic:"General"},{title:"Tips for time management",icon:Tl,topic:"General"}]}})().map((Q,be)=>i.jsxs("button",{type:"button",onClick:()=>Z(Q.title),className:"p-4 bg-slate-50 hover:bg-slate-100 border border-slate-100 hover:border-slate-200 rounded-2xl transition-all group flex flex-col items-start gap-4 cursor-pointer text-left shadow-none",children:[i.jsx("div",{className:"w-8 h-8 bg-white shadow-sm rounded-full flex items-center justify-center text-slate-500 group-hover:text-slate-700 transition-all shrink-0",children:i.jsx(Q.icon,{size:16})}),i.jsxs("div",{className:"leading-tight",children:[i.jsx("span",{className:"text-sm font-semibold text-slate-700 block mt-1 transition-colors",children:Q.title}),i.jsx("span",{className:"text-xs text-slate-400 block mt-1.5 opacity-80",children:Q.topic})]})]},be))})]}),i.jsx(bt,{initial:!1,children:R.map(Q=>{var be;return i.jsxs(ze.div,{initial:{opacity:0,y:8}
2318,animate:{opacity:1,y:0},className:he("flex w-full max-w-4xl mx-auto gap-3",Q.isAi?"flex-row items-start":"flex-row-reverse"),children:[Q.isAi?i.jsx("div",{className:"w-8 h-8 rounded-full shrink-0 flex items-center justify-center shadow-[0_2px_10px_rgba(0,0,0,0.06)] bg-white border border-slate-100 mt-0.5",children:i.jsx($a,{size:16,className:"text-[#00B5B5]"})}):null,i.jsxs("div",{className:he("space-y-2 flex flex-col min-w-0",Q.isAi?"items-stretch flex-1":"items-end max-w-[85%]"),children:[Q.isAi?i.jsxs("div",{className:"flex items-center gap-2 select-none px-0.5",children:[i.jsx("span",{className:"font-display font-bold text-slate-800 text-[13px] tracking-wide",children:((be=p.find(De=>De.id===T))==null?void 0:be.name)||"Socrates"}),i.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-[#00B5B5]/80",children:"Guide"})]}):null,Q.imageUrl&&i.jsx("div",{className:"rounded-2xl overflow-hidden shadow-sm max-w-sm bg-slate-100 border border-slate-100",children:i.jsx("img",{src:Q.imageUrl,alt:"Scanned doubt attachment",className:"object-cover max-h-48 w-full",referrerPolicy:"no-referrer"})}),i.jsxs("div",{className:he("leading-relaxed font-normal relative group/msg max-w-full",Q.isAi?"ai-reply-card text-slate-800 text-[15px]":"bg-slate-100 text-slate-900 rounded-[22px] rounded-tr-md px-4 py-3 sm:px-5 shadow-none text-[15px] sm:text-base mb-1 inline-block break-anywhere"),children:[i.jsx("div",{className:he("max-w-none text-left",Q.isAi?"markdown-body break-anywhere":"text-slate-900 whitespace-pre-wrap break-anywhere"),children:Q.isAi?i.jsx(eb,{remarkPlugins:[tb],rehypePlugins:[Nb],children:Q.text}):Q.text}),Q.isAi&&i.jsxs("div",{className:"flex items-center justify-between gap-2 mt-3 pt-2.5 border-t border-slate-100/90",children:[i.jsx("span",{className:"text-[10px] font-medium text-slate-400",children:"AI guide reply"}),i.jsx("button",{type:"button",onClick:()=>{Cr===Q.id?(un.current&&un.current.cancel(),ca(null)):(ca(Q.id),Qs(Q.text,()=>{ca(null)}))},className:"inline-flex items-center gap-1 rounded-lg border border-slate-150 bg-slate-50/90 px-2 py-1 text-[10px] font-bold uppercase tracking-wide text-slate-500 hover:text-[#00B5B5] hover:border-teal-200 transition-colors cursor-pointer select-none",children:Cr===Q.id?i.jsxs(i.Fragment,{children:[i.jsx(bw,{size:11,className:"text-rose-500"}),i.jsx("span",{className:"text-rose-500",children:"Stop"})]}):i.jsxs(i.Fragment,{children:[i.jsx(gw,{size:11,className:"text-[#00B5B5]"}),i.jsx("span",{children:"Speak"})]})})]})]})]})]},Q.id)})}),Y&&i.jsxs("div",{className:"flex w-full max-w-4xl mx-auto gap-3 items-start",children:[i.jsx("div",{className:"w-8 h-8 rounded-full shrink-0 flex items-center justify-center bg-white border border-slate-100 shadow-[0_2px_10px_rgba(0,0,0,0.06)] mt-0.5",children:i.jsx($a,{size:16,className:"text-[#00B5B5] animate-pulse"})}),i.jsx("div",{className:"ai-reply-card !py-3.5 !px-4 w-auto min-w-[72px] flex items-center",children:i.jsxs("div",{className:"flex gap-1.5 px-1",children:[i.jsx("div",{className:"h-1.5 w-1.5 bg-[#00B5B5] rounded-full animate-bounce [animation-duration:0.6s]"}),i.jsx("div",{className:"h-1.5 w-1.5 bg-[#00B5B5] rounded-full animate-bounce [animation-duration:0.6s] [animation-delay:0.15s]"}),i.jsx("div",{className:"h-1.5 w-1.5 bg-[#00B5B5] rounded-full animate-bounce [animation-duration:0.6s] [animation-delay:0.3s]"})]})})]}),i.jsx("div",{ref:Ae})]})}),i.jsx("footer",{className:"relative z-30 px-3 pt-2.5 pb-safe bg-white border-t border-slate-100 shrink-0 transition-[padding] duration-150",style:b>0?{paddingBottom:`${b+12}px`}:void 0,children:!le&&fn(T)?i.jsxs("div",{className:"w-full max-w-4xl lg:max-w-5xl mx-auto py-3 px-4 rounded-2xl bg-slate-50 border border-slate-200 flex flex-col sm:flex-row items-center justify-between gap-3",children:[i.jsxs("p",{className:"text-xs font-semibold text-slate-600 text-center sm:text-left",children:["Chat is disabled until you unlock ",i.jsx("strong",{children:T}),"."]}),i.jsxs("button",{type:"button",onClick:()=>xe(T),className:"w-full sm:w-auto py-2.5 px-5 rounded-xl bg-[#00B5B5] hover:bg-[#009999] text-white text-xs font-bold cursor-pointer flex items-center justify-center gap-2",children:[i.jsx(Sr,{size:14}),"Go to Premium checkout"]})]}):i.jsxs("form",{onSubmit:Bc,className:"w-full max-w-4xl lg:max-w-5xl mx-auto",children:[P?i.jsxs("div",{className:"mb-2 flex items-start gap-2 rounded-xl border border-teal-200 bg-teal-50/90 px-3 py-2",children:[i.jsx($a,{size:14,className:"text-[#008F8F] shrink-0 mt-0.5"}),i.jsx("p",{className:"flex-1 text-[11px] font-semibold text-teal-900 leading-snug",children:P}),i.jsx("button",{type:"button",onClick:()=>ge(null),className:"text-teal-700/70 hover:text-teal-900 shrink-0","aria-label":"Dismiss",children:i.jsx(Ln,{size:12})})]}):null,i.jsx(bt,{children:Ve&&i.jsxs(ze.div,{initial:{opacity:0,y:4}
2318,animate:{opacity:1,y:0},exit:{opacity:0,y:4},className:"relative inline-block ml-1.5 mb-2 bg-slate-50 rounded-xl p-1 border border-slate-150 shadow-xs",children:[i.jsx("img",{src:Ve,alt:"Doubt snapshot preview",className:"max-h-12 max-w-[100px] object-contain rounded-lg h-12 w-auto"}),i.jsx("button",{type:"button",onClick:Ur,className:"absolute -top-1.5 -right-1.5 bg-rose-500 text-white rounded-full p-0.5 hover:bg-rose-600 transition-all cursor-pointer shadow animate-fade-in",children:i.jsx(Ln,{size:10})})]})}),i.jsxs("div",{className:"relative flex flex-col bg-slate-50/70 border border-slate-200/80 rounded-[20px] p-1.5 focus-within:bg-white focus-within:border-[#00B5B5] focus-within:shadow-sm transition-all overflow-hidden group",children:[i.jsx("textarea",{value:ne,onChange:Q=>{Z(Q.target.value),Q.target.style.height="auto",Q.target.style.height=Math.min(Q.target.scrollHeight,120)+"px"},onKeyDown:Q=>{if(Q.key==="Enter"&&!Q.shiftKey){Q.preventDefault(),Bc(Q);const be=Q.target;be.style.height="auto"}},placeholder:yt?"Uploading document scanning...":"Ask Socrates...",disabled:yt,style:{minHeight:"36px",maxHeight:"120px"},className:"w-full bg-transparent outline-none text-[12px] font-semibold px-3.5 py-2 resize-none text-slate-800 leading-normal custom-scrollbar",rows:1}),i.jsxs("div",{className:"flex items-center justify-between px-2 pb-1 pt-1 border-t border-slate-100/50",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{type:"button",onClick:()=>{var Q;return(Q=it.current)==null?void 0:Q.click()},disabled:yt,className:he("p-1.5 text-slate-400 hover:text-[#00B5B5] hover:bg-slate-100/60 rounded-lg transition-all cursor-pointer",yt&&"animate-pulse opacity-50"),title:"Upload exam document scanner (PNG/JPG)",children:i.jsx(jF,{size:13})}),i.jsx("button",{type:"button",onClick:Ic,disabled:yt,className:"p-1.5 text-slate-400 hover:text-[#00B5B5] hover:bg-slate-100/60 rounded-lg transition-all cursor-pointer",title:"Capture doubt via camera",children:i.jsx(Yu,{size:13})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",onClick:_c,disabled:yt,className:"h-7.5 px-3 bg-[#00B5B5]/10 text-[#00B5B5] hover:bg-[#00B5B5]/20 rounded-lg transition-all cursor-pointer flex items-center justify-center gap-1.5 shadow-sm font-bold text-[10px] uppercase tracking-wider",title:"Engage in oral audio learning conversation",children:[i.jsx(xw,{size:13})," Voice"]}),i.jsx("button",{disabled:Y||yt||!ne.trim()&&!Ee,type:"submit",className:"bg-[#00B5B5] hover:bg-[#009999] text-white w-7.5 h-7.5 rounded-lg transition-all active:scale-95 disabled:opacity-20 flex items-center justify-center cursor-pointer shadow-sm",children:i.jsx(hj,{size:13})})]})]})]})]})}),i.jsx(bt,{children:de&&i.jsx(ze.div,{initial:{opacity:0}
vendor: 2,019 bytes, line 2318
2318,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[10000] flex items-center justify-center bg-slate-900/40 backdrop-blur-md p-4",children:i.jsxs(ze.div,{initial:{scale:.95,y:10},animate:{scale:1,y:0},exit:{scale:.95,y:10},className:"bg-white rounded-2xl overflow-hidden max-w-sm w-full shadow-2xl border border-slate-100 flex flex-col relative",children:[i.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-slate-100 bg-white",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Yu,{className:"w-4 h-4 text-[#00B5B5]"}),i.jsx("h3",{className:"text-xs font-bold text-slate-800 uppercase tracking-wider",children:"Classroom Camera"})]}),i.jsx("button",{type:"button",onClick:al,className:"p-1 px-1.5 text-slate-400 hover:text-slate-600 rounded-full transition-all cursor-pointer",children:i.jsx(Ln,{className:"w-4 h-4"})})]}),i.jsx("div",{className:"relative bg-black aspect-video flex items-center justify-center overflow-hidden",children:i.jsx("video",{ref:Zt,autoPlay:!0,playsInline:!0,muted:!0,className:`w-full h-full object-cover ${Vn==="user"?"[transform:scaleX(-1)]":""}`})}),i.jsxs("div",{className:"p-4 bg-slate-50 flex items-center justify-between gap-3",children:[i.jsxs("button",{type:"button",onClick:rl,className:"flex items-center gap-1.5 text-[10px] font-bold text-slate-600 hover:text-slate-800 hover:bg-slate-200 border border-slate-200 px-3 py-2 rounded-lg transition-all",children:[i.jsx(OF,{className:"w-3.5 h-3.5"}),i.jsx("span",{children:"Switch"})]}),i.jsxs("button",{type:"button",onClick:wf,className:"flex items-center gap-1.5 text-[10px] font-bold text-white bg-[#00B5B5] hover:bg-[#009999] px-4 py-2 rounded-lg transition-all shadow-xs",children:[i.jsx(Yu,{className:"w-3.5 h-3.5"}),i.jsx("span",{children:"Take Snap"})]}),i.jsx("button",{type:"button",onClick:al,className:"text-[10px] font-bold text-slate-400 hover:text-slate-600",children:"Cancel"})]})]})})}),i.jsx(bt,{children:D&&i.jsx(ze.div,{initial:{opacity:0}
2318,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[10000] flex items-center justify-center bg-slate-900/30 backdrop-blur-md p-4 overflow-y-auto",children:i.jsxs(ze.div,{initial:{scale:.95,y:10},animate:{scale:1,y:0},exit:{scale:.95,y:10},className:"bg-white rounded-[24px] overflow-hidden max-w-xl w-full shadow-2xl border border-slate-100 flex flex-col relative my-8",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-slate-100 bg-white",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[i.jsx("div",{className:"w-8 h-8 rounded-xl bg-[#00B5B5]/10 flex items-center justify-center text-[#00B5B5]",children:i.jsx(Tn,{className:"w-4 h-4"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-black text-slate-850 uppercase tracking-wider",children:"Expert Matrix Socratic Bot"}),i.jsx("p",{className:"text-[9px] text-slate-400 font-bold uppercase tracking-widest",children:"Select focused analytical dialectics"})]})]}),i.jsx("button",{type:"button",onClick:()=>k(!1),className:"p-1 px-1.5 text-slate-400 hover:text-slate-600 rounded-full transition-all cursor-pointer",children:i.jsx(Ln,{className:"w-4 h-4"})})]}),i.jsx("div",{className:"p-5 space-y-3 max-h-[300px] overflow-y-auto custom-scrollbar select-none",children:p.map(Q=>{const be=T===Q.id,De=on(e,Q.id);return i.jsxs("div",{onClick:()=>{te(Q.id),De&&k(!1)},className:he("p-4 rounded-xl border text-left cursor-pointer transition-all flex items-start gap-3.5 relative",be?"border-[#00B5B5] bg-[#00B5B5]/5 text-slate-900":"border-slate-100 bg-white hover:border-slate-200 text-slate-650",!De&&Q.paid&&"border-amber-100 bg-amber-50/30"),children:[!De&&Q.paid?i.jsx(Or,{size:12,className:"absolute top-3 right-3 text-amber-600"}):null,i.jsx("div",{className:he("w-9 h-9 rounded-lg flex items-center justify-center text-lg shrink-0 shadow-xs bg-gradient-to-br",be?"text-white "+Q.color:"bg-slate-50 text-slate-400"),children:Q.icon}),i.jsxs("div",{className:"space-y-0.5 flex-1 leading-none",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("span",{className:"text-xs font-bold text-slate-800 flex items-center gap-1.5 uppercase",children:[Q.name,Q.id!=="General"&&i.jsx("span",{className:"text-[7px] font-black bg-[#00B5B5]/10 text-[#00B5B5] px-1.5 py-0.5 rounded-md tracking-wider",children:"TARGET SYSTEM"})]}),be&&i.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-[#00B5B5] text-white flex items-center justify-center",children:i.jsx(Xa,{className:"w-2.5 h-2.5"})})]}),i.jsx("p",{className:"text-[10px] text-slate-400 font-semibold uppercase leading-tight pt-1 line-clamp-2",children:Q.subtitle}),!De&&Q.paid?i.jsxs("button",{type:"button",onClick:He=>{He.stopPropagation(),fn(Q.id)&&xe(Q.id)},className:"mt-2 w-full py-2 rounded-lg bg-slate-900 text-white text-[10px] font-bold uppercase tracking-wide cursor-pointer hover:bg-[#008F8F]",children:["Unlock ",Q.id," â Premium"]}):Q.id==="General"?i.jsx("span",{className:"mt-1 text-[9px] font-bold text-emerald-600",children:"Free access"}):i.jsx("span",{className:"mt-1 text-[9px] font-bold text-emerald-600",children:"Unlocked"})]})]},Q.id)})}),i.jsxs("div",{className:"p-5 bg-slate-50 border-t border-slate-100",children:[i.jsx("p",{className:"text-[10px] text-slate-500 text-center mb-3",children:"Each exam bot is purchased separately via Razorpay on Premium."}),i.jsx("button",{type:"button",onClick:()=>{k(!1),s==null||s("premium")},className:"w-full py-2.5 rounded-xl border border-[#00B5B5] text-[#008F8F] font-bold text-xs cursor-pointer hover:bg-teal-50",children:"View all tutor plans"})]})]})})}),i.jsx(bt,{children:ue&&i.jsx(ze.div,{initial:{opacity:0}
2318,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[20000] bg-slate-950/75 backdrop-blur-sm text-white overflow-y-auto custom-scrollbar",children:i.jsxs("div",{className:"min-h-full flex flex-col items-center justify-between p-6 sm:p-8 gap-8",children:[i.jsx("div",{className:"absolute top-0 left-1/4 w-[40rem] h-[40rem] bg-indigo-500/10 rounded-full blur-[120px] pointer-events-none"}),i.jsx("div",{className:"absolute bottom-0 right-1/4 w-[35rem] h-[35rem] bg-[#00B5B5]/10 rounded-full blur-[100px] pointer-events-none"}),i.jsxs("header",{className:"w-full max-w-4xl flex items-center justify-between relative z-10 shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-12 h-12 bg-slate-900 border border-slate-800 rounded-2xl flex items-center justify-center text-[#00B5B5] shadow-lg shadow-teal-500/10",children:i.jsx(uj,{size:22,className:"animate-pulse"})}),i.jsxs("div",{className:"text-left",children:[i.jsx("h3",{className:"text-sm font-black uppercase tracking-widest text-[#00B5B5]",children:"Voice tutor"}),i.jsxs("p",{className:"text-[10px] text-slate-400 font-bold uppercase tracking-widest mt-1",children:["Active Focus Bot: ",T]})]})]}),i.jsx("button",{onClick:Dc,className:"w-10 h-10 rounded-full bg-slate-800/50 hover:bg-rose-500 hover:text-white transition-all flex items-center justify-center text-slate-400 cursor-pointer border border-slate-700/50 hover:border-rose-500",title:"Close Voice Mode",children:i.jsx(Ln,{size:18})})]}),i.jsxs("main",{className:"flex-1 w-full max-w-2xl flex flex-col items-center justify-center space-y-12 relative z-10 py-10",children:[i.jsxs("div",{className:"relative flex items-center justify-center w-64 h-64 select-none",children:[i.jsx(ze.div,{animate:{scale:Le==="listening"?[1,1.4,1]:Le==="processing"?[1,1.15,1]:[1,1.25,1],opacity:Le==="listening"?[.15,.4,.15]:Le==="processing"?[.2,.5,.2]:[.1,.3,.1]},transition:{duration:Le==="processing"?1.2:2.5,repeat:1/0,ease:"easeInOut"},className:he("absolute inset-0 rounded-full blur-xl",Le==="listening"?"bg-[#00B5B5]":Le==="processing"?"bg-purple-500":"bg-emerald-500")}),i.jsx(ze.div,{animate:{scale:Le==="listening"?[1,1.18,1]:Le==="processing"?[1,1.3,1]:[1,1.12,1]},transition:{duration:Le==="processing"?.8:3,repeat:1/0,ease:"easeInOut"},className:he("absolute w-44 h-44 rounded-full flex items-center justify-center shadow-2xl transition-all border",Le==="listening"?"bg-slate-900 border-[#00B5B5]/30 text-[#00B5B5] shadow-[#00B5B5]/20":Le==="processing"?"bg-slate-900 border-purple-500/20 text-purple-400 shadow-purple-500/10":"bg-slate-900 border-emerald-500/20 text-emerald-400 shadow-emerald-500/10"),children:i.jsx($a,{size:44,className:he("transition-transform",Le==="listening"&&"animate-pulse",Le==="processing"&&"animate-spin [animation-duration:4s]")})}),i.jsxs("div",{className:"absolute -bottom-2 text-[10px] font-black uppercase tracking-[0.25em] bg-slate-900 px-4 py-1.5 rounded-full border border-slate-800 text-slate-400 select-none",children:[Le==="listening"&&i.jsx("span",{className:"text-[#00B5B5] animate-pulse",children:"Socrates Listening..."}),Le==="processing"&&i.jsx("span",{className:"text-purple-400 animate-pulse",children:"Consulting Matrices..."}),Le==="speaking"&&i.jsx("span",{className:"text-emerald-400",children:"Socrates Speaking"})]})]}),i.jsxs("div",{className:"w-full space-y-6 text-center select-none max-h-60 overflow-y-auto custom-scrollbar px-4",children:[na&&i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-[9px] font-black text-slate-500 uppercase tracking-widest",children:"You said"}),i.jsxs("p",{className:"text-sm font-semibold text-slate-300 italic max-w-lg mx-auto",children:['"',na,'"']})]}),i.jsxs("div",{className:"space-y-1 pt-2",children:[i.jsx("p",{className:"text-[9px] font-black text-slate-500 uppercase tracking-widest",children:"Socratic Dialect"}),i.jsx("p",{className:"text-base font-display font-light text-white leading-relaxed max-w-xl mx-auto",children:Hn||"Setting up verbal inquiries..."})]})]})]}),i.jsxs("footer",{className:"w-full max-w-xl flex flex-col items-center gap-6 relative z-10 shrink-0",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4 justify-center",children:[i.jsxs("button",{type:"button",onClick:()=>Tt(Q=>!Q),className:he("h-12 px-6 rounded-2xl text-[11px] font-bold uppercase tracking-widest border transition-all flex items-center gap-2.5 cursor-pointer shadow-lg",In?"bg-rose-500/10 border-rose-500/30 text-rose-400 hover:bg-rose-500/20 shadow-rose-500/10":"bg-[#00B5B5]/10 border-[#00B5B5]/30 text-[#00B5B5] hover:bg-[#00B5B5]/20 shadow-[#00B5B5]/10"),children:[In?i.jsx(bw,{size:16}):i.jsx(gw,{size:16}),i.jsx("span",{children:In?"Unmute AI":"Mute AI"})]}),Le==="speaking"&&i.jsxs("button",{type:"button",onClick:()=>{un.current&&un.current.cancel(),Fr()},className:"h-12 px-6 rounded-2xl border border-rose-500/30 bg-rose-500/10 hover:bg-rose-500/20 text-[#00B5B5] font-bold uppercase tracking-widest transition-all cursor-pointer shadow-lg shadow-rose-500/10 flex items-center justify-center gap-2",children:[i.jsx(Ln,{size:16,className:"text-rose-400"}),i.jsx("span",{className:"text-rose-400",children:"Interrupt AI"})]}),i.jsxs("button",{type:"button",onClick:Dc,className:"h-12 px-6 rounded-2xl bg-rose-500/15 border border-rose-500/30 hover:bg-rose-500 hover:text-white hover:border-rose-500 transition-all flex items-center justify-center gap-2.5 text-rose-400 cursor-pointer text-[11px] font-bold uppercase shadow-lg shadow-rose-500/10",title:"Disconnect",children:[i.jsx(TF,{size:16}),i.jsx("span",{children:"End Call"})]})]}),i.jsx("div",{className:"w-full h-px bg-slate-800/50 rounded-full"}),i.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between w-full text-[10px] text-slate-500 font-bold tracking-widest uppercase select-none gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-[#00B5B5] animate-pulse"}),"VERBAL SYSTEM STATUS: ONLINE"]}),Le==="listening"?i.jsx("span",{className:"text-[#00B5B5] animate-pulse text-center",children:"TALK NATURALLY, PAUSE TRIGGERS RESPONSE"}):i.jsx("span",{children:"READY"})]})]})]})})}),i.jsx(bt,{children:M&&i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0}
2318,animate:{opacity:.4},exit:{opacity:0},onClick:()=>B(!1),className:"absolute inset-0 bg-slate-900 z-45 cursor-pointer backdrop-blur-xs"}),i.jsxs(ze.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:26,stiffness:240},className:"absolute top-0 right-0 h-full w-[min(290px,88vw)] bg-white border-l border-slate-100 shadow-2xl z-50 flex flex-col font-sans",children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-slate-50 shrink-0 bg-slate-50/50 select-none",children:[i.jsxs("div",{className:"flex items-center gap-1.5 text-[#00B5B5]",children:[i.jsx(pw,{size:14,className:"shrink-0"}),i.jsx("span",{className:"text-[10px] font-black tracking-widest text-slate-800 uppercase leading-none",children:"RECENT DISCUSSIONS"})]}),i.jsx("button",{type:"button",onClick:()=>B(!1),className:"w-6 h-6 rounded-full flex items-center justify-center text-slate-400 hover:text-slate-850 hover:bg-slate-100 transition-all cursor-pointer",children:i.jsx(Ln,{size:14})})]}),i.jsxs("div",{className:"p-4 shrink-0 border-b border-slate-50 select-none space-y-2.5",children:[i.jsxs("button",{type:"button",onClick:()=>{n(null),Z(""),Ur(),B(!1),un.current&&un.current.cancel()},className:"w-full py-2.5 bg-[#00B5B5] hover:bg-[#009999] text-white rounded-xl transition-all font-black text-[10px] uppercase tracking-wider flex items-center justify-center gap-1.5 shadow-sm active:scale-95 cursor-pointer",children:[i.jsx(qi,{size:12,className:"text-white"}),i.jsx("span",{children:"Start New Chat"})]}),i.jsxs("button",{type:"button",onClick:()=>{k(!0)},className:"w-full py-2.5 bg-slate-50 border border-slate-150 hover:bg-slate-100 hover:border-slate-200 text-slate-700 rounded-xl transition-all font-bold text-[10px] uppercase tracking-wider flex items-center justify-between px-3 shadow-sm active:scale-95 cursor-pointer",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm",children:((xs=p.find(Q=>Q.id===T))==null?void 0:xs.icon)||"ð"}),i.jsx("span",{children:((Ql=p.find(Q=>Q.id===T))==null?void 0:Ql.name)||"Tutor Identity"})]}),i.jsx("span",{className:"text-[#00B5B5] text-[9px]",children:"Change"})]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-3.5 space-y-4",children:i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs("span",{className:"text-[8px] font-extrabold tracking-widest text-slate-400 uppercase select-none block px-1.5",children:["ALL THREADS (",V.length,")"]}),V.length===0?i.jsx("div",{className:"py-8 text-center text-[10px] font-bold text-slate-450 uppercase tracking-wide select-none",children:"No recent discussions"}):i.jsx("div",{className:"space-y-1",children:V.map(Q=>{const be=Q.id===t;return i.jsxs("div",{className:he("group flex items-center justify-between p-2.5 rounded-xl transition-all cursor-pointer relative border",be?"bg-[#00B5B5]/5 border-[#00B5B5]/20 text-[#009999]":"bg-transparent border-transparent hover:bg-slate-50 text-slate-650 hover:text-slate-900"),onClick:()=>{n(Q.id),B(!1)},children:[i.jsxs("div",{className:"flex items-center gap-2 max-w-[82%] min-w-0",children:[i.jsx(vr,{size:12,className:he("shrink-0",be?"text-[#00B5B5]":"text-slate-400 group-hover:text-[#00B5B5]")}),i.jsx("span",{className:"text-[11px] font-bold truncate leading-snug",title:Q.title||"Untitled Chat",children:Q.title||"Untitled Chat"})]}),d&&i.jsx("button",{type:"button",onClick:De=>{De.stopPropagation(),d(De,Q.id)},className:"w-6 h-6 flex items-center justify-center rounded-lg text-slate-400 hover:text-rose-500 hover:bg-rose-50 transition-all opacity-100 sm:opacity-0 sm:group-hover:opacity-100",title:"Delete this session",children:i.jsx(Hi,{size:11})})]},Q.id)})})]})}),i.jsx("div",{className:"p-3 bg-slate-50/50 border-t border-slate-50 text-[7px] text-center font-bold tracking-widest text-slate-450 uppercase select-none shrink-0",children:"SECURE SOCRATIC STORAGE"})]})]})})]}),i.jsx("div",{className:"hidden lg:flex flex-col col-span-3 h-full gap-4 lg:gap-6 overflow-hidden",children:i.jsxs("div",{className:"bg-white rounded-3xl shadow-sm p-6 flex flex-col h-full border-none",children:[i.jsxs("div",{className:"flex items-center justify-between mb-5 shrink-0",children:[i.jsx("h2",{className:"text-[10px] font-black uppercase text-slate-800 tracking-widest",children:"Recent Discussions"}),i.jsx("div",{className:"text-[10px] font-bold text-slate-400 bg-slate-50 px-2 py-0.5 rounded-md",children:V.length})]}),i.jsxs("button",{type:"button",onClick:()=>{n(null),Z(""),Ur(),un.current&&un.current.cancel()},className:"w-full py-3 mb-4 bg-[#00B5B5] hover:bg-[#00A3A3] text-white rounded-2xl transition-all font-bold text-[10px] uppercase tracking-wider flex items-center justify-center gap-2 shadow-sm hover:shadow-md active:scale-95 cursor-pointer shrink-0",children:[i.jsx(qi,{size:13,className:"text-white"}),i.jsx("span",{children:"Start New Thread"})]}),i.jsxs("button",{type:"button",onClick:()=>k(!0),className:"w-full py-3 mb-4 bg-slate-50 hover:bg-slate-100 border border-slate-150 text-slate-700 rounded-2xl transition-all font-bold text-[10px] uppercase tracking-wider flex items-center justify-between px-4 shadow-sm active:scale-95 cursor-pointer shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm",children:((X0=p.find(Q=>Q.id===T))==null?void 0:X0.icon)||"ð"}),i.jsx("span",{children:((K0=p.find(Q=>Q.id===T))==null?void 0:K0.name)||"Tutor Identity"})]}),i.jsx("span",{className:"text-[#00B5B5] text-[9px]",children:"Change"})]}),i.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar space-y-2.5 pr-1",children:V.length===0?i.jsx("div",{className:"py-8 text-center text-[10px] font-bold text-slate-400 uppercase tracking-wide select-none",children:"No recent discussions"}):V.map(Q=>{const be=Q.id===t;return i.jsxs("div",{className:he("group flex items-center justify-between p-3.5 rounded-2xl transition-all cursor-pointer relative",be?"bg-[#00B5B5]/10 text-[#009999]":"bg-slate-50/70 hover:bg-slate-100 text-slate-600 hover:text-slate-900"),onClick:()=>n(Q.id),children:[i.jsxs("div",{className:"flex items-center gap-3 w-[80%]",children:[i.jsx(vr,{size:13,className:he("shrink-0",be?"text-[#00B5B5]":"text-slate-400 group-hover:text-slate-500")}),i.jsx("span",{className:"text-[11px] font-bold truncate leading-snug",children:Q.title||"Untitled Chat"})]}),d&&i.jsx("button",{type:"button",onClick:De=>{De.stopPropagation(),d(De,Q.id)},className:"w-7 h-7 flex items-center justify-center rounded-xl text-slate-400 hover:text-rose-500 hover:bg-rose-50 transition-all opacity-0 group-hover:opacity-100",title:"Delete this session",children:i.jsx(Hi,{size:13})})]},Q.id)})})]})})]})]})}const v7={probe:{label:"Probe",icon:L0,accent:"text-amber-700 bg-amber-50 border-amber-200"},reason:{label:"Reason",icon:$a,accent:"text-teal-800 bg-teal-50 border-teal-200"},drill:{label:"Drill",icon:Tl,accent:"text-indigo-700 bg-indigo-50 border-indigo-200"},lock:{label:"Lock",icon:O0,accent:"text-emerald-800 bg-emerald-50 border-emerald-200"}};function SQ(e,t){try{const n=localStorage.getItem(Qj(e,t));return n?JSON.parse(n):null}catch{return null}}
2318function NQ(e,t,n){localStorage.setItem(Qj(e,t),JSON.stringify({...n,examId:t,updatedAt:new Date().toISOString()}))}function jQ({user:e,onNavigate:t,onUpdateUser:n}){const a=Nc(e),s=a.length?a:["JEE"],[o,c]=w.useState(s[0]),[d,h]=w.useState(""),[f,p]=w.useState(""),[x,b]=w.useState([]),v=(e==null?void 0:e.uid)??"guest",N=Gs(s),j=U0(e),T=Jj(e),E=w.useMemo(()=>lH(e,o),[e,o]),D=Yj(e,o),{locked:k}=w.useMemo(()=>Wj(e),[e]),M=Sc(e).length>0,B=N[s.indexOf(o)]??o,_=E&&!E.unlocked&&E.id!=="General",U=w.useCallback((H,V)=>{NQ(v,o,{title:H,steps:V})},[v,o]),F=w.useCallback(H=>{!n||!H.trim()||n({ongoingLearningPath:cH(H.trim(),o)})},[n,o]);w.useEffect(()=>{s.includes(o)||c(s[0])},[s,o]),w.useEffect(()=>{const H=SQ(v,o);if(H!=null&&H.title){const V=uH(H,e,o);p(V.title),b(V.steps)}else p(""),b([]);h("")},[v,o,e]);const W=x.length?Math.round(x.filter(H=>H.done).length/x.length*100):0,ae=x.find(H=>!H.done)??null,le=H=>{H.preventDefault();const V=d.trim();if(!V)return;const ne=Kj(V,e,o);p(V),b(ne),U(V,ne),F(V),Go("road_topic_set",{examId:o,topic:V,botId:E==null?void 0:E.id}),h("")},re=H=>{b(V=>{const ne=V.map(Z=>{if(Z.id!==H)return Z;const Y=!Z.done;return Y&&Go("road_step_done",{examId:o,topic:f,stepKind:Z.kind,botId:E==null?void 0:E.id}),{...Z,done:Y}});return U(f,ne),ne})},xe=H=>{if(!t)return;const V=(E==null?void 0:E.id)??"General";if(!on(e,V)){V!=="General"&&uc(V),t("premium");return}const ne=H??ae??x[0]??null;f&&ne&&(Xj({topic:f,stepId:ne.id,kind:ne.kind,chatPrompt:ne.chatPrompt,botId:V,examId:o}),F(f),Go("road_step_opened",{examId:o,topic:f,stepKind:ne.kind,botId:V})),localStorage.setItem("socratech_active_bot",V),t("guide")},te=()=>{p(""),b([]),U("",[]),Go("road_topic_cleared",{examId:o}),n&&n({ongoingLearningPath:""})};return i.jsxs("div",{className:"pb-24 px-3 sm:px-5 w-full space-y-5 pt-3",children:[i.jsxs("header",{className:"space-y-1.5",children:[i.jsx("h1",{className:"text-lg font-black text-slate-900",children:"Study Road"}),i.jsx("p",{className:"text-[11px] text-slate-500 leading-snug",children:j}),i.jsx("p",{className:"text-[11px] text-[#008F8F] leading-snug font-medium pt-0.5",children:T})]}),i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-gradient-to-br from-slate-50 to-teal-50/40 px-3.5 py-3 space-y-1.5",children:[i.jsxs("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide flex items-center gap-1.5",children:[i.jsx(Tn,{size:12,className:"text-[#008F8F]"}),"How Road works"]}),i.jsxs("p",{className:"text-[11px] text-slate-600 leading-relaxed",children:["Pick ",i.jsx("span",{className:"font-bold text-slate-800",children:"one topic for this week"}),". Walk Probe â Reason â Drill â Lock in Chat â the tutor questions you first; answers are earned, not pasted."]})]}),M?i.jsx(Gj,{user:e}):i.jsx($j,{examLabels:N,lockedBots:k,onViewPlans:()=>t==null?void 0:t("premium"),onUnlockBot:H=>{uc(H),t==null||t("premium")}}),i.jsx("div",{className:"flex gap-2 overflow-x-auto scrollbar-none py-0.5",children:s.map((H,V)=>i.jsx("button",{type:"button",onClick:()=>c(H),className:he("shrink-0 px-3.5 py-2 rounded-full text-[11px] font-bold border transition-colors",o===H?"bg-slate-900 border-slate-900 text-white":"bg-white border-slate-200 text-slate-600"),children:N[V]??H},H))}),_&&t&&i.jsxs("div",{className:"rounded-lg border border-amber-100 bg-amber-50/80 px-3.5 py-2.5 text-[11px] text-amber-900 leading-relaxed",children:[i.jsx("span",{className:"font-bold",children:B})," pairs with the"," ",i.jsxs("span",{className:"font-bold",children:[E==null?void 0:E.id," tutor"]})," â unlock on Plans for syllabus-tuned Socratic coaching, or keep free General Coach."]}),i.jsxs("section",{className:"space-y-3 pt-1",children:[i.jsxs("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:["This week's focus · ",B]}),f?i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-2",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#008F8F] uppercase tracking-wide",children:"Active topic"}),i.jsx("p",{className:"text-sm font-black text-slate-900 truncate",children:f})]}),i.jsx("button",{type:"button",onClick:te,className:"text-[10px] font-bold text-slate-400 hover:text-slate-600 shrink-0",children:"Change"})]}),i.jsx("div",{className:"h-1.5 rounded-full bg-slate-100 overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full bg-[#00B5B5] transition-all",style:{width:`${W}%`}})}),i.jsxs("p",{className:"text-[10px] font-bold text-slate-500",children:[W,"% locked in · ",x.filter(H=>H.done).length,"/",x.length," stages"]})]}):i.jsxs("form",{onSubmit:le,className:"space-y-2.5",children:[i.jsx("input",{type:"text",value:d,onChange:H=>h(H.target.value),placeholder:D,className:"w-full px-3 py-2.5 rounded-lg border border-slate-200 bg-white text-xs font-semibold focus:border-[#00B5B5] focus:outline-none"}),i.jsxs("button",{type:"submit",disabled:!d.trim(),className:"w-full px-3.5 py-2.5 rounded-lg bg-slate-900 text-white text-xs font-bold disabled:opacity-40 flex items-center justify-center gap-1.5",children:["Build Socratic path",i.jsx(pn,{size:14})]}),i.jsx("p",{className:"text-[11px] text-slate-400 px-0.5",children:"One chapter or concept â not a whole syllabus dump."})]}),i.jsx("ul",{className:"space-y-2.5",children:x.map((H,V)=>{const ne=v7[H.kind],Z=ne.icon,Y=(ae==null?void 0:ae.id)===H.id;return i.jsx("li",{children:i.jsxs("div",{className:he("rounded-xl border p-3 space-y-2.5 transition-colors",H.done?"bg-slate-50 border-slate-100":Y?"bg-white border-[#00B5B5]/50 shadow-sm":"bg-white border-slate-200"),children:[i.jsxs("div",{className:"flex items-start gap-2.5",children:[i.jsx("button",{type:"button",onClick:()=>
2318re(H.id),"aria-label":H.done?"Mark incomplete":"Mark complete",className:he("mt-0.5 w-5 h-5 rounded border flex items-center justify-center shrink-0",H.done?"bg-emerald-500 border-emerald-500 text-white":"border-slate-300 bg-white"),children:H.done&&i.jsx(Xa,{size:11,strokeWidth:3})}),i.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsxs("span",{className:he("inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[9px] font-bold border",ne.accent),children:[i.jsx(Z,{size:10}),V+1,". ",ne.label]}),Y&&!H.done&&i.jsx("span",{className:"text-[9px] font-bold text-[#008F8F]",children:"Up next"})]}),i.jsx("p",{className:he("text-xs font-bold",H.done?"text-slate-400 line-through":"text-slate-900"),children:H.title}),i.jsx("p",{className:"text-[10px] text-slate-500 leading-snug",children:H.blurb})]})]}),!H.done&&t&&i.jsxs("button",{type:"button",onClick:()=>xe(H),className:he("w-full flex items-center justify-center gap-2 py-2 rounded-lg text-[11px] font-bold",Y?"bg-slate-900 text-white":"bg-teal-50 text-[#008F8F] border border-teal-100"),children:[i.jsx(vr,{size:13}),"Open in Chat"]})]})},H.id)})}),f&&E&&t&&i.jsx("button",{type:"button",onClick:()=>xe(ae),className:he("w-full flex items-center justify-center gap-2 py-3 mt-1 rounded-lg text-xs font-bold",E.unlocked?"bg-[#008F8F] text-white":"border border-dashed border-teal-300 text-[#008F8F] bg-teal-50/50"),children:E.unlocked?i.jsxs(i.Fragment,{children:[i.jsx(vr,{size:14}),ae?`Continue: ${v7[ae.kind].label} · ${f}`:`Revisit ${f} in Chat`]}):i.jsxs(i.Fragment,{children:[i.jsx(Or,{size:14}),"Unlock ",E.id," for ",B,i.jsx(pn,{size:14})]})})]})]})}const kQ={login:"Signed in",chat_session_created:"Started chat thread",chat_message:"Asked a doubt",road_topic_set:"Set Road topic",road_step_opened:"Opened Road stage in Chat",road_step_done:"Completed Road stage",road_topic_cleared:"Cleared Road topic",bot_selected:"Switched tutor",plan_viewed:"Viewed Plans",qa_generated:"Generated practice Q",qa_attempted:"Submitted practice attempt"};function Ro({label:e,value:t,hint:n,icon:a}){return i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-1.5",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:e}),i.jsx(a,{size:14,className:"text-[#008F8F]"})]}),i.jsx("p",{className:"text-2xl font-black text-slate-900 tabular-nums",children:t}),n?i.jsx("p",{className:"text-[10px] text-slate-400 leading-snug",children:n}):null]})}function CQ({days:e}){const t=Math.max(1,...e.map(n=>n.count));return i.jsx("div",{className:"flex items-end gap-0.5 h-16",children:e.map(n=>i.jsx("div",{title:`${n.date}: ${n.count}`,className:"flex-1 min-w-0 rounded-t bg-[#00B5B5]/80",style:{height:`${Math.max(6,n.count/t*100)}%`}},n.date))})}function w7({items:e,empty:t}){const n=Math.max(1,...e.map(a=>a.count));return e.length?i.jsx("ul",{className:"space-y-2",children:e.map(a=>i.jsxs("li",{className:"space-y-1",children:[i.jsxs("div",{className:"flex justify-between text-[11px] font-semibold",children:[i.jsx("span",{className:"text-slate-800 truncate",children:a.label}),i.jsx("span",{className:"text-slate-500 tabular-nums",children:a.count})]}),i.jsx("div",{className:"h-1.5 rounded-full bg-slate-100 overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full bg-[#00B5B5]",style:{width:`${a.count/n*100}%`}})})]},a.label))}):i.jsx("p",{className:"text-[11px] text-slate-400",children:t})}function AQ({user:e,onNavigate:t}){const[n,a]=w.useState(30),[s,o]=w.useState(null),[c,d]=w.useState([]),[h,f]=w.useState(!0),[p,x]=w.useState(""),b=U0(e);w.useEffect(()=>{let j=!1;return f(!0),x(""),wQ(n).then(T=>{j||(o(T.analytics),d(T.recent))}).catch(T=>{j||x(T instanceof Error?T.message:"Could not load analytics")}).finally(()=>{j||f(!1)}),()=>{j=!0}},[n]);const v=w.useMemo(()=>s?s.byExam.map(j=>({label:Gs([j.examId])[0]||j.examId,count:j.count})):[],[s]),N=w.useMemo(()=>s?s.byBot.map(j=>({label:j.botId,count:j.count})):[],[s]);return i.jsxs("div",{className:"pb-24 px-3 sm:px-5 w-full space-y-5 pt-3",children:[i.jsxs("header",{className:"space-y-1.5",children:[i.jsx("h1",{className:"text-lg font-black text-slate-900",children:"Track & Analytics"}),i.jsx("p",{className:"text-[11px] text-slate-500 leading-snug",children:b}),i.jsx("p",{className:"text-[11px] text-[#008F8F] leading-snug font-medium",children:"See how your Socratic practice adds up â doubts, Road stages, and exam tracks."})]}),i.jsx("div",{className:"flex gap-2",children:[7,30].map(j=>i.jsxs("button",{type:"button",onClick:()=>a(j),className:he("px-3 py-1.5 rounded-full text-[11px] font-bold border",n===j?"bg-slate-900 border-slate-900 text-white":"bg-white border-slate-200 text-slate-600"),children:["Last ",j," days"]},j))}),h?i.jsx("p",{className:"text-[11px] text-slate-400 py-8 text-center",children:"Loading your trackâ¦"}):p?i.jsx("p",{className:"text-[11px] text-rose-600 py-4",children:p}):s?i.jsxs(i.Fragment,{children:[s.totals.learningPath?i.jsxs("div",{className:"rounded-xl border border-teal-200 bg-teal-50/70 px-3.5 py-3",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#008F8F] uppercase tracking-wide",children:"Active learning path"}),i.jsx("p",{className:"text-xs font-bold text-slate-900 mt-0.5",children:s.totals.learningPath})]}):null,i.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[i.jsx(Ro,{label:"Streak",value:s.streakDays,hint:"Days in a row with study activity",icon:XU}),i.jsx(Ro,{label:"Active days",value:s.activeDays,hint:`In the last ${s.rangeDays} days`,icon:Qm}),i.jsx(Ro,{label:"Doubts",value:s.doubtsAsked,hint:`${s.totals.allTimeDoubts} all-time in Chat`,icon:vr}),i.jsx(Ro,{label:"Threads",value:s.sessionsStarted,hint:`${s.totals.allTimeSessions}
2318 chat sessions total`,icon:ym}),i.jsx(Ro,{label:"Road topics",value:s.roadTopicsSet,hint:`${s.roadStepsCompleted} stages marked done`,icon:Ey}),i.jsx(Ro,{label:"Road â Chat",value:s.roadStepsOpened,hint:"Socratic stages opened from Road",icon:Tn})]}),i.jsxs("section",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-3",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"Daily activity"}),i.jsx(CQ,{days:s.activityByDay}),i.jsx("p",{className:"text-[10px] text-slate-400",children:"Each bar is a day · taller = more events"})]}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[i.jsxs("section",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-3",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"By exam track"}),i.jsx(w7,{items:v,empty:"No exam-tagged activity yet â set a Road topic."})]}),i.jsxs("section",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-3",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"By tutor"}),i.jsx(w7,{items:N,empty:"Chat with a tutor to see bot usage here."})]})]}),s.recentTopics.length>0?i.jsxs("section",{className:"space-y-2",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Recent Road topics"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:s.recentTopics.map(j=>i.jsx("button",{type:"button",onClick:()=>t==null?void 0:t("suggestions"),className:"px-2.5 py-1.5 rounded-full bg-white border border-slate-200 text-[10px] font-bold text-slate-700",children:j},j))})]}):null,i.jsxs("section",{className:"space-y-2.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Recent activity"}),i.jsx("ul",{className:"space-y-2",children:c.length===0?i.jsx("li",{className:"text-[11px] text-slate-400 px-0.5",children:"No tracked events yet â ask a doubt or set a Road topic."}):c.map(j=>i.jsxs("li",{className:"rounded-lg border border-slate-200 bg-white px-3 py-2.5 flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-[11px] font-bold text-slate-800",children:kQ[j.eventType]??j.eventType}),i.jsx("p",{className:"text-[10px] text-slate-500 truncate",children:[j.topic,j.botId,j.examId,j.stepKind].filter(Boolean).join(" · ")||"â"})]}),i.jsx("span",{className:"text-[9px] font-semibold text-slate-400 shrink-0 tabular-nums",children:new Date(j.createdAt).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]},j.id))})]}),i.jsxs("div",{className:"flex gap-2 pt-1",children:[i.jsx("button",{type:"button",onClick:()=>t==null?void 0:t("guide"),className:"flex-1 py-2.5 rounded-lg bg-slate-900 text-white text-[11px] font-bold",children:"Ask in Chat"}),i.jsx("button",{type:"button",onClick:()=>t==null?void 0:t("suggestions"),className:"flex-1 py-2.5 rounded-lg border border-teal-200 bg-teal-50 text-[#008F8F] text-[11px] font-bold",children:"Open Road"})]})]}):null]})}async function EQ(e){return(await kn("/api/qa/practice",e)).item}async function TQ(e,t){return(await kn(`/api/qa/${e}/attempt`,{attempt:t})).item}async function MQ(){return(await Un("/api/qa/practice")).items}async function IQ(e=""){const t=e.trim()?`?q=${encodeURIComponent(e.trim())}`:"";return(await Un(`/api/qa/library${t}`)).items}async function zQ(e){await M0(`/api/qa/${e}`)}const _Q=["easy","medium","hard"],UC=[{id:"setup",label:"Setup"},{id:"question",label:"Question"},{id:"attempt",label:"Attempt"},{id:"feedback",label:"Feedback"}];function DQ(e){return UC.findIndex(t=>t.id===e)}function S7(e){return e==="done"?"Done":e==="reviewed"?"Reviewed":e==="open"?"Open":e}function BQ(e){return e>=75?"text-emerald-700 bg-emerald-50 border-emerald-100":e>=45?"text-amber-800 bg-amber-50 border-amber-100":"text-rose-700 bg-rose-50 border-rose-100"}function RQ(e,t=140){const n=e.replace(/\s+/g," ").trim();return n.length<=t?n:`${n.slice(0,t-1).trimEnd()}â¦`}function OQ({user:e,onNavigate:t}){const n=Nc(e),a=n.length?n:["JEE","General"],s=U0(e),[o,c]=w.useState("practice"),[d,h]=w.useState(a[0]),[f,p]=w.useState(""),[x,b]=w.useState("medium"),[v,N]=w.useState(!1),[j,T]=w.useState(!1),[E,D]=w.useState(""),[k,M]=w.useState(null),[B,_]=w.useState(""),[U,F]=w.useState(!1),[W,ae]=w.useState(!0),[le,re]=w.useState([]),[xe,te]=w.useState(!0),[H,V]=w.useState([]),[ne,Z]=w.useState(""),[Y,I]=w.useState(!1),[R,J]=w.useState(""),[P,ge]=w.useState(null),Ee=Yj(e,d),Te=d==="General"?"General":Gs([d])[0]||d,Ve=k?k.feedback?"feedback":B.trim()?"attempt":"question":"setup",et=w.useCallback(async()=>{te(!0);try{const de=await MQ();re(de)}catch{}finally{te(!1)}},[]),Re=w.useCallback(async(de=ne)=>{I(!0),J("");try{V(await IQ(de))}catch(Me){V([]),J(Me instanceof Error?Me.message:"Could not load your Q&A library")}finally{I(!1)}},[ne]);w.useEffect(()=>{et()},[et]),w.useEffect(()=>{o==="library"&&Re()},[o,Re]),w.useEffect(()=>{ae(!k)},[k==null?void 0:k.id]);const kt=async de=>{de.preventDefault(),D(""),N(!0),F(!1),_("");try{const Me=await EQ({examId:d,topic:f.trim()||void 0,difficulty:x});M(Me),ae(!1),await et()}catch(Me){D(Me instanceof Error?Me.message:"Could not generate question")}finally{N(!1)}},yt=async de=>{if(de.preventDefault(),!(!k||!B.trim())){D(""),T(!0);try{const Me=await TQ(k.id,B.trim());M(Me),await et()}catch(Me){D(Me instanceof Error?Me.message:"Could not review attempt")}finally{T(!1)}}},Yt=()=>{M(null),_(""),F(!1),D(""),ae(!0)},cn=de=>{if(!t)return;const Me=de.botId||"General";if(!on(e,Me)){Me!=="General"&&uc(Me),t("premium");return}Xj({topic:de.topic||de.examId,stepId:"drill",kind:"drill",chatPrompt:[`I was practicing this ${de.examId} question:`,de.question,de.attempt?`My attempt: 2319${de.attempt}`:"",de.feedback?"Continue Socratically from your feedback â probe what I still misunderstand.":"Coach me Socratically on this â don't dump the answer."].filter(
2319Boolean).join(` 2320 2321`),botId:Me,examId:de.examId}),localStorage.setItem("socratech_active_bot",Me),t("guide")},vt=de=>{if(!t||!de.sessionId){t==null||t("guide");return}localStorage.setItem("socratech_active_session_id",de.sessionId),localStorage.setItem("socratech_active_bot",de.botId||"General"),t("guide")},Ae=w.useMemo(()=>{const de=[...a];return de.includes("General")||de.push("General"),de},[a]),it=DQ(Ve);return i.jsxs("div",{className:"pb-24 px-3 sm:px-5 w-full space-y-5 pt-3",children:[i.jsxs("header",{className:"space-y-1.5",children:[i.jsx("h1",{className:"text-lg font-black text-slate-900",children:"Q&A"}),i.jsx("p",{className:"text-[11px] text-slate-500 leading-snug",children:s}),i.jsx("p",{className:"text-[11px] text-[#008F8F] leading-snug font-medium",children:"Practice drills first â attempt before feedback. Or reopen doubts from Chat."})]}),i.jsx("div",{className:"flex gap-2",children:[{id:"practice",label:"Practice"},{id:"library",label:"My Q&A"}].map(de=>i.jsx("button",{type:"button",onClick:()=>c(de.id),className:he("px-3.5 py-2 rounded-full text-[11px] font-bold border transition-colors",o===de.id?"bg-slate-900 border-slate-900 text-white":"bg-white border-slate-200 text-slate-600"),children:de.label},de.id))}),o==="practice"?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-gradient-to-br from-slate-50 to-teal-50/40 px-3.5 py-3 space-y-2.5",children:[i.jsxs("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide flex items-center gap-1.5",children:[i.jsx(Tn,{size:12,className:"text-[#008F8F]"}),"Practice loop"]}),i.jsx("ol",{className:"grid grid-cols-4 gap-1.5",children:UC.map((de,Me)=>{const Bt=Me<it,xn=Me===it;return i.jsx("li",{className:"min-w-0",children:i.jsxs("div",{className:he("rounded-lg border px-1.5 py-1.5 text-center transition-colors",xn?"bg-[#008F8F] border-[#008F8F] text-white":Bt?"bg-teal-50 border-teal-200 text-[#008F8F]":"bg-white border-slate-200 text-slate-400"),children:[i.jsx("span",{className:"block text-[9px] font-black tabular-nums leading-none",children:Me+1}),i.jsx("span",{className:"block text-[9px] sm:text-[10px] font-bold mt-1 truncate leading-tight",children:de.label})]})},de.id)})}),i.jsx("p",{className:"text-[11px] text-slate-600 leading-relaxed",children:"Earn the answer: set a track, face one question, write your attempt, then get Socratic feedback â not a dumped key."})]}),i.jsxs("section",{className:"space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2 px-0.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:k?"Setup":`New practice · ${Te}`}),k?i.jsx("button",{type:"button",onClick:()=>ae(de=>!de),className:"text-[10px] font-bold text-[#008F8F]",children:W?"Hide setup":"Change setup"}):null]}),i.jsx(bt,{initial:!1,children:W?i.jsx(ze.form,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},onSubmit:kt,className:"overflow-hidden",children:i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-3",children:[i.jsx("div",{className:"flex gap-2 overflow-x-auto scrollbar-none",children:Ae.map(de=>i.jsx("button",{type:"button",onClick:()=>h(de),className:he("shrink-0 px-3.5 py-2 rounded-full text-[11px] font-bold border transition-colors",d===de?"bg-slate-900 border-slate-900 text-white":"bg-white border-slate-200 text-slate-600"),children:de==="General"?"General":Gs([de])[0]||de},de))}),i.jsx("input",{value:f,onChange:de=>p(de.target.value),placeholder:Ee,className:"w-full px-3 py-2.5 rounded-lg border border-slate-200 text-xs font-semibold focus:border-[#00B5B5] focus:outline-none"}),i.jsx("div",{className:"grid grid-cols-3 gap-2",children:_Q.map(de=>i.jsx("button",{type:"button",onClick:()=>b(de),className:he("py-2 rounded-lg text-[11px] font-bold border capitalize transition-colors",x===de?"bg-teal-50 text-[#008F8F] border-[#00B5B5]/60":"bg-white text-slate-600 border-slate-200"),children:de},de))}),i.jsx("button",{type:"submit",disabled:v,className:"w-full py-2.5 rounded-lg bg-[#008F8F] text-white text-xs font-bold disabled:opacity-60 flex items-center justify-center gap-2 active:scale-[0.99] transition-transform",children:v?i.jsxs(i.Fragment,{children:[i.jsx(Qe,{size:14,className:"animate-spin"}),"Generating questionâ¦"]}):i.jsxs(i.Fragment,{children:[i.jsx(Tn,{size:14}),k?"Generate next question":"Generate question"]})})]})},"setup-form"):k?i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white px-3.5 py-2.5 flex items-center justify-between gap-2",children:[i.jsxs("p",{className:"text-[11px] text-slate-600 font-semibold truncate",children:[i.jsx("span",{className:"text-[#008F8F] font-bold",children:Te})," · ",i.jsx("span",{className:"capitalize",children:x}),f.trim()?` · ${f.trim()}`:""]}),i.jsx("button",{type:"button",onClick:Yt,className:"text-[10px] font-bold text-slate-400 hover:text-slate-600 shrink-0",children:"Clear"})]}):null})]}),E?i.jsxs("div",{role:"alert",className:"rounded-xl border border-rose-200 bg-rose-50/90 px-3.5 py-3 flex items-start gap-2",children:[i.jsx("p",{className:"flex-1 text-[11px] text-rose-700 leading-relaxed font-medium",children:E}),i.jsx("button",{type:"button",onClick:()=>D(""),className:"text-rose-400 hover:text-rose-600 shrink-0 p-0.5","aria-label":"Dismiss error",children:i.jsx(Ln,{size:14})})]}):null,i.jsx(bt,{mode:"wait",children:k?i.jsxs(ze.section,{initial:{opacity:0,y:8}
2321,animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.22},className:he("rounded-xl border bg-white p-3.5 space-y-3",k.feedback?"border-[#00B5B5]/45 shadow-sm":"border-slate-200"),children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-wide text-[#008F8F]",children:[k.difficulty," · ",k.examId,k.topic?` · ${k.topic}`:""]}),i.jsx("span",{className:he("text-[9px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-md border",k.status==="done"?"bg-emerald-50 text-emerald-700 border-emerald-100":k.status==="reviewed"?"bg-amber-50 text-amber-800 border-amber-100":"bg-slate-50 text-slate-600 border-slate-200"),children:S7(k.status)})]}),i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"Question"}),i.jsx("div",{className:"prose prose-sm prose-slate max-w-none text-sm font-semibold text-slate-900 markdown-body",children:i.jsx(eb,{remarkPlugins:[tb],rehypePlugins:[Nb],children:k.question})})]}),k.feedback?i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"rounded-lg border border-slate-100 bg-slate-50 px-3 py-2.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide mb-1.5",children:"Your attempt"}),i.jsx("p",{className:"text-[11px] text-slate-700 whitespace-pre-wrap leading-relaxed",children:k.attempt})]}),i.jsxs("div",{className:"rounded-lg border border-teal-100 bg-teal-50/70 px-3 py-2.5 space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx("p",{className:"text-[10px] font-bold text-[#008F8F] uppercase tracking-wide",children:"Socratic feedback"}),k.score!=null?i.jsxs("span",{className:he("text-[11px] font-black tabular-nums px-2 py-0.5 rounded-md border",BQ(k.score)),children:[k.score,i.jsx("span",{className:"font-bold text-[10px] opacity-70",children:"/100"})]}):null]}),k.score!=null?i.jsx("div",{className:"h-1.5 rounded-full bg-white/80 border border-teal-100/80 overflow-hidden",children:i.jsx("div",{className:"h-full rounded-full bg-[#00B5B5] transition-all duration-500",style:{width:`${Math.max(4,Math.min(100,k.score))}%`}})}):null,i.jsx("div",{className:"markdown-body text-[12.5px] leading-relaxed",children:i.jsx(eb,{remarkPlugins:[tb],rehypePlugins:[Nb],children:k.feedback})})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>cn(k),className:"flex-1 py-2.5 rounded-lg bg-[#008F8F] text-white text-[11px] font-bold flex items-center justify-center gap-1.5 active:scale-[0.99] transition-transform",children:[i.jsx(vr,{size:13}),"Continue in Chat"]}),i.jsx("button",{type:"button",onClick:Yt,className:"flex-1 py-2.5 rounded-lg border border-slate-200 text-[11px] font-bold text-slate-700 hover:border-slate-300",children:"New question"})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("button",{type:"button",onClick:()=>F(de=>!de),className:he("text-[11px] font-bold flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 border transition-colors",U?"bg-teal-50 border-teal-200 text-[#008F8F]":"bg-white border-slate-200 text-slate-500 hover:border-slate-300"),children:[i.jsx(L0,{size:12}),U?"Hide hint":"Show Socratic hint"]}),i.jsx(bt,{initial:!1,children:U?i.jsx(ze.p,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.18},className:"overflow-hidden text-[11px] text-slate-600 bg-slate-50 border border-slate-100 rounded-lg px-3 py-2.5 leading-relaxed",children:k.hint},"hint"):null})]}),i.jsxs("form",{onSubmit:yt,className:"space-y-2",children:[i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"Your attempt"}),i.jsx("textarea",{value:B,onChange:de=>_(de.target.value),rows:4,placeholder:"Write your reasoning first â then get Socratic feedback.",className:"w-full px-3 py-2.5 rounded-lg border border-slate-200 text-xs font-medium focus:border-[#00B5B5] focus:outline-none resize-y min-h-[104px]"})]}),i.jsx("button",{type:"submit",disabled:j||!B.trim(),className:"w-full py-2.5 rounded-lg bg-slate-900 text-white text-xs font-bold disabled:opacity-50 flex items-center justify-center gap-2 active:scale-[0.99] transition-transform",children:j?i.jsxs(i.Fragment,{children:[i.jsx(Qe,{size:14,className:"animate-spin"}),"Reviewing attemptâ¦"]}):"Submit attempt"})]})]})]},k.id+(k.feedback?"-fb":"-q")):i.jsxs(ze.div,{initial:{opacity:0}
2321,animate:{opacity:1},exit:{opacity:0},className:"rounded-xl border border-dashed border-slate-200 bg-slate-50/80 px-4 py-8 text-center space-y-2",children:[i.jsx("div",{className:"w-10 h-10 mx-auto rounded-lg bg-teal-50 text-[#008F8F] flex items-center justify-center border border-teal-100",children:i.jsx(O0,{size:18})}),i.jsx("p",{className:"text-xs font-bold text-slate-800",children:"Ready when you are"}),i.jsx("p",{className:"text-[11px] text-slate-500 max-w-xs mx-auto leading-relaxed",children:"Pick a track and topic above, generate one exam-style question, then attempt it before feedback unlocks."})]},"empty-practice")}),i.jsxs("section",{className:"space-y-2.5",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide px-0.5",children:"Recent practice"}),xe&&le.length===0?i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white px-3.5 py-6 flex items-center justify-center gap-2 text-[11px] text-slate-400 font-medium",children:[i.jsx(Qe,{size:14,className:"animate-spin text-[#008F8F]"}),"Loading recent drillsâ¦"]}):le.length===0?i.jsx("p",{className:"text-[11px] text-slate-400 px-0.5 leading-relaxed",children:"Your last few drills will show up here for quick reopen."}):i.jsx("ul",{className:"space-y-2",children:le.slice(0,8).map(de=>{const Me=(k==null?void 0:k.id)===de.id;return i.jsxs("li",{className:he("rounded-xl border bg-white px-3 py-2.5 flex items-start gap-2 transition-colors",Me?"border-[#00B5B5]/50":"border-slate-200 hover:border-slate-300"),children:[i.jsxs("button",{type:"button",onClick:()=>{M(de),_(de.attempt||""),F(!1),D(""),ae(!1)},className:"flex-1 text-left min-w-0",children:[i.jsx("p",{className:"text-[11px] font-bold text-slate-800 line-clamp-2 leading-snug",children:de.question}),i.jsxs("p",{className:"text-[10px] text-slate-400 mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-0.5",children:[i.jsx("span",{children:de.examId}),de.topic?i.jsxs("span",{children:["· ",de.topic]}):null,i.jsxs("span",{className:"capitalize",children:["· ",de.difficulty]}),de.score!=null?i.jsxs("span",{className:"font-bold text-slate-600 tabular-nums",children:["· ",de.score,"/100"]}):i.jsxs("span",{children:["· ",S7(de.status)]})]})]}),i.jsx("button",{type:"button",disabled:P===de.id,onClick:()=>{ge(de.id),zQ(de.id).then(()=>((k==null?void 0:k.id)===de.id&&Yt(),et())).catch(()=>{D("Could not delete that practice item")}).finally(()=>ge(null))},className:"text-slate-300 hover:text-rose-500 shrink-0 p-1 disabled:opacity-40","aria-label":"Delete",children:P===de.id?i.jsx(Qe,{size:14,className:"animate-spin"}):i.jsx(Hi,{size:14})})]},de.id)})})]})]}):i.jsxs("section",{className:"space-y-3",children:[i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white p-1.5 flex items-center gap-1",children:[i.jsxs("div",{className:"relative flex-1 min-w-0",children:[i.jsx(FF,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-slate-400 pointer-events-none"}),i.jsx("input",{value:ne,onChange:de=>Z(de.target.value),onKeyDown:de=>{de.key==="Enter"&&Re(ne)},placeholder:"Search your Chat doubtsâ¦",className:"w-full pl-8 pr-8 py-2 rounded-lg text-xs font-semibold focus:outline-none bg-transparent"}),ne?i.jsx("button",{type:"button",onClick:()=>{Z(""),Re("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-300 hover:text-slate-500","aria-label":"Clear search",children:i.jsx(Ln,{size:14})}):null]}),i.jsx("button",{type:"button",onClick:()=>void Re(ne),disabled:Y,className:"shrink-0 px-3 py-2 rounded-lg bg-[#008F8F] text-white text-[11px] font-bold disabled:opacity-60",children:Y?i.jsx(Qe,{size:14,className:"animate-spin"}):"Search"})]}),R?i.jsxs("div",{role:"alert",className:"rounded-xl border border-rose-200 bg-rose-50/90 px-3.5 py-3 flex items-start gap-2",children:[i.jsx("p",{className:"flex-1 text-[11px] text-rose-700 leading-relaxed font-medium",children:R}),i.jsx("button",{type:"button",onClick:()=>void Re(ne),className:"text-[10px] font-bold text-rose-700 shrink-0",children:"Retry"})]}):null,Y?i.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white px-3.5 py-8 flex items-center justify-center gap-2 text-[11px] text-slate-400 font-medium",children:[i.jsx(Qe,{size:14,className:"animate-spin text-[#008F8F]"}),"Searching your libraryâ¦"]}):H.length===0?i.jsxs("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50/80 px-4 py-8 text-center space-y-2",children:[i.jsx("div",{className:"w-10 h-10 mx-auto rounded-lg bg-white border border-slate-200 text-slate-400 flex items-center justify-center",children:i.jsx(vr,{size:18})}),i.jsx("p",{className:"text-xs font-bold text-slate-700",children:ne.trim()?"No matching doubts":"No saved doubts yet"}),i.jsx("p",{className:"text-[11px] text-slate-500 max-w-xs mx-auto leading-relaxed",children:ne.trim()?"Try a shorter keyword, or clear search to see everything.":"Ask something in Chat â threads land here so you can reopen them later."}),ne.trim()?i.jsx("button",{type:"button",onClick:()=>{Z(""),Re("")},className:"mt-1 text-[11px] font-bold text-[#008F8F]",children:"Clear search"}):i.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t("guide"),className:"mt-1 inline-flex items-center gap-1.5 px-3 py-2 rounded-lg bg-[#008F8F] text-white text-[11px] font-bold",children:["Go to Chat ",i.jsx(pn,{size:12})]})]}):i.jsx("ul",{className:"space-y-2.5",children:H.map(de=>i.jsxs("li",{className:"rounded-xl border border-slate-200 bg-white p-3.5 space-y-2.5",children:[i.jsxs("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide truncate",children:[de.botId,de.sessionTitle?` · ${de.sessionTitle}`:""]}),i.jsx("p",{className:"text-xs font-bold text-slate-900 leading-snug line-clamp-3",children:de.question}),de.answer?i.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:RQ(de.answer,160)}):i.jsx("p",{className:"text-[11px] text-slate-400 italic",children:"No reply saved yet"}),i.jsxs("button",{type:"button",onClick:()=>vt(de),className:"w-full py-2.5 rounded-lg border border-[#00B5B5]/40 bg-teal-50/60 text-[#008F8F] text-[11px] font-bold flex items-center justify-center gap-1.5 hover:bg-teal-50 transition-colors",children:["Open thread ",i.jsx(pn,{size:12})]})]},de.id))})]})]})}function FC(e,t){return e.minAmountInr>0&&t<e.minAmountInr}function VC(e,t){return e.applicableBots.length===0||!t?!0:e.applicableBots.includes(t)}function qC(e){return!!(e.expiresAt&&Date.parse(e.expiresAt)<Date.now())}function HC(e){return e.maxUses>0&&e.usedCount>=e.maxUses}function LQ(e,t){const n=t.applicableBots;return{id:e,code:String(t.code??"").toUpperCase(),label:String(t.label??""),discountType:t.discountType==="fixed_inr"?"fixed_inr":"percent",discountValue:Number(t.discountValue??0),maxUses:Number(t.maxUses??0),usedCount:Number(t.usedCount??0),minAmountInr:Number(t.minAmountInr??0),applicableBots:Array.isArray(n)?n.map(String):[],active:t.active!==!1,expiresAt:t.expiresAt?String(t.expiresAt):null,createdAt:t.createdAt?String(t.createdAt):null}}function PQ(e){return LQ(String(e.id??""),e)}async function $C(){return((await Un("/api/admin/coupons")).coupons??[]).map(PQ).sort((t,n)=>t.code<n.code?-1:1)}async function UQ(e){const t=e.trim().toUpperCase();if(!t)return null;try{return(await $C()).find(a=>a.code===t)??null}catch{return null}}async function FQ(e){const t=e.code.trim().toUpperCase();if(!t)throw new Error("Coupon code is required");await kn("/api/admin/coupons",{code:t,label:e.label.trim()||t,discountType:e.discountType,discountValue:e.discountValue,maxUses:e.maxUses,minAmountInr:e.minAmountInr,applicableBots:e.applicableBots,expiresAt:e.expiresAt})}async function VQ(e,t){await Wb(`/api/admin/coupons/${e}`,t)}async function qQ(e){await M0(`/api/admin/coupons/${e}`)}function HQ(e,t,n){if(!e.active||HC(e)||qC(e)||FC(e,t)||!VC(e,n))return null;let a=e.discountType==="percent"?Math.round(t*e.discountValue/100):e.discountValue;return a=Math.min(a,t-1),a<1?null:{discountInr:a,message:e.discountType==="percent"?`${e.discountValue}% off applied`:`â¹${a} off applied`}}
2321const $Q=/^[A-Z0-9][A-Z0-9_-]{2,31}$/;function Zu(e){return e.trim().toUpperCase()}function GC(e){const t=Zu(e);return t.length<3?"Coupon code must be at least 3 characters.":t.length>32?"Coupon code is too long.":$Q.test(t)?null:"Use letters, numbers, hyphen or underscore only."}function GQ(e,t,n){return e.active?HC(e)?"This coupon has reached its usage limit.":qC(e)?"This coupon has expired.":FC(e,t)?`Admin set minimum order â¹${e.minAmountInr.toLocaleString("en-IN")} for this code.`:VC(e,n)?"This coupon cannot be applied to this order.":`This coupon is for ${e.applicableBots.join(", ")} tutors only.`:"This coupon is no longer active."}function YQ(e,t,n){const a=HQ(e,t,n);if(!a)return{valid:!1,message:GQ(e,t,n)};const s=Math.max(t-a.discountInr,1);return{valid:!0,code:e.code,couponId:e.id,discountInr:a.discountInr,finalAmountInr:s,message:a.message}}async function WQ(e){const t=GC(e.code);if(t)return{valid:!1,message:t};if(!Number.isFinite(e.amountInr)||e.amountInr<1)return{valid:!1,message:"Invalid order amount for coupon."};const n=await UQ(Zu(e.code));return n?YQ(n,e.amountInr,e.botId):{valid:!1,message:"Coupon code not found. Check spelling or ask admin."}}function XQ(e,t,n){return new Promise((a,s)=>{const o=setTimeout(()=>s(new Error(n)),t);e.then(c=>{clearTimeout(o),a(c)}).catch(c=>{clearTimeout(o),s(c)})})}async function $0(){var n;const e=await Un("/api/auth/me"),t=(n=e.user)==null?void 0:n.uid;if(!e.authenticated||!t)throw new Error("Please sign in to continue.");return t}async function N7(e){const t=await $0();try{const n=await fetch("/api/payments/validate-coupon",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,userId:t})}),a=await n.json().catch(()=>({}));if(n.ok&&typeof a.valid=="boolean")return a.valid&&a.baseAmountInr?{...a,message:a.message}:a.valid?a:{valid:!1,message:a.message||"Coupon could not be applied."}}catch{}return typeof e.amountInr!="number"||e.amountInr<1?{valid:!1,message:"Coupons do not apply to free plans."}:XQ(WQ({code:e.code,amountInr:e.amountInr,botId:e.botId}),12e3,"Coupon check timed out. Check your connection and try again.")}async function KQ(e){const t=await $0(),n=await fetch("/api/payments/claim-free-plan",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,userId:t})}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:"Could not activate free plan");return a}async function QQ(e){const t=await $0(),n=await fetch("/api/payments/create-order",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,userId:t})}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:"Could not create payment order");return a}async function JQ(e){const t=await $0(),n=await fetch("/api/payments/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({razorpay_order_id:e.razorpay_order_id,razorpay_payment_id:e.razorpay_payment_id,razorpay_signature:e.razorpay_signature,userId:t,userEmail:e.userEmail,userName:e.userName})}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:"Payment verification failed");return a}async function ZQ(e){const t=await $0(),n=await fetch("/api/payments/repair-licenses",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:t})}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:"License repair failed");return Number(a.repaired??0)}const eJ="https://checkout.razorpay.com/v1/checkout.js";let q1=null;function tJ(){return typeof window>"u"?Promise.reject(new Error("No window")):window.Razorpay?Promise.resolve():(q1||(q1=new Promise((e,t)=>{const n=document.createElement("script");n.src=eJ,n.async=!0,n.onload=()=>e(),n.onerror=()=>t(new Error("Failed to load Razorpay checkout")),document.body.appendChild(n)})),q1)}async function nJ(e){if(await tJ(),!window.Razorpay)throw new Error("Razorpay unavailable");return new Promise((t,n)=>{new window.Razorpay({key:e.keyId,amount:e.amount,currency:e.currency??"INR",name:e.name??"Socratech AI",description:e.description??"Subscription",order_id:e.orderId,prefill:e.prefill??{},theme:{color:"#00B5B5"},modal:{ondismiss:()=>{var s;(s=e.onDismiss)==null||s.call(e),t()}},handler:async s=>{try{await e.onSuccess(s),t()}catch(o){n(o)}}}).open()})}function aJ({plan:e,user:t,selected:n,featured:a,isActivatingFree:s,onSelect:o,onCheckout:c}){var b,v;const d=e.botId??null,h=e.price===0,f=h&&!d,p=d?on(t,d):!1,x=d?(v=(b=t==null?void 0:t.botLicenses)==null?void 0:b[d])==null?void 0:v.expiresAt:null;return i.jsxs("article",{className:he("relative flex flex-col rounded-[28px] border p-6 sm:p-7 transition-all duration-300 text-left h-full",e.accentClass,p&&"border-emerald-200 bg-emerald-50/30",n&&!f&&!p&&"ring-2 ring-[#00B5B5] ring-offset-2 ring-offset-[#FAFBFD]",a&&!p&&"shadow-[0_8px_40px_rgba(0,181,181,0.12)] scale-[1.01]"),children:[e.badge?i.jsxs("span",{className:"absolute -top-3 left-6 px-3 py-1 rounded-full text-[10px] font-bold bg-[#00B5B5] text-white shadow-md flex items-center gap-1",children:[i.jsx(Tn,{size:11}),e.badge]}):null,p?i.jsxs("span",{className:"absolute top-4 right-4 text-[10px] font-bold uppercase text-emerald-700 bg-emerald-100 px-2 py-0.5 rounded-full flex items-center gap-1",children:[i.jsx(Xa,{size:10}),"Purchased"]}):null,i.jsxs("div",{className:"flex items-start justify-between gap-2 mb-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider opacity-60 font-mono",children:h?"free access":"subscription"}),i.jsx("h3",{className:he("text-xl font-bold mt-1 leading-tight",e.textAccentClass),children:e.name}),d?i.jsxs("p",{className:"text-[10px] font-semibold text-[#008F8F] mt-1",children:[d," tutor"]}):null]}),a&&!p?i.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#00B5B5]/15 flex items-center justify-center text-[#00B5B5] shrink-0",children:i.jsx(Fo,{size:18})}):null]}),i.jsx("div",{className:"flex items-baseline gap-1.5 mb-3",children:h?i.jsx("span",{className:"text-3xl font-extrabold font-mono",children:"Free"}):i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"text-3xl font-extrabold font-mono",children:["â¹",e.price.toLocaleStr
2321ing("en-IN")]}),i.jsxs("span",{className:"text-xs font-semibold opacity-60",children:["/",e.period]})]})}),p&&x?i.jsxs("p",{className:"text-[10px] font-semibold text-emerald-700 mb-3",children:["Active until ",gr(x)]}):null,i.jsx("p",{className:"text-xs leading-relaxed opacity-80 mb-5 min-h-[2.5rem]",children:e.desc}),i.jsx("ul",{className:"space-y-2.5 mb-6 flex-1",children:e.features.slice(0,6).map((N,j)=>i.jsxs("li",{className:"flex items-start gap-2 text-xs font-medium opacity-90",children:[i.jsx("span",{className:"w-4 h-4 rounded-full bg-[#00B5B5]/15 flex items-center justify-center shrink-0 mt-0.5 text-[#008F8F]",children:i.jsx(Xa,{size:10,strokeWidth:3})}),i.jsx("span",{children:N})]},`${e.id}-f-${j}`))}),i.jsxs("div",{className:"flex flex-col gap-2 mt-auto",children:[i.jsx("button",{type:"button",disabled:p,"aria-disabled":p,onClick:o,className:he("w-full py-2.5 rounded-xl text-xs font-bold border transition-all cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",n&&!p?"border-[#00B5B5] bg-[#00B5B5]/10 text-[#008F8F]":"border-current/20 hover:bg-black/5"),children:p?"Owned":n?"Selected":"Select plan"}),p?i.jsxs("div",{role:"status",className:"w-full py-3 rounded-xl text-xs font-bold bg-slate-100 text-slate-500 border border-slate-200 flex items-center justify-center gap-1",children:[i.jsx(Xa,{size:12})," Already purchased"]}):i.jsx("button",{type:"button",disabled:f||!d||s,onClick:c,className:he("w-full py-3 rounded-xl text-xs font-bold transition-all cursor-pointer disabled:cursor-not-allowed disabled:opacity-70 active:scale-[0.98]",f?"bg-black/5 text-current/40":h?"bg-[#00B5B5] hover:bg-[#00a0a0] text-white":a?"bg-[#00B5B5] hover:bg-[#00a0a0] text-white shadow-lg shadow-[#00B5B5]/25":"bg-slate-900 hover:bg-slate-800 text-white"),children:f?"Included free":s?"Activatingâ¦":h?"Activate free":e.ctaText||"Upgrade now"})]})]})}function rJ({user:e,plans:t,loading:n,selectedPlanId:a,activatingFreePlanId:s,onSelectPlan:o,onCheckout:c}){var f,p,x;const d=Sc(e).length;if(n&&t.length===0)return i.jsx("div",{className:"col-span-full grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 animate-pulse",children:[1,2,3].map(b=>i.jsx("div",{className:"h-80 rounded-[28px] bg-slate-100"},b))});if(t.length===0)return i.jsx("p",{className:"col-span-full text-sm text-slate-500 text-center py-12",children:"No active plans. Add plans in Admin â Plans."});const h=((f=t.find(b=>b.id==="elite-matrix"&&b.price>0))==null?void 0:f.id)??((p=t.find(b=>b.badge&&b.price>0))==null?void 0:p.id)??((x=t.find(b=>b.price>0))==null?void 0:x.id);return i.jsxs("div",{className:"col-span-full",children:[i.jsxs("div",{className:"mb-5 flex items-center justify-between gap-3 flex-wrap",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"All subscription plans"}),i.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Prices from admin catalog â purchased bots cannot be bought again"})]}),i.jsxs("div",{className:"flex gap-2 flex-wrap",children:[d>0?i.jsxs("span",{className:"text-[10px] font-bold text-emerald-700 bg-emerald-50 border border-emerald-100 px-3 py-1 rounded-full",children:[d," tutor",d===1?"":"s"," owned"]}):null,i.jsxs("span",{className:"text-[10px] font-bold text-[#008F8F] bg-teal-50 border border-teal-100 px-3 py-1 rounded-full",children:[t.length," plan",t.length===1?"":"s"," in catalog"]})]})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 md:gap-8",style:{gridTemplateColumns:t.length===1?"minmax(0, 420px)":t.length===2?"repeat(2, minmax(0, 1fr))":void 0},children:t.map(b=>i.jsx(aJ,{plan:b,user:e,selected:a===b.id,featured:b.id===h,isActivatingFree:s===b.id,onSelect:()=>o(b),onCheckout:()=>c(b)},b.id))})]})}function sJ({user:e,plans:t,billingCycle:n,activatingPlanId:a,onPurchase:s}){var d;const{chatBots:o}=ds(),c=(o.length?o:$s).filter(h=>h.paid);return i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",children:c.map(h=>{var N,j;const f=t.find(T=>T.botId===h.id&&T.active),p=f?Om(f,n):null,x=on(e,h.id),b=(j=(N=e==null?void 0:e.botLicenses)==null?void 0:N[h.id])==null?void 0:j.expiresAt,v=(p==null?void 0:p.price)??0;return i.jsxs("div",{className:he("rounded-2xl border p-5 flex flex-col text-left transition-shadow",x?"border-emerald-200 bg-emerald-50/40":"border-slate-200 bg-white hover:shadow-md"),children:[i.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[i.jsx("span",{className:"text-2xl",children:h.icon}),x?i.jsxs("span",{className:"text-[10px] font-bold uppercase text-emerald-700 bg-emerald-100 px-2 py-0.5 rounded-full flex items-center gap-1",children:[i.jsx(Xa,{size:10}),"Unlocked"]}):i.jsxs("span",{className:"text-[10px] font-bold uppercase text-slate-500 bg-slate-100 px-2 py-0.5 rounded-full flex items-center gap-1",children:[i.jsx(Or,{size:10}),"Locked"]})]}),i.jsx("h3",{className:"font-bold text-slate-900 text-sm leading-tight",children:h.name}),i.jsx("p",{className:"text-[11px] text-slate-500 mt-1 flex-1",children:h.desc}),x&&b?i.jsxs("p",{className:"text-[10px] font-semibold text-emerald-700 mt-2",children:["Active until ",gr(b)]}):null,p?i.jsx("p",{className:"text-lg font-extrabold text-slate-900 mt-3",children:v===0?"Free":i.jsxs(i.Fragment,{children:["â¹",v.toLocaleStr
2321ing("en-IN"),i.jsxs("span",{className:"text-xs font-normal text-slate-400",children:["/",p.period]})]})}):i.jsx("p",{className:"text-xs text-amber-700 mt-3 bg-amber-50 border border-amber-100 rounded-lg px-2 py-1.5",children:"Admin has not published a plan for this bot yet."}),x?i.jsxs("div",{role:"status",className:"mt-4 w-full py-2.5 rounded-xl text-xs font-bold bg-slate-100 text-slate-500 border border-slate-200 flex items-center justify-center gap-1",children:[i.jsx(Xa,{size:12}),"Already purchased"]}):i.jsx("button",{type:"button",disabled:!f||a===(f==null?void 0:f.id),onClick:()=>{f!=null&&f.botId&&s(f.id,f.botId)},className:he("mt-4 w-full py-2.5 rounded-xl text-xs font-bold transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98]",v===0?"bg-[#00B5B5] hover:bg-[#008F8F] text-white":"bg-slate-900 hover:bg-[#008F8F] text-white"),children:a===(f==null?void 0:f.id)?"Activatingâ¦":f?v===0?"Activate free":(p==null?void 0:p.ctaText)??"Purchase":"Unavailable"})]},h.id)})}),i.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50 p-4 flex gap-3 items-start text-left",children:[i.jsx("span",{className:"text-2xl shrink-0",children:(d=$s.find(h=>h.id===Ht))==null?void 0:d.icon}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:"General Coach â always free"}),i.jsx("p",{className:"text-xs text-slate-500 mt-1 leading-relaxed",children:"Use General in Guide for everyday doubts. Specialist bots add exam-specific personas after purchase."})]})]})]})}function iJ({open:e,variant:t,title:n,message:a,invoiceId:s,amountInr:o,planName:c,botId:d,invoice:h,onClose:f}){const p=t==="success",{viewInvoice:x,downloadInvoice:b,printInvoice:v}=zy();return i.jsx(bt,{children:e?i.jsxs(ze.div,{className:"fixed inset-0 z-[2000] flex items-center justify-center p-4 bg-slate-950/70 backdrop-blur-sm",initial:{opacity:0}
2321,animate:{opacity:1},exit:{opacity:0},onClick:f,children:[p?i.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:12}).map((N,j)=>i.jsx(ze.span,{className:"absolute top-0 w-2 h-3 rounded-sm",style:{left:`${j*8%100}%`,backgroundColor:["#00B5B5","#6366f1","#10b981"][j%3]},initial:{y:-20,opacity:1},animate:{y:"100vh",opacity:0,rotate:360},transition:{duration:2.2,delay:j*.06,ease:"easeIn"}},j))}):null,i.jsxs(ze.div,{role:"dialog","aria-modal":!0,className:he("relative w-full max-w-md rounded-3xl border p-8 text-center shadow-2xl",p?"bg-white border-emerald-100":"bg-white border-rose-100"),initial:{scale:.92,y:16},animate:{scale:1,y:0},exit:{scale:.95,opacity:0},onClick:N=>N.stopPropagation(),children:[i.jsx(ze.div,{className:he("w-20 h-20 rounded-full mx-auto flex items-center justify-center mb-5",p?"bg-emerald-50 text-emerald-600 border border-emerald-100":"bg-rose-50 text-rose-600 border border-rose-100"),initial:{scale:.8},animate:{scale:1},children:p?i.jsx(CF,{size:36}):i.jsx(Ln,{size:36})}),i.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-2",children:n}),i.jsx("p",{className:"text-sm text-slate-500 leading-relaxed mb-5",children:a}),p&&(s||c||d)?i.jsxs("div",{className:"rounded-2xl bg-slate-50 border border-slate-100 p-4 text-left text-xs space-y-2 mb-5",children:[d?i.jsxs("div",{className:"flex justify-between gap-2",children:[i.jsx("span",{className:"text-slate-500",children:"Tutor unlocked"}),i.jsx("span",{className:"font-bold text-[#008F8F]",children:d})]}):null,c?i.jsxs("div",{className:"flex justify-between gap-2",children:[i.jsx("span",{className:"text-slate-500",children:"Plan"}),i.jsx("span",{className:"font-bold text-slate-800",children:c})]}):null,o!=null?i.jsxs("div",{className:"flex justify-between gap-2",children:[i.jsx("span",{className:"text-slate-500",children:"Paid"}),i.jsx("span",{className:"font-bold text-[#008F8F]",children:es(o)})]}):null,s?i.jsxs("div",{className:"flex justify-between gap-2 items-center",children:[i.jsxs("span",{className:"text-slate-500 flex items-center gap-1",children:[i.jsx(Jo,{size:12})," Invoice"]}),i.jsx("span",{className:"font-mono font-bold text-slate-800",children:s})]}):null]}):null,p&&h?i.jsxs("div",{className:"flex gap-2 mb-4",children:[i.jsxs("button",{type:"button",onClick:()=>x(h),className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-xl border border-slate-200 bg-white text-xs font-bold text-slate-700 hover:bg-slate-50 cursor-pointer",children:[i.jsx(Jo,{size:14}),"View invoice"]}),i.jsxs("button",{type:"button",onClick:()=>b(h),className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-xl border border-[#00B5B5]/30 bg-[#00B5B5]/10 text-xs font-bold text-[#008F8F] hover:bg-[#00B5B5]/15 cursor-pointer",children:[i.jsx(c0,{size:14}),"Download PDF"]})]}):null,p&&h?i.jsx("button",{type:"button",onClick:()=>v(h),className:"w-full mb-3 py-2 rounded-xl border border-dashed border-slate-200 text-[11px] font-bold text-slate-500 hover:bg-slate-50 cursor-pointer",children:"Print / Save as PDF"}):null,i.jsx("button",{type:"button",onClick:f,className:he("w-full py-3 rounded-xl text-sm font-bold cursor-pointer transition-colors",p?"bg-[#00B5B5] hover:bg-[#00a0a0] text-white":"bg-slate-900 hover:bg-slate-800 text-white"),children:p?"Continue learning":"Try again"})]})]}):null})}function lJ({user:e,onUpdateUser:t}){const{refreshUserProfile:n}=za();ds(),w.useEffect(()=>{Go("plan_viewed")},[]);const[a,s]=w.useState("quarterly"),[o,c]=w.useState("elite-matrix"),[d]=w.useState(2),[h,f]=w.useState(null),[p,x]=w.useState("details"),[b,v]=w.useState(!1),[N,j]=w.useState(null),[T,E]=w.useState(null),[D,k]=w.useState(null),[M,B]=w.useState(""),[_,U]=w.useState(null),[F,W]=w.useState(null),[ae,le]=w.useState(!1),[re,xe]=w.useState({open:!1,variant:"success",title:"",message:""}),{plans:te,loading:H}=b2(),[V,ne]=w.useState(0),Z=w.useMemo(()=>te.map(Ae=>Om(Ae,a)),[te,a]),Y=w.useMemo(()=>Z.find(Ae=>Ae.price===0)??Z[0],[Z]),I=w.useMemo(()=>Z.filter(Ae=>Ae.price>0),[Z]),R=w.useMemo(()=>I.find(Ae=>Ae.id==="elite-matrix")??I[0],[I]);w.useMemo(()=>I.find(Ae=>Ae.id==="cluster-uplink")??I[I.length-1],[I]),w.useEffect(()=>{I.length&&(I.some(Ae=>Ae.id===o)||c((R==null?void 0:R.id)??I[0].id))},[I,o,R]);const J=w.useMemo(()=>Z.find(Ae=>Ae.id===o)||R||Y||Z[0]||null,[o,Z,R,Y]),P=w.useMemo(()=>h?Math.max(0,h.price):0,[h]),ge=w.useMemo(()=>h?Math.max(0,h.price):0,[h]),Ee=w.useMemo(()=>P<1?0:_!=null&&_.valid&&_.discountInr?Math.max(P-_.discountInr,0):P,[P,_]),Te=Ae=>{Ae.botId&&on(e,Ae.botId)||c(Ae.id)},Ve=async Ae=>{var it,de;if(!Ae.botId){k({type:"error",text:"This plan is not linked to a tutor bot. Set botId in Admin â Plans."});return}if(on(e,Ae.botId)){const Me=(de=(it=e.botLicenses)==null?void 0:it[Ae.botId])==null?void 0:de.expiresAt;k({type:"info",text:Me?`${Ae.botId} is already active until ${gr(Me)}.`:`${Ae.botId} is already active.`});return}
2321if(!(e!=null&&e.uid)){const Me="Session expired. Sign out, sign in again, then tap Activate free.";k({type:"error",text:Me}),alert(Me);return}E(Ae.id),j(null),k({type:"info",text:`Activating ${Ae.botId} (${a})â¦`});try{const Me=await KQ({planId:Ae.id,botId:Ae.botId,billingCycle:a,userEmail:e.email,userName:e.displayName}),Bt=OV(e,Ae.botId,{id:Ae.id,name:Me.planName},a,{premiumExpiresAt:Me.periodEnd,lastPaymentId:`free_${Ae.botId}`,lastInvoiceId:Me.invoiceId,lastPaymentAmountInr:0});t&&await t(Bt),localStorage.setItem(f0,Ae.botId),yt(),kt("success",`${Ae.botId} tutor unlocked`,`Free plan activated â valid until ${gr(Me.periodEnd)}.`,{invoiceId:Me.invoiceId,amountInr:0,planName:Me.planName,botId:Ae.botId}),k({type:"success",text:`${Ae.botId} unlocked until ${gr(Me.periodEnd)}.`}),n().catch(xn=>console.warn("[premium] profile refresh after free claim:",xn))}catch(Me){const Bt=Me instanceof Error?Me.message:"Could not activate free plan";j(Bt),k({type:"error",text:Bt}),alert(Bt)}finally{E(null)}},et=Ae=>{var it,de;if(Ae.price===0&&Ae.botId){Ve(Ae);return}if(Ae.price===0&&!Ae.botId){alert("General Coach is free â open Guide and select General.");return}if(!Ae.botId){alert("This plan is not linked to an exam bot. Set botId in Admin â Plans.");return}if(on(e,Ae.botId)){const Me=(de=(it=e.botLicenses)==null?void 0:it[Ae.botId])==null?void 0:de.expiresAt;alert(Me?`${Ae.botId} is already active until ${gr(Me)}. Open Guide to use it.`:`${Ae.botId} is already active. Open Guide to use it.`);return}c(Ae.id),j(null),B(""),U(null),W(null),f(Ae),x("details")},Re=(Ae,it)=>{const de=Z.find(Me=>Me.id===Ae);de&&et(de)};w.useEffect(()=>{const Ae=PV();if(!Ae||!te.length)return;const it=te.find(Me=>Me.botId===Ae&&Me.active);if(!it)return;const de=Om(it,a);if(c(it.id),j(null),de.price===0&&de.botId){Ve(de);return}de.price>0&&(f(de),x("details"))},[te,a]);const kt=(Ae,it,de,Me)=>{xe({open:!0,variant:Ae,title:it,message:de,...Me})},yt=()=>{f(null),x("details"),B(""),U(null),W(null)},Yt=async()=>{const Ae=Zu(M),it=GC(Ae);if(it){U(null),W(it);return}if(h){if(P<1){W("Coupons do not apply to free plans.");return}le(!0),W(null);try{const de=await N7({code:Ae,planId:h.id,billingCycle:a,amountInr:P,botId:h.botId??void 0});if(!de.valid){U(null),W(de.message||"Invalid coupon code.");return}U(de),B(de.code??Ae)}catch(de){U(null);const Me=de instanceof Error?de.message:"Could not apply coupon";Me.includes("permission")||Me.includes("Permission")?W("Could not read coupons. Publish updated Firestore rules (coupons read for signed-in users)."):W(Me)}finally{le(!1)}}},cn=async()=>{if(!h||!(e!=null&&e.uid))return;const Ae=Zu(M),it=_!=null&&_.valid?Zu(_.code??""):"";if(Ae&&Ae!==it){W("Tap Apply to validate your coupon before paying.");return}if(Ee<1){await Ve(h);return}if(h.botId&&on(e,h.botId)){alert("This tutor is already unlocked on your account.");return}j(null),v(!0);let de="";try{if(!h.botId)throw new Error("This plan is not linked to a tutor bot.");if(_!=null&&_.valid&&_.code){const Vn=await N7({code:_.code,planId:h.id,billingCycle:a,botId:h.botId});if(!Vn.valid){U(null),W(Vn.message||"Coupon is no longer valid."),v(!1);return}U(Vn)}const Me=await QQ({planId:h.id,botId:h.botId,billingCycle:a,userEmail:e.email,couponCode:_!=null&&_.valid?_.code:void 0}),Bt=Me.chargeAmountInr??Ee,xn=Me.discountInr??(_==null?void 0:_.discountInr)??0;de=Me.orderId,x("details"),await nJ({keyId:Me.keyId||"rzp_test_xxxxxxxx",orderId:Me.orderId,amount:Me.amount,currency:Me.currency,name:"Socratech AI",description:h.name,prefill:{name:e.displayName,email:e.email},onDismiss:()=>{x("details"),vw({userId:e.uid,userEmail:e.email??"",userName:e.displayName??"Student",planId:h.id,planName:h.name,billingCycle:a,amountInr:Bt,razorpayOrderId:de,reason:"Checkout closed"}).catch(()=>{}),kt("failure","Payment cancelled","You closed checkout before completing payment. Try again anytime.",{planName:h.name})},onSuccess:async Vn=>{const Da=h,Zt=Me.botId??Da.botId;if(!Zt||!fn(Zt))throw new Error("Missing bot for this plan.");const Ct=Zt,Ba=Bt;yt();try{const ue=await JQ({...Vn,userEmail:e.email??"",userName:e.displayName??"
2321Student"});localStorage.setItem(f0,Ct),await n();const we=new Date().toISOString(),Ue=ue.periodEnd??new Date(Date.now()+(a==="quarterly"?90:30)*864e5).toISOString(),Le=pV({invoiceId:ue.invoiceId,userId:e.uid,userEmail:e.email??"",userName:e.displayName??"Student",planId:Da.id,planName:Da.name,botId:Ct,billingCycle:a,amountInr:Ba,razorpayOrderId:ue.razorpayOrderId,razorpayPaymentId:ue.razorpayPaymentId,periodStart:we,periodEnd:Ue});kt("success","Payment successful!",`${Ct} tutor unlocked. Open Guide to start chatting.`,{invoiceId:ue.invoiceId,amountInr:Ba,planName:Da.name,botId:Ct,invoice:Le})}catch(ue){const we=ue instanceof Error?ue.message:"Payment verified but unlock failed";j(we),kt("failure","Unlock failed",we,{planName:Da.name})}}})}catch(Me){yt();const Bt=Me instanceof Error?Me.message:"Payment could not be completed";j(Bt),vw({userId:e.uid,userEmail:e.email??"",userName:e.displayName??"Student",planId:h.id,planName:h.name}).catch(()=>{}),kt("failure","Payment failed",Bt,{planName:h.name})}finally{v(!1)}},vt=[{q:"How does Razorpay checkout work?",a:"We create a secure Razorpay order on our server. You pay with UPI, cards, or net banking. After payment, we verify it and unlock the tutor on your profile. Your invoice appears under Account."},{q:"How fast are tutor replies?",a:"Most replies arrive within a few seconds. Speed depends on your connection and how long your question is. Longer step-by-step explanations may take slightly longer."},{q:"Do you offer classroom or coaching batch plans?",a:"Bulk plans for coaching centres can be arranged separately. Contact us at [email protected] with your batch size and exam track."},{q:"Does my progress sync across devices?",a:"Yes. Your profile, chat history, and purchases are tied to your signed-in account and stored securely, so you can continue on another phone or browser."}];return i.jsxs("div",{className:"relative font-sans text-slate-800 pb-32 px-4 sm:px-6 lg:px-8 bg-[#FAFBFD] overflow-x-clip max-w-full min-w-0 select-none",children:[i.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none opacity-45",children:[i.jsx("div",{className:"absolute top-[-5%] left-[5%] w-[500px] h-[500px] rounded-full bg-teal-100/35 blur-[135px]"}),i.jsx("div",{className:"absolute top-[40%] right-[-10%] w-[600px] h-[600px] rounded-full bg-indigo-100/35 blur-[165px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.012)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.012)_1px,transparent_1px)] bg-[size:5rem_5rem]"})]}),i.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto space-y-10 pt-8",children:[i.jsxs("div",{className:"text-left space-y-2 pb-2",children:[i.jsx("h1",{className:"text-3xl sm:text-4xl font-black text-slate-900 tracking-tight",children:"Exam tutors & checkout"}),i.jsx("p",{className:"text-sm text-slate-500 max-w-2xl leading-relaxed",children:"Unlock JEE, NEET, UPSC, or GATE specialists. General Coach stays free."}),H&&i.jsx("p",{className:"text-xs font-medium text-slate-400",children:"Loading plans from admin catalogâ¦"})]}),D?i.jsx("div",{role:"status",className:he("rounded-2xl border px-4 py-3 text-sm font-medium",D.type==="error"&&"border-rose-200 bg-rose-50 text-rose-800",D.type==="success"&&"border-emerald-200 bg-emerald-50 text-emerald-800",D.type==="info"&&"border-teal-200 bg-teal-50 text-teal-900"),children:D.text}):null,i.jsx(sJ,{user:e,plans:te,billingCycle:a,activatingPlanId:T,onPurchase:Re}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 lg:grid-cols-12 gap-6 md:gap-8 items-stretch",children:[i.jsxs("div",{className:"md:col-span-3 lg:col-span-4 bg-white border border-slate-200/80 rounded-[28px] p-6 sm:p-7 shadow-[0_2px_12px_rgba(0,0,0,0.015)] flex flex-col justify-between text-left",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsx("h3",{className:"text-lg font-bold text-slate-900 tracking-tight",children:"Billing cycle"}),i.jsx("p",{className:"text-xs text-slate-500 font-medium leading-relaxed",children:"Monthly or quarterly pricing from the admin catalog. Free monthly plans show âActivate freeâ when selected."}),i.jsxs("div",{className:"space-y-3 pt-4",children:[i.jsxs("button",{type:"button",onClick:()=>s("quarterly"),className:he("w-full p-4 rounded-2xl border text-left flex items-center justify-between transition-all duration-200 cursor-pointer",a==="quarterly"?"bg-slate-900 border-slate-950 text-white shadow-xs":"bg-slate-50/50 border-slate-200 hover:bg-slate-50 text-slate-700"),
2321children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx("span",{className:"text-xs font-bold font-sans block",children:"Quarterly access term"}),i.jsx("span",{className:he("text-[10px] font-medium block",a==="quarterly"?"text-teal-400":"text-slate-450"),children:"Best deal ⢠auto 15% discount"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"px-2 py-0.5 bg-emerald-500 text-white text-[9px] font-bold rounded-md",children:"Save 15%"}),i.jsx("div",{className:he("w-4 h-4 rounded-full border flex items-center justify-center shrink-0",a==="quarterly"?"border-[#00D2D2] bg-slate-900":"border-slate-350"),children:a==="quarterly"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-[#00D2D2]"})})]})]}),i.jsxs("button",{type:"button",onClick:()=>s("monthly"),className:he("w-full p-4 rounded-2xl border text-left flex items-center justify-between transition-all duration-200 cursor-pointer",a==="monthly"?"bg-slate-900 border-slate-950 text-white shadow-xs":"bg-slate-50/50 border-slate-200 hover:bg-slate-50 text-slate-700"),children:[i.jsxs("div",{className:"space-y-0.5",children:[i.jsx("span",{className:"text-xs font-bold font-sans block",children:"Monthly standard cycle"}),i.jsx("span",{className:he("text-[10px] font-medium block",a==="monthly"?"text-teal-400":"text-slate-450"),children:"Total flexibility, pay as you go"})]}),i.jsx("div",{className:he("w-4 h-4 rounded-full border flex items-center justify-center shrink-0",a==="monthly"?"border-[#00D2D2] bg-slate-900":"border-slate-350"),children:a==="monthly"&&i.jsx("div",{className:"w-2 h-2 rounded-full bg-[#00D2D2]"})})]})]})]}),i.jsxs("div",{className:"mt-6 pt-4 border-t border-slate-100 flex items-center gap-2 text-[10px] text-slate-400",children:[i.jsx(lF,{size:13,className:"text-[#008F8F]"}),i.jsx("span",{children:"Configure frequency before subscribing"})]})]}),i.jsxs("div",{className:"md:col-span-3 lg:col-span-4 bg-white border border-slate-200/80 rounded-[28px] p-6 sm:p-7 shadow-[0_2px_12px_rgba(0,0,0,0.015)] flex flex-col justify-between text-left",children:[i.jsxs("div",{className:"space-y-5",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("div",{className:"px-2.5 py-0.5 bg-emerald-50 border border-emerald-150 rounded-md",children:i.jsx("span",{className:"text-[10px] font-semibold text-emerald-800",children:"Your selection"})})}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("h3",{className:"text-lg font-bold text-slate-900 tracking-tight",children:"Plan summary"}),i.jsx("p",{className:"text-xs text-slate-500 font-medium leading-relaxed",children:"Read-only preview of your selected plan and billing cycle."})]}),i.jsxs("div",{className:"space-y-3 pt-2",children:[i.jsxs("div",{className:"flex justify-between items-center bg-slate-50/60 border border-slate-100 p-3 rounded-2xl text-xs",children:[i.jsx("span",{className:"text-slate-500 font-medium",children:"Selected base plan name:"}),i.jsx("span",{className:"font-extrabold text-[#008F8F] capitalize",children:(J==null?void 0:J.name)??"â"})]}),i.jsxs("div",{className:"flex justify-between items-center bg-slate-50/60 border border-slate-100 p-3 rounded-2xl text-xs",children:[i.jsx("span",{className:"text-slate-500 font-medium",children:"Active billing cycle:"}),i.jsx("span",{className:"font-extrabold text-slate-800 capitalize",children:a==="quarterly"?"Quarterly contract":"Monthly renewal"})]}),i.jsxs("div",{className:"flex justify-between items-center bg-slate-50/60 border border-slate-100 p-3 rounded-2xl text-xs",children:[i.jsx("span",{className:"text-slate-500 font-medium",children:"Calculated latency ceiling:"}),i.jsx("span",{className:"font-extrabold text-slate-800",children:d===1?"Under 2.0s":d===2?"Under 1.2s":"Under 0.8s max"})]})]})]}),i.jsx("div",{className:"grid grid-cols-1 gap-2 mt-6 pt-4 border-t border-slate-100 text-[10px] text-slate-500",children:i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500"}),i.jsx("span",{children:"Secure payments via Razorpay"})]})})]}),i.jsx(rJ,{user:e,plans:Z,loading:H,selectedPlanId:o,activatingFreePlanId:T,onSelectPlan:Te,onCheckout:et})]}),i.jsxs("section",{className:"space-y-4 max-w-4xl mx-auto pt-6 text-left",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("h2",{className:"text-lg font-bold text-slate-900 tracking-tight",children:"Billing & support"}),i.jsx("p",{className:"text-xs text-slate-500",children:"Tap a question to see the answer."})]}),i.jsx("div",{className:"space-y-3",children:vt.map((Ae,it)=>{const de=V===it;return i.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":de,className:"bg-white border border-slate-200/80 rounded-2xl p-4.5 cursor-pointer text-left transition-colors hover:border-slate-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00B5B5]/40",onClick:()=>ne(de?null:it),onKeyDown:Me=>{(Me.key==="Enter"||Me.key===" ")&&(Me.preventDefault(),ne(de?null:it))},children:[i.jsxs("div",{className:"flex justify-between items-center gap-3",children:[i.jsx("span",{className:"text-xs font-bold text-slate-800 font-sans",children:Ae.q}),i.jsx("span",{className:"w-5 h-5 rounded-md bg-slate-50 border border-slate-100 flex items-center justify-center shrink-0 text-slate-400",children:de?i.jsx(zg,{size:11,className:"rotate-180 transition-transform"}):i.jsx(zg,{size:11})})]}),i.jsx(bt,{children:de&&i.jsx(ze.div,{initial:{opacity:0,height:0}
2321,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.15},className:"overflow-hidden",children:i.jsx("p",{className:"text-xs text-slate-500 font-medium leading-relaxed pt-3 mt-3 border-t border-slate-100 select-text",children:Ae.a})})})]},it)})})]}),i.jsx(bt,{children:h&&i.jsx("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center p-4 bg-slate-950/85 backdrop-blur-xs select-none",children:i.jsxs("div",{className:"relative w-full max-w-md bg-white rounded-3xl border border-slate-200 shadow-2xl p-6 overflow-hidden text-left",children:[i.jsx("button",{type:"button",onClick:()=>f(null),className:"absolute top-5 right-5 w-8 h-8 rounded-full bg-slate-50 border border-slate-100 flex items-center justify-center text-slate-400 hover:text-slate-900 cursor-pointer",children:i.jsx(Ln,{size:15})}),i.jsxs(bt,{mode:"wait",children:[p==="details"&&i.jsxs(ze.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},className:"space-y-6",children:[i.jsxs("div",{className:"space-y-1",children:[i.jsx("span",{className:"text-[9px] font-bold text-[#008F8F] block",children:"Upgrade step 1 of 2"}),i.jsx("h4",{className:"text-base font-bold text-slate-900",children:"Razorpay secure checkout"}),i.jsx("p",{className:"text-[11px] text-slate-400 font-medium",children:"UPI, cards, and netbanking supported"})]}),i.jsxs("div",{className:"bg-slate-50 p-4 rounded-2xl border border-slate-150 space-y-3 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-slate-500 font-medium",children:"Selected protocol plan:"}),i.jsx("span",{className:"font-extrabold text-slate-900",children:h.name})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-slate-500 font-medium",children:"Active cycle term:"}),i.jsx("span",{className:"font-extrabold text-slate-900",children:oJ(h.period)})]}),i.jsx("hr",{className:"border-t border-slate-200"}),P!==ge?i.jsxs("div",{className:"flex justify-between text-slate-600",children:[i.jsx("span",{children:"Plan base:"}),i.jsxs("span",{className:"font-mono",children:["â¹",ge.toLocaleString()]})]}):null,_!=null&&_.valid&&_.discountInr?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between text-emerald-700",children:[i.jsxs("span",{children:["Coupon (",_.code,"):"]}),i.jsxs("span",{className:"font-bold",children:["â â¹",_.discountInr.toLocaleString()]})]}),P>ge?i.jsxs("div",{className:"flex justify-between text-slate-500 text-[10px]",children:[i.jsx("span",{children:"Add-ons in total:"}),i.jsxs("span",{children:["+ â¹",(P-ge).toLocaleString()]})]}):null]}):null,i.jsxs("div",{className:"flex justify-between items-baseline pt-1",children:[i.jsx("span",{className:"text-slate-500 font-bold",children:"Amount to pay:"}),i.jsxs("div",{className:"text-right",children:[_!=null&&_.valid&&Ee<P?i.jsxs("span",{className:"block text-[10px] text-slate-400 line-through font-mono",children:["â¹",P.toLocaleString()]}):null,i.jsxs("span",{className:"text-2xl font-mono font-black text-[#008F8F]",children:["â¹",Ee.toLocaleString()]})]})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"Coupon code"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{value:M,onChange:Ae=>{B(Ae.target.value.toUpperCase()),U(null),W(null)},onKeyDown:Ae=>{Ae.key==="Enter"&&(Ae.preventDefault(),Yt())},placeholder:"e.g. HGTY30",maxLength:32,autoComplete:"off",spellCheck:!1,className:"flex-1 min-w-0 px-3 py-2 rounded-xl border border-slate-200 text-xs font-mono uppercase"}),i.jsx("button",{type:"button",disabled:ae||!M.trim(),onClick:()=>void Yt(),className:"shrink-0 min-w-[72px] px-4 py-2 rounded-xl border border-[#00B5B5] bg-teal-50 text-[#008F8F] text-xs font-bold cursor-pointer disabled:opacity-50",children:ae?"Checkingâ¦":_!=null&&_.valid?"Applied":"Apply"})]}),_!=null&&_.valid?i.jsx("p",{className:"text-[10px] text-emerald-700 font-semibold",children:_.message}):null,F?i.jsx("p",{className:"text-[10px] text-rose-600 font-medium",children:F}):null]}),N&&i.jsx("p",{className:"text-[11px] text-red-600 font-medium bg-red-50 border border-red-100 rounded-lg p-2.5",children:N}),i.jsxs("p",{className:"text-[10px] text-slate-500 font-medium flex items-center gap-1.5",children:[i.jsx(Or,{size:11,className:"text-slate-400"}),"Payment is processed by Razorpay. Premium unlocks after verification."]}),i.jsxs("button",{type:"button",disabled:b,onClick:()=>void cn(),className:"w-full py-3.5 bg-slate-900 hover:bg-slate-950 disabled:opacity-60 disabled:cursor-wait text-[#00E5E5] rounded-xl font-bold text-xs tracking-wide cursor-pointer text-center active:scale-98 shadow-md flex items-center justify-center gap-2",children:[i.jsx(Jm,{size:14}),b?"Opening Razorpayâ¦":"Pay with Razorpay"]})]},"details"),p==="success"&&i.jsxs(ze.div,{initial:{opacity:0,scale:.95}
2321,animate:{opacity:1,scale:1},exit:{opacity:0},className:"text-center py-6 space-y-5",children:[i.jsx("div",{className:"w-16 h-16 bg-emerald-50 rounded-full flex items-center justify-center text-emerald-600 mx-auto border border-emerald-100",children:i.jsx(Xa,{size:32})}),i.jsxs("div",{className:"space-y-1",children:[i.jsx("h4",{className:"text-lg font-bold text-slate-900",children:"Sync Uplink Complete"}),i.jsx("p",{className:"text-xs text-teal-600 font-semibold tracking-wide",children:"Your premium Socratic node parameters are online"})]}),i.jsxs("div",{className:"bg-slate-50 p-4 rounded-xl border border-slate-150 text-xs text-slate-600 space-y-1.5 leading-normal select-all text-left",children:[i.jsx("p",{className:"font-bold text-slate-800",children:"Uplink metadata ledger:"}),i.jsxs("p",{className:"font-mono text-[10px]",children:["Reference code: MOCK-SOC-",Math.floor(1e5+Math.random()*9e5)]}),i.jsxs("p",{className:"font-mono text-[10px]",children:["Activated price index: â¹",P.toLocaleString()]}),i.jsx("p",{className:"text-emerald-700 font-bold text-[11px] mt-2 block",children:"Success: Premium calibrated status unlocked inside your local study session database!"})]}),i.jsxs("button",{type:"button",onClick:()=>{f(null)},className:"py-3 px-6 bg-slate-900 hover:bg-[#00B5B5] text-white rounded-xl text-xs font-bold transition-all cursor-pointer inline-flex items-center gap-1.5 active:scale-95",children:[i.jsx(d0,{size:11}),i.jsx("span",{children:"Return to Workspace"})]})]},"success")]})]})})}),i.jsx(iJ,{open:re.open,variant:re.variant,title:re.title,message:re.message,invoiceId:re.invoiceId,amountInr:re.amountInr,planName:re.planName,botId:re.botId,invoice:re.invoice,onClose:()=>xe(Ae=>({...Ae,open:!1}))})]})]})}function oJ(e){return e==="month"?"monthly flexible":e==="quarter"?"quarterly contracts":"lifetime active"}function j7(e,t){if(e==="exams")return t.map(a=>Aj(a));const n=Fl.find(a=>a.id===e);return n?t.map(a=>{var s;return((s=n.options.find(o=>o.id===a))==null?void 0:s.label)??a}):t}function YC(e){var s;if(!e||e.onboardingStatus!==Pl)return[];const t=e.onboardingAnswers,n=[],a=Fl.find(o=>o.id==="exams");if(a&&((s=e.selectedExams)!=null&&s.length)&&n.push({stepId:"exams",title:a.title,labels:j7("exams",e.selectedExams)}),t){const o=[{key:"classLevel",stepId:"classLevel"},{key:"learningStyle",stepId:"learningStyle"},{key:"studyHours",stepId:"studyHours"},{key:"studyGoal",stepId:"studyGoal"}];for(const{key:c,stepId:d}of o){const h=t[c];if(typeof h!="string"||!h)continue;const f=Fl.find(p=>p.id===d);n.push({stepId:d,title:(f==null?void 0:f.title)??d,labels:j7(d,[h])})}}return n}function cJ(e){return YC(e).length>0}function uJ(e){if(!e)return"â";try{return new Date(e).toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"})}catch{return"â"}}function dJ({userId:e}){const[t,n]=w.useState([]),[a,s]=w.useState(!0),{viewInvoice:o,downloadInvoice:c}=zy();return w.useEffect(()=>{let d=!1;return(async()=>{s(!0);try{const h=await xV(e);d||n(h)}catch{d||n([])}finally{d||s(!1)}})(),()=>{d=!0}},[e]),i.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white overflow-hidden shadow-sm",children:[i.jsxs("div",{className:"flex items-center gap-2.5 px-5 py-4 border-b border-slate-100 bg-slate-50/60",children:[i.jsx("div",{className:"w-8 h-8 rounded-xl bg-[#00B5B5]/10 flex items-center justify-center shrink-0",children:i.jsx(Jo,{className:"w-4 h-4 text-[#00B5B5]"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-sm font-bold text-slate-900 leading-none",children:"Billing & Invoices"}),i.jsx("p",{className:"text-[11px] text-slate-400 mt-0.5",children:"Tax receipts for all purchases"})]}),t.length>0&&i.jsxs("span",{className:"ml-auto text-[10px] font-bold text-slate-500 bg-slate-100 px-2 py-0.5 rounded-full",children:[t.length," invoice",t.length!==1?"s":""]})]}),i.jsx("div",{className:"p-4 sm:p-5",children:a?i.jsx("div",{className:"flex justify-center py-10",children:i.jsx(Qe,{className:"w-6 h-6 text-[#00B5B5] animate-spin"})}):t.length===0?i.jsxs("div",{className:"flex flex-col items-center py-10 text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-2xl bg-slate-100 flex items-center justify-center mb-3",children:i.jsx(Jo,{className:"w-5 h-5 text-slate-400"})}),i.jsx("p",{className:"text-sm font-semibold text-slate-700",children:"No invoices yet"}),i.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your tax receipts will appear here after purchase."})]}):i.jsx("ul",{className:"space-y-3",children:t.map(d=>i.jsxs("li",{className:"group flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-4 rounded-2xl bg-slate-50/50 border border-slate-100",children:[i.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[i.jsx("div",{className:"w-9 h-9 rounded-xl bg-[#0f172a] flex items-center justify-center shrink-0",children:i.jsx(Jo,{className:"w-4 h-4 text-white"})}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900 truncate",children:d.planName}),d.botId?i.jsx("span",{className:"text-[10px] font-bold text-[#008F8F] bg-teal-50 border border-teal-100 px-2 py-0.5 rounded-full",children:d.botId}):null]}),i.jsx("p",{className:"text-[10px] font-mono text-slate-400 mt-0.5 truncate",children:d.id}),i.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[i.jsx("span",{className:"text-[11px] text-slate-500",children:uJ(d.issuedAt)}),i.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded-full",children:[i.jsx(o0,{size:9}),"Paid"]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 flex-wrap sm:flex-nowrap shrink-0",children:[i.jsx("span",{className:"text-base font-extrabold text-slate-900",children:es(d.totalInr)}),i.jsxs("button",{type:"button",onClick:()=>o(d),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl border border-slate-200 text-xs font-bold text-slate-700 hover:bg-slate-50 cursor-pointer transition-colors",children:[i.jsx(_g,{size:12}),"View"]}
2321),i.jsxs("button",{type:"button",onClick:()=>c(d),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-[#0f172a] hover:bg-[#1e293b] text-xs font-bold text-white cursor-pointer transition-colors",children:[i.jsx(c0,{size:12}),"PDF"]})]})]},d.id))})})]})}const hJ="inactive",k7=10;async function mJ(e,t){const n=t.trim();if(n.length<k7)throw new Error(`Please write at least ${k7} characters explaining why.`);const a=await fetch("/api/account/deactivation-request",{method:"POST",credentials:"include",headers:I0({"Content-Type":"application/json"}),body:JSON.stringify({reason:n,email:e.email,displayName:e.displayName})}),s=await a.json().catch(()=>({}));if(!a.ok)throw new Error(typeof s.error=="string"?s.error:"Could not deactivate account. Try again or contact support.")}function fJ({user:e,onStatusChange:t}){const{handleLogout:n}=za(),[a,s]=w.useState(!1),[o,c]=w.useState(!1),[d,h]=w.useState(""),[f,p]=w.useState(!1),[x,b]=w.useState("");if((e.accountStatus??"active")===hJ)return i.jsxs("div",{className:"rounded-2xl border border-rose-200 bg-rose-50/60 p-5 text-left",children:[i.jsxs("p",{className:"text-sm font-bold text-rose-800 flex items-center gap-2",children:[i.jsx(vm,{className:"w-4 h-4"}),"Account deactivated"]}),i.jsx("p",{className:"text-xs text-rose-700 mt-2 leading-relaxed",children:"Your account has been deactivated. Contact support if you want it restored."})]});const N=async T=>{T.preventDefault(),b(""),p(!0);try{await mJ(e,d),t()}catch(E){b(E instanceof Error?E.message:"Could not deactivate account. Try again."),p(!1)}},j=()=>{s(!1),c(!1),h(""),b("")};return i.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-5 sm:p-6 text-left shadow-sm",children:[i.jsxs("p",{className:"text-sm font-bold text-slate-900 flex items-center gap-2",children:[i.jsx(vm,{className:"w-4 h-4 text-slate-500"}),"Deactivate account"]}),i.jsx("p",{className:"text-xs text-slate-500 mt-2 leading-relaxed max-w-xl",children:"This will immediately disable your account. You will be signed out and won't be able to sign in again. Your study data stays on our servers. Contact support to restore access."}),a?o?i.jsxs("form",{onSubmit:T=>void N(T),className:"mt-4 space-y-3",children:[i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Why do you want to deactivate? ",i.jsx("span",{className:"text-rose-500",children:"*"})]}),i.jsx("textarea",{value:d,onChange:T=>h(T.target.value),rows:4,maxLength:2e3,placeholder:"Tell us briefly â e.g. finished exams, switching platform, privacy concernsâ¦",className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-sm text-slate-800 outline-none focus:border-rose-400 focus:ring-2 focus:ring-rose-400/15 resize-y",required:!0,autoFocus:!0}),x?i.jsx("p",{className:"text-xs text-rose-600 font-medium",children:x}):null,i.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.jsxs("button",{type:"submit",disabled:f||d.trim().length<10,className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-rose-600 text-white text-xs font-bold hover:bg-rose-700 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-colors",children:[f?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):null,f?"Deactivatingâ¦":"Confirm deactivation"]}),i.jsx("button",{type:"button",onClick:j,disabled:f,className:"px-4 py-2.5 rounded-xl border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer disabled:opacity-50",children:"Cancel"})]}),i.jsx("p",{className:"text-[10px] text-slate-400 leading-relaxed",children:'Pressing "Confirm deactivation" will immediately sign you out and disable your account. This action cannot be undone without contacting support.'})]}):i.jsxs("div",{className:"mt-4 rounded-xl border border-rose-100 bg-rose-50/60 p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start gap-2.5",children:[i.jsx(My,{className:"w-4 h-4 text-rose-600 shrink-0 mt-0.5"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-bold text-rose-900",children:"Are you sure?"}),i.jsxs("p",{className:"text-xs text-rose-700 mt-1 leading-relaxed",children:["Your account will be deactivated ",i.jsx("strong",{children:"immediately"})," after you confirm. You'll be signed out right away."]})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",onClick:()=>c(!0),className:"px-4 py-2 rounded-lg bg-rose-600 text-white text-xs font-bold hover:bg-rose-700 cursor-pointer transition-colors",children:"Yes, continue"}),i.jsx("button",{type:"button",onClick:j,className:"px-4 py-2 rounded-lg border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:"Cancel"})]})]}):i.jsx("button",{type:"button",onClick:()=>s(!0),className:"mt-4 px-4 py-2.5 rounded-xl border border-rose-200 bg-rose-50 text-rose-800 text-xs font-bold hover:bg-rose-100 cursor-pointer transition-colors",children:"Deactivate my account"})]})}var $7;const pJ=(($7=Fl.find(e=>e.id==="exams"))==null?void 0:$7.options)??[],xJ=[{id:"strict",label:"Str
2321ict",hint:"Questions only"},{id:"balanced",label:"Balanced",hint:"Questions + hints"},{id:"descriptive",label:"Direct",hint:"Full explanations"}];function Mh({title:e,children:t,className:n}){return i.jsxs("section",{className:he("bg-white border border-slate-200 rounded-xl p-4 space-y-3.5",n),children:[i.jsx("h2",{className:"text-xs font-bold text-slate-900 uppercase tracking-wide",children:e}),t]})}function gJ({user:e,onUpdateUser:t,onNavigate:n}){var V,ne;const{refreshUserProfile:a,updateUser:s}=za(),{exams:o}=ds(),c=w.useMemo(()=>o.length?o.map(Z=>({id:Z.id,label:Z.name,description:Z.description})):pJ,[o]),d=w.useMemo(()=>{const Z=cs();return Z.length?Z:[...Hl]},[o]),h=w.useMemo(()=>{const Z=Nm();return Z.length?Z:$s},[o]);w.useEffect(()=>{if(!(e!=null&&e.uid))return;const Z=`socratech_license_repair_${e.uid}`;if(sessionStorage.getItem(Z))return;let Y=!1;return(async()=>{try{const I=await ZQ(e.uid);sessionStorage.setItem(Z,"1"),!Y&&I>0&&await a()}catch{sessionStorage.setItem(Z,"1")}})(),()=>{Y=!0}},[e==null?void 0:e.uid,a]);const[f,p]=w.useState(e.displayName||""),[x,b]=w.useState(!1),[v,N]=w.useState(!1),[j,T]=w.useState(!1),[E,D]=w.useState(""),[k,M]=w.useState(e.selectedExams??[]),B=(V=e.onboardingAnswers)==null?void 0:V.learningStyle,_=B==="strict"||B==="balanced"||B==="descriptive"?B:"balanced",[U,F]=w.useState(_),W=w.useMemo(()=>YC(e),[e]),ae=e.onboardingStatus!==mS,le=U0(e);w.useEffect(()=>{var Y;p(e.displayName||""),M(e.selectedExams??[]);const Z=(Y=e.onboardingAnswers)==null?void 0:Y.learningStyle;(Z==="strict"||Z==="balanced"||Z==="descriptive")&&F(Z)},[e]);const re=async Z=>{const Y=k.includes(Z)?k.filter(I=>I!==Z):[...k,Z];M(Y),await t({selectedExams:Y})},xe=async()=>{N(!0),D(""),T(!1);const Z=await s({displayName:f.trim()||e.displayName});if(N(!1),!Z.ok){D(Z.error||"Could not save your name. Check your connection and try again.");return}b(!1),T(!0),setTimeout(()=>T(!1),2e3)},te=Z=>{var I,R,J,P;F(Z);const Y={classLevel:((I=e.onboardingAnswers)==null?void 0:I.classLevel)??"",studyHours:((R=e.onboardingAnswers)==null?void 0:R.studyHours)??"",studyGoal:((J=e.onboardingAnswers)==null?void 0:J.studyGoal)??"",learningStyle:Z,completedAt:(P=e.onboardingAnswers)==null?void 0:P.completedAt};t({onboardingAnswers:Y})},H=d.filter(Z=>on(e,Z));return i.jsxs("div",{className:"pb-24 px-3 sm:px-5 w-full space-y-5 pt-3",children:[i.jsxs("header",{className:"space-y-1.5",children:[i.jsx("h1",{className:"text-lg font-black text-slate-900",children:"Account"}),i.jsx("p",{className:"text-[11px] text-slate-500 leading-snug",children:le})]}),i.jsxs("section",{className:"bg-white border border-slate-200 rounded-xl p-4 flex gap-3 items-center",children:[i.jsx(Il,{photoURL:e.photoURL,displayName:e.displayName,email:e.email,className:"w-14 h-14 rounded-xl border border-slate-200 shrink-0",textClassName:"text-sm"}),i.jsxs("div",{className:"flex-1 min-w-0",children:[x?i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:f,onChange:Z=>p(Z.target.value),className:"flex-1 min-w-0 px-2 py-1.5 rounded-lg border border-slate-200 text-xs font-semibold focus:border-[#00B5B5] focus:outline-none",autoFocus:!0}),i.jsx("button",{type:"button",onClick:xe,disabled:v,className:"px-2.5 py-1.5 rounded-lg bg-slate-900 text-white text-[10px] font-bold shrink-0",children:v?i.jsx(Qe,{size:12,className:"animate-spin"}):"Save"})]}):i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900 truncate",children:e.displayName}),i.jsx("button",{type:"button",onClick:()=>b(!0),className:"p-1 text-slate-400 hover:text-[#008F8F]","aria-label":"Edit name",children:i.jsx(P0,{size:12})})]}),j&&i.jsx("p",{className:"text-[10px] text-emerald-600 font-semibold mt-0.5",children:"Saved"}),E?i.jsx("p",{role:"alert",className:"text-[10px] text-rose-600 font-semibold mt-0.5",children:E}):null,i.jsxs("p",{className:"text-[11px] text-slate-500 flex items-center gap-1 mt-0.5 truncate",children:[i.jsx(Zm,{size:11,className:"shrink-0"}),e.email]})]})]}),i.jsxs("section",{className:"bg-slate-900 text-white rounded-xl p-4 flex items-center justify-between gap-3",children:[i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-[10px] text-slate-400 font-semibold uppercase",children:"Your plan"}),i.jsx("p",{className:"text-sm font-bold truncate flex items-center gap-1.5 mt-0.5",children:e.isPremium?i.jsxs(i.Fragment,{children:[i.jsx(Sr,{size:14,className:"text-amber-400 shrink-0"}),e.activePlanName??"Premium"]}):"Free â General Coach"}),H.length>0&&i.jsxs("p",{className:"text-[10px] text-teal-300 mt-1",children:["Unlocked: ",H.join(", ")
2321]})]}),i.jsx("button",{type:"button",onClick:()=>n("premium"),className:"shrink-0 px-3 py-2 rounded-lg bg-[#00B5B5] text-slate-950 text-[10px] font-bold",children:e.isPremium?"Plans":"Upgrade"})]}),ae&&W.length>0&&i.jsxs(Mh,{title:"Your setup",children:[i.jsx("ul",{className:"space-y-2",children:W.map(Z=>i.jsxs("li",{className:"text-left",children:[i.jsx("p",{className:"text-[10px] text-slate-400 font-medium",children:Z.title}),i.jsx("p",{className:"text-xs font-semibold text-slate-800 mt-0.5",children:Z.labels.join(" · ")})]},Z.stepId))}),cJ(e)&&((ne=e.onboardingAnswers)==null?void 0:ne.completedAt)&&i.jsxs("p",{className:"text-[10px] text-slate-400 pt-1 border-t border-slate-100",children:["Updated"," ",new Date(e.onboardingAnswers.completedAt).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})]})]}),!ae&&i.jsx("p",{className:"text-xs text-amber-800 bg-amber-50 border border-amber-100 rounded-lg px-3 py-2",children:"Finish onboarding to personalize Home and Roadmap."}),i.jsxs(Mh,{title:"Exam targets",children:[i.jsx("p",{className:"text-[11px] text-slate-500 -mt-1",children:"Tap to add or remove â updates Home & Road."}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:c.map(Z=>{const Y=k.includes(Z.id);return i.jsx("button",{type:"button",onClick:()=>re(Z.id),className:he("px-2.5 py-1.5 rounded-full text-[11px] font-bold border transition-colors",Y?"bg-slate-900 border-slate-900 text-white":"bg-slate-50 border-slate-200 text-slate-600"),children:Z.label},Z.id)})})]}),i.jsx(Mh,{title:"AI tutor style",children:i.jsx("div",{className:"grid grid-cols-3 gap-1.5 -mt-1",children:xJ.map(Z=>i.jsxs("button",{type:"button",onClick:()=>te(Z.id),className:he("py-2 px-1.5 rounded-lg border text-center transition-colors",U===Z.id?"bg-[#00B5B5]/10 border-[#00B5B5] text-[#008F8F]":"border-slate-200 text-slate-600 hover:bg-slate-50"),children:[i.jsx("p",{className:"text-[11px] font-bold",children:Z.label}),i.jsx("p",{className:"text-[9px] text-slate-500 mt-0.5 leading-tight",children:Z.hint})]},Z.id))})}),i.jsx(Mh,{title:"Tutor access",children:i.jsx("ul",{className:"space-y-2 -mt-1",children:h.map(Z=>{var R;const Y=on(e,Z.id),I=Z.paid?(R=e.botLicenses)==null?void 0:R[Z.id]:null;return i.jsxs("li",{className:"flex items-center justify-between gap-2 py-2 border-b border-slate-100 last:border-0",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i.jsx("span",{className:"text-lg",children:Z.icon}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-xs font-bold text-slate-800 truncate",children:Z.name}),i.jsx("p",{className:"text-[10px] text-slate-500",children:Y?I?`Until ${gr(I.expiresAt)}`:"Active":Z.paid?"Not purchased":"Free"})]})]}),i.jsx("span",{role:"status","aria-label":Y?`${Z.name} is active`:`${Z.name} is locked`,className:he("text-[9px] font-bold px-2 py-0.5 rounded-md shrink-0 border border-dashed pointer-events-none select-none",Y?"bg-emerald-50/80 text-emerald-700 border-emerald-200":"bg-slate-50 text-slate-500 border-slate-200"),children:Y?"Active":"Locked"})]},Z.id)})})}),i.jsxs("button",{type:"button",onClick:()=>n("guide"),className:"w-full flex items-center justify-between px-3.5 py-3 rounded-xl border border-slate-200 bg-white text-xs font-bold text-slate-800",children:[i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(h0,{size:14,className:"text-[#008F8F]"}),"Open Chat"]}),i.jsx(Fi,{size:16,className:"text-slate-400"})]}),i.jsxs("button",{type:"button",onClick:()=>n("report"),className:"w-full flex items-center justify-between px-3.5 py-3 rounded-xl border border-amber-100 bg-amber-50/60 text-xs font-bold text-amber-900",children:[i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Vi,{size:14}),"Report an issue"]}),i.jsx(Fi,{size:16,className:"text-amber-700/60"})]}),e.uid?i.jsx(dJ,{userId:e.uid}):null,i.jsx(fJ,{user:e,onStatusChange:()=>void a()})]})}const WC=[{id:"payment_no_access",label:"Payment done â no access",description:"Paid on Razorpay but tutor/plan still locked"},{id:"chatbot_issue",label:"AI Guide / Chatbot issue",description:"Wrong answer, not responding, or slow replies"},{id:"login_account",label:"Login or account",description:"Cannot sign in, profile, or onboarding problems"}
2321,{id:"technical_bug",label:"App bug / technical",description:"Crash, blank screen, or feature not working"},{id:"other",label:"Something else",description:"Any other issue â we will still help"}],XC=[{value:"wrong_answer",label:"Wrong or unclear answer"},{value:"not_responding",label:"Bot not responding"},{value:"slow_response",label:"Very slow response"},{value:"lost_context",label:"Forgot conversation context"},{value:"image_not_read",label:"Did not read my image/doubt"},{value:"other",label:"Other chatbot issue"}],bJ=[{value:"JEE",label:"JEE"},{value:"NEET",label:"NEET"},{value:"UPSC",label:"UPSC"},{value:"GATE",label:"GATE"}],KC={payment_no_access:[{key:"botId",label:"Which tutor / chatbot did you buy?",type:"bot_select",required:!0,options:bJ},{key:"planId",label:"Which plan did you purchase?",type:"plan_select",required:!0,help:"Amount is filled automatically from our catalog."},{key:"payment_proof",label:"Payment proof screenshot",type:"payment_proof",required:!0,help:"Upload Razorpay success screen where Payment ID and Order ID are clearly visible."},{key:"extra_notes",label:"Anything else we should know? (optional)",type:"textarea",placeholder:"When you paid, what you see in the app nowâ¦"}],chatbot_issue:[{key:"chatIssueType",label:"What went wrong?",type:"select",required:!0,options:XC},{key:"sessionTopic",label:"Chat topic / subject",type:"text",required:!0,placeholder:"e.g. Organic chemistry â electrophilic substitution"},{key:"user_question",label:"What did you ask the AI?",type:"textarea",required:!0,placeholder:"Paste or describe your questionâ¦"},{key:"actual_behavior",label:"What did the AI do instead?",type:"textarea",required:!0,placeholder:"Wrong formula, empty reply, error messageâ¦"},{key:"expected_behavior",label:"What did you expect?",type:"textarea",placeholder:"Optional â helps us fix faster"},{key:"sessionId",label:"Session ID (optional)",type:"text",placeholder:"If you know it from chat history"}],login_account:[{key:"issue_detail",label:"Describe the login/account issue",type:"textarea",required:!0,placeholder:"Google sign-in error, wrong email, onboarding stuckâ¦"},{key:"device_browser",label:"Device & browser",type:"text",placeholder:"e.g. Android Chrome, Windows Edge"}],technical_bug:[{key:"affected_page",label:"Which page or feature?",type:"select",required:!0,options:[{value:"guide",label:"AI Guide / Chat"},{value:"premium",label:"Plans & payment"},{value:"dashboard",label:"Home / Dashboard"},{value:"account",label:"Account"},{value:"other",label:"Other"}]},{key:"steps_to_reproduce",label:"Steps to reproduce",type:"textarea",required:!0,placeholder:"1. Open⦠2. Click⦠3. See errorâ¦"},{key:"error_message",label:"Error message (if any)",type:"text",placeholder:"Copy exact text on screen"}],other:[{key:"issue_summary",label:"Summarize your issue",type:"textarea",required:!0,placeholder:"Tell us what happened and what you needâ¦"},{key:"extra_context",label:"Extra context",type:"textarea",placeholder:"Optional details"}]};function jb(e){var t;return((t=WC.find(n=>n.id===e))==null?void 0:t.label)??e}function yJ(e,t){var n,a,s;switch(e){case"payment_no_access":{const o=(n=t.planName)==null?void 0:n.trim(),c=(a=t.botId)==null?void 0:a.trim();return o&&c?`Payment â no access (${c} · ${o})`:`Payment â no access (${c??"tutor"})`}case"chatbot_issue":return`AI Guide â ${((s=XC.find(o=>o.value===t.chatIssueType))==null?void 0:s.label)??"issue"}`;case"login_account":return"Login / account issue";case"technical_bug":return`Bug â ${t.affected_page??"app"}`;default:return"Support request"}}function vJ(e,t){var s,o,c;const n=[],a=KC[e];for(const d of a){if(d.type==="payment_proof"||d.type==="plan_select")continue;const h=(s=t[d.key])==null?void 0:s.trim();h&&n.push(`${d.label}: ${h}`)}if(e==="payment_no_access"){const d=(o=t.planName)==null?void 0:o.trim(),h=(c=t.amountInr)==null?void 0:c.trim();d&&n.push(`Plan: ${d}`),h&&n.push(`Amount (catalog): â¹${h}`)}return n.join(` 2322`)}function QC(e){var t;return typeof window<"u"&&((t=window.location)!=null&&t.origin)?`${window.location.origin}${e}`:e}function wJ(e){return e instanceof Error?e.name==="AbortError"?"Request timed out. Check your connection and try again.":e.message.includes("Failed to fetch")?"Upload failed. Check that the server is running and try again.":e.message:"Could not submit report. Try again."}async function JC(e,t,n=45e3){const a=new AbortController,s=setTimeout(()=>a.abort(),n);try{const o=I0(t.headers);return await fetch(e,{...t,headers:o,signal:a.signal,credentials:"include"})}finally{clearTimeout(s)}}async function SJ(e,t,n,a){const s=t.proofFile,o=new FormData;o.append("payload",JSON.stringify({userId:e.uid,userEmail:e.email,displayName:e.displayName,category:t.category,title:n,summary:a,details:t.details,planName:t.planName??t.details.planName,botId:t.botId??t.details.botId,amountInr:t.amountInr})),o.append("proof",s,s.name||"proof.png");const c=await JC(QC("/api/reports/submit-with-proof"),{method:"POST",body:o},9e4),d=await c.json().catch(()=>({}));if(!c.ok)throw new Error(d.error??`Submit failed (${c.status})`);
2322if(!d.reportId)throw new Error("Server did not return report id.");return d.reportId}async function NJ(e,t,n,a,s){const o=await JC(QC("/api/reports/submit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e.uid,userEmail:e.email,displayName:e.displayName,category:t.category,title:n,summary:a,details:t.details,razorpayPaymentId:t.razorpayPaymentId??t.details.razorpayPaymentId,razorpayOrderId:t.razorpayOrderId??t.details.razorpayOrderId,planName:t.planName??t.details.planName,botId:t.botId??t.details.botId,amountInr:t.amountInr,chatIssueType:t.chatIssueType??t.details.chatIssueType,sessionId:t.sessionId??t.details.sessionId,sessionTopic:t.sessionTopic??t.details.sessionTopic,deferAdminNotify:(s==null?void 0:s.deferAdminNotify)===!0})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`Server error (${o.status})`);if(!c.reportId)throw new Error("Server did not return report id.");return c.reportId}async function jJ(e,t,n,a){try{return await SJ(e,t,n,a)}catch(s){const o=s instanceof Error?s.message:"";throw o.includes("503")||o.includes("not configured")||o.includes("unavailable")||o.includes("Failed to fetch")||o.includes("ECONNREFUSED")?new Error("Could not reach server. Run npm run dev (port 3000), then retry."):s}}async function kJ(e,t){const n=yJ(t.category,t.details),a=vJ(t.category,t.details);return t.proofFile?jJ(e,t,n,a):NJ(e,t,n,a)}function CJ({user:e,onNavigate:t,sessionTopic:n,sessionId:a}){var I;const[s,o]=w.useState(0),[c,d]=w.useState(null),[h,f]=w.useState({}),[p,x]=w.useState(null),[b,v]=w.useState(null),[N,j]=w.useState(!1),[T,E]=w.useState(""),[D,k]=w.useState(""),[M,B]=w.useState(null),{plans:_,loading:U}=b2(),F=w.useMemo(()=>c?KC[c]:[],[c]),W=c?1+F.length+1:1,ae=s>=1&&s<=F.length?F[s-1]:null,le=c&&s===F.length+1,re=(R,J)=>{f(P=>({...P,[R]:J}))},xe=w.useMemo(()=>{var J;const R=(J=h.botId)==null?void 0:J.trim();return R?_.filter(P=>P.botId===R&&P.priceMonthly>0):[]},[_,h.botId]),te=R=>{f(J=>({...J,planId:R.id,planName:R.name,amountInr:String(R.priceMonthly),botId:R.botId??J.botId}))},H=R=>{var P,ge;if(R.type==="payment_proof")return R.required&&!p?"Payment proof screenshot is required (Razorpay screen with Payment ID & Order ID visible).":null;if(R.type==="plan_select")return R.required&&!((P=h.planId)!=null&&P.trim())?U?"Plans are still loadingâ¦":xe.length===0?"No paid plan found for this tutor. Contact support.":"Please select a plan.":null;const J=((ge=h[R.key])==null?void 0:ge.trim())??"";return R.required&&!J?`${R.label} is required.`:null},V=R=>{x(R),b&&URL.revokeObjectURL(b),v(R?URL.createObjectURL(R):null)},ne=()=>{if(k(""),s===0){if(!c){k("Please select an issue type.");return}c==="chatbot_issue"&&f(R=>({...R,sessionTopic:R.sessionTopic||n||"",sessionId:R.sessionId||a||""})),o(1);return}if(ae){const R=H(ae);if(R){k(R);return}s<F.length?o(s+1):o(F.length+1);return}},Z=()=>{if(k(""),s===0){t("account");return}o(s-1)},Y=async()=>{if(c){j(!0),k(""),E(p?"Uploading proof & savingâ¦":"Sending reportâ¦");try{const R=await kJ({uid:e.uid,email:e.email,displayName:e.displayName},{category:c,title:"",summary:"",details:h,planName:h.planName,botId:h.botId,amountInr:h.amountInr?Number(h.amountInr):void 0,chatIssueType:h.chatIssueType,sessionId:h.sessionId,sessionTopic:h.sessionTopic,proofFile:p});B(R)}catch(R){k(wJ(R))}finally{j(!1),E("")}}};return M?i.jsxs("div",{className:"max-w-lg mx-auto py-12 px-4 text-center",children:[i.jsx(o0,{className:"w-14 h-14 text-emerald-500 mx-auto mb-4"}),i.jsx("h1",{className:"text-xl font-bold text-slate-900",children:"Report submitted"}),i.jsxs("p",{className:"text-sm text-slate-500 mt-2",children:["Reference ",i.jsxs("span",{className:"font-mono text-xs bg-slate-100 px-2 py-0.5 rounded",children:[M.slice(0,8),"â¦"]}),i.jsx("br",{}),"Our team will review and respond via email."]}),i.jsx("button",{type:"button",onClick:()=>
2322t("dashboard"),className:"mt-6 px-5 py-2.5 rounded-xl bg-[#00B5B5] text-white text-sm font-semibold cursor-pointer",children:"Back to home"})]}):i.jsxs("div",{className:"max-w-xl mx-auto pb-10 px-4 sm:px-0 text-left",children:[i.jsxs("button",{type:"button",onClick:Z,className:"inline-flex items-center gap-1 text-xs font-semibold text-slate-500 hover:text-[#008F8F] mb-4 cursor-pointer",children:[i.jsx(ky,{size:14}),"Back"]}),i.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-amber-50 border border-amber-100 text-amber-800 text-[11px] font-semibold mb-3",children:[i.jsx(Vi,{size:12}),"App report"]}),i.jsx("h1",{className:"text-2xl font-black text-slate-900 tracking-tight",children:s===0?"What issue are you facing?":le?"Review & send":ae==null?void 0:ae.label}),i.jsxs("p",{className:"text-sm text-slate-500 mt-1 mb-6",children:["Step ",s+1," of ",W,c&&s>0?` · ${jb(c)}`:""]}),i.jsx("div",{className:"h-1.5 rounded-full bg-slate-100 mb-6 overflow-hidden",children:i.jsx("div",{className:"h-full bg-[#00B5B5] transition-all duration-300",style:{width:`${(s+1)/W*100}%`}})}),D?i.jsxs("p",{className:"mb-4 text-sm text-rose-600 flex items-center gap-2",children:[i.jsx(ij,{size:16}),D]}):null,i.jsx(bt,{mode:"wait",children:s===0?i.jsx(ze.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},exit:{opacity:0,x:-12},className:"space-y-2",children:WC.map(R=>i.jsxs("button",{type:"button",onClick:()=>d(R.id),className:he("w-full text-left rounded-xl border p-4 transition-colors cursor-pointer",c===R.id?"border-[#00B5B5] bg-teal-50/50 ring-1 ring-[#00B5B5]/30":"border-slate-200 bg-white hover:border-slate-300"),children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:R.label}),i.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:R.description})]},R.id))},"cat"):le?i.jsxs(ze.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},className:"rounded-2xl border border-slate-200 bg-white p-5 space-y-3 text-sm",children:[i.jsx("p",{className:"font-bold text-slate-900",children:jb(c)}),F.map(R=>{var P,ge,Ee;if(R.type==="payment_proof")return p?i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase text-slate-400",children:R.label}),i.jsx("p",{className:"text-slate-700",children:p.name})]},R.key):null;if(R.type==="plan_select"){const Te=(P=h.planName)==null?void 0:P.trim(),Ve=(ge=h.amountInr)==null?void 0:ge.trim();return Te?i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase text-slate-400",children:"Plan"}),i.jsx("p",{className:"text-slate-700",children:Te}),Ve?i.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["â¹",Ve," / month (catalog)"]}):null]},R.key):null}const J=(Ee=h[R.key])==null?void 0:Ee.trim();return J?i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase text-slate-400",children:R.label}),i.jsx("p",{className:"text-slate-700 whitespace-pre-wrap",children:J})]},R.key):null})]},"review"):ae?i.jsxs(ze.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},exit:{opacity:0,x:-12},className:"rounded-2xl border border-slate-200 bg-white p-5",children:[i.jsx(AJ,{field:ae,value:h[ae.key]??"",onChange:R=>re(ae.key,R),proofFile:p,proofPreview:b,onProofChange:V,plansForBot:xe,plansLoading:U,selectedPlanId:h.planId??"",onPlanSelect:te,onBotChange:R=>{f(J=>({...J,botId:R,planId:"",planName:"",amountInr:""}))},amountInr:h.amountInr??"",botSelected:!!((I=h.botId)!=null&&I.trim())}),ae.help?i.jsx("p",{className:"text-xs text-slate-500 mt-3",children:ae.help}):null]},ae.key):null}),i.jsx("div",{className:"flex gap-2 mt-6",children:le?i.jsx("button",{type:"button",disabled:N,onClick:()=>void Y(),className:"flex-1 inline-flex items-center justify-center gap-2 py-3 rounded-xl bg-[#00B5B5] text-white text-sm font-semibold cursor-pointer disabled:opacity-50",children:N?i.jsxs(i.Fragment,{children:[i.jsx(Qe,{size:16,className:"animate-spin"}),T||"Sendingâ¦"]}):i.jsxs(i.Fragment,{children:["Submit report",i.jsx(pn,{size:16})]})}):i.jsxs("button",{type:"button",onClick:ne,className:"flex-1 inline-flex items-center justify-center gap-2 py-3 rounded-xl bg-slate-900 text-white text-sm font-semibold cursor-pointer",children:["Continue",i.jsx(Fi,{size:16})]})})]})}function AJ({field:e,value:t,onChange:n,proofFile:a,proofPreview:s,onProofChange:o,plansF
2322orBot:c,plansLoading:d,selectedPlanId:h,onPlanSelect:f,onBotChange:p,amountInr:x,botSelected:b}){var v;return e.type==="plan_select"?i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-semibold text-slate-800 mb-2",children:e.label}),b?null:i.jsx("p",{className:"text-xs text-amber-700",children:"Select a tutor first on the previous step."}),d?i.jsx("p",{className:"text-xs text-slate-500",children:"Loading plansâ¦"}):c.length===0?i.jsx("p",{className:"text-xs text-rose-600",children:"No paid plans for this tutor. Try another tutor or contact support."}):i.jsxs("select",{value:h,onChange:N=>{const j=c.find(T=>T.id===N.target.value);j&&f(j)},className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-sm",children:[i.jsx("option",{value:"",children:"Select planâ¦"}),c.map(N=>i.jsxs("option",{value:N.id,children:[N.name," â â¹",N.priceMonthly,"/mo"]},N.id))]}),x?i.jsxs("p",{className:"mt-3 text-sm font-semibold text-[#008F8F]",children:["Amount (auto): â¹",x," / month"]}):null]}):e.type==="payment_proof"?i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-semibold text-slate-800 mb-2",children:e.label}),i.jsxs("label",{className:"flex flex-col items-center justify-center gap-2 p-6 rounded-xl border-2 border-dashed border-slate-200 hover:border-[#00B5B5]/50 cursor-pointer bg-slate-50/50",children:[s?i.jsx("img",{src:s,alt:"Proof",className:"max-h-40 rounded-lg object-contain"}):i.jsxs(i.Fragment,{children:[i.jsx(qU,{className:"w-10 h-10 text-slate-400"}),i.jsx("span",{className:"text-xs font-semibold text-slate-600 text-center px-2",children:"Razorpay success screen â Payment ID & Order ID visible (max 4 MB)"})]}),i.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:N=>{var j;return o(((j=N.target.files)==null?void 0:j[0])??null)}})]}),a?i.jsx("p",{className:"text-[10px] text-slate-500 mt-2",children:a.name}):null]}):e.type==="select"||e.type==="bot_select"?i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-semibold text-slate-800 mb-2",children:e.label}),i.jsxs("select",{value:t,onChange:N=>{const j=N.target.value;e.type==="bot_select"&&p(j),n(j)},className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-sm",children:[i.jsx("option",{value:"",children:"Selectâ¦"}),(v=e.options)==null?void 0:v.map(N=>i.jsx("option",{value:N.value,children:N.label},N.value))]})]}):e.type==="textarea"?i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-semibold text-slate-800 mb-2",children:e.label}),i.jsx("textarea",{value:t,onChange:N=>n(N.target.value),rows:5,placeholder:e.placeholder,className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-sm resize-y"})]}):i.jsxs("div",{children:[i.jsx("label",{className:"block text-sm font-semibold text-slate-800 mb-2",children:e.label}),i.jsx("input",{type:e.type==="number"?"number":"text",value:t,onChange:N=>n(N.target.value),placeholder:e.placeholder,className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-sm"})]})}const EJ="/logo/icon.png",TJ="/logo/socratech.png",MJ={xs:"h-6 max-w-[120px]",sm:"h-7 max-w-[148px]",md:"h-8 max-w-[168px]",lg:"h-9 max-w-[190px]",xl:"h-11 max-w-[220px]"},IJ={xs:"h-6 w-6",sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9",xl:"h-11 w-11"};function Zn({className:e,iconOnly:t=!1,size:n="md"}){return i.jsx("div",{className:he("inline-flex items-center justify-center select-none shrink-0 min-w-0",t?IJ[n]:MJ[n],e),children:i.jsx("img",{src:t?EJ:TJ,alt:"Socratech AI",className:"h-full w-auto max-w-full object-contain object-left",draggable:!1})})}const zJ=["dashboard","guide","suggestions","analytics","qa","premium","account","notifications","report"];function _J(){const e=ea(),{page:t}=s9(),{user:n,handleLogout:a,updateUser:s}=za(),o=zJ.includes(t)?t:"guide",c=te=>e(`/app/${te}`),d=FV(n),[h,f]=w.useState(window.innerWidth>=1024),[p,x]=w.useState(!1),[b,v]=w.useState(()=>localStorage.getItem("socratech_active_session_id")||null),[N,j]=w.useState([]),[T,E]=w.useState(""),[D,k]=w.useState(null),[M,B]=w.useState(""),[_,U]=w.useState(()=>localStorage.getItem("socratech_active_bot")||"General");w.useEffect(()=>{b?localStorage.setItem("socratech_active_session_id",b):localStorage.removeItem("socratech_active_session_id")},[b]);const F=te=>({id:te.id,title:te.title,botId:te.botId||"General",updatedAt:te.updatedAt}),W=async()=>
2322{if(!n){j([]);return}try{const te=await rH();j(te.map(F).sort((H,V)=>Date.parse(V.updatedAt||"0")-Date.parse(H.updatedAt||"0")))}catch(te){console.warn("[chat sessions]",te)}};w.useEffect(()=>{if(!n){j([]);return}W();const te=setInterval(()=>void W(),5e3);return()=>clearInterval(te)},[n==null?void 0:n.uid]);const ae=async(te,H)=>{if(te.stopPropagation(),!!window.confirm("Delete this doubt thread and all of its messages?"))try{await sH(H),b===H&&v(null),await W()}catch(V){console.error("[chat sessions] delete:",V)}};N.filter(te=>{var ne;const H=te.botId===_||!te.botId&&_==="General",V=(ne=te.title)==null?void 0:ne.toLowerCase().includes(T.toLowerCase());return H&&V}),w.useEffect(()=>{const te=()=>{window.innerWidth<1024?f(!1):f(!0)};return window.addEventListener("resize",te),()=>window.removeEventListener("resize",te)},[]);const le=async te=>{await s(te)};if(!n)return null;const re=[{id:"guide",label:"Chat",icon:vr},{id:"dashboard",label:"Home",icon:tF},{id:"suggestions",label:"Road",icon:Ey},{id:"qa",label:"Q&A",icon:L0},{id:"analytics",label:"Track",icon:Qm},{id:"premium",label:"Plans",icon:YF},{id:"notifications",label:"Alerts",icon:os}],xe=()=>{switch(o){case"dashboard":return i.jsx(dH,{user:n,onNavigate:c,sessions:N,activeSessionId:b,setActiveSessionId:v});case"guide":{const te=N.find(H=>H.id===b);return i.jsx(y7,{user:n,activeSessionId:b,setActiveSessionId:v,sessionTopic:te?te.title:null,onNavigate:c,onToggleSidebar:()=>f(!0),sessions:N,onDeleteSession:ae,onBotChange:U})}case"suggestions":return i.jsx(jQ,{user:n,onNavigate:c,onUpdateUser:le});case"analytics":return i.jsx(AQ,{user:n,onNavigate:c});case"qa":return i.jsx(OQ,{user:n,onNavigate:te=>{if(te==="guide"){const H=localStorage.getItem("socratech_active_session_id");H&&v(H)}c(te)}});case"premium":return i.jsx(lJ,{user:n,onUpdateUser:le});case"account":return i.jsx(gJ,{user:n,onNavigate:c,onUpdateUser:le});case"notifications":return i.jsx(aH,{user:n});case"report":{const te=N.find(H=>H.id===b);return i.jsx(CJ,{user:n,onNavigate:c,sessionTopic:(te==null?void 0:te.title)??null,sessionId:b})}default:{const te=N.find(H=>H.id===b);return i.jsx(y7,{user:n,activeSessionId:b,setActiveSessionId:v,sessionTopic:te?te.title:null,onNavigate:c,onToggleSidebar:()=>f(!0),sessions:N,onDeleteSession:ae,onBotChange:U})}}};return i.jsxs("div",{className:"flex bg-brand-bg h-dvh-screen max-w-[100vw] text-slate-900 font-sans relative overflow-hidden",children:[h&&i.jsx("div",{onClick:()=>f(!1),className:"lg:hidden fixed inset-0 bg-brand-dark/50 backdrop-blur-sm z-45 cursor-pointer transition-all duration-300"}),i.jsx("aside",{className:he("bg-[#FBFBFC] text-slate-800 flex flex-col h-dvh-screen fixed inset-y-0 left-0 z-50 lg:static lg:h-full transition-all duration-300 ease-in-out border-r border-[#EAEBF0]",h?"translate-x-0 w-64":"-translate-x-full lg:translate-x-0 lg:w-0 lg:overflow-hidden lg:pointer-events-none lg:opacity-0 lg:invisible"),children:i.jsxs("div",{className:"flex flex-col h-full w-64 shrink-0 pointer-events-auto pt-safe pb-safe",children:[i.jsxs("div",{className:"h-14 min-h-14 flex items-center justify-between px-5 shrink-0",children:[i.jsx(Zn,{size:"lg"}),i.jsx("button",{onClick:()=>f(!1),className:"lg:hidden touch-target flex items-center justify-center rounded-md hover:bg-slate-100 text-slate-400 hover:text-slate-600 transition-all cursor-pointer",title:"Collapse Sidebar",children:i.jsx(Ln,{size:18})})]}),i.jsxs("nav",{className:"flex-1 px-4 py-6 space-y-1 overflow-y-auto overscroll-contain custom-scrollbar",children:[i.jsx("div",{className:"text-[9px] font-bold uppercase text-slate-400 tracking-wider mb-4 px-2 select-none",children:"Overview"}),re.map(te=>i.jsxs("button",{onClick:()=>{c(te.id),window.innerWidth<1024&&f(!1)},className:he("w-full flex items-center justify-between touch-target-inline px-2.5 rounded-lg transition-all group font-semibold text-xs cursor-pointer mb-0.5",o===te.id?"bg-[#00B5B5]/10 text-[#009999]":"bg-transparent text-slate-600 hover:bg-slate-100/60 hover:text-slate-900"),children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(te.icon,{size:16,className:he("shrink-0",o===te.id?"text-[#009999]":"text-slate-400 group-hover:text-slate-500")}),i.jsx("span",{children:te.label})]}
2322),o===te.id&&i.jsx("div",{className:"w-1 h-3 rounded-full bg-[#00B5B5]"})]},te.id))]}),i.jsxs("div",{className:"p-4 bg-transparent shrink-0 space-y-4 mb-2",children:[i.jsx("div",{className:"px-2",children:i.jsxs("div",{role:"status","aria-label":`Current plan: ${d.tier}. ${d.detail}`,className:he("rounded-xl border border-dashed p-3 pointer-events-none",d.isPaid?"bg-emerald-50/60 border-emerald-200/80":"bg-slate-50/80 border-slate-200"),children:[i.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[i.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wide",children:"Your plan"}),d.accessChip?i.jsx("span",{className:he("text-[8px] font-extrabold uppercase px-1.5 py-0.5 rounded pointer-events-none",d.accessChip==="Free"?"bg-sky-50 text-sky-700 border border-sky-100":"bg-emerald-50 text-emerald-700 border border-emerald-100"),children:d.accessChip}):d.isPaid?i.jsx(Sr,{size:12,className:"text-emerald-600 shrink-0"}):i.jsx("button",{type:"button",onClick:()=>c("premium"),className:"pointer-events-auto text-[8px] font-extrabold uppercase text-amber-700 bg-amber-50 hover:bg-amber-100 px-1.5 py-0.5 rounded cursor-pointer transition-colors",children:"Upgrade"})]}),i.jsx("p",{className:he("text-sm font-black leading-tight",d.isPaid?"text-emerald-800":"text-slate-800"),children:d.tier}),i.jsx("p",{className:"text-[9px] text-slate-500 font-medium mt-1 leading-snug",children:d.detail})]})}),i.jsx("div",{className:"bg-white border border-[#EAEBF0] rounded-xl p-2 flex flex-col gap-0.5 shadow-sm",children:i.jsxs("div",{className:"flex items-center justify-between px-1 py-1",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Il,{photoURL:n.photoURL,displayName:n.displayName,email:n.email,className:"w-7 h-7 rounded-lg border border-slate-100 shrink-0",textClassName:"text-[9px]"}),i.jsxs("div",{className:"truncate text-left leading-none",children:[i.jsx("p",{className:"font-bold text-[11px] text-slate-800 truncate",children:n.displayName}),i.jsx("p",{className:"text-[9px] text-slate-400 font-medium truncate max-w-[120px]",children:d.tier})]})]}),i.jsx("button",{onClick:()=>{a(),e("/splash")},className:"touch-target flex items-center justify-center rounded-md text-slate-400 hover:text-rose-500 hover:bg-rose-50 transition-colors cursor-pointer",title:"Sign Out",children:i.jsx(Oi,{size:16})})]})})]})]})}),i.jsxs("main",{className:"flex-1 flex flex-col h-full relative overflow-hidden overscroll-none",children:[o!=="guide"&&i.jsxs("header",{className:"lg:hidden sticky top-0 left-0 right-0 z-30 bg-white/95 backdrop-blur-md border-b border-slate-100 min-h-14 pt-safe flex items-center justify-between px-4 sm:px-5 py-2 shadow-sm shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-2.5",children:[!h&&i.jsx("button",{onClick:()=>f(!0),className:"touch-target flex items-center justify-center -ml-1 text-slate-600 hover:text-slate-900 transition-all cursor-pointer",title:"Open Sidebar",children:i.jsx(bm,{size:22})}),i.jsx("div",{className:"flex items-center active:scale-95 transition-all cursor-pointer min-w-0",onClick:()=>
2322c("dashboard"),children:i.jsx(Zn,{size:"sm",className:"max-w-[140px]"})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Lg,{user:n,onViewAll:()=>c("notifications")}),i.jsxs("div",{className:"relative",children:[i.jsxs("button",{onClick:()=>x(!p),className:"relative active:scale-90 transition-all cursor-pointer w-8.5 h-8.5 rounded-lg border border-slate-200 overflow-hidden",children:[i.jsx(Il,{photoURL:n.photoURL,displayName:n.displayName,email:n.email,className:"w-full h-full rounded-lg",textClassName:"text-[10px]"}),i.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 bg-emerald-500 border border-white rounded-full"})]}),i.jsx(bt,{children:p&&i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>x(!1),className:"fixed inset-0 bg-transparent z-40 cursor-default"}),i.jsx(ze.div,{initial:{opacity:0,y:8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.97},transition:{duration:.12},className:"absolute top-[44px] right-0 w-60 bg-white rounded-xl border border-slate-200/80 shadow-[0_4px_20px_rgba(0,0,0,0.06)] z-50 p-4 text-left",children:i.jsxs("div",{className:"space-y-3.5",children:[i.jsxs("div",{className:"flex items-center gap-2.5 pb-3 border-b border-slate-100",children:[i.jsx(Il,{photoURL:n.photoURL,displayName:n.displayName,email:n.email,className:"w-10 h-10 rounded-lg border border-slate-200 shrink-0",textClassName:"text-xs"}),i.jsxs("div",{className:"truncate",children:[i.jsx("p",{className:"font-bold text-slate-900 text-xs truncate leading-tight",children:n.displayName}),i.jsx("p",{className:"text-[9px] font-bold uppercase text-[#008F8F] tracking-wider mt-0.5",children:"Socratic Scholar"})]})]}),i.jsxs("div",{className:"space-y-0.5",children:[i.jsxs("button",{onClick:()=>{c("account"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(h0,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"My Account"})]}),i.jsxs("button",{onClick:()=>{c("report"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-amber-50/80 text-amber-900 hover:bg-amber-50 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(Vi,{size:14,className:"text-amber-600"}),i.jsx("span",{children:"Report an issue"})]}),i.jsxs("button",{onClick:()=>{c("dashboard"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(ym,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"Inquiry Dashboard"})]})]}),i.jsx("div",{className:"pt-2 border-t border-slate-100",children:i.jsxs("button",{onClick:()=>{a(),e("/splash")},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-rose-50 text-rose-600 hover:text-rose-700 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(Oi,{size:14,className:"text-rose-500"}),i.jsx("span",{children:"Sign Out"})]})})]})})]})})]})]})]}),i.jsxs("header",{className:"hidden lg:flex h-14 items-center justify-between px-8 border-b border-slate-200/80 bg-white/50 backdrop-blur-md z-40 select-none shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-6 font-bold text-xs uppercase tracking-[0.15em] text-slate-450",children:[!h&&i.jsxs("button",{onClick:()=>f(!0),className:"p-1.5 px-3 text-slate-500 hover:text-slate-900 transition-all cursor-pointer flex items-center gap-2 hover:bg-slate-100 rounded-lg border border-slate-200 bg-white shadow-sm",title:"Reveal Sidebar",children:[i.jsx(bm,{size:14}),i.jsx("span",{className:"text-[9px] font-extrabold tracking-wider text-slate-700 uppercase",children:"Open Sidebar"})]}),i.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-slate-500",children:[i.jsx("span",{children:"Core Application"}),i.jsx(Fi,{size:11,className:"text-slate-300"}),i.jsx("span",{className:"text-slate-900 capitalize font-extrabold",children:o})]})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(Lg,{user:n,onViewAll:()=>c("notifications")}),i.jsxs("div",{className:"relative",children:[i.jsxs("button",{onClick:()=>x(!p),className:"relative w-8.5 h-8.5 rounded-lg border border-slate-250 overflow-hidden active:scale-95 transition-all cursor-pointer bg-slate-50 hover:border-[#00B5B5] flex items-center justify-center shrink-0",children:[i.jsx(Il,{photoURL:n.photoURL,displayName:n.displayName,email:n.email,className:"w-full h-full rounded-lg",textClassName:"text-[10px]"}),i.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 bg-emerald-500 border border-white rounded-full"})]}),i.jsx(bt,{children:p&&i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0}
2322,animate:{opacity:1},exit:{opacity:0},onClick:()=>x(!1),className:"fixed inset-0 z-40 bg-transparent cursor-default"}),i.jsx(ze.div,{initial:{opacity:0,y:8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.97},transition:{duration:.12},className:"absolute top-[44px] right-0 w-60 bg-white rounded-xl border border-slate-200/80 shadow-[0_4px_20px_rgba(0,0,0,0.06)] z-50 p-4 text-left",children:i.jsxs("div",{className:"space-y-3.5",children:[i.jsxs("div",{className:"flex items-center gap-2.5 pb-3 border-b border-slate-100",children:[i.jsx(Il,{photoURL:n.photoURL,displayName:n.displayName,email:n.email,className:"w-10 h-10 rounded-lg border border-slate-200 shrink-0",textClassName:"text-xs"}),i.jsxs("div",{className:"truncate",children:[i.jsx("p",{className:"font-bold text-slate-900 text-xs truncate leading-tight",children:n.displayName}),i.jsx("p",{className:"text-[9px] font-bold uppercase text-[#008F8F] tracking-wider mt-0.5",children:"Socratic Scholar"})]})]}),i.jsxs("div",{className:"space-y-0.5",children:[i.jsxs("button",{onClick:()=>{c("account"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(h0,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"My Account"})]}),i.jsxs("button",{onClick:()=>{c("report"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-amber-50/80 text-amber-900 hover:bg-amber-50 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(Vi,{size:14,className:"text-amber-600"}),i.jsx("span",{children:"Report an issue"})]}),i.jsxs("button",{onClick:()=>{c("dashboard"),x(!1)},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-slate-50 text-slate-600 hover:text-slate-950 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(ym,{size:14,className:"text-slate-400"}),i.jsx("span",{children:"Inquiry Dashboard"})]})]}),i.jsx("div",{className:"pt-2 border-t border-slate-100",children:i.jsxs("button",{onClick:()=>{a(),e("/splash")},className:"w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg hover:bg-rose-50 text-rose-600 hover:text-rose-700 transition-colors text-xs font-semibold text-left cursor-pointer",children:[i.jsx(Oi,{size:14,className:"text-rose-500"}),i.jsx("span",{children:"Sign Out"})]})})]})})]})})]})]})]}),i.jsx(tH,{user:n,onRenew:te=>{uc(te),c("premium")}}),i.jsx("div",{className:he("flex-1 flex flex-col min-h-0 transition-all",o==="guide"?"p-0 overflow-hidden":o==="suggestions"||o==="analytics"||o==="qa"||o==="dashboard"||o==="account"?"p-0 sm:p-4 md:p-6 lg:p-8 overflow-y-auto overflow-x-hidden custom-scrollbar":"p-4 md:p-6 lg:p-8 overflow-y-auto custom-scrollbar"),children:i.jsx("div",{className:he("mx-auto w-full",o==="guide"?"max-w-none h-full flex flex-col":"max-w-full sm:max-w-2xl md:max-w-4xl lg:max-w-6xl xl:max-w-7xl"),children:i.jsx(bt,{mode:"wait",children:i.jsx(ze.div,{initial:{opacity:0,y:10,scale:.99},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.99},transition:{duration:.15,ease:"easeOut"},className:he("w-full",o==="guide"?"flex-1 flex flex-col min-h-0 h-full":""),children:xe()},o)})})})]})]})}function DJ(){return i.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[i.jsx("div",{className:"absolute inset-0 bg-[#F8FAFC]"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-white via-[#F8FAFC] to-[#F0FDFA]"}),i.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_90%_55%_at_50%_-15%,rgba(0,181,181,0.14),transparent)]"}),i.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_50%_40%_at_100%_90%,rgba(34,211,238,0.08),transparent)]"}),i.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_45%_35%_at_0%_70%,rgba(148,163,184,0.06),transparent)]"}),i.jsx(ze.div,{className:"absolute top-[12%] left-1/2 -translate-x-1/2 w-[min(100vw,380px)] h-[min(55vw,380px)] rounded-full bg-[#00B5B5]/10 blur-[60px] sm:blur-[90px]",animate:{o
2322pacity:[.5,.85,.5],scale:[1,1.06,1]},transition:{duration:6,repeat:1/0,ease:"easeInOut"}}),i.jsx(ze.div,{className:"absolute bottom-[8%] right-[-8%] w-[min(50vw,260px)] h-[min(50vw,260px)] rounded-full bg-teal-200/30 blur-[50px] sm:blur-[70px]",animate:{opacity:[.4,.65,.4],x:[0,-16,0]},transition:{duration:8,repeat:1/0,ease:"easeInOut"}}),i.jsx("div",{className:"absolute inset-0 opacity-[0.45]",style:{backgroundImage:`linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px), 2323 linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px)`,backgroundSize:"56px 56px"}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#F8FAFC]/80 via-transparent to-white/60"})]})}const Oo=[{id:"brand",step:"01",tag:"Socratech AI",title:"Think deeper.",highlight:"Learn smarter.",body:"An intelligent Socratic workspace built for serious exam preparation."},{id:"welcome",step:"02",tag:"Welcome",title:"Welcome to",highlight:"Socratech AI",body:"Your personal reasoning engine â guiding you with questions, logic, and clarity."},{id:"start",step:"03",tag:"Get started",title:"Ready when",highlight:"you are.",body:"Sign in to save doubts, chat threads, and your tailored study journey."}];function BJ(){return i.jsxs("div",{className:"relative splash-float shrink-0",children:[i.jsx("div",{className:"absolute inset-0 scale-125 rounded-full bg-[#00B5B5]/12 blur-2xl"}),i.jsx(ze.div,{initial:{scale:.7,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:160,damping:16},className:"relative w-12 h-12 sm:w-14 sm:h-14 rounded-2xl bg-white border border-slate-100 flex items-center justify-center shadow-[0_10px_28px_rgba(0,181,181,0.1),0_1px_4px_rgba(15,23,42,0.04)]",children:i.jsx(Zn,{iconOnly:!0,size:"sm"})})]})}function RJ(){const e=[{icon:$a,label:"Socratic AI",desc:"Guided reasoning"},{icon:O0,label:"JEE · NEET",desc:"Exam-focused"},{icon:cj,label:"Doubt chat",desc:"24/7 tutor"}];return i.jsx("ul",{className:"splash-pills grid grid-cols-1 min-[400px]:grid-cols-3 gap-2 sm:gap-3 list-none m-0 p-0 mt-4 sm:mt-6","aria-label":"Included after sign-in",children:e.map((t,n)=>i.jsxs(ze.li,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.15+n*.08,duration:.4},className:"flex flex-col items-center text-center px-3 py-3 rounded-xl bg-slate-50/90 border border-dashed border-slate-200/90 pointer-events-none select-none","aria-hidden":"true",children:[i.jsx("div",{className:"w-8 h-8 rounded-full bg-[#00B5B5]/8 flex items-center justify-center mb-2",children:i.jsx(t.icon,{className:"w-4 h-4 text-[#009999]",strokeWidth:2})}),i.jsx("p",{className:"text-xs font-semibold text-slate-800 tracking-tight",children:t.label}),i.jsx("p",{className:"text-[10px] text-slate-500 mt-0.5 leading-snug",children:t.desc})]},t.label))})}function OJ(){const e=ea(),[t,n]=w.useState(0),[a,s]=w.useState(1),o=Oo[t],c=t===Oo.length-1,d=w.useCallback(()=>{(async()=>{if(await hS(2e3)||$m()){window.location.assign(zD());return}e("/sign-in",{replace:!0})})()},[e]),h=w.useCallback(()=>{if(c){d();return}s(1),n(p=>p+1)},[c,d]);w.useEffect(()=>{if(c)return;const x=setTimeout(()=>h(),[3200,4e3][t]??3500);return()=>clearTimeout(x)},[t,c,h]);const f={enter:p=>({opacity:0,x:p>0?40:-40,filter:"blur(8px)"}),center:{opacity:1,x:0,filter:"blur(0px)"},exit:p=>({opacity:0,x:p>0?-30:30,filter:"blur(6px)"})};return i.jsxs("div",{className:"splash-compact fixed inset-0 z-[9999] h-dvh-screen w-full max-w-[100vw] overflow-hidden font-sans text-slate-900 bg-brand-bg selection:bg-brand-primary/20 select-none flex flex-col",children:[i.jsx(DJ,{}),i.jsxs("div",{className:"relative z-10 flex flex-col flex-1 min-h-0 max-w-lg md:max-w-2xl lg:max-w-4xl xl:max-w-5xl mx-auto w-full px-safe sm:px-8 pt-safe",children:[i.jsxs("header",{className:"relative z-20 flex items-center justify-between pt-3 sm:pt-6 pb-2 sm:pb-4 shrink-0",children:[i.jsx(Ma,{to:"/","aria-label":"Socratech AI home",children:i.jsx(Zn,{size:"sm"})}),i.jsx("button",{type:"button",onClick:d,className:"text-[11px] font-semibold text-slate-500 hover:text-slate-900 transition-colors cursor-pointer px-3 py-1.5 rounded-full hover:bg-slate-100 border border-transparent hover:border-slate-200",children:"Skip"})]}),i.jsxs("main",{className:"relative z-10 flex-1 flex flex-col min-h-0 py-2 sm:py-4 overflow-y-auto overscroll-y-contain custom-scrollbar",children:[i.jsxs("div",{className:"mb-4 sm:mb-6 space-y-2.5 shrink-0",role:"progressbar","aria-valuemin":1,"aria-valuemax":Oo.length,"aria-valuenow":t+1,"aria-label":`Onboarding step ${t+1} of ${Oo.length}`,children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("span",{className:"text-[10px] font-mono font-bold text-[#00B5B5] tracking-widest",children:o.step}),i.jsxs("span",{className:"text-[10px] font-mono text-slate-400 ml-auto",children:[String(t+1).padStart(2,"0")," / ",String(Oo.length).padStart(2,"0")]})]}),i.jsx("div",{className:"flex gap-1 pointer-events-none select-none",children:Oo.map((p,x)=>i.jsx("div",{className:he("h-0.5 flex-1 rounded-full transition-colors duration-500",x<=t?"bg-[#00B5B5]":"bg-slate-200")},p.id))})]}),i.jsx(bt,{mode:"wait",custom:a,children:i.jsxs(ze.div,{custom:a,variants:f,initial:"enter",animate:"center",exit:"exit",transition:{duration:.5,ease:[.16,1,.3,1]},className:"flex flex-col min-h-0 pb-2",children:[t===0&&i.jsx("div",{className:"splash-hero-logo mb-4 sm:mb-6 flex justify-center sm:justify-start",children:i.jsx(BJ,{})}),t===1&&i.jsxs(ze.div,{initial:{scale:.8,opacity:0}
2323,animate:{scale:1,opacity:1},transition:{delay:.1},className:"mb-8 inline-flex items-center gap-2 self-start px-3 py-1.5 rounded-full border border-[#00B5B5]/20 bg-[#00B5B5]/8",children:[i.jsx(Tn,{className:"w-3.5 h-3.5 text-[#00B5B5]"}),i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-[#008f8f]",children:"AI-Powered"})]}),i.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.28em] text-slate-400 mb-3 font-mono",children:o.tag}),i.jsxs("h1",{className:"splash-title font-display text-[clamp(1.625rem,5vw+0.75rem,2.35rem)] font-extrabold leading-[1.08] tracking-tight text-slate-900",children:[o.title,i.jsx("br",{}),i.jsx("span",{className:he(t===1?"splash-shimmer":"text-transparent bg-clip-text bg-gradient-to-r from-[#00B5B5] via-[#0891b2] to-[#22d3ee]"),children:o.highlight})]}),i.jsx("p",{className:"splash-body mt-3 sm:mt-5 text-sm sm:text-[15px] text-slate-500 leading-relaxed max-w-[340px] font-sans",children:o.body}),t===2&&i.jsx(RJ,{})]},o.id)})]}),i.jsx("footer",{className:"relative z-[100] shrink-0 pt-3 sm:pt-4 pb-safe",children:i.jsxs(ze.button,{type:"button",onClick:h,whileTap:{scale:.98},className:"w-full rounded-2xl py-3.5 sm:py-4 px-6 font-bold text-sm tracking-wide cursor-pointer bg-gradient-to-r from-[#00B5B5] to-[#0891b2] text-white shadow-[0_6px_20px_rgba(0,181,181,0.2)] flex items-center justify-center gap-2.5",children:[c?"Continue to sign in":"Continue",i.jsx(pn,{className:"w-4 h-4",strokeWidth:2.5})]})})]})]})}function LJ({subtitle:e,title:t,description:n,children:a,visual:s}){return i.jsxs("div",{className:"fixed inset-0 z-[9999] min-h-dvh-screen h-dvh-screen w-full max-w-[100vw] overflow-x-hidden overflow-y-auto bg-[#FCFDFE] text-slate-800 font-sans selection:bg-teal-50",children:[i.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none opacity-50",children:[i.jsx("div",{className:"absolute top-[10%] left-[10%] w-[min(90vw,500px)] h-[min(70vw,500px)] rounded-full bg-teal-100/20 blur-[80px] sm:blur-[130px]"}),i.jsx("div",{className:"absolute bottom-[10%] right-[10%] w-[min(90vw,550px)] h-[min(70vw,550px)] rounded-full bg-blue-100/20 blur-[90px] sm:blur-[140px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem]"})]}),i.jsxs("div",{className:"relative z-20 min-h-dvh-screen h-dvh-screen w-full flex flex-col items-center justify-center px-safe py-safe sm:px-5",children:[i.jsxs("div",{className:he("w-full max-w-[440px] md:max-w-xl lg:max-w-2xl rounded-[22px] sm:rounded-[32px] bg-white border border-slate-100","shadow-[0_24px_50px_rgba(15,23,42,0.03),0_1px_2px_rgba(15,23,42,0.01)]","flex flex-col items-center p-4 sm:p-7 max-h-[calc(100dvh-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] sm:max-h-[min(calc(100dvh-3rem),720px)] overflow-y-auto overscroll-contain"),children:[i.jsx("div",{className:"flex items-center justify-between w-full mb-3 sm:mb-4 pb-3 border-b border-slate-50 shrink-0",children:i.jsx(Zn,{size:"sm",className:"max-w-[min(160px,52vw)]"})}),i.jsxs("div",{className:"w-full flex flex-col items-center min-w-0",children:[s?i.jsx("div",{className:"w-full mb-4 shrink-0",children:s}):null,i.jsx("div",{className:"text-center w-full min-h-0 flex flex-col justify-start mb-2",children:i.jsx(bt,{mode:"wait",children:i.jsxs(ze.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.23},className:"space-y-1.5",children:[i.jsx("h2",{className:"text-[8px] sm:text-[9px] font-extrabold uppercase tracking-[0.18em] sm:tracking-[0.25em] font-mono text-teal-600 leading-none",children:e}),i.jsx("h1",{className:"text-lg sm:text-xl font-black tracking-tight text-slate-900 leading-tight",children:t}),i.jsx("p",{className:"text-[11px] sm:text-xs text-slate-500 leading-relaxed max-w-[340px] mx-auto select-text",children:n})]},`${e}-${t}`)})}),i.jsx("div",{className:"w-full mb-2 min-w-0",children:a})]})]}),i.jsx("p",{className:"mt-3 sm:mt-4 text-slate-400 text-[10px] pointer-events-none text-center",children:"Socratech AI · Exam prep workspace"})]})]})}function PJ(){const e=ea(),[t]=h9(),{user:n,loading:a,oauthInProgress:s,loginError:o,handleLogin:c,handleDevLogin:d,digLoginEnabled:h,setLoginError:f}=za(),p=t.get("appLogin")==="true",x=t.get("error"),b=w.useRef(!1),v=w.useRef(!1),[N,j]=w.useState(!1);if(w.useEffect(()=>{a||n||Pn()&&(p||v.current||(v.current=!0,j(!1),c()))},[a,n,p,c]),w.useEffect(()=>{a||n||Pn()||Fu()&&window.location.replace(`${window.location.origin}/auth/google`)},[a,n]),w.useEffect(()=>{x&&f(`Sign-in failed (${x}). Try again.`)},[x,f]),w.useEffect(()=>
2323{p&&(Pn()||Fu()||a||b.current||(b.current=!0,c()))},[p,a,c]),w.useEffect(()=>{a||!n||p||e(ql(n),{replace:!0})},[n,a,e,p]),Pn()&&!n&&!p)return i.jsxs("div",{className:"h-dvh-screen w-full flex flex-col items-center justify-center bg-brand-bg gap-3 px-6 text-center",children:[N?null:i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"}),i.jsx("p",{className:"text-sm font-semibold text-slate-500",children:N?"Opening Chrome to sign inâ¦":s?"Choose your Google accountâ¦":"Opening Google sign-inâ¦"}),i.jsx("button",{type:"button",onClick:()=>{c()},className:"mt-3 rounded-xl bg-slate-900 text-white text-xs font-bold uppercase tracking-wider px-5 py-3",children:"Try Google again"}),i.jsx("button",{type:"button",onClick:()=>{j(!0),Vu()},className:"rounded-xl border border-slate-300 bg-white text-slate-800 text-xs font-bold uppercase tracking-wider px-5 py-3",children:"Continue in Chrome"}),o?i.jsx("p",{className:"text-xs text-amber-800 max-w-sm leading-relaxed",children:o}):null]});if(Fu()&&!n&&!Pn())return i.jsxs("div",{className:"h-dvh-screen w-full flex flex-col items-center justify-center bg-brand-bg gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"}),i.jsx("p",{className:"text-sm font-semibold text-slate-500",children:"Opening Google sign-inâ¦"})]});const T=s,E=T?i.jsxs("div",{className:"relative w-full h-32 sm:h-52 flex flex-col items-center justify-center overflow-hidden rounded-[18px] sm:rounded-[24px] bg-slate-50 border border-slate-100 gap-3 sm:gap-4",children:[i.jsx("div",{className:"w-8 h-8 rounded-full border-4 border-blue-500 border-t-transparent animate-spin"}),i.jsx("p",{className:"text-[11px] font-extrabold text-slate-500 uppercase tracking-wider",children:"Connecting to Googleâ¦"})]}):n&&!p?i.jsxs("div",{className:"relative w-full h-32 sm:h-52 flex flex-col items-center justify-center overflow-hidden rounded-[18px] sm:rounded-[24px] bg-slate-50 border border-slate-100 gap-3",children:[i.jsx(Dg,{className:"w-8 h-8 text-emerald-600"}),i.jsx("p",{className:"text-[11px] font-extrabold text-slate-700",children:"Signing you inâ¦"})]}):p&&n?i.jsxs("div",{className:"relative w-full h-32 sm:h-52 flex flex-col items-center justify-center overflow-hidden rounded-[18px] sm:rounded-[24px] bg-emerald-50 border border-emerald-100 gap-3",children:[i.jsx(Dg,{className:"w-8 h-8 text-emerald-600"}),i.jsx("p",{className:"text-[11px] font-extrabold text-emerald-800 uppercase tracking-wider",children:"Ready â open the app"})]}):i.jsx("div",{className:"relative w-full h-32 sm:h-52 flex items-center justify-center overflow-hidden rounded-[18px] sm:rounded-[24px] bg-slate-50 border border-slate-150/50",children:i.jsx(ze.div,{initial:{scale:.85,opacity:0},animate:{scale:1,opacity:1},className:"relative z-10 w-20 h-20 sm:w-24 sm:h-24 bg-white rounded-[24px] border border-slate-100 flex items-center justify-center",children:i.jsx(Or,{className:"w-7 h-7 sm:w-8 sm:h-8 text-slate-500"})})});return i.jsxs(LJ,{subtitle:p?"App sync":"Sign in",title:p?"Link to Socratech App":"Welcome to Socratech AI",description:p?"Sign in with Google in Chrome, then return to the installed app with your session.":"Use Google to save chats, roadmaps, and your exam profile.",visual:E,children:[o?i.jsxs("div",{role:"alert",className:"mb-3 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2.5 text-left text-[11px] leading-relaxed text-amber-950",children:[i.jsx("p",{className:"font-bold text-amber-900",children:"Sign-in blocked"}),i.jsx("p",{className:"mt-1",children:o})]}):null,(!n||p)&&i.jsxs("div",{className:"w-full py-1",children:[i.jsxs("button",{type:"button",onClick:()=>void c(),disabled:T,className:"w-full bg-slate-900 hover:bg-slate-800 disabled:opacity-70 text-white font-extrabold py-3 px-3 rounded-xl flex items-center justify-center gap-2 text-[11px] sm:text-xs uppercase tracking-widest",children:[i.jsx("img",{src:"https://www.google.com/favicon.ico",className:"w-4 h-4 bg-white rounded-full p-0.5",alt:""}),i.jsx("span",{children:T?"Connectingâ¦":p?n?"Open the app":"Sync & Return to App":"Continue with Google"})]}),p?i.jsx("p",{className:"mt-3 text-center text-[10px] leading-relaxed text-slate-500 font-medium",children:"After Google sign-in, the Socratech app should open automatically. If it does not, tap the button above."}):null,h?i.jsx("button",{type:"button",onClick:()=>void d(),disabled:T,className:"mt-4 w-full rounded-xl border border-dashed border-slate-300 bg-slate-50 text-slate-700 font-semibold py-2.5 text-xs",children:"Dev login (localhost only)"}):null]})]})}
2323function C7({subtitle:e,title:t,description:n,children:a,footer:s,headerExtra:o}){return i.jsxs("div",{className:"fixed inset-0 z-[9999] w-full max-w-[100vw] h-dvh-screen bg-[#FCFDFE] text-slate-800 flex flex-col items-center overflow-hidden font-sans selection:bg-teal-50 px-safe py-safe",children:[i.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden pointer-events-none opacity-50",children:[i.jsx("div",{className:"absolute top-[8%] left-[8%] w-[min(85vw,480px)] h-[min(60vw,480px)] rounded-full bg-teal-100/20 blur-[80px] sm:blur-[120px]"}),i.jsx("div",{className:"absolute bottom-[5%] right-[5%] w-[min(80vw,420px)] h-[min(55vw,420px)] rounded-full bg-blue-100/15 blur-[70px] sm:blur-[100px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem]"})]}),i.jsxs("div",{className:"relative z-20 w-full max-w-[480px] md:max-w-2xl lg:max-w-3xl flex-1 min-h-0 flex flex-col my-auto max-h-full",children:[i.jsxs("div",{className:"flex flex-col flex-1 min-h-0 rounded-[28px] sm:rounded-[32px] bg-white border border-slate-100 shadow-[0_24px_50px_rgba(15,23,42,0.06)] overflow-hidden",children:[i.jsxs("div",{className:"shrink-0 px-4 sm:px-6 pt-4 sm:pt-5 pb-3 border-b border-slate-50",children:[i.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3 min-w-0",children:[i.jsx(Zn,{size:"sm",className:"max-w-[min(150px,48vw)]"}),o?i.jsx("div",{className:"shrink-0 min-w-0",children:o}):null]}),i.jsx(bt,{mode:"wait",children:i.jsxs(ze.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.2},children:[i.jsx("p",{className:"text-xs font-semibold text-[#00B5B5] leading-none",children:e}),i.jsx("h1",{className:"text-lg sm:text-xl font-bold tracking-tight text-slate-900 leading-snug mt-1.5",children:t}),i.jsx("p",{className:"text-sm text-slate-500 leading-relaxed mt-1.5",children:n})]},`${e}-${t}`)})]}),i.jsx("div",{className:"flex-1 min-h-0 overflow-hidden px-4 sm:px-6 py-3 sm:py-4",children:a}),i.jsx("div",{className:"shrink-0 px-4 sm:px-6 py-3 sm:py-4 border-t border-slate-50 bg-slate-50/40",children:s})]}),i.jsx("p",{className:"shrink-0 py-2 text-slate-400 text-[10px] pointer-events-none text-center",children:"One-time setup"})]})]})}function UJ(){const e=ea(),{user:t,completeOnboarding:n}=za(),{exams:a,loading:s}=ds(),[o,c]=w.useState(0),[d,h]=w.useState([]),[f,p]=w.useState(""),[x,b]=w.useState(""),[v,N]=w.useState(""),[j,T]=w.useState(""),[E,D]=w.useState(!1),[k,M]=w.useState(""),B=w.useMemo(()=>{var te;const xe=a.length>0?a.filter(H=>H.onboardingEnabled).map(H=>({id:H.id,label:H.name,description:H.description||void 0})):((te=Fl[0])==null?void 0:te.options)??[];return Fl.map(H=>H.id==="exams"?{...H,options:xe}:H)},[a]);w.useEffect(()=>{if(t){if(pS(t)){e("/app/guide",{replace:!0});return}z0(t)||e("/welcome",{replace:!0})}},[t,e]);const _=B[o],U=()=>{switch(_.id){case"exams":return d;case"classLevel":return f?[f]:[];case"learningStyle":return x?[x]:[];case"studyHours":return v?[v]:[];case"studyGoal":return j?[j]:[];default:return[]}},F=xe=>{if(_.type==="multi"){h(te=>te.includes(xe)?te.filter(H=>H!==xe):[...te,xe]);return}_.id==="classLevel"&&p(xe),_.id==="learningStyle"&&b(xe),_.id==="studyHours"&&N(xe),_.id==="studyGoal"&&T(xe)},W=xe=>U().includes(xe),ae=U().length>0,le=async()=>{if(!ae)return;if(o<B.length-1){c(H=>H+1);return}D(!0),M("");const te=await n(d,{classLevel:f,studyHours:v,learningStyle:x,studyGoal:j});if(D(!1),!te.ok){M(te.error||"Could not save your profile. Check your connection and try again.");return}e("/welcome",{replace:!0})},re=i.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 min-w-0",children:[i.jsx($a,{size:14,className:"text-[#00B5B5] shrink-0"}),i.jsxs("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-400 tabular-nums whitespace-nowrap",children:[o+1,"/",B.length]})]});return!_||s&&_.id==="exams"&&a.length===0?i.jsx(C7,{subtitle:"Loading",title:"Preparing your setup",description:"Loading exam tracksâ¦",headerExtra:null,footer
2323:null,children:i.jsx("div",{className:"flex-1 flex items-center justify-center text-slate-400 text-sm",children:"Loading examsâ¦"})}):i.jsx(C7,{subtitle:_.subtitle,title:_.title,description:_.description,headerExtra:re,footer:i.jsxs("div",{className:"space-y-3",children:[k?i.jsx("p",{role:"alert",className:"rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-[11px] leading-relaxed text-rose-800",children:k}):null,!ae&&!E?i.jsx("p",{className:"text-[11px] text-slate-500 text-center",children:"Pick an option to continue."}):null,i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("button",{type:"button",disabled:o===0,onClick:()=>c(xe=>Math.max(0,xe-1)),className:"flex-1 py-3 rounded-xl border border-slate-200 bg-white text-slate-600 font-semibold text-sm flex items-center justify-center gap-1 disabled:opacity-40 cursor-pointer disabled:cursor-not-allowed hover:bg-slate-50",children:[i.jsx(ky,{size:14}),"Back"]}),i.jsxs("button",{type:"button",disabled:!ae||E,onClick:()=>void le(),className:"flex-[2] py-3 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-semibold text-sm flex items-center justify-center gap-1 disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",children:[E?"Savingâ¦":o===B.length-1?"Finish setup":"Continue",!E&&i.jsx(pn,{size:14})]})]})]}),children:i.jsx("div",{className:"h-full flex flex-col min-h-0 bg-slate-50/50 rounded-2xl border border-slate-100 p-2",children:i.jsx(bt,{mode:"wait",children:i.jsx(ze.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},exit:{opacity:0,x:-12},transition:{duration:.22},className:"flex-1 overflow-y-auto custom-scrollbar space-y-2 min-h-0 max-h-full p-1",children:_.options.map(xe=>{const te=W(xe.id);return i.jsxs("button",{type:"button",onClick:()=>F(xe.id),className:he("w-full px-4 py-3.5 rounded-2xl text-left flex items-center gap-3.5 transition-all cursor-pointer active:scale-[0.99]",te?"bg-[#00B5B5]/[0.06] border border-[#00B5B5]/35":"bg-white border border-slate-200/90 hover:border-slate-300"),children:[i.jsx("div",{className:he("w-5 h-5 rounded-md flex items-center justify-center shrink-0 transition-all border-2",te?"bg-[#00B5B5] border-[#00B5B5] text-white":"bg-white border-slate-200"),"aria-hidden":!0,children:te?i.jsx(Xa,{size:12,strokeWidth:3}):null}),i.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[i.jsx("span",{className:"text-[15px] font-semibold text-slate-900 block leading-snug",children:xe.label}),xe.description?i.jsx("span",{className:"text-[13px] text-slate-500 font-normal leading-snug block mt-0.5",children:xe.description}):null]})]},xe.id)})},_.id)})})})}function FJ(){const e=ea(),{user:t,completeWelcome:n}=za(),[a,s]=w.useState(()=>{var x;return((x=t==null?void 0:t.displayName)==null?void 0:x.split(" ")[0])||""}),[o,c]=w.useState(!1),[d,h]=w.useState(""),f=a.trim()||"Scholar",p=async()=>{c(!0),h("");const x=await n(a.trim()||(t==null?void 0:t.displayName)||"Scholar");
2323if(c(!1),!x.ok){h(x.error||"Could not save your name. Check your connection and try again.");return}e("/app/guide",{replace:!0})};return i.jsxs("div",{className:"fixed inset-0 z-[9999] h-dvh-screen w-full max-w-[100vw] overflow-x-hidden overflow-y-auto bg-[#FCFDFE] font-sans",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none overflow-hidden",children:[i.jsx("div",{className:"absolute top-[12%] left-[15%] w-[min(70vw,320px)] h-[min(70vw,320px)] rounded-full bg-teal-100/30 blur-[60px] sm:blur-[90px]"}),i.jsx("div",{className:"absolute bottom-[15%] right-[10%] w-[min(65vw,280px)] h-[min(65vw,280px)] rounded-full bg-rose-100/20 blur-[55px] sm:blur-[80px]"})]}),i.jsx("div",{className:"relative min-h-dvh-screen flex items-center justify-center px-safe py-safe p-4 sm:p-6",children:i.jsxs(ze.div,{initial:{opacity:0,scale:.96,y:20},animate:{opacity:1,scale:1,y:0},transition:{type:"spring",stiffness:200,damping:22},className:"relative w-full max-w-[420px] md:max-w-xl lg:max-w-2xl rounded-[28px] sm:rounded-[32px] bg-white border border-slate-100 shadow-[0_28px_60px_rgba(0,181,181,0.1)] overflow-hidden my-auto",children:[i.jsx("div",{className:"h-1.5 bg-gradient-to-r from-[#00B5B5] via-[#22d3ee] to-[#00B5B5]"}),i.jsxs("div",{className:"px-5 sm:px-8 pt-6 sm:pt-8 pb-5 sm:pb-6 text-center",children:[i.jsx(ze.div,{initial:{scale:.85,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.15,type:"spring",stiffness:260},className:"mx-auto mb-6 flex justify-center",children:i.jsx(Zn,{size:"md",className:"max-w-[180px]"})}),i.jsx(ze.p,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-[11px] font-semibold text-[#00B5B5]",children:"Almost there"}),i.jsxs(ze.h1,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.28},className:"mt-3 font-display text-2xl sm:text-[1.65rem] font-extrabold text-slate-900 tracking-tight leading-tight",children:["Welcome,"," ",i.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-[#00B5B5] to-[#0891b2]",children:f}),"!"]}),i.jsxs(ze.p,{initial:{opacity:0}
2323,animate:{opacity:1},transition:{delay:.4},className:"mt-4 text-sm text-slate-500 leading-relaxed flex items-center justify-center gap-1.5",children:[i.jsx(JU,{className:"w-3.5 h-3.5 text-rose-400 fill-rose-400 shrink-0"}),i.jsx("span",{children:"Great to see you â your Socratic workspace is ready."})]}),i.jsxs(ze.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-7 text-left",children:[i.jsx("label",{htmlFor:"welcome-name",className:"text-[10px] font-bold uppercase tracking-wider text-slate-400 block mb-2",children:"What should we call you?"}),i.jsx("input",{id:"welcome-name",type:"text",value:a,onChange:x=>s(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!o&&p()},placeholder:"Your first name",className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-slate-50/80 text-sm font-semibold text-slate-800 outline-none focus:border-[#00B5B5] focus:ring-2 focus:ring-[#00B5B5]/15 transition-all",maxLength:64})]})]}),i.jsxs("div",{className:"px-6 sm:px-8 pb-8 pb-safe",children:[d?i.jsx("p",{role:"alert",className:"mb-3 rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-[11px] leading-relaxed text-rose-800",children:d}):null,i.jsxs(ze.button,{type:"button",disabled:o,onClick:p,whileHover:{scale:1.01},whileTap:{scale:.98},initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.55},className:"w-full py-3.5 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-extrabold text-xs uppercase tracking-widest flex items-center justify-center gap-2 transition-all cursor-pointer disabled:opacity-60",children:[o?"Setting upâ¦":"Enter your workspace",i.jsx(pn,{size:16})]})]})]})})]})}const A7=[{id:"method",label:"Method"},{id:"workspace",label:"Workspace"},{id:"tracks",label:"Tracks"},{id:"demo",label:"Try it"},{id:"access",label:"Access"},{id:"faq",label:"FAQ"}],VJ=["Google sign-in","Razorpay checkout","GST invoices","Photo doubts","Web · Android · iOS"],qJ=[{n:"01",title:"Bring the doubt",body:"Type it, paste a proof, or photograph the page. Vision reads handwritten and printed exam questions."},{n:"02",title:"Get questioned back",body:"The tutor does not dump the key. It asks what you already know, then walks the next inference with you."},{n:"03",title:"Lock the pattern",body:"Roadmaps, revision, and exam-specialist bots keep the method â so the next paper feels familiar, not foreign."}],HJ=[{id:"guide",kicker:"Guide Room",title:"A Socratic chat that refuses to babysit",body:"Strict, balanced, or direct coaching â chosen in onboarding. Answers are earned, not pasted."},{id:"vision",kicker:"Vision",title:"Photograph the question. Keep writing.",body:"Upload a textbook crop or notebook page. The tutor reads the problem and coaches from the paper you are stuck on."},{id:"map",kicker:"Study map",title:"A path for this week, not a generic syllabus dump",body:"Personal roadmaps follow your exam, class, hours, and goal â crack the paper, fix weak topics, or drill mocks."},{id:"bots",kicker:"Specialists",title:"One tutor per exam, not one model for everyone",body:"JEE, NEET, UPSC, and GATE specialists stay in-domain. General Coach stays free for every student."}],Zh=[{id:"JEE",label:"JEE Main & Advanced",field:"Physics · Chemistry · Mathematics",promise:"Proofs, numericals, and the kind of intuition Advanced actually tests."},{id:"NEET",label:"NEET Medical",field:"Biology · Chemistry · Physics",promise:"NCERT-true mechanisms first, then the diagnostic questions papers love."},{id:"UPSC",label:"UPSC / Civil Services",field:"GS · Essay · CSAT · Interview",promise:"Structure, evidence, and argument â not a current-affairs firehose."},{id:"GATE",label:"GATE CS / IT",field:"Algorithms · Systems · Theory",promise:"Complexity, proofs, and core CS â coached like a viva, not a cheat sheet."}],$J=[{name:"General Coach",price:"Free",period:"with Google sign-in",points:["Socratic chat across subjects","Onboarding that tunes style and hours","Study map and doubt threads","Start immediately â no card"],cta:"Start free",featured:!1},{name:"Exam specialist",price:"Unlock",period:"monthly or quarterly",points:["JEE, NEET, UPSC, or GATE Focus bot","In-domain depth and PYQ-style reasoning","Photo doubts on exam papers","Razorpay checkout · GST invoice from Socratech Solutions"],cta:"See plans after sign-in",featured:!0}],GJ=[{q:"Will it just give me the answer?",a:"No. Socratech is built as a Socratic tutor. It asks what you already know, then guides the next step. You can choose Strict, Balanced, or Direct Guide during onboarding."},{q:"Which exams does it cover?",a:"JEE Main & Advanced, NEET, UPSC / Civil Services, GATE CS/IT, plus NCERT boards and Olympiad-style problem solving in onboarding. General Coach is free for every student."},{q:"Can I photograph a question from my book?",a:"Yes. In Guide Room you can upload a PNG or JPG of a printed or handwritten problem. Vision reads the question so you do not have to retype it."},{q:"Is there a free way to start?",a:"Yes. Sign in with Google and use General Coach at no cost. Exam-specialist bots are optional add-ons billed monthly or quarterly through Razorpay."},{q:"Does it work on my phone?",a:"The workspace is built for phones, tablets, and desktops, with native Android and iOS apps. Sign-in, chat, photo doubts, and checkout are designed for small screens first."},{q:"Who is behind Socratech?",a:"Socratech Solutions, Adyar, Chennai (GSTIN 33BCVPG6097B1ZF). Invoices go to [email protected]. Payments are processed through Razorpay."}],E7={JEE:{prompt:"A block sits on a frictionless table. I push it, then let go. Why does it keep moving?",nodes:{start:{ai:"Hold the formula sheet. After you take your hand away, what forces are still acting on the block horizontally?",hint:"Separate âwhat started the motionâ from âwhat keeps it goingâ.",choices:[{label:"Nothing horizontal",next:"nothing"},{label:"The push is still there",next:"push"},{label:"Friction from the table",next:"friction"}]},nothing:{ai:"Good. No horizontal force after release. If net force is zero, what does Newtonâs first law say about velocity?",hint:"Constant velocity is allowed â including a non-zero one.",choices:[{label:"Velocity stays as it is",next:"inertia"},{label:"It should slow to a stop",next:"stop"}]},push:{ai:"A push is a contact force. Once you let go, that contact is gone. So the force cannot âstay insideâ the block. Try again: what acts horizontally after release?",choices:[{label:"Nothing horizontal",next:"nothing"},{label:"A stored force in the mass",next:"push"}]},friction:{ai:"The table is frictionless â that was the setup. Friction would oppose motion if it existed. Without it, what is the horizontal net force?",choices:[{label:"Zero â nothing horizontal",next:"nothing"}]},stop:{ai:"That instinct is everyday life â because real tables have friction. Here friction is defined as zero, so nothing removes the velocity. What stays constant?",choices:[{label:"Velocity stays as it is",next:"inertia"}]},inertia:{ai:"Exactly. The push changed momentum. After release, net force is zero, so velocity is constant. Motion continues because nothing is required to âkeep pushingâ â only to change motion.",done:!0}}},NEET:{prompt:"I always mix mitosis and meiosis. How should I tell them apart under pressure?",nodes:{start:{ai:"Donât start with names. What is the purpose of the division â identical body cells, or gametes with half the chromosomes?",hint:"Purpose first, then chromosome count, then whether pairing happens.",choices:[{label:"Identical body cells",next:"mito"},{label:"Gametes, half the DNA",next:"meio"},{label:"Both do the same thing",next:"same"}]},same:{ai:"They both divide nuclei, but they are not the same job. One maintains the diploid body. The other creates haploid gametes. Which job needs pairing of homologues?",choices:[{label:"Making gametes",next:"meio"},{label:"Growing tissues",next:"mito"}]},mito:{ai:"Mitosis: one division, sister chromatids separate, daughter cells stay diploid and genetically alike. Where would you expect crossing over?",choices:[{label:"You wouldnât â thatâs meiosis",next:"lock"},{label:"In both, randomly",next:"random"}]},meio:{ai:"Meiosis: two divisions, homologues pair in prophase I, crossing over, haploid products. If a question shows chiasmata, which process is it?",choices:[{label:"Meiosis I",next:"lock"},{label:"Mitosis",next:"mito-wrong"}]},random:{ai:"Crossing over is a meiosis-I signature, not a mitosis one. Use that as a paper shortcut. Ready to lock the rule?",choices:[{label:"Yes â lock the rule",next:"lock"}]},"mito-wrong":{ai:"Chiasmata mean homologues already paired â mitosis does not do that. So the figure is meiosis I. Lock it?",choices:[{label:"Lock the rule",next:"lock"}]},lock:{ai:"Rule you can write in 8 seconds: mitosis = clone the body (diploid, no pairing). Meiosis = make gametes (haploid, pairing + crossing over). Purpose first, then the figure will name itself.",done:!0}}},UPSC:{prompt:"How do I write a GS answer that isnât just a list of facts?",nodes:{start:{ai:"Before content: what is the question actually asking you to do â explain, critically examine, or discuss?",hint:"The directive verb decides structure more than the topic.",choices:[{label:"Critically examine",next:"crit"},{label:"Just dump everything I remember",next:"dump"}]},dump:{ai:"Examiners score argument, not inventory. A list without a claim reads as notes. What should the first sentence of the body do?",choices:[{label:"State a clear claim",next:"crit"},{label:"Define every term at length",next:"define"}]},define:{ai:"One-line definition is enough. Then take a position. Try again: after the intro, what does the first body line need?",choices:[{label:"A claim I can defend",next:"crit"}]},crit:{ai:"Good. âCritically examineâ means claim, support, limit, way forward. For each paragraph: evidence, then a constraint. What belongs in the last 40 words?",choices:[{label:"A balanced way forward",next:"lock"},{label:"A new topic I forgot earlier",next:"new"}]},new:{ai:"New topics in the last lines look unplanned. Close the argument you opened. What should those last 40 words do?",choices:[{label:"A balanced way forward",next:"lock"}]},lock:{ai:"Directive â claim â evidence â constraint â way forward. That skeleton beats a longer fact list every time. Socratech will keep asking you for the claim before the content.",done:!0}}},GATE:{prompt:"Why is binary search O(log n) and not O(n / 2)?",nodes:{start:{ai:"Ignore the formula. Each comparison throws away how much of the remaining array?",hint:"Think in fractions of what is left, not of the original n.",choices:[{label:"About half of whatâs left",next:"half"},{label:"Two elements",next:"two"}]},two:{ai:"You only look at the midpoint â but the search continues on one side. The other side is discarded. So each step shrinks the problem by what factor?",choices:[{label:"About half",next:"half"}]},half:{ai:"If the size is n, then n/2, n/4, ⦠until 1, how many halvings is that?",choices:[{label:"About logâ n",next:"lock"},{label:"n / 2 steps",next:"linear"}]},linear:{ai:"n/2 would mean you still walk a slice proportional to n. Halving repeatedly is logarithmic.
2323Count the halvings from n down to 1.",choices:[{label:"Thatâs logâ n steps",next:"lock"}]},lock:{ai:"O(log n) is the number of times you can cut the space in half. O(n/2) is still linear â constants donât change the class. Thatâs the GATE distinction.",done:!0}}}};function YJ(){var N;const e=ea(),[t,n]=w.useState("JEE"),[a,s]=w.useState("start"),[o,c]=w.useState(!1),[d,h]=w.useState([]),f=E7[t],p=f.nodes[a],x=(j=t)=>{n(j),s("start"),c(!1),h([])},b=(j,T)=>{h(E=>[...E,j]),s(T),c(!1)},v=w.useMemo(()=>{var E;const j=[{who:"you",text:f.prompt}];let T="start";for(const D of d){const k=f.nodes[T];j.push({who:"ai",text:k.ai}),j.push({who:"you",text:D});const M=(E=k.choices)==null?void 0:E.find(B=>B.label===D);if(!M)break;T=M.next}return j.push({who:"ai",text:f.nodes[a].ai}),j},[d,a,f]);return i.jsxs("div",{className:"overflow-hidden rounded-[1.5rem] border border-white/10 bg-[#0a0f16]",children:[i.jsxs("div",{className:"flex flex-col gap-3 border-b border-white/8 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.22em] text-[#5eead4]",children:"Live method"}),i.jsx("p",{className:"mt-0.5 text-sm font-semibold text-white",children:"Answer as you would in the Guide Room"})]}),i.jsxs("button",{type:"button",onClick:()=>x(t),className:"inline-flex items-center gap-1.5 self-start rounded-full border border-white/10 px-3 py-1.5 text-[11px] font-semibold text-slate-300 transition-colors hover:border-white/20 hover:text-white sm:self-auto",children:[i.jsx(d0,{className:"size-3.5"}),"Restart"]})]}),i.jsx("div",{className:"flex gap-2 overflow-x-auto px-4 py-3 custom-scrollbar sm:px-5",children:Zh.filter(j=>j.id in E7).map(j=>i.jsx("button",{type:"button",onClick:()=>x(j.id),className:he("shrink-0 rounded-full px-3 py-1.5 text-[11px] font-semibold transition-colors",t===j.id?"bg-[#00B5B5] text-[#041112]":"bg-white/5 text-slate-300 hover:bg-white/8"),children:j.id},j.id))}),i.jsx("div",{className:"min-h-[320px] space-y-3 px-4 pb-4 sm:min-h-[360px] sm:px-5",children:i.jsx(bt,{mode:"popLayout",children:v.map((j,T)=>i.jsx(ze.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:he("flex",j.who==="you"?"justify-end":"justify-start"),children:i.jsxs("div",{className:he("max-w-[92%] rounded-2xl px-3.5 py-2.5 text-[13px] leading-relaxed sm:max-w-[80%]",j.who==="you"?"rounded-br-md bg-[#00B5B5] text-[#041112]":"rounded-bl-md border border-white/8 bg-white/5 text-slate-200"),children:[j.who==="ai"&&i.jsxs("p",{className:"mb-1 flex items-center gap-1 font-mono text-[9px] font-bold uppercase tracking-[0.18em] text-[#5eead4]",children:[i.jsx(Tn,{className:"size-3"}),"Socratech"]}),j.text]})},`${t}-${T}-${j.text.slice(0,24)}`))})}),i.jsx("div",{className:"border-t border-white/8 bg-black/20 px-4 py-4 sm:px-5",children:p.done?i.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[i.jsx("p",{className:"text-[13px] text-slate-300",children:"That is the method. Sign in and bring a real doubt from your paper."}),i.jsxs("button",{type:"button",onClick:()=>e("/sign-in"),className:"inline-flex items-center justify-center gap-2 rounded-xl bg-[#00B5B5] px-4 py-2.5 text-sm font-semibold text-[#041112] transition-colors hover:bg-[#14c4c4]",children:["Continue with Google",i.jsx(pn,{className:"size-4"})]})]}):i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Your move"}),i.jsx("div",{className:"flex flex-col gap-2",children:(N=p.choices)==null?void 0:N.map(j=>i.jsx("button",{type:"button",onClick:()=>b(j.label,j.next),className:"rounded-xl border border-white/10 bg-white/3 px-3.5 py-2.5 text-left text-[13px] font-medium text-slate-100 transition-colors hover:border-[#00B5B5]/50 hover:bg-[#00B5B5]/10",children:j.label},j.label))}),p.hint&&i.jsxs("div",{children:[i.jsxs("button",{type:"button",onClick:()=>c(j=>!j),className:"inline-flex items-center gap-1.5 text-[12px] font-semibold text-[#5eead4]",children:[i.jsx(uF,{className:"size-3.5"}),o?"Hide hint":"I need a hint"]}),o&&i.jsx("p",{className:"mt-2 text-[12px] leading-relaxed text-slate-400",children:p.hint})]})]})})]})}const WJ={guide:cj,vision:Yu,map:TU,bots:_U};function Lm(e){const t=document.getElementById(e);if(!t)return;const n=window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=t.getBoundingClientRect().top+window.scrollY-76;window.scrollTo({top:a,behavior:n?"auto":"smooth"})}function XJ(){return i.jsx("div",{className:"landing-device relative mx-auto w-full max-w-[520px]",children:i.jsxs("div",{className:"overflow-hidden rounded-[1.35rem] border border-white/12 bg-[#0b121b] shadow-[0_30px_80px_-24px_rgba(0,0,0,0.85)]",children:[i.jsxs("div",{className:"flex items-center justify-between border-b border-white/8 px-3.5 py-2.5",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i.jsx("span",{className:"size-2 shrink-0 rounded-full bg-[#00B5B5]"}),i.jsx("p",{className:"truncate text-[11px] font-semibold text-white",children:"JEE S
2323ocratic Focus"})]}),i.jsx("p",{className:"font-mono text-[10px] text-slate-500",children:"Guide Room"})]}),i.jsxs("div",{className:"space-y-3 px-3.5 py-4",children:[i.jsx("div",{className:"ml-auto max-w-[85%] rounded-2xl rounded-br-md bg-[#00B5B5] px-3 py-2 text-[12px] leading-relaxed text-[#041112]",children:"Why does the block keep moving after I stop pushing?"}),i.jsxs("div",{className:"max-w-[90%] rounded-2xl rounded-bl-md border border-white/8 bg-white/5 px-3 py-2 text-[12px] leading-relaxed text-slate-200",children:[i.jsx("p",{className:"mb-1 font-mono text-[9px] font-bold uppercase tracking-[0.16em] text-[#5eead4]",children:"Socratech"}),"After you let go, what force is still acting horizontally? Separate the cause of motion from what maintains it."]}),i.jsx("div",{className:"flex flex-wrap gap-1.5",children:["Nothing horizontal","The push remains","Friction"].map(e=>i.jsx("span",{className:"rounded-full border border-white/10 px-2.5 py-1 text-[10px] font-medium text-slate-300",children:e},e))})]}),i.jsx("div",{className:"border-t border-white/8 px-3.5 py-2.5",children:i.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-white/10 bg-black/30 px-3 py-2",children:[i.jsx("span",{className:"text-[11px] text-slate-500",children:"Type a doubt or attach a photoâ¦"}),i.jsx(Yu,{className:"size-3.5 text-[#00B5B5]"})]})})]})})}function KJ({open:e,setOpen:t,onSignIn:n}){return i.jsxs("header",{className:"sticky top-0 z-50 border-b border-white/6 bg-[#05070a]/80 backdrop-blur-xl pt-safe",children:[i.jsxs("div",{className:"mx-auto flex h-16 max-w-6xl items-center justify-between gap-3 px-safe sm:px-6",children:[i.jsx(Ma,{to:"/",className:"min-w-0 shrink-0 rounded-lg bg-black px-1.5 py-1","aria-label":"Socratech AI home",children:i.jsx(Zn,{size:"sm"})}),i.jsx("nav",{className:"hidden items-center gap-1 lg:flex","aria-label":"Primary",children:A7.map(a=>i.jsx("button",{type:"button",onClick:()=>Lm(a.id),className:"rounded-lg px-2.5 py-1.5 text-[13px] font-medium text-slate-300 transition-colors hover:bg-white/5 hover:text-white",children:a.label},a.id))}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{type:"button",onClick:n,className:"hidden rounded-lg px-3 py-2 text-[13px] font-semibold text-slate-200 hover:text-white sm:inline",children:"Sign in"}),i.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1.5 rounded-xl bg-[#00B5B5] px-3.5 py-2 text-[13px] font-semibold text-[#041112] transition-colors hover:bg-[#14c4c4]",children:["Start free",i.jsx(pn,{className:"hidden size-3.5 sm:block"})]}),i.jsx("button",{type:"button",className:"inline-flex size-10 items-center justify-center rounded-xl border border-white/10 text-white lg:hidden","aria-expanded":e,"aria-controls":"landing-mobile-nav","aria-label":e?"Close menu":"Open menu",onClick:()=>t(!e),children:e?i.jsx(Ln,{className:"size-5"}):i.jsx(bm,{className:"size-5"})})]})]}),i.jsx(bt,{children:e&&i.jsx(ze.nav,{id:"landing-mobile-nav",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden border-t border-white/8 lg:hidden","aria-label":"Mobile",children:i.jsxs("div",{className:"flex flex-col gap-1 px-4 py-3 pb-safe",children:[A7.map(a=>i.jsx("button",{type:"button",onClick:()=>{t(!1),Lm(a.id)},className:"rounded-xl px-3 py-3 text-left text-sm font-medium text-slate-200 hover:bg-white/5",children:a.label},a.id)),i.jsx("button",{type:"button",onClick:n,className:"mt-1 rounded-xl bg-white/8 px-3 py-3 text-left text-sm font-semibold text-white",children:"Sign in"})]})})})]})}function QJ(){const e=ea(),[t,n]=w.useState(!1),[a,s]=w.useState(0),[o,c]=w.useState("JEE"),d=()=>e("/sign-in"),h=Zh.find(f=>f.id===o)??Zh[0];return w.useEffect(()=>{const f=document.querySelector('meta[name="theme-color"]'),p=f==null?void 0:f.getAttribute("content");return f==null||f.setAttribute("content","#05070a"),document.documentElement.classList.add("landing-active"),()=>{f==null||f.setAttribute("content",p||"#F8FAFC"),document.documentElement.classList.remove("landing-active")}},[]),i.jsxs("div",{className:"landing-root relative min-h-dvh-screen overflow-x-clip bg-[#05070a] text-slate-200",children:[i.jsx("div",{className:"landing-bg pointer-events-none absolute inset-0","aria-hidden":!0}
2323),i.jsx("a",{href:"#main",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-[80] focus:rounded-lg focus:bg-[#00B5B5] focus:px-3 focus:py-2 focus:text-[#041112]",children:"Skip to content"}),i.jsx(KJ,{open:t,setOpen:n,onSignIn:d}),i.jsxs("main",{id:"main",children:[i.jsxs("section",{className:"relative mx-auto grid max-w-6xl gap-10 px-safe pb-16 pt-10 sm:px-6 sm:pb-20 sm:pt-16 lg:grid-cols-[1.05fr_0.95fr] lg:items-center lg:gap-12 lg:pt-20",children:[i.jsxs("div",{children:[i.jsx("p",{className:"inline-flex items-center gap-2 rounded-full border border-[#00B5B5]/25 bg-[#00B5B5]/8 px-3 py-1 font-mono text-[10px] font-semibold uppercase tracking-[0.22em] text-[#5eead4]",children:"Socratic exam OS · 2026"}),i.jsxs("h1",{className:"font-display mt-5 text-[clamp(2.15rem,6vw,3.65rem)] font-extrabold leading-[1.05] tracking-tight text-white",children:["The tutor that",i.jsx("br",{}),i.jsx("span",{className:"landing-shimmer",children:"asks until you know."})]}),i.jsx("p",{className:"mt-5 max-w-xl text-[15px] leading-relaxed text-slate-400 sm:text-base",children:"Socratech AI is a reasoning workspace for JEE, NEET, UPSC, and GATE. Photograph the question. Get questioned back. Keep the logic â not a copied key."}),i.jsxs("div",{className:"mt-7 flex flex-col gap-3 sm:flex-row sm:items-center",children:[i.jsxs("button",{type:"button",onClick:d,className:"inline-flex min-h-12 items-center justify-center gap-2 rounded-2xl bg-[#00B5B5] px-6 text-sm font-bold text-[#041112] transition-colors hover:bg-[#14c4c4]",children:["Start with General Coach",i.jsx(pn,{className:"size-4"})]}),i.jsx("button",{type:"button",onClick:()=>Lm("demo"),className:"inline-flex min-h-12 items-center justify-center rounded-2xl border border-white/12 px-6 text-sm font-semibold text-white hover:bg-white/5",children:"Try the method"})]}),i.jsx("ul",{className:"mt-8 flex flex-wrap gap-2",children:VJ.map(f=>i.jsx("li",{className:"rounded-full border border-white/8 bg-white/3 px-3 py-1 text-[11px] font-medium text-slate-400",children:f},f))})]}),i.jsx(XJ,{})]}),i.jsxs("section",{id:"method",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"01 / Method"}),i.jsx("h2",{className:"font-display mt-3 max-w-2xl text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Most tools answer. This one trains judgment."}),i.jsx("div",{className:"mt-10 grid gap-4 md:grid-cols-3",children:qJ.map(f=>i.jsxs("article",{className:"rounded-2xl border border-white/8 bg-white/3 p-5 sm:p-6",children:[i.jsx("p",{className:"font-mono text-xs font-bold text-[#00B5B5]",children:f.n}),i.jsx("h3",{className:"mt-3 text-lg font-semibold text-white",children:f.title}),i.jsx("p",{className:"mt-2 text-sm leading-relaxed text-slate-400",children:f.body})]},f.n))})]}),i.jsxs("section",{id:"workspace",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"02 / Workspace"}),i.jsx("h2",{className:"font-display mt-3 max-w-2xl text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Built around how you actually study."}),i.jsx("div",{className:"mt-10 grid gap-4 sm:grid-cols-2",children:HJ.map((f,p)=>{const x=WJ[f.id];return i.jsxs("article",{className:he("rounded-2xl border border-white/8 p-5 sm:p-6",p===0?"bg-[#00B5B5]/8 sm:col-span-2 lg:col-span-1":"bg-white/3"),children:[i.jsx(x,{className:"size-5 text-[#00B5B5]"}),i.jsx("p",{className:"mt-4 font-mono text-[10px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:f.kicker}),i.jsx("h3",{className:"mt-2 text-xl font-semibold text-white",children:f.title}),i.jsx("p",{className:"mt-2 text-sm leading-relaxed text-slate-400",children:f.body})]},f.id)})})]}),i.jsxs("section",{id:"tracks",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"03 / Tracks"}),i.jsx("h2",{className:"font-display mt-3 max-w-2xl text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Pick the paper. The tutor stays in-domain."}),i.jsx("div",{className:"mt-8 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Zh.map(f=>i.jsxs("button",{type:"button",onClick:()=>c(f.id),className:he("rounded-2xl border p-4 text-left transition-colors",o===f.id?"border-[#00B5B5]/60 bg-[#00B5B5]/10":"border-white/8 bg-white/3 hover:border-white/16"),children:[i.jsx("p",{className:"font-mono text-[11px] font-bold text-[#5eead4]",children:f.id}),i.jsx("p",{className:"mt-2 text-sm font-semibold text-white",children:f.label})]},f.id))}),i.jsxs("div",{className:"mt-5 rounded-2xl border border-white/8 bg-white/3 p-5 sm:p-6",children:[i.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:h.field}),i.jsx("p",{className:"mt-2 max-w-2xl text-base leading-relaxed text-slate-200",children:h.promise}),i.jsx("p",{className:"mt-3 text-sm text-slate-500",children:"General Coach remains free. Specialist bots unlock after sign-in on Premium."})]})]}),i.jsxs("section",{id:"demo",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"04 / Try it"}),i.jsx("h2",{className:"font-display mt-3 max-w-2xl text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Feel a Socratic turn before you create an account."}),i.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Choose a track, answer the tutor, and notice that the next step is yours. This is the same method used in Guide Room."}),i.jsx("div",{className:"mt-8",children:i.jsx(YJ,{})})]}),i.jsxs("section",{id:"access",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"05 / Access"}),i.jsx("h2",{className:"font-display mt-3 max-w-2xl text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Start free. Specialize when the paper demands it."}),i.jsx("div",{className:"mt-10 grid gap-4 lg:grid-cols-2",children:$J.map(f=>i.jsxs("article",{className:he("flex flex-col rounded-2xl border p-6",f.featured?"border-[#00B5B5]/50 bg-[#00B5B5]/8":"border-white/8 bg-white/3"),children:[i.jsx("p",{className:"text-sm font-semibold text-slate-300",children:f.name}),i.jsx("p",{className:"mt-2 font-display text-3xl font-bold text-white",children:f.price}),i.jsx("p",{className:"mt-1 text-sm text-slate-400",children:f.period}),i.jsx("ul",{className:"mt-5 flex-1 space-y-2.5",children:f.points.map(p=>i.jsxs("li",{className:"flex gap-2 text-sm text-slate-300",children:[i.jsx(Xa,{className:"mt-0.5 size-4 shrink-0 text-[#00B5B5]"}),p]},p))}),i.jsx("button",{type:"button",onClick:d,className:he("mt-6 inline-flex min-h-12 items-center justify-center rounded-xl text-sm font-semibold",f.featured?"bg-[#00B5B5] text-[#041112] hover:bg-[#14c4c4]":"border border-white/12 text-white hover:bg-white/5"),children:f.cta})]},f.name))})]}),i.jsxs("section",{id:"faq",className:"mx-auto max-w-6xl scroll-mt-24 px-safe py-12 sm:px-6 sm:py-16",children:[i.jsx("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.24em] text-[#5eead4]",children:"06 / FAQ"}),i.jsx("h2",{className:"font-display mt-3 text-3xl font-bold tracking-tight text-white sm:text-4xl",children:"Straight answers."}),i.jsx("div",{className:"mt-8 divide-y divide-white/8 rounded-2xl border border-white/8",children:GJ.map((f,p)=>{const x=a===p;return i.jsxs("div",{children:[i.jsxs("button",{type:"button","aria-expanded":x,onClick:()=>s(x?null:p),className:"flex w-full items-center justify-between gap-4 px-4 py-4 text-left sm:px-5",children:[i.jsx("span",{className:"text-sm font-semibold text-white sm:text-[15px]",children:f.q}),i.jsx(zg,{className:he("size-5 shrink-0 text-slate-400 transition-transform",x&&"rotate-180")}
2323)]}),x&&i.jsx("p",{className:"px-4 pb-4 text-sm leading-relaxed text-slate-400 sm:px-5",children:f.a})]},f.q)})})]}),i.jsx("section",{className:"mx-auto max-w-6xl px-safe pb-28 pt-4 sm:px-6 sm:pb-24",children:i.jsx("div",{className:"overflow-hidden rounded-[1.75rem] border border-[#00B5B5]/25 bg-[radial-gradient(120%_80%_at_0%_0%,rgba(0,181,181,0.18),transparent_55%),#0a1018] px-6 py-10 sm:px-10 sm:py-14",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(Dg,{className:"mt-1 size-6 shrink-0 text-[#00B5B5]"}),i.jsxs("div",{children:[i.jsx("h2",{className:"font-display text-3xl font-bold text-white sm:text-4xl",children:"Bring tonightâs doubt. Leave with the method."}),i.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Google sign-in. Free General Coach. Exam specialists when you need depth. Same workspace on phone and desktop."}),i.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[i.jsxs("button",{type:"button",onClick:d,className:"inline-flex min-h-12 items-center justify-center gap-2 rounded-2xl bg-[#00B5B5] px-6 text-sm font-bold text-[#041112]",children:["Create your workspace",i.jsx(pn,{className:"size-4"})]}),i.jsx(Ma,{to:"/splash",className:"inline-flex min-h-12 items-center justify-center rounded-2xl border border-white/12 px-6 text-sm font-semibold text-white",children:"30-second product tour"})]})]})]})})})]}),i.jsxs("footer",{className:"border-t border-white/8 px-safe pb-[calc(5.5rem+env(safe-area-inset-bottom,0px))] sm:px-6 sm:pb-8",children:[i.jsxs("div",{className:"mx-auto grid max-w-6xl gap-8 py-10 sm:grid-cols-2 lg:grid-cols-4",children:[i.jsxs("div",{className:"lg:col-span-2",children:[i.jsx("div",{className:"w-fit rounded-lg bg-black px-1.5 py-1",children:i.jsx(Zn,{size:"sm"})}),i.jsx("p",{className:"mt-3 max-w-sm text-sm leading-relaxed text-slate-500",children:"Socratech Solutions · Third Floor, No.3/2, Honey Villa, 3rd Canal Cross Street, Gandhi Nagar, Adyar, Chennai â 600020"})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Product"}),i.jsxs("ul",{className:"mt-3 space-y-2 text-sm",children:[i.jsx("li",{children:i.jsx("button",{type:"button",onClick:()=>Lm("demo"),className:"text-slate-300",children:"Try the method"})}),i.jsx("li",{children:i.jsx(Ma,{to:"/sign-in",className:"text-slate-300",children:"Sign in"})}),i.jsx("li",{children:i.jsx(Ma,{to:"/splash",className:"text-slate-300",children:"Product tour"})})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Company"}),i.jsxs("ul",{className:"mt-3 space-y-2 text-sm text-slate-300",children:[i.jsx("li",{children:i.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})}),i.jsx("li",{children:"GSTIN 33BCVPG6097B1ZF"}),i.jsx("li",{children:"Razorpay payments"})]})]})]}),i.jsxs("p",{className:"mx-auto max-w-6xl border-t border-white/6 py-5 text-[11px] text-slate-600",children:["© ",new Date().getFullYear()," Socratech Solutions. Socratech AI â think deeper, learn smarter."]})]}),i.jsx("div",{className:"fixed inset-x-0 bottom-0 z-40 border-t border-white/10 bg-[#05070a]/92 px-4 py-3 backdrop-blur-xl pb-safe sm:hidden",children:i.jsxs("button",{type:"button",onClick:d,className:"flex min-h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#00B5B5] text-sm font-bold text-[#041112]",children:["Start free",i.jsx(pn,{className:"size-4"})]})})]})}function JJ(){const[e]=h9(),t=ea(),{refreshUserProfile:n,user:a,loading:s}=za(),[o,c]=w.useState(""),[d,h]=w.useState(!1),[f,p]=w.useState("/app/guide"),x=e.get("app")==="1"||!!e.get("code")||uS()||dS();return w.useEffect(()=>{let b=!1;return(async()=>{const v=e.get("token"),N=e.get("code"),j=e.get("next")||"/app/guide",T=j.startsWith("/")&&!j.startsWith("//")?j:"/app/guide";b||p(T);try{if(v){_i(v),window.history.replaceState({},"",x?`/auth/complete?app=1&next=${encodeURIComponent(T)}`:`/auth/complete?next=${encodeURIComponent(T)}`),await n(),b||(h(!0),t(T,{replace:!0}));return}if(N){const E=await kn("/api/auth/firebase",{idToken:N});E.token&&_i(E.token),window.history.replaceState({},"",`/auth/complete?app=1&next=${encodeURIComponent(T)}`),await n().catch(()=>{}),b||(h(!0),t(T,{replace:!0}));return}await n(),b||(h(!0),t(T,{replace:!0}))}catch(E){b||(c(E instanceof Error?E.message:"Could not restore your session. Please sign in again."),h(!0))}})(),()=>{b=!0}},[]),o?i.jsx(Gt,{to:`/sign-in?error=${encodeURIComponent(o)}`,replace:!0}):d&&a&&!s&&!x?i.jsx(Gt,{to:ql(a),replace:!0}):d&&x&&!a&&!s?i.jsx(Gt,{to:`/sign-in?error=${encodeURIComponent("Session expired. Please sign in again.")}`,replace:!0}):i.jsxs("div",{className:"h-dvh-screen w-full max-w-[100vw] flex flex-col items-center justify-center bg-brand-bg gap-3 px-safe",children:[i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"}),i.jsx("p",{className:"text-sm font-semibold text-slate-500",children:d?"Openingâ¦":"Signing you inâ¦"}),d&&x?i.jsx("button",{type:"button",onClick:()=>t(f,{replace:!0}),className:"mt-2 text-xs font-semibold text-[#009999] underline underline-offset-2",children:"Continue"}):null]})}const ZJ="socratech_google_oauth_pending",Ih="socratech_google_oauth_reloaded";function T7(e){return{uid:String(e.uid??""),email:String(e.email??""),displayName:String(e.dis
2323playName??""),photoURL:String(e.photoURL??""),selectedExams:Array.isArray(e.selectedExams)?e.selectedExams.map(String):[],ongoingLearningPath:String(e.ongoingLearningPath??""),isRegisteredInDb:!0,accountStatus:e.accountStatus||"active",onboardingStatus:Number(e.onboardingStatus??0),welcomeSeen:Number(e.welcomeSeen??0),onboardingCompleted:Number(e.onboardingStatus??0)===Pl,onboardingAnswers:e.onboardingAnswers??null,botLicenses:e.botLicenses||{},unlockedBots:Array.isArray(e.unlockedBots)?e.unlockedBots.map(String):[],botAccessExpiry:e.botAccessExpiry||{},isPremium:e.isPremium===!0,activePlanId:e.activePlanId??null,activePlanName:e.activePlanName??null,billingCycle:e.billingCycle??null,premiumSince:e.premiumSince??null,premiumExpiresAt:e.premiumExpiresAt??null,lastPaymentId:e.lastPaymentId??null,lastInvoiceId:e.lastInvoiceId??null,lastPaymentAmountInr:e.lastPaymentAmountInr??null}}function Lo(e){try{e||localStorage.removeItem(ZJ)}catch{}}function eZ(e){return new Promise(t=>window.setTimeout(t,e))}async function tZ(e){let t;for(let n=0;n<4;n++)try{const a=await e.getIdToken(n>0),s=await kn("/api/auth/firebase",{idToken:a});if(!s.token)throw new Error("Session was not created.");return{token:s.token,user:s.user}}catch(a){t=a,await eZ(400*(n+1))}throw t instanceof Error?t:new Error("Could not create session. Tap retry.")}function nZ(){const e=new Ga;return e.addScope("email"),e.addScope("profile"),e.setCustomParameters({prompt:"select_account"}),e}function aZ(){const[e,t]=w.useState("Signing in with Googleâ¦"),[n,a]=w.useState(""),[s,o]=w.useState(!1),c=w.useRef(!1),d=w.useRef(null);return w.useEffect(()=>{if(c.current)return;c.current=!0;let h=!1,f=null;const p=async N=>{t("Creating your sessionâ¦");const{token:j,user:T}=await tZ(N);_i(j);try{localStorage.setItem("socratech_session",JSON.stringify(T7(T)))}catch{}Lo(!1);try{sessionStorage.removeItem(Ih)}catch{}const E=ql(T7(T));t("Signed inâ¦");const D=new URLSearchParams({token:j,next:E,app:"1"});window.location.replace(`/auth/complete?${D.toString()}`)},x=async()=>{a(""),o(!1),Lo(!1);try{sessionStorage.removeItem(Ih)}catch{}t("Opening Googleâ¦");try{const N=await rg(Yr,nZ());await p(N.user)}catch(N){const j=N&&typeof N=="object"&&"code"in N?String(N.code):"";if(j==="auth/popup-closed-by-user"||j==="auth/cancelled-popup-request"){t("Continue with Google"),o(!0);return}j==="auth/popup-blocked"?a("Allow pop-ups for this site, then tap Continue again."):j==="auth/operation-not-supported-in-this-environment"?a("Google Sign-In needs this Play Store app SHA in Firebase. Play Console â App integrity â App signing â copy SHA-1, then Firebase â Project settings â Android app com.geektheory.socratechai â Add fingerprint."):/unauthorized-domain/i.test(j)||/unauthorized-domain/i.test(N instanceof Error?N.message:"")?a("This domain is not authorized for Google sign-in. Please contact support."):a(N instanceof Error?N.message:"Sign-in did not finish. Tap retry."),t("Sign-in failed"),o(!0)}};d.current=x;const b=()=>{if(a(""),o(!1),t("Opening Chrome to sign inâ¦"),!Vu()){a("Could not open Chrome. Install Google Chrome, then tap Continue in Chrome."),t("Sign-in needs Chrome"),o(!0);return}t("Finish Google sign-in in Chrome, then return to the app."),o(!0)},v=()=>{d.current=async()=>{b()},window.__socratechStartChromeLogin=b,f=()=>{try{delete window.__socratechStartChromeLogin}catch{}},b()};return(async()=>{t("Preparing Google sign-inâ¦");const N=await hS(2500);if(!h){if(N||Pn()){v();return}if($m()){Lo(!1),a("In-app browser cannot finish Google Sign-In. Continue in Chrome."),b(),d.current=async()=>{b()};return}if(!Fu()){Lo(!1);try{sessionStorage.removeItem(Ih)}catch{}t("Continue with Google"),o(!0);return}Lo(!1),a("Open Google sign-in in Chrome to continue."),t("Sign-in needs Chrome"),o(!0),d.current=async()=>{b()}}})(),()=>{h=!0,f==null||f()}},[]),i.jsxs("div",{className:"h-dvh-screen w-full flex flex-col items-center justify-center bg-brand-bg gap-4 px-6 text-center",children:[!n&&!s?i.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"}):null,i.jsx("p",{className:"text-sm font-semibold text-slate-700",children:e}),s?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",onClick:()=>{var h;return void((h=d.current)==null?void 0:h.call(d))},className:"mt-2 rounded-xl bg-slate-900 text-white text-xs font-bold uppercase tracking-wider px-5 py-3",children:Pn()?"Continue in Chrome":"Continue with Google"}),Pn()?i.jsx("button",{type:"button",onClick:()=>{const h=window;h.__socratechStartChromeLogin?h.__socratechStartChromeLogin():Vu()},className:"mt-2 rounded-xl border border-slate-300 bg-white text-slate-800 text-xs font-bold uppercase tracking-wider px-5 py-3",children:"Continue in Chrome"}):null]}):null,n?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-xs text-amber-800 max-w-sm leading-relaxed",children:n}),i.jsx("button",{type:"button",onClick:()=>{Lo(!1),a("");try{sessionStorage.removeItem(Ih)}catch{}if(d.current){d.current();return}window.location.reload()},className:"mt-2 rounded-xl bg-slate-900 text-white text-xs font-bold uppercase tracking-wider px-5 py-3",children:Pn()?"Continue in Chrome":"Retry"}),Pn()?i.jsx("button",{type:"button",onClick:()=>{const h=window;h.__socratechStartChromeLogin?h.__socratechStartChromeLogin():Vu()},className:"mt-2 rounded-xl border border-slate-300 bg-white text-slate-800 text-xs font-bold uppercase tracking-wider px-5 py-3",children:"Continue in Chrome"}):null]}):null]})}function G0(){return i.jsx("div",{className:"h-dvh-screen w-full max-w-[100vw] flex items-center justify-center bg-brand-bg",children:i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"})})}function rZ(){return i.jsx("div",{className:"h-dvh-screen w-full max-w-[100vw] flex items-center justify-center bg-[#05070a]",children:i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"})})}function kb(){const e=window.location.hostname.toLowerCase();return e==="androidapp.socratech.ai"||e.startsWith("androidapp.")||new URLSearchParams(window.location.search).get("app")==="1"}function sZ(){const{user:e,loading:t}=za();return t?kb()?i.jsx(G0,{}):i.jsx(rZ,{}):e?i.jsx(Gt,{to:ql(e),replace:!0}):kb()?i.jsx(Gt,{to:"/splash",replace:!0}):i.jsx(QJ,{})}function iZ({children:e}){const{user:t,loading:n}=za();return n?i.jsx(G0,{}):t?z0(t)?i.jsx(Gt,{to:"/onboarding",replace:!0}):Xb(t)?i.jsx(Gt,{to:"/welcome",replace:!0}):pS(t)?i.jsx(i.Fragment,{children:e}):i.jsx(Gt,{to:ql(t),replace:!0}):i.jsx(Gt,{to:"/splash",replace:!0})}function lZ({children:e}){const{user:t,loading:n}=za();return n?i.jsx(G0,{}):t?z0(t)?i.jsx(i.Fragment,{children:e}):i.jsx(Gt,{to:ql(t),replace:!0}):i.jsx(Gt,{to:"/splash",replace:!0})}function oZ({children:e}){const{user:t,loading:n}=za();return n?i.jsx(G0,{}):t?z0(t)?i.jsx(Gt,{to:"/onboarding",replace:!0}):Xb(t)?i.jsx(i.Fragment,{children:e}):i.jsx(Gt,{to:"/app/guide",replace:!0}):i.jsx(Gt,{to:"/splash",replace:!0})}function M7({children:e}){const{user:t,loading:n}=za(),a=new URLSearchParams(window.location.search).get("appLogin")==="true";return n?i.jsx(G0,{}):t&&!a?i.jsx(Gt,{to:ql(t),replace:!0}):i.jsx(i.Fragment,{children:e})}function cZ(){return i.jsxs(Fm,{children:[i.jsx(ft,{path:"/",element:i.jsx(sZ,{})}),i.jsx(ft,{path:"/auth/complete",element:i.jsx(JJ,{})}),i.jsx(ft,{path:"/auth/google",element:i.jsx(aZ,{})}),i.jsx(ft,{path:"/splash",element:i.jsx(M7,{children:i.jsx(OJ,{})})}),i.jsx(ft,{path:"/sign-in",element:i.jsx(M7,{children:i.jsx(PJ,{})})}),i.jsx(ft,{path:"/onboarding",element:i.jsx(lZ,{children:i.jsx(UJ,{})})}),i.jsx(ft,{path:"/welcome",element:i.jsx(oZ,{children:i.jsx(FJ,{})})}),i.jsx(ft,{path:"/app/:page?",element:i.jsx(iZ,{children:i.jsx(_J,{})})}),i.jsx(ft,{path:"*",element:kb()?i.jsx(Gt,{to:"/splash",replace:!0}):i.jsx(Gt,{to:"/",replace:!0})})]})}async function tr(e,t){const n=await fetch(e,{...t,credentials:"include",headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:`Request failed (${n.status})`);return a}function uZ(){return tr("/api/admin/me")}function dZ(e,t){return tr("/api/admin/login",{method:"POST",body:JSON.stringify({email:e,password:t})})}function hZ(){return tr("/api/admin/logout",{method:"POST"})}function mZ(){return tr("/api/admin/stats")}function fZ(e=100){return tr(`/api/admin/users?limit=${e}`)}function pZ(){return tr("/api/admin/grant-plans")}function xZ(){return tr("/api/admin/profile")}function gZ(e){return tr("/api/admin/profile",{method:"PATCH",body:JSON.stringify(e)})}function bZ(e,t){return tr("/api/admin/profile/change-email",{method:"POST",body:JSON.stringify({newEmail:e,currentPassword:t})})}function yZ(e="pending"){return tr(`/api/admin/deactivation-requests?status=${encodeURIComponent(e)}`)}function vZ(e){return tr(`/api/admin/users/${e}/reactivate`,{method:"POST",body:"{}"})}function wZ(){return tr("/api/admin/users/reactivate-all-inactive",{method:"POST",body:"{}"})}function SZ(e,t){return tr(`/api/admin/users/${e}/grant-access`,{method:"POST",body:JSON.stringify(t)})}const ZC=w.createContext(null);function NZ({children:e}){const[t,n]=w.useState(null),[a,s]=w.useState(!0),[o,c]=w.useState(!1),d=w.useCallback(async()=>{const p=await uZ();p.authenticated&&p.email?(c(!0),n(p.email)):(c(!1),n(null))},[]);w.useEffect(()=>{let p=!1;return(async()=>{try{await d()}catch{p||(c(!1),n(null))}finally{p||s(!1)}})(),()=>{p=!0}},[d]);const h=w.useCallback(async(p,x)=>{await dZ(p.trim().toLowerCase(),x),c(!0),n(p.trim().toLowerCase())},[]),f=w.useCallback(async()=>{try{await hZ()}catch{}c(!1),n(null)},[]);return i.jsx(ZC.Provider,{value:{email:t,loading:a,authenticated:o,login:h,logout:f,refreshSession:d},children:e})}function Mc(){const e=w.useContext(ZC);if(!e)throw new Error("useAdminAuth must be used within AdminAuthProvider");return e}const I7="[email protected]".toLowerCase();function jZ(){const e=ea(),{login:t}=Mc(),[n,a]=w.useState(""),[s,o]=w.useState(""),[c,d]=w.useState(""),[h,f]=w.useState(!1),p=async x=>{x.preventDefault(),d(""),f(!0);try{await t(n.trim(),s),e("/admin/dashboard",{replace:!0})}catch(b){d(b instanceof Error?b.message:"Login failed")}finally{f(!1)}};return i.jsxs("div",{className:"min-h-dvh flex bg-[#FCFDFE] text-slate-800 font-sans overflow-hidden",children:[i.jsxs("div",{className:"hidden lg:flex lg:w-[48%] relative flex-col justify-between p-10 xl:p-14 border-r border-slate-100 bg-white",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[i.jsx("div",{className:"absolute top-[15%] left-[10%] w-[400px] h-[400px] rounded-full bg-teal-100/40 blur-[100px]"}
2323),i.jsx("div",{className:"absolute bottom-[10%] right-[5%] w-[280px] h-[280px] rounded-full bg-blue-100/35 blur-[90px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.02)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.02)_1px,transparent_1px)] bg-[size:3rem_3rem]"})]}),i.jsx("div",{className:"relative z-10",children:i.jsx(Zn,{size:"lg"})}),i.jsxs("div",{className:"relative z-10 space-y-6",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-teal-50 border border-teal-100 text-[#00B5B5] text-xs font-semibold",children:[i.jsx(Ul,{className:"w-3.5 h-3.5"}),"Admin command center"]}),i.jsxs("h1",{className:"text-4xl xl:text-5xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:["Manage your",i.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-r from-[#00B5B5] to-[#0891b2]",children:"Socratic platform"})]}),i.jsx("p",{className:"text-slate-500 text-sm leading-relaxed max-w-md",children:"Firebase-secured access for operators only. Monitor learners, onboarding, and premium status from one place."}),i.jsx("div",{className:"flex flex-wrap gap-3 pt-2",children:[{icon:GU,label:"Firebase Auth"},{icon:OU,label:"Live Firestore"},{icon:Tn,label:"AI workspace"}].map(({icon:x,label:b})=>i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-xl bg-slate-50 border border-slate-100 text-xs text-slate-600",children:[i.jsx(x,{className:"w-3.5 h-3.5 text-[#00B5B5]"}),b]},b))})]}),i.jsxs("p",{className:"relative z-10 text-[11px] text-slate-400",children:["First-time setup: ",I7]})]}),i.jsxs("div",{className:"flex-1 flex items-center justify-center p-6 sm:p-10 relative bg-[#FCFDFE]",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[i.jsx("div",{className:"absolute top-[20%] left-1/2 -translate-x-1/2 w-[300px] h-[300px] rounded-full bg-teal-100/30 blur-[80px] lg:hidden"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem] opacity-60"})]}),i.jsxs(ze.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},className:"relative z-10 w-full max-w-[400px]",children:[i.jsx("div",{className:"lg:hidden mb-8 flex justify-center",children:i.jsx(Zn,{size:"md"})}),i.jsxs("div",{className:"mb-8",children:[i.jsx("p",{className:"text-xs font-semibold text-[#00B5B5] mb-1",children:"Secure sign-in"}),i.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Admin access"}),i.jsx("p",{className:"text-sm text-slate-500 mt-2",children:"Use your Firebase administrator account. Not the student Google login."})]}),i.jsxs("form",{onSubmit:p,className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-[0_24px_50px_rgba(15,23,42,0.06)]",children:[i.jsx("div",{className:"h-1.5 bg-gradient-to-r from-[#00B5B5] via-[#22d3ee] to-[#00B5B5]"}),i.jsxs("div",{className:"p-6 sm:p-7 space-y-5",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{htmlFor:"admin-email",className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[i.jsx(Zm,{className:"w-4 h-4 text-slate-400"}),"Admin email"]}),i.jsx("input",{id:"admin-email",type:"email",autoComplete:"off",name:"admin-email",value:n,onChange:x=>a(x.target.value),placeholder:I7,className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-white text-sm font-medium text-slate-800 outline-none focus:border-[#00B5B5] focus:ring-2 focus:ring-[#00B5B5]/15",required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{htmlFor:"admin-password",className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[i.jsx(Or,{className:"w-4 h-4 text-slate-400"}),"Password"]}),i.jsx("input",{id:"admin-password",type:"password",autoComplete:"current-password",value:s,onChange:x=>o(x.target.value),className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-slate-50/80 text-sm font-medium text-slate-800 outline-none focus:border-[#00B5B5] focus:ring-2 focus:ring-[#00B5B5]/15",required:!0})]}),c?i.jsx("p",{className:"text-sm text-rose-600 font-medium leading-snug",children:c}):null,i.jsxs("button",{type:"submit",disabled:h,className:"w-full py-3.5 rounded-xl bg-gradient-to-r from-[#00B5B5] to-[#0891b2] hover:from-[#00a3a3] hover:to-[#0e7490] text-white font-semibold text-sm flex items-center justify-center gap-2 disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed shadow-lg shadow-[#00B5B5]/20 transition-all",children:[h?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(Ul,{className:"w-4 h-4"}),h?"Verifyingâ¦":"Enter command center"]})]})]}),i.jsx("p",{className:"mt-6 text-center text-[11px] text-slate-400 leading-relaxed",children:"Password is managed in Firebase Auth. Change it anytime from Profile after sign-in."})]})]})]})}function kZ(e){return{id:e.id,title:e.title,body:e.body,sentAt:e.sentAt,source:"system",type:e.type,read:e.read}}function eA(e){const[t,n]=w.useState([]),[a,s]=w.useState(!0),o=w.useCallback(p=>{n(x=>{const b=x.findIndex(v=>v.id===p.id);if(b>=0){const v=[...x];return v[b]={...v[b],...p},v.sort((N,j)=>Date.parse(j.sentAt)-Date.parse(N.sentAt))}return[p,...x].sort((v,N)=>Date.parse(N.sentAt)-Date.parse(v.sentAt))})},[]);w.useEffect(()=>{if(!e){n([]),s(!1);return}s(!0);const p=GV(x=>{n(x),s(!1)},()=>s(!1));return()=>p()},[e]),w.useEffect(()=>{if(!e)return;const p=vj(()=>{}),x=wj(b=>{o(kZ(b))});return()=>{p(),x()}},[e,o]);const c=w.useMemo(()=>t.filter(p=>!p.read).length,[t]),d=w.useCallback(async p=>{try{await yj(p),n(x=>x.map(b=>b.id===p?{...b,read:!0}:b))}catch(x){console.warn("[admin notifications] mark read:",x)}},[]),h=w.useCallback(async()=>{const p=t.filter(x=>!x.read);for(const x of p)await d(x.id)},[t,d]),f=w.useCallback(p=>{var x;return((x=t.find(b=>b.id===p))==null?void 0:x.read)??!1},[t]);return{items:t,loading:a,unreadCount:c,markRead:d,markAllRead:h,isRead:f}}function CZ(e){try{return new Date(e).toLocaleDateString("en-IN",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}catch{return""}}function AZ({enabled:e}){const[t,n]=w.useState(!1),{items:a,loading:s,unreadCount:o,markRead:c,isRead:d}=eA(e);return i.jsxs("div",{className:"relative",children:[i.jsxs("button",{type:"button",onClick:()=>n(h=>!h),className:"relative w-9 h-9 rounded-lg bg-slate-50 flex items-center justify-center text-slate-500 hover:text-[#008F8F] hover:bg-teal-50 border border-slate-200 transition-all cursor-pointer","aria-label":"Admin notifications",children:[i.jsx(os,{size:16}),o>0?i.jsx("span",{className:"absolute -top-1 -right-1 min-w-[16px] h-4 px-1 rounded-full bg-rose-500 text-white text-[9px] font-bold flex items-center justify-center",children:o>9?"9+":o}):null]}),i.jsx(bt,{children:t?i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0}
2323,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[60] cursor-default",onClick:()=>n(!1)}),i.jsxs(ze.div,{initial:{opacity:0,y:-8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-6,scale:.98},className:"absolute top-[calc(100%+8px)] right-0 z-[70] w-[min(360px,calc(100vw-24px))] rounded-2xl border border-slate-200 bg-white shadow-[0_20px_50px_rgba(15,23,42,0.12)] overflow-hidden text-left",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-slate-100 bg-gradient-to-r from-teal-50/80 to-white",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:"Admin alerts"}),i.jsx("p",{className:"text-[10px] text-slate-500",children:"New users, payments, grants â live via WebSocket"})]}),i.jsx("div",{className:"px-4 py-2 border-b border-slate-50",children:i.jsxs(Ma,{to:"/admin/activity",onClick:()=>n(!1),className:"text-xs font-semibold text-[#008F8F] hover:underline inline-flex items-center gap-1",children:["View all activity",i.jsx(Ay,{className:"w-3 h-3"})]})}),i.jsx("div",{className:"max-h-[min(400px,55vh)] overflow-y-auto",children:s?i.jsx("div",{className:"flex justify-center py-10",children:i.jsx(Qe,{className:"w-6 h-6 text-[#00B5B5] animate-spin"})}):a.length===0?i.jsx("p",{className:"text-center text-xs text-slate-500 py-10 px-4",children:"No admin alerts yet. New signups and payments will appear here."}):i.jsx("ul",{className:"divide-y divide-slate-50",children:a.slice(0,12).map(h=>i.jsx("li",{children:i.jsxs("button",{type:"button",onClick:()=>void c(h.id),className:he("w-full text-left px-4 py-3 hover:bg-slate-50 transition-colors cursor-pointer",!d(h.id)&&"bg-teal-50/40"),children:[i.jsx("p",{className:"text-xs font-bold text-slate-900",children:h.title}),i.jsx("p",{className:"text-[11px] text-slate-600 mt-0.5 line-clamp-2",children:h.body}),i.jsx("p",{className:"text-[9px] text-slate-400 mt-1",children:CZ(h.sentAt)})]})},h.id))})})]})]}):null})]})}function EZ(){const{authenticated:e}=Mc();return w.useEffect(()=>e?(Oy(async()=>E0()),()=>{Sj()}):void 0,[e]),null}const z7=[{to:"/admin/dashboard",label:"Dashboard",icon:oj,end:!0},{to:"/admin/users",label:"All users",icon:wm,end:!0},{to:"/admin/deactivations",label:"Deactivations",icon:vm,end:!0},{to:"/admin/paid-users",label:"Paid users",icon:Sr,end:!0},{to:"/admin/exams",label:"AI Exams",icon:O0,end:!0},{to:"/admin/plans",label:"Plans",icon:Jm,end:!0},{to:"/admin/coupons",label:"Coupons",icon:mj,end:!0},{to:"/admin/payments",label:"Payments",icon:Tn,end:!0},{to:"/admin/activity",label:"Activity",icon:aF,end:!0},{to:"/admin/notifications",label:"Broadcasts",icon:gF,end:!0},{to:"/admin/reports",label:"App reports",icon:Vi,end:!0},{to:"/admin/profile",label:"Profile",icon:kU,end:!0}];function kr({title:e,subtitle:t,children:n}){const{email:a,logout:s}=Mc(),o=ea(),c=async()=>{await s(),o("/admin/login",{replace:!0})};return i.jsxs("div",{className:"min-h-dvh bg-[#FCFDFE] text-slate-800 font-sans",children:[i.jsx(EZ,{}),i.jsxs("aside",{className:"hidden lg:flex fixed inset-y-0 left-0 z-30 w-[260px] flex-col border-r border-slate-100 bg-white shadow-sm",children:[i.jsxs("div",{className:"p-5 border-b border-slate-50 shrink-0",children:[i.jsx(Zn,{size:"md"}),i.jsxs("div",{className:"mt-4 flex items-center gap-2 px-3 py-2 rounded-xl bg-teal-50 border border-teal-100",children:[i.jsx(Ul,{className:"w-4 h-4 text-[#00B5B5]"}),i.jsx("span",{className:"text-xs font-semibold text-[#00B5B5]",children:"Command center"})]})]}),i.jsx("nav",{className:"flex-1 min-h-0 p-3 space-y-1 overflow-y-auto overscroll-contain",children:z7.map(({to:d,label:h,icon:f,end:p})=>i.jsxs(Yo,{to:d,end:p,className:({isActive:x})=>he("flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium transition-colors",x?"bg-[#00B5B5]/10 text-[#008f8f] border border-[#00B5B5]/20":"text-slate-500 hover:text-slate-800 hover:bg-slate-50"),children:[i.jsx(f,{className:"w-4 h-4 shrink-0"}),h]},d))}),i.jsxs("div",{className:"p-4 border-t border-slate-50 shrink-0",children:[i.jsx("p",{className:"text-xs font-semibold text-slate-400 mb-1",children:"Signed in"}),i.jsx("p",{className:"text-xs text-slate-600 truncate mb-2",children:a}),i.jsx(Yo,{to:"/admin/profile",className:({isActive:d})=>he("block w-full text-center mb-3 py-2 rounded-lg text-xs font-semibold transition-colors",d?"bg-teal-50 text-[#00B5B5]":"text-slate-500 hover:bg-slate-50 hover:text-slate-800"),children:"Account & security"}),i.jsxs("button",{type:"button",onClick:()=>void c(),className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl border border-slate-200 bg-white text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer transition-colors",children:[i.jsx(Oi,{className:"w-4 h-4"}),"Sign out"]})]})]}),i.jsxs("div",{className:"lg:ml-[260px] flex flex-col min-h-dvh min-w-0",children:[i.jsxs("header",{className:"lg:hidden sticky top-0 z-20 flex items-center justify-between px-4 py-3 pt-safe border-b border-slate-100 bg-white overflow-x-auto gap-2",children:[i.jsx(Zn,{size:"sm"}),i.jsx("nav",{className:"flex gap-1",children:z7.map(({to:d,label:h,end:f})=>i.jsx(Yo,{to:d,end:f,className:({isActive:p})=>he("px-2 py-1 rounded-lg text-[10px] font-semibold whitespace-nowrap",p?"bg-teal-50 text-[#00B5B5]":"text-slate-400"),children:h.split(" ")[0]},d))}),i.jsx("button",{type:"button",onClick:()=>void c(),className:"p-2 rounded-lg text-slate-500 hover:bg-slate-50 cursor-pointer shrink-0",children:i.jsx(Oi,{className:"w-5 h-5"})})]}),i.jsxs("main",{className:"flex-1 overflow-y-auto relative",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none overflow-hidden opacity-60",children:[i.jsx("div",{className:"absolute top-0 right-0 w-[480px] h-[360px] rounded-full bg-teal-100/30 blur-[100px]"}),i.jsx("div",{className:"absolute bottom-0 left-1/4 w-[320px] h-[280px] rounded-full bg-blue-100/25 blur-[90px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem]"})]}),i.jsxs("div",{className:"relative z-10 p-4 sm:p-6 lg:p-8 max-w-6xl mx-auto w-full",children:[i.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2 text-[#00B5B5] text-xs font-semibold mb-1",children:[i.jsx(Tn,{className:"w-3.5 h-3.5"}
2323),t||"Socratech AI Admin"]}),i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-slate-900 tracking-tight",children:e})]}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[i.jsx(AZ,{enabled:!!a}),i.jsxs("div",{className:"hidden sm:flex items-center gap-1 text-xs text-slate-400",children:[i.jsx("span",{children:"Secure"}),i.jsx(Fi,{className:"w-3 h-3"}),i.jsx("span",{className:"text-[#00B5B5] font-medium",children:"Firebase"})]})]})]}),n]})]})]})]})}function On({label:e,value:t,icon:n,tone:a="teal"}){const s={teal:"from-teal-50 to-white border-teal-100 text-[#00B5B5]",amber:"from-amber-50 to-white border-amber-100 text-amber-600",violet:"from-violet-50 to-white border-violet-100 text-violet-600",slate:"from-slate-50 to-white border-slate-100 text-slate-600"};return i.jsx("div",{className:he("rounded-2xl border bg-gradient-to-br p-4 sm:p-5 shadow-sm",s[a]),children:i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-slate-500",children:e}),i.jsx("p",{className:"text-2xl sm:text-3xl font-bold text-slate-900 mt-1 tabular-nums",children:t})]}),i.jsx("div",{className:"w-10 h-10 rounded-xl bg-white border border-slate-100 flex items-center justify-center shadow-sm",children:i.jsx(n,{className:"w-5 h-5"})})]})})}function TZ({days:e,title:t}){const n=Math.max(1,...e.flatMap(a=>[a.doubts,a.sessions,a.signups]));return i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white p-5 sm:p-6 shadow-sm",children:[i.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-6",children:[i.jsx("h2",{className:"text-base font-bold text-slate-900",children:t}),i.jsxs("div",{className:"flex flex-wrap gap-3 text-xs font-semibold",children:[i.jsxs("span",{className:"flex items-center gap-1.5 text-[#00B5B5]",children:[i.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-[#00B5B5]"}),"Doubts"]}),i.jsxs("span",{className:"flex items-center gap-1.5 text-indigo-500",children:[i.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-indigo-400"}),"Sessions"]}),i.jsxs("span",{className:"flex items-center gap-1.5 text-amber-600",children:[i.jsx("span",{className:"w-2.5 h-2.5 rounded-sm bg-amber-400"}),"Signups"]})]})]}),i.jsx("div",{className:"flex items-end justify-between gap-2 sm:gap-3 h-[200px]",children:e.map(a=>i.jsxs("div",{className:"flex-1 flex flex-col items-center gap-2 min-w-0",children:[i.jsxs("div",{className:"w-full flex items-end justify-center gap-0.5 h-[160px]",children:[i.jsx(H1,{h:a.doubts/n*100,className:"bg-[#00B5B5]"}),i.jsx(H1,{h:a.sessions/n*100,className:"bg-indigo-400"}),i.jsx(H1,{h:a.signups/n*100,className:"bg-amber-400"})]}),i.jsx("span",{className:"text-[10px] sm:text-xs font-semibold text-slate-500 truncate w-full text-center",children:a.label})]},a.label))})]})}function H1({h:e,className:t}){return i.jsx("div",{className:he("w-[28%] max-w-[14px] rounded-t-md transition-all",t),style:{height:`${Math.max(e,4)}%`}})}function ps({loading:e,onRefresh:t}){return i.jsx("div",{className:"flex justify-end mb-4",children:i.jsxs("button",{type:"button",onClick:t,disabled:e,className:"flex items-center gap-2 px-4 py-2 rounded-xl border border-slate-200 bg-white text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer disabled:opacity-50 shadow-sm",children:[i.jsx(dj,{className:he("w-4 h-4",e&&"animate-spin")}),"Refresh"]})})}const MZ="";async function En(e){return e instanceof Error?e.message:String(e)}async function IZ(){return mZ()}async function tA(){return(await fZ(200)).users}function zZ(){const e=[];for(let t=6;t>=0;t--){const n=new Date;n.setDate(n.getDate()-t);const a=n.toISOString().slice(0,10);e.push({key:a,label:n.toLocaleDateString("en-IN",{weekday:"short"})})}return e}async function _Z(){return{days:zZ().map(({label:n})=>({label:n,doubts:0,sessions:0,signups:0})),totalDoubtsWeek:0,totalSessionsWeek:0,totalSignupsWeek:0}}function DZ(e){const t=e.botId?String(e.botId):null,n=t&&t!=="General"?t:null;return{id:String(e.id??""),botId:n,name:String(e.name??""),priceMonthly:Number(e.priceMonthly??0),priceQuarterly:Number(e.priceQuarterly??0),description:String(e.description??""),badge:e.badge?String(e.badge):void 0,features:Array.isArray(e.features)?e.features.map(String):[],ctaText:String(e.ctaText??"Choose plan"),accentClass:String(e.accentClass??"border-slate-200 bg-white"),textAccentClass:String(e.textAccentClass??"text-slate-600"),sortOrder:Number(e.sortOrder??0),active:e.active!==!1,createdAt:e.createdAt?String(e.createdAt):null}}async function BZ(){return((await Un("/api/admin/plans")).plans??[]).map(DZ).sort((t,n)=>t.sortOrder-n.sortOrder)}async function RZ(){for(const e of Rm)await kn("/api/admin/plans",{...e,id:e.id})}async function OZ(e){const t=e.id||e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48)||`plan-${Date.now()}
2323`,n={id:t,botId:e.botId??null,name:e.name,priceMonthly:Math.round(Number(e.priceMonthly)||0),priceQuarterly:Math.round(Number(e.priceQuarterly)||0),description:e.description,badge:e.badge??null,features:e.features,ctaText:e.ctaText,accentClass:e.accentClass,textAccentClass:e.textAccentClass,sortOrder:e.sortOrder,active:e.active};return await kn("/api/admin/plans",n),t}async function LZ(e){await M0(`/api/admin/plans/${e}`)}function PZ(e){return{id:String(e.id??""),title:String(e.title??""),body:String(e.body??""),audience:e.audience||"all",status:e.status||"draft",createdAt:e.createdAt?String(e.createdAt):null,sentAt:e.sentAt?String(e.sentAt):null}}async function UZ(){return((await Un("/api/admin/broadcasts")).broadcasts??[]).map(PZ).sort((t,n)=>{const a=t.createdAt?Date.parse(t.createdAt):0;return(n.createdAt?Date.parse(n.createdAt):0)-a})}async function nA(e){return(await kn("/api/admin/broadcasts",{title:e.title,body:e.body,audience:e.audience,send:!1})).broadcast.id}async function aA(e){await kn(`/api/admin/broadcasts/${e}/send`,{})}async function FZ(e){await M0(`/api/admin/broadcasts/${e}`)}function VZ(){const[e,t]=w.useState(null),[n,a]=w.useState(null),[s,o]=w.useState(!0),[c,d]=w.useState(""),h=w.useCallback(async()=>{o(!0),d("");try{const[f,p]=await Promise.all([IZ(),_Z()]);t(f),a(p)}catch(f){d(await En(f))}finally{o(!1)}},[]);return w.useEffect(()=>{h()},[h]),i.jsxs(kr,{title:"Dashboard",subtitle:"Engagement & growth",children:[i.jsx(ps,{loading:s,onRefresh:()=>void h()}),c?i.jsxs("div",{className:"mb-6 rounded-2xl bg-rose-50 border border-rose-100 px-4 py-4 text-sm text-rose-800",children:[i.jsx("p",{children:c}),i.jsx("a",{href:MZ,target:"_blank",rel:"noopener noreferrer",className:"inline-block mt-2 font-semibold text-[#00B5B5] hover:underline text-xs",children:"Open Firestore Security rules â"})]}):null,s&&!e?i.jsx("div",{className:"flex justify-center py-24",children:i.jsx(Qe,{className:"w-9 h-9 text-[#00B5B5] animate-spin"})}):e?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4 mb-4",children:[i.jsx(On,{label:"Total users",value:e.totalUsers,icon:wm}),i.jsx(On,{label:"Paid users",value:e.premiumUsers,icon:Sr,tone:"violet"}),i.jsx(On,{label:"Chat sessions",value:e.totalSessions,icon:vr,tone:"slate"}),i.jsx(On,{label:"Doubts logged",value:e.totalDoubts,icon:L0,tone:"slate"})]}),i.jsxs("div",{className:"grid sm:grid-cols-3 gap-3 mb-6",children:[i.jsx(On,{label:"Onboarding pending",value:e.onboardingPending,icon:nV,tone:"amber"}),i.jsx(On,{label:"Onboarding done",value:e.onboardingDone,icon:ym}),i.jsx(On,{label:"Welcome pending",value:e.welcomePending,icon:Tn,tone:"violet"})]}),n?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid sm:grid-cols-3 gap-3 mb-6",children:[i.jsx(On,{label:"Doubts (7d)",value:n.totalDoubtsWeek,icon:Qm}),i.jsx(On,{label:"Sessions (7d)",value:n.totalSessionsWeek,icon:vr,tone:"slate"}),i.jsx(On,{label:"Signups (7d)",value:n.totalSignupsWeek,icon:wm,tone:"teal"})]}),i.jsx(TZ,{days:n.days,title:"Weekly engagement"})]}):null]}):null]})}function Xi({search:e,onSearchChange:t,placeholder:n="Searchâ¦",totalCount:a,filteredCount:s,page:o=1,totalPages:c=1,rangeStart:d=0,rangeEnd:h=0,onPageChange:f,showPagination:p=!0}){const x=p&&s>0&&c>1;return i.jsxs("div",{className:"px-4 sm:px-6 py-3 border-b border-slate-50 flex flex-col gap-3 bg-white",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[i.jsx("input",{value:e,onChange:b=>t(b.target.value),placeholder:n,className:"flex-1 rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-[#00B5B5]/30"}),e.trim()?i.jsx("button",{type:"button",onClick:()=>t(""),className:"shrink-0 rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50",children:"Clear"}):null,i.jsx("span",{className:"text-xs text-slate-500 shrink-0 sm:ml-auto",children:s===a?`${a} total`:`${s} of ${a}`})]}),x&&f?i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[i.jsxs("p",{className:"text-xs text-slate-500",children:["Showing ",d,"â",h," of ",s]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{type:"button",disabled:o<=1,onClick:()=>f(Math.max(1,o-1)),className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-semibold border border-slate-200 bg-white text-slate-700 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-50 cursor-pointer",children:[i.jsx(sj,{className:"w-3.5 h-3.5"}),"Prev"]}),i.jsxs("span",{className:"text-xs font-medium text-slate-600 tabular-nums px-1",children:[o," / ",c]}),i.jsxs("button",{type:"button",disabled:o>=c,onClick:()=>f(Math.min(c,o+1)),className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-semibold border border-slate-200 bg-white text-slate-700 disabled:opacity-40 disabled:cursor-not-allowed hover:bg-slate-50 cursor-pointer",children:["Next",i.jsx(Fi,{className:"w-3.5 h-3.5"})]})]})]}):null]})}function Ki(e,t){const n=(t==null?void 0:t.pageSize)??10,a=t==null?void 0:t.getSearchText,[s,o]=w.useState(""),[c,d]=w.useState(1),h=w.useMemo(()=>{const v=s.trim().toLowerCase();return!v||!a?e:e.filter(N=>a(N).toLowerCase().includes(v))},[e,s,a]),f=Math.max(1,Math.ceil(h.length/n));w.useEffect(()=>{d(1)},[s,e.length,n]),w.useEffect(()=>{c>f&&d(f)},[c,f]);const p=w.useMemo(()=>{const v=(c-1)*n;return h.slice(v,v+n)},[h,c,n]),x=h.length===0?0:(c-1)*n+1,b=Math.min(c*n,h.length);return{search:s,setSearch:o,page:c,setPage:d,filtered:h,pageItems:p,totalPages:f,rangeStart:x,rangeEnd:b,pageSize:n}}const qZ=10;function HZ(e){if(!e)return"â";try{return new Date(e).toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"})}catch{return"â"}}function $Z(e){return[e.displayName,e.email,e.uid,...e.selectedExams??[],...e.unlockedBots??[],e.activePlanName??"",e.lastInvoiceId??""].filter(
2323Boolean).join(" ")}function rA({users:e,onGrantAccess:t,title:n="Users",emptyMessage:a="No users found.",showPaymentDetails:s=!1,pageSize:o=qZ,searchPlaceholder:c="Search name, email, uid, exams, bots, planâ¦"}){const{search:d,setSearch:h,page:f,setPage:p,filtered:x,pageItems:b,totalPages:v,rangeStart:N,rangeEnd:j}=Ki(e,{pageSize:o,getSearchText:$Z}),T=w.useMemo(()=>`${x.length} ${x.length===1?"user":"users"}`,[x.length]);return i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-slate-50 flex items-center justify-between gap-3",children:[i.jsx("h2",{className:"text-base font-bold text-slate-900",children:n}),i.jsx("span",{className:"text-xs text-slate-500 shrink-0",children:T})]}),i.jsx(Xi,{search:d,onSearchChange:h,placeholder:c,totalCount:e.length,filteredCount:x.length,page:f,totalPages:v,rangeStart:N,rangeEnd:j,onPageChange:p}),i.jsxs("div",{className:"overflow-x-auto",children:[i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs text-slate-500 border-b border-slate-50 bg-slate-50/50",children:[i.jsx("th",{className:"px-4 sm:px-6 py-3 font-semibold",children:"User"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden md:table-cell",children:"Exams"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Onboard"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden sm:table-cell",children:"Welcome"}),s?i.jsxs(i.Fragment,{children:[i.jsx("th",{className:"px-4 py-3 font-semibold hidden lg:table-cell",children:"Plan"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden lg:table-cell",children:"Bots"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden lg:table-cell",children:"Paid"})]}):i.jsx("th",{className:"px-4 py-3 font-semibold hidden lg:table-cell",children:"Bots"}),i.jsx("th",{className:"px-4 sm:px-6 py-3 font-semibold text-right",children:"Actions"})]})}),i.jsx("tbody",{children:b.map(E=>i.jsxs("tr",{className:"border-b border-slate-50 last:border-0 hover:bg-slate-50/50",children:[i.jsxs("td",{className:"px-4 sm:px-6 py-3.5",children:[i.jsx("p",{className:"font-semibold text-slate-900 truncate max-w-[200px]",children:E.displayName}),i.jsx("p",{className:"text-xs text-slate-500 truncate max-w-[220px]",children:E.email})]}),i.jsx("td",{className:"px-4 py-3.5 hidden md:table-cell",children:i.jsx("p",{className:"text-xs text-slate-500 max-w-[140px] truncate",children:E.selectedExams.length?E.selectedExams.join(", "):"â"})}),i.jsx("td",{className:"px-4 py-3.5",children:i.jsx(_7,{ok:E.onboardingStatus===1})}),i.jsx("td",{className:"px-4 py-3.5 hidden sm:table-cell",children:i.jsx(_7,{ok:E.welcomeSeen===1})}),s?i.jsxs(i.Fragment,{children:[i.jsx("td",{className:"px-4 py-3.5 hidden lg:table-cell text-xs text-slate-600",children:E.activePlanName??"â"}),i.jsx("td",{className:"px-4 py-3.5 hidden lg:table-cell text-xs font-semibold text-[#008F8F]",children:E.unlockedBots.length?E.unlockedBots.join(", "):"â"}),i.jsx("td",{className:"px-4 py-3.5 hidden lg:table-cell text-xs font-bold text-[#008F8F]",children:E.lastPaymentAmountInr!=null?`â¹${E.lastPaymentAmountInr.toLocaleString("en-IN")}`:"â"})]}):i.jsx("td",{className:"px-4 py-3.5 hidden lg:table-cell text-xs text-slate-600",children:E.unlockedBots.length?E.unlockedBots.join(", "):"â"}),i.jsx("td",{className:"px-4 sm:px-6 py-3.5 text-right",children:i.jsxs("div",{className:"inline-flex flex-col items-end gap-1.5",children:[E.licenseLocked?i.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg text-[10px] font-bold bg-emerald-50 border border-emerald-200 text-emerald-800",children:[i.jsx(Or,{className:"w-3 h-3"}),"Active · ",HZ(E.licenseExpiry)]}):null,i.jsxs("button",{type:"button",onClick:()=>t(E),className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-semibold border border-[#00B5B5]/40 bg-teal-50 text-[#008F8F] hover:bg-teal-100 cursor-pointer transition-colors",children:[i.jsx(lj,{className:"w-3.5 h-3.5"}),"Give access"]})]})})]},E.uid))})]}),x.length===0?i.jsx("p",{className:"text-center text-sm text-slate-500 py-12",children:a}):null]})]})}function _7({ok:e}){return i.jsx("span",{className:he("inline-block px-2 py-0.5 rounded-md text-xs font-semibold",e?"bg-teal-50 text-teal-700":"bg-amber-50 text-amber-700"),children:e?"Done":"Pending"})}function sA({user:e,onClose:t,onSuccess:n}){const[a,s]=w.useState("type"),[o,c]=w.useState("free"),[d,h]=w.useState(""),[f,p]=w.useState(""),[x,b]=w.useState("monthly"),[v,N]=w.useState(""),[j,T]=w.useState(""),[E,D]=w.useState([]),[k,M]=w.useState(!1),[B,_]=w.useState(!1),[U,F]=w.useState(""),{bots:W}=ds(),ae=w.useMemo(()=>{const R=W.filter(P=>P.paid).map(P=>P.id);if(R.length)return R;const J=cs();return J.length?J:[...Hl]},[W]),le=w.useMemo(()=>{const R=Nm();return R.length?R:$s},[W]);w.useEffect(()=>{e&&(s("type"),c("free"),h(""),p(""),b("monthly"),N(""),T(""),F(""))},[e]),w.useEffect(()=>{if(!e)return;let R=!1;return(async()=>{M(!0);try{const J=await pZ();R||D(J.plans)}catch(J){R||F(J instanceof Error?J.message:"Could not load plans")}finally{R||M(!1)}})(),()=>{R=!0}},[e]);const re=w.useMemo(()=>{const R=new Set;for(const J of(e==null?void 0:e.unlockedBots)??[])fn(J)&&R.add(J);return R},[e==null?void 0:e.unlockedBots]);w.useEffect(()=>{o==="free"&&d&&re.has(d)&&(h(""),p(""))},[o,d,re]);const xe=w.useMemo(()=>o==="free"?ae.filter(R=>!re.has(R)):[...ae],[o,re,ae]),te=w.useMemo(()=>E.filter(R=>R.botId===d),[E,d]),H=w.useMemo(()=>E.find(R=>R.id===f),[E,f]),V=x==="quarterly"?H==null?void 0:H.priceQuarterly:H==null?void 0:H.priceMonthly,ne=async()=>
2323{if(!(!e||!d||!f)){_(!0),F("");try{await SZ(e.uid,{botId:d,planId:f,billingCycle:x,grantType:o,amountInr:o==="offline"&&v.trim()?Number(v):void 0,adminNote:j.trim()||void 0}),n(),t()}catch(R){F(R instanceof Error?R.message:"Grant failed")}finally{_(!1)}}},Z=()=>{if(F(""),a==="type"){if(o==="free"&&xe.length===0){F("This user already has all tutors active. Use offline payment to extend expiry.");return}s("bot")}else a==="bot"?s("plan"):a==="plan"?s("billing"):a==="billing"?s(o==="offline"?"offline":"confirm"):a==="offline"&&s("confirm")},Y=()=>{F(""),a==="bot"?s("type"):a==="plan"?s("bot"):a==="billing"?s("plan"):a==="offline"?s("billing"):a==="confirm"&&s(o==="offline"?"offline":"billing")},I=a==="type"&&(o==="offline"||xe.length>0)||a==="bot"&&!!d||a==="plan"&&!!f&&te.length>0||a==="billing"&&!0||a==="offline"&&!0;return i.jsx(bt,{children:e?i.jsx(ze.div,{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-900/40 backdrop-blur-sm",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,children:i.jsxs(ze.div,{role:"dialog","aria-modal":!0,className:"w-full max-w-md bg-white rounded-2xl border border-slate-200 shadow-xl overflow-hidden",initial:{scale:.96,y:12},animate:{scale:1,y:0},exit:{scale:.96,y:8},onClick:R=>R.stopPropagation(),children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-100 flex items-start justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-[#008F8F]",children:"Grant access"}),i.jsx("h2",{className:"text-base font-bold text-slate-900",children:e.displayName}),i.jsx("p",{className:"text-xs text-slate-500 truncate",children:e.email})]}),i.jsx("button",{type:"button",onClick:t,className:"w-8 h-8 rounded-lg border border-slate-200 flex items-center justify-center text-slate-500 cursor-pointer",children:i.jsx(Ln,{size:16})})]}),i.jsxs("div",{className:"p-5 space-y-4 max-h-[min(70vh,520px)] overflow-y-auto",children:[a==="type"&&i.jsxs("div",{className:"space-y-3",children:[i.jsxs("p",{className:"text-sm text-slate-600",children:["Grant one exam tutor to this user only. App shows a"," ",i.jsx("strong",{children:"Free"})," or ",i.jsx("strong",{children:"Paid"})," chip on their plan."]}),e.unlockedBots.length>0?i.jsxs("p",{className:"text-xs text-amber-800 bg-amber-50 border border-amber-100 rounded-lg px-3 py-2",children:["Active tutors: ",i.jsx("strong",{children:e.unlockedBots.join(", ")}),". Free access cannot be given for an already-active tutor."]}):null,i.jsxs("button",{type:"button",onClick:()=>c("free"),className:he("w-full text-left p-4 rounded-xl border-2 transition-colors cursor-pointer",o==="free"?"border-teal-300 bg-teal-50":"border-slate-200 hover:border-slate-300"),children:[i.jsxs("div",{className:"flex items-center gap-2 font-bold text-slate-900",children:[i.jsx(lj,{size:18,className:"text-teal-600"}),"Free access (complimentary)"]}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"â¹0 · User chip shows Free"})]}),i.jsxs("button",{type:"button",onClick:()=>c("offline"),className:he("w-full text-left p-4 rounded-xl border-2 transition-colors cursor-pointer",o==="offline"?"border-violet-300 bg-violet-50":"border-slate-200 hover:border-slate-300"),children:[i.jsxs("div",{className:"flex items-center gap-2 font-bold text-slate-900",children:[i.jsx(uU,{size:18,className:"text-violet-600"}),"Offline payment recorded"]}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Cash/UPI/bank · User chip shows Paid · Invoice created"})]})]}),a==="bot"&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-semibold text-slate-800",children:"Which tutor?"}),i.jsx("p",{className:"text-xs text-slate-500",children:o==="free"?"Only tutors this user does not already have are listed.":"Offline payment can extend an active tutor's expiry."}),xe.length===0?i.jsx("p",{className:"text-xs text-rose-700 bg-rose-50 p-3 rounded-lg",children:"No tutors available for free grant. User already has UPSC, JEE, NEET, and GATE active."}):i.jsx("div",{className:"grid grid-cols-2 gap-2",children:ae.map(R=>
2323{const J=le.find(Ee=>Ee.id===R),P=re.has(R),ge=xe.includes(R);return i.jsxs("button",{type:"button",disabled:!ge,onClick:()=>{ge&&(h(R),p(""))},className:he("p-3 rounded-xl border text-left transition-colors",!ge&&"opacity-50 cursor-not-allowed bg-slate-50",ge&&"cursor-pointer",d===R&&ge?"border-[#00B5B5] bg-teal-50":ge?"border-slate-200 hover:bg-slate-50":"border-slate-100"),children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:R}),i.jsx("p",{className:"text-[10px] text-slate-500 line-clamp-2",children:(J==null?void 0:J.subtitle)??""}),P?i.jsx("p",{className:"text-[9px] font-bold text-emerald-700 mt-1",children:"Already active"}):null]},R)})})]}),a==="plan"&&i.jsxs("div",{className:"space-y-2",children:[i.jsxs("p",{className:"text-sm font-semibold text-slate-800",children:["Which plan for ",d,"?"]}),k?i.jsx("div",{className:"flex justify-center py-8",children:i.jsx(Qe,{className:"w-6 h-6 animate-spin text-[#00B5B5]"})}):te.length===0?i.jsxs("p",{className:"text-xs text-amber-700 bg-amber-50 p-3 rounded-lg",children:["No active plans for ",d," in admin catalog. Add a plan in Admin â Plans."]}):i.jsx("div",{className:"space-y-2",children:te.map(R=>i.jsxs("button",{type:"button",onClick:()=>p(R.id),className:he("w-full text-left p-3 rounded-xl border cursor-pointer",f===R.id?"border-[#00B5B5] bg-teal-50":"border-slate-200"),children:[i.jsx("p",{className:"font-bold text-sm text-slate-900",children:R.name}),i.jsxs("p",{className:"text-[10px] text-slate-500 mt-0.5",children:["â¹",R.priceMonthly,"/mo · â¹",R.priceQuarterly,"/qtr"]})]},R.id))})]}),a==="billing"&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-sm font-semibold text-slate-800",children:"Billing period"}),i.jsx("div",{className:"grid grid-cols-2 gap-2",children:["monthly","quarterly"].map(R=>i.jsxs("button",{type:"button",onClick:()=>b(R),className:he("p-3 rounded-xl border capitalize font-semibold text-sm cursor-pointer",x===R?"border-[#00B5B5] bg-teal-50 text-[#008F8F]":"border-slate-200 text-slate-700"),children:[R,H?i.jsxs("span",{className:"block text-[10px] font-normal mt-1",children:["â¹",R==="monthly"?H.priceMonthly:H.priceQuarterly]}):null]},R))})]}),a==="offline"&&i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"text-sm font-semibold text-slate-800",children:"Offline payment details"}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Amount (INR)",i.jsx("input",{type:"number",min:1,placeholder:V?String(V):"Amount",value:v,onChange:R=>N(R.target.value),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]}),i.jsxs("p",{className:"text-[10px] text-slate-400",children:["Leave empty to use catalog price (â¹",V??"â",")"]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Note (optional)",i.jsx("input",{type:"text",placeholder:"UPI ref, receipt no., cash dateâ¦",value:j,onChange:R=>T(R.target.value),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]})]}),a==="confirm"&&i.jsxs("div",{className:"rounded-xl bg-slate-50 border border-slate-200 p-4 text-sm space-y-2",children:[i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Type:"})," ",i.jsx("strong",{children:o==="free"?"Free access":"Offline paid"})]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Tutor:"})," ",i.jsx("strong",{children:d})]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Plan:"})," ",i.jsx("strong",{children:(H==null?void 0:H.name)??f})]}),i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Billing:"})," ",i.jsx("strong",{className:"capitalize",children:x})]}),o==="offline"?i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Amount:"})," ",i.jsxs("strong",{children:["â¹",v.trim()||V||"â"]})]}):null,i.jsxs("p",{className:"text-xs text-teal-700 pt-2",children:["User will unlock ",d," immediately. Chip:"," ",o==="free"?"Free":"Paid","."]})]}),U?i.jsx("p",{className:"text-xs text-rose-600",children:U}):null]}),i.jsxs("div",{className:"px-5 py-4 border-t border-slate-100 flex gap-2",children:[a!=="type"?i.jsxs("button",{type:"button",onClick:Y,disabled:B,className:"flex items-center gap-1 px-4 py-2 rounded-xl border border-slate-200 text-xs font-bold text-slate-600 cursor-pointer",children:[i.jsx(sj,{size:14}),"Back"]}):i.jsx("div",{}),a==="confirm"?i.jsxs("button",{type:"button",disabled:B,onClick:()=>void ne(),className:"flex-1 py-2.5 rounded-xl bg-[#00B5B5] text-white text-xs font-bold cursor-pointer disabled:opacity-50 flex items-center justify-center gap-2",children:[B?i.jsx(Qe,{size:14,className:"animate-spin"}):null,"Confirm & grant"]}):i.jsxs("button",{type:"button",disabled:!I||a==="plan"&&k,onClick:Z,className:he("flex-1 flex items-center justify-center gap-1 py-2.5 rounded-xl text-xs font-bold cursor-pointer",I&&!(a==="plan"&&k)?"bg-[#00B5B5] hover:bg-[#00a0a0] text-white":"bg-slate-200 text-slate-400 cursor-not-allowed"),children:["Next",i.jsx(Fi,{size:14})]})]})]})}):null})}function GZ(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),h=w.useCallback(async()=>{a(!0),o("");try{t(await tA())}catch(f){o(await En(f))}finally{a(!1)}},[]);return w.useEffect(()=>{h()}
2323,[h]),i.jsxs(kr,{title:"All users",subtitle:"Manage every scholar",children:[i.jsx(ps,{loading:n,onRefresh:()=>void h()}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsx(rA,{users:e,onGrantAccess:d,title:"All users"}),i.jsx(sA,{user:c,onClose:()=>d(null),onSuccess:()=>void h()})]})}function YZ(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),h=w.useMemo(()=>e.filter(p=>p.licenseLocked||p.isPremium),[e]),f=w.useCallback(async()=>{a(!0),o("");try{t(await tA())}catch(p){o(await En(p))}finally{a(!1)}},[]);return w.useEffect(()=>{f()},[f]),i.jsxs(kr,{title:"Paid users",subtitle:"Premium & elite scholars",children:[i.jsx(ps,{loading:n,onRefresh:()=>void f()}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,i.jsxs("div",{className:"grid sm:grid-cols-2 gap-3 mb-6",children:[i.jsx(On,{label:"Paid users",value:h.length,icon:Sr,tone:"violet"}),i.jsx(On,{label:"Free users",value:e.length-h.length,icon:Sr,tone:"slate"})]}),n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsx(rA,{users:h,onGrantAccess:d,title:"Premium subscribers",emptyMessage:"No paid users yet. Payments appear after Razorpay checkout.",showPaymentDetails:!0}),i.jsx(sA,{user:c,onClose:()=>d(null),onSuccess:()=>void f()})]})}async function iA(e){const t=await fetch("/api/notifications/broadcast/push",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.json().catch(()=>({}));console.warn("[broadcast push]",n.error??t.status)}}function lA({open:e,subjectLabel:t,templates:n,onClose:a,onSkipped:s,onSent:o}){var N;const[c,d]=w.useState(((N=n[0])==null?void 0:N.id)??"launch_excited"),[h,f]=w.useState(!1),[p,x]=w.useState(""),b=w.useMemo(()=>n.find(j=>j.id===c)??n[0],[n,c]),v=async()=>{if(b){f(!0),x("");try{const j=await nA({title:b.title,body:b.body,audience:"all"});await aA(j),await iA({broadcastId:j,title:b.title,body:b.body,audience:"all"}),o==null||o(),a()}catch(j){x(j instanceof Error?j.message:"Failed to send broadcast")}finally{f(!1)}}};return i.jsx(bt,{children:e?i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0}
2323,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[80] bg-slate-900/40 backdrop-blur-[2px]",onClick:()=>!h&&a()}),i.jsxs(ze.div,{initial:{opacity:0,scale:.96,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},className:"fixed left-1/2 top-1/2 z-[90] w-[min(520px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 rounded-2xl border border-slate-200 bg-white shadow-2xl overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-100 flex items-start justify-between gap-3 bg-gradient-to-r from-teal-50 to-white",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"inline-flex items-center gap-1.5 text-[#008F8F] text-xs font-bold mb-1",children:[i.jsx(os,{size:14}),"Notify all students"]}),i.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Send announcement?"}),i.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:[t," â pick a message template. Students see it instantly (no refresh)."]})]}),i.jsx("button",{type:"button",disabled:h,onClick:a,className:"p-1.5 rounded-lg hover:bg-slate-100 cursor-pointer disabled:opacity-50",children:i.jsx(Ln,{size:18,className:"text-slate-500"})})]}),i.jsx("div",{className:"p-5 max-h-[min(50vh,400px)] overflow-y-auto space-y-2",children:n.map(j=>i.jsxs("button",{type:"button",onClick:()=>d(j.id),className:he("w-full text-left rounded-xl border p-3 transition-colors cursor-pointer",c===j.id?"border-[#00B5B5] bg-teal-50/60 ring-1 ring-[#00B5B5]/30":"border-slate-200 hover:border-slate-300 hover:bg-slate-50"),children:[i.jsx("p",{className:"text-xs font-bold text-slate-800",children:j.label}),i.jsx("p",{className:"text-[10px] text-slate-500",children:j.description}),i.jsx("p",{className:"text-[11px] font-semibold text-slate-700 mt-1.5 line-clamp-1",children:j.title}),i.jsx("p",{className:"text-[10px] text-slate-600 mt-0.5 line-clamp-2",children:j.body})]},j.id))}),b?i.jsxs("div",{className:"px-5 pb-2",children:[i.jsx("p",{className:"text-[10px] font-bold uppercase text-slate-400 tracking-wider mb-1",children:"Preview"}),i.jsxs("div",{className:"rounded-xl bg-slate-50 border border-slate-100 p-3 text-left",children:[i.jsx("p",{className:"text-xs font-bold text-slate-900",children:b.title}),i.jsx("p",{className:"text-[11px] text-slate-600 mt-1",children:b.body})]})]}):null,p?i.jsx("p",{className:"px-5 text-xs text-rose-600",children:p}):null,i.jsxs("div",{className:"px-5 py-4 border-t border-slate-100 flex flex-wrap gap-2 justify-end",children:[i.jsx("button",{type:"button",disabled:h,onClick:()=>{s==null||s(),a()},className:"px-4 py-2 rounded-xl border border-slate-200 text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer disabled:opacity-50",children:"Skip"}),i.jsx("button",{type:"button",disabled:h||!b,onClick:()=>void v(),className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-[#00B5B5] text-white text-sm font-semibold hover:bg-[#00a0a0] cursor-pointer disabled:opacity-50",children:h?i.jsxs(i.Fragment,{children:[i.jsx(Qe,{size:16,className:"animate-spin"}),"Sendingâ¦"]}):i.jsxs(i.Fragment,{children:[i.jsx(os,{size:16}),"Send to all users"]})})]})]})]}):null})}function WZ(e){return e.discountType==="percent"?`${e.discountValue}% off`:`â¹${e.discountValue} off`}function XZ(e){const{name:t,botId:n,priceMonthly:a,priceQuarterly:s}=e;return[{id:"launch_excited",label:"Launch â excited",description:"Celebrate a new plan going live",title:`New ${n} plan is live`,body:`${t} is now available on Socratech! Unlock the ${n} AI tutor from â¹${a}/month or â¹${s}/quarter.`},{id:"limited_offer",label:"Limited offer",description:"Creates urgency around pricing",title:`Special pricing â ${t}`,body:`For a limited time, get ${n} mentor access with ${t}: â¹${a}/mo or save more with â¹${s}/quarter. Grab it in Premium.`},{id:"coupon_highlight",label:"Value spotlight",description:"Highlights value and outcomes",title:`${n} mastery plan unlocked`,body:`Level up your ${n} prep with ${t}. Structured AI guidance, doubt solving, and roadmaps â starting at â¹${a}/month.`},{id:"friendly_reminder",label:"Friendly nudge",description:"Warm tone for all students",title:`Hey scholar â meet ${t}`,body:`We just added ${t} for ${n} aspirants. Open Premium when you're ready;
2323 your AI tutor is waiting.`},{id:"urgent_action",label:"Urgent action",description:"Short, high-energy CTA",title:`Don't miss ${n} access`,body:`${t} is live now. â¹${a}/month â start your ${n} journey today on Socratech.`}]}function KZ(e){const t=WZ(e);return[{id:"launch_excited",label:"New coupon â excited",description:"Announce a fresh discount code",title:`New coupon: ${e.code}`,body:`Use code ${e.code} at checkout for ${t} on eligible tutors. ${e.label||"Limited-time offer"} â apply before it expires!`},{id:"limited_offer",label:"Limited-time deal",description:"Urgency on coupon usage",title:`Limited offer â ${e.code}`,body:`Save with ${e.code}: ${t}. ${e.label}. Head to Premium and unlock your tutor before the offer ends.`},{id:"coupon_highlight",label:"Savings highlight",description:"Focus on money saved",title:`${t} with ${e.code}`,body:`Your exclusive code ${e.code} is active. ${e.label}. Enter it during checkout on any paid plan.`},{id:"friendly_reminder",label:"Friendly reminder",description:"Soft reminder for students",title:`Psst â coupon ${e.code} is ready`,body:`Scholars, remember to use ${e.code} for ${t}. ${e.label||"We stacked this for you."}`},{id:"urgent_action",label:"Act now",description:"Punchy CTA",title:`Use ${e.code} today`,body:`${t} â code ${e.code}. Checkout in Premium now. ${e.label}`}]}function D7(e){const t=e.trim();if(t==="")return null;const n=Number(t);return!Number.isFinite(n)||n<0?null:Math.round(n)}function B7(e){return!Number.isFinite(e)||e<0?"0":String(Math.round(e))}const QZ=()=>({id:"",botId:"JEE",name:"",priceMonthly:0,priceQuarterly:0,description:"",features:[""],ctaText:"Choose plan",accentClass:"border-slate-200 bg-white",textAccentClass:"text-slate-600",sortOrder:0,active:!0});function JZ(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),[h,f]=w.useState(!1),[p,x]=w.useState(null),[b,v]=w.useState("0"),[N,j]=w.useState("0"),{bots:T}=ds(),E=T.filter(U=>U.paid).map(U=>U.id).length>0?T.filter(U=>U.paid).map(U=>U.id):cs().length?cs():[...Hl],D=w.useCallback(async()=>{a(!0),o("");try{t(await BZ())}catch(U){o(await En(U))}finally{a(!1)}},[]);w.useEffect(()=>{D()},[D]);const k=async()=>{f(!0);try{await RZ(),await D()}catch(U){alert(await En(U))}finally{f(!1)}},M=U=>{d(U),v(B7(U.priceMonthly)),j(B7(U.priceQuarterly))},B=async()=>{if(!(c!=null&&c.name.trim()))return;const U=D7(b),F=D7(N);if(U===null||F===null){alert("Enter both prices (use 0 only if you mean free). Do not leave the field blank while typing.");return}const W=!c.id;f(!0);try{await OZ({...c,priceMonthly:U,priceQuarterly:F,features:c.features.filter(ae=>ae.trim())}),d(null),await D(),alert(`Saved: â¹${U}/month · â¹${F}/quarter for ${c.name}`),W&&c.botId&&x({subjectLabel:`New plan: ${c.name}`,templates:XZ({name:c.name,botId:c.botId,priceMonthly:c.priceMonthly,priceQuarterly:c.priceQuarterly})})}catch(ae){alert(await En(ae))}finally{f(!1)}},_=async U=>{if(confirm("Delete this plan?"))try{await LZ(U),await D()}catch(F){alert(await En(F))}};return i.jsxs(kr,{title:"Plans",subtitle:"One plan per exam bot (UPSC, JEE, NEET, GATE) â Razorpay unlocks that tutor",children:[i.jsx(lA,{open:!!p,subjectLabel:(p==null?void 0:p.subjectLabel)??"",templates:(p==null?void 0:p.templates)??[],onClose:()=>x(null)}),i.jsx(ps,{loading:n,onRefresh:()=>void D()}),i.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[i.jsxs("button",{type:"button",onClick:()=>M(QZ()),className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-slate-900 text-white text-sm font-semibold cursor-pointer hover:bg-slate-800",children:[i.jsx(qi,{className:"w-4 h-4"}),"New plan"]}),e.length===0?i.jsxs("button",{type:"button",disabled:h,onClick:()=>void k(),className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl border border-teal-200 bg-teal-50 text-[#008f8f] text-sm font-semibold cursor-pointer",children:[i.jsx(Tn,{className:"w-4 h-4"}),"Seed default plans"]}):null]}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,c?i.jsxs("div",{className:"mb-8 rounded-2xl border border-slate-100 bg-white p-5 sm:p-6 shadow-sm space-y-4",children:[i.jsx("h3",{className:"font-bold text-slate-900",children:c.id?"Edit plan":"New plan"}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsx(Po,{label:"Plan ID (slug)",value:c.id,onChange:U=>d({...c,id:U})}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-semibold text-slate-500 block mb-1",children:"Exam bot (required)"}),i.jsx("select",{value:c.botId??"",onChange:U=>d({...c,botId:U.target.value}),className:"w-full px-3 py-2 rounded-xl border border-slate-200 text-sm",children:E.map(U=>i.jsx("option",{value:U,children:U},U))})]}),i.jsx(Po,{label:"Name",value:c.name,onChange:U=>d({...c,name:U})}),i.jsx(R7,{label:"Monthly price (â¹)",value:b,onChange:v}),i.jsx(R7,{label:"Quarterly price (â¹)",value:N,onChange:j}),i.jsxs("p",{className:"sm:col-span-2 text-xs text-slate-500 -mt-2",children:["Type the exact amount (e.g. ",i.jsx("strong",{children:"1"})," for â¹1). Clearing the box used to save as â¹0 by mistake â now Save will warn
2323you. Use ",i.jsx("strong",{children:"0"})," only when you want that cycle free (no Razorpay)."]}),i.jsx(Po,{label:"Badge (optional)",value:c.badge??"",onChange:U=>d({...c,badge:U}),className:"sm:col-span-2"}),i.jsx(Po,{label:"Description",value:c.description,onChange:U=>d({...c,description:U}),className:"sm:col-span-2"}),i.jsx(Po,{label:"CTA text",value:c.ctaText,onChange:U=>d({...c,ctaText:U})}),i.jsx(Po,{label:"Sort order",type:"number",value:String(c.sortOrder),onChange:U=>d({...c,sortOrder:Number(U)})})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2",children:"Features (one per line)"}),i.jsx("textarea",{value:c.features.join(` 2324`),onChange:U=>d({...c,features:U.target.value.split(` 2325`)}),rows:5,className:"w-full px-3 py-2 rounded-xl border border-slate-200 text-sm"})]}),i.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium text-slate-700",children:[i.jsx("input",{type:"checkbox",checked:c.active,onChange:U=>d({...c,active:U.target.checked})}),"Plan is active (visible to students)"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:h,onClick:()=>void B(),className:"px-4 py-2 rounded-xl bg-[#00B5B5] text-white text-sm font-semibold cursor-pointer disabled:opacity-50",children:h?"Savingâ¦":"Save plan"}),i.jsx("button",{type:"button",onClick:()=>d(null),className:"px-4 py-2 rounded-xl border border-slate-200 text-sm font-semibold cursor-pointer",children:"Cancel"})]})]}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(U=>i.jsxs("div",{className:he("rounded-2xl border p-5 shadow-sm",U.active?"border-slate-100 bg-white":"border-slate-100 bg-slate-50 opacity-70"),children:[i.jsxs("div",{className:"flex justify-between items-start gap-2 mb-2",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-slate-400 font-mono",children:U.id}),U.botId?i.jsxs("p",{className:"text-[10px] font-bold text-[#008F8F] uppercase",children:[U.botId," bot"]}):null,i.jsx("h3",{className:"font-bold text-slate-900",children:U.name})]}),U.badge?i.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-teal-50 text-[#00B5B5]",children:U.badge}):null]}),i.jsx("p",{className:"text-sm text-slate-500 mb-3 line-clamp-2",children:U.description}),i.jsxs("p",{className:"text-lg font-bold text-slate-900",children:["â¹",U.priceMonthly,i.jsx("span",{className:"text-xs font-normal text-slate-400",children:" / mo"})]}),i.jsxs("p",{className:"text-xs text-slate-500 mb-4",children:["â¹",U.priceQuarterly," / quarter"]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>M({...U}),className:"flex-1 flex items-center justify-center gap-1 py-2 rounded-lg border border-slate-200 text-xs font-semibold cursor-pointer hover:bg-slate-50",children:[i.jsx(P0,{className:"w-3 h-3"}),"Edit"]}),i.jsx("button",{type:"button",onClick:()=>void _(U.id),className:"flex items-center justify-center gap-1 px-3 py-2 rounded-lg border border-rose-100 text-rose-600 text-xs font-semibold cursor-pointer hover:bg-rose-50",children:i.jsx(Hi,{className:"w-3 h-3"})})]})]},U.id))})]})}function Po({label:e,value:t,onChange:n,type:a="text",className:s}){return i.jsxs("div",{className:s,children:[i.jsx("label",{className:"text-xs font-semibold text-slate-500 block mb-1",children:e}),i.jsx("input",{type:a,value:t,onChange:o=>n(o.target.value),className:"w-full px-3 py-2 rounded-xl border border-slate-200 text-sm"})]})}function R7({label:e,value:t,onChange:n}){return i.jsxs("div",{children:[i.jsx("label",{className:"text-xs font-semibold text-slate-500 block mb-1",children:e}),i.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:t,onChange:a=>n(a.target.value.replace(/[^\d]/g,"")),className:"w-full px-3 py-2 rounded-xl border border-slate-200 text-sm font-mono",placeholder:"0"})]})}function ZZ(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(""),[h,f]=w.useState(""),[p,x]=w.useState("all"),[b,v]=w.useState(!1),N=w.useCallback(async()=>{a(!0),o("");try{t(await UZ())}catch(D){o(await En(D))}finally{a(!1)}},[]);w.useEffect(()=>{N()},[N]);const j=Ki(e,{pageSize:8,getSearchText:D=>[D.title,D.body,D.audience,D.status].join(" ")}),T=async D=>{if(D.preventDefault(),!(!c.trim()||!h.trim())){v(!0);try{const k=c.trim(),M=h.trim(),B=await nA({title:k,body:M,audience:p});await aA(B),await iA({broadcastId:B,title:k,body:M,audience:p}),d(""),f(""),await N()}catch(k){alert(await En(k))}finally{v(!1)}}},E=async D=>{if(confirm("Delete this notification?"))try{await FZ(D),await N()}catch(k){alert(await En(k))}};return i.jsxs(kr,{title:"Push notifications",subtitle:"Broadcast to students in-app",children:[i.jsx(ps,{loading:n,onRefresh:()=>void N()}),i.jsxs("div",{className:"grid lg:grid-cols-2 gap-6 mb-8",children:[i.jsxs("form",{onSubmit:D=>void T(D),className:"rounded-2xl border border-slate-100 bg-white p-5 sm:p-6 shadow-sm space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-2 text-[#00B5B5]",children:[i.jsx(os,{className:"w-5 h-5"}),i.jsx("h3",{className:"font-bold text-slate-900",children:"Compose broadcast"})]}),i.jsx("p",{className:"text-xs text-slate-500 leading-relaxed",children:"Students see sent notifications inside the app (dashboard banner). Native device push requires FCM setup later."}),i.jsx("input",{value:c,onChange:D=>d(D.target.value),placeholder:"Title â e.g. New mock test live",className:"w-full px-4 py-3 rounded-xl border border-slate-200 text-sm",required:!0}),i.jsx("textarea",{value:h,onChange:D=>f(D.target.value),placeholder:"Message bodyâ¦",rows:4,className:"w-full px-4 py-3 rounded-xl border border-slate-200 text-sm resize-none",required:!0}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2",children:"Audience"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:["all","premium","free"].map(D=>i.jsx("button",{type:"button",onClick:()=>x(D),className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer capitalize",p===D?"bg-[#00B5B5]/10 border-[#00B5B5]/30 text-[#008f8f]":"border-slate-200 text-slate-500"),children:D},D))})]}),i.jsxs("button",{type:"submit",disabled:b,className:"w-full py-3 rounded-xl bg-gradient-to-r from-[#00B5B5] to-[#0891b2] text-white font-semibold text-sm flex items-center justify-center gap-2 cursor-pointer disabled:opacity-50",children:[b?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(hj,{className:"w-4 h-4"}),b?"Sendingâ¦":"Send push broadcast"]})]}),i.jsxs("div",{className:"rounded-2xl border border-teal-100 bg-teal-50/50 p-5 text-sm text-slate-600 space-y-2",children:[i.jsx("p",{className:"font-semibold text-slate-800",children:"How it works"}),i.jsxs("ul",{className:"list-disc list-inside space-y-1 text-xs leading-relaxed",children:[i.jsx("li",{children:"All â every signed-in student"}),i.jsx("li",{children:"Premium â only paid users"}),i.jsx("li",{children:"Free â non-premium users"}),i.jsx("li",{children:"Latest sent message shows on student dashboard"})]})]})]}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsx("div",{className:"px-4 sm:px-6 py-4 border-b border-slate-50",children:i.jsx("h3",{className:"font-bold text-slate-900",children:"Sent history"})}),i.jsx(Xi,{search:j.search,onSearchChange:j.setSearch,placeholder:"Search title, message, audienceâ¦",totalCount:e.length,filteredCount:j.filtered.length,page:j.page,totalPages:j.totalPages,rangeStart:j.rangeStart,rangeEnd:j.rangeEnd,onPageChange:j.setPage}),n?i.jsx("div",{className:"flex justify-center py-12",children:i.jsx(Qe,{className:"w-7 h-7 text-[#00B5B5] animate-spin"})}):j.filtered.length===0?i.jsx("p",{className:"text-center text-sm text-slate-500 py-12",children:"No broadcasts yet."}):i.jsx("ul",{className:"divide-y divide-slate-50",children:j.pageItems.map(D=>i.jsxs("li",{className:"px-4 sm:px-6 py-4 flex gap-4",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[i.jsx("p",{className:"font-semibold text-slate-900",children:D.title}),i.jsx("span",{className:he("text-[10px] font-bold px-2 py-0.5 rounded-full capitalize",D.status==="sent"?"bg-teal-50 text-teal-700":"bg-amber-50 text-amber-700"),children:D.status}),i.jsx("span",{className:"text-[10px] font-semibold text-slate-400 capitalize",children:D.audience})]}),i.jsx("p",{className:"text-sm text-slate-500",children:D.body}),D.sentAt?i.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:new Date(D.sentAt).toLocaleStr
2325ing()}):null]}),i.jsx("button",{type:"button",onClick:()=>void E(D.id),className:"shrink-0 p-2 rounded-lg text-rose-500 hover:bg-rose-50 cursor-pointer",children:i.jsx(Hi,{className:"w-4 h-4"})})]},D.id))})]})]})}function O7(e){if(!e)return"â";try{return new Date(e).toLocaleString("en-IN",{dateStyle:"medium",timeStyle:"short"})}catch{return"â"}}function eee(){const[e,t]=w.useState([]),[n,a]=w.useState([]),[s,o]=w.useState(!0),[c,d]=w.useState(""),[h,f]=w.useState("payments"),{viewInvoice:p,downloadInvoice:x}=zy(),b=w.useMemo(()=>{const M=new Map;for(const B of n)M.set(B.id,B);return M},[n]),v=w.useCallback(M=>M.invoiceId&&b.has(M.invoiceId)?b.get(M.invoiceId):yV(M),[b]),N=w.useCallback(async()=>{o(!0),d("");try{const[M,B]=await Promise.all([gV(),bV()]);t(M),a(B)}catch(M){d(await En(M))}finally{o(!1)}},[]);w.useEffect(()=>{N()},[N]);const j=w.useMemo(()=>e.filter(M=>M.status==="paid"),[e]),T=w.useMemo(()=>j.reduce((M,B)=>M+B.amountInr,0),[j]),E=w.useMemo(()=>e.filter(M=>M.status==="failed").length,[e]),D=Ki(e,{pageSize:10,getSearchText:M=>[M.userName,M.userEmail,M.planName,M.botId,M.status,M.invoiceId??"",M.id].join(" ")}),k=Ki(n,{pageSize:10,getSearchText:M=>[M.id,M.userName,M.userEmail,M.planName,M.botId??""].join(" ")});return i.jsxs(kr,{title:"Payments & invoices",subtitle:"Razorpay sync from student checkout",children:[i.jsx(ps,{loading:s,onRefresh:()=>void N()}),c?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:c}):null,i.jsxs("div",{className:"grid sm:grid-cols-3 gap-3 mb-6",children:[i.jsx(On,{label:"Successful payments",value:j.length,icon:Jm,tone:"violet"}),i.jsx(On,{label:"Total revenue",value:es(T),icon:sF,tone:"teal"}),i.jsx(On,{label:"Failed / cancelled",value:E,icon:Jo,tone:"slate"})]}),i.jsx("div",{className:"flex gap-2 mb-4",children:["payments","invoices"].map(M=>i.jsx("button",{type:"button",onClick:()=>f(M),className:`px-4 py-2 rounded-xl text-xs font-bold cursor-pointer capitalize ${h===M?"bg-[#00B5B5]/10 text-[#008f8f] border border-[#00B5B5]/25":"bg-white border border-slate-200 text-slate-500"}`,children:M},M))}),s?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):h==="payments"?i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden",children:[i.jsx(Xi,{search:D.search,onSearchChange:D.setSearch,placeholder:"Search user, plan, bot, status, invoiceâ¦",totalCount:e.length,filteredCount:D.filtered.length,page:D.page,totalPages:D.totalPages,rangeStart:D.rangeStart,rangeEnd:D.rangeEnd,onPageChange:D.setPage}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{className:"bg-slate-50 text-xs text-slate-500 uppercase",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3 font-semibold",children:"User"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Plan"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Bot"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Amount"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Status"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Date"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Invoice"})]})}),i.jsx("tbody",{children:D.filtered.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:7,className:"px-4 py-12 text-center text-slate-400 text-xs",children:"No payments recorded yet."})}):D.pageItems.map(M=>{const B=M.status==="paid"?v(M):null;return i.jsxs("tr",{className:"border-t border-slate-50 hover:bg-slate-50/50",children:[i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("p",{className:"font-semibold text-slate-800",children:M.userName}),i.jsx("p",{className:"text-[10px] text-slate-400",children:M.userEmail})]}),i.jsx("td",{className:"px-4 py-3 text-slate-700",children:M.planName}),i.jsx("td",{className:"px-4 py-3 text-xs font-bold text-[#008F8F]",children:M.botId||"â"}),i.jsx("td",{className:"px-4 py-3 font-bold text-[#008F8F]",children:es(M.amountInr)}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full ${M.status==="paid"?"bg-emerald-50 text-emerald-700":"bg-rose-50 text-rose-600"}`,children:M.status})}),i.jsx("td",{className:"px-4 py-3 text-xs text-slate-500",children:O7(M.paidAt??M.createdAt)}),i.jsx("td",{className:"px-4 py-3",children:B?i.jsxs("div",{className:"flex flex-col gap-1 items-start",children:[i.jsx("span",{className:"font-mono text-[10px] text-slate-500",children:B.id}),i.jsxs("div",{className:"flex gap-1",children:[i.jsxs("button",{type:"button",onClick:()=>p(B),className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md border border-slate-200 text-[10px] font-bold text-slate-600 hover:bg-slate-50 cursor-pointer",children:[i.jsx(_g,{size:10}),"View"]}
2325),i.jsxs("button",{type:"button",onClick:()=>x(B),className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md border border-[#00B5B5]/25 bg-teal-50 text-[10px] font-bold text-[#008F8F] hover:bg-teal-100 cursor-pointer",children:[i.jsx(c0,{size:10}),"PDF"]})]})]}):i.jsx("span",{className:"text-slate-300",children:"â"})})]},M.id)})})]})})]}):i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden",children:[i.jsx(Xi,{search:k.search,onSearchChange:k.setSearch,placeholder:"Search invoice, customer, plan, botâ¦",totalCount:n.length,filteredCount:k.filtered.length,page:k.page,totalPages:k.totalPages,rangeStart:k.rangeStart,rangeEnd:k.rangeEnd,onPageChange:k.setPage}),i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{className:"bg-slate-50 text-xs text-slate-500 uppercase",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Invoice"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Customer"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Plan"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Bot"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Total"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Issued"}),i.jsx("th",{className:"px-4 py-3 font-semibold"})]})}),i.jsx("tbody",{children:k.filtered.length===0?i.jsx("tr",{children:i.jsx("td",{colSpan:7,className:"px-4 py-12 text-center text-slate-400 text-xs",children:"No invoices yet."})}):k.pageItems.map(M=>i.jsxs("tr",{className:"border-t border-slate-50 hover:bg-slate-50/50",children:[i.jsx("td",{className:"px-4 py-3 font-mono text-xs font-bold text-slate-800",children:M.id}),i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("p",{className:"font-semibold text-slate-800",children:M.userName}),i.jsx("p",{className:"text-[10px] text-slate-400",children:M.userEmail})]}),i.jsx("td",{className:"px-4 py-3 text-slate-700",children:M.planName}),i.jsx("td",{className:"px-4 py-3 text-xs font-bold text-[#008F8F]",children:M.botId||"â"}),i.jsx("td",{className:"px-4 py-3 font-bold text-[#008F8F]",children:es(M.totalInr)}),i.jsx("td",{className:"px-4 py-3 text-xs text-slate-500",children:O7(M.issuedAt)}),i.jsx("td",{className:"px-4 py-3",children:i.jsxs("div",{className:"flex gap-1",children:[i.jsxs("button",{type:"button",onClick:()=>p(M),className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border border-slate-200 text-[10px] font-bold text-slate-600 hover:bg-slate-50 cursor-pointer",children:[i.jsx(_g,{size:11}),"View"]}),i.jsxs("button",{type:"button",onClick:()=>x(M),className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-lg border border-[#00B5B5]/25 bg-teal-50 text-[10px] font-bold text-[#008F8F] hover:bg-teal-100 cursor-pointer",children:[i.jsx(c0,{size:11}),"Download"]})]})})]},M.id))})]})})]})]})}const tee=()=>({code:"",label:"",discountType:"percent",discountValue:10,maxUses:0,minAmountInr:0,applicableBots:[],expiresAt:""});function nee(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),[h,f]=w.useState(!1),[p,x]=w.useState(null),{bots:b}=ds(),v=b.filter(k=>k.paid).map(k=>k.id).length>0?b.filter(k=>k.paid).map(k=>k.id):cs().length?cs():[...Hl],N=w.useCallback(async()=>{a(!0),o("");try{t(await $C())}catch(k){o(await En(k))}finally{a(!1)}},[]);w.useEffect(()=>{N()},[N]);const j=Ki(e,{pageSize:10,getSearchText:k=>[k.code,k.label,k.discountType,String(k.discountValue),...k.applicableBots??[]].join(" ")}),T=async()=>{if(!(c!=null&&c.code.trim()))return;const k=!c.id;f(!0);try{c.id?await VQ(c.id,{label:c.label,discountType:c.discountType,discountValue:c.discountValue,maxUses:c.maxUses,minAmountInr:c.minAmountInr,applicableBots:c.applicableBots,active:c.active!==!1,expiresAt:c.expiresAt||null}):(await FQ({code:c.code,label:c.label,discountType:c.discountType,discountValue:c.discountValue,maxUses:c.maxUses,minAmountInr:c.minAmountInr,applicableBots:c.applicableBots,expiresAt:c.expiresAt||null}),k&&x({subjectLabel:`New coupon: ${c.code}`,templates:KZ({code:c.code,label:c.label,discountType:c.discountType,discountValue:c.discountValue})})),d(null),await N()}catch(M){alert(M instanceof Error?M.message:await En(M))}finally{f(!1)}},E=async k=>
2325{if(confirm("Delete this coupon?"))try{await qQ(k),await N()}catch(M){alert(await En(M))}},D=k=>{if(!c)return;const M=c.applicableBots;d({...c,applicableBots:M.includes(k)?M.filter(B=>B!==k):[...M,k]})};return i.jsxs(kr,{title:"Coupons & offers",subtitle:"Discount codes for checkout",children:[i.jsx(lA,{open:!!p,subjectLabel:(p==null?void 0:p.subjectLabel)??"",templates:(p==null?void 0:p.templates)??[],onClose:()=>x(null)}),i.jsx(ps,{loading:n,onRefresh:()=>void N()}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,i.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:i.jsxs("button",{type:"button",onClick:()=>d(tee()),className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-[#00B5B5] text-white text-sm font-semibold cursor-pointer hover:bg-[#00a0a0]",children:[i.jsx(qi,{className:"w-4 h-4"}),"New coupon"]})}),c?i.jsxs("div",{className:"mb-8 rounded-2xl border border-slate-100 bg-white p-5 sm:p-6 shadow-sm space-y-4",children:[i.jsx("h3",{className:"font-bold text-slate-900",children:c.id?"Edit coupon":"Create coupon"}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Code",i.jsx("input",{value:c.code,disabled:!!c.id,onChange:k=>d({...c,code:k.target.value.toUpperCase()}),placeholder:"JEE50",className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm disabled:bg-slate-50"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Label",i.jsx("input",{value:c.label,onChange:k=>d({...c,label:k.target.value}),placeholder:"JEE launch offer",className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Discount type",i.jsxs("select",{value:c.discountType,onChange:k=>d({...c,discountType:k.target.value}),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm",children:[i.jsx("option",{value:"percent",children:"Percent %"}),i.jsx("option",{value:"fixed_inr",children:"Fixed â¹"})]})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Discount value",i.jsx("input",{type:"number",min:1,value:c.discountValue,onChange:k=>d({...c,discountValue:Number(k.target.value)}),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Max uses (0 = unlimited)",i.jsx("input",{type:"number",min:0,value:c.maxUses,onChange:k=>d({...c,maxUses:Number(k.target.value)}),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600",children:["Min order â¹ (optional â 0 = no minimum)",i.jsx("input",{type:"number",min:0,value:c.minAmountInr,onChange:k=>d({...c,minAmountInr:Number(k.target.value)}),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-600 sm:col-span-2",children:["Expires (optional)",i.jsx("input",{type:"date",value:c.expiresAt?c.expiresAt.slice(0,10):"",onChange:k=>d({...c,expiresAt:k.target.value?new Date(k.target.value).toISOString():""}),className:"mt-1 w-full px-3 py-2 rounded-lg border border-slate-200 text-sm"})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-semibold text-slate-600 mb-2",children:"Applicable bots (empty = all paid tutors)"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(k=>i.jsx("button",{type:"button",onClick:()=>D(k),className:he("px-3 py-1 rounded-lg text-xs font-bold border cursor-pointer",c.applicableBots.includes(k)?"bg-teal-50 border-teal-200 text-teal-800":"bg-white border-slate-200 text-slate-500"),children:k},k))})]}),c.id?i.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[i.jsx("input",{type:"checkbox",checked:c.active!==!1,onChange:k=>d({...c,active:k.target.checked})}),"Active"]}):null,i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{type:"button",disabled:h,onClick:()=>void T(),className:"px-4 py-2 rounded-xl bg-slate-900 text-white text-sm font-semibold cursor-pointer disabled:opacity-50",children:h?"Savingâ¦":"Save"}),i.jsx("button",{type:"button",onClick:()=>d(null),className:"px-4 py-2 rounded-xl border border-slate-200 text-sm font-semibold cursor-pointer",children:"Cancel"})]})]}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsxs("div",{className:"px-4 sm:px-6 py-4 border-b border-slate-50 flex items-center gap-2",children:[i.jsx(mj,{className:"w-4 h-4 text-[#00B5B5]"}),i.jsx("h2",{className:"text-base font-bold text-slate-900",children:"Active coupons"}),i.jsxs("span",{className:"text-xs text-slate-500 ml-auto",children:[j.filtered.length," codes"]})]}),i.jsx(Xi,{search:j.search,onSearchChange:j.setSearch,placeholder:"Search code, offer, botsâ¦",totalCount:e.length,filteredCount:j.filtered.length,page:j.page,totalPages:j.totalPages,rangeStart:j.rangeStart,rangeEnd:j.rangeEnd,onPageChange:j.setPage}),i.jsxs("div",{className:"overflow-x-auto",children:[i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs text-slate-500 border-b border-slate-50 bg-slate-50/50",children:[i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Code"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Offer"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden sm:table-cell",children:"Uses"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden md:table-cell",children:"Bots"}),i.jsx("th",{className:"px-4 py-3 font-semibold hidden lg:table-cell",children:"Status"}),i.jsx("th",{className:"px-4 py-3 font-semibold text-right",children:"Actions"})]})}),i.jsx("tbody",{children:j.pageItems.map(k=>i.jsxs("tr",{className:"border-b border-slate-50 last:border-0",children:[i.jsx("td",{className:"px-4 py-3 font-mono font-bold text-slate-900",children:k.code}),i.jsxs("td",{className:"px-4 py-3 text-xs",children:[k.label,i.jsxs("span",{className:"block text-slate-500 mt-0.5",children:[k.discountType==="percent"?`${k.discountValue}% off`:`â¹${k.discountValue} off`,k.minAmountInr>0?` · min â¹${k.minAmountInr}`:""]})]}),i.jsxs("td",{className:"px-4 py-3 hidden sm:table-cell text-xs",children:[k.usedCount,k.maxUses>0?` / ${k.maxUses}`:""]}),i.jsx("td",{className:"px-4 py-3 hidden md:table-cell text-xs text-slate-600",children:k.applicableBots.length?k.applicableBots.join(", "):"All"}),i.jsx("td",{className:"px-4 py-3 hidden lg:table-cell",children:i.jsx("span",{className:he("text-[10px] font-bold px-2 py-0.5 rounded-full",k.active?"bg-emerald-50 text-emerald-700":"bg-slate-100 text-slate-500"),children:k.active?"Active":"Off"})}),i.jsx("td",{className:"px-4 py-3 text-right",children:i.jsxs("div",{className:"inline-flex gap-1",children:[i.jsx("button",{type:"button",onClick:()=>d({id:k.id,code:k.code,label:k.label,discountType:k.discountType,discountValue:k.discountValue,maxUses:k.maxUses,minAmountInr:k.minAmountInr,applicableBots:[...k.applicableBots],expiresAt:k.expiresAt??"",active:k.active}),className:"p-2 rounded-lg hover:bg-slate-50 cursor-pointer",children:i.jsx(P0,{className:"w-4 h-4 text-slate-500"})}),i.jsx("button",{type:"button",onClick:()=>void E(k.id),className:"p-2 rounded-lg hover:bg-rose-50 cursor-pointer",children:i.jsx(Hi,{className:"w-4 h-4 text-rose-500"})})]})})]},k.id))})]}),j.filtered.length===0?i.jsx("p",{className:"text-center text-sm text-slate-500 py-12",children:"No coupons yet. Create one for checkout offers."}):null]})]})]})}async function aee(e){const t=await fetch(`${window.location.origin}/api/reports/${encodeURIComponent(e)}/proof-url`,{credentials:"include",headers:I0()}),n=await t.json().catch(()=>({}));if(!t.ok)throw new Error(n.error??`Could not load proof (${t.status})`);return n.url??null}function ree(e){return{id:String(e.id??""),userId:String(e.userId??""),userEmail:String(e.userEmail??""),displayName:String(e.dis
2325playName??""),category:e.category,status:e.status??"open",title:String(e.title??""),summary:String(e.summary??""),details:e.details??{},razorpayPaymentId:e.razorpayPaymentId?String(e.razorpayPaymentId):void 0,razorpayOrderId:e.razorpayOrderId?String(e.razorpayOrderId):void 0,planName:e.planName?String(e.planName):void 0,botId:e.botId?String(e.botId):void 0,amountInr:typeof e.amountInr=="number"?e.amountInr:void 0,proofUrl:e.proofUrl?String(e.proofUrl):void 0,proofFileName:e.proofFileName?String(e.proofFileName):void 0,proofStoragePath:e.proofStoragePath?String(e.proofStoragePath):void 0,chatIssueType:e.chatIssueType?String(e.chatIssueType):void 0,sessionId:e.sessionId?String(e.sessionId):void 0,sessionTopic:e.sessionTopic?String(e.sessionTopic):void 0,createdAt:String(e.createdAt??new Date().toISOString()),adminNote:e.adminNote?String(e.adminNote):void 0}}async function see(){try{return((await Un("/api/admin/reports")).reports??[]).map(ree).sort((t,n)=>Date.parse(n.createdAt)-Date.parse(t.createdAt))}catch{return[]}}async function iee(e,t,n){const a={status:t};await Wb(`/api/admin/reports/${e}`,a)}function L7(e){return jb(e)}const lee=[{value:"open",label:"Open"},{value:"in_progress",label:"In progress"},{value:"resolved",label:"Resolved"}];function P7(e){try{return new Date(e).toLocaleString("en-IN",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})}catch{return e}}function oee(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),[h,f]=w.useState("all"),[p,x]=w.useState(!1),[b,v]=w.useState(null),[N,j]=w.useState(!1),[T,E]=w.useState(""),D=w.useCallback(async()=>{a(!0),o("");try{t(await see())}catch(_){o(await En(_))}finally{a(!1)}},[]);w.useEffect(()=>{D()},[D]),w.useEffect(()=>{if(!(c!=null&&c.proofUrl)&&!(c!=null&&c.proofStoragePath)){v(null),E("");return}let _=!1;return j(!0),E(""),v(null),(async()=>{try{const U=await aee(c.id);_||v(U)}catch(U){_||E(U instanceof Error?U.message:"Could not load proof")}finally{_||j(!1)}})(),()=>{_=!0}},[c==null?void 0:c.id,c==null?void 0:c.proofUrl,c==null?void 0:c.proofStoragePath]);const k=e.filter(_=>h==="all"?!0:_.status===h),M=Ki(k,{pageSize:10,getSearchText:_=>[_.displayName,_.userEmail,_.title,_.category,_.status,_.summary??""].join(" ")}),B=async(_,U)=>{if(c){x(!0);try{await iee(c.id,_,U),await D(),d(F=>F?{...F,status:_,adminNote:U??F.adminNote}:null)}catch(F){alert(await En(F))}finally{x(!1)}}};return i.jsxs(kr,{title:"App reports",subtitle:"User issues â payment proofs, chatbot problems, and bugs",children:[i.jsx(ps,{loading:n,onRefresh:()=>void D()}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:["all","open","in_progress","resolved"].map(_=>i.jsxs("button",{type:"button",onClick:()=>f(_),className:he("px-3 py-1.5 rounded-lg text-xs font-bold border cursor-pointer capitalize",h===_?"bg-teal-50 border-teal-200 text-[#008F8F]":"bg-white border-slate-200 text-slate-500"),children:[_==="all"?"All":_.replace("_"," "),_!=="all"?` (${e.filter(U=>U.status===_).length})`:` (${e.length})`]},_))}),s?i.jsx("p",{className:"text-sm text-rose-600 mb-4",children:s}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-slate-50 flex items-center gap-2",children:[i.jsx(Vi,{className:"w-4 h-4 text-amber-600"}),i.jsx("h2",{className:"text-sm font-bold text-slate-900",children:"Support reports"})]}),i.jsx(Xi,{search:M.search,onSearchChange:M.setSearch,placeholder:"Search user, issue, category, statusâ¦",totalCount:k.length,filteredCount:M.filtered.length,page:M.page,totalPages:M.totalPages,rangeStart:M.rangeStart,rangeEnd:M.rangeEnd,onPageChange:M.setPage}),i.jsxs("div",{className:"overflow-x-auto",children:[i.jsxs("table",{className:"w-full text-left text-sm",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs text-slate-500 border-b bg-slate-50/50",children:[i.jsx("th",{className:"px-4 py-3 font-semibold",children:"When"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"User"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Issue"}),i.jsx("th",{className:"px-4 py-3 font-semibold",children:"Status"}),i.jsx("th",{className:"px-4 py-3 font-semibold text-right",children:"View"})]})}),i.jsx("tbody",{children:M.pageItems.map(_=>i.jsxs("tr",{className:"border-b border-slate-50 last:border-0",children:[i.jsx("td",{className:"px-4 py-3 text-xs text-slate-500
2325whitespace-nowrap",children:P7(_.createdAt)}),i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("p",{className:"font-semibold text-slate-900 text-xs",children:_.displayName}),i.jsx("p",{className:"text-[10px] text-slate-500",children:_.userEmail})]}),i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("p",{className:"text-xs font-bold text-slate-800",children:_.title}),i.jsxs("p",{className:"text-[10px] text-slate-500",children:[L7(_.category),_.proofUrl?" · Proof attached":""]})]}),i.jsx("td",{className:"px-4 py-3",children:i.jsx(U7,{status:_.status})}),i.jsx("td",{className:"px-4 py-3 text-right",children:i.jsx("button",{type:"button",onClick:()=>d(_),className:"text-xs font-bold text-[#008F8F] hover:underline cursor-pointer",children:"Details"})})]},_.id))})]}),M.filtered.length===0?i.jsx("p",{className:"text-center text-sm text-slate-500 py-12",children:"No reports yet."}):null]})]}),i.jsx(bt,{children:c?i.jsxs(i.Fragment,{children:[i.jsx(ze.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-slate-900/40",onClick:()=>d(null)}),i.jsxs(ze.div,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:24},className:"fixed top-0 right-0 z-[60] h-full w-full max-w-md bg-white shadow-2xl overflow-y-auto p-5 text-left",children:[i.jsxs("div",{className:"flex justify-between items-start mb-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-slate-500",children:P7(c.createdAt)}),i.jsx("h3",{className:"text-lg font-bold text-slate-900 mt-1",children:c.title}),i.jsx(U7,{status:c.status})]}),i.jsx("button",{type:"button",onClick:()=>d(null),className:"p-2 rounded-lg hover:bg-slate-100 cursor-pointer",children:i.jsx(Ln,{size:18})})]}),i.jsxs("div",{className:"space-y-4 text-sm",children:[i.jsxs(Bu,{title:"User",children:[i.jsx("p",{children:c.displayName}),i.jsx("p",{className:"text-slate-500 text-xs",children:c.userEmail}),i.jsxs("p",{className:"text-[10px] font-mono text-slate-400",children:["UID: ",c.userId]})]}),i.jsx(Bu,{title:"Category",children:i.jsx("p",{children:L7(c.category)})}),i.jsx(Bu,{title:"Details",children:i.jsx("pre",{className:"text-xs whitespace-pre-wrap text-slate-700 bg-slate-50 p-3 rounded-xl border border-slate-100",children:c.summary||"â"})}),c.category==="payment_no_access"?i.jsxs(Bu,{title:"Payment info",children:[c.razorpayPaymentId?i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Payment ID:"})," ",i.jsx("code",{className:"text-xs",children:c.razorpayPaymentId})]}):null,c.razorpayOrderId?i.jsxs("p",{children:[i.jsx("span",{className:"text-slate-500",children:"Order ID:"})," ",i.jsx("code",{className:"text-xs",children:c.razorpayOrderId})]}):null,c.botId?i.jsxs("p",{children:["Bot: ",c.botId]}):null,c.planName?i.jsxs("p",{children:["Plan: ",c.planName]}):null,c.amountInr!=null?i.jsxs("p",{children:["Amount: â¹",c.amountInr]}):null,c.proofUrl||c.proofStoragePath?N?i.jsxs("p",{className:"text-xs text-slate-500 mt-2 flex items-center gap-1",children:[i.jsx(Qe,{size:12,className:"animate-spin"}),"Loading proof imageâ¦"]}):T?i.jsx("p",{className:"text-rose-600 text-xs mt-2",children:T}):b?i.jsxs(i.Fragment,{children:[i.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-2 text-[#008F8F] font-semibold text-xs",children:["Open full size",i.jsx(Ay,{size:12})]}),i.jsx("img",{src:b,alt:"Payment proof",className:"mt-2 rounded-xl border border-slate-200 max-h-64 object-contain w-full bg-slate-50"})]}):i.jsx("p",{className:"text-amber-700 text-xs mt-2",children:"Proof on file â refresh or re-open report"}):i.jsx("p",{className:"text-amber-700 text-xs",children:"No proof uploaded"})]}):null,c.adminNote?i.jsx(Bu,{title:"Admin note",children:i.jsx("p",{className:"text-slate-600",children:c.adminNote})}):null]}),i.jsxs("div",{className:"mt-6 pt-4 border-t border-slate-100 space-y-2",children:[i.jsx("p",{className:"text-xs font-bold text-slate-500 uppercase",children:"Update status"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:lee.map(_=>i.jsx("button",{type:"button",disabled:p||c.status===_.value,onClick:()=>void B(_.value),className:"px-3 py-1.5 rounded-lg border border-slate-200 text-xs font-semibold hover:bg-slate-50 cursor-pointer disabled:opacity-40",children:_.label},_.value))})]})]})]}):null})]})}function Bu({title:e,children:t}){return i.jsxs("div",{children:[i.jsx("p",{className:"text-[10px] font-bold uppercase text-slate-400 tracking-wider mb-1",children:e}),t]})}function U7({status:e}){return i.jsx("span",{className:he("inline-block mt-1 text-[10px] font-bold px-2 py-0.5 rounded-full",e==="open"&&"bg-amber-50 text-amber-800",e==="in_progress"&&"bg-blue-50 text-blue-800",e==="resolved"&&"bg-emerald-50 text-emerald-800"),children:e.replace("_"," ")})}async function cee(e,t){if(t.length<8)throw new Error("New password must be at least 8 characters.");const n=await fetch("/api/admin/profile/change-password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:e,newPassword:t})}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:`Request failed (${n.status})`)}function uee(){const{email:e,refreshSession:t}=Mc(),[n,a]=w.useState(null),[s,o]=w.useState(!0),[c,d]=w.useState(""),[h,f]=w.useState(""),[p,x]=w.useState(""),[b,v]=w.useState(!1),[N,j]=w.useState(""),[T,E]=w.useState(""),[D,k]=w.useState(""),[M,B]=w.useState(!1),[_,U]=w.useState(""),[F,W]=w.useState(""),[ae,le]=w.useState(!1),re=w.useCallback(async()=>{o(!0),f("");try{const{profile:V}=await xZ();a(V),x(V.displayName??"")}catch(V){f(V instanceof Error?V.message:"Failed to load profile")}finally{o(!1)}},[]);w.useEffect(()=>{re()},[re]);const xe=async V=>{V.preventDefault(),v(!0),d(""),f("");try{const{profile:ne}
2325=await gZ({displayName:p.trim()||void 0});a(ne),d("Display name updated.")}catch(ne){f(ne instanceof Error?ne.message:"Update failed")}finally{v(!1)}},te=async V=>{if(V.preventDefault(),T!==D){f("New passwords do not match.");return}B(!0),d(""),f("");try{await cee(N,T),j(""),E(""),k(""),d("Password updated in Firebase. Use the new password next time you sign in.")}catch(ne){f(ne instanceof Error?ne.message:"Password update failed")}finally{B(!1)}},H=async V=>{V.preventDefault(),le(!0),d(""),f("");try{const ne=await bZ(_.trim(),F);a(ne.profile),U(""),W(""),d(ne.notice??"Email updated successfully."),await t()}catch(ne){f(ne instanceof Error?ne.message:"Email update failed")}finally{le(!1)}};return i.jsx(kr,{title:"Admin profile",subtitle:"Account & security",children:s?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsxs("div",{className:"space-y-6",children:[c?i.jsxs("div",{className:"flex items-start gap-2 p-4 rounded-xl bg-teal-50 border border-teal-100 text-sm text-teal-800",children:[i.jsx(o0,{className:"w-4 h-4 shrink-0 mt-0.5"}),c]}):null,h?i.jsxs("div",{className:"flex items-start gap-2 p-4 rounded-xl bg-rose-50 border border-rose-100 text-sm text-rose-700",children:[i.jsx(ij,{className:"w-4 h-4 shrink-0 mt-0.5"}),h]}):null,i.jsx(zh,{title:"Account overview",icon:Ul,children:i.jsxs("dl",{className:"grid sm:grid-cols-2 gap-4 text-sm",children:[i.jsx(Ru,{label:"Signed in as",value:e??"â"}),i.jsx(Ru,{label:"Firebase UID",value:(n==null?void 0:n.uid)??"â",mono:!0}),i.jsx(Ru,{label:"Role",value:(n==null?void 0:n.role)??"superadmin"}),i.jsx(Ru,{label:"Email verified",value:n!=null&&n.emailVerified?"Yes":"No"}),i.jsx(Ru,{label:"Last sign-in",value:n!=null&&n.lastSignIn?new Date(n.lastSignIn).toLocaleString("en-IN"):"â"})]})}),i.jsx(zh,{title:"Display name",icon:h0,children:i.jsxs("form",{onSubmit:V=>void xe(V),className:"space-y-4",children:[i.jsx("input",{type:"text",value:p,onChange:V=>x(V.target.value),placeholder:"Operator name",maxLength:80,className:oA}),i.jsx($1,{loading:b,label:"Save name"})]})}),i.jsx(zh,{title:"Change password",icon:Or,children:i.jsxs("form",{onSubmit:V=>void te(V),className:"space-y-4",children:[i.jsx(Ou,{label:"Current password",type:"password",value:N,onChange:j}),i.jsx(Ou,{label:"New password",type:"password",value:T,onChange:E}),i.jsx(Ou,{label:"Confirm new password",type:"password",value:D,onChange:k}),i.jsx("p",{className:"text-xs text-slate-500",children:"Minimum 8 characters. Saved in Firebase Auth only."}),i.jsx($1,{loading:M,label:"Update password"})]})}),i.jsx(zh,{title:"Change admin email",icon:Zm,children:i.jsxs("form",{onSubmit:V=>void H(V),className:"space-y-4",children:[i.jsxs("p",{className:"text-xs text-slate-500 leading-relaxed",children:["Current: ",i.jsx("span",{className:"font-medium text-slate-700",children:n==null?void 0:n.email}),". No .env edit needed â we update Firebase and your admin record automatically."]}),i.jsx(Ou,{label:"New email",type:"email",value:_,onChange:U}),i.jsx(Ou,{label:"Current password (confirm)",type:"password",value:F,onChange:W}),i.jsx($1,{loading:ae,label:"Change email"})]})})]})})}function zh({title:e,icon:t,children:n}){return i.jsxs("section",{className:"rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-50 flex items-center gap-2",children:[i.jsx(t,{className:"w-4 h-4 text-[#00B5B5]"}),i.jsx("h2",{className:"text-base font-bold text-slate-900",children:e})]}),i.jsx("div",{className:"p-5",children:n})]})}function Ru({label:e,value:t,mono:n}){return i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs font-semibold text-slate-400 mb-0.5",children:e}),i.jsx("dd",{className:`text-slate-800 font-medium truncate ${n?"font-mono text-xs":""}`,children:t})]})}function Ou({label:e,type:t,value:n,onChange:a}){return i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("label",{className:"text-xs font-semibold text-slate-600",children:e}),i.jsx("input",{type:t,value:n,onChange:s=>a(s.target.value),className:oA,required:!0})]})}function $1({loading:e,label:t}){return i.jsxs("button",{type:"submit",disabled:e,className:`inline-flex items-center justify-center gap-2 px-5 py-2.5 rounded-xl bg-gradient-to-r from-[#00B5B5] to-[#0891b2] text-white text-sm font-semibold cursor-pointer transition-all ${e?"opacity-50":""}`,children:[e?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):null,t]}
2325)}const oA="w-full px-4 py-3 rounded-xl border border-slate-200 bg-slate-50/80 text-sm font-medium text-slate-800 outline-none focus:border-[#00B5B5] focus:ring-2 focus:ring-[#00B5B5]/15";function dee({title:e,subtitle:t,headerAction:n,search:a,onSearchChange:s,searchPlaceholder:o,totalCount:c,filteredCount:d,page:h,totalPages:f,rangeStart:p,rangeEnd:x,onPageChange:b,emptyMessage:v,children:N}){return i.jsxs("section",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-50 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-base font-bold text-slate-900",children:e}),t?i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:t}):null]}),n]}),i.jsx(Xi,{search:a,onSearchChange:s,placeholder:o,totalCount:c,filteredCount:d,page:h,totalPages:f,rangeStart:p,rangeEnd:x,onPageChange:b}),d===0?i.jsx("p",{className:"text-sm text-slate-500 py-10 text-center",children:v}):N]})}function hee(e){return[e.displayName,e.email,e.uid,e.deactivationReason??""].join(" ")}function mee(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(null),[h,f]=w.useState(!1),p=Ki(e,{pageSize:10,getSearchText:hee}),x=w.useCallback(async()=>{a(!0),o("");try{const N=await yZ("all");t(N.inactiveUsers)}catch(N){o(N instanceof Error?N.message:"Failed to load")}finally{a(!1)}},[]);w.useEffect(()=>{x()},[x]);const b=async N=>{d(N);try{await vZ(N),await x()}catch(j){o(j instanceof Error?j.message:"Reactivate failed")}finally{d(null)}},v=async()=>{if(e.length&&confirm(`Reactivate all ${e.length} inactive accounts?`)){f(!0),o("");try{const N=await wZ();N.failed.length&&o(`${N.reactivated} reactivated, ${N.failed.length} failed.`),await x()}catch(N){o(N instanceof Error?N.message:"Bulk reactivate failed")}finally{f(!1)}}};return i.jsxs(kr,{title:"Deactivated accounts",subtitle:"View self-deactivated users · reactivate scholars",children:[i.jsx(ps,{loading:n,onRefresh:()=>void x()}),s?i.jsx("p",{className:"mb-4 text-sm text-rose-600",children:s}):null,n?i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):i.jsx("div",{className:"space-y-8",children:i.jsx(dee,{title:"Inactive accounts",subtitle:"These users deactivated their own accounts. Reactivate to restore sign-in. Profile, onboarding, and history stay as-is.",headerAction:e.length>0?i.jsxs("button",{type:"button",disabled:h,onClick:()=>void v(),className:"inline-flex items-center gap-1 px-4 py-2 rounded-lg bg-[#00B5B5]/10 border border-[#00B5B5]/30 text-[#008F8F] text-xs font-bold hover:bg-teal-50 cursor-pointer disabled:opacity-50",children:[h?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):i.jsx(d0,{className:"w-3.5 h-3.5"}),"Reactivate all (",e.length,")"]}):null,search:p.search,onSearchChange:p.setSearch,searchPlaceholder:"Search name, email, uidâ¦",totalCount:e.length,filteredCount:p.filtered.length,page:p.page,totalPages:p.totalPages,rangeStart:p.rangeStart,rangeEnd:p.rangeEnd,onPageChange:p.setPage,emptyMessage:"No deactivated users.",children:i.jsx("div",{className:"divide-y divide-slate-50",children:p.pageItems.map(N=>i.jsxs("div",{className:"p-5 flex flex-col sm:flex-row sm:items-start justify-between gap-4",children:[i.jsxs("div",{className:"text-left flex-1 min-w-0",children:[i.jsx("p",{className:"font-semibold text-slate-900",children:N.displayName}),i.jsx("p",{className:"text-xs text-slate-500",children:N.email}),i.jsx("p",{className:"text-[10px] text-slate-400 font-mono mt-0.5 truncate",children:N.uid}),N.deactivatedAt?i.jsxs("p",{className:"text-[10px] text-slate-400 mt-1.5",children:["Deactivated ",new Date(N.deactivatedAt).toLocaleString("en-IN")]}):i.jsx("p",{className:"text-[10px] text-amber-600 mt-1.5",children:"Imported as inactive (legacy)"}),N.deactivationReason?i.jsxs("div",{className:"mt-3 bg-slate-50 border border-slate-200 rounded-xl p-3 max-w-lg",children:[i.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider mb-1",children:"Reason given by user"}),i.jsx("p",{className:"text-xs text-slate-800 leading-relaxed",children:N.deactivationReason})]}):i.jsx("p",{className:"text-[10px] text-slate-400 italic mt-2",children:"No reason provided"})]}),i.jsxs("button",{type:"button",disabled:c===N.uid,onClick:()=>void b(N.uid),className:"inline-flex items-center gap-1 px-4 py-2 rounded-lg bg-[#00B5B5]/10 border border-[#00B5B5]/30 text-[#008F8F] text-xs font-bold hover:bg-teal-50 cursor-pointer disabled:opacity-50 shrink-0 self-start sm:self-ce
2325nter",children:[c===N.uid?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):i.jsx(d0,{className:"w-3.5 h-3.5"}),"Reactivate"]})]},N.uid))})})})]})}const F7={user_registered:"New signup",payment_received:"Payment",admin_grant_issued:"Grant access",app_report_received:"App report",account_deactivation_requested:"Deactivation request",account_deactivation_approved:"Deactivated",account_deactivated:"Self-deactivated",account_reactivated:"Reactivated",account_auto_reactivated:"Signed in again"};function fee(e){switch(e){case"user_registered":return rV;case"payment_received":case"admin_grant_issued":return Jm;case"app_report_received":return Vi;case"account_deactivation_requested":case"account_deactivation_approved":case"account_deactivated":return vm;case"account_reactivated":case"account_auto_reactivated":return d0;default:return os}}function pee(e){return e==="account_deactivation_requested"||e==="account_deactivation_approved"||e==="account_reactivated"||e==="account_auto_reactivated"?{to:"/admin/deactivations",label:"Open deactivations"}:e==="app_report_received"?{to:"/admin/reports",label:"Open reports"}:e==="user_registered"?{to:"/admin/users",label:"View users"}:e==="payment_received"?{to:"/admin/payments",label:"View payments"}:null}function xee(e){try{return new Date(e).toLocaleString("en-IN",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return""}}function gee(){const{items:e,loading:t,unreadCount:n,markRead:a,markAllRead:s,isRead:o}=eA(!0),[c,d]=w.useState(!1),[h,f]=w.useState("all");w.useEffect(()=>{const b=()=>d(YV()==="admin");b();const v=setInterval(b,1500);return()=>clearInterval(v)},[]);const p=w.useMemo(()=>h==="unread"?e.filter(b=>!b.read):e,[e,h]),x=Ki(p,{pageSize:12,getSearchText:b=>[b.title,b.body,b.type,F7[b.type]??""].join(" ")});return i.jsxs(kr,{title:"Activity feed",subtitle:"Live website alerts â admin only",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-6",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("span",{className:he("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[10px] font-bold border",c?"bg-emerald-50 border-emerald-200 text-emerald-800":"bg-slate-50 border-slate-200 text-slate-500"),children:[i.jsx(uj,{className:he("w-3 h-3",c&&"text-emerald-600")}),c?"Live via WebSocket":"Connectingâ¦"]}),n>0?i.jsxs("span",{className:"text-xs font-semibold text-rose-600",children:[n," unread"]}):i.jsx("span",{className:"text-xs text-slate-500",children:"All caught up"})]}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.jsx("button",{type:"button",onClick:()=>f("all"),className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer",h==="all"?"bg-teal-50 border-teal-200 text-[#008F8F]":"border-slate-200 text-slate-500"),children:"All"}),i.jsx("button",{type:"button",onClick:()=>f("unread"),className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer",h==="unread"?"bg-teal-50 border-teal-200 text-[#008F8F]":"border-slate-200 text-slate-500"),children:"Unread"}),n>0?i.jsxs("button",{type:"button",onClick:()=>void s(),className:"inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-semibold border border-slate-200 bg-white hover:bg-slate-50 cursor-pointer",children:[i.jsx(rj,{className:"w-3.5 h-3.5"}),"Mark all read"]}):null]})]}),i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-50 bg-gradient-to-r from-teal-50/50 to-white",children:[i.jsx("h2",{className:"text-base font-bold text-slate-900",children:"Website notifications"}),i.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Signups, payments, reports, and deactivation requests appear here in real time. Student broadcast pushes are managed separately under Broadcasts."})]}),i.jsx(Xi,{search:x.search,onSearchChange:x.setSearch,placeholder:"Search activity title, body, typeâ¦",totalCount:p.length,filteredCount:x.filtered.length,page:x.page,totalPages:x.totalPages,rangeStart:x.rangeStart,rangeEnd:x.rangeEnd,onPageChange:x.setPage}),t?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Qe,{className:"w-8 h-8 text-[#00B5B5] animate-spin"})}):x.filtered.length===0?i.jsx("p",{className:"text-center text-sm text-slate-500 py-16 px-4",children:h==="unread"?"No unread alerts.":"No activity yet. Events from the platform will show up here."}):i.jsx("ul",{className:"divide-y divide-slate-50",children:x.pageItems.map(b=>{const v=fee(b.type),N=pee(b.type);return i.jsx("li",{className:he("px-5 py-4 text-left transition-colors",!o(b.id)&&"bg-teal-50/30"),children:i.jsxs("div",{className:"flex gap-3",children:[i.jsx("div",{className:"w-9 h-9 rounded-xl bg-slate-50 border border-slate-100 flex items-center justify-center shrink-0",children:i.jsx(v,{className:"w-4 h-4 text-[#00B5B5]"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-0.5",children:[i.jsx("p",{className:"text-sm font-bold text-slate-900",children:b.title}),i.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-md bg-slate-100 text-slate-600",children:F7[b.type]??b.type}),o(b.id)?null:i.jsx("span",{className:"w-2 h-2 rounded-full bg-[#00B5B5]"})]}),i.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:b.body}),i.jsx("p",{className:"text-[10px] text-slate-400 mt-2",children:xee(b.sentAt)}),i.jsxs("div",{className:"flex flex-wrap gap-2 mt-3",children:[o(b.id)?null:i.jsx("button",{type:"button",onClick:()=>void a(b.id),className:"text-xs font-semibold text-[#008F8F] hover:underline cursor-pointer",children:"Mark as read"}),N?i.jsxs(Ma,{to:N.to,className:"text-xs font-semibold text-slate-600 hover:text-[#008F8F]",children:[N.label," â"]}):null]})]})]})},b.id)})})]})]})}function bee(){return{id:"",name:"",shortLabel:"",description:"",onboardingEnabled:!0,defaultBotId:"",topicPlaceholder:"",status:"draft",createDefaultPlan:!0,bot:{id:"",displayName:"",subtitle:"",tagline:"",description:"",icon:"ð",color:"from-teal-500 to-cyan-600",isPaid:!0,personaPrompt:"",examBehavior:"",domainKeywordPattern:"",starterChips:[]},plan:{priceMonthly:499,priceQuarterly:1299,badge:"New",ctaText:"Unlock",features:["","","",""]}}}function yee(e,t){var n;
2325return{id:e.id,name:e.name,shortLabel:e.shortLabel,description:e.description,onboardingEnabled:e.onboardingEnabled,defaultBotId:e.defaultBotId||(t==null?void 0:t.id)||e.id,topicPlaceholder:e.topicPlaceholder,status:e.status,createDefaultPlan:!0,bot:{id:(t==null?void 0:t.id)||e.defaultBotId||e.id,displayName:(t==null?void 0:t.displayName)||`${e.id} Socratic Focus`,subtitle:(t==null?void 0:t.subtitle)||e.shortLabel,tagline:(t==null?void 0:t.tagline)||(t==null?void 0:t.subtitle)||e.shortLabel,description:(t==null?void 0:t.description)||e.description,icon:(t==null?void 0:t.icon)||"ð",color:(t==null?void 0:t.color)||"from-teal-500 to-cyan-600",isPaid:(t==null?void 0:t.isPaid)!==!1,personaPrompt:(t==null?void 0:t.personaPrompt)||"",examBehavior:(t==null?void 0:t.examBehavior)||"",domainKeywordPattern:(t==null?void 0:t.domainKeywordPattern)||"",starterChips:(n=t==null?void 0:t.starterChips)!=null&&n.length?t.starterChips:[]},plan:{priceMonthly:499,priceQuarterly:1299,badge:"New",ctaText:`Unlock ${e.id}`,features:[`${e.id}-focused Socratic guide`,"Practice & revision coaching","Exam strategy support",`Unlimited ${e.id} threads`]}}}function vee(){const[e,t]=w.useState([]),[n,a]=w.useState([]),[s,o]=w.useState(!0),[c,d]=w.useState(""),[h,f]=w.useState("Add CLAT exam â Law entrance with English, Legal Reasoning, Logical Reasoning & GK"),[p,x]=w.useState(!1),[b,v]=w.useState(!1),[N,j]=w.useState(null),T=w.useMemo(()=>{const B=new Map;for(const _ of n)B.set(_.id,_);return B},[n]),E=w.useCallback(async()=>{o(!0),d("");try{const B=await Un("/api/admin/exams");t(B.exams??[]),a(B.bots??[])}catch(B){d(await En(B))}finally{o(!1)}},[]);w.useEffect(()=>{E()},[E]);const D=async()=>{if(h.trim()){x(!0),d("");try{const _=(await kn("/api/admin/exams/generate",{prompt:h.trim()})).draft??{},U=_.bot&&typeof _.bot=="object"?_.bot:{},F=_.plan&&typeof _.plan=="object"?_.plan:{},W=String(_.id||"").toUpperCase();j({id:W,name:String(_.name||W),shortLabel:String(_.shortLabel||W),description:String(_.description||""),onboardingEnabled:_.onboardingEnabled!==!1,defaultBotId:String(U.id||W).toUpperCase(),topicPlaceholder:String(_.topicPlaceholder||""),status:"draft",createDefaultPlan:!0,bot:{id:String(U.id||W).toUpperCase(),displayName:String(U.displayName||`${W} Socratic Focus`),subtitle:String(U.subtitle||W),tagline:String(U.tagline||U.subtitle||W),description:String(U.description||""),icon:String(U.icon||"ð"),color:String(U.color||"from-teal-500 to-cyan-600"),isPaid:U.isPaid!==!1,personaPrompt:String(U.personaPrompt||""),examBehavior:String(U.examBehavior||""),domainKeywordPattern:String(U.domainKeywordPattern||""),starterChips:Array.isArray(U.starterChips)?U.starterChips.map(String):[]},plan:{priceMonthly:Number(F.priceMonthly??499),priceQuarterly:Number(F.priceQuarterly??1299),badge:String(F.badge||"New"),ctaText:String(F.ctaText||`Unlock ${W}`),features:Array.isArray(F.features)?F.features.map(String):["","","",""]}})}catch(B){d(await En(B))}finally{x(!1)}}},k=async B=>{if(N!=null&&N.name.trim()){v(!0),d("");try{const _={...N,id:N.id||N.name,status:B?"published":N.status,bot:{...N.bot,id:N.bot.id||N.id,status:B?"published":N.status,starterChips:N.bot.starterChips.filter(Boolean)},plan:{...N.plan,features:N.plan.features.filter(Boolean)}},F=(e.some(W=>W.id===_.id)?"put":"post")==="put"?await MD(`/api/admin/exams/${_.id}`,_):await kn("/api/admin/exams",_);B&&F.exam.status!=="published"&&await kn(`/api/admin/exams/${F.exam.id}/publish`,{createDefaultPlan:!0}),Fg(),j(null),await E()}catch(_){d(await En(_))}finally{v(!1)}}},M=async B=>{v(!0);try{B.status==="published"?await kn(`/api/admin/exams/${B.id}/unpublish`,{}):await kn(`/api/admin/exams/${B.id}/publish`,{createDefaultPlan:!0}),Fg(),await E()}catch(_){alert(await En(_))}finally{v(!1)}};return i.jsxs(kr,{title:"AI Exam Creator",subtitle:"Generate an exam pack and publish it app-wide (onboarding, bots, plans, AI persona).",children:[i.jsx(ps,{onRefresh:()=>void E(),loading:s}),c?i.jsx("div",{className:"mb-4 rounded-xl border border-rose-200 bg-rose-50 px-4 py-3 text-sm text-rose-700",children:c}):null,i.jsxs("section",{className:"mb-6 rounded-2xl border border-teal-100 bg-gradient-to-br from-teal-50/80 to-white p-5 shadow-sm",children:[i.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#00B5B5]/15 flex items-center justify-center",children:i.jsx(Tn,{className:"w-5 h-5 text-[#00B5B5]"})}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-sm font-semibold text-slate-800",children:"Create with AI"}),i.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Describe the exam (e.g. âAdd CLATâ) â we draft the bot persona, keywords, and plan."})]})]}),i.jsx("textarea",{value:h,onChange:B=>f(B.target.value),rows:3,className:"w-full rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm text-slate-800 focus:outline-none focus:ring-2 focus:ring-[#00B5B5]/30",placeholder:"e.g. Add CLAT â Law entrance, English / Legal / Logical / GK"}),i.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[i.jsxs("button",{type:"button",disabled:p||!h.trim(),onClick:()=>void D(),className:"inline-flex items-center gap-2 rounded-xl bg-[#00B5B5] px-4 py-2.5 text-sm font-semibold text-white hover:bg-[#009a9a] disabled:opacity-60 cursor-pointer",children:[p?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(Tn,{className:"w-4 h-4"}),"Generate draft"]}),i.jsxs("button",{type:"button",onClick:()=>j(bee()),className:"inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-sm font-semibold text-slate-700 hover:bg-slate-50 cursor-pointer",children:[i.jsx(qi,{className:"w-4 h-4"}),"Blank exam"]})]})]}),i.jsxs("section",{className:"rounded-2xl border border-slate-100 bg-white shadow-sm overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-slate-50 flex items-center gap-2",children:[i.jsx(O0,{className:"w-4 h-4 text-slate-400"}),i.jsx("h2",{className:"text-sm font-semibold text-slate-800",children:"Exam catalog"}),i.jsxs("span",{className:"text-xs text-slate-400 ml-auto",children:[e.length," exams"]})]}),s?i.jsx("div",{className:"flex items-center justify-center py-16 text-slate-400",children:i.jsx(Qe,{className:"w-6 h-6 animate-spin"})}):i.jsx("ul",{className:"divide-y divide-slate-50",children:e.map(B=>{const _=B.defaultBotId?T.get(B.defaultBotId):null;return i.jsxs("li",{className:"px-5 py-4 flex flex-col sm:flex-row sm:items-center gap-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[i.jsx("span",{className:"text-lg",children:(_==null?void 0:_.icon)||"ð"}),i.jsx("p",{className:"font-semibold text-slate-800",children:B.name}),i.jsx("span",{className:he("text-[10px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-full",B.status==="published"?"bg-emerald-50 text-emerald-700":"bg-amber-50 text-amber-700"),children:B.status}),B.onboardingEnabled?null:i.jsx("span",{className:"text-[10px] font-semibold text-slate-400",children:"hidden from onboarding"})]}),i.jsxs("p",{className:"text-xs text-slate-500 mt-1 truncate",children:[B.id,_?` · bot ${_.id}`:"",B.description?` · ${B.description}`:""]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsxs("button",{type:"button",onClick:()=>
2325j(yee(B,_??null)),className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 px-3 py-2 text-xs font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:[i.jsx(P0,{className:"w-3.5 h-3.5"}),"Edit"]}),i.jsx("button",{type:"button",disabled:b,onClick:()=>void M(B),className:he("inline-flex items-center gap-1.5 rounded-lg px-3 py-2 text-xs font-semibold cursor-pointer",B.status==="published"?"border border-amber-200 text-amber-700 hover:bg-amber-50":"bg-[#00B5B5] text-white hover:bg-[#009a9a]"),children:B.status==="published"?i.jsxs(i.Fragment,{children:[i.jsx(oU,{className:"w-3.5 h-3.5"}),"Unpublish"]}):i.jsxs(i.Fragment,{children:[i.jsx(o0,{className:"w-3.5 h-3.5"}),"Publish"]})})]})]},B.id)})})]}),N?i.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/40 p-0 sm:p-6",children:i.jsxs("div",{className:"w-full max-w-2xl max-h-[92dvh] overflow-y-auto rounded-t-2xl sm:rounded-2xl bg-white shadow-xl",children:[i.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between border-b border-slate-100 bg-white px-5 py-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-semibold text-slate-800",children:N.id?`Edit ${N.id}`:"New exam pack"}),i.jsx("p",{className:"text-xs text-slate-500",children:"Review AI draft, then save or publish"})]}),i.jsx("button",{type:"button",onClick:()=>j(null),className:"text-sm font-semibold text-slate-500 hover:text-slate-800 cursor-pointer",children:"Close"})]}),i.jsxs("div",{className:"p-5 space-y-4",children:[i.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Exam ID (slug)",i.jsx("input",{value:N.id,onChange:B=>j({...N,id:B.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,""),defaultBotId:B.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,""),bot:{...N.bot,id:B.target.value.toUpperCase().replace(/[^A-Z0-9_]/g,"")}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Name",i.jsx("input",{value:N.name,onChange:B=>j({...N,name:B.target.value}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm"})]})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Description",i.jsx("textarea",{value:N.description,onChange:B=>j({...N,description:B.target.value}),rows:2,className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm"})]}),i.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:N.onboardingEnabled,onChange:B=>j({...N,onboardingEnabled:B.target.checked})}),"Show in onboarding"]}),i.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/80 p-4 space-y-3",children:[i.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-400",children:"Bot / AI persona"}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Display name",i.jsx("input",{value:N.bot.displayName,onChange:B=>j({...N,bot:{...N.bot,displayName:B.target.value}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Icon",i.jsx("input",{value:N.bot.icon,onChange:B=>j({...N,bot:{...N.bot,icon:B.target.value}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Persona prompt",i.jsx("textarea",{value:N.bot.personaPrompt,onChange:B=>j({...N,bot:{...N.bot,personaPrompt:B.target.value}}),rows:3,className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Exam behavior",i.jsx("textarea",{value:N.bot.examBehavior,onChange:B=>
2325j({...N,bot:{...N.bot,examBehavior:B.target.value}}),rows:2,className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Domain keyword pattern (RegExp)",i.jsx("input",{value:N.bot.domainKeywordPattern,onChange:B=>j({...N,bot:{...N.bot,domainKeywordPattern:B.target.value}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white font-mono text-xs"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Starter chips (comma-separated)",i.jsx("input",{value:N.bot.starterChips.join(", "),onChange:B=>j({...N,bot:{...N.bot,starterChips:B.target.value.split(",").map(_=>_.trim()).filter(Boolean)}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]})]}),i.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50/80 p-4 space-y-3",children:[i.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-400",children:"Default plan"}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Monthly â¹",i.jsx("input",{type:"number",value:N.plan.priceMonthly,onChange:B=>j({...N,plan:{...N.plan,priceMonthly:Number(B.target.value)||0}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]}),i.jsxs("label",{className:"block text-xs font-semibold text-slate-500",children:["Quarterly â¹",i.jsx("input",{type:"number",value:N.plan.priceQuarterly,onChange:B=>j({...N,plan:{...N.plan,priceQuarterly:Number(B.target.value)||0}}),className:"mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm bg-white"})]})]}),i.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:N.createDefaultPlan,onChange:B=>j({...N,createDefaultPlan:B.target.checked})}),"Auto-create plan row if missing"]})]})]}),i.jsxs("div",{className:"sticky bottom-0 flex flex-wrap gap-2 border-t border-slate-100 bg-white px-5 py-4",children:[i.jsxs("button",{type:"button",disabled:b,onClick:()=>void k(!1),className:"inline-flex items-center gap-2 rounded-xl border border-slate-200 px-4 py-2.5 text-sm font-semibold text-slate-700 hover:bg-slate-50 disabled:opacity-60 cursor-pointer",children:[b?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):null,"Save draft"]}),i.jsxs("button",{type:"button",disabled:b,onClick:()=>void k(!0),className:"inline-flex items-center gap-2 rounded-xl bg-[#00B5B5] px-4 py-2.5 text-sm font-semibold text-white hover:bg-[#009a9a] disabled:opacity-60 cursor-pointer",children:[b?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(o0,{className:"w-4 h-4"}),"Publish app-wide"]})]})]})}):null]})}function cA(){return i.jsx("div",{className:"min-h-dvh flex items-center justify-center bg-[#FCFDFE]",children:i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-[#00B5B5] border-t-transparent animate-spin"})})}function fr({children:e}){const{loading:t,authenticated:n}=Mc();return t?i.jsx(cA,{}):n?i.jsx(i.Fragment,{children:e}):i.jsx(Gt,{to:"/admin/login",replace:!0})}function wee({children:e}){const{loading:t,authenticated:n}=Mc();return t?i.jsx(cA,{}):n?i.jsx(Gt,{to:"/admin/dashboard",replace:!0}):i.jsx(i.Fragment,{children:e})}function See(){return i.jsxs(Fm,{children:[i.jsx(ft,{path:"/",element:i.jsx(Gt,{to:"/admin/login",replace:!0})}),i.jsx(ft,{path:"/login",element:i.jsx(wee,{children:i.jsx(jZ,{})})}),i.jsx(ft,{path:"/dashboard",element:i.jsx(fr,{children:i.jsx(VZ,{})})}),i.jsx(ft,{path:"/users",element:i.jsx(fr,{children:i.jsx(GZ,{})})}),i.jsx(ft,{path:"/paid-users",element:i.jsx(fr,{children:i.jsx(YZ,{})})}),i.jsx(ft,{path:"/plans",element:i.jsx(fr,{children:i.jsx(JZ,{})})}),i.jsx(ft,{path:"/exams",element:i.jsx(fr,{children:i.jsx(vee,{})})}),i.jsx(ft,{path:"/coupons",element:i.jsx(fr,{children:i.jsx(nee,{})})}),i.jsx(ft,{path:"/payments",element:i.jsx(fr,{children:i.jsx(eee,{})})}),i.jsx(ft,{path:"/activity",element:i.jsx(fr,{children:i.jsx(gee,{})})}),i.jsx(ft,{path:"/notifications",element:i.jsx(fr,{children:i.jsx(ZZ,{})})}),i.jsx(ft,{path:"/reports",element:i.jsx(fr,{children:i.jsx(oee,{})})}),i.jsx(ft,{path:"/profile",element:i.jsx(fr,{children:i.jsx(uee,{})})}),i.jsx(ft,{path:"/deactivations",element:i.jsx(fr,{children:i.jsx(mee,{})})}),i.jsx(ft,{path:"*",element:i.jsx(Gt,{to:"/admin/dashboard",replace:!0})})]})}function Nee(){return i.jsx(NZ,{children:i.jsx(See,{})})}async function ta(e,t){const n=await fetch(e,{...t,credentials:"include",headers:{"Content-Type":"application/json",...(t==null?void 0:t.headers)??{}}}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error(typeof a.error=="string"?a.error:`Request failed (${n.status})`);return a}function jee(){return ta("/api/superadmin/me")}function kee(e,t){return ta("/api/superadmin/login",{method:"POST",body:JSON.stringify({email:e,password:t})})}function Cee(){return ta("/api/superadmin/logout",{method:"POST"})}function Aee(){return ta("/api/superadmin/stats")}function y2(){return ta("/api/superadmin/packages")}function Eee(e){return ta("/api/superadmin/packages",{method:"POST",body:JSON.stringify(e)})}function Tee(e,t){return ta(`/api/superadmin/packages/${e}`,{method:"PATCH",body:JSON.stringify(t)})}function Mee(e){return ta(`/api/superadmin/packages/${e}`,{method:"DELETE"})}function Iee(){return ta("/api/superadmin/tenants")}function zee(e){return ta(`/api/superadmin/tenants/${e}`)}function _ee(e){return ta("/api/superadmin/tenants",{method:"POST",body:JSON.stringify(e)})}function Dee(e,t){return ta(`/api/superadmin/tenants/${e}`,{method:"PATCH",body:JSON.stringify(t)})}function Bee(e){return ta(`/api/superadmin/tenants/${e}`,{method:"DELETE"})}
2325function Ree(e,t=!1){return ta(`/api/superadmin/tenants/${e}/verify-domain`,{method:"POST",body:JSON.stringify({force:t})})}function Oee(e){return ta(`/api/superadmin/tenants/${e}/provision-dns`,{method:"POST",body:JSON.stringify({})})}function Lee(e,t,n="logo"){return ta(`/api/superadmin/tenants/${e}/logo`,{method:"POST",body:JSON.stringify({dataUrl:t,kind:n})})}function Pee(e){return ta(`/api/superadmin/tenants/${e}/clone-plans`,{method:"POST",body:JSON.stringify({})})}const uA=w.createContext(null);function Uee({children:e}){const[t,n]=w.useState(null),[a,s]=w.useState(!0),[o,c]=w.useState(!1),d=w.useCallback(async()=>{const p=await jee();p.authenticated&&p.email?(c(!0),n(p.email)):(c(!1),n(null))},[]);w.useEffect(()=>{let p=!1;return(async()=>{try{await d()}catch{p||(c(!1),n(null))}finally{p||s(!1)}})(),()=>{p=!0}},[d]);const h=w.useCallback(async(p,x)=>{await kee(p.trim().toLowerCase(),x),c(!0),n(p.trim().toLowerCase())},[]),f=w.useCallback(async()=>{try{await Cee()}catch{}c(!1),n(null)},[]);return i.jsx(uA.Provider,{value:{email:t,loading:a,authenticated:o,login:h,logout:f,refreshSession:d},children:e})}function vf(){const e=w.useContext(uA);if(!e)throw new Error("useSuperAdminAuth must be used within SuperAdminAuthProvider");return e}function Fee(){const e=ea(),{login:t}=vf(),[n,a]=w.useState(""),[s,o]=w.useState(""),[c,d]=w.useState(""),[h,f]=w.useState(!1),p=async x=>{x.preventDefault(),d(""),f(!0);try{await t(n.trim(),s),e("/superadmin/dashboard",{replace:!0})}catch(b){d(b instanceof Error?b.message:"Login failed")}finally{f(!1)}};return i.jsxs("div",{className:"min-h-dvh flex bg-[#FCFDFE] text-slate-800 font-sans overflow-hidden",children:[i.jsxs("div",{className:"hidden lg:flex lg:w-[48%] relative flex-col justify-between p-10 xl:p-14 border-r border-slate-100 bg-white",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[i.jsx("div",{className:"absolute top-[15%] left-[10%] w-[400px] h-[400px] rounded-full bg-teal-100/40 blur-[100px]"}),i.jsx("div",{className:"absolute bottom-[10%] right-[5%] w-[280px] h-[280px] rounded-full bg-blue-100/35 blur-[90px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.02)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.02)_1px,transparent_1px)] bg-[size:3rem_3rem]"})]}),i.jsx("div",{className:"relative z-10",children:i.jsx(Zn,{size:"lg"})}),i.jsxs("div",{className:"relative z-10 space-y-6",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-teal-50 border border-teal-100 text-[var(--brand-primary)] text-xs font-semibold",children:[i.jsx(Ul,{className:"w-3.5 h-3.5"}),"Platform super admin"]}),i.jsxs("h1",{className:"text-4xl xl:text-5xl font-bold text-slate-900 leading-[1.1] tracking-tight",children:["Operate every",i.jsx("span",{className:"block text-transparent bg-clip-text bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2]",children:"branded academy"})]}),i.jsx("p",{className:"text-slate-500 text-sm leading-relaxed max-w-md",children:"Provision tenants, assign packages, verify domains, and control whitelabel branding from one enterprise control plane."}),i.jsx("div",{className:"flex flex-wrap gap-3 pt-2",children:[{icon:Cy,label:"Multi-tenant"},{icon:Ty,label:"SaaS packages"},{icon:u0,label:"Custom domains"},{icon:Tn,label:"Whitelabel"}].map(({icon:x,label:b})=>i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-xl bg-slate-50 border border-slate-100 text-xs text-slate-600",children:[i.jsx(x,{className:"w-3.5 h-3.5 text-[var(--brand-primary)]"}),b]},b))})]}),i.jsx("p",{className:"relative z-10 text-[11px] text-slate-400",children:"Platform operators only · Separate from tenant academy admins"})]}),i.jsxs("div",{className:"flex-1 flex items-center justify-center p-6 sm:p-10 relative bg-[#FCFDFE]",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[i.jsx("div",{className:"absolute top-[20%] left-1/2 -translate-x-1/2 w-[300px] h-[300px] rounded-full bg-teal-100/30 blur-[80px] lg:hidden"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem] opacity-60"})]}),i.jsxs(ze.div,{initial:{opacity:0,y:16}
2325,animate:{opacity:1,y:0},className:"relative z-10 w-full max-w-[400px]",children:[i.jsx("div",{className:"lg:hidden mb-8 flex justify-center",children:i.jsx(Zn,{size:"md"})}),i.jsxs("div",{className:"mb-8",children:[i.jsx("p",{className:"text-xs font-semibold text-[var(--brand-primary)] mb-1",children:"Secure sign-in"}),i.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Super admin access"}),i.jsx("p",{className:"text-sm text-slate-500 mt-2",children:"Use your platform super admin credentials â not a tenant academy login."})]}),i.jsxs("form",{onSubmit:x=>void p(x),className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-[0_24px_50px_rgba(15,23,42,0.06)]",children:[i.jsx("div",{className:"h-1.5 bg-gradient-to-r from-[var(--brand-primary)] via-[#22d3ee] to-[var(--brand-primary)]"}),i.jsxs("div",{className:"p-6 sm:p-7 space-y-5",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{htmlFor:"sa-email",className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[i.jsx(Zm,{className:"w-4 h-4 text-slate-400"}),"Email"]}),i.jsx("input",{id:"sa-email",type:"email",autoComplete:"username",value:n,onChange:x=>a(x.target.value),placeholder:"[email protected]",className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-white text-sm font-medium text-slate-800 outline-none focus:border-[var(--brand-primary)] focus:ring-2 focus:ring-[var(--brand-primary)]/15",required:!0})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsxs("label",{htmlFor:"sa-password",className:"text-sm font-semibold text-slate-700 flex items-center gap-2",children:[i.jsx(Or,{className:"w-4 h-4 text-slate-400"}),"Password"]}),i.jsx("input",{id:"sa-password",type:"password",autoComplete:"current-password",value:s,onChange:x=>o(x.target.value),className:"w-full px-4 py-3 rounded-xl border border-slate-200 bg-slate-50/80 text-sm font-medium text-slate-800 outline-none focus:border-[var(--brand-primary)] focus:ring-2 focus:ring-[var(--brand-primary)]/15",required:!0})]}),c?i.jsx("p",{className:"text-sm text-rose-600 font-medium leading-snug",children:c}):null,i.jsxs("button",{type:"submit",disabled:h,className:"w-full py-3.5 rounded-xl bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2] hover:from-[#00a3a3] hover:to-[#0e7490] text-white font-semibold text-sm flex items-center justify-center gap-2 disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed shadow-lg shadow-[var(--brand-primary)]/20 transition-all",children:[h?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(Ul,{className:"w-4 h-4"}),h?"Verifyingâ¦":"Enter control plane"]})]})]}),i.jsxs("p",{className:"mt-6 text-center text-[11px] text-slate-400 leading-relaxed",children:["Tenant academy admins sign in at ",i.jsx("span",{className:"font-medium",children:"/admin"})," on their subdomain."]})]})]})]})}const V7=[{to:"/superadmin/dashboard",label:"Overview",icon:oj,end:!0},{to:"/superadmin/tenants",label:"Tenants",icon:Cy,end:!1},{to:"/superadmin/packages",label:"Packages",icon:Ty,end:!0}];function ac({title:e,subtitle:t,children:n,actions:a}){const{email:s,logout:o}=vf(),c=ea(),d=async()=>{await o(),c("/superadmin/login",{replace:!0})};return i.jsxs("div",{className:"min-h-dvh bg-[#FCFDFE] text-slate-800 font-sans",children:[i.jsxs("aside",{className:"hidden lg:flex fixed inset-y-0 left-0 z-30 w-[260px] flex-col border-r border-slate-100 bg-white shadow-sm",children:[i.jsxs("div",{className:"p-5 border-b border-slate-50 shrink-0",children:[i.jsx(Zn,{size:"md"}),i.jsxs("div",{className:"mt-4 flex items-center gap-2 px-3 py-2 rounded-xl bg-teal-50 border border-teal-100",children:[i.jsx(Ul,{className:"w-4 h-4 text-[var(--brand-primary)]"}),i.jsx("span",{className:"text-xs font-semibold text-[var(--brand-primary)]",children:"Platform control plane"})]})]}),i.jsx("nav",{className:"flex-1 min-h-0 p-3 space-y-1 overflow-y-auto overscroll-contain",children:V7.map(({to:h,label:f,icon:p,end:x})=>i.jsxs(Yo,{to:h,end:x,className:({isActive:b})=>he("flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-medium transition-colors",b?"bg-[var(--brand-primary)]/10 text-[var(--brand-accent)] border border-[var(--brand-primary)]/20":"text-slate-500 hover:text-slate-800 hover:bg-slate-50"),children:[i.jsx(p,{className:"w-4 h-4 shrink-0"}),f]},h))}),i.jsxs("div",{className:"p-4 border-t border-slate-50 shrink-0",children:[i.jsx("p",{className:"text-xs font-semibold text-slate-400 mb-1",children:"Signed in"}),i.jsx("p",{className:"text-xs text-slate-600 truncate mb-3",children:s}),i.jsxs("button",{type:"button",onClick:()=>void d(),className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl border border-slate-200 bg-white text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer transition-colors",children:[i.jsx(Oi,{className:"w-4 h-4"}),"Sign out"]})]})]}),i.jsxs("div",{className:"lg:ml-[260px] flex flex-col min-h-dvh min-w-0",children:[i.jsxs("header",{className:"lg:hidden sticky top-0 z-20 flex items-center justify-between px-4 py-3 pt-safe border-b border-slate-100 bg-white overflow-x-auto gap-2",children:[i.jsx(Zn,{size:"sm"}),i.jsx("nav",{className:"flex gap-1",children:V7.map(({to:h,label:f,end:p})=>i.jsx(Yo,{to:h,end:p,className:({isActive:x})=>he("px-2 py-1 rounded-lg text-[10px] font-semibold whitespace-nowrap",x?"bg-teal-50 text-[var(--brand-primary)]":"text-slate-400"),children:f},h))}),i.jsx("button",{type:"button",onClick:()=>void d(),className:"p-2 rounded-lg text-slate-500 hover:bg-slate-50 cursor-pointer shrink-0",children:i.jsx(Oi,{className:"w-5 h-5"})})]}),i.jsxs("main",{className:"flex-1 overflow-y-auto relative",children:[i.jsxs("div",{className:"absolute inset-0 pointer-events-none overflow-hidden opacity-60",children:[i.jsx("div",{className:"absolute top-0 right-0 w-[480px] h-[360px] rounded-full bg-teal-100/30 blur-[100px]"}),i.jsx("div",{className:"absolute bottom-0 left-1/4 w-[320px] h-[280px] rounded-full bg-blue-100/25 blur-[90px]"}),i.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,rgba(15,23,42,0.01)_1px,transparent_1px),linear-gradient(to_bottom,rgba(15,23,42,0.01)_1px,transparent_1px)] bg-[size:4rem_4rem]"})]}),i.jsxs("div",{className:"relative z-10 p-4 sm:p-6 lg:p-8 max-w-6xl mx-auto w-full",children:[i.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 mb-6",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-2 text-[var(--brand-primary)] text-xs font-semibold mb-1",children:[i.jsx(Tn,{className:"w-3.5 h-3.5"}
2325),t||"Socratech Platform"]}),i.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-slate-900 tracking-tight",children:e})]}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[a,i.jsxs("div",{className:"hidden sm:flex items-center gap-1 text-xs text-slate-400",children:[i.jsx(u0,{className:"w-3.5 h-3.5"}),i.jsx("span",{children:"Multi-tenant"}),i.jsx(Fi,{className:"w-3 h-3"}),i.jsx("span",{className:"text-[var(--brand-primary)] font-medium",children:"Secure"})]})]})]}),n]})]})]})]})}function Vee(){const[e,t]=w.useState(null),[n,a]=w.useState(""),[s,o]=w.useState(!0),c=w.useCallback(async()=>{o(!0),a("");try{t(await Aee())}catch(d){a(d instanceof Error?d.message:"Failed to load")}finally{o(!1)}},[]);return w.useEffect(()=>{c()},[c]),i.jsxs(ac,{title:"Platform overview",subtitle:"Multi-tenant operations",actions:i.jsxs(Ma,{to:"/superadmin/tenants",className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2] text-white text-sm font-semibold shadow-lg shadow-[var(--brand-primary)]/20",children:[i.jsx(qi,{className:"w-4 h-4"}),"New tenant"]}),children:[n?i.jsx("div",{className:"mb-6 rounded-2xl bg-rose-50 border border-rose-100 px-4 py-4 text-sm text-rose-800",children:n}):null,s&&!e?i.jsx("div",{className:"flex justify-center py-24",children:i.jsx(Qe,{className:"w-9 h-9 text-[var(--brand-primary)] animate-spin"})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4 mb-6",children:[i.jsx(On,{label:"Tenants",value:(e==null?void 0:e.tenants)??"â",icon:Cy}),i.jsx(On,{label:"Active tenants",value:(e==null?void 0:e.activeTenants)??"â",icon:u0,tone:"violet"}),i.jsx(On,{label:"Packages",value:(e==null?void 0:e.packages)??"â",icon:Ty,tone:"amber"}),i.jsx(On,{label:"Students (all)",value:(e==null?void 0:e.students)??"â",icon:wm,tone:"slate"})]}),i.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[i.jsx("h2",{className:"text-sm font-bold text-slate-900 mb-3",children:"How tenancy works"}),i.jsxs("ol",{className:"space-y-2.5 text-sm text-slate-500 list-decimal list-inside",children:[i.jsx("li",{children:"Create a package (seats, bots, pricing)."}),i.jsx("li",{children:"Create a tenant with a unique subdomain slug."}),i.jsx("li",{children:"Set whitelabel colors, logo, fonts, and copy."}),i.jsxs("li",{children:["Students reach"," ",i.jsx("code",{className:"text-[var(--brand-primary)] text-xs font-semibold bg-teal-50 px-1.5 py-0.5 rounded",children:`{slug}.${(e==null?void 0:e.rootDomain)||"localhost"}`})]})]})]}),i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white p-6 shadow-sm",children:[i.jsx("h2",{className:"text-sm font-bold text-slate-900 mb-3",children:"Quick actions"}),i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsxs(Ma,{to:"/superadmin/tenants",className:"group flex items-center justify-between px-4 py-3 rounded-xl bg-teal-50 border border-teal-100 text-[var(--brand-primary)] text-sm font-semibold hover:bg-teal-100/80 transition-colors",children:["Create or edit tenants",i.jsx(pn,{className:"w-4 h-4 opacity-60 group-hover:translate-x-0.5 transition-transform"})]}),i.jsxs(Ma,{to:"/superadmin/packages",className:"group flex items-center justify-between px-4 py-3 rounded-xl bg-slate-50 border border-slate-100 text-slate-700 text-sm font-semibold hover:bg-slate-100 transition-colors",children:["Manage platform packages",i.jsx(pn,{className:"w-4 h-4 opacity-40 group-hover:translate-x-0.5 transition-transform"})]})]})]})]})]})]})}const q7={name:"",slug:"",contactEmail:"",contactName:"",brandName:"",packageId:"",primaryColor:"#00B5B5",secondaryColor:"#0F172A",accentColor:"#0891b2",logoUrl:"",status:"active"};function qee(){const[e,t]=w.useState([]),[n,a]=w.useState([]),[s,o]=w.useState("localhost"),[c,d]=w.useState(!0),[h,f]=w.useState(""),[p,x]=w.useState(!1),[b,v]=w.useState(q7),[N,j]=w.useState(!1),T=async()=>{const[k,M]=await Promise.all([Iee(),y2()]);
2325t(k.tenants),o(k.rootDomain),a(M.packages.filter(B=>B.active))};w.useEffect(()=>{let k=!1;return(async()=>{try{await T()}catch(M){k||f(M instanceof Error?M.message:"Failed to load")}finally{k||d(!1)}})(),()=>{k=!0}},[]);const E=async k=>{k.preventDefault(),j(!0),f("");try{await _ee({...b,packageId:b.packageId||null,brandName:b.brandName||b.name}),v(q7),x(!1),await T()}catch(M){f(M instanceof Error?M.message:"Create failed")}finally{j(!1)}},D=async(k,M)=>{if(confirm(`Delete tenant "${M}"? This cannot be undone.`))try{await Bee(k),await T()}catch(B){f(B instanceof Error?B.message:"Delete failed")}};return i.jsxs(ac,{title:"Tenants",subtitle:`Each tenant gets a subdomain on ${s} plus whitelabel branding.`,actions:i.jsxs("button",{type:"button",onClick:()=>x(k=>!k),className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2] text-white text-sm font-semibold shadow-lg shadow-[var(--brand-primary)]/20 cursor-pointer",children:[i.jsx(qi,{className:"w-4 h-4"}),"New tenant"]}),children:[h?i.jsx("div",{className:"mb-4 rounded-xl border border-rose-100 bg-rose-50 text-rose-800 text-sm px-4 py-3",children:h}):null,p?i.jsxs("form",{onSubmit:k=>void E(k),className:"mb-6 rounded-2xl border border-teal-100 bg-white p-5 grid sm:grid-cols-2 gap-4 shadow-sm",children:[i.jsx(kl,{label:"Academy name",value:b.name,onChange:k=>v(M=>({...M,name:k,slug:M.slug||k.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")})),required:!0}),i.jsx(kl,{label:`Subdomain slug (.${s})`,value:b.slug,onChange:k=>v(M=>({...M,slug:k.toLowerCase()})),required:!0}),i.jsx(kl,{label:"Brand display name",value:b.brandName,onChange:k=>v(M=>({...M,brandName:k}))}),i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Package"}),i.jsxs("select",{value:b.packageId,onChange:k=>v(M=>({...M,packageId:k.target.value})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--brand-primary)]/20",children:[i.jsx("option",{value:"",children:"No package"}),n.map(k=>i.jsxs("option",{value:k.id,className:"bg-white",children:[k.name," â â¹",k.priceMonthly,"/mo"]},k.id))]})]}),i.jsx(kl,{label:"Contact email",value:b.contactEmail,onChange:k=>v(M=>({...M,contactEmail:k}))}),i.jsx(kl,{label:"Contact name",value:b.contactName,onChange:k=>v(M=>({...M,contactName:k}))}),i.jsx(kl,{label:"Primary color",value:b.primaryColor,onChange:k=>v(M=>({...M,primaryColor:k})),type:"color"}),i.jsx(kl,{label:"Logo URL",value:b.logoUrl,onChange:k=>v(M=>({...M,logoUrl:k})),placeholder:"https://⦠or /uploads/â¦"}),i.jsxs("div",{className:"sm:col-span-2 flex gap-2 justify-end",children:[i.jsx("button",{type:"button",onClick:()=>x(!1),className:"px-4 py-2 rounded-xl border border-slate-200 text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:"Cancel"}),i.jsxs("button",{type:"submit",disabled:N,className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-[var(--brand-primary)] text-white text-sm font-semibold disabled:opacity-60 cursor-pointer",children:[N?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):null,"Create tenant"]})]})]}):null,c?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Qe,{className:"w-8 h-8 animate-spin text-[var(--brand-primary)]"})}):e.length===0?i.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-10 text-center text-slate-400 text-sm",children:"No tenants yet. Create one to provision a subdomain academy."}):i.jsx("div",{className:"space-y-3",children:e.map(k=>i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white p-4 sm:p-5 flex flex-col sm:flex-row sm:items-center gap-4 shadow-sm",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl shrink-0 flex items-center justify-center overflow-hidden border border-slate-200",style:{backgroundColor:k.primaryColor+"22"},children:k.logoUrl?i.jsx("img",{src:k.logoUrl,alt:"",className:"w-full h-full object-cover"}):i.jsx("span",{className:"text-lg font-bold",style:{color:k.primaryColor},children:(k.brandName||k.name).slice(0,1).toUpperCase()})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("h3",{className:"text-base font-bold text-slate-900 truncate",children:k.name}),i.jsx(Hee,{status:k.status})]}),i.jsxs("p",{className:"text-xs text-slate-400 mt-0.5",children:[i.jsx("span",{className:"text-[var(--brand-primary)]/90",children:k.slug}),".",s,k.packageName?` · ${k.packageName}
2325`:" · No package"]}),i.jsxs("p",{className:"text-xs text-slate-500 mt-1 truncate",children:["Brand: ",k.brandName||k.name,k.contactEmail?` · ${k.contactEmail}`:"",typeof k.studentCount=="number"?` · ${k.studentCount}/${k.maxStudents??"?"} seats`:""]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsxs("a",{href:k.subdomainUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-xl border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50 hover:text-slate-800",title:"Open subdomain (may need /etc/hosts for *.localhost)",children:[i.jsx(Ay,{className:"w-3.5 h-3.5"}),"Open"]}),i.jsx(Ma,{to:`/superadmin/tenants/${k.id}`,className:"px-3 py-2 rounded-xl bg-teal-50 border border-teal-100 text-xs font-semibold text-[var(--brand-primary)] hover:bg-teal-100",children:"Whitelabel"}),i.jsx("button",{type:"button",onClick:()=>void D(k.id,k.name),className:"p-2 rounded-xl border border-slate-200 text-slate-400 hover:text-rose-600 hover:border-rose-200 hover:bg-rose-50 cursor-pointer","aria-label":"Delete",children:i.jsx(Hi,{className:"w-4 h-4"})})]})]},k.id))})]})}function kl({label:e,value:t,onChange:n,required:a,type:s="text",placeholder:o}){return i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:e}),i.jsx("input",{type:s,value:t,onChange:c=>n(c.target.value),required:a,placeholder:o,className:he("w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--brand-primary)]/20",s==="color"&&"h-11 p-1 cursor-pointer")})]})}function Hee({status:e}){const t=e==="active";return i.jsx("span",{className:he("text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded-full border",t?"bg-emerald-50 text-emerald-700 border-emerald-100":"bg-slate-50 text-slate-500 border-slate-200"),children:e})}const $ee=["General","JEE","NEET","UPSC","GATE"],Gee=["qa","analytics","vision","interview","premium","reports"];function Yee(){var ne,Z;const{id:e}=s9(),t=ea(),[n,a]=w.useState(null),[s,o]=w.useState([]),[c,d]=w.useState("localhost"),[h,f]=w.useState({}),[p,x]=w.useState(!0),[b,v]=w.useState(!1),[N,j]=w.useState(""),[T,E]=w.useState(""),[D,k]=w.useState(!1),M=async()=>{if(!e)return;const[Y,I]=await Promise.all([zee(e),y2()]);a(Y.tenant),d(Y.rootDomain),f(Y.tenant),o(I.packages)};w.useEffect(()=>{if(!e)return;let Y=!1;return(async()=>{try{await M()}catch(I){Y||E(I instanceof Error?I.message:"Failed to load")}finally{Y||x(!1)}})(),()=>{Y=!0}},[e]);const B=async Y=>{if(Y.preventDefault(),!!e){v(!0),E(""),k(!1);try{const I=await Dee(e,{name:h.name,slug:h.slug,status:h.status,packageId:h.packageId,contactEmail:h.contactEmail,contactName:h.contactName,brandName:h.brandName,primaryColor:h.primaryColor,secondaryColor:h.secondaryColor,accentColor:h.accentColor,logoUrl:h.logoUrl,faviconUrl:h.faviconUrl,loginBgUrl:h.loginBgUrl,supportEmail:h.supportEmail,notes:h.notes,customDomain:h.customDomain,packageExpiresAt:h.packageExpiresAt,fontSans:h.fontSans,fontDisplay:h.fontDisplay,copyOverrides:h.copyOverrides,featureFlags:h.featureFlags,maxStudentsOverride:h.maxStudentsOverride,maxAdminsOverride:h.maxAdminsOverride,includedBotsOverride:h.includedBotsOverride});a(I.tenant),f(I.tenant),k(!0)}catch(I){E(I instanceof Error?I.message:"Save failed")}finally{v(!1)}}},_=async(Y,I)=>{if(!(!e||!Y)){j(`upload-${I}`),E("");try{const R=await Wee(Y),J=await Lee(e,R,I);a(J.tenant),f(J.tenant)}catch(R){E(R instanceof Error?R.message:"Upload failed")}finally{j("")}}},U=async(Y=!1)=>{if(e){j("verify"),E("");try{const I=await Ree(e,Y);a(I.tenant),f(I.tenant)}catch(I){E(I instanceof Error?I.message:"Verify failed")}finally{j("")}}},F=async()=>{var Y;if(e){j("dns"),E("");try{const I=await Oee(e);a(I.tenant),f(I.tenant),alert(((Y=I.dnsProvision)==null?void 0:Y.detail)||(I.ok?"DNS provisioned":"DNS provision failed"))}catch(I){E(I instanceof Error?I.message:"DNS provision failed")}finally{j("")}}},W=async()=>{if(e){j("clone");try{const Y=await Pee(e);alert(`Cloned ${Y.cloned} plan(s) into this tenant catalog.`)}catch(Y){E(Y instanceof Error?Y.message:"Clone failed")}finally{j("")}}};if(p)return i.jsx(ac,{title:"Tenant",children:i.jsx("div",{className:"flex justify-center py-20",children:i.jsx(Qe,{className:"w-8 h-8 animate-spin text-[var(--brand-primary)]"})})});if(!n)return i.jsx(ac,{title:"Tenant not found",children:i.jsx("button",{type:"button",onClick:()=>t("/superadmin/tenants"),className:"text-[var(--brand-primary)] text-sm cursor-pointer",children:"Back to tenants"})});const ae=h.brandName||h.name||"Brand",le=h.primaryColor||"#00B5B5",re=h.featureFlags||{},xe=h.copyOverrides||{},te=h.includedBotsOverride||null,H=n.entitlements,V=n.dns;return i.jsxs(ac,{title:n.name,subtitle:`Whitelabel, domains & entitlements · ${n.slug}.${c}`,actions:i.jsxs(Ma,{to:"/superadmin/tenants",className:"inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-slate-200 text-sm text-slate-600 hover:bg-slate-50",children:[i.jsx(ky,{className:"w-4 h-4"}),"All tenants"]}),children:[T?i.jsx("div",{className:"mb-4 rounded-xl border border-rose-100 bg-rose-50 text-rose-800 text-sm px-4 py-3",children:T}):null,D?i.jsx("div",{className:"mb-4 rounded-xl border border-emerald-100 bg-emerald-50 text-emerald-800 text-sm px-4 py-3",children:"Saved."}):null,i.jsx("div",{className:"mb-6 grid sm:grid-cols-4 gap-3",children:[{label:"Students",value:`${(H==null?void 0:H.studentCount)??0} / ${(H==null?void 0:H.maxStudents)??"â"}`},{label:"Seats left",value:String((H==null?void 0:H.seatsRemaining)??"â")},{label:"Status",value:(H==null?void 0:H.status)||n.status},{label:"Bots",value:((H==null?void 0:H.includedBots)||n.includedBots||[]).join(", ")||"â"}].map(Y=>i.jsxs("div",{className:"rounded-xl border border-slate-100 bg-white px-4 py-3 shadow-sm",children:[i.jsx("p",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-semibold",children:Y.label}),i.jsx("p",{className:"text-sm font-semibold text-slate-900 mt-1 truncate",children:Y.value})]},Y.label))}),i.jsxs("div",{className:"grid lg:grid-cols-[1fr_320px] gap-6",children:[i.jsxs("form",{onSubmit:Y=>void B(Y),className:"rounded-2xl border border-slate-100 bg-white p-5 sm:p-6 space-y-6 shadow-sm",children:[i.jsx(Cl,{title:"Identity",children:i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsx(ma,{label:"Name",value:h.name||"",onChange:Y=>f(I=>({...I,name:Y}))}),i.jsx(ma,{label:"Subdomain slug",value:h.slug||"",onChange:Y=>f(I=>({...I,slug:Y.toLowerCase()}))}),i.jsx(ma,{label:"Brand name",value:h.brandName||"",onChange:Y=>f(I=>({...I,brandName:Y}))}),i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Status"}),i.jsx("select",{value:h.status||"active",onChange:Y=>f(I=>({...I,status:Y.target.value})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm",children:["active","trial","suspended","expired"].map(Y=>i.jsx("option",{value:Y,className:"bg-white",children:Y},Y))})]})]})}),i.jsxs(Cl,{title:"Package & entitlements",children:[i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Platform package"}),i.jsxs("select",{value:h.packageId||"",onChange:Y=>f(I=>({...I,packageId:Y.target.value||null})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm",children:[i.jsx("option",{value:"",className:"bg-white",children:"No package"}),s.map(Y=>i.jsxs("option",{value:Y.id,className:"bg-white",children:[Y.name," â â¹",Y.priceMonthly,"/mo · ",Y.maxStudents," students"]}
2325,Y.id))]})]}),i.jsxs("div",{className:"grid sm:grid-cols-3 gap-4 mt-4",children:[i.jsx(ma,{label:"Package expires (ISO date)",value:h.packageExpiresAt||"",onChange:Y=>f(I=>({...I,packageExpiresAt:Y||null})),placeholder:"2027-01-01T00:00:00.000Z"}),i.jsx(ma,{label:"Max students override",value:h.maxStudentsOverride!=null?String(h.maxStudentsOverride):"",onChange:Y=>f(I=>({...I,maxStudentsOverride:Y===""?null:Number(Y)})),placeholder:"Leave blank = package default"}),i.jsx(ma,{label:"Max admins override",value:h.maxAdminsOverride!=null?String(h.maxAdminsOverride):"",onChange:Y=>f(I=>({...I,maxAdminsOverride:Y===""?null:Number(Y)}))})]}),i.jsxs("div",{className:"mt-4",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Included bots override (empty = use package)"}),i.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[$ee.map(Y=>{const I=(te||[]).includes(Y);return i.jsx("button",{type:"button",onClick:()=>{const R=new Set(te||[]);R.has(Y)?R.delete(Y):R.add(Y);const J=Array.from(R);f(P=>({...P,includedBotsOverride:J.length?J:null}))},className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer",I?"bg-teal-100 border-teal-200 text-[var(--brand-primary)]":"bg-slate-50 border-slate-200 text-slate-400"),children:Y},Y)}),i.jsx("button",{type:"button",onClick:()=>f(Y=>({...Y,includedBotsOverride:null})),className:"px-3 py-1.5 rounded-lg text-xs text-slate-500 border border-slate-200 cursor-pointer",children:"Clear override"})]})]}),i.jsxs("button",{type:"button",onClick:()=>void W(),disabled:N==="clone",className:"mt-4 inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:[N==="clone"?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):i.jsx(IU,{className:"w-3.5 h-3.5"}),"Clone platform plans into tenant catalog"]})]}),i.jsxs(Cl,{title:"Domains & routing",children:[i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsx(ma,{label:"Custom domain",value:h.customDomain||"",onChange:Y=>f(I=>({...I,customDomain:Y||null})),placeholder:"learn.academy.com"}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xs font-semibold text-slate-400",children:"Verification"}),i.jsx("p",{className:"text-xs text-slate-500",children:n.domainVerified?"Verified â":"Not verified"}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>void U(!1),disabled:N==="verify",className:"inline-flex items-center gap-1.5 px-3 py-2 rounded-xl bg-teal-50 border border-teal-100 text-xs font-semibold text-[var(--brand-primary)] cursor-pointer",children:[i.jsx(u0,{className:"w-3.5 h-3.5"}),"Verify domain"]}),i.jsx("button",{type:"button",onClick:()=>void U(!0),disabled:N==="verify",className:"px-3 py-2 rounded-xl border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:"Force verify"})]})]})]}),V?i.jsxs("div",{className:"mt-4 rounded-xl border border-slate-100 bg-slate-50 p-3 text-[11px] text-slate-500 space-y-1 font-mono",children:[i.jsxs("p",{children:["Subdomain CNAME: ",(ne=V.subdomain)==null?void 0:ne.host," â ",(Z=V.subdomain)==null?void 0:Z.value]}),V.customDomain?i.jsxs(i.Fragment,{children:[i.jsxs("p",{children:["Custom CNAME: ",V.customDomain.host," â ",V.customDomain.value]}),V.customDomain.txtRecord?i.jsxs("p",{children:["TXT: ",V.customDomain.txtRecord.host," ="," ",V.customDomain.txtRecord.value]}):null]}):null]}):null,i.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[i.jsxs("button",{type:"button",onClick:()=>void F(),disabled:N==="dns",className:"inline-flex items-center gap-2 px-3 py-2 rounded-xl bg-[var(--brand-primary)] text-white text-xs font-semibold hover:opacity-90 cursor-pointer disabled:opacity-50",children:[N==="dns"?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):i.jsx(u0,{className:"w-3.5 h-3.5"}),"Provision Cloudflare DNS"]}),i.jsxs("a",{href:n.subdomainUrl,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 px-3 py-2 rounded-xl border border-slate-200 text-xs font-semibold text-slate-600 hover:bg-slate-50",children:["Open ",n.slug,".",c]})]})]}),i.jsxs(Cl,{title:"Whitelabel colors & assets",children:[i.jsxs("div",{className:"grid sm:grid-cols-3 gap-4",children:[i.jsx(G1,{label:"Primary",value:h.primaryColor||"#00B5B5",onChange:Y=>f(I=>({...I,primaryColor:Y}))}),i.jsx(G1,{label:"Secondary",value:h.secondaryColor||"#0F172A",onCh
2325ange:Y=>f(I=>({...I,secondaryColor:Y}))}),i.jsx(G1,{label:"Accent",value:h.accentColor||"#0891b2",onChange:Y=>f(I=>({...I,accentColor:Y}))})]}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 mt-4",children:[i.jsx(ma,{label:"Font sans",value:h.fontSans||"Inter",onChange:Y=>f(I=>({...I,fontSans:Y}))}),i.jsx(ma,{label:"Font display",value:h.fontDisplay||"Outfit",onChange:Y=>f(I=>({...I,fontDisplay:Y}))})]}),i.jsx("div",{className:"grid sm:grid-cols-3 gap-4 mt-4",children:["logo","favicon","loginBg"].map(Y=>i.jsxs("label",{className:"flex flex-col gap-2 rounded-xl border border-dashed border-slate-200 p-3 cursor-pointer hover:border-teal-200",children:[i.jsxs("span",{className:"text-xs font-semibold text-slate-400 capitalize",children:["Upload ",Y]}),i.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] text-[var(--brand-primary)]",children:[N===`upload-${Y}`?i.jsx(Qe,{className:"w-3.5 h-3.5 animate-spin"}):i.jsx(eV,{className:"w-3.5 h-3.5"}),"Choose image"]}),i.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp,image/svg+xml",className:"hidden",onChange:I=>{var R;return void _(((R=I.target.files)==null?void 0:R[0])??null,Y)}}),i.jsx("span",{className:"text-[10px] text-slate-600 truncate",children:Y==="logo"?h.logoUrl||"â":Y==="favicon"?h.faviconUrl||"â":h.loginBgUrl||"â"})]},Y))}),i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4 mt-4",children:[i.jsx(ma,{label:"Logo URL",value:h.logoUrl||"",onChange:Y=>f(I=>({...I,logoUrl:Y}))}),i.jsx(ma,{label:"Favicon URL",value:h.faviconUrl||"",onChange:Y=>f(I=>({...I,faviconUrl:Y}))})]})]}),i.jsxs(Cl,{title:"Copy overrides",children:[i.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:[["splashTagline","Splash highlight"],["splashBody","Splash body"],["signInTitle","Sign-in title"],["signInDescription","Sign-in description"],["landingHero","Landing hero"],["footerLegal","Footer legal"]].map(([Y,I])=>i.jsx(ma,{label:I,value:xe[Y]||"",onChange:R=>f(J=>({...J,copyOverrides:{...J.copyOverrides||{},[Y]:R}}))},Y))}),i.jsxs("label",{className:"mt-3 flex items-center gap-2 text-sm text-slate-600",children:[i.jsx("input",{type:"checkbox",checked:!!xe.hidePoweredBy,onChange:Y=>f(I=>({...I,copyOverrides:{...I.copyOverrides||{},hidePoweredBy:Y.target.checked}}))}),"Hide âPowered by Socratechâ"]})]}),i.jsx(Cl,{title:"Feature flags",children:i.jsx("div",{className:"flex flex-wrap gap-2",children:Gee.map(Y=>i.jsx("button",{type:"button",onClick:()=>f(I=>({...I,featureFlags:{...I.featureFlags||{},[Y]:re[Y]===!1}})),className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer capitalize",re[Y]!==!1?"bg-emerald-50 border-emerald-100 text-emerald-700":"bg-slate-50 border-slate-200 text-slate-500"),children:Y},Y))})}),i.jsxs(Cl,{title:"Contacts",children:[i.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[i.jsx(ma,{label:"Contact name",value:h.contactName||"",onChange:Y=>f(I=>({...I,contactName:Y}))}),i.jsx(ma,{label:"Contact email",value:h.contactEmail||"",onChange:Y=>f(I=>({...I,contactEmail:Y}))}),i.jsx(ma,{label:"Support email",value:h.supportEmail||"",onChange:Y=>f(I=>({...I,supportEmail:Y}))})]}),i.jsxs("label",{className:"block space-y-1.5 mt-4",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Internal notes"}),i.jsx("textarea",{value:h.notes||"",onChange:Y=>f(I=>({...I,notes:Y.target.value})),rows:3,className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm resize-y"})]})]}),i.jsxs("button",{type:"submit",disabled:b,className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-xl bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2] text-white text-sm font-semibold disabled:opacity-60 cursor-pointer",children:[b?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):i.jsx(PF,{className:"w-4 h-4"}),"Save changes"]})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"rounded-2xl border border-slate-100 bg-white overflow-hidden shadow-sm",children:[i.jsx("div",{className:"px-4 py-3 border-b border-slate-100 text-xs font-semibold text-slate-400 uppercase tracking-wider",children:"Live preview"}),i.jsxs("div",{className:"p-5",style:{backgroundColor:h.secondaryColor||"#0F172A"},children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-11 h-11 rounded-xl overflow-hidden flex items-center justify-center border border-white/20",style:{backgroundColor:le},children:h.logoUrl?i.jsx("img",{src:h.logoUrl,alt:"",className:"w-full h-full object-cover"}):i.jsx("span",{className:"text-white font-bold text-lg",children:ae.slice(0,1).toUpperCase()})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-bold",style:{fontFamily:h.fontDisplay||"Outfit"},children:ae}),i.jsxs("p",{className:"text-xs text-white/60",children:[h.slug,".",c]})]})]}),i.jsx("button",{type:"button",className:"w-full py-2.5 rounded-xl text-sm font-semibold text-white",style:{backgroundColor:le},children:"Continue with Google"})]})]}),i.jsx("a",{href:`${n.subdomainUrl}?tenant=${n.slug}`,target:"_blank",rel:"noreferrer",className:"block text-center px-4 py-3 rounded-xl border border-teal-100 bg-teal-50 text-[var(--brand-primary)] text-sm font-semibold hover:bg-teal-100",children:"Preview as tenant"})]})]})]})}function Cl({title:e,children:t}){return i.jsxs("section",{children:[i.jsx("h2",{className:"text-sm font-semibold text-slate-900 mb-3",children:e}),t]})}function ma({label:e,value:t,onChange:n,placeholder:a}){return i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:e}),i.jsx("input",{type:"text",value:t,onChange:s=>n(s.target.value),placeholder:a,className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm focus:outline-none focus:ring-2 focus:ring-[var(--brand-primary)]/20"})]})}function G1({label:e,value:t,onChange:n}){return i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:e}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"color",value:t,onChange:a=>n(a.target.value),className:he("w-11 h-11 rounded-xl border border-slate-200 cursor-pointer bg-transparent")}),i.jsx("input",{type:"text",value:t,onChange:a=>n(a.target.value),className:"flex-1 px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm font-mono"})]})]})}function Wee(e){return new Promise((t,n)=>{const a=new FileReader;a.onload=()=>t(String(a.result)),a.onerror=()=>n(new Error("Could not read file")),a.readAsDataURL(e)})}const Xee=["General","JEE","NEET","UPSC","GATE"],H7={name:"",slug:"",description:"",priceMonthly:4999,priceYearly:49999,maxStudents:250,maxAdmins:2,includedBots:["General"],features:"",badge:"",active:!0};function Kee(){const[e,t]=w.useState([]),[n,a]=w.useState(!0),[s,o]=w.useState(""),[c,d]=w.useState(!1),[h,f]=w.useState(null),[p,x]=w.useState(H7),[b,v]=w.useState(!1),N=async()=>{const M=await y2();t(M.packages)};w.useEffect(()=>{let M=!1;return(async()=>{try{await N()}catch(B){M||o(B instanceof Error?B.message:"Failed to load")}finally{M||a(!1)}})(),()=>{M=!0}},[]);const j=()=>{f(null),x(H7),d(!0)},T=M=>{f(M.id),x({name:M.name,slug:M.slug,description:M.description,priceMonthly:M.priceMonthly,priceYearly:M.priceYearly,maxStudents:M.maxStudents,maxAdmins:M.maxAdmins,includedBots:M.includedBots,features:M.features.join(` 2326`),badge:M.badge,active:M.active}),d(!0)},E=async M=>{M.preventDefault(),v(!0),o("");const B={name:p.name,slug:p.slug,description:p.description,priceMonthly:Number(p.priceMonthly),priceYearly:Number(p.priceYearly),maxStudents:Number(p.maxStudents),maxAdmins:Number(p.maxAdmins),includedBots:p.includedBots,features:p.features.split(` 2327`).map(_=>
2327_.trim()).filter(Boolean),badge:p.badge,active:p.active};try{h?await Tee(h,B):await Eee(B),d(!1),f(null),await N()}catch(_){o(_ instanceof Error?_.message:"Save failed")}finally{v(!1)}},D=async(M,B)=>{if(confirm(`Delete package "${B}"?`))try{await Mee(M),await N()}catch(_){o(_ instanceof Error?_.message:"Delete failed")}},k=M=>{x(B=>({...B,includedBots:B.includedBots.includes(M)?B.includedBots.filter(_=>_!==M):[...B.includedBots,M]}))};return i.jsxs(ac,{title:"Packages",subtitle:"SaaS plans you sell to tenant academies â seats, bots, and pricing.",actions:i.jsxs("button",{type:"button",onClick:j,className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-gradient-to-r from-[var(--brand-primary)] to-[#0891b2] text-white text-sm font-semibold cursor-pointer",children:[i.jsx(qi,{className:"w-4 h-4"}),"New package"]}),children:[s?i.jsx("div",{className:"mb-4 rounded-xl border border-rose-100 bg-rose-50 text-rose-800 text-sm px-4 py-3",children:s}):null,c?i.jsxs("form",{onSubmit:M=>void E(M),className:"mb-6 rounded-2xl border border-teal-100 bg-white p-5 grid sm:grid-cols-2 gap-4 shadow-sm",children:[i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Name"}),i.jsx("input",{required:!0,value:p.name,onChange:M=>x(B=>({...B,name:M.target.value,slug:B.slug||M.target.value.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm"})]}),i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Slug"}),i.jsx("input",{required:!0,value:p.slug,onChange:M=>x(B=>({...B,slug:M.target.value.toLowerCase()})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm"})]}),i.jsxs("label",{className:"sm:col-span-2 block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Description"}),i.jsx("input",{value:p.description,onChange:M=>x(B=>({...B,description:M.target.value})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm"})]}),i.jsx(_h,{label:"Price monthly (â¹)",value:p.priceMonthly,onChange:M=>x(B=>({...B,priceMonthly:M}))}),i.jsx(_h,{label:"Price yearly (â¹)",value:p.priceYearly,onChange:M=>x(B=>({...B,priceYearly:M}))}),i.jsx(_h,{label:"Max students",value:p.maxStudents,onChange:M=>x(B=>({...B,maxStudents:M}))}),i.jsx(_h,{label:"Max admins",value:p.maxAdmins,onChange:M=>x(B=>({...B,maxAdmins:M}))}),i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Badge"}),i.jsx("input",{value:p.badge,onChange:M=>x(B=>({...B,badge:M.target.value})),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm"})]}),i.jsxs("label",{className:"flex items-center gap-2 pt-6 text-sm text-slate-600",children:[i.jsx("input",{type:"checkbox",checked:p.active,onChange:M=>x(B=>({...B,active:M.target.checked})),className:"rounded"}),"Active"]}),i.jsxs("div",{className:"sm:col-span-2",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Included bots"}),i.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Xee.map(M=>i.jsx("button",{type:"button",onClick:()=>k(M),className:he("px-3 py-1.5 rounded-lg text-xs font-semibold border cursor-pointer",p.includedBots.includes(M)?"bg-teal-100 border-teal-200 text-[var(--brand-primary)]":"bg-slate-50 border-slate-200 text-slate-400"),children:M},M))})]}),i.jsxs("label",{className:"sm:col-span-2 block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Features (one per line)"}),i.jsx("textarea",{value:p.features,onChange:M=>x(B=>({...B,features:M.target.value})),rows:4,className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm resize-y"})]}),i.jsxs("div",{className:"sm:col-span-2 flex justify-end gap-2",children:[i.jsx("button",{type:"button",onClick:()=>d(!1),className:"px-4 py-2 rounded-xl border border-slate-200 text-sm font-semibold text-slate-600 hover:bg-slate-50 cursor-pointer",children:"Cancel"}),i.jsxs("button",{type:"submit",disabled:b,className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl bg-[var(--brand-primary)] text-white text-sm font-semibold disabled:opacity-60 cursor-pointer",children:[b?i.jsx(Qe,{className:"w-4 h-4 animate-spin"}):null,h?"Update":"Create"," package"]})]})]}):null,n?i.jsx("div",{className:"flex justify-center py-16",children:i.jsx(Qe,{className:"w-8 h-8 animate-spin text-[var(--brand-primary)]"})}):i.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-3 gap-4",children:e.map(M=>i.jsxs("div",{className:he("rounded-2xl border bg-white p-5 flex flex-col shadow-sm",M.active?"border-slate-100":"border-slate-100 opacity-60"),children:[i.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[i.jsxs("div",{children:[M.badge?i.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-[var(--brand-primary)]",children:M.badge}):null,i.jsx("h3",{className:"text-lg font-bold text-slate-900",children:M.name}),i.jsx("p",{className:"text-xs text-slate-500",children:M.slug})]}),i.jsxs("div",{className:"flex gap-1",children:[i.jsx("button",{type:"button",onClick:()=>T(M),className:"p-2 rounded-lg border border-slate-200 text-slate-400 hover:text-slate-900 cursor-pointer",children:i.jsx(P0,{className:"w-3.5 h-3.5"})}),i.jsx("button",{type:"button",onClick:()=>void D(M.id,M.name),className:"p-2 rounded-lg border border-slate-200 text-slate-400 hover:text-rose-600 cursor-pointer",children:i.jsx(Hi,{className:"w-3.5 h-3.5"})})]})]}),i.jsx("p",{className:"text-sm text-slate-500 mb-4 flex-1",children:M.description}),i.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["â¹",M.priceMonthly.toLocaleStr
2327ing(),i.jsx("span",{className:"text-sm font-medium text-slate-500",children:"/mo"})]}),i.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["â¹",M.priceYearly.toLocaleString(),"/yr · ",M.maxStudents," students ·"," ",M.maxAdmins," admins"]}),i.jsx("div",{className:"mt-3 flex flex-wrap gap-1",children:M.includedBots.map(B=>i.jsx("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-md bg-teal-50 text-[var(--brand-primary)] border border-teal-100",children:B},B))})]},M.id))})]})}function _h({label:e,value:t,onChange:n}){return i.jsxs("label",{className:"block space-y-1.5",children:[i.jsx("span",{className:"text-xs font-semibold text-slate-400",children:e}),i.jsx("input",{type:"number",value:t,onChange:a=>n(Number(a.target.value)),className:"w-full px-3 py-2.5 rounded-xl bg-slate-50 border border-slate-200 text-slate-900 text-sm"})]})}function dA(){return i.jsx("div",{className:"min-h-dvh flex items-center justify-center bg-[#070b12]",children:i.jsx("div",{className:"w-9 h-9 rounded-full border-2 border-amber-400 border-t-transparent animate-spin"})})}function Dh({children:e}){const{loading:t,authenticated:n}=vf();return t?i.jsx(dA,{}):n?i.jsx(i.Fragment,{children:e}):i.jsx(Gt,{to:"/superadmin/login",replace:!0})}function Qee({children:e}){const{loading:t,authenticated:n}=vf();return t?i.jsx(dA,{}):n?i.jsx(Gt,{to:"/superadmin/dashboard",replace:!0}):i.jsx(i.Fragment,{children:e})}function Jee(){return i.jsxs(Fm,{children:[i.jsx(ft,{path:"/",element:i.jsx(Gt,{to:"/superadmin/login",replace:!0})}),i.jsx(ft,{path:"/login",element:i.jsx(Qee,{children:i.jsx(Fee,{})})}),i.jsx(ft,{path:"/dashboard",element:i.jsx(Dh,{children:i.jsx(Vee,{})})}),i.jsx(ft,{path:"/tenants",element:i.jsx(Dh,{children:i.jsx(qee,{})})}),i.jsx(ft,{path:"/tenants/:id",element:i.jsx(Dh,{children:i.jsx(Yee,{})})}),i.jsx(ft,{path:"/packages",element:i.jsx(Dh,{children:i.jsx(Kee,{})})}),i.jsx(ft,{path:"*",element:i.jsx(Gt,{to:"/superadmin/dashboard",replace:!0})})]})}function Zee(){return i.jsx(Uee,{children:i.jsx(Jee,{})})}function ete(){return w.useEffect(()=>{Ug()},[]),i.jsx(QM,{children:i.jsx(DV,{children:i.jsx(TV,{children:i.jsxs(Fm,{children:[i.jsx(ft,{path:"/superadmin/*",element:i.jsx(Zee,{})}),i.jsx(ft,{path:"/admin/*",element:i.jsx(Nee,{})}),i.jsx(ft,{path:"/*",element:i.jsx(eB,{children:i.jsx(cZ,{})})})]})})})})}TT.createRoot(document.getElementById("root")).render(i.jsx(w.StrictMode,{children:i.jsx(ete,{})}));export{fj as _,tte as c,G7 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.