yamchart 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DMGAHFXP.js → chunk-23E6YT4S.js} +137 -2
- package/dist/chunk-23E6YT4S.js.map +1 -0
- package/dist/{chunk-6PGM2RLB.js → chunk-6XQITSPY.js} +4 -4
- package/dist/{chunk-HKPB7YHA.js → chunk-R7EULFJG.js} +6 -4
- package/dist/chunk-R7EULFJG.js.map +1 -0
- package/dist/{chunk-ZWLCG3KF.js → chunk-UDJXQQKL.js} +3 -3
- package/dist/{connection-utils-RQT2X365.js → connection-utils-U6MCBYCX.js} +4 -4
- package/dist/{describe-ESHPHGUD.js → describe-LTV7YMPM.js} +4 -4
- package/dist/{dev-2Z5XKOIX.js → dev-WS4UALYA.js} +74 -4
- package/dist/dev-WS4UALYA.js.map +1 -0
- package/dist/{dist-A7VMHB26.js → dist-LJOCG7C5.js} +10 -2
- package/dist/index.js +12 -12
- package/dist/public/assets/LoginPage-8kMwzXQY.js +1 -0
- package/dist/public/assets/PublicViewer-CCd0694Q.js +1 -0
- package/dist/public/assets/SetupWizard-FRVXmmVV.js +1 -0
- package/dist/public/assets/ShareManagement-WkjpLgIb.js +1 -0
- package/dist/public/assets/UserManagement-Yir6iim5.js +1 -0
- package/dist/public/assets/echarts-DtOYsfLX.js +69 -0
- package/dist/public/assets/html2canvas.esm-QH1iLAAe.js +22 -0
- package/dist/public/assets/index-BPNqaKrL.js +164 -0
- package/dist/public/assets/{index-BdDjt21o.css → index-DIn_Wjra.css} +1 -1
- package/dist/public/assets/{index.es-DEvvmhig.js → index.es-CkGh6XRY.js} +2 -2
- package/dist/public/assets/jspdf.es.min-BllGrT6z.js +170 -0
- package/dist/public/index.html +3 -2
- package/dist/{query-5VJ75PZ2.js → query-J2SD4BID.js} +4 -4
- package/dist/{sample-XO2LUSL4.js → sample-3PF7ZJFO.js} +4 -4
- package/dist/{search-AKDGIJT6.js → search-IUXXHMPL.js} +4 -4
- package/dist/{tables-5INA5OWJ.js → tables-I3WOUJ2I.js} +4 -4
- package/dist/{test-ZZRTZ34Y.js → test-IL3UPLUJ.js} +2 -2
- package/package.json +4 -4
- package/dist/chunk-DMGAHFXP.js.map +0 -1
- package/dist/chunk-HKPB7YHA.js.map +0 -1
- package/dist/dev-2Z5XKOIX.js.map +0 -1
- package/dist/public/assets/index-DOHcGC4w.js +0 -430
- /package/dist/{chunk-6PGM2RLB.js.map → chunk-6XQITSPY.js.map} +0 -0
- /package/dist/{chunk-ZWLCG3KF.js.map → chunk-UDJXQQKL.js.map} +0 -0
- /package/dist/{connection-utils-RQT2X365.js.map → connection-utils-U6MCBYCX.js.map} +0 -0
- /package/dist/{describe-ESHPHGUD.js.map → describe-LTV7YMPM.js.map} +0 -0
- /package/dist/{dist-A7VMHB26.js.map → dist-LJOCG7C5.js.map} +0 -0
- /package/dist/{query-5VJ75PZ2.js.map → query-J2SD4BID.js.map} +0 -0
- /package/dist/{sample-XO2LUSL4.js.map → sample-3PF7ZJFO.js.map} +0 -0
- /package/dist/{search-AKDGIJT6.js.map → search-IUXXHMPL.js.map} +0 -0
- /package/dist/{tables-5INA5OWJ.js.map → tables-I3WOUJ2I.js.map} +0 -0
- /package/dist/{test-ZZRTZ34Y.js.map → test-IL3UPLUJ.js.map} +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginPage-8kMwzXQY.js","assets/echarts-DtOYsfLX.js","assets/SetupWizard-FRVXmmVV.js","assets/UserManagement-Yir6iim5.js","assets/ShareManagement-WkjpLgIb.js","assets/PublicViewer-CCd0694Q.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Dv=Object.defineProperty;var Ug=e=>{throw TypeError(e)};var Av=(e,t,n)=>t in e?Dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>Av(e,typeof t!="symbol"?t+"":t,n),Yf=(e,t,n)=>t.has(e)||Ug("Cannot "+n);var z=(e,t,n)=>(Yf(e,t,"read from private field"),n?n.call(e):t.get(e)),ve=(e,t,n)=>t.has(e)?Ug("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ye=(e,t,n,r)=>(Yf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Be=(e,t,n)=>(Yf(e,t,"access private method"),n);var sc=(e,t,n,r)=>({set _(a){ye(e,t,a,n)},get _(){return z(e,t,r)}});import{r as ti,a as L,R as Ee,E as Iv,g as gb}from"./echarts-DtOYsfLX.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var qf={exports:{}},Zo={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var zg;function Rv(){if(zg)return Zo;zg=1;var e=ti(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,h){var p,m={},x=null,E=null;h!==void 0&&(x=""+h),d.key!==void 0&&(x=""+d.key),d.ref!==void 0&&(E=d.ref);for(p in d)r.call(d,p)&&!o.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:x,ref:E,props:m,_owner:a.current}}return Zo.Fragment=n,Zo.jsx=l,Zo.jsxs=l,Zo}var Wg;function Lv(){return Wg||(Wg=1,qf.exports=Rv()),qf.exports}var g=Lv(),ac={},$f={exports:{}},Vn={},Vf={exports:{}},Qf={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* scheduler.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Yg;function Pv(){return Yg||(Yg=1,(function(e){function t(J,te){var R=J.length;J.push(te);e:for(;0<R;){var ie=R-1>>>1,he=J[ie];if(0<a(he,te))J[ie]=te,J[R]=he,R=ie;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var te=J[0],R=J.pop();if(R!==te){J[0]=R;e:for(var ie=0,he=J.length,U=he>>>1;ie<U;){var Ie=2*(ie+1)-1,ze=J[Ie],Ae=Ie+1,ct=J[Ae];if(0>a(ze,R))Ae<he&&0>a(ct,ze)?(J[ie]=ct,J[Ae]=R,ie=Ae):(J[ie]=ze,J[Ie]=R,ie=Ie);else if(Ae<he&&0>a(ct,R))J[ie]=ct,J[Ae]=R,ie=Ae;else break e}}return te}function a(J,te){var R=J.sortIndex-te.sortIndex;return R!==0?R:J.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],h=[],p=1,m=null,x=3,E=!1,_=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(J){for(var te=n(h);te!==null;){if(te.callback===null)r(h);else if(te.startTime<=J)r(h),te.sortIndex=te.expirationTime,t(d,te);else break;te=n(h)}}function A(J){if(S=!1,N(J),!_)if(n(d)!==null)_=!0,$(M);else{var te=n(h);te!==null&&se(A,te.startTime-J)}}function M(J,te){_=!1,S&&(S=!1,v(I),I=-1),E=!0;var R=x;try{for(N(te),m=n(d);m!==null&&(!(m.expirationTime>te)||J&&!F());){var ie=m.callback;if(typeof ie=="function"){m.callback=null,x=m.priorityLevel;var he=ie(m.expirationTime<=te);te=e.unstable_now(),typeof he=="function"?m.callback=he:m===n(d)&&r(d),N(te)}else r(d);m=n(d)}if(m!==null)var U=!0;else{var Ie=n(h);Ie!==null&&se(A,Ie.startTime-te),U=!1}return U}finally{m=null,x=R,E=!1}}var k=!1,O=null,I=-1,P=5,H=-1;function F(){return!(e.unstable_now()-H<P)}function Y(){if(O!==null){var J=e.unstable_now();H=J;var te=!0;try{te=O(!0,J)}finally{te?G():(k=!1,O=null)}}else k=!1}var G;if(typeof C=="function")G=function(){C(Y)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,K=X.port2;X.port1.onmessage=Y,G=function(){K.postMessage(null)}}else G=function(){w(Y,0)};function $(J){O=J,k||(k=!0,G())}function se(J,te){I=w(function(){J(e.unstable_now())},te)}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(J){J.callback=null},e.unstable_continueExecution=function(){_||E||(_=!0,$(M))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var R=x;x=te;try{return J()}finally{x=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,te){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var R=x;x=J;try{return te()}finally{x=R}},e.unstable_scheduleCallback=function(J,te,R){var ie=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?ie+R:ie):R=ie,J){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=R+he,J={id:p++,callback:te,priorityLevel:J,startTime:R,expirationTime:he,sortIndex:-1},R>ie?(J.sortIndex=R,t(h,J),n(d)===null&&J===n(h)&&(S?(v(I),I=-1):S=!0,se(A,R-ie))):(J.sortIndex=he,t(d,J),_||E||(_=!0,$(M))),J},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(J){var te=x;return function(){var R=x;x=te;try{return J.apply(this,arguments)}finally{x=R}}}})(Qf)),Qf}var qg;function Mv(){return qg||(qg=1,Vf.exports=Pv()),Vf.exports}/**
|
|
19
|
+
* @license React
|
|
20
|
+
* react-dom.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var $g;function Fv(){if($g)return Vn;$g=1;var e=ti(),t=Mv();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,u=1;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function o(s,i){l(s,i),l(s+"Capture",i)}function l(s,i){for(a[s]=i,s=0;s<i.length;s++)r.add(i[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function x(s){return d.call(m,s)?!0:d.call(p,s)?!1:h.test(s)?m[s]=!0:(p[s]=!0,!1)}function E(s,i,u,f){if(u!==null&&u.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function _(s,i,u,f){if(i===null||typeof i>"u"||E(s,i,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(s,i,u,f,b,T,D){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=b,this.mustUseProperty=u,this.propertyName=s,this.type=i,this.sanitizeURL=T,this.removeEmptyString=D}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){w[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];w[i]=new S(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){w[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){w[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){w[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){w[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){w[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){w[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){w[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function C(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(v,C);w[i]=new S(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(v,C);w[i]=new S(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(v,C);w[i]=new S(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){w[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){w[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function N(s,i,u,f){var b=w.hasOwnProperty(i)?w[i]:null;(b!==null?b.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(_(i,u,b,f)&&(u=null),f||b===null?x(i)&&(u===null?s.removeAttribute(i):s.setAttribute(i,""+u)):b.mustUseProperty?s[b.propertyName]=u===null?b.type===3?!1:"":u:(i=b.attributeName,f=b.attributeNamespace,u===null?s.removeAttribute(i):(b=b.type,u=b===3||b===4&&u===!0?"":""+u,f?s.setAttributeNS(f,i,u):s.setAttribute(i,u))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=Symbol.for("react.element"),k=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),F=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function te(s){return s===null||typeof s!="object"?null:(s=J&&s[J]||s["@@iterator"],typeof s=="function"?s:null)}var R=Object.assign,ie;function he(s){if(ie===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);ie=i&&i[1]||""}return`
|
|
27
|
+
`+ie+s}var U=!1;function Ie(s,i){if(!s||U)return"";U=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(re){var f=re}Reflect.construct(s,[],i)}else{try{i.call()}catch(re){f=re}s.call(i.prototype)}else{try{throw Error()}catch(re){f=re}s()}}catch(re){if(re&&f&&typeof re.stack=="string"){for(var b=re.stack.split(`
|
|
28
|
+
`),T=f.stack.split(`
|
|
29
|
+
`),D=b.length-1,W=T.length-1;1<=D&&0<=W&&b[D]!==T[W];)W--;for(;1<=D&&0<=W;D--,W--)if(b[D]!==T[W]){if(D!==1||W!==1)do if(D--,W--,0>W||b[D]!==T[W]){var V=`
|
|
30
|
+
`+b[D].replace(" at new "," at ");return s.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",s.displayName)),V}while(1<=D&&0<=W);break}}}finally{U=!1,Error.prepareStackTrace=u}return(s=s?s.displayName||s.name:"")?he(s):""}function ze(s){switch(s.tag){case 5:return he(s.type);case 16:return he("Lazy");case 13:return he("Suspense");case 19:return he("SuspenseList");case 0:case 2:case 15:return s=Ie(s.type,!1),s;case 11:return s=Ie(s.type.render,!1),s;case 1:return s=Ie(s.type,!0),s;default:return""}}function Ae(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case k:return"Portal";case P:return"Profiler";case I:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case F:return(s.displayName||"Context")+".Consumer";case H:return(s._context.displayName||"Context")+".Provider";case Y:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case K:return i=s.displayName||null,i!==null?i:Ae(s.type)||"Memo";case $:i=s._payload,s=s._init;try{return Ae(s(i))}catch{}}return null}function ct(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(i);case 8:return i===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function tt(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ke(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function st(s){var i=Ke(s)?"checked":"value",u=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var b=u.get,T=u.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return b.call(this)},set:function(D){f=""+D,T.call(this,D)}}),Object.defineProperty(s,i,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(D){f=""+D},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function Je(s){s._valueTracker||(s._valueTracker=st(s))}function pn(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var u=i.getValue(),f="";return s&&(f=Ke(s)?s.checked?"true":"false":s.value),s=f,s!==u?(i.setValue(s),!0):!1}function Gt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function jn(s,i){var u=i.checked;return R({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??s._wrapperState.initialChecked})}function tn(s,i){var u=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;u=tt(i.value!=null?i.value:u),s._wrapperState={initialChecked:f,initialValue:u,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function nn(s,i){i=i.checked,i!=null&&N(s,"checked",i,!1)}function mn(s,i){nn(s,i);var u=tt(i.value),f=i.type;if(u!=null)f==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+u):s.value!==""+u&&(s.value=""+u);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?at(s,i.type,u):i.hasOwnProperty("defaultValue")&&at(s,i.type,tt(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function er(s,i,u){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,u||i===s.value||(s.value=i),s.defaultValue=i}u=s.name,u!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,u!==""&&(s.name=u)}function at(s,i,u){(i!=="number"||Gt(s.ownerDocument)!==s)&&(u==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+u&&(s.defaultValue=""+u))}var Ze=Array.isArray;function Et(s,i,u,f){if(s=s.options,i){i={};for(var b=0;b<u.length;b++)i["$"+u[b]]=!0;for(u=0;u<s.length;u++)b=i.hasOwnProperty("$"+s[u].value),s[u].selected!==b&&(s[u].selected=b),b&&f&&(s[u].defaultSelected=!0)}else{for(u=""+tt(u),i=null,b=0;b<s.length;b++){if(s[b].value===u){s[b].selected=!0,f&&(s[b].defaultSelected=!0);return}i!==null||s[b].disabled||(i=s[b])}i!==null&&(i.selected=!0)}}function Nt(s,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},i,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function on(s,i){var u=i.value;if(u==null){if(u=i.children,i=i.defaultValue,u!=null){if(i!=null)throw Error(n(92));if(Ze(u)){if(1<u.length)throw Error(n(93));u=u[0]}i=u}i==null&&(i=""),u=i}s._wrapperState={initialValue:tt(u)}}function tr(s,i){var u=tt(i.value),f=tt(i.defaultValue);u!=null&&(u=""+u,u!==s.value&&(s.value=u),i.defaultValue==null&&s.defaultValue!==u&&(s.defaultValue=u)),f!=null&&(s.defaultValue=""+f)}function un(s){var i=s.textContent;i===s._wrapperState.initialValue&&i!==""&&i!==null&&(s.value=i)}function oe(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(s,i){return s==null||s==="http://www.w3.org/1999/xhtml"?oe(i):s==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Ne,je=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,u,f,b){MSApp.execUnsafeLocalFunction(function(){return s(i,u,f,b)})}:s})(function(s,i){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=i;else{for(Ne=Ne||document.createElement("div"),Ne.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ne.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;i.firstChild;)s.appendChild(i.firstChild)}});function qe(s,i){if(i){var u=s.firstChild;if(u&&u===s.lastChild&&u.nodeType===3){u.nodeValue=i;return}}s.textContent=i}var gt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zt=["Webkit","ms","Moz","O"];Object.keys(gt).forEach(function(s){zt.forEach(function(i){i=i+s.charAt(0).toUpperCase()+s.substring(1),gt[i]=gt[s]})});function rn(s,i,u){return i==null||typeof i=="boolean"||i===""?"":u||typeof i!="number"||i===0||gt.hasOwnProperty(s)&>[s]?(""+i).trim():i+"px"}function _n(s,i){s=s.style;for(var u in i)if(i.hasOwnProperty(u)){var f=u.indexOf("--")===0,b=rn(u,i[u],f);u==="float"&&(u="cssFloat"),f?s.setProperty(u,b):s[u]=b}}var Hn=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function At(s,i){if(i){if(Hn[s]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function yt(s,i){if(s.indexOf("-")===-1)return typeof i.is=="string";switch(s){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 ln=null;function Sr(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Le=null,$e=null,be=null;function Se(s){if(s=Bo(s)){if(typeof Le!="function")throw Error(n(280));var i=s.stateNode;i&&(i=El(i),Le(s.stateNode,s.type,i))}}function Ge(s){$e?be?be.push(s):be=[s]:$e=s}function _e(){if($e){var s=$e,i=be;if(be=$e=null,Se(s),i)for(s=0;s<i.length;s++)Se(i[s])}}function It(s,i){return s(i)}function Wt(){}var Yt=!1;function Rt(s,i,u){if(Yt)return s(i,u);Yt=!0;try{return It(s,i,u)}finally{Yt=!1,($e!==null||be!==null)&&(Wt(),_e())}}function qt(s,i){var u=s.stateNode;if(u===null)return null;var f=El(u);if(f===null)return null;u=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var Cn=!1;if(c)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){Cn=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Cn=!1}function Ur(s,i,u,f,b,T,D,W,V){var re=Array.prototype.slice.call(arguments,3);try{i.apply(u,re)}catch(ce){this.onError(ce)}}var Ce=!1,We=null,Pe=!1,et=null,dt={onError:function(s){Ce=!0,We=s}};function it(s,i,u,f,b,T,D,W,V){Ce=!1,We=null,Ur.apply(dt,arguments)}function xt(s,i,u,f,b,T,D,W,V){if(it.apply(this,arguments),Ce){if(Ce){var re=We;Ce=!1,We=null}else throw Error(n(198));Pe||(Pe=!0,et=re)}}function Tt(s){var i=s,u=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(u=i.return),s=i.return;while(s)}return i.tag===3?u:null}function bt(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function cn(s){if(Tt(s)!==s)throw Error(n(188))}function oi(s){var i=s.alternate;if(!i){if(i=Tt(s),i===null)throw Error(n(188));return i!==s?null:s}for(var u=s,f=i;;){var b=u.return;if(b===null)break;var T=b.alternate;if(T===null){if(f=b.return,f!==null){u=f;continue}break}if(b.child===T.child){for(T=b.child;T;){if(T===u)return cn(b),s;if(T===f)return cn(b),i;T=T.sibling}throw Error(n(188))}if(u.return!==f.return)u=b,f=T;else{for(var D=!1,W=b.child;W;){if(W===u){D=!0,u=b,f=T;break}if(W===f){D=!0,f=b,u=T;break}W=W.sibling}if(!D){for(W=T.child;W;){if(W===u){D=!0,u=T,f=b;break}if(W===f){D=!0,f=T,u=b;break}W=W.sibling}if(!D)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?s:i}function dr(s){return s=oi(s),s!==null?Os(s):null}function Os(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var i=Os(s);if(i!==null)return i;s=s.sibling}return null}var ba=t.unstable_scheduleCallback,vt=t.unstable_cancelCallback,Eo=t.unstable_shouldYield,ui=t.unstable_requestPaint,wt=t.unstable_now,Ju=t.unstable_getCurrentPriorityLevel,Ea=t.unstable_ImmediatePriority,gp=t.unstable_UserBlockingPriority,Zu=t.unstable_NormalPriority,Y2=t.unstable_LowPriority,yp=t.unstable_IdlePriority,el=null,zr=null;function q2(s){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(el,s,void 0,(s.current.flags&128)===128)}catch{}}var _r=Math.clz32?Math.clz32:Q2,$2=Math.log,V2=Math.LN2;function Q2(s){return s>>>=0,s===0?32:31-($2(s)/V2|0)|0}var tl=64,nl=4194304;function xo(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function rl(s,i){var u=s.pendingLanes;if(u===0)return 0;var f=0,b=s.suspendedLanes,T=s.pingedLanes,D=u&268435455;if(D!==0){var W=D&~b;W!==0?f=xo(W):(T&=D,T!==0&&(f=xo(T)))}else D=u&~b,D!==0?f=xo(D):T!==0&&(f=xo(T));if(f===0)return 0;if(i!==0&&i!==f&&(i&b)===0&&(b=f&-f,T=i&-i,b>=T||b===16&&(T&4194240)!==0))return i;if((f&4)!==0&&(f|=u&16),i=s.entangledLanes,i!==0)for(s=s.entanglements,i&=f;0<i;)u=31-_r(i),b=1<<u,f|=s[u],i&=~b;return f}function G2(s,i){switch(s){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function X2(s,i){for(var u=s.suspendedLanes,f=s.pingedLanes,b=s.expirationTimes,T=s.pendingLanes;0<T;){var D=31-_r(T),W=1<<D,V=b[D];V===-1?((W&u)===0||(W&f)!==0)&&(b[D]=G2(W,i)):V<=i&&(s.expiredLanes|=W),T&=~W}}function cd(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function bp(){var s=tl;return tl<<=1,(tl&4194240)===0&&(tl=64),s}function dd(s){for(var i=[],u=0;31>u;u++)i.push(s);return i}function To(s,i,u){s.pendingLanes|=i,i!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,i=31-_r(i),s[i]=u}function K2(s,i){var u=s.pendingLanes&~i;s.pendingLanes=i,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=i,s.mutableReadLanes&=i,s.entangledLanes&=i,i=s.entanglements;var f=s.eventTimes;for(s=s.expirationTimes;0<u;){var b=31-_r(u),T=1<<b;i[b]=0,f[b]=-1,s[b]=-1,u&=~T}}function fd(s,i){var u=s.entangledLanes|=i;for(s=s.entanglements;u;){var f=31-_r(u),b=1<<f;b&i|s[f]&i&&(s[f]|=i),u&=~b}}var pt=0;function Ep(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var xp,hd,Tp,vp,wp,pd=!1,sl=[],Ds=null,As=null,Is=null,vo=new Map,wo=new Map,Rs=[],J2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Sp(s,i){switch(s){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Is=null;break;case"pointerover":case"pointerout":vo.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":wo.delete(i.pointerId)}}function So(s,i,u,f,b,T){return s===null||s.nativeEvent!==T?(s={blockedOn:i,domEventName:u,eventSystemFlags:f,nativeEvent:T,targetContainers:[b]},i!==null&&(i=Bo(i),i!==null&&hd(i)),s):(s.eventSystemFlags|=f,i=s.targetContainers,b!==null&&i.indexOf(b)===-1&&i.push(b),s)}function Z2(s,i,u,f,b){switch(i){case"focusin":return Ds=So(Ds,s,i,u,f,b),!0;case"dragenter":return As=So(As,s,i,u,f,b),!0;case"mouseover":return Is=So(Is,s,i,u,f,b),!0;case"pointerover":var T=b.pointerId;return vo.set(T,So(vo.get(T)||null,s,i,u,f,b)),!0;case"gotpointercapture":return T=b.pointerId,wo.set(T,So(wo.get(T)||null,s,i,u,f,b)),!0}return!1}function _p(s){var i=xa(s.target);if(i!==null){var u=Tt(i);if(u!==null){if(i=u.tag,i===13){if(i=bt(u),i!==null){s.blockedOn=i,wp(s.priority,function(){Tp(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){s.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}s.blockedOn=null}function al(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var u=gd(s.domEventName,s.eventSystemFlags,i[0],s.nativeEvent);if(u===null){u=s.nativeEvent;var f=new u.constructor(u.type,u);ln=f,u.target.dispatchEvent(f),ln=null}else return i=Bo(u),i!==null&&hd(i),s.blockedOn=u,!1;i.shift()}return!0}function Cp(s,i,u){al(s)&&u.delete(i)}function eT(){pd=!1,Ds!==null&&al(Ds)&&(Ds=null),As!==null&&al(As)&&(As=null),Is!==null&&al(Is)&&(Is=null),vo.forEach(Cp),wo.forEach(Cp)}function _o(s,i){s.blockedOn===i&&(s.blockedOn=null,pd||(pd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,eT)))}function Co(s){function i(b){return _o(b,s)}if(0<sl.length){_o(sl[0],s);for(var u=1;u<sl.length;u++){var f=sl[u];f.blockedOn===s&&(f.blockedOn=null)}}for(Ds!==null&&_o(Ds,s),As!==null&&_o(As,s),Is!==null&&_o(Is,s),vo.forEach(i),wo.forEach(i),u=0;u<Rs.length;u++)f=Rs[u],f.blockedOn===s&&(f.blockedOn=null);for(;0<Rs.length&&(u=Rs[0],u.blockedOn===null);)_p(u),u.blockedOn===null&&Rs.shift()}var li=A.ReactCurrentBatchConfig,il=!0;function tT(s,i,u,f){var b=pt,T=li.transition;li.transition=null;try{pt=1,md(s,i,u,f)}finally{pt=b,li.transition=T}}function nT(s,i,u,f){var b=pt,T=li.transition;li.transition=null;try{pt=4,md(s,i,u,f)}finally{pt=b,li.transition=T}}function md(s,i,u,f){if(il){var b=gd(s,i,u,f);if(b===null)Rd(s,i,f,ol,u),Sp(s,f);else if(Z2(b,s,i,u,f))f.stopPropagation();else if(Sp(s,f),i&4&&-1<J2.indexOf(s)){for(;b!==null;){var T=Bo(b);if(T!==null&&xp(T),T=gd(s,i,u,f),T===null&&Rd(s,i,f,ol,u),T===b)break;b=T}b!==null&&f.stopPropagation()}else Rd(s,i,f,null,u)}}var ol=null;function gd(s,i,u,f){if(ol=null,s=Sr(f),s=xa(s),s!==null)if(i=Tt(s),i===null)s=null;else if(u=i.tag,u===13){if(s=bt(i),s!==null)return s;s=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null);return ol=s,null}function kp(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ju()){case Ea:return 1;case gp:return 4;case Zu:case Y2:return 16;case yp:return 536870912;default:return 16}default:return 16}}var Ls=null,yd=null,ul=null;function Np(){if(ul)return ul;var s,i=yd,u=i.length,f,b="value"in Ls?Ls.value:Ls.textContent,T=b.length;for(s=0;s<u&&i[s]===b[s];s++);var D=u-s;for(f=1;f<=D&&i[u-f]===b[T-f];f++);return ul=b.slice(s,1<f?1-f:void 0)}function ll(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function cl(){return!0}function Op(){return!1}function nr(s){function i(u,f,b,T,D){this._reactName=u,this._targetInst=b,this.type=f,this.nativeEvent=T,this.target=D,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(u=s[W],this[W]=u?u(T):T[W]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?cl:Op,this.isPropagationStopped=Op,this}return R(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),i}var ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bd=nr(ci),ko=R({},ci,{view:0,detail:0}),rT=nr(ko),Ed,xd,No,dl=R({},ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vd,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==No&&(No&&s.type==="mousemove"?(Ed=s.screenX-No.screenX,xd=s.screenY-No.screenY):xd=Ed=0,No=s),Ed)},movementY:function(s){return"movementY"in s?s.movementY:xd}}),Dp=nr(dl),sT=R({},dl,{dataTransfer:0}),aT=nr(sT),iT=R({},ko,{relatedTarget:0}),Td=nr(iT),oT=R({},ci,{animationName:0,elapsedTime:0,pseudoElement:0}),uT=nr(oT),lT=R({},ci,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),cT=nr(lT),dT=R({},ci,{data:0}),Ap=nr(dT),fT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hT={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"},pT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mT(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=pT[s])?!!i[s]:!1}function vd(){return mT}var gT=R({},ko,{key:function(s){if(s.key){var i=fT[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=ll(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?hT[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vd,charCode:function(s){return s.type==="keypress"?ll(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ll(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),yT=nr(gT),bT=R({},dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ip=nr(bT),ET=R({},ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vd}),xT=nr(ET),TT=R({},ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),vT=nr(TT),wT=R({},dl,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),ST=nr(wT),_T=[9,13,27,32],wd=c&&"CompositionEvent"in window,Oo=null;c&&"documentMode"in document&&(Oo=document.documentMode);var CT=c&&"TextEvent"in window&&!Oo,Rp=c&&(!wd||Oo&&8<Oo&&11>=Oo),Lp=" ",Pp=!1;function Mp(s,i){switch(s){case"keyup":return _T.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var di=!1;function kT(s,i){switch(s){case"compositionend":return Fp(i);case"keypress":return i.which!==32?null:(Pp=!0,Lp);case"textInput":return s=i.data,s===Lp&&Pp?null:s;default:return null}}function NT(s,i){if(di)return s==="compositionend"||!wd&&Mp(s,i)?(s=Np(),ul=yd=Ls=null,di=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Rp&&i.locale!=="ko"?null:i.data;default:return null}}var OT={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 Bp(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!OT[s.type]:i==="textarea"}function jp(s,i,u,f){Ge(f),i=gl(i,"onChange"),0<i.length&&(u=new bd("onChange","change",null,u,f),s.push({event:u,listeners:i}))}var Do=null,Ao=null;function DT(s){rm(s,0)}function fl(s){var i=gi(s);if(pn(i))return s}function AT(s,i){if(s==="change")return i}var Hp=!1;if(c){var Sd;if(c){var _d="oninput"in document;if(!_d){var Up=document.createElement("div");Up.setAttribute("oninput","return;"),_d=typeof Up.oninput=="function"}Sd=_d}else Sd=!1;Hp=Sd&&(!document.documentMode||9<document.documentMode)}function zp(){Do&&(Do.detachEvent("onpropertychange",Wp),Ao=Do=null)}function Wp(s){if(s.propertyName==="value"&&fl(Ao)){var i=[];jp(i,Ao,s,Sr(s)),Rt(DT,i)}}function IT(s,i,u){s==="focusin"?(zp(),Do=i,Ao=u,Do.attachEvent("onpropertychange",Wp)):s==="focusout"&&zp()}function RT(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return fl(Ao)}function LT(s,i){if(s==="click")return fl(i)}function PT(s,i){if(s==="input"||s==="change")return fl(i)}function MT(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var Cr=typeof Object.is=="function"?Object.is:MT;function Io(s,i){if(Cr(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var u=Object.keys(s),f=Object.keys(i);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var b=u[f];if(!d.call(i,b)||!Cr(s[b],i[b]))return!1}return!0}function Yp(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function qp(s,i){var u=Yp(s);s=0;for(var f;u;){if(u.nodeType===3){if(f=s+u.textContent.length,s<=i&&f>=i)return{node:u,offset:i-s};s=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Yp(u)}}function $p(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?$p(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function Vp(){for(var s=window,i=Gt();i instanceof s.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)s=i.contentWindow;else break;i=Gt(s.document)}return i}function Cd(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}function FT(s){var i=Vp(),u=s.focusedElem,f=s.selectionRange;if(i!==u&&u&&u.ownerDocument&&$p(u.ownerDocument.documentElement,u)){if(f!==null&&Cd(u)){if(i=f.start,s=f.end,s===void 0&&(s=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(s,u.value.length);else if(s=(i=u.ownerDocument||document)&&i.defaultView||window,s.getSelection){s=s.getSelection();var b=u.textContent.length,T=Math.min(f.start,b);f=f.end===void 0?T:Math.min(f.end,b),!s.extend&&T>f&&(b=f,f=T,T=b),b=qp(u,T);var D=qp(u,f);b&&D&&(s.rangeCount!==1||s.anchorNode!==b.node||s.anchorOffset!==b.offset||s.focusNode!==D.node||s.focusOffset!==D.offset)&&(i=i.createRange(),i.setStart(b.node,b.offset),s.removeAllRanges(),T>f?(s.addRange(i),s.extend(D.node,D.offset)):(i.setEnd(D.node,D.offset),s.addRange(i)))}}for(i=[],s=u;s=s.parentNode;)s.nodeType===1&&i.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<i.length;u++)s=i[u],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var BT=c&&"documentMode"in document&&11>=document.documentMode,fi=null,kd=null,Ro=null,Nd=!1;function Qp(s,i,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Nd||fi==null||fi!==Gt(f)||(f=fi,"selectionStart"in f&&Cd(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ro&&Io(Ro,f)||(Ro=f,f=gl(kd,"onSelect"),0<f.length&&(i=new bd("onSelect","select",null,i,u),s.push({event:i,listeners:f}),i.target=fi)))}function hl(s,i){var u={};return u[s.toLowerCase()]=i.toLowerCase(),u["Webkit"+s]="webkit"+i,u["Moz"+s]="moz"+i,u}var hi={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionend:hl("Transition","TransitionEnd")},Od={},Gp={};c&&(Gp=document.createElement("div").style,"AnimationEvent"in window||(delete hi.animationend.animation,delete hi.animationiteration.animation,delete hi.animationstart.animation),"TransitionEvent"in window||delete hi.transitionend.transition);function pl(s){if(Od[s])return Od[s];if(!hi[s])return s;var i=hi[s],u;for(u in i)if(i.hasOwnProperty(u)&&u in Gp)return Od[s]=i[u];return s}var Xp=pl("animationend"),Kp=pl("animationiteration"),Jp=pl("animationstart"),Zp=pl("transitionend"),em=new Map,tm="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ps(s,i){em.set(s,i),o(i,[s])}for(var Dd=0;Dd<tm.length;Dd++){var Ad=tm[Dd],jT=Ad.toLowerCase(),HT=Ad[0].toUpperCase()+Ad.slice(1);Ps(jT,"on"+HT)}Ps(Xp,"onAnimationEnd"),Ps(Kp,"onAnimationIteration"),Ps(Jp,"onAnimationStart"),Ps("dblclick","onDoubleClick"),Ps("focusin","onFocus"),Ps("focusout","onBlur"),Ps(Zp,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lo="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(" "),UT=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lo));function nm(s,i,u){var f=s.type||"unknown-event";s.currentTarget=u,xt(f,i,void 0,s),s.currentTarget=null}function rm(s,i){i=(i&4)!==0;for(var u=0;u<s.length;u++){var f=s[u],b=f.event;f=f.listeners;e:{var T=void 0;if(i)for(var D=f.length-1;0<=D;D--){var W=f[D],V=W.instance,re=W.currentTarget;if(W=W.listener,V!==T&&b.isPropagationStopped())break e;nm(b,W,re),T=V}else for(D=0;D<f.length;D++){if(W=f[D],V=W.instance,re=W.currentTarget,W=W.listener,V!==T&&b.isPropagationStopped())break e;nm(b,W,re),T=V}}}if(Pe)throw s=et,Pe=!1,et=null,s}function Ot(s,i){var u=i[jd];u===void 0&&(u=i[jd]=new Set);var f=s+"__bubble";u.has(f)||(sm(i,s,2,!1),u.add(f))}function Id(s,i,u){var f=0;i&&(f|=4),sm(u,s,f,i)}var ml="_reactListening"+Math.random().toString(36).slice(2);function Po(s){if(!s[ml]){s[ml]=!0,r.forEach(function(u){u!=="selectionchange"&&(UT.has(u)||Id(u,!1,s),Id(u,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[ml]||(i[ml]=!0,Id("selectionchange",!1,i))}}function sm(s,i,u,f){switch(kp(i)){case 1:var b=tT;break;case 4:b=nT;break;default:b=md}u=b.bind(null,i,u,s),b=void 0,!Cn||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(b=!0),f?b!==void 0?s.addEventListener(i,u,{capture:!0,passive:b}):s.addEventListener(i,u,!0):b!==void 0?s.addEventListener(i,u,{passive:b}):s.addEventListener(i,u,!1)}function Rd(s,i,u,f,b){var T=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var D=f.tag;if(D===3||D===4){var W=f.stateNode.containerInfo;if(W===b||W.nodeType===8&&W.parentNode===b)break;if(D===4)for(D=f.return;D!==null;){var V=D.tag;if((V===3||V===4)&&(V=D.stateNode.containerInfo,V===b||V.nodeType===8&&V.parentNode===b))return;D=D.return}for(;W!==null;){if(D=xa(W),D===null)return;if(V=D.tag,V===5||V===6){f=T=D;continue e}W=W.parentNode}}f=f.return}Rt(function(){var re=T,ce=Sr(u),de=[];e:{var ue=em.get(s);if(ue!==void 0){var xe=bd,ke=s;switch(s){case"keypress":if(ll(u)===0)break e;case"keydown":case"keyup":xe=yT;break;case"focusin":ke="focus",xe=Td;break;case"focusout":ke="blur",xe=Td;break;case"beforeblur":case"afterblur":xe=Td;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":xe=Dp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=aT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=xT;break;case Xp:case Kp:case Jp:xe=uT;break;case Zp:xe=vT;break;case"scroll":xe=rT;break;case"wheel":xe=ST;break;case"copy":case"cut":case"paste":xe=cT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=Ip}var Oe=(i&4)!==0,Xt=!Oe&&s==="scroll",Z=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var Q=re,ne;Q!==null;){ne=Q;var ge=ne.stateNode;if(ne.tag===5&&ge!==null&&(ne=ge,Z!==null&&(ge=qt(Q,Z),ge!=null&&Oe.push(Mo(Q,ge,ne)))),Xt)break;Q=Q.return}0<Oe.length&&(ue=new xe(ue,ke,null,u,ce),de.push({event:ue,listeners:Oe}))}}if((i&7)===0){e:{if(ue=s==="mouseover"||s==="pointerover",xe=s==="mouseout"||s==="pointerout",ue&&u!==ln&&(ke=u.relatedTarget||u.fromElement)&&(xa(ke)||ke[ls]))break e;if((xe||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,xe?(ke=u.relatedTarget||u.toElement,xe=re,ke=ke?xa(ke):null,ke!==null&&(Xt=Tt(ke),ke!==Xt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(xe=null,ke=re),xe!==ke)){if(Oe=Dp,ge="onMouseLeave",Z="onMouseEnter",Q="mouse",(s==="pointerout"||s==="pointerover")&&(Oe=Ip,ge="onPointerLeave",Z="onPointerEnter",Q="pointer"),Xt=xe==null?ue:gi(xe),ne=ke==null?ue:gi(ke),ue=new Oe(ge,Q+"leave",xe,u,ce),ue.target=Xt,ue.relatedTarget=ne,ge=null,xa(ce)===re&&(Oe=new Oe(Z,Q+"enter",ke,u,ce),Oe.target=ne,Oe.relatedTarget=Xt,ge=Oe),Xt=ge,xe&&ke)t:{for(Oe=xe,Z=ke,Q=0,ne=Oe;ne;ne=pi(ne))Q++;for(ne=0,ge=Z;ge;ge=pi(ge))ne++;for(;0<Q-ne;)Oe=pi(Oe),Q--;for(;0<ne-Q;)Z=pi(Z),ne--;for(;Q--;){if(Oe===Z||Z!==null&&Oe===Z.alternate)break t;Oe=pi(Oe),Z=pi(Z)}Oe=null}else Oe=null;xe!==null&&am(de,ue,xe,Oe,!1),ke!==null&&Xt!==null&&am(de,Xt,ke,Oe,!0)}}e:{if(ue=re?gi(re):window,xe=ue.nodeName&&ue.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ue.type==="file")var De=AT;else if(Bp(ue))if(Hp)De=PT;else{De=RT;var Me=IT}else(xe=ue.nodeName)&&xe.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=LT);if(De&&(De=De(s,re))){jp(de,De,u,ce);break e}Me&&Me(s,ue,re),s==="focusout"&&(Me=ue._wrapperState)&&Me.controlled&&ue.type==="number"&&at(ue,"number",ue.value)}switch(Me=re?gi(re):window,s){case"focusin":(Bp(Me)||Me.contentEditable==="true")&&(fi=Me,kd=re,Ro=null);break;case"focusout":Ro=kd=fi=null;break;case"mousedown":Nd=!0;break;case"contextmenu":case"mouseup":case"dragend":Nd=!1,Qp(de,u,ce);break;case"selectionchange":if(BT)break;case"keydown":case"keyup":Qp(de,u,ce)}var Fe;if(wd)e:{switch(s){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else di?Mp(s,u)&&(He="onCompositionEnd"):s==="keydown"&&u.keyCode===229&&(He="onCompositionStart");He&&(Rp&&u.locale!=="ko"&&(di||He!=="onCompositionStart"?He==="onCompositionEnd"&&di&&(Fe=Np()):(Ls=ce,yd="value"in Ls?Ls.value:Ls.textContent,di=!0)),Me=gl(re,He),0<Me.length&&(He=new Ap(He,s,null,u,ce),de.push({event:He,listeners:Me}),Fe?He.data=Fe:(Fe=Fp(u),Fe!==null&&(He.data=Fe)))),(Fe=CT?kT(s,u):NT(s,u))&&(re=gl(re,"onBeforeInput"),0<re.length&&(ce=new Ap("onBeforeInput","beforeinput",null,u,ce),de.push({event:ce,listeners:re}),ce.data=Fe))}rm(de,i)})}function Mo(s,i,u){return{instance:s,listener:i,currentTarget:u}}function gl(s,i){for(var u=i+"Capture",f=[];s!==null;){var b=s,T=b.stateNode;b.tag===5&&T!==null&&(b=T,T=qt(s,u),T!=null&&f.unshift(Mo(s,T,b)),T=qt(s,i),T!=null&&f.push(Mo(s,T,b))),s=s.return}return f}function pi(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function am(s,i,u,f,b){for(var T=i._reactName,D=[];u!==null&&u!==f;){var W=u,V=W.alternate,re=W.stateNode;if(V!==null&&V===f)break;W.tag===5&&re!==null&&(W=re,b?(V=qt(u,T),V!=null&&D.unshift(Mo(u,V,W))):b||(V=qt(u,T),V!=null&&D.push(Mo(u,V,W)))),u=u.return}D.length!==0&&s.push({event:i,listeners:D})}var zT=/\r\n?/g,WT=/\u0000|\uFFFD/g;function im(s){return(typeof s=="string"?s:""+s).replace(zT,`
|
|
31
|
+
`).replace(WT,"")}function yl(s,i,u){if(i=im(i),im(s)!==i&&u)throw Error(n(425))}function bl(){}var Ld=null,Pd=null;function Md(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Fd=typeof setTimeout=="function"?setTimeout:void 0,YT=typeof clearTimeout=="function"?clearTimeout:void 0,om=typeof Promise=="function"?Promise:void 0,qT=typeof queueMicrotask=="function"?queueMicrotask:typeof om<"u"?function(s){return om.resolve(null).then(s).catch($T)}:Fd;function $T(s){setTimeout(function(){throw s})}function Bd(s,i){var u=i,f=0;do{var b=u.nextSibling;if(s.removeChild(u),b&&b.nodeType===8)if(u=b.data,u==="/$"){if(f===0){s.removeChild(b),Co(i);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=b}while(u);Co(i)}function Ms(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function um(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var u=s.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return s;i--}else u==="/$"&&i++}s=s.previousSibling}return null}var mi=Math.random().toString(36).slice(2),Wr="__reactFiber$"+mi,Fo="__reactProps$"+mi,ls="__reactContainer$"+mi,jd="__reactEvents$"+mi,VT="__reactListeners$"+mi,QT="__reactHandles$"+mi;function xa(s){var i=s[Wr];if(i)return i;for(var u=s.parentNode;u;){if(i=u[ls]||u[Wr]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(s=um(s);s!==null;){if(u=s[Wr])return u;s=um(s)}return i}s=u,u=s.parentNode}return null}function Bo(s){return s=s[Wr]||s[ls],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function gi(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function El(s){return s[Fo]||null}var Hd=[],yi=-1;function Fs(s){return{current:s}}function Dt(s){0>yi||(s.current=Hd[yi],Hd[yi]=null,yi--)}function St(s,i){yi++,Hd[yi]=s.current,s.current=i}var Bs={},kn=Fs(Bs),zn=Fs(!1),Ta=Bs;function bi(s,i){var u=s.type.contextTypes;if(!u)return Bs;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var b={},T;for(T in u)b[T]=i[T];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=b),b}function Wn(s){return s=s.childContextTypes,s!=null}function xl(){Dt(zn),Dt(kn)}function lm(s,i,u){if(kn.current!==Bs)throw Error(n(168));St(kn,i),St(zn,u)}function cm(s,i,u){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var b in f)if(!(b in i))throw Error(n(108,ct(s)||"Unknown",b));return R({},u,f)}function Tl(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Bs,Ta=kn.current,St(kn,s),St(zn,zn.current),!0}function dm(s,i,u){var f=s.stateNode;if(!f)throw Error(n(169));u?(s=cm(s,i,Ta),f.__reactInternalMemoizedMergedChildContext=s,Dt(zn),Dt(kn),St(kn,s)):Dt(zn),St(zn,u)}var cs=null,vl=!1,Ud=!1;function fm(s){cs===null?cs=[s]:cs.push(s)}function GT(s){vl=!0,fm(s)}function js(){if(!Ud&&cs!==null){Ud=!0;var s=0,i=pt;try{var u=cs;for(pt=1;s<u.length;s++){var f=u[s];do f=f(!0);while(f!==null)}cs=null,vl=!1}catch(b){throw cs!==null&&(cs=cs.slice(s+1)),ba(Ea,js),b}finally{pt=i,Ud=!1}}return null}var Ei=[],xi=0,wl=null,Sl=0,fr=[],hr=0,va=null,ds=1,fs="";function wa(s,i){Ei[xi++]=Sl,Ei[xi++]=wl,wl=s,Sl=i}function hm(s,i,u){fr[hr++]=ds,fr[hr++]=fs,fr[hr++]=va,va=s;var f=ds;s=fs;var b=32-_r(f)-1;f&=~(1<<b),u+=1;var T=32-_r(i)+b;if(30<T){var D=b-b%5;T=(f&(1<<D)-1).toString(32),f>>=D,b-=D,ds=1<<32-_r(i)+b|u<<b|f,fs=T+s}else ds=1<<T|u<<b|f,fs=s}function zd(s){s.return!==null&&(wa(s,1),hm(s,1,0))}function Wd(s){for(;s===wl;)wl=Ei[--xi],Ei[xi]=null,Sl=Ei[--xi],Ei[xi]=null;for(;s===va;)va=fr[--hr],fr[hr]=null,fs=fr[--hr],fr[hr]=null,ds=fr[--hr],fr[hr]=null}var rr=null,sr=null,Lt=!1,kr=null;function pm(s,i){var u=yr(5,null,null,0);u.elementType="DELETED",u.stateNode=i,u.return=s,i=s.deletions,i===null?(s.deletions=[u],s.flags|=16):i.push(u)}function mm(s,i){switch(s.tag){case 5:var u=s.type;return i=i.nodeType!==1||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,rr=s,sr=Ms(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,rr=s,sr=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(u=va!==null?{id:ds,overflow:fs}:null,s.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},u=yr(18,null,null,0),u.stateNode=i,u.return=s,s.child=u,rr=s,sr=null,!0):!1;default:return!1}}function Yd(s){return(s.mode&1)!==0&&(s.flags&128)===0}function qd(s){if(Lt){var i=sr;if(i){var u=i;if(!mm(s,i)){if(Yd(s))throw Error(n(418));i=Ms(u.nextSibling);var f=rr;i&&mm(s,i)?pm(f,u):(s.flags=s.flags&-4097|2,Lt=!1,rr=s)}}else{if(Yd(s))throw Error(n(418));s.flags=s.flags&-4097|2,Lt=!1,rr=s}}}function gm(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;rr=s}function _l(s){if(s!==rr)return!1;if(!Lt)return gm(s),Lt=!0,!1;var i;if((i=s.tag!==3)&&!(i=s.tag!==5)&&(i=s.type,i=i!=="head"&&i!=="body"&&!Md(s.type,s.memoizedProps)),i&&(i=sr)){if(Yd(s))throw ym(),Error(n(418));for(;i;)pm(s,i),i=Ms(i.nextSibling)}if(gm(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,i=0;s;){if(s.nodeType===8){var u=s.data;if(u==="/$"){if(i===0){sr=Ms(s.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}s=s.nextSibling}sr=null}}else sr=rr?Ms(s.stateNode.nextSibling):null;return!0}function ym(){for(var s=sr;s;)s=Ms(s.nextSibling)}function Ti(){sr=rr=null,Lt=!1}function $d(s){kr===null?kr=[s]:kr.push(s)}var XT=A.ReactCurrentBatchConfig;function jo(s,i,u){if(s=u.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,s));var b=f,T=""+s;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===T?i.ref:(i=function(D){var W=b.refs;D===null?delete W[T]:W[T]=D},i._stringRef=T,i)}if(typeof s!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,s))}return s}function Cl(s,i){throw s=Object.prototype.toString.call(i),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s))}function bm(s){var i=s._init;return i(s._payload)}function Em(s){function i(Z,Q){if(s){var ne=Z.deletions;ne===null?(Z.deletions=[Q],Z.flags|=16):ne.push(Q)}}function u(Z,Q){if(!s)return null;for(;Q!==null;)i(Z,Q),Q=Q.sibling;return null}function f(Z,Q){for(Z=new Map;Q!==null;)Q.key!==null?Z.set(Q.key,Q):Z.set(Q.index,Q),Q=Q.sibling;return Z}function b(Z,Q){return Z=Vs(Z,Q),Z.index=0,Z.sibling=null,Z}function T(Z,Q,ne){return Z.index=ne,s?(ne=Z.alternate,ne!==null?(ne=ne.index,ne<Q?(Z.flags|=2,Q):ne):(Z.flags|=2,Q)):(Z.flags|=1048576,Q)}function D(Z){return s&&Z.alternate===null&&(Z.flags|=2),Z}function W(Z,Q,ne,ge){return Q===null||Q.tag!==6?(Q=Bf(ne,Z.mode,ge),Q.return=Z,Q):(Q=b(Q,ne),Q.return=Z,Q)}function V(Z,Q,ne,ge){var De=ne.type;return De===O?ce(Z,Q,ne.props.children,ge,ne.key):Q!==null&&(Q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===$&&bm(De)===Q.type)?(ge=b(Q,ne.props),ge.ref=jo(Z,Q,ne),ge.return=Z,ge):(ge=Xl(ne.type,ne.key,ne.props,null,Z.mode,ge),ge.ref=jo(Z,Q,ne),ge.return=Z,ge)}function re(Z,Q,ne,ge){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ne.containerInfo||Q.stateNode.implementation!==ne.implementation?(Q=jf(ne,Z.mode,ge),Q.return=Z,Q):(Q=b(Q,ne.children||[]),Q.return=Z,Q)}function ce(Z,Q,ne,ge,De){return Q===null||Q.tag!==7?(Q=Aa(ne,Z.mode,ge,De),Q.return=Z,Q):(Q=b(Q,ne),Q.return=Z,Q)}function de(Z,Q,ne){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Q=Bf(""+Q,Z.mode,ne),Q.return=Z,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case M:return ne=Xl(Q.type,Q.key,Q.props,null,Z.mode,ne),ne.ref=jo(Z,null,Q),ne.return=Z,ne;case k:return Q=jf(Q,Z.mode,ne),Q.return=Z,Q;case $:var ge=Q._init;return de(Z,ge(Q._payload),ne)}if(Ze(Q)||te(Q))return Q=Aa(Q,Z.mode,ne,null),Q.return=Z,Q;Cl(Z,Q)}return null}function ue(Z,Q,ne,ge){var De=Q!==null?Q.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return De!==null?null:W(Z,Q,""+ne,ge);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case M:return ne.key===De?V(Z,Q,ne,ge):null;case k:return ne.key===De?re(Z,Q,ne,ge):null;case $:return De=ne._init,ue(Z,Q,De(ne._payload),ge)}if(Ze(ne)||te(ne))return De!==null?null:ce(Z,Q,ne,ge,null);Cl(Z,ne)}return null}function xe(Z,Q,ne,ge,De){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return Z=Z.get(ne)||null,W(Q,Z,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case M:return Z=Z.get(ge.key===null?ne:ge.key)||null,V(Q,Z,ge,De);case k:return Z=Z.get(ge.key===null?ne:ge.key)||null,re(Q,Z,ge,De);case $:var Me=ge._init;return xe(Z,Q,ne,Me(ge._payload),De)}if(Ze(ge)||te(ge))return Z=Z.get(ne)||null,ce(Q,Z,ge,De,null);Cl(Q,ge)}return null}function ke(Z,Q,ne,ge){for(var De=null,Me=null,Fe=Q,He=Q=0,bn=null;Fe!==null&&He<ne.length;He++){Fe.index>He?(bn=Fe,Fe=null):bn=Fe.sibling;var ot=ue(Z,Fe,ne[He],ge);if(ot===null){Fe===null&&(Fe=bn);break}s&&Fe&&ot.alternate===null&&i(Z,Fe),Q=T(ot,Q,He),Me===null?De=ot:Me.sibling=ot,Me=ot,Fe=bn}if(He===ne.length)return u(Z,Fe),Lt&&wa(Z,He),De;if(Fe===null){for(;He<ne.length;He++)Fe=de(Z,ne[He],ge),Fe!==null&&(Q=T(Fe,Q,He),Me===null?De=Fe:Me.sibling=Fe,Me=Fe);return Lt&&wa(Z,He),De}for(Fe=f(Z,Fe);He<ne.length;He++)bn=xe(Fe,Z,He,ne[He],ge),bn!==null&&(s&&bn.alternate!==null&&Fe.delete(bn.key===null?He:bn.key),Q=T(bn,Q,He),Me===null?De=bn:Me.sibling=bn,Me=bn);return s&&Fe.forEach(function(Qs){return i(Z,Qs)}),Lt&&wa(Z,He),De}function Oe(Z,Q,ne,ge){var De=te(ne);if(typeof De!="function")throw Error(n(150));if(ne=De.call(ne),ne==null)throw Error(n(151));for(var Me=De=null,Fe=Q,He=Q=0,bn=null,ot=ne.next();Fe!==null&&!ot.done;He++,ot=ne.next()){Fe.index>He?(bn=Fe,Fe=null):bn=Fe.sibling;var Qs=ue(Z,Fe,ot.value,ge);if(Qs===null){Fe===null&&(Fe=bn);break}s&&Fe&&Qs.alternate===null&&i(Z,Fe),Q=T(Qs,Q,He),Me===null?De=Qs:Me.sibling=Qs,Me=Qs,Fe=bn}if(ot.done)return u(Z,Fe),Lt&&wa(Z,He),De;if(Fe===null){for(;!ot.done;He++,ot=ne.next())ot=de(Z,ot.value,ge),ot!==null&&(Q=T(ot,Q,He),Me===null?De=ot:Me.sibling=ot,Me=ot);return Lt&&wa(Z,He),De}for(Fe=f(Z,Fe);!ot.done;He++,ot=ne.next())ot=xe(Fe,Z,He,ot.value,ge),ot!==null&&(s&&ot.alternate!==null&&Fe.delete(ot.key===null?He:ot.key),Q=T(ot,Q,He),Me===null?De=ot:Me.sibling=ot,Me=ot);return s&&Fe.forEach(function(Ov){return i(Z,Ov)}),Lt&&wa(Z,He),De}function Xt(Z,Q,ne,ge){if(typeof ne=="object"&&ne!==null&&ne.type===O&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case M:e:{for(var De=ne.key,Me=Q;Me!==null;){if(Me.key===De){if(De=ne.type,De===O){if(Me.tag===7){u(Z,Me.sibling),Q=b(Me,ne.props.children),Q.return=Z,Z=Q;break e}}else if(Me.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===$&&bm(De)===Me.type){u(Z,Me.sibling),Q=b(Me,ne.props),Q.ref=jo(Z,Me,ne),Q.return=Z,Z=Q;break e}u(Z,Me);break}else i(Z,Me);Me=Me.sibling}ne.type===O?(Q=Aa(ne.props.children,Z.mode,ge,ne.key),Q.return=Z,Z=Q):(ge=Xl(ne.type,ne.key,ne.props,null,Z.mode,ge),ge.ref=jo(Z,Q,ne),ge.return=Z,Z=ge)}return D(Z);case k:e:{for(Me=ne.key;Q!==null;){if(Q.key===Me)if(Q.tag===4&&Q.stateNode.containerInfo===ne.containerInfo&&Q.stateNode.implementation===ne.implementation){u(Z,Q.sibling),Q=b(Q,ne.children||[]),Q.return=Z,Z=Q;break e}else{u(Z,Q);break}else i(Z,Q);Q=Q.sibling}Q=jf(ne,Z.mode,ge),Q.return=Z,Z=Q}return D(Z);case $:return Me=ne._init,Xt(Z,Q,Me(ne._payload),ge)}if(Ze(ne))return ke(Z,Q,ne,ge);if(te(ne))return Oe(Z,Q,ne,ge);Cl(Z,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?(ne=""+ne,Q!==null&&Q.tag===6?(u(Z,Q.sibling),Q=b(Q,ne),Q.return=Z,Z=Q):(u(Z,Q),Q=Bf(ne,Z.mode,ge),Q.return=Z,Z=Q),D(Z)):u(Z,Q)}return Xt}var vi=Em(!0),xm=Em(!1),kl=Fs(null),Nl=null,wi=null,Vd=null;function Qd(){Vd=wi=Nl=null}function Gd(s){var i=kl.current;Dt(kl),s._currentValue=i}function Xd(s,i,u){for(;s!==null;){var f=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),s===u)break;s=s.return}}function Si(s,i){Nl=s,Vd=wi=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&i)!==0&&(Yn=!0),s.firstContext=null)}function pr(s){var i=s._currentValue;if(Vd!==s)if(s={context:s,memoizedValue:i,next:null},wi===null){if(Nl===null)throw Error(n(308));wi=s,Nl.dependencies={lanes:0,firstContext:s}}else wi=wi.next=s;return i}var Sa=null;function Kd(s){Sa===null?Sa=[s]:Sa.push(s)}function Tm(s,i,u,f){var b=i.interleaved;return b===null?(u.next=u,Kd(i)):(u.next=b.next,b.next=u),i.interleaved=u,hs(s,f)}function hs(s,i){s.lanes|=i;var u=s.alternate;for(u!==null&&(u.lanes|=i),u=s,s=s.return;s!==null;)s.childLanes|=i,u=s.alternate,u!==null&&(u.childLanes|=i),u=s,s=s.return;return u.tag===3?u.stateNode:null}var Hs=!1;function Jd(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vm(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ps(s,i){return{eventTime:s,lane:i,tag:0,payload:null,callback:null,next:null}}function Us(s,i,u){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(rt&2)!==0){var b=f.pending;return b===null?i.next=i:(i.next=b.next,b.next=i),f.pending=i,hs(s,u)}return b=f.interleaved,b===null?(i.next=i,Kd(f)):(i.next=b.next,b.next=i),f.interleaved=i,hs(s,u)}function Ol(s,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194240)!==0)){var f=i.lanes;f&=s.pendingLanes,u|=f,i.lanes=u,fd(s,u)}}function wm(s,i){var u=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var b=null,T=null;if(u=u.firstBaseUpdate,u!==null){do{var D={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};T===null?b=T=D:T=T.next=D,u=u.next}while(u!==null);T===null?b=T=i:T=T.next=i}else b=T=i;u={baseState:f.baseState,firstBaseUpdate:b,lastBaseUpdate:T,shared:f.shared,effects:f.effects},s.updateQueue=u;return}s=u.lastBaseUpdate,s===null?u.firstBaseUpdate=i:s.next=i,u.lastBaseUpdate=i}function Dl(s,i,u,f){var b=s.updateQueue;Hs=!1;var T=b.firstBaseUpdate,D=b.lastBaseUpdate,W=b.shared.pending;if(W!==null){b.shared.pending=null;var V=W,re=V.next;V.next=null,D===null?T=re:D.next=re,D=V;var ce=s.alternate;ce!==null&&(ce=ce.updateQueue,W=ce.lastBaseUpdate,W!==D&&(W===null?ce.firstBaseUpdate=re:W.next=re,ce.lastBaseUpdate=V))}if(T!==null){var de=b.baseState;D=0,ce=re=V=null,W=T;do{var ue=W.lane,xe=W.eventTime;if((f&ue)===ue){ce!==null&&(ce=ce.next={eventTime:xe,lane:0,tag:W.tag,payload:W.payload,callback:W.callback,next:null});e:{var ke=s,Oe=W;switch(ue=i,xe=u,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){de=ke.call(xe,de,ue);break e}de=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,ue=typeof ke=="function"?ke.call(xe,de,ue):ke,ue==null)break e;de=R({},de,ue);break e;case 2:Hs=!0}}W.callback!==null&&W.lane!==0&&(s.flags|=64,ue=b.effects,ue===null?b.effects=[W]:ue.push(W))}else xe={eventTime:xe,lane:ue,tag:W.tag,payload:W.payload,callback:W.callback,next:null},ce===null?(re=ce=xe,V=de):ce=ce.next=xe,D|=ue;if(W=W.next,W===null){if(W=b.shared.pending,W===null)break;ue=W,W=ue.next,ue.next=null,b.lastBaseUpdate=ue,b.shared.pending=null}}while(!0);if(ce===null&&(V=de),b.baseState=V,b.firstBaseUpdate=re,b.lastBaseUpdate=ce,i=b.shared.interleaved,i!==null){b=i;do D|=b.lane,b=b.next;while(b!==i)}else T===null&&(b.shared.lanes=0);ka|=D,s.lanes=D,s.memoizedState=de}}function Sm(s,i,u){if(s=i.effects,i.effects=null,s!==null)for(i=0;i<s.length;i++){var f=s[i],b=f.callback;if(b!==null){if(f.callback=null,f=u,typeof b!="function")throw Error(n(191,b));b.call(f)}}}var Ho={},Yr=Fs(Ho),Uo=Fs(Ho),zo=Fs(Ho);function _a(s){if(s===Ho)throw Error(n(174));return s}function Zd(s,i){switch(St(zo,i),St(Uo,s),St(Yr,Ho),s=i.nodeType,s){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:pe(null,"");break;default:s=s===8?i.parentNode:i,i=s.namespaceURI||null,s=s.tagName,i=pe(i,s)}Dt(Yr),St(Yr,i)}function _i(){Dt(Yr),Dt(Uo),Dt(zo)}function _m(s){_a(zo.current);var i=_a(Yr.current),u=pe(i,s.type);i!==u&&(St(Uo,s),St(Yr,u))}function ef(s){Uo.current===s&&(Dt(Yr),Dt(Uo))}var Ft=Fs(0);function Al(s){for(var i=s;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var tf=[];function nf(){for(var s=0;s<tf.length;s++)tf[s]._workInProgressVersionPrimary=null;tf.length=0}var Il=A.ReactCurrentDispatcher,rf=A.ReactCurrentBatchConfig,Ca=0,Bt=null,dn=null,gn=null,Rl=!1,Wo=!1,Yo=0,KT=0;function Nn(){throw Error(n(321))}function sf(s,i){if(i===null)return!1;for(var u=0;u<i.length&&u<s.length;u++)if(!Cr(s[u],i[u]))return!1;return!0}function af(s,i,u,f,b,T){if(Ca=T,Bt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Il.current=s===null||s.memoizedState===null?tv:nv,s=u(f,b),Wo){T=0;do{if(Wo=!1,Yo=0,25<=T)throw Error(n(301));T+=1,gn=dn=null,i.updateQueue=null,Il.current=rv,s=u(f,b)}while(Wo)}if(Il.current=Ml,i=dn!==null&&dn.next!==null,Ca=0,gn=dn=Bt=null,Rl=!1,i)throw Error(n(300));return s}function of(){var s=Yo!==0;return Yo=0,s}function qr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?Bt.memoizedState=gn=s:gn=gn.next=s,gn}function mr(){if(dn===null){var s=Bt.alternate;s=s!==null?s.memoizedState:null}else s=dn.next;var i=gn===null?Bt.memoizedState:gn.next;if(i!==null)gn=i,dn=s;else{if(s===null)throw Error(n(310));dn=s,s={memoizedState:dn.memoizedState,baseState:dn.baseState,baseQueue:dn.baseQueue,queue:dn.queue,next:null},gn===null?Bt.memoizedState=gn=s:gn=gn.next=s}return gn}function qo(s,i){return typeof i=="function"?i(s):i}function uf(s){var i=mr(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=s;var f=dn,b=f.baseQueue,T=u.pending;if(T!==null){if(b!==null){var D=b.next;b.next=T.next,T.next=D}f.baseQueue=b=T,u.pending=null}if(b!==null){T=b.next,f=f.baseState;var W=D=null,V=null,re=T;do{var ce=re.lane;if((Ca&ce)===ce)V!==null&&(V=V.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),f=re.hasEagerState?re.eagerState:s(f,re.action);else{var de={lane:ce,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};V===null?(W=V=de,D=f):V=V.next=de,Bt.lanes|=ce,ka|=ce}re=re.next}while(re!==null&&re!==T);V===null?D=f:V.next=W,Cr(f,i.memoizedState)||(Yn=!0),i.memoizedState=f,i.baseState=D,i.baseQueue=V,u.lastRenderedState=f}if(s=u.interleaved,s!==null){b=s;do T=b.lane,Bt.lanes|=T,ka|=T,b=b.next;while(b!==s)}else b===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function lf(s){var i=mr(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=s;var f=u.dispatch,b=u.pending,T=i.memoizedState;if(b!==null){u.pending=null;var D=b=b.next;do T=s(T,D.action),D=D.next;while(D!==b);Cr(T,i.memoizedState)||(Yn=!0),i.memoizedState=T,i.baseQueue===null&&(i.baseState=T),u.lastRenderedState=T}return[T,f]}function Cm(){}function km(s,i){var u=Bt,f=mr(),b=i(),T=!Cr(f.memoizedState,b);if(T&&(f.memoizedState=b,Yn=!0),f=f.queue,cf(Dm.bind(null,u,f,s),[s]),f.getSnapshot!==i||T||gn!==null&&gn.memoizedState.tag&1){if(u.flags|=2048,$o(9,Om.bind(null,u,f,b,i),void 0,null),yn===null)throw Error(n(349));(Ca&30)!==0||Nm(u,i,b)}return b}function Nm(s,i,u){s.flags|=16384,s={getSnapshot:i,value:u},i=Bt.updateQueue,i===null?(i={lastEffect:null,stores:null},Bt.updateQueue=i,i.stores=[s]):(u=i.stores,u===null?i.stores=[s]:u.push(s))}function Om(s,i,u,f){i.value=u,i.getSnapshot=f,Am(i)&&Im(s)}function Dm(s,i,u){return u(function(){Am(i)&&Im(s)})}function Am(s){var i=s.getSnapshot;s=s.value;try{var u=i();return!Cr(s,u)}catch{return!0}}function Im(s){var i=hs(s,1);i!==null&&Ar(i,s,1,-1)}function Rm(s){var i=qr();return typeof s=="function"&&(s=s()),i.memoizedState=i.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:s},i.queue=s,s=s.dispatch=ev.bind(null,Bt,s),[i.memoizedState,s]}function $o(s,i,u,f){return s={tag:s,create:i,destroy:u,deps:f,next:null},i=Bt.updateQueue,i===null?(i={lastEffect:null,stores:null},Bt.updateQueue=i,i.lastEffect=s.next=s):(u=i.lastEffect,u===null?i.lastEffect=s.next=s:(f=u.next,u.next=s,s.next=f,i.lastEffect=s)),s}function Lm(){return mr().memoizedState}function Ll(s,i,u,f){var b=qr();Bt.flags|=s,b.memoizedState=$o(1|i,u,void 0,f===void 0?null:f)}function Pl(s,i,u,f){var b=mr();f=f===void 0?null:f;var T=void 0;if(dn!==null){var D=dn.memoizedState;if(T=D.destroy,f!==null&&sf(f,D.deps)){b.memoizedState=$o(i,u,T,f);return}}Bt.flags|=s,b.memoizedState=$o(1|i,u,T,f)}function Pm(s,i){return Ll(8390656,8,s,i)}function cf(s,i){return Pl(2048,8,s,i)}function Mm(s,i){return Pl(4,2,s,i)}function Fm(s,i){return Pl(4,4,s,i)}function Bm(s,i){if(typeof i=="function")return s=s(),i(s),function(){i(null)};if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function jm(s,i,u){return u=u!=null?u.concat([s]):null,Pl(4,4,Bm.bind(null,i,s),u)}function df(){}function Hm(s,i){var u=mr();i=i===void 0?null:i;var f=u.memoizedState;return f!==null&&i!==null&&sf(i,f[1])?f[0]:(u.memoizedState=[s,i],s)}function Um(s,i){var u=mr();i=i===void 0?null:i;var f=u.memoizedState;return f!==null&&i!==null&&sf(i,f[1])?f[0]:(s=s(),u.memoizedState=[s,i],s)}function zm(s,i,u){return(Ca&21)===0?(s.baseState&&(s.baseState=!1,Yn=!0),s.memoizedState=u):(Cr(u,i)||(u=bp(),Bt.lanes|=u,ka|=u,s.baseState=!0),i)}function JT(s,i){var u=pt;pt=u!==0&&4>u?u:4,s(!0);var f=rf.transition;rf.transition={};try{s(!1),i()}finally{pt=u,rf.transition=f}}function Wm(){return mr().memoizedState}function ZT(s,i,u){var f=qs(s);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Ym(s))qm(i,u);else if(u=Tm(s,i,u,f),u!==null){var b=Fn();Ar(u,s,f,b),$m(u,i,f)}}function ev(s,i,u){var f=qs(s),b={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ym(s))qm(i,b);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=i.lastRenderedReducer,T!==null))try{var D=i.lastRenderedState,W=T(D,u);if(b.hasEagerState=!0,b.eagerState=W,Cr(W,D)){var V=i.interleaved;V===null?(b.next=b,Kd(i)):(b.next=V.next,V.next=b),i.interleaved=b;return}}catch{}finally{}u=Tm(s,i,b,f),u!==null&&(b=Fn(),Ar(u,s,f,b),$m(u,i,f))}}function Ym(s){var i=s.alternate;return s===Bt||i!==null&&i===Bt}function qm(s,i){Wo=Rl=!0;var u=s.pending;u===null?i.next=i:(i.next=u.next,u.next=i),s.pending=i}function $m(s,i,u){if((u&4194240)!==0){var f=i.lanes;f&=s.pendingLanes,u|=f,i.lanes=u,fd(s,u)}}var Ml={readContext:pr,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useInsertionEffect:Nn,useLayoutEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useMutableSource:Nn,useSyncExternalStore:Nn,useId:Nn,unstable_isNewReconciler:!1},tv={readContext:pr,useCallback:function(s,i){return qr().memoizedState=[s,i===void 0?null:i],s},useContext:pr,useEffect:Pm,useImperativeHandle:function(s,i,u){return u=u!=null?u.concat([s]):null,Ll(4194308,4,Bm.bind(null,i,s),u)},useLayoutEffect:function(s,i){return Ll(4194308,4,s,i)},useInsertionEffect:function(s,i){return Ll(4,2,s,i)},useMemo:function(s,i){var u=qr();return i=i===void 0?null:i,s=s(),u.memoizedState=[s,i],s},useReducer:function(s,i,u){var f=qr();return i=u!==void 0?u(i):i,f.memoizedState=f.baseState=i,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:i},f.queue=s,s=s.dispatch=ZT.bind(null,Bt,s),[f.memoizedState,s]},useRef:function(s){var i=qr();return s={current:s},i.memoizedState=s},useState:Rm,useDebugValue:df,useDeferredValue:function(s){return qr().memoizedState=s},useTransition:function(){var s=Rm(!1),i=s[0];return s=JT.bind(null,s[1]),qr().memoizedState=s,[i,s]},useMutableSource:function(){},useSyncExternalStore:function(s,i,u){var f=Bt,b=qr();if(Lt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),yn===null)throw Error(n(349));(Ca&30)!==0||Nm(f,i,u)}b.memoizedState=u;var T={value:u,getSnapshot:i};return b.queue=T,Pm(Dm.bind(null,f,T,s),[s]),f.flags|=2048,$o(9,Om.bind(null,f,T,u,i),void 0,null),u},useId:function(){var s=qr(),i=yn.identifierPrefix;if(Lt){var u=fs,f=ds;u=(f&~(1<<32-_r(f)-1)).toString(32)+u,i=":"+i+"R"+u,u=Yo++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=KT++,i=":"+i+"r"+u.toString(32)+":";return s.memoizedState=i},unstable_isNewReconciler:!1},nv={readContext:pr,useCallback:Hm,useContext:pr,useEffect:cf,useImperativeHandle:jm,useInsertionEffect:Mm,useLayoutEffect:Fm,useMemo:Um,useReducer:uf,useRef:Lm,useState:function(){return uf(qo)},useDebugValue:df,useDeferredValue:function(s){var i=mr();return zm(i,dn.memoizedState,s)},useTransition:function(){var s=uf(qo)[0],i=mr().memoizedState;return[s,i]},useMutableSource:Cm,useSyncExternalStore:km,useId:Wm,unstable_isNewReconciler:!1},rv={readContext:pr,useCallback:Hm,useContext:pr,useEffect:cf,useImperativeHandle:jm,useInsertionEffect:Mm,useLayoutEffect:Fm,useMemo:Um,useReducer:lf,useRef:Lm,useState:function(){return lf(qo)},useDebugValue:df,useDeferredValue:function(s){var i=mr();return dn===null?i.memoizedState=s:zm(i,dn.memoizedState,s)},useTransition:function(){var s=lf(qo)[0],i=mr().memoizedState;return[s,i]},useMutableSource:Cm,useSyncExternalStore:km,useId:Wm,unstable_isNewReconciler:!1};function Nr(s,i){if(s&&s.defaultProps){i=R({},i),s=s.defaultProps;for(var u in s)i[u]===void 0&&(i[u]=s[u]);return i}return i}function ff(s,i,u,f){i=s.memoizedState,u=u(f,i),u=u==null?i:R({},i,u),s.memoizedState=u,s.lanes===0&&(s.updateQueue.baseState=u)}var Fl={isMounted:function(s){return(s=s._reactInternals)?Tt(s)===s:!1},enqueueSetState:function(s,i,u){s=s._reactInternals;var f=Fn(),b=qs(s),T=ps(f,b);T.payload=i,u!=null&&(T.callback=u),i=Us(s,T,b),i!==null&&(Ar(i,s,b,f),Ol(i,s,b))},enqueueReplaceState:function(s,i,u){s=s._reactInternals;var f=Fn(),b=qs(s),T=ps(f,b);T.tag=1,T.payload=i,u!=null&&(T.callback=u),i=Us(s,T,b),i!==null&&(Ar(i,s,b,f),Ol(i,s,b))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var u=Fn(),f=qs(s),b=ps(u,f);b.tag=2,i!=null&&(b.callback=i),i=Us(s,b,f),i!==null&&(Ar(i,s,f,u),Ol(i,s,f))}};function Vm(s,i,u,f,b,T,D){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,T,D):i.prototype&&i.prototype.isPureReactComponent?!Io(u,f)||!Io(b,T):!0}function Qm(s,i,u){var f=!1,b=Bs,T=i.contextType;return typeof T=="object"&&T!==null?T=pr(T):(b=Wn(i)?Ta:kn.current,f=i.contextTypes,T=(f=f!=null)?bi(s,b):Bs),i=new i(u,T),s.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fl,s.stateNode=i,i._reactInternals=s,f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=b,s.__reactInternalMemoizedMaskedChildContext=T),i}function Gm(s,i,u,f){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,f),i.state!==s&&Fl.enqueueReplaceState(i,i.state,null)}function hf(s,i,u,f){var b=s.stateNode;b.props=u,b.state=s.memoizedState,b.refs={},Jd(s);var T=i.contextType;typeof T=="object"&&T!==null?b.context=pr(T):(T=Wn(i)?Ta:kn.current,b.context=bi(s,T)),b.state=s.memoizedState,T=i.getDerivedStateFromProps,typeof T=="function"&&(ff(s,i,T,u),b.state=s.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(i=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),i!==b.state&&Fl.enqueueReplaceState(b,b.state,null),Dl(s,u,b,f),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308)}function Ci(s,i){try{var u="",f=i;do u+=ze(f),f=f.return;while(f);var b=u}catch(T){b=`
|
|
32
|
+
Error generating stack: `+T.message+`
|
|
33
|
+
`+T.stack}return{value:s,source:i,stack:b,digest:null}}function pf(s,i,u){return{value:s,source:null,stack:u??null,digest:i??null}}function mf(s,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var sv=typeof WeakMap=="function"?WeakMap:Map;function Xm(s,i,u){u=ps(-1,u),u.tag=3,u.payload={element:null};var f=i.value;return u.callback=function(){Yl||(Yl=!0,Df=f),mf(s,i)},u}function Km(s,i,u){u=ps(-1,u),u.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var b=i.value;u.payload=function(){return f(b)},u.callback=function(){mf(s,i)}}var T=s.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(u.callback=function(){mf(s,i),typeof f!="function"&&(Ws===null?Ws=new Set([this]):Ws.add(this));var D=i.stack;this.componentDidCatch(i.value,{componentStack:D!==null?D:""})}),u}function Jm(s,i,u){var f=s.pingCache;if(f===null){f=s.pingCache=new sv;var b=new Set;f.set(i,b)}else b=f.get(i),b===void 0&&(b=new Set,f.set(i,b));b.has(u)||(b.add(u),s=bv.bind(null,s,i,u),i.then(s,s))}function Zm(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function eg(s,i,u,f,b){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(i=ps(-1,1),i.tag=2,Us(u,i,1))),u.lanes|=1),s):(s.flags|=65536,s.lanes=b,s)}var av=A.ReactCurrentOwner,Yn=!1;function Mn(s,i,u,f){i.child=s===null?xm(i,null,u,f):vi(i,s.child,u,f)}function tg(s,i,u,f,b){u=u.render;var T=i.ref;return Si(i,b),f=af(s,i,u,f,T,b),u=of(),s!==null&&!Yn?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~b,ms(s,i,b)):(Lt&&u&&zd(i),i.flags|=1,Mn(s,i,f,b),i.child)}function ng(s,i,u,f,b){if(s===null){var T=u.type;return typeof T=="function"&&!Ff(T)&&T.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=T,rg(s,i,T,f,b)):(s=Xl(u.type,null,f,i,i.mode,b),s.ref=i.ref,s.return=i,i.child=s)}if(T=s.child,(s.lanes&b)===0){var D=T.memoizedProps;if(u=u.compare,u=u!==null?u:Io,u(D,f)&&s.ref===i.ref)return ms(s,i,b)}return i.flags|=1,s=Vs(T,f),s.ref=i.ref,s.return=i,i.child=s}function rg(s,i,u,f,b){if(s!==null){var T=s.memoizedProps;if(Io(T,f)&&s.ref===i.ref)if(Yn=!1,i.pendingProps=f=T,(s.lanes&b)!==0)(s.flags&131072)!==0&&(Yn=!0);else return i.lanes=s.lanes,ms(s,i,b)}return gf(s,i,u,f,b)}function sg(s,i,u){var f=i.pendingProps,b=f.children,T=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(Ni,ar),ar|=u;else{if((u&1073741824)===0)return s=T!==null?T.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,St(Ni,ar),ar|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=T!==null?T.baseLanes:u,St(Ni,ar),ar|=f}else T!==null?(f=T.baseLanes|u,i.memoizedState=null):f=u,St(Ni,ar),ar|=f;return Mn(s,i,b,u),i.child}function ag(s,i){var u=i.ref;(s===null&&u!==null||s!==null&&s.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function gf(s,i,u,f,b){var T=Wn(u)?Ta:kn.current;return T=bi(i,T),Si(i,b),u=af(s,i,u,f,T,b),f=of(),s!==null&&!Yn?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~b,ms(s,i,b)):(Lt&&f&&zd(i),i.flags|=1,Mn(s,i,u,b),i.child)}function ig(s,i,u,f,b){if(Wn(u)){var T=!0;Tl(i)}else T=!1;if(Si(i,b),i.stateNode===null)jl(s,i),Qm(i,u,f),hf(i,u,f,b),f=!0;else if(s===null){var D=i.stateNode,W=i.memoizedProps;D.props=W;var V=D.context,re=u.contextType;typeof re=="object"&&re!==null?re=pr(re):(re=Wn(u)?Ta:kn.current,re=bi(i,re));var ce=u.getDerivedStateFromProps,de=typeof ce=="function"||typeof D.getSnapshotBeforeUpdate=="function";de||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(W!==f||V!==re)&&Gm(i,D,f,re),Hs=!1;var ue=i.memoizedState;D.state=ue,Dl(i,f,D,b),V=i.memoizedState,W!==f||ue!==V||zn.current||Hs?(typeof ce=="function"&&(ff(i,u,ce,f),V=i.memoizedState),(W=Hs||Vm(i,u,W,f,ue,V,re))?(de||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(i.flags|=4194308)):(typeof D.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=V),D.props=f,D.state=V,D.context=re,f=W):(typeof D.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{D=i.stateNode,vm(s,i),W=i.memoizedProps,re=i.type===i.elementType?W:Nr(i.type,W),D.props=re,de=i.pendingProps,ue=D.context,V=u.contextType,typeof V=="object"&&V!==null?V=pr(V):(V=Wn(u)?Ta:kn.current,V=bi(i,V));var xe=u.getDerivedStateFromProps;(ce=typeof xe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(W!==de||ue!==V)&&Gm(i,D,f,V),Hs=!1,ue=i.memoizedState,D.state=ue,Dl(i,f,D,b);var ke=i.memoizedState;W!==de||ue!==ke||zn.current||Hs?(typeof xe=="function"&&(ff(i,u,xe,f),ke=i.memoizedState),(re=Hs||Vm(i,u,re,f,ue,ke,V)||!1)?(ce||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(f,ke,V),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(f,ke,V)),typeof D.componentDidUpdate=="function"&&(i.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof D.componentDidUpdate!="function"||W===s.memoizedProps&&ue===s.memoizedState||(i.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ue===s.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=ke),D.props=f,D.state=ke,D.context=V,f=re):(typeof D.componentDidUpdate!="function"||W===s.memoizedProps&&ue===s.memoizedState||(i.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||W===s.memoizedProps&&ue===s.memoizedState||(i.flags|=1024),f=!1)}return yf(s,i,u,f,T,b)}function yf(s,i,u,f,b,T){ag(s,i);var D=(i.flags&128)!==0;if(!f&&!D)return b&&dm(i,u,!1),ms(s,i,T);f=i.stateNode,av.current=i;var W=D&&typeof u.getDerivedStateFromError!="function"?null:f.render();return i.flags|=1,s!==null&&D?(i.child=vi(i,s.child,null,T),i.child=vi(i,null,W,T)):Mn(s,i,W,T),i.memoizedState=f.state,b&&dm(i,u,!0),i.child}function og(s){var i=s.stateNode;i.pendingContext?lm(s,i.pendingContext,i.pendingContext!==i.context):i.context&&lm(s,i.context,!1),Zd(s,i.containerInfo)}function ug(s,i,u,f,b){return Ti(),$d(b),i.flags|=256,Mn(s,i,u,f),i.child}var bf={dehydrated:null,treeContext:null,retryLane:0};function Ef(s){return{baseLanes:s,cachePool:null,transitions:null}}function lg(s,i,u){var f=i.pendingProps,b=Ft.current,T=!1,D=(i.flags&128)!==0,W;if((W=D)||(W=s!==null&&s.memoizedState===null?!1:(b&2)!==0),W?(T=!0,i.flags&=-129):(s===null||s.memoizedState!==null)&&(b|=1),St(Ft,b&1),s===null)return qd(i),s=i.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((i.mode&1)===0?i.lanes=1:s.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(D=f.children,s=f.fallback,T?(f=i.mode,T=i.child,D={mode:"hidden",children:D},(f&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=D):T=Kl(D,f,0,null),s=Aa(s,f,u,null),T.return=i,s.return=i,T.sibling=s,i.child=T,i.child.memoizedState=Ef(u),i.memoizedState=bf,s):xf(i,D));if(b=s.memoizedState,b!==null&&(W=b.dehydrated,W!==null))return iv(s,i,D,f,W,b,u);if(T){T=f.fallback,D=i.mode,b=s.child,W=b.sibling;var V={mode:"hidden",children:f.children};return(D&1)===0&&i.child!==b?(f=i.child,f.childLanes=0,f.pendingProps=V,i.deletions=null):(f=Vs(b,V),f.subtreeFlags=b.subtreeFlags&14680064),W!==null?T=Vs(W,T):(T=Aa(T,D,u,null),T.flags|=2),T.return=i,f.return=i,f.sibling=T,i.child=f,f=T,T=i.child,D=s.child.memoizedState,D=D===null?Ef(u):{baseLanes:D.baseLanes|u,cachePool:null,transitions:D.transitions},T.memoizedState=D,T.childLanes=s.childLanes&~u,i.memoizedState=bf,f}return T=s.child,s=T.sibling,f=Vs(T,{mode:"visible",children:f.children}),(i.mode&1)===0&&(f.lanes=u),f.return=i,f.sibling=null,s!==null&&(u=i.deletions,u===null?(i.deletions=[s],i.flags|=16):u.push(s)),i.child=f,i.memoizedState=null,f}function xf(s,i){return i=Kl({mode:"visible",children:i},s.mode,0,null),i.return=s,s.child=i}function Bl(s,i,u,f){return f!==null&&$d(f),vi(i,s.child,null,u),s=xf(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function iv(s,i,u,f,b,T,D){if(u)return i.flags&256?(i.flags&=-257,f=pf(Error(n(422))),Bl(s,i,D,f)):i.memoizedState!==null?(i.child=s.child,i.flags|=128,null):(T=f.fallback,b=i.mode,f=Kl({mode:"visible",children:f.children},b,0,null),T=Aa(T,b,D,null),T.flags|=2,f.return=i,T.return=i,f.sibling=T,i.child=f,(i.mode&1)!==0&&vi(i,s.child,null,D),i.child.memoizedState=Ef(D),i.memoizedState=bf,T);if((i.mode&1)===0)return Bl(s,i,D,null);if(b.data==="$!"){if(f=b.nextSibling&&b.nextSibling.dataset,f)var W=f.dgst;return f=W,T=Error(n(419)),f=pf(T,f,void 0),Bl(s,i,D,f)}if(W=(D&s.childLanes)!==0,Yn||W){if(f=yn,f!==null){switch(D&-D){case 4:b=2;break;case 16:b=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(f.suspendedLanes|D))!==0?0:b,b!==0&&b!==T.retryLane&&(T.retryLane=b,hs(s,b),Ar(f,s,b,-1))}return Mf(),f=pf(Error(n(421))),Bl(s,i,D,f)}return b.data==="$?"?(i.flags|=128,i.child=s.child,i=Ev.bind(null,s),b._reactRetry=i,null):(s=T.treeContext,sr=Ms(b.nextSibling),rr=i,Lt=!0,kr=null,s!==null&&(fr[hr++]=ds,fr[hr++]=fs,fr[hr++]=va,ds=s.id,fs=s.overflow,va=i),i=xf(i,f.children),i.flags|=4096,i)}function cg(s,i,u){s.lanes|=i;var f=s.alternate;f!==null&&(f.lanes|=i),Xd(s.return,i,u)}function Tf(s,i,u,f,b){var T=s.memoizedState;T===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:b}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=f,T.tail=u,T.tailMode=b)}function dg(s,i,u){var f=i.pendingProps,b=f.revealOrder,T=f.tail;if(Mn(s,i,f.children,u),f=Ft.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&cg(s,u,i);else if(s.tag===19)cg(s,u,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}f&=1}if(St(Ft,f),(i.mode&1)===0)i.memoizedState=null;else switch(b){case"forwards":for(u=i.child,b=null;u!==null;)s=u.alternate,s!==null&&Al(s)===null&&(b=u),u=u.sibling;u=b,u===null?(b=i.child,i.child=null):(b=u.sibling,u.sibling=null),Tf(i,!1,b,u,T);break;case"backwards":for(u=null,b=i.child,i.child=null;b!==null;){if(s=b.alternate,s!==null&&Al(s)===null){i.child=b;break}s=b.sibling,b.sibling=u,u=b,b=s}Tf(i,!0,u,null,T);break;case"together":Tf(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function jl(s,i){(i.mode&1)===0&&s!==null&&(s.alternate=null,i.alternate=null,i.flags|=2)}function ms(s,i,u){if(s!==null&&(i.dependencies=s.dependencies),ka|=i.lanes,(u&i.childLanes)===0)return null;if(s!==null&&i.child!==s.child)throw Error(n(153));if(i.child!==null){for(s=i.child,u=Vs(s,s.pendingProps),i.child=u,u.return=i;s.sibling!==null;)s=s.sibling,u=u.sibling=Vs(s,s.pendingProps),u.return=i;u.sibling=null}return i.child}function ov(s,i,u){switch(i.tag){case 3:og(i),Ti();break;case 5:_m(i);break;case 1:Wn(i.type)&&Tl(i);break;case 4:Zd(i,i.stateNode.containerInfo);break;case 10:var f=i.type._context,b=i.memoizedProps.value;St(kl,f._currentValue),f._currentValue=b;break;case 13:if(f=i.memoizedState,f!==null)return f.dehydrated!==null?(St(Ft,Ft.current&1),i.flags|=128,null):(u&i.child.childLanes)!==0?lg(s,i,u):(St(Ft,Ft.current&1),s=ms(s,i,u),s!==null?s.sibling:null);St(Ft,Ft.current&1);break;case 19:if(f=(u&i.childLanes)!==0,(s.flags&128)!==0){if(f)return dg(s,i,u);i.flags|=128}if(b=i.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),St(Ft,Ft.current),f)break;return null;case 22:case 23:return i.lanes=0,sg(s,i,u)}return ms(s,i,u)}var fg,vf,hg,pg;fg=function(s,i){for(var u=i.child;u!==null;){if(u.tag===5||u.tag===6)s.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},vf=function(){},hg=function(s,i,u,f){var b=s.memoizedProps;if(b!==f){s=i.stateNode,_a(Yr.current);var T=null;switch(u){case"input":b=jn(s,b),f=jn(s,f),T=[];break;case"select":b=R({},b,{value:void 0}),f=R({},f,{value:void 0}),T=[];break;case"textarea":b=Nt(s,b),f=Nt(s,f),T=[];break;default:typeof b.onClick!="function"&&typeof f.onClick=="function"&&(s.onclick=bl)}At(u,f);var D;u=null;for(re in b)if(!f.hasOwnProperty(re)&&b.hasOwnProperty(re)&&b[re]!=null)if(re==="style"){var W=b[re];for(D in W)W.hasOwnProperty(D)&&(u||(u={}),u[D]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(a.hasOwnProperty(re)?T||(T=[]):(T=T||[]).push(re,null));for(re in f){var V=f[re];if(W=b!=null?b[re]:void 0,f.hasOwnProperty(re)&&V!==W&&(V!=null||W!=null))if(re==="style")if(W){for(D in W)!W.hasOwnProperty(D)||V&&V.hasOwnProperty(D)||(u||(u={}),u[D]="");for(D in V)V.hasOwnProperty(D)&&W[D]!==V[D]&&(u||(u={}),u[D]=V[D])}else u||(T||(T=[]),T.push(re,u)),u=V;else re==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,W=W?W.__html:void 0,V!=null&&W!==V&&(T=T||[]).push(re,V)):re==="children"?typeof V!="string"&&typeof V!="number"||(T=T||[]).push(re,""+V):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(a.hasOwnProperty(re)?(V!=null&&re==="onScroll"&&Ot("scroll",s),T||W===V||(T=[])):(T=T||[]).push(re,V))}u&&(T=T||[]).push("style",u);var re=T;(i.updateQueue=re)&&(i.flags|=4)}},pg=function(s,i,u,f){u!==f&&(i.flags|=4)};function Vo(s,i){if(!Lt)switch(s.tailMode){case"hidden":i=s.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?s.tail=null:u.sibling=null;break;case"collapsed":u=s.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function On(s){var i=s.alternate!==null&&s.alternate.child===s.child,u=0,f=0;if(i)for(var b=s.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags&14680064,f|=b.flags&14680064,b.return=s,b=b.sibling;else for(b=s.child;b!==null;)u|=b.lanes|b.childLanes,f|=b.subtreeFlags,f|=b.flags,b.return=s,b=b.sibling;return s.subtreeFlags|=f,s.childLanes=u,i}function uv(s,i,u){var f=i.pendingProps;switch(Wd(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return On(i),null;case 1:return Wn(i.type)&&xl(),On(i),null;case 3:return f=i.stateNode,_i(),Dt(zn),Dt(kn),nf(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(s===null||s.child===null)&&(_l(i)?i.flags|=4:s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,kr!==null&&(Rf(kr),kr=null))),vf(s,i),On(i),null;case 5:ef(i);var b=_a(zo.current);if(u=i.type,s!==null&&i.stateNode!=null)hg(s,i,u,f,b),s.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!f){if(i.stateNode===null)throw Error(n(166));return On(i),null}if(s=_a(Yr.current),_l(i)){f=i.stateNode,u=i.type;var T=i.memoizedProps;switch(f[Wr]=i,f[Fo]=T,s=(i.mode&1)!==0,u){case"dialog":Ot("cancel",f),Ot("close",f);break;case"iframe":case"object":case"embed":Ot("load",f);break;case"video":case"audio":for(b=0;b<Lo.length;b++)Ot(Lo[b],f);break;case"source":Ot("error",f);break;case"img":case"image":case"link":Ot("error",f),Ot("load",f);break;case"details":Ot("toggle",f);break;case"input":tn(f,T),Ot("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!T.multiple},Ot("invalid",f);break;case"textarea":on(f,T),Ot("invalid",f)}At(u,T),b=null;for(var D in T)if(T.hasOwnProperty(D)){var W=T[D];D==="children"?typeof W=="string"?f.textContent!==W&&(T.suppressHydrationWarning!==!0&&yl(f.textContent,W,s),b=["children",W]):typeof W=="number"&&f.textContent!==""+W&&(T.suppressHydrationWarning!==!0&&yl(f.textContent,W,s),b=["children",""+W]):a.hasOwnProperty(D)&&W!=null&&D==="onScroll"&&Ot("scroll",f)}switch(u){case"input":Je(f),er(f,T,!0);break;case"textarea":Je(f),un(f);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(f.onclick=bl)}f=b,i.updateQueue=f,f!==null&&(i.flags|=4)}else{D=b.nodeType===9?b:b.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=oe(u)),s==="http://www.w3.org/1999/xhtml"?u==="script"?(s=D.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof f.is=="string"?s=D.createElement(u,{is:f.is}):(s=D.createElement(u),u==="select"&&(D=s,f.multiple?D.multiple=!0:f.size&&(D.size=f.size))):s=D.createElementNS(s,u),s[Wr]=i,s[Fo]=f,fg(s,i,!1,!1),i.stateNode=s;e:{switch(D=yt(u,f),u){case"dialog":Ot("cancel",s),Ot("close",s),b=f;break;case"iframe":case"object":case"embed":Ot("load",s),b=f;break;case"video":case"audio":for(b=0;b<Lo.length;b++)Ot(Lo[b],s);b=f;break;case"source":Ot("error",s),b=f;break;case"img":case"image":case"link":Ot("error",s),Ot("load",s),b=f;break;case"details":Ot("toggle",s),b=f;break;case"input":tn(s,f),b=jn(s,f),Ot("invalid",s);break;case"option":b=f;break;case"select":s._wrapperState={wasMultiple:!!f.multiple},b=R({},f,{value:void 0}),Ot("invalid",s);break;case"textarea":on(s,f),b=Nt(s,f),Ot("invalid",s);break;default:b=f}At(u,b),W=b;for(T in W)if(W.hasOwnProperty(T)){var V=W[T];T==="style"?_n(s,V):T==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&je(s,V)):T==="children"?typeof V=="string"?(u!=="textarea"||V!=="")&&qe(s,V):typeof V=="number"&&qe(s,""+V):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(a.hasOwnProperty(T)?V!=null&&T==="onScroll"&&Ot("scroll",s):V!=null&&N(s,T,V,D))}switch(u){case"input":Je(s),er(s,f,!1);break;case"textarea":Je(s),un(s);break;case"option":f.value!=null&&s.setAttribute("value",""+tt(f.value));break;case"select":s.multiple=!!f.multiple,T=f.value,T!=null?Et(s,!!f.multiple,T,!1):f.defaultValue!=null&&Et(s,!!f.multiple,f.defaultValue,!0);break;default:typeof b.onClick=="function"&&(s.onclick=bl)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return On(i),null;case 6:if(s&&i.stateNode!=null)pg(s,i,s.memoizedProps,f);else{if(typeof f!="string"&&i.stateNode===null)throw Error(n(166));if(u=_a(zo.current),_a(Yr.current),_l(i)){if(f=i.stateNode,u=i.memoizedProps,f[Wr]=i,(T=f.nodeValue!==u)&&(s=rr,s!==null))switch(s.tag){case 3:yl(f.nodeValue,u,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&yl(f.nodeValue,u,(s.mode&1)!==0)}T&&(i.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[Wr]=i,i.stateNode=f}return On(i),null;case 13:if(Dt(Ft),f=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Lt&&sr!==null&&(i.mode&1)!==0&&(i.flags&128)===0)ym(),Ti(),i.flags|=98560,T=!1;else if(T=_l(i),f!==null&&f.dehydrated!==null){if(s===null){if(!T)throw Error(n(318));if(T=i.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Wr]=i}else Ti(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;On(i),T=!1}else kr!==null&&(Rf(kr),kr=null),T=!0;if(!T)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=u,i):(f=f!==null,f!==(s!==null&&s.memoizedState!==null)&&f&&(i.child.flags|=8192,(i.mode&1)!==0&&(s===null||(Ft.current&1)!==0?fn===0&&(fn=3):Mf())),i.updateQueue!==null&&(i.flags|=4),On(i),null);case 4:return _i(),vf(s,i),s===null&&Po(i.stateNode.containerInfo),On(i),null;case 10:return Gd(i.type._context),On(i),null;case 17:return Wn(i.type)&&xl(),On(i),null;case 19:if(Dt(Ft),T=i.memoizedState,T===null)return On(i),null;if(f=(i.flags&128)!==0,D=T.rendering,D===null)if(f)Vo(T,!1);else{if(fn!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(D=Al(s),D!==null){for(i.flags|=128,Vo(T,!1),f=D.updateQueue,f!==null&&(i.updateQueue=f,i.flags|=4),i.subtreeFlags=0,f=u,u=i.child;u!==null;)T=u,s=f,T.flags&=14680066,D=T.alternate,D===null?(T.childLanes=0,T.lanes=s,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=D.childLanes,T.lanes=D.lanes,T.child=D.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=D.memoizedProps,T.memoizedState=D.memoizedState,T.updateQueue=D.updateQueue,T.type=D.type,s=D.dependencies,T.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),u=u.sibling;return St(Ft,Ft.current&1|2),i.child}s=s.sibling}T.tail!==null&&wt()>Oi&&(i.flags|=128,f=!0,Vo(T,!1),i.lanes=4194304)}else{if(!f)if(s=Al(D),s!==null){if(i.flags|=128,f=!0,u=s.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),Vo(T,!0),T.tail===null&&T.tailMode==="hidden"&&!D.alternate&&!Lt)return On(i),null}else 2*wt()-T.renderingStartTime>Oi&&u!==1073741824&&(i.flags|=128,f=!0,Vo(T,!1),i.lanes=4194304);T.isBackwards?(D.sibling=i.child,i.child=D):(u=T.last,u!==null?u.sibling=D:i.child=D,T.last=D)}return T.tail!==null?(i=T.tail,T.rendering=i,T.tail=i.sibling,T.renderingStartTime=wt(),i.sibling=null,u=Ft.current,St(Ft,f?u&1|2:u&1),i):(On(i),null);case 22:case 23:return Pf(),f=i.memoizedState!==null,s!==null&&s.memoizedState!==null!==f&&(i.flags|=8192),f&&(i.mode&1)!==0?(ar&1073741824)!==0&&(On(i),i.subtreeFlags&6&&(i.flags|=8192)):On(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function lv(s,i){switch(Wd(i),i.tag){case 1:return Wn(i.type)&&xl(),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return _i(),Dt(zn),Dt(kn),nf(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 5:return ef(i),null;case 13:if(Dt(Ft),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(n(340));Ti()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return Dt(Ft),null;case 4:return _i(),null;case 10:return Gd(i.type._context),null;case 22:case 23:return Pf(),null;case 24:return null;default:return null}}var Hl=!1,Dn=!1,cv=typeof WeakSet=="function"?WeakSet:Set,we=null;function ki(s,i){var u=s.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){$t(s,i,f)}else u.current=null}function wf(s,i,u){try{u()}catch(f){$t(s,i,f)}}var mg=!1;function dv(s,i){if(Ld=il,s=Vp(),Cd(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{u=(u=s.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var b=f.anchorOffset,T=f.focusNode;f=f.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var D=0,W=-1,V=-1,re=0,ce=0,de=s,ue=null;t:for(;;){for(var xe;de!==u||b!==0&&de.nodeType!==3||(W=D+b),de!==T||f!==0&&de.nodeType!==3||(V=D+f),de.nodeType===3&&(D+=de.nodeValue.length),(xe=de.firstChild)!==null;)ue=de,de=xe;for(;;){if(de===s)break t;if(ue===u&&++re===b&&(W=D),ue===T&&++ce===f&&(V=D),(xe=de.nextSibling)!==null)break;de=ue,ue=de.parentNode}de=xe}u=W===-1||V===-1?null:{start:W,end:V}}else u=null}u=u||{start:0,end:0}}else u=null;for(Pd={focusedElem:s,selectionRange:u},il=!1,we=i;we!==null;)if(i=we,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,we=s;else for(;we!==null;){i=we;try{var ke=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Xt=ke.memoizedState,Z=i.stateNode,Q=Z.getSnapshotBeforeUpdate(i.elementType===i.type?Oe:Nr(i.type,Oe),Xt);Z.__reactInternalSnapshotBeforeUpdate=Q}break;case 3:var ne=i.stateNode.containerInfo;ne.nodeType===1?ne.textContent="":ne.nodeType===9&&ne.documentElement&&ne.removeChild(ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ge){$t(i,i.return,ge)}if(s=i.sibling,s!==null){s.return=i.return,we=s;break}we=i.return}return ke=mg,mg=!1,ke}function Qo(s,i,u){var f=i.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var b=f=f.next;do{if((b.tag&s)===s){var T=b.destroy;b.destroy=void 0,T!==void 0&&wf(i,u,T)}b=b.next}while(b!==f)}}function Ul(s,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&s)===s){var f=u.create;u.destroy=f()}u=u.next}while(u!==i)}}function Sf(s){var i=s.ref;if(i!==null){var u=s.stateNode;switch(s.tag){case 5:s=u;break;default:s=u}typeof i=="function"?i(s):i.current=s}}function gg(s){var i=s.alternate;i!==null&&(s.alternate=null,gg(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&(delete i[Wr],delete i[Fo],delete i[jd],delete i[VT],delete i[QT])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function yg(s){return s.tag===5||s.tag===3||s.tag===4}function bg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||yg(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function _f(s,i,u){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?u.nodeType===8?u.parentNode.insertBefore(s,i):u.insertBefore(s,i):(u.nodeType===8?(i=u.parentNode,i.insertBefore(s,u)):(i=u,i.appendChild(s)),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=bl));else if(f!==4&&(s=s.child,s!==null))for(_f(s,i,u),s=s.sibling;s!==null;)_f(s,i,u),s=s.sibling}function Cf(s,i,u){var f=s.tag;if(f===5||f===6)s=s.stateNode,i?u.insertBefore(s,i):u.appendChild(s);else if(f!==4&&(s=s.child,s!==null))for(Cf(s,i,u),s=s.sibling;s!==null;)Cf(s,i,u),s=s.sibling}var vn=null,Or=!1;function zs(s,i,u){for(u=u.child;u!==null;)Eg(s,i,u),u=u.sibling}function Eg(s,i,u){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(el,u)}catch{}switch(u.tag){case 5:Dn||ki(u,i);case 6:var f=vn,b=Or;vn=null,zs(s,i,u),vn=f,Or=b,vn!==null&&(Or?(s=vn,u=u.stateNode,s.nodeType===8?s.parentNode.removeChild(u):s.removeChild(u)):vn.removeChild(u.stateNode));break;case 18:vn!==null&&(Or?(s=vn,u=u.stateNode,s.nodeType===8?Bd(s.parentNode,u):s.nodeType===1&&Bd(s,u),Co(s)):Bd(vn,u.stateNode));break;case 4:f=vn,b=Or,vn=u.stateNode.containerInfo,Or=!0,zs(s,i,u),vn=f,Or=b;break;case 0:case 11:case 14:case 15:if(!Dn&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){b=f=f.next;do{var T=b,D=T.destroy;T=T.tag,D!==void 0&&((T&2)!==0||(T&4)!==0)&&wf(u,i,D),b=b.next}while(b!==f)}zs(s,i,u);break;case 1:if(!Dn&&(ki(u,i),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(W){$t(u,i,W)}zs(s,i,u);break;case 21:zs(s,i,u);break;case 22:u.mode&1?(Dn=(f=Dn)||u.memoizedState!==null,zs(s,i,u),Dn=f):zs(s,i,u);break;default:zs(s,i,u)}}function xg(s){var i=s.updateQueue;if(i!==null){s.updateQueue=null;var u=s.stateNode;u===null&&(u=s.stateNode=new cv),i.forEach(function(f){var b=xv.bind(null,s,f);u.has(f)||(u.add(f),f.then(b,b))})}}function Dr(s,i){var u=i.deletions;if(u!==null)for(var f=0;f<u.length;f++){var b=u[f];try{var T=s,D=i,W=D;e:for(;W!==null;){switch(W.tag){case 5:vn=W.stateNode,Or=!1;break e;case 3:vn=W.stateNode.containerInfo,Or=!0;break e;case 4:vn=W.stateNode.containerInfo,Or=!0;break e}W=W.return}if(vn===null)throw Error(n(160));Eg(T,D,b),vn=null,Or=!1;var V=b.alternate;V!==null&&(V.return=null),b.return=null}catch(re){$t(b,i,re)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Tg(i,s),i=i.sibling}function Tg(s,i){var u=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Dr(i,s),$r(s),f&4){try{Qo(3,s,s.return),Ul(3,s)}catch(Oe){$t(s,s.return,Oe)}try{Qo(5,s,s.return)}catch(Oe){$t(s,s.return,Oe)}}break;case 1:Dr(i,s),$r(s),f&512&&u!==null&&ki(u,u.return);break;case 5:if(Dr(i,s),$r(s),f&512&&u!==null&&ki(u,u.return),s.flags&32){var b=s.stateNode;try{qe(b,"")}catch(Oe){$t(s,s.return,Oe)}}if(f&4&&(b=s.stateNode,b!=null)){var T=s.memoizedProps,D=u!==null?u.memoizedProps:T,W=s.type,V=s.updateQueue;if(s.updateQueue=null,V!==null)try{W==="input"&&T.type==="radio"&&T.name!=null&&nn(b,T),yt(W,D);var re=yt(W,T);for(D=0;D<V.length;D+=2){var ce=V[D],de=V[D+1];ce==="style"?_n(b,de):ce==="dangerouslySetInnerHTML"?je(b,de):ce==="children"?qe(b,de):N(b,ce,de,re)}switch(W){case"input":mn(b,T);break;case"textarea":tr(b,T);break;case"select":var ue=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!T.multiple;var xe=T.value;xe!=null?Et(b,!!T.multiple,xe,!1):ue!==!!T.multiple&&(T.defaultValue!=null?Et(b,!!T.multiple,T.defaultValue,!0):Et(b,!!T.multiple,T.multiple?[]:"",!1))}b[Fo]=T}catch(Oe){$t(s,s.return,Oe)}}break;case 6:if(Dr(i,s),$r(s),f&4){if(s.stateNode===null)throw Error(n(162));b=s.stateNode,T=s.memoizedProps;try{b.nodeValue=T}catch(Oe){$t(s,s.return,Oe)}}break;case 3:if(Dr(i,s),$r(s),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Co(i.containerInfo)}catch(Oe){$t(s,s.return,Oe)}break;case 4:Dr(i,s),$r(s);break;case 13:Dr(i,s),$r(s),b=s.child,b.flags&8192&&(T=b.memoizedState!==null,b.stateNode.isHidden=T,!T||b.alternate!==null&&b.alternate.memoizedState!==null||(Of=wt())),f&4&&xg(s);break;case 22:if(ce=u!==null&&u.memoizedState!==null,s.mode&1?(Dn=(re=Dn)||ce,Dr(i,s),Dn=re):Dr(i,s),$r(s),f&8192){if(re=s.memoizedState!==null,(s.stateNode.isHidden=re)&&!ce&&(s.mode&1)!==0)for(we=s,ce=s.child;ce!==null;){for(de=we=ce;we!==null;){switch(ue=we,xe=ue.child,ue.tag){case 0:case 11:case 14:case 15:Qo(4,ue,ue.return);break;case 1:ki(ue,ue.return);var ke=ue.stateNode;if(typeof ke.componentWillUnmount=="function"){f=ue,u=ue.return;try{i=f,ke.props=i.memoizedProps,ke.state=i.memoizedState,ke.componentWillUnmount()}catch(Oe){$t(f,u,Oe)}}break;case 5:ki(ue,ue.return);break;case 22:if(ue.memoizedState!==null){Sg(de);continue}}xe!==null?(xe.return=ue,we=xe):Sg(de)}ce=ce.sibling}e:for(ce=null,de=s;;){if(de.tag===5){if(ce===null){ce=de;try{b=de.stateNode,re?(T=b.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(W=de.stateNode,V=de.memoizedProps.style,D=V!=null&&V.hasOwnProperty("display")?V.display:null,W.style.display=rn("display",D))}catch(Oe){$t(s,s.return,Oe)}}}else if(de.tag===6){if(ce===null)try{de.stateNode.nodeValue=re?"":de.memoizedProps}catch(Oe){$t(s,s.return,Oe)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===s)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===s)break e;for(;de.sibling===null;){if(de.return===null||de.return===s)break e;ce===de&&(ce=null),de=de.return}ce===de&&(ce=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:Dr(i,s),$r(s),f&4&&xg(s);break;case 21:break;default:Dr(i,s),$r(s)}}function $r(s){var i=s.flags;if(i&2){try{e:{for(var u=s.return;u!==null;){if(yg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var b=f.stateNode;f.flags&32&&(qe(b,""),f.flags&=-33);var T=bg(s);Cf(s,T,b);break;case 3:case 4:var D=f.stateNode.containerInfo,W=bg(s);_f(s,W,D);break;default:throw Error(n(161))}}catch(V){$t(s,s.return,V)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function fv(s,i,u){we=s,vg(s)}function vg(s,i,u){for(var f=(s.mode&1)!==0;we!==null;){var b=we,T=b.child;if(b.tag===22&&f){var D=b.memoizedState!==null||Hl;if(!D){var W=b.alternate,V=W!==null&&W.memoizedState!==null||Dn;W=Hl;var re=Dn;if(Hl=D,(Dn=V)&&!re)for(we=b;we!==null;)D=we,V=D.child,D.tag===22&&D.memoizedState!==null?_g(b):V!==null?(V.return=D,we=V):_g(b);for(;T!==null;)we=T,vg(T),T=T.sibling;we=b,Hl=W,Dn=re}wg(s)}else(b.subtreeFlags&8772)!==0&&T!==null?(T.return=b,we=T):wg(s)}}function wg(s){for(;we!==null;){var i=we;if((i.flags&8772)!==0){var u=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Dn||Ul(5,i);break;case 1:var f=i.stateNode;if(i.flags&4&&!Dn)if(u===null)f.componentDidMount();else{var b=i.elementType===i.type?u.memoizedProps:Nr(i.type,u.memoizedProps);f.componentDidUpdate(b,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var T=i.updateQueue;T!==null&&Sm(i,T,f);break;case 3:var D=i.updateQueue;if(D!==null){if(u=null,i.child!==null)switch(i.child.tag){case 5:u=i.child.stateNode;break;case 1:u=i.child.stateNode}Sm(i,D,u)}break;case 5:var W=i.stateNode;if(u===null&&i.flags&4){u=W;var V=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&u.focus();break;case"img":V.src&&(u.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var re=i.alternate;if(re!==null){var ce=re.memoizedState;if(ce!==null){var de=ce.dehydrated;de!==null&&Co(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Dn||i.flags&512&&Sf(i)}catch(ue){$t(i,i.return,ue)}}if(i===s){we=null;break}if(u=i.sibling,u!==null){u.return=i.return,we=u;break}we=i.return}}function Sg(s){for(;we!==null;){var i=we;if(i===s){we=null;break}var u=i.sibling;if(u!==null){u.return=i.return,we=u;break}we=i.return}}function _g(s){for(;we!==null;){var i=we;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{Ul(4,i)}catch(V){$t(i,u,V)}break;case 1:var f=i.stateNode;if(typeof f.componentDidMount=="function"){var b=i.return;try{f.componentDidMount()}catch(V){$t(i,b,V)}}var T=i.return;try{Sf(i)}catch(V){$t(i,T,V)}break;case 5:var D=i.return;try{Sf(i)}catch(V){$t(i,D,V)}}}catch(V){$t(i,i.return,V)}if(i===s){we=null;break}var W=i.sibling;if(W!==null){W.return=i.return,we=W;break}we=i.return}}var hv=Math.ceil,zl=A.ReactCurrentDispatcher,kf=A.ReactCurrentOwner,gr=A.ReactCurrentBatchConfig,rt=0,yn=null,sn=null,wn=0,ar=0,Ni=Fs(0),fn=0,Go=null,ka=0,Wl=0,Nf=0,Xo=null,qn=null,Of=0,Oi=1/0,gs=null,Yl=!1,Df=null,Ws=null,ql=!1,Ys=null,$l=0,Ko=0,Af=null,Vl=-1,Ql=0;function Fn(){return(rt&6)!==0?wt():Vl!==-1?Vl:Vl=wt()}function qs(s){return(s.mode&1)===0?1:(rt&2)!==0&&wn!==0?wn&-wn:XT.transition!==null?(Ql===0&&(Ql=bp()),Ql):(s=pt,s!==0||(s=window.event,s=s===void 0?16:kp(s.type)),s)}function Ar(s,i,u,f){if(50<Ko)throw Ko=0,Af=null,Error(n(185));To(s,u,f),((rt&2)===0||s!==yn)&&(s===yn&&((rt&2)===0&&(Wl|=u),fn===4&&$s(s,wn)),$n(s,f),u===1&&rt===0&&(i.mode&1)===0&&(Oi=wt()+500,vl&&js()))}function $n(s,i){var u=s.callbackNode;X2(s,i);var f=rl(s,s===yn?wn:0);if(f===0)u!==null&&vt(u),s.callbackNode=null,s.callbackPriority=0;else if(i=f&-f,s.callbackPriority!==i){if(u!=null&&vt(u),i===1)s.tag===0?GT(kg.bind(null,s)):fm(kg.bind(null,s)),qT(function(){(rt&6)===0&&js()}),u=null;else{switch(Ep(f)){case 1:u=Ea;break;case 4:u=gp;break;case 16:u=Zu;break;case 536870912:u=yp;break;default:u=Zu}u=Pg(u,Cg.bind(null,s))}s.callbackPriority=i,s.callbackNode=u}}function Cg(s,i){if(Vl=-1,Ql=0,(rt&6)!==0)throw Error(n(327));var u=s.callbackNode;if(Di()&&s.callbackNode!==u)return null;var f=rl(s,s===yn?wn:0);if(f===0)return null;if((f&30)!==0||(f&s.expiredLanes)!==0||i)i=Gl(s,f);else{i=f;var b=rt;rt|=2;var T=Og();(yn!==s||wn!==i)&&(gs=null,Oi=wt()+500,Oa(s,i));do try{gv();break}catch(W){Ng(s,W)}while(!0);Qd(),zl.current=T,rt=b,sn!==null?i=0:(yn=null,wn=0,i=fn)}if(i!==0){if(i===2&&(b=cd(s),b!==0&&(f=b,i=If(s,b))),i===1)throw u=Go,Oa(s,0),$s(s,f),$n(s,wt()),u;if(i===6)$s(s,f);else{if(b=s.current.alternate,(f&30)===0&&!pv(b)&&(i=Gl(s,f),i===2&&(T=cd(s),T!==0&&(f=T,i=If(s,T))),i===1))throw u=Go,Oa(s,0),$s(s,f),$n(s,wt()),u;switch(s.finishedWork=b,s.finishedLanes=f,i){case 0:case 1:throw Error(n(345));case 2:Da(s,qn,gs);break;case 3:if($s(s,f),(f&130023424)===f&&(i=Of+500-wt(),10<i)){if(rl(s,0)!==0)break;if(b=s.suspendedLanes,(b&f)!==f){Fn(),s.pingedLanes|=s.suspendedLanes&b;break}s.timeoutHandle=Fd(Da.bind(null,s,qn,gs),i);break}Da(s,qn,gs);break;case 4:if($s(s,f),(f&4194240)===f)break;for(i=s.eventTimes,b=-1;0<f;){var D=31-_r(f);T=1<<D,D=i[D],D>b&&(b=D),f&=~T}if(f=b,f=wt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*hv(f/1960))-f,10<f){s.timeoutHandle=Fd(Da.bind(null,s,qn,gs),f);break}Da(s,qn,gs);break;case 5:Da(s,qn,gs);break;default:throw Error(n(329))}}}return $n(s,wt()),s.callbackNode===u?Cg.bind(null,s):null}function If(s,i){var u=Xo;return s.current.memoizedState.isDehydrated&&(Oa(s,i).flags|=256),s=Gl(s,i),s!==2&&(i=qn,qn=u,i!==null&&Rf(i)),s}function Rf(s){qn===null?qn=s:qn.push.apply(qn,s)}function pv(s){for(var i=s;;){if(i.flags&16384){var u=i.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var b=u[f],T=b.getSnapshot;b=b.value;try{if(!Cr(T(),b))return!1}catch{return!1}}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function $s(s,i){for(i&=~Nf,i&=~Wl,s.suspendedLanes|=i,s.pingedLanes&=~i,s=s.expirationTimes;0<i;){var u=31-_r(i),f=1<<u;s[u]=-1,i&=~f}}function kg(s){if((rt&6)!==0)throw Error(n(327));Di();var i=rl(s,0);if((i&1)===0)return $n(s,wt()),null;var u=Gl(s,i);if(s.tag!==0&&u===2){var f=cd(s);f!==0&&(i=f,u=If(s,f))}if(u===1)throw u=Go,Oa(s,0),$s(s,i),$n(s,wt()),u;if(u===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=i,Da(s,qn,gs),$n(s,wt()),null}function Lf(s,i){var u=rt;rt|=1;try{return s(i)}finally{rt=u,rt===0&&(Oi=wt()+500,vl&&js())}}function Na(s){Ys!==null&&Ys.tag===0&&(rt&6)===0&&Di();var i=rt;rt|=1;var u=gr.transition,f=pt;try{if(gr.transition=null,pt=1,s)return s()}finally{pt=f,gr.transition=u,rt=i,(rt&6)===0&&js()}}function Pf(){ar=Ni.current,Dt(Ni)}function Oa(s,i){s.finishedWork=null,s.finishedLanes=0;var u=s.timeoutHandle;if(u!==-1&&(s.timeoutHandle=-1,YT(u)),sn!==null)for(u=sn.return;u!==null;){var f=u;switch(Wd(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&xl();break;case 3:_i(),Dt(zn),Dt(kn),nf();break;case 5:ef(f);break;case 4:_i();break;case 13:Dt(Ft);break;case 19:Dt(Ft);break;case 10:Gd(f.type._context);break;case 22:case 23:Pf()}u=u.return}if(yn=s,sn=s=Vs(s.current,null),wn=ar=i,fn=0,Go=null,Nf=Wl=ka=0,qn=Xo=null,Sa!==null){for(i=0;i<Sa.length;i++)if(u=Sa[i],f=u.interleaved,f!==null){u.interleaved=null;var b=f.next,T=u.pending;if(T!==null){var D=T.next;T.next=b,f.next=D}u.pending=f}Sa=null}return s}function Ng(s,i){do{var u=sn;try{if(Qd(),Il.current=Ml,Rl){for(var f=Bt.memoizedState;f!==null;){var b=f.queue;b!==null&&(b.pending=null),f=f.next}Rl=!1}if(Ca=0,gn=dn=Bt=null,Wo=!1,Yo=0,kf.current=null,u===null||u.return===null){fn=1,Go=i,sn=null;break}e:{var T=s,D=u.return,W=u,V=i;if(i=wn,W.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var re=V,ce=W,de=ce.tag;if((ce.mode&1)===0&&(de===0||de===11||de===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var xe=Zm(D);if(xe!==null){xe.flags&=-257,eg(xe,D,W,T,i),xe.mode&1&&Jm(T,re,i),i=xe,V=re;var ke=i.updateQueue;if(ke===null){var Oe=new Set;Oe.add(V),i.updateQueue=Oe}else ke.add(V);break e}else{if((i&1)===0){Jm(T,re,i),Mf();break e}V=Error(n(426))}}else if(Lt&&W.mode&1){var Xt=Zm(D);if(Xt!==null){(Xt.flags&65536)===0&&(Xt.flags|=256),eg(Xt,D,W,T,i),$d(Ci(V,W));break e}}T=V=Ci(V,W),fn!==4&&(fn=2),Xo===null?Xo=[T]:Xo.push(T),T=D;do{switch(T.tag){case 3:T.flags|=65536,i&=-i,T.lanes|=i;var Z=Xm(T,V,i);wm(T,Z);break e;case 1:W=V;var Q=T.type,ne=T.stateNode;if((T.flags&128)===0&&(typeof Q.getDerivedStateFromError=="function"||ne!==null&&typeof ne.componentDidCatch=="function"&&(Ws===null||!Ws.has(ne)))){T.flags|=65536,i&=-i,T.lanes|=i;var ge=Km(T,W,i);wm(T,ge);break e}}T=T.return}while(T!==null)}Ag(u)}catch(De){i=De,sn===u&&u!==null&&(sn=u=u.return);continue}break}while(!0)}function Og(){var s=zl.current;return zl.current=Ml,s===null?Ml:s}function Mf(){(fn===0||fn===3||fn===2)&&(fn=4),yn===null||(ka&268435455)===0&&(Wl&268435455)===0||$s(yn,wn)}function Gl(s,i){var u=rt;rt|=2;var f=Og();(yn!==s||wn!==i)&&(gs=null,Oa(s,i));do try{mv();break}catch(b){Ng(s,b)}while(!0);if(Qd(),rt=u,zl.current=f,sn!==null)throw Error(n(261));return yn=null,wn=0,fn}function mv(){for(;sn!==null;)Dg(sn)}function gv(){for(;sn!==null&&!Eo();)Dg(sn)}function Dg(s){var i=Lg(s.alternate,s,ar);s.memoizedProps=s.pendingProps,i===null?Ag(s):sn=i,kf.current=null}function Ag(s){var i=s;do{var u=i.alternate;if(s=i.return,(i.flags&32768)===0){if(u=uv(u,i,ar),u!==null){sn=u;return}}else{if(u=lv(u,i),u!==null){u.flags&=32767,sn=u;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{fn=6,sn=null;return}}if(i=i.sibling,i!==null){sn=i;return}sn=i=s}while(i!==null);fn===0&&(fn=5)}function Da(s,i,u){var f=pt,b=gr.transition;try{gr.transition=null,pt=1,yv(s,i,u,f)}finally{gr.transition=b,pt=f}return null}function yv(s,i,u,f){do Di();while(Ys!==null);if((rt&6)!==0)throw Error(n(327));u=s.finishedWork;var b=s.finishedLanes;if(u===null)return null;if(s.finishedWork=null,s.finishedLanes=0,u===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var T=u.lanes|u.childLanes;if(K2(s,T),s===yn&&(sn=yn=null,wn=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||ql||(ql=!0,Pg(Zu,function(){return Di(),null})),T=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||T){T=gr.transition,gr.transition=null;var D=pt;pt=1;var W=rt;rt|=4,kf.current=null,dv(s,u),Tg(u,s),FT(Pd),il=!!Ld,Pd=Ld=null,s.current=u,fv(u),ui(),rt=W,pt=D,gr.transition=T}else s.current=u;if(ql&&(ql=!1,Ys=s,$l=b),T=s.pendingLanes,T===0&&(Ws=null),q2(u.stateNode),$n(s,wt()),i!==null)for(f=s.onRecoverableError,u=0;u<i.length;u++)b=i[u],f(b.value,{componentStack:b.stack,digest:b.digest});if(Yl)throw Yl=!1,s=Df,Df=null,s;return($l&1)!==0&&s.tag!==0&&Di(),T=s.pendingLanes,(T&1)!==0?s===Af?Ko++:(Ko=0,Af=s):Ko=0,js(),null}function Di(){if(Ys!==null){var s=Ep($l),i=gr.transition,u=pt;try{if(gr.transition=null,pt=16>s?16:s,Ys===null)var f=!1;else{if(s=Ys,Ys=null,$l=0,(rt&6)!==0)throw Error(n(331));var b=rt;for(rt|=4,we=s.current;we!==null;){var T=we,D=T.child;if((we.flags&16)!==0){var W=T.deletions;if(W!==null){for(var V=0;V<W.length;V++){var re=W[V];for(we=re;we!==null;){var ce=we;switch(ce.tag){case 0:case 11:case 15:Qo(8,ce,T)}var de=ce.child;if(de!==null)de.return=ce,we=de;else for(;we!==null;){ce=we;var ue=ce.sibling,xe=ce.return;if(gg(ce),ce===re){we=null;break}if(ue!==null){ue.return=xe,we=ue;break}we=xe}}}var ke=T.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Xt=Oe.sibling;Oe.sibling=null,Oe=Xt}while(Oe!==null)}}we=T}}if((T.subtreeFlags&2064)!==0&&D!==null)D.return=T,we=D;else e:for(;we!==null;){if(T=we,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Qo(9,T,T.return)}var Z=T.sibling;if(Z!==null){Z.return=T.return,we=Z;break e}we=T.return}}var Q=s.current;for(we=Q;we!==null;){D=we;var ne=D.child;if((D.subtreeFlags&2064)!==0&&ne!==null)ne.return=D,we=ne;else e:for(D=Q;we!==null;){if(W=we,(W.flags&2048)!==0)try{switch(W.tag){case 0:case 11:case 15:Ul(9,W)}}catch(De){$t(W,W.return,De)}if(W===D){we=null;break e}var ge=W.sibling;if(ge!==null){ge.return=W.return,we=ge;break e}we=W.return}}if(rt=b,js(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(el,s)}catch{}f=!0}return f}finally{pt=u,gr.transition=i}}return!1}function Ig(s,i,u){i=Ci(u,i),i=Xm(s,i,1),s=Us(s,i,1),i=Fn(),s!==null&&(To(s,1,i),$n(s,i))}function $t(s,i,u){if(s.tag===3)Ig(s,s,u);else for(;i!==null;){if(i.tag===3){Ig(i,s,u);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ws===null||!Ws.has(f))){s=Ci(u,s),s=Km(i,s,1),i=Us(i,s,1),s=Fn(),i!==null&&(To(i,1,s),$n(i,s));break}}i=i.return}}function bv(s,i,u){var f=s.pingCache;f!==null&&f.delete(i),i=Fn(),s.pingedLanes|=s.suspendedLanes&u,yn===s&&(wn&u)===u&&(fn===4||fn===3&&(wn&130023424)===wn&&500>wt()-Of?Oa(s,0):Nf|=u),$n(s,i)}function Rg(s,i){i===0&&((s.mode&1)===0?i=1:(i=nl,nl<<=1,(nl&130023424)===0&&(nl=4194304)));var u=Fn();s=hs(s,i),s!==null&&(To(s,i,u),$n(s,u))}function Ev(s){var i=s.memoizedState,u=0;i!==null&&(u=i.retryLane),Rg(s,u)}function xv(s,i){var u=0;switch(s.tag){case 13:var f=s.stateNode,b=s.memoizedState;b!==null&&(u=b.retryLane);break;case 19:f=s.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(i),Rg(s,u)}var Lg;Lg=function(s,i,u){if(s!==null)if(s.memoizedProps!==i.pendingProps||zn.current)Yn=!0;else{if((s.lanes&u)===0&&(i.flags&128)===0)return Yn=!1,ov(s,i,u);Yn=(s.flags&131072)!==0}else Yn=!1,Lt&&(i.flags&1048576)!==0&&hm(i,Sl,i.index);switch(i.lanes=0,i.tag){case 2:var f=i.type;jl(s,i),s=i.pendingProps;var b=bi(i,kn.current);Si(i,u),b=af(null,i,f,s,b,u);var T=of();return i.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Wn(f)?(T=!0,Tl(i)):T=!1,i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,Jd(i),b.updater=Fl,i.stateNode=b,b._reactInternals=i,hf(i,f,s,u),i=yf(null,i,f,!0,T,u)):(i.tag=0,Lt&&T&&zd(i),Mn(null,i,b,u),i=i.child),i;case 16:f=i.elementType;e:{switch(jl(s,i),s=i.pendingProps,b=f._init,f=b(f._payload),i.type=f,b=i.tag=vv(f),s=Nr(f,s),b){case 0:i=gf(null,i,f,s,u);break e;case 1:i=ig(null,i,f,s,u);break e;case 11:i=tg(null,i,f,s,u);break e;case 14:i=ng(null,i,f,Nr(f.type,s),u);break e}throw Error(n(306,f,""))}return i;case 0:return f=i.type,b=i.pendingProps,b=i.elementType===f?b:Nr(f,b),gf(s,i,f,b,u);case 1:return f=i.type,b=i.pendingProps,b=i.elementType===f?b:Nr(f,b),ig(s,i,f,b,u);case 3:e:{if(og(i),s===null)throw Error(n(387));f=i.pendingProps,T=i.memoizedState,b=T.element,vm(s,i),Dl(i,f,null,u);var D=i.memoizedState;if(f=D.element,T.isDehydrated)if(T={element:f,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},i.updateQueue.baseState=T,i.memoizedState=T,i.flags&256){b=Ci(Error(n(423)),i),i=ug(s,i,f,u,b);break e}else if(f!==b){b=Ci(Error(n(424)),i),i=ug(s,i,f,u,b);break e}else for(sr=Ms(i.stateNode.containerInfo.firstChild),rr=i,Lt=!0,kr=null,u=xm(i,null,f,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ti(),f===b){i=ms(s,i,u);break e}Mn(s,i,f,u)}i=i.child}return i;case 5:return _m(i),s===null&&qd(i),f=i.type,b=i.pendingProps,T=s!==null?s.memoizedProps:null,D=b.children,Md(f,b)?D=null:T!==null&&Md(f,T)&&(i.flags|=32),ag(s,i),Mn(s,i,D,u),i.child;case 6:return s===null&&qd(i),null;case 13:return lg(s,i,u);case 4:return Zd(i,i.stateNode.containerInfo),f=i.pendingProps,s===null?i.child=vi(i,null,f,u):Mn(s,i,f,u),i.child;case 11:return f=i.type,b=i.pendingProps,b=i.elementType===f?b:Nr(f,b),tg(s,i,f,b,u);case 7:return Mn(s,i,i.pendingProps,u),i.child;case 8:return Mn(s,i,i.pendingProps.children,u),i.child;case 12:return Mn(s,i,i.pendingProps.children,u),i.child;case 10:e:{if(f=i.type._context,b=i.pendingProps,T=i.memoizedProps,D=b.value,St(kl,f._currentValue),f._currentValue=D,T!==null)if(Cr(T.value,D)){if(T.children===b.children&&!zn.current){i=ms(s,i,u);break e}}else for(T=i.child,T!==null&&(T.return=i);T!==null;){var W=T.dependencies;if(W!==null){D=T.child;for(var V=W.firstContext;V!==null;){if(V.context===f){if(T.tag===1){V=ps(-1,u&-u),V.tag=2;var re=T.updateQueue;if(re!==null){re=re.shared;var ce=re.pending;ce===null?V.next=V:(V.next=ce.next,ce.next=V),re.pending=V}}T.lanes|=u,V=T.alternate,V!==null&&(V.lanes|=u),Xd(T.return,u,i),W.lanes|=u;break}V=V.next}}else if(T.tag===10)D=T.type===i.type?null:T.child;else if(T.tag===18){if(D=T.return,D===null)throw Error(n(341));D.lanes|=u,W=D.alternate,W!==null&&(W.lanes|=u),Xd(D,u,i),D=T.sibling}else D=T.child;if(D!==null)D.return=T;else for(D=T;D!==null;){if(D===i){D=null;break}if(T=D.sibling,T!==null){T.return=D.return,D=T;break}D=D.return}T=D}Mn(s,i,b.children,u),i=i.child}return i;case 9:return b=i.type,f=i.pendingProps.children,Si(i,u),b=pr(b),f=f(b),i.flags|=1,Mn(s,i,f,u),i.child;case 14:return f=i.type,b=Nr(f,i.pendingProps),b=Nr(f.type,b),ng(s,i,f,b,u);case 15:return rg(s,i,i.type,i.pendingProps,u);case 17:return f=i.type,b=i.pendingProps,b=i.elementType===f?b:Nr(f,b),jl(s,i),i.tag=1,Wn(f)?(s=!0,Tl(i)):s=!1,Si(i,u),Qm(i,f,b),hf(i,f,b,u),yf(null,i,f,!0,s,u);case 19:return dg(s,i,u);case 22:return sg(s,i,u)}throw Error(n(156,i.tag))};function Pg(s,i){return ba(s,i)}function Tv(s,i,u,f){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yr(s,i,u,f){return new Tv(s,i,u,f)}function Ff(s){return s=s.prototype,!(!s||!s.isReactComponent)}function vv(s){if(typeof s=="function")return Ff(s)?1:0;if(s!=null){if(s=s.$$typeof,s===Y)return 11;if(s===K)return 14}return 2}function Vs(s,i){var u=s.alternate;return u===null?(u=yr(s.tag,i,s.key,s.mode),u.elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=i,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=s.flags&14680064,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,i=s.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u}function Xl(s,i,u,f,b,T){var D=2;if(f=s,typeof s=="function")Ff(s)&&(D=1);else if(typeof s=="string")D=5;else e:switch(s){case O:return Aa(u.children,b,T,i);case I:D=8,b|=8;break;case P:return s=yr(12,u,i,b|2),s.elementType=P,s.lanes=T,s;case G:return s=yr(13,u,i,b),s.elementType=G,s.lanes=T,s;case X:return s=yr(19,u,i,b),s.elementType=X,s.lanes=T,s;case se:return Kl(u,b,T,i);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case H:D=10;break e;case F:D=9;break e;case Y:D=11;break e;case K:D=14;break e;case $:D=16,f=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return i=yr(D,u,i,b),i.elementType=s,i.type=f,i.lanes=T,i}function Aa(s,i,u,f){return s=yr(7,s,f,i),s.lanes=u,s}function Kl(s,i,u,f){return s=yr(22,s,f,i),s.elementType=se,s.lanes=u,s.stateNode={isHidden:!1},s}function Bf(s,i,u){return s=yr(6,s,null,i),s.lanes=u,s}function jf(s,i,u){return i=yr(4,s.children!==null?s.children:[],s.key,i),i.lanes=u,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}function wv(s,i,u,f,b){this.tag=i,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dd(0),this.expirationTimes=dd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dd(0),this.identifierPrefix=f,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function Hf(s,i,u,f,b,T,D,W,V){return s=new wv(s,i,u,W,V),i===1?(i=1,T===!0&&(i|=8)):i=0,T=yr(3,null,null,i),s.current=T,T.stateNode=s,T.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jd(T),s}function Sv(s,i,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:f==null?null:""+f,children:s,containerInfo:i,implementation:u}}function Mg(s){if(!s)return Bs;s=s._reactInternals;e:{if(Tt(s)!==s||s.tag!==1)throw Error(n(170));var i=s;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Wn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(s.tag===1){var u=s.type;if(Wn(u))return cm(s,u,i)}return i}function Fg(s,i,u,f,b,T,D,W,V){return s=Hf(u,f,!0,s,b,T,D,W,V),s.context=Mg(null),u=s.current,f=Fn(),b=qs(u),T=ps(f,b),T.callback=i??null,Us(u,T,b),s.current.lanes=b,To(s,b,f),$n(s,f),s}function Jl(s,i,u,f){var b=i.current,T=Fn(),D=qs(b);return u=Mg(u),i.context===null?i.context=u:i.pendingContext=u,i=ps(T,D),i.payload={element:s},f=f===void 0?null:f,f!==null&&(i.callback=f),s=Us(b,i,D),s!==null&&(Ar(s,b,D,T),Ol(s,b,D)),D}function Zl(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Bg(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var u=s.retryLane;s.retryLane=u!==0&&u<i?u:i}}function Uf(s,i){Bg(s,i),(s=s.alternate)&&Bg(s,i)}function _v(){return null}var jg=typeof reportError=="function"?reportError:function(s){console.error(s)};function zf(s){this._internalRoot=s}ec.prototype.render=zf.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(n(409));Jl(s,i,null,null)},ec.prototype.unmount=zf.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;Na(function(){Jl(null,s,null,null)}),i[ls]=null}};function ec(s){this._internalRoot=s}ec.prototype.unstable_scheduleHydration=function(s){if(s){var i=vp();s={blockedOn:null,target:s,priority:i};for(var u=0;u<Rs.length&&i!==0&&i<Rs[u].priority;u++);Rs.splice(u,0,s),u===0&&_p(s)}};function Wf(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function tc(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Hg(){}function Cv(s,i,u,f,b){if(b){if(typeof f=="function"){var T=f;f=function(){var re=Zl(D);T.call(re)}}var D=Fg(i,f,s,0,null,!1,!1,"",Hg);return s._reactRootContainer=D,s[ls]=D.current,Po(s.nodeType===8?s.parentNode:s),Na(),D}for(;b=s.lastChild;)s.removeChild(b);if(typeof f=="function"){var W=f;f=function(){var re=Zl(V);W.call(re)}}var V=Hf(s,0,!1,null,null,!1,!1,"",Hg);return s._reactRootContainer=V,s[ls]=V.current,Po(s.nodeType===8?s.parentNode:s),Na(function(){Jl(i,V,u,f)}),V}function nc(s,i,u,f,b){var T=u._reactRootContainer;if(T){var D=T;if(typeof b=="function"){var W=b;b=function(){var V=Zl(D);W.call(V)}}Jl(i,D,s,b)}else D=Cv(u,i,s,b,f);return Zl(D)}xp=function(s){switch(s.tag){case 3:var i=s.stateNode;if(i.current.memoizedState.isDehydrated){var u=xo(i.pendingLanes);u!==0&&(fd(i,u|1),$n(i,wt()),(rt&6)===0&&(Oi=wt()+500,js()))}break;case 13:Na(function(){var f=hs(s,1);if(f!==null){var b=Fn();Ar(f,s,1,b)}}),Uf(s,1)}},hd=function(s){if(s.tag===13){var i=hs(s,134217728);if(i!==null){var u=Fn();Ar(i,s,134217728,u)}Uf(s,134217728)}},Tp=function(s){if(s.tag===13){var i=qs(s),u=hs(s,i);if(u!==null){var f=Fn();Ar(u,s,i,f)}Uf(s,i)}},vp=function(){return pt},wp=function(s,i){var u=pt;try{return pt=s,i()}finally{pt=u}},Le=function(s,i,u){switch(i){case"input":if(mn(s,u),i=u.name,u.type==="radio"&&i!=null){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<u.length;i++){var f=u[i];if(f!==s&&f.form===s.form){var b=El(f);if(!b)throw Error(n(90));pn(f),mn(f,b)}}}break;case"textarea":tr(s,u);break;case"select":i=u.value,i!=null&&Et(s,!!u.multiple,i,!1)}},It=Lf,Wt=Na;var kv={usingClientEntryPoint:!1,Events:[Bo,gi,El,Ge,_e,Lf]},Jo={findFiberByHostInstance:xa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nv={bundleType:Jo.bundleType,version:Jo.version,rendererPackageName:Jo.rendererPackageName,rendererConfig:Jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=dr(s),s===null?null:s.stateNode},findFiberByHostInstance:Jo.findFiberByHostInstance||_v,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{el=rc.inject(Nv),zr=rc}catch{}}return Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kv,Vn.createPortal=function(s,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wf(i))throw Error(n(200));return Sv(s,i,null,u)},Vn.createRoot=function(s,i){if(!Wf(s))throw Error(n(299));var u=!1,f="",b=jg;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onRecoverableError!==void 0&&(b=i.onRecoverableError)),i=Hf(s,1,!1,null,null,u,!1,f,b),s[ls]=i.current,Po(s.nodeType===8?s.parentNode:s),new zf(i)},Vn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=dr(i),s=s===null?null:s.stateNode,s},Vn.flushSync=function(s){return Na(s)},Vn.hydrate=function(s,i,u){if(!tc(i))throw Error(n(200));return nc(null,s,i,!0,u)},Vn.hydrateRoot=function(s,i,u){if(!Wf(s))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,b=!1,T="",D=jg;if(u!=null&&(u.unstable_strictMode===!0&&(b=!0),u.identifierPrefix!==void 0&&(T=u.identifierPrefix),u.onRecoverableError!==void 0&&(D=u.onRecoverableError)),i=Fg(i,null,s,1,u??null,b,!1,T,D),s[ls]=i.current,Po(s),f)for(s=0;s<f.length;s++)u=f[s],b=u._getVersion,b=b(u._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[u,b]:i.mutableSourceEagerHydrationData.push(u,b);return new ec(i)},Vn.render=function(s,i,u){if(!tc(i))throw Error(n(200));return nc(null,s,i,!1,u)},Vn.unmountComponentAtNode=function(s){if(!tc(s))throw Error(n(40));return s._reactRootContainer?(Na(function(){nc(null,null,s,!1,function(){s._reactRootContainer=null,s[ls]=null})}),!0):!1},Vn.unstable_batchedUpdates=Lf,Vn.unstable_renderSubtreeIntoContainer=function(s,i,u,f){if(!tc(u))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return nc(s,i,u,!1,f)},Vn.version="18.3.1-next-f1338f8080-20240426",Vn}var Vg;function Bc(){if(Vg)return $f.exports;Vg=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(),$f.exports=Fv(),$f.exports}var Qg;function Bv(){if(Qg)return ac;Qg=1;var e=Bc();return ac.createRoot=e.createRoot,ac.hydrateRoot=e.hydrateRoot,ac}var jv=Bv(),ni=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Hv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},na,m0,sb,Uv=(sb=class{constructor(){ve(this,na,Hv);ve(this,m0,!1)}setTimeoutProvider(e){ye(this,na,e)}setTimeout(e,t){return z(this,na).setTimeout(e,t)}clearTimeout(e){z(this,na).clearTimeout(e)}setInterval(e,t){return z(this,na).setInterval(e,t)}clearInterval(e){z(this,na).clearInterval(e)}},na=new WeakMap,m0=new WeakMap,sb),Pa=new Uv;function zv(e){setTimeout(e,0)}var Xa=typeof window>"u"||"Deno"in globalThis;function In(){}function Wv(e,t){return typeof e=="function"?e(t):e}function Ch(e){return typeof e=="number"&&e>=0&&e!==1/0}function yb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function Tr(e,t){return typeof e=="function"?e(t):e}function Gg(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==g0(l,t.options))return!1}else if(!Nu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||o&&!o(t))}function Xg(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ka(t.options.mutationKey)!==Ka(o))return!1}else if(!Nu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function g0(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ka)(e)}function Ka(e){return JSON.stringify(e,(t,n)=>kh(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Nu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Nu(e[n],t[n])):!1}var Yv=Object.prototype.hasOwnProperty;function y0(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Kg(e)&&Kg(t);if(!r&&!(kh(e)&&kh(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let h=0;for(let p=0;p<c;p++){const m=r?p:l[p],x=e[m],E=t[m];if(x===E){d[m]=x,(r?p<o:Yv.call(e,m))&&h++;continue}if(x===null||E===null||typeof x!="object"||typeof E!="object"){d[m]=E;continue}const _=y0(x,E,n+1);d[m]=_,_===x&&h++}return o===c&&h===o?e:d}function Ou(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Kg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kh(e){if(!Jg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jg(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function qv(e){return new Promise(t=>{Pa.setTimeout(t,e)})}function Nh(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?y0(e,t):t}function $v(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Vv(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var b0=Symbol();function bb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===b0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function E0(e,t){return typeof e=="function"?e(...t):!!e}function Qv(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var ja,ra,ji,ab,Gv=(ab=class extends ni{constructor(){super();ve(this,ja);ve(this,ra);ve(this,ji);ye(this,ji,t=>{if(!Xa&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,ra)||this.setEventListener(z(this,ji))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,ra))==null||t.call(this),ye(this,ra,void 0))}setEventListener(t){var n;ye(this,ji,t),(n=z(this,ra))==null||n.call(this),ye(this,ra,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){z(this,ja)!==t&&(ye(this,ja,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,ja)=="boolean"?z(this,ja):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ja=new WeakMap,ra=new WeakMap,ji=new WeakMap,ab),x0=new Gv;function Oh(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var Xv=zv;function Kv(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=Xv;const o=c=>{t?e.push(c):a(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&a(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{o(()=>{c(...d)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{a=c}}}var Ht=Kv(),Hi,sa,Ui,ib,Jv=(ib=class extends ni{constructor(){super();ve(this,Hi,!0);ve(this,sa);ve(this,Ui);ye(this,Ui,t=>{if(!Xa&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){z(this,sa)||this.setEventListener(z(this,Ui))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,sa))==null||t.call(this),ye(this,sa,void 0))}setEventListener(t){var n;ye(this,Ui,t),(n=z(this,sa))==null||n.call(this),ye(this,sa,t(this.setOnline.bind(this)))}setOnline(t){z(this,Hi)!==t&&(ye(this,Hi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return z(this,Hi)}},Hi=new WeakMap,sa=new WeakMap,Ui=new WeakMap,ib),Sc=new Jv;function Zv(e){return Math.min(1e3*2**e,3e4)}function Eb(e){return(e??"online")==="online"?Sc.isOnline():!0}var Dh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function xb(e){let t=!1,n=0,r;const a=Oh(),o=()=>a.status!=="pending",l=S=>{var w;if(!o()){const v=new Dh(S);x(v),(w=e.onCancel)==null||w.call(e,v)}},c=()=>{t=!0},d=()=>{t=!1},h=()=>x0.isFocused()&&(e.networkMode==="always"||Sc.isOnline())&&e.canRun(),p=()=>Eb(e.networkMode)&&e.canRun(),m=S=>{o()||(r==null||r(),a.resolve(S))},x=S=>{o()||(r==null||r(),a.reject(S))},E=()=>new Promise(S=>{var w;r=v=>{(o()||h())&&S(v)},(w=e.onPause)==null||w.call(e)}).then(()=>{var S;r=void 0,o()||(S=e.onContinue)==null||S.call(e)}),_=()=>{if(o())return;let S;const w=n===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(v){S=Promise.reject(v)}Promise.resolve(S).then(m).catch(v=>{var k;if(o())return;const C=e.retry??(Xa?0:3),N=e.retryDelay??Zv,A=typeof N=="function"?N(n,v):N,M=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,v);if(t||!M){x(v);return}n++,(k=e.onFail)==null||k.call(e,n,v),qv(A).then(()=>h()?void 0:E()).then(()=>{t?x(v):_()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?_():E().then(_),a)}}var Ha,ob,Tb=(ob=class{constructor(){ve(this,Ha)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ch(this.gcTime)&&ye(this,Ha,Pa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xa?1/0:300*1e3))}clearGcTimeout(){z(this,Ha)&&(Pa.clearTimeout(z(this,Ha)),ye(this,Ha,void 0))}},Ha=new WeakMap,ob),Ua,zi,Er,za,xn,Ru,Wa,Lr,bs,ub,ew=(ub=class extends Tb{constructor(t){super();ve(this,Lr);ve(this,Ua);ve(this,zi);ve(this,Er);ve(this,za);ve(this,xn);ve(this,Ru);ve(this,Wa);ye(this,Wa,!1),ye(this,Ru,t.defaultOptions),this.setOptions(t.options),this.observers=[],ye(this,za,t.client),ye(this,Er,z(this,za).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ye(this,Ua,e1(this.options)),this.state=t.state??z(this,Ua),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,xn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Ru),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=e1(this.options);n.data!==void 0&&(this.setState(Zg(n.data,n.dataUpdatedAt)),ye(this,Ua,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Er).remove(this)}setData(t,n){const r=Nh(this.state.data,t,this.options);return Be(this,Lr,bs).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Be(this,Lr,bs).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=z(this,xn))==null?void 0:r.promise;return(a=z(this,xn))==null||a.cancel(t),n?n.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,Ua))}isActive(){return this.observers.some(t=>Tr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===b0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yb(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,xn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,xn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,Er).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,xn)&&(z(this,Wa)?z(this,xn).cancel({revert:!0}):z(this,xn).cancelRetry()),this.scheduleGc()),z(this,Er).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Lr,bs).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,p,m,x,E,_,S,w,v,C,N;if(this.state.fetchStatus!=="idle"&&((d=z(this,xn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,xn))return z(this,xn).continueRetry(),z(this,xn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(M=>M.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ye(this,Wa,!0),r.signal)})},o=()=>{const A=bb(this.options,n),k=(()=>{const O={client:z(this,za),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return ye(this,Wa,!1),this.options.persister?this.options.persister(A,k,this):A(k)},c=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,za),state:this.state,fetchFn:o};return a(A),A})();(h=this.options.behavior)==null||h.onFetch(c,this),ye(this,zi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Be(this,Lr,bs).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta}),ye(this,xn,xb({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof Dh&&A.revert&&this.setState({...z(this,zi),fetchStatus:"idle"}),r.abort()},onFail:(A,M)=>{Be(this,Lr,bs).call(this,{type:"failed",failureCount:A,error:M})},onPause:()=>{Be(this,Lr,bs).call(this,{type:"pause"})},onContinue:()=>{Be(this,Lr,bs).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await z(this,xn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(E=(x=z(this,Er).config).onSuccess)==null||E.call(x,A,this),(S=(_=z(this,Er).config).onSettled)==null||S.call(_,A,this.state.error,this),A}catch(A){if(A instanceof Dh){if(A.silent)return z(this,xn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Be(this,Lr,bs).call(this,{type:"error",error:A}),(v=(w=z(this,Er).config).onError)==null||v.call(w,A,this),(N=(C=z(this,Er).config).onSettled)==null||N.call(C,this.state.data,A,this),A}finally{this.scheduleGc()}}},Ua=new WeakMap,zi=new WeakMap,Er=new WeakMap,za=new WeakMap,xn=new WeakMap,Ru=new WeakMap,Wa=new WeakMap,Lr=new WeakSet,bs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vb(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...Zg(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ye(this,zi,t.manual?a:void 0),a;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),z(this,Er).notify({query:this,type:"updated",action:t})})},ub);function vb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Eb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Zg(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function e1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Xn,nt,Lu,Bn,Ya,Wi,Es,aa,Pu,Yi,qi,qa,$a,ia,$i,ft,yu,Ah,Ih,Rh,Lh,Ph,Mh,Fh,wb,lb,T0=(lb=class extends ni{constructor(t,n){super();ve(this,ft);ve(this,Xn);ve(this,nt);ve(this,Lu);ve(this,Bn);ve(this,Ya);ve(this,Wi);ve(this,Es);ve(this,aa);ve(this,Pu);ve(this,Yi);ve(this,qi);ve(this,qa);ve(this,$a);ve(this,ia);ve(this,$i,new Set);this.options=n,ye(this,Xn,t),ye(this,aa,null),ye(this,Es,Oh()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,nt).addObserver(this),t1(z(this,nt),this.options)?Be(this,ft,yu).call(this):this.updateResult(),Be(this,ft,Lh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Bh(z(this,nt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Bh(z(this,nt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,ft,Ph).call(this),Be(this,ft,Mh).call(this),z(this,nt).removeObserver(this)}setOptions(t){const n=this.options,r=z(this,nt);if(this.options=z(this,Xn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tr(this.options.enabled,z(this,nt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,ft,Fh).call(this),z(this,nt).setOptions(this.options),n._defaulted&&!Ou(this.options,n)&&z(this,Xn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,nt),observer:this});const a=this.hasListeners();a&&n1(z(this,nt),r,this.options,n)&&Be(this,ft,yu).call(this),this.updateResult(),a&&(z(this,nt)!==r||Tr(this.options.enabled,z(this,nt))!==Tr(n.enabled,z(this,nt))||pa(this.options.staleTime,z(this,nt))!==pa(n.staleTime,z(this,nt)))&&Be(this,ft,Ah).call(this);const o=Be(this,ft,Ih).call(this);a&&(z(this,nt)!==r||Tr(this.options.enabled,z(this,nt))!==Tr(n.enabled,z(this,nt))||o!==z(this,ia))&&Be(this,ft,Rh).call(this,o)}getOptimisticResult(t){const n=z(this,Xn).getQueryCache().build(z(this,Xn),t),r=this.createResult(n,t);return nw(this,r)&&(ye(this,Bn,r),ye(this,Wi,this.options),ye(this,Ya,z(this,nt).state)),r}getCurrentResult(){return z(this,Bn)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Es).status==="pending"&&z(this,Es).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){z(this,$i).add(t)}getCurrentQuery(){return z(this,nt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Xn).defaultQueryOptions(t),r=z(this,Xn).getQueryCache().build(z(this,Xn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Be(this,ft,yu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Bn)))}createResult(t,n){var P;const r=z(this,nt),a=this.options,o=z(this,Bn),l=z(this,Ya),c=z(this,Wi),h=t!==r?t.state:z(this,Lu),{state:p}=t;let m={...p},x=!1,E;if(n._optimisticResults){const H=this.hasListeners(),F=!H&&t1(t,n),Y=H&&n1(t,r,n,a);(F||Y)&&(m={...m,...vb(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:_,errorUpdatedAt:S,status:w}=m;E=m.data;let v=!1;if(n.placeholderData!==void 0&&E===void 0&&w==="pending"){let H;o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(H=o.data,v=!0):H=typeof n.placeholderData=="function"?n.placeholderData((P=z(this,qi))==null?void 0:P.state.data,z(this,qi)):n.placeholderData,H!==void 0&&(w="success",E=Nh(o==null?void 0:o.data,H,n),x=!0)}if(n.select&&E!==void 0&&!v)if(o&&E===(l==null?void 0:l.data)&&n.select===z(this,Pu))E=z(this,Yi);else try{ye(this,Pu,n.select),E=n.select(E),E=Nh(o==null?void 0:o.data,E,n),ye(this,Yi,E),ye(this,aa,null)}catch(H){ye(this,aa,H)}z(this,aa)&&(_=z(this,aa),E=z(this,Yi),S=Date.now(),w="error");const C=m.fetchStatus==="fetching",N=w==="pending",A=w==="error",M=N&&C,k=E!==void 0,I={status:w,fetchStatus:m.fetchStatus,isPending:N,isSuccess:w==="success",isError:A,isInitialLoading:M,isLoading:M,data:E,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:S,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:C,isRefetching:C&&!N,isLoadingError:A&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:A&&k,isStale:v0(t,n),refetch:this.refetch,promise:z(this,Es),isEnabled:Tr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const H=I.data!==void 0,F=I.status==="error"&&!H,Y=K=>{F?K.reject(I.error):H&&K.resolve(I.data)},G=()=>{const K=ye(this,Es,I.promise=Oh());Y(K)},X=z(this,Es);switch(X.status){case"pending":t.queryHash===r.queryHash&&Y(X);break;case"fulfilled":(F||I.data!==X.value)&&G();break;case"rejected":(!F||I.error!==X.reason)&&G();break}}return I}updateResult(){const t=z(this,Bn),n=this.createResult(z(this,nt),this.options);if(ye(this,Ya,z(this,nt).state),ye(this,Wi,this.options),z(this,Ya).data!==void 0&&ye(this,qi,z(this,nt)),Ou(n,t))return;ye(this,Bn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!z(this,$i).size)return!0;const l=new Set(o??z(this,$i));return this.options.throwOnError&&l.add("error"),Object.keys(z(this,Bn)).some(c=>{const d=c;return z(this,Bn)[d]!==t[d]&&l.has(d)})};Be(this,ft,wb).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,ft,Lh).call(this)}},Xn=new WeakMap,nt=new WeakMap,Lu=new WeakMap,Bn=new WeakMap,Ya=new WeakMap,Wi=new WeakMap,Es=new WeakMap,aa=new WeakMap,Pu=new WeakMap,Yi=new WeakMap,qi=new WeakMap,qa=new WeakMap,$a=new WeakMap,ia=new WeakMap,$i=new WeakMap,ft=new WeakSet,yu=function(t){Be(this,ft,Fh).call(this);let n=z(this,nt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(In)),n},Ah=function(){Be(this,ft,Ph).call(this);const t=pa(this.options.staleTime,z(this,nt));if(Xa||z(this,Bn).isStale||!Ch(t))return;const r=yb(z(this,Bn).dataUpdatedAt,t)+1;ye(this,qa,Pa.setTimeout(()=>{z(this,Bn).isStale||this.updateResult()},r))},Ih=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,nt)):this.options.refetchInterval)??!1},Rh=function(t){Be(this,ft,Mh).call(this),ye(this,ia,t),!(Xa||Tr(this.options.enabled,z(this,nt))===!1||!Ch(z(this,ia))||z(this,ia)===0)&&ye(this,$a,Pa.setInterval(()=>{(this.options.refetchIntervalInBackground||x0.isFocused())&&Be(this,ft,yu).call(this)},z(this,ia)))},Lh=function(){Be(this,ft,Ah).call(this),Be(this,ft,Rh).call(this,Be(this,ft,Ih).call(this))},Ph=function(){z(this,qa)&&(Pa.clearTimeout(z(this,qa)),ye(this,qa,void 0))},Mh=function(){z(this,$a)&&(Pa.clearInterval(z(this,$a)),ye(this,$a,void 0))},Fh=function(){const t=z(this,Xn).getQueryCache().build(z(this,Xn),this.options);if(t===z(this,nt))return;const n=z(this,nt);ye(this,nt,t),ye(this,Lu,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},wb=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,Bn))}),z(this,Xn).getQueryCache().notify({query:z(this,nt),type:"observerResultsUpdated"})})},lb);function tw(e,t){return Tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function t1(e,t){return tw(e,t)||e.state.data!==void 0&&Bh(e,t,t.refetchOnMount)}function Bh(e,t,n){if(Tr(t.enabled,e)!==!1&&pa(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&v0(e,t)}return!1}function n1(e,t,n,r){return(e!==t||Tr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&v0(e,n)}function v0(e,t){return Tr(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function nw(e,t){return!Ou(e.getCurrentResult(),t)}function r1(e){return{onFetch:(t,n)=>{var p,m,x,E,_;const r=t.options,a=(x=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:x.direction,o=((E=t.state.data)==null?void 0:E.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const h=async()=>{let S=!1;const w=N=>{Qv(N,()=>t.signal,()=>S=!0)},v=bb(t.options,t.fetchOptions),C=async(N,A,M)=>{if(S)return Promise.reject();if(A==null&&N.pages.length)return Promise.resolve(N);const O=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:A,direction:M?"backward":"forward",meta:t.options.meta};return w(F),F})(),I=await v(O),{maxPages:P}=t.options,H=M?Vv:$v;return{pages:H(N.pages,I,P),pageParams:H(N.pageParams,A,P)}};if(a&&o.length){const N=a==="backward",A=N?rw:s1,M={pages:o,pageParams:l},k=A(r,M);c=await C(M,k,N)}else{const N=e??o.length;do{const A=d===0?l[0]??r.initialPageParam:s1(r,c);if(d>0&&A==null)break;c=await C(c,A),d++}while(d<N)}return c};t.options.persister?t.fetchFn=()=>{var S,w;return(w=(S=t.options).persister)==null?void 0:w.call(S,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function s1(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function rw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Mu,Xr,An,Va,Kr,Zs,cb,sw=(cb=class extends Tb{constructor(t){super();ve(this,Kr);ve(this,Mu);ve(this,Xr);ve(this,An);ve(this,Va);ye(this,Mu,t.client),this.mutationId=t.mutationId,ye(this,An,t.mutationCache),ye(this,Xr,[]),this.state=t.state||Sb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Xr).includes(t)||(z(this,Xr).push(t),this.clearGcTimeout(),z(this,An).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ye(this,Xr,z(this,Xr).filter(n=>n!==t)),this.scheduleGc(),z(this,An).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Xr).length||(this.state.status==="pending"?this.scheduleGc():z(this,An).remove(this))}continue(){var t;return((t=z(this,Va))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,d,h,p,m,x,E,_,S,w,v,C,N,A,M,k,O;const n=()=>{Be(this,Kr,Zs).call(this,{type:"continue"})},r={client:z(this,Mu),meta:this.options.meta,mutationKey:this.options.mutationKey};ye(this,Va,xb({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(I,P)=>{Be(this,Kr,Zs).call(this,{type:"failed",failureCount:I,error:P})},onPause:()=>{Be(this,Kr,Zs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,An).canRun(this)}));const a=this.state.status==="pending",o=!z(this,Va).canStart();try{if(a)n();else{Be(this,Kr,Zs).call(this,{type:"pending",variables:t,isPaused:o}),z(this,An).config.onMutate&&await z(this,An).config.onMutate(t,this,r);const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));P!==this.state.context&&Be(this,Kr,Zs).call(this,{type:"pending",context:P,variables:t,isPaused:o})}const I=await z(this,Va).start();return await((h=(d=z(this,An).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this,r)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,I,t,this.state.context,r)),await((E=(x=z(this,An).config).onSettled)==null?void 0:E.call(x,I,null,this.state.variables,this.state.context,this,r)),await((S=(_=this.options).onSettled)==null?void 0:S.call(_,I,null,t,this.state.context,r)),Be(this,Kr,Zs).call(this,{type:"success",data:I}),I}catch(I){try{await((v=(w=z(this,An).config).onError)==null?void 0:v.call(w,I,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((N=(C=this.options).onError)==null?void 0:N.call(C,I,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((M=(A=z(this,An).config).onSettled)==null?void 0:M.call(A,void 0,I,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((O=(k=this.options).onSettled)==null?void 0:O.call(k,void 0,I,t,this.state.context,r))}catch(P){Promise.reject(P)}throw Be(this,Kr,Zs).call(this,{type:"error",error:I}),I}finally{z(this,An).runNext(this)}}},Mu=new WeakMap,Xr=new WeakMap,An=new WeakMap,Va=new WeakMap,Kr=new WeakSet,Zs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ht.batch(()=>{z(this,Xr).forEach(r=>{r.onMutationUpdate(t)}),z(this,An).notify({mutation:this,type:"updated",action:t})})},cb);function Sb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xs,Pr,Fu,db,aw=(db=class extends ni{constructor(t={}){super();ve(this,xs);ve(this,Pr);ve(this,Fu);this.config=t,ye(this,xs,new Set),ye(this,Pr,new Map),ye(this,Fu,0)}build(t,n,r){const a=new sw({client:t,mutationCache:this,mutationId:++sc(this,Fu)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){z(this,xs).add(t);const n=ic(t);if(typeof n=="string"){const r=z(this,Pr).get(n);r?r.push(t):z(this,Pr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,xs).delete(t)){const n=ic(t);if(typeof n=="string"){const r=z(this,Pr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&z(this,Pr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ic(t);if(typeof n=="string"){const r=z(this,Pr).get(n),a=r==null?void 0:r.find(o=>o.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=ic(t);if(typeof n=="string"){const a=(r=z(this,Pr).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{z(this,xs).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,xs).clear(),z(this,Pr).clear()})}getAll(){return Array.from(z(this,xs))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xg(n,r))}findAll(t={}){return this.getAll().filter(n=>Xg(t,n))}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(In))))}},xs=new WeakMap,Pr=new WeakMap,Fu=new WeakMap,db);function ic(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ts,oa,Kn,vs,Cs,xc,jh,fb,iw=(fb=class extends ni{constructor(n,r){super();ve(this,Cs);ve(this,Ts);ve(this,oa);ve(this,Kn);ve(this,vs);ye(this,Ts,n),this.setOptions(r),this.bindMethods(),Be(this,Cs,xc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=z(this,Ts).defaultMutationOptions(n),Ou(this.options,r)||z(this,Ts).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Kn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ka(r.mutationKey)!==Ka(this.options.mutationKey)?this.reset():((a=z(this,Kn))==null?void 0:a.state.status)==="pending"&&z(this,Kn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,Kn))==null||n.removeObserver(this)}onMutationUpdate(n){Be(this,Cs,xc).call(this),Be(this,Cs,jh).call(this,n)}getCurrentResult(){return z(this,oa)}reset(){var n;(n=z(this,Kn))==null||n.removeObserver(this),ye(this,Kn,void 0),Be(this,Cs,xc).call(this),Be(this,Cs,jh).call(this)}mutate(n,r){var a;return ye(this,vs,r),(a=z(this,Kn))==null||a.removeObserver(this),ye(this,Kn,z(this,Ts).getMutationCache().build(z(this,Ts),this.options)),z(this,Kn).addObserver(this),z(this,Kn).execute(n)}},Ts=new WeakMap,oa=new WeakMap,Kn=new WeakMap,vs=new WeakMap,Cs=new WeakSet,xc=function(){var r;const n=((r=z(this,Kn))==null?void 0:r.state)??Sb();ye(this,oa,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},jh=function(n){Ht.batch(()=>{var r,a,o,l,c,d,h,p;if(z(this,vs)&&this.hasListeners()){const m=z(this,oa).variables,x=z(this,oa).context,E={client:z(this,Ts),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=z(this,vs)).onSuccess)==null||a.call(r,n.data,m,x,E)}catch(_){Promise.reject(_)}try{(l=(o=z(this,vs)).onSettled)==null||l.call(o,n.data,null,m,x,E)}catch(_){Promise.reject(_)}}else if((n==null?void 0:n.type)==="error"){try{(d=(c=z(this,vs)).onError)==null||d.call(c,n.error,m,x,E)}catch(_){Promise.reject(_)}try{(p=(h=z(this,vs)).onSettled)==null||p.call(h,void 0,n.error,m,x,E)}catch(_){Promise.reject(_)}}}this.listeners.forEach(m=>{m(z(this,oa))})})},fb);function a1(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function ow(e,t,n){const r=e.slice(0);return r[t]=n,r}var Vi,or,Qi,Gi,xr,ua,Bu,ju,Hu,Uu,Sn,Hh,Uh,zh,Wh,Yh,hb,uw=(hb=class extends ni{constructor(t,n,r){super();ve(this,Sn);ve(this,Vi);ve(this,or);ve(this,Qi);ve(this,Gi);ve(this,xr);ve(this,ua);ve(this,Bu);ve(this,ju);ve(this,Hu);ve(this,Uu,[]);ye(this,Vi,t),ye(this,Gi,r),ye(this,Qi,[]),ye(this,xr,[]),ye(this,or,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&z(this,xr).forEach(t=>{t.subscribe(n=>{Be(this,Sn,Wh).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,z(this,xr).forEach(t=>{t.destroy()})}setQueries(t,n){ye(this,Qi,t),ye(this,Gi,n),Ht.batch(()=>{const r=z(this,xr),a=Be(this,Sn,zh).call(this,z(this,Qi));a.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const o=a.map(m=>m.observer),l=o.map(m=>m.getCurrentResult()),c=r.length!==o.length,d=o.some((m,x)=>m!==r[x]),h=c||d,p=h?!0:l.some((m,x)=>{const E=z(this,or)[x];return!E||!Ou(m,E)});!h&&!p||(h&&(ye(this,Uu,a),ye(this,xr,o)),ye(this,or,l),this.hasListeners()&&(h&&(a1(r,o).forEach(m=>{m.destroy()}),a1(o,r).forEach(m=>{m.subscribe(x=>{Be(this,Sn,Wh).call(this,m,x)})})),Be(this,Sn,Yh).call(this)))})}getCurrentResult(){return z(this,or)}getQueries(){return z(this,xr).map(t=>t.getCurrentQuery())}getObservers(){return z(this,xr)}getOptimisticResult(t,n){const r=Be(this,Sn,zh).call(this,t),a=r.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),o=r.map(l=>l.defaultedQueryOptions.queryHash);return[a,l=>Be(this,Sn,Uh).call(this,l??a,n,o),()=>Be(this,Sn,Hh).call(this,a,r)]}},Vi=new WeakMap,or=new WeakMap,Qi=new WeakMap,Gi=new WeakMap,xr=new WeakMap,ua=new WeakMap,Bu=new WeakMap,ju=new WeakMap,Hu=new WeakMap,Uu=new WeakMap,Sn=new WeakSet,Hh=function(t,n){return n.map((r,a)=>{const o=t[a];return r.defaultedQueryOptions.notifyOnChangeProps?o:r.observer.trackResult(o,l=>{n.forEach(c=>{c.observer.trackProp(l)})})})},Uh=function(t,n,r){if(n){const a=z(this,Hu),o=r!==void 0&&a!==void 0&&(a.length!==r.length||r.some((l,c)=>l!==a[c]));return(!z(this,ua)||z(this,or)!==z(this,ju)||o||n!==z(this,Bu))&&(ye(this,Bu,n),ye(this,ju,z(this,or)),r!==void 0&&ye(this,Hu,r),ye(this,ua,y0(z(this,ua),n(t)))),z(this,ua)}return t},zh=function(t){const n=new Map;z(this,xr).forEach(a=>{const o=a.options.queryHash;if(!o)return;const l=n.get(o);l?l.push(a):n.set(o,[a])});const r=[];return t.forEach(a=>{var d;const o=z(this,Vi).defaultQueryOptions(a),c=((d=n.get(o.queryHash))==null?void 0:d.shift())??new T0(z(this,Vi),o);r.push({defaultedQueryOptions:o,observer:c})}),r},Wh=function(t,n){const r=z(this,xr).indexOf(t);r!==-1&&(ye(this,or,ow(z(this,or),r,n)),Be(this,Sn,Yh).call(this))},Yh=function(){var t;if(this.hasListeners()){const n=z(this,ua),r=Be(this,Sn,Hh).call(this,z(this,or),z(this,Uu)),a=Be(this,Sn,Uh).call(this,r,(t=z(this,Gi))==null?void 0:t.combine);n!==a&&Ht.batch(()=>{this.listeners.forEach(o=>{o(z(this,or))})})}},hb),Jr,pb,lw=(pb=class extends ni{constructor(t={}){super();ve(this,Jr);this.config=t,ye(this,Jr,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??g0(a,n);let l=this.get(o);return l||(l=new ew({client:t,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){z(this,Jr).has(t.queryHash)||(z(this,Jr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Jr).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Jr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Jr).get(t)}getAll(){return[...z(this,Jr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Gg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Gg(t,r)):n}notify(t){Ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jr=new WeakMap,pb),Vt,la,ca,Xi,Ki,da,Ji,Zi,mb,cw=(mb=class{constructor(e={}){ve(this,Vt);ve(this,la);ve(this,ca);ve(this,Xi);ve(this,Ki);ve(this,da);ve(this,Ji);ve(this,Zi);ye(this,Vt,e.queryCache||new lw),ye(this,la,e.mutationCache||new aw),ye(this,ca,e.defaultOptions||{}),ye(this,Xi,new Map),ye(this,Ki,new Map),ye(this,da,0)}mount(){sc(this,da)._++,z(this,da)===1&&(ye(this,Ji,x0.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Vt).onFocus())})),ye(this,Zi,Sc.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Vt).onOnline())})))}unmount(){var e,t;sc(this,da)._--,z(this,da)===0&&((e=z(this,Ji))==null||e.call(this),ye(this,Ji,void 0),(t=z(this,Zi))==null||t.call(this),ye(this,Zi,void 0))}isFetching(e){return z(this,Vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,la).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Vt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,Vt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return z(this,Vt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=z(this,Vt).get(r.queryHash),o=a==null?void 0:a.state.data,l=Wv(t,o);if(l!==void 0)return z(this,Vt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Ht.batch(()=>z(this,Vt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Vt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,Vt);Ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,Vt);return Ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ht.batch(()=>z(this,Vt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(In).catch(In)}invalidateQueries(e,t={}){return Ht.batch(()=>(z(this,Vt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>z(this,Vt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(In)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(In)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,Vt).build(this,t);return n.isStaleByTime(pa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(In).catch(In)}fetchInfiniteQuery(e){return e.behavior=r1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(In).catch(In)}ensureInfiniteQueryData(e){return e.behavior=r1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sc.isOnline()?z(this,la).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Vt)}getMutationCache(){return z(this,la)}getDefaultOptions(){return z(this,ca)}setDefaultOptions(e){ye(this,ca,e)}setQueryDefaults(e,t){z(this,Xi).set(Ka(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Xi).values()],n={};return t.forEach(r=>{Nu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){z(this,Ki).set(Ka(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Ki).values()],n={};return t.forEach(r=>{Nu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,ca).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=g0(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===b0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,ca).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,Vt).clear(),z(this,la).clear()}},Vt=new WeakMap,la=new WeakMap,ca=new WeakMap,Xi=new WeakMap,Ki=new WeakMap,da=new WeakMap,Ji=new WeakMap,Zi=new WeakMap,mb),_b=L.createContext(void 0),Br=e=>{const t=L.useContext(_b);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},dw=({client:e,children:t})=>(L.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(_b.Provider,{value:e,children:t})),Cb=L.createContext(!1),kb=()=>L.useContext(Cb);Cb.Provider;function fw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hw=L.createContext(fw()),Nb=()=>L.useContext(hw),Ob=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?E0(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Db=e=>{L.useEffect(()=>{e.clearReset()},[e])},Ab=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||E0(n,[e.error,r])),Ib=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Rb=(e,t)=>e.isLoading&&e.isFetching&&!t,qh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_c=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function i1({queries:e,...t},n){const r=Br(),a=kb(),o=Nb(),l=L.useMemo(()=>e.map(S=>{const w=r.defaultQueryOptions(S);return w._optimisticResults=a?"isRestoring":"optimistic",w}),[e,r,a]);l.forEach(S=>{Ib(S);const w=r.getQueryCache().get(S.queryHash);Ob(S,o,w)}),Db(o);const[c]=L.useState(()=>new uw(r,l,t)),[d,h,p]=c.getOptimisticResult(l,t.combine),m=!a&&t.subscribed!==!1;L.useSyncExternalStore(L.useCallback(S=>m?c.subscribe(Ht.batchCalls(S)):In,[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),L.useEffect(()=>{c.setQueries(l,t)},[l,t,c]);const E=d.some((S,w)=>qh(l[w],S))?d.flatMap((S,w)=>{const v=l[w];if(v){const C=new T0(r,v);if(qh(v,S))return _c(v,C,o);Rb(S,a)&&_c(v,C,o)}return[]}):[];if(E.length>0)throw Promise.all(E);const _=d.find((S,w)=>{const v=l[w];return v&&Ab({result:S,errorResetBoundary:o,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(_!=null&&_.error)throw _.error;return h(p())}function pw(e,t,n){var x,E,_,S;const r=kb(),a=Nb(),o=Br(),l=o.defaultQueryOptions(e);(E=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||E.call(x,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",Ib(l),Ob(l,a,c),Db(a);const d=!o.getQueryCache().get(l.queryHash),[h]=L.useState(()=>new t(o,l)),p=h.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(L.useSyncExternalStore(L.useCallback(w=>{const v=m?h.subscribe(Ht.batchCalls(w)):In;return h.updateResult(),v},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),L.useEffect(()=>{h.setOptions(l)},[l,h]),qh(l,p))throw _c(l,h,a);if(Ab({result:p,errorResetBoundary:a,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;if((S=(_=o.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||S.call(_,l,p),l.experimental_prefetchInRender&&!Xa&&Rb(p,r)){const w=d?_c(l,h,a):c==null?void 0:c.promise;w==null||w.catch(In).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?p:h.trackResult(p)}function is(e,t){return pw(e,T0)}function mw(e,t){const n=Br(),r=n.getQueryCache();return L.useSyncExternalStore(L.useCallback(a=>r.subscribe(Ht.batchCalls(a)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}function gw(e,t){const n=Br(),[r]=L.useState(()=>new iw(n,e));L.useEffect(()=>{r.setOptions(e)},[r,e]);const a=L.useSyncExternalStore(L.useCallback(l=>r.subscribe(Ht.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=L.useCallback((l,c)=>{r.mutate(l,c).catch(In)},[r]);if(a.error&&E0(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}function yw({children:e}){const[t]=L.useState(()=>new cw({defaultOptions:{queries:{staleTime:3e5,gcTime:18e5,refetchOnWindowFocus:!1,retry:1}}}));return g.jsx(dw,{client:t,children:e})}const bw="modulepreload",Ew=function(e){return"/"+e},o1={},ks=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};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"));a=l(n.map(h=>{if(h=Ew(h),h in o1)return;o1[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":bw,p||(x.as="script"),x.crossOrigin="",x.href=h,d&&x.setAttribute("nonce",d),document.head.appendChild(x),p)return new Promise((E,_)=>{x.addEventListener("load",E),x.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};function Lb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Lb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fr(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Lb(e))&&(r&&(r+=" "),r+=t);return r}const w0="/api";class zu extends Error{constructor(t,n){super(n),this.status=t,this.name="ApiError"}}async function _t(e,t){const n=await fetch(`${w0}${e}`,{credentials:"include",...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const r=await n.json().catch(()=>({error:"Unknown error"}));throw new zu(n.status,r.error||`HTTP ${n.status}`)}return n.json()}async function oc(e,t){const n=await fetch(`${w0}${e}`,{credentials:"omit",...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const r=await n.json().catch(()=>({error:"Unknown error"}));throw new zu(n.status,r.error||`HTTP ${n.status}`)}return n.json()}const Mt={getHealth:()=>_t("/health"),getConfig:()=>_t("/config"),getChart:e=>_t(`/charts/${encodeURIComponent(e)}`),queryChart:(e,t={},n={})=>_t(`/charts/${encodeURIComponent(e)}/query${n.includeConfig?"?includeConfig=true":""}`,{method:"POST",body:JSON.stringify(t)}),queryChartsBatch:(e,t={})=>_t("/charts/batch",{method:"POST",body:JSON.stringify({charts:e,includeConfig:t.includeConfig})}),invalidateChart:e=>_t(`/charts/${encodeURIComponent(e)}/invalidate`,{method:"POST"}),getParameterOptions:(e,t)=>_t(`/charts/${encodeURIComponent(e)}/parameters/${encodeURIComponent(t)}/options`),getModelOptions:(e,t,n)=>_t(`/models/${encodeURIComponent(e)}/options?value_field=${encodeURIComponent(t)}&label_field=${encodeURIComponent(n)}`),getDashboards:()=>_t("/dashboards"),getDashboard:(e,t)=>{const n=t?`/dashboards/${encodeURIComponent(e)}?branch=${encodeURIComponent(t)}`:`/dashboards/${encodeURIComponent(e)}`;return _t(n)},saveDashboard:(e,t,n,r)=>_t(`/dashboards/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify(r?{tab:r,tabLayout:t,message:n}:{layout:t,message:n})}),warmDashboardCache:(e,t={},n)=>_t(`/dashboards/${encodeURIComponent(e)}/warm-cache`,{method:"POST",body:JSON.stringify({params:t,...n?{tab:n}:{}})}),getBranches:()=>_t("/git/branches"),createBranch:(e,t)=>_t("/git/branches",{method:"POST",body:JSON.stringify({name:e,from:t})}),checkoutBranch:e=>_t("/git/checkout",{method:"POST",body:JSON.stringify({branch:e})}),getAuthMe:async()=>{const e=await fetch(`${w0}/auth/me`,{credentials:"include",headers:{"Content-Type":"application/json"}});if(e.status===401)return{providers:(await e.json().catch(()=>({}))).providers};if(!e.ok)throw new zu(e.status,`HTTP ${e.status}`);return e.json()},authSetup:e=>_t("/auth/setup",{method:"POST",body:JSON.stringify(e)}),authLogin:e=>_t("/auth/login",{method:"POST",body:JSON.stringify(e)}),authLogout:()=>_t("/auth/logout",{method:"POST"}),authChangePassword:e=>_t("/auth/me/password",{method:"PUT",body:JSON.stringify(e)}),authListUsers:()=>_t("/auth/users"),authCreateUser:e=>_t("/auth/users",{method:"POST",body:JSON.stringify(e)}),authUpdateUser:(e,t)=>_t(`/auth/users/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)}),authDeleteUser:e=>_t(`/auth/users/${encodeURIComponent(e)}`,{method:"DELETE"}),createShareLink:e=>_t("/shares",{method:"POST",body:JSON.stringify(e)}),listShareLinks:()=>_t("/shares"),revokeShareLink:e=>_t(`/shares/${encodeURIComponent(e)}`,{method:"DELETE"}),getPublicConfig:e=>oc(`/public/config?share_token=${encodeURIComponent(e)}`),getPublicDashboard:(e,t)=>oc(`/public/dashboards/${encodeURIComponent(e)}?share_token=${encodeURIComponent(t)}`),queryPublicChart:(e,t,n,r=!1)=>{const a=new URLSearchParams({share_token:n});return r&&a.set("includeConfig","true"),oc(`/public/charts/${encodeURIComponent(e)}/query?${a}`,{method:"POST",body:JSON.stringify(t)})},queryPublicChartBatch:(e,t,n=!1)=>oc(`/public/charts/batch?share_token=${encodeURIComponent(t)}`,{method:"POST",body:JSON.stringify({charts:e,includeConfig:n})})};function io(){return is({queryKey:["config"],queryFn:Mt.getConfig,staleTime:1/0})}function xw(){return is({queryKey:["health"],queryFn:Mt.getHealth,refetchInterval:3e4})}const Pb=new Set(["system-ui","serif","sans-serif","monospace","ui-monospace","cursive"]),Tw={compact:"13px",default:"14px",comfortable:"16px"},vw={modern:{colors:{primary:"#3B82F6",background:"#f1f5f9",surface:"#ffffff",sidebar:"#ffffff",text:"#111827"},fonts:{heading:"Inter",body:"Inter",mono:"JetBrains Mono",size:"default"},palette:["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#F97316","#84CC16","#14B8A6"],radius:"8px",shadow:"0 1px 3px rgba(0,0,0,0.1)",cardPadding:"20px",cardBorder:"none",sidebarShow:!0},executive:{colors:{primary:"#0ea5e9",background:"#f8fafc",surface:"#ffffff",sidebar:"#1e293b",text:"#0f172a"},fonts:{heading:"system-ui",body:"system-ui",mono:"ui-monospace",size:"compact"},palette:["#1e3a5f","#0d9488","#d97706","#64748b","#9f1239","#4338ca","#0369a1","#b45309","#475569","#7c3aed"],radius:"2px",shadow:"none",cardPadding:"16px",cardBorder:"1px solid #e2e8f0",sidebarShow:!0},minimal:{colors:{primary:"#6366f1",background:"#f8fafc",surface:"#ffffff",sidebar:"#f1f5f9",text:"#1e293b"},fonts:{heading:"system-ui",body:"system-ui",mono:"JetBrains Mono",size:"comfortable"},palette:["#3b82f6","#2563eb","#1d4ed8","#1e40af","#10b981","#059669","#047857","#065f46","#6366f1","#4f46e5"],radius:"0px",shadow:"none",cardPadding:"12px",cardBorder:"none",sidebarShow:!1}};function ww(e){const t=parseInt(e.replace("#",""),16),n=(t>>16)/255,r=(t>>8&255)/255,a=(t&255)/255,o=l=>l<=.03928?l/12.92:((l+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(r)+.0722*o(a)}function u1(e,t){const n=parseInt(e.replace("#",""),16),r=Math.min(255,Math.max(0,(n>>16)+Math.round(2.55*t))),a=Math.min(255,Math.max(0,(n>>8&255)+Math.round(2.55*t))),o=Math.min(255,Math.max(0,(n&255)+Math.round(2.55*t)));return`#${((1<<24)+(r<<16)+(a<<8)+o).toString(16).slice(1)}`}function Gf(e){return Pb.has(e)?`${e}, sans-serif`:e.toLowerCase().includes("mono")?`'${e}', monospace`:`'${e}', system-ui, sans-serif`}function Sw(e){var A,M,k,O,I,P,H,F,Y,G,X,K;const t=e.base??"modern",n=vw[t],r=((A=e.colors)==null?void 0:A.primary)??n.colors.primary,a=((M=e.colors)==null?void 0:M.background)??n.colors.background,o=((k=e.colors)==null?void 0:k.surface)??n.colors.surface,l=((O=e.colors)==null?void 0:O.sidebar)??n.colors.sidebar,c=((I=e.colors)==null?void 0:I.text)??n.colors.text,d=((P=e.fonts)==null?void 0:P.heading)??n.fonts.heading,h=((H=e.fonts)==null?void 0:H.body)??n.fonts.body,p=((F=e.fonts)==null?void 0:F.mono)??n.fonts.mono,m=Tw[((Y=e.fonts)==null?void 0:Y.size)??n.fonts.size]??"14px",x=e.palette??n.palette,E=new Set;for(const $ of[d,h,p])!Pb.has($)&&$!=="ui-monospace"&&E.add($);const _=E.size>0?`https://fonts.googleapis.com/css2?${[...E].map($=>`family=${encodeURIComponent($)}:wght@400;500;600;700`).join("&")}&display=swap`:null,S=ww(l)<.2,w=S?"#f1f5f9":c,v=S?"#94a3b8":"#6b7280",C=S?"rgba(255,255,255,0.1)":"#e5e7eb",N={"--yc-color-primary":r,"--yc-color-primary-light":u1(r,20),"--yc-color-primary-dark":u1(r,-15),"--yc-color-background":a,"--yc-color-surface":o,"--yc-color-sidebar":l,"--yc-color-text":c,"--yc-color-text-secondary":"#6b7280","--yc-color-border":"#e5e7eb","--yc-color-sidebar-text":w,"--yc-color-sidebar-text-secondary":v,"--yc-color-sidebar-border":C,"--yc-font-heading":Gf(d),"--yc-font-body":Gf(h),"--yc-font-mono":Gf(p),"--yc-font-size-base":m,"--yc-radius":n.radius,"--yc-shadow":n.shadow,"--yc-card-padding":n.cardPadding,"--yc-card-border":n.cardBorder,"--yc-grid-gap":"16px","--yc-topbar-height":"40px"};return{base:t,cssVars:N,palette:x,sidebarShow:((G=e.sidebar)==null?void 0:G.show)??n.sidebarShow,sidebarLinks:(X=e.sidebar)==null?void 0:X.links,sidebarSections:(K=e.sidebar)==null?void 0:K.sections,logo:e.logo,favicon:e.favicon,title:e.title,customCss:e.customCss,googleFontsUrl:_}}const Mb=L.createContext(null);function _w({children:e}){const{data:t}=io(),n=L.useMemo(()=>Sw((t==null?void 0:t.theme)??{}),[t==null?void 0:t.theme]);return L.useEffect(()=>{const r=document.documentElement;for(const[a,o]of Object.entries(n.cssVars))r.style.setProperty(a,o);return()=>{for(const a of Object.keys(n.cssVars))r.style.removeProperty(a)}},[n.cssVars]),L.useEffect(()=>{if(!n.googleFontsUrl)return;const r="yc-google-fonts";let a=document.getElementById(r);return a||(a=document.createElement("link"),a.id=r,a.rel="stylesheet",document.head.appendChild(a)),a.href=n.googleFontsUrl,()=>{a==null||a.remove()}},[n.googleFontsUrl]),L.useEffect(()=>{if(!n.customCss)return;const r="yc-custom-css";let a=document.getElementById(r);return a||(a=document.createElement("link"),a.id=r,a.rel="stylesheet",document.head.appendChild(a)),a.href="/api/theme/custom.css",()=>{a==null||a.remove()}},[n.customCss]),L.useEffect(()=>{const r=n.title||(t==null?void 0:t.name)||"Yamchart";document.title=r},[n.title,t==null?void 0:t.name]),L.useEffect(()=>{if(!n.favicon)return;const r="yc-favicon";let a=document.querySelector(`link#${r}`);a||(a=document.createElement("link"),a.id=r,a.rel="icon",document.head.appendChild(a)),a.href=`/api/assets/${n.favicon.replace(/^\.\/assets\//,"")}`},[n.favicon]),g.jsx(Mb.Provider,{value:n,children:e})}function S0(){const e=L.useContext(Mb);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}function Cw({type:e,className:t,style:n}){const r={className:t,style:n,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a={strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5};switch(e){case"bar":return g.jsx("svg",{...r,children:g.jsx("path",{...a,d:"M3 20h18M5 20V10h3v10M10 20V4h3v16M15 20v-8h3v8"})});case"line":return g.jsx("svg",{...r,children:g.jsx("path",{...a,d:"M3 20h18M4 16l4-6 4 4 4-8 4 6"})});case"area":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M3 20h18"}),g.jsx("path",{...a,d:"M4 16l4-6 4 4 4-8 4 6v8H4z",fill:"currentColor",opacity:.15}),g.jsx("path",{...a,d:"M4 16l4-6 4 4 4-8 4 6"})]});case"pie":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M12 2a10 10 0 110 20 10 10 0 010-20z"}),g.jsx("path",{...a,d:"M12 2v10l8.66 5"})]});case"donut":return g.jsxs("svg",{...r,children:[g.jsx("circle",{...a,cx:"12",cy:"12",r:"10"}),g.jsx("circle",{...a,cx:"12",cy:"12",r:"5"}),g.jsx("path",{...a,d:"M12 2v5M22 12h-5"})]});case"scatter":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M3 20h18M3 20V4"}),g.jsx("circle",{cx:"7",cy:"15",r:"1.5",fill:"currentColor"}),g.jsx("circle",{cx:"10",cy:"10",r:"1.5",fill:"currentColor"}),g.jsx("circle",{cx:"13",cy:"13",r:"1.5",fill:"currentColor"}),g.jsx("circle",{cx:"15",cy:"7",r:"1.5",fill:"currentColor"}),g.jsx("circle",{cx:"18",cy:"9",r:"1.5",fill:"currentColor"})]});case"combo":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M3 20h18"}),g.jsx("path",{...a,d:"M5 20v-6h3v6M10 20v-10h3v10"}),g.jsx("path",{...a,d:"M5 10l4-3 4 2 5-5"})]});case"heatmap":return g.jsxs("svg",{...r,children:[g.jsx("rect",{...a,x:"3",y:"3",width:"5",height:"5",rx:"1",fill:"currentColor",opacity:.2}),g.jsx("rect",{...a,x:"10",y:"3",width:"5",height:"5",rx:"1",fill:"currentColor",opacity:.6}),g.jsx("rect",{...a,x:"17",y:"3",width:"4",height:"5",rx:"1",fill:"currentColor",opacity:.4}),g.jsx("rect",{...a,x:"3",y:"10",width:"5",height:"5",rx:"1",fill:"currentColor",opacity:.8}),g.jsx("rect",{...a,x:"10",y:"10",width:"5",height:"5",rx:"1",fill:"currentColor",opacity:.3}),g.jsx("rect",{...a,x:"17",y:"10",width:"4",height:"5",rx:"1",fill:"currentColor",opacity:.9}),g.jsx("rect",{...a,x:"3",y:"17",width:"5",height:"4",rx:"1",fill:"currentColor",opacity:.5}),g.jsx("rect",{...a,x:"10",y:"17",width:"5",height:"4",rx:"1",fill:"currentColor",opacity:.7}),g.jsx("rect",{...a,x:"17",y:"17",width:"4",height:"4",rx:"1",fill:"currentColor",opacity:.1})]});case"funnel":return g.jsx("svg",{...r,children:g.jsx("path",{...a,d:"M3 4h18l-3 5H6L3 4zM6 9h12l-2 5H8L6 9zM8 14h8l-2 5h-4l-2-5z"})});case"waterfall":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M3 20h18"}),g.jsx("path",{...a,d:"M5 8h3v4H5zM9 6h3v2H9zM13 10h3v4h-3zM17 6h3v8h-3"}),g.jsx("path",{...a,d:"M8 10h1M12 8h1",strokeDasharray:"2 1"})]});case"gauge":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M4.93 17.07A10 10 0 0112 2a10 10 0 017.07 15.07"}),g.jsx("path",{...a,d:"M12 12l-3-6",strokeWidth:2}),g.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})]});case"kpi":case"metric":return g.jsxs("svg",{...r,children:[g.jsx("path",{...a,d:"M4 6h16M4 6v12a2 2 0 002 2h12a2 2 0 002-2V6"}),g.jsx("path",{...a,d:"M9 11h6M12 11v5",strokeWidth:2})]});default:return g.jsx("svg",{...r,children:g.jsx("path",{...a,d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"})})}}function kw({dashboards:e,charts:t,currentPath:n,onNavigate:r}){var h,p;const a=S0(),o=m=>n===m,l=((h=a.sidebarSections)==null?void 0:h.dashboards)!==!1,c=((p=a.sidebarSections)==null?void 0:p.charts)!==!1,d={backgroundColor:"color-mix(in srgb, var(--yc-color-primary) 10%, transparent)",color:"var(--yc-color-primary)",borderColor:"var(--yc-color-primary)"};return g.jsxs("aside",{className:"yc-sidebar w-56 border-r flex flex-col",style:{backgroundColor:"var(--yc-color-sidebar)",borderColor:"var(--yc-color-sidebar-border)"},children:[l&&e.length>0&&g.jsxs("div",{className:"py-2",children:[g.jsx("div",{className:"px-4 py-2 text-xs font-medium uppercase tracking-wider",style:{color:"var(--yc-color-sidebar-text-secondary)"},children:"Dashboards"}),e.map(m=>{const x=`/dashboards/${m.name}`,E=o(x);return g.jsxs("button",{onClick:()=>r(x),className:Fr("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",E&&"border-r-2"),style:E?d:{color:"var(--yc-color-sidebar-text)"},title:m.title,children:[g.jsx("svg",{className:"w-5 h-5 flex-shrink-0",style:{color:E?"var(--yc-color-primary)":"var(--yc-color-sidebar-text-secondary)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})}),g.jsx("span",{className:"truncate",children:m.title})]},m.name)})]}),l&&c&&e.length>0&&t.length>0&&g.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--yc-color-sidebar-border)"}}),c&&t.length>0&&g.jsxs("div",{className:"py-2 flex-1 overflow-y-auto",children:[g.jsx("div",{className:"px-4 py-2 text-xs font-medium uppercase tracking-wider",style:{color:"var(--yc-color-sidebar-text-secondary)"},children:"Charts"}),t.map(m=>{const x=`/charts/${m.name}`,E=o(x);return g.jsxs("button",{onClick:()=>r(x),className:Fr("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",E&&"border-r-2"),style:E?d:{color:"var(--yc-color-sidebar-text)"},title:m.title,children:[g.jsx(Cw,{type:m.type,className:"w-5 h-5 flex-shrink-0",style:{color:E?"var(--yc-color-primary)":"var(--yc-color-sidebar-text-secondary)"}}),g.jsx("span",{className:"truncate",children:m.title})]},m.name)})]}),a.sidebarLinks&&a.sidebarLinks.length>0&&g.jsx("div",{className:"py-2 border-t",style:{borderColor:"var(--yc-color-sidebar-border)"},children:a.sidebarLinks.map(m=>g.jsxs("a",{href:m.url,target:"_blank",rel:"noopener noreferrer",className:"w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors hover:bg-white/10",style:{color:"var(--yc-color-sidebar-text-secondary)"},children:[g.jsx("svg",{className:"w-5 h-5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),g.jsx("span",{className:"truncate",children:m.label})]},m.url))})]})}function Fb(e){return is({queryKey:["chart",e],queryFn:()=>Mt.getChart(e),enabled:!!e,staleTime:1e3*60*10})}const l1=e=>{let t;const n=new Set,r=(h,p)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const x=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(E=>E(t,x))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,a,c);return c},Nw=(e=>e?l1(e):l1),Ow=e=>e;function Dw(e,t=Ow){const n=Ee.useSyncExternalStore(e.subscribe,Ee.useCallback(()=>t(e.getState()),[e,t]),Ee.useCallback(()=>t(e.getInitialState()),[e,t]));return Ee.useDebugValue(n),n}const c1=e=>{const t=Nw(e),n=r=>Dw(t,r);return Object.assign(n,t),n},Bb=(e=>e?c1(e):c1),Ye=Bb((e,t)=>({globalFilters:{},chartFilters:{},crossFilters:{},setGlobalFilter:(n,r)=>e(a=>({globalFilters:{...a.globalFilters,[n]:r}})),setChartFilter:(n,r,a)=>e(o=>({chartFilters:{...o.chartFilters,[n]:{...o.chartFilters[n],[r]:a}}})),setCrossFilter:(n,r,a)=>e(o=>{const l=o.crossFilters[n];if(l&&l.value===r){const{[n]:c,...d}=o.crossFilters;return{crossFilters:d}}return{crossFilters:{...o.crossFilters,[n]:{field:n,value:r,sourceChart:a}}}}),clearCrossFilter:n=>e(r=>{const{[n]:a,...o}=r.crossFilters;return{crossFilters:o}}),clearAllCrossFilters:()=>e({crossFilters:{}}),getEffectiveFilters:n=>{const{globalFilters:r,crossFilters:a,chartFilters:o}=t(),l={};for(const c of Object.values(a))c.sourceChart!==n&&(l[c.field]=c.value);return{...r,...l,...o[n]}},resetFilters:()=>e({globalFilters:{},chartFilters:{},crossFilters:{}}),resetChartFilters:n=>e(r=>{const{[n]:a,...o}=r.chartFilters;return{chartFilters:o}})}));function jb(e){const t=Ye(l=>l.globalFilters),n=Ye(l=>l.chartFilters),r=Ye(l=>l.crossFilters),a=Ye(l=>l.getEffectiveFilters),o=L.useMemo(()=>Object.fromEntries(Object.entries(a(e)).filter(([l,c])=>c!=null)),[t,n,r,e]);return is({queryKey:["chartData",e,o],queryFn:()=>Mt.queryChart(e,o),enabled:!!e})}function Aw(e){const t=Ye(l=>l.globalFilters),n=Ye(l=>l.chartFilters),r=Ye(l=>l.crossFilters),a=Ye(l=>l.getEffectiveFilters),o=L.useMemo(()=>Object.fromEntries(Object.entries(a(e)).filter(([l,c])=>c!=null)),[t,n,r,e]);return is({queryKey:["chartWithData",e,o],queryFn:()=>Mt.queryChart(e,o,{includeConfig:!0}),enabled:!!e})}function _0(){const e=Br();return t=>{e.invalidateQueries({queryKey:["chartData",t]}),e.invalidateQueries({queryKey:["chartWithData",t]})}}function Hb(){return is({queryKey:["dashboards"],queryFn:()=>Mt.getDashboards()})}function d1(e){const t=[];for(const n of e.rows)for(const r of n.widgets)r.type==="chart"&&r.ref&&t.push(r.ref);return t}function Iw(e){return e.tabs?e.tabs[0]?d1(e.tabs[0].layout):[]:e.layout?d1(e.layout):[]}function Rw(e,t){var o,l,c;const n=Br(),r=Ye(d=>d.globalFilters),a=is({queryKey:["dashboard",e,t],queryFn:()=>Mt.getDashboard(e,t),enabled:!!e});return L.useEffect(()=>{var d,h,p,m,x;if((d=a.data)!=null&&d.name&&((h=a.data)!=null&&h.layout||(p=a.data)!=null&&p.tabs)){const E=Iw(a.data);(x=(m=a.data.tabs)==null?void 0:m[0])==null||x.name;const _=Object.fromEntries(Object.entries(r).filter(([S,w])=>w!=null));E.forEach(S=>{n.prefetchQuery({queryKey:["chartWithData",S,_],queryFn:()=>Mt.queryChart(S,_,{includeConfig:!0}),staleTime:1e3*60*5})})}},[(o=a.data)==null?void 0:o.layout,(l=a.data)==null?void 0:l.tabs,(c=a.data)==null?void 0:c.name,r,n]),a}function Lw(e){const t=Br();return gw({mutationFn:({layout:n,message:r,tab:a})=>Mt.saveDashboard(e,n,r,a),onSuccess:()=>{t.invalidateQueries({queryKey:["dashboard",e]})}})}function Pw(){const e=Br();return()=>{e.invalidateQueries({queryKey:["chartData"]}),e.invalidateQueries({queryKey:["chartWithData"]})}}function Mw(){const e=Br();L.useRef(1e3),L.useEffect(()=>{},[e])}function Fw({connection:e}){return g.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 min-w-[200px] bg-gray-900 text-white text-xs rounded-lg shadow-lg p-3 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200",children:[g.jsx("div",{className:"absolute -top-1 right-4 w-2 h-2 bg-gray-900 rotate-45"}),g.jsxs("div",{className:"space-y-1.5",children:[g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Name"}),g.jsx("span",{className:"font-medium",children:e.name})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Type"}),g.jsx("span",{className:"font-medium capitalize",children:e.type})]}),(e.type==="duckdb"||e.type==="sqlite")&&e.path&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Path"}),g.jsx("span",{className:"font-medium truncate max-w-[120px]",title:e.path,children:e.path})]}),(e.type==="postgres"||e.type==="mysql")&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Host"}),g.jsxs("span",{className:"font-medium",children:[e.host,":",e.port]})]}),g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Database"}),g.jsx("span",{className:"font-medium",children:e.database})]}),e.schema&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Schema"}),g.jsx("span",{className:"font-medium",children:e.schema})]})]}),e.type==="snowflake"&&g.jsxs(g.Fragment,{children:[e.account&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Account"}),g.jsx("span",{className:"font-medium truncate max-w-[120px]",title:e.account,children:e.account})]}),e.warehouse&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Warehouse"}),g.jsx("span",{className:"font-medium",children:e.warehouse})]}),e.database&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Database"}),g.jsx("span",{className:"font-medium",children:e.database})]}),e.schema&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Schema"}),g.jsx("span",{className:"font-medium",children:e.schema})]}),e.role&&g.jsxs("div",{className:"flex justify-between gap-4",children:[g.jsx("span",{className:"text-gray-400",children:"Role"}),g.jsx("span",{className:"font-medium",children:e.role})]})]})]})]})}function Bw({status:e,connection:t}){return g.jsxs("div",{className:"relative group",children:[g.jsxs("div",{className:"flex items-center gap-2 cursor-default",children:[g.jsx("span",{className:`w-2 h-2 rounded-full ${e==="ok"?"bg-green-500":"bg-red-500"}`}),g.jsx("span",{className:"text-sm text-gray-600",children:e==="ok"?"Connected":"Disconnected"})]}),t&&g.jsx(Fw,{connection:t})]})}const eo=Bb(e=>({auth:{status:"loading"},providers:[],checkAuth:async()=>{try{const t=await Mt.getAuthMe(),n=t.providers??[];t.needsSetup?e({auth:{status:"needs_setup"},providers:n}):t.user?e({auth:{status:"authenticated",user:t.user},providers:n}):e({auth:{status:"unauthenticated"},providers:n})}catch(t){t instanceof zu?t.status===404?e({auth:{status:"disabled"},providers:[]}):e({auth:{status:"disabled"},providers:[]}):e({auth:{status:"disabled"},providers:[]})}},login:async(t,n)=>{const{user:r}=await Mt.authLogin({email:t,password:n});e({auth:{status:"authenticated",user:r}})},setup:async(t,n,r)=>{const{user:a}=await Mt.authSetup({email:t,name:n,password:r});e({auth:{status:"authenticated",user:a}})},logout:async()=>{await Mt.authLogout(),e({auth:{status:"unauthenticated"}})}}));function jw({onClose:e}){const[t,n]=L.useState(""),[r,a]=L.useState(""),[o,l]=L.useState(""),[c,d]=L.useState(""),[h,p]=L.useState(!1),[m,x]=L.useState(!1),E=async _=>{if(_.preventDefault(),d(""),r!==o){d("New passwords do not match");return}if(r.length<8){d("Password must be at least 8 characters");return}x(!0);try{await Mt.authChangePassword({current_password:t,new_password:r}),p(!0),setTimeout(e,1500)}catch(S){d(S instanceof zu?S.message:"An error occurred")}finally{x(!1)}};return g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e,children:g.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 w-full max-w-md",onClick:_=>_.stopPropagation(),children:[g.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Change Password"}),h?g.jsx("div",{className:"bg-green-50 border border-green-200 text-green-700 text-sm rounded-md px-4 py-3",children:"Password changed successfully."}):g.jsxs("form",{onSubmit:E,className:"space-y-4",children:[c&&g.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 text-sm rounded-md px-4 py-3",children:c}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Current Password"}),g.jsx("input",{type:"password",value:t,onChange:_=>n(_.target.value),required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"New Password"}),g.jsx("input",{type:"password",value:r,onChange:_=>a(_.target.value),required:!0,minLength:8,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),g.jsxs("div",{children:[g.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Confirm New Password"}),g.jsx("input",{type:"password",value:o,onChange:_=>l(_.target.value),required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),g.jsxs("div",{className:"flex justify-end gap-3",children:[g.jsx("button",{type:"button",onClick:e,className:"px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md",children:"Cancel"}),g.jsx("button",{type:"submit",disabled:m,className:"px-4 py-2 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:opacity-50",children:m?"Saving...":"Change Password"})]})]})]})})}function Hw({onNavigateToUsers:e,onNavigateToShares:t}){const n=eo(h=>h.auth),r=eo(h=>h.logout),[a,o]=L.useState(!1),[l,c]=L.useState(!1),d=L.useRef(null);return L.useEffect(()=>{const h=p=>{d.current&&!d.current.contains(p.target)&&o(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]),n.status!=="authenticated"?null:g.jsxs("div",{className:"relative",ref:d,children:[g.jsxs("button",{onClick:()=>o(!a),className:"flex items-center gap-2 text-sm text-gray-700 hover:text-gray-900 px-2 py-1 rounded-md hover:bg-gray-100",children:[g.jsx("span",{className:"w-7 h-7 bg-blue-100 text-blue-700 rounded-full flex items-center justify-center text-xs font-medium",children:n.user.name.charAt(0).toUpperCase()}),g.jsx("span",{children:n.user.name})]}),a&&g.jsxs("div",{className:"absolute right-0 mt-1 w-48 bg-white border border-gray-200 rounded-md shadow-lg py-1 z-50",children:[g.jsx("div",{className:"px-4 py-2 text-xs text-gray-500 border-b border-gray-100",children:n.user.email}),n.user.role==="admin"&&g.jsxs(g.Fragment,{children:[g.jsx("button",{onClick:()=>{o(!1),e()},className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"User Management"}),t&&g.jsx("button",{onClick:()=>{o(!1),t()},className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Shared Links"})]}),g.jsx("button",{onClick:()=>{o(!1),c(!0)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Change Password"}),g.jsx("button",{onClick:()=>{o(!1),r()},className:"w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-gray-100",children:"Sign Out"})]}),l&&g.jsx(jw,{onClose:()=>c(!1)})]})}function Uw({onToggleSidebar:e,currentPath:t,onNavigateToUsers:n,onNavigateToShares:r}){const a=S0(),{data:o}=xw(),l=eo(h=>h.auth),c=t.replace(/^\//,"").split("/").filter(Boolean),d=typeof a.logo=="string"?`/api/assets/${a.logo.replace(/^\.\/assets\//,"")}`:a.logo?`/api/assets/${a.logo.light.replace(/^\.\/assets\//,"")}`:null;return g.jsxs("header",{className:"yc-topbar flex items-center justify-between px-4 border-b flex-shrink-0",style:{height:"var(--yc-topbar-height)",backgroundColor:"var(--yc-color-surface)",borderColor:"var(--yc-color-border)"},children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{onClick:e,className:"p-1.5 rounded hover:bg-black/5 transition-colors",title:"Toggle sidebar",children:g.jsx("svg",{className:"w-5 h-5",style:{color:"var(--yc-color-text-secondary)"},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),d&&g.jsx("img",{src:d,alt:"",className:"h-6 w-auto"}),g.jsx("nav",{className:"flex items-center gap-1.5 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:c.map((h,p)=>g.jsxs("span",{className:"flex items-center gap-1.5",children:[p>0&&g.jsx("span",{children:"/"}),g.jsx("span",{className:p===c.length-1?"font-medium":"",style:p===c.length-1?{color:"var(--yc-color-text)"}:void 0,children:decodeURIComponent(h)})]},p))})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Bw,{status:o==null?void 0:o.status,connection:o==null?void 0:o.connection}),g.jsxs("span",{className:"text-xs",style:{color:"var(--yc-color-text-secondary)"},children:["v",o==null?void 0:o.version]}),l.status==="authenticated"&&n&&g.jsx(Hw,{onNavigateToUsers:n,onNavigateToShares:r})]})]})}const f1="yamchart-sidebar-hidden";function zw({children:e,currentPath:t,onNavigate:n,onNavigateToUsers:r,onNavigateToShares:a}){const{data:o}=io(),{data:l}=Hb(),c=S0(),d=(o==null?void 0:o.charts)||[],h=l||[],[p,m]=L.useState(()=>c.sidebarShow?localStorage.getItem(f1)==="true":!0),x=L.useCallback(()=>{m(E=>{const _=!E;return localStorage.setItem(f1,String(_)),_})},[]);return g.jsxs("div",{className:"flex h-screen",style:{backgroundColor:"var(--yc-color-background)"},children:[!p&&g.jsx(kw,{dashboards:h,charts:d,currentPath:t,onNavigate:n}),g.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[g.jsx(Uw,{onToggleSidebar:x,currentPath:t,onNavigateToUsers:r,onNavigateToShares:a}),g.jsx("main",{className:"flex-1 overflow-auto",children:e})]})]})}function Ww(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const Xf={},bu={};function Ma(e,t){try{const r=(Xf[e]||(Xf[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in bu?bu[r]:h1(r,r.split(":"))}catch{if(e in bu)return bu[e];const n=e==null?void 0:e.match(Yw);return n?h1(e,n.slice(1)):NaN}}const Yw=/([+-]\d\d):?(\d\d)?/;function h1(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return bu[e]=n*60+r>0?n*60+r+a:n*60-r-a}class rs extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ma(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Ub(this),$h(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new rs(...n,t):new rs(Date.now(),t)}withTimeZone(t){return new rs(+this,t)}getTimezoneOffset(){const t=-Ma(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),$h(this),+this}[Symbol.for("constructDateFrom")](t){return new rs(+new Date(t),this.timeZone)}}const p1=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!p1.test(e))return;const t=e.replace(p1,"$1UTC");rs.prototype[t]&&(e.startsWith("get")?rs.prototype[e]=function(){return this.internal[t]()}:(rs.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),qw(this),+this},rs.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),$h(this),+this}))});function $h(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ma(e.timeZone,e)*60))}function qw(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ub(e)}function Ub(e){const t=Ma(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),o=-new Date(+r).getTimezoneOffset(),l=a-o,c=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();l&&c&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+l);const d=a-n;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const h=new Date(+e);h.setUTCSeconds(0);const p=a>0?h.getSeconds():(h.getSeconds()-60)%60,m=Math.round(-(Ma(e.timeZone,e)*60))%60;(m||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+m),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+m+p));const x=Ma(e.timeZone,e),E=x>0?Math.floor(x):Math.ceil(x),S=-new Date(+e).getTimezoneOffset()-E,w=E!==n,v=S-d;if(w&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const C=Ma(e.timeZone,e),N=C>0?Math.floor(C):Math.ceil(C),A=E-N;A&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+A),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+A))}}class Rn extends rs{static tz(t,...n){return n.length?new Rn(...n,t):new Rn(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),a=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,a]=this.tzComponents();return`${t} GMT${n}${r}${a} (${Ww(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[n,r,a]}withTimeZone(t){return new Rn(+this,t)}[Symbol.for("constructDateFrom")](t){return new Rn(+new Date(t),this.timeZone)}}const zb=6048e5,$w=864e5,C0=6e4,k0=36e5,Vw=1e3,m1=Symbol.for("constructDateFrom");function ht(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&m1 in e?e[m1](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qe(e,t){return ht(t||e,e)}function Ja(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(t)?ht((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Wu(e,t,n){const r=Qe(e,n==null?void 0:n.in);if(isNaN(t))return ht((n==null?void 0:n.in)||e,NaN);if(!t)return r;const a=r.getDate(),o=ht((n==null?void 0:n.in)||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const l=o.getDate();return a>=l?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let Qw={};function ri(){return Qw}function ss(e,t){var c,d,h,p;const n=ri(),r=(t==null?void 0:t.weekStartsOn)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,a=Qe(e,t==null?void 0:t.in),o=a.getDay(),l=(o<r?7:0)+o-r;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Za(e,t){return ss(e,{...t,weekStartsOn:1})}function Wb(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),a=ht(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=Za(a),l=ht(n,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const c=Za(l);return n.getTime()>=o.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function Cc(e){const t=Qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function oo(e,...t){const n=ht.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function to(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function N0(e,t,n){const[r,a]=oo(n==null?void 0:n.in,e,t),o=to(r),l=to(a),c=+o-Cc(o),d=+l-Cc(l);return Math.round((c-d)/$w)}function Gw(e,t){const n=Wb(e,t),r=ht(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Za(r)}function Yb(e,t,n){return Wu(e,t*3,n)}function O0(e,t,n){return Ja(e,t*7,n)}function D0(e,t,n){return Wu(e,t*12,n)}function Xw(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=ht.bind(null,a));const o=Qe(a,r);(!n||n<o||isNaN(+o))&&(n=o)}),ht(r,n||NaN)}function Kw(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=ht.bind(null,a));const o=Qe(a,r);(!n||n>o||isNaN(+o))&&(n=o)}),ht(r,n||NaN)}function Jw(e,t,n){const[r,a]=oo(n==null?void 0:n.in,e,t);return+to(r)==+to(a)}function qb(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zw(e){return!(!qb(e)&&typeof e!="number"||isNaN(+Qe(e)))}function $b(e,t,n){const[r,a]=oo(n==null?void 0:n.in,e,t),o=r.getFullYear()-a.getFullYear(),l=r.getMonth()-a.getMonth();return o*12+l}function eS(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Vb(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qb(e,t){const[n,r]=oo(e,t.start,t.end);return{start:n,end:r}}function tS(e,t){const{start:n,end:r}=Qb(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setDate(1);let c=1;const d=[];for(;+l<=o;)d.push(ht(n,l)),l.setMonth(l.getMonth()+c);return a?d.reverse():d}function nS(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getMonth(),a=r-r%3;return n.setMonth(a,1),n.setHours(0,0,0,0),n}function Gb(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Xb(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function A0(e,t){const n=Qe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rS(e,t){const{start:n,end:r}=Qb(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,l=a?r:n;l.setHours(0,0,0,0),l.setMonth(0,1);let c=1;const d=[];for(;+l<=o;)d.push(ht(n,l)),l.setFullYear(l.getFullYear()+c);return a?d.reverse():d}function I0(e,t){var c,d,h,p;const n=ri(),r=(t==null?void 0:t.weekStartsOn)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,a=Qe(e,t==null?void 0:t.in),o=a.getDay(),l=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+l),a.setHours(23,59,59,999),a}function sS(e,t){return I0(e,{...t,weekStartsOn:1})}function aS(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getMonth(),a=r-r%3+3;return n.setMonth(a,0),n.setHours(23,59,59,999),n}const iS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},oS=(e,t,n)=>{let r;const a=iS[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Kf(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dS={date:Kf({formats:uS,defaultWidth:"full"}),time:Kf({formats:lS,defaultWidth:"full"}),dateTime:Kf({formats:cS,defaultWidth:"full"})},fS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hS=(e,t,n,r)=>fS[e];function eu(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[c]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const pS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},yS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ES={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xS=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},TS={ordinalNumber:xS,era:eu({values:pS,defaultWidth:"wide"}),quarter:eu({values:mS,defaultWidth:"wide",argumentCallback:e=>e-1}),month:eu({values:gS,defaultWidth:"wide"}),day:eu({values:yS,defaultWidth:"wide"}),dayPeriod:eu({values:bS,defaultWidth:"wide",formattingValues:ES,defaultFormattingWidth:"wide"})};function tu(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const l=o[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?wS(c,m=>m.test(l)):vS(c,m=>m.test(l));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const p=t.slice(l.length);return{value:h,rest:p}}}function vS(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wS(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function SS(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}const _S=/^(\d+)(th|st|nd|rd)?/i,CS=/\d+/i,kS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NS={any:[/^b/i,/^(a|c)/i]},OS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},DS={any:[/1/i,/2/i,/3/i,/4/i]},AS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},IS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},RS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},LS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},PS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},MS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FS={ordinalNumber:SS({matchPattern:_S,parsePattern:CS,valueCallback:e=>parseInt(e,10)}),era:tu({matchPatterns:kS,defaultMatchWidth:"wide",parsePatterns:NS,defaultParseWidth:"any"}),quarter:tu({matchPatterns:OS,defaultMatchWidth:"wide",parsePatterns:DS,defaultParseWidth:"any",valueCallback:e=>e+1}),month:tu({matchPatterns:AS,defaultMatchWidth:"wide",parsePatterns:IS,defaultParseWidth:"any"}),day:tu({matchPatterns:RS,defaultMatchWidth:"wide",parsePatterns:LS,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:PS,defaultMatchWidth:"any",parsePatterns:MS,defaultParseWidth:"any"})},La={code:"en-US",formatDistance:oS,formatLong:dS,formatRelative:hS,localize:TS,match:FS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function BS(e,t){const n=Qe(e,t==null?void 0:t.in);return N0(n,A0(n))+1}function jc(e,t){const n=Qe(e,t==null?void 0:t.in),r=+Za(n)-+Gw(n);return Math.round(r/zb)+1}function R0(e,t){var p,m,x,E;const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),a=ri(),o=(t==null?void 0:t.firstWeekContainsDate)??((m=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((E=(x=a.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,l=ht((t==null?void 0:t.in)||e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const c=ss(l,t),d=ht((t==null?void 0:t.in)||e,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const h=ss(d,t);return+n>=+c?r+1:+n>=+h?r:r-1}function jS(e,t){var c,d,h,p;const n=ri(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,a=R0(e,t),o=ht((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),ss(o,t)}function Hc(e,t){const n=Qe(e,t==null?void 0:t.in),r=+ss(n,t)-+jS(n,t);return Math.round(r/zb)+1}function mt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Gs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return mt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):mt(n+1,2)},d(e,t){return mt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return mt(e.getHours()%12||12,t.length)},H(e,t){return mt(e.getHours(),t.length)},m(e,t){return mt(e.getMinutes(),t.length)},s(e,t){return mt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return mt(a,t.length)}},Ai={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},g1={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Gs.y(e,t)},Y:function(e,t,n,r){const a=R0(e,r),o=a>0?a:1-a;if(t==="YY"){const l=o%100;return mt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):mt(o,t.length)},R:function(e,t){const n=Wb(e);return mt(n,t.length)},u:function(e,t){const n=e.getFullYear();return mt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return mt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return mt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Gs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return mt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Hc(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):mt(a,t.length)},I:function(e,t,n){const r=jc(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):mt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Gs.d(e,t)},D:function(e,t,n){const r=BS(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):mt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return mt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return mt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return mt(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Ai.noon:r===0?a=Ai.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Ai.evening:r>=12?a=Ai.afternoon:r>=4?a=Ai.morning:a=Ai.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gs.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Gs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):mt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Gs.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Gs.s(e,t)},S:function(e,t){return Gs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return b1(r);case"XXXX":case"XX":return Ia(r);case"XXXXX":case"XXX":default:return Ia(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return b1(r);case"xxxx":case"xx":return Ia(r);case"xxxxx":case"xxx":default:return Ia(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y1(r,":");case"OOOO":default:return"GMT"+Ia(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y1(r,":");case"zzzz":default:return"GMT"+Ia(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return mt(r,t.length)},T:function(e,t,n){return mt(+e,t.length)}};function y1(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+mt(o,2)}function b1(e,t){return e%60===0?(e>0?"-":"+")+mt(Math.abs(e)/60,2):Ia(e,t)}function Ia(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=mt(Math.trunc(r/60),2),o=mt(r%60,2);return n+a+t+o}const E1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Kb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},HS=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return E1(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",E1(r,t)).replace("{{time}}",Kb(a,t))},Vh={p:Kb,P:HS},US=/^D+$/,zS=/^Y+$/,WS=["D","DD","YY","YYYY"];function Jb(e){return US.test(e)}function Zb(e){return zS.test(e)}function Qh(e,t,n){const r=YS(e,t,n);if(console.warn(r),WS.includes(e))throw new RangeError(r)}function YS(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VS=/^'([^]*?)'?$/,QS=/''/g,GS=/[a-zA-Z]/;function hn(e,t,n){var p,m,x,E,_,S,w,v;const r=ri(),a=(n==null?void 0:n.locale)??r.locale??La,o=(n==null?void 0:n.firstWeekContainsDate)??((m=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((E=(x=r.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,l=(n==null?void 0:n.weekStartsOn)??((S=(_=n==null?void 0:n.locale)==null?void 0:_.options)==null?void 0:S.weekStartsOn)??r.weekStartsOn??((v=(w=r.locale)==null?void 0:w.options)==null?void 0:v.weekStartsOn)??0,c=Qe(e,n==null?void 0:n.in);if(!Zw(c))throw new RangeError("Invalid time value");let d=t.match($S).map(C=>{const N=C[0];if(N==="p"||N==="P"){const A=Vh[N];return A(C,a.formatLong)}return C}).join("").match(qS).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const N=C[0];if(N==="'")return{isToken:!1,value:XS(C)};if(g1[N])return{isToken:!0,value:C};if(N.match(GS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return{isToken:!1,value:C}});a.localize.preprocessor&&(d=a.localize.preprocessor(c,d));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:a};return d.map(C=>{if(!C.isToken)return C.value;const N=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Zb(N)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Jb(N))&&Qh(N,t,String(e));const A=g1[N[0]];return A(c,N,a.localize,h)}).join("")}function XS(e){const t=e.match(VS);return t?t[1].replace(QS,"'"):e}function KS(e,t){const n=Qe(e,t==null?void 0:t.in),r=n.getFullYear(),a=n.getMonth(),o=ht(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function JS(){return Object.assign({},ri())}function ZS(e,t){const n=Qe(e,t==null?void 0:t.in).getDay();return n===0?7:n}function e_(e,t){return Qe(e,t==null?void 0:t.in).getMonth()}function t_(e,t){return Qe(e,t==null?void 0:t.in).getFullYear()}function n_(e,t){return+Qe(e)>+Qe(t)}function r_(e,t){return+Qe(e)<+Qe(t)}function s_(e,t){const n=a_(t)?new t(0):ht(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function a_(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const i_=10;class eE{constructor(){Te(this,"subPriority",0)}validate(t,n){return!0}}class o_ extends eE{constructor(t,n,r,a,o){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=a,o&&(this.subPriority=o)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class u_ extends eE{constructor(n,r){super();Te(this,"priority",i_);Te(this,"subPriority",-1);this.context=n||(a=>ht(r,a))}set(n,r){return r.timestampIsSet?n:ht(n,s_(n,this.context))}}let lt=class{run(t,n,r,a){const o=this.parse(t,n,r,a);return o?{setter:new o_(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,r){return!0}};class l_ extends lt{constructor(){super(...arguments);Te(this,"priority",140);Te(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})||a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"})}}set(n,r,a){return r.era=a,n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}const Zt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},es={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function en(e,t){return e&&{value:t(e.value),rest:e.rest}}function Ut(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ts(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,a=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,l=n[5]?parseInt(n[5],10):0;return{value:r*(a*k0+o*C0+l*Vw),rest:t.slice(n[0].length)}}function tE(e){return Ut(Zt.anyDigitsSigned,e)}function Qt(e,t){switch(e){case 1:return Ut(Zt.singleDigit,t);case 2:return Ut(Zt.twoDigits,t);case 3:return Ut(Zt.threeDigits,t);case 4:return Ut(Zt.fourDigits,t);default:return Ut(new RegExp("^\\d{1,"+e+"}"),t)}}function kc(e,t){switch(e){case 1:return Ut(Zt.singleDigitSigned,t);case 2:return Ut(Zt.twoDigitsSigned,t);case 3:return Ut(Zt.threeDigitsSigned,t);case 4:return Ut(Zt.fourDigitsSigned,t);default:return Ut(new RegExp("^-?\\d{1,"+e+"}"),t)}}function L0(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function nE(e,t){const n=t>0,r=n?t:1-t;let a;if(r<=50)a=e||100;else{const o=r+50,l=Math.trunc(o/100)*100,c=e>=o%100;a=e+l-(c?100:0)}return n?a:1-a}function rE(e){return e%400===0||e%4===0&&e%100!==0}class c_ extends lt{constructor(){super(...arguments);Te(this,"priority",130);Te(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,a){const o=l=>({year:l,isTwoDigitYear:r==="yy"});switch(r){case"y":return en(Qt(4,n),o);case"yo":return en(a.ordinalNumber(n,{unit:"year"}),o);default:return en(Qt(r.length,n),o)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a){const o=n.getFullYear();if(a.isTwoDigitYear){const c=nE(a.year,o);return n.setFullYear(c,0,1),n.setHours(0,0,0,0),n}const l=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(l,0,1),n.setHours(0,0,0,0),n}}class d_ extends lt{constructor(){super(...arguments);Te(this,"priority",130);Te(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,a){const o=l=>({year:l,isTwoDigitYear:r==="YY"});switch(r){case"Y":return en(Qt(4,n),o);case"Yo":return en(a.ordinalNumber(n,{unit:"year"}),o);default:return en(Qt(r.length,n),o)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a,o){const l=R0(n,o);if(a.isTwoDigitYear){const d=nE(a.year,l);return n.setFullYear(d,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),ss(n,o)}const c=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(c,0,o.firstWeekContainsDate),n.setHours(0,0,0,0),ss(n,o)}}class f_ extends lt{constructor(){super(...arguments);Te(this,"priority",130);Te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return kc(r==="R"?4:r.length,n)}set(n,r,a){const o=ht(n,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),Za(o)}}class h_ extends lt{constructor(){super(...arguments);Te(this,"priority",130);Te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return kc(r==="u"?4:r.length,n)}set(n,r,a){return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}}class p_ extends lt{constructor(){super(...arguments);Te(this,"priority",120);Te(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"Q":case"QQ":return Qt(r.length,n);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})||a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}}class m_ extends lt{constructor(){super(...arguments);Te(this,"priority",120);Te(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"q":case"qq":return Qt(r.length,n);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})||a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}}class g_ extends lt{constructor(){super(...arguments);Te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Te(this,"priority",110)}parse(n,r,a){const o=l=>l-1;switch(r){case"M":return en(Ut(Zt.month,n),o);case"MM":return en(Qt(2,n),o);case"Mo":return en(a.ordinalNumber(n,{unit:"month"}),o);case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})||a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}}class y_ extends lt{constructor(){super(...arguments);Te(this,"priority",110);Te(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,a){const o=l=>l-1;switch(r){case"L":return en(Ut(Zt.month,n),o);case"LL":return en(Qt(2,n),o);case"Lo":return en(a.ordinalNumber(n,{unit:"month"}),o);case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})||a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}}function b_(e,t,n){const r=Qe(e,n==null?void 0:n.in),a=Hc(r,n)-t;return r.setDate(r.getDate()-a*7),Qe(r,n==null?void 0:n.in)}class E_ extends lt{constructor(){super(...arguments);Te(this,"priority",100);Te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,a){switch(r){case"w":return Ut(Zt.week,n);case"wo":return a.ordinalNumber(n,{unit:"week"});default:return Qt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a,o){return ss(b_(n,a,o),o)}}function x_(e,t,n){const r=Qe(e,n==null?void 0:n.in),a=jc(r,n)-t;return r.setDate(r.getDate()-a*7),r}class T_ extends lt{constructor(){super(...arguments);Te(this,"priority",100);Te(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,a){switch(r){case"I":return Ut(Zt.week,n);case"Io":return a.ordinalNumber(n,{unit:"week"});default:return Qt(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a){return Za(x_(n,a))}}const v_=[31,28,31,30,31,30,31,31,30,31,30,31],w_=[31,29,31,30,31,30,31,31,30,31,30,31];class S_ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"subPriority",1);Te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"d":return Ut(Zt.date,n);case"do":return a.ordinalNumber(n,{unit:"date"});default:return Qt(r.length,n)}}validate(n,r){const a=n.getFullYear(),o=rE(a),l=n.getMonth();return o?r>=1&&r<=w_[l]:r>=1&&r<=v_[l]}set(n,r,a){return n.setDate(a),n.setHours(0,0,0,0),n}}class __ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"subpriority",1);Te(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,a){switch(r){case"D":case"DD":return Ut(Zt.dayOfYear,n);case"Do":return a.ordinalNumber(n,{unit:"date"});default:return Qt(r.length,n)}}validate(n,r){const a=n.getFullYear();return rE(a)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,a){return n.setMonth(0,a),n.setHours(0,0,0,0),n}}function P0(e,t,n){var m,x,E,_;const r=ri(),a=(n==null?void 0:n.weekStartsOn)??((x=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??r.weekStartsOn??((_=(E=r.locale)==null?void 0:E.options)==null?void 0:_.weekStartsOn)??0,o=Qe(e,n==null?void 0:n.in),l=o.getDay(),d=(t%7+7)%7,h=7-a,p=t<0||t>6?t-(l+h)%7:(d+h)%7-(l+h)%7;return Ja(o,p,n)}class C_ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,o){return n=P0(n,a,o),n.setHours(0,0,0,0),n}}class k_ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,a,o){const l=c=>{const d=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+d};switch(r){case"e":case"ee":return en(Qt(r.length,n),l);case"eo":return en(a.ordinalNumber(n,{unit:"day"}),l);case"eee":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,o){return n=P0(n,a,o),n.setHours(0,0,0,0),n}}class N_ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,a,o){const l=c=>{const d=Math.floor((c-1)/7)*7;return(c+o.weekStartsOn+6)%7+d};switch(r){case"c":case"cc":return en(Qt(r.length,n),l);case"co":return en(a.ordinalNumber(n,{unit:"day"}),l);case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})||a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,o){return n=P0(n,a,o),n.setHours(0,0,0,0),n}}function O_(e,t,n){const r=Qe(e,n==null?void 0:n.in),a=ZS(r,n),o=t-a;return Ja(r,o,n)}class D_ extends lt{constructor(){super(...arguments);Te(this,"priority",90);Te(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,a){const o=l=>l===0?7:l;switch(r){case"i":case"ii":return Qt(r.length,n);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return en(a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),o);case"iiiii":return en(a.day(n,{width:"narrow",context:"formatting"}),o);case"iiiiii":return en(a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),o);case"iiii":default:return en(a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),o)}}validate(n,r){return r>=1&&r<=7}set(n,r,a){return n=O_(n,a),n.setHours(0,0,0,0),n}}class A_ extends lt{constructor(){super(...arguments);Te(this,"priority",80);Te(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(L0(a),0,0,0),n}}class I_ extends lt{constructor(){super(...arguments);Te(this,"priority",80);Te(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(L0(a),0,0,0),n}}class R_ extends lt{constructor(){super(...arguments);Te(this,"priority",80);Te(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(L0(a),0,0,0),n}}class L_ extends lt{constructor(){super(...arguments);Te(this,"priority",70);Te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,a){switch(r){case"h":return Ut(Zt.hour12h,n);case"ho":return a.ordinalNumber(n,{unit:"hour"});default:return Qt(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,a){const o=n.getHours()>=12;return o&&a<12?n.setHours(a+12,0,0,0):!o&&a===12?n.setHours(0,0,0,0):n.setHours(a,0,0,0),n}}class P_ extends lt{constructor(){super(...arguments);Te(this,"priority",70);Te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,a){switch(r){case"H":return Ut(Zt.hour23h,n);case"Ho":return a.ordinalNumber(n,{unit:"hour"});default:return Qt(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,a){return n.setHours(a,0,0,0),n}}class M_ extends lt{constructor(){super(...arguments);Te(this,"priority",70);Te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,a){switch(r){case"K":return Ut(Zt.hour11h,n);case"Ko":return a.ordinalNumber(n,{unit:"hour"});default:return Qt(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.getHours()>=12&&a<12?n.setHours(a+12,0,0,0):n.setHours(a,0,0,0),n}}class F_ extends lt{constructor(){super(...arguments);Te(this,"priority",70);Te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,a){switch(r){case"k":return Ut(Zt.hour24h,n);case"ko":return a.ordinalNumber(n,{unit:"hour"});default:return Qt(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,a){const o=a<=24?a%24:a;return n.setHours(o,0,0,0),n}}class B_ extends lt{constructor(){super(...arguments);Te(this,"priority",60);Te(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"m":return Ut(Zt.minute,n);case"mo":return a.ordinalNumber(n,{unit:"minute"});default:return Qt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setMinutes(a,0,0),n}}class j_ extends lt{constructor(){super(...arguments);Te(this,"priority",50);Te(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"s":return Ut(Zt.second,n);case"so":return a.ordinalNumber(n,{unit:"second"});default:return Qt(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setSeconds(a,0),n}}class H_ extends lt{constructor(){super(...arguments);Te(this,"priority",30);Te(this,"incompatibleTokens",["t","T"])}parse(n,r){const a=o=>Math.trunc(o*Math.pow(10,-r.length+3));return en(Qt(r.length,n),a)}set(n,r,a){return n.setMilliseconds(a),n}}class U_ extends lt{constructor(){super(...arguments);Te(this,"priority",10);Te(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return ts(es.basicOptionalMinutes,n);case"XX":return ts(es.basic,n);case"XXXX":return ts(es.basicOptionalSeconds,n);case"XXXXX":return ts(es.extendedOptionalSeconds,n);case"XXX":default:return ts(es.extended,n)}}set(n,r,a){return r.timestampIsSet?n:ht(n,n.getTime()-Cc(n)-a)}}class z_ extends lt{constructor(){super(...arguments);Te(this,"priority",10);Te(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return ts(es.basicOptionalMinutes,n);case"xx":return ts(es.basic,n);case"xxxx":return ts(es.basicOptionalSeconds,n);case"xxxxx":return ts(es.extendedOptionalSeconds,n);case"xxx":default:return ts(es.extended,n)}}set(n,r,a){return r.timestampIsSet?n:ht(n,n.getTime()-Cc(n)-a)}}class W_ extends lt{constructor(){super(...arguments);Te(this,"priority",40);Te(this,"incompatibleTokens","*")}parse(n){return tE(n)}set(n,r,a){return[ht(n,a*1e3),{timestampIsSet:!0}]}}class Y_ extends lt{constructor(){super(...arguments);Te(this,"priority",20);Te(this,"incompatibleTokens","*")}parse(n){return tE(n)}set(n,r,a){return[ht(n,a),{timestampIsSet:!0}]}}const q_={G:new l_,y:new c_,Y:new d_,R:new f_,u:new h_,Q:new p_,q:new m_,M:new g_,L:new y_,w:new E_,I:new T_,d:new S_,D:new __,E:new C_,e:new k_,c:new N_,i:new D_,a:new A_,b:new I_,B:new R_,h:new L_,H:new P_,K:new M_,k:new F_,m:new B_,s:new j_,S:new H_,X:new U_,x:new z_,t:new W_,T:new Y_},$_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,V_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Q_=/^'([^]*?)'?$/,G_=/''/g,X_=/\S/,K_=/[a-zA-Z]/;function Jf(e,t,n,r){var w,v,C,N;const a=()=>ht(n,NaN),o=JS(),l=o.locale??La,c=o.firstWeekContainsDate??((v=(w=o.locale)==null?void 0:w.options)==null?void 0:v.firstWeekContainsDate)??1,d=o.weekStartsOn??((N=(C=o.locale)==null?void 0:C.options)==null?void 0:N.weekStartsOn)??0,h={firstWeekContainsDate:c,weekStartsOn:d,locale:l},p=[new u_(r==null?void 0:r.in,n)],m=t.match(V_).map(A=>{const M=A[0];if(M in Vh){const k=Vh[M];return k(A,l.formatLong)}return A}).join("").match($_),x=[];for(let A of m){Zb(A)&&Qh(A,t,e),Jb(A)&&Qh(A,t,e);const M=A[0],k=q_[M];if(k){const{incompatibleTokens:O}=k;if(Array.isArray(O)){const P=x.find(H=>O.includes(H.token)||H.token===M);if(P)throw new RangeError(`The format string mustn't contain \`${P.fullToken}\` and \`${A}\` at the same time`)}else if(k.incompatibleTokens==="*"&&x.length>0)throw new RangeError(`The format string mustn't contain \`${A}\` and any other token at the same time`);x.push({token:M,fullToken:A});const I=k.run(e,A,l.match,h);if(!I)return a();p.push(I.setter),e=I.rest}else{if(M.match(K_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");if(A==="''"?A="'":M==="'"&&(A=J_(A)),e.indexOf(A)===0)e=e.slice(A.length);else return a()}}if(e.length>0&&X_.test(e))return a();const E=p.map(A=>A.priority).sort((A,M)=>M-A).filter((A,M,k)=>k.indexOf(A)===M).map(A=>p.filter(M=>M.priority===A).sort((M,k)=>k.subPriority-M.subPriority)).map(A=>A[0]);let _=Qe(n,r==null?void 0:r.in);if(isNaN(+_))return a();const S={};for(const A of E){if(!A.validate(_,h))return a();const M=A.set(_,S,h);Array.isArray(M)?(_=M[0],Object.assign(S,M[1])):_=M}return _}function J_(e){return e.match(Q_)[1].replace(G_,"'")}function Z_(e,t,n){const[r,a]=oo(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function eC(e,t,n){const[r,a]=oo(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()}function x1(e,t,n){return Ja(e,-t,n)}function Nc(e,t){const n=()=>ht(t==null?void 0:t.in,NaN),a=sC(e);let o;if(a.date){const h=aC(a.date,2);o=iC(h.restDateString,h.year)}if(!o||isNaN(+o))return n();const l=+o;let c=0,d;if(a.time&&(c=oC(a.time),isNaN(c)))return n();if(a.timezone){if(d=uC(a.timezone),isNaN(d))return n()}else{const h=new Date(l+c),p=Qe(0,t==null?void 0:t.in);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}return Qe(l+c+d,t==null?void 0:t.in)}const uc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},tC=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,nC=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,rC=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sC(e){const t={},n=e.split(uc.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],uc.timeZoneDelimiter.test(t.date)&&(t.date=e.split(uc.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const a=uc.timezone.exec(r);a?(t.time=r.replace(a[1],""),t.timezone=a[1]):t.time=r}return t}function aC(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?a:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function iC(e,t){if(t===null)return new Date(NaN);const n=e.match(tC);if(!n)return new Date(NaN);const r=!!n[4],a=nu(n[1]),o=nu(n[2])-1,l=nu(n[3]),c=nu(n[4]),d=nu(n[5])-1;if(r)return hC(t,c,d)?lC(t,c,d):new Date(NaN);{const h=new Date(0);return!dC(t,o,l)||!fC(t,a)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(a,l)),h)}}function nu(e){return e?parseInt(e):1}function oC(e){const t=e.match(nC);if(!t)return NaN;const n=Zf(t[1]),r=Zf(t[2]),a=Zf(t[3]);return pC(n,r,a)?n*k0+r*C0+a*1e3:NaN}function Zf(e){return e&&parseFloat(e.replace(",","."))||0}function uC(e){if(e==="Z")return 0;const t=e.match(rC);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return mC(r,a)?n*(r*k0+a*C0):NaN}function lC(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const a=r.getUTCDay()||7,o=(t-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+o),r}const cC=[31,null,31,30,31,30,31,31,30,31,30,31];function sE(e){return e%400===0||e%4===0&&e%100!==0}function dC(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(cC[t]||(sE(e)?29:28))}function fC(e,t){return t>=1&&t<=(sE(e)?366:365)}function hC(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function pC(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function mC(e,t){return t>=0&&t<=59}function gC(e,t,n){const r=Qe(e,n==null?void 0:n.in),a=r.getFullYear(),o=r.getDate(),l=ht(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const c=KS(l);return r.setMonth(t,Math.min(o,c)),r}function yC(e,t,n){const r=Qe(e,n==null?void 0:n.in);return isNaN(+r)?ht(e,NaN):(r.setFullYear(t),r)}function bC(e,t,n){return Wu(e,-t,n)}function EC(e,t,n){return Yb(e,-t,n)}function xC(e,t,n){return O0(e,-t,n)}function TC(e,t,n){return D0(e,-t,n)}const T1=5,vC=4;function wC(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),o=t.addDays(a,T1*7-1);return t.getMonth(e)===t.getMonth(o)?T1:vC}function aE(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function SC(e,t){const n=aE(e,t),r=wC(e,t);return t.addDays(n,r*7-1)}const iE={...La,labels:{labelDayButton:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(l,c)=>hn(l,c,{locale:La,...n});let o=a(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>hn(a,o,{locale:La,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(l,c)=>hn(l,c,{locale:La,...n});let o=a(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>hn(a,o,{locale:La,...t}),r(e,"cccc")}}};class cr{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Rn.tz(this.options.timeZone):new this.Date},this.newDate=(r,a,o)=>{var l;return(l=this.overrides)!=null&&l.newDate?this.overrides.newDate(r,a,o):this.options.timeZone?new Rn(r,a,o,this.options.timeZone):new Date(r,a,o)},this.addDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,a):Ja(r,a)},this.addMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,a):Wu(r,a)},this.addWeeks=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,a):O0(r,a)},this.addYears=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,a):D0(r,a)},this.differenceInCalendarDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):N0(r,a)},this.differenceInCalendarMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):$b(r,a)},this.eachMonthOfInterval=r=>{var a;return(a=this.overrides)!=null&&a.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):tS(r)},this.eachYearOfInterval=r=>{var c;const a=(c=this.overrides)!=null&&c.eachYearOfInterval?this.overrides.eachYearOfInterval(r):rS(r),o=new Set(a.map(d=>this.getYear(d)));if(o.size===a.length)return a;const l=[];return o.forEach(d=>{l.push(new Date(d,0,1))}),l},this.endOfBroadcastWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):SC(r,this)},this.endOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfISOWeek?this.overrides.endOfISOWeek(r):sS(r)},this.endOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.endOfMonth?this.overrides.endOfMonth(r):Vb(r)},this.endOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,a):I0(r,this.options)},this.endOfYear=r=>{var a;return(a=this.overrides)!=null&&a.endOfYear?this.overrides.endOfYear(r):Xb(r)},this.format=(r,a,o)=>{var c;const l=(c=this.overrides)!=null&&c.format?this.overrides.format(r,a,this.options):hn(r,a,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(l):l},this.getISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.getISOWeek?this.overrides.getISOWeek(r):jc(r)},this.getMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):e_(r,this.options)},this.getYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):t_(r,this.options)},this.getWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):Hc(r,this.options)},this.isAfter=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,a):n_(r,a)},this.isBefore=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,a):r_(r,a)},this.isDate=r=>{var a;return(a=this.overrides)!=null&&a.isDate?this.overrides.isDate(r):qb(r)},this.isSameDay=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,a):Jw(r,a)},this.isSameMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,a):Z_(r,a)},this.isSameYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,a):eC(r,a)},this.max=r=>{var a;return(a=this.overrides)!=null&&a.max?this.overrides.max(r):Xw(r)},this.min=r=>{var a;return(a=this.overrides)!=null&&a.min?this.overrides.min(r):Kw(r)},this.setMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,a):gC(r,a)},this.setYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,a):yC(r,a)},this.startOfBroadcastWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):aE(r,this)},this.startOfDay=r=>{var a;return(a=this.overrides)!=null&&a.startOfDay?this.overrides.startOfDay(r):to(r)},this.startOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.startOfISOWeek?this.overrides.startOfISOWeek(r):Za(r)},this.startOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.startOfMonth?this.overrides.startOfMonth(r):Gb(r)},this.startOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):ss(r,this.options)},this.startOfYear=r=>{var a;return(a=this.overrides)!=null&&a.startOfYear?this.overrides.startOfYear(r):A0(r)},this.options={locale:iE,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let a=0;a<10;a++)r[a.toString()]=n.format(a);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&cr.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,o=n==null?void 0:n.code;if(o&&cr.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:r,numberingSystem:a}).format(t)}catch{}const l=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,l)}}cr.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const os=new cr;class oE{constructor(t,n,r=os){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class _C{constructor(t,n){this.date=t,this.weeks=n}}class CC{constructor(t,n){this.days=n,this.weekNumber=t}}function kC(e){return Ee.createElement("button",{...e})}function NC(e){return Ee.createElement("span",{...e})}function OC(e){const{size:t=24,orientation:n="left",className:r}=e;return Ee.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&Ee.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&Ee.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&Ee.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&Ee.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function DC(e){const{day:t,modifiers:n,...r}=e;return Ee.createElement("td",{...r})}function AC(e){const{day:t,modifiers:n,...r}=e,a=Ee.useRef(null);return Ee.useEffect(()=>{var o;n.focused&&((o=a.current)==null||o.focus())},[n.focused]),Ee.createElement("button",{ref:a,...r})}var Re;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Re||(Re={}));var jt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(jt||(jt={}));var Mr;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Mr||(Mr={}));var ur;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ur||(ur={}));function IC(e){const{options:t,className:n,components:r,classNames:a,...o}=e,l=[a[Re.Dropdown],n].join(" "),c=t==null?void 0:t.find(({value:d})=>d===o.value);return Ee.createElement("span",{"data-disabled":o.disabled,className:a[Re.DropdownRoot]},Ee.createElement(r.Select,{className:l,...o},t==null?void 0:t.map(({value:d,label:h,disabled:p})=>Ee.createElement(r.Option,{key:d,value:d,disabled:p},h))),Ee.createElement("span",{className:a[Re.CaptionLabel],"aria-hidden":!0},c==null?void 0:c.label,Ee.createElement(r.Chevron,{orientation:"down",size:18,className:a[Re.Chevron]})))}function RC(e){return Ee.createElement("div",{...e})}function LC(e){return Ee.createElement("div",{...e})}function PC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return Ee.createElement("div",{...r},e.children)}function MC(e){const{calendarMonth:t,displayIndex:n,...r}=e;return Ee.createElement("div",{...r})}function FC(e){return Ee.createElement("table",{...e})}function BC(e){return Ee.createElement("div",{...e})}const uE=L.createContext(void 0);function Yu(){const e=L.useContext(uE);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function jC(e){const{components:t}=Yu();return Ee.createElement(t.Dropdown,{...e})}function HC(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...o}=e,{components:l,classNames:c,labels:{labelPrevious:d,labelNext:h}}=Yu(),p=L.useCallback(x=>{a&&(n==null||n(x))},[a,n]),m=L.useCallback(x=>{r&&(t==null||t(x))},[r,t]);return Ee.createElement("nav",{...o},Ee.createElement(l.PreviousMonthButton,{type:"button",className:c[Re.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":d(r),onClick:m},Ee.createElement(l.Chevron,{disabled:r?void 0:!0,className:c[Re.Chevron],orientation:"left"})),Ee.createElement(l.NextMonthButton,{type:"button",className:c[Re.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":h(a),onClick:p},Ee.createElement(l.Chevron,{disabled:a?void 0:!0,orientation:"right",className:c[Re.Chevron]})))}function UC(e){const{components:t}=Yu();return Ee.createElement(t.Button,{...e})}function zC(e){return Ee.createElement("option",{...e})}function WC(e){const{components:t}=Yu();return Ee.createElement(t.Button,{...e})}function YC(e){const{rootRef:t,...n}=e;return Ee.createElement("div",{...n,ref:t})}function qC(e){return Ee.createElement("select",{...e})}function $C(e){const{week:t,...n}=e;return Ee.createElement("tr",{...n})}function VC(e){return Ee.createElement("th",{...e})}function QC(e){return Ee.createElement("thead",{"aria-hidden":!0},Ee.createElement("tr",{...e}))}function GC(e){const{week:t,...n}=e;return Ee.createElement("th",{...n})}function XC(e){return Ee.createElement("th",{...e})}function KC(e){return Ee.createElement("tbody",{...e})}function JC(e){const{components:t}=Yu();return Ee.createElement(t.Dropdown,{...e})}const ZC=Object.freeze(Object.defineProperty({__proto__:null,Button:kC,CaptionLabel:NC,Chevron:OC,Day:DC,DayButton:AC,Dropdown:IC,DropdownNav:RC,Footer:LC,Month:PC,MonthCaption:MC,MonthGrid:FC,Months:BC,MonthsDropdown:jC,Nav:HC,NextMonthButton:UC,Option:zC,PreviousMonthButton:WC,Root:YC,Select:qC,Week:$C,WeekNumber:GC,WeekNumberHeader:XC,Weekday:VC,Weekdays:QC,Weeks:KC,YearsDropdown:JC},Symbol.toStringTag,{value:"Module"}));function Ss(e,t,n=!1,r=os){let{from:a,to:o}=e;const{differenceInCalendarDays:l,isSameDay:c}=r;return a&&o?(l(o,a)<0&&([a,o]=[o,a]),l(t,a)>=(n?1:0)&&l(o,t)>=(n?1:0)):!n&&o?c(o,t):!n&&a?c(a,t):!1}function M0(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Uc(e){return!!(e&&typeof e=="object"&&"from"in e)}function F0(e){return!!(e&&typeof e=="object"&&"after"in e)}function B0(e){return!!(e&&typeof e=="object"&&"before"in e)}function lE(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function cE(e,t){return Array.isArray(e)&&e.every(t.isDate)}function _s(e,t,n=os){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:l}=n;return r.some(c=>{if(typeof c=="boolean")return c;if(n.isDate(c))return a(e,c);if(cE(c,n))return c.some(d=>a(e,d));if(Uc(c))return Ss(c,e,!1,n);if(lE(c))return Array.isArray(c.dayOfWeek)?c.dayOfWeek.includes(e.getDay()):c.dayOfWeek===e.getDay();if(M0(c)){const d=o(c.before,e),h=o(c.after,e),p=d>0,m=h<0;return l(c.before,c.after)?m&&p:p||m}return F0(c)?o(e,c.after)>0:B0(c)?o(c.before,e)>0:typeof c=="function"?c(e):!1})}function ek(e,t,n,r,a){const{disabled:o,hidden:l,modifiers:c,showOutsideDays:d,broadcastCalendar:h,today:p=a.today()}=t,{isSameDay:m,isSameMonth:x,startOfMonth:E,isBefore:_,endOfMonth:S,isAfter:w}=a,v=n&&E(n),C=r&&S(r),N={[jt.focused]:[],[jt.outside]:[],[jt.disabled]:[],[jt.hidden]:[],[jt.today]:[]},A={};for(const M of e){const{date:k,displayMonth:O}=M,I=!!(O&&!x(k,O)),P=!!(v&&_(k,v)),H=!!(C&&w(k,C)),F=!!(o&&_s(k,o,a)),Y=!!(l&&_s(k,l,a))||P||H||!h&&!d&&I||h&&d===!1&&I,G=m(k,p);I&&N.outside.push(M),F&&N.disabled.push(M),Y&&N.hidden.push(M),G&&N.today.push(M),c&&Object.keys(c).forEach(X=>{const K=c==null?void 0:c[X];K&&_s(k,K,a)&&(A[X]?A[X].push(M):A[X]=[M])})}return M=>{const k={[jt.focused]:!1,[jt.disabled]:!1,[jt.hidden]:!1,[jt.outside]:!1,[jt.today]:!1},O={};for(const I in N){const P=N[I];k[I]=P.some(H=>H===M)}for(const I in A)O[I]=A[I].some(P=>P===M);return{...k,...O}}}function tk(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[o])=>(n[o]?a.push(n[o]):t[jt[o]]?a.push(t[jt[o]]):t[Mr[o]]&&a.push(t[Mr[o]]),a),[t[Re.Day]])}function nk(e){return{...ZC,...e}}function rk(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function sk(){const e={};for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;for(const t in jt)e[jt[t]]=`rdp-${jt[t]}`;for(const t in Mr)e[Mr[t]]=`rdp-${Mr[t]}`;for(const t in ur)e[ur[t]]=`rdp-${ur[t]}`;return e}function dE(e,t,n){return(n??new cr(t)).formatMonthYear(e)}const ak=dE;function ik(e,t,n){return(n??new cr(t)).format(e,"d")}function ok(e,t=os){return t.format(e,"LLLL")}function uk(e,t,n){return(n??new cr(t)).format(e,"cccccc")}function lk(e,t=os){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function ck(){return""}function fE(e,t=os){return t.format(e,"yyyy")}const dk=fE,fk=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:dE,formatDay:ik,formatMonthCaption:ak,formatMonthDropdown:ok,formatWeekNumber:lk,formatWeekNumberHeader:ck,formatWeekdayName:uk,formatYearCaption:dk,formatYearDropdown:fE},Symbol.toStringTag,{value:"Module"}));function hk(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...fk,...e}}function j0(e,t,n,r){let a=(r??new cr(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}const pk=j0;function H0(e,t,n){return(n??new cr(t)).formatMonthYear(e)}const mk=H0;function hE(e,t,n,r){let a=(r??new cr(n)).format(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a}function pE(e){return"Choose the Month"}function mE(){return""}const gk="Go to the Next Month";function gE(e,t){return gk}function yE(e){return"Go to the Previous Month"}function bE(e,t,n){return(n??new cr(t)).format(e,"cccc")}function EE(e,t){return`Week ${e}`}function xE(e){return"Week Number"}function TE(e){return"Choose the Year"}const yk=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:mk,labelDay:pk,labelDayButton:j0,labelGrid:H0,labelGridcell:hE,labelMonthDropdown:pE,labelNav:mE,labelNext:gE,labelPrevious:yE,labelWeekNumber:EE,labelWeekNumberHeader:xE,labelWeekday:bE,labelYearDropdown:TE},Symbol.toStringTag,{value:"Module"})),Ir=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function bk(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...yk,...e??{},labelDayButton:Ir(j0,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:Ir(pE,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:Ir(gE,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:Ir(yE,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:Ir(EE,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Ir(TE,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:Ir(H0,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:Ir(hE,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:Ir(mE,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:Ir(xE,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Ir(bE,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function Ek(e,t,n,r,a){const{startOfMonth:o,startOfYear:l,endOfYear:c,eachMonthOfInterval:d,getMonth:h}=a;return d({start:l(e),end:c(e)}).map(x=>{const E=r.formatMonthDropdown(x,a),_=h(x),S=t&&x<o(t)||n&&x>o(n)||!1;return{value:_,label:E,disabled:S}})}function xk(e,t={},n={}){let r={...t==null?void 0:t[Re.Day]};return Object.entries(e).filter(([,a])=>a===!0).forEach(([a])=>{r={...r,...n==null?void 0:n[a]}}),r}function Tk(e,t,n,r){const a=r??e.today(),o=n?e.startOfBroadcastWeek(a,e):t?e.startOfISOWeek(a):e.startOfWeek(a),l=[];for(let c=0;c<7;c++){const d=e.addDays(o,c);l.push(d)}return l}function vk(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:o,endOfYear:l,eachYearOfInterval:c,getYear:d}=r,h=o(e),p=l(t),m=c({start:h,end:p});return a&&m.reverse(),m.map(x=>{const E=n.formatYearDropdown(x,r);return{value:d(x),label:E,disabled:!1}})}function wk(e,t={}){var c;const{weekStartsOn:n,locale:r}=t,a=n??((c=r==null?void 0:r.options)==null?void 0:c.weekStartsOn)??0,o=d=>{const h=typeof d=="number"||typeof d=="string"?new Date(d):d;return new Rn(h.getFullYear(),h.getMonth(),h.getDate(),12,0,0,e)},l=d=>{const h=o(d);return new Date(h.getFullYear(),h.getMonth(),h.getDate(),0,0,0,0)};return{today:()=>o(Rn.tz(e)),newDate:(d,h,p)=>new Rn(d,h,p,12,0,0,e),startOfDay:d=>o(d),startOfWeek:(d,h)=>{const p=o(d),m=(h==null?void 0:h.weekStartsOn)??a,x=(p.getDay()-m+7)%7;return p.setDate(p.getDate()-x),p},startOfISOWeek:d=>{const h=o(d),p=(h.getDay()-1+7)%7;return h.setDate(h.getDate()-p),h},startOfMonth:d=>{const h=o(d);return h.setDate(1),h},startOfYear:d=>{const h=o(d);return h.setMonth(0,1),h},endOfWeek:(d,h)=>{const p=o(d),E=((((h==null?void 0:h.weekStartsOn)??a)+6)%7-p.getDay()+7)%7;return p.setDate(p.getDate()+E),p},endOfISOWeek:d=>{const h=o(d),p=(7-h.getDay())%7;return h.setDate(h.getDate()+p),h},endOfMonth:d=>{const h=o(d);return h.setMonth(h.getMonth()+1,0),h},endOfYear:d=>{const h=o(d);return h.setMonth(11,31),h},eachMonthOfInterval:d=>{const h=o(d.start),p=o(d.end),m=[],x=new Rn(h.getFullYear(),h.getMonth(),1,12,0,0,e),E=p.getFullYear()*12+p.getMonth();for(;x.getFullYear()*12+x.getMonth()<=E;)m.push(new Rn(x,e)),x.setMonth(x.getMonth()+1,1);return m},addDays:(d,h)=>{const p=o(d);return p.setDate(p.getDate()+h),p},addWeeks:(d,h)=>{const p=o(d);return p.setDate(p.getDate()+h*7),p},addMonths:(d,h)=>{const p=o(d);return p.setMonth(p.getMonth()+h),p},addYears:(d,h)=>{const p=o(d);return p.setFullYear(p.getFullYear()+h),p},eachYearOfInterval:d=>{const h=o(d.start),p=o(d.end),m=[],x=new Rn(h.getFullYear(),0,1,12,0,0,e);for(;x.getFullYear()<=p.getFullYear();)m.push(new Rn(x,e)),x.setFullYear(x.getFullYear()+1,0,1);return m},getWeek:(d,h)=>{var m;const p=l(d);return Hc(p,{weekStartsOn:(h==null?void 0:h.weekStartsOn)??a,firstWeekContainsDate:(h==null?void 0:h.firstWeekContainsDate)??((m=r==null?void 0:r.options)==null?void 0:m.firstWeekContainsDate)??1})},getISOWeek:d=>{const h=l(d);return jc(h)},differenceInCalendarDays:(d,h)=>{const p=l(d),m=l(h);return N0(p,m)},differenceInCalendarMonths:(d,h)=>{const p=l(d),m=l(h);return $b(p,m)}}}const qu=e=>e instanceof HTMLElement?e:null,eh=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Sk=e=>qu(e.querySelector("[data-animated-month]")),th=e=>qu(e.querySelector("[data-animated-caption]")),nh=e=>qu(e.querySelector("[data-animated-weeks]")),_k=e=>qu(e.querySelector("[data-animated-nav]")),Ck=e=>qu(e.querySelector("[data-animated-weekdays]"));function kk(e,t,{classNames:n,months:r,focused:a,dateLib:o}){const l=L.useRef(null),c=L.useRef(r),d=L.useRef(!1);L.useLayoutEffect(()=>{const h=c.current;if(c.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||h.length===0||r.length!==h.length)return;const p=o.isSameMonth(r[0].date,h[0].date),m=o.isAfter(r[0].date,h[0].date),x=m?n[ur.caption_after_enter]:n[ur.caption_before_enter],E=m?n[ur.weeks_after_enter]:n[ur.weeks_before_enter],_=l.current,S=e.current.cloneNode(!0);if(S instanceof HTMLElement?(eh(S).forEach(N=>{if(!(N instanceof HTMLElement))return;const A=Sk(N);A&&N.contains(A)&&N.removeChild(A);const M=th(N);M&&M.classList.remove(x);const k=nh(N);k&&k.classList.remove(E)}),l.current=S):l.current=null,d.current||p||a)return;const w=_ instanceof HTMLElement?eh(_):[],v=eh(e.current);if(v!=null&&v.every(C=>C instanceof HTMLElement)&&w&&w.every(C=>C instanceof HTMLElement)){d.current=!0,e.current.style.isolation="isolate";const C=_k(e.current);C&&(C.style.zIndex="1"),v.forEach((N,A)=>{const M=w[A];if(!M)return;N.style.position="relative",N.style.overflow="hidden";const k=th(N);k&&k.classList.add(x);const O=nh(N);O&&O.classList.add(E);const I=()=>{d.current=!1,e.current&&(e.current.style.isolation=""),C&&(C.style.zIndex=""),k&&k.classList.remove(x),O&&O.classList.remove(E),N.style.position="",N.style.overflow="",N.contains(M)&&N.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const P=Ck(M);P&&(P.style.opacity="0");const H=th(M);H&&(H.classList.add(m?n[ur.caption_before_exit]:n[ur.caption_after_exit]),H.addEventListener("animationend",I));const F=nh(M);F&&F.classList.add(m?n[ur.weeks_before_exit]:n[ur.weeks_after_exit]),N.insertBefore(M,N.firstChild)})}})}function Nk(e,t,n,r){const a=e[0],o=e[e.length-1],{ISOWeek:l,fixedWeeks:c,broadcastCalendar:d}=n??{},{addDays:h,differenceInCalendarDays:p,differenceInCalendarMonths:m,endOfBroadcastWeek:x,endOfISOWeek:E,endOfMonth:_,endOfWeek:S,isAfter:w,startOfBroadcastWeek:v,startOfISOWeek:C,startOfWeek:N}=r,A=d?v(a,r):l?C(a):N(a),M=d?x(o):l?E(_(o)):S(_(o)),k=t&&(d?x(t):l?E(t):S(t)),O=k&&w(M,k)?k:M,I=p(O,A),P=m(o,a)+1,H=[];for(let G=0;G<=I;G++){const X=h(A,G);H.push(X)}const Y=(d?35:42)*P;if(c&&H.length<Y){const G=Y-H.length;for(let X=0;X<G;X++){const K=h(H[H.length-1],1);H.push(K)}}return H}function Ok(e){const t=[];return e.reduce((n,r)=>{const a=r.weeks.reduce((o,l)=>o.concat(l.days.slice()),t.slice());return n.concat(a.slice())},t.slice())}function Dk(e,t,n,r){const{numberOfMonths:a=1}=n,o=[];for(let l=0;l<a;l++){const c=r.addMonths(e,l);if(t&&c>t)break;o.push(c)}return o}function v1(e,t,n,r){const{month:a,defaultMonth:o,today:l=r.today(),numberOfMonths:c=1}=e;let d=a||o||l;const{differenceInCalendarMonths:h,addMonths:p,startOfMonth:m}=r;if(n&&h(n,d)<c-1){const x=-1*(c-1);d=p(n,x)}return t&&h(d,t)<0&&(d=t),m(d)}function Ak(e,t,n,r){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:l,endOfMonth:c,endOfWeek:d,getISOWeek:h,getWeek:p,startOfBroadcastWeek:m,startOfISOWeek:x,startOfWeek:E}=r,_=e.reduce((S,w)=>{const v=n.broadcastCalendar?m(w,r):n.ISOWeek?x(w):E(w),C=n.broadcastCalendar?o(w):n.ISOWeek?l(c(w)):d(c(w)),N=t.filter(O=>O>=v&&O<=C),A=n.broadcastCalendar?35:42;if(n.fixedWeeks&&N.length<A){const O=t.filter(I=>{const P=A-N.length;return I>C&&I<=a(C,P)});N.push(...O)}const M=N.reduce((O,I)=>{const P=n.ISOWeek?h(I):p(I),H=O.find(Y=>Y.weekNumber===P),F=new oE(I,w,r);return H?H.days.push(F):O.push(new CC(P,[F])),O},[]),k=new _C(w,M);return S.push(k),S},[]);return n.reverseMonths?_.reverse():_}function Ik(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:a,startOfDay:o,startOfMonth:l,endOfMonth:c,addYears:d,endOfYear:h,newDate:p,today:m}=t,{fromYear:x,toYear:E,fromMonth:_,toMonth:S}=e;!n&&_&&(n=_),!n&&x&&(n=t.newDate(x,0,1)),!r&&S&&(r=S),!r&&E&&(r=p(E,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=l(n):x?n=p(x,0,1):!n&&w&&(n=a(d(e.today??m(),-100))),r?r=c(r):E?r=p(E,11,31):!r&&w&&(r=h(e.today??m())),[n&&o(n),r&&o(r)]}function Rk(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=n,{startOfMonth:l,addMonths:c,differenceInCalendarMonths:d}=r,h=a?o:1,p=l(e);if(!t)return c(p,h);if(!(d(t,e)<o))return c(p,h)}function Lk(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=n,{startOfMonth:l,addMonths:c,differenceInCalendarMonths:d}=r,h=a?o??1:1,p=l(e);if(!t)return c(p,-h);if(!(d(p,t)<=0))return c(p,-h)}function Pk(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function zc(e,t){const[n,r]=L.useState(e);return[t===void 0?n:t,r]}function Mk(e,t){var A;const[n,r]=Ik(e,t),{startOfMonth:a,endOfMonth:o}=t,l=v1(e,n,r,t),[c,d]=zc(l,e.month?l:void 0);L.useEffect(()=>{const M=v1(e,n,r,t);d(M)},[e.timeZone]);const{months:h,weeks:p,days:m,previousMonth:x,nextMonth:E}=L.useMemo(()=>{const M=Dk(c,r,{numberOfMonths:e.numberOfMonths},t),k=Nk(M,e.endMonth?o(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),O=Ak(M,k,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),I=Pk(O),P=Ok(O),H=Lk(c,n,e,t),F=Rk(c,r,e,t);return{months:O,weeks:I,days:P,previousMonth:H,nextMonth:F}},[t,c.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(A=e.endMonth)==null?void 0:A.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:_,onMonthChange:S}=e,w=M=>p.some(k=>k.days.some(O=>O.isEqualTo(M))),v=M=>{if(_)return;let k=a(M);n&&k<a(n)&&(k=a(n)),r&&k>a(r)&&(k=a(r)),d(k),S==null||S(k)};return{months:h,weeks:p,days:m,navStart:n,navEnd:r,previousMonth:x,nextMonth:E,goToMonth:v,goToDay:M=>{w(M)||v(M.date)}}}var Qr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Qr||(Qr={}));function w1(e){return!e[jt.disabled]&&!e[jt.hidden]&&!e[jt.outside]}function Fk(e,t,n,r){let a,o=-1;for(const l of e){const c=t(l);w1(c)&&(c[jt.focused]&&o<Qr.FocusedModifier?(a=l,o=Qr.FocusedModifier):r!=null&&r.isEqualTo(l)&&o<Qr.LastFocused?(a=l,o=Qr.LastFocused):n(l.date)&&o<Qr.Selected?(a=l,o=Qr.Selected):c[jt.today]&&o<Qr.Today&&(a=l,o=Qr.Today))}return a||(a=e.find(l=>w1(t(l)))),a}function Bk(e,t,n,r,a,o,l){const{ISOWeek:c,broadcastCalendar:d}=o,{addDays:h,addMonths:p,addWeeks:m,addYears:x,endOfBroadcastWeek:E,endOfISOWeek:_,endOfWeek:S,max:w,min:v,startOfBroadcastWeek:C,startOfISOWeek:N,startOfWeek:A}=l;let k={day:h,week:m,month:p,year:x,startOfWeek:O=>d?C(O,l):c?N(O):A(O),endOfWeek:O=>d?E(O):c?_(O):S(O)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=w([r,k]):t==="after"&&a&&(k=v([a,k])),k}function vE(e,t,n,r,a,o,l,c=0){if(c>365)return;const d=Bk(e,t,n.date,r,a,o,l),h=!!(o.disabled&&_s(d,o.disabled,l)),p=!!(o.hidden&&_s(d,o.hidden,l)),m=d,x=new oE(d,m,l);return!h&&!p?x:vE(e,t,x,r,a,o,l,c+1)}function jk(e,t,n,r,a){const{autoFocus:o}=e,[l,c]=L.useState(),d=Fk(t.days,n,r||(()=>!1),l),[h,p]=L.useState(o?d:void 0);return{isFocusTarget:S=>!!(d!=null&&d.isEqualTo(S)),setFocused:p,focused:h,blur:()=>{c(h),p(void 0)},moveFocus:(S,w)=>{if(!h)return;const v=vE(S,w,h,t.navStart,t.navEnd,e,a);v&&(e.disableNavigation&&!t.days.some(N=>N.isEqualTo(v))||(t.goToDay(v),p(v)))}}}function Hk(e,t){const{selected:n,required:r,onSelect:a}=e,[o,l]=zc(n,a?n:void 0),c=a?n:o,{isSameDay:d}=t,h=E=>(c==null?void 0:c.some(_=>d(_,E)))??!1,{min:p,max:m}=e;return{selected:c,select:(E,_,S)=>{let w=[...c??[]];if(h(E)){if((c==null?void 0:c.length)===p||r&&(c==null?void 0:c.length)===1)return;w=c==null?void 0:c.filter(v=>!d(v,E))}else(c==null?void 0:c.length)===m?w=[E]:w=[...w,E];return a||l(w),a==null||a(w,E,_,S),w},isSelected:h}}function Uk(e,t,n=0,r=0,a=!1,o=os){const{from:l,to:c}=t||{},{isSameDay:d,isAfter:h,isBefore:p}=o;let m;if(!l&&!c)m={from:e,to:n>0?void 0:e};else if(l&&!c)d(l,e)?n===0?m={from:l,to:e}:a?m={from:l,to:void 0}:m=void 0:p(e,l)?m={from:e,to:l}:m={from:l,to:e};else if(l&&c)if(d(l,e)&&d(c,e))a?m={from:l,to:c}:m=void 0;else if(d(l,e))m={from:l,to:n>0?void 0:e};else if(d(c,e))m={from:e,to:n>0?void 0:e};else if(p(e,l))m={from:e,to:c};else if(h(e,l))m={from:l,to:e};else if(h(e,c))m={from:l,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const x=o.differenceInCalendarDays(m.to,m.from);r>0&&x>r?m={from:e,to:void 0}:n>1&&x<n&&(m={from:e,to:void 0})}return m}function zk(e,t,n=os){const r=Array.isArray(t)?t:[t];let a=e.from;const o=n.differenceInCalendarDays(e.to,e.from),l=Math.min(o,6);for(let c=0;c<=l;c++){if(r.includes(a.getDay()))return!0;a=n.addDays(a,1)}return!1}function S1(e,t,n=os){return Ss(e,t.from,!1,n)||Ss(e,t.to,!1,n)||Ss(t,e.from,!1,n)||Ss(t,e.to,!1,n)}function Wk(e,t,n=os){const r=Array.isArray(t)?t:[t];if(r.filter(c=>typeof c!="function").some(c=>typeof c=="boolean"?c:n.isDate(c)?Ss(e,c,!1,n):cE(c,n)?c.some(d=>Ss(e,d,!1,n)):Uc(c)?c.from&&c.to?S1(e,{from:c.from,to:c.to},n):!1:lE(c)?zk(e,c.dayOfWeek,n):M0(c)?n.isAfter(c.before,c.after)?S1(e,{from:n.addDays(c.after,1),to:n.addDays(c.before,-1)},n):_s(e.from,c,n)||_s(e.to,c,n):F0(c)||B0(c)?_s(e.from,c,n)||_s(e.to,c,n):!1))return!0;const l=r.filter(c=>typeof c=="function");if(l.length){let c=e.from;const d=n.differenceInCalendarDays(e.to,e.from);for(let h=0;h<=d;h++){if(l.some(p=>p(c)))return!0;c=n.addDays(c,1)}}return!1}function Yk(e,t){const{disabled:n,excludeDisabled:r,selected:a,required:o,onSelect:l}=e,[c,d]=zc(a,l?a:void 0),h=l?a:c;return{selected:h,select:(x,E,_)=>{const{min:S,max:w}=e,v=x?Uk(x,h,S,w,o,t):void 0;return r&&n&&(v!=null&&v.from)&&v.to&&Wk({from:v.from,to:v.to},n,t)&&(v.from=x,v.to=void 0),l||d(v),l==null||l(v,x,E,_),v},isSelected:x=>h&&Ss(h,x,!1,t)}}function qk(e,t){const{selected:n,required:r,onSelect:a}=e,[o,l]=zc(n,a?n:void 0),c=a?n:o,{isSameDay:d}=t;return{selected:c,select:(m,x,E)=>{let _=m;return!r&&c&&c&&d(m,c)&&(_=void 0),a||l(_),a==null||a(_,m,x,E),_},isSelected:m=>c?d(c,m):!1}}function $k(e,t){const n=qk(e,t),r=Hk(e,t),a=Yk(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return a;default:return}}function br(e,t){return e instanceof Rn&&e.timeZone===t?e:new Rn(e,t)}function Ii(e,t,n){return br(e,t)}function _1(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Ii(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Ii(r,t):r):Uc(e)?{...e,from:e.from?br(e.from,t):e.from,to:e.to?br(e.to,t):e.to}:M0(e)?{before:Ii(e.before,t),after:Ii(e.after,t)}:F0(e)?{after:Ii(e.after,t)}:B0(e)?{before:Ii(e.before,t)}:e}function rh(e,t,n){return e&&(Array.isArray(e)?e.map(r=>_1(r,t)):_1(e,t))}function C1(e){var Sr;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=br(t.today,n)),t.month&&(t.month=br(t.month,n)),t.defaultMonth&&(t.defaultMonth=br(t.defaultMonth,n)),t.startMonth&&(t.startMonth=br(t.startMonth,n)),t.endMonth&&(t.endMonth=br(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=br(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(Sr=t.selected)==null?void 0:Sr.map(Le=>br(Le,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?br(t.selected.from,n):t.selected.from,to:t.selected.to?br(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=rh(t.disabled,n)),t.hidden!==void 0&&(t.hidden=rh(t.hidden,n)),t.modifiers)){const Le={};Object.keys(t.modifiers).forEach($e=>{var be;Le[$e]=rh((be=t.modifiers)==null?void 0:be[$e],n)}),t.modifiers=Le}const{components:r,formatters:a,labels:o,dateLib:l,locale:c,classNames:d}=L.useMemo(()=>{const Le={...iE,...t.locale},$e=t.broadcastCalendar?1:t.weekStartsOn,be=t.noonSafe&&t.timeZone?wk(t.timeZone,{weekStartsOn:$e,locale:Le}):void 0,Se=t.dateLib&&be?{...be,...t.dateLib}:t.dateLib??be,Ge=new cr({locale:Le,weekStartsOn:$e,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},Se);return{dateLib:Ge,components:nk(t.components),formatters:hk(t.formatters),labels:bk(t.labels,Ge.options),locale:Le,classNames:{...sk(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:l.today()});const{captionLayout:h,mode:p,navLayout:m,numberOfMonths:x=1,onDayBlur:E,onDayClick:_,onDayFocus:S,onDayKeyDown:w,onDayMouseEnter:v,onDayMouseLeave:C,onNextClick:N,onPrevClick:A,showWeekNumber:M,styles:k}=t,{formatCaption:O,formatDay:I,formatMonthDropdown:P,formatWeekNumber:H,formatWeekNumberHeader:F,formatWeekdayName:Y,formatYearDropdown:G}=a,X=Mk(t,l),{days:K,months:$,navStart:se,navEnd:J,previousMonth:te,nextMonth:R,goToMonth:ie}=X,he=ek(K,t,se,J,l),{isSelected:U,select:Ie,selected:ze}=$k(t,l)??{},{blur:Ae,focused:ct,isFocusTarget:tt,moveFocus:Ke,setFocused:st}=jk(t,X,he,U??(()=>!1),l),{labelDayButton:Je,labelGridcell:pn,labelGrid:Gt,labelMonthDropdown:jn,labelNav:tn,labelPrevious:nn,labelNext:mn,labelWeekday:er,labelWeekNumber:at,labelWeekNumberHeader:Ze,labelYearDropdown:Et}=o,Nt=L.useMemo(()=>Tk(l,t.ISOWeek,t.broadcastCalendar,t.today),[l,t.ISOWeek,t.broadcastCalendar,t.today]),on=p!==void 0||_!==void 0,tr=L.useCallback(()=>{te&&(ie(te),A==null||A(te))},[te,ie,A]),un=L.useCallback(()=>{R&&(ie(R),N==null||N(R))},[ie,R,N]),oe=L.useCallback((Le,$e)=>be=>{be.preventDefault(),be.stopPropagation(),st(Le),!$e.disabled&&(Ie==null||Ie(Le.date,$e,be),_==null||_(Le.date,$e,be))},[Ie,_,st]),pe=L.useCallback((Le,$e)=>be=>{st(Le),S==null||S(Le.date,$e,be)},[S,st]),Ne=L.useCallback((Le,$e)=>be=>{Ae(),E==null||E(Le.date,$e,be)},[Ae,E]),je=L.useCallback((Le,$e)=>be=>{const Se={ArrowLeft:[be.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[be.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[be.shiftKey?"year":"week","after"],ArrowUp:[be.shiftKey?"year":"week","before"],PageUp:[be.shiftKey?"year":"month","before"],PageDown:[be.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Se[be.key]){be.preventDefault(),be.stopPropagation();const[Ge,_e]=Se[be.key];Ke(Ge,_e)}w==null||w(Le.date,$e,be)},[Ke,w,t.dir]),qe=L.useCallback((Le,$e)=>be=>{v==null||v(Le.date,$e,be)},[v]),gt=L.useCallback((Le,$e)=>be=>{C==null||C(Le.date,$e,be)},[C]),zt=L.useCallback(Le=>$e=>{const be=Number($e.target.value),Se=l.setMonth(l.startOfMonth(Le),be);ie(Se)},[l,ie]),rn=L.useCallback(Le=>$e=>{const be=Number($e.target.value),Se=l.setYear(l.startOfMonth(Le),be);ie(Se)},[l,ie]),{className:_n,style:Hn}=L.useMemo(()=>({className:[d[Re.Root],t.className].filter(Boolean).join(" "),style:{...k==null?void 0:k[Re.Root],...t.style}}),[d,t.className,t.style,k]),At=rk(t),yt=L.useRef(null);kk(yt,!!t.animate,{classNames:d,months:$,focused:ct,dateLib:l});const ln={dayPickerProps:t,selected:ze,select:Ie,isSelected:U,months:$,nextMonth:R,previousMonth:te,goToMonth:ie,getModifiers:he,components:r,classNames:d,styles:k,labels:o,formatters:a};return Ee.createElement(uE.Provider,{value:ln},Ee.createElement(r.Root,{rootRef:t.animate?yt:void 0,className:_n,style:Hn,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...At},Ee.createElement(r.Months,{className:d[Re.Months],style:k==null?void 0:k[Re.Months]},!t.hideNavigation&&!m&&Ee.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:d[Re.Nav],style:k==null?void 0:k[Re.Nav],"aria-label":tn(),onPreviousClick:tr,onNextClick:un,previousMonth:te,nextMonth:R}),$.map((Le,$e)=>Ee.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:d[Re.Month],style:k==null?void 0:k[Re.Month],key:$e,displayIndex:$e,calendarMonth:Le},m==="around"&&!t.hideNavigation&&$e===0&&Ee.createElement(r.PreviousMonthButton,{type:"button",className:d[Re.PreviousMonthButton],tabIndex:te?void 0:-1,"aria-disabled":te?void 0:!0,"aria-label":nn(te),onClick:tr,"data-animated-button":t.animate?"true":void 0},Ee.createElement(r.Chevron,{disabled:te?void 0:!0,className:d[Re.Chevron],orientation:t.dir==="rtl"?"right":"left"})),Ee.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:d[Re.MonthCaption],style:k==null?void 0:k[Re.MonthCaption],calendarMonth:Le,displayIndex:$e},h!=null&&h.startsWith("dropdown")?Ee.createElement(r.DropdownNav,{className:d[Re.Dropdowns],style:k==null?void 0:k[Re.Dropdowns]},(()=>{const be=h==="dropdown"||h==="dropdown-months"?Ee.createElement(r.MonthsDropdown,{key:"month",className:d[Re.MonthsDropdown],"aria-label":jn(),classNames:d,components:r,disabled:!!t.disableNavigation,onChange:zt(Le.date),options:Ek(Le.date,se,J,a,l),style:k==null?void 0:k[Re.Dropdown],value:l.getMonth(Le.date)}):Ee.createElement("span",{key:"month"},P(Le.date,l)),Se=h==="dropdown"||h==="dropdown-years"?Ee.createElement(r.YearsDropdown,{key:"year",className:d[Re.YearsDropdown],"aria-label":Et(l.options),classNames:d,components:r,disabled:!!t.disableNavigation,onChange:rn(Le.date),options:vk(se,J,a,l,!!t.reverseYears),style:k==null?void 0:k[Re.Dropdown],value:l.getYear(Le.date)}):Ee.createElement("span",{key:"year"},G(Le.date,l));return l.getMonthYearOrder()==="year-first"?[Se,be]:[be,Se]})(),Ee.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},O(Le.date,l.options,l))):Ee.createElement(r.CaptionLabel,{className:d[Re.CaptionLabel],role:"status","aria-live":"polite"},O(Le.date,l.options,l))),m==="around"&&!t.hideNavigation&&$e===x-1&&Ee.createElement(r.NextMonthButton,{type:"button",className:d[Re.NextMonthButton],tabIndex:R?void 0:-1,"aria-disabled":R?void 0:!0,"aria-label":mn(R),onClick:un,"data-animated-button":t.animate?"true":void 0},Ee.createElement(r.Chevron,{disabled:R?void 0:!0,className:d[Re.Chevron],orientation:t.dir==="rtl"?"left":"right"})),$e===x-1&&m==="after"&&!t.hideNavigation&&Ee.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:d[Re.Nav],style:k==null?void 0:k[Re.Nav],"aria-label":tn(),onPreviousClick:tr,onNextClick:un,previousMonth:te,nextMonth:R}),Ee.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Gt(Le.date,l.options,l)||void 0,className:d[Re.MonthGrid],style:k==null?void 0:k[Re.MonthGrid]},!t.hideWeekdays&&Ee.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:d[Re.Weekdays],style:k==null?void 0:k[Re.Weekdays]},M&&Ee.createElement(r.WeekNumberHeader,{"aria-label":Ze(l.options),className:d[Re.WeekNumberHeader],style:k==null?void 0:k[Re.WeekNumberHeader],scope:"col"},F()),Nt.map(be=>Ee.createElement(r.Weekday,{"aria-label":er(be,l.options,l),className:d[Re.Weekday],key:String(be),style:k==null?void 0:k[Re.Weekday],scope:"col"},Y(be,l.options,l)))),Ee.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:d[Re.Weeks],style:k==null?void 0:k[Re.Weeks]},Le.weeks.map(be=>Ee.createElement(r.Week,{className:d[Re.Week],key:be.weekNumber,style:k==null?void 0:k[Re.Week],week:be},M&&Ee.createElement(r.WeekNumber,{week:be,style:k==null?void 0:k[Re.WeekNumber],"aria-label":at(be.weekNumber,{locale:c}),className:d[Re.WeekNumber],scope:"row",role:"rowheader"},H(be.weekNumber,l)),be.days.map(Se=>{const{date:Ge}=Se,_e=he(Se);if(_e[jt.focused]=!_e.hidden&&!!(ct!=null&&ct.isEqualTo(Se)),_e[Mr.selected]=(U==null?void 0:U(Ge))||_e.selected,Uc(ze)){const{from:Rt,to:qt}=ze;_e[Mr.range_start]=!!(Rt&&qt&&l.isSameDay(Ge,Rt)),_e[Mr.range_end]=!!(Rt&&qt&&l.isSameDay(Ge,qt)),_e[Mr.range_middle]=Ss(ze,Ge,!0,l)}const It=xk(_e,k,t.modifiersStyles),Wt=tk(_e,d,t.modifiersClassNames),Yt=!on&&!_e.hidden?pn(Ge,_e,l.options,l):void 0;return Ee.createElement(r.Day,{key:`${Se.isoDate}_${Se.displayMonthId}`,day:Se,modifiers:_e,className:Wt.join(" "),style:It,role:"gridcell","aria-selected":_e.selected||void 0,"aria-label":Yt,"data-day":Se.isoDate,"data-month":Se.outside?Se.dateMonthId:void 0,"data-selected":_e.selected||void 0,"data-disabled":_e.disabled||void 0,"data-hidden":_e.hidden||void 0,"data-outside":Se.outside||void 0,"data-focused":_e.focused||void 0,"data-today":_e.today||void 0},!_e.hidden&&on?Ee.createElement(r.DayButton,{className:d[Re.DayButton],style:k==null?void 0:k[Re.DayButton],type:"button",day:Se,modifiers:_e,disabled:!_e.focused&&_e.disabled||void 0,"aria-disabled":_e.focused&&_e.disabled||void 0,tabIndex:tt(Se)?0:-1,"aria-label":Je(Ge,_e,l.options,l),onClick:oe(Se,_e),onBlur:Ne(Se,_e),onFocus:pe(Se,_e),onKeyDown:je(Se,_e),onMouseEnter:qe(Se,_e),onMouseLeave:gt(Se,_e)},I(Ge,l.options,l)):!_e.hidden&&I(Se.date,l.options,l))})))))))),t.footer&&Ee.createElement(r.Footer,{className:d[Re.Footer],style:k==null?void 0:k[Re.Footer],role:"status","aria-live":"polite"},t.footer)))}function uo({trigger:e,children:t,isOpen:n,onOpenChange:r,width:a=340}){const[o,l]=L.useState(!1),c=L.useRef(null),d=L.useRef(null),h=n!==void 0?n:o,p=L.useCallback(x=>{r?r(x):l(x)},[r]),m=L.useCallback(()=>p(!1),[p]);return L.useEffect(()=>{if(!h)return;function x(E){const _=E.target;c.current&&!c.current.contains(_)&&d.current&&!d.current.contains(_)&&m()}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[h,m]),L.useEffect(()=>{if(!h)return;function x(E){E.key==="Escape"&&m()}return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[h,m]),g.jsxs("div",{className:"relative",style:{display:"inline-flex"},children:[g.jsx("div",{ref:d,onClick:()=>p(!h),children:e}),h&&g.jsx("div",{ref:c,className:"absolute top-full left-0 mt-1 bg-white rounded-lg shadow-lg border z-50",style:{borderColor:"var(--yc-color-border, #e5e7eb)",width:a},children:t})]})}function lo(){const[e,t]=L.useState(!1);return{isOpen:e,open:()=>t(!0),close:()=>t(!1),toggle:()=>t(n=>!n),onOpenChange:t}}function co({label:e,value:t,active:n,icon:r,onClick:a}){return g.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-1.5 border rounded-full px-3 py-1.5 text-sm cursor-pointer transition-colors hover:border-blue-300",style:{borderColor:n?"#93c5fd":"var(--yc-color-border, #e5e7eb)",backgroundColor:n?"#eff6ff":"white"},children:[r&&g.jsx("span",{className:"flex-shrink-0 text-gray-400",children:r}),t?g.jsx("span",{style:{color:n?"#2563eb":"var(--yc-color-text, #111)"},className:"font-medium",children:t}):g.jsx("span",{className:"text-gray-500",children:e}),g.jsx("svg",{className:"w-3 h-3 text-gray-400 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}function si({title:e,onBack:t}){return g.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:[t&&g.jsx("button",{type:"button",onClick:t,className:"flex items-center justify-center w-6 h-6 rounded hover:bg-gray-100 text-gray-500",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),g.jsx("span",{className:"text-sm font-medium",style:{color:"var(--yc-color-text, #111)"},children:e})]})}const wE=[{value:"today",label:"Today"},{value:"yesterday",label:"Yesterday"},{value:"last_7_days",label:"Previous 7 days"},{value:"last_30_days",label:"Previous 30 days"},{value:"last_90_days",label:"Previous 90 days"},{divider:!0},{value:"previous_month",label:"Previous month"},{value:"previous_quarter",label:"Previous quarter"},{value:"previous_year",label:"Previous year"},{divider:!0},{value:"month_to_date",label:"Month to date"},{value:"quarter_to_date",label:"Quarter to date"},{value:"year_to_date",label:"Year to date"},{value:"last_12_months",label:"Last 12 months"}],Vk=`
|
|
34
|
+
.rdp-root {
|
|
35
|
+
--rdp-accent-color: #2563eb;
|
|
36
|
+
--rdp-accent-background-color: #dbeafe;
|
|
37
|
+
--rdp-range_start-color: white;
|
|
38
|
+
--rdp-range_start-background: #2563eb;
|
|
39
|
+
--rdp-range_end-color: white;
|
|
40
|
+
--rdp-range_end-background: #2563eb;
|
|
41
|
+
--rdp-range_middle-background: #dbeafe;
|
|
42
|
+
--rdp-range_middle-color: #1e40af;
|
|
43
|
+
}
|
|
44
|
+
.rdp-day { border-radius: 6px; }
|
|
45
|
+
.rdp-selected .rdp-day_button { font-weight: 600; }
|
|
46
|
+
.rdp-range_start .rdp-day_button,
|
|
47
|
+
.rdp-range_end .rdp-day_button {
|
|
48
|
+
background-color: #2563eb !important;
|
|
49
|
+
color: white !important;
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
}
|
|
52
|
+
.rdp-range_middle .rdp-day_button {
|
|
53
|
+
background-color: #dbeafe !important;
|
|
54
|
+
color: #1e40af !important;
|
|
55
|
+
}
|
|
56
|
+
.rdp-today .rdp-day_button {
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
border: 2px solid #2563eb;
|
|
59
|
+
}
|
|
60
|
+
.rdp-day_button:hover { background-color: #e5e7eb !important; }
|
|
61
|
+
.rdp-range_start .rdp-day_button:hover,
|
|
62
|
+
.rdp-range_end .rdp-day_button:hover {
|
|
63
|
+
background-color: #1d4ed8 !important;
|
|
64
|
+
}
|
|
65
|
+
`;function Gh(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="custom"}function SE(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type==="relative"}function _E(e){const n=to(new Date);if(e.direction==="current")switch(e.unit){case"day":return{start:n,end:eS(n)};case"week":return{start:ss(n,{weekStartsOn:1}),end:I0(n,{weekStartsOn:1})};case"month":return{start:Gb(n),end:Vb(n)};case"quarter":return{start:nS(n),end:aS(n)};case"year":return{start:A0(n),end:Xb(n)}}const r=e.value??1,a=e.direction==="previous",l=(a?{day:x1,week:xC,month:bC,quarter:EC,year:TC}:{day:Ja,week:O0,month:Wu,quarter:Yb,year:D0})[e.unit];if(a){const c=e.includeToday?n:x1(n,1),d=l((e.includeToday,n),r);return{start:d<c?d:c,end:d<c?c:d}}else{const c=e.includeToday?n:Ja(n,1),d=l(c,r);return{start:c<d?c:d,end:c<d?d:c}}}function Qk(e){if(Gh(e))return`${e.start} to ${e.end}`;if(SE(e)){const t=_E(e);return`${hn(t.start,"MMM d")} – ${hn(t.end,"MMM d, yyyy")}`}if(typeof e=="string"){const t=wE.find(r=>"value"in r&&r.value===e);return t&&"label"in t?t.label:{last_7_days:"Previous 7 days",last_30_days:"Previous 30 days",last_90_days:"Previous 90 days",last_12_months:"Last 12 months"}[e]||e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}return String(e)}const Gk=g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})});function CE({name:e,label:t="Date",chartName:n,defaultValue:r="last_30_days"}){var E;const a=lo(),o=Ye(_=>_.globalFilters),l=Ye(_=>_.chartFilters),c=Ye(_=>_.setGlobalFilter),d=Ye(_=>_.setChartFilter),h=n?((E=l[n])==null?void 0:E[e])??o[e]??r:o[e]??r;L.useEffect(()=>{var S;(n?((S=l[n])==null?void 0:S[e])??o[e]:o[e])===void 0&&r&&(n?d(n,e,r):c(e,r))},[n,e,r,o,l,c,d]);const p=_=>{const S=_;n?d(n,e,S):c(e,S),a.close()},m=typeof h=="string"?h!==r:!0,x=Qk(h);return g.jsx(uo,{isOpen:a.isOpen,onOpenChange:a.onOpenChange,width:520,trigger:g.jsx(co,{label:t,value:x,active:m,icon:Gk}),children:g.jsx(Xk,{currentValue:h,onApply:p,onClose:a.close})})}function Xk({currentValue:e,onApply:t,onClose:n}){const[r,a]=L.useState("presets");return g.jsxs("div",{children:[r==="presets"&&g.jsx(Kk,{currentValue:e,onSelectPreset:o=>{t(o),n()},onNavigate:a}),r==="fixed"&&g.jsx(Jk,{currentValue:e,onApply:t,onBack:()=>a("presets")}),r==="relative"&&g.jsx(Zk,{currentValue:e,onApply:t,onBack:()=>a("presets")})]})}function Kk({currentValue:e,onSelectPreset:t,onNavigate:n}){return g.jsxs("div",{className:"py-1",children:[wE.map((r,a)=>{if("divider"in r)return g.jsx("div",{className:"border-t my-1",style:{borderColor:"var(--yc-color-border, #e5e7eb)"}},`divider-${a}`);const o=typeof e=="string"&&e===r.value;return g.jsxs("button",{type:"button",onClick:()=>t(r.value),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-50 flex items-center justify-between",style:{color:o?"#2563eb":"var(--yc-color-text, #111)"},children:[g.jsx("span",{className:o?"font-medium":"",children:r.label}),o&&g.jsx("svg",{className:"w-4 h-4 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})]},r.value)}),g.jsx("div",{className:"border-t my-1",style:{borderColor:"var(--yc-color-border, #e5e7eb)"}}),g.jsxs("button",{type:"button",onClick:()=>n("fixed"),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-50 flex items-center justify-between",style:{color:"var(--yc-color-text, #111)"},children:[g.jsx("span",{children:"Fixed date range..."}),g.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}),g.jsxs("button",{type:"button",onClick:()=>n("relative"),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-50 flex items-center justify-between",style:{color:"var(--yc-color-text, #111)"},children:[g.jsx("span",{children:"Relative date range..."}),g.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})}function Jk({currentValue:e,onApply:t,onBack:n}){const[r,a]=L.useState("between"),[o,l]=L.useState(()=>{if(Gh(e)){const x=Jf(e.start,"yyyy-MM-dd",new Date),E=Jf(e.end,"yyyy-MM-dd",new Date);return{from:x,to:E}}}),[c,d]=L.useState(()=>{if(Gh(e)&&r!=="between")return Jf(e.start,"yyyy-MM-dd",new Date)}),h=()=>{if(r==="between"&&(o!=null&&o.from)&&(o!=null&&o.to))t({type:"custom",start:hn(o.from,"yyyy-MM-dd"),end:hn(o.to,"yyyy-MM-dd")});else if(r==="on"&&c){const x=hn(c,"yyyy-MM-dd");t({type:"custom",start:x,end:x})}else r==="before"&&c?t({type:"custom",start:"1970-01-01",end:hn(c,"yyyy-MM-dd")}):r==="after"&&c&&t({type:"custom",start:hn(c,"yyyy-MM-dd"),end:hn(new Date(2099,11,31),"yyyy-MM-dd")})},p=r==="between"?!!(o!=null&&o.from&&(o!=null&&o.to)):!!c,m=[{key:"between",label:"Between"},{key:"before",label:"Before"},{key:"on",label:"On"},{key:"after",label:"After"}];return g.jsxs("div",{children:[g.jsx(si,{title:"Fixed date range",onBack:n}),g.jsx("div",{className:"px-4 pt-3",children:g.jsx("div",{className:"flex gap-1 mb-3",children:m.map(x=>g.jsx("button",{type:"button",onClick:()=>a(x.key),className:`px-3 py-1 text-xs rounded-full font-medium transition-colors ${r===x.key?"bg-blue-100 text-blue-700":"text-gray-500 hover:bg-gray-100"}`,children:x.label},x.key))})}),g.jsxs("div",{className:"px-4 flex justify-center",children:[g.jsx("style",{children:Vk}),r==="between"?g.jsx(C1,{mode:"range",selected:o,onSelect:l,numberOfMonths:2,defaultMonth:(o==null?void 0:o.from)||new Date}):g.jsx(C1,{mode:"single",selected:c,onSelect:d,numberOfMonths:2,defaultMonth:c||new Date})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:h,disabled:!p,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-40 disabled:cursor-not-allowed",children:"Update filter"})})]})}function Zk({currentValue:e,onApply:t,onBack:n}){const r=SE(e)?e:{direction:"previous",value:30,unit:"day",includeToday:!1},[a,o]=L.useState(r.direction),[l,c]=L.useState(r.value??30),[d,h]=L.useState(r.unit),[p,m]=L.useState(r.includeToday??!1),x=L.useMemo(()=>{const C=_E({direction:a,value:a==="current"?void 0:l,unit:d,includeToday:p}),N=C.start.getFullYear(),A=C.end.getFullYear();return N===A?`${hn(C.start,"MMM d")} – ${hn(C.end,"MMM d, yyyy")}`:`${hn(C.start,"MMM d, yyyy")} – ${hn(C.end,"MMM d, yyyy")}`},[a,l,d,p]),E=()=>{t({type:"relative",direction:a,value:a==="current"?void 0:l,unit:d,includeToday:p})},_=[{key:"previous",label:"Previous"},{key:"current",label:"Current"},{key:"next",label:"Next"}],S=[{value:"day",label:"days"},{value:"week",label:"weeks"},{value:"month",label:"months"},{value:"quarter",label:"quarters"},{value:"year",label:"years"}],w=[{value:"day",label:"Day"},{value:"week",label:"Week"},{value:"month",label:"Month"},{value:"quarter",label:"Quarter"},{value:"year",label:"Year"}];return g.jsxs("div",{children:[g.jsx(si,{title:"Relative date range",onBack:n}),g.jsxs("div",{className:"p-4 space-y-4",children:[g.jsx("div",{className:"flex gap-1",children:_.map(v=>g.jsx("button",{type:"button",onClick:()=>o(v.key),className:`px-3 py-1 text-xs rounded-full font-medium transition-colors ${a===v.key?"bg-blue-100 text-blue-700":"text-gray-500 hover:bg-gray-100"}`,children:v.label},v.key))}),a==="current"?g.jsx("div",{className:"flex gap-2",children:w.map(v=>g.jsx("button",{type:"button",onClick:()=>h(v.value),className:`px-3 py-1.5 text-sm rounded border transition-colors ${d===v.value?"bg-blue-50 border-blue-300 text-blue-700 font-medium":"border-gray-200 text-gray-600 hover:bg-gray-50"}`,children:v.label},v.value))}):g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"number",min:1,value:l,onChange:v=>c(Math.max(1,parseInt(v.target.value)||1)),className:"w-20 px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"}}),g.jsx("select",{value:d,onChange:v=>h(v.target.value),className:"px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400 bg-white",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:S.map(v=>g.jsx("option",{value:v.value,children:v.label},v.value))})]}),a!=="current"&&g.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-600 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:p,onChange:v=>m(v.target.checked),className:"rounded border-gray-300"}),"Include today"]}),g.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),g.jsx("span",{children:x})]})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:E,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700",children:"Update filter"})})]})}function Oc({name:e,label:t=e,options:n,chartName:r,defaultValue:a,source:o}){var I,P;const l=lo(),c=Ye(H=>H.globalFilters),d=Ye(H=>H.chartFilters),h=Ye(H=>H.setGlobalFilter),p=Ye(H=>H.setChartFilter),m=!!o,{data:x,isLoading:E}=is({queryKey:m?r?["parameterOptions",r,e]:["modelOptions",o.model,o.value_field,o.label_field]:["noop"],queryFn:()=>r?Mt.getParameterOptions(r,e):Mt.getModelOptions(o.model,o.value_field,o.label_field),enabled:m,staleTime:300*1e3}),_=m?[{value:"",label:"All"},...(x==null?void 0:x.options)??[]]:[{value:"",label:"All"},...n??[]],S=r?((I=d[r])==null?void 0:I[e])??c[e]??a??"":c[e]??a??"",[w,v]=L.useState(S),[C,N]=L.useState("");L.useEffect(()=>{l.isOpen&&(v(S),N(""))},[l.isOpen,S]),L.useEffect(()=>{var F;(r?((F=d[r])==null?void 0:F[e])??c[e]:c[e])===void 0&&a&&(r?p(r,e,a):h(e,a))},[r,e,a,c,d,h,p]);const A=()=>{r?p(r,e,w):h(e,w),l.close()},M=C?_.filter(H=>H.label.toLowerCase().includes(C.toLowerCase())):_,k=S?((P=_.find(H=>H.value===S))==null?void 0:P.label)||S:void 0,O=!!S&&S!==a;return m&&E?g.jsx("div",{className:"flex items-center border rounded-full px-3 py-1.5 text-sm bg-white gap-1.5",style:{borderColor:"var(--yc-color-border)"},children:g.jsx("span",{className:"text-gray-400 text-sm",children:"Loading..."})}):g.jsxs(uo,{isOpen:l.isOpen,onOpenChange:l.onOpenChange,trigger:g.jsx(co,{label:t,value:k||t,active:O}),children:[g.jsx(si,{title:t}),g.jsxs("div",{className:"p-3",children:[_.length>6&&g.jsx("div",{className:"mb-2",children:g.jsx("input",{type:"text",placeholder:"Search...",value:C,onChange:H=>N(H.target.value),className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},autoFocus:!0})}),g.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[M.map(H=>g.jsxs("label",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-gray-50 cursor-pointer text-sm",children:[g.jsx("input",{type:"radio",name:`select-${e}`,checked:w===H.value,onChange:()=>v(H.value),className:"text-blue-600"}),g.jsx("span",{style:{color:"var(--yc-color-text, #111)"},children:H.label})]},H.value)),M.length===0&&g.jsx("div",{className:"text-sm text-gray-400 px-2 py-3 text-center",children:"No matches"})]})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:A,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700",children:"Update filter"})})]})}function kE({name:e,label:t=e,options:n,chartName:r,defaultValue:a,source:o}){const l=lo(),c=Ye(F=>F.globalFilters),d=Ye(F=>F.chartFilters),h=Ye(F=>F.setGlobalFilter),p=Ye(F=>F.setChartFilter),m=!!o,{data:x,isLoading:E}=is({queryKey:m?r?["parameterOptions",r,e]:["modelOptions",o.model,o.value_field,o.label_field]:["noop"],queryFn:()=>r?Mt.getParameterOptions(r,e):Mt.getModelOptions(o.model,o.value_field,o.label_field),enabled:m,staleTime:300*1e3}),_=m?(x==null?void 0:x.options)??[]:n??[],S=(()=>{var Y;const F=r?((Y=d[r])==null?void 0:Y[e])??c[e]??a??[]:c[e]??a??[];return Array.isArray(F)?F:[]})(),[w,v]=L.useState(S),[C,N]=L.useState("");L.useEffect(()=>{l.isOpen&&(v(S),N(""))},[l.isOpen]),L.useEffect(()=>{var Y;(r?((Y=d[r])==null?void 0:Y[e])??c[e]:c[e])===void 0&&a&&(r?p(r,e,a):h(e,a))},[r,e,a,c,d,h,p]);const A=F=>{v(Y=>Y.includes(F)?Y.filter(G=>G!==F):[...Y,F])},M=()=>{w.length===_.length?v([]):v(_.map(F=>F.value))},k=()=>{r?p(r,e,w):h(e,w),l.close()},O=C?_.filter(F=>F.label.toLowerCase().includes(C.toLowerCase())):_,I=S.length===0?void 0:S.length<=2?S.map(F=>{var Y;return((Y=_.find(G=>G.value===F))==null?void 0:Y.label)||F}).join(", "):`${S.length} selected`,P=S.length>0,H=w.length===_.length&&_.length>0;return m&&E?g.jsx("div",{className:"flex items-center border rounded-full px-3 py-1.5 text-sm bg-white gap-1.5",style:{borderColor:"var(--yc-color-border)"},children:g.jsx("span",{className:"text-gray-400 text-sm",children:"Loading..."})}):g.jsxs(uo,{isOpen:l.isOpen,onOpenChange:l.onOpenChange,trigger:g.jsx(co,{label:t,value:I||t,active:P}),children:[g.jsx(si,{title:t}),g.jsxs("div",{className:"p-3",children:[_.length>6&&g.jsx("div",{className:"mb-2",children:g.jsx("input",{type:"text",placeholder:"Search...",value:C,onChange:F=>N(F.target.value),className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},autoFocus:!0})}),g.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[!C&&g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-gray-50 cursor-pointer text-sm font-medium",children:[g.jsx("input",{type:"checkbox",checked:H,onChange:M,className:"text-blue-600 rounded"}),g.jsx("span",{style:{color:"var(--yc-color-text, #111)"},children:"Select all"})]}),g.jsx("div",{className:"border-t my-1",style:{borderColor:"var(--yc-color-border, #e5e7eb)"}})]}),O.map(F=>g.jsxs("label",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-gray-50 cursor-pointer text-sm",children:[g.jsx("input",{type:"checkbox",checked:w.includes(F.value),onChange:()=>A(F.value),className:"text-blue-600 rounded"}),g.jsx("span",{style:{color:"var(--yc-color-text, #111)"},children:F.label})]},F.value)),O.length===0&&g.jsx("div",{className:"text-sm text-gray-400 px-2 py-3 text-center",children:"No matches"})]})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:k,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700",children:"Update filter"})})]})}const Xh=[{value:"is",label:"is"},{value:"is_not",label:"is not"},{value:"contains",label:"contains"},{value:"does_not_contain",label:"does not contain"},{value:"starts_with",label:"starts with"},{value:"ends_with",label:"ends with"},{value:"is_empty",label:"is empty"},{value:"is_not_empty",label:"is not empty"}],NE=["is_empty","is_not_empty"];function OE(e){return typeof e=="object"&&e!==null&&"operator"in e&&"value"in e}function eN(e){var t,n;if(OE(e))return NE.includes(e.operator)?(t=Xh.find(a=>a.value===e.operator))==null?void 0:t.label:`${((n=Xh.find(a=>a.value===e.operator))==null?void 0:n.label)||e.operator} "${e.value}"`;if(typeof e=="string"&&e)return e}function DE({name:e,label:t=e,chartName:n,defaultValue:r}){var N;const a=lo(),o=Ye(A=>A.globalFilters),l=Ye(A=>A.chartFilters),c=Ye(A=>A.setGlobalFilter),d=Ye(A=>A.setChartFilter),h=n?((N=l[n])==null?void 0:N[e])??o[e]??r??null:o[e]??r??null,[p,m]=L.useState("contains"),[x,E]=L.useState("");L.useEffect(()=>{a.isOpen&&(OE(h)?(m(h.operator),E(h.value)):typeof h=="string"?(m("is"),E(h)):(m("contains"),E("")))},[a.isOpen]);const _=()=>{const A={operator:p,value:x};n?d(n,e,A):c(e,A),a.close()},S=!NE.includes(p),w=!S||x.trim().length>0,v=eN(h),C=!!v;return g.jsxs(uo,{isOpen:a.isOpen,onOpenChange:a.onOpenChange,trigger:g.jsx(co,{label:t,value:v||t,active:C}),children:[g.jsx(si,{title:t}),g.jsxs("div",{className:"p-4 space-y-3",children:[g.jsx("select",{value:p,onChange:A=>m(A.target.value),className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400 bg-white",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:Xh.map(A=>g.jsx("option",{value:A.value,children:A.label},A.value))}),S&&g.jsx("input",{type:"text",value:x,onChange:A=>E(A.target.value),placeholder:"Enter value...",className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},autoFocus:!0,onKeyDown:A=>{A.key==="Enter"&&w&&_()}})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:_,disabled:!w,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-40 disabled:cursor-not-allowed",children:"Update filter"})})]})}const Kh=[{value:"equal",label:"equal to"},{value:"not_equal",label:"not equal to"},{value:"greater",label:"greater than"},{value:"less",label:"less than"},{value:"greater_or_equal",label:"greater than or equal to"},{value:"less_or_equal",label:"less than or equal to"},{value:"between",label:"between"},{value:"is_empty",label:"is empty"},{value:"is_not_empty",label:"is not empty"}],AE=["is_empty","is_not_empty"];function IE(e){return typeof e=="object"&&e!==null&&"operator"in e&&"value"in e&&typeof e.value=="number"}function tN(e){var t,n;if(IE(e)){if(AE.includes(e.operator))return(t=Kh.find(a=>a.value===e.operator))==null?void 0:t.label;const r=((n=Kh.find(a=>a.value===e.operator))==null?void 0:n.label)||e.operator;return e.operator==="between"&&e.value2!==void 0?`${e.value} – ${e.value2}`:`${r} ${e.value}`}if(typeof e=="number")return String(e)}function RE({name:e,label:t=e,chartName:n,defaultValue:r}){var k;const a=lo(),o=Ye(O=>O.globalFilters),l=Ye(O=>O.chartFilters),c=Ye(O=>O.setGlobalFilter),d=Ye(O=>O.setChartFilter),h=n?((k=l[n])==null?void 0:k[e])??o[e]??r??null:o[e]??r??null,[p,m]=L.useState("equal"),[x,E]=L.useState(""),[_,S]=L.useState("");L.useEffect(()=>{a.isOpen&&(IE(h)?(m(h.operator),E(String(h.value)),S(h.value2!==void 0?String(h.value2):"")):typeof h=="number"?(m("equal"),E(String(h)),S("")):(m("equal"),E(""),S("")))},[a.isOpen]);const w=()=>{const O={operator:p,value:parseFloat(x)||0,...p==="between"?{value2:parseFloat(_)||0}:{}};n?d(n,e,O):c(e,O),a.close()},v=!AE.includes(p),C=p==="between",N=!v||x!==""&&(!C||_!==""),A=tN(h),M=!!A;return g.jsxs(uo,{isOpen:a.isOpen,onOpenChange:a.onOpenChange,trigger:g.jsx(co,{label:t,value:A||t,active:M}),children:[g.jsx(si,{title:t}),g.jsxs("div",{className:"p-4 space-y-3",children:[g.jsx("select",{value:p,onChange:O=>m(O.target.value),className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400 bg-white",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:Kh.map(O=>g.jsx("option",{value:O.value,children:O.label},O.value))}),v&&g.jsxs("div",{className:"flex gap-2",children:[g.jsx("input",{type:"number",value:x,onChange:O=>E(O.target.value),placeholder:C?"Min":"Enter value...",className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},autoFocus:!0,onKeyDown:O=>{O.key==="Enter"&&N&&w()}}),C&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-sm text-gray-400 self-center",children:"and"}),g.jsx("input",{type:"number",value:_,onChange:O=>S(O.target.value),placeholder:"Max",className:"w-full px-3 py-1.5 border rounded text-sm focus:outline-none focus:ring-1 focus:ring-blue-400",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},onKeyDown:O=>{O.key==="Enter"&&N&&w()}})]})]})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:w,disabled:!N,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-40 disabled:cursor-not-allowed",children:"Update filter"})})]})}function LE({name:e,label:t=e,chartName:n}){var _;const r=lo(),a=Ye(S=>S.globalFilters),o=Ye(S=>S.chartFilters),l=Ye(S=>S.setGlobalFilter),c=Ye(S=>S.setChartFilter),d=n?((_=o[n])==null?void 0:_[e])??a[e]??null:a[e]??null,[h,p]=L.useState(typeof d=="boolean"?d:null);L.useEffect(()=>{r.isOpen&&p(typeof d=="boolean"?d:null)},[r.isOpen]);const m=()=>{n?c(n,e,h):l(e,h),r.close()},x=typeof d=="boolean"?d?"True":"False":void 0,E=typeof d=="boolean";return g.jsxs(uo,{isOpen:r.isOpen,onOpenChange:r.onOpenChange,width:240,trigger:g.jsx(co,{label:t,value:x||t,active:E}),children:[g.jsx(si,{title:t}),g.jsxs("div",{className:"p-4 space-y-1",children:[[{value:!0,label:"True"},{value:!1,label:"False"}].map(S=>g.jsxs("label",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-gray-50 cursor-pointer text-sm",children:[g.jsx("input",{type:"radio",name:`bool-${e}`,checked:h===S.value,onChange:()=>p(S.value),className:"text-blue-600"}),g.jsx("span",{style:{color:"var(--yc-color-text, #111)"},children:S.label})]},String(S.value))),g.jsxs("label",{className:"flex items-center gap-2 px-2 py-1.5 rounded hover:bg-gray-50 cursor-pointer text-sm text-gray-400",children:[g.jsx("input",{type:"radio",name:`bool-${e}`,checked:h===null,onChange:()=>p(null),className:"text-blue-600"}),g.jsx("span",{children:"Any"})]})]}),g.jsx("div",{className:"flex justify-end px-4 py-3 border-t",style:{borderColor:"var(--yc-color-border, #e5e7eb)"},children:g.jsx("button",{type:"button",onClick:m,className:"px-4 py-1.5 text-sm font-medium bg-blue-600 text-white rounded hover:bg-blue-700",children:"Update filter"})})]})}function Jh(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}function PE({parameters:e,chartName:t}){return e.length===0?null:g.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.map(n=>{const r=n.label||Jh(n.name),a=typeof n.default=="string"?n.default:void 0;switch(n.type){case"date_range":return g.jsx(CE,{name:n.name,label:r,chartName:t,defaultValue:a},n.name);case"select":{const o=(n.options||[]).map(l=>typeof l=="string"?{value:l,label:l}:l);return g.jsx(Oc,{name:n.name,label:r,options:o,chartName:t,defaultValue:a},n.name)}case"dynamic_select":return!t&&!n.source?g.jsxs("div",{className:"text-sm text-gray-500",children:[r,": dynamic_select requires chartName or source"]},n.name):g.jsx(Oc,{name:n.name,label:r,chartName:t,defaultValue:a,source:n.source},n.name);case"multi_select":{const o=(n.options||[]).map(l=>typeof l=="string"?{value:l,label:l}:l);return g.jsx(kE,{name:n.name,label:r,options:o,chartName:t,defaultValue:Array.isArray(n.default)?n.default:void 0,source:n.source},n.name)}case"text":return g.jsx(DE,{name:n.name,label:r,chartName:t,defaultValue:a},n.name);case"number":return g.jsx(RE,{name:n.name,label:r,chartName:t,defaultValue:typeof n.default=="number"?n.default:void 0},n.name);case"boolean":return g.jsx(LE,{name:n.name,label:r,chartName:t},n.name);default:return g.jsxs("div",{className:"text-sm text-gray-500",children:[r,": ",n.type," (not supported)"]},n.name)}})})}function nN({resourceType:e,resourceName:t}){const n=eo(S=>S.auth),[r,a]=L.useState(!1),[o,l]=L.useState(null),[c,d]=L.useState(null),[h,p]=L.useState(!1),m=L.useRef(null);if(n.status!=="authenticated")return null;const x=n.user.role==="admin"||n.user.role==="editor";L.useEffect(()=>{if(!r)return;const S=w=>{m.current&&!m.current.contains(w.target)&&a(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[r]);const E=async()=>{const S=e==="dashboard"?`#/dashboards/${t}`:`#/charts/${t}`,w=`${window.location.origin}/${S}`;await navigator.clipboard.writeText(w),d("link"),setTimeout(()=>d(null),2e3)},_=async()=>{p(!0);try{const S=await Mt.createShareLink({resourceType:e,resourceName:t}),w=e==="dashboard"?`#/public/dashboards/${t}?token=${S.token}`:`#/public/charts/${t}?token=${S.token}`,v=`${window.location.origin}/${w}`;l(v),await navigator.clipboard.writeText(v),d("public"),setTimeout(()=>d(null),2e3)}catch(S){console.error("Failed to create share link:",S)}finally{p(!1)}};return g.jsxs("div",{className:"relative",ref:m,children:[g.jsxs("button",{onClick:()=>a(!r),className:"text-sm text-gray-500 hover:text-gray-700 flex items-center gap-1.5 px-2 py-1 rounded hover:bg-gray-100 transition-colors",title:"Share",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z"})}),g.jsx("span",{children:"Share"})]}),r&&g.jsxs("div",{className:"absolute right-0 top-full mt-1 bg-white border border-gray-200 rounded-lg shadow-lg py-1 w-64 z-50",children:[g.jsxs("button",{onClick:E,className:"w-full text-left px-3 py-2 text-sm hover:bg-gray-50 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})}),c==="link"?g.jsx("span",{className:"text-green-600",children:"Copied!"}):g.jsx("span",{children:"Copy link (requires login)"})]}),x&&g.jsxs("button",{onClick:_,disabled:h,className:"w-full text-left px-3 py-2 text-sm hover:bg-gray-50 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),h?g.jsx("span",{className:"text-gray-400",children:"Creating..."}):c==="public"?g.jsx("span",{className:"text-green-600",children:"Public link copied!"}):g.jsx("span",{children:"Create public link"})]}),o&&g.jsxs("div",{className:"px-3 py-2 border-t border-gray-100",children:[g.jsx("div",{className:"text-xs text-gray-400 mb-1",children:"Public URL:"}),g.jsx("div",{className:"text-xs text-gray-600 break-all font-mono bg-gray-50 p-1.5 rounded",children:o})]})]})]})}function rN({rowCount:e,durationMs:t,cached:n,view:r,onToggleView:a,onExportCSV:o,onExportPNG:l,onShowSql:c}){const[d,h]=L.useState(!1);return g.jsxs("div",{className:"yc-chart-footer flex items-center justify-between px-4 py-2 border-t text-xs",style:{backgroundColor:"var(--yc-color-surface)",borderColor:"var(--yc-color-border)",color:"var(--yc-color-text-secondary)"},children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{onClick:()=>a("chart"),className:`p-1.5 rounded transition-colors ${r==="chart"?"bg-black/5":"hover:bg-black/5"}`,title:"Chart view",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"})})}),g.jsx("button",{onClick:()=>a("table"),className:`p-1.5 rounded transition-colors ${r==="table"?"bg-black/5":"hover:bg-black/5"}`,title:"Table view",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[e!=null&&g.jsxs("span",{children:[e.toLocaleString()," rows"]}),t!=null&&g.jsxs("span",{children:[n&&g.jsx("span",{className:"text-green-600 mr-1",title:"Served from cache",children:"cached"}),t,"ms"]}),c&&g.jsx("button",{onClick:c,className:"px-2 py-0.5 rounded border hover:bg-black/5 transition-colors font-mono",style:{borderColor:"var(--yc-color-border)"},children:"SQL"}),(o||l)&&g.jsxs("div",{className:"relative",children:[g.jsx("button",{onClick:()=>h(!d),className:"px-2 py-0.5 rounded border hover:bg-black/5 transition-colors",style:{borderColor:"var(--yc-color-border)"},children:"Export"}),d&&g.jsxs("div",{className:"absolute right-0 bottom-full mb-1 w-32 rounded-md shadow-lg border py-1 z-50",style:{backgroundColor:"var(--yc-color-surface)",borderColor:"var(--yc-color-border)"},children:[o&&g.jsx("button",{onClick:()=>{o(),h(!1)},className:"w-full text-left px-3 py-1.5 text-xs hover:bg-black/5",style:{color:"var(--yc-color-text)"},children:"Export CSV"}),l&&g.jsx("button",{onClick:()=>{l(),h(!1)},className:"w-full text-left px-3 py-1.5 text-xs hover:bg-black/5",style:{color:"var(--yc-color-text)"},children:"Export PNG"})]})]})]})]})}const sN=new Set(["SELECT","FROM","WHERE","AND","OR","NOT","IN","IS","NULL","AS","ON","JOIN","LEFT","RIGHT","INNER","OUTER","FULL","CROSS","GROUP","BY","ORDER","HAVING","LIMIT","OFFSET","UNION","ALL","INSERT","INTO","VALUES","UPDATE","SET","DELETE","CREATE","DROP","ALTER","TABLE","INDEX","VIEW","WITH","RECURSIVE","DISTINCT","CASE","WHEN","THEN","ELSE","END","BETWEEN","LIKE","ILIKE","EXISTS","ANY","SOME","ASC","DESC","NULLS","FIRST","LAST","TRUE","FALSE","OVER","PARTITION","ROWS","RANGE","PRECEDING","FOLLOWING","UNBOUNDED","CURRENT","ROW","FILTER","WITHIN","LATERAL","NATURAL","USING","EXCEPT","INTERSECT","FETCH","NEXT","ONLY","FOR","IF","REPLACE","CASCADE","RESTRICT","TEMPORARY","TEMP","MATERIALIZED","EXPLAIN","ANALYZE","WINDOW"]),aN=new Set(["COUNT","SUM","AVG","MIN","MAX","COALESCE","NULLIF","CAST","CONVERT","IFNULL","NVL","TRIM","LTRIM","RTRIM","UPPER","LOWER","LENGTH","SUBSTRING","SUBSTR","REPLACE","CONCAT","CONCAT_WS","DATE_TRUNC","DATE_PART","EXTRACT","NOW","CURRENT_DATE","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","TO_DATE","TO_CHAR","TO_NUMBER","TO_TIMESTAMP","ROUND","FLOOR","CEIL","CEILING","ABS","MOD","POWER","SQRT","LOG","LN","EXP","SIGN","ROW_NUMBER","RANK","DENSE_RANK","NTILE","LAG","LEAD","FIRST_VALUE","LAST_VALUE","NTH_VALUE","LISTAGG","STRING_AGG","ARRAY_AGG","JSON_AGG","BOOL_OR","BOOL_AND","GREATEST","LEAST","DECODE","IFF","ZEROIFNULL","TRY_CAST"]);function Rr(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function iN(e){const t=[];let n=0;const r=a=>e.charAt(a);for(;n<e.length;){if(r(n)==="-"&&r(n+1)==="-"){const a=e.indexOf(`
|
|
66
|
+
`,n),o=a===-1?e.slice(n):e.slice(n,a);t.push(`<span class="sql-comment">${Rr(o)}</span>`),n+=o.length;continue}if(r(n)==="/"&&r(n+1)==="*"){const a=e.indexOf("*/",n+2),o=a===-1?e.slice(n):e.slice(n,a+2);t.push(`<span class="sql-comment">${Rr(o)}</span>`),n+=o.length;continue}if(r(n)==="'"){let a=n+1;for(;a<e.length;)if(r(a)==="'"&&r(a+1)==="'")a+=2;else if(r(a)==="'"){a++;break}else a++;t.push(`<span class="sql-string">${Rr(e.slice(n,a))}</span>`),n=a;continue}if(r(n)==='"'){const a=e.indexOf('"',n+1),o=a===-1?e.slice(n):e.slice(n,a+1);t.push(`<span class="sql-identifier">${Rr(o)}</span>`),n+=o.length;continue}if(/\d/.test(r(n))&&(n===0||/[\s,=(]/.test(r(n-1)))){let a=n;for(;a<e.length&&/[\d.]/.test(r(a));)a++;t.push(`<span class="sql-number">${Rr(e.slice(n,a))}</span>`),n=a;continue}if(/[a-zA-Z_]/.test(r(n))){let a=n;for(;a<e.length&&/[a-zA-Z0-9_]/.test(r(a));)a++;const o=e.slice(n,a),l=o.toUpperCase(),c=e.slice(a);/^\s*\(/.test(c)&&aN.has(l)?t.push(`<span class="sql-function">${Rr(o)}</span>`):sN.has(l)?t.push(`<span class="sql-keyword">${Rr(o)}</span>`):t.push(Rr(o)),n=a;continue}if(r(n)===":"&&r(n+1)===":"){let a=n+2;for(;a<e.length&&/[a-zA-Z0-9_]/.test(r(a));)a++;t.push(`<span class="sql-type">${Rr(e.slice(n,a))}</span>`),n=a;continue}if("=<>!+-*/%".includes(r(n))){t.push(`<span class="sql-operator">${Rr(r(n))}</span>`),n++;continue}t.push(Rr(r(n))),n++}return t.join("")}function oN({isOpen:e,onClose:t,compiledSql:n,modelName:r,connection:a,durationMs:o,rowCount:l,cached:c}){const[d,h]=L.useState(!1),p=L.useMemo(()=>n?iN(n):"",[n]);if(!e)return null;const m=async()=>{if(n)try{await navigator.clipboard.writeText(n),h(!0),setTimeout(()=>h(!1),2e3)}catch{}};return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"fixed inset-0 bg-black/20 z-40",onClick:t}),g.jsxs("div",{className:"fixed top-0 right-0 bottom-0 w-[480px] max-w-[90vw] z-50 flex flex-col shadow-xl border-l",style:{backgroundColor:"var(--yc-color-surface)",borderColor:"var(--yc-color-border)"},children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b flex-shrink-0",style:{borderColor:"var(--yc-color-border)"},children:[g.jsx("h2",{className:"text-base font-semibold",style:{color:"var(--yc-color-text)",fontFamily:"var(--yc-font-heading)"},children:"Query Details"}),g.jsx("button",{onClick:t,className:"p-1.5 rounded hover:bg-black/5 transition-colors",style:{color:"var(--yc-color-text-secondary)"},children:g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--yc-color-text-secondary)"},children:"Metadata"}),g.jsxs("div",{className:"text-sm space-y-1.5 p-3 rounded",style:{backgroundColor:"var(--yc-color-background)",border:"1px solid var(--yc-color-border)"},children:[r&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{style:{color:"var(--yc-color-text-secondary)"},children:"Model"}),g.jsx("span",{className:"font-mono text-xs",style:{color:"var(--yc-color-text)"},children:r})]}),a&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{style:{color:"var(--yc-color-text-secondary)"},children:"Connection"}),g.jsx("span",{style:{color:"var(--yc-color-text)"},children:a})]}),l!=null&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{style:{color:"var(--yc-color-text-secondary)"},children:"Rows"}),g.jsx("span",{style:{color:"var(--yc-color-text)"},children:l.toLocaleString()})]}),o!=null&&g.jsxs("div",{className:"flex justify-between",children:[g.jsx("span",{style:{color:"var(--yc-color-text-secondary)"},children:"Duration"}),g.jsxs("span",{style:{color:"var(--yc-color-text)"},children:[o,"ms",c&&g.jsx("span",{className:"ml-2 text-green-600 text-xs",children:"(cached)"})]})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--yc-color-text-secondary)"},children:"Compiled SQL"}),g.jsx("button",{onClick:m,className:"text-xs px-2 py-1 rounded hover:bg-black/5 transition-colors",style:{color:"var(--yc-color-primary)"},children:d?"Copied!":"Copy"})]}),n?g.jsx("pre",{className:"text-xs p-4 rounded overflow-x-auto whitespace-pre-wrap break-words leading-relaxed",style:{fontFamily:"var(--yc-font-mono)",backgroundColor:"var(--yc-color-background)",color:"var(--yc-color-text)",border:"1px solid var(--yc-color-border)"},dangerouslySetInnerHTML:{__html:p}}):g.jsx("p",{className:"text-sm italic",style:{color:"var(--yc-color-text-secondary)"},children:"No SQL available."})]})]})]})]})}async function uN(e,t,n="png"){const{default:r}=await ks(async()=>{const{default:l}=await import("./html2canvas.esm-QH1iLAAe.js");return{default:l}},[]),o=(await r(e,{backgroundColor:"#f9fafb",scale:2,useCORS:!0,logging:!1})).toDataURL(`image/${n}`,n==="jpeg"?.9:void 0);Dc(o,`${t}.${n}`)}async function lN(e,t,n){const[{default:r},{jsPDF:a}]=await Promise.all([ks(()=>import("./html2canvas.esm-QH1iLAAe.js"),[]),ks(()=>import("./jspdf.es.min-BllGrT6z.js").then(A=>A.j),[])]),o=await r(e,{backgroundColor:"#f9fafb",scale:2,useCORS:!0,logging:!1}),l=o.toDataURL("image/png"),c=o.width,d=o.height,p=c/d>1,m=new a({orientation:p?"landscape":"portrait",unit:"mm"}),x=m.internal.pageSize.getWidth(),E=m.internal.pageSize.getHeight();let _=10;n&&(m.setFontSize(16),m.text(n,x/2,_,{align:"center"}),_=20);const S=x-20,w=E-_-10;let v=S,C=d/c*v;C>w&&(C=w,v=c/d*C);const N=(x-v)/2;m.addImage(l,"PNG",N,_,v,C),m.save(`${t}.pdf`)}async function cN(e,t,n){const{jsPDF:r}=await ks(async()=>{const{jsPDF:w}=await import("./jspdf.es.min-BllGrT6z.js").then(v=>v.j);return{jsPDF:w}},[]),a=new Image;a.src=e,await new Promise(w=>{a.onload=w});const l=a.width/a.height>1.2,c=new r({orientation:l?"landscape":"portrait",unit:"mm"}),d=c.internal.pageSize.getWidth(),h=c.internal.pageSize.getHeight();let p=15;n&&(c.setFontSize(14),c.text(n,d/2,10,{align:"center"}));const m=d-20,x=h-p-15;let E=m,_=a.height/a.width*E;_>x&&(_=x,E=a.width/a.height*_);const S=(d-E)/2;c.addImage(e,"PNG",S,p,E,_),c.save(`${t}.pdf`)}function Wc(e,t,n){if(e.length===0)return;const r=t.map(l=>l.name),a=e.map(l=>t.map(c=>{const d=l[c.name];if(d==null)return"";const h=String(d);return h.includes(",")||h.includes('"')||h.includes(`
|
|
67
|
+
`)?`"${h.replace(/"/g,'""')}"`:h})),o=[r.join(","),...a.map(l=>l.join(","))].join(`
|
|
68
|
+
`);ME(o,`${n}.csv`,"text/csv;charset=utf-8;")}function dN(e,t){const n=JSON.stringify(e,null,2);ME(n,`${t}.json`,"application/json;charset=utf-8;")}function Dc(e,t){const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function ME(e,t,n){const r=new Blob([e],{type:n}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)}const ru=50;function fN({data:e,columns:t,drillDownColumns:n,filterDisplay:r,chartName:a}){const[o,l]=L.useState(null),[c,d]=L.useState(0),h=L.useMemo(()=>n&&n.length>0?n.map(C=>({field:C.field,label:C.label??C.field,format:C.format})):t.map(C=>({field:C.name,label:C.name,format:void 0})),[n,t]),p=L.useMemo(()=>{if(!o)return e;const{field:C,direction:N}=o;return[...e].sort((A,M)=>{const k=A[C],O=M[C];if(k==null&&O==null)return 0;if(k==null)return 1;if(O==null)return-1;if(typeof k=="number"&&typeof O=="number")return N==="asc"?k-O:O-k;const I=String(k),P=String(O);return N==="asc"?I.localeCompare(P):P.localeCompare(I)})},[e,o]),m=Math.ceil(p.length/ru),x=p.slice(c*ru,(c+1)*ru),E=c*ru+1,_=Math.min((c+1)*ru,p.length),S=C=>{l(N=>!N||N.field!==C?{field:C,direction:"asc"}:N.direction==="asc"?{field:C,direction:"desc"}:null),d(0)},w=(C,N)=>C==null?"":N&&typeof C=="number"?N.includes("$")?`$${C.toLocaleString()}`:N.includes("%")?`${C.toFixed(1)}%`:C.toLocaleString():String(C),v=C=>!o||o.field!==C?"":o.direction==="asc"?" ↑":" ↓";return g.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50",children:[g.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",p.length," rows filtered by ",r]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>Wc(e,t,`${a}-drill-down`),className:"text-sm px-3 py-1 text-gray-600 hover:text-gray-900 border border-gray-300 rounded hover:bg-gray-100 transition-colors",children:"Export CSV"}),g.jsx("button",{onClick:()=>dN(e,`${a}-drill-down`),className:"text-sm px-3 py-1 text-gray-600 hover:text-gray-900 border border-gray-300 rounded hover:bg-gray-100 transition-colors",children:"Export JSON"})]})]}),g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsx("tr",{className:"border-b border-gray-200 bg-gray-50",children:h.map(C=>g.jsxs("th",{className:"px-4 py-2 text-left font-medium text-gray-700 cursor-pointer hover:bg-gray-100 select-none",onClick:()=>S(C.field),children:[C.label,v(C.field)]},C.field))})}),g.jsx("tbody",{children:x.map((C,N)=>g.jsx("tr",{className:N%2===0?"bg-white":"bg-gray-50",children:h.map(A=>g.jsx("td",{className:"px-4 py-2 text-gray-600",children:w(C[A.field],A.format)},A.field))},N))})]})}),m>1&&g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-gray-200 bg-gray-50",children:[g.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",E,"-",_," of ",p.length]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>d(C=>Math.max(0,C-1)),disabled:c===0,className:"text-sm px-3 py-1 border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-100 transition-colors",children:"Previous"}),g.jsx("button",{onClick:()=>d(C=>Math.min(m-1,C+1)),disabled:c>=m-1,className:"text-sm px-3 py-1 border border-gray-300 rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-100 transition-colors",children:"Next"})]})]})]})}const jr=L.forwardRef(function({option:t,height:n=400,loading:r=!1,onEvents:a},o){const l=L.useRef(null);return L.useImperativeHandle(o,()=>({getDataURL:c=>{var h;const d=(h=l.current)==null?void 0:h.getEchartsInstance();if(d)try{return d.getDataURL({type:c==="png"?"png":"svg",pixelRatio:2,backgroundColor:"#fff"})}catch{return d.getDataURL({type:"svg",pixelRatio:2,backgroundColor:"#fff"})}},getInstance:()=>{var c;return(c=l.current)==null?void 0:c.getEchartsInstance()}})),L.useEffect(()=>{const c=()=>{var d,h;(h=(d=l.current)==null?void 0:d.getEchartsInstance())==null||h.resize()};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),g.jsx(Iv,{ref:l,option:t,style:{height:n,width:"100%"},showLoading:r,onEvents:a,opts:{renderer:"canvas"}})}),hN=["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#06B6D4","#F97316","#84CC16","#14B8A6"];function no(e,t,n){if(t)return t;const r=(n==null?void 0:n.palette)??hN;return r[e%r.length]}function pN(e,t,n,r){return n!=null&&n[e]?n[e]:no(t,void 0,r)}function mN(e){return"field"in e}function gN(e){return"columns"in e}function sh(e){if(e.length===0)return e;const t=e[0].data.length;for(let n=0;n<t;n++){let r=0;for(const a of e)r+=a.data[n]??0;for(const a of e)a.data[n]=r===0?0:(a.data[n]??0)/r*100}return e}function Yc(e,t,n){var a,o;const r=t.stacking?"total":void 0;if(!t.series){const l=((a=t.y)==null?void 0:a.field)??"",c=e.map(h=>{const p=h[l];return typeof p=="number"?p:parseFloat(String(p))||0}),d=[{name:l,data:c,color:no(0,void 0,n),stack:r}];return t.stacking==="percent"?sh(d):d}if(mN(t.series)){const l=t.series.field,c=t.series.colors,d=((o=t.y)==null?void 0:o.field)??"",h=[],p=new Map;e.forEach(x=>{const E=String(x[l]??"");p.has(E)||(h.push(E),p.set(E,[]));const _=x[d];p.get(E).push(typeof _=="number"?_:parseFloat(String(_))||0)});const m=h.map((x,E)=>({name:x,data:p.get(x),color:pN(x,E,c,n),stack:r}));return t.stacking==="percent"?sh(m):m}if(gN(t.series)){const l=t.series.columns.map((c,d)=>{const h=e.map(p=>{const m=p[c.field];return typeof m=="number"?m:parseFloat(String(m))||0});return{name:c.name??c.field,data:h,color:no(d,c.color,n),opacity:c.opacity,style:c.style,gradient:c.gradient,stack:r,chartType:c.type,yAxisIndex:c.axis==="right"?1:c.axis==="left"?0:void 0}});return t.stacking==="percent"?sh(l):l}return[]}function yN(e){return e.replace(/'/g,"''").replace(/%Y/g,"yyyy").replace(/%y/g,"yy").replace(/%m/g,"MM").replace(/%b/g,"MMM").replace(/%B/g,"MMMM").replace(/%d/g,"dd").replace(/%H/g,"HH").replace(/%I/g,"hh").replace(/%M/g,"mm").replace(/%S/g,"ss").replace(/%p/g,"a").replace(/%P/g,"a")}function FE(e){const t=Math.floor(e.getMonth()/3)+1,n=e.getFullYear().toString().slice(-2);return`Q${t} '${n}`}function bN(e){if(e.length<2)return"MMM dd, yyyy";const t=e.map(c=>c.getTime()).sort((c,d)=>c-d),n=t[0],r=t[t.length-1],a=(r-n)/(1e3*60*60*24);return a<2?"MMM dd, h:mm a":a<=90||(r-n)/(t.length-1)/(1e3*60*60*24)<28?"MMM dd":a<=730?"MMM yyyy":"yyyy"}function EN(e){if(e.length<2)return"MMM dd, yyyy";const t=e.map(r=>r.getTime()).sort((r,a)=>r-a),n=(t[t.length-1]-t[0])/((t.length-1)*864e5);return n<1?"MMM dd, yyyy h:mm a":n<28?"MMM dd, yyyy":"MMM yyyy"}function qc(e,t){const n=new Set,r=e.filter(l=>{const c=l[t.field];return n.has(c)?!1:(n.add(c),!0)});if(t.type!=="temporal")return r.map(l=>String(l[t.field]??""));const a=[];for(const l of r){const c=l[t.field];if(typeof c=="string")try{a.push(Nc(c))}catch{}}const o=a.length>0?EN(a):"MMM dd, yyyy";return r.map(l=>{const c=l[t.field];if(typeof c=="string")try{const d=Nc(c);return t.format==="quarter"?FE(d):hn(d,o)}catch{return String(c??"")}return String(c??"")})}function $c(e,t){const n=new Set,r=e.filter(a=>{const o=a[t.field];return n.has(o)?!1:(n.add(o),!0)});return $u(r,t)}function $u(e,t){let n;if(t.type==="temporal"&&!t.format){const r=[];for(const a of e){const o=a[t.field];if(typeof o=="string")try{r.push(Nc(o))}catch{}}r.length>0&&(n=bN(r))}return e.map(r=>{const a=r[t.field];if(t.type==="temporal"&&typeof a=="string")try{const o=Nc(a);if(t.format==="quarter")return FE(o);const l=t.format?yN(t.format):n??"MMM yyyy";return hn(o,l)}catch{return String(a??"")}return String(a??"")})}function ma(e,t){if(t){if(t.includes("$"))return`$${e.toLocaleString()}`;if(t.includes("%"))return`${e.toFixed(1)}%`}return e.toLocaleString()}function xN(e){const t=e.replace("#","").match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function Vc(e,t){if(!t)return null;if(typeof t=="object")return{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:t.from},{offset:1,color:t.to}]};const n=xN(e);return n?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`rgba(${n.r}, ${n.g}, ${n.b}, 0.4)`},{offset:1,color:`rgba(${n.r}, ${n.g}, ${n.b}, 0.05)`}]}:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:e},{offset:1,color:"rgba(0,0,0,0)"}]}}function Ns(e){return((e==null?void 0:e.base)??"modern")==="modern"?{smooth:!0,barBorderRadius:[4,4,0,0],pieBorderRadius:4}:{smooth:!1,barBorderRadius:[0,0,0,0],pieBorderRadius:0}}const BE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,chartConfig:a,theme:o,height:l=400,loading:c=!1,onCrossFilter:d,onDrillDown:h},p){var N,A,M,k,O;const x=(a==null?void 0:a.series)&&"field"in a.series?$c(t,n):$u(t,n),E=n.type==="temporal"?qc(t,n):x,_=L.useMemo(()=>{const I={};return d&&(I.click=P=>{const H=P;if(H.componentType!=="series")return;const F=H.name;F==null||F===""||d(n.field,String(F))}),h&&(I.contextmenu=(P,H)=>{var K,$,se,J,te,R,ie;const F=P;if(F.componentType!=="series")return;const Y=F.name;if(Y==null||Y==="")return;($=(K=F.event)==null?void 0:K.event)==null||$.preventDefault(),(se=H==null?void 0:H.dispatchAction)==null||se.call(H,{type:"hideTip"});const G=((te=(J=F.event)==null?void 0:J.event)==null?void 0:te.clientX)??0,X=((ie=(R=F.event)==null?void 0:R.event)==null?void 0:ie.clientY)??0;h(n.field,String(Y),{x:G,y:X})}),Object.keys(I).length>0?I:void 0},[d,h,n.field]);let S,w,v;if(a){const I=Yc(t,{type:a.type,y:r?{field:r.field,type:r.type}:void 0,series:a.series,stacking:a.stacking},o),P=Ns(o);S=I.map(H=>{const F=Vc(H.color,H.gradient??a.gradient);return{type:"line",name:H.name,data:H.data,smooth:P.smooth,symbol:"circle",symbolSize:6,lineStyle:{width:2,color:H.color,type:H.style==="dashed"?"dashed":H.style==="dotted"?"dotted":"solid"},itemStyle:{color:H.color},areaStyle:F?{color:F}:void 0,stack:H.stack,...H.opacity!==void 0?{opacity:H.opacity}:{}}}),I.length>1&&(w={show:((N=a.legend)==null?void 0:N.show)!==!1,...((A=a.legend)==null?void 0:A.position)==="top"?{top:0}:((M=a.legend)==null?void 0:M.position)==="left"?{left:0,orient:"vertical"}:((k=a.legend)==null?void 0:k.position)==="right"?{right:0,orient:"vertical"}:{bottom:0},textStyle:{color:"#6B7280",fontSize:12}}),(O=a.interactions)!=null&&O.zoom&&(v=[{type:"inside",start:0,end:100},{type:"slider",start:0,end:100,bottom:0}])}else{const I=(r==null?void 0:r.field)??"";S=[{type:"line",data:t.map(H=>{const F=H[I];return typeof F=="number"?F:parseFloat(String(F))||0}),smooth:Ns(o).smooth,symbol:"circle",symbolSize:6,lineStyle:{width:2,color:"#3B82F6"},itemStyle:{color:"#3B82F6"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(59, 130, 246, 0.2)"},{offset:1,color:"rgba(59, 130, 246, 0)"}]}}}]}const C={tooltip:{trigger:"axis",formatter:I=>{const P=I;if(!Array.isArray(P)||P.length===0)return"";let F=`<div style="padding: 8px;"><div style="font-weight: 600; margin-bottom: 4px;">${E[P[0].dataIndex]??P[0].name}</div>`;for(const Y of P)F+=`<div>${Y.marker} ${Y.seriesName}: ${ma(Y.value,r==null?void 0:r.format)}</div>`;return F+="</div>",F}},legend:w,grid:{left:"3%",right:"4%",bottom:"10%",top:"10%",containLabel:!0},xAxis:{type:"category",data:x,name:n.label,nameLocation:"middle",nameGap:30,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,hideOverlap:!0},axisLine:{lineStyle:{color:"#E5E7EB"}},axisTick:{show:!1}},yAxis:{type:"value",name:r==null?void 0:r.label,nameLocation:"middle",nameGap:80,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,formatter:I=>ma(I,r==null?void 0:r.format)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}},series:S,...v?{dataZoom:v}:{},animation:!0,animationDuration:300};return g.jsx(jr,{ref:p,option:C,height:l,loading:c,onEvents:_})}),jE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,chartConfig:a,theme:o,height:l=400,loading:c=!1,horizontal:d=!1,onCrossFilter:h,activeCrossFilter:p,onDrillDown:m},x){var I,P,H,F;const _=(a==null?void 0:a.series)&&"field"in a.series?$c(t,n):$u(t,n),S=n.type==="temporal"?qc(t,n):_,w=(p==null?void 0:p.field)===n.field,v=L.useMemo(()=>{const Y={};return h&&(Y.click=G=>{const X=G;if(X.componentType!=="series")return;const K=X.name;K==null||K===""||h(n.field,String(K))}),m&&(Y.contextmenu=(G,X)=>{var te,R,ie,he,U,Ie,ze;const K=G;if(K.componentType!=="series")return;const $=K.name;if($==null||$==="")return;(R=(te=K.event)==null?void 0:te.event)==null||R.preventDefault(),(ie=X==null?void 0:X.dispatchAction)==null||ie.call(X,{type:"hideTip"});const se=((U=(he=K.event)==null?void 0:he.event)==null?void 0:U.clientX)??0,J=((ze=(Ie=K.event)==null?void 0:Ie.event)==null?void 0:ze.clientY)??0;m(n.field,String($),{x:se,y:J})}),Object.keys(Y).length>0?Y:void 0},[h,m,n.field]),C=(a==null?void 0:a.stacking)==="percent",N=Y=>C?`${Y.toFixed(1)}%`:ma(Y,r==null?void 0:r.format);let A,M=!1;if(a){const Y=Yc(t,{type:a.type,y:r?{field:r.field,type:r.type}:void 0,series:a.series,stacking:a.stacking},o),G=Y.length>1,X=!!a.stacking;M=G;const K=Ns(o);A=Y.map($=>{const se=Vc($.color,$.gradient??a.gradient);return{type:"bar",name:$.name,data:w?$.data.map((J,te)=>({value:J,itemStyle:{opacity:_[te]===(p==null?void 0:p.value)?1:.3}})):$.data,barWidth:G&&!X?void 0:"60%",itemStyle:{color:se??$.color,borderRadius:K.barBorderRadius},stack:$.stack,...$.opacity!==void 0?{opacity:$.opacity}:{}}})}else{const Y=(r==null?void 0:r.field)??"",G=t.map(K=>{const $=K[Y];return typeof $=="number"?$:parseFloat(String($))||0}),X=Ns(o);A=[{type:"bar",data:w?G.map((K,$)=>({value:K,itemStyle:{opacity:_[$]===(p==null?void 0:p.value)?1:.3}})):G,barWidth:"60%",itemStyle:{color:"#3B82F6",borderRadius:X.barBorderRadius},emphasis:{itemStyle:{color:"#2563EB"}}}]}const O={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:Y=>{const G=Y;if(!Array.isArray(G)||G.length===0)return"";const X=S[G[0].dataIndex]??G[0].name;if(G.length===1){const $=G[0];return`
|
|
69
|
+
<div style="padding: 8px;">
|
|
70
|
+
<div style="font-weight: 600; margin-bottom: 4px;">${X}</div>
|
|
71
|
+
<div>${$.marker} ${(r==null?void 0:r.label)||(r==null?void 0:r.field)||$.seriesName}: ${N($.value)}</div>
|
|
72
|
+
</div>
|
|
73
|
+
`}const K=G.map($=>`<div>${$.marker} ${$.seriesName}: ${N($.value)}</div>`).join("");return`
|
|
74
|
+
<div style="padding: 8px;">
|
|
75
|
+
<div style="font-weight: 600; margin-bottom: 4px;">${X}</div>
|
|
76
|
+
${K}
|
|
77
|
+
</div>
|
|
78
|
+
`}},legend:M?{show:((I=a==null?void 0:a.legend)==null?void 0:I.show)!==!1,...((P=a==null?void 0:a.legend)==null?void 0:P.position)==="top"?{top:0}:((H=a==null?void 0:a.legend)==null?void 0:H.position)==="left"?{left:0,orient:"vertical"}:((F=a==null?void 0:a.legend)==null?void 0:F.position)==="right"?{right:0,orient:"vertical"}:{bottom:0},textStyle:{color:"#6B7280",fontSize:12}}:void 0,grid:{left:"3%",right:"4%",bottom:M?"15%":"10%",top:"10%",containLabel:!0},xAxis:d?{type:"value",axisLabel:{color:"#6B7280",fontSize:12,formatter:Y=>N(Y)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}}:{type:"category",data:_,name:n.label,nameLocation:"middle",nameGap:30,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,hideOverlap:!0},axisLine:{lineStyle:{color:"#E5E7EB"}},axisTick:{show:!1}},yAxis:d?{type:"category",data:_,axisLabel:{color:"#6B7280",fontSize:12},axisLine:{show:!1},axisTick:{show:!1}}:{type:"value",name:r==null?void 0:r.label,nameLocation:"middle",nameGap:80,nameTextStyle:{color:"#6B7280",fontSize:12},...C?{max:100}:{},axisLabel:{color:"#6B7280",fontSize:12,formatter:Y=>N(Y)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}},series:A,animation:!0,animationDuration:300};return g.jsx(jr,{ref:x,option:O,height:l,loading:c,onEvents:v})}),HE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,chartConfig:a,theme:o,height:l=400,loading:c=!1,onCrossFilter:d,onDrillDown:h},p){var A,M,k,O,I;const x=(a==null?void 0:a.series)&&"field"in a.series?$c(t,n):$u(t,n),E=n.type==="temporal"?qc(t,n):x,_=(a==null?void 0:a.stacking)==="percent",S=L.useMemo(()=>{const P={};return d&&(P.click=H=>{const F=H;if(F.componentType!=="series")return;const Y=F.name;Y==null||Y===""||d(n.field,String(Y))}),h&&(P.contextmenu=(H,F)=>{var $,se,J,te,R,ie,he;const Y=H;if(Y.componentType!=="series")return;const G=Y.name;if(G==null||G==="")return;(se=($=Y.event)==null?void 0:$.event)==null||se.preventDefault(),(J=F==null?void 0:F.dispatchAction)==null||J.call(F,{type:"hideTip"});const X=((R=(te=Y.event)==null?void 0:te.event)==null?void 0:R.clientX)??0,K=((he=(ie=Y.event)==null?void 0:ie.event)==null?void 0:he.clientY)??0;h(n.field,String(G),{x:X,y:K})}),Object.keys(P).length>0?P:void 0},[d,h,n.field]);let w,v,C;if(a){const P=Yc(t,{type:a.type,y:r?{field:r.field,type:r.type}:void 0,series:a.series,stacking:a.stacking},o),H=Ns(o);w=P.map(F=>{const Y=Vc(F.color,F.gradient??a.gradient??!0);return{type:"line",name:F.name,data:F.data,smooth:H.smooth,symbol:"none",lineStyle:{width:2,color:F.color,type:F.style==="dashed"?"dashed":F.style==="dotted"?"dotted":"solid"},itemStyle:{color:F.color},areaStyle:{color:Y??F.color},stack:F.stack,...F.opacity!==void 0?{opacity:F.opacity}:{}}}),P.length>1&&(v={show:((A=a.legend)==null?void 0:A.show)!==!1,...((M=a.legend)==null?void 0:M.position)==="top"?{top:0}:((k=a.legend)==null?void 0:k.position)==="left"?{left:0,orient:"vertical"}:((O=a.legend)==null?void 0:O.position)==="right"?{right:0,orient:"vertical"}:{bottom:0},textStyle:{color:"#6B7280",fontSize:12}}),(I=a.interactions)!=null&&I.zoom&&(C=[{type:"inside",start:0,end:100},{type:"slider",start:0,end:100,bottom:0}])}else{const P=(r==null?void 0:r.field)??"";w=[{type:"line",data:t.map(F=>{const Y=F[P];return typeof Y=="number"?Y:parseFloat(String(Y))||0}),smooth:Ns(o).smooth,symbol:"none",lineStyle:{width:2,color:"#10B981"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(16, 185, 129, 0.4)"},{offset:1,color:"rgba(16, 185, 129, 0.05)"}]}}}]}const N={tooltip:{trigger:"axis",formatter:P=>{const H=P;if(!Array.isArray(H)||H.length===0)return"";let Y=`<div style="padding: 8px;"><div style="font-weight: 600; margin-bottom: 4px;">${E[H[0].dataIndex]??H[0].name}</div>`;for(const G of H){const X=_?`${G.value.toFixed(1)}%`:ma(G.value,r==null?void 0:r.format);Y+=`<div>${G.marker} ${G.seriesName}: ${X}</div>`}return Y+="</div>",Y}},legend:v,grid:{left:"3%",right:"4%",bottom:"10%",top:"10%",containLabel:!0},xAxis:{type:"category",data:x,boundaryGap:!1,name:n.label,nameLocation:"middle",nameGap:30,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,hideOverlap:!0},axisLine:{lineStyle:{color:"#E5E7EB"}},axisTick:{show:!1}},yAxis:{type:"value",name:r==null?void 0:r.label,nameLocation:"middle",nameGap:80,nameTextStyle:{color:"#6B7280",fontSize:12},..._?{max:100}:{},axisLabel:{color:"#6B7280",fontSize:12,formatter:P=>_?`${P}%`:ma(P,r==null?void 0:r.format)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}},series:w,...C?{dataZoom:C}:{},animation:!0,animationDuration:300};return g.jsx(jr,{ref:p,option:N,height:l,loading:c,onEvents:S})}),UE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,chartConfig:a,theme:o,height:l=400,loading:c=!1,onCrossFilter:d,activeCrossFilter:h,onDrillDown:p},m){var v,C,N,A;const x=(h==null?void 0:h.field)===n.field,E=L.useMemo(()=>{const M={};return d&&(M.click=k=>{const O=k;if(O.componentType!=="series")return;const I=O.name;I==null||I===""||d(n.field,String(I))}),p&&(M.contextmenu=(k,O)=>{var Y,G,X,K,$,se,J;const I=k;if(I.componentType!=="series")return;const P=I.name;if(P==null||P==="")return;(G=(Y=I.event)==null?void 0:Y.event)==null||G.preventDefault(),(X=O==null?void 0:O.dispatchAction)==null||X.call(O,{type:"hideTip"});const H=(($=(K=I.event)==null?void 0:K.event)==null?void 0:$.clientX)??0,F=((J=(se=I.event)==null?void 0:se.event)==null?void 0:J.clientY)??0;p(n.field,String(P),{x:H,y:F})}),Object.keys(M).length>0?M:void 0},[d,p,n.field]),_=t.map((M,k)=>{const O=M[r.field],I=typeof O=="number"?O:parseFloat(String(O))||0;return{name:String(M[n.field]??""),value:I,itemStyle:{color:no(k,void 0,o)}}}),S=M=>{if(r.format){if(r.format.includes("$"))return`$${M.toLocaleString()}`;if(r.format.includes("%"))return`${M.toFixed(1)}%`}return M.toLocaleString()},w={tooltip:{trigger:"item",formatter:M=>{const k=M;return`
|
|
79
|
+
<div style="padding: 8px;">
|
|
80
|
+
<div style="font-weight: 600; margin-bottom: 4px;">${k.name}</div>
|
|
81
|
+
<div>${k.marker} ${r.label||r.field}: ${S(k.value)}</div>
|
|
82
|
+
<div style="color: #6B7280; font-size: 12px;">${k.percent.toFixed(1)}%</div>
|
|
83
|
+
</div>
|
|
84
|
+
`}},legend:{show:((v=a==null?void 0:a.legend)==null?void 0:v.show)!==!1,...((C=a==null?void 0:a.legend)==null?void 0:C.position)==="top"?{top:0}:((N=a==null?void 0:a.legend)==null?void 0:N.position)==="bottom"?{bottom:0}:((A=a==null?void 0:a.legend)==null?void 0:A.position)==="left"?{left:0,orient:"vertical",top:"center"}:{orient:"vertical",right:"5%",top:"center"},textStyle:{color:"#6B7280",fontSize:12}},series:[{type:"pie",radius:["40%","70%"],center:["40%","50%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:Ns(o).pieBorderRadius,borderColor:"#fff",borderWidth:2},label:{show:!1},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"}},labelLine:{show:!1},data:_.map(M=>({...M,itemStyle:{...M.itemStyle,...x&&(h==null?void 0:h.value)!==M.name?{opacity:.3}:{}}}))}],animation:!0,animationDuration:300};return g.jsx(jr,{ref:m,option:w,height:l,loading:c,onEvents:E})}),zE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,centerValue:a,chartConfig:o,theme:l,height:c=400,loading:d=!1,onCrossFilter:h,activeCrossFilter:p,onDrillDown:m},x){var A,M,k,O,I;const E=(p==null?void 0:p.field)===n.field,_=L.useMemo(()=>{const P={};return h&&(P.click=H=>{const F=H;if(F.componentType!=="series")return;const Y=F.name;Y==null||Y===""||h(n.field,String(Y))}),m&&(P.contextmenu=(H,F)=>{var $,se,J,te,R,ie,he;const Y=H;if(Y.componentType!=="series")return;const G=Y.name;if(G==null||G==="")return;(se=($=Y.event)==null?void 0:$.event)==null||se.preventDefault(),(J=F==null?void 0:F.dispatchAction)==null||J.call(F,{type:"hideTip"});const X=((R=(te=Y.event)==null?void 0:te.event)==null?void 0:R.clientX)??0,K=((he=(ie=Y.event)==null?void 0:ie.event)==null?void 0:he.clientY)??0;m(n.field,String(G),{x:X,y:K})}),Object.keys(P).length>0?P:void 0},[h,m,n.field]),S=t.map((P,H)=>{const F=P[r.field],Y=typeof F=="number"?F:parseFloat(String(F))||0;return{name:String(P[n.field]??""),value:Y,itemStyle:{color:no(H,void 0,l)}}});let w=null;if(a)if(a.field==="total"||!a.field)w=S.reduce((P,H)=>P+H.value,0);else{const P=(A=t[0])==null?void 0:A[a.field];w=typeof P=="number"?P:parseFloat(String(P))||null}const v=(P,H)=>{if(H){if(H.includes("$"))return`$${P.toLocaleString()}`;if(H.includes("%"))return`${P.toFixed(1)}%`}return P.toLocaleString()},C=w!==null?a!=null&&a.label?`{value|${v(w,(a==null?void 0:a.format)||r.format)}}
|
|
85
|
+
{label|${a.label}}`:`{value|${v(w,(a==null?void 0:a.format)||r.format)}}`:"",N={tooltip:{trigger:"item",formatter:P=>{const H=P;return`
|
|
86
|
+
<div style="padding: 8px;">
|
|
87
|
+
<div style="font-weight: 600; margin-bottom: 4px;">${H.name}</div>
|
|
88
|
+
<div>${H.marker} ${r.label||r.field}: ${v(H.value,r.format)}</div>
|
|
89
|
+
<div style="color: #6B7280; font-size: 12px;">${H.percent.toFixed(1)}%</div>
|
|
90
|
+
</div>
|
|
91
|
+
`}},legend:{show:((M=o==null?void 0:o.legend)==null?void 0:M.show)!==!1,...((k=o==null?void 0:o.legend)==null?void 0:k.position)==="top"?{top:0}:((O=o==null?void 0:o.legend)==null?void 0:O.position)==="bottom"?{bottom:0}:((I=o==null?void 0:o.legend)==null?void 0:I.position)==="left"?{left:0,orient:"vertical",top:"center"}:{orient:"vertical",right:"5%",top:"center"},textStyle:{color:"#6B7280",fontSize:12}},series:[{type:"pie",radius:["45%","70%"],center:["40%","50%"],avoidLabelOverlap:!0,itemStyle:{borderRadius:Ns(l).pieBorderRadius,borderColor:"#fff",borderWidth:2},label:{show:w!==null,position:"center",formatter:C,rich:{value:{fontSize:22,fontWeight:"bold",color:"#1F2937",lineHeight:30},label:{fontSize:12,color:"#6B7280",lineHeight:20}}},emphasis:{label:{show:!0,fontSize:14,fontWeight:"bold"},scaleSize:5},labelLine:{show:!1},data:S.map(P=>({...P,itemStyle:{...P.itemStyle,...E&&(p==null?void 0:p.value)!==P.name?{opacity:.3}:{}}}))}],animation:!0,animationDuration:300};return g.jsx(jr,{ref:x,option:N,height:c,loading:d,onEvents:_})}),TN=5,vN=50;function ah(e){if(e==null)return null;const t=typeof e=="number"?e:parseFloat(String(e));return isNaN(t)?null:t}function wN(e,t,n,r,a){return n===t?(r+a)/2:r+(e-t)/(n-t)*(a-r)}function SN(e,t,n,r){const{size:a,group:o}=r,l=(a==null?void 0:a.min)??TN,c=(a==null?void 0:a.max)??vN,d=[];for(const E of e){const _=ah(E[t]),S=ah(E[n]);if(_===null||S===null)continue;let w=null;if(a&&(w=ah(E[a.field]),w===null))continue;const v=o?String(E[o.field]??"Other"):"data";d.push({x:_,y:S,sizeVal:w,groupVal:v})}let h=1/0,p=-1/0;if(a){for(const E of d)E.sizeVal!==null&&(h=Math.min(h,E.sizeVal),p=Math.max(p,E.sizeVal));isFinite(h)||(h=0,p=0)}const m=new Map;for(const E of d){const _=m.get(E.groupVal);_?_.push(E):m.set(E.groupVal,[E])}if(m.size===0)return{series:[{name:"data",data:[],symbolSizes:a?[]:void 0}]};const x=[];for(const[E,_]of m){const S=[],w=[];for(const v of _)a&&v.sizeVal!==null?(S.push([v.x,v.y,v.sizeVal]),w.push(wN(v.sizeVal,h,p,l,c))):S.push([v.x,v.y]);x.push({name:E,data:S,symbolSizes:a?w:void 0})}return{series:x}}function _N(e){const t=e.length;if(t<2)return null;let n=0,r=0,a=0,o=0;for(const[w,v]of e)n+=w,r+=v,a+=w*v,o+=w*w;const l=t*o-n*n;if(l===0)return null;const c=(t*a-n*r)/l,d=(r-c*n)/t,h=r/t;let p=0,m=0;for(const[w,v]of e){const C=c*w+d;p+=(v-C)**2,m+=(v-h)**2}const x=m===0?1:1-p/m,E=e.map(([w])=>w),_=Math.min(...E),S=Math.max(...E);return{slope:c,intercept:d,rSquared:x,line:[[_,c*_+d],[S,c*S+d]]}}const WE=L.forwardRef(function({data:t,xAxis:n,yAxis:r,chartConfig:a,theme:o,height:l=400,loading:c=!1},d){const h=L.useMemo(()=>{var v,C,N;const p={size:a==null?void 0:a.size,group:a==null?void 0:a.group},{series:m}=SN(t,n.field,r.field,p),x=(A,M)=>{if(M.format){if(M.format.includes("$"))return`$${A.toLocaleString()}`;if(M.format.includes("%"))return`${A.toFixed(1)}%`}return A.toLocaleString()},E=[],_=[];m.forEach((A,M)=>{const k=no(M,m.length===1&&typeof(a==null?void 0:a.color)=="string"?a.color:void 0,o),O=A.symbolSizes;if(E.push({type:"scatter",name:A.name,data:A.data,symbolSize:O?(I,P)=>O[P.dataIndex]??10:10,itemStyle:{color:k},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.3)"}}}),a!=null&&a.regression&&A.data.length>=2){const I=A.data.map(H=>[H[0],H[1]]),P=_N(I);if(P){E.push({type:"line",name:`${A.name} trend`,data:P.line,showSymbol:!1,lineStyle:{color:k,type:"dashed",opacity:.6,width:2},itemStyle:{color:k},tooltip:{show:!1},silent:!0});const H=[];if(a.regression.show_equation){const F=P.intercept>=0?"+":"-";H.push(`y = ${P.slope.toFixed(2)}x ${F} ${Math.abs(P.intercept).toFixed(2)}`)}if(a.regression.show_r_squared&&H.push(`R² = ${P.rSquared.toFixed(3)}`),H.length>0){const F=M*20;_.push({type:"text",left:"70%",top:`${12+F}%`,style:{text:H.join(" "),fill:k,fontSize:11,fontFamily:"monospace"}})}}}});const S=((v=a==null?void 0:a.size)==null?void 0:v.label)??((C=a==null?void 0:a.size)==null?void 0:C.field);return{tooltip:{trigger:"item",formatter:A=>{const M=A,k=M.value[0]??0,O=M.value[1]??0,I=M.value[2];let P='<div style="padding: 8px;">';return m.length>1&&(P+=`<div style="font-weight: 600; margin-bottom: 4px;">${M.seriesName}</div>`),P+=`<div>${M.marker} ${n.label||n.field}: ${x(k,n)}</div>`,P+=`<div>${M.marker} ${r.label||r.field}: ${x(O,r)}</div>`,S&&I!=null&&(P+=`<div>${M.marker} ${S}: ${I.toLocaleString()}</div>`),P+="</div>",P}},legend:m.length>1?{show:((N=a==null?void 0:a.legend)==null?void 0:N.show)!==!1,top:0,data:m.map(A=>A.name)}:void 0,grid:{left:"3%",right:"4%",bottom:"3%",top:m.length>1?"15%":"10%",containLabel:!0},xAxis:{type:"value",name:n.label,nameLocation:"middle",nameGap:30,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,formatter:A=>x(A,n)},axisLine:{lineStyle:{color:"#E5E7EB"}},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}},yAxis:{type:"value",name:r.label,nameLocation:"middle",nameGap:50,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,formatter:A=>x(A,r)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}},series:E,graphic:_.length>0?_:void 0,animation:!0,animationDuration:300}},[t,n,r,a,o]);return g.jsx(jr,{ref:d,option:h,height:l,loading:c})});function CN(e,t){return e==null?"-":typeof e=="number"?e.toLocaleString():String(e)}function YE({data:e,columns:t,height:n=400,loading:r=!1}){const[a,o]=L.useState(null),[l,c]=L.useState(null),d=m=>{a===m?l==="asc"?c("desc"):l==="desc"?(o(null),c(null)):c("asc"):(o(m),c("asc"))},h=L.useMemo(()=>!a||!l?e:[...e].sort((m,x)=>{const E=m[a],_=x[a];if(E==null)return 1;if(_==null)return-1;let S=0;return typeof E=="number"&&typeof _=="number"?S=E-_:S=String(E).localeCompare(String(_)),l==="asc"?S:-S}),[e,a,l]);if(r)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsx("div",{className:"animate-pulse bg-gray-100 w-full h-full rounded"})});const p=typeof n=="number"?`${n}px`:n;return g.jsxs("div",{className:"h-full overflow-auto",style:{maxHeight:p},children:[g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"sticky top-0 bg-gray-50 border-b border-gray-200",children:g.jsx("tr",{children:t.map(m=>g.jsx("th",{className:"px-4 py-3 text-left font-medium text-gray-600 cursor-pointer hover:bg-gray-100 select-none",onClick:()=>d(m.name),children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{children:m.name}),g.jsxs("span",{className:"text-gray-400",children:[a===m.name&&l==="asc"&&"↑",a===m.name&&l==="desc"&&"↓"]})]})},m.name))})}),g.jsx("tbody",{children:h.map((m,x)=>g.jsx("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:t.map(E=>g.jsx("td",{className:"px-4 py-3 text-gray-700",children:CN(m[E.name])},E.name))},x))})]}),h.length===0&&g.jsx("div",{className:"text-center py-8 text-gray-400",children:"No data"})]})}function kN(e,t){return t!=null&&t.includes("$")?`$${e.toLocaleString()}`:t!=null&&t.includes("%")?`${e.toFixed(1)}%`:e>=1e9?`${(e/1e9).toFixed(1)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function NN({data:e,yAxis:t,loading:n=!1,title:r}){if(n)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsx("div",{className:"animate-pulse bg-gray-200 h-16 w-32 rounded"})});if(!e||e.length===0)return g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"No data"});const a=e[0],o=a==null?void 0:a[t.field],l=typeof o=="number"?o:parseFloat(String(o))||0,c=kN(l,t.format),d=t.label||t.field;return g.jsxs("div",{className:"h-full flex flex-col items-center justify-center p-4",children:[g.jsx("div",{className:"text-4xl font-bold text-gray-900 tabular-nums",children:c}),(r||d)&&g.jsx("div",{className:"text-sm text-gray-500 mt-2 text-center",children:r||d})]})}const qE=L.forwardRef(function({data:t,xAxis:n,chartConfig:r,theme:a,height:o=400,loading:l=!1,onCrossFilter:c,onDrillDown:d},h){var M,k,O,I,P,H;const m=(r==null?void 0:r.series)&&"field"in r.series?$c(t,n):$u(t,n),x=n.type==="temporal"?qc(t,n):m,E=L.useMemo(()=>{const F={};return c&&(F.click=Y=>{const G=Y;if(G.componentType!=="series")return;const X=G.name;X==null||X===""||c(n.field,String(X))}),d&&(F.contextmenu=(Y,G)=>{var J,te,R,ie,he,U,Ie;const X=Y;if(X.componentType!=="series")return;const K=X.name;if(K==null||K==="")return;(te=(J=X.event)==null?void 0:J.event)==null||te.preventDefault(),(R=G==null?void 0:G.dispatchAction)==null||R.call(G,{type:"hideTip"});const $=((he=(ie=X.event)==null?void 0:ie.event)==null?void 0:he.clientX)??0,se=((Ie=(U=X.event)==null?void 0:U.event)==null?void 0:Ie.clientY)??0;d(n.field,String(K),{x:$,y:se})}),Object.keys(F).length>0?F:void 0},[c,d,n.field]),_=Yc(t,{series:r.series},a),S=(M=r.axes)==null?void 0:M.left,w=(k=r.axes)==null?void 0:k.right,v=[];v.push({type:"value",name:S==null?void 0:S.label,nameLocation:"middle",nameGap:80,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,formatter:F=>ma(F,S==null?void 0:S.format)},axisLine:{show:!1},splitLine:{lineStyle:{color:"#E5E7EB",type:"dashed"}}}),w&&v.push({type:"value",name:w.label,nameLocation:"middle",nameGap:60,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,formatter:F=>ma(F,w.format)},axisLine:{show:!1},splitLine:{show:!1}});const C=Ns(a),N=_.map(F=>{const Y=Vc(F.color,F.gradient??r.gradient),G=F.chartType??"bar",X={name:F.name,data:F.data,yAxisIndex:F.yAxisIndex??0,itemStyle:{color:Y??F.color},...F.opacity!==void 0?{opacity:F.opacity}:{}};return G==="line"?{...X,type:"line",smooth:C.smooth,symbol:"circle",symbolSize:6,lineStyle:{width:2,color:F.color,type:F.style==="dashed"?"dashed":F.style==="dotted"?"dotted":"solid"}}:G==="area"?{...X,type:"line",smooth:C.smooth,symbol:"none",lineStyle:{width:2,color:F.color},areaStyle:{color:Y??F.color}}:{...X,type:"bar",barWidth:"60%",itemStyle:{color:Y??F.color,borderRadius:C.barBorderRadius}}}),A={tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:F=>{const Y=F;if(!Array.isArray(Y)||Y.length===0)return"";let X=`<div style="padding: 8px;"><div style="font-weight: 600; margin-bottom: 4px;">${x[Y[0].dataIndex]??Y[0].name}</div>`;for(const K of Y){const $=_.find(J=>J.name===K.seriesName),se=($==null?void 0:$.yAxisIndex)===1?w:S;X+=`<div>${K.marker} ${K.seriesName}: ${ma(K.value,se==null?void 0:se.format)}</div>`}return X+="</div>",X}},legend:{show:((O=r.legend)==null?void 0:O.show)!==!1,...((I=r.legend)==null?void 0:I.position)==="top"?{top:0}:((P=r.legend)==null?void 0:P.position)==="left"?{left:0,orient:"vertical"}:((H=r.legend)==null?void 0:H.position)==="right"?{right:0,orient:"vertical"}:{bottom:0},textStyle:{color:"#6B7280",fontSize:12}},grid:{left:"3%",right:w?"8%":"4%",bottom:"15%",top:"10%",containLabel:!0},xAxis:{type:"category",data:m,name:n.label,nameLocation:"middle",nameGap:30,nameTextStyle:{color:"#6B7280",fontSize:12},axisLabel:{color:"#6B7280",fontSize:12,hideOverlap:!0},axisLine:{lineStyle:{color:"#E5E7EB"}},axisTick:{show:!1}},yAxis:v,series:N,animation:!0,animationDuration:300};return g.jsx(jr,{ref:h,option:A,height:o,loading:l,onEvents:E})}),$E=L.forwardRef(function({data:t,chartConfig:n,height:r=400,loading:a=!1},o){const l=L.useMemo(()=>{var C,N;const c=n.x.field,d=n.y.field,h=n.value.field,p=[...new Set(t.map(A=>String(A[c]??"")))],m=[...new Set(t.map(A=>String(A[d]??"")))],x=[];let E=1/0,_=-1/0;for(const A of t){const M=String(A[c]??""),k=String(A[d]??""),O=Number(A[h]??0),I=p.indexOf(M),P=m.indexOf(k);I>=0&&P>=0&&(x.push([I,P,O]),O<E&&(E=O),O>_&&(_=O))}E===1/0&&(E=0),_===-1/0&&(_=0);const S=((C=n.color_range)==null?void 0:C.min)??"#EBF5FB",w=((N=n.color_range)==null?void 0:N.max)??"#1A5276",v=n.show_values??!0;return{tooltip:{position:"top",formatter:A=>{const M=A,k=p[M.value[0]]??"",O=m[M.value[1]]??"",I=M.value[2],P=n.value.label??h;return`${k}, ${O}<br/>${P}: <b>${I}</b>`}},grid:{left:"3%",right:"8%",bottom:"10%",top:"6%",containLabel:!0},xAxis:{type:"category",data:p,name:n.x.label,splitArea:{show:!0}},yAxis:{type:"category",data:m,name:n.y.label,splitArea:{show:!0}},visualMap:{min:E,max:_,calculable:!0,orient:"horizontal",left:"center",bottom:"0%",inRange:{color:[S,w]}},series:[{type:"heatmap",data:x,label:{show:v},emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}},[t,n]);return g.jsx(jr,{ref:o,option:l,height:r,loading:a})}),VE=L.forwardRef(function({data:t,chartConfig:n,theme:r,height:a=400,loading:o=!1},l){const c=L.useMemo(()=>{var _;const d=n.stage.field,h=n.value.field,p=n.show_conversion??!0,m=t.map(S=>({name:String(S[d]??""),value:Number(S[h]??0)})),x={};for(let S=1;S<m.length;S++){const w=m[S-1],v=m[S];if(w&&v&&w.value>0){const C=(v.value/w.value*100).toFixed(1);x[v.name]=`${C}% of ${w.name}`}}const E=n.color??((_=r==null?void 0:r.palette)==null?void 0:_[0])??"#3B82F6";return{tooltip:{trigger:"item",formatter:S=>{const w=S;let v=`${w.name}: <b>${w.value.toLocaleString()}</b>`;return p&&x[w.name]&&(v+=`<br/><span style="color:#999">${x[w.name]}</span>`),v}},series:[{type:"funnel",left:"10%",top:"10%",bottom:"10%",width:"80%",sort:"descending",gap:2,label:{show:!0,position:"inside",formatter:S=>{const w=S;return`${w.name}
|
|
92
|
+
${w.value.toLocaleString()}`}},itemStyle:{borderColor:"#fff",borderWidth:1,color:S=>{const v=1-S.dataIndex*.15;return`${E}${Math.round(Math.max(v,.3)*255).toString(16).padStart(2,"0")}`}},data:m}]}},[t,n,r]);return g.jsx(jr,{ref:l,option:c,height:a,loading:o})}),QE=L.forwardRef(function({data:t,chartConfig:n,height:r=400,loading:a=!1},o){const l=L.useMemo(()=>{var C,N,A;const c=n.category.field,d=n.value.field,h=n.total_field,p=((C=n.colors)==null?void 0:C.increase)??"#22C55E",m=((N=n.colors)==null?void 0:N.decrease)??"#EF4444",x=((A=n.colors)==null?void 0:A.total)??"#3B82F6",E=[],_=[],S=[],w=[];let v=0;for(const M of t){const k=String(M[c]??""),O=Number(M[d]??0),I=h?!!M[h]:!1;E.push(k),I?(_.push(Math.min(0,O)),S.push(Math.abs(O)),w.push(x),v=O):(O>=0?(_.push(v),S.push(O),w.push(p)):(_.push(v+O),S.push(Math.abs(O)),w.push(m)),v+=O)}return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:M=>{var F,Y;const k=M;if(!k[0])return"";const O=k[0].dataIndex,I=Number(((F=t[O])==null?void 0:F[d])??0),H=!(h?!!((Y=t[O])!=null&&Y[h]):!1)&&I>=0?"+":"";return`${k[0].name}<br/><b>${H}${I.toLocaleString()}</b>`}},grid:{left:"3%",right:"4%",bottom:"10%",containLabel:!0},xAxis:{type:"category",data:E,axisLabel:{rotate:E.length>6?30:0}},yAxis:{type:"value"},series:[{type:"bar",stack:"waterfall",data:_,itemStyle:{color:"transparent",borderColor:"transparent"},emphasis:{itemStyle:{color:"transparent",borderColor:"transparent"}},tooltip:{show:!1}},{type:"bar",stack:"waterfall",data:S.map((M,k)=>({value:M,itemStyle:{color:w[k]}})),label:{show:!0,position:"top",formatter:M=>{var H,F;const k=M,O=Number(((H=t[k.dataIndex])==null?void 0:H[d])??0);return(h?!!((F=t[k.dataIndex])!=null&&F[h]):!1)?O.toLocaleString():`${O>=0?"+":""}${O.toLocaleString()}`}}}]}},[t,n]);return g.jsx(jr,{ref:o,option:l,height:r,loading:a})}),GE=L.forwardRef(function({data:t,chartConfig:n,theme:r,height:a=400,loading:o=!1},l){const c=L.useMemo(()=>{var S;const d=n.value.field,h=n.min??0,p=n.max??100,m=n.format??"",x=t[0]?Number(t[0][d]??0):0,E=Math.min(Math.max(x,h),p);let _;if(n.thresholds&&n.thresholds.length>0){const w=p-h||1;_=n.thresholds.map(v=>[(v.value-h)/w,v.color])}else _=[[1,((S=r==null?void 0:r.palette)==null?void 0:S[0])??"#3B82F6"]];return{series:[{type:"gauge",min:h,max:p,progress:{show:!0,width:18},axisLine:{lineStyle:{width:18,color:_}},axisTick:{show:!1},splitLine:{length:10,lineStyle:{width:2,color:"#999"}},axisLabel:{distance:25,color:"#999",fontSize:12},pointer:{itemStyle:{color:"auto"}},anchor:{show:!0,showAbove:!0,size:20,itemStyle:{borderWidth:8}},title:{show:!1},detail:{valueAnimation:!0,fontSize:28,offsetCenter:[0,"70%"],formatter:`{value}${m}`},data:[{value:E}]}]}},[t,n,r]);return g.jsx(jr,{ref:l,option:c,height:a,loading:o})});function XE({onRefresh:e,onExportCSV:t,onExportPNG:n,onExportSVG:r,onExportPDF:a,isRefreshing:o=!1,hideImageExport:l=!1}){const[c,d]=L.useState(!1),h=L.useRef(null);return L.useEffect(()=>{const p=m=>{h.current&&!h.current.contains(m.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),g.jsxs("div",{className:"relative",ref:h,children:[g.jsx("button",{onClick:()=>d(!c),className:"p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors",title:"Chart actions",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})})}),c&&g.jsxs("div",{className:"absolute right-0 top-full mt-1 w-40 bg-white rounded-md shadow-lg border border-gray-200 z-50 py-1",children:[g.jsxs("button",{onClick:()=>{e(),d(!1)},disabled:o,className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 disabled:opacity-50",children:[g.jsx("svg",{className:`w-4 h-4 ${o?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),g.jsx("div",{className:"border-t border-gray-100 my-1"}),g.jsxs("button",{onClick:()=>{t(),d(!1)},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Export CSV"]}),!l&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>{n(),d(!1)},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Export PNG"]}),g.jsxs("button",{onClick:()=>{r(),d(!1)},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})}),"Export SVG"]}),a&&g.jsxs("button",{onClick:()=>{a(),d(!1)},className:"w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),"Export PDF"]})]})]})]})}function KE({x:e,y:t,targetChartTitle:n,onDrillDown:r,onClose:a}){const o=L.useRef(null);return L.useEffect(()=>{const l=d=>{o.current&&!o.current.contains(d.target)&&a()},c=d=>{d.key==="Escape"&&a()};return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[a]),g.jsx("div",{ref:o,className:"fixed z-[9999] bg-white border border-gray-200 rounded-lg shadow-lg py-1 min-w-[200px]",style:{left:e,top:t},children:g.jsxs("button",{className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition-colors",onClick:r,children:["Drill down to ",n]})})}const ON={day:{label:"Date",format:"%b %d, %Y"},week:{label:"Week Starting",format:"%b %d"},month:{label:"Month",format:"%b '%y"},quarter:{label:"Quarter",format:"quarter"},year:{label:"Year",format:"%Y"}};function DN({chartName:e,drillParams:t}){var $,se,J,te;const{data:n,isLoading:r}=Fb(e),{data:a,isLoading:o,error:l}=jb(e),{data:c}=io(),d=_0(),h=Ye(R=>R.getEffectiveFilters),p=L.useRef(null),[m,x]=L.useState("chart"),[E,_]=L.useState(!1),S=(()=>{try{const R=sessionStorage.getItem("yamchart-last-dashboard");if(R)return JSON.parse(R)}catch{}return null})(),w=t==null?void 0:t._from,v=t?Object.fromEntries(Object.entries(t).filter(([R])=>!R.startsWith("_"))):{},C=Object.keys(v).length>0,N=Object.entries(v).map(([R,ie])=>`${R}: ${ie}`).join(", "),M=h(e).granularity,k=M?ON[M]:void 0,[O,I]=L.useState(null),P=L.useCallback((R,ie,he)=>{var U;(U=n==null?void 0:n.drillDown)!=null&&U.chart&&I({x:he.x,y:he.y,field:R,value:ie})},[($=n==null?void 0:n.drillDown)==null?void 0:$.chart]),H=L.useCallback(()=>{var he,U;if(!O||!((he=n==null?void 0:n.drillDown)!=null&&he.chart))return;const R=n.drillDown.field??((U=n.chart.x)==null?void 0:U.field)??O.field,ie=new URLSearchParams({[R]:O.value,_from:e});window.location.hash=`/charts/${n.drillDown.chart}?${ie.toString()}`,I(null)},[O,n,e]),F=()=>{!a||!n||Wc(a.rows,a.columns,n.name||e)},Y=()=>{var ie;const R=(ie=p.current)==null?void 0:ie.getDataURL("png");R&&n&&Dc(R,`${n.name||e}.png`)};if(r)return g.jsx("div",{className:"h-full flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:"Loading chart..."});if(!n)return g.jsxs("div",{className:"h-full flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:["Chart not found: ",e]});const G=(se=n.drillDown)!=null&&se.chart?P:void 0,X=k?{...n.chart.x,label:k.label,format:k.format}:n.chart.x,K=()=>{if(!a)return g.jsx("div",{className:"h-full animate-pulse",style:{background:"var(--yc-color-background)"}});if(m==="table"&&a)return g.jsx(YE,{data:a.rows,columns:a.columns,height:"100%",loading:o});switch(n.chart.type){case"line":return n.chart.x&&(n.chart.y||n.chart.series)?g.jsx(BE,{ref:p,data:a.rows,columns:a.columns,xAxis:X,yAxis:n.chart.y,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"bar":return n.chart.x&&(n.chart.y||n.chart.series)?g.jsx(jE,{ref:p,data:a.rows,xAxis:X,yAxis:n.chart.y,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"area":return n.chart.x&&(n.chart.y||n.chart.series)?g.jsx(HE,{ref:p,data:a.rows,xAxis:X,yAxis:n.chart.y,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"pie":return n.chart.x&&n.chart.y?g.jsx(UE,{ref:p,data:a.rows,xAxis:n.chart.x,yAxis:n.chart.y,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"donut":return n.chart.x&&n.chart.y?g.jsx(zE,{ref:p,data:a.rows,xAxis:n.chart.x,yAxis:n.chart.y,centerValue:n.chart.centerValue,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"scatter":return n.chart.x&&n.chart.y?g.jsx(WE,{ref:p,data:a.rows,xAxis:n.chart.x,yAxis:n.chart.y,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o}):null;case"combo":return n.chart.x?g.jsx(qE,{ref:p,data:a.rows,xAxis:X,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o,onDrillDown:G}):null;case"heatmap":return g.jsx($E,{ref:p,data:a.rows,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o});case"funnel":return g.jsx(VE,{ref:p,data:a.rows,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o});case"waterfall":return g.jsx(QE,{ref:p,data:a.rows,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o});case"gauge":return g.jsx(GE,{ref:p,data:a.rows,chartConfig:n.chart,theme:c==null?void 0:c.theme,loading:o});default:return g.jsxs("div",{className:"h-full flex items-center justify-center",style:{color:"var(--yc-color-text-secondary)"},children:['Chart type "',n.chart.type,'" not yet implemented']})}};return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"px-6 pt-4 pb-3 space-y-3",children:[!w&&S&&g.jsxs("div",{className:"flex items-center gap-1.5 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),g.jsx("a",{href:`#/dashboards/${S.name}`,className:"hover:underline",style:{color:"var(--yc-color-primary)"},children:S.title})]}),w&&g.jsxs("div",{className:"flex items-center gap-2 text-sm",style:{color:"var(--yc-color-text-secondary)"},children:[g.jsx("button",{onClick:()=>{window.location.hash=`/charts/${w}`},className:"hover:underline",style:{color:"var(--yc-color-primary)"},children:w}),g.jsx("span",{children:"/"}),g.jsx("span",{style:{color:"var(--yc-color-text)"},className:"font-medium",children:n.title}),N&&g.jsxs("span",{children:["(",N,")"]})]}),g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-xl font-semibold",style:{color:"var(--yc-color-text)",fontFamily:"var(--yc-font-heading)"},children:n.title}),n.description&&g.jsx("p",{className:"text-sm mt-1",style:{color:"var(--yc-color-text-secondary)"},children:n.description})]}),g.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[g.jsx("button",{onClick:()=>d(e),className:"p-2 rounded hover:bg-black/5 transition-colors",style:{color:"var(--yc-color-text-secondary)"},title:"Refresh",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),g.jsx(nN,{resourceType:"chart",resourceName:e})]})]}),n.parameters.length>0&&g.jsx(PE,{parameters:n.parameters,chartName:e}),C&&g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-xs font-medium",style:{color:"var(--yc-color-text-secondary)"},children:"Filtered:"}),Object.entries(v).map(([R,ie])=>g.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs rounded-full",style:{backgroundColor:"color-mix(in srgb, var(--yc-color-primary) 10%, transparent)",color:"var(--yc-color-primary)"},children:[R,": ",ie]},R))]})]}),g.jsx("div",{className:"flex-1 min-h-0 px-6",children:g.jsx("div",{className:"h-full rounded-lg overflow-hidden",style:{background:"var(--yc-color-surface)",border:"var(--yc-card-border)",boxShadow:"var(--yc-shadow)",borderRadius:"var(--yc-radius)"},children:l?g.jsx("div",{className:"h-full flex items-center justify-center text-red-500 text-sm",children:l.message}):K()})}),g.jsx("div",{className:"px-6 pb-2",children:g.jsx(rN,{rowCount:a==null?void 0:a.meta.rowCount,durationMs:a==null?void 0:a.meta.durationMs,cached:a==null?void 0:a.meta.cached,view:m,onToggleView:x,onExportCSV:F,onExportPNG:Y,onShowSql:()=>_(!E)})}),C&&a&&g.jsx("div",{className:"px-6 pb-4",children:g.jsx(fN,{data:a.rows,columns:a.columns,drillDownColumns:(J=n.drillDown)==null?void 0:J.columns,filterDisplay:N,chartName:e})}),O&&((te=n.drillDown)==null?void 0:te.chart)&&g.jsx(KE,{x:O.x,y:O.y,targetChartTitle:n.drillDown.chart,onDrillDown:H,onClose:()=>I(null)}),g.jsx(oN,{isOpen:E,onClose:()=>_(!1),compiledSql:a==null?void 0:a.meta.compiledSql,modelName:e,durationMs:a==null?void 0:a.meta.durationMs,rowCount:a==null?void 0:a.meta.rowCount,cached:a==null?void 0:a.meta.cached})]})}function AN(e=50){const t=[],n=[];return{push(r){t.push(r),t.length>e&&t.shift(),n.length=0},undo(){if(t.length===0)return null;const r=t.pop();return n.push(r),r},redo(){if(n.length===0)return null;const r=n.pop();return t.push(r),r},canUndo(){return t.length>0},canRedo(){return n.length>0},clear(){t.length=0,n.length=0}}}const JE=L.createContext(null);function IN({children:e}){const[t,n]=L.useState(!1),[r,a]=L.useState(null),[o,l]=L.useState(null),[c,d]=L.useState(null),h=L.useRef(AN()),[p,m]=L.useState(!1),[x,E]=L.useState(!1),_=r!==null,S=L.useMemo(()=>r||o,[r,o]),w=L.useCallback(O=>{l(O)},[]),v=L.useCallback(O=>{if(O===null){a(null);return}const I=r||o;I&&h.current.push(I),a(O),m(h.current.canUndo()),E(h.current.canRedo())},[r,o]),C=L.useCallback(()=>{const O=h.current.undo();O&&(a(O),m(h.current.canUndo()),E(h.current.canRedo()))},[]),N=L.useCallback(()=>{const O=h.current.redo();O&&(a(O),m(h.current.canUndo()),E(h.current.canRedo()))},[]);L.useEffect(()=>{h.current.clear(),m(!1),E(!1),d(null)},[t]),L.useEffect(()=>{if(!t)return;const O=I=>{const P=I.metaKey||I.ctrlKey;P&&I.key==="z"&&!I.shiftKey&&(I.preventDefault(),C()),P&&I.key==="z"&&I.shiftKey&&(I.preventDefault(),N())};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[t,C,N]);const A=L.useCallback(O=>{var X;const I=r||o;if(!I)return;const H=O.type==="chart"&&((X=O.ref)==null?void 0:X.toLowerCase().includes("kpi"))?3:6,Y={height:100,widgets:[{...O,cols:H}]},G={...I,rows:[...I.rows,Y]};v(G)},[r,o,v]),M=L.useCallback((O,I)=>{const P=r||o;if(!P)return;const H=P.rows.map((Y,G)=>{if(G!==O)return Y;const X=Y.widgets.filter((K,$)=>$!==I);return{...Y,widgets:X}}).filter(Y=>Y.widgets.length>0),F={...P,rows:H};v(F)},[r,o,v]),k=L.useCallback((O,I,P)=>{const H=r||o;if(!H)return;const F=H.rows.map((G,X)=>{if(X!==O)return G;const K=G.widgets.map(($,se)=>se!==I?$:{...$,...P});return{...G,widgets:K}}),Y={...H,rows:F};v(Y)},[r,o,v]);return g.jsx(JE.Provider,{value:{isEditing:t,setIsEditing:n,pendingLayout:r,setPendingLayout:v,hasChanges:_,originalLayout:o,setOriginalLayout:w,currentLayout:S,addWidget:A,removeWidget:M,updateWidget:k,pendingFilters:c,setPendingFilters:d,undo:C,redo:N,canUndo:p,canRedo:x},children:e})}function fo(){const e=L.useContext(JE);if(!e)throw new Error("useEditMode must be used within EditModeProvider");return e}function ho(e){const{margin:t,containerPadding:n,containerWidth:r,cols:a}=e;return(r-t[0]*(a-1)-n[0]*2)/a}function ro(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function su(e,t,n,r,a,o,l){const{margin:c,containerPadding:d,rowHeight:h}=e,p=ho(e);let m,x,E,_;if(l?(m=Math.round(l.width),x=Math.round(l.height)):(m=ro(r,p,c[0]),x=ro(a,h,c[1])),o?(E=Math.round(o.top),_=Math.round(o.left)):l?(E=Math.round(l.top),_=Math.round(l.left)):(E=Math.round((h+c[1])*n+d[1]),_=Math.round((p+c[0])*t+d[0])),!o&&!l){if(Number.isFinite(r)){const w=Math.round((p+c[0])*(t+r)+d[0])-_-m;w!==c[0]&&(m+=w-c[0])}if(Number.isFinite(a)){const w=Math.round((h+c[1])*(n+a)+d[1])-E-x;w!==c[1]&&(x+=w-c[1])}}return{top:E,left:_,width:m,height:x}}function RN(e,t,n,r,a){const{margin:o,containerPadding:l,cols:c,rowHeight:d,maxRows:h}=e,p=ho(e);let m=Math.round((n-l[0])/(p+o[0])),x=Math.round((t-l[1])/(d+o[1]));return m=Ac(m,0,c-r),x=Ac(x,0,h-a),{x:m,y:x}}function lc(e,t,n){const{margin:r,containerPadding:a,rowHeight:o}=e,l=ho(e),c=Math.round((n-a[0])/(l+r[0])),d=Math.round((t-a[1])/(o+r[1]));return{x:c,y:d}}function LN(e,t,n){const{margin:r,rowHeight:a}=e,o=ho(e),l=Math.max(1,Math.round((t+r[0])/(o+r[0]))),c=Math.max(1,Math.round((n+r[1])/(a+r[1])));return{w:l,h:c}}function Ac(e,t,n){return Math.max(Math.min(e,n),t)}function U0(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Qa(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&U0(r,t))return r}}function ZE(e,t){return e.filter(n=>U0(n,t))}function PN(e,t){return t==="horizontal"?ex(e):t==="vertical"||t==="wrap"?Zh(e):[...e]}function Zh(e){return[...e].sort((t,n)=>t.y!==n.y?t.y-n.y:t.x-n.x)}function ex(e){return[...e].sort((t,n)=>t.x!==n.x?t.x-n.x:t.y-n.y)}function z0(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0){const a=r.y+r.h;a>t&&(t=a)}}return t}function Ra(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r!==void 0&&r.i===t)return r}}function Qc(e){return e.filter(t=>t.static===!0)}function ei(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function Gc(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];r!==void 0&&(t[n]=ei(r))}return t}function MN(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++){const a=e[r];a!==void 0&&(t.i===a.i?n[r]=t:n[r]=a)}return n}function FN(e,t,n){let r=Ra(e,t);return r?(r=n(ei(r)),[MN(e,r),r]):[[...e],null]}function BN(e,t){const n=Qc(e);for(let r=0;r<e.length;r++){const a=e[r];if(a!==void 0)if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),!a.static)n.push(a);else for(;Qa(n,a);)a.y++}return e}function Fa(e,t,n,r,a,o,l,c,d){if(t.static&&t.isDraggable!==!0)return[...e];if(t.y===r&&t.x===n)return[...e];const h=t.x,p=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let m=PN(e,l);(l==="vertical"&&typeof r=="number"?p>=r:l==="horizontal"&&typeof n=="number"?h>=n:!1)&&(m=m.reverse());const E=ZE(m,t),_=E.length>0;if(_&&d)return Gc(e);if(_&&o)return t.x=h,t.y=p,t.moved=!1,e;let S=[...e];for(let w=0;w<E.length;w++){const v=E[w];v!==void 0&&(v.moved||(v.static?S=k1(S,v,t,a,l):S=k1(S,t,v,a,l)))}return S}function k1(e,t,n,r,a,o){const l=a==="horizontal",c=a==="vertical",d=t.static;if(r){r=!1;const m={x:l?Math.max(t.x-n.w,0):n.x,y:c?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},x=Qa(e,m),E=x!==void 0&&x.y+x.h>t.y,_=x!==void 0&&t.x+t.w>x.x;if(!x)return Fa(e,n,l?m.x:void 0,c?m.y:void 0,r,d,a);if(E&&c)return Fa(e,n,void 0,n.y+1,r,d,a);if(E&&a===null)return t.y=n.y,n.y=n.y+n.h,[...e];if(_&&l)return Fa(e,t,n.x,void 0,r,d,a)}const h=l?n.x+1:void 0,p=c?n.y+1:void 0;return h===void 0&&p===void 0?[...e]:Fa(e,n,h,p,r,d,a)}function fa(e,t,n){return Math.max(t,Math.min(n,e))}var jN={name:"gridBounds",constrainPosition(e,t,n,{cols:r,maxRows:a}){return{x:fa(t,0,Math.max(0,r-e.w)),y:fa(n,0,Math.max(0,a-e.h))}},constrainSize(e,t,n,r,{cols:a,maxRows:o}){const l=r==="w"||r==="nw"||r==="sw"?e.x+e.w:a-e.x,c=r==="n"||r==="nw"||r==="ne"?e.y+e.h:o-e.y;return{w:fa(t,1,Math.max(1,l)),h:fa(n,1,Math.max(1,c))}}},HN={name:"minMaxSize",constrainSize(e,t,n){return{w:fa(t,e.minW??1,e.maxW??1/0),h:fa(n,e.minH??1,e.maxH??1/0)}}},UN={name:"containerBounds",constrainPosition(e,t,n,{cols:r,maxRows:a,containerHeight:o,rowHeight:l,margin:c}){const d=o>0?Math.floor((o+c[1])/(l+c[1])):a;return{x:fa(t,0,Math.max(0,r-e.w)),y:fa(n,0,Math.max(0,d-e.h))}}},Ic=[jN,HN];function cc(e,t,n,r,a){let o={x:n,y:r};for(const l of e)l.constrainPosition&&(o=l.constrainPosition(t,o.x,o.y,a));if(t.constraints)for(const l of t.constraints)l.constrainPosition&&(o=l.constrainPosition(t,o.x,o.y,a));return o}function zN(e,t,n,r,a,o){let l={w:n,h:r};for(const c of e)c.constrainSize&&(l=c.constrainSize(t,l.w,l.h,a,o));if(t.constraints)for(const c of t.constraints)c.constrainSize&&(l=c.constrainSize(t,l.w,l.h,a,o));return l}function W0({top:e,left:t,width:n,height:r}){const a=`translate(${t}px,${e}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${n}px`,height:`${r}px`,position:"absolute"}}function tx({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:"absolute"}}function N1(e){return e*100+"%"}function WN(e,t,n,r){return e+n>r?t:n}function nx(e,t,n){return e<0?t:n}function YN(e){return Math.max(0,e)}function Rc(e){return Math.max(0,e)}var Y0=(e,t,n)=>{const{left:r,height:a,width:o}=t,l=e.top-(a-e.height);return{left:r,width:o,height:nx(l,e.height,a),top:Rc(l)}},q0=(e,t,n)=>{const{top:r,left:a,height:o,width:l}=t;return{top:r,height:o,width:WN(e.left,e.width,l,n),left:YN(a)}},$0=(e,t,n)=>{const{top:r,height:a,width:o}=t,l=e.left+e.width-o;return l<0?{height:a,width:e.left+e.width,top:Rc(r),left:0}:{height:a,width:o,top:Rc(r),left:l}},V0=(e,t,n)=>{const{top:r,left:a,height:o,width:l}=t;return{width:l,left:a,height:nx(r,e.height,o),top:Rc(r)}},qN=(e,t,n)=>Y0(e,q0(e,t,n)),$N=(e,t,n)=>Y0(e,$0(e,t)),VN=(e,t,n)=>V0(e,q0(e,t,n)),QN=(e,t,n)=>V0(e,$0(e,t)),GN={n:Y0,ne:qN,e:q0,se:VN,s:V0,sw:QN,w:$0,nw:$N};function XN(e,t,n,r){const a=GN[e];return a?a(t,{...t,...n},r):n}var rx={type:"transform",scale:1,calcStyle(e){return W0(e)}},KN={type:"absolute",scale:1,calcStyle(e){return tx(e)}};function JN(e){return{type:"transform",scale:e,calcStyle(t){return W0(t)},calcDragPosition(t,n,r,a){return{left:(t-r)/e,top:(n-a)/e}}}}var ZN=rx,e3={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},t3={enabled:!0,bounded:!1,threshold:3},n3={enabled:!0,handles:["se"]},r3={enabled:!1,defaultItem:{w:1,h:1}};function Q0(e,t,n,r,a){const o=r==="x"?"w":"h";t[r]+=1;const l=e.findIndex(d=>d.i===t.i),c=a??Qc(e).length>0;for(let d=l+1;d<e.length;d++){const h=e[d];if(h!==void 0&&!h.static){if(!c&&h.y>t.y+t.h)break;U0(t,h)&&Q0(e,h,n+t[o],r,c)}}t[r]=n}function s3(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Qa(e,t);)t.y--;let a;for(;(a=Qa(e,t))!==void 0;)Q0(n,t,a.y+a.h,"y");return t.y=Math.max(t.y,0),t}function a3(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Qa(e,t);)t.x--;let a;for(;(a=Qa(e,t))!==void 0;)if(Q0(r,t,a.x+a.w,"x"),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Qa(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var sx={type:"vertical",allowOverlap:!1,compact(e,t){const n=Qc(e);let r=z0(n);const a=Zh(e),o=new Array(e.length);for(let l=0;l<a.length;l++){const c=a[l];if(c===void 0)continue;let d=ei(c);d.static||(d=s3(n,d,a,r),r=Math.max(r,d.y+d.h),n.push(d));const h=e.indexOf(c);o[h]=d,d.moved=!1}return o}},ax={type:"horizontal",allowOverlap:!1,compact(e,t){const n=Qc(e),r=ex(e),a=new Array(e.length);for(let o=0;o<r.length;o++){const l=r[o];if(l===void 0)continue;let c=ei(l);c.static||(c=a3(n,c,t,r),n.push(c));const d=e.indexOf(l);a[d]=c,c.moved=!1}return a}},ix={type:null,allowOverlap:!1,compact(e,t){return Gc(e)}},i3={...sx,allowOverlap:!0,compact(e,t){return Gc(e)}},o3={...ax,allowOverlap:!0,compact(e,t){return Gc(e)}},u3={...ix,allowOverlap:!0};function ox(e,t=!1,n=!1){let r;return t?e==="vertical"?r=i3:e==="horizontal"?r=o3:r=u3:e==="vertical"?r=sx:e==="horizontal"?r=ax:r=ix,n?{...r,preventCollision:n}:r}var au={exports:{}},ih={},oh={exports:{}},uh,O1;function l3(){if(O1)return uh;O1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return uh=e,uh}var lh,D1;function c3(){if(D1)return lh;D1=1;var e=l3();function t(){}function n(){}return n.resetWarningCache=t,lh=function(){function r(l,c,d,h,p,m){if(m!==e){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},lh}var A1;function Xc(){return A1||(A1=1,oh.exports=c3()()),oh.exports}var dc={exports:{}},I1;function d3(){if(I1)return dc.exports;I1=1;function e(n){var r,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(r=0;r<l;r++)n[r]&&(a=e(n[r]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function t(){for(var n,r,a=0,o="",l=arguments.length;a<l;a++)(n=arguments[a])&&(r=e(n))&&(o&&(o+=" "),o+=r);return o}return dc.exports=t,dc.exports.clsx=t,dc.exports}var Kt={},Xs={},R1;function Kc(){if(R1)return Xs;R1=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.dontSetMe=a,Xs.findInArray=e,Xs.int=r,Xs.isFunction=t,Xs.isNum=n;function e(o,l){for(let c=0,d=o.length;c<d;c++)if(l.apply(l,[o[c],c,o]))return o[c]}function t(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Function]"}function n(o){return typeof o=="number"&&!isNaN(o)}function r(o){return parseInt(o,10)}function a(o,l,c){if(o[l])return new Error(`Invalid prop ${l} passed to ${c} - do not set this, set it on the child.`)}return Xs}var Ks={},L1;function f3(){if(L1)return Ks;L1=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.browserPrefixToKey=n,Ks.browserPrefixToStyle=r,Ks.default=void 0,Ks.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var c,d;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const l=(d=(c=window.document)==null?void 0:c.documentElement)==null?void 0:d.style;if(!l||o in l)return"";for(let h=0;h<e.length;h++)if(n(o,e[h])in l)return e[h];return""}function n(o,l){return l?`${l}${a(o)}`:o}function r(o,l){return l?`-${l.toLowerCase()}-${o}`:o}function a(o){let l="",c=!0;for(let d=0;d<o.length;d++)c?(l+=o[d].toUpperCase(),c=!1):o[d]==="-"?c=!0:l+=o[d];return l}return Ks.default=t(),Ks}var P1;function G0(){if(P1)return Kt;P1=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.addClassName=M,Kt.addEvent=l,Kt.addUserSelectStyles=C,Kt.createCSSTransform=E,Kt.createSVGTransform=_,Kt.getTouch=w,Kt.getTouchIdentifier=v,Kt.getTranslation=S,Kt.innerHeight=p,Kt.innerWidth=m,Kt.matchesSelector=a,Kt.matchesSelectorAndParentsTo=o,Kt.offsetXYFromParent=x,Kt.outerHeight=d,Kt.outerWidth=h,Kt.removeClassName=k,Kt.removeEvent=c,Kt.scheduleRemoveUserSelectStyles=N;var e=Kc(),t=n(f3());function n(O,I){if(typeof WeakMap=="function")var P=new WeakMap,H=new WeakMap;return(n=function(F,Y){if(!Y&&F&&F.__esModule)return F;var G,X,K={__proto__:null,default:F};if(F===null||typeof F!="object"&&typeof F!="function")return K;if(G=Y?H:P){if(G.has(F))return G.get(F);G.set(F,K)}for(const $ in F)$!=="default"&&{}.hasOwnProperty.call(F,$)&&((X=(G=Object.defineProperty)&&Object.getOwnPropertyDescriptor(F,$))&&(X.get||X.set)?G(K,$,X):K[$]=F[$]);return K})(O,I)}let r="";function a(O,I){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(P){return(0,e.isFunction)(O[P])})),(0,e.isFunction)(O[r])?O[r](I):!1}function o(O,I,P){let H=O;do{if(a(H,I))return!0;if(H===P)return!1;H=H.parentNode}while(H);return!1}function l(O,I,P,H){if(!O)return;const F={capture:!0,...H};O.addEventListener?O.addEventListener(I,P,F):O.attachEvent?O.attachEvent("on"+I,P):O["on"+I]=P}function c(O,I,P,H){if(!O)return;const F={capture:!0,...H};O.removeEventListener?O.removeEventListener(I,P,F):O.detachEvent?O.detachEvent("on"+I,P):O["on"+I]=null}function d(O){let I=O.clientHeight;const P=O.ownerDocument.defaultView.getComputedStyle(O);return I+=(0,e.int)(P.borderTopWidth),I+=(0,e.int)(P.borderBottomWidth),I}function h(O){let I=O.clientWidth;const P=O.ownerDocument.defaultView.getComputedStyle(O);return I+=(0,e.int)(P.borderLeftWidth),I+=(0,e.int)(P.borderRightWidth),I}function p(O){let I=O.clientHeight;const P=O.ownerDocument.defaultView.getComputedStyle(O);return I-=(0,e.int)(P.paddingTop),I-=(0,e.int)(P.paddingBottom),I}function m(O){let I=O.clientWidth;const P=O.ownerDocument.defaultView.getComputedStyle(O);return I-=(0,e.int)(P.paddingLeft),I-=(0,e.int)(P.paddingRight),I}function x(O,I,P){const F=I===I.ownerDocument.body?{left:0,top:0}:I.getBoundingClientRect(),Y=(O.clientX+I.scrollLeft-F.left)/P,G=(O.clientY+I.scrollTop-F.top)/P;return{x:Y,y:G}}function E(O,I){const P=S(O,I,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:P}}function _(O,I){return S(O,I,"")}function S(O,I,P){let{x:H,y:F}=O,Y=`translate(${H}${P},${F}${P})`;if(I){const G=`${typeof I.x=="string"?I.x:I.x+P}`,X=`${typeof I.y=="string"?I.y:I.y+P}`;Y=`translate(${G}, ${X})`+Y}return Y}function w(O,I){return O.targetTouches&&(0,e.findInArray)(O.targetTouches,P=>I===P.identifier)||O.changedTouches&&(0,e.findInArray)(O.changedTouches,P=>I===P.identifier)}function v(O){if(O.targetTouches&&O.targetTouches[0])return O.targetTouches[0].identifier;if(O.changedTouches&&O.changedTouches[0])return O.changedTouches[0].identifier}function C(O){if(!O)return;let I=O.getElementById("react-draggable-style-el");I||(I=O.createElement("style"),I.type="text/css",I.id="react-draggable-style-el",I.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
93
|
+
`,I.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
94
|
+
`,O.getElementsByTagName("head")[0].appendChild(I)),O.body&&M(O.body,"react-draggable-transparent-selection")}function N(O){window.requestAnimationFrame?window.requestAnimationFrame(()=>{A(O)}):A(O)}function A(O){if(O)try{if(O.body&&k(O.body,"react-draggable-transparent-selection"),O.selection)O.selection.empty();else{const I=(O.defaultView||window).getSelection();I&&I.type!=="Caret"&&I.removeAllRanges()}}catch{}}function M(O,I){O.classList?O.classList.add(I):O.className.match(new RegExp(`(?:^|\\s)${I}(?!\\S)`))||(O.className+=` ${I}`)}function k(O,I){O.classList?O.classList.remove(I):O.className=O.className.replace(new RegExp(`(?:^|\\s)${I}(?!\\S)`,"g"),"")}return Kt}var Vr={},M1;function ux(){if(M1)return Vr;M1=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.canDragX=a,Vr.canDragY=o,Vr.createCoreData=c,Vr.createDraggableData=d,Vr.getBoundPosition=n,Vr.getControlPosition=l,Vr.snapToGrid=r;var e=Kc(),t=G0();function n(m,x,E){if(!m.props.bounds)return[x,E];let{bounds:_}=m.props;_=typeof _=="string"?_:h(_);const S=p(m);if(typeof _=="string"){const{ownerDocument:w}=S,v=w.defaultView;let C;if(_==="parent"?C=S.parentNode:C=S.getRootNode().querySelector(_),!(C instanceof v.HTMLElement))throw new Error('Bounds selector "'+_+'" could not find an element.');const N=C,A=v.getComputedStyle(S),M=v.getComputedStyle(N);_={left:-S.offsetLeft+(0,e.int)(M.paddingLeft)+(0,e.int)(A.marginLeft),top:-S.offsetTop+(0,e.int)(M.paddingTop)+(0,e.int)(A.marginTop),right:(0,t.innerWidth)(N)-(0,t.outerWidth)(S)-S.offsetLeft+(0,e.int)(M.paddingRight)-(0,e.int)(A.marginRight),bottom:(0,t.innerHeight)(N)-(0,t.outerHeight)(S)-S.offsetTop+(0,e.int)(M.paddingBottom)-(0,e.int)(A.marginBottom)}}return(0,e.isNum)(_.right)&&(x=Math.min(x,_.right)),(0,e.isNum)(_.bottom)&&(E=Math.min(E,_.bottom)),(0,e.isNum)(_.left)&&(x=Math.max(x,_.left)),(0,e.isNum)(_.top)&&(E=Math.max(E,_.top)),[x,E]}function r(m,x,E){const _=Math.round(x/m[0])*m[0],S=Math.round(E/m[1])*m[1];return[_,S]}function a(m){return m.props.axis==="both"||m.props.axis==="x"}function o(m){return m.props.axis==="both"||m.props.axis==="y"}function l(m,x,E){const _=typeof x=="number"?(0,t.getTouch)(m,x):null;if(typeof x=="number"&&!_)return null;const S=p(E),w=E.props.offsetParent||S.offsetParent||S.ownerDocument.body;return(0,t.offsetXYFromParent)(_||m,w,E.props.scale)}function c(m,x,E){const _=!(0,e.isNum)(m.lastX),S=p(m);return _?{node:S,deltaX:0,deltaY:0,lastX:x,lastY:E,x,y:E}:{node:S,deltaX:x-m.lastX,deltaY:E-m.lastY,lastX:m.lastX,lastY:m.lastY,x,y:E}}function d(m,x){const E=m.props.scale;return{node:x.node,x:m.state.x+x.deltaX/E,y:m.state.y+x.deltaY/E,deltaX:x.deltaX/E,deltaY:x.deltaY/E,lastX:m.state.x,lastY:m.state.y}}function h(m){return{left:m.left,top:m.top,right:m.right,bottom:m.bottom}}function p(m){const x=m.findDOMNode();if(!x)throw new Error("<DraggableCore>: Unmounted during event!");return x}return Vr}var iu={},fc={},F1;function lx(){if(F1)return fc;F1=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.default=e;function e(){}return fc}var B1;function h3(){if(B1)return iu;B1=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.default=void 0;var e=d(ti()),t=c(Xc()),n=c(Bc()),r=G0(),a=ux(),o=Kc(),l=c(lx());function c(S){return S&&S.__esModule?S:{default:S}}function d(S,w){if(typeof WeakMap=="function")var v=new WeakMap,C=new WeakMap;return(d=function(N,A){if(!A&&N&&N.__esModule)return N;var M,k,O={__proto__:null,default:N};if(N===null||typeof N!="object"&&typeof N!="function")return O;if(M=A?C:v){if(M.has(N))return M.get(N);M.set(N,O)}for(const I in N)I!=="default"&&{}.hasOwnProperty.call(N,I)&&((k=(M=Object.defineProperty)&&Object.getOwnPropertyDescriptor(N,I))&&(k.get||k.set)?M(O,I,k):O[I]=N[I]);return O})(S,w)}function h(S,w,v){return(w=p(w))in S?Object.defineProperty(S,w,{value:v,enumerable:!0,configurable:!0,writable:!0}):S[w]=v,S}function p(S){var w=m(S,"string");return typeof w=="symbol"?w:w+""}function m(S,w){if(typeof S!="object"||!S)return S;var v=S[Symbol.toPrimitive];if(v!==void 0){var C=v.call(S,w);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(S)}const x={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let E=x.mouse,_=class extends e.Component{constructor(){super(...arguments),h(this,"dragging",!1),h(this,"lastX",NaN),h(this,"lastY",NaN),h(this,"touchIdentifier",null),h(this,"mounted",!1),h(this,"handleDragStart",w=>{if(this.props.onMouseDown(w),!this.props.allowAnyClick&&typeof w.button=="number"&&w.button!==0)return!1;const v=this.findDOMNode();if(!v||!v.ownerDocument||!v.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:C}=v;if(this.props.disabled||!(w.target instanceof C.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(w.target,this.props.handle,v)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(w.target,this.props.cancel,v))return;w.type==="touchstart"&&!this.props.allowMobileScroll&&w.preventDefault();const N=(0,r.getTouchIdentifier)(w);this.touchIdentifier=N;const A=(0,a.getControlPosition)(w,N,this);if(A==null)return;const{x:M,y:k}=A,O=(0,a.createCoreData)(this,M,k);(0,l.default)("DraggableCore: handleDragStart: %j",O),(0,l.default)("calling",this.props.onStart),!(this.props.onStart(w,O)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(C),this.dragging=!0,this.lastX=M,this.lastY=k,(0,r.addEvent)(C,E.move,this.handleDrag),(0,r.addEvent)(C,E.stop,this.handleDragStop))}),h(this,"handleDrag",w=>{const v=(0,a.getControlPosition)(w,this.touchIdentifier,this);if(v==null)return;let{x:C,y:N}=v;if(Array.isArray(this.props.grid)){let k=C-this.lastX,O=N-this.lastY;if([k,O]=(0,a.snapToGrid)(this.props.grid,k,O),!k&&!O)return;C=this.lastX+k,N=this.lastY+O}const A=(0,a.createCoreData)(this,C,N);if((0,l.default)("DraggableCore: handleDrag: %j",A),this.props.onDrag(w,A)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const O=document.createEvent("MouseEvents");O.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(O)}return}this.lastX=C,this.lastY=N}),h(this,"handleDragStop",w=>{if(!this.dragging)return;const v=(0,a.getControlPosition)(w,this.touchIdentifier,this);if(v==null)return;let{x:C,y:N}=v;if(Array.isArray(this.props.grid)){let O=C-this.lastX||0,I=N-this.lastY||0;[O,I]=(0,a.snapToGrid)(this.props.grid,O,I),C=this.lastX+O,N=this.lastY+I}const A=(0,a.createCoreData)(this,C,N);if(this.props.onStop(w,A)===!1||this.mounted===!1)return!1;const k=this.findDOMNode();k&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(k.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",A),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,k&&((0,l.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(k.ownerDocument,E.move,this.handleDrag),(0,r.removeEvent)(k.ownerDocument,E.stop,this.handleDragStop))}),h(this,"onMouseDown",w=>(E=x.mouse,this.handleDragStart(w))),h(this,"onMouseUp",w=>(E=x.mouse,this.handleDragStop(w))),h(this,"onTouchStart",w=>(E=x.touch,this.handleDragStart(w))),h(this,"onTouchEnd",w=>(E=x.touch,this.handleDragStop(w)))}componentDidMount(){this.mounted=!0;const w=this.findDOMNode();w&&(0,r.addEvent)(w,x.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const w=this.findDOMNode();if(w){const{ownerDocument:v}=w;(0,r.removeEvent)(v,x.mouse.move,this.handleDrag),(0,r.removeEvent)(v,x.touch.move,this.handleDrag),(0,r.removeEvent)(v,x.mouse.stop,this.handleDragStop),(0,r.removeEvent)(v,x.touch.stop,this.handleDragStop),(0,r.removeEvent)(w,x.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(v)}}findDOMNode(){var w,v,C;return(w=this.props)!=null&&w.nodeRef?(C=(v=this.props)==null?void 0:v.nodeRef)==null?void 0:C.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return iu.default=_,h(_,"displayName","DraggableCore"),h(_,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(S,w){if(S[w]&&S[w].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),h(_,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),iu}var j1;function p3(){return j1||(j1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=m(ti()),n=p(Xc()),r=p(Bc()),a=d3(),o=G0(),l=ux(),c=Kc(),d=p(h3()),h=p(lx());function p(v){return v&&v.__esModule?v:{default:v}}function m(v,C){if(typeof WeakMap=="function")var N=new WeakMap,A=new WeakMap;return(m=function(M,k){if(!k&&M&&M.__esModule)return M;var O,I,P={__proto__:null,default:M};if(M===null||typeof M!="object"&&typeof M!="function")return P;if(O=k?A:N){if(O.has(M))return O.get(M);O.set(M,P)}for(const H in M)H!=="default"&&{}.hasOwnProperty.call(M,H)&&((I=(O=Object.defineProperty)&&Object.getOwnPropertyDescriptor(M,H))&&(I.get||I.set)?O(P,H,I):P[H]=M[H]);return P})(v,C)}function x(){return x=Object.assign?Object.assign.bind():function(v){for(var C=1;C<arguments.length;C++){var N=arguments[C];for(var A in N)({}).hasOwnProperty.call(N,A)&&(v[A]=N[A])}return v},x.apply(null,arguments)}function E(v,C,N){return(C=_(C))in v?Object.defineProperty(v,C,{value:N,enumerable:!0,configurable:!0,writable:!0}):v[C]=N,v}function _(v){var C=S(v,"string");return typeof C=="symbol"?C:C+""}function S(v,C){if(typeof v!="object"||!v)return v;var N=v[Symbol.toPrimitive];if(N!==void 0){var A=N.call(v,C);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(v)}class w extends t.Component{static getDerivedStateFromProps(C,N){let{position:A}=C,{prevPropsPosition:M}=N;return A&&(!M||A.x!==M.x||A.y!==M.y)?((0,h.default)("Draggable: getDerivedStateFromProps %j",{position:A,prevPropsPosition:M}),{x:A.x,y:A.y,prevPropsPosition:{...A}}):null}constructor(C){super(C),E(this,"onDragStart",(N,A)=>{if((0,h.default)("Draggable: onDragStart: %j",A),this.props.onStart(N,(0,l.createDraggableData)(this,A))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),E(this,"onDrag",(N,A)=>{if(!this.state.dragging)return!1;(0,h.default)("Draggable: onDrag: %j",A);const M=(0,l.createDraggableData)(this,A),k={x:M.x,y:M.y,slackX:0,slackY:0};if(this.props.bounds){const{x:I,y:P}=k;k.x+=this.state.slackX,k.y+=this.state.slackY;const[H,F]=(0,l.getBoundPosition)(this,k.x,k.y);k.x=H,k.y=F,k.slackX=this.state.slackX+(I-k.x),k.slackY=this.state.slackY+(P-k.y),M.x=k.x,M.y=k.y,M.deltaX=k.x-this.state.x,M.deltaY=k.y-this.state.y}if(this.props.onDrag(N,M)===!1)return!1;this.setState(k)}),E(this,"onDragStop",(N,A)=>{if(!this.state.dragging||this.props.onStop(N,(0,l.createDraggableData)(this,A))===!1)return!1;(0,h.default)("Draggable: onDragStop: %j",A);const k={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:I,y:P}=this.props.position;k.x=I,k.y=P}this.setState(k)}),this.state={dragging:!1,dragged:!1,x:C.position?C.position.x:C.defaultPosition.x,y:C.position?C.position.y:C.defaultPosition.y,prevPropsPosition:{...C.position},slackX:0,slackY:0,isElementSVG:!1},C.position&&!(C.onDrag||C.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var C,N;return((N=(C=this.props)==null?void 0:C.nodeRef)==null?void 0:N.current)??r.default.findDOMNode(this)}render(){const{axis:C,bounds:N,children:A,defaultPosition:M,defaultClassName:k,defaultClassNameDragging:O,defaultClassNameDragged:I,position:P,positionOffset:H,scale:F,...Y}=this.props;let G={},X=null;const $=!!!P||this.state.dragging,se=P||M,J={x:(0,l.canDragX)(this)&&$?this.state.x:se.x,y:(0,l.canDragY)(this)&&$?this.state.y:se.y};this.state.isElementSVG?X=(0,o.createSVGTransform)(J,H):G=(0,o.createCSSTransform)(J,H);const te=(0,a.clsx)(A.props.className||"",k,{[O]:this.state.dragging,[I]:this.state.dragged});return t.createElement(d.default,x({},Y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(A),{className:te,style:{...A.props.style,...G},transform:X}))}}e.default=w,E(w,"displayName","Draggable"),E(w,"propTypes",{...d.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),E(w,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(ih)),ih}var H1;function X0(){if(H1)return au.exports;H1=1;const{default:e,DraggableCore:t}=p3();return au.exports=e,au.exports.default=e,au.exports.DraggableCore=t,au.exports}var m3=X0(),ou={exports:{}},uu={},hc={},U1;function g3(){if(U1)return hc;U1=1,hc.__esModule=!0,hc.cloneElement=c;var e=t(ti());function t(d){return d&&d.__esModule?d:{default:d}}function n(d,h){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(d);h&&(m=m.filter(function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable})),p.push.apply(p,m)}return p}function r(d){for(var h=1;h<arguments.length;h++){var p=arguments[h]!=null?arguments[h]:{};h%2?n(Object(p),!0).forEach(function(m){a(d,m,p[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach(function(m){Object.defineProperty(d,m,Object.getOwnPropertyDescriptor(p,m))})}return d}function a(d,h,p){return(h=o(h))in d?Object.defineProperty(d,h,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[h]=p,d}function o(d){var h=l(d,"string");return typeof h=="symbol"?h:h+""}function l(d,h){if(typeof d!="object"||!d)return d;var p=d[Symbol.toPrimitive];if(p!==void 0){var m=p.call(d,h);if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(h==="string"?String:Number)(d)}function c(d,h){return h.style&&d.props.style&&(h.style=r(r({},d.props.style),h.style)),h.className&&d.props.className&&(h.className=`${d.props.className} ${h.className}`),e.default.cloneElement(d,h)}return hc}var lu={},z1;function cx(){if(z1)return lu;z1=1,lu.__esModule=!0,lu.resizableProps=void 0;var e=t(Xc());X0();function t(n){return n&&n.__esModule?n:{default:n}}return lu.resizableProps={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:typeof Element<"u"?e.default.instanceOf(Element):e.default.any,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];const[o]=r;return o.axis==="both"||o.axis==="y"?e.default.number.isRequired(...r):e.default.number(...r)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];const[o]=r;return o.axis==="both"||o.axis==="x"?e.default.number.isRequired(...r):e.default.number(...r)}},lu}var W1;function dx(){if(W1)return uu;W1=1,uu.__esModule=!0,uu.default=void 0;var e=o(ti()),t=X0(),n=g3(),r=cx();const a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function o(S,w){if(typeof WeakMap=="function")var v=new WeakMap,C=new WeakMap;return(o=function(N,A){if(!A&&N&&N.__esModule)return N;var M,k,O={__proto__:null,default:N};if(N===null||typeof N!="object"&&typeof N!="function")return O;if(M=A?C:v){if(M.has(N))return M.get(N);M.set(N,O)}for(const I in N)I!=="default"&&{}.hasOwnProperty.call(N,I)&&((k=(M=Object.defineProperty)&&Object.getOwnPropertyDescriptor(N,I))&&(k.get||k.set)?M(O,I,k):O[I]=N[I]);return O})(S,w)}function l(){return l=Object.assign?Object.assign.bind():function(S){for(var w=1;w<arguments.length;w++){var v=arguments[w];for(var C in v)({}).hasOwnProperty.call(v,C)&&(S[C]=v[C])}return S},l.apply(null,arguments)}function c(S,w){if(S==null)return{};var v,C,N=d(S,w);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(S);for(C=0;C<A.length;C++)v=A[C],w.indexOf(v)===-1&&{}.propertyIsEnumerable.call(S,v)&&(N[v]=S[v])}return N}function d(S,w){if(S==null)return{};var v={};for(var C in S)if({}.hasOwnProperty.call(S,C)){if(w.indexOf(C)!==-1)continue;v[C]=S[C]}return v}function h(S,w){var v=Object.keys(S);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(S);w&&(C=C.filter(function(N){return Object.getOwnPropertyDescriptor(S,N).enumerable})),v.push.apply(v,C)}return v}function p(S){for(var w=1;w<arguments.length;w++){var v=arguments[w]!=null?arguments[w]:{};w%2?h(Object(v),!0).forEach(function(C){m(S,C,v[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(v)):h(Object(v)).forEach(function(C){Object.defineProperty(S,C,Object.getOwnPropertyDescriptor(v,C))})}return S}function m(S,w,v){return(w=x(w))in S?Object.defineProperty(S,w,{value:v,enumerable:!0,configurable:!0,writable:!0}):S[w]=v,S}function x(S){var w=E(S,"string");return typeof w=="symbol"?w:w+""}function E(S,w){if(typeof S!="object"||!S)return S;var v=S[Symbol.toPrimitive];if(v!==void 0){var C=v.call(S,w);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(S)}let _=class extends e.Component{constructor(){super(...arguments),this.handleRefs={},this.lastHandleRect=null,this.slack=null,this.lastSize=null}componentWillUnmount(){this.resetData()}resetData(){this.lastHandleRect=this.slack=this.lastSize=null}runConstraints(w,v){const{minConstraints:C,maxConstraints:N,lockAspectRatio:A}=this.props;if(!C&&!N&&!A)return[w,v];if(A){const P=this.props.width/this.props.height,H=w-this.props.width,F=v-this.props.height;Math.abs(H)>Math.abs(F*P)?v=w/P:w=v*P}const[M,k]=[w,v];let[O,I]=this.slack||[0,0];return w+=O,v+=I,C&&(w=Math.max(C[0],w),v=Math.max(C[1],v)),N&&(w=Math.min(N[0],w),v=Math.min(N[1],v)),this.slack=[O+(M-w),I+(k-v)],[w,v]}resizeHandler(w,v){return(C,N)=>{var se;let{node:A,deltaX:M,deltaY:k}=N;w==="onResizeStart"&&this.resetData();const O=(this.props.axis==="both"||this.props.axis==="x")&&v!=="n"&&v!=="s",I=(this.props.axis==="both"||this.props.axis==="y")&&v!=="e"&&v!=="w";if(!O&&!I)return;const P=v[0],H=v[v.length-1],F=A.getBoundingClientRect();if(this.lastHandleRect!=null){if(H==="w"){const J=F.left-this.lastHandleRect.left;M+=J}if(P==="n"){const J=F.top-this.lastHandleRect.top;k+=J}}this.lastHandleRect=F,H==="w"&&(M=-M),P==="n"&&(k=-k);let Y=this.props.width+(O?M/this.props.transformScale:0),G=this.props.height+(I?k/this.props.transformScale:0);[Y,G]=this.runConstraints(Y,G),w==="onResizeStop"&&this.lastSize&&({width:Y,height:G}=this.lastSize);const X=Y!==this.props.width||G!==this.props.height;w!=="onResizeStop"&&(this.lastSize={width:Y,height:G});const K=typeof this.props[w]=="function"?this.props[w]:null;K&&!(w==="onResize"&&!X)&&((se=C.persist)==null||se.call(C),K(C,{node:A,size:{width:Y,height:G},handle:v})),w==="onResizeStop"&&this.resetData()}}renderResizeHandle(w,v){const{handle:C}=this.props;if(!C)return e.createElement("span",{className:`react-resizable-handle react-resizable-handle-${w}`,ref:v});if(typeof C=="function")return C(w,v);const N=typeof C.type=="string",A=p({ref:v},N?{}:{handleAxis:w});return e.cloneElement(C,A)}render(){const w=this.props,{children:v,className:C,draggableOpts:N,width:A,height:M,handle:k,handleSize:O,lockAspectRatio:I,axis:P,minConstraints:H,maxConstraints:F,onResize:Y,onResizeStop:G,onResizeStart:X,resizeHandles:K,transformScale:$}=w,se=c(w,a);return(0,n.cloneElement)(v,p(p({},se),{},{className:`${C?`${C} `:""}react-resizable`,children:[...e.Children.toArray(v.props.children),...K.map(J=>{const te=this.handleRefs[J]??(this.handleRefs[J]=e.createRef());return e.createElement(t.DraggableCore,l({},N,{nodeRef:te,key:`resizableHandle-${J}`,onStop:this.resizeHandler("onResizeStop",J),onStart:this.resizeHandler("onResizeStart",J),onDrag:this.resizeHandler("onResize",J)}),this.renderResizeHandle(J,te))})]}))}};return uu.default=_,_.propTypes=r.resizableProps,_.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},uu}var cu={},Y1;function y3(){if(Y1)return cu;Y1=1,cu.__esModule=!0,cu.default=void 0;var e=l(ti()),t=o(Xc()),n=o(dx()),r=cx();const a=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function o(w){return w&&w.__esModule?w:{default:w}}function l(w,v){if(typeof WeakMap=="function")var C=new WeakMap,N=new WeakMap;return(l=function(A,M){if(!M&&A&&A.__esModule)return A;var k,O,I={__proto__:null,default:A};if(A===null||typeof A!="object"&&typeof A!="function")return I;if(k=M?N:C){if(k.has(A))return k.get(A);k.set(A,I)}for(const P in A)P!=="default"&&{}.hasOwnProperty.call(A,P)&&((O=(k=Object.defineProperty)&&Object.getOwnPropertyDescriptor(A,P))&&(O.get||O.set)?k(I,P,O):I[P]=A[P]);return I})(w,v)}function c(){return c=Object.assign?Object.assign.bind():function(w){for(var v=1;v<arguments.length;v++){var C=arguments[v];for(var N in C)({}).hasOwnProperty.call(C,N)&&(w[N]=C[N])}return w},c.apply(null,arguments)}function d(w,v){var C=Object.keys(w);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(w);v&&(N=N.filter(function(A){return Object.getOwnPropertyDescriptor(w,A).enumerable})),C.push.apply(C,N)}return C}function h(w){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?d(Object(C),!0).forEach(function(N){p(w,N,C[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(C)):d(Object(C)).forEach(function(N){Object.defineProperty(w,N,Object.getOwnPropertyDescriptor(C,N))})}return w}function p(w,v,C){return(v=m(v))in w?Object.defineProperty(w,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):w[v]=C,w}function m(w){var v=x(w,"string");return typeof v=="symbol"?v:v+""}function x(w,v){if(typeof w!="object"||!w)return w;var C=w[Symbol.toPrimitive];if(C!==void 0){var N=C.call(w,v);if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(v==="string"?String:Number)(w)}function E(w,v){if(w==null)return{};var C,N,A=_(w,v);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(w);for(N=0;N<M.length;N++)C=M[N],v.indexOf(C)===-1&&{}.propertyIsEnumerable.call(w,C)&&(A[C]=w[C])}return A}function _(w,v){if(w==null)return{};var C={};for(var N in w)if({}.hasOwnProperty.call(w,N)){if(v.indexOf(N)!==-1)continue;C[N]=w[N]}return C}let S=class extends e.Component{constructor(){super(...arguments),this.state={width:this.props.width,height:this.props.height,propsWidth:this.props.width,propsHeight:this.props.height},this.onResize=(v,C)=>{var A;const{size:N}=C;this.props.onResize?((A=v.persist)==null||A.call(v),this.setState(N,()=>this.props.onResize&&this.props.onResize(v,C))):this.setState(N)}}static getDerivedStateFromProps(v,C){return C.propsWidth!==v.width||C.propsHeight!==v.height?{width:v.width,height:v.height,propsWidth:v.width,propsHeight:v.height}:null}render(){const v=this.props,{handle:C,handleSize:N,onResize:A,onResizeStart:M,onResizeStop:k,draggableOpts:O,minConstraints:I,maxConstraints:P,lockAspectRatio:H,axis:F,width:Y,height:G,resizeHandles:X,style:K,transformScale:$}=v,se=E(v,a);return e.createElement(n.default,{axis:F,draggableOpts:O,handle:C,handleSize:N,height:this.state.height,lockAspectRatio:H,maxConstraints:P,minConstraints:I,onResizeStart:M,onResize:this.onResize,onResizeStop:k,resizeHandles:X,transformScale:$,width:this.state.width},e.createElement("div",c({},se,{style:h(h({},K),{},{width:this.state.width+"px",height:this.state.height+"px"})})))}};return cu.default=S,S.propTypes=h(h({},r.resizableProps),{},{children:t.default.element}),cu}var q1;function b3(){return q1||(q1=1,ou.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},ou.exports.Resizable=dx().default,ou.exports.ResizableBox=y3().default),ou.exports}var E3=b3();function fx(e){return function(n,r,a,o,l,c,d){return e(n,r,d)}}function Jc(e){return function(n,r,a,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a,o);var l=o.get(n),c=o.get(r);if(l&&c)return l===r&&c===n;o.set(n,r),o.set(r,n);var d=e(n,r,a,o);return o.delete(n),o.delete(r),d}}function hx(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function $1(e){return e.constructor===Object||e.constructor==null}function V1(e){return typeof e.then=="function"}function Zc(e,t){return e===t||e!==e&&t!==t}var x3="[object Arguments]",T3="[object Boolean]",v3="[object Date]",w3="[object RegExp]",S3="[object Map]",_3="[object Number]",C3="[object Object]",k3="[object Set]",N3="[object String]",Q1=Object.prototype.toString;function ed(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,a=e.areObjectsEqual,o=e.areRegExpsEqual,l=e.areSetsEqual,c=e.createIsNestedEqual,d=c(h);function h(p,m,x){if(p===m)return!0;if(!p||!m||typeof p!="object"||typeof m!="object")return p!==p&&m!==m;if($1(p)&&$1(m))return a(p,m,d,x);var E=Array.isArray(p),_=Array.isArray(m);if(E||_)return E===_&&t(p,m,d,x);var S=Q1.call(p);return S!==Q1.call(m)?!1:S===v3?n(p,m,d,x):S===w3?o(p,m,d,x):S===S3?r(p,m,d,x):S===k3?l(p,m,d,x):S===C3||S===x3?V1(p)||V1(m)?!1:a(p,m,d,x):S===T3||S===_3||S===N3?Zc(p.valueOf(),m.valueOf()):!1}return h}function px(e,t,n,r){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!n(e[a],t[a],a,a,e,t,r))return!1;return!0}var O3=Jc(px);function mx(e,t){return Zc(e.valueOf(),t.valueOf())}function gx(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var o={},l=0;return e.forEach(function(c,d){if(a){var h=!1,p=0;t.forEach(function(m,x){!h&&!o[p]&&(h=n(d,x,l,p,e,t,r)&&n(c,m,d,x,e,t,r))&&(o[p]=!0),p++}),l++,a=h}}),a}var D3=Jc(gx),A3="_owner",I3=Object.prototype.hasOwnProperty;function yx(e,t,n,r){var a=Object.keys(e),o=a.length;if(Object.keys(t).length!==o)return!1;for(var l;o-- >0;){if(l=a[o],l===A3){var c=!!e.$$typeof,d=!!t.$$typeof;if((c||d)&&c!==d)return!1}if(!I3.call(t,l)||!n(e[l],t[l],l,l,e,t,r))return!1}return!0}var R3=Jc(yx);function bx(e,t){return e.source===t.source&&e.flags===t.flags}function Ex(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var o={};return e.forEach(function(l,c){if(a){var d=!1,h=0;t.forEach(function(p,m){!d&&!o[h]&&(d=n(l,p,c,m,e,t,r))&&(o[h]=!0),h++}),a=d}}),a}var L3=Jc(Ex),xx=Object.freeze({areArraysEqual:px,areDatesEqual:mx,areMapsEqual:gx,areObjectsEqual:yx,areRegExpsEqual:bx,areSetsEqual:Ex,createIsNestedEqual:fx}),Tx=Object.freeze({areArraysEqual:O3,areDatesEqual:mx,areMapsEqual:D3,areObjectsEqual:R3,areRegExpsEqual:bx,areSetsEqual:L3,createIsNestedEqual:fx}),P3=ed(xx);function Ri(e,t){return P3(e,t,void 0)}ed(hx(xx,{createIsNestedEqual:function(){return Zc}}));ed(Tx);ed(hx(Tx,{createIsNestedEqual:function(){return Zc}}));function G1(e){const{children:t,cols:n,containerWidth:r,margin:a,containerPadding:o,rowHeight:l,maxRows:c,isDraggable:d,isResizable:h,isBounded:p,static:m,useCSSTransforms:x=!0,usePercentages:E=!1,transformScale:_=1,positionStrategy:S,dragThreshold:w=0,droppingPosition:v,className:C="",style:N,handle:A="",cancel:M="",x:k,y:O,w:I,h:P,minW:H=1,maxW:F=1/0,minH:Y=1,maxH:G=1/0,i:X,resizeHandles:K,resizeHandle:$,constraints:se=Ic,layoutItem:J,layout:te=[],onDragStart:R,onDrag:ie,onDragStop:he,onResizeStart:U,onResize:Ie,onResizeStop:ze}=e,[Ae,ct]=L.useState(!1),[tt,Ke]=L.useState(!1),st=L.useRef(null),Je=L.useRef({left:0,top:0}),pn=L.useRef({top:0,left:0,width:0,height:0}),Gt=L.useRef(void 0),jn=L.useRef(te);jn.current=te;const tn=L.useRef(null),nn=L.useRef(null),mn=L.useRef(!1),er=L.useRef({x:0,y:0}),at=L.useRef(!1),Ze=L.useMemo(()=>({cols:n,containerPadding:o,containerWidth:r,margin:a,maxRows:c,rowHeight:l}),[n,o,r,a,c,l]),Et=L.useMemo(()=>({cols:n,maxRows:c,containerWidth:r,containerHeight:0,rowHeight:l,margin:a,layout:[]}),[n,c,r,l,a]),Nt=L.useCallback(()=>({...Et,layout:jn.current}),[Et]),on=L.useMemo(()=>J??{i:X,x:k,y:O,w:I,h:P,minW:H,maxW:F,minH:Y,maxH:G},[J,X,k,O,I,P,H,F,Y,G]),tr=L.useCallback(be=>{if(S!=null&&S.calcStyle)return S.calcStyle(be);if(x)return W0(be);const Se=tx(be);return E?{...Se,left:N1(be.left/r),width:N1(be.width/r)}:Se},[S,x,E,r]),un=L.useCallback((be,{node:Se})=>{if(!R)return;const{offsetParent:Ge}=Se;if(!Ge)return;const _e=Ge.getBoundingClientRect(),It=Se.getBoundingClientRect(),Wt=It.left/_,Yt=_e.left/_,Rt=It.top/_,qt=_e.top/_;let Cn;if(S!=null&&S.calcDragPosition){const We=be;Cn=S.calcDragPosition(We.clientX,We.clientY,We.clientX-It.left,We.clientY-It.top)}else Cn={left:Wt-Yt+Ge.scrollLeft,top:Rt-qt+Ge.scrollTop};if(Je.current=Cn,w>0){const We=be;er.current={x:We.clientX,y:We.clientY},mn.current=!0,at.current=!1,ct(!0);return}ct(!0);const Un=lc(Ze,Cn.top,Cn.left),{x:Ur,y:Ce}=cc(se,on,Un.x,Un.y,Nt());R(X,Ur,Ce,{e:be,node:Se,newPosition:Cn})},[R,_,Ze,S,w,se,on,Nt,X]),oe=L.useCallback((be,{node:Se,deltaX:Ge,deltaY:_e})=>{if(!ie||!Ae)return;const It=be;if(mn.current&&!at.current){const Ur=It.clientX-er.current.x,Ce=It.clientY-er.current.y;if(Math.hypot(Ur,Ce)<w)return;if(at.current=!0,mn.current=!1,R){const Pe=lc(Ze,Je.current.top,Je.current.left),{x:et,y:dt}=cc(se,on,Pe.x,Pe.y,Nt());R(X,et,dt,{e:be,node:Se,newPosition:Je.current})}}let Wt=Je.current.top+_e,Yt=Je.current.left+Ge;if(p){const{offsetParent:Ur}=Se;if(Ur){const Ce=Ur.clientHeight-ro(P,l,a[1]);Wt=Ac(Wt,0,Ce);const We=ho(Ze),Pe=r-ro(I,We,a[0]);Yt=Ac(Yt,0,Pe)}}const Rt={top:Wt,left:Yt};Je.current=Rt;const qt=lc(Ze,Wt,Yt),{x:Cn,y:Un}=cc(se,on,qt.x,qt.y,Nt());ie(X,Cn,Un,{e:be,node:Se,newPosition:Rt})},[ie,R,Ae,w,p,P,l,a,Ze,r,I,X,se,on,Nt]),pe=L.useCallback((be,{node:Se})=>{if(!he||!Ae)return;const Ge=mn.current;if(mn.current=!1,at.current=!1,er.current={x:0,y:0},Ge){ct(!1),Je.current={left:0,top:0};return}const{left:_e,top:It}=Je.current,Wt={top:It,left:_e};ct(!1),Je.current={left:0,top:0};const Yt=lc(Ze,It,_e),{x:Rt,y:qt}=cc(se,on,Yt.x,Yt.y,Nt());he(X,Rt,qt,{e:be,node:Se,newPosition:Wt})},[he,Ae,Ze,se,on,Nt,X]);tn.current=un,nn.current=oe;const Ne=L.useCallback((be,{node:Se,size:Ge,handle:_e},It,Wt)=>{const Yt=Wt==="onResizeStart"?U:Wt==="onResize"?Ie:ze;if(!Yt)return;let Rt;Se?Rt=XN(_e,It,Ge,r):Rt={...Ge,top:It.top,left:It.left},pn.current=Rt;const qt=LN(Ze,Rt.width,Rt.height),{w:Cn,h:Un}=zN(se,on,qt.w,qt.h,_e,Nt());Yt(X,Cn,Un,{e:be.nativeEvent,node:Se,size:Rt,handle:_e})},[U,Ie,ze,r,Ze,X,se,on,Nt]),je=L.useCallback((be,Se)=>{Ke(!0);const Ge=su(Ze,k,O,I,P),_e={...Se,handle:Se.handle};Ne(be,_e,Ge,"onResizeStart")},[Ne,Ze,k,O,I,P]),qe=L.useCallback((be,Se)=>{const Ge=su(Ze,k,O,I,P),_e={...Se,handle:Se.handle};Ne(be,_e,Ge,"onResize")},[Ne,Ze,k,O,I,P]),gt=L.useCallback((be,Se)=>{Ke(!1),pn.current={top:0,left:0,width:0,height:0};const Ge=su(Ze,k,O,I,P),_e={...Se,handle:Se.handle};Ne(be,_e,Ge,"onResizeStop")},[Ne,Ze,k,O,I,P]);L.useEffect(()=>{var _e,It;if(!v)return;const be=st.current;if(!be)return;const Se=Gt.current||{left:0,top:0},Ge=Ae&&(v.left!==Se.left||v.top!==Se.top);if(Ae){if(Ge){const Wt=v.left-Je.current.left,Yt=v.top-Je.current.top,Rt={node:be,deltaX:Wt,deltaY:Yt,lastX:Je.current.left,lastY:Je.current.top,x:v.left,y:v.top};(It=nn.current)==null||It.call(nn,v.e,Rt)}}else{const Wt={node:be,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};(_e=tn.current)==null||_e.call(tn,v.e,Wt)}Gt.current=v},[v,Ae,X]);const zt=su(Ze,k,O,I,P,Ae?Je.current:null,tt?pn.current:null),rn=Ee.Children.only(t),_n=su(Ze,0,0,1,1),Hn=[_n.width,_n.height],At=[1/0,1/0],yt=rn.props,ln=yt.className,Sr=yt.style;let Le=Ee.cloneElement(rn,{ref:st,className:Fr("react-grid-item",ln,C,{static:m,resizing:tt,"react-draggable":d,"react-draggable-dragging":Ae,dropping:!!v,cssTransforms:x}),style:{...N,...Sr,...tr(zt)}});const $e=$;return Le=g.jsx(E3.Resizable,{draggableOpts:{disabled:!h},className:h?void 0:"react-resizable-hide",width:zt.width,height:zt.height,minConstraints:Hn,maxConstraints:At,onResizeStart:je,onResize:qe,onResizeStop:gt,transformScale:_,resizeHandles:K,handle:$e,children:Le}),Le=g.jsx(m3.DraggableCore,{disabled:!d,onStart:un,onDrag:oe,onStop:pe,handle:A,cancel:".react-resizable-handle"+(M?","+M:""),scale:_,nodeRef:st,children:Le}),Le}var ys=()=>{},X1="react-grid-layout",vx=!1;try{vx=/firefox/i.test(navigator.userAgent)}catch{}function M3(e,t){const n=Ee.Children.toArray(e),r=Ee.Children.toArray(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++){const o=n[a],l=r[a];if((o==null?void 0:o.key)!==(l==null?void 0:l.key))return!1}return!0}function K1(e,t,n,r){const a=[],o=new Set;Ee.Children.forEach(t,c=>{if(!Ee.isValidElement(c)||c.key===null)return;const d=String(c.key);o.add(d);const h=e.find(p=>p.i===d);if(h)a.push(ei(h));else{const m=c.props["data-grid"];m?a.push({i:d,x:m.x??0,y:m.y??0,w:m.w??1,h:m.h??1,minW:m.minW,maxW:m.maxW,minH:m.minH,maxH:m.maxH,static:m.static,isDraggable:m.isDraggable,isResizable:m.isResizable,resizeHandles:m.resizeHandles,isBounded:m.isBounded}):a.push({i:d,x:0,y:z0(a),w:1,h:1})}});const l=BN(a,{cols:n});return r.compact(l,n)}function F3(e){const{children:t,width:n,gridConfig:r,dragConfig:a,resizeConfig:o,dropConfig:l,positionStrategy:c=ZN,compactor:d,constraints:h=Ic,layout:p=[],droppingItem:m,autoSize:x=!0,className:E="",style:_={},innerRef:S,onLayoutChange:w=ys,onDragStart:v=ys,onDrag:C=ys,onDragStop:N=ys,onResizeStart:A=ys,onResize:M=ys,onResizeStop:k=ys,onDrop:O=ys,onDropDragOver:I=ys}=e,P=L.useMemo(()=>({...e3,...r}),[r]),H=L.useMemo(()=>({...t3,...a}),[a]),F=L.useMemo(()=>({...n3,...o}),[o]),Y=L.useMemo(()=>({...r3,...l}),[l]),{cols:G,rowHeight:X,maxRows:K,margin:$,containerPadding:se}=P,{enabled:J,bounded:te,handle:R,cancel:ie,threshold:he}=H,{enabled:U,handles:Ie,handleComponent:ze}=F,{enabled:Ae,defaultItem:ct,onDragOver:tt}=Y,Ke=d??ox("vertical"),st=Ke.type,Je=Ke.allowOverlap,pn=Ke.preventCollision??!1,Gt=L.useMemo(()=>m??{i:"__dropping-elem__",...ct},[m,ct]),jn=c.type==="transform",tn=c.scale,nn=se??$,[mn,er]=L.useState(!1),[at,Ze]=L.useState(()=>K1(p,t,G,Ke)),[Et,Nt]=L.useState(null),[on,tr]=L.useState(!1),[un,oe]=L.useState(null),[pe,Ne]=L.useState(),je=L.useRef(null),qe=L.useRef(null),gt=L.useRef(null),zt=L.useRef(0),rn=L.useRef(at),_n=L.useRef(p),Hn=L.useRef(t),At=L.useRef(st),yt=L.useRef(at);yt.current=at,L.useEffect(()=>{er(!0),Ri(at,p)||w(at)},[]),L.useEffect(()=>{if(Et||un)return;const Ce=!Ri(p,_n.current),We=!M3(t,Hn.current),Pe=st!==At.current;if(Ce||We||Pe){const dt=K1(Ce?p:at,t,G,Ke);Ri(dt,at)||Ze(dt)}_n.current=p,Hn.current=t,At.current=st},[p,t,G,st,Ke,Et,un,at]),L.useEffect(()=>{if(!Et&&!Ri(at,rn.current)){rn.current=at;const Ce=at.filter(We=>We.i!==Gt.i);w(Ce)}},[at,Et,w,Gt.i]);const ln=L.useMemo(()=>{if(!x)return;const Ce=z0(at),We=nn[1];return Ce*X+(Ce-1)*$[1]+We*2+"px"},[x,at,X,$,nn]),Sr=L.useCallback((Ce,We,Pe,et)=>{const dt=yt.current,it=Ra(dt,Ce);if(!it)return;const xt={w:it.w,h:it.h,x:it.x,y:it.y,i:Ce};je.current=ei(it),gt.current=dt,Nt(xt),v(dt,it,it,null,et.e,et.node)},[v]),Le=L.useCallback((Ce,We,Pe,et)=>{const dt=yt.current,it=je.current,xt=Ra(dt,Ce);if(!xt)return;const Tt={w:xt.w,h:xt.h,x:xt.x,y:xt.y,i:Ce},bt=Fa(dt,xt,We,Pe,!0,pn,st,G,Je);C(bt,it,xt,Tt,et.e,et.node),Ze(Ke.compact(bt,G)),Nt(Tt)},[pn,st,G,Je,Ke,C]),$e=L.useCallback((Ce,We,Pe,et)=>{if(!Et)return;const dt=yt.current,it=je.current,xt=Ra(dt,Ce);if(!xt)return;const Tt=Fa(dt,xt,We,Pe,!0,pn,st,G,Je),bt=Ke.compact(Tt,G);N(bt,it,xt,null,et.e,et.node);const cn=gt.current;je.current=null,gt.current=null,Nt(null),Ze(bt),cn&&!Ri(cn,bt)&&w(bt)},[Et,pn,st,G,Je,Ke,N,w]),be=L.useCallback((Ce,We,Pe,et)=>{const dt=yt.current,it=Ra(dt,Ce);it&&(qe.current=ei(it),gt.current=dt,tr(!0),A(dt,it,it,null,et.e,et.node))},[A]),Se=L.useCallback((Ce,We,Pe,et)=>{const dt=yt.current,it=qe.current,{handle:xt}=et;let Tt=!1,bt,cn;const[oi,dr]=FN(dt,Ce,vt=>(bt=vt.x,cn=vt.y,["sw","w","nw","n","ne"].includes(xt)&&(["sw","nw","w"].includes(xt)&&(bt=vt.x+(vt.w-We),We=vt.x!==bt&&bt<0?vt.w:We,bt=bt<0?0:bt),["ne","n","nw"].includes(xt)&&(cn=vt.y+(vt.h-Pe),Pe=vt.y!==cn&&cn<0?vt.h:Pe,cn=cn<0?0:cn),Tt=!0),pn&&!Je&&ZE(dt,{...vt,w:We,h:Pe,x:bt??vt.x,y:cn??vt.y}).filter(ui=>ui.i!==vt.i).length>0&&(cn=vt.y,Pe=vt.h,bt=vt.x,We=vt.w,Tt=!1),vt.w=We,vt.h=Pe,vt));if(!dr)return;let Os=oi;Tt&&bt!==void 0&&cn!==void 0&&(Os=Fa(oi,dr,bt,cn,!0,pn,st,G,Je));const ba={w:dr.w,h:dr.h,x:dr.x,y:dr.y,i:Ce,static:!0};M(Os,it,dr,ba,et.e,et.node),Ze(Ke.compact(Os,G)),Nt(ba)},[pn,st,G,Je,Ke,M]),Ge=L.useCallback((Ce,We,Pe,et)=>{const dt=yt.current,it=qe.current,xt=Ra(dt,Ce),Tt=Ke.compact(dt,G);k(Tt,it,xt??null,null,et.e,et.node);const bt=gt.current;qe.current=null,gt.current=null,Nt(null),tr(!1),Ze(Tt),bt&&!Ri(bt,Tt)&&w(Tt)},[G,Ke,k,w]),_e=L.useCallback(()=>{const Ce=yt.current;if(!Ce.some(et=>et.i===Gt.i)){oe(null),Nt(null),Ne(void 0);return}const Pe=Ke.compact(Ce.filter(et=>et.i!==Gt.i),G);Ze(Pe),oe(null),Nt(null),Ne(void 0)},[Gt.i,G,Ke]),It=L.useCallback(Ce=>{var Ju;if(Ce.preventDefault(),Ce.stopPropagation(),vx&&!((Ju=Ce.nativeEvent.target)!=null&&Ju.classList.contains(X1)))return!1;const We=tt?tt(Ce.nativeEvent):I(Ce);if(We===!1)return un&&_e(),!1;const{dragOffsetX:Pe=0,dragOffsetY:et=0,...dt}=We??{},it={...Gt,...dt},xt=Ce.currentTarget.getBoundingClientRect(),Tt={cols:G,margin:$,maxRows:K,rowHeight:X,containerWidth:n,containerPadding:nn},bt=ho(Tt),cn=ro(it.w,bt,$[0]),oi=ro(it.h,X,$[1]),dr=cn/2,Os=oi/2,ba=Ce.clientX-xt.left+Pe-dr,vt=Ce.clientY-xt.top+et-Os,Eo=Math.max(0,ba),ui=Math.max(0,vt),wt={left:Eo/tn,top:ui/tn,e:Ce.nativeEvent};if(un)pe&&(pe.left!==wt.left||pe.top!==wt.top)&&Ne(wt);else{const Ea=RN(Tt,ui,Eo,it.w,it.h);oe(g.jsx("div",{},it.i)),Ne(wt),Ze([...yt.current,{...it,x:Ea.x,y:Ea.y,static:!1,isDraggable:!0}])}},[un,pe,Gt,tt,I,_e,tn,G,$,K,X,n,nn]),Wt=L.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),zt.current--,zt.current<0&&(zt.current=0),zt.current===0&&_e()},[_e]),Yt=L.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),zt.current++},[]),Rt=L.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation();const We=yt.current,Pe=We.find(et=>et.i===Gt.i);zt.current=0,_e(),O(We,Pe,Ce.nativeEvent)},[Gt.i,_e,O]),qt=L.useCallback((Ce,We)=>{if(!Ce||!Ce.key)return null;const Pe=Ra(at,String(Ce.key));if(!Pe)return null;const et=typeof Pe.isDraggable=="boolean"?Pe.isDraggable:!Pe.static&&J,dt=typeof Pe.isResizable=="boolean"?Pe.isResizable:!Pe.static&&U,it=Pe.resizeHandles||[...Ie],xt=et&&te&&Pe.isBounded!==!1,Tt=ze;return g.jsx(G1,{containerWidth:n,cols:G,margin:$,containerPadding:nn,maxRows:K,rowHeight:X,cancel:ie,handle:R,onDragStart:Sr,onDrag:Le,onDragStop:$e,onResizeStart:be,onResize:Se,onResizeStop:Ge,isDraggable:et,isResizable:dt,isBounded:xt,useCSSTransforms:jn&&mn,usePercentages:!mn,transformScale:tn,positionStrategy:c,dragThreshold:he,w:Pe.w,h:Pe.h,x:Pe.x,y:Pe.y,i:Pe.i,minH:Pe.minH,minW:Pe.minW,maxH:Pe.maxH,maxW:Pe.maxW,static:Pe.static,droppingPosition:We?pe:void 0,resizeHandles:it,resizeHandle:Tt,constraints:h,layoutItem:Pe,layout:at,children:Ce},Pe.i)},[at,n,G,$,nn,K,X,ie,R,Sr,Le,$e,be,Se,Ge,J,U,te,jn,mn,tn,c,he,pe,Ie,ze,h]),Cn=()=>Et?g.jsx(G1,{w:Et.w,h:Et.h,x:Et.x,y:Et.y,i:Et.i,className:`react-grid-placeholder ${on?"placeholder-resizing":""}`,containerWidth:n,cols:G,margin:$,containerPadding:nn,maxRows:K,rowHeight:X,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:jn,transformScale:tn,constraints:h,layout:at,children:g.jsx("div",{})}):null,Un=Fr(X1,E),Ur={height:ln,..._};return g.jsxs("div",{ref:S,className:Un,style:Ur,onDrop:Ae?Rt:void 0,onDragLeave:Ae?Wt:void 0,onDragEnter:Ae?Yt:void 0,onDragOver:Ae?It:void 0,children:[Ee.Children.map(t,Ce=>Ee.isValidElement(Ce)?qt(Ce):null),Ae&&un&&qt(un,!0),Cn()]})}function wx(e){const{children:t,width:n,cols:r=12,rowHeight:a=150,maxRows:o=1/0,margin:l=[10,10],containerPadding:c=null,layout:d,droppingItem:h,compactType:p,preventCollision:m=!1,allowOverlap:x=!1,verticalCompact:E,isDraggable:_=!0,isBounded:S=!1,draggableHandle:w,draggableCancel:v,isResizable:C=!0,resizeHandles:N=["se"],resizeHandle:A,isDroppable:M=!1,useCSSTransforms:k=!0,transformScale:O=1,autoSize:I,className:P,style:H,innerRef:F,onLayoutChange:Y,onDragStart:G,onDrag:X,onDragStop:K,onResizeStart:$,onResize:se,onResizeStop:J,onDrop:te,onDropDragOver:R}=e;let ie=p===void 0?"vertical":p;E===!1&&(ie=null);const he={cols:r,rowHeight:a,maxRows:o,margin:l,containerPadding:c},U={enabled:_,bounded:S,handle:w,cancel:v,threshold:0},Ie={enabled:C,handles:N,handleComponent:A},ze={enabled:M};let Ae;k?O!==1?Ae=JN(O):Ae=rx:Ae=KN;const ct=ox(ie,x,m),tt=S?[...Ic,UN]:Ic;return g.jsx(F3,{width:n,gridConfig:he,dragConfig:U,resizeConfig:Ie,dropConfig:ze,positionStrategy:Ae,compactor:ct,constraints:tt,layout:d,droppingItem:h,autoSize:I,className:P,style:H,innerRef:F,onLayoutChange:Y,onDragStart:G,onDrag:X,onDragStop:K,onResizeStart:$,onResize:se,onResizeStop:J,onDrop:te,onDropDragOver:R,children:t})}wx.displayName="ReactGridLayout";var J1=wx;function ch(e,t){if(!t)return e.toLocaleString();const n=t.decimals??0;switch(t.type){case"currency":return new Intl.NumberFormat("en-US",{style:"currency",currency:t.currency||"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(e);case"percent":return new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(e/100);default:return e.toLocaleString(void 0,{minimumFractionDigits:n,maximumFractionDigits:n})}}function B3(e,t){const n=e>=0?"+":"";return t==="percent_change"?`${n}${e.toFixed(1)}%`:`${n}${e.toLocaleString()}`}function j3({chartRef:e}){var C,N,A,M;const{data:t}=Fb(e),{data:n,isLoading:r,error:a,isFetching:o}=jb(e),l=_0(),c=()=>{l(e)},d=()=>{if(!n||!t)return;const k=t.name||e;Wc(n.rows,n.columns,k)};if(r)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsx("div",{className:"animate-pulse bg-gray-200 h-12 w-24 rounded"})});if(a||!((C=n==null?void 0:n.rows)!=null&&C[0]))return g.jsx("div",{className:"h-full flex items-center justify-center text-red-500 text-sm",children:"Failed to load"});const h=n.rows[0],p=t==null?void 0:t.chart;if(!((N=p==null?void 0:p.value)!=null&&N.field))return g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Invalid KPI config"});const m=h[p.value.field],x=ch(m,p.format);let E=null,_="percent_change",S,w,v;if(n.comparison)E=n.comparison.change,_=n.comparison.changeType,S=n.comparison.currentPeriodLabel,w=n.comparison.previousPeriodLabel,v=ch(n.comparison.previousValue,p.format);else if((A=p.comparison)!=null&&A.enabled&&p.comparison.field){const k=h[p.comparison.field];_=p.comparison.type,k&&k!==0&&(_==="percent_change"?E=(m-k)/k*100:E=m-k,v=ch(k,p.format))}return g.jsxs("div",{className:"h-full flex flex-col p-4 group relative",children:[g.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:g.jsx(XE,{onRefresh:c,onExportCSV:d,onExportPNG:d,onExportSVG:d,isRefreshing:o,hideImageExport:!0})}),g.jsxs("div",{className:"flex-1 flex flex-col justify-center",children:[g.jsxs("div",{className:"text-3xl font-bold text-gray-900",children:[x,p.unit&&g.jsx("span",{className:"text-lg font-normal text-gray-400 ml-1",children:p.unit})]}),S&&g.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:S}),g.jsx("a",{href:`#/charts/${e}`,className:"text-sm text-gray-500 mt-1 hover:text-gray-700 hover:underline inline-block",children:t==null?void 0:t.title}),E!==null&&g.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap relative group/comparison",children:[g.jsx("span",{className:Fr("text-sm font-medium px-2 py-0.5 rounded",E>=0?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:B3(E,_)}),v&&g.jsxs("span",{className:"text-xs text-gray-400",children:["vs ",v]}),!v&&((M=p.comparison)==null?void 0:M.label)&&g.jsx("span",{className:"text-xs text-gray-400",children:p.comparison.label}),w&&g.jsx("div",{className:"absolute bottom-full left-0 mb-1.5 hidden group-hover/comparison:block z-10 pointer-events-none",children:g.jsxs("div",{className:"bg-gray-800 text-white text-xs rounded-md px-3 py-2 shadow-lg whitespace-nowrap",children:[g.jsx("div",{className:"font-medium",children:w}),v&&g.jsxs("div",{className:"text-gray-300 mt-0.5",children:["Previous: ",v]})]})})]})]})]})}function H3({chartRef:e}){var $,se,J,te,R;const{data:t,isLoading:n,isFetching:r}=Aw(e),{data:a}=io(),o=t==null?void 0:t.config,l=t,c=_0(),d=L.useRef(null),[h,p]=L.useState(!1),m=Ye(ie=>ie.chartFilters),x=Ye(ie=>ie.resetChartFilters),E=Ye(ie=>ie.crossFilters),_=Ye(ie=>ie.setCrossFilter),S=m[e]&&Object.keys(m[e]).length>0,w=L.useCallback((ie,he)=>{_(ie,he,e)},[_,e]),v=L.useMemo(()=>{for(const ie of Object.values(E))if(ie.sourceChart===e)return{field:ie.field,value:ie.value};return null},[E,e]),[C,N]=L.useState(null),A=L.useCallback((ie,he,U)=>{var Ie;(Ie=o==null?void 0:o.drillDown)!=null&&Ie.chart&&N({x:U.x,y:U.y,field:ie,value:he})},[($=o==null?void 0:o.drillDown)==null?void 0:$.chart]),M=L.useCallback(()=>{var U,Ie;if(!C||!((U=o==null?void 0:o.drillDown)!=null&&U.chart))return;const ie=o.drillDown.field??((Ie=o.chart.x)==null?void 0:Ie.field)??C.field,he=new URLSearchParams({[ie]:C.value,_from:e});window.location.hash=`/charts/${o.drillDown.chart}?${he.toString()}`,N(null)},[C,o,e]),k=()=>{c(e)},O=()=>{x(e),p(!1)},I=()=>{if(!l||!o)return;const ie=o.name||e;Wc(l.rows,l.columns,ie)},P=()=>{var he;const ie=(he=d.current)==null?void 0:he.getDataURL("png");ie&&o&&Dc(ie,`${o.name||e}.png`)},H=()=>{var he;const ie=(he=d.current)==null?void 0:he.getDataURL("svg");ie&&o&&Dc(ie,`${o.name||e}.svg`)},F=async()=>{var he;const ie=(he=d.current)==null?void 0:he.getDataURL("png");ie&&o&&await cN(ie,o.name||e,o.title)};if(n)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsx("div",{className:"animate-pulse bg-gray-100 w-full h-full rounded"})});if(!o||!l)return g.jsxs("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:["Chart not found: ",e]});if(((se=o.chart)==null?void 0:se.type)==="kpi")return g.jsx(j3,{chartRef:e});const Y=["line","bar","area","pie","donut","scatter","combo","heatmap","funnel","waterfall","gauge"].includes(o.chart.type),G=(J=o==null?void 0:o.drillDown)!=null&&J.chart?A:void 0,X=()=>{switch(o.chart.type){case"line":return!o.chart.x||!o.chart.y&&!o.chart.series?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(BE,{ref:d,data:l.rows,columns:l.columns,xAxis:o.chart.x,yAxis:o.chart.y,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G});case"bar":return!o.chart.x||!o.chart.y&&!o.chart.series?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(jE,{ref:d,data:l.rows,xAxis:o.chart.x,yAxis:o.chart.y,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G});case"area":return!o.chart.x||!o.chart.y&&!o.chart.series?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(HE,{ref:d,data:l.rows,xAxis:o.chart.x,yAxis:o.chart.y,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G});case"pie":return!o.chart.x||!o.chart.y?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(UE,{ref:d,data:l.rows,xAxis:o.chart.x,yAxis:o.chart.y,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G});case"donut":return!o.chart.x||!o.chart.y?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(zE,{ref:d,data:l.rows,xAxis:o.chart.x,yAxis:o.chart.y,centerValue:o.chart.centerValue,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G});case"scatter":return!o.chart.x||!o.chart.y?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx(WE,{ref:d,data:l.rows,xAxis:o.chart.x,yAxis:o.chart.y,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r});case"table":return g.jsx(YE,{data:l.rows,columns:l.columns,height:"100%",loading:r});case"metric":return o.chart.y?g.jsx(NN,{data:l.rows,yAxis:o.chart.y,title:o.title,loading:r}):g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing value configuration"});case"combo":return o.chart.x?g.jsx(qE,{ref:d,data:l.rows,xAxis:o.chart.x,chartConfig:o.chart,theme:a==null?void 0:a.theme,height:"100%",loading:r,onCrossFilter:w,activeCrossFilter:v,onDrillDown:G}):g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"});case"heatmap":return!o.chart.x||!o.chart.y?g.jsx("div",{className:"h-full flex items-center justify-center text-gray-400 text-sm",children:"Missing axis configuration"}):g.jsx($E,{ref:d,data:l.rows,chartConfig:o.chart,height:"100%",loading:r});case"funnel":return g.jsx(VE,{ref:d,data:l.rows,chartConfig:o.chart,height:"100%",loading:r});case"waterfall":return g.jsx(QE,{ref:d,data:l.rows,chartConfig:o.chart,height:"100%",loading:r});case"gauge":return g.jsx(GE,{ref:d,data:l.rows,chartConfig:o.chart,height:"100%",loading:r});default:return g.jsxs("div",{className:"h-full flex items-center justify-center text-gray-500 text-sm",children:['Chart type "',o.chart.type,'" not yet implemented']})}},K=o.parameters&&o.parameters.length>0;return g.jsxs("div",{className:"h-full p-2 flex flex-col group",children:[g.jsxs("div",{className:"flex items-center justify-between mb-2 px-2 flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("a",{href:`#/charts/${e}`,className:"text-sm font-medium text-gray-700 hover:text-gray-900 hover:underline",children:o.title}),((te=o==null?void 0:o.drillDown)==null?void 0:te.chart)&&g.jsxs("svg",{className:"w-3.5 h-3.5 text-gray-400 flex-shrink-0",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[g.jsx("title",{children:"Right-click to drill down"}),g.jsx("path",{fillRule:"evenodd",d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z",clipRule:"evenodd"})]}),S&&g.jsx("span",{className:"text-xs px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded",children:"Filtered"})]}),g.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[K&&g.jsx("button",{onClick:()=>p(!h),className:`p-1.5 rounded hover:bg-gray-100 ${h?"bg-gray-100":""}`,title:h?"Hide filters":"Override filters",children:g.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})})}),g.jsx(XE,{onRefresh:k,onExportCSV:I,onExportPNG:Y?P:I,onExportSVG:Y?H:I,onExportPDF:Y?F:void 0,isRefreshing:r})]})]}),h&&K&&g.jsx("div",{className:"mb-2 px-2 flex-shrink-0",children:g.jsxs("div",{className:"flex items-end gap-2 flex-wrap",children:[g.jsx(PE,{parameters:o.parameters,chartName:e}),S&&g.jsx("button",{onClick:O,className:"px-2 py-1.5 text-xs text-gray-600 hover:text-gray-800 hover:bg-gray-100 rounded",children:"Reset to dashboard"})]})}),g.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:X()}),C&&((R=o==null?void 0:o.drillDown)==null?void 0:R.chart)&&g.jsx(KE,{x:C.x,y:C.y,targetChartTitle:o.drillDown.chart,onDrillDown:M,onClose:()=>N(null)})]})}var Sx=Bc();function Z1(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(a,r).trim();(l||!o)&&t.push(l),a=r+1,r=n.indexOf(",",a)}return t}function _x(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const U3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,W3={};function ey(e,t){return(W3.jsx?z3:U3).test(e)}const Y3=/[ \t\n\f\r]/g;function q3(e){return typeof e=="object"?e.type==="text"?ty(e.value):!1:ty(e)}function ty(e){return e.replace(Y3,"")===""}class Vu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vu.prototype.normal={};Vu.prototype.property={};Vu.prototype.space=void 0;function Cx(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Vu(n,r,t)}function Du(e){return e.toLowerCase()}class Zn{constructor(t,n){this.attribute=n,this.property=t}}Zn.prototype.attribute="";Zn.prototype.booleanish=!1;Zn.prototype.boolean=!1;Zn.prototype.commaOrSpaceSeparated=!1;Zn.prototype.commaSeparated=!1;Zn.prototype.defined=!1;Zn.prototype.mustUseProperty=!1;Zn.prototype.number=!1;Zn.prototype.overloadedBoolean=!1;Zn.prototype.property="";Zn.prototype.spaceSeparated=!1;Zn.prototype.space=void 0;let $3=0;const Ve=ai(),an=ai(),e0=ai(),me=ai(),Ct=ai(),Fi=ai(),ir=ai();function ai(){return 2**++$3}const t0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:an,commaOrSpaceSeparated:ir,commaSeparated:Fi,number:me,overloadedBoolean:e0,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),dh=Object.keys(t0);class K0 extends Zn{constructor(t,n,r,a){let o=-1;if(super(t,n),ny(this,"space",a),typeof r=="number")for(;++o<dh.length;){const l=dh[o];ny(this,dh[o],(r&t0[l])===t0[l])}}}K0.prototype.defined=!0;function ny(e,t,n){n&&(e[t]=n)}function po(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new K0(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Du(r)]=r,n[Du(o.attribute)]=r}return new Vu(t,n,e.space)}const kx=po({properties:{ariaActiveDescendant:null,ariaAtomic:an,ariaAutoComplete:null,ariaBusy:an,ariaChecked:an,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:an,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:an,ariaFlowTo:Ct,ariaGrabbed:an,ariaHasPopup:null,ariaHidden:an,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:me,ariaLive:null,ariaModal:an,ariaMultiLine:an,ariaMultiSelectable:an,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:an,ariaReadOnly:an,ariaRelevant:null,ariaRequired:an,ariaRoleDescription:Ct,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:an,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Nx(e,t){return t in e?e[t]:t}function Ox(e,t){return Nx(e,t.toLowerCase())}const V3=po({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fi,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:Ct,autoFocus:Ve,autoPlay:Ve,blocking:Ct,capture:null,charSet:null,checked:Ve,cite:null,className:Ct,cols:me,colSpan:null,content:null,contentEditable:an,controls:Ve,controlsList:Ct,coords:me|Fi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:e0,draggable:an,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:Ct,height:me,hidden:e0,high:me,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:Ve,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:me,pattern:null,ping:Ct,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:Ct,required:Ve,reversed:Ve,rows:me,rowSpan:me,sandbox:Ct,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:an,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:an,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:an,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:Ox}),Q3=po({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ir,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:Ct,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:Fi,g2:Fi,glyphName:Fi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ir,rev:ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ir,requiredFeatures:ir,requiredFonts:ir,requiredFormats:ir,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ir,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ir,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Nx}),Dx=po({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()}}),Ax=po({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ox}),Ix=po({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),G3={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"},X3=/[A-Z]/g,ry=/-[a-z]/g,K3=/^data[-\w.:]+$/i;function td(e,t){const n=Du(t);let r=t,a=Zn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&K3.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ry,Z3);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ry.test(o)){let l=o.replace(X3,J3);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=K0}return new a(r,t)}function J3(e){return"-"+e.toLowerCase()}function Z3(e){return e.charAt(1).toUpperCase()}const Qu=Cx([kx,V3,Dx,Ax,Ix],"html"),ga=Cx([kx,Q3,Dx,Ax,Ix],"svg");function sy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Rx(e){return e.join(" ").trim()}var Li={},fh,ay;function eO(){if(ay)return fh;ay=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
95
|
+
`,h="/",p="*",m="",x="comment",E="declaration";function _(w,v){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];v=v||{};var C=1,N=1;function A(X){var K=X.match(t);K&&(C+=K.length);var $=X.lastIndexOf(d);N=~$?X.length-$:N+X.length}function M(){var X={line:C,column:N};return function(K){return K.position=new k(X),P(),K}}function k(X){this.start=X,this.end={line:C,column:N},this.source=v.source}k.prototype.content=w;function O(X){var K=new Error(v.source+":"+C+":"+N+": "+X);if(K.reason=X,K.filename=v.source,K.line=C,K.column=N,K.source=w,!v.silent)throw K}function I(X){var K=X.exec(w);if(K){var $=K[0];return A($),w=w.slice($.length),K}}function P(){I(n)}function H(X){var K;for(X=X||[];K=F();)K!==!1&&X.push(K);return X}function F(){var X=M();if(!(h!=w.charAt(0)||p!=w.charAt(1))){for(var K=2;m!=w.charAt(K)&&(p!=w.charAt(K)||h!=w.charAt(K+1));)++K;if(K+=2,m===w.charAt(K-1))return O("End of comment missing");var $=w.slice(2,K-2);return N+=2,A($),w=w.slice(K),N+=2,X({type:x,comment:$})}}function Y(){var X=M(),K=I(r);if(K){if(F(),!I(a))return O("property missing ':'");var $=I(o),se=X({type:E,property:S(K[0].replace(e,m)),value:$?S($[0].replace(e,m)):m});return I(l),se}}function G(){var X=[];H(X);for(var K;K=Y();)K!==!1&&(X.push(K),H(X));return X}return P(),G()}function S(w){return w?w.replace(c,m):m}return fh=_,fh}var iy;function tO(){if(iy)return Li;iy=1;var e=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=n;const t=e(eO());function n(r,a){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof a=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;c?a(h,p,d):p&&(o=o||{},o[h]=p)}),o}return Li}var du={},oy;function nO(){if(oy)return du;oy=1,Object.defineProperty(du,"__esModule",{value:!0}),du.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(a,c):h=h.replace(r,c),h.replace(t,l))};return du.camelCase=d,du}var fu,uy;function rO(){if(uy)return fu;uy=1;var e=fu&&fu.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(tO()),n=nO();function r(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(c,d){c&&d&&(l[(0,n.camelCase)(c,o)]=d)}),l}return r.default=r,fu=r,fu}var sO=rO();const aO=gb(sO),nd=Lx("end"),us=Lx("start");function Lx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function iO(e){const t=us(e),n=nd(e);if(t&&n)return{start:t,end:n}}function xu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ly(e.position):"start"in e||"end"in e?ly(e):"line"in e||"column"in e?n0(e):""}function n0(e){return cy(e&&e.line)+":"+cy(e&&e.column)}function ly(e){return n0(e&&e.start)+"-"+n0(e&&e.end)}function cy(e){return e&&typeof e=="number"?e:1}class Ln extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",o={},l=!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"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=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=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.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=l&&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}}Ln.prototype.file="";Ln.prototype.name="";Ln.prototype.reason="";Ln.prototype.message="";Ln.prototype.stack="";Ln.prototype.column=void 0;Ln.prototype.line=void 0;Ln.prototype.ancestors=void 0;Ln.prototype.cause=void 0;Ln.prototype.fatal=void 0;Ln.prototype.place=void 0;Ln.prototype.ruleId=void 0;Ln.prototype.source=void 0;const J0={}.hasOwnProperty,oO=new Map,uO=/[A-Z]/g,lO=new Set(["table","tbody","thead","tfoot","tr"]),cO=new Set(["td","th"]),Px="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dO(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=EO(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bO(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ga:Qu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Mx(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Mx(e,t,n){if(t.type==="element")return fO(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return hO(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mO(e,t,n);if(t.type==="mdxjsEsm")return pO(e,t);if(t.type==="root")return gO(e,t,n);if(t.type==="text")return yO(e,t)}function fO(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=ga,e.schema=a),e.ancestors.push(t);const o=Bx(e,t.tagName,!1),l=xO(e,t);let c=ep(e,t);return lO.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!q3(d):!0})),Fx(e,l,o,t),Z0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function hO(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Au(e,t.position)}function pO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Au(e,t.position)}function mO(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=ga,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Bx(e,t.name,!0),l=TO(e,t),c=ep(e,t);return Fx(e,l,o,t),Z0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function gO(e,t,n){const r={};return Z0(r,ep(e,t)),e.create(t,e.Fragment,r,n)}function yO(e,t){return t.value}function Fx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Z0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bO(e,t,n){return r;function r(a,o,l,c){const h=Array.isArray(l.children)?n:t;return c?h(o,l,c):h(o,l)}}function EO(e,t){return n;function n(r,a,o,l){const c=Array.isArray(o.children),d=us(r);return t(a,o,l,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function xO(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&J0.call(t.properties,a)){const o=vO(e,a,t.properties[a]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&cO.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function TO(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Au(e,t.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else Au(e,t.position);else o=r.value===null?!0:r.value;n[a]=o}return n}function ep(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:oO;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;l=d+"-"+h,a.set(d,h+1)}}const c=Mx(e,o,l);c!==void 0&&n.push(c)}return n}function vO(e,t,n){const r=td(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_x(n):Rx(n)),r.property==="style"){let a=typeof n=="object"?n:wO(e,String(n));return e.stylePropertyNameCase==="css"&&(a=SO(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?G3[r.property]||r.property:r.attribute,n]}}function wO(e,t){try{return aO(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Ln("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Px+"#cannot-parse-style-attribute",a}}function Bx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const c=ey(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=ey(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return J0.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Au(e)}function Au(e,t){const n=new Ln("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=Px+"#cannot-handle-mdx-estrees-without-createevaluater",n}function SO(e){const t={};let n;for(n in e)J0.call(e,n)&&(t[_O(n)]=e[n]);return t}function _O(e){let t=e.replace(uO,CO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CO(e){return"-"+e.toLowerCase()}const hh={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"]},kO={};function NO(e,t){const n=kO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return jx(e,r,a)}function jx(e,t,n){if(OO(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 dy(e.children,t,n)}return Array.isArray(e)?dy(e,t,n):""}function dy(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=jx(e[a],t,n);return r.join("")}function OO(e){return!!(e&&typeof e=="object")}const fy=document.createElement("i");function tp(e){const t="&"+e+";";fy.innerHTML=t;const n=fy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function as(e,t,n,r){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function vr(e,t){return e.length>0?(as(e,e.length,0,t),e):t}const hy={}.hasOwnProperty;function DO(e){const t={};let n=-1;for(;++n<e.length;)AO(t,e[n]);return t}function AO(e,t){let n;for(n in t){const a=(hy.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){hy.call(a,l)||(a[l]=[]);const c=o[l];IO(a[l],Array.isArray(c)?c:c?[c]:[])}}}function IO(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);as(e,0,0,r)}function Hx(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 Bi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ns=ya(/[A-Za-z]/),lr=ya(/[\dA-Za-z]/),RO=ya(/[#-'*+\--9=?A-Z^-~]/);function r0(e){return e!==null&&(e<32||e===127)}const s0=ya(/\d/),LO=ya(/[\dA-Fa-f]/),PO=ya(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Jn(e){return e!==null&&(e<0||e===32)}function ut(e){return e===-2||e===-1||e===32}const MO=ya(new RegExp("\\p{P}|\\p{S}","u")),FO=ya(/\s/);function ya(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function mo(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&lr(e.charCodeAt(n+1))&&lr(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function kt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return ut(d)?(e.enter(n),c(d)):t(d)}function c(d){return ut(d)&&o++<a?(e.consume(d),c):(e.exit(n),t(d))}}const BO={tokenize:jO};function jO(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),kt(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ue(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const HO={tokenize:UO},py={tokenize:zO};function UO(e){const t=this,n=[];let r=0,a,o,l;return c;function c(N){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(N)}return h(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&C();const A=t.events.length;let M=A,k;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){k=t.events[M][1].end;break}v(r);let O=A;for(;O<t.events.length;)t.events[O][1].end={...k},O++;return as(t.events,M+1,0,t.events.slice(A)),t.events.length=O,h(N)}return c(N)}function h(N){if(r===n.length){if(!a)return x(N);if(a.currentConstruct&&a.currentConstruct.concrete)return _(N);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(py,p,m)(N)}function p(N){return a&&C(),v(r),x(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,_(N)}function x(N){return t.containerState={},e.attempt(py,E,_)(N)}function E(N){return r++,n.push([t.currentConstruct,t.containerState]),x(N)}function _(N){if(N===null){a&&C(),v(0),e.consume(N);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),S(N)}function S(N){if(N===null){w(e.exit("chunkFlow"),!0),v(0),e.consume(N);return}return Ue(N)?(e.consume(N),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),S)}function w(N,A){const M=t.sliceStream(N);if(A&&M.push(null),N.previous=o,o&&(o.next=N),o=N,a.defineSkip(N.start),a.write(M),t.parser.lazy[N.start.line]){let k=a.events.length;for(;k--;)if(a.events[k][1].start.offset<l&&(!a.events[k][1].end||a.events[k][1].end.offset>l))return;const O=t.events.length;let I=O,P,H;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){H=t.events[I][1].end;break}P=!0}for(v(r),k=O;k<t.events.length;)t.events[k][1].end={...H},k++;as(t.events,I+1,0,t.events.slice(O)),t.events.length=k}}function v(N){let A=n.length;for(;A-- >N;){const M=n[A];t.containerState=M[1],M[0].exit.call(t,e)}n.length=N}function C(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function zO(e,t,n){return kt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function my(e){if(e===null||Jn(e)||FO(e))return 1;if(MO(e))return 2}function np(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const a0={name:"attention",resolveAll:WO,tokenize:YO};function WO(e,t){let n=-1,r,a,o,l,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},x={...e[n][1].start};gy(m,-d),gy(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=vr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=vr(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=vr(h,np(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=vr(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=vr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,as(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function YO(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=my(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const h=e.exit("attentionSequence"),p=my(d),m=!p||p===2&&a||n.includes(d),x=!a||a===2&&p||n.includes(r);return h._open=!!(o===42?m:m&&(a||!x)),h._close=!!(o===42?x:x&&(p||!m)),t(d)}}function gy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qO={name:"autolink",tokenize:$O};function $O(e,t,n){let r=0;return a;function a(E){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(E){return ns(E)?(e.consume(E),l):E===64?n(E):h(E)}function l(E){return E===43||E===45||E===46||lr(E)?(r=1,c(E)):h(E)}function c(E){return E===58?(e.consume(E),r=0,d):(E===43||E===45||E===46||lr(E))&&r++<32?(e.consume(E),c):(r=0,h(E))}function d(E){return E===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):E===null||E===32||E===60||r0(E)?n(E):(e.consume(E),d)}function h(E){return E===64?(e.consume(E),p):RO(E)?(e.consume(E),h):n(E)}function p(E){return lr(E)?m(E):n(E)}function m(E){return E===46?(e.consume(E),r=0,p):E===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):x(E)}function x(E){if((E===45||lr(E))&&r++<63){const _=E===45?x:m;return e.consume(E),_}return n(E)}}const rd={partial:!0,tokenize:VO};function VO(e,t,n){return r;function r(o){return ut(o)?kt(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Ue(o)?t(o):n(o)}}const Ux={continuation:{tokenize:GO},exit:XO,name:"blockQuote",tokenize:QO};function QO(e,t,n){const r=this;return a;function a(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return ut(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function GO(e,t,n){const r=this;return a;function a(l){return ut(l)?kt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Ux,t,n)(l)}}function XO(e){e.exit("blockQuote")}const zx={name:"characterEscape",tokenize:KO};function KO(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return PO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Wx={name:"characterReference",tokenize:JO};function JO(e,t,n){const r=this;let a=0,o,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=lr,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=LO,p):(e.enter("characterReferenceValue"),o=7,l=s0,p(m))}function p(m){if(m===59&&a){const x=e.exit("characterReferenceValue");return l===lr&&!tp(r.sliceSerialize(x))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&a++<o?(e.consume(m),p):n(m)}}const yy={partial:!0,tokenize:eD},by={concrete:!0,name:"codeFenced",tokenize:ZO};function ZO(e,t,n){const r=this,a={partial:!0,tokenize:M};let o=0,l=0,c;return d;function d(k){return h(k)}function h(k){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===c?(l++,e.consume(k),p):l<3?n(k):(e.exit("codeFencedFenceSequence"),ut(k)?kt(e,m,"whitespace")(k):m(k))}function m(k){return k===null||Ue(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(yy,S,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||Ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(k)):ut(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kt(e,E,"whitespace")(k)):k===96&&k===c?n(k):(e.consume(k),x)}function E(k){return k===null||Ue(k)?m(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(k))}function _(k){return k===null||Ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(k)):k===96&&k===c?n(k):(e.consume(k),_)}function S(k){return e.attempt(a,A,w)(k)}function w(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v}function v(k){return o>0&&ut(k)?kt(e,C,"linePrefix",o+1)(k):C(k)}function C(k){return k===null||Ue(k)?e.check(yy,S,A)(k):(e.enter("codeFlowValue"),N(k))}function N(k){return k===null||Ue(k)?(e.exit("codeFlowValue"),C(k)):(e.consume(k),N)}function A(k){return e.exit("codeFenced"),t(k)}function M(k,O,I){let P=0;return H;function H(K){return k.enter("lineEnding"),k.consume(K),k.exit("lineEnding"),F}function F(K){return k.enter("codeFencedFence"),ut(K)?kt(k,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):Y(K)}function Y(K){return K===c?(k.enter("codeFencedFenceSequence"),G(K)):I(K)}function G(K){return K===c?(P++,k.consume(K),G):P>=l?(k.exit("codeFencedFenceSequence"),ut(K)?kt(k,X,"whitespace")(K):X(K)):I(K)}function X(K){return K===null||Ue(K)?(k.exit("codeFencedFence"),O(K)):I(K)}}}function eD(e,t,n){const r=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const ph={name:"codeIndented",tokenize:nD},tD={partial:!0,tokenize:rD};function nD(e,t,n){const r=this;return a;function a(h){return e.enter("codeIndented"),kt(e,o,"linePrefix",5)(h)}function o(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Ue(h)?e.attempt(tD,l,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ue(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function rD(e,t,n){const r=this;return a;function a(l){return r.parser.lazy[r.now().line]?n(l):Ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):kt(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ue(l)?a(l):n(l)}}const sD={name:"codeText",previous:iD,resolve:aD,tokenize:oD};function aD(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function iD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function oD(e,t,n){let r=0,a,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,p(m)):Ue(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Ue(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),a++,p):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class uD{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&hu(this.left,r),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),hu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hu(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);hu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hu(this.left,n.reverse())}}}function hu(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 Yx(e){const t={};let n=-1,r,a,o,l,c,d,h;const p=new uD(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,lD(p,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,a=void 0;o--;)if(l=p.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(p.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(r[1].end={...p.get(a)[1].start},c=p.slice(a,n),c.unshift(r),p.splice(a,n-a+1,c))}}return as(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function lD(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,d=[],h={};let p,m,x=-1,E=n,_=0,S=0;const w=[S];for(;E;){for(;e.get(++a)[1]!==E;);o.push(a),E._tokenizer||(p=r.sliceStream(E),E.next||p.push(null),m&&l.defineSkip(E.start),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=E,E=E.next}for(E=n;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(S=x+1,w.push(S),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(l.events=[],E?(E._tokenizer=void 0,E.previous=void 0):w.pop(),x=w.length;x--;){const v=c.slice(w[x],w[x+1]),C=o.pop();d.push([C,C+v.length-1]),e.splice(C,2,v)}for(d.reverse(),x=-1;++x<d.length;)h[_+d[x][0]]=_+d[x][1],_+=d[x][1]-d[x][0]-1;return h}const cD={resolve:fD,tokenize:hD},dD={partial:!0,tokenize:pD};function fD(e){return Yx(e),e}function hD(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?o(c):Ue(c)?e.check(dD,l,o)(c):(e.consume(c),a)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function pD(e,t,n){const r=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),kt(e,o,"linePrefix")}function o(l){if(l===null||Ue(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function qx(e,t,n,r,a,o,l,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(v){return v===60?(e.enter(r),e.enter(a),e.enter(o),e.consume(v),e.exit(o),x):v===null||v===32||v===41||r0(v)?n(v):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(v))}function x(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),E(v))}function E(v){return v===62?(e.exit("chunkString"),e.exit(c),x(v)):v===null||v===60||Ue(v)?n(v):(e.consume(v),v===92?_:E)}function _(v){return v===60||v===62||v===92?(e.consume(v),E):E(v)}function S(v){return!p&&(v===null||v===41||Jn(v))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(v)):p<h&&v===40?(e.consume(v),p++,S):v===41?(e.consume(v),p--,S):v===null||v===32||v===40||r0(v)?n(v):(e.consume(v),v===92?w:S)}function w(v){return v===40||v===41||v===92?(e.consume(v),S):S(v)}}function $x(e,t,n,r,a,o){const l=this;let c=0,d;return h;function h(E){return e.enter(r),e.enter(a),e.consume(E),e.exit(a),e.enter(o),p}function p(E){return c>999||E===null||E===91||E===93&&!d||E===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(E):E===93?(e.exit(o),e.enter(a),e.consume(E),e.exit(a),e.exit(r),t):Ue(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||E===91||E===93||Ue(E)||c++>999?(e.exit("chunkString"),p(E)):(e.consume(E),d||(d=!ut(E)),E===92?x:m)}function x(E){return E===91||E===92||E===93?(e.consume(E),c++,m):m(E)}}function Vx(e,t,n,r,a,o){let l;return c;function c(x){return x===34||x===39||x===40?(e.enter(r),e.enter(a),e.consume(x),e.exit(a),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),t):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),d(l)):x===null?n(x):Ue(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),kt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||Ue(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?m:p)}function m(x){return x===l||x===92?(e.consume(x),p):p(x)}}function Tu(e,t){let n;return r;function r(a){return Ue(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):ut(a)?kt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const mD={name:"definition",tokenize:yD},gD={partial:!0,tokenize:bD};function yD(e,t,n){const r=this;let a;return o;function o(E){return e.enter("definition"),l(E)}function l(E){return $x.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(E)}function c(E){return a=Bi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),d):n(E)}function d(E){return Jn(E)?Tu(e,h)(E):h(E)}function h(E){return qx(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(E)}function p(E){return e.attempt(gD,m,m)(E)}function m(E){return ut(E)?kt(e,x,"whitespace")(E):x(E)}function x(E){return E===null||Ue(E)?(e.exit("definition"),r.parser.defined.push(a),t(E)):n(E)}}function bD(e,t,n){return r;function r(c){return Jn(c)?Tu(e,a)(c):n(c)}function a(c){return Vx(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return ut(c)?kt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ue(c)?t(c):n(c)}}const ED={name:"hardBreakEscape",tokenize:xD};function xD(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Ue(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const TD={name:"headingAtx",resolve:vD,tokenize:wD};function vD(e,t){let n=e.length-2,r=3,a,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},as(e,r,n-r+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function wD(e,t,n){let r=0;return a;function a(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||Jn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Ue(p)?(e.exit("atxHeading"),t(p)):ut(p)?kt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Jn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const SD=["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"],Ey=["pre","script","style","textarea"],_D={concrete:!0,name:"htmlFlow",resolveTo:ND,tokenize:OD},CD={partial:!0,tokenize:AD},kD={partial:!0,tokenize:DD};function ND(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 OD(e,t,n){const r=this;let a,o,l,c,d;return h;function h(U){return p(U)}function p(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),m}function m(U){return U===33?(e.consume(U),x):U===47?(e.consume(U),o=!0,S):U===63?(e.consume(U),a=3,r.interrupt?t:R):ns(U)?(e.consume(U),l=String.fromCharCode(U),w):n(U)}function x(U){return U===45?(e.consume(U),a=2,E):U===91?(e.consume(U),a=5,c=0,_):ns(U)?(e.consume(U),a=4,r.interrupt?t:R):n(U)}function E(U){return U===45?(e.consume(U),r.interrupt?t:R):n(U)}function _(U){const Ie="CDATA[";return U===Ie.charCodeAt(c++)?(e.consume(U),c===Ie.length?r.interrupt?t:Y:_):n(U)}function S(U){return ns(U)?(e.consume(U),l=String.fromCharCode(U),w):n(U)}function w(U){if(U===null||U===47||U===62||Jn(U)){const Ie=U===47,ze=l.toLowerCase();return!Ie&&!o&&Ey.includes(ze)?(a=1,r.interrupt?t(U):Y(U)):SD.includes(l.toLowerCase())?(a=6,Ie?(e.consume(U),v):r.interrupt?t(U):Y(U)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(U):o?C(U):N(U))}return U===45||lr(U)?(e.consume(U),l+=String.fromCharCode(U),w):n(U)}function v(U){return U===62?(e.consume(U),r.interrupt?t:Y):n(U)}function C(U){return ut(U)?(e.consume(U),C):H(U)}function N(U){return U===47?(e.consume(U),H):U===58||U===95||ns(U)?(e.consume(U),A):ut(U)?(e.consume(U),N):H(U)}function A(U){return U===45||U===46||U===58||U===95||lr(U)?(e.consume(U),A):M(U)}function M(U){return U===61?(e.consume(U),k):ut(U)?(e.consume(U),M):N(U)}function k(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),d=U,O):ut(U)?(e.consume(U),k):I(U)}function O(U){return U===d?(e.consume(U),d=null,P):U===null||Ue(U)?n(U):(e.consume(U),O)}function I(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Jn(U)?M(U):(e.consume(U),I)}function P(U){return U===47||U===62||ut(U)?N(U):n(U)}function H(U){return U===62?(e.consume(U),F):n(U)}function F(U){return U===null||Ue(U)?Y(U):ut(U)?(e.consume(U),F):n(U)}function Y(U){return U===45&&a===2?(e.consume(U),$):U===60&&a===1?(e.consume(U),se):U===62&&a===4?(e.consume(U),ie):U===63&&a===3?(e.consume(U),R):U===93&&a===5?(e.consume(U),te):Ue(U)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(CD,he,G)(U)):U===null||Ue(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),Y)}function G(U){return e.check(kD,X,he)(U)}function X(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),K}function K(U){return U===null||Ue(U)?G(U):(e.enter("htmlFlowData"),Y(U))}function $(U){return U===45?(e.consume(U),R):Y(U)}function se(U){return U===47?(e.consume(U),l="",J):Y(U)}function J(U){if(U===62){const Ie=l.toLowerCase();return Ey.includes(Ie)?(e.consume(U),ie):Y(U)}return ns(U)&&l.length<8?(e.consume(U),l+=String.fromCharCode(U),J):Y(U)}function te(U){return U===93?(e.consume(U),R):Y(U)}function R(U){return U===62?(e.consume(U),ie):U===45&&a===2?(e.consume(U),R):Y(U)}function ie(U){return U===null||Ue(U)?(e.exit("htmlFlowData"),he(U)):(e.consume(U),ie)}function he(U){return e.exit("htmlFlow"),t(U)}}function DD(e,t,n){const r=this;return a;function a(l){return Ue(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function AD(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(rd,t,n)}}const ID={name:"htmlText",tokenize:RD};function RD(e,t,n){const r=this;let a,o,l;return c;function c(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),d}function d(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),M):R===63?(e.consume(R),N):ns(R)?(e.consume(R),I):n(R)}function h(R){return R===45?(e.consume(R),p):R===91?(e.consume(R),o=0,_):ns(R)?(e.consume(R),C):n(R)}function p(R){return R===45?(e.consume(R),E):n(R)}function m(R){return R===null?n(R):R===45?(e.consume(R),x):Ue(R)?(l=m,se(R)):(e.consume(R),m)}function x(R){return R===45?(e.consume(R),E):m(R)}function E(R){return R===62?$(R):R===45?x(R):m(R)}function _(R){const ie="CDATA[";return R===ie.charCodeAt(o++)?(e.consume(R),o===ie.length?S:_):n(R)}function S(R){return R===null?n(R):R===93?(e.consume(R),w):Ue(R)?(l=S,se(R)):(e.consume(R),S)}function w(R){return R===93?(e.consume(R),v):S(R)}function v(R){return R===62?$(R):R===93?(e.consume(R),v):S(R)}function C(R){return R===null||R===62?$(R):Ue(R)?(l=C,se(R)):(e.consume(R),C)}function N(R){return R===null?n(R):R===63?(e.consume(R),A):Ue(R)?(l=N,se(R)):(e.consume(R),N)}function A(R){return R===62?$(R):N(R)}function M(R){return ns(R)?(e.consume(R),k):n(R)}function k(R){return R===45||lr(R)?(e.consume(R),k):O(R)}function O(R){return Ue(R)?(l=O,se(R)):ut(R)?(e.consume(R),O):$(R)}function I(R){return R===45||lr(R)?(e.consume(R),I):R===47||R===62||Jn(R)?P(R):n(R)}function P(R){return R===47?(e.consume(R),$):R===58||R===95||ns(R)?(e.consume(R),H):Ue(R)?(l=P,se(R)):ut(R)?(e.consume(R),P):$(R)}function H(R){return R===45||R===46||R===58||R===95||lr(R)?(e.consume(R),H):F(R)}function F(R){return R===61?(e.consume(R),Y):Ue(R)?(l=F,se(R)):ut(R)?(e.consume(R),F):P(R)}function Y(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),a=R,G):Ue(R)?(l=Y,se(R)):ut(R)?(e.consume(R),Y):(e.consume(R),X)}function G(R){return R===a?(e.consume(R),a=void 0,K):R===null?n(R):Ue(R)?(l=G,se(R)):(e.consume(R),G)}function X(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Jn(R)?P(R):(e.consume(R),X)}function K(R){return R===47||R===62||Jn(R)?P(R):n(R)}function $(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function se(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),J}function J(R){return ut(R)?kt(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):te(R)}function te(R){return e.enter("htmlTextData"),l(R)}}const rp={name:"labelEnd",resolveAll:FD,resolveTo:BD,tokenize:jD},LD={tokenize:HD},PD={tokenize:UD},MD={tokenize:zD};function FD(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&as(e,0,e.length,n),e}function BD(e,t){let n=e.length,r=0,a,o,l,c;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=vr(c,e.slice(o+1,o+r+3)),c=vr(c,[["enter",p,t]]),c=vr(c,np(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=vr(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=vr(c,e.slice(l+1)),c=vr(c,[["exit",d,t]]),as(e,o,e.length,c),e}function jD(e,t,n){const r=this;let a=r.events.length,o,l;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){o=r.events[a][1];break}return c;function c(x){return o?o._inactive?m(x):(l=r.parser.defined.includes(Bi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(LD,p,l?p:m)(x):x===91?e.attempt(PD,p,l?h:m)(x):l?p(x):m(x)}function h(x){return e.attempt(MD,p,m)(x)}function p(x){return t(x)}function m(x){return o._balanced=!0,n(x)}}function HD(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Jn(m)?Tu(e,o)(m):o(m)}function o(m){return m===41?p(m):qx(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Jn(m)?Tu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?Vx(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Jn(m)?Tu(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function UD(e,t,n){const r=this;return a;function a(c){return $x.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(Bi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function zD(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const WD={name:"labelStartImage",resolveAll:rp.resolveAll,tokenize:YD};function YD(e,t,n){const r=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const qD={name:"labelStartLink",resolveAll:rp.resolveAll,tokenize:$D};function $D(e,t,n){const r=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const mh={name:"lineEnding",tokenize:VD};function VD(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),kt(e,t,"linePrefix")}}const Tc={name:"thematicBreak",tokenize:QD};function QD(e,t,n){let r=0,a;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,c(h)}function c(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ue(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),ut(h)?kt(e,c,"whitespace")(h):c(h))}}const Gn={continuation:{tokenize:JD},exit:e4,name:"list",tokenize:KD},GD={partial:!0,tokenize:t4},XD={partial:!0,tokenize:ZD};function KD(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(E){const _=r.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||E===r.containerState.marker:s0(E)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(Tc,n,h)(E):h(E);if(!r.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(E)}return n(E)}function d(E){return s0(E)&&++l<10?(e.consume(E),d):(!r.interrupt||l<2)&&(r.containerState.marker?E===r.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),h(E)):n(E)}function h(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||E,e.check(rd,r.interrupt?n:p,e.attempt(GD,x,m))}function p(E){return r.containerState.initialBlankLine=!0,o++,x(E)}function m(E){return ut(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),x):n(E)}function x(E){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function JD(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rd,a,o);function a(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kt(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!ut(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(XD,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,kt(e,e.attempt(Gn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ZD(e,t,n){const r=this;return kt(e,a,"listItemIndent",r.containerState.size+1);function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function e4(e){e.exit(this.containerState.type)}function t4(e,t,n){const r=this;return kt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=r.events[r.events.length-1];return!ut(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const xy={name:"setextUnderline",resolveTo:n4,tokenize:r4};function n4(e,t){let n=e.length,r,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function r4(e,t,n){const r=this;let a;return o;function o(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===a?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),ut(h)?kt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ue(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const s4={tokenize:a4};function a4(e){const t=this,n=e.attempt(rd,r,e.attempt(this.parser.constructs.flowInitial,a,kt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(cD,a)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const i4={resolveAll:Gx()},o4=Qx("string"),u4=Qx("text");function Qx(e){return{resolveAll:Gx(e==="text"?l4:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],o=n.attempt(a,l,c);return l;function l(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=a[p];let x=-1;if(m)for(;++x<m.length;){const E=m[x];if(!E.previous||E.previous.call(r,r.previous))return!0}return!1}}}function Gx(e){return t;function t(n,r){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,r):n}}function l4(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let o=a.length,l=-1,c=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)d=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const c4={42:Gn,43:Gn,45:Gn,48:Gn,49:Gn,50:Gn,51:Gn,52:Gn,53:Gn,54:Gn,55:Gn,56:Gn,57:Gn,62:Ux},d4={91:mD},f4={[-2]:ph,[-1]:ph,32:ph},h4={35:TD,42:Tc,45:[xy,Tc],60:_D,61:xy,95:Tc,96:by,126:by},p4={38:Wx,92:zx},m4={[-5]:mh,[-4]:mh,[-3]:mh,33:WD,38:Wx,42:a0,60:[qO,ID],91:qD,92:[ED,zx],93:rp,95:a0,96:sD},g4={null:[a0,i4]},y4={null:[42,95]},b4={null:[]},E4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:y4,contentInitial:d4,disable:b4,document:c4,flow:h4,flowInitial:f4,insideSpan:g4,string:p4,text:m4},Symbol.toStringTag,{value:"Module"}));function x4(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],c=[];const d={attempt:O(M),check:O(k),consume:C,enter:N,exit:A,interrupt:O(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:x,sliceStream:E,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m(F){return l=vr(l,F),w(),l[l.length-1]!==null?[]:(I(t,0),h.events=np(o,h.events,h),h.events)}function x(F,Y){return v4(E(F),Y)}function E(F){return T4(l,F)}function _(){const{_bufferIndex:F,_index:Y,line:G,column:X,offset:K}=r;return{_bufferIndex:F,_index:Y,line:G,column:X,offset:K}}function S(F){a[F.line]=F.column,H()}function w(){let F;for(;r._index<l.length;){const Y=l[r._index];if(typeof Y=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<Y.length;)v(Y.charCodeAt(r._bufferIndex));else v(Y)}}function v(F){p=p(F)}function C(F){Ue(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,H()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=F}function N(F,Y){const G=Y||{};return G.type=F,G.start=_(),h.events.push(["enter",G,h]),c.push(G),G}function A(F){const Y=c.pop();return Y.end=_(),h.events.push(["exit",Y,h]),Y}function M(F,Y){I(F,Y.from)}function k(F,Y){Y.restore()}function O(F,Y){return G;function G(X,K,$){let se,J,te,R;return Array.isArray(X)?he(X):"tokenize"in X?he([X]):ie(X);function ie(Ae){return ct;function ct(tt){const Ke=tt!==null&&Ae[tt],st=tt!==null&&Ae.null,Je=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(st)?st:st?[st]:[]];return he(Je)(tt)}}function he(Ae){return se=Ae,J=0,Ae.length===0?$:U(Ae[J])}function U(Ae){return ct;function ct(tt){return R=P(),te=Ae,Ae.partial||(h.currentConstruct=Ae),Ae.name&&h.parser.constructs.disable.null.includes(Ae.name)?ze():Ae.tokenize.call(Y?Object.assign(Object.create(h),Y):h,d,Ie,ze)(tt)}}function Ie(Ae){return F(te,R),K}function ze(Ae){return R.restore(),++J<se.length?U(se[J]):$}}}function I(F,Y){F.resolveAll&&!o.includes(F)&&o.push(F),F.resolve&&as(h.events,Y,h.events.length-Y,F.resolve(h.events.slice(Y),h)),F.resolveTo&&(h.events=F.resolveTo(h.events,h))}function P(){const F=_(),Y=h.previous,G=h.currentConstruct,X=h.events.length,K=Array.from(c);return{from:X,restore:$};function $(){r=F,h.previous=Y,h.currentConstruct=G,h.events.length=X,c=K,H()}}function H(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function T4(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(r,o)];else{if(l=e.slice(n,a),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function v4(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
96
|
+
`;break}case-3:{l=`\r
|
|
97
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,r.push(l)}return r.join("")}function w4(e){const r={constructs:DO([E4,...(e||{}).extensions||[]]),content:a(BO),defined:[],document:a(HO),flow:a(s4),lazy:{},string:a(o4),text:a(u4)};return r;function a(o){return l;function l(c){return x4(r,o,c)}}}function S4(e){for(;!Yx(e););return e}const Ty=/[\0\t\n\r]/g;function _4(){let e=1,t="",n=!0,r;return a;function a(o,l,c){const d=[];let h,p,m,x,E;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(Ty.lastIndex=m,h=Ty.exec(o),x=h&&h.index!==void 0?h.index:o.length,E=o.charCodeAt(x),!h){t=o.slice(m);break}if(E===10&&m===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<x&&(d.push(o.slice(m,x)),e+=x-m),E){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=x+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const C4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function k4(e){return e.replace(C4,N4)}function N4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return Hx(n.slice(o?2:1),o?16:10)}return tp(n)||e}const Xx={}.hasOwnProperty;function O4(e,t,n){return typeof t!="string"&&(n=t,t=void 0),D4(n)(S4(w4(n).document().write(_4()(e,t,!0))))}function D4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(at),autolinkProtocol:P,autolinkEmail:P,atxHeading:o(tn),blockQuote:o(st),characterEscape:P,characterReference:P,codeFenced:o(Je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Je,l),codeText:o(pn,l),codeTextData:P,data:P,codeFlowValue:P,definition:o(Gt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(jn),hardBreakEscape:o(nn),hardBreakTrailing:o(nn),htmlFlow:o(mn,l),htmlFlowData:P,htmlText:o(mn,l),htmlTextData:P,image:o(er),label:l,link:o(at),listItem:o(Et),listItemValue:x,listOrdered:o(Ze,m),listUnordered:o(Ze),paragraph:o(Nt),reference:U,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(tn),strong:o(on),thematicBreak:o(un)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:Ke,autolinkProtocol:tt,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ze,characterReferenceMarkerNumeric:ze,characterReferenceValue:Ae,characterReference:ct,codeFenced:d(w),codeFencedFence:S,codeFencedFenceInfo:E,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:d(v),codeText:d(K),codeTextData:H,data:H,definition:d(),definitionDestinationString:A,definitionLabelString:C,definitionTitleString:N,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(G),htmlFlowData:H,htmlText:d(X),htmlTextData:H,image:d(se),label:te,labelText:J,lineEnding:F,link:d($),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Ie,resourceDestinationString:R,resourceTitleString:ie,resource:he,setextHeading:d(I),setextHeadingLineSequence:O,setextHeadingText:k,strong:d(),thematicBreak:d()}};Kx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let pe={type:"root",children:[]};const Ne={stack:[pe],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},je=[];let qe=-1;for(;++qe<oe.length;)if(oe[qe][1].type==="listOrdered"||oe[qe][1].type==="listUnordered")if(oe[qe][0]==="enter")je.push(qe);else{const gt=je.pop();qe=a(oe,gt,qe)}for(qe=-1;++qe<oe.length;){const gt=t[oe[qe][0]];Xx.call(gt,oe[qe][1].type)&>[oe[qe][1].type].call(Object.assign({sliceSerialize:oe[qe][2].sliceSerialize},Ne),oe[qe][1])}if(Ne.tokenStack.length>0){const gt=Ne.tokenStack[Ne.tokenStack.length-1];(gt[1]||vy).call(Ne,void 0,gt[0])}for(pe.position={start:Js(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Js(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)pe=t.transforms[qe](pe)||pe;return pe}function a(oe,pe,Ne){let je=pe-1,qe=-1,gt=!1,zt,rn,_n,Hn;for(;++je<=Ne;){const At=oe[je];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?qe++:qe--,Hn=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(zt&&!Hn&&!qe&&!_n&&(_n=je),Hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Hn=void 0}if(!qe&&At[0]==="enter"&&At[1].type==="listItemPrefix"||qe===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(zt){let yt=je;for(rn=void 0;yt--;){const ln=oe[yt];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;rn&&(oe[rn][1].type="lineEndingBlank",gt=!0),ln[1].type="lineEnding",rn=yt}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}_n&&(!rn||_n<rn)&&(zt._spread=!0),zt.end=Object.assign({},rn?oe[rn][1].start:At[1].end),oe.splice(rn||je,0,["exit",zt,At[2]]),je++,Ne++}if(At[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};zt=yt,oe.splice(je,0,["enter",yt,At[2]]),je++,Ne++,_n=void 0,Hn=!0}}}return oe[pe][1]._spread=gt,Ne}function o(oe,pe){return Ne;function Ne(je){c.call(this,oe(je),je),pe&&pe.call(this,je)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,pe,Ne){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([pe,Ne||void 0]),oe.position={start:Js(pe.start),end:void 0}}function d(oe){return pe;function pe(Ne){oe&&oe.call(this,Ne),h.call(this,Ne)}}function h(oe,pe){const Ne=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==oe.type&&(pe?pe.call(this,oe,je[0]):(je[1]||vy).call(this,oe,je[0]));else throw new Error("Cannot close `"+oe.type+"` ("+xu({start:oe.start,end:oe.end})+"): it’s not open");Ne.position.end=Js(oe.end)}function p(){return NO(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function x(oe){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function E(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=oe}function _(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const pe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=pe,Ne.identifier=Bi(this.sliceSerialize(oe)).toLowerCase()}function N(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function A(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function M(oe){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Ne=this.sliceSerialize(oe).length;pe.depth=Ne}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function O(oe){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(oe){const Ne=this.stack[this.stack.length-1].children;let je=Ne[Ne.length-1];(!je||je.type!=="text")&&(je=tr(),je.position={start:Js(oe.start),end:void 0},Ne.push(je)),this.stack.push(je)}function H(oe){const pe=this.stack.pop();pe.value+=this.sliceSerialize(oe),pe.position.end=Js(oe.end)}function F(oe){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=pe.children[pe.children.length-1];Ne.position.end=Js(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(P.call(this,oe),H.call(this,oe))}function Y(){this.data.atHardBreak=!0}function G(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function X(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function K(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function $(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function se(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function J(oe){const pe=this.sliceSerialize(oe),Ne=this.stack[this.stack.length-2];Ne.label=k4(pe),Ne.identifier=Bi(pe).toLowerCase()}function te(){const oe=this.stack[this.stack.length-1],pe=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const je=oe.children;Ne.children=je}else Ne.alt=pe}function R(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function ie(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function he(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function Ie(oe){const pe=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=pe,Ne.identifier=Bi(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ze(oe){this.data.characterReferenceType=oe.type}function Ae(oe){const pe=this.sliceSerialize(oe),Ne=this.data.characterReferenceType;let je;Ne?(je=Hx(pe,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=tp(pe);const qe=this.stack[this.stack.length-1];qe.value+=je}function ct(oe){const pe=this.stack.pop();pe.position.end=Js(oe.end)}function tt(oe){H.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(oe)}function Ke(oe){H.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(oe)}function st(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function pn(){return{type:"inlineCode",value:""}}function Gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function jn(){return{type:"emphasis",children:[]}}function tn(){return{type:"heading",depth:0,children:[]}}function nn(){return{type:"break"}}function mn(){return{type:"html",value:""}}function er(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Ze(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Et(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Nt(){return{type:"paragraph",children:[]}}function on(){return{type:"strong",children:[]}}function tr(){return{type:"text",value:""}}function un(){return{type:"thematicBreak"}}}function Js(e){return{line:e.line,column:e.column,offset:e.offset}}function Kx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Kx(e,r):A4(e,r)}}function A4(e,t){let n;for(n in t)if(Xx.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vy(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 I4(e){const t=this;t.parser=n;function n(r){return O4(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function R4(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 L4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
98
|
+
`}]}function P4(e,t){const n=t.value?t.value+`
|
|
99
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,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 M4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function F4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function B4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=mo(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function j4(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 H4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Jx(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function U4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jx(e,t);const a={src:mo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function z4(e,t){const n={src:mo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function W4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Y4(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jx(e,t);const a={href:mo(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function q4(e,t){const n={href:mo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $4(e,t,n){const r=e.all(t),a=n?V4(n):Zx(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(a||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
100
|
+
`}),p.type==="element"&&p.tagName==="p"&&!a?l.push(...p.children):l.push(p)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
|
|
101
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function V4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Zx(n[r])}return t}function Zx(e){const t=e.spread;return t??e.children.length>1}function Q4(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.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(r,!0)};return e.patch(t,o),e.applyData(t,o)}function G4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function K4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J4(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=us(t.children[1]),d=nd(t.children[t.children.length-1]);c&&d&&(l.position={start:c,end:d}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function Z4(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const m=t.children[d],x={},E=l?l[d]:void 0;E&&(x.align=E);let _={type:"element",tagName:o,properties:x,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),h.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function eA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wy=9,Sy=32;function tA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(_y(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(_y(t.slice(a),a>0,!1)),o.join("")}function _y(e,t,n){let r=0,a=e.length;if(t){let o=e.codePointAt(r);for(;o===wy||o===Sy;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(a-1);for(;o===wy||o===Sy;)a--,o=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function nA(e,t){const n={type:"text",value:tA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const sA={blockquote:R4,break:L4,code:P4,delete:M4,emphasis:F4,footnoteReference:B4,heading:j4,html:H4,imageReference:U4,image:z4,inlineCode:W4,linkReference:Y4,link:q4,listItem:$4,list:Q4,paragraph:G4,root:X4,strong:K4,table:J4,tableCell:eA,tableRow:Z4,text:nA,thematicBreak:rA,toml:pc,yaml:pc,definition:pc,footnoteDefinition:pc};function pc(){}const e2=-1,sd=0,vu=1,Lc=2,sp=3,ap=4,ip=5,op=6,t2=7,n2=8,Cy=typeof self=="object"?self:globalThis,aA=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),r=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case sd:case e2:return n(l,a);case vu:{const c=n([],a);for(const d of l)c.push(r(d));return c}case Lc:{const c=n({},a);for(const[d,h]of l)c[r(d)]=r(h);return c}case sp:return n(new Date(l),a);case ap:{const{source:c,flags:d}=l;return n(new RegExp(c,d),a)}case ip:{const c=n(new Map,a);for(const[d,h]of l)c.set(r(d),r(h));return c}case op:{const c=n(new Set,a);for(const d of l)c.add(r(d));return c}case t2:{const{name:c,message:d}=l;return n(new Cy[c](d),a)}case n2:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new Cy[o](l),a)};return r},ky=e=>aA(new Map,e)(0),Pi="",{toString:iA}={},{keys:oA}=Object,pu=e=>{const t=typeof e;if(t!=="object"||!e)return[sd,t];const n=iA.call(e).slice(8,-1);switch(n){case"Array":return[vu,Pi];case"Object":return[Lc,Pi];case"Date":return[sp,Pi];case"RegExp":return[ap,Pi];case"Map":return[ip,Pi];case"Set":return[op,Pi];case"DataView":return[vu,n]}return n.includes("Array")?[vu,n]:n.includes("Error")?[t2,n]:[Lc,n]},mc=([e,t])=>e===sd&&(t==="function"||t==="symbol"),uA=(e,t,n,r)=>{const a=(l,c)=>{const d=r.push(l)-1;return n.set(c,d),d},o=l=>{if(n.has(l))return n.get(l);let[c,d]=pu(l);switch(c){case sd:{let p=l;switch(d){case"bigint":c=n2,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return a([e2],l)}return a([c,p],l)}case vu:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),a([d,[...x]],l)}const p=[],m=a([c,p],l);for(const x of l)p.push(o(x));return m}case Lc:{if(d)switch(d){case"BigInt":return a([d,l.toString()],l);case"Boolean":case"Number":case"String":return a([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=a([c,p],l);for(const x of oA(l))(e||!mc(pu(l[x])))&&p.push([o(x),o(l[x])]);return m}case sp:return a([c,l.toISOString()],l);case ap:{const{source:p,flags:m}=l;return a([c,{source:p,flags:m}],l)}case ip:{const p=[],m=a([c,p],l);for(const[x,E]of l)(e||!(mc(pu(x))||mc(pu(E))))&&p.push([o(x),o(E)]);return m}case op:{const p=[],m=a([c,p],l);for(const x of l)(e||!mc(pu(x)))&&p.push(o(x));return m}}const{message:h}=l;return a([c,{name:d,message:h}],l)};return o},Ny=(e,{json:t,lossy:n}={})=>{const r=[];return uA(!(t||n),!!t,new Map,r)(e),r},so=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ky(Ny(e,t)):structuredClone(e):(e,t)=>ky(Ny(e,t));function lA(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 cA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||lA,r=e.options.footnoteBackLabel||cA,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),x=mo(m.toLowerCase());let E=0;const _=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++E<=S;){_.length>0&&_.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,E);typeof C=="string"&&(C={type:"text",value:C}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(E>1?"-"+E:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,E),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const w=p[p.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const C=w.children[w.children.length-1];C&&C.type==="text"?C.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(..._)}else p.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(p,!0)};e.patch(h,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...so(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
102
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
103
|
+
`}]}}const r2=(function(e){if(e==null)return mA;if(typeof e=="function")return ad(e);if(typeof e=="object")return Array.isArray(e)?fA(e):hA(e);if(typeof e=="string")return pA(e);throw new Error("Expected function, string, or object as test")});function fA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=r2(e[n]);return ad(r);function r(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function hA(e){const t=e;return ad(n);function n(r){const a=r;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function pA(e){return ad(t);function t(n){return n&&n.type===e}}function ad(e){return t;function t(n,r,a){return!!(gA(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function mA(){return!0}function gA(e){return e!==null&&typeof e=="object"&&"type"in e}const s2=[],yA=!0,Oy=!1,bA="skip";function EA(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const o=r2(a),l=r?-1:1;c(e,void 0,[])();function c(d,h,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const E=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(E?"<"+E+">":""))+")"})}return x;function x(){let E=s2,_,S,w;if((!t||o(d,h,p[p.length-1]||void 0))&&(E=xA(n(d,p)),E[0]===Oy))return E;if("children"in d&&d.children){const v=d;if(v.children&&E[0]!==bA)for(S=(r?v.children.length:-1)+l,w=p.concat(v);S>-1&&S<v.children.length;){const C=v.children[S];if(_=c(C,S,w)(),_[0]===Oy)return _;S=typeof _[1]=="number"?_[1]:S+l}}return E}}}function xA(e){return Array.isArray(e)?e:typeof e=="number"?[yA,e]:e==null?s2:[e]}function up(e,t,n,r){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=r),EA(e,o,c,a);function c(d,h){const p=h[h.length-1],m=p?p.children.indexOf(d):void 0;return l(d,m,p)}}const i0={}.hasOwnProperty,TA={};function vA(e,t){const n=t||TA,r=new Map,a=new Map,o=new Map,l={...sA,...n.handlers},c={all:h,applyData:SA,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:wA,wrap:CA};return up(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:a,x=String(p.identifier).toUpperCase();m.has(x)||m.set(x,p)}}),c;function d(p,m){const x=p.type,E=c.handlers[x];if(i0.call(c.handlers,x)&&E)return E(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in p){const{children:S,...w}=p,v=so(w);return v.children=c.all(p),v}return so(p)}return(c.options.unknownHandler||_A)(c,p,m)}function h(p){const m=[];if("children"in p){const x=p.children;let E=-1;for(;++E<x.length;){const _=c.one(x[E],p);if(_){if(E&&x[E-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=Dy(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=Dy(S.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function wA(e,t){e.position&&(t.position=iO(e))}function SA(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,so(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function _A(e,t){const n=t.data||{},r="value"in t&&!(i0.call(n,"hProperties")||i0.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function CA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
104
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
105
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
106
|
+
`}),n}function Dy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ay(e,t){const n=vA(e,t),r=n.one(e,void 0),a=dA(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
107
|
+
`},a),o}function kA(e,t){return e&&"run"in e?async function(n,r){const a=Ay(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Ay(n,{file:r,...e||t})}}function Iy(e){if(e)throw e}var gh,Ry;function NA(){if(Ry)return gh;Ry=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return gh=function d(){var h,p,m,x,E,_,S=arguments[0],w=1,v=arguments.length,C=!1;for(typeof S=="boolean"&&(C=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<v;++w)if(h=arguments[w],h!=null)for(p in h)m=c(S,p),x=c(h,p),S!==x&&(C&&x&&(o(x)||(E=a(x)))?(E?(E=!1,_=m&&a(m)?m:[]):_=m&&o(m)?m:{},l(S,{name:p,newValue:d(C,_,x)})):typeof x<"u"&&l(S,{name:p,newValue:x}));return S},gh}var OA=NA();const yh=gb(OA);function o0(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 DA(){const e=[],t={run:n,use:r};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(d,...h){const p=e[++o];let m=-1;if(d){l(d);return}for(;++m<a.length;)(h[m]===null||h[m]===void 0)&&(h[m]=a[m]);a=h,p?AA(p,c)(...h):l(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function AA(e,t){let n;return r;function r(...l){const c=e.length>l.length;let d;c&&l.push(a);try{d=e.apply(this,l)}catch(h){const p=h;if(c&&n)throw p;return a(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(o,a):d instanceof Error?a(d):o(d))}function a(l,...c){n||(n=!0,t(l,...c))}function o(l){a(null,l)}}const Gr={basename:IA,dirname:RA,extname:LA,join:PA,sep:"/"};function IA(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gu(e);let n=0,r=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else r<0&&(o=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(r=a):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function RA(e){if(Gu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function LA(e){Gu(e);let t=e.length,n=-1,r=0,a=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function PA(...e){let t=-1,n;for(;++t<e.length;)Gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":MA(n)}function MA(e){Gu(e);const t=e.codePointAt(0)===47;let n=FA(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function FA(e,t){let n="",r=0,a=-1,o=0,l=-1,c,d;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",r=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function Gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const BA={cwd:jA};function jA(){return"/"}function u0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function HA(e){if(typeof e=="string")e=new URL(e);else if(!u0(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 UA(e)}function UA(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const bh=["history","path","basename","stem","extname","dirname"];class a2{constructor(t){let n;t?u0(t)?n={path:t}:typeof t=="string"||zA(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":BA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bh.length;){const o=bh[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)bh.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Gr.basename(this.path):void 0}set basename(t){xh(t,"basename"),Eh(t,"basename"),this.path=Gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gr.dirname(this.path):void 0}set dirname(t){Ly(this.basename,"dirname"),this.path=Gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gr.extname(this.path):void 0}set extname(t){if(Eh(t,"extname"),Ly(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=Gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){u0(t)&&(t=HA(t)),xh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gr.basename(this.path,this.extname):void 0}set stem(t){xh(t,"stem"),Eh(t,"stem"),this.path=Gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Ln(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Eh(e,t){if(e&&e.includes(Gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gr.sep+"`")}function xh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ly(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WA=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),YA={}.hasOwnProperty;class lp extends WA{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=DA()}copy(){const t=new lp;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(yh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wh("data",this.frozen),this.namespace[t]=n,this):YA.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=gc(t),r=this.parser||this.Parser;return Th("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Th("process",this.parser||this.Parser),vh("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const c=gc(t),d=r.parse(c);r.run(d,c,function(p,m,x){if(p||!m||!x)return h(p);const E=m,_=r.stringify(E,x);VA(_)?x.value=_:x.result=_,h(p,x)});function h(p,m){p||!m?l(p):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Th("processSync",this.parser||this.Parser),vh("processSync",this.compiler||this.Compiler),this.process(t,a),My("processSync","process",n),r;function a(o,l){n=!0,Iy(o),r=l}}run(t,n,r){Py(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const d=gc(n);a.run(t,d,h);function h(p,m,x){const E=m||t;p?c(p):l?l(E):r(void 0,E,x)}}}runSync(t,n){let r=!1,a;return this.run(t,n,o),My("runSync","run",r),a;function o(l,c){Iy(l),a=c,r=!0}}stringify(t,n){this.freeze();const r=gc(n),a=this.compiler||this.Compiler;return vh("stringify",a),Py(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(wh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;d(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");c(h.plugins),h.settings&&(a.settings=yh(!0,a.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let m=-1,x=-1;for(;++m<r.length;)if(r[m][0]===h){x=m;break}if(x===-1)r.push([h,...p]);else if(p.length>0){let[E,..._]=p;const S=r[x][1];o0(S)&&o0(E)&&(E=yh(!0,S,E)),r[x]=[h,E,..._]}}}}const qA=new lp().freeze();function Th(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wh(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 Py(e){if(!o0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function My(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function gc(e){return $A(e)?e:new a2(e)}function $A(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VA(e){return typeof e=="string"||QA(e)}function QA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fy=[],By={allowDangerousHtml:!0},XA=/^(https?|ircs?|mailto|xmpp)$/i,KA=[{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 JA(e){const t=ZA(e),n=e6(e);return t6(t.runSync(t.parse(n),n),e)}function ZA(e){const t=e.rehypePlugins||Fy,n=e.remarkPlugins||Fy,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...By}:By;return qA().use(I4).use(n).use(kA,r).use(t)}function e6(e){const t=e.children||"",n=new a2;return typeof t=="string"&&(n.value=t),n}function t6(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||n6;for(const p of KA)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+GA+p.id,void 0);return up(e,h),dO(e,{Fragment:g.Fragment,components:a,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(p,m,x){if(p.type==="raw"&&x&&typeof m=="number")return l?x.children.splice(m,1):x.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let E;for(E in hh)if(Object.hasOwn(hh,E)&&Object.hasOwn(p.properties,E)){const _=p.properties[E],S=hh[E];(S===null||S.includes(p.tagName))&&(p.properties[E]=d(String(_||""),E,p))}}if(p.type==="element"){let E=n?!n.includes(p.tagName):o?o.includes(p.tagName):!1;if(!E&&r&&typeof m=="number"&&(E=!r(p,m,x)),E&&x&&typeof m=="number")return c&&p.children?x.children.splice(m,1,...p.children):x.children.splice(m,1),m}}}function n6(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||XA.test(e.slice(0,t))?e:""}const jy=/[#.]/g;function r6(e,t){const n=e||"",r={};let a=0,o,l;for(;a<n.length;){jy.lastIndex=a;const c=jy.exec(n),d=n.slice(a,c?c.index:n.length);d&&(o?o==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,a+=d.length),c&&(o=c[0],a++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function i2(e,t,n){const r=n?o6(n):void 0;function a(o,l,...c){let d;if(o==null){d={type:"root",children:[]};const h=l;c.unshift(h)}else{d=r6(o,t);const h=d.tagName.toLowerCase(),p=r?r.get(h):void 0;if(d.tagName=p||h,s6(l))c.unshift(l);else for(const[m,x]of Object.entries(l))a6(e,d.properties,m,x)}for(const h of c)l0(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return a}function s6(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 r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function a6(e,t,n,r){const a=td(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?a.spaceSeparated?o=sy(r):a.commaSeparated?o=Z1(r):a.commaOrSpaceSeparated?o=sy(Z1(r).join(" ")):o=Hy(a,a.property,r):Array.isArray(r)?o=[...r]:o=a.property==="style"?i6(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(Hy(a,a.property,c));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function l0(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)l0(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?l0(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Hy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Du(n)===Du(t)))return!0}return n}function i6(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function o6(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const u6=["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"],l6=i2(Qu,"div"),c6=i2(ga,"g",u6);function d6(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const d=Uy(t,n[l-1]);c=d===-1?t.length+1:d+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function a(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],d=Uy(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function Uy(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
108
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ba={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o2={}.hasOwnProperty,f6=Object.prototype;function h6(e,t){const n=t||{};return cp({file:n.file||void 0,location:!1,schema:n.space==="svg"?ga:Qu,verbose:n.verbose||!1},e)}function cp(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},vc(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:u2(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=d6(o),c=l.toPoint(0),d=l.toPoint(o.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},vc(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},vc(e,r,n),n}default:return n=p6(e,t),n}}function u2(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=cp(e,t[n]);r.push(a)}return r}function p6(e,t){const n=e.schema;e.schema=t.namespaceURI===Ba.svg?ga:Qu;let r=-1;const a={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;o2.call(f6,d)||(a[d]=c.value)}const l=(e.schema.space==="svg"?c6:l6)(t.tagName,a,u2(e,t.childNodes));if(vc(e,t,l),l.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&Mi(d.startTag),p=d&&d.endTag&&Mi(d.endTag),m=cp(e,c.content);h&&p&&e.file&&(m.position={start:h.end,end:p.start}),l.content=m}return e.schema=n,l}function vc(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=m6(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function m6(e,t,n){const r=Mi(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)o2.call(n.attrs,l)&&(o[td(e.schema,l).property]=Mi(n.attrs[l]));n.startTag;const c=Mi(n.startTag),d=n.endTag?Mi(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=o,t.data={position:h}}}return r}function Mi(e){const t=zy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=zy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function zy(e){return e.line&&e.column?e:void 0}const Wy={}.hasOwnProperty;function l2(e,t){const n=t||{};function r(a,...o){let l=r.invalid;const c=r.handlers;if(a&&Wy.call(a,e)){const d=String(a[e]);l=Wy.call(c,d)?c[d]:r.unknown}if(l)return l.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const g6={},y6={}.hasOwnProperty,c2=l2("type",{handlers:{root:E6,element:S6,text:v6,comment:w6,doctype:T6}});function b6(e,t){const r=(t||g6).space;return c2(e,r==="svg"?ga:Qu)}function E6(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=dp(e.children,n,t),go(e,n),n}function x6(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=dp(e.children,n,t),go(e,n),n}function T6(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return go(e,t),t}function v6(e){const t={nodeName:"#text",value:e.value,parentNode:null};return go(e,t),t}function w6(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return go(e,t),t}function S6(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ga);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&y6.call(e.properties,o)){const d=_6(r,o,e.properties[o]);d&&a.push(d)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Ba[l],childNodes:[],parentNode:null};return c.childNodes=dp(e.children,c,r),go(e,c),e.tagName==="template"&&e.content&&(c.content=x6(e.content,r)),c}function _6(e,t,n){const r=td(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?_x(n):Rx(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=r.attribute.slice(0,o)),a.namespace=Ba[r.space]}return a}function dp(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=c2(e[r],n);o.parentNode=t,a.push(o)}return a}function go(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const C6=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],k6=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Pt="�";var B;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(B||(B={}));const Qn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function d2(e){return e>=55296&&e<=57343}function N6(e){return e>=56320&&e<=57343}function O6(e,t){return(e-55296)*1024+9216+t}function f2(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function h2(e){return e>=64976&&e<=65007||k6.has(e)}var ae;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ae||(ae={}));const D6=65536;class A6{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=D6,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:o}=this,l=a+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(N6(n))return this.pos++,this._addGap(),O6(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(ae.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;const r=this.html.charCodeAt(n);return r===B.CARRIAGE_RETURN?B.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let t=this.html.charCodeAt(this.pos);return t===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):t===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,d2(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===B.LINE_FEED||t===B.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){f2(t)?this._err(ae.controlCharacterInInputStream):h2(t)&&this._err(ae.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function p2(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const I6=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),R6=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function L6(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=R6.get(e))!==null&&t!==void 0?t:e}var Tn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Tn||(Tn={}));const P6=32;var ha;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ha||(ha={}));function c0(e){return e>=Tn.ZERO&&e<=Tn.NINE}function M6(e){return e>=Tn.UPPER_A&&e<=Tn.UPPER_F||e>=Tn.LOWER_A&&e<=Tn.LOWER_F}function F6(e){return e>=Tn.UPPER_A&&e<=Tn.UPPER_Z||e>=Tn.LOWER_A&&e<=Tn.LOWER_Z||c0(e)}function B6(e){return e===Tn.EQUALS||F6(e)}var En;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(En||(En={}));var ws;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ws||(ws={}));class j6{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=En.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ws.Strict}startEntity(t){this.decodeMode=t,this.state=En.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case En.EntityStart:return t.charCodeAt(n)===Tn.NUM?(this.state=En.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=En.NamedEntity,this.stateNamedEntity(t,n));case En.NumericStart:return this.stateNumericStart(t,n);case En.NumericDecimal:return this.stateNumericDecimal(t,n);case En.NumericHex:return this.stateNumericHex(t,n);case En.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|P6)===Tn.LOWER_X?(this.state=En.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=En.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const o=r-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(c0(a)||M6(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(c0(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Tn.SEMI)this.consumed+=1;else if(this.decodeMode===ws.Strict)return 0;return this.emitCodePoint(L6(this.result),this.consumed),this.errors&&(t!==Tn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],o=(a&ha.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=H6(r,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===ws.Attribute&&(o===0||B6(l))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],o=(a&ha.VALUE_LENGTH)>>14,o!==0){if(l===Tn.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ws.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&ha.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~ha.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case En.NamedEntity:return this.result!==0&&(this.decodeMode!==ws.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case En.NumericDecimal:return this.emitNumericEntity(0,2);case En.NumericHex:return this.emitNumericEntity(0,3);case En.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case En.EntityStart:return 0}}}function H6(e,t,n,r){const a=(t&ha.BRANCH_LENGTH)>>7,o=t&ha.JUMP_TABLE;if(a===0)return o!==0&&r===o?n:-1;if(o){const d=r-o;return d<0||d>=a?-1:e[n+d]-1}let l=n,c=l+a-1;for(;l<=c;){const d=l+c>>>1,h=e[d];if(h<r)l=d+1;else if(h>r)c=d-1;else return e[d+a]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var Ga;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ga||(Ga={}));var wr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(wr||(wr={}));var ee;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ee||(ee={}));var y;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(y||(y={}));const U6=new Map([[ee.A,y.A],[ee.ADDRESS,y.ADDRESS],[ee.ANNOTATION_XML,y.ANNOTATION_XML],[ee.APPLET,y.APPLET],[ee.AREA,y.AREA],[ee.ARTICLE,y.ARTICLE],[ee.ASIDE,y.ASIDE],[ee.B,y.B],[ee.BASE,y.BASE],[ee.BASEFONT,y.BASEFONT],[ee.BGSOUND,y.BGSOUND],[ee.BIG,y.BIG],[ee.BLOCKQUOTE,y.BLOCKQUOTE],[ee.BODY,y.BODY],[ee.BR,y.BR],[ee.BUTTON,y.BUTTON],[ee.CAPTION,y.CAPTION],[ee.CENTER,y.CENTER],[ee.CODE,y.CODE],[ee.COL,y.COL],[ee.COLGROUP,y.COLGROUP],[ee.DD,y.DD],[ee.DESC,y.DESC],[ee.DETAILS,y.DETAILS],[ee.DIALOG,y.DIALOG],[ee.DIR,y.DIR],[ee.DIV,y.DIV],[ee.DL,y.DL],[ee.DT,y.DT],[ee.EM,y.EM],[ee.EMBED,y.EMBED],[ee.FIELDSET,y.FIELDSET],[ee.FIGCAPTION,y.FIGCAPTION],[ee.FIGURE,y.FIGURE],[ee.FONT,y.FONT],[ee.FOOTER,y.FOOTER],[ee.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[ee.FORM,y.FORM],[ee.FRAME,y.FRAME],[ee.FRAMESET,y.FRAMESET],[ee.H1,y.H1],[ee.H2,y.H2],[ee.H3,y.H3],[ee.H4,y.H4],[ee.H5,y.H5],[ee.H6,y.H6],[ee.HEAD,y.HEAD],[ee.HEADER,y.HEADER],[ee.HGROUP,y.HGROUP],[ee.HR,y.HR],[ee.HTML,y.HTML],[ee.I,y.I],[ee.IMG,y.IMG],[ee.IMAGE,y.IMAGE],[ee.INPUT,y.INPUT],[ee.IFRAME,y.IFRAME],[ee.KEYGEN,y.KEYGEN],[ee.LABEL,y.LABEL],[ee.LI,y.LI],[ee.LINK,y.LINK],[ee.LISTING,y.LISTING],[ee.MAIN,y.MAIN],[ee.MALIGNMARK,y.MALIGNMARK],[ee.MARQUEE,y.MARQUEE],[ee.MATH,y.MATH],[ee.MENU,y.MENU],[ee.META,y.META],[ee.MGLYPH,y.MGLYPH],[ee.MI,y.MI],[ee.MO,y.MO],[ee.MN,y.MN],[ee.MS,y.MS],[ee.MTEXT,y.MTEXT],[ee.NAV,y.NAV],[ee.NOBR,y.NOBR],[ee.NOFRAMES,y.NOFRAMES],[ee.NOEMBED,y.NOEMBED],[ee.NOSCRIPT,y.NOSCRIPT],[ee.OBJECT,y.OBJECT],[ee.OL,y.OL],[ee.OPTGROUP,y.OPTGROUP],[ee.OPTION,y.OPTION],[ee.P,y.P],[ee.PARAM,y.PARAM],[ee.PLAINTEXT,y.PLAINTEXT],[ee.PRE,y.PRE],[ee.RB,y.RB],[ee.RP,y.RP],[ee.RT,y.RT],[ee.RTC,y.RTC],[ee.RUBY,y.RUBY],[ee.S,y.S],[ee.SCRIPT,y.SCRIPT],[ee.SEARCH,y.SEARCH],[ee.SECTION,y.SECTION],[ee.SELECT,y.SELECT],[ee.SOURCE,y.SOURCE],[ee.SMALL,y.SMALL],[ee.SPAN,y.SPAN],[ee.STRIKE,y.STRIKE],[ee.STRONG,y.STRONG],[ee.STYLE,y.STYLE],[ee.SUB,y.SUB],[ee.SUMMARY,y.SUMMARY],[ee.SUP,y.SUP],[ee.TABLE,y.TABLE],[ee.TBODY,y.TBODY],[ee.TEMPLATE,y.TEMPLATE],[ee.TEXTAREA,y.TEXTAREA],[ee.TFOOT,y.TFOOT],[ee.TD,y.TD],[ee.TH,y.TH],[ee.THEAD,y.THEAD],[ee.TITLE,y.TITLE],[ee.TR,y.TR],[ee.TRACK,y.TRACK],[ee.TT,y.TT],[ee.U,y.U],[ee.UL,y.UL],[ee.SVG,y.SVG],[ee.VAR,y.VAR],[ee.WBR,y.WBR],[ee.XMP,y.XMP]]);function yo(e){var t;return(t=U6.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const fe=y,z6={[le.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[le.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[le.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},d0=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);ee.STYLE,ee.SCRIPT,ee.XMP,ee.IFRAME,ee.NOEMBED,ee.NOFRAMES,ee.PLAINTEXT;var j;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(j||(j={}));const Jt={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function W6(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function Eu(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function Y6(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function ea(e){return Y6(e)||Eu(e)}function Yy(e){return ea(e)||W6(e)}function yc(e){return e+32}function m2(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function qy(e){return m2(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function q6(e){return e===B.NULL?ae.nullCharacterReference:e>1114111?ae.characterReferenceOutsideUnicodeRange:d2(e)?ae.surrogateCharacterReference:h2(e)?ae.noncharacterCharacterReference:f2(e)||e===B.CARRIAGE_RETURN?ae.controlCharacterReference:null}class $6{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new A6(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new j6(I6,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=q6(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(p2(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=yo(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ae.endTagWithAttributes),t.selfClosing&&this._err(ae.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=m2(t)?Xe.WHITESPACE_CHARACTER:t===B.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ws.Attribute:ws.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitCodePoint(t);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case B.AMPERSAND:{this._startCharacterReference();break}case B.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case B.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ea(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case B.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case B.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case B.QUESTION_MARK:{this._err(ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case B.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ea(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case B.GREATER_THAN_SIGN:{this._err(ae.missingEndTagName),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.tagName+=Pt;break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Eu(t)?yc(t):t)}}_stateRcdataLessThanSign(t){t===B.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ea(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===B.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ea(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case B.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case B.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ea(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===B.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===B.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===B.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ea(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ea(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Qn.SCRIPT,!1)&&qy(this.preprocessor.peek(Qn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Qn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Pt);break}case B.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===B.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Qn.SCRIPT,!1)&&qy(this.preprocessor.peek(Qn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Qn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._err(ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:{this._err(ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.name+=Pt;break}default:this.currentAttr.name+=String.fromCodePoint(Eu(t)?yc(t):t)}}_stateAfterAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case B.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case B.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case B.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=Pt;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:{this._err(ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case B.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case B.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=Pt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Qn.DASH_DASH,!0)?(this._createCommentToken(Qn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Qn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Qn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Qn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(ae.cdataInHtmlContent),this._createCommentToken(Qn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case B.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case B.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case B.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=Pt;break}case B.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case B.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case B.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===B.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===B.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==B.GREATER_THAN_SIGN&&t!==B.EOF&&this._err(ae.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case B.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case B.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case B.HYPHEN_MINUS:{n.data+="-";break}case B.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case B.GREATER_THAN_SIGN:{this._err(ae.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case B.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case B.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Eu(t))this._createDoctypeToken(String.fromCharCode(yc(t))),this.state=j.DOCTYPE_NAME;else switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:{this._err(ae.unexpectedNullCharacter),this._createDoctypeToken(Pt),this.state=j.DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.name+=Pt;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Eu(t)?yc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Qn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Qn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ae.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=Pt;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=Pt;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case B.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.QUOTATION_MARK:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=Pt;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=Pt;break}case B.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case B.NULL:{this._err(ae.unexpectedNullCharacter);break}case B.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case B.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case B.EOF:{this._err(ae.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===B.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case B.GREATER_THAN_SIGN:{this.state=j.DATA;break}case B.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Yy(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Yy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===B.SEMICOLON&&this._err(ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const g2=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),$y=new Set([...g2,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),Pc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),V6=new Set([...Pc,y.OL,y.UL]),Q6=new Set([...Pc,y.BUTTON]),Vy=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),Qy=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),G6=new Set([y.TR,y.TEMPLATE,y.HTML]),X6=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),K6=new Set([y.TABLE,y.TEMPLATE,y.HTML]),J6=new Set([y.TD,y.TH]);class Z6{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(d0,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(J6,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(K6,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(X6,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(G6,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===y.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===y.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case le.SVG:{if(Qy.has(a))return!1;break}case le.MATHML:{if(Vy.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Pc)}hasInListItemScope(t){return this.hasInDynamicScope(t,V6)}hasInButtonScope(t){return this.hasInDynamicScope(t,Q6)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(d0.has(n))return!0;if(Pc.has(n))return!1;break}case le.SVG:{if(Qy.has(n))return!1;break}case le.MATHML:{if(Vy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&g2.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$y.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$y.has(this.currentTagId);)this.pop()}}const Sh=3;var Zr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Zr||(Zr={}));const Gy={type:Zr.Marker};class eI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Zr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const p=this.treeAdapter.getAttrList(h);p.length===a&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sh)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(d=>a.get(d.name)===d.value)&&(o+=1,o>=Sh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Gy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Zr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Zr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Gy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Zr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Zr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Zr.Element&&n.element===t)}}const ta={createDocument(){return{nodeName:"#document",mode:wr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ta.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ta.isTextNode(n)){n.value+=t;return}}ta.appendChild(e,ta.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ta.isTextNode(r)?r.value+=t:ta.insertBefore(e,ta.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},y2="html",tI="about:legacy-compat",nI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",b2=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],rI=[...b2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),E2=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aI=[...E2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Xy(e,t){return t.some(n=>e.startsWith(n))}function iI(e){return e.name===y2&&e.publicId===null&&(e.systemId===null||e.systemId===tI)}function oI(e){if(e.name!==y2)return wr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===nI)return wr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sI.has(n))return wr.QUIRKS;let r=t===null?rI:b2;if(Xy(n,r))return wr.QUIRKS;if(r=t===null?E2:aI,Xy(n,r))return wr.LIMITED_QUIRKS}return wr.NO_QUIRKS}const Ky={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},uI="definitionurl",lI="definitionURL",cI=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),dI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),fI=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),hI=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function pI(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:r})=>r===Ga.COLOR||r===Ga.SIZE||r===Ga.FACE)||hI.has(t)}function x2(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===uI){e.attrs[t].name=lI;break}}function T2(e){for(let t=0;t<e.attrs.length;t++){const n=cI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function fp(e){for(let t=0;t<e.attrs.length;t++){const n=dI.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function mI(e){const t=fI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=yo(e.tagName))}function gI(e,t){return t===le.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function yI(e,t,n){if(t===le.MATHML&&e===y.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ga.ENCODING){const a=n[r].value.toLowerCase();return a===Ky.TEXT_HTML||a===Ky.APPLICATION_XML}}return t===le.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function bI(e,t,n,r){return(!r||r===le.HTML)&&yI(e,t,n)||(!r||r===le.MATHML)&&gI(e,t)}const EI="hidden",xI=8,TI=3;var q;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(q||(q={}));const vI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},v2=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),Jy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ta,onParseError:null};class Zy{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Jy,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new $6(this.options,this),this.activeFormattingElements=new eI(this.treeAdapter),this.fragmentContextID=r?yo(this.treeAdapter.getTagName(r)):y.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Z6(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Jy,...n};t??(t=r.treeAdapter.createElement(ee.TEMPLATE,le.HTML,[]));const a=r.treeAdapter.createElement("documentmock",le.HTML,[]),o=new this(r,a,t);return o.fragmentContextID===y.TEMPLATE&&o.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:vI,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=Jt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===ee.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Jt.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Jt.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Jt.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Jt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ee.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),o=r?a.lastIndexOf(r):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:d,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Xe.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===ee.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return bI(t,a,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Zr.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=q.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=q.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=q.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=q.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=q.IN_TABLE;return}case y.BODY:{this.insertionMode=q.IN_BODY;return}case y.FRAMESET:{this.insertionMode=q.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=q.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=q.IN_HEAD;return}break}}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===y.TEMPLATE)break;if(r===y.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(t){return v2.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return z6[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){JR(this,t);return}switch(this.insertionMode){case q.INITIAL:{mu(this,t);break}case q.BEFORE_HTML:{wu(this,t);break}case q.BEFORE_HEAD:{Su(this,t);break}case q.IN_HEAD:{_u(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Cu(this,t);break}case q.AFTER_HEAD:{ku(this,t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:{S2(this,t);break}case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{_h(this,t);break}case q.IN_TABLE_TEXT:{D2(this,t);break}case q.IN_COLUMN_GROUP:{Mc(this,t);break}case q.AFTER_BODY:{Fc(this,t);break}case q.AFTER_AFTER_BODY:{wc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){KR(this,t);return}switch(this.insertionMode){case q.INITIAL:{mu(this,t);break}case q.BEFORE_HTML:{wu(this,t);break}case q.BEFORE_HEAD:{Su(this,t);break}case q.IN_HEAD:{_u(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Cu(this,t);break}case q.AFTER_HEAD:{ku(this,t);break}case q.TEXT:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{_h(this,t);break}case q.IN_COLUMN_GROUP:{Mc(this,t);break}case q.AFTER_BODY:{Fc(this,t);break}case q.AFTER_AFTER_BODY:{wc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){f0(this,t);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{f0(this,t);break}case q.IN_TABLE_TEXT:{gu(this,t);break}case q.AFTER_BODY:{OI(this,t);break}case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{DI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:{AI(this,t);break}case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:{this._err(t,ae.misplacedDoctype);break}case q.IN_TABLE_TEXT:{gu(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ZR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{mu(this,t);break}case q.BEFORE_HTML:{II(this,t);break}case q.BEFORE_HEAD:{LI(this,t);break}case q.IN_HEAD:{Hr(this,t);break}case q.IN_HEAD_NO_SCRIPT:{FI(this,t);break}case q.AFTER_HEAD:{jI(this,t);break}case q.IN_BODY:{Pn(this,t);break}case q.IN_TABLE:{ao(this,t);break}case q.IN_TABLE_TEXT:{gu(this,t);break}case q.IN_CAPTION:{PR(this,t);break}case q.IN_COLUMN_GROUP:{mp(this,t);break}case q.IN_TABLE_BODY:{ud(this,t);break}case q.IN_ROW:{ld(this,t);break}case q.IN_CELL:{BR(this,t);break}case q.IN_SELECT:{R2(this,t);break}case q.IN_SELECT_IN_TABLE:{HR(this,t);break}case q.IN_TEMPLATE:{zR(this,t);break}case q.AFTER_BODY:{YR(this,t);break}case q.IN_FRAMESET:{qR(this,t);break}case q.AFTER_FRAMESET:{VR(this,t);break}case q.AFTER_AFTER_BODY:{GR(this,t);break}case q.AFTER_AFTER_FRAMESET:{XR(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?eL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{mu(this,t);break}case q.BEFORE_HTML:{RI(this,t);break}case q.BEFORE_HEAD:{PI(this,t);break}case q.IN_HEAD:{MI(this,t);break}case q.IN_HEAD_NO_SCRIPT:{BI(this,t);break}case q.AFTER_HEAD:{HI(this,t);break}case q.IN_BODY:{od(this,t);break}case q.TEXT:{_R(this,t);break}case q.IN_TABLE:{Iu(this,t);break}case q.IN_TABLE_TEXT:{gu(this,t);break}case q.IN_CAPTION:{MR(this,t);break}case q.IN_COLUMN_GROUP:{FR(this,t);break}case q.IN_TABLE_BODY:{h0(this,t);break}case q.IN_ROW:{I2(this,t);break}case q.IN_CELL:{jR(this,t);break}case q.IN_SELECT:{L2(this,t);break}case q.IN_SELECT_IN_TABLE:{UR(this,t);break}case q.IN_TEMPLATE:{WR(this,t);break}case q.AFTER_BODY:{M2(this,t);break}case q.IN_FRAMESET:{$R(this,t);break}case q.AFTER_FRAMESET:{QR(this,t);break}case q.AFTER_AFTER_BODY:{wc(this,t);break}}}onEof(t){switch(this.insertionMode){case q.INITIAL:{mu(this,t);break}case q.BEFORE_HTML:{wu(this,t);break}case q.BEFORE_HEAD:{Su(this,t);break}case q.IN_HEAD:{_u(this,t);break}case q.IN_HEAD_NO_SCRIPT:{Cu(this,t);break}case q.AFTER_HEAD:{ku(this,t);break}case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{N2(this,t);break}case q.TEXT:{CR(this,t);break}case q.IN_TABLE_TEXT:{gu(this,t);break}case q.IN_TEMPLATE:{P2(this,t);break}case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{pp(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===B.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{this._insertCharacters(t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{w2(this,t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{_h(this,t);break}case q.IN_TABLE_TEXT:{O2(this,t);break}}}}function wI(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):k2(e,t),n}function SI(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function _I(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),d=c&&o>=TI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=CI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function CI(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function kI(e,t,n){const r=e.treeAdapter.getTagName(t),a=yo(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===y.TEMPLATE&&o===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function NI(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function hp(e,t){for(let n=0;n<xI;n++){const r=wI(e,t);if(!r)break;const a=SI(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const o=_I(e,a,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&kI(e,l,o),NI(e,a,r)}}function f0(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function OI(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DI(e,t){e._appendCommentNode(t,e.document)}function pp(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function AI(e,t){e._setDocumentType(t);const n=t.forceQuirks?wr.QUIRKS:oI(t);iI(t)||e._err(t,ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=q.BEFORE_HTML}function mu(e,t){e._err(t,ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,wr.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function II(e,t){t.tagID===y.HTML?(e._insertElement(t,le.HTML),e.insertionMode=q.BEFORE_HEAD):wu(e,t)}function RI(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&wu(e,t)}function wu(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function LI(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break}default:Su(e,t)}}function PI(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?Su(e,t):e._err(t,ae.endTagWithoutMatchingOpenElement)}function Su(e,t){e._insertFakeElement(ee.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function Hr(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Jt.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Jt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Jt.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Jt.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break}case y.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:_u(e,t)}}function MI(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{_u(e,t);break}case y.TEMPLATE:{ii(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function ii(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ae.endTagWithoutMatchingOpenElement)}function _u(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function FI(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{Hr(e,t);break}case y.NOSCRIPT:{e._err(t,ae.nestedNoscriptInHead);break}default:Cu(e,t)}}function BI(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=q.IN_HEAD;break}case y.BR:{Cu(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Cu(e,t){const n=t.type===Xe.EOF?ae.openElementsLeftAfterEof:ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function jI(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=q.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,ae.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),Hr(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:ku(e,t)}}function HI(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{ku(e,t);break}case y.TEMPLATE:{ii(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function ku(e,t){e._insertFakeElement(ee.BODY,y.BODY),e.insertionMode=q.IN_BODY,id(e,t)}function id(e,t){switch(t.type){case Xe.CHARACTER:{S2(e,t);break}case Xe.WHITESPACE_CHARACTER:{w2(e,t);break}case Xe.COMMENT:{f0(e,t);break}case Xe.START_TAG:{Pn(e,t);break}case Xe.END_TAG:{od(e,t);break}case Xe.EOF:{N2(e,t);break}}}function w2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function S2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function UI(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function zI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function WI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_FRAMESET)}function YI(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function qI(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&d0.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function $I(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function VI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function QI(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===y.LI&&a===y.LI||(n===y.DD||n===y.DT)&&(a===y.DD||a===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==y.ADDRESS&&a!==y.DIV&&a!==y.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function GI(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Jt.PLAINTEXT}function XI(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function KI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ee.A);n&&(hp(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function JI(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ZI(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(hp(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function eR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function tR(e,t){e.treeAdapter.getDocumentMode(e.document)!==wr.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function _2(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function C2(e){const t=p2(e,Ga.TYPE);return t!=null&&t.toLowerCase()===EI}function nR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),C2(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function rR(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function sR(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aR(e,t){t.tagName=ee.IMG,t.tagID=y.IMG,_2(e,t)}function iR(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Jt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function oR(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Jt.RAWTEXT)}function uR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Jt.RAWTEXT)}function eb(e,t){e._switchToTextParsing(t,Jt.RAWTEXT)}function lR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function cR(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function dR(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function fR(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,le.HTML)}function hR(e,t){e._reconstructActiveFormattingElements(),x2(t),fp(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function pR(e,t){e._reconstructActiveFormattingElements(),T2(t),fp(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function tb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function Pn(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{JI(e,t);break}case y.A:{KI(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{qI(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{YI(e,t);break}case y.LI:case y.DD:case y.DT:{QI(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{_2(e,t);break}case y.HR:{sR(e,t);break}case y.RB:case y.RTC:{dR(e,t);break}case y.RT:case y.RP:{fR(e,t);break}case y.PRE:case y.LISTING:{$I(e,t);break}case y.XMP:{oR(e,t);break}case y.SVG:{pR(e,t);break}case y.HTML:{UI(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{Hr(e,t);break}case y.BODY:{zI(e,t);break}case y.FORM:{VI(e,t);break}case y.NOBR:{ZI(e,t);break}case y.MATH:{hR(e,t);break}case y.TABLE:{tR(e,t);break}case y.INPUT:{nR(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{rR(e,t);break}case y.IMAGE:{aR(e,t);break}case y.BUTTON:{XI(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{eR(e,t);break}case y.IFRAME:{uR(e,t);break}case y.SELECT:{lR(e,t);break}case y.OPTION:case y.OPTGROUP:{cR(e,t);break}case y.NOEMBED:case y.NOFRAMES:{eb(e,t);break}case y.FRAMESET:{WI(e,t);break}case y.TEXTAREA:{iR(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?eb(e,t):tb(e,t);break}case y.PLAINTEXT:{GI(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:tb(e,t)}}function mR(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function gR(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=q.AFTER_BODY,M2(e,t))}function yR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function bR(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function ER(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement(ee.P,y.P),e._closePElement()}function xR(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function TR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function vR(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function wR(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function SR(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ee.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function k2(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(r===l&&(r!==y.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function od(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{hp(e,t);break}case y.P:{ER(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{yR(e,t);break}case y.LI:{xR(e);break}case y.DD:case y.DT:{TR(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{vR(e);break}case y.BR:{SR(e);break}case y.BODY:{mR(e,t);break}case y.HTML:{gR(e,t);break}case y.FORM:{bR(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{wR(e,t);break}case y.TEMPLATE:{ii(e,t);break}default:k2(e,t)}}function N2(e,t){e.tmplInsertionModeStack.length>0?P2(e,t):pp(e,t)}function _R(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function CR(e,t){e._err(t,ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _h(e,t){if(e.openElements.currentTagId!==void 0&&v2.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{D2(e,t);break}case Xe.WHITESPACE_CHARACTER:{O2(e,t);break}}else Xu(e,t)}function kR(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_CAPTION}function NR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function OR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ee.COLGROUP,y.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,mp(e,t)}function DR(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_TABLE_BODY}function AR(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ee.TBODY,y.TBODY),e.insertionMode=q.IN_TABLE_BODY,ud(e,t)}function IR(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function RR(e,t){C2(t)?e._appendElement(t,le.HTML):Xu(e,t),t.ackSelfClosing=!0}function LR(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ao(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{AR(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{Hr(e,t);break}case y.COL:{OR(e,t);break}case y.FORM:{LR(e,t);break}case y.TABLE:{IR(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{DR(e,t);break}case y.INPUT:{RR(e,t);break}case y.CAPTION:{kR(e,t);break}case y.COLGROUP:{NR(e,t);break}default:Xu(e,t)}}function Iu(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{ii(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:Xu(e,t)}}function Xu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,id(e,t),e.fosterParentingEnabled=n}function O2(e,t){e.pendingCharacterTokens.push(t)}function D2(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function gu(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const A2=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function PR(e,t){const n=t.tagID;A2.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,ao(e,t)):Pn(e,t)}function MR(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,n===y.TABLE&&Iu(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:od(e,t)}}function mp(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{Hr(e,t);break}default:Mc(e,t)}}function FR(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case y.TEMPLATE:{ii(e,t);break}case y.COL:break;default:Mc(e,t)}}function Mc(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function ud(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ee.TR,y.TR),e.insertionMode=q.IN_ROW,ld(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,ao(e,t));break}default:ao(e,t)}}function h0(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,Iu(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:Iu(e,t)}}function ld(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=q.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,ud(e,t));break}default:ao(e,t)}}function I2(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,h0(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,h0(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:Iu(e,t)}}function BR(e,t){const n=t.tagID;A2.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),ld(e,t)):Pn(e,t)}function jR(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),I2(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:od(e,t)}}function R2(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{Hr(e,t);break}}}function L2(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{ii(e,t);break}}}function HR(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):R2(e,t)}function UR(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):L2(e,t)}function zR(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{Hr(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,ao(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,mp(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,ud(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,ld(e,t);break}default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,Pn(e,t)}}function WR(e,t){t.tagID===y.TEMPLATE&&ii(e,t)}function P2(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):pp(e,t)}function YR(e,t){t.tagID===y.HTML?Pn(e,t):Fc(e,t)}function M2(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Fc(e,t)}function Fc(e,t){e.insertionMode=q.IN_BODY,id(e,t)}function qR(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.FRAMESET:{e._insertElement(t,le.HTML);break}case y.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{Hr(e,t);break}}}function $R(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function VR(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.NOFRAMES:{Hr(e,t);break}}}function QR(e,t){t.tagID===y.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function GR(e,t){t.tagID===y.HTML?Pn(e,t):wc(e,t)}function wc(e,t){e.insertionMode=q.IN_BODY,id(e,t)}function XR(e,t){switch(t.tagID){case y.HTML:{Pn(e,t);break}case y.NOFRAMES:{Hr(e,t);break}}}function KR(e,t){t.chars=Pt,e._insertCharacters(t)}function JR(e,t){e._insertCharacters(t),e.framesetOk=!1}function F2(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ZR(e,t){if(pI(t))F2(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?x2(t):r===le.SVG&&(mI(t),T2(t)),fp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function eL(e,t){if(t.tagID===y.P||t.tagID===y.BR){F2(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}ee.AREA,ee.BASE,ee.BASEFONT,ee.BGSOUND,ee.BR,ee.COL,ee.EMBED,ee.FRAME,ee.HR,ee.IMG,ee.INPUT,ee.KEYGEN,ee.LINK,ee.META,ee.PARAM,ee.SOURCE,ee.TRACK,ee.WBR;const tL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,nL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),nb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function B2(e,t){const n=fL(e),r=l2("type",{handlers:{root:rL,element:sL,text:aL,comment:H2,doctype:iL,raw:uL},unknown:lL}),a={parser:n?new Zy(nb):Zy.getFragmentParser(void 0,nb),handle(c){r(c,a)},stitches:!1,options:t||{}};r(e,a),bo(a,us());const o=n?a.parser.document:a.parser.getFragment(),l=h6(o,{file:a.options.file});return a.stitches&&up(l,"comment",function(c,d,h){const p=c;if(p.value.stitch&&h&&d!==void 0){const m=h.children;return m[d]=p.value.stitch,d}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function j2(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function rL(e,t){j2(e.children,t)}function sL(e,t){cL(e,t),j2(e.children,t),dL(e,t)}function aL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:Ku(e)};bo(t,us(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function iL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ku(e)};bo(t,us(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function oL(e,t){t.stitches=!0;const n=hL(e);if("children"in e&&"children"in n){const r=B2({type:"root",children:e.children},t.options);n.children=r.children}H2({type:"comment",value:{stitch:n}},t)}function H2(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:Ku(e)};bo(t,us(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function uL(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,U2(t,us(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(tL,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function lL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))oL(n,t);else{let r="";throw nL.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function bo(e,t){U2(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Jt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function U2(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function cL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Jt.PLAINTEXT)return;bo(t,us(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Ba.html;a===Ba.html&&n==="svg"&&(a=Ba.svg);const o=b6({...e,children:[]},{space:a===Ba.svg?"svg":"html"}),l={type:Xe.START_TAG,tagName:n,tagID:yo(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Ku(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function dL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&C6.includes(n)||t.parser.tokenizer.state===Jt.PLAINTEXT)return;bo(t,nd(e));const r={type:Xe.END_TAG,tagName:n,tagID:yo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ku(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Jt.RCDATA||t.parser.tokenizer.state===Jt.RAWTEXT||t.parser.tokenizer.state===Jt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Jt.DATA)}function fL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ku(e){const t=us(e)||{line:void 0,column:void 0,offset:void 0},n=nd(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function hL(e){return"children"in e?so({...e,children:[]}):so(e)}function pL(e){return function(t,n){return B2(t,{...e,file:n})}}function mL({chartName:e,chartTitle:t,displayValue:n,field:r,change:a,previousValue:o,lockedPreset:l,lockedRange:c,format:d}){const[h,p]=L.useState(!1),[m,x]=L.useState({top:0,left:0,placement:"below"}),E=L.useRef(null),_=L.useRef(null);L.useEffect(()=>{if(!h||!_.current)return;const C=()=>{var G,X;if(!_.current)return;const N=_.current.getBoundingClientRect(),A=((G=E.current)==null?void 0:G.offsetHeight)||180,k=window.innerHeight-N.bottom,O=N.top,I=8;let P="below",H;k<A+I&&O>k?(P="above",H=N.top+window.scrollY-A-I):H=N.bottom+window.scrollY+I;let F=N.left+window.scrollX;const Y=((X=E.current)==null?void 0:X.offsetWidth)||220;F+Y>window.innerWidth-I&&(F=window.innerWidth-Y-I),F<I&&(F=I),x({top:H,left:F,placement:P})};C(),requestAnimationFrame(C)},[h]),L.useEffect(()=>{if(!h)return;function C(N){E.current&&!E.current.contains(N.target)&&_.current&&!_.current.contains(N.target)&&p(!1)}return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[h]),L.useEffect(()=>{if(!h)return;function C(N){N.key==="Escape"&&p(!1)}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[h]);const S=l?l.replace(/_/g," ").replace(/\b\w/g,C=>C.toUpperCase()):c?c.replace(".."," to "):null,w=a!==void 0?`${a>=0?"+":""}${a.toFixed(1)}%`:null,v=a!==void 0?a>=0?"text-green-600":"text-red-600":"";return g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:_,onClick:()=>p(!h),className:"text-blue-600 font-semibold border-b border-dashed border-blue-300 cursor-pointer hover:bg-blue-50 px-0.5 rounded transition-colors",children:n}),h&&Sx.createPortal(g.jsxs("div",{ref:E,className:"fixed z-[9999] bg-white rounded-lg shadow-xl border border-gray-200 p-3 min-w-[220px] text-sm",style:{top:m.top,left:m.left},children:[g.jsx("div",{className:"font-medium text-gray-900 mb-2",children:t}),g.jsxs("div",{className:"flex items-baseline gap-2 mb-2",children:[g.jsx("span",{className:"text-2xl font-bold text-gray-900",children:n}),r&&r!=="value"&&r!=="formatted"&&g.jsxs("span",{className:"text-xs text-gray-500",children:["(",r,")"]})]}),w&&g.jsxs("div",{className:Fr("text-sm mb-2",v),children:[w," vs previous period",o!==void 0&&g.jsxs("span",{className:"text-gray-500 ml-1",children:["(",(d==null?void 0:d.type)==="currency"?"$":"",o.toLocaleString(),")"]})]}),g.jsx("div",{className:"border-t border-gray-100 my-2"}),g.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),S?g.jsx("span",{children:S}):g.jsx("span",{className:"italic",children:"Follows dashboard filter"})]}),g.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400 mt-1",children:[g.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),g.jsx("span",{children:e})]})]}),document.body)]})}function gL(e){const t=/\{\{([a-zA-Z0-9_-]+)(?:\.([a-zA-Z0-9_]+))?(?:@([a-zA-Z0-9_-]+|\d{4}-\d{2}-\d{2}\.\.\d{4}-\d{2}-\d{2}))?\}\}/g,n=new Map;let r;for(;(r=t.exec(e))!==null;){const a=r[1],o=r[2],l=r[3];if(!a)continue;let c;if(l){const h=l.match(/^(\d{4}-\d{2}-\d{2})\.\.(\d{4}-\d{2}-\d{2})$/);h?c={startDate:h[1],endDate:h[2]}:c={preset:l}}const d=`${a}:${o||""}:${l||""}`;n.has(d)||n.set(d,{chartName:a,field:o,locked:c})}return Array.from(n.values())}function yL(e){return Array.from(new Set(e.map(t=>t.chartName)))}function bL(e,t){if(!t)return e.toLocaleString();const n=t.decimals??0;switch(t.type){case"currency":return new Intl.NumberFormat("en-US",{style:"currency",currency:t.currency||"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(e);case"percent":return new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(e/100);default:return e.toLocaleString(void 0,{minimumFractionDigits:n,maximumFractionDigits:n})}}function EL(e,t){if(e.locked){if(e.locked.preset)return{date_range:e.locked.preset};if(e.locked.startDate&&e.locked.endDate)return{date_range:{type:"custom",start:e.locked.startDate,end:e.locked.endDate}}}return t}function p0(e){const t=e.locked?e.locked.preset||`${e.locked.startDate}..${e.locked.endDate}`:"current";return`${e.chartName}:${e.field||"value"}:${t}`}function xL(e,t){const n=yL(e),r=L.useMemo(()=>{const p=new Map;return e.forEach(m=>{const x=EL(m,t),E=`${m.chartName}:${JSON.stringify(x)}`;p.has(E)||p.set(E,{chartName:m.chartName,params:x,refs:[]}),p.get(E).refs.push(m)}),Array.from(p.values())},[e,t]),a=i1({queries:r.map(p=>({queryKey:["chartData",p.chartName,p.params],queryFn:()=>Mt.queryChart(p.chartName,p.params),enabled:r.length>0}))}),o=i1({queries:n.map(p=>({queryKey:["chart",p],queryFn:()=>Mt.getChart(p),enabled:n.length>0}))}),l=L.useMemo(()=>{const p={};return n.forEach((m,x)=>{const E=o[x];E!=null&&E.data&&(p[m]=E.data)}),p},[n,o]),c=L.useMemo(()=>{const p={};return r.forEach((m,x)=>{var w,v,C;const E=a[x],_=(w=l[m.chartName])==null?void 0:w.chart;if(!((C=(v=E==null?void 0:E.data)==null?void 0:v.rows)!=null&&C[0])||!_)return;const S=E.data.rows[0];m.refs.forEach(N=>{var M,k;const A=p0(N);if(_.type==="kpi"&&((M=_.value)!=null&&M.field)){const O=_.value.field,I=S[O]??0,P={value:I,formatted:bL(I,_.format),fields:{}};if(Object.entries(S).forEach(([H,F])=>{typeof F=="number"&&(P.fields[H]=F)}),(k=_.comparison)!=null&&k.enabled&&_.comparison.field){const H=S[_.comparison.field];H&&H!==0&&(_.comparison.type==="percent_change"?P.change=(I-H)/H*100:P.change=I-H)}p[A]=P}})}),p},[r,a,l]),d=a.some(p=>p.isLoading)||o.some(p=>p.isLoading),h=L.useMemo(()=>{const p={};return n.forEach((m,x)=>{var _;const E=o[x];(_=E==null?void 0:E.data)!=null&&_.title&&(p[m]=E.data.title)}),p},[n,o]);return{values:c,isLoading:d,getRefKey:p0,chartTitles:h}}function TL(e,t,n){const r={};let a=0;return{content:e.replace(/\{\{([a-zA-Z0-9_-]+)(?:\.([a-zA-Z0-9_]+))?(?:@([a-zA-Z0-9_-]+|\d{4}-\d{2}-\d{2}\.\.\d{4}-\d{2}-\d{2}))?\}\}/g,(l,c,d,h)=>{let p,m,x;if(h){const C=h.match(/^(\d{4}-\d{2}-\d{2})\.\.(\d{4}-\d{2}-\d{2})$/);C?(p={startDate:C[1],endDate:C[2]},x=h):(p={preset:h},m=h)}const _=p0({chartName:c,field:d,locked:p}),S=t[_];if(!S)return l;let w;if(d)if(d==="formatted"||d==="value")w=S.formatted;else if(d==="change"&&S.change!==void 0)w=`${S.change>=0?"+":""}${S.change.toFixed(1)}%`;else if(S.fields[d]!==void 0)w=S.fields[d].toLocaleString();else return l;else w=S.formatted;const v=`kpi-ref-${a++}`;return r[v]={chartName:c,chartTitle:n[c]||c,displayValue:w,field:d,change:S.change,previousValue:S.fields.previous_value,lockedPreset:m,lockedRange:x},`<kpi-ref data-ref-id="${v}">${w}</kpi-ref>`}),refData:r}}function vL({filter:e,kpiCharts:t,selectedIndex:n,position:r,onSelect:a,onClose:o}){const l=L.useRef(null),c=L.useMemo(()=>{const d=e.toLowerCase();return t.filter(h=>h.name.toLowerCase().includes(d)||h.title.toLowerCase().includes(d))},[e,t]);return L.useEffect(()=>{function d(h){l.current&&!l.current.contains(h.target)&&o()}return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[o]),L.useEffect(()=>{var h;const d=(h=l.current)==null?void 0:h.querySelector('[data-selected="true"]');d==null||d.scrollIntoView({block:"nearest"})},[n]),c.length===0?null:Sx.createPortal(g.jsx("div",{ref:l,className:"fixed z-[9999] bg-white rounded-lg shadow-xl border border-gray-200 py-1 max-h-48 overflow-y-auto min-w-[200px]",style:{top:r.top,left:r.left},children:c.map((d,h)=>g.jsxs("button",{"data-selected":h===n,onMouseDown:p=>{p.preventDefault(),a(d.name)},className:Fr("w-full text-left px-3 py-1.5 text-sm flex flex-col",h===n?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-gray-50"),children:[g.jsx("span",{className:"font-medium truncate",children:d.title}),g.jsx("span",{className:"text-xs text-gray-400 font-mono truncate",children:`{{${d.name}}}`})]},d.name))}),document.body)}function wL({content:e,onUpdate:t,isContentEditing:n,onEditStart:r,onEditEnd:a}){const{isEditing:o}=fo(),[l,c]=L.useState(e),d=L.useRef(null),[h,p]=L.useState(null),[m,x]=L.useState({top:0,left:0}),E=L.useRef(null),_=Ye($=>$.globalFilters),{data:S}=is({queryKey:["config"],queryFn:()=>Mt.getConfig()}),w=L.useMemo(()=>(S==null?void 0:S.charts.filter($=>$.type==="kpi"))||[],[S]),v=L.useMemo(()=>gL(e),[e]),{values:C,isLoading:N,chartTitles:A}=xL(v,_),{content:M,refData:k}=L.useMemo(()=>N||Object.keys(C).length===0?{content:e,refData:{}}:TL(e,C,A),[e,C,N,A]),O=L.useMemo(()=>({"kpi-ref":({children:$,...se})=>{const J=se["data-ref-id"],te=J?k[J]:null;return te?g.jsx(mL,{chartName:te.chartName,chartTitle:te.chartTitle,displayValue:te.displayValue,field:te.field,change:te.change,previousValue:te.previousValue,lockedPreset:te.lockedPreset,lockedRange:te.lockedRange}):g.jsx("span",{children:$})}}),[k]);L.useEffect(()=>{n||c(e)},[e,n]),L.useEffect(()=>{n&&d.current&&d.current.focus()},[n]);const I=()=>{t==null||t(l),p(null),a==null||a()},P=()=>{c(e),p(null),a==null||a()},H=()=>{const $=d.current,se=E.current;if(!$||!se)return;const J=$.selectionStart,te=$.value.substring(0,J);se.textContent=te;const R=$.getBoundingClientRect(),ie=se.offsetWidth,he=parseFloat(getComputedStyle($).lineHeight)||18,U=$.clientWidth-16,Ie=te.split(`
|
|
109
|
+
`),ze=Ie[Ie.length-1]||"";se.textContent=ze;const Ae=Math.min(se.offsetWidth,U),tt=(Ie.length-1+Math.floor(ie/U))*he;x({top:R.top+tt+he+4-$.scrollTop,left:R.left+Ae+8})},F=L.useMemo(()=>{if(!(h!=null&&h.active))return[];const $=h.filter.toLowerCase();return w.filter(se=>se.name.toLowerCase().includes($)||se.title.toLowerCase().includes($))},[h,w]),Y=$=>{if(!h||!d.current)return;const se=d.current,J=l.substring(0,h.startPos),te=l.substring(se.selectionStart),R=`{{${$}}}`,ie=J+R+te;c(ie),p(null);const he=J.length+R.length;setTimeout(()=>{se.selectionStart=se.selectionEnd=he,se.focus()},0)},G=$=>{if(h!=null&&h.active){if($.key==="ArrowDown"){$.preventDefault(),p(ze=>ze?{...ze,selectedIndex:Math.min(ze.selectedIndex+1,F.length-1)}:null);return}if($.key==="ArrowUp"){$.preventDefault(),p(ze=>ze?{...ze,selectedIndex:Math.max(ze.selectedIndex-1,0)}:null);return}if($.key==="Enter"||$.key==="Tab"){$.preventDefault();const ze=F[h.selectedIndex];ze&&Y(ze.name);return}if($.key==="Escape"){$.preventDefault(),p(null);return}}if($.key==="Escape"){$.preventDefault(),P();return}if($.key!=="Enter")return;const se=$.currentTarget,{selectionStart:J,value:te}=se,R=te.substring(0,J),ie=R.lastIndexOf(`
|
|
110
|
+
`)+1,he=R.substring(ie),U=he.match(/^(\s*)([-*])\s(.*)$/);if(U){const ze=U[1]??"",Ae=U[2]??"-";if(!(U[3]??"").trim()){$.preventDefault();const st=te.substring(0,ie)+te.substring(J);c(st),setTimeout(()=>{se.selectionStart=se.selectionEnd=ie},0);return}$.preventDefault();const tt=`
|
|
111
|
+
${ze}${Ae} `,Ke=te.substring(0,J)+tt+te.substring(J);c(Ke),setTimeout(()=>{se.selectionStart=se.selectionEnd=J+tt.length},0);return}const Ie=he.match(/^(\s*)(\d+)\.\s(.*)$/);if(Ie){const ze=Ie[1]??"",Ae=Ie[2]??"1";if(!(Ie[3]??"").trim()){$.preventDefault();const Je=te.substring(0,ie)+te.substring(J);c(Je),setTimeout(()=>{se.selectionStart=se.selectionEnd=ie},0);return}$.preventDefault();const tt=parseInt(Ae,10)+1,Ke=`
|
|
112
|
+
${ze}${tt}. `,st=te.substring(0,J)+Ke+te.substring(J);c(st),setTimeout(()=>{se.selectionStart=se.selectionEnd=J+Ke.length},0);return}},X=$=>{const se=$.target.value,J=$.target.selectionStart;c(se);const te=se.substring(0,J),R=te.lastIndexOf("{");if(R>=0){const ie=te.substring(R+1);if(!ie.includes("}")&&!ie.includes(`
|
|
113
|
+
`)){const he=ie.replace(/^\{/,"");p({active:!0,startPos:R,filter:he,selectedIndex:0}),setTimeout(H,0);return}}p(null)},K=$=>{const se=$.relatedTarget;se!=null&&se.closest("[data-kpi-autocomplete]")||I()};return n?g.jsxs("div",{className:"h-full relative",children:[g.jsx("textarea",{ref:d,value:l,onChange:X,onKeyDown:G,onBlur:K,className:"h-full w-full p-4 resize-none font-mono text-sm focus:outline-none bg-transparent",placeholder:"Type markdown here... Use {{ to insert KPI references"}),g.jsx("span",{ref:E,className:"invisible fixed top-0 left-0 font-mono text-sm whitespace-pre","aria-hidden":"true"}),(h==null?void 0:h.active)&&F.length>0&&g.jsx(vL,{filter:h.filter,kpiCharts:w,selectedIndex:h.selectedIndex,position:m,onSelect:Y,onClose:()=>p(null)})]}):g.jsxs("div",{className:"h-full p-4 overflow-auto",children:[g.jsx("div",{className:"prose prose-sm max-w-none prose-headings:mt-2 prose-headings:mb-2 prose-p:my-1 prose-ul:my-1 prose-ol:my-1 prose-li:my-0",children:g.jsx(JA,{rehypePlugins:[pL],components:O,children:M})}),o&&t&&!e&&g.jsx("div",{className:"text-gray-400 text-sm italic",children:"Double-click to edit"})]})}function SL({children:e,onRemove:t,widgetType:n,onDoubleClick:r,isContentEditing:a}){const{isEditing:o}=fo();return g.jsxs("div",{className:Fr("h-full overflow-hidden relative",o&&"ring-2 ring-blue-200",o&&!a&&"select-none"),style:{background:"var(--yc-color-surface)",borderRadius:"var(--yc-radius)",boxShadow:"var(--yc-shadow)",border:"var(--yc-card-border)"},children:[o&&g.jsxs(g.Fragment,{children:[!(n==="text"&&a)&&g.jsx("div",{className:"absolute inset-0 z-[5] cursor-grab active:cursor-grabbing",style:{pointerEvents:"all"},onMouseDown:l=>l.preventDefault(),onDoubleClick:l=>{r&&(l.stopPropagation(),r())}}),t&&g.jsx("div",{className:"absolute top-1 right-1 z-10",children:g.jsx("button",{onClick:l=>{l.stopPropagation(),t()},className:"w-5 h-5 bg-white/70 hover:bg-red-100 rounded flex items-center justify-center transition-colors",title:"Remove widget",children:g.jsx("svg",{className:"w-3 h-3 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})})]}),g.jsx("div",{className:"h-full",children:e})]})}const bc=38,z2=12;function _L(e){return e.type==="chart"&&e.ref?`chart-${e.ref}`:e.type==="text"?`text-${(e.content||"empty").slice(0,50).replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_")}`:"widget-unknown"}const CL=40;function kL(e){const t=[];for(let n=0;n<e;n++)for(let r=0;r<z2;r++)t.push({i:`bg-${n}-${r}`,x:r,y:n,w:1,h:1,static:!0});return t}const W2=kL(CL),NL=W2.map(e=>g.jsx("div",{style:{boxSizing:"border-box",background:"rgba(59, 130, 246, 0.04)",borderRadius:4,border:"1px solid rgba(59, 130, 246, 0.06)"}},e.i));function OL({layout:e,onLayoutChange:t}){const{isEditing:n,setPendingLayout:r,setOriginalLayout:a,currentLayout:o,removeWidget:l,updateWidget:c}=fo(),d=L.useRef(""),h=L.useRef(""),p=L.useRef(null),[m,x]=L.useState(0),[E,_]=L.useState(null);L.useEffect(()=>{const I=p.current;if(!I)return;const P=new ResizeObserver(H=>{var Y;const F=(Y=H[0])==null?void 0:Y.contentRect.width;F&&F>0&&x(Math.floor(F))});return P.observe(I),()=>P.disconnect()},[]),L.useEffect(()=>{const I=JSON.stringify(e);I!==d.current&&(d.current=I,a(e))},[e,a]),L.useEffect(()=>{n||_(null)},[n]);const S=o||e,w=S.gap??16,{gridLayout:v,widgetMap:C,widgetList:N}=L.useMemo(()=>{const I=[],P=new Map,H=[];let F=0;const Y=new Set;return S.rows.forEach((G,X)=>{let K=0,$=0;G.widgets.forEach((se,J)=>{let te=_L(se);if(Y.has(te)){let U=2;for(;Y.has(`${te}-${U}`);)U++;te=`${te}-${U}`}Y.add(te);const R=se.height??G.height,ie=Math.ceil(R/bc),he={i:te,x:se.x??K,y:se.y??F,w:se.cols,h:ie,minW:1,minH:1,static:!n||E===te};I.push(he),P.set(te,{widget:se,rowIndex:X,widgetIndex:J}),H.push({id:te,widget:se,rowIndex:X,widgetIndex:J}),K+=se.cols,$=Math.max($,ie)}),F+=$}),{gridLayout:I,widgetMap:P,widgetList:H}},[S,n,E]),A=L.useCallback(I=>{if(!n)return;const H=[...I.filter($=>C.has($.i))].sort(($,se)=>$.y-se.y||$.x-se.x),F=H.map($=>`${$.i}:${$.x},${$.y},${$.w},${$.h}`).join("|");if(F===h.current)return;h.current=F;const Y=new Map;H.forEach($=>{const se=C.get($.i);if(!se)return;let J=Y.get($.y);J||(J={items:[]},Y.set($.y,J));const te=$.h*bc;J.items.push({item:$,widget:{...se.widget,cols:$.w,height:te,x:$.x,y:$.y}})});const G=[],X=[...Y.keys()].sort(($,se)=>$-se);for(const $ of X){const se=Y.get($),J=Math.max(...se.items.map(te=>te.item.h));G.push({height:J*bc,widgets:se.items.map(te=>te.widget)})}const K={gap:S.gap,rows:G};r(K),t==null||t(K)},[n,C,S.gap,r,t]),M=L.useCallback((I,P)=>{l(I,P)},[l]),k=L.useCallback((I,P,H)=>{c(I,P,{content:H})},[c]),O={cols:z2,rowHeight:bc,width:m,margin:[w,w],useCSSTransforms:!0};return g.jsxs(g.Fragment,{children:[!n&&g.jsx("style",{children:".react-resizable-handle { display: none !important; }"}),n&&g.jsx("style",{children:`
|
|
114
|
+
.react-grid-placeholder {
|
|
115
|
+
background: rgba(59, 130, 246, 0.15) !important;
|
|
116
|
+
border: 2px dashed rgba(59, 130, 246, 0.4) !important;
|
|
117
|
+
border-radius: var(--yc-radius) !important;
|
|
118
|
+
opacity: 1 !important;
|
|
119
|
+
}
|
|
120
|
+
.yc-edit-grid .react-grid-item {
|
|
121
|
+
transition: all 200ms ease !important;
|
|
122
|
+
}
|
|
123
|
+
.yc-edit-grid .react-grid-item.react-draggable-dragging {
|
|
124
|
+
transition: none !important;
|
|
125
|
+
z-index: 100;
|
|
126
|
+
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
|
|
127
|
+
}
|
|
128
|
+
.yc-edit-grid .react-resizable-handle {
|
|
129
|
+
background: none !important;
|
|
130
|
+
width: 24px !important;
|
|
131
|
+
height: 24px !important;
|
|
132
|
+
z-index: 10 !important;
|
|
133
|
+
}
|
|
134
|
+
.yc-edit-grid .react-resizable-handle::after {
|
|
135
|
+
content: '' !important;
|
|
136
|
+
position: absolute !important;
|
|
137
|
+
right: 4px !important;
|
|
138
|
+
bottom: 4px !important;
|
|
139
|
+
width: 10px !important;
|
|
140
|
+
height: 10px !important;
|
|
141
|
+
border-right: 2px solid rgba(59,130,246,0.4) !important;
|
|
142
|
+
border-bottom: 2px solid rgba(59,130,246,0.4) !important;
|
|
143
|
+
border-radius: 0 0 2px 0 !important;
|
|
144
|
+
}
|
|
145
|
+
.yc-edit-grid .react-resizable-handle:hover::after {
|
|
146
|
+
border-color: rgba(59,130,246,0.8) !important;
|
|
147
|
+
}
|
|
148
|
+
.yc-bg-grid {
|
|
149
|
+
position: absolute !important;
|
|
150
|
+
inset: 0 !important;
|
|
151
|
+
pointer-events: none !important;
|
|
152
|
+
z-index: 0 !important;
|
|
153
|
+
overflow: hidden !important;
|
|
154
|
+
}
|
|
155
|
+
.yc-bg-grid .react-grid-item {
|
|
156
|
+
transition: none !important;
|
|
157
|
+
}
|
|
158
|
+
.yc-edit-grid {
|
|
159
|
+
position: relative;
|
|
160
|
+
}
|
|
161
|
+
.yc-edit-grid > .react-grid-item {
|
|
162
|
+
z-index: 1;
|
|
163
|
+
}
|
|
164
|
+
`}),g.jsxs("div",{ref:p,style:{position:"relative"},children:[m>0&&n&&g.jsx(J1,{className:"yc-bg-grid",layout:W2,...O,compactType:null,isDraggable:!1,isResizable:!1,autoSize:!1,children:NL}),m>0&&g.jsx(J1,{className:n?"layout yc-edit-grid":"layout",layout:v,...O,isDraggable:n,isResizable:n,onDragStop:I=>A(I),onResizeStop:I=>A(I),compactType:"vertical",autoSize:!0,children:N.map(({id:I,widget:P,rowIndex:H,widgetIndex:F})=>g.jsx("div",{className:"h-full",children:g.jsxs(SL,{onRemove:()=>M(H,F),widgetType:P.type,isContentEditing:E===I,onDoubleClick:P.type==="text"?()=>_(I):void 0,children:[P.type==="chart"&&P.ref&&g.jsx(H3,{chartRef:P.ref}),P.type==="text"&&g.jsx(wL,{content:P.content||"",onUpdate:Y=>k(H,F,Y),isContentEditing:E===I,onEditStart:()=>_(I),onEditEnd:()=>_(null)})]})},I))})]})]})}function DL({isOpen:e,onClose:t,onAdd:n,existingCharts:r}){const{data:a}=io(),[o,l]=L.useState(""),c=L.useRef(null);if(L.useEffect(()=>{const m=E=>{E.key==="Escape"&&t()},x=E=>{c.current&&!c.current.contains(E.target)&&t()};return e&&(document.addEventListener("keydown",m),document.addEventListener("mousedown",x)),()=>{document.removeEventListener("keydown",m),document.removeEventListener("mousedown",x)}},[e,t]),!e)return null;const h=((a==null?void 0:a.charts)||[]).filter(m=>m.title.toLowerCase().includes(o.toLowerCase())||m.name.toLowerCase().includes(o.toLowerCase())),p=m=>{n({type:"chart",ref:m,cols:6}),t()};return g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:g.jsxs("div",{ref:c,className:"bg-white rounded-lg shadow-xl w-full max-w-md mx-4",children:[g.jsxs("div",{className:"p-4 border-b border-gray-200",children:[g.jsxs("div",{className:"flex items-center justify-between mb-3",children:[g.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Add Chart"}),g.jsx("button",{onClick:t,className:"p-1 text-gray-400 hover:text-gray-600",children:g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),g.jsx("input",{type:"text",placeholder:"Search charts...",value:o,onChange:m=>l(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",autoFocus:!0})]}),g.jsx("div",{className:"max-h-80 overflow-y-auto",children:h.length===0?g.jsx("div",{className:"p-4 text-center text-gray-500 text-sm",children:"No charts found"}):g.jsx("div",{className:"p-2",children:h.map(m=>{const x=r.includes(m.name);return g.jsxs("button",{onClick:()=>p(m.name),disabled:x,className:"w-full text-left px-3 py-3 rounded-md hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-between group",children:[g.jsxs("div",{children:[g.jsx("div",{className:"font-medium text-gray-900",children:m.title}),g.jsx("div",{className:"text-sm text-gray-500",children:m.name}),m.description&&g.jsx("div",{className:"text-xs text-gray-400 mt-1",children:m.description})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-xs text-gray-400 bg-gray-100 px-2 py-1 rounded",children:m.type}),x?g.jsx("span",{className:"text-xs text-green-600",children:"Added"}):g.jsx("svg",{className:"w-5 h-5 text-gray-400 opacity-0 group-hover:opacity-100",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})]})]},m.name)})})})]})})}function AL(e){const t=Math.floor((Date.now()-e)/1e3);if(t<10)return"just now";if(t<60)return`${t}s ago`;const n=Math.floor(t/60);if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:new Date(e).toLocaleDateString()}function IL({dashboardId:e,title:t,description:n,contentRef:r,activeTab:a}){const{isEditing:o,setIsEditing:l,pendingLayout:c,setPendingLayout:d,setOriginalLayout:h,hasChanges:p,addWidget:m,currentLayout:x,undo:E,redo:_,canUndo:S,canRedo:w}=fo(),v=Lw(e),C=Pw(),N=mw({queryKey:["chartData"]}),A=Br(),M=(()=>{const te=A.getQueryCache();let R=0;for(const ie of te.getAll()){const he=ie.queryKey[0];(he==="chartData"||he==="chartWithData")&&ie.state.dataUpdatedAt>R&&(R=ie.state.dataUpdatedAt)}return R>0?R:null})(),[k,O]=L.useState(!1),[I,P]=L.useState(!1),[H,F]=L.useState(!1),[Y,G]=L.useState(!1),X=(x==null?void 0:x.rows.flatMap(te=>te.widgets.filter(R=>R.type==="chart"&&R.ref).map(R=>R.ref)))||[],K=()=>{C()},$=async te=>{if(r.current){G(!0),O(!1);try{te==="pdf"?await lN(r.current,`${e}-dashboard`,t):await uN(r.current,`${e}-dashboard`,te)}finally{G(!1)}}},se=async()=>{if(c)try{await v.mutateAsync({layout:c,tab:a}),h(c),d(null),l(!1)}catch(te){console.error("Failed to save:",te)}},J=()=>{d(null),l(!1)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"border-b border-gray-200 bg-white",children:[g.jsxs("div",{className:"flex items-center justify-between p-4",children:[g.jsx("div",{children:g.jsx("h1",{className:"text-xl font-semibold text-gray-900",children:t})}),g.jsx("div",{className:"flex items-center gap-2",children:o?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"relative",children:[g.jsxs("button",{onClick:()=>F(!H),className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-blue-600 bg-blue-50 rounded-md hover:bg-blue-100",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add Widget",g.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),H&&g.jsxs("div",{className:"absolute left-0 top-full mt-1 w-40 bg-white rounded-md shadow-lg border border-gray-200 z-50 py-1",children:[g.jsxs("button",{onClick:()=>{F(!1),P(!0)},className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"Chart"]}),g.jsxs("button",{onClick:()=>{F(!1),m({type:"text",content:"",cols:6})},className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})}),"Text"]})]})]}),g.jsxs("div",{className:"flex items-center",children:[g.jsx("button",{onClick:E,disabled:!S,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md disabled:opacity-30 disabled:cursor-not-allowed",title:"Undo (Cmd+Z)",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a5 5 0 015 5v2M3 10l4-4m-4 4l4 4"})})}),g.jsx("button",{onClick:_,disabled:!w,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md disabled:opacity-30 disabled:cursor-not-allowed",title:"Redo (Cmd+Shift+Z)",children:g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10H11a5 5 0 00-5 5v2m15-7l-4-4m4 4l-4 4"})})})]}),g.jsx("div",{className:"w-px h-6 bg-gray-200 mx-2"}),g.jsx("button",{onClick:J,className:"px-4 py-2 text-sm text-gray-600 hover:text-gray-800",children:"Cancel"}),g.jsx("button",{onClick:se,disabled:!p||v.isPending,className:Fr("px-4 py-2 text-sm font-medium rounded-md",p?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-400 cursor-not-allowed"),children:v.isPending?"Saving...":"Save & Push"})]}):g.jsxs(g.Fragment,{children:[M&&N===0&&g.jsxs("span",{className:"text-xs text-gray-400",title:new Date(M).toLocaleString(),children:["Updated ",AL(M)]}),g.jsx("button",{onClick:K,disabled:N>0,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md disabled:opacity-50",title:"Refresh all charts",children:g.jsx("svg",{className:Fr("w-5 h-5",N>0&&"animate-spin"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),g.jsxs("div",{className:"relative",children:[g.jsx("button",{onClick:()=>O(!k),disabled:Y,className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md disabled:opacity-50",title:"Export dashboard",children:Y?g.jsxs("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),k&&g.jsxs("div",{className:"absolute right-0 top-full mt-1 w-40 bg-white rounded-md shadow-lg border border-gray-200 z-50 py-1",children:[g.jsxs("button",{onClick:()=>$("png"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Export PNG"]}),g.jsxs("button",{onClick:()=>$("jpeg"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Export JPEG"]}),g.jsxs("button",{onClick:()=>$("pdf"),className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2",children:[g.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),"Export PDF"]})]})]}),g.jsx("button",{onClick:()=>l(!0),className:"p-2 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-md",title:"Edit layout",children:g.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]})})]}),n&&g.jsx("p",{className:"px-4 pb-3 text-sm text-gray-500",children:n})]}),g.jsx(DL,{isOpen:I,onClose:()=>P(!1),onAdd:m,existingCharts:X})]})}function RL({filters:e,isEditing:t,onReorder:n,onRename:r}){const[a,o]=L.useState(null),[l,c]=L.useState(null);if(e.length===0)return null;function d(x,E){o(E),x.dataTransfer.effectAllowed="move"}function h(x,E){x.preventDefault(),x.dataTransfer.dropEffect="move",c(E)}function p(x,E){if(x.preventDefault(),a===null||a===E)return;const _=[...e],S=_.splice(a,1)[0];_.splice(E,0,S),n==null||n(_),o(null),c(null)}function m(){o(null),c(null)}return t?g.jsx("div",{className:"flex flex-wrap items-end gap-3",children:e.map((x,E)=>{const _=x.label||Jh(x.name),S=l===E?"border-blue-400 bg-blue-50":"border-gray-200 bg-gray-50",w=a===E?"opacity-50":"";return g.jsxs("div",{draggable:!0,onDragStart:v=>d(v,E),onDragOver:v=>h(v,E),onDrop:v=>p(v,E),onDragEnd:m,className:`flex items-center gap-2 px-3 py-2 rounded-md border cursor-grab active:cursor-grabbing transition-all ${S} ${w}`,children:[g.jsx("svg",{className:"w-3 h-3 text-gray-400 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:g.jsx("path",{d:"M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z"})}),g.jsx(LL,{value:_,onChange:v=>r==null?void 0:r(E,v)}),g.jsx("span",{className:"text-xs text-gray-400",children:x.type.replace("_"," ")})]},x.name)})}):g.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.map(x=>{const E=x.label||Jh(x.name),_=typeof x.default=="string"?x.default:void 0;switch(x.type){case"date_range":return g.jsx(CE,{name:x.name,label:E,defaultValue:_},x.name);case"select":{const S=(x.options||[]).map(w=>typeof w=="string"?{value:w,label:w}:w);return g.jsx(Oc,{name:x.name,label:E,options:S,defaultValue:_},x.name)}case"dynamic_select":return x.source?g.jsx(Oc,{name:x.name,label:E,source:x.source,defaultValue:_},x.name):g.jsxs("div",{className:"text-sm text-gray-500",children:[E,": dynamic_select requires source"]},x.name);case"multi_select":{const S=(x.options||[]).map(w=>typeof w=="string"?{value:w,label:w}:w);return g.jsx(kE,{name:x.name,label:E,options:S,defaultValue:Array.isArray(x.default)?x.default:void 0,source:x.source},x.name)}case"text":return g.jsx(DE,{name:x.name,label:E,defaultValue:_},x.name);case"number":return g.jsx(RE,{name:x.name,label:E,defaultValue:typeof x.default=="number"?x.default:void 0},x.name);case"boolean":return g.jsx(LE,{name:x.name,label:E},x.name);default:return g.jsxs("div",{className:"text-sm text-gray-500",children:[E,": ",x.type," (not supported)"]},x.name)}})})}function LL({value:e,onChange:t}){const[n,r]=L.useState(!1),[a,o]=L.useState(e);if(!n)return g.jsx("span",{className:"text-sm font-medium text-gray-700 cursor-text hover:text-blue-600 hover:underline",onClick:c=>{c.stopPropagation(),r(!0),o(e)},title:"Click to rename",children:e});function l(){a.trim()&&a!==e&&t(a.trim()),r(!1)}return g.jsx("input",{autoFocus:!0,value:a,onChange:c=>o(c.target.value),onBlur:l,onKeyDown:c=>{c.key==="Enter"&&l(),c.key==="Escape"&&r(!1)},className:"text-sm font-medium text-gray-700 bg-white border border-blue-300 rounded px-1 py-0 outline-none w-32",onClick:c=>c.stopPropagation()})}function PL({tabs:e,activeTab:t,onTabChange:n}){const{isEditing:r}=fo();return g.jsx("div",{className:"flex border-b border-gray-200 mb-4 -mt-2",children:e.map(a=>g.jsx("button",{onClick:()=>n(a.name),disabled:r&&a.name!==t,className:Fr("px-4 py-2 text-sm font-medium border-b-2 transition-colors",a.name===t?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300",r&&a.name!==t&&"opacity-50 cursor-not-allowed hover:text-gray-500 hover:border-transparent"),children:a.label},a.name))})}function ML(){const e=Ye(a=>a.crossFilters),t=Ye(a=>a.clearCrossFilter),n=Ye(a=>a.clearAllCrossFilters),r=Object.values(e);return r.length===0?null:g.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2 mb-4",children:[g.jsx("span",{className:"text-xs text-gray-500 font-medium",children:"Filtered by:"}),r.map(a=>g.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs bg-blue-50 text-blue-700 rounded-md border border-blue-200",children:[a.field,": ",a.value,g.jsx("button",{onClick:()=>t(a.field),className:"ml-0.5 hover:text-blue-900","aria-label":`Clear ${a.field} filter`,children:g.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",children:g.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})})]},a.field)),r.length>1&&g.jsx("button",{onClick:n,className:"text-xs text-gray-500 hover:text-gray-700 underline",children:"Clear all"})]})}function FL({dashboardId:e,title:t,description:n,contentRef:r,tabs:a,activeTab:o,onTabChange:l,filters:c}){const{isEditing:d,pendingFilters:h,setPendingFilters:p}=fo();L.useEffect(()=>{d&&!h&&p([...c])},[d]);const m=d&&h?h:c;return g.jsxs(g.Fragment,{children:[g.jsx(IL,{dashboardId:e,title:t,description:n,contentRef:r,activeTab:a?o:void 0}),a&&o&&l&&g.jsx(PL,{tabs:a,activeTab:o,onTabChange:l}),m.length>0&&g.jsxs("div",{className:"yc-filter-bar sticky top-0 z-10 border-b px-6 py-3",style:{backgroundColor:"var(--yc-color-surface)",borderColor:"var(--yc-color-border)"},children:[g.jsx(RL,{filters:m,isEditing:d,onReorder:x=>p(x),onRename:(x,E)=>{const _=[...m];_[x]={..._[x],label:E},p(_)}}),!d&&g.jsx(ML,{})]})]})}function BL({dashboardId:e,branch:t,initialTab:n}){const{data:r,isLoading:a,error:o}=Rw(e,t),l=L.useRef(null),c=Br(),d=Ye(_=>_.globalFilters),[h,p]=L.useState(n||"");L.useEffect(()=>{r&&sessionStorage.setItem("yamchart-last-dashboard",JSON.stringify({name:r.name,title:r.title}))},[r==null?void 0:r.name,r==null?void 0:r.title]),L.useEffect(()=>{if(!(r!=null&&r.tabs))return;const _=r.tabs.map(w=>w.name);if(h&&_.includes(h))return;const S=n&&_.includes(n)?n:_[0];S&&p(S)},[r==null?void 0:r.tabs,n]);const m=L.useCallback(_=>{var w;p(_);const S=`#/dashboards/${e}`;if(window.history.replaceState(null,"",`${S}?tab=${encodeURIComponent(_)}`),r!=null&&r.name){const v=Object.fromEntries(Object.entries(d).filter(([N,A])=>A!=null));Mt.warmDashboardCache(r.name,v,_).catch(()=>{});const C=(w=r.tabs)==null?void 0:w.find(N=>N.name===_);if(C)for(const N of C.layout.rows)for(const A of N.widgets)A.type==="chart"&&A.ref&&c.prefetchQuery({queryKey:["chartWithData",A.ref,v],queryFn:()=>Mt.queryChart(A.ref,v,{includeConfig:!0}),staleTime:1e3*60*5})}},[e,r==null?void 0:r.name,r==null?void 0:r.tabs,d,c]),x=L.useMemo(()=>{if(r){if(r.tabs){const _=r.tabs.find(S=>S.name===h);return _==null?void 0:_.layout}return r.layout}},[r,h]),E=L.useMemo(()=>{if(!r)return[];const _=r.filters||[];if(r.tabs){const S=r.tabs.find(v=>v.name===h),w=(S==null?void 0:S.filters)||[];return[..._,...w]}return _},[r,h]);return a?g.jsx("div",{className:"flex items-center justify-center h-64",children:g.jsx("div",{className:"text-gray-500",children:"Loading dashboard..."})}):o||!r?g.jsx("div",{className:"flex items-center justify-center h-64",children:g.jsxs("div",{className:"text-red-500",children:["Failed to load dashboard: ",(o==null?void 0:o.message)||"Unknown error"]})}):x?g.jsx(IN,{children:g.jsxs("div",{style:{backgroundColor:"var(--yc-color-background)"},children:[g.jsx(FL,{dashboardId:e,title:r.title,description:r.description,contentRef:l,tabs:r.tabs,activeTab:h,onTabChange:r.tabs?m:void 0,filters:E}),g.jsx("div",{ref:l,className:"p-6",children:g.jsx(OL,{layout:x})})]})}):g.jsx("div",{className:"flex items-center justify-center h-64",children:g.jsx("div",{className:"text-gray-500",children:"No layout available"})})}const jL=L.lazy(()=>ks(()=>import("./LoginPage-8kMwzXQY.js"),__vite__mapDeps([0,1])).then(e=>({default:e.LoginPage}))),HL=L.lazy(()=>ks(()=>import("./SetupWizard-FRVXmmVV.js"),__vite__mapDeps([2,1])).then(e=>({default:e.SetupWizard}))),UL=L.lazy(()=>ks(()=>import("./UserManagement-Yir6iim5.js"),__vite__mapDeps([3,1])).then(e=>({default:e.UserManagement}))),zL=L.lazy(()=>ks(()=>import("./ShareManagement-WkjpLgIb.js"),__vite__mapDeps([4,1])).then(e=>({default:e.ShareManagement}))),WL=L.lazy(()=>ks(()=>import("./PublicViewer-CCd0694Q.js"),__vite__mapDeps([5,1])).then(e=>({default:e.PublicViewer}))),Ec=()=>g.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading..."})});function rb(e){const t=e.replace(/^#?/,""),n=t.match(/^\/settings\/(.+)$/);if(n&&n[1])return{type:"settings",name:n[1],params:{}};const[r,a]=t.split("?"),o=r==null?void 0:r.match(/^\/public\/(charts|dashboards)\/(.+)$/);if(o&&o[1]&&o[2]){const p={};if(a)for(const[m,x]of new URLSearchParams(a).entries())p[m]=x;return{type:o[1]==="dashboards"?"public_dashboard":"public_chart",name:decodeURIComponent(o[2]),params:p}}const[l,c]=t.split("?"),d=l==null?void 0:l.match(/^\/(dashboards|charts)\/(.+)$/);if(!d||!d[1]||!d[2])return null;const h={};if(c)for(const[p,m]of new URLSearchParams(c).entries())h[p]=m;return{type:d[1]==="dashboards"?"dashboard":"chart",name:decodeURIComponent(d[2]),params:h}}function YL(){Mw();const e=eo(E=>E.auth),t=eo(E=>E.checkAuth);L.useEffect(()=>{t()},[t]);const{data:n,isLoading:r}=io(),{data:a,isLoading:o}=Hb(),l=Ye(E=>E.clearAllCrossFilters),[c,d]=L.useState(()=>window.location.hash.replace(/^#/,"")||"");L.useEffect(()=>{const E=()=>{d(window.location.hash.replace(/^#/,"")||""),l()};return window.addEventListener("hashchange",E),()=>window.removeEventListener("hashchange",E)},[l]);const h=L.useCallback(E=>{window.location.hash=E,d(E),l()},[l]);L.useEffect(()=>{r||o||c||(a&&a.length>0&&a[0]?h(`/dashboards/${a[0].name}`):n!=null&&n.charts&&n.charts.length>0&&n.charts[0]&&h(`/charts/${n.charts[0].name}`))},[r,o,a,n,c,h]);const p=rb(c);if(p&&(p.type==="public_chart"||p.type==="public_dashboard"))return g.jsx(L.Suspense,{fallback:g.jsx(Ec,{}),children:g.jsx(WL,{parsed:{type:p.type,name:p.name,params:p.params}})});if(e.status==="loading")return g.jsx(Ec,{});if(e.status==="needs_setup")return g.jsx(L.Suspense,{fallback:g.jsx(Ec,{}),children:g.jsx(HL,{})});if(e.status==="unauthenticated")return g.jsx(L.Suspense,{fallback:g.jsx(Ec,{}),children:g.jsx(jL,{})});if(r||o)return g.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:g.jsx("div",{className:"text-gray-500",children:"Loading..."})});const m=rb(c),x=()=>m?m.type==="settings"&&m.name==="users"?g.jsx(L.Suspense,{fallback:g.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Loading..."}),children:g.jsx(UL,{})}):m.type==="settings"&&m.name==="shares"?g.jsx(L.Suspense,{fallback:g.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Loading..."}),children:g.jsx(zL,{})}):m.type==="dashboard"?g.jsx(BL,{dashboardId:m.name,initialTab:m.params.tab}):g.jsx(DN,{chartName:m.name,drillParams:m.params}):g.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Select a dashboard or chart from the sidebar"});return g.jsx(_w,{children:g.jsx(zw,{currentPath:c,onNavigate:h,onNavigateToUsers:()=>h("/settings/users"),onNavigateToShares:()=>h("/settings/shares"),children:x()})})}jv.createRoot(document.getElementById("root")).render(g.jsx(L.StrictMode,{children:g.jsx(yw,{children:g.jsx(YL,{})})}));export{zu as A,jE as B,KE as C,fN as D,PE as F,GE as G,$E as H,BE as L,UE as P,nN as S,YE as T,QE as W,ks as _,Mt as a,Fb as b,Fr as c,jb as d,io as e,_0 as f,Ye as g,VE as h,qE as i,g as j,WE as k,zE as l,HE as m,BL as n,eo as u};
|