@gientech/modual 2.1.4 → 2.1.6
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/assets/{GientechStreamReader-BbSjongm.js → GientechStreamReader-BNmU0LBA.js} +2 -2
- package/assets/index-CSTEY8Na.js +1712 -0
- package/assets/{index-BzHtlTGu.js → index-CylvlTze.js} +1 -1
- package/assets/{index-D612gMLE.js → index-DpPJXfkL.js} +1 -1
- package/assets/index-KS1Q_mqd.js +1290 -0
- package/assets/style.css +1 -1
- package/assets/style4.css +1 -1
- package/chat.js +113 -113
- package/database.js +1 -1
- package/databaseId.js +1 -1
- package/databaseTable.js +1 -1
- package/index.js +1 -1
- package/modelManage.js +1 -1
- package/package.json +1 -1
- package/sensitive.js +1 -1
- package/streamFilesReader.js +1 -1
- package/assets/index-dBEqzk_s.js +0 -1614
- package/assets/index-md7-ni21.js +0 -1290
|
@@ -0,0 +1,1712 @@
|
|
|
1
|
+
import*as D from"react";import _e,{useState as Tt,useCallback as St,useImperativeHandle as M0,forwardRef as $o,useMemo as yt,useRef as Bt,createContext as co,useContext as To,useEffect as Jt,createElement as ms,useLayoutEffect as e4,useReducer as t4,Component as r4,memo as n4}from"react";import Pu,{flushSync as o4,unstable_batchedUpdates as a4,createPortal as i4}from"react-dom";import{R as up,L as gs}from"./index-KS1Q_mqd.js";import{aS as Sn,bB as s4,aB as cp,M as Rr,V as dp,bC as I0,bD as vs,y as mr,H as ht,f as tt,aR as fp,A as vt,L as Ne,bE as P0,bF as Ao,J as je,_ as Pt,aU as hp,a5 as lo,G as Xn,z as pp,aC as fo,bG as mp,bH as gp,aX as vp,aW as bp,aY as Va,t as Ks,p as z0,ad as xn,ac as Zr,l as ho,o as ha,T as bs,bI as l4,X as u4,k as Xe,af as yp,bj as j0,g as gi,m as Wo,bJ as xp,bd as ys,$ as _0,aJ as zu,r as vi,b7 as pn,bK as c4,W as Ws,aq as In,as as bi,bL as wp,bg as d4,bf as f4,bi as h4,bh as p4,a0 as m4,be as Yd,U as Jd,a3 as g4,a2 as v4,ax as Vs,am as L0,bM as b4,Y as y4,bs as x4,bn as w4,B as xs,P as C4,aG as D4,bN as E4,bO as k4,ay as S4,Z as ws,u as A4,an as B4,bP as F4,N as Bo,bQ as H0,aV as q0,bR as Zd,bS as K0,bT as Qd,bU as ef,E as Cs,bV as Cp,a9 as Ds,bW as N4,bx as Gt,bX as $4,K as T4,at as O4,a_ as R4,bY as M4,bZ as I4,v as Dp,bz as tf,b_ as P4,w as z4,aN as j4,s as _4,D as L4,aK as H4,c as Us}from"./index-BRq6VK9v.js";import{R as Es,a as ks,S as Ep,P as kp}from"./index-B3zi0w0x.js";import{S as q4}from"./index-DNMf-zgr.js";function ju(e){return e!=null&&e===e.window}const K4=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return ju(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!ju(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function W4(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function V4(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),u=K4(a),l=Date.now(),f=()=>{const p=Date.now()-l,v=W4(p>o?o:p,u,e,o);ju(a)?a.scrollTo(window.pageXOffset,v):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=v:a.scrollTop=v,p<o?Sn(f):typeof n=="function"&&n()};Sn(f)}const U4=e=>{const[t,r]=Tt(null);return[St((o,a,u)=>{const l=t??o,f=Math.min(l||0,o),d=Math.max(l||0,o),p=a.slice(f,d+1).map(e),v=p.some(y=>!u.has(y)),g=[];return p.forEach(y=>{v?(u.has(y)||g.push(y),u.add(y)):(u.delete(y),g.push(y))}),r(v?d:null),g},[t]),r]};function G4(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}const X4=(e,t)=>M0(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):G4(n,r)}),Y4=e=>{const t=D.useRef(e),[,r]=s4();return[()=>t.current,n=>{t.current=n,r()}]};var Sp=function(t){if(cp()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(o){return o in n.style})}return!1},J4=function(t,r){if(!Sp(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function Z4(e,t){return!Array.isArray(e)&&t!==void 0?J4(e,t):Sp(e)}var Q4=Rr.ESC,e3=Rr.TAB;function t3(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,u=D.useRef(!1),l=function(){if(t){var v,g;(v=r.current)===null||v===void 0||(g=v.focus)===null||g===void 0||g.call(v),n==null||n(!1)}},f=function(){var v;return(v=a.current)!==null&&v!==void 0&&v.focus?(a.current.focus(),u.current=!0,!0):!1},d=function(v){switch(v.keyCode){case Q4:l();break;case e3:{var g=!1;u.current||(g=f()),g?v.preventDefault():l();break}}};D.useEffect(function(){return t?(window.addEventListener("keydown",d),o&&Sn(f,3),function(){window.removeEventListener("keydown",d),u.current=!1}):function(){u.current=!1}},[t])}var r3=$o(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=yt(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),u=dp(t,I0(a));return _e.createElement(_e.Fragment,null,n&&_e.createElement("div",{className:"".concat(o,"-arrow")}),_e.cloneElement(a,{ref:vs(a)?u:void 0}))}),ea={adjustX:1,adjustY:1},ta=[0,0],n3={topLeft:{points:["bl","tl"],overflow:ea,offset:[0,-4],targetOffset:ta},top:{points:["bc","tc"],overflow:ea,offset:[0,-4],targetOffset:ta},topRight:{points:["br","tr"],overflow:ea,offset:[0,-4],targetOffset:ta},bottomLeft:{points:["tl","bl"],overflow:ea,offset:[0,4],targetOffset:ta},bottom:{points:["tc","bc"],overflow:ea,offset:[0,4],targetOffset:ta},bottomRight:{points:["tr","br"],overflow:ea,offset:[0,4],targetOffset:ta}},o3=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function a3(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,u=a===void 0?"rc-dropdown":a,l=e.transitionName,f=e.animation,d=e.align,p=e.placement,v=p===void 0?"bottomLeft":p,g=e.placements,y=g===void 0?n3:g,x=e.getPopupContainer,C=e.showAction,m=e.hideAction,A=e.overlayClassName,F=e.overlayStyle,B=e.visible,R=e.trigger,S=R===void 0?["hover"]:R,z=e.autoFocus,$=e.overlay,P=e.children,N=e.onVisibleChange,K=mr(e,o3),L=_e.useState(),Y=ht(L,2),V=Y[0],_=Y[1],q="visible"in e?B:V,U=_e.useRef(null),X=_e.useRef(null),ee=_e.useRef(null);_e.useImperativeHandle(t,function(){return U.current});var j=function(oe){_(oe),N==null||N(oe)};t3({visible:q,triggerRef:ee,onVisibleChange:j,autoFocus:z,overlayRef:X});var ie=function(oe){var Q=e.onOverlayClick;_(!1),Q&&Q(oe)},de=function(){return _e.createElement(r3,{ref:X,overlay:$,prefixCls:u,arrow:o})},pe=function(){return typeof $=="function"?de:de()},me=function(){var oe=e.minOverlayWidthMatchTrigger,Q=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?oe:!Q},we=function(){var oe=e.openClassName;return oe!==void 0?oe:"".concat(u,"-open")},Ie=_e.cloneElement(P,{className:tt((r=P.props)===null||r===void 0?void 0:r.className,q&&we()),ref:vs(P)?dp(ee,I0(P)):void 0}),Z=m;return!Z&&S.indexOf("contextMenu")!==-1&&(Z=["click"]),_e.createElement(fp,vt({builtinPlacements:y},K,{prefixCls:u,ref:U,popupClassName:tt(A,Ne({},"".concat(u,"-show-arrow"),o)),popupStyle:F,action:S,showAction:C,hideAction:Z,popupPlacement:v,popupAlign:d,popupTransitionName:l,popupAnimation:f,popupVisible:q,stretch:me()?"minWidth":"",popup:pe(),onPopupVisibleChange:j,onPopupClick:ie,getPopupContainer:x}),Ie)}const i3=_e.forwardRef(a3),s3=e=>typeof e!="object"&&typeof e!="function"||e===null;var Ap=D.createContext(null);function Bp(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Fp(e){var t=D.useContext(Ap);return Bp(t,e)}var l3=["children","locked"],Pn=D.createContext(null);function u3(e,t){var r=je({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function ti(e){var t=e.children,r=e.locked,n=mr(e,l3),o=D.useContext(Pn),a=P0(function(){return u3(o,n)},[o,n],function(u,l){return!r&&(u[0]!==l[0]||!Ao(u[1],l[1],!0))});return D.createElement(Pn.Provider,{value:a},t)}var c3=[],Np=D.createContext(null);function Gs(){return D.useContext(Np)}var $p=D.createContext(c3);function Ca(e){var t=D.useContext($p);return D.useMemo(function(){return e!==void 0?[].concat(Pt(t),[e]):t},[t,e])}var Tp=D.createContext(null),W0=D.createContext({});function rf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(hp(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),u=null;return o&&!Number.isNaN(a)?u=a:n&&u===null&&(u=0),n&&e.disabled&&(u=null),u!==null&&(u>=0||t&&u<0)}return!1}function d3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Pt(e.querySelectorAll("*")).filter(function(n){return rf(n,t)});return rf(e,t)&&r.unshift(e),r}var _u=Rr.LEFT,Lu=Rr.RIGHT,Hu=Rr.UP,ts=Rr.DOWN,rs=Rr.ENTER,Op=Rr.ESC,Ra=Rr.HOME,Ma=Rr.END,nf=[Hu,ts,_u,Lu];function f3(e,t,r,n){var o,a="prev",u="next",l="children",f="parent";if(e==="inline"&&n===rs)return{inlineTrigger:!0};var d=Ne(Ne({},Hu,a),ts,u),p=Ne(Ne(Ne(Ne({},_u,r?u:a),Lu,r?a:u),ts,l),rs,l),v=Ne(Ne(Ne(Ne(Ne(Ne({},Hu,a),ts,u),rs,l),Op,f),_u,r?l:f),Lu,r?f:l),g={inline:d,horizontal:p,vertical:v,inlineSub:d,horizontalSub:v,verticalSub:v},y=(o=g["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(y){case a:return{offset:-1,sibling:!0};case u:return{offset:1,sibling:!0};case f:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function h3(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function p3(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function V0(e,t){var r=d3(e,!0);return r.filter(function(n){return t.has(n)})}function of(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=V0(e,t),a=o.length,u=o.findIndex(function(l){return r===l});return n<0?u===-1?u=a-1:u-=1:n>0&&(u+=1),u=(u+a)%a,o[u]}var qu=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(u){var l=document.querySelector("[data-menu-id='".concat(Bp(r,u),"']"));l&&(n.add(l),a.set(l,u),o.set(u,l))}),{elements:n,key2element:o,element2key:a}};function m3(e,t,r,n,o,a,u,l,f,d){var p=D.useRef(),v=D.useRef();v.current=t;var g=function(){Sn.cancel(p.current)};return D.useEffect(function(){return function(){g()}},[]),function(y){var x=y.which;if([].concat(nf,[rs,Op,Ra,Ma]).includes(x)){var C=a(),m=qu(C,n),A=m,F=A.elements,B=A.key2element,R=A.element2key,S=B.get(t),z=p3(S,F),$=R.get(z),P=f3(e,u($,!0).length===1,r,x);if(!P&&x!==Ra&&x!==Ma)return;(nf.includes(x)||[Ra,Ma].includes(x))&&y.preventDefault();var N=function(X){if(X){var ee=X,j=X.querySelector("a");j!=null&&j.getAttribute("href")&&(ee=j);var ie=R.get(X);l(ie),g(),p.current=Sn(function(){v.current===ie&&ee.focus()})}};if([Ra,Ma].includes(x)||P.sibling||!z){var K;!z||e==="inline"?K=o.current:K=h3(z);var L,Y=V0(K,F);x===Ra?L=Y[0]:x===Ma?L=Y[Y.length-1]:L=of(K,F,z,P.offset),N(L)}else if(P.inlineTrigger)f($);else if(P.offset>0)f($,!0),g(),p.current=Sn(function(){m=qu(C,n);var U=z.getAttribute("aria-controls"),X=document.getElementById(U),ee=of(X,m.elements);N(ee)},5);else if(P.offset<0){var V=u($,!0),_=V[V.length-2],q=B.get(_);f(_,!1),N(q)}}d==null||d(y)}}function g3(e){Promise.resolve().then(e)}var U0="__RC_UTIL_PATH_SPLIT__",af=function(t){return t.join(U0)},v3=function(t){return t.split(U0)},Ku="rc-menu-more";function b3(){var e=D.useState({}),t=ht(e,2),r=t[1],n=Bt(new Map),o=Bt(new Map),a=D.useState([]),u=ht(a,2),l=u[0],f=u[1],d=Bt(0),p=Bt(!1),v=function(){p.current||r({})},g=St(function(B,R){var S=af(R);o.current.set(S,B),n.current.set(B,S),d.current+=1;var z=d.current;g3(function(){z===d.current&&v()})},[]),y=St(function(B,R){var S=af(R);o.current.delete(S),n.current.delete(B)},[]),x=St(function(B){f(B)},[]),C=St(function(B,R){var S=n.current.get(B)||"",z=v3(S);return R&&l.includes(z[0])&&z.unshift(Ku),z},[l]),m=St(function(B,R){return B.filter(function(S){return S!==void 0}).some(function(S){var z=C(S,!0);return z.includes(R)})},[C]),A=function(){var R=Pt(n.current.keys());return l.length&&R.push(Ku),R},F=St(function(B){var R="".concat(n.current.get(B)).concat(U0),S=new Set;return Pt(o.current.keys()).forEach(function(z){z.startsWith(R)&&S.add(o.current.get(z))}),S},[]);return D.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:g,unregisterPath:y,refreshOverflowKeys:x,isSubPathKey:m,getKeyPath:C,getKeys:A,getSubPathKeys:F}}function _a(e){var t=D.useRef(e);t.current=e;var r=D.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var y3=Math.random().toFixed(5).toString().slice(2),sf=0;function x3(e){var t=lo(e,{value:e}),r=ht(t,2),n=r[0],o=r[1];return D.useEffect(function(){sf+=1;var a="".concat(y3,"-").concat(sf);o("rc-menu-uuid-".concat(a))},[]),n}function Rp(e,t,r,n){var o=D.useContext(Pn),a=o.activeKey,u=o.onActive,l=o.onInactive,f={active:a===e};return t||(f.onMouseEnter=function(d){r==null||r({key:e,domEvent:d}),u(e)},f.onMouseLeave=function(d){n==null||n({key:e,domEvent:d}),l(e)}),f}function Mp(e){var t=D.useContext(Pn),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function Ip(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=D.createElement(t,je({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var w3=["item"];function Ss(e){var t=e.item,r=mr(e,w3);return Object.defineProperty(r,"item",{get:function(){return Xn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var C3=["title","attribute","elementRef"],D3=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],E3=["active"],k3=(function(e){mp(r,e);var t=gp(r);function r(){return vp(this,r),t.apply(this,arguments)}return bp(r,[{key:"render",value:function(){var o=this.props,a=o.title,u=o.attribute,l=o.elementRef,f=mr(o,C3),d=fo(f,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Xn(!u,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),D.createElement(Va.Item,vt({},u,{title:typeof a=="string"?a:void 0},d,{ref:l}))}}]),r})(D.Component),S3=D.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,u=e.itemIcon,l=e.children,f=e.role,d=e.onMouseEnter,p=e.onMouseLeave,v=e.onClick,g=e.onKeyDown,y=e.onFocus,x=mr(e,D3),C=Fp(o),m=D.useContext(Pn),A=m.prefixCls,F=m.onItemClick,B=m.disabled,R=m.overflowDisabled,S=m.itemIcon,z=m.selectedKeys,$=m.onActive,P=D.useContext(W0),N=P._internalRenderMenuItem,K="".concat(A,"-item"),L=D.useRef(),Y=D.useRef(),V=B||a,_=pp(t,Y),q=Ca(o),U=function(Q){return{key:o,keyPath:Pt(q).reverse(),item:L.current,domEvent:Q}},X=u||S,ee=Rp(o,V,d,p),j=ee.active,ie=mr(ee,E3),de=z.includes(o),pe=Mp(q.length),me=function(Q){if(!V){var le=U(Q);v==null||v(Ss(le)),F(le)}},we=function(Q){if(g==null||g(Q),Q.which===Rr.ENTER){var le=U(Q);v==null||v(Ss(le)),F(le)}},Ie=function(Q){$(o),y==null||y(Q)},Z={};e.role==="option"&&(Z["aria-selected"]=de);var ne=D.createElement(k3,vt({ref:L,elementRef:_,role:f===null?"none":f||"menuitem",tabIndex:a?null:-1,"data-menu-id":R&&C?null:C},fo(x,["extra"]),ie,Z,{component:"li","aria-disabled":a,style:je(je({},pe),r),className:tt(K,Ne(Ne(Ne({},"".concat(K,"-active"),j),"".concat(K,"-selected"),de),"".concat(K,"-disabled"),V),n),onClick:me,onKeyDown:we,onFocus:Ie}),l,D.createElement(Ip,{props:je(je({},e),{},{isSelected:de}),icon:X}));return N&&(ne=N(ne,e,{selected:de})),ne});function A3(e,t){var r=e.eventKey,n=Gs(),o=Ca(r);return D.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:D.createElement(S3,vt({},e,{ref:t}))}const Xs=D.forwardRef(A3);var B3=["className","children"],F3=function(t,r){var n=t.className,o=t.children,a=mr(t,B3),u=D.useContext(Pn),l=u.prefixCls,f=u.mode,d=u.rtl;return D.createElement("ul",vt({className:tt(l,d&&"".concat(l,"-rtl"),"".concat(l,"-sub"),"".concat(l,"-").concat(f==="inline"?"inline":"vertical"),n),role:"menu"},a,{"data-menu-list":!0,ref:r}),o)},G0=D.forwardRef(F3);G0.displayName="SubMenuList";function X0(e,t){return Ks(e).map(function(r,n){if(D.isValidElement(r)){var o,a,u=r.key,l=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:u,f=l==null;f&&(l="tmp_key-".concat([].concat(Pt(t),[n]).join("-")));var d={key:l,eventKey:l};return D.cloneElement(r,d)}return r})}var Yr={adjustX:1,adjustY:1},N3={topLeft:{points:["bl","tl"],overflow:Yr},topRight:{points:["br","tr"],overflow:Yr},bottomLeft:{points:["tl","bl"],overflow:Yr},bottomRight:{points:["tr","br"],overflow:Yr},leftTop:{points:["tr","tl"],overflow:Yr},leftBottom:{points:["br","bl"],overflow:Yr},rightTop:{points:["tl","tr"],overflow:Yr},rightBottom:{points:["bl","br"],overflow:Yr}},$3={topLeft:{points:["bl","tl"],overflow:Yr},topRight:{points:["br","tr"],overflow:Yr},bottomLeft:{points:["tl","bl"],overflow:Yr},bottomRight:{points:["tr","br"],overflow:Yr},rightTop:{points:["tr","tl"],overflow:Yr},rightBottom:{points:["br","bl"],overflow:Yr},leftTop:{points:["tl","tr"],overflow:Yr},leftBottom:{points:["bl","br"],overflow:Yr}};function Pp(e,t,r){if(t)return t;if(r)return r[e]||r.other}var T3={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function O3(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,u=e.popupClassName,l=e.popupOffset,f=e.disabled,d=e.mode,p=e.onVisibleChange,v=D.useContext(Pn),g=v.getPopupContainer,y=v.rtl,x=v.subMenuOpenDelay,C=v.subMenuCloseDelay,m=v.builtinPlacements,A=v.triggerSubMenuAction,F=v.forceSubMenuRender,B=v.rootClassName,R=v.motion,S=v.defaultMotions,z=D.useState(!1),$=ht(z,2),P=$[0],N=$[1],K=y?je(je({},$3),m):je(je({},N3),m),L=T3[d],Y=Pp(d,R,S),V=D.useRef(Y);d!=="inline"&&(V.current=Y);var _=je(je({},V.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),q=D.useRef();return D.useEffect(function(){return q.current=Sn(function(){N(r)}),function(){Sn.cancel(q.current)}},[r]),D.createElement(fp,{prefixCls:t,popupClassName:tt("".concat(t,"-popup"),Ne({},"".concat(t,"-rtl"),y),u,B),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:K,popupPlacement:L,popupVisible:P,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:f?[]:[A],mouseEnterDelay:x,mouseLeaveDelay:C,onPopupVisibleChange:p,forceRender:F,popupMotion:_,fresh:!0},n)}function R3(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",u=D.useContext(Pn),l=u.prefixCls,f=u.forceSubMenuRender,d=u.motion,p=u.defaultMotions,v=u.mode,g=D.useRef(!1);g.current=v===a;var y=D.useState(!g.current),x=ht(y,2),C=x[0],m=x[1],A=g.current?r:!1;D.useEffect(function(){g.current&&m(!1)},[v]);var F=je({},Pp(a,d,p));n.length>1&&(F.motionAppear=!1);var B=F.onVisibleChanged;return F.onVisibleChanged=function(R){return!g.current&&!R&&m(!0),B==null?void 0:B(R)},C?null:D.createElement(ti,{mode:a,locked:!g.current},D.createElement(z0,vt({visible:A},F,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(R){var S=R.className,z=R.style;return D.createElement(G0,{id:t,className:S,style:z},o)}))}var M3=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],I3=["active"],P3=D.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var u=e.disabled,l=e.internalPopupClose,f=e.children,d=e.itemIcon,p=e.expandIcon,v=e.popupClassName,g=e.popupOffset,y=e.popupStyle,x=e.onClick,C=e.onMouseEnter,m=e.onMouseLeave,A=e.onTitleClick,F=e.onTitleMouseEnter,B=e.onTitleMouseLeave,R=mr(e,M3),S=Fp(a),z=D.useContext(Pn),$=z.prefixCls,P=z.mode,N=z.openKeys,K=z.disabled,L=z.overflowDisabled,Y=z.activeKey,V=z.selectedKeys,_=z.itemIcon,q=z.expandIcon,U=z.onItemClick,X=z.onOpenChange,ee=z.onActive,j=D.useContext(W0),ie=j._internalRenderSubMenuItem,de=D.useContext(Tp),pe=de.isSubPathKey,me=Ca(),we="".concat($,"-submenu"),Ie=K||u,Z=D.useRef(),ne=D.useRef(),oe=d??_,Q=p??q,le=N.includes(a),ge=!L&&le,he=pe(V,a),ke=Rp(a,Ie,F,B),Ce=ke.active,xe=mr(ke,I3),Ae=D.useState(!1),$e=ht(Ae,2),He=$e[0],pt=$e[1],it=function(Ct){Ie||pt(Ct)},Oe=function(Ct){it(!0),C==null||C({key:a,domEvent:Ct})},Le=function(Ct){it(!1),m==null||m({key:a,domEvent:Ct})},Ke=D.useMemo(function(){return Ce||(P!=="inline"?He||pe([Y],a):!1)},[P,Ce,Y,He,a,pe]),st=Mp(me.length),Ze=function(Ct){Ie||(A==null||A({key:a,domEvent:Ct}),P==="inline"&&X(a,!le))},Qe=_a(function(Nt){x==null||x(Ss(Nt)),U(Nt)}),$t=function(Ct){P!=="inline"&&X(a,Ct)},wt=function(){ee(a)},nt=S&&"".concat(S,"-popup"),kt=D.useMemo(function(){return D.createElement(Ip,{icon:P!=="horizontal"?Q:void 0,props:je(je({},e),{},{isOpen:ge,isSubMenu:!0})},D.createElement("i",{className:"".concat(we,"-arrow")}))},[P,Q,e,ge,we]),ze=D.createElement("div",vt({role:"menuitem",style:st,className:"".concat(we,"-title"),tabIndex:Ie?null:-1,ref:Z,title:typeof o=="string"?o:null,"data-menu-id":L&&S?null:S,"aria-expanded":ge,"aria-haspopup":!0,"aria-controls":nt,"aria-disabled":Ie,onClick:Ze,onFocus:wt},xe),o,kt),ce=D.useRef(P);if(P!=="inline"&&me.length>1?ce.current="vertical":ce.current=P,!L){var mt=ce.current;ze=D.createElement(O3,{mode:mt,prefixCls:we,visible:!l&&ge&&P!=="inline",popupClassName:v,popupOffset:g,popupStyle:y,popup:D.createElement(ti,{mode:mt==="horizontal"?"vertical":mt},D.createElement(G0,{id:nt,ref:ne},f)),disabled:Ie,onVisibleChange:$t},ze)}var At=D.createElement(Va.Item,vt({ref:t,role:"none"},R,{component:"li",style:r,className:tt(we,"".concat(we,"-").concat(P),n,Ne(Ne(Ne(Ne({},"".concat(we,"-open"),ge),"".concat(we,"-active"),Ke),"".concat(we,"-selected"),he),"".concat(we,"-disabled"),Ie)),onMouseEnter:Oe,onMouseLeave:Le}),ze,!L&&D.createElement(R3,{id:nt,open:ge,keyPath:me},f));return ie&&(At=ie(At,e,{selected:he,active:Ke,open:ge,disabled:Ie})),D.createElement(ti,{onItemClick:Qe,mode:P==="horizontal"?"vertical":P,itemIcon:oe,expandIcon:Q},At)}),Ys=D.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Ca(r),a=X0(n,o),u=Gs();D.useEffect(function(){if(u)return u.registerPath(r,o),function(){u.unregisterPath(r,o)}},[o]);var l;return u?l=a:l=D.createElement(P3,vt({ref:t},e),a),D.createElement($p.Provider,{value:o},l)});function Y0(e){var t=e.className,r=e.style,n=D.useContext(Pn),o=n.prefixCls,a=Gs();return a?null:D.createElement("li",{role:"separator",className:tt("".concat(o,"-item-divider"),t),style:r})}var z3=["className","title","eventKey","children"],j3=D.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=mr(e,z3),u=D.useContext(Pn),l=u.prefixCls,f="".concat(l,"-item-group");return D.createElement("li",vt({ref:t,role:"presentation"},a,{onClick:function(p){return p.stopPropagation()},className:tt(f,r)}),D.createElement("div",{role:"presentation",className:"".concat(f,"-title"),title:typeof n=="string"?n:void 0},n),D.createElement("ul",{role:"group",className:"".concat(f,"-list")},o))}),J0=D.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=Ca(r),a=X0(n,o),u=Gs();return u?a:D.createElement(j3,vt({ref:t},fo(e,["warnKey"])),a)}),_3=["label","children","key","type","extra"];function Wu(e,t,r){var n=t.item,o=t.group,a=t.submenu,u=t.divider;return(e||[]).map(function(l,f){if(l&&xn(l)==="object"){var d=l,p=d.label,v=d.children,g=d.key,y=d.type,x=d.extra,C=mr(d,_3),m=g??"tmp-".concat(f);return v||y==="group"?y==="group"?D.createElement(o,vt({key:m},C,{title:p}),Wu(v,t,r)):D.createElement(a,vt({key:m},C,{title:p}),Wu(v,t,r)):y==="divider"?D.createElement(u,vt({key:m},C)):D.createElement(n,vt({key:m},C,{extra:x}),p,(!!x||x===0)&&D.createElement("span",{className:"".concat(r,"-item-extra")},x))}return null}).filter(function(l){return l})}function lf(e,t,r,n,o){var a=e,u=je({divider:Y0,item:Xs,group:J0,submenu:Ys},n);return t&&(a=Wu(t,u,o)),X0(a,r)}var L3=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Mo=[],H3=D.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,u=n.rootClassName,l=n.style,f=n.className,d=n.tabIndex,p=d===void 0?0:d,v=n.items,g=n.children,y=n.direction,x=n.id,C=n.mode,m=C===void 0?"vertical":C,A=n.inlineCollapsed,F=n.disabled,B=n.disabledOverflow,R=n.subMenuOpenDelay,S=R===void 0?.1:R,z=n.subMenuCloseDelay,$=z===void 0?.1:z,P=n.forceSubMenuRender,N=n.defaultOpenKeys,K=n.openKeys,L=n.activeKey,Y=n.defaultActiveFirst,V=n.selectable,_=V===void 0?!0:V,q=n.multiple,U=q===void 0?!1:q,X=n.defaultSelectedKeys,ee=n.selectedKeys,j=n.onSelect,ie=n.onDeselect,de=n.inlineIndent,pe=de===void 0?24:de,me=n.motion,we=n.defaultMotions,Ie=n.triggerSubMenuAction,Z=Ie===void 0?"hover":Ie,ne=n.builtinPlacements,oe=n.itemIcon,Q=n.expandIcon,le=n.overflowedIndicator,ge=le===void 0?"...":le,he=n.overflowedIndicatorPopupClassName,ke=n.getPopupContainer,Ce=n.onClick,xe=n.onOpenChange,Ae=n.onKeyDown;n.openAnimation,n.openTransitionName;var $e=n._internalRenderMenuItem,He=n._internalRenderSubMenuItem,pt=n._internalComponents,it=mr(n,L3),Oe=D.useMemo(function(){return[lf(g,v,Mo,pt,a),lf(g,v,Mo,{},a)]},[g,v,pt]),Le=ht(Oe,2),Ke=Le[0],st=Le[1],Ze=D.useState(!1),Qe=ht(Ze,2),$t=Qe[0],wt=Qe[1],nt=D.useRef(),kt=x3(x),ze=y==="rtl",ce=lo(N,{value:K,postState:function(er){return er||Mo}}),mt=ht(ce,2),At=mt[0],Nt=mt[1],Ct=function(er){var cr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function qr(){Nt(er),xe==null||xe(er)}cr?o4(qr):qr()},nr=D.useState(At),Dt=ht(nr,2),zt=Dt[0],Qt=Dt[1],lr=D.useRef(!1),dt=D.useMemo(function(){return(m==="inline"||m==="vertical")&&A?["vertical",A]:[m,!1]},[m,A]),Xt=ht(dt,2),Yt=Xt[0],Gr=Xt[1],Mr=Yt==="inline",Ir=D.useState(Yt),Pr=ht(Ir,2),gr=Pr[0],or=Pr[1],Ht=D.useState(Gr),w=ht(Ht,2),E=w[0],Me=w[1];D.useEffect(function(){or(Yt),Me(Gr),lr.current&&(Mr?Nt(zt):Ct(Mo))},[Yt,Gr]);var O=D.useState(0),te=ht(O,2),qt=te[0],Pe=te[1],bt=qt>=Ke.length-1||gr!=="horizontal"||B;D.useEffect(function(){Mr&&Qt(At)},[At]),D.useEffect(function(){return lr.current=!0,function(){lr.current=!1}},[]);var xt=b3(),et=xt.registerPath,Ot=xt.unregisterPath,ar=xt.refreshOverflowKeys,Br=xt.isSubPathKey,re=xt.getKeyPath,vr=xt.getKeys,I=xt.getSubPathKeys,Re=D.useMemo(function(){return{registerPath:et,unregisterPath:Ot}},[et,Ot]),at=D.useMemo(function(){return{isSubPathKey:Br}},[Br]);D.useEffect(function(){ar(bt?Mo:Ke.slice(qt+1).map(function(br){return br.key}))},[qt,bt]);var We=lo(L||Y&&((r=Ke[0])===null||r===void 0?void 0:r.key),{value:L}),ye=ht(We,2),Be=ye[0],Ve=ye[1],ct=_a(function(br){Ve(br)}),ue=_a(function(){Ve(void 0)});M0(t,function(){return{list:nt.current,focus:function(er){var cr,qr=vr(),zr=qu(qr,kt),Yn=zr.elements,Ro=zr.key2element,Jn=zr.element2key,Zn=V0(nt.current,Yn),mo=Be??(Zn[0]?Jn.get(Zn[0]):(cr=Ke.find(function(Fn){return!Fn.props.disabled}))===null||cr===void 0?void 0:cr.key),ve=Ro.get(mo);if(mo&&ve){var dr;ve==null||(dr=ve.focus)===null||dr===void 0||dr.call(ve,er)}}}});var Ee=lo(X||[],{value:ee,postState:function(er){return Array.isArray(er)?er:er==null?Mo:[er]}}),De=ht(Ee,2),Ye=De[0],lt=De[1],Vt=function(er){if(_){var cr=er.key,qr=Ye.includes(cr),zr;U?qr?zr=Ye.filter(function(Ro){return Ro!==cr}):zr=[].concat(Pt(Ye),[cr]):zr=[cr],lt(zr);var Yn=je(je({},er),{},{selectedKeys:zr});qr?ie==null||ie(Yn):j==null||j(Yn)}!U&&At.length&&gr!=="inline"&&Ct(Mo)},Rt=_a(function(br){Ce==null||Ce(Ss(br)),Vt(br)}),ut=_a(function(br,er){var cr=At.filter(function(zr){return zr!==br});if(er)cr.push(br);else if(gr!=="inline"){var qr=I(br);cr=cr.filter(function(zr){return!qr.has(zr)})}Ao(At,cr,!0)||Ct(cr,!0)}),_t=function(er,cr){var qr=cr??!At.includes(er);ut(er,qr)},un=m3(gr,Be,ze,kt,nt,vr,re,Ve,_t,Ae);D.useEffect(function(){wt(!0)},[]);var wn=D.useMemo(function(){return{_internalRenderMenuItem:$e,_internalRenderSubMenuItem:He}},[$e,He]),Fr=gr!=="horizontal"||B?Ke:Ke.map(function(br,er){return D.createElement(ti,{key:br.key,overflowDisabled:er>qt},br)}),zn=D.createElement(Va,vt({id:x,ref:nt,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:Xs,className:tt(a,"".concat(a,"-root"),"".concat(a,"-").concat(gr),f,Ne(Ne({},"".concat(a,"-inline-collapsed"),E),"".concat(a,"-rtl"),ze),u),dir:y,style:l,role:"menu",tabIndex:p,data:Fr,renderRawItem:function(er){return er},renderRawRest:function(er){var cr=er.length,qr=cr?Ke.slice(-cr):null;return D.createElement(Ys,{eventKey:Ku,title:ge,disabled:bt,internalPopupClose:cr===0,popupClassName:he},qr)},maxCount:gr!=="horizontal"||B?Va.INVALIDATE:Va.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(er){Pe(er)},onKeyDown:un},it));return D.createElement(W0.Provider,{value:wn},D.createElement(Ap.Provider,{value:kt},D.createElement(ti,{prefixCls:a,rootClassName:u,mode:gr,openKeys:At,rtl:ze,disabled:F,motion:$t?me:null,defaultMotions:$t?we:null,activeKey:Be,onActive:ct,onInactive:ue,selectedKeys:Ye,inlineIndent:pe,subMenuOpenDelay:S,subMenuCloseDelay:$,forceSubMenuRender:P,builtinPlacements:ne,triggerSubMenuAction:Z,getPopupContainer:ke,itemIcon:oe,expandIcon:Q,onItemClick:Rt,onOpenChange:ut},D.createElement(Tp.Provider,{value:at},zn),D.createElement("div",{style:{display:"none"},"aria-hidden":!0},D.createElement(Np.Provider,{value:Re},st)))))}),yi=H3;yi.Item=Xs;yi.SubMenu=Ys;yi.ItemGroup=J0;yi.Divider=Y0;const zp=D.createContext({});var q3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},K3=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:q3}))},jp=D.forwardRef(K3);const As=co({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var W3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const _p=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=W3(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=D.useContext(ho),u=a("menu",t),l=tt({[`${u}-item-divider-dashed`]:!!n},r);return D.createElement(Y0,Object.assign({className:l},o))},Lp=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:u,extra:l}=e,{prefixCls:f,firstLevel:d,direction:p,disableMenuItemTitleTooltip:v,inlineCollapsed:g}=D.useContext(As),y=B=>{const R=n==null?void 0:n[0],S=D.createElement("span",{className:tt(`${f}-title-content`,{[`${f}-title-content-with-extra`]:!!l||l===0})},n);return(!o||D.isValidElement(n)&&n.type==="span")&&n&&B&&d&&typeof R=="string"?D.createElement("div",{className:`${f}-inline-collapsed-noicon`},R.charAt(0)):S},{siderCollapsed:x}=D.useContext(zp);let C=a;typeof a>"u"?C=d?n:"":a===!1&&(C="");const m={title:C};!x&&!g&&(m.title=null,m.open=!1);const A=Ks(n).length;let F=D.createElement(Xs,Object.assign({},fo(e,["title","icon","danger"]),{className:tt({[`${f}-item-danger`]:u,[`${f}-item-only-child`]:(o?A+1:A)===1},r),title:typeof a=="string"?a:void 0}),ha(o,{className:tt(D.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${f}-item-icon`)}),y(g));return v||(F=D.createElement(bs,Object.assign({},m,{placement:p==="rtl"?"left":"right",classNames:{root:`${f}-inline-collapsed-tooltip`}}),F)),F};var V3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Bs=D.createContext(null),Hp=D.forwardRef((e,t)=>{const{children:r}=e,n=V3(e,["children"]),o=D.useContext(Bs),a=D.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),u=l4(r),l=pp(t,u?I0(r):null);return D.createElement(Bs.Provider,{value:a},D.createElement(u4,{space:!0},u?D.cloneElement(r,{ref:l}):r))}),U3=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:u,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${Xe(a)} ${u} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
|
|
2
|
+
> ${t}-item-active,
|
|
3
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},G3=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Xe(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Xe(t)})`}}}}),uf=e=>yp(e),cf=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:u,itemBg:l,subMenuItemBg:f,itemSelectedBg:d,activeBarHeight:p,activeBarWidth:v,activeBarBorderWidth:g,motionDurationSlow:y,motionEaseInOut:x,motionEaseOut:C,itemPaddingInline:m,motionDurationMid:A,itemHoverColor:F,lineType:B,colorSplit:R,itemDisabledColor:S,dangerItemColor:z,dangerItemHoverColor:$,dangerItemSelectedColor:P,dangerItemActiveBg:N,dangerItemSelectedBg:K,popupBg:L,itemHoverBg:Y,itemActiveBg:V,menuSubMenuBg:_,horizontalItemSelectedColor:q,horizontalItemSelectedBg:U,horizontalItemBorderRadius:X,horizontalItemHoverBg:ee}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},uf(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:u}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},uf(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${S} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:F}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:Y},"&:active":{backgroundColor:V}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:Y},"&:active":{backgroundColor:V}}},[`${r}-item-danger`]:{color:z,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:$}},[`&${r}-item:active`]:{background:N}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:P},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:K}},[`&${r}-submenu > ${r}`]:{backgroundColor:_},[`&${r}-popup > ${r}`]:{backgroundColor:L},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:L},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:X,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${Xe(p)} solid transparent`,transition:`border-color ${y} ${x}`,content:'""'},"&:hover, &-active, &-open":{background:ee,"&::after":{borderBottomWidth:p,borderBottomColor:q}},"&-selected":{color:q,backgroundColor:U,"&:hover":{backgroundColor:U},"&::after":{borderBottomWidth:p,borderBottomColor:q}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${Xe(g)} ${B} ${R}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:f},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Xe(v)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${A} ${C}`,`opacity ${A} ${C}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:P}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${A} ${x}`,`opacity ${A} ${x}`].join(",")}}}}}},df=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:u,itemMarginBlock:l,itemWidth:f,itemPaddingInline:d}=e,p=e.calc(a).add(o).add(u).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:Xe(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:f},[`> ${t}-item,
|
|
5
|
+
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:Xe(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
+
${t}-submenu-title`]:{paddingInlineEnd:p}}},X3=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:u,motionEaseOut:l,paddingXL:f,itemMarginInline:d,fontSizeLG:p,motionDurationFast:v,motionDurationSlow:g,paddingXS:y,boxShadowSecondary:x,collapsedWidth:C,collapsedIconSize:m}=e,A={height:n,lineHeight:Xe(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},df(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},df(e)),{boxShadow:x})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${Xe(e.calc(u).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background ${g}`,`padding ${v} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:A,[`& ${t}-item-group-title`]:{paddingInlineStart:f}},[`${t}-item`]:A}},{[`${t}-inline-collapsed`]:{width:C,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:p,textAlign:"center"}}},[`> ${t}-item,
|
|
7
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
8
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
9
|
+
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Xe(e.calc(m).div(2).equal())} - ${Xe(d)})`,textOverflow:"clip",[`
|
|
10
|
+
${t}-submenu-arrow,
|
|
11
|
+
${t}-submenu-expand-icon
|
|
12
|
+
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:Xe(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},j0),{paddingInline:y})}}]},ff=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:u,iconSize:l,iconMarginInlineEnd:f}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${u}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:f,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},c4()),[`&${t}-item-only-child`]:{[`> ${u}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},hf=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:u}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${Xe(e.calc(u).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Xe(u)})`}}}}},Y3=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:u,paddingXS:l,padding:f,colorSplit:d,lineWidth:p,zIndexPopup:v,borderRadiusLG:g,subMenuItemBorderRadius:y,menuArrowSize:x,menuArrowOffset:C,lineType:m,groupTitleLineHeight:A,groupTitleFontSize:F}=e;return[{"":{[r]:Object.assign(Object.assign({},zu()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},vi(e)),zu()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${Xe(l)} ${Xe(f)}`,fontSize:F,lineHeight:A,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${u}`,`background ${o} ${u}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${u}`,`background ${o} ${u}`,`padding ${a} ${u}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${u}`,`padding ${o} ${u}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:m,borderWidth:0,borderTopWidth:p,marginBlock:p,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ff(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${Xe(e.calc(n).mul(2).equal())} ${Xe(f)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:v,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},ff(e)),hf(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:y},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${u}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),hf(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
13
|
+
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Xe(C)})`},"&::after":{transform:`rotate(45deg) translateX(${Xe(e.calc(C).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${Xe(e.calc(x).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Xe(e.calc(C).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Xe(C)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},J3=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:u,colorErrorBg:l,colorText:f,colorTextDescription:d,colorBgContainer:p,colorFillAlter:v,colorFillContent:g,lineWidth:y,lineWidthBold:x,controlItemBgActive:C,colorBgTextHover:m,controlHeightLG:A,lineHeight:F,colorBgElevated:B,marginXXS:R,padding:S,fontSize:z,controlHeightSM:$,fontSizeLG:P,colorTextLightSolid:N,colorErrorHover:K}=e,L=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,Y=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:y,V=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,_=new pn(N).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:f,itemColor:f,colorItemTextHover:f,itemHoverColor:f,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:p,itemBg:p,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:g,itemActiveBg:C,colorSubItemBg:v,subMenuItemBg:v,colorItemBgSelected:C,itemSelectedBg:C,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:L,colorActiveBarHeight:x,activeBarHeight:x,colorActiveBarBorderSize:y,activeBarBorderWidth:Y,colorItemTextDisabled:u,itemDisabledColor:u,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:V,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:A,groupTitleLineHeight:F,collapsedWidth:A*2,popupBg:B,itemMarginBlock:R,itemPaddingInline:S,horizontalLineHeight:`${A*1.15}px`,iconSize:z,iconMarginInlineEnd:$-z,collapsedIconSize:P,groupTitleFontSize:z,darkItemDisabledColor:new pn(N).setA(.25).toRgbString(),darkItemColor:_,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:N,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:_,darkItemHoverColor:N,darkDangerItemHoverColor:K,darkDangerItemSelectedColor:N,darkDangerItemActiveBg:a,itemWidth:L?`calc(100% + ${Y}px)`:`calc(100% - ${V*2}px)`}},Z3=(e,t=e,r=!0)=>gi("Menu",o=>{const{colorBgElevated:a,controlHeightLG:u,fontSize:l,darkItemColor:f,darkDangerItemColor:d,darkItemBg:p,darkSubMenuItemBg:v,darkItemSelectedColor:g,darkItemSelectedBg:y,darkDangerItemSelectedBg:x,darkItemHoverBg:C,darkGroupTitleColor:m,darkItemHoverColor:A,darkItemDisabledColor:F,darkDangerItemHoverColor:B,darkDangerItemSelectedColor:R,darkDangerItemActiveBg:S,popupBg:z,darkPopupBg:$}=o,P=o.calc(l).div(7).mul(5).equal(),N=Wo(o,{menuArrowSize:P,menuHorizontalHeight:o.calc(u).mul(1.15).equal(),menuArrowOffset:o.calc(P).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:z}),K=Wo(N,{itemColor:f,itemHoverColor:A,groupTitleColor:m,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:p,popupBg:$,subMenuItemBg:v,itemActiveBg:"transparent",itemSelectedBg:y,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:C,itemDisabledColor:F,dangerItemColor:d,dangerItemHoverColor:B,dangerItemSelectedColor:R,dangerItemActiveBg:S,dangerItemSelectedBg:x,menuSubMenuBg:v,horizontalItemSelectedColor:g,horizontalItemSelectedBg:y});return[Y3(N),U3(N),X3(N),cf(N,"light"),cf(K,"dark"),G3(N),xp(N),ys(N,"slide-up"),ys(N,"slide-down"),_0(N,"zoom-big")]},J3,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),qp=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,u=D.useContext(As),{prefixCls:l,inlineCollapsed:f,theme:d}=u,p=Ca();let v;if(!n)v=f&&!p.length&&o&&typeof o=="string"?D.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):D.createElement("span",{className:`${l}-title-content`},o);else{const x=D.isValidElement(o)&&o.type==="span";v=D.createElement(D.Fragment,null,ha(n,{className:tt(D.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),x?o:D.createElement("span",{className:`${l}-title-content`},o))}const g=D.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[y]=Ws("Menu");return D.createElement(As.Provider,{value:g},D.createElement(Ys,Object.assign({},fo(e,["icon"]),{title:v,popupClassName:tt(l,r,`${l}-${a||d}`),popupStyle:Object.assign({zIndex:y},e.popupStyle)})))};var Q3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Ul(e){return e===null||e===!1}const ev={item:Lp,submenu:qp,divider:_p},tv=$o((e,t)=>{var r;const n=D.useContext(Bs),o=n||{},{getPrefixCls:a,getPopupContainer:u,direction:l,menu:f}=D.useContext(ho),d=a(),{prefixCls:p,className:v,style:g,theme:y="light",expandIcon:x,_internalDisableMenuItemTitleTooltip:C,inlineCollapsed:m,siderCollapsed:A,rootClassName:F,mode:B,selectable:R,onClick:S,overflowedIndicatorPopupClassName:z}=e,$=Q3(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),P=fo($,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:B});const N=In((...pe)=>{var me;S==null||S.apply(void 0,pe),(me=o.onClick)===null||me===void 0||me.call(o)}),K=o.mode||B,L=R??o.selectable,Y=m??A,V={horizontal:{motionName:`${d}-slide-up`},inline:wp(d),other:{motionName:`${d}-zoom-big`}},_=a("menu",p||o.prefixCls),q=bi(_),[U,X,ee]=Z3(_,q,!n),j=tt(`${_}-${y}`,f==null?void 0:f.className,v),ie=D.useMemo(()=>{var pe,me;if(typeof x=="function"||Ul(x))return x||null;if(typeof o.expandIcon=="function"||Ul(o.expandIcon))return o.expandIcon||null;if(typeof(f==null?void 0:f.expandIcon)=="function"||Ul(f==null?void 0:f.expandIcon))return(f==null?void 0:f.expandIcon)||null;const we=(pe=x??(o==null?void 0:o.expandIcon))!==null&&pe!==void 0?pe:f==null?void 0:f.expandIcon;return ha(we,{className:tt(`${_}-submenu-expand-icon`,D.isValidElement(we)?(me=we.props)===null||me===void 0?void 0:me.className:void 0)})},[x,o==null?void 0:o.expandIcon,f==null?void 0:f.expandIcon,_]),de=D.useMemo(()=>({prefixCls:_,inlineCollapsed:Y||!1,direction:l,firstLevel:!0,theme:y,mode:K,disableMenuItemTitleTooltip:C}),[_,Y,l,C,y]);return U(D.createElement(Bs.Provider,{value:null},D.createElement(As.Provider,{value:de},D.createElement(yi,Object.assign({getPopupContainer:u,overflowedIndicator:D.createElement(jp,null),overflowedIndicatorPopupClassName:tt(_,`${_}-${y}`,z),mode:K,selectable:L,onClick:N},P,{inlineCollapsed:Y,style:Object.assign(Object.assign({},f==null?void 0:f.style),g),className:j,prefixCls:_,direction:l,defaultMotions:V,expandIcon:ie,ref:t,rootClassName:tt(F,X,o.rootClassName,ee,q),_internalComponents:ev})))))}),Da=$o((e,t)=>{const r=Bt(null),n=D.useContext(zp);return M0(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),D.createElement(tv,Object.assign({ref:r},e,n))});Da.Item=Lp;Da.SubMenu=qp;Da.Divider=_p;Da.ItemGroup=J0;const rv=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},nv=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:u,iconCls:l,motionDurationMid:f,paddingBlock:d,fontSize:p,dropdownEdgeChildPadding:v,colorTextDisabled:g,fontSizeIcon:y,controlPaddingHorizontal:x,colorBgElevated:C}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${u}-btn`]:{[`& > ${l}-down, & > ${u}-btn-icon > ${l}-down`]:{fontSize:y}},[`${t}-wrap`]:{position:"relative",[`${u}-btn > ${l}-down`]:{fontSize:y},[`${l}-down::before`]:{transition:`transform ${f}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
|
+
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
|
+
&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottom,
|
|
16
|
+
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottom,
|
|
17
|
+
&${u}-slide-down-enter${u}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
+
&${u}-slide-down-appear${u}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:p4},[`&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
|
+
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
|
+
&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-top,
|
|
21
|
+
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-top,
|
|
22
|
+
&${u}-slide-up-enter${u}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
+
&${u}-slide-up-appear${u}-slide-up-appear-active${t}-placement-topRight`]:{animationName:h4},[`&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
|
+
&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
+
&${u}-slide-down-leave${u}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:f4},[`&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
|
+
&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-top,
|
|
27
|
+
&${u}-slide-up-leave${u}-slide-up-leave-active${t}-placement-topRight`]:{animationName:d4}}},m4(e,C,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},vi(e)),{[r]:Object.assign(Object.assign({padding:v,listStyleType:"none",backgroundColor:C,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Jd(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${Xe(d)} ${Xe(x)}`,color:e.colorTextDescription,transition:`all ${f}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:p,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${f}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${Xe(d)} ${Xe(x)}`,color:e.colorText,fontWeight:"normal",fontSize:p,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${f}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Jd(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:C,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Xe(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:y,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${Xe(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(x).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:C,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[ys(e,"slide-up"),ys(e,"slide-down"),Yd(e,"move-up"),Yd(e,"move-down"),_0(e,"zoom-big")]]},ov=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},g4({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),v4(e)),av=gi("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=Wo(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[nv(a),rv(a)]},ov,{resetStyle:!1}),Js=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:u,disabled:l,dropdownRender:f,popupRender:d,getPopupContainer:p,overlayClassName:v,rootClassName:g,overlayStyle:y,open:x,onOpenChange:C,visible:m,onVisibleChange:A,mouseEnterDelay:F=.15,mouseLeaveDelay:B=.1,autoAdjustOverflow:R=!0,placement:S="",overlay:z,transitionName:$,destroyOnHidden:P,destroyPopupOnHide:N}=e,{getPopupContainer:K,getPrefixCls:L,direction:Y,dropdown:V}=D.useContext(ho),_=d||f;Vs();const q=D.useMemo(()=>{const $e=L();return $!==void 0?$:S.includes("top")?`${$e}-slide-down`:`${$e}-slide-up`},[L,S,$]),U=D.useMemo(()=>S?S.includes("Center")?S.slice(0,S.indexOf("Center")):S:Y==="rtl"?"bottomRight":"bottomLeft",[S,Y]),X=L("dropdown",o),ee=bi(X),[j,ie,de]=av(X,ee),[,pe]=L0(),me=D.Children.only(s3(a)?D.createElement("span",null,a):a),we=ha(me,{className:tt(`${X}-trigger`,{[`${X}-rtl`]:Y==="rtl"},me.props.className),disabled:(t=me.props.disabled)!==null&&t!==void 0?t:l}),Ie=l?[]:u,Z=!!(Ie!=null&&Ie.includes("contextMenu")),[ne,oe]=lo(!1,{value:x??m}),Q=In($e=>{C==null||C($e,{source:"trigger"}),A==null||A($e),oe($e)}),le=tt(v,g,ie,de,ee,V==null?void 0:V.className,{[`${X}-rtl`]:Y==="rtl"}),ge=b4({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:R,offset:pe.marginXXS,arrowWidth:n?pe.sizePopupArrow:0,borderRadius:pe.borderRadius}),he=In(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(C==null||C(!1,{source:"menu"}),oe(!1))}),ke=()=>{let $e;return r!=null&&r.items?$e=D.createElement(Da,Object.assign({},r)):typeof z=="function"?$e=z():$e=z,_&&($e=_($e)),$e=D.Children.only(typeof $e=="string"?D.createElement("span",null,$e):$e),D.createElement(Hp,{prefixCls:`${X}-menu`,rootClassName:tt(de,ee),expandIcon:D.createElement("span",{className:`${X}-menu-submenu-arrow`},Y==="rtl"?D.createElement(Es,{className:`${X}-menu-submenu-arrow-icon`}):D.createElement(ks,{className:`${X}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:he,validator:({mode:He})=>{}},$e)},[Ce,xe]=Ws("Dropdown",y==null?void 0:y.zIndex);let Ae=D.createElement(i3,Object.assign({alignPoint:Z},fo(e,["rootClassName"]),{mouseEnterDelay:F,mouseLeaveDelay:B,visible:ne,builtinPlacements:ge,arrow:!!n,overlayClassName:le,prefixCls:X,getPopupContainer:p||K,transitionName:q,trigger:Ie,overlay:ke,placement:U,onVisibleChange:Q,overlayStyle:Object.assign(Object.assign(Object.assign({},V==null?void 0:V.style),y),{zIndex:Ce}),autoDestroy:P??N}),we);return Ce&&(Ae=D.createElement(y4.Provider,{value:xe},Ae)),j(Ae)},iv=x4(Js,"align",void 0,"dropdown",e=>e),sv=e=>D.createElement(iv,Object.assign({},e),D.createElement("span",null));Js._InternalPanelDoNotUseOrYouWillBeFired=sv;function hn(e,t){return e[t]}var lv=["children"];function Kp(e,t){return"".concat(e,"-").concat(t)}function uv(e){return e&&e.type&&e.type.isTreeNode}function xi(e,t){return e??t}function pa(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,u=r||"title";return{title:u,_title:n||[u],key:o||"key",children:a||"children"}}function Wp(e){function t(r){var n=Ks(r);return n.map(function(o){if(!uv(o))return Xn(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,u=o.props,l=u.children,f=mr(u,lv),d=je({key:a},f),p=t(l);return p.length&&(d.children=p),d}).filter(function(o){return o})}return t(e)}function Gl(e,t,r){var n=pa(r),o=n._title,a=n.key,u=n.children,l=new Set(t===!0?[]:t),f=[];function d(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(g,y){for(var x=Kp(v?v.pos:"0",y),C=xi(g[a],x),m,A=0;A<o.length;A+=1){var F=o[A];if(g[F]!==void 0){m=g[F];break}}var B=Object.assign(fo(g,[].concat(Pt(o),[a,u])),{title:m,key:C,parent:v,pos:x,children:null,data:g,isStart:[].concat(Pt(v?v.isStart:[]),[y===0]),isEnd:[].concat(Pt(v?v.isEnd:[]),[y===p.length-1])});return f.push(B),t===!0||l.has(C)?B.children=d(g[u]||[],B):B.children=[],B})}return d(e),f}function cv(e,t,r){var n={};xn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,u=o.externalGetKey,l=o.fieldNames,f=pa(l),d=f.key,p=f.children,v=a||p,g;u?typeof u=="string"?g=function(C){return C[u]}:typeof u=="function"&&(g=function(C){return u(C)}):g=function(C,m){return xi(C[d],m)};function y(x,C,m,A){var F=x?x[v]:e,B=x?Kp(m.pos,C):"0",R=x?[].concat(Pt(A),[x]):[];if(x){var S=g(x,B),z={node:x,index:C,pos:B,key:S,parentPos:m.node?m.pos:null,level:m.level+1,nodes:R};t(z)}F&&F.forEach(function($,P){y($,P,{node:x,pos:B,level:m?m.level+1:-1},R)})}y(null)}function Z0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,u=t.childrenPropName,l=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=a||f,p={},v={},g={posEntities:p,keyEntities:v};return r&&(g=r(g)||g),cv(e,function(y){var x=y.node,C=y.index,m=y.pos,A=y.key,F=y.parentPos,B=y.level,R=y.nodes,S={node:x,nodes:R,index:C,key:A,pos:m,level:B},z=xi(A,m);p[m]=S,v[z]=S,S.parent=p[F],S.parent&&(S.parent.children=S.parent.children||[],S.parent.children.push(S)),n&&n(S,g)},{externalGetKey:d,childrenPropName:u,fieldNames:l}),o&&o(g),g}function Ua(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,u=t.checkedKeys,l=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,p=t.keyEntities,v=hn(p,e),g={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:u.indexOf(e)!==-1,halfChecked:l.indexOf(e)!==-1,pos:String(v?v.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return g}function jr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,u=e.loading,l=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,p=e.dragOverGapBottom,v=e.pos,g=e.active,y=e.eventKey,x=je(je({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:u,halfChecked:l,dragOver:f,dragOverGapTop:d,dragOverGapBottom:p,pos:v,active:g,key:y});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Xn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),x}function Vp(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function dv(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function fv(e,t,r,n){for(var o=new Set(e),a=new Set,u=0;u<=r;u+=1){var l=t.get(u)||new Set;l.forEach(function(v){var g=v.key,y=v.node,x=v.children,C=x===void 0?[]:x;o.has(g)&&!n(y)&&C.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var p=t.get(d)||new Set;p.forEach(function(v){var g=v.parent,y=v.node;if(!(n(y)||!v.parent||f.has(v.parent.key))){if(n(v.parent.node)){f.add(g.key);return}var x=!0,C=!1;(g.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var A=m.key,F=o.has(A);x&&!F&&(x=!1),!C&&(F||a.has(A))&&(C=!0)}),x&&o.add(g.key),C&&a.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Vp(a,o))}}function hv(e,t,r,n,o){for(var a=new Set(e),u=new Set(t),l=0;l<=n;l+=1){var f=r.get(l)||new Set;f.forEach(function(g){var y=g.key,x=g.node,C=g.children,m=C===void 0?[]:C;!a.has(y)&&!u.has(y)&&!o(x)&&m.filter(function(A){return!o(A.node)}).forEach(function(A){a.delete(A.key)})})}u=new Set;for(var d=new Set,p=n;p>=0;p-=1){var v=r.get(p)||new Set;v.forEach(function(g){var y=g.parent,x=g.node;if(!(o(x)||!g.parent||d.has(g.parent.key))){if(o(g.parent.node)){d.add(y.key);return}var C=!0,m=!1;(y.children||[]).filter(function(A){return!o(A.node)}).forEach(function(A){var F=A.key,B=a.has(F);C&&!B&&(C=!1),!m&&(B||u.has(F))&&(m=!0)}),C||a.delete(y.key),m&&u.add(y.key),d.add(y.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Vp(u,a))}}function ua(e,t,r,n){var o=[],a;n?a=n:a=dv;var u=new Set(e.filter(function(p){var v=!!hn(r,p);return v||o.push(p),v})),l=new Map,f=0;Object.keys(r).forEach(function(p){var v=r[p],g=v.level,y=l.get(g);y||(y=new Set,l.set(g,y)),y.add(v),f=Math.max(f,g)}),Xn(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var d;return t===!0?d=fv(u,l,f,a):d=hv(u,t.halfCheckedKeys,l,f,a),d}var pv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Up=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=D.useContext(ho),{prefixCls:o,type:a="default",danger:u,disabled:l,loading:f,onClick:d,htmlType:p,children:v,className:g,menu:y,arrow:x,autoFocus:C,overlay:m,trigger:A,align:F,open:B,onOpenChange:R,placement:S,getPopupContainer:z,href:$,icon:P=D.createElement(jp,null),title:N,buttonsRender:K=ge=>ge,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:V,overlayStyle:_,destroyOnHidden:q,destroyPopupOnHide:U,dropdownRender:X,popupRender:ee}=e,j=pv(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),ie=r("dropdown",o),de=`${ie}-button`,me={menu:y,arrow:x,autoFocus:C,align:F,disabled:l,trigger:l?[]:A,onOpenChange:R,getPopupContainer:z||t,mouseEnterDelay:L,mouseLeaveDelay:Y,overlayClassName:V,overlayStyle:_,destroyOnHidden:q,popupRender:ee||X},{compactSize:we,compactItemClassnames:Ie}=w4(ie,n),Z=tt(de,Ie,g);"destroyPopupOnHide"in e&&(me.destroyPopupOnHide=U),"overlay"in e&&(me.overlay=m),"open"in e&&(me.open=B),"placement"in e?me.placement=S:me.placement=n==="rtl"?"bottomLeft":"bottomRight";const ne=D.createElement(xs,{type:a,danger:u,disabled:l,loading:f,onClick:d,htmlType:p,href:$,title:N},v),oe=D.createElement(xs,{type:a,danger:u,icon:P}),[Q,le]=K([ne,oe]);return D.createElement(q4.Compact,Object.assign({className:Z,size:we,block:!0},j),Q,D.createElement(Js,Object.assign({},me),le))};Up.__ANT_BUTTON=!0;const Q0=Js;Q0.Button=Up;function Gp(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function mv(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function ko(e,t,r,n){var o=Pu.unstable_batchedUpdates?function(u){Pu.unstable_batchedUpdates(r,u)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var wi=D.createContext(null),gv=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,a=t.prefixCls,u=t.rootClassName,l=t.icons,f=t.countRender,d=t.showSwitch,p=t.showProgress,v=t.current,g=t.transform,y=t.count,x=t.scale,C=t.minScale,m=t.maxScale,A=t.closeIcon,F=t.onActive,B=t.onClose,R=t.onZoomIn,S=t.onZoomOut,z=t.onRotateRight,$=t.onRotateLeft,P=t.onFlipX,N=t.onFlipY,K=t.onReset,L=t.toolbarRender,Y=t.zIndex,V=t.image,_=To(wi),q=l.rotateLeft,U=l.rotateRight,X=l.zoomIn,ee=l.zoomOut,j=l.close,ie=l.left,de=l.right,pe=l.flipX,me=l.flipY,we="".concat(a,"-operations-operation");D.useEffect(function(){var Ae=function(He){He.keyCode===Rr.ESC&&B()};return r&&window.addEventListener("keydown",Ae),function(){window.removeEventListener("keydown",Ae)}},[r]);var Ie=function($e,He){$e.preventDefault(),$e.stopPropagation(),F(He)},Z=D.useCallback(function(Ae){var $e=Ae.type,He=Ae.disabled,pt=Ae.onClick,it=Ae.icon;return D.createElement("div",{key:$e,className:tt(we,"".concat(a,"-operations-operation-").concat($e),Ne({},"".concat(a,"-operations-operation-disabled"),!!He)),onClick:pt},it)},[we,a]),ne=d?Z({icon:ie,onClick:function($e){return Ie($e,-1)},type:"prev",disabled:v===0}):void 0,oe=d?Z({icon:de,onClick:function($e){return Ie($e,1)},type:"next",disabled:v===y-1}):void 0,Q=Z({icon:me,onClick:N,type:"flipY"}),le=Z({icon:pe,onClick:P,type:"flipX"}),ge=Z({icon:q,onClick:$,type:"rotateLeft"}),he=Z({icon:U,onClick:z,type:"rotateRight"}),ke=Z({icon:ee,onClick:S,type:"zoomOut",disabled:x<=C}),Ce=Z({icon:X,onClick:R,type:"zoomIn",disabled:x===m}),xe=D.createElement("div",{className:"".concat(a,"-operations")},Q,le,ge,he,ke,Ce);return D.createElement(z0,{visible:r,motionName:n},function(Ae){var $e=Ae.className,He=Ae.style;return D.createElement(C4,{open:!0,getContainer:o??document.body},D.createElement("div",{className:tt("".concat(a,"-operations-wrapper"),$e,u),style:je(je({},He),{},{zIndex:Y})},A===null?null:D.createElement("button",{className:"".concat(a,"-close"),onClick:B},A||j),d&&D.createElement(D.Fragment,null,D.createElement("div",{className:tt("".concat(a,"-switch-left"),Ne({},"".concat(a,"-switch-left-disabled"),v===0)),onClick:function(it){return Ie(it,-1)}},ie),D.createElement("div",{className:tt("".concat(a,"-switch-right"),Ne({},"".concat(a,"-switch-right-disabled"),v===y-1)),onClick:function(it){return Ie(it,1)}},de)),D.createElement("div",{className:"".concat(a,"-footer")},p&&D.createElement("div",{className:"".concat(a,"-progress")},f?f(v+1,y):D.createElement("bdi",null,"".concat(v+1," / ").concat(y))),L?L(xe,je(je({icons:{prevIcon:ne,nextIcon:oe,flipYIcon:Q,flipXIcon:le,rotateLeftIcon:ge,rotateRightIcon:he,zoomOutIcon:ke,zoomInIcon:Ce},actions:{onActive:F,onFlipY:N,onFlipX:P,onRotateLeft:$,onRotateRight:z,onZoomOut:S,onZoomIn:R,onReset:K,onClose:B},transform:g},_?{current:v,total:y}:{}),{},{image:V})):xe)))})},Ii={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function vv(e,t,r,n){var o=Bt(null),a=Bt([]),u=Tt(Ii),l=ht(u,2),f=l[0],d=l[1],p=function(x){d(Ii),Ao(Ii,f)||n==null||n({transform:Ii,action:x})},v=function(x,C){o.current===null&&(a.current=[],o.current=Sn(function(){d(function(m){var A=m;return a.current.forEach(function(F){A=je(je({},A),F)}),o.current=null,n==null||n({transform:A,action:C}),A})})),a.current.push(je(je({},f),x))},g=function(x,C,m,A,F){var B=e.current,R=B.width,S=B.height,z=B.offsetWidth,$=B.offsetHeight,P=B.offsetLeft,N=B.offsetTop,K=x,L=f.scale*x;L>r?(L=r,K=r/f.scale):L<t&&(L=F?L:t,K=L/f.scale);var Y=m??innerWidth/2,V=A??innerHeight/2,_=K-1,q=_*R*.5,U=_*S*.5,X=_*(Y-f.x-P),ee=_*(V-f.y-N),j=f.x-(X-q),ie=f.y-(ee-U);if(x<1&&L===1){var de=z*L,pe=$*L,me=Gp(),we=me.width,Ie=me.height;de<=we&&pe<=Ie&&(j=0,ie=0)}v({x:j,y:ie,scale:L},C)};return{transform:f,resetTransform:p,updateTransform:v,dispatchZoomChange:g}}function pf(e,t,r,n){var o=t+r,a=(r-n)/2;if(r>n){if(t>0)return Ne({},e,a);if(t<0&&o<n)return Ne({},e,-a)}else if(t<0||o>n)return Ne({},e,t<0?a:-a);return{}}function Xp(e,t,r,n){var o=Gp(),a=o.width,u=o.height,l=null;return e<=a&&t<=u?l={x:0,y:0}:(e>a||t>u)&&(l=je(je({},pf("x",r,e,a)),pf("y",n,t,u))),l}var aa=1,bv=1;function yv(e,t,r,n,o,a,u){var l=o.rotate,f=o.scale,d=o.x,p=o.y,v=Tt(!1),g=ht(v,2),y=g[0],x=g[1],C=Bt({diffX:0,diffY:0,transformX:0,transformY:0}),m=function(S){!t||S.button!==0||(S.preventDefault(),S.stopPropagation(),C.current={diffX:S.pageX-d,diffY:S.pageY-p,transformX:d,transformY:p},x(!0))},A=function(S){r&&y&&a({x:S.pageX-C.current.diffX,y:S.pageY-C.current.diffY},"move")},F=function(){if(r&&y){x(!1);var S=C.current,z=S.transformX,$=S.transformY,P=d!==z&&p!==$;if(!P)return;var N=e.current.offsetWidth*f,K=e.current.offsetHeight*f,L=e.current.getBoundingClientRect(),Y=L.left,V=L.top,_=l%180!==0,q=Xp(_?K:N,_?N:K,Y,V);q&&a(je({},q),"dragRebound")}},B=function(S){if(!(!r||S.deltaY==0)){var z=Math.abs(S.deltaY/100),$=Math.min(z,bv),P=aa+$*n;S.deltaY>0&&(P=aa/P),u(P,"wheel",S.clientX,S.clientY)}};return Jt(function(){var R,S,z,$;if(t){z=ko(window,"mouseup",F,!1),$=ko(window,"mousemove",A,!1);try{window.top!==window.self&&(R=ko(window.top,"mouseup",F,!1),S=ko(window.top,"mousemove",A,!1))}catch{}}return function(){var P,N,K,L;(P=z)===null||P===void 0||P.remove(),(N=$)===null||N===void 0||N.remove(),(K=R)===null||K===void 0||K.remove(),(L=S)===null||L===void 0||L.remove()}},[r,y,d,p,l,t]),{isMoving:y,onMouseDown:m,onMouseMove:A,onMouseUp:F,onWheel:B}}function xv(e){return new Promise(function(t){if(!e){t(!1);return}var r=document.createElement("img");r.onerror=function(){return t(!1)},r.onload=function(){return t(!0)},r.src=e})}function Yp(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=Tt(r?"loading":"normal"),a=ht(o,2),u=a[0],l=a[1],f=Bt(!1),d=u==="error";Jt(function(){var y=!0;return xv(t).then(function(x){!x&&y&&l("error")}),function(){y=!1}},[t]),Jt(function(){r&&!f.current?l("loading"):d&&l("normal")},[t]);var p=function(){l("normal")},v=function(x){f.current=!1,u==="loading"&&x!==null&&x!==void 0&&x.complete&&(x.naturalWidth||x.naturalHeight)&&(f.current=!0,p())},g=d&&n?{src:n}:{onLoad:p,src:t};return[v,g,u]}function Fs(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function wv(e,t,r,n){var o=Fs(e,r),a=Fs(t,n);if(o===0&&a===0)return[e.x,e.y];var u=o/(o+a),l=e.x+u*(t.x-e.x),f=e.y+u*(t.y-e.y);return[l,f]}function Cv(e,t,r,n,o,a,u){var l=o.rotate,f=o.scale,d=o.x,p=o.y,v=Tt(!1),g=ht(v,2),y=g[0],x=g[1],C=Bt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),m=function(S){C.current=je(je({},C.current),S)},A=function(S){if(t){S.stopPropagation(),x(!0);var z=S.touches,$=z===void 0?[]:z;$.length>1?m({point1:{x:$[0].clientX,y:$[0].clientY},point2:{x:$[1].clientX,y:$[1].clientY},eventType:"touchZoom"}):m({point1:{x:$[0].clientX-d,y:$[0].clientY-p},eventType:"move"})}},F=function(S){var z=S.touches,$=z===void 0?[]:z,P=C.current,N=P.point1,K=P.point2,L=P.eventType;if($.length>1&&L==="touchZoom"){var Y={x:$[0].clientX,y:$[0].clientY},V={x:$[1].clientX,y:$[1].clientY},_=wv(N,K,Y,V),q=ht(_,2),U=q[0],X=q[1],ee=Fs(Y,V)/Fs(N,K);u(ee,"touchZoom",U,X,!0),m({point1:Y,point2:V,eventType:"touchZoom"})}else L==="move"&&(a({x:$[0].clientX-N.x,y:$[0].clientY-N.y},"move"),m({eventType:"move"}))},B=function(){if(r){if(y&&x(!1),m({eventType:"none"}),n>f)return a({x:0,y:0,scale:n},"touchZoom");var S=e.current.offsetWidth*f,z=e.current.offsetHeight*f,$=e.current.getBoundingClientRect(),P=$.left,N=$.top,K=l%180!==0,L=Xp(K?z:S,K?S:z,P,N);L&&a(je({},L),"dragRebound")}};return Jt(function(){var R;return r&&t&&(R=ko(window,"touchmove",function(S){return S.preventDefault()},{passive:!1})),function(){var S;(S=R)===null||S===void 0||S.remove()}},[r,t]),{isTouching:y,onTouchStart:A,onTouchMove:F,onTouchEnd:B}}var Dv=["fallback","src","imgRef"],Ev=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],kv=function(t){var r=t.fallback,n=t.src,o=t.imgRef,a=mr(t,Dv),u=Yp({src:n,fallback:r}),l=ht(u,2),f=l[0],d=l[1];return _e.createElement("img",vt({ref:function(v){o.current=v,f(v)}},a,d))},Jp=function(t){var r=t.prefixCls,n=t.src,o=t.alt,a=t.imageInfo,u=t.fallback,l=t.movable,f=l===void 0?!0:l,d=t.onClose,p=t.visible,v=t.icons,g=v===void 0?{}:v,y=t.rootClassName,x=t.closeIcon,C=t.getContainer,m=t.current,A=m===void 0?0:m,F=t.count,B=F===void 0?1:F,R=t.countRender,S=t.scaleStep,z=S===void 0?.5:S,$=t.minScale,P=$===void 0?1:$,N=t.maxScale,K=N===void 0?50:N,L=t.transitionName,Y=L===void 0?"zoom":L,V=t.maskTransitionName,_=V===void 0?"fade":V,q=t.imageRender,U=t.imgCommonProps,X=t.toolbarRender,ee=t.onTransform,j=t.onChange,ie=mr(t,Ev),de=Bt(),pe=To(wi),me=pe&&B>1,we=pe&&B>=1,Ie=Tt(!0),Z=ht(Ie,2),ne=Z[0],oe=Z[1],Q=vv(de,P,K,ee),le=Q.transform,ge=Q.resetTransform,he=Q.updateTransform,ke=Q.dispatchZoomChange,Ce=yv(de,f,p,z,le,he,ke),xe=Ce.isMoving,Ae=Ce.onMouseDown,$e=Ce.onWheel,He=Cv(de,f,p,P,le,he,ke),pt=He.isTouching,it=He.onTouchStart,Oe=He.onTouchMove,Le=He.onTouchEnd,Ke=le.rotate,st=le.scale,Ze=tt(Ne({},"".concat(r,"-moving"),xe));Jt(function(){ne||oe(!0)},[ne]);var Qe=function(){ge("close")},$t=function(){ke(aa+z,"zoomIn")},wt=function(){ke(aa/(aa+z),"zoomOut")},nt=function(){he({rotate:Ke+90},"rotateRight")},kt=function(){he({rotate:Ke-90},"rotateLeft")},ze=function(){he({flipX:!le.flipX},"flipX")},ce=function(){he({flipY:!le.flipY},"flipY")},mt=function(){ge("reset")},At=function(Qt){var lr=A+Qt;!Number.isInteger(lr)||lr<0||lr>B-1||(oe(!1),ge(Qt<0?"prev":"next"),j==null||j(lr,A))},Nt=function(Qt){!p||!me||(Qt.keyCode===Rr.LEFT?At(-1):Qt.keyCode===Rr.RIGHT&&At(1))},Ct=function(Qt){p&&(st!==1?he({x:0,y:0,scale:1},"doubleClick"):ke(aa+z,"doubleClick",Qt.clientX,Qt.clientY))};Jt(function(){var zt=ko(window,"keydown",Nt,!1);return function(){zt.remove()}},[p,me,A]);var nr=_e.createElement(kv,vt({},U,{width:t.width,height:t.height,imgRef:de,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(le.x,"px, ").concat(le.y,"px, 0) scale3d(").concat(le.flipX?"-":"").concat(st,", ").concat(le.flipY?"-":"").concat(st,", 1) rotate(").concat(Ke,"deg)"),transitionDuration:(!ne||pt)&&"0s"},fallback:u,src:n,onWheel:$e,onMouseDown:Ae,onDoubleClick:Ct,onTouchStart:it,onTouchMove:Oe,onTouchEnd:Le,onTouchCancel:Le})),Dt=je({url:n,alt:o},a);return _e.createElement(_e.Fragment,null,_e.createElement(D4,vt({transitionName:Y,maskTransitionName:_,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:p,classNames:{wrapper:Ze},rootClassName:y,getContainer:C},ie,{afterClose:Qe}),_e.createElement("div",{className:"".concat(r,"-img-wrapper")},q?q(nr,je({transform:le,image:Dt},pe?{current:A}:{})):nr)),_e.createElement(gv,{visible:p,transform:le,maskTransitionName:_,closeIcon:x,getContainer:C,prefixCls:r,rootClassName:y,icons:g,countRender:R,showSwitch:me,showProgress:we,current:A,count:B,scale:st,minScale:P,maxScale:K,toolbarRender:X,onActive:At,onZoomIn:$t,onZoomOut:wt,onRotateRight:nt,onRotateLeft:kt,onFlipX:ze,onFlipY:ce,onClose:d,onReset:mt,zIndex:ie.zIndex!==void 0?ie.zIndex+1:void 0,image:Dt}))},Vu=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function Sv(e){var t=D.useState({}),r=ht(t,2),n=r[0],o=r[1],a=D.useCallback(function(l,f){return o(function(d){return je(je({},d),{},Ne({},l,f))}),function(){o(function(d){var p=je({},d);return delete p[l],p})}},[]),u=D.useMemo(function(){return e?e.map(function(l){if(typeof l=="string")return{data:{src:l}};var f={};return Object.keys(l).forEach(function(d){["src"].concat(Pt(Vu)).includes(d)&&(f[d]=l[d])}),{data:f}}):Object.keys(n).reduce(function(l,f){var d=n[f],p=d.canPreview,v=d.data;return p&&l.push({data:v,id:f}),l},[])},[e,n]);return[u,a,!!e]}var Av=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Bv=["src"],Fv=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,a=t.children,u=t.icons,l=u===void 0?{}:u,f=t.items,d=t.preview,p=t.fallback,v=xn(d)==="object"?d:{},g=v.visible,y=v.onVisibleChange,x=v.getContainer,C=v.current,m=v.movable,A=v.minScale,F=v.maxScale,B=v.countRender,R=v.closeIcon,S=v.onChange,z=v.onTransform,$=v.toolbarRender,P=v.imageRender,N=mr(v,Av),K=Sv(f),L=ht(K,3),Y=L[0],V=L[1],_=L[2],q=lo(0,{value:C}),U=ht(q,2),X=U[0],ee=U[1],j=Tt(!1),ie=ht(j,2),de=ie[0],pe=ie[1],me=((r=Y[X])===null||r===void 0?void 0:r.data)||{},we=me.src,Ie=mr(me,Bv),Z=lo(!!g,{value:g,onChange:function(pt,it){y==null||y(pt,it,X)}}),ne=ht(Z,2),oe=ne[0],Q=ne[1],le=Tt(null),ge=ht(le,2),he=ge[0],ke=ge[1],Ce=D.useCallback(function(He,pt,it,Oe){var Le=_?Y.findIndex(function(Ke){return Ke.data.src===pt}):Y.findIndex(function(Ke){return Ke.id===He});ee(Le<0?0:Le),Q(!0),ke({x:it,y:Oe}),pe(!0)},[Y,_]);D.useEffect(function(){oe?de||ee(0):pe(!1)},[oe]);var xe=function(pt,it){ee(pt),S==null||S(pt,it)},Ae=function(){Q(!1),ke(null)},$e=D.useMemo(function(){return{register:V,onPreview:Ce}},[V,Ce]);return D.createElement(wi.Provider,{value:$e},a,D.createElement(Jp,vt({"aria-hidden":!oe,movable:m,visible:oe,prefixCls:o,closeIcon:R,onClose:Ae,mousePosition:he,imgCommonProps:Ie,src:we,fallback:p,icons:l,minScale:A,maxScale:F,getContainer:x,current:X,count:Y.length,countRender:B,onTransform:z,toolbarRender:$,imageRender:P,onChange:xe},N)))},mf=0;function Nv(e,t){var r=D.useState(function(){return mf+=1,String(mf)}),n=ht(r,1),o=n[0],a=D.useContext(wi),u={data:t,canPreview:e};return D.useEffect(function(){if(a)return a.register(o,u)},[]),D.useEffect(function(){a&&a.register(o,u)},[e,t]),o}var $v=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Tv=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],ec=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,a=t.prefixCls,u=a===void 0?"rc-image":a,l=t.previewPrefixCls,f=l===void 0?"".concat(u,"-preview"):l,d=t.placeholder,p=t.fallback,v=t.width,g=t.height,y=t.style,x=t.preview,C=x===void 0?!0:x,m=t.className,A=t.onClick,F=t.onError,B=t.wrapperClassName,R=t.wrapperStyle,S=t.rootClassName,z=mr(t,$v),$=d&&d!==!0,P=xn(C)==="object"?C:{},N=P.src,K=P.visible,L=K===void 0?void 0:K,Y=P.onVisibleChange,V=Y===void 0?o:Y,_=P.getContainer,q=_===void 0?void 0:_,U=P.mask,X=P.maskClassName,ee=P.movable,j=P.icons,ie=P.scaleStep,de=P.minScale,pe=P.maxScale,me=P.imageRender,we=P.toolbarRender,Ie=mr(P,Tv),Z=N??r,ne=lo(!!L,{value:L,onChange:V}),oe=ht(ne,2),Q=oe[0],le=oe[1],ge=Yp({src:r,isCustomPlaceholder:$,fallback:p}),he=ht(ge,3),ke=he[0],Ce=he[1],xe=he[2],Ae=Tt(null),$e=ht(Ae,2),He=$e[0],pt=$e[1],it=To(wi),Oe=!!C,Le=function(){le(!1),pt(null)},Ke=tt(u,B,S,Ne({},"".concat(u,"-error"),xe==="error")),st=yt(function(){var wt={};return Vu.forEach(function(nt){t[nt]!==void 0&&(wt[nt]=t[nt])}),wt},Vu.map(function(wt){return t[wt]})),Ze=yt(function(){return je(je({},st),{},{src:Z})},[Z,st]),Qe=Nv(Oe,Ze),$t=function(nt){var kt=mv(nt.target),ze=kt.left,ce=kt.top;it?it.onPreview(Qe,Z,ze,ce):(pt({x:ze,y:ce}),le(!0)),A==null||A(nt)};return D.createElement(D.Fragment,null,D.createElement("div",vt({},z,{className:Ke,onClick:Oe?$t:A,style:je({width:v,height:g},R)}),D.createElement("img",vt({},st,{className:tt("".concat(u,"-img"),Ne({},"".concat(u,"-img-placeholder"),d===!0),m),style:je({height:g},y),ref:ke},Ce,{width:v,height:g,onError:F})),xe==="loading"&&D.createElement("div",{"aria-hidden":"true",className:"".concat(u,"-placeholder")},d),U&&Oe&&D.createElement("div",{className:tt("".concat(u,"-mask"),X),style:{display:(y==null?void 0:y.display)==="none"?"none":void 0}},U)),!it&&Oe&&D.createElement(Jp,vt({"aria-hidden":!Q,visible:Q,prefixCls:f,onClose:Le,mousePosition:He,src:Z,alt:n,imageInfo:{width:v,height:g},fallback:p,getContainer:q,icons:j,movable:ee,scaleStep:ie,minScale:de,maxScale:pe,rootClassName:S,imageRender:me,imgCommonProps:st,toolbarRender:we},Ie)))};ec.PreviewGroup=Fv;var Ov={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Rv=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:Ov}))},Mv=D.forwardRef(Rv),Iv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},Pv=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:Iv}))},zv=D.forwardRef(Pv),jv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},_v=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:jv}))},gf=D.forwardRef(_v),Lv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},Hv=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:Lv}))},qv=D.forwardRef(Hv),Kv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},Wv=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:Kv}))},Vv=D.forwardRef(Wv);const Uu=e=>({position:e||"absolute",inset:0}),Uv=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:a,colorTextLightSolid:u}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:u,background:new pn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},j0),{padding:`0 ${Xe(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},Gv=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:a,paddingLG:u,previewOperationColorDisabled:l,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:p,colorTextLightSolid:v}=e,g=new pn(r).setA(.1),y=g.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:o,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:a},[`${t}-close`]:{position:"fixed",top:o,right:{_skip_check_:!0,value:o},display:"flex",color:v,backgroundColor:g.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:y.toRgbString()},[`& > ${p}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Xe(u)}`,backgroundColor:g.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${p}`]:{color:f},"&-disabled":{color:l,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${p}`]:{fontSize:e.previewOperationSize}}}}},Xv=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:a,motionDurationSlow:u}=e,l=new pn(t).setA(.1),f=l.clone().setA(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(a).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${u}`,userSelect:"none","&:hover":{background:f.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:e.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:e.marginSM},[`${o}-switch-right`]:{insetInlineEnd:e.marginSM}}},Yv=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:o}=e;return[{[`${o}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},Uu()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Uu()),{transition:`transform ${n} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[Gv(e),Xv(e)]}]},Jv=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},Uv(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},Uu())}}},Zv=e=>{const{previewCls:t}=e;return{[`${t}-root`]:_0(e,"zoom"),"&":k4(e,!0)}},Qv=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new pn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new pn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new pn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),Zp=gi("Image",e=>{const t=`${e.componentCls}-preview`,r=Wo(e,{previewCls:t,modalMaskBg:new pn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Jv(r),Yv(r),E4(Wo(r,{componentCls:t})),Zv(r)]},Qv);var e5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Qp={rotateLeft:D.createElement(Mv,null),rotateRight:D.createElement(zv,null),zoomIn:D.createElement(qv,null),zoomOut:D.createElement(Vv,null),close:D.createElement(S4,null),left:D.createElement(Es,null),right:D.createElement(ks,null),flipX:D.createElement(gf,null),flipY:D.createElement(gf,{rotate:90})},t5=e=>{var{previewPrefixCls:t,preview:r}=e,n=e5(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:a}=D.useContext(ho),u=o("image",t),l=`${u}-preview`,f=o(),d=bi(u),[p,v,g]=Zp(u,d),[y]=Ws("ImagePreview",typeof r=="object"?r.zIndex:void 0),x=D.useMemo(()=>Object.assign(Object.assign({},Qp),{left:a==="rtl"?D.createElement(ks,null):D.createElement(Es,null),right:a==="rtl"?D.createElement(Es,null):D.createElement(ks,null)}),[a]),C=D.useMemo(()=>{var m;if(r===!1)return r;const A=typeof r=="object"?r:{},F=tt(v,g,d,(m=A.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},A),{transitionName:ws(f,"zoom",A.transitionName),maskTransitionName:ws(f,"fade",A.maskTransitionName),rootClassName:F,zIndex:y})},[r,f,y,v,g,d]);return p(D.createElement(ec.PreviewGroup,Object.assign({preview:C,previewPrefixCls:l,icons:x},n)))};var vf=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const em=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:a,fallback:u}=e,l=vf(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:p,style:v,preview:g,fallback:y}=A4("image"),[x]=B4("Image"),C=f("image",t),m=f(),A=bi(C),[F,B,R]=Zp(C,A),S=tt(o,B,R,A),z=tt(n,B,p),[$]=Ws("ImagePreview",typeof r=="object"?r.zIndex:void 0),P=D.useMemo(()=>{if(r===!1)return r;const L=typeof r=="object"?r:{},{getContainer:Y,closeIcon:V,rootClassName:_,destroyOnClose:q,destroyOnHidden:U}=L,X=vf(L,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:D.createElement("div",{className:`${C}-mask-info`},D.createElement(F4,null),x==null?void 0:x.preview),icons:Qp},X),{destroyOnClose:U??q,rootClassName:tt(S,_),getContainer:Y??d,transitionName:ws(m,"zoom",L.transitionName),maskTransitionName:ws(m,"fade",L.maskTransitionName),zIndex:$,closeIcon:V??(g==null?void 0:g.closeIcon)})},[r,x,g==null?void 0:g.closeIcon]),N=Object.assign(Object.assign({},v),a),K=u??y;return F(D.createElement(ec,Object.assign({prefixCls:C,preview:P,rootClassName:S,className:z,style:N,fallback:K},l)))};em.PreviewGroup=t5;var Co={},Ci="rc-table-internal-hook";function tc(e){var t=D.createContext(void 0),r=function(o){var a=o.value,u=o.children,l=D.useRef(a);l.current=a;var f=D.useState(function(){return{getValue:function(){return l.current},listeners:new Set}}),d=ht(f,1),p=d[0];return Bo(function(){a4(function(){p.listeners.forEach(function(v){v(a)})})},[a]),D.createElement(t.Provider,{value:p},u)};return{Context:t,Provider:r,defaultValue:e}}function Ur(e,t){var r=In(typeof t=="function"?t:function(v){if(t===void 0)return v;if(!Array.isArray(t))return v[t];var g={};return t.forEach(function(y){g[y]=v[y]}),g}),n=D.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,u=o.getValue,l=D.useRef();l.current=r(n?u():e==null?void 0:e.defaultValue);var f=D.useState({}),d=ht(f,2),p=d[1];return Bo(function(){if(!n)return;function v(g){var y=r(g);Ao(l.current,y,!0)||p({})}return a.add(v),function(){a.delete(v)}},[n]),l.current}function r5(){var e=D.createContext(null);function t(){return D.useContext(e)}function r(o,a){var u=vs(o),l=function(d,p){var v=u?{ref:p}:{},g=D.useRef(0),y=D.useRef(d),x=t();return x!==null?D.createElement(o,vt({},d,v)):((!a||a(y.current,d))&&(g.current+=1),y.current=d,D.createElement(e.Provider,{value:g.current},D.createElement(o,vt({},d,v))))};return u?D.forwardRef(l):l}function n(o,a){var u=vs(o),l=function(d,p){var v=u?{ref:p}:{};return t(),D.createElement(o,vt({},d,v))};return u?D.memo(D.forwardRef(l),a):D.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var rc=r5(),tm=rc.makeImmutable,Ea=rc.responseImmutable,n5=rc.useImmutableMark,Qr=tc(),rm=D.createContext({renderWithProps:!1}),o5="RC_TABLE_KEY";function a5(e){return e==null?[]:Array.isArray(e)?e:[e]}function Zs(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,u=o.dataIndex,l=a||a5(u).join("-")||o5;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function Gu(e){return e!=null}function i5(e){return typeof e=="number"&&!Number.isNaN(e)}function s5(e){return e&&xn(e)==="object"&&!Array.isArray(e)&&!D.isValidElement(e)}function l5(e,t,r,n,o,a){var u=D.useContext(rm),l=n5(),f=P0(function(){if(Gu(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],p=H0(e,d),v=p,g=void 0;if(o){var y=o(p,e,r);s5(y)?(v=y.children,g=y.props,u.renderWithProps=!0):v=y}return[v,g]},[l,e,n,t,o,r],function(d,p){if(a){var v=ht(d,2),g=v[1],y=ht(p,2),x=y[1];return a(x,g)}return u.renderWithProps?!0:!Ao(d,p,!0)});return f}function u5(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function c5(e,t){return Ur(Qr,function(r){var n=u5(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var d5=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,u=r===!0?{showTitle:!0}:r;return u&&(u.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():D.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function f5(e){var t,r,n,o,a,u,l,f,d=e.component,p=e.children,v=e.ellipsis,g=e.scope,y=e.prefixCls,x=e.className,C=e.align,m=e.record,A=e.render,F=e.dataIndex,B=e.renderIndex,R=e.shouldCellUpdate,S=e.index,z=e.rowType,$=e.colSpan,P=e.rowSpan,N=e.fixLeft,K=e.fixRight,L=e.firstFixLeft,Y=e.lastFixLeft,V=e.firstFixRight,_=e.lastFixRight,q=e.appendNode,U=e.additionalProps,X=U===void 0?{}:U,ee=e.isSticky,j="".concat(y,"-cell"),ie=Ur(Qr,["supportSticky","allColumnsFixedLeft","rowHoverable"]),de=ie.supportSticky,pe=ie.allColumnsFixedLeft,me=ie.rowHoverable,we=l5(m,F,B,p,A,R),Ie=ht(we,2),Z=Ie[0],ne=Ie[1],oe={},Q=typeof N=="number"&&de,le=typeof K=="number"&&de;Q&&(oe.position="sticky",oe.left=N),le&&(oe.position="sticky",oe.right=K);var ge=(t=(r=(n=ne==null?void 0:ne.colSpan)!==null&&n!==void 0?n:X.colSpan)!==null&&r!==void 0?r:$)!==null&&t!==void 0?t:1,he=(o=(a=(u=ne==null?void 0:ne.rowSpan)!==null&&u!==void 0?u:X.rowSpan)!==null&&a!==void 0?a:P)!==null&&o!==void 0?o:1,ke=c5(S,he),Ce=ht(ke,2),xe=Ce[0],Ae=Ce[1],$e=In(function(st){var Ze;m&&Ae(S,S+he-1),X==null||(Ze=X.onMouseEnter)===null||Ze===void 0||Ze.call(X,st)}),He=In(function(st){var Ze;m&&Ae(-1,-1),X==null||(Ze=X.onMouseLeave)===null||Ze===void 0||Ze.call(X,st)});if(ge===0||he===0)return null;var pt=(l=X.title)!==null&&l!==void 0?l:d5({rowType:z,ellipsis:v,children:Z}),it=tt(j,x,(f={},Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(f,"".concat(j,"-fix-left"),Q&&de),"".concat(j,"-fix-left-first"),L&&de),"".concat(j,"-fix-left-last"),Y&&de),"".concat(j,"-fix-left-all"),Y&&pe&&de),"".concat(j,"-fix-right"),le&&de),"".concat(j,"-fix-right-first"),V&&de),"".concat(j,"-fix-right-last"),_&&de),"".concat(j,"-ellipsis"),v),"".concat(j,"-with-append"),q),"".concat(j,"-fix-sticky"),(Q||le)&&ee&&de),Ne(f,"".concat(j,"-row-hover"),!ne&&xe)),X.className,ne==null?void 0:ne.className),Oe={};C&&(Oe.textAlign=C);var Le=je(je(je(je({},ne==null?void 0:ne.style),oe),Oe),X.style),Ke=Z;return xn(Ke)==="object"&&!Array.isArray(Ke)&&!D.isValidElement(Ke)&&(Ke=null),v&&(Y||V)&&(Ke=D.createElement("span",{className:"".concat(j,"-content")},Ke)),D.createElement(d,vt({},ne,X,{className:it,style:Le,title:pt,scope:g,onMouseEnter:me?$e:void 0,onMouseLeave:me?He:void 0,colSpan:ge!==1?ge:null,rowSpan:he!==1?he:null}),q,Ke)}const ka=D.memo(f5);function nc(e,t,r,n,o){var a=r[e]||{},u=r[t]||{},l,f;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:u.fixed==="right"&&(f=n.right[o==="rtl"?e:t]);var d=!1,p=!1,v=!1,g=!1,y=r[t+1],x=r[e-1],C=y&&!y.fixed||x&&!x.fixed||r.every(function(R){return R.fixed==="left"});if(o==="rtl"){if(l!==void 0){var m=x&&x.fixed==="left";g=!m&&C}else if(f!==void 0){var A=y&&y.fixed==="right";v=!A&&C}}else if(l!==void 0){var F=y&&y.fixed==="left";d=!F&&C}else if(f!==void 0){var B=x&&x.fixed==="right";p=!B&&C}return{fixLeft:l,fixRight:f,lastFixLeft:d,firstFixRight:p,lastFixRight:v,firstFixLeft:g,isSticky:n.isSticky}}var nm=D.createContext({});function h5(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,u=e.rowSpan,l=e.align,f=Ur(Qr,["prefixCls","direction"]),d=f.prefixCls,p=f.direction,v=D.useContext(nm),g=v.scrollColumnIndex,y=v.stickyOffsets,x=v.flattenColumns,C=r+a-1,m=C+1===g?a+1:a,A=nc(r,r+m-1,x,y,p);return D.createElement(ka,vt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:u,render:function(){return n}},A))}var p5=["children"];function m5(e){var t=e.children,r=mr(e,p5);return D.createElement("tr",r,t)}function Qs(e){var t=e.children;return t}Qs.Row=m5;Qs.Cell=h5;function g5(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Ur(Qr,"prefixCls"),a=n.length-1,u=n[a],l=D.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:u!=null&&u.scrollbar?a:null}},[u,n,a,r]);return D.createElement(nm.Provider,{value:l},D.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const Pi=Ea(g5);var om=Qs;function v5(e){return null}function b5(e){return null}function am(e,t,r,n,o,a,u){var l=a(t,u);e.push({record:t,indent:r,index:u,rowKey:l});var f=o==null?void 0:o.has(l);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)am(e,t[n][d],r+1,n,o,a,d)}function im(e,t,r,n){var o=D.useMemo(function(){if(r!=null&&r.size){for(var a=[],u=0;u<(e==null?void 0:e.length);u+=1){var l=e[u];am(a,l,0,t,r,n,u)}return a}return e==null?void 0:e.map(function(f,d){return{record:f,indent:0,index:d,rowKey:n(f,d)}})},[e,t,r,n]);return o}function sm(e,t,r,n){var o=Ur(Qr,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,u=o.expandableType,l=o.expandedKeys,f=o.childrenColumnName,d=o.onTriggerExpand,p=o.rowExpandable,v=o.onRow,g=o.expandRowByClick,y=o.rowClassName,x=u==="nest",C=u==="row"&&(!p||p(e)),m=C||x,A=l&&l.has(t),F=f&&e&&e[f],B=In(d),R=v==null?void 0:v(e,r),S=R==null?void 0:R.onClick,z=function(K){g&&m&&d(e,K);for(var L=arguments.length,Y=new Array(L>1?L-1:0),V=1;V<L;V++)Y[V-1]=arguments[V];S==null||S.apply(void 0,[K].concat(Y))},$;typeof y=="string"?$=y:typeof y=="function"&&($=y(e,r,n));var P=Zs(a);return je(je({},o),{},{columnsKey:P,nestExpandable:x,expanded:A,hasNestChildren:F,record:e,onTriggerExpand:B,rowSupportExpand:C,expandable:m,rowProps:je(je({},R),{},{className:tt($,R==null?void 0:R.className),onClick:z})})}function lm(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,u=e.expanded,l=e.colSpan,f=e.isEmpty,d=e.stickyOffset,p=d===void 0?0:d,v=Ur(Qr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,y=v.fixHeader,x=v.fixColumn,C=v.componentWidth,m=v.horizonScroll,A=r;return(f?m&&C:x)&&(A=D.createElement("div",{style:{width:C-p-(y&&!f?g:0),position:"sticky",left:p,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},A)),D.createElement(n,{className:a,style:{display:u?null:"none"}},D.createElement(ka,{component:o,prefixCls:t,colSpan:l},A))}function y5(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,u="".concat(t,"-row-expand-icon");if(!a)return D.createElement("span",{className:tt(u,"".concat(t,"-row-spaced"))});var l=function(d){n(r,d),d.stopPropagation()};return D.createElement("span",{className:tt(u,Ne(Ne({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function x5(e,t,r){var n=[];function o(a){(a||[]).forEach(function(u,l){n.push(t(u,l)),o(u[r])})}return o(e),n}function um(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function cm(e,t,r,n,o){var a,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,p=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,y=e.nestExpandable,x=e.indentSize,C=e.expandIcon,m=e.expanded,A=e.hasNestChildren,F=e.onTriggerExpand,B=e.expandable,R=e.expandedKeys,S=p[r],z=v[r],$;r===(g||0)&&y&&($=D.createElement(D.Fragment,null,D.createElement("span",{style:{paddingLeft:"".concat(x*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),C({prefixCls:d,expanded:m,expandable:A,record:f,onExpand:F})));var P=((a=t.onCell)===null||a===void 0?void 0:a.call(t,f,o))||{};if(l){var N=P.rowSpan,K=N===void 0?1:N;if(B&&K&&r<l){for(var L=K,Y=o;Y<o+K;Y+=1){var V=u[Y];R.has(V)&&(L+=1)}P.rowSpan=L}}return{key:S,fixedInfo:z,appendCellNode:$,additionalCellProps:P}}function w5(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,u=e.rowKey,l=e.rowKeys,f=e.indent,d=f===void 0?0:f,p=e.rowComponent,v=e.cellComponent,g=e.scopeCellComponent,y=e.expandedRowInfo,x=sm(n,u,o,d),C=x.prefixCls,m=x.flattenColumns,A=x.expandedRowClassName,F=x.expandedRowRender,B=x.rowProps,R=x.expanded,S=x.rowSupportExpand,z=D.useRef(!1);z.current||(z.current=R);var $=um(A,n,o,d),P=D.createElement(p,vt({},B,{"data-row-key":u,className:tt(t,"".concat(C,"-row"),"".concat(C,"-row-level-").concat(d),B==null?void 0:B.className,Ne({},$,d>=1)),style:je(je({},r),B==null?void 0:B.style)}),m.map(function(L,Y){var V=L.render,_=L.dataIndex,q=L.className,U=cm(x,L,Y,d,o,l,y==null?void 0:y.offset),X=U.key,ee=U.fixedInfo,j=U.appendCellNode,ie=U.additionalCellProps;return D.createElement(ka,vt({className:q,ellipsis:L.ellipsis,align:L.align,scope:L.rowScope,component:L.rowScope?g:v,prefixCls:C,key:X,record:n,index:o,renderIndex:a,dataIndex:_,render:V,shouldCellUpdate:L.shouldCellUpdate},ee,{appendNode:j,additionalProps:ie}))})),N;if(S&&(z.current||R)){var K=F(n,o,d+1,R);N=D.createElement(lm,{expanded:R,className:tt("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),$),prefixCls:C,component:p,cellComponent:v,colSpan:y?y.colSpan:m.length,stickyOffset:y==null?void 0:y.sticky,isEmpty:!1},K)}return D.createElement(D.Fragment,null,P,N)}const C5=Ea(w5);function D5(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=D.useRef();return Bo(function(){a.current&&r(t,a.current.offsetWidth)},[]),D.createElement(q0,{data:t},D.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},D.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function E5(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=D.useRef(null),u=Ur(Qr,["measureRowRender"]),l=u.measureRowRender,f=D.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},D.createElement(q0.Collection,{onBatchResize:function(p){hp(a.current)&&p.forEach(function(v){var g=v.data,y=v.size;n(g,y.offsetWidth)})}},r.map(function(d){var p=o.find(function(y){return y.key===d}),v=p==null?void 0:p.title,g=D.isValidElement(v)?D.cloneElement(v,{ref:null}):v;return D.createElement(D5,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:g})})));return l?l(f):f}function k5(e){var t=e.data,r=e.measureColumnWidth,n=Ur(Qr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,u=n.onColumnResize,l=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,p=n.childrenColumnName,v=n.emptyNode,g=n.expandedRowOffset,y=g===void 0?0:g,x=n.colWidths,C=im(t,p,d,f),m=D.useMemo(function(){return C.map(function(N){return N.rowKey})},[C]),A=D.useRef({renderWithProps:!1}),F=D.useMemo(function(){for(var N=l.length-y,K=0,L=0;L<y;L+=1)K+=x[L]||0;return{offset:y,colSpan:N,sticky:K}},[l.length,y,x]),B=a(["body","wrapper"],"tbody"),R=a(["body","row"],"tr"),S=a(["body","cell"],"td"),z=a(["body","cell"],"th"),$;t.length?$=C.map(function(N,K){var L=N.record,Y=N.indent,V=N.index,_=N.rowKey;return D.createElement(C5,{key:_,rowKey:_,rowKeys:m,record:L,index:K,renderIndex:V,rowComponent:R,cellComponent:S,scopeCellComponent:z,indent:Y,expandedRowInfo:F})}):$=D.createElement(lm,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:R,cellComponent:S,colSpan:l.length,isEmpty:!0},v);var P=Zs(l);return D.createElement(rm.Provider,{value:A.current},D.createElement(B,{className:"".concat(o,"-tbody")},r&&D.createElement(E5,{prefixCls:o,columnsKey:P,onColumnResize:u,columns:l}),$))}const S5=Ea(k5);var A5=["expandable"],Ga="RC_TABLE_INTERNAL_COL_DEFINE";function B5(e){var t=e.expandable,r=mr(e,A5),n;return"expandable"in e?n=je(je({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var F5=["columnType"];function dm(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Ur(Qr,["tableLayout"]),a=o.tableLayout,u=[],l=n||r.length,f=!1,d=l-1;d>=0;d-=1){var p=t[d],v=r&&r[d],g=void 0,y=void 0;if(v&&(g=v[Ga],a==="auto"&&(y=v.minWidth)),p||y||g||f){var x=g||{};x.columnType;var C=mr(x,F5);u.unshift(D.createElement("col",vt({key:d,style:{width:p,minWidth:y}},C))),f=!0}}return u.length>0?D.createElement("colgroup",null,u):null}var N5=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function $5(e,t){return yt(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var T5=D.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,u=e.colWidths,l=e.colGroup,f=e.columCount,d=e.stickyOffsets,p=e.direction,v=e.fixHeader,g=e.stickyTopOffset,y=e.stickyBottomOffset,x=e.stickyClassName,C=e.scrollX,m=e.tableLayout,A=m===void 0?"fixed":m,F=e.onScroll,B=e.children,R=mr(e,N5),S=Ur(Qr,["prefixCls","scrollbarSize","isSticky","getComponent"]),z=S.prefixCls,$=S.scrollbarSize,P=S.isSticky,N=S.getComponent,K=N(["header","table"],"table"),L=P&&!v?0:$,Y=D.useRef(null),V=D.useCallback(function(de){Zd(t,de),Zd(Y,de)},[]);D.useEffect(function(){function de(me){var we=me,Ie=we.currentTarget,Z=we.deltaX;Z&&(F({currentTarget:Ie,scrollLeft:Ie.scrollLeft+Z}),me.preventDefault())}var pe=Y.current;return pe==null||pe.addEventListener("wheel",de,{passive:!1}),function(){pe==null||pe.removeEventListener("wheel",de)}},[]);var _=a[a.length-1],q={fixed:_?_.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(z,"-cell-scrollbar")}}},U=yt(function(){return L?[].concat(Pt(o),[q]):o},[L,o]),X=yt(function(){return L?[].concat(Pt(a),[q]):a},[L,a]),ee=yt(function(){var de=d.right,pe=d.left;return je(je({},d),{},{left:p==="rtl"?[].concat(Pt(pe.map(function(me){return me+L})),[0]):pe,right:p==="rtl"?de:[].concat(Pt(de.map(function(me){return me+L})),[0]),isSticky:P})},[L,d,P]),j=$5(u,f),ie=yt(function(){var de=!j||!j.length||j.every(function(pe){return!pe});return n||de},[n,j]);return D.createElement("div",{style:je({overflow:"hidden"},P?{top:g,bottom:y}:{}),ref:V,className:tt(r,Ne({},x,!!x))},D.createElement(K,{style:{tableLayout:A,minWidth:"100%",width:C}},ie?l:D.createElement(dm,{colWidths:[].concat(Pt(j),[L]),columCount:f+1,columns:X}),B(je(je({},R),{},{stickyOffsets:ee,columns:U,flattenColumns:X}))))});const bf=D.memo(T5);var O5=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,u=t.cellComponent,l=t.onHeaderRow,f=t.index,d=Ur(Qr,["prefixCls","direction"]),p=d.prefixCls,v=d.direction,g;l&&(g=l(r.map(function(x){return x.column}),f));var y=Zs(r.map(function(x){return x.column}));return D.createElement(a,g,r.map(function(x,C){var m=x.column,A=nc(x.colStart,x.colEnd,o,n,v),F;return m&&m.onHeaderCell&&(F=x.column.onHeaderCell(m)),D.createElement(ka,vt({},x,{scope:m.title?x.colSpan>1?"colgroup":"col":null,ellipsis:m.ellipsis,align:m.align,component:u,prefixCls:p,key:y[C]},A,{additionalProps:F,rowType:"header"}))}))};function R5(e){var t=[];function r(u,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=l,p=u.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},y=1,x=v.children;return x&&x.length>0&&(y=r(x,d,f+1).reduce(function(C,m){return C+m},0),g.hasSubColumns=!0),"colSpan"in v&&(y=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=y,g.colEnd=g.colStart+y-1,t[f].push(g),d+=y,y});return p}r(e,0);for(var n=t.length,o=function(l){t[l].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-l)})},a=0;a<n;a+=1)o(a);return t}var M5=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,u=Ur(Qr,["prefixCls","getComponent"]),l=u.prefixCls,f=u.getComponent,d=D.useMemo(function(){return R5(n)},[n]),p=f(["header","wrapper"],"thead"),v=f(["header","row"],"tr"),g=f(["header","cell"],"th");return D.createElement(p,{className:"".concat(l,"-thead")},d.map(function(y,x){var C=D.createElement(O5,{key:x,flattenColumns:o,cells:y,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:a,index:x});return C}))};const yf=Ea(M5);function xf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function I5(e,t,r){return D.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(g){var y=xf(t,g.width);y?n+=y:o+=1});var a=Math.max(t,r),u=Math.max(a-n,o),l=o,f=u/o,d=0,p=e.map(function(g){var y=je({},g),x=xf(t,y.width);if(x)y.width=x;else{var C=Math.floor(f);y.width=l===1?u:C,u-=C,l-=1}return d+=y.width,y});if(d<a){var v=a/d;u=a,p.forEach(function(g,y){var x=Math.floor(g.width*v);g.width=y===p.length-1?u:x,u-=x})}return[p,Math.max(d,a)]}return[e,t]},[e,t,r])}var P5=["children"],z5=["fixed"];function oc(e){return Ks(e).filter(function(t){return D.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=mr(n,P5),u=je({key:r},a);return o&&(u.children=oc(o)),u})}function fm(e){return e.filter(function(t){return t&&xn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?je(je({},t),{},{children:fm(r)}):t})}function Xu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&xn(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,u=a===!0?"left":a,l="".concat(t,"-").concat(o),f=n.children;return f&&f.length>0?[].concat(Pt(r),Pt(Xu(f,l).map(function(d){var p;return je(je({},d),{},{fixed:(p=d.fixed)!==null&&p!==void 0?p:u})}))):[].concat(Pt(r),[je(je({key:l},n),{},{fixed:u})])},[])}function j5(e){return e.map(function(t){var r=t.fixed,n=mr(t,z5),o=r;return r==="left"?o="right":r==="right"&&(o="left"),je({fixed:o},n)})}function _5(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,u=e.expandedKeys,l=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,p=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,y=e.expandedRowOffset,x=y===void 0?0:y,C=e.direction,m=e.expandRowByClick,A=e.columnWidth,F=e.fixed,B=e.scrollWidth,R=e.clientWidth,S=D.useMemo(function(){var _=n||oc(o)||[];return fm(_.slice())},[n,o]),z=D.useMemo(function(){if(a){var _=S.slice();if(!_.includes(Co)){var q=g||0,U=q===0&&F==="right"?S.length:q;U>=0&&_.splice(U,0,Co)}var X=_.indexOf(Co);_=_.filter(function(de,pe){return de!==Co||pe===X});var ee=S[X],j;F?j=F:j=ee?ee.fixed:null;var ie=Ne(Ne(Ne(Ne(Ne(Ne({},Ga,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",j),"className","".concat(r,"-row-expand-icon-cell")),"width",A),"render",function(pe,me,we){var Ie=f(me,we),Z=u.has(Ie),ne=v?v(me):!0,oe=p({prefixCls:r,expanded:Z,expandable:ne,record:me,onExpand:d});return m?D.createElement("span",{onClick:function(le){return le.stopPropagation()}},oe):oe});return _.map(function(de,pe){var me=de===Co?ie:de;return pe<x?je(je({},me),{},{fixed:me.fixed||"left"}):me})}return S.filter(function(de){return de!==Co})},[a,S,f,u,p,C,x]),$=D.useMemo(function(){var _=z;return t&&(_=t(_)),_.length||(_=[{render:function(){return null}}]),_},[t,z,C]),P=D.useMemo(function(){return C==="rtl"?j5(Xu($)):Xu($)},[$,C,B]),N=D.useMemo(function(){for(var _=-1,q=P.length-1;q>=0;q-=1){var U=P[q].fixed;if(U==="left"||U===!0){_=q;break}}if(_>=0)for(var X=0;X<=_;X+=1){var ee=P[X].fixed;if(ee!=="left"&&ee!==!0)return!0}var j=P.findIndex(function(pe){var me=pe.fixed;return me==="right"});if(j>=0)for(var ie=j;ie<P.length;ie+=1){var de=P[ie].fixed;if(de!=="right")return!0}return!1},[P]),K=I5(P,B,R),L=ht(K,2),Y=L[0],V=L[1];return[$,Y,V,N]}function L5(e,t,r){var n=B5(e),o=n.expandIcon,a=n.expandedRowKeys,u=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,p=n.onExpandedRowsChange,v=n.childrenColumnName,g=o||y5,y=v||"children",x=D.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===Ci&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(S){return S&&xn(S)==="object"&&S[y]})?"nest":!1},[!!f,t]),C=D.useState(function(){return u||(l?x5(t,r,y):[])}),m=ht(C,2),A=m[0],F=m[1],B=D.useMemo(function(){return new Set(a||A||[])},[a,A]),R=D.useCallback(function(S){var z=r(S,t.indexOf(S)),$,P=B.has(z);P?(B.delete(z),$=Pt(B)):$=[].concat(Pt(B),[z]),F($),d&&d(!P,S),p&&p($)},[r,B,t,d,p]);return[n,x,B,g,y,R]}function H5(e,t,r){var n=e.map(function(o,a){return nc(a,a,e,t,r)});return P0(function(){return n},[n],function(o,a){return!Ao(o,a)})}function q5(e){var t=Bt(e),r=Tt({}),n=ht(r,2),o=n[1],a=Bt(null),u=Bt([]);function l(f){u.current.push(f);var d=Promise.resolve();a.current=d,d.then(function(){if(a.current===d){var p=u.current,v=t.current;u.current=[],p.forEach(function(g){t.current=g(t.current)}),a.current=null,v!==t.current&&o({})}})}return Jt(function(){return function(){a.current=null}},[]),[t.current,l]}function K5(e){var t=Bt(null),r=Bt();function n(){window.clearTimeout(r.current)}function o(u){t.current=u,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return Jt(function(){return n},[]),[o,a]}function W5(){var e=D.useState(-1),t=ht(e,2),r=t[0],n=t[1],o=D.useState(-1),a=ht(o,2),u=a[0],l=a[1],f=D.useCallback(function(d,p){n(d),l(p)},[]);return[r,u,f]}var wf=cp()?window:null;function V5(e,t){var r=xn(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,u=a===void 0?0:a,l=r.offsetScroll,f=l===void 0?0:l,d=r.getContainer,p=d===void 0?function(){return wf}:d,v=p()||wf,g=!!e;return D.useMemo(function(){return{isSticky:g,stickyClassName:g?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:u,offsetScroll:f,container:v}},[g,f,o,u,t,v])}function U5(e,t,r){var n=yt(function(){var o=t.length,a=function(d,p,v){for(var g=[],y=0,x=d;x!==p;x+=v)g.push(y),t[x].fixed&&(y+=e[x]||0);return g},u=a(0,o,1),l=a(o-1,-1,-1).reverse();return r==="rtl"?{left:l,right:u}:{left:u,right:l}},[e,t,r]);return n}function Cf(e){var t=e.className,r=e.children;return D.createElement("div",{className:t},r)}function Df(e){var t=K0(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var G5=function(t,r){var n,o,a=t.scrollBodyRef,u=t.onScroll,l=t.offsetScroll,f=t.container,d=t.direction,p=Ur(Qr,"prefixCls"),v=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,g=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,y=v&&g*(g/v),x=D.useRef(),C=q5({scrollLeft:0,isHiddenScrollBar:!0}),m=ht(C,2),A=m[0],F=m[1],B=D.useRef({delta:0,x:0}),R=D.useState(!1),S=ht(R,2),z=S[0],$=S[1],P=D.useRef(null);D.useEffect(function(){return function(){Sn.cancel(P.current)}},[]);var N=function(){$(!1)},K=function(q){q.persist(),B.current.delta=q.pageX-A.scrollLeft,B.current.x=0,$(!0),q.preventDefault()},L=function(q){var U,X=q||((U=window)===null||U===void 0?void 0:U.event),ee=X.buttons;if(!z||ee===0){z&&$(!1);return}var j=B.current.x+q.pageX-B.current.x-B.current.delta,ie=d==="rtl";j=Math.max(ie?y-g:0,Math.min(ie?0:g-y,j));var de=!ie||Math.abs(j)+Math.abs(y)<g;de&&(u({scrollLeft:j/g*(v+2)}),B.current.x=q.pageX)},Y=function(){Sn.cancel(P.current),P.current=Sn(function(){if(a.current){var q=Df(a.current).top,U=q+a.current.offsetHeight,X=f===window?document.documentElement.scrollTop+window.innerHeight:Df(f).top+f.clientHeight;F(function(ee){return je(je({},ee),{},{isHiddenScrollBar:U-Qd()<=X||q>=X-l})})}})},V=function(q){F(function(U){return je(je({},U),{},{scrollLeft:v?q/v*g:0})})};return D.useImperativeHandle(r,function(){return{setScrollLeft:V,checkScrollBarVisible:Y}}),D.useEffect(function(){var _=ko(document.body,"mouseup",N,!1),q=ko(document.body,"mousemove",L,!1);return Y(),function(){_.remove(),q.remove()}},[y,z]),D.useEffect(function(){if(a.current){for(var _=[],q=K0(a.current);q;)_.push(q),q=q.parentElement;return _.forEach(function(U){return U.addEventListener("scroll",Y,!1)}),window.addEventListener("resize",Y,!1),window.addEventListener("scroll",Y,!1),f.addEventListener("scroll",Y,!1),function(){_.forEach(function(U){return U.removeEventListener("scroll",Y)}),window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y),f.removeEventListener("scroll",Y)}}},[f]),D.useEffect(function(){A.isHiddenScrollBar||F(function(_){var q=a.current;return q?je(je({},_),{},{scrollLeft:q.scrollLeft/q.scrollWidth*q.clientWidth}):_})},[A.isHiddenScrollBar]),v<=g||!y||A.isHiddenScrollBar?null:D.createElement("div",{style:{height:Qd(),width:g,bottom:l},className:"".concat(p,"-sticky-scroll")},D.createElement("div",{onMouseDown:K,ref:x,className:tt("".concat(p,"-sticky-scroll-bar"),Ne({},"".concat(p,"-sticky-scroll-bar-active"),z)),style:{width:"".concat(y,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))};const X5=D.forwardRef(G5);var hm="rc-table",Y5=[],J5={};function Z5(){return"No Data"}function Q5(e,t){var r=je({rowKey:"key",prefixCls:hm,emptyText:Z5},e),n=r.prefixCls,o=r.className,a=r.rowClassName,u=r.style,l=r.data,f=r.rowKey,d=r.scroll,p=r.tableLayout,v=r.direction,g=r.title,y=r.footer,x=r.summary,C=r.caption,m=r.id,A=r.showHeader,F=r.components,B=r.emptyText,R=r.onRow,S=r.onHeaderRow,z=r.measureRowRender,$=r.onScroll,P=r.internalHooks,N=r.transformColumns,K=r.internalRefs,L=r.tailor,Y=r.getContainerWidth,V=r.sticky,_=r.rowHoverable,q=_===void 0?!0:_,U=l||Y5,X=!!U.length,ee=P===Ci,j=D.useCallback(function(Ft,Kt){return H0(F,Ft)||Kt},[F]),ie=D.useMemo(function(){return typeof f=="function"?f:function(Ft){var Kt=Ft&&Ft[f];return Kt}},[f]),de=j(["body"]),pe=W5(),me=ht(pe,3),we=me[0],Ie=me[1],Z=me[2],ne=L5(r,U,ie),oe=ht(ne,6),Q=oe[0],le=oe[1],ge=oe[2],he=oe[3],ke=oe[4],Ce=oe[5],xe=d==null?void 0:d.x,Ae=D.useState(0),$e=ht(Ae,2),He=$e[0],pt=$e[1],it=_5(je(je(je({},r),Q),{},{expandable:!!Q.expandedRowRender,columnTitle:Q.columnTitle,expandedKeys:ge,getRowKey:ie,onTriggerExpand:Ce,expandIcon:he,expandIconColumnIndex:Q.expandIconColumnIndex,direction:v,scrollWidth:ee&&L&&typeof xe=="number"?xe:null,clientWidth:He}),ee?N:null),Oe=ht(it,4),Le=Oe[0],Ke=Oe[1],st=Oe[2],Ze=Oe[3],Qe=st??xe,$t=D.useMemo(function(){return{columns:Le,flattenColumns:Ke}},[Le,Ke]),wt=D.useRef(),nt=D.useRef(),kt=D.useRef(),ze=D.useRef();D.useImperativeHandle(t,function(){return{nativeElement:wt.current,scrollTo:function(Kt){var Lr;if(kt.current instanceof HTMLElement){var tn=Kt.index,Tr=Kt.top,Nn=Kt.key;if(i5(Tr)){var rt;(rt=kt.current)===null||rt===void 0||rt.scrollTo({top:Tr})}else{var rn,jn=Nn??ie(U[tn]);(rn=kt.current.querySelector('[data-row-key="'.concat(jn,'"]')))===null||rn===void 0||rn.scrollIntoView()}}else(Lr=kt.current)!==null&&Lr!==void 0&&Lr.scrollTo&&kt.current.scrollTo(Kt)}}});var ce=D.useRef(),mt=D.useState(!1),At=ht(mt,2),Nt=At[0],Ct=At[1],nr=D.useState(!1),Dt=ht(nr,2),zt=Dt[0],Qt=Dt[1],lr=D.useState(new Map),dt=ht(lr,2),Xt=dt[0],Yt=dt[1],Gr=Zs(Ke),Mr=Gr.map(function(Ft){return Xt.get(Ft)}),Ir=D.useMemo(function(){return Mr},[Mr.join("_")]),Pr=U5(Ir,Ke,v),gr=d&&Gu(d.y),or=d&&Gu(Qe)||!!Q.fixed,Ht=or&&Ke.some(function(Ft){var Kt=Ft.fixed;return Kt}),w=D.useRef(),E=V5(V,n),Me=E.isSticky,O=E.offsetHeader,te=E.offsetSummary,qt=E.offsetScroll,Pe=E.stickyClassName,bt=E.container,xt=D.useMemo(function(){return x==null?void 0:x(U)},[x,U]),et=(gr||Me)&&D.isValidElement(xt)&&xt.type===Qs&&xt.props.fixed,Ot,ar,Br;gr&&(ar={overflowY:X?"scroll":"auto",maxHeight:d.y}),or&&(Ot={overflowX:"auto"},gr||(ar={overflowY:"hidden"}),Br={width:Qe===!0?"auto":Qe,minWidth:"100%"});var re=D.useCallback(function(Ft,Kt){Yt(function(Lr){if(Lr.get(Ft)!==Kt){var tn=new Map(Lr);return tn.set(Ft,Kt),tn}return Lr})},[]),vr=K5(),I=ht(vr,2),Re=I[0],at=I[1];function We(Ft,Kt){Kt&&(typeof Kt=="function"?Kt(Ft):Kt.scrollLeft!==Ft&&(Kt.scrollLeft=Ft,Kt.scrollLeft!==Ft&&setTimeout(function(){Kt.scrollLeft=Ft},0)))}var ye=In(function(Ft){var Kt=Ft.currentTarget,Lr=Ft.scrollLeft,tn=v==="rtl",Tr=typeof Lr=="number"?Lr:Kt.scrollLeft,Nn=Kt||J5;if(!at()||at()===Nn){var rt;Re(Nn),We(Tr,nt.current),We(Tr,kt.current),We(Tr,ce.current),We(Tr,(rt=w.current)===null||rt===void 0?void 0:rt.setScrollLeft)}var rn=Kt||nt.current;if(rn){var jn=ee&&L&&typeof Qe=="number"?Qe:rn.scrollWidth,wr=rn.clientWidth;if(jn===wr){Ct(!1),Qt(!1);return}tn?(Ct(-Tr<jn-wr),Qt(-Tr>0)):(Ct(Tr>0),Qt(Tr<jn-wr))}}),Be=In(function(Ft){ye(Ft),$==null||$(Ft)}),Ve=function(){if(or&&kt.current){var Kt;ye({currentTarget:K0(kt.current),scrollLeft:(Kt=kt.current)===null||Kt===void 0?void 0:Kt.scrollLeft})}else Ct(!1),Qt(!1)},ct=function(Kt){var Lr,tn=Kt.width;(Lr=w.current)===null||Lr===void 0||Lr.checkScrollBarVisible();var Tr=wt.current?wt.current.offsetWidth:tn;ee&&Y&&wt.current&&(Tr=Y(wt.current,Tr)||Tr),Tr!==He&&(Ve(),pt(Tr))},ue=D.useRef(!1);D.useEffect(function(){ue.current&&Ve()},[or,l,Le.length]),D.useEffect(function(){ue.current=!0},[]);var Ee=D.useState(0),De=ht(Ee,2),Ye=De[0],lt=De[1],Vt=D.useState(!0),Rt=ht(Vt,2),ut=Rt[0],_t=Rt[1];Bo(function(){(!L||!ee)&&(kt.current instanceof Element?lt(ef(kt.current).width):lt(ef(ze.current).width)),_t(Z4("position","sticky"))},[]),D.useEffect(function(){ee&&K&&(K.body.current=kt.current)});var un=D.useCallback(function(Ft){return D.createElement(D.Fragment,null,D.createElement(yf,Ft),et==="top"&&D.createElement(Pi,Ft,xt))},[et,xt]),wn=D.useCallback(function(Ft){return D.createElement(Pi,Ft,xt)},[xt]),Fr=j(["table"],"table"),zn=D.useMemo(function(){return p||(Ht?Qe==="max-content"?"auto":"fixed":gr||Me||Ke.some(function(Ft){var Kt=Ft.ellipsis;return Kt})?"fixed":"auto")},[gr,Ht,Ke,p,Me]),br,er={colWidths:Ir,columCount:Ke.length,stickyOffsets:Pr,onHeaderRow:S,fixHeader:gr,scroll:d},cr=D.useMemo(function(){return X?null:typeof B=="function"?B():B},[X,B]),qr=D.createElement(S5,{data:U,measureColumnWidth:gr||or||Me}),zr=D.createElement(dm,{colWidths:Ke.map(function(Ft){var Kt=Ft.width;return Kt}),columns:Ke}),Yn=C!=null?D.createElement("caption",{className:"".concat(n,"-caption")},C):void 0,Ro=Cs(r,{data:!0}),Jn=Cs(r,{aria:!0});if(gr||Me){var Zn;typeof de=="function"?(Zn=de(U,{scrollbarSize:Ye,ref:kt,onScroll:ye}),er.colWidths=Ke.map(function(Ft,Kt){var Lr=Ft.width,tn=Kt===Ke.length-1?Lr-Ye:Lr;return typeof tn=="number"&&!Number.isNaN(tn)?tn:0})):Zn=D.createElement("div",{style:je(je({},Ot),ar),onScroll:Be,ref:kt,className:tt("".concat(n,"-body"))},D.createElement(Fr,vt({style:je(je({},Br),{},{tableLayout:zn})},Jn),Yn,zr,qr,!et&&xt&&D.createElement(Pi,{stickyOffsets:Pr,flattenColumns:Ke},xt)));var mo=je(je(je({noData:!U.length},er),$t),{},{direction:v,stickyClassName:Pe,scrollX:Qe,tableLayout:zn,onScroll:ye});br=D.createElement(D.Fragment,null,A!==!1&&D.createElement(bf,vt({},mo,{stickyTopOffset:O,className:"".concat(n,"-header"),ref:nt,colGroup:zr}),un),Zn,et&&et!=="top"&&D.createElement(bf,vt({},mo,{stickyBottomOffset:te,className:"".concat(n,"-summary"),ref:ce,colGroup:zr}),wn),Me&&kt.current&&kt.current instanceof Element&&D.createElement(X5,{ref:w,offsetScroll:qt,scrollBodyRef:kt,onScroll:ye,container:bt,direction:v}))}else br=D.createElement("div",{style:je(je({},Ot),ar),className:tt("".concat(n,"-content")),onScroll:ye,ref:kt},D.createElement(Fr,vt({style:je(je({},Br),{},{tableLayout:zn})},Jn),Yn,zr,A!==!1&&D.createElement(yf,vt({},er,$t)),qr,xt&&D.createElement(Pi,{stickyOffsets:Pr,flattenColumns:Ke},xt)));var ve=D.createElement("div",vt({className:tt(n,o,Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne({},"".concat(n,"-rtl"),v==="rtl"),"".concat(n,"-ping-left"),Nt),"".concat(n,"-ping-right"),zt),"".concat(n,"-layout-fixed"),p==="fixed"),"".concat(n,"-fixed-header"),gr),"".concat(n,"-fixed-column"),Ht),"".concat(n,"-fixed-column-gapped"),Ht&&Ze),"".concat(n,"-scroll-horizontal"),or),"".concat(n,"-has-fix-left"),Ke[0]&&Ke[0].fixed),"".concat(n,"-has-fix-right"),Ke[Ke.length-1]&&Ke[Ke.length-1].fixed==="right")),style:u,id:m,ref:wt},Ro),g&&D.createElement(Cf,{className:"".concat(n,"-title")},g(U)),D.createElement("div",{ref:ze,className:"".concat(n,"-container")},br),y&&D.createElement(Cf,{className:"".concat(n,"-footer")},y(U)));or&&(ve=D.createElement(q0,{onResize:ct},ve));var dr=H5(Ke,Pr,v),Fn=D.useMemo(function(){return{scrollX:Qe,prefixCls:n,getComponent:j,scrollbarSize:Ye,direction:v,fixedInfoList:dr,isSticky:Me,supportSticky:ut,componentWidth:He,fixHeader:gr,fixColumn:Ht,horizonScroll:or,tableLayout:zn,rowClassName:a,expandedRowClassName:Q.expandedRowClassName,expandIcon:he,expandableType:le,expandRowByClick:Q.expandRowByClick,expandedRowRender:Q.expandedRowRender,expandedRowOffset:Q.expandedRowOffset,onTriggerExpand:Ce,expandIconColumnIndex:Q.expandIconColumnIndex,indentSize:Q.indentSize,allColumnsFixedLeft:Ke.every(function(Ft){return Ft.fixed==="left"}),emptyNode:cr,columns:Le,flattenColumns:Ke,onColumnResize:re,colWidths:Ir,hoverStartRow:we,hoverEndRow:Ie,onHover:Z,rowExpandable:Q.rowExpandable,onRow:R,getRowKey:ie,expandedKeys:ge,childrenColumnName:ke,rowHoverable:q,measureRowRender:z}},[Qe,n,j,Ye,v,dr,Me,ut,He,gr,Ht,or,zn,a,Q.expandedRowClassName,he,le,Q.expandRowByClick,Q.expandedRowRender,Q.expandedRowOffset,Ce,Q.expandIconColumnIndex,Q.indentSize,cr,Le,Ke,re,Ir,we,Ie,Z,Q.rowExpandable,R,ie,ge,ke,q,z]);return D.createElement(Qr.Provider,{value:Fn},ve)}var e6=D.forwardRef(Q5);function pm(e){return tm(e6,e)}var Sa=pm();Sa.EXPAND_COLUMN=Co;Sa.INTERNAL_HOOKS=Ci;Sa.Column=v5;Sa.ColumnGroup=b5;Sa.Summary=om;var ac=tc(null),mm=tc(null);function t6(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function r6(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,u=e.component,l=e.renderIndex,f=e.record,d=e.style,p=e.className,v=e.inverse,g=e.getHeight,y=r.render,x=r.dataIndex,C=r.className,m=r.width,A=Ur(mm,["columnsOffset"]),F=A.columnsOffset,B=cm(t,r,n,o,a),R=B.key,S=B.fixedInfo,z=B.appendCellNode,$=B.additionalCellProps,P=$.style,N=$.colSpan,K=N===void 0?1:N,L=$.rowSpan,Y=L===void 0?1:L,V=n-1,_=t6(V,K,F),q=K>1?m-_:0,U=je(je(je({},P),d),{},{flex:"0 0 ".concat(_,"px"),width:"".concat(_,"px"),marginRight:q,pointerEvents:"auto"}),X=D.useMemo(function(){return v?Y<=1:K===0||Y===0||Y>1},[Y,K,v]);X?U.visibility="hidden":v&&(U.height=g==null?void 0:g(Y));var ee=X?function(){return null}:y,j={};return(Y===0||K===0)&&(j.rowSpan=1,j.colSpan=1),D.createElement(ka,vt({className:tt(C,p),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:u,prefixCls:t.prefixCls,key:R,record:f,index:a,renderIndex:l,dataIndex:x,render:ee,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:z,additionalProps:je(je({},$),{},{style:U},j)}))}var n6=["data","index","className","rowKey","style","extra","getHeight"],o6=D.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,u=e.style,l=e.extra,f=e.getHeight,d=mr(e,n6),p=r.record,v=r.indent,g=r.index,y=Ur(Qr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=y.scrollX,C=y.flattenColumns,m=y.prefixCls,A=y.fixColumn,F=y.componentWidth,B=Ur(ac,["getComponent"]),R=B.getComponent,S=sm(p,a,n,v),z=R(["body","row"],"div"),$=R(["body","cell"],"div"),P=S.rowSupportExpand,N=S.expanded,K=S.rowProps,L=S.expandedRowRender,Y=S.expandedRowClassName,V;if(P&&N){var _=L(p,n,v+1,N),q=um(Y,p,n,v),U={};A&&(U={style:Ne({},"--virtual-width","".concat(F,"px"))});var X="".concat(m,"-expanded-row-cell");V=D.createElement(z,{className:tt("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(v+1),q)},D.createElement(ka,{component:$,prefixCls:m,className:tt(X,Ne({},"".concat(X,"-fixed"),A)),additionalProps:U},_))}var ee=je(je({},u),{},{width:x});l&&(ee.position="absolute",ee.pointerEvents="none");var j=D.createElement(z,vt({},K,d,{"data-row-key":a,ref:P?null:t,className:tt(o,"".concat(m,"-row"),K==null?void 0:K.className,Ne({},"".concat(m,"-row-extra"),l)),style:je(je({},ee),K==null?void 0:K.style)}),C.map(function(ie,de){return D.createElement(r6,{key:de,component:$,rowInfo:S,column:ie,colIndex:de,indent:v,index:n,renderIndex:g,record:p,inverse:l,getHeight:f})}));return P?D.createElement("div",{ref:t},j,V):j}),Ef=Ea(o6),a6=D.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Ur(Qr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,u=o.onColumnResize,l=o.getRowKey,f=o.expandedKeys,d=o.prefixCls,p=o.childrenColumnName,v=o.scrollX,g=o.direction,y=Ur(ac),x=y.sticky,C=y.scrollY,m=y.listItemHeight,A=y.getComponent,F=y.onScroll,B=D.useRef(),R=im(r,p,f,l),S=D.useMemo(function(){var V=0;return a.map(function(_){var q=_.width,U=_.minWidth,X=_.key,ee=Math.max(q||0,U||0);return V+=ee,[X,ee,V]})},[a]),z=D.useMemo(function(){return S.map(function(V){return V[2]})},[S]);D.useEffect(function(){S.forEach(function(V){var _=ht(V,2),q=_[0],U=_[1];u(q,U)})},[S]),D.useImperativeHandle(t,function(){var V,_={scrollTo:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo(U)},nativeElement:(V=B.current)===null||V===void 0?void 0:V.nativeElement};return Object.defineProperty(_,"scrollLeft",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().x)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({left:U})}}),Object.defineProperty(_,"scrollTop",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().y)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({top:U})}}),_});var $=function(_,q){var U,X=(U=R[q])===null||U===void 0?void 0:U.record,ee=_.onCell;if(ee){var j,ie=ee(X,q);return(j=ie==null?void 0:ie.rowSpan)!==null&&j!==void 0?j:1}return 1},P=function(_){var q=_.start,U=_.end,X=_.getSize,ee=_.offsetY;if(U<0)return null;for(var j=a.filter(function(ge){return $(ge,q)===0}),ie=q,de=function(he){if(j=j.filter(function(ke){return $(ke,he)===0}),!j.length)return ie=he,1},pe=q;pe>=0&&!de(pe);pe-=1);for(var me=a.filter(function(ge){return $(ge,U)!==1}),we=U,Ie=function(he){if(me=me.filter(function(ke){return $(ke,he)!==1}),!me.length)return we=Math.max(he-1,U),1},Z=U;Z<R.length&&!Ie(Z);Z+=1);for(var ne=[],oe=function(he){var ke=R[he];if(!ke)return 1;a.some(function(Ce){return $(Ce,he)>1})&&ne.push(he)},Q=ie;Q<=we;Q+=1)oe(Q);var le=ne.map(function(ge){var he=R[ge],ke=l(he.record,ge),Ce=function($e){var He=ge+$e-1,pt=l(R[He].record,He),it=X(ke,pt);return it.bottom-it.top},xe=X(ke);return D.createElement(Ef,{key:ge,data:he,rowKey:ke,index:ge,style:{top:-ee+xe.top},extra:!0,getHeight:Ce})});return le},N=D.useMemo(function(){return{columnsOffset:z}},[z]),K="".concat(d,"-tbody"),L=A(["body","wrapper"]),Y={};return x&&(Y.position="sticky",Y.bottom=0,xn(x)==="object"&&x.offsetScroll&&(Y.bottom=x.offsetScroll)),D.createElement(mm.Provider,{value:N},D.createElement(Cp,{fullHeight:!1,ref:B,prefixCls:"".concat(K,"-virtual"),styles:{horizontalScrollBar:Y},className:K,height:C,itemHeight:m||24,data:R,itemKey:function(_){return l(_.record)},component:L,scrollWidth:v,direction:g,onVirtualScroll:function(_){var q,U=_.x;n({currentTarget:(q=B.current)===null||q===void 0?void 0:q.nativeElement,scrollLeft:U})},onScroll:F,extraRender:P},function(V,_,q){var U=l(V.record,_);return D.createElement(Ef,{data:V,rowKey:U,index:_,style:q.style})}))}),i6=Ea(a6),s6=function(t,r){var n=r.ref,o=r.onScroll;return D.createElement(i6,{ref:n,data:t,onScroll:o})};function l6(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,u=e.prefixCls,l=u===void 0?hm:u,f=e.className,d=e.listItemHeight,p=e.components,v=e.onScroll,g=o||{},y=g.x,x=g.y;typeof y!="number"&&(y=1),typeof x!="number"&&(x=500);var C=In(function(F,B){return H0(p,F)||B}),m=In(v),A=D.useMemo(function(){return{sticky:a,scrollY:x,listItemHeight:d,getComponent:C,onScroll:m}},[a,x,d,C,m]);return D.createElement(ac.Provider,{value:A},D.createElement(Sa,vt({},e,{className:tt(f,"".concat(l,"-virtual")),scroll:je(je({},o),{},{x:y}),components:je(je({},p),{},{body:r!=null&&r.length?s6:void 0}),columns:n,internalHooks:Ci,tailor:!0,ref:t})))}var u6=D.forwardRef(l6);function gm(e){return tm(u6,e)}gm();const c6=e=>null,d6=e=>null;var ic=D.createContext(null),f6=D.createContext({}),h6=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,u="".concat(r,"-indent-unit"),l=[],f=0;f<n;f+=1)l.push(D.createElement("span",{key:f,className:tt(u,Ne(Ne({},"".concat(u,"-start"),o[f]),"".concat(u,"-end"),a[f]))}));return D.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},l)};const p6=D.memo(h6);var m6=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],kf="open",Sf="close",g6="---",ri=function(t){var r,n,o,a=t.eventKey,u=t.className,l=t.style,f=t.dragOver,d=t.dragOverGapTop,p=t.dragOverGapBottom,v=t.isLeaf,g=t.isStart,y=t.isEnd,x=t.expanded,C=t.selected,m=t.checked,A=t.halfChecked,F=t.loading,B=t.domRef,R=t.active,S=t.data,z=t.onMouseMove,$=t.selectable,P=mr(t,m6),N=_e.useContext(ic),K=_e.useContext(f6),L=_e.useRef(null),Y=_e.useState(!1),V=ht(Y,2),_=V[0],q=V[1],U=!!(N.disabled||t.disabled||(r=K.nodeDisabled)!==null&&r!==void 0&&r.call(K,S)),X=_e.useMemo(function(){return!N.checkable||t.checkable===!1?!1:N.checkable},[N.checkable,t.checkable]),ee=function(ce){U||N.onNodeSelect(ce,jr(t))},j=function(ce){U||!X||t.disableCheckbox||N.onNodeCheck(ce,jr(t),!m)},ie=_e.useMemo(function(){return typeof $=="boolean"?$:N.selectable},[$,N.selectable]),de=function(ce){N.onNodeClick(ce,jr(t)),ie?ee(ce):j(ce)},pe=function(ce){N.onNodeDoubleClick(ce,jr(t))},me=function(ce){N.onNodeMouseEnter(ce,jr(t))},we=function(ce){N.onNodeMouseLeave(ce,jr(t))},Ie=function(ce){N.onNodeContextMenu(ce,jr(t))},Z=_e.useMemo(function(){return!!(N.draggable&&(!N.draggable.nodeDraggable||N.draggable.nodeDraggable(S)))},[N.draggable,S]),ne=function(ce){ce.stopPropagation(),q(!0),N.onNodeDragStart(ce,t);try{ce.dataTransfer.setData("text/plain","")}catch{}},oe=function(ce){ce.preventDefault(),ce.stopPropagation(),N.onNodeDragEnter(ce,t)},Q=function(ce){ce.preventDefault(),ce.stopPropagation(),N.onNodeDragOver(ce,t)},le=function(ce){ce.stopPropagation(),N.onNodeDragLeave(ce,t)},ge=function(ce){ce.stopPropagation(),q(!1),N.onNodeDragEnd(ce,t)},he=function(ce){ce.preventDefault(),ce.stopPropagation(),q(!1),N.onNodeDrop(ce,t)},ke=function(ce){F||N.onNodeExpand(ce,jr(t))},Ce=_e.useMemo(function(){var ze=hn(N.keyEntities,a)||{},ce=ze.children;return!!(ce||[]).length},[N.keyEntities,a]),xe=_e.useMemo(function(){return v===!1?!1:v||!N.loadData&&!Ce||N.loadData&&t.loaded&&!Ce},[v,N.loadData,Ce,t.loaded]);_e.useEffect(function(){F||typeof N.loadData=="function"&&x&&!xe&&!t.loaded&&N.onNodeLoad(jr(t))},[F,N.loadData,N.onNodeLoad,x,xe,t]);var Ae=_e.useMemo(function(){var ze;return(ze=N.draggable)!==null&&ze!==void 0&&ze.icon?_e.createElement("span",{className:"".concat(N.prefixCls,"-draggable-icon")},N.draggable.icon):null},[N.draggable]),$e=function(ce){var mt=t.switcherIcon||N.switcherIcon;return typeof mt=="function"?mt(je(je({},t),{},{isLeaf:ce})):mt},He=function(){if(xe){var ce=$e(!0);return ce!==!1?_e.createElement("span",{className:tt("".concat(N.prefixCls,"-switcher"),"".concat(N.prefixCls,"-switcher-noop"))},ce):null}var mt=$e(!1);return mt!==!1?_e.createElement("span",{onClick:ke,className:tt("".concat(N.prefixCls,"-switcher"),"".concat(N.prefixCls,"-switcher_").concat(x?kf:Sf))},mt):null},pt=_e.useMemo(function(){if(!X)return null;var ze=typeof X!="boolean"?X:null;return _e.createElement("span",{className:tt("".concat(N.prefixCls,"-checkbox"),Ne(Ne(Ne({},"".concat(N.prefixCls,"-checkbox-checked"),m),"".concat(N.prefixCls,"-checkbox-indeterminate"),!m&&A),"".concat(N.prefixCls,"-checkbox-disabled"),U||t.disableCheckbox)),onClick:j,role:"checkbox","aria-checked":A?"mixed":m,"aria-disabled":U||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},ze)},[X,m,A,U,t.disableCheckbox,t.title]),it=_e.useMemo(function(){return xe?null:x?kf:Sf},[xe,x]),Oe=_e.useMemo(function(){return _e.createElement("span",{className:tt("".concat(N.prefixCls,"-iconEle"),"".concat(N.prefixCls,"-icon__").concat(it||"docu"),Ne({},"".concat(N.prefixCls,"-icon_loading"),F))})},[N.prefixCls,it,F]),Le=_e.useMemo(function(){var ze=!!N.draggable,ce=!t.disabled&&ze&&N.dragOverNodeKey===a;return ce?N.dropIndicatorRender({dropPosition:N.dropPosition,dropLevelOffset:N.dropLevelOffset,indent:N.indent,prefixCls:N.prefixCls,direction:N.direction}):null},[N.dropPosition,N.dropLevelOffset,N.indent,N.prefixCls,N.direction,N.draggable,N.dragOverNodeKey,N.dropIndicatorRender]),Ke=_e.useMemo(function(){var ze=t.title,ce=ze===void 0?g6:ze,mt="".concat(N.prefixCls,"-node-content-wrapper"),At;if(N.showIcon){var Nt=t.icon||N.icon;At=Nt?_e.createElement("span",{className:tt("".concat(N.prefixCls,"-iconEle"),"".concat(N.prefixCls,"-icon__customize"))},typeof Nt=="function"?Nt(t):Nt):Oe}else N.loadData&&F&&(At=Oe);var Ct;return typeof ce=="function"?Ct=ce(S):N.titleRender?Ct=N.titleRender(S):Ct=ce,_e.createElement("span",{ref:L,title:typeof ce=="string"?ce:"",className:tt(mt,"".concat(mt,"-").concat(it||"normal"),Ne({},"".concat(N.prefixCls,"-node-selected"),!U&&(C||_))),onMouseEnter:me,onMouseLeave:we,onContextMenu:Ie,onClick:de,onDoubleClick:pe},At,_e.createElement("span",{className:"".concat(N.prefixCls,"-title")},Ct),Le)},[N.prefixCls,N.showIcon,t,N.icon,Oe,N.titleRender,S,it,me,we,Ie,de,pe]),st=Cs(P,{aria:!0,data:!0}),Ze=hn(N.keyEntities,a)||{},Qe=Ze.level,$t=y[y.length-1],wt=!U&&Z,nt=N.draggingNodeKey===a,kt=$!==void 0?{"aria-selected":!!$}:void 0;return _e.createElement("div",vt({ref:B,role:"treeitem","aria-expanded":v?void 0:x,className:tt(u,"".concat(N.prefixCls,"-treenode"),(o={},Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(Ne(o,"".concat(N.prefixCls,"-treenode-disabled"),U),"".concat(N.prefixCls,"-treenode-switcher-").concat(x?"open":"close"),!v),"".concat(N.prefixCls,"-treenode-checkbox-checked"),m),"".concat(N.prefixCls,"-treenode-checkbox-indeterminate"),A),"".concat(N.prefixCls,"-treenode-selected"),C),"".concat(N.prefixCls,"-treenode-loading"),F),"".concat(N.prefixCls,"-treenode-active"),R),"".concat(N.prefixCls,"-treenode-leaf-last"),$t),"".concat(N.prefixCls,"-treenode-draggable"),Z),"dragging",nt),Ne(Ne(Ne(Ne(Ne(Ne(Ne(o,"drop-target",N.dropTargetKey===a),"drop-container",N.dropContainerKey===a),"drag-over",!U&&f),"drag-over-gap-top",!U&&d),"drag-over-gap-bottom",!U&&p),"filter-node",(n=N.filterTreeNode)===null||n===void 0?void 0:n.call(N,jr(t))),"".concat(N.prefixCls,"-treenode-leaf"),xe))),style:l,draggable:wt,onDragStart:wt?ne:void 0,onDragEnter:Z?oe:void 0,onDragOver:Z?Q:void 0,onDragLeave:Z?le:void 0,onDrop:Z?he:void 0,onDragEnd:Z?ge:void 0,onMouseMove:z},kt,st),_e.createElement(p6,{prefixCls:N.prefixCls,level:Qe,isStart:g,isEnd:y}),Ae,He(),pt,Ke)};ri.isTreeNode=1;function Wn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function no(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function sc(e){return e.split("-")}function v6(e,t){var r=[],n=hn(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(u){var l=u.key,f=u.children;r.push(l),o(f)})}return o(n.children),r}function b6(e){if(e.parent){var t=sc(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function y6(e){var t=sc(e.pos);return Number(t[t.length-1])===0}function Af(e,t,r,n,o,a,u,l,f,d){var p,v=e.clientX,g=e.clientY,y=e.target.getBoundingClientRect(),x=y.top,C=y.height,m=(d==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-v),A=(m-12)/n,F=f.filter(function(U){var X;return(X=l[U])===null||X===void 0||(X=X.children)===null||X===void 0?void 0:X.length}),B=hn(l,r.eventKey);if(g<x+C/2){var R=u.findIndex(function(U){return U.key===B.key}),S=R<=0?0:R-1,z=u[S].key;B=hn(l,z)}var $=B.key,P=B,N=B.key,K=0,L=0;if(!F.includes($))for(var Y=0;Y<A&&b6(B);Y+=1)B=B.parent,L+=1;var V=t.data,_=B.node,q=!0;return y6(B)&&B.level===0&&g<x+C/2&&a({dragNode:V,dropNode:_,dropPosition:-1})&&B.key===r.eventKey?K=-1:(P.children||[]).length&&F.includes(N)?a({dragNode:V,dropNode:_,dropPosition:0})?K=0:q=!1:L===0?A>-1.5?a({dragNode:V,dropNode:_,dropPosition:1})?K=1:q=!1:a({dragNode:V,dropNode:_,dropPosition:0})?K=0:a({dragNode:V,dropNode:_,dropPosition:1})?K=1:q=!1:a({dragNode:V,dropNode:_,dropPosition:1})?K=1:q=!1,{dropPosition:K,dropLevelOffset:L,dropTargetKey:B.key,dropTargetPos:B.pos,dragOverNodeKey:N,dropContainerKey:K===0?null:((p=B.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:q}}function Bf(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Xl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(xn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Xn(!1,"`checkedKeys` is not an array or an object"),null;return t}function Yu(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=hn(t,o);if(a){r.add(o);var u=a.parent,l=a.node;l.disabled||u&&n(u.key)}}}return(e||[]).forEach(function(o){n(o)}),Pt(r)}const xo={},Ju="SELECT_ALL",Zu="SELECT_INVERT",Qu="SELECT_NONE",Ff=[],vm=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&vm(e,n[e],r)}),r),x6=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:u,onChange:l,onSelect:f,onSelectAll:d,onSelectInvert:p,onSelectNone:v,onSelectMultiple:g,columnWidth:y,type:x,selections:C,fixed:m,renderCell:A,hideSelectAll:F,checkStrictly:B=!0}=t||{},{prefixCls:R,data:S,pageData:z,getRecordByKey:$,getRowKey:P,expandType:N,childrenColumnName:K,locale:L,getPopupContainer:Y}=e,V=Vs(),[_,q]=U4(he=>he),[U,X]=lo(n||o||Ff,{value:n}),ee=D.useRef(new Map),j=St(he=>{if(r){const ke=new Map;he.forEach(Ce=>{let xe=$(Ce);!xe&&ee.current.has(Ce)&&(xe=ee.current.get(Ce)),ke.set(Ce,xe)}),ee.current=ke}},[$,r]);D.useEffect(()=>{j(U)},[U]);const ie=yt(()=>vm(K,z),[K,z]),{keyEntities:de}=yt(()=>{if(B)return{keyEntities:null};let he=S;if(r){const ke=new Set(ie.map((xe,Ae)=>P(xe,Ae))),Ce=Array.from(ee.current).reduce((xe,[Ae,$e])=>ke.has(Ae)?xe:xe.concat($e),[]);he=[].concat(Pt(he),Pt(Ce))}return Z0(he,{externalGetKey:P,childrenPropName:K})},[S,P,B,K,r,ie]),pe=yt(()=>{const he=new Map;return ie.forEach((ke,Ce)=>{const xe=P(ke,Ce),Ae=(a?a(ke):null)||{};he.set(xe,Ae)}),he},[ie,P,a]),me=St(he=>{const ke=P(he);let Ce;return pe.has(ke)?Ce=pe.get(P(he)):Ce=a?a(he):void 0,!!(Ce!=null&&Ce.disabled)},[pe,P]),[we,Ie]=yt(()=>{if(B)return[U||[],[]];const{checkedKeys:he,halfCheckedKeys:ke}=ua(U,!0,de,me);return[he||[],ke]},[U,B,de,me]),Z=yt(()=>{const he=x==="radio"?we.slice(0,1):we;return new Set(he)},[we,x]),ne=yt(()=>x==="radio"?new Set:new Set(Ie),[Ie,x]);D.useEffect(()=>{t||X(Ff)},[!!t]);const oe=St((he,ke)=>{let Ce,xe;j(he),r?(Ce=he,xe=he.map(Ae=>ee.current.get(Ae))):(Ce=[],xe=[],he.forEach(Ae=>{const $e=$(Ae);$e!==void 0&&(Ce.push(Ae),xe.push($e))})),X(Ce),l==null||l(Ce,xe,{type:ke})},[X,$,l,r]),Q=St((he,ke,Ce,xe)=>{if(f){const Ae=Ce.map($e=>$($e));f($(he),ke,Ae,xe)}oe(Ce,"single")},[f,$,oe]),le=yt(()=>!C||F?null:(C===!0?[Ju,Zu,Qu]:C).map(ke=>ke===Ju?{key:"all",text:L.selectionAll,onSelect(){oe(S.map((Ce,xe)=>P(Ce,xe)).filter(Ce=>{const xe=pe.get(Ce);return!(xe!=null&&xe.disabled)||Z.has(Ce)}),"all")}}:ke===Zu?{key:"invert",text:L.selectInvert,onSelect(){const Ce=new Set(Z);z.forEach((Ae,$e)=>{const He=P(Ae,$e),pt=pe.get(He);pt!=null&&pt.disabled||(Ce.has(He)?Ce.delete(He):Ce.add(He))});const xe=Array.from(Ce);p&&(V.deprecated(!1,"onSelectInvert","onChange"),p(xe)),oe(xe,"invert")}}:ke===Qu?{key:"none",text:L.selectNone,onSelect(){v==null||v(),oe(Array.from(Z).filter(Ce=>{const xe=pe.get(Ce);return xe==null?void 0:xe.disabled}),"none")}}:ke).map(ke=>Object.assign(Object.assign({},ke),{onSelect:(...Ce)=>{var xe,Ae;(Ae=ke.onSelect)===null||Ae===void 0||(xe=Ae).call.apply(xe,[ke].concat(Ce)),q(null)}})),[C,Z,z,P,p,oe]);return[St(he=>{var ke;if(!t)return he.filter(ze=>ze!==xo);let Ce=Pt(he);const xe=new Set(Z),Ae=ie.map(P).filter(ze=>!pe.get(ze).disabled),$e=Ae.every(ze=>xe.has(ze)),He=Ae.some(ze=>xe.has(ze)),pt=()=>{const ze=[];$e?Ae.forEach(mt=>{xe.delete(mt),ze.push(mt)}):Ae.forEach(mt=>{xe.has(mt)||(xe.add(mt),ze.push(mt))});const ce=Array.from(xe);d==null||d(!$e,ce.map(mt=>$(mt)),ze.map(mt=>$(mt))),oe(ce,"all"),q(null)};let it,Oe;if(x!=="radio"){let ze;if(le){const zt={getPopupContainer:Y,items:le.map((Qt,lr)=>{const{key:dt,text:Xt,onSelect:Yt}=Qt;return{key:dt??lr,onClick:()=>{Yt==null||Yt(Ae)},label:Xt}})};ze=D.createElement("div",{className:`${R}-selection-extra`},D.createElement(Q0,{menu:zt,getPopupContainer:Y},D.createElement("span",null,D.createElement(N4,null))))}const ce=ie.map((zt,Qt)=>{const lr=P(zt,Qt),dt=pe.get(lr)||{};return Object.assign({checked:xe.has(lr)},dt)}).filter(({disabled:zt})=>zt),mt=!!ce.length&&ce.length===ie.length,At=mt&&ce.every(({checked:zt})=>zt),Nt=mt&&ce.some(({checked:zt})=>zt),Ct=(u==null?void 0:u())||{},{onChange:nr,disabled:Dt}=Ct;Oe=D.createElement(Ds,Object.assign({"aria-label":ze?"Custom selection":"Select all"},Ct,{checked:mt?At:!!ie.length&&$e,indeterminate:mt?!At&&Nt:!$e&&He,onChange:zt=>{pt(),nr==null||nr(zt)},disabled:Dt??(ie.length===0||mt),skipGroup:!0})),it=!F&&D.createElement("div",{className:`${R}-selection`},Oe,ze)}let Le;x==="radio"?Le=(ze,ce,mt)=>{const At=P(ce,mt),Nt=xe.has(At),Ct=pe.get(At);return{node:D.createElement(up,Object.assign({},Ct,{checked:Nt,onClick:nr=>{var Dt;nr.stopPropagation(),(Dt=Ct==null?void 0:Ct.onClick)===null||Dt===void 0||Dt.call(Ct,nr)},onChange:nr=>{var Dt;xe.has(At)||Q(At,!0,[At],nr.nativeEvent),(Dt=Ct==null?void 0:Ct.onChange)===null||Dt===void 0||Dt.call(Ct,nr)}})),checked:Nt}}:Le=(ze,ce,mt)=>{var At;const Nt=P(ce,mt),Ct=xe.has(Nt),nr=ne.has(Nt),Dt=pe.get(Nt);let zt;return N==="nest"?zt=nr:zt=(At=Dt==null?void 0:Dt.indeterminate)!==null&&At!==void 0?At:nr,{node:D.createElement(Ds,Object.assign({},Dt,{indeterminate:zt,checked:Ct,skipGroup:!0,onClick:Qt=>{var lr;Qt.stopPropagation(),(lr=Dt==null?void 0:Dt.onClick)===null||lr===void 0||lr.call(Dt,Qt)},onChange:Qt=>{var lr;const{nativeEvent:dt}=Qt,{shiftKey:Xt}=dt,Yt=Ae.indexOf(Nt),Gr=we.some(Mr=>Ae.includes(Mr));if(Xt&&B&&Gr){const Mr=_(Yt,Ae,xe),Ir=Array.from(xe);g==null||g(!Ct,Ir.map(Pr=>$(Pr)),Mr.map(Pr=>$(Pr))),oe(Ir,"multiple")}else{const Mr=we;if(B){const Ir=Ct?Wn(Mr,Nt):no(Mr,Nt);Q(Nt,!Ct,Ir,dt)}else{const Ir=ua([].concat(Pt(Mr),[Nt]),!0,de,me),{checkedKeys:Pr,halfCheckedKeys:gr}=Ir;let or=Pr;if(Ct){const Ht=new Set(Pr);Ht.delete(Nt),or=ua(Array.from(Ht),{halfCheckedKeys:gr},de,me).checkedKeys}Q(Nt,!Ct,or,dt)}}q(Ct?null:Yt),(lr=Dt==null?void 0:Dt.onChange)===null||lr===void 0||lr.call(Dt,Qt)}})),checked:Ct}};const Ke=(ze,ce,mt)=>{const{node:At,checked:Nt}=Le(ze,ce,mt);return A?A(Nt,ce,mt,At):At};if(!Ce.includes(xo))if(Ce.findIndex(ze=>{var ce;return((ce=ze[Ga])===null||ce===void 0?void 0:ce.columnType)==="EXPAND_COLUMN"})===0){const[ze,...ce]=Ce;Ce=[ze,xo].concat(Pt(ce))}else Ce=[xo].concat(Pt(Ce));const st=Ce.indexOf(xo);Ce=Ce.filter((ze,ce)=>ze!==xo||ce===st);const Ze=Ce[st-1],Qe=Ce[st+1];let $t=m;$t===void 0&&((Qe==null?void 0:Qe.fixed)!==void 0?$t=Qe.fixed:(Ze==null?void 0:Ze.fixed)!==void 0&&($t=Ze.fixed)),$t&&Ze&&((ke=Ze[Ga])===null||ke===void 0?void 0:ke.columnType)==="EXPAND_COLUMN"&&Ze.fixed===void 0&&(Ze.fixed=$t);const wt=tt(`${R}-selection-col`,{[`${R}-selection-col-with-dropdown`]:C&&x==="checkbox"}),nt=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Oe):t.columnTitle:it,kt={fixed:$t,width:y,className:`${R}-selection-column`,title:nt(),render:Ke,onCell:t.onCell,align:t.align,[Ga]:{className:wt}};return Ce.map(ze=>ze===xo?kt:ze)},[P,ie,t,we,Z,ne,y,le,N,pe,g,Q,me]),Z]};function w6(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:u}=t,l=`${r}-row-expand-icon`;return D.createElement("button",{type:"button",onClick:f=>{n(o,f),f.stopPropagation()},className:tt(l,{[`${l}-spaced`]:!u,[`${l}-expanded`]:u&&a,[`${l}-collapsed`]:u&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function C6(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const u=getComputedStyle(o),l=Number.parseInt(u.borderLeftWidth,10),f=Number.parseInt(u.borderRightWidth,10);a=n-l-f}return a}}const Fo=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function Aa(e,t){return t?`${t}-${e}`:`${e}`}const el=(e,t)=>typeof e=="function"?e(t):e,D6=(e,t)=>{const r=el(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var E6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},k6=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:E6}))},S6=D.forwardRef(k6),A6=function(t){var r=t.dropPosition,n=t.dropLevelOffset,o=t.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:a.top=0,a.left=-n*o;break;case 1:a.bottom=0,a.left=-n*o;break;case 0:a.bottom=0,a.left=o;break}return _e.createElement("div",{style:a})};function bm(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function B6(e,t){var r=D.useState(!1),n=ht(r,2),o=n[0],a=n[1];Bo(function(){if(o)return e(),function(){t()}},[o]),Bo(function(){return a(!0),function(){a(!1)}},[])}var F6=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],N6=D.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,u=e.motionType,l=e.onMotionStart,f=e.onMotionEnd,d=e.active,p=e.treeNodeRequiredProps,v=mr(e,F6),g=D.useState(!0),y=ht(g,2),x=y[0],C=y[1],m=D.useContext(ic),A=m.prefixCls,F=a&&u!=="hide";Bo(function(){a&&F!==x&&C(F)},[a]);var B=function(){a&&l()},R=D.useRef(!1),S=function(){a&&!R.current&&(R.current=!0,f())};B6(B,S);var z=function(P){F===P&&S()};return a?D.createElement(z0,vt({ref:t,visible:x},o,{motionAppear:u==="show",onVisibleChanged:z}),function($,P){var N=$.className,K=$.style;return D.createElement("div",{ref:P,className:tt("".concat(A,"-treenode-motion"),N),style:K},a.map(function(L){var Y=Object.assign({},(bm(L.data),L.data)),V=L.title,_=L.key,q=L.isStart,U=L.isEnd;delete Y.children;var X=Ua(_,p);return D.createElement(ri,vt({},Y,X,{title:V,active:d,data:L.data,key:_,isStart:q,isEnd:U}))}))}):D.createElement(ri,vt({domRef:t,className:r,style:n},v,{active:d}))});function $6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,u){var l=new Map;a.forEach(function(d){l.set(d,!0)});var f=u.filter(function(d){return!l.has(d)});return f.length===1?f[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function Nf(e,t,r){var n=e.findIndex(function(l){return l.key===r}),o=e[n+1],a=t.findIndex(function(l){return l.key===r});if(o){var u=t.findIndex(function(l){return l.key===o.key});return t.slice(a+1,u)}return t.slice(a+1)}var T6=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],$f={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},O6=function(){},Vo="RC_TREE_MOTION_".concat(Math.random()),e0={key:Vo},ym={key:Vo,level:0,index:0,pos:"0",node:e0,nodes:[e0]},Tf={parent:null,children:[],pos:ym.pos,data:e0,title:null,key:Vo,isStart:[],isEnd:[]};function Of(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Rf(e){var t=e.key,r=e.pos;return xi(t,r)}function R6(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var M6=D.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,u=e.checkedKeys,l=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,p=e.keyEntities,v=e.disabled,g=e.dragging,y=e.dragOverNodeKey,x=e.dropPosition,C=e.motion,m=e.height,A=e.itemHeight,F=e.virtual,B=e.scrollWidth,R=e.focusable,S=e.activeItem,z=e.focused,$=e.tabIndex,P=e.onKeyDown,N=e.onFocus,K=e.onBlur,L=e.onActiveChange,Y=e.onListChangeStart,V=e.onListChangeEnd,_=mr(e,T6),q=D.useRef(null),U=D.useRef(null);D.useImperativeHandle(t,function(){return{scrollTo:function(Le){q.current.scrollTo(Le)},getIndentWidth:function(){return U.current.offsetWidth}}});var X=D.useState(o),ee=ht(X,2),j=ee[0],ie=ee[1],de=D.useState(n),pe=ht(de,2),me=pe[0],we=pe[1],Ie=D.useState(n),Z=ht(Ie,2),ne=Z[0],oe=Z[1],Q=D.useState([]),le=ht(Q,2),ge=le[0],he=le[1],ke=D.useState(null),Ce=ht(ke,2),xe=Ce[0],Ae=Ce[1],$e=D.useRef(n);$e.current=n;function He(){var Oe=$e.current;we(Oe),oe(Oe),he([]),Ae(null),V()}Bo(function(){ie(o);var Oe=$6(j,o);if(Oe.key!==null)if(Oe.add){var Le=me.findIndex(function(wt){var nt=wt.key;return nt===Oe.key}),Ke=Of(Nf(me,n,Oe.key),F,m,A),st=me.slice();st.splice(Le+1,0,Tf),oe(st),he(Ke),Ae("show")}else{var Ze=n.findIndex(function(wt){var nt=wt.key;return nt===Oe.key}),Qe=Of(Nf(n,me,Oe.key),F,m,A),$t=n.slice();$t.splice(Ze+1,0,Tf),oe($t),he(Qe),Ae("hide")}else me!==n&&(we(n),oe(n))},[o,n]),D.useEffect(function(){g||He()},[g]);var pt=C?ne:n,it={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:f,checkedKeys:u,halfCheckedKeys:d,dragOverNodeKey:y,dropPosition:x,keyEntities:p};return D.createElement(D.Fragment,null,z&&S&&D.createElement("span",{style:$f,"aria-live":"assertive"},R6(S)),D.createElement("div",null,D.createElement("input",{style:$f,disabled:R===!1||v,tabIndex:R!==!1?$:null,onKeyDown:P,onFocus:N,onBlur:K,value:"",onChange:O6,"aria-label":"for screen reader"})),D.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},D.createElement("div",{className:"".concat(r,"-indent")},D.createElement("div",{ref:U,className:"".concat(r,"-indent-unit")}))),D.createElement(Cp,vt({},_,{data:pt,itemKey:Rf,height:m,fullHeight:!1,virtual:F,itemHeight:A,scrollWidth:B,prefixCls:"".concat(r,"-list"),ref:q,role:"tree",onVisibleChange:function(Le){Le.every(function(Ke){return Rf(Ke)!==Vo})&&He()}}),function(Oe){var Le=Oe.pos,Ke=Object.assign({},(bm(Oe.data),Oe.data)),st=Oe.title,Ze=Oe.key,Qe=Oe.isStart,$t=Oe.isEnd,wt=xi(Ze,Le);delete Ke.key,delete Ke.children;var nt=Ua(wt,it);return D.createElement(N6,vt({},Ke,nt,{title:st,active:!!S&&Ze===S.key,pos:Le,data:Oe.data,isStart:Qe,isEnd:$t,motion:C,motionNodes:Ze===Vo?ge:null,motionType:xe,onMotionStart:Y,onMotionEnd:He,treeNodeRequiredProps:it,onMouseMove:function(){L(null)}}))}))}),I6=10,lc=(function(e){mp(r,e);var t=gp(r);function r(){var n;vp(this,r);for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),Ne(Gt(n),"destroyed",!1),Ne(Gt(n),"delayedDragEnterLogic",void 0),Ne(Gt(n),"loadingRetryTimes",{}),Ne(Gt(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:pa()}),Ne(Gt(n),"dragStartMousePosition",null),Ne(Gt(n),"dragNodeProps",null),Ne(Gt(n),"currentMouseOverDroppableNodeKey",null),Ne(Gt(n),"listRef",D.createRef()),Ne(Gt(n),"onNodeDragStart",function(l,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=n.props.onDragStart,y=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var x=Wn(p,y);n.setState({draggingNodeKey:y,dragChildrenKeys:v6(y,v),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(x),window.addEventListener("dragend",n.onWindowDragEnd),g==null||g({event:l,node:jr(f)})}),Ne(Gt(n),"onNodeDragEnter",function(l,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=d.dragChildrenKeys,y=d.flattenNodes,x=d.indent,C=n.props,m=C.onDragEnter,A=C.onExpand,F=C.allowDrop,B=C.direction,R=f.pos,S=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==S&&(n.currentMouseOverDroppableNodeKey=S),!n.dragNodeProps){n.resetDragState();return}var z=Af(l,n.dragNodeProps,f,x,n.dragStartMousePosition,F,y,v,p,B),$=z.dropPosition,P=z.dropLevelOffset,N=z.dropTargetKey,K=z.dropContainerKey,L=z.dropTargetPos,Y=z.dropAllowed,V=z.dragOverNodeKey;if(g.includes(N)||!Y){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(_){clearTimeout(n.delayedDragEnterLogic[_])}),n.dragNodeProps.eventKey!==f.eventKey&&(l.persist(),n.delayedDragEnterLogic[R]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var _=Pt(p),q=hn(v,f.eventKey);q&&(q.children||[]).length&&(_=no(p,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(_),A==null||A(_,{node:jr(f),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===N&&P===0){n.resetDragState();return}n.setState({dragOverNodeKey:V,dropPosition:$,dropLevelOffset:P,dropTargetKey:N,dropContainerKey:K,dropTargetPos:L,dropAllowed:Y}),m==null||m({event:l,node:jr(f),expandedKeys:p})}),Ne(Gt(n),"onNodeDragOver",function(l,f){var d=n.state,p=d.dragChildrenKeys,v=d.flattenNodes,g=d.keyEntities,y=d.expandedKeys,x=d.indent,C=n.props,m=C.onDragOver,A=C.allowDrop,F=C.direction;if(n.dragNodeProps){var B=Af(l,n.dragNodeProps,f,x,n.dragStartMousePosition,A,v,g,y,F),R=B.dropPosition,S=B.dropLevelOffset,z=B.dropTargetKey,$=B.dropContainerKey,P=B.dropTargetPos,N=B.dropAllowed,K=B.dragOverNodeKey;p.includes(z)||!N||(n.dragNodeProps.eventKey===z&&S===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():R===n.state.dropPosition&&S===n.state.dropLevelOffset&&z===n.state.dropTargetKey&&$===n.state.dropContainerKey&&P===n.state.dropTargetPos&&N===n.state.dropAllowed&&K===n.state.dragOverNodeKey||n.setState({dropPosition:R,dropLevelOffset:S,dropTargetKey:z,dropContainerKey:$,dropTargetPos:P,dropAllowed:N,dragOverNodeKey:K}),m==null||m({event:l,node:jr(f)}))}}),Ne(Gt(n),"onNodeDragLeave",function(l,f){n.currentMouseOverDroppableNodeKey===f.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var d=n.props.onDragLeave;d==null||d({event:l,node:jr(f)})}),Ne(Gt(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),Ne(Gt(n),"onNodeDragEnd",function(l,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:l,node:jr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),Ne(Gt(n),"onNodeDrop",function(l,f){var d,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=n.state,g=v.dragChildrenKeys,y=v.dropPosition,x=v.dropTargetKey,C=v.dropTargetPos,m=v.dropAllowed;if(m){var A=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),x!==null){var F=je(je({},Ua(x,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:hn(n.state.keyEntities,x).node}),B=g.includes(x);Xn(!B,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var R=sc(C),S={event:l,node:jr(F),dragNode:n.dragNodeProps?jr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(g),dropToGap:y!==0,dropPosition:y+Number(R[R.length-1])};p||A==null||A(S),n.dragNodeProps=null}}}),Ne(Gt(n),"cleanDragState",function(){var l=n.state.draggingNodeKey;l!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),Ne(Gt(n),"triggerExpandActionExpand",function(l,f){var d=n.state,p=d.expandedKeys,v=d.flattenNodes,g=f.expanded,y=f.key,x=f.isLeaf;if(!(x||l.shiftKey||l.metaKey||l.ctrlKey)){var C=v.filter(function(A){return A.key===y})[0],m=jr(je(je({},Ua(y,n.getTreeNodeRequiredProps())),{},{data:C.data}));n.setExpandedKeys(g?Wn(p,y):no(p,y)),n.onNodeExpand(l,m)}}),Ne(Gt(n),"onNodeClick",function(l,f){var d=n.props,p=d.onClick,v=d.expandAction;v==="click"&&n.triggerExpandActionExpand(l,f),p==null||p(l,f)}),Ne(Gt(n),"onNodeDoubleClick",function(l,f){var d=n.props,p=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&n.triggerExpandActionExpand(l,f),p==null||p(l,f)}),Ne(Gt(n),"onNodeSelect",function(l,f){var d=n.state.selectedKeys,p=n.state,v=p.keyEntities,g=p.fieldNames,y=n.props,x=y.onSelect,C=y.multiple,m=f.selected,A=f[g.key],F=!m;F?C?d=no(d,A):d=[A]:d=Wn(d,A);var B=d.map(function(R){var S=hn(v,R);return S?S.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),x==null||x(d,{event:"select",selected:F,node:f,selectedNodes:B,nativeEvent:l.nativeEvent})}),Ne(Gt(n),"onNodeCheck",function(l,f,d){var p=n.state,v=p.keyEntities,g=p.checkedKeys,y=p.halfCheckedKeys,x=n.props,C=x.checkStrictly,m=x.onCheck,A=f.key,F,B={event:"check",node:f,checked:d,nativeEvent:l.nativeEvent};if(C){var R=d?no(g,A):Wn(g,A),S=Wn(y,A);F={checked:R,halfChecked:S},B.checkedNodes=R.map(function(L){return hn(v,L)}).filter(Boolean).map(function(L){return L.node}),n.setUncontrolledState({checkedKeys:R})}else{var z=ua([].concat(Pt(g),[A]),!0,v),$=z.checkedKeys,P=z.halfCheckedKeys;if(!d){var N=new Set($);N.delete(A);var K=ua(Array.from(N),{halfCheckedKeys:P},v);$=K.checkedKeys,P=K.halfCheckedKeys}F=$,B.checkedNodes=[],B.checkedNodesPositions=[],B.halfCheckedKeys=P,$.forEach(function(L){var Y=hn(v,L);if(Y){var V=Y.node,_=Y.pos;B.checkedNodes.push(V),B.checkedNodesPositions.push({node:V,pos:_})}}),n.setUncontrolledState({checkedKeys:$},!1,{halfCheckedKeys:P})}m==null||m(F,B)}),Ne(Gt(n),"onNodeLoad",function(l){var f,d=l.key,p=n.state.keyEntities,v=hn(p,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(y,x){n.setState(function(C){var m=C.loadedKeys,A=m===void 0?[]:m,F=C.loadingKeys,B=F===void 0?[]:F,R=n.props,S=R.loadData,z=R.onLoad;if(!S||A.includes(d)||B.includes(d))return null;var $=S(l);return $.then(function(){var P=n.state.loadedKeys,N=no(P,d);z==null||z(N,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:N}),n.setState(function(K){return{loadingKeys:Wn(K.loadingKeys,d)}}),y()}).catch(function(P){if(n.setState(function(K){return{loadingKeys:Wn(K.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=I6){var N=n.state.loadedKeys;Xn(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:no(N,d)}),y()}x(P)}),{loadingKeys:no(B,d)}})});return g.catch(function(){}),g}}),Ne(Gt(n),"onNodeMouseEnter",function(l,f){var d=n.props.onMouseEnter;d==null||d({event:l,node:f})}),Ne(Gt(n),"onNodeMouseLeave",function(l,f){var d=n.props.onMouseLeave;d==null||d({event:l,node:f})}),Ne(Gt(n),"onNodeContextMenu",function(l,f){var d=n.props.onRightClick;d&&(l.preventDefault(),d({event:l,node:f}))}),Ne(Gt(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];l==null||l.apply(void 0,d)}),Ne(Gt(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];l==null||l.apply(void 0,d)}),Ne(Gt(n),"getTreeNodeRequiredProps",function(){var l=n.state,f=l.expandedKeys,d=l.selectedKeys,p=l.loadedKeys,v=l.loadingKeys,g=l.checkedKeys,y=l.halfCheckedKeys,x=l.dragOverNodeKey,C=l.dropPosition,m=l.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:p||[],loadingKeys:v||[],checkedKeys:g||[],halfCheckedKeys:y||[],dragOverNodeKey:x,dropPosition:C,keyEntities:m}}),Ne(Gt(n),"setExpandedKeys",function(l){var f=n.state,d=f.treeData,p=f.fieldNames,v=Gl(d,l,p);n.setUncontrolledState({expandedKeys:l,flattenNodes:v},!0)}),Ne(Gt(n),"onNodeExpand",function(l,f){var d=n.state.expandedKeys,p=n.state,v=p.listChanging,g=p.fieldNames,y=n.props,x=y.onExpand,C=y.loadData,m=f.expanded,A=f[g.key];if(!v){var F=d.includes(A),B=!m;if(Xn(m&&F||!m&&!F,"Expand state not sync with index check"),d=B?no(d,A):Wn(d,A),n.setExpandedKeys(d),x==null||x(d,{node:f,expanded:B,nativeEvent:l.nativeEvent}),B&&C){var R=n.onNodeLoad(f);R&&R.then(function(){var S=Gl(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:S})}).catch(function(){var S=n.state.expandedKeys,z=Wn(S,A);n.setExpandedKeys(z)})}}}),Ne(Gt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),Ne(Gt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),Ne(Gt(n),"onActiveChange",function(l){var f=n.state.activeKey,d=n.props,p=d.onActiveChange,v=d.itemScrollOffset,g=v===void 0?0:v;f!==l&&(n.setState({activeKey:l}),l!==null&&n.scrollTo({key:l,offset:g}),p==null||p(l))}),Ne(Gt(n),"getActiveItem",function(){var l=n.state,f=l.activeKey,d=l.flattenNodes;return f===null?null:d.find(function(p){var v=p.key;return v===f})||null}),Ne(Gt(n),"offsetActiveKey",function(l){var f=n.state,d=f.flattenNodes,p=f.activeKey,v=d.findIndex(function(x){var C=x.key;return C===p});v===-1&&l<0&&(v=d.length),v=(v+l+d.length)%d.length;var g=d[v];if(g){var y=g.key;n.onActiveChange(y)}else n.onActiveChange(null)}),Ne(Gt(n),"onKeyDown",function(l){var f=n.state,d=f.activeKey,p=f.expandedKeys,v=f.checkedKeys,g=f.fieldNames,y=n.props,x=y.onKeyDown,C=y.checkable,m=y.selectable;switch(l.which){case Rr.UP:{n.offsetActiveKey(-1),l.preventDefault();break}case Rr.DOWN:{n.offsetActiveKey(1),l.preventDefault();break}}var A=n.getActiveItem();if(A&&A.data){var F=n.getTreeNodeRequiredProps(),B=A.data.isLeaf===!1||!!(A.data[g.children]||[]).length,R=jr(je(je({},Ua(d,F)),{},{data:A.data,active:!0}));switch(l.which){case Rr.LEFT:{B&&p.includes(d)?n.onNodeExpand({},R):A.parent&&n.onActiveChange(A.parent.key),l.preventDefault();break}case Rr.RIGHT:{B&&!p.includes(d)?n.onNodeExpand({},R):A.children&&A.children.length&&n.onActiveChange(A.children[0].key),l.preventDefault();break}case Rr.ENTER:case Rr.SPACE:{C&&!R.disabled&&R.checkable!==!1&&!R.disableCheckbox?n.onNodeCheck({},R,!v.includes(d)):!C&&m&&!R.disabled&&R.selectable!==!1&&n.onNodeSelect({},R);break}}}x==null||x(l)}),Ne(Gt(n),"setUncontrolledState",function(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var p=!1,v=!0,g={};Object.keys(l).forEach(function(y){if(n.props.hasOwnProperty(y)){v=!1;return}p=!0,g[y]=l[y]}),p&&(!f||v)&&n.setState(je(je({},g),d))}}),Ne(Gt(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return bp(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,a=o.activeKey,u=o.itemScrollOffset,l=u===void 0?0:u;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:l}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,a=o.focused,u=o.flattenNodes,l=o.keyEntities,f=o.draggingNodeKey,d=o.activeKey,p=o.dropLevelOffset,v=o.dropContainerKey,g=o.dropTargetKey,y=o.dropPosition,x=o.dragOverNodeKey,C=o.indent,m=this.props,A=m.prefixCls,F=m.className,B=m.style,R=m.showLine,S=m.focusable,z=m.tabIndex,$=z===void 0?0:z,P=m.selectable,N=m.showIcon,K=m.icon,L=m.switcherIcon,Y=m.draggable,V=m.checkable,_=m.checkStrictly,q=m.disabled,U=m.motion,X=m.loadData,ee=m.filterTreeNode,j=m.height,ie=m.itemHeight,de=m.scrollWidth,pe=m.virtual,me=m.titleRender,we=m.dropIndicatorRender,Ie=m.onContextMenu,Z=m.onScroll,ne=m.direction,oe=m.rootClassName,Q=m.rootStyle,le=Cs(this.props,{aria:!0,data:!0}),ge;Y&&(xn(Y)==="object"?ge=Y:typeof Y=="function"?ge={nodeDraggable:Y}:ge={});var he={prefixCls:A,selectable:P,showIcon:N,icon:K,switcherIcon:L,draggable:ge,draggingNodeKey:f,checkable:V,checkStrictly:_,disabled:q,keyEntities:l,dropLevelOffset:p,dropContainerKey:v,dropTargetKey:g,dropPosition:y,dragOverNodeKey:x,indent:C,direction:ne,dropIndicatorRender:we,loadData:X,filterTreeNode:ee,titleRender:me,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return D.createElement(ic.Provider,{value:he},D.createElement("div",{className:tt(A,F,oe,Ne(Ne(Ne({},"".concat(A,"-show-line"),R),"".concat(A,"-focused"),a),"".concat(A,"-active-focused"),d!==null)),style:Q},D.createElement(M6,vt({ref:this.listRef,prefixCls:A,style:B,data:u,disabled:q,selectable:P,checkable:!!V,motion:U,dragging:f!==null,height:j,itemHeight:ie,virtual:pe,focusable:S,focused:a,tabIndex:$,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ie,onScroll:Z,scrollWidth:de},this.getTreeNodeRequiredProps(),le))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var u=a.prevProps,l={prevProps:o};function f($){return!u&&o.hasOwnProperty($)||u&&u[$]!==o[$]}var d,p=a.fieldNames;if(f("fieldNames")&&(p=pa(o.fieldNames),l.fieldNames=p),f("treeData")?d=o.treeData:f("children")&&(Xn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=Wp(o.children)),d){l.treeData=d;var v=Z0(d,{fieldNames:p});l.keyEntities=je(Ne({},Vo,ym),v.keyEntities)}var g=l.keyEntities||a.keyEntities;if(f("expandedKeys")||u&&f("autoExpandParent"))l.expandedKeys=o.autoExpandParent||!u&&o.defaultExpandParent?Yu(o.expandedKeys,g):o.expandedKeys;else if(!u&&o.defaultExpandAll){var y=je({},g);delete y[Vo];var x=[];Object.keys(y).forEach(function($){var P=y[$];P.children&&P.children.length&&x.push(P.key)}),l.expandedKeys=x}else!u&&o.defaultExpandedKeys&&(l.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Yu(o.defaultExpandedKeys,g):o.defaultExpandedKeys);if(l.expandedKeys||delete l.expandedKeys,d||l.expandedKeys){var C=Gl(d||a.treeData,l.expandedKeys||a.expandedKeys,p);l.flattenNodes=C}if(o.selectable&&(f("selectedKeys")?l.selectedKeys=Bf(o.selectedKeys,o):!u&&o.defaultSelectedKeys&&(l.selectedKeys=Bf(o.defaultSelectedKeys,o))),o.checkable){var m;if(f("checkedKeys")?m=Xl(o.checkedKeys)||{}:!u&&o.defaultCheckedKeys?m=Xl(o.defaultCheckedKeys)||{}:d&&(m=Xl(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),m){var A=m,F=A.checkedKeys,B=F===void 0?[]:F,R=A.halfCheckedKeys,S=R===void 0?[]:R;if(!o.checkStrictly){var z=ua(B,!0,g);B=z.checkedKeys,S=z.halfCheckedKeys}l.checkedKeys=B,l.halfCheckedKeys=S}}return f("loadedKeys")&&(l.loadedKeys=o.loadedKeys),l}}]),r})(D.Component);Ne(lc,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:A6,allowDrop:function(){return!0},expandAction:!1});Ne(lc,"TreeNode",ri);var P6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},z6=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:P6}))},xm=D.forwardRef(z6),j6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},_6=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:j6}))},L6=D.forwardRef(_6),H6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},q6=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:H6}))},K6=D.forwardRef(q6),W6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},V6=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:W6}))},U6=D.forwardRef(V6);const G6=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:u})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:u}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),X6=new T4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Y6=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),J6=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${Xe(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Z6=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:u,nodeSelectedBg:l,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:p}=t;return{[r]:Object.assign(Object.assign({},vi(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:yp(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:X6,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:Xe(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:p},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:d},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:u}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},Y6(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},J6(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${Xe(t.calc(a).div(2).equal())} !important`}})}},Q6=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),u=Wo(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[Z6(e,u),r&&G6(u)].filter(Boolean)},e7=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},t7=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},e7(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},r7=gi("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:$4(`${t}-checkbox`,e)},Q6(t,e),xp(e)],t7),Mf=4;function n7(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,u=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",f={[u]:-r*o+Mf,[l]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[u]=o+Mf;break}return _e.createElement("div",{style:f,className:`${n}-drop-indicator`})}var o7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},a7=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:o7}))},i7=D.forwardRef(a7),s7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},l7=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:s7}))},u7=D.forwardRef(l7),c7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},d7=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:c7}))},f7=D.forwardRef(d7);const h7=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:u,switcherLoadingIcon:l}=e,{isLeaf:f,expanded:d,loading:p}=a;if(p)return D.isValidElement(l)?l:D.createElement(O4,{className:`${n}-switcher-loading-icon`});let v;if(u&&typeof u=="object"&&(v=u.showLeafIcon),f){if(!u)return null;if(typeof v!="boolean"&&v){const x=typeof v=="function"?v(a):v,C=`${n}-switcher-line-custom-icon`;return D.isValidElement(x)?ha(x,{className:tt((t=x.props)===null||t===void 0?void 0:t.className,C)}):x}return v?D.createElement(xm,{className:`${n}-switcher-line-icon`}):D.createElement("span",{className:`${n}-switcher-leaf-line`})}const g=`${n}-switcher-icon`,y=typeof o=="function"?o(a):o;return D.isValidElement(y)?ha(y,{className:tt((r=y.props)===null||r===void 0?void 0:r.className,g)}):y!==void 0?y:u?d?D.createElement(u7,{className:`${n}-switcher-line-icon`}):D.createElement(f7,{className:`${n}-switcher-line-icon`}):D.createElement(i7,{className:g})},wm=_e.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:u}=_e.useContext(ho),{prefixCls:l,className:f,showIcon:d=!1,showLine:p,switcherIcon:v,switcherLoadingIcon:g,blockNode:y=!1,children:x,checkable:C=!1,selectable:m=!0,draggable:A,disabled:F,motion:B,style:R}=e,S=n("tree",l),z=n(),$=_e.useContext(R4),P=F??$,N=B??Object.assign(Object.assign({},wp(z)),{motionAppear:!1}),K=Object.assign(Object.assign({},e),{checkable:C,selectable:m,showIcon:d,motion:N,blockNode:y,disabled:P,showLine:!!p,dropIndicatorRender:n7}),[L,Y,V]=r7(S),[,_]=L0(),q=_.paddingXS/2+(((r=_.Tree)===null||r===void 0?void 0:r.titleHeight)||_.controlHeightSM),U=_e.useMemo(()=>{if(!A)return!1;let ee={};switch(typeof A){case"function":ee.nodeDraggable=A;break;case"object":ee=Object.assign({},A);break}return ee.icon!==!1&&(ee.icon=ee.icon||_e.createElement(U6,null)),ee},[A]),X=ee=>_e.createElement(h7,{prefixCls:S,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:ee,showLine:p});return L(_e.createElement(lc,Object.assign({itemHeight:q,ref:t,virtual:a},K,{style:Object.assign(Object.assign({},u==null?void 0:u.style),R),prefixCls:S,className:tt({[`${S}-icon-hide`]:!d,[`${S}-block-node`]:y,[`${S}-unselectable`]:!m,[`${S}-rtl`]:o==="rtl",[`${S}-disabled`]:P},u==null?void 0:u.className,f,Y,V),direction:o,checkable:C&&_e.createElement("span",{className:`${S}-checkbox-inner`}),selectable:m,switcherIcon:X,draggable:U}),x))}),If=0,Yl=1,Pf=2;function uc(e,t,r){const{key:n,children:o}=r;function a(u){const l=u[n],f=u[o];t(l,u)!==!1&&uc(f||[],t,r)}e.forEach(a)}function p7({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let u=If;if(r&&r===n)return[r];if(!r||!n)return[];function l(f){return f===r||f===n}return uc(e,f=>{if(u===Pf)return!1;if(l(f)){if(a.push(f),u===If)u=Yl;else if(u===Yl)return u=Pf,!1}else u===Yl&&a.push(f);return t.includes(f)},pa(o)),a}function Jl(e,t,r){const n=Pt(t),o=[];return uc(e,(a,u)=>{const l=n.indexOf(a);return l!==-1&&(o.push(u),n.splice(l,1)),!!n.length},pa(r)),o}var zf=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function m7(e){const{isLeaf:t,expanded:r}=e;return t?D.createElement(xm,null):r?D.createElement(L6,null):D.createElement(K6,null)}function jf({treeData:e,children:t}){return e||Wp(t)}const g7=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=zf(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const u=D.useRef(null),l=D.useRef(null),f=()=>{const{keyEntities:P}=Z0(jf(a),{fieldNames:a.fieldNames});let N;return r?N=Object.keys(P):n?N=Yu(a.expandedKeys||o||[],P):N=a.expandedKeys||o||[],N},[d,p]=D.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[v,g]=D.useState(()=>f());D.useEffect(()=>{"selectedKeys"in a&&p(a.selectedKeys)},[a.selectedKeys]),D.useEffect(()=>{"expandedKeys"in a&&g(a.expandedKeys)},[a.expandedKeys]);const y=(P,N)=>{var K;return"expandedKeys"in a||g(P),(K=a.onExpand)===null||K===void 0?void 0:K.call(a,P,N)},x=(P,N)=>{var K;const{multiple:L,fieldNames:Y}=a,{node:V,nativeEvent:_}=N,{key:q=""}=V,U=jf(a),X=Object.assign(Object.assign({},N),{selected:!0}),ee=(_==null?void 0:_.ctrlKey)||(_==null?void 0:_.metaKey),j=_==null?void 0:_.shiftKey;let ie;L&&ee?(ie=P,u.current=q,l.current=ie,X.selectedNodes=Jl(U,ie,Y)):L&&j?(ie=Array.from(new Set([].concat(Pt(l.current||[]),Pt(p7({treeData:U,expandedKeys:v,startKey:q,endKey:u.current,fieldNames:Y}))))),X.selectedNodes=Jl(U,ie,Y)):(ie=[q],u.current=q,l.current=ie,X.selectedNodes=Jl(U,ie,Y)),(K=a.onSelect)===null||K===void 0||K.call(a,ie,X),"selectedKeys"in a||p(ie)},{getPrefixCls:C,direction:m}=D.useContext(ho),{prefixCls:A,className:F,showIcon:B=!0,expandAction:R="click"}=a,S=zf(a,["prefixCls","className","showIcon","expandAction"]),z=C("tree",A),$=tt(`${z}-directory`,{[`${z}-directory-rtl`]:m==="rtl"},F);return D.createElement(wm,Object.assign({icon:m7,ref:t,blockNode:!0},S,{showIcon:B,expandAction:R,prefixCls:z,className:$,expandedKeys:v,selectedKeys:d,onSelect:x,onExpand:y}))},v7=D.forwardRef(g7),cc=wm;cc.DirectoryTree=v7;cc.TreeNode=ri;const _f=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?D.createElement("div",{className:`${n}-filter-dropdown-search`},D.createElement(M4,{prefix:D.createElement(I4,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},b7=e=>{const{keyCode:t}=e;t===Rr.ENTER&&e.stopPropagation()},y7=D.forwardRef((e,t)=>D.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:b7,ref:t},e.children));function ca(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Pt(t),Pt(ca(n))))}),t}function x7(e){return e.some(({children:t})=>t)}function Cm(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Dm({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((u,l)=>{const f=String(u.value);if(u.children)return{key:f||l,label:u.text,popupClassName:`${t}-dropdown-submenu`,children:Dm({filters:u.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const d=n?Ds:up,p={key:u.value!==void 0?f:l,label:D.createElement(D.Fragment,null,D.createElement(d,{checked:r.includes(f)}),D.createElement("span",null,u.text))};return o.trim()?typeof a=="function"?a(o,u)?p:null:Cm(o,u.text)?p:null:p})}function Zl(e){return e||[]}const w7=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:u,column:l,dropdownPrefixCls:f,columnKey:d,filterOnClose:p,filterMultiple:v,filterMode:g="menu",filterSearch:y=!1,filterState:x,triggerFilter:C,locale:m,children:A,getPopupContainer:F,rootClassName:B}=e,{filterResetToDefaultFilteredValue:R,defaultFilteredValue:S,filterDropdownProps:z={},filterDropdownOpen:$,filterDropdownVisible:P,onFilterDropdownVisibleChange:N,onFilterDropdownOpenChange:K}=l,[L,Y]=D.useState(!1),V=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),_=Oe=>{var Le;Y(Oe),(Le=z.onOpenChange)===null||Le===void 0||Le.call(z,Oe),K==null||K(Oe),N==null||N(Oe)},q=(o=(n=(r=z.open)!==null&&r!==void 0?r:$)!==null&&n!==void 0?n:P)!==null&&o!==void 0?o:L,U=x==null?void 0:x.filteredKeys,[X,ee]=Y4(Zl(U)),j=({selectedKeys:Oe})=>{ee(Oe)},ie=(Oe,{node:Le,checked:Ke})=>{j(v?{selectedKeys:Oe}:{selectedKeys:Ke&&Le.key?[Le.key]:[]})};D.useEffect(()=>{L&&j({selectedKeys:Zl(U)})},[U]);const[de,pe]=D.useState([]),me=Oe=>{pe(Oe)},[we,Ie]=D.useState(""),Z=Oe=>{const{value:Le}=Oe.target;Ie(Le)};D.useEffect(()=>{L||Ie("")},[L]);const ne=Oe=>{const Le=Oe!=null&&Oe.length?Oe:null;if(Le===null&&(!x||!x.filteredKeys)||Ao(Le,x==null?void 0:x.filteredKeys,!0))return null;C({column:l,key:d,filteredKeys:Le})},oe=()=>{_(!1),ne(X())},Q=({confirm:Oe,closeDropdown:Le}={confirm:!1,closeDropdown:!1})=>{Oe&&ne([]),Le&&_(!1),Ie(""),ee(R?(S||[]).map(Ke=>String(Ke)):[])},le=({closeDropdown:Oe}={closeDropdown:!0})=>{Oe&&_(!1),ne(X())},ge=(Oe,Le)=>{Le.source==="trigger"&&(Oe&&U!==void 0&&ee(Zl(U)),_(Oe),!Oe&&!l.filterDropdown&&p&&oe())},he=tt({[`${f}-menu-without-submenu`]:!x7(l.filters||[])}),ke=Oe=>{if(Oe.target.checked){const Le=ca(l==null?void 0:l.filters).map(Ke=>String(Ke));ee(Le)}else ee([])},Ce=({filters:Oe})=>(Oe||[]).map((Le,Ke)=>{const st=String(Le.value),Ze={title:Le.text,key:Le.value!==void 0?st:String(Ke)};return Le.children&&(Ze.children=Ce({filters:Le.children})),Ze}),xe=Oe=>{var Le;return Object.assign(Object.assign({},Oe),{text:Oe.title,value:Oe.key,children:((Le=Oe.children)===null||Le===void 0?void 0:Le.map(Ke=>xe(Ke)))||[]})};let Ae;const{direction:$e,renderEmpty:He}=D.useContext(ho);if(typeof l.filterDropdown=="function")Ae=l.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Oe=>j({selectedKeys:Oe}),selectedKeys:X(),confirm:le,clearFilters:Q,filters:l.filters,visible:q,close:()=>{_(!1)}});else if(l.filterDropdown)Ae=l.filterDropdown;else{const Oe=X()||[],Le=()=>{var st,Ze;const Qe=(st=He==null?void 0:He("Table.filter"))!==null&&st!==void 0?st:D.createElement(tf,{image:tf.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return Qe;if(g==="tree")return D.createElement(D.Fragment,null,D.createElement(_f,{filterSearch:y,value:we,onChange:Z,tablePrefixCls:a,locale:m}),D.createElement("div",{className:`${a}-filter-dropdown-tree`},v?D.createElement(Ds,{checked:Oe.length===ca(l.filters).length,indeterminate:Oe.length>0&&Oe.length<ca(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:ke},(Ze=m==null?void 0:m.filterCheckall)!==null&&Ze!==void 0?Ze:m==null?void 0:m.filterCheckAll):null,D.createElement(cc,{checkable:!0,selectable:!1,blockNode:!0,multiple:v,checkStrictly:!v,className:`${f}-menu`,onCheck:ie,checkedKeys:Oe,selectedKeys:Oe,showIcon:!1,treeData:Ce({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:we.trim()?nt=>typeof y=="function"?y(we,xe(nt)):Cm(we,nt.title):void 0})));const $t=Dm({filters:l.filters||[],filterSearch:y,prefixCls:u,filteredKeys:X(),filterMultiple:v,searchValue:we}),wt=$t.every(nt=>nt===null);return D.createElement(D.Fragment,null,D.createElement(_f,{filterSearch:y,value:we,onChange:Z,tablePrefixCls:a,locale:m}),wt?Qe:D.createElement(Da,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:he,onSelect:j,onDeselect:j,selectedKeys:Oe,getPopupContainer:F,openKeys:de,onOpenChange:me,items:$t}))},Ke=()=>R?Ao((S||[]).map(st=>String(st)),Oe,!0):Oe.length===0;Ae=D.createElement(D.Fragment,null,Le(),D.createElement("div",{className:`${u}-dropdown-btns`},D.createElement(xs,{type:"link",size:"small",disabled:Ke(),onClick:()=>Q()},m.filterReset),D.createElement(xs,{type:"primary",size:"small",onClick:oe},m.filterConfirm)))}l.filterDropdown&&(Ae=D.createElement(Hp,{selectable:void 0},Ae)),Ae=D.createElement(y7,{className:`${u}-dropdown`},Ae);const it=Dp({trigger:["click"],placement:$e==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Oe;return typeof l.filterIcon=="function"?Oe=l.filterIcon(V):l.filterIcon?Oe=l.filterIcon:Oe=D.createElement(S6,null),D.createElement("span",{role:"button",tabIndex:-1,className:tt(`${u}-trigger`,{active:V}),onClick:Le=>{Le.stopPropagation()}},Oe)})(),getPopupContainer:F},Object.assign(Object.assign({},z),{rootClassName:tt(B,z.rootClassName),open:q,onOpenChange:ge,popupRender:()=>typeof(z==null?void 0:z.dropdownRender)=="function"?z.dropdownRender(Ae):Ae}));return D.createElement("div",{className:`${u}-column`},D.createElement("span",{className:`${a}-column-title`},A),D.createElement(Q0,Object.assign({},it)))},t0=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var u;const l=Aa(a,r),f=o.filterDropdown!==void 0;if(o.filters||f||"onFilter"in o)if("filteredValue"in o){let d=o.filteredValue;f||(d=(u=d==null?void 0:d.map(String))!==null&&u!==void 0?u:d),n.push({column:o,key:Fo(o,l),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:Fo(o,l),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(Pt(n),Pt(t0(o.children,t,l))))}),n};function Em(e,t,r,n,o,a,u,l,f){return r.map((d,p)=>{const v=Aa(p,l),{filterOnClose:g=!0,filterMultiple:y=!0,filterMode:x,filterSearch:C}=d;let m=d;if(m.filters||m.filterDropdown){const A=Fo(m,v),F=n.find(({key:B})=>A===B);m=Object.assign(Object.assign({},m),{title:B=>D.createElement(w7,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:A,filterState:F,filterOnClose:g,filterMultiple:y,filterMode:x,filterSearch:C,triggerFilter:a,locale:o,getPopupContainer:u,rootClassName:f},el(d.title,B))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:Em(e,t,m.children,n,o,a,u,v,f)})),m})}const Lf=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:u,filterDropdown:l}=o;if(l)t[a]=n||null;else if(Array.isArray(n)){const f=ca(u);t[a]=f.filter(d=>n.includes(String(d)))}else t[a]=null}),t},r0=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:u,filters:l},filteredKeys:f}=a;return u&&f&&f.length?o.map(d=>Object.assign({},d)).filter(d=>f.some(p=>{const v=ca(l),g=v.findIndex(x=>String(x)===String(p)),y=g!==-1?v[g]:p;return d[r]&&(d[r]=r0(d[r],t,r)),u(y,d)})):o},e),km=e=>e.flatMap(t=>"children"in t?[t].concat(Pt(km(t.children||[]))):[t]),C7=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:u,rootClassName:l}=e;Vs();const f=D.useMemo(()=>km(n||[]),[n]),[d,p]=D.useState(()=>t0(f,!0)),v=D.useMemo(()=>{const C=t0(f,!1);if(C.length===0)return C;let m=!0;if(C.forEach(({filteredKeys:A})=>{A!==void 0&&(m=!1)}),m){const A=(f||[]).map((F,B)=>Fo(F,Aa(B)));return d.filter(({key:F})=>A.includes(F)).map(F=>{const B=f[A.indexOf(F.key)];return Object.assign(Object.assign({},F),{column:Object.assign(Object.assign({},F.column),B),forceFiltered:B.filtered})})}return C},[f,d]),g=D.useMemo(()=>Lf(v),[v]),y=C=>{const m=v.filter(({key:A})=>A!==C.key);m.push(C),p(m),o(Lf(m),m)};return[C=>Em(t,r,C,v,u,y,a,void 0,l),v,g]},D7=(e,t,r)=>{const n=D.useRef({});function o(a){var u;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((p,v)=>{const g=r(p,v);l.set(g,p),p&&typeof p=="object"&&t in p&&f(p[t]||[])})};const l=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:l,getRowKey:r}}return(u=n.current.kvMap)===null||u===void 0?void 0:u.get(a)}return[o]};var E7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Sm=10;function k7(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const a=e[o];typeof a!="function"&&(r[o]=a)}),r}function S7(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=E7(n,["total"]),[u,l]=Tt(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:Sm})),f=Dp(u,a,{total:o>0?o:e}),d=Math.ceil((o||e)/f.pageSize);f.current>d&&(f.current=d||1);const p=(g,y)=>{l({current:g??1,pageSize:y||f.pageSize})},v=(g,y)=>{var x;r&&((x=r.onChange)===null||x===void 0||x.call(r,g,y)),p(g,y),t(g,y||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),p]}var A7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},B7=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:A7}))},F7=D.forwardRef(B7),N7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},$7=function(t,r){return D.createElement(Zr,vt({},t,{ref:r,icon:N7}))},T7=D.forwardRef($7);const ns="ascend",Ql="descend",Ns=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Hf=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,O7=(e,t)=>t?e[e.indexOf(t)+1]:e[0],n0=(e,t,r)=>{let n=[];const o=(a,u)=>{n.push({column:a,key:Fo(a,u),multiplePriority:Ns(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,u)=>{const l=Aa(u,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(Pt(n),Pt(n0(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:Fo(a,l),multiplePriority:Ns(a),sortOrder:a.defaultSortOrder}))}),n},Am=(e,t,r,n,o,a,u,l)=>(t||[]).map((d,p)=>{const v=Aa(p,l);let g=d;if(g.sorter){const y=g.sortDirections||o,x=g.showSorterTooltip===void 0?u:g.showSorterTooltip,C=Fo(g,v),m=r.find(({key:N})=>N===C),A=m?m.sortOrder:null,F=O7(y,A);let B;if(d.sortIcon)B=d.sortIcon({sortOrder:A});else{const N=y.includes(ns)&&D.createElement(T7,{className:tt(`${e}-column-sorter-up`,{active:A===ns})}),K=y.includes(Ql)&&D.createElement(F7,{className:tt(`${e}-column-sorter-down`,{active:A===Ql})});B=D.createElement("span",{className:tt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(N&&K)})},D.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},N,K))}const{cancelSort:R,triggerAsc:S,triggerDesc:z}=a||{};let $=R;F===Ql?$=z:F===ns&&($=S);const P=typeof x=="object"?Object.assign({title:$},x):{title:$};g=Object.assign(Object.assign({},g),{className:tt(g.className,{[`${e}-column-sort`]:A}),title:N=>{const K=`${e}-column-sorters`,L=D.createElement("span",{className:`${e}-column-title`},el(d.title,N)),Y=D.createElement("div",{className:K},L,B);return x?typeof x!="boolean"&&(x==null?void 0:x.target)==="sorter-icon"?D.createElement("div",{className:`${K} ${e}-column-sorters-tooltip-target-sorter`},L,D.createElement(bs,Object.assign({},P),B)):D.createElement(bs,Object.assign({},P),Y):Y},onHeaderCell:N=>{var K;const L=((K=d.onHeaderCell)===null||K===void 0?void 0:K.call(d,N))||{},Y=L.onClick,V=L.onKeyDown;L.onClick=U=>{n({column:d,key:C,sortOrder:F,multiplePriority:Ns(d)}),Y==null||Y(U)},L.onKeyDown=U=>{U.keyCode===Rr.ENTER&&(n({column:d,key:C,sortOrder:F,multiplePriority:Ns(d)}),V==null||V(U))};const _=D6(d.title,{}),q=_==null?void 0:_.toString();return A&&(L["aria-sort"]=A==="ascend"?"ascending":"descending"),L["aria-label"]=q||"",L.className=tt(L.className,`${e}-column-has-sorters`),L.tabIndex=0,d.ellipsis&&(L.title=(_??"").toString()),L}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:Am(e,g.children,r,n,o,a,u,v)})),g}),qf=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Kf=e=>{const t=e.filter(({sortOrder:r})=>r).map(qf);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},qf(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},o0=(e,t,r)=>{const n=t.slice().sort((u,l)=>l.multiplePriority-u.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:u},sortOrder:l})=>Hf(u)&&l);return a.length?o.sort((u,l)=>{for(let f=0;f<a.length;f+=1){const d=a[f],{column:{sorter:p},sortOrder:v}=d,g=Hf(p);if(g&&v){const y=g(u,l,v);if(y!==0)return v===ns?y:-y}}return 0}).map(u=>{const l=u[r];return l?Object.assign(Object.assign({},u),{[r]:o0(l,t,r)}):u}):o},R7=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:u}=e,[l,f]=D.useState(()=>n0(r,!0)),d=(C,m)=>{const A=[];return C.forEach((F,B)=>{const R=Aa(B,m);if(A.push(Fo(F,R)),Array.isArray(F.children)){const S=d(F.children,R);A.push.apply(A,Pt(S))}}),A},p=D.useMemo(()=>{let C=!0;const m=n0(r,!1);if(!m.length){const R=d(r);return l.filter(({key:S})=>R.includes(S))}const A=[];function F(R){C?A.push(R):A.push(Object.assign(Object.assign({},R),{sortOrder:null}))}let B=null;return m.forEach(R=>{B===null?(F(R),R.sortOrder&&(R.multiplePriority===!1?C=!1:B=!0)):(B&&R.multiplePriority!==!1||(C=!1),F(R))}),A},[r,l]),v=D.useMemo(()=>{var C,m;const A=p.map(({column:F,sortOrder:B})=>({column:F,order:B}));return{sortColumns:A,sortColumn:(C=A[0])===null||C===void 0?void 0:C.column,sortOrder:(m=A[0])===null||m===void 0?void 0:m.order}},[p]),g=C=>{let m;C.multiplePriority===!1||!p.length||p[0].multiplePriority===!1?m=[C]:m=[].concat(Pt(p.filter(({key:A})=>A!==C.key)),[C]),f(m),u(Kf(m),m)};return[C=>Am(t,C,p,g,n,o,a),p,v,()=>Kf(p)]},Bm=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=el(n.title,t),"children"in o&&(o.children=Bm(o.children,t)),o}),M7=e=>[D.useCallback(r=>Bm(r,e),[e])],I7=pm((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),P7=gm((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),z7=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:u,tablePaddingHorizontal:l,calc:f}=e,d=`${Xe(r)} ${n} ${o}`,p=(v,g,y)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Xe(f(g).mul(-1).equal())}
|
|
28
|
+
${Xe(f(f(y).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:d,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:d,borderTop:d,[`
|
|
29
|
+
> ${t}-content,
|
|
30
|
+
> ${t}-header,
|
|
31
|
+
> ${t}-body,
|
|
32
|
+
> ${t}-summary
|
|
33
|
+
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Xe(f(u).mul(-1).equal())} ${Xe(f(f(l).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:d,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
34
|
+
> tr${t}-expanded-row,
|
|
35
|
+
> tr${t}-placeholder
|
|
36
|
+
`]:{"> th, > td":{borderInlineEnd:0}}}}}},p("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),p("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Xe(r)} 0 ${Xe(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},j7=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},j0),{wordBreak:"keep-all",[`
|
|
37
|
+
&${t}-cell-fix-left-last,
|
|
38
|
+
&${t}-cell-fix-right-first
|
|
39
|
+
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},_7=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},L7=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:u,tableBorderColor:l,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:p,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:y,paddingXXS:x,expandIconMarginTop:C,expandIconSize:m,expandIconHalfInner:A,expandIconScale:F,calc:B}=e,R=`${Xe(o)} ${u} ${l}`,S=B(x).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:d},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},P4(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:Xe(m),background:f,border:R,borderRadius:p,transform:`scale(${F})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:A,insetInlineEnd:S,insetInlineStart:S,height:o},"&::after":{top:S,bottom:S,insetInlineStart:A,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:C,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:y}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${Xe(B(v).mul(-1).equal())} ${Xe(B(g).mul(-1).equal())}`,padding:`${Xe(v)} ${Xe(g)}`}}}},H7=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:u,paddingXS:l,colorText:f,lineWidth:d,lineType:p,tableBorderColor:v,headerIconColor:g,fontSizeSM:y,tablePaddingHorizontal:x,borderRadius:C,motionDurationSlow:m,colorIcon:A,colorPrimary:F,tableHeaderFilterActiveBg:B,colorTextDisabled:R,tableFilterDropdownBg:S,tableFilterDropdownHeight:z,controlItemBgHover:$,controlItemBgActive:P,boxShadowSecondary:N,filterDropdownMenuBg:K,calc:L}=e,Y=`${r}-dropdown`,V=`${t}-filter-dropdown`,_=`${r}-tree`,q=`${Xe(d)} ${p} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:L(u).mul(-1).equal(),marginInline:`${Xe(u)} ${Xe(L(x).div(2).mul(-1).equal())}`,padding:`0 ${Xe(u)}`,color:g,fontSize:y,borderRadius:C,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:A,background:B},"&.active":{color:F}}}},{[`${r}-dropdown`]:{[V]:Object.assign(Object.assign({},vi(e)),{minWidth:o,backgroundColor:S,borderRadius:C,boxShadow:N,overflow:"hidden",[`${Y}-menu`]:{maxHeight:z,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:K,"&:empty::after":{display:"block",padding:`${Xe(l)} 0`,color:R,fontSize:y,textAlign:"center",content:'"Not Found"'}},[`${V}-tree`]:{paddingBlock:`${Xe(l)} 0`,paddingInline:l,[_]:{padding:0},[`${_}-treenode ${_}-node-content-wrapper:hover`]:{backgroundColor:$},[`${_}-treenode-checkbox-checked ${_}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:P}}},[`${V}-search`]:{padding:l,borderBottom:q,"&-input":{input:{minWidth:a},[n]:{color:R}}},[`${V}-checkall`]:{width:"100%",marginBottom:u,marginInlineStart:u},[`${V}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Xe(L(l).sub(d).equal())} ${Xe(l)}`,overflow:"hidden",borderTop:q}})}},{[`${r}-dropdown ${V}, ${V}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},q7=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:u,zIndexTableSticky:l,calc:f}=e,d=n;return{[`${t}-wrapper`]:{[`
|
|
40
|
+
${t}-cell-fix-left,
|
|
41
|
+
${t}-cell-fix-right
|
|
42
|
+
`]:{position:"sticky !important",zIndex:a,background:u},[`
|
|
43
|
+
${t}-cell-fix-left-first::after,
|
|
44
|
+
${t}-cell-fix-left-last::after
|
|
45
|
+
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:f(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
46
|
+
${t}-cell-fix-right-first::after,
|
|
47
|
+
${t}-cell-fix-right-last::after
|
|
48
|
+
`]:{position:"absolute",top:0,bottom:f(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:f(l).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`
|
|
49
|
+
${t}-cell-fix-left-first::after,
|
|
50
|
+
${t}-cell-fix-left-last::after
|
|
51
|
+
`]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${d}`},[`
|
|
52
|
+
${t}-cell-fix-right-first::after,
|
|
53
|
+
${t}-cell-fix-right-last::after
|
|
54
|
+
`]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
55
|
+
${t}-cell-fix-left-first::after,
|
|
56
|
+
${t}-cell-fix-left-last::after,
|
|
57
|
+
${t}-cell-fix-right-first::after,
|
|
58
|
+
${t}-cell-fix-right-last::after
|
|
59
|
+
`]:{boxShadow:"none"}}}}},K7=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${Xe(n)} 0`}}},W7=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Xe(r)} ${Xe(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${Xe(r)} ${Xe(r)}`}}}}},V7=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},U7=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:u,headerIconColor:l,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:p,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:y,calc:x}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(o).add(x(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:x(d).add(x(u).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(o).add(x(a).div(4)).add(x(u).mul(2)).equal()}},[`
|
|
60
|
+
table tr th${t}-selection-column,
|
|
61
|
+
table tr td${t}-selection-column,
|
|
62
|
+
${t}-selection-column
|
|
63
|
+
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:x(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:Xe(x(y).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:p,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},G7=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,u,l,f)=>({[`${t}${t}-${a}`]:{fontSize:f,[`
|
|
64
|
+
${t}-title,
|
|
65
|
+
${t}-footer,
|
|
66
|
+
${t}-cell,
|
|
67
|
+
${t}-thead > tr > th,
|
|
68
|
+
${t}-tbody > tr > th,
|
|
69
|
+
${t}-tbody > tr > td,
|
|
70
|
+
tfoot > tr > th,
|
|
71
|
+
tfoot > tr > td
|
|
72
|
+
`]:{padding:`${Xe(u)} ${Xe(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Xe(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Xe(n(u).mul(-1).equal())} ${Xe(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Xe(n(u).mul(-1).equal()),marginInline:`${Xe(n(r).sub(l).equal())} ${Xe(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Xe(n(l).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},X7=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
|
|
73
|
+
&${t}-cell-fix-left:hover,
|
|
74
|
+
&${t}-cell-fix-right:hover
|
|
75
|
+
`]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},Y7=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:u,zIndexTableSticky:l,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:p,tableBorderColor:v}=e,g=`${Xe(d)} ${p} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Xe(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:u,borderTop:g,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},Wf=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${Xe(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${Xe(o(r).mul(-1).equal())} 0 ${n}`}}}},J7=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:u}=e,l=`${Xe(n)} ${o} ${a}`,f=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
76
|
+
& > ${t}-row,
|
|
77
|
+
& > div:not(${t}-row) > ${t}-row
|
|
78
|
+
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:l,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Xe(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:l,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:u(n).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},Z7=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:u,lineType:l,tableBorderColor:f,tableFontSize:d,tableBg:p,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:y,tableHeaderBg:x,tableHeaderCellSplitColor:C,tableFooterTextColor:m,tableFooterBg:A,calc:F}=e,B=`${Xe(u)} ${l} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},zu()),{[t]:Object.assign(Object.assign({},vi(e)),{fontSize:d,background:p,borderRadius:`${Xe(v)} ${Xe(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${Xe(v)} ${Xe(v)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
79
|
+
${t}-cell,
|
|
80
|
+
${t}-thead > tr > th,
|
|
81
|
+
${t}-tbody > tr > th,
|
|
82
|
+
${t}-tbody > tr > td,
|
|
83
|
+
tfoot > tr > th,
|
|
84
|
+
tfoot > tr > td
|
|
85
|
+
`]:{position:"relative",padding:`${Xe(n)} ${Xe(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${Xe(n)} ${Xe(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:x,borderBottom:B,transition:`background ${y} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:C,transform:"translateY(-50%)",transition:`background-color ${y}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${y}, border-color ${y}`,borderBottom:B,[`
|
|
86
|
+
> ${t}-wrapper:only-child,
|
|
87
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
88
|
+
`]:{[t]:{marginBlock:Xe(F(n).mul(-1).equal()),marginInline:`${Xe(F(a).sub(o).equal())}
|
|
89
|
+
${Xe(F(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:x,borderBottom:B,transition:`background ${y} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${Xe(n)} ${Xe(o)}`,color:m,background:A}})}},Q7=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:u,controlItemBgActiveHover:l,padding:f,paddingSM:d,paddingXS:p,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:y,colorTextPlaceholder:x,fontSize:C,fontSizeSM:m,lineHeight:A,lineWidth:F,colorIcon:B,colorIconHover:R,opacityLoading:S,controlInteractiveSize:z}=e,$=new pn(o).onBackground(r).toHexString(),P=new pn(a).onBackground(r).toHexString(),N=new pn(t).onBackground(r).toHexString(),K=new pn(B),L=new pn(R),Y=z/2-F,V=Y*2+F*3;return{headerBg:N,headerColor:n,headerSortActiveBg:$,headerSortHoverBg:P,bodySortBg:N,rowHoverBg:N,rowSelectedBg:u,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:p,cellPaddingBlockSM:p,cellPaddingInlineSM:p,borderColor:v,headerBorderRadius:g,footerBg:N,footerColor:n,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:v,fixedHeaderSortActiveBg:$,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:y,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*A-F*3)/2-Math.ceil((m*1.4-F*3)/2),headerIconColor:K.clone().setA(K.a*S).toRgbString(),headerIconHoverColor:L.clone().setA(L.a*S).toRgbString(),expandIconHalfInner:Y,expandIconSize:V,expandIconScale:z/V}},Vf=2,eb=gi("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:u,headerSortActiveBg:l,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:p,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:y,cellPaddingBlock:x,cellPaddingInline:C,cellPaddingBlockMD:m,cellPaddingInlineMD:A,cellPaddingBlockSM:F,cellPaddingInlineSM:B,borderColor:R,footerBg:S,footerColor:z,headerBorderRadius:$,cellFontSize:P,cellFontSizeMD:N,cellFontSizeSM:K,headerSplitColor:L,fixedHeaderSortActiveBg:Y,headerFilterHoverBg:V,filterDropdownBg:_,expandIconBg:q,selectionColumnWidth:U,stickyScrollBarBg:X,calc:ee}=e,j=Wo(e,{tableFontSize:P,tableBg:n,tableRadius:$,tablePaddingVertical:x,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:A,tablePaddingVerticalSmall:F,tablePaddingHorizontalSmall:B,tableBorderColor:R,tableHeaderTextColor:u,tableHeaderBg:a,tableFooterTextColor:z,tableFooterBg:S,tableHeaderCellSplitColor:L,tableHeaderSortBg:l,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Y,tableHeaderFilterActiveBg:V,tableFilterDropdownBg:_,tableRowHoverBg:p,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:Vf,zIndexTableSticky:ee(Vf).add(1).equal({unit:!1}),tableFontSizeMiddle:N,tableFontSizeSmall:K,tableSelectionColumnWidth:U,tableExpandIconBg:q,tableExpandColumnWidth:ee(o).add(ee(e.padding).mul(2)).equal(),tableExpandedRowBg:y,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:X,tableScrollThumbBgHover:t,tableScrollBg:r});return[Z7(j),K7(j),Wf(j),X7(j),H7(j),z7(j),W7(j),L7(j),Wf(j),_7(j),U7(j),q7(j),Y7(j),j7(j),G7(j),V7(j),J7(j)]},Q7,{unitless:{expandIconScale:!0}}),Uf=[],tb=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:u,style:l,size:f,bordered:d,dropdownPrefixCls:p,dataSource:v,pagination:g,rowSelection:y,rowKey:x="key",rowClassName:C,columns:m,children:A,childrenColumnName:F,onChange:B,getPopupContainer:R,loading:S,expandIcon:z,expandable:$,expandedRowRender:P,expandIconColumnIndex:N,indentSize:K,scroll:L,sortDirections:Y,locale:V,showSorterTooltip:_={target:"full-header"},virtual:q}=e;Vs();const U=D.useMemo(()=>m||oc(A),[m,A]),X=D.useMemo(()=>U.some(bt=>bt.responsive),[U]),ee=z4(X),j=D.useMemo(()=>{const bt=new Set(Object.keys(ee).filter(xt=>ee[xt]));return U.filter(xt=>!xt.responsive||xt.responsive.some(et=>bt.has(et)))},[U,ee]),ie=fo(e,["className","style","columns"]),{locale:de=j4,direction:pe,table:me,renderEmpty:we,getPrefixCls:Ie,getPopupContainer:Z}=D.useContext(ho),ne=_4(f),oe=Object.assign(Object.assign({},de.Table),V),Q=v||Uf,le=Ie("table",o),ge=Ie("dropdown",p),[,he]=L0(),ke=bi(le),[Ce,xe,Ae]=eb(le,ke),$e=Object.assign(Object.assign({childrenColumnName:F,expandIconColumnIndex:N},$),{expandIcon:(r=$==null?void 0:$.expandIcon)!==null&&r!==void 0?r:(n=me==null?void 0:me.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:He="children"}=$e,pt=D.useMemo(()=>Q.some(bt=>bt==null?void 0:bt[He])?"nest":P||$!=null&&$.expandedRowRender?"row":null,[Q]),it={body:D.useRef(null)},Oe=C6(le),Le=D.useRef(null),Ke=D.useRef(null);X4(t,()=>Object.assign(Object.assign({},Ke.current),{nativeElement:Le.current}));const st=D.useMemo(()=>typeof x=="function"?x:bt=>bt==null?void 0:bt[x],[x]),[Ze]=D7(Q,He,st),Qe={},$t=(bt,xt,et=!1)=>{var Ot,ar,Br,re;const vr=Object.assign(Object.assign({},Qe),bt);et&&((Ot=Qe.resetPagination)===null||Ot===void 0||Ot.call(Qe),!((ar=vr.pagination)===null||ar===void 0)&&ar.current&&(vr.pagination.current=1),g&&((Br=g.onChange)===null||Br===void 0||Br.call(g,1,(re=vr.pagination)===null||re===void 0?void 0:re.pageSize))),L&&L.scrollToFirstRowOnChange!==!1&&it.body.current&&V4(0,{getContainer:()=>it.body.current}),B==null||B(vr.pagination,vr.filters,vr.sorter,{currentDataSource:r0(o0(Q,vr.sorterStates,He),vr.filterStates,He),action:xt})},wt=(bt,xt)=>{$t({sorter:bt,sorterStates:xt},"sort",!1)},[nt,kt,ze,ce]=R7({prefixCls:le,mergedColumns:j,onSorterChange:wt,sortDirections:Y||["ascend","descend"],tableLocale:oe,showSorterTooltip:_}),mt=D.useMemo(()=>o0(Q,kt,He),[Q,kt]);Qe.sorter=ce(),Qe.sorterStates=kt;const At=(bt,xt)=>{$t({filters:bt,filterStates:xt},"filter",!0)},[Nt,Ct,nr]=C7({prefixCls:le,locale:oe,dropdownPrefixCls:ge,mergedColumns:j,onFilterChange:At,getPopupContainer:R||Z,rootClassName:tt(u,ke)}),Dt=r0(mt,Ct,He);Qe.filters=nr,Qe.filterStates=Ct;const zt=D.useMemo(()=>{const bt={};return Object.keys(nr).forEach(xt=>{nr[xt]!==null&&(bt[xt]=nr[xt])}),Object.assign(Object.assign({},ze),{filters:bt})},[ze,nr]),[Qt]=M7(zt),lr=(bt,xt)=>{$t({pagination:Object.assign(Object.assign({},Qe.pagination),{current:bt,pageSize:xt})},"paginate")},[dt,Xt]=S7(Dt.length,lr,g);Qe.pagination=g===!1?{}:k7(dt,g),Qe.resetPagination=Xt;const Yt=D.useMemo(()=>{if(g===!1||!dt.pageSize)return Dt;const{current:bt=1,total:xt,pageSize:et=Sm}=dt;return Dt.length<xt?Dt.length>et?Dt.slice((bt-1)*et,bt*et):Dt:Dt.slice((bt-1)*et,bt*et)},[!!g,Dt,dt==null?void 0:dt.current,dt==null?void 0:dt.pageSize,dt==null?void 0:dt.total]),[Gr,Mr]=x6({prefixCls:le,data:Dt,pageData:Yt,getRowKey:st,getRecordByKey:Ze,expandType:pt,childrenColumnName:He,locale:oe,getPopupContainer:R||Z},y),Ir=(bt,xt,et)=>{let Ot;return typeof C=="function"?Ot=tt(C(bt,xt,et)):Ot=tt(C),tt({[`${le}-row-selected`]:Mr.has(st(bt,xt))},Ot)};$e.__PARENT_RENDER_ICON__=$e.expandIcon,$e.expandIcon=$e.expandIcon||z||w6(oe),pt==="nest"&&$e.expandIconColumnIndex===void 0?$e.expandIconColumnIndex=y?1:0:$e.expandIconColumnIndex>0&&y&&($e.expandIconColumnIndex-=1),typeof $e.indentSize!="number"&&($e.indentSize=typeof K=="number"?K:15);const Pr=D.useCallback(bt=>Qt(Gr(Nt(nt(bt)))),[nt,Nt,Gr]),gr=()=>{if(g===!1||!(dt!=null&&dt.total))return{};const bt=()=>dt.size||(ne==="small"||ne==="middle"?"small":void 0),xt=ye=>{const Be=ye==="left"?"start":ye==="right"?"end":ye;return D.createElement(kp,Object.assign({},dt,{align:dt.align||Be,className:tt(`${le}-pagination`,dt.className),size:bt()}))},et=pe==="rtl"?"left":"right",Ot=dt.position;if(Ot===null||!Array.isArray(Ot))return{bottom:xt(et)};const ar=Ot.find(ye=>typeof ye=="string"&&ye.toLowerCase().includes("top")),Br=Ot.find(ye=>typeof ye=="string"&&ye.toLowerCase().includes("bottom")),re=Ot.every(ye=>`${ye}`=="none"),vr=ar?ar.toLowerCase().replace("top",""):"",I=Br?Br.toLowerCase().replace("bottom",""):"",Re=!ar&&!Br&&!re,at=()=>vr?xt(vr):void 0,We=()=>{if(I)return xt(I);if(Re)return xt(et)};return{top:at(),bottom:We()}},or=D.useMemo(()=>typeof S=="boolean"?{spinning:S}:typeof S=="object"&&S!==null?Object.assign({spinning:!0},S):void 0,[S]),Ht=tt(Ae,ke,`${le}-wrapper`,me==null?void 0:me.className,{[`${le}-wrapper-rtl`]:pe==="rtl"},a,u,xe),w=Object.assign(Object.assign({},me==null?void 0:me.style),l),E=D.useMemo(()=>or!=null&&or.spinning&&Q===Uf?null:typeof(V==null?void 0:V.emptyText)<"u"?V.emptyText:(we==null?void 0:we("Table"))||D.createElement(L4,{componentName:"Table"}),[or==null?void 0:or.spinning,Q,V==null?void 0:V.emptyText,we]),Me=q?P7:I7,O={},te=D.useMemo(()=>{const{fontSize:bt,lineHeight:xt,lineWidth:et,padding:Ot,paddingXS:ar,paddingSM:Br}=he,re=Math.floor(bt*xt);switch(ne){case"middle":return Br*2+re+et;case"small":return ar*2+re+et;default:return Ot*2+re+et}},[he,ne]);q&&(O.listItemHeight=te);const{top:qt,bottom:Pe}=gr();return Ce(D.createElement("div",{ref:Le,className:Ht,style:w},D.createElement(Ep,Object.assign({spinning:!1},or),qt,D.createElement(Me,Object.assign({},O,ie,{ref:Ke,columns:j,direction:pe,expandable:$e,prefixCls:le,className:tt({[`${le}-middle`]:ne==="middle",[`${le}-small`]:ne==="small",[`${le}-bordered`]:d,[`${le}-empty`]:Q.length===0},Ae,ke,xe),data:Yt,rowKey:st,rowClassName:Ir,emptyText:E,internalHooks:Ci,internalRefs:it,transformColumns:Pr,getContainerWidth:Oe,measureRowRender:bt=>D.createElement(H4,{getPopupContainer:xt=>xt},bt)})),Pe)))},rb=D.forwardRef(tb),nb=(e,t)=>{const r=D.useRef(0);return r.current+=1,D.createElement(rb,Object.assign({},e,{ref:t,_renderTimes:r.current}))},po=D.forwardRef(nb);po.SELECTION_COLUMN=xo;po.EXPAND_COLUMN=Co;po.SELECTION_ALL=Ju;po.SELECTION_INVERT=Zu;po.SELECTION_NONE=Qu;po.Column=c6;po.ColumnGroup=d6;po.Summary=om;var bn={},ob=Object.defineProperty,ab=(e,t,r)=>t in e?ob(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xr=(e,t,r)=>ab(e,typeof t!="symbol"?t+"":t,r),zi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gf={exports:{}},Ia={};/**
|
|
90
|
+
* @license React
|
|
91
|
+
* react-jsx-runtime.production.min.js
|
|
92
|
+
*
|
|
93
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the MIT license found in the
|
|
96
|
+
* LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/var Xf;function ib(){if(Xf)return Ia;Xf=1;var e=_e,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,f,d){var p,v={},g=null,y=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(y=f.ref);for(p in f)n.call(f,p)&&!a.hasOwnProperty(p)&&(v[p]=f[p]);if(l&&l.defaultProps)for(p in f=l.defaultProps,f)v[p]===void 0&&(v[p]=f[p]);return{$$typeof:t,type:l,key:g,ref:y,props:v,_owner:o.current}}return Ia.Fragment=r,Ia.jsx=u,Ia.jsxs=u,Ia}var Yf;function sb(){return Yf||(Yf=1,Gf.exports=ib()),Gf.exports}var G=sb();/*!
|
|
98
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
99
|
+
*
|
|
100
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
101
|
+
* Released under the MIT License.
|
|
102
|
+
*/function Jf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jr(e){var t,r;return Jf(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Jf(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Fm=Symbol.for("immer-nothing"),Zf=Symbol.for("immer-draftable"),yn=Symbol.for("immer-state");function On(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ni=Object.getPrototypeOf;function Uo(e){return!!e&&!!e[yn]}function Go(e){var t;return e?Nm(e)||Array.isArray(e)||!!e[Zf]||!!((t=e.constructor)!=null&&t[Zf])||Di(e)||nl(e):!1}var lb=Object.prototype.constructor.toString(),Qf=new WeakMap;function Nm(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=Qf.get(r);return n===void 0&&(n=Function.toString.call(r),Qf.set(r,n)),n===lb}function $s(e,t,r=!0){rl(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function rl(e){const t=e[yn];return t?t.type_:Array.isArray(e)?1:Di(e)?2:nl(e)?3:0}function a0(e,t){return rl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $m(e,t,r){const n=rl(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ub(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Di(e){return e instanceof Map}function nl(e){return e instanceof Set}function Io(e){return e.copy_||e.base_}function i0(e,t){if(Di(e))return new Map(e);if(nl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Nm(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[yn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const u=o[a],l=n[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(ni(e),n)}else{const n=ni(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function dc(e,t=!1){return ol(e)||Uo(e)||!Go(e)||(rl(e)>1&&Object.defineProperties(e,{set:ji,add:ji,clear:ji,delete:ji}),Object.freeze(e),t&&Object.values(e).forEach(r=>dc(r,!0))),e}function cb(){On(2)}var ji={value:cb};function ol(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var db={};function Xo(e){const t=db[e];return t||On(0,e),t}var oi;function Tm(){return oi}function fb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function eh(e,t){t&&(Xo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function s0(e){l0(e),e.drafts_.forEach(hb),e.drafts_=null}function l0(e){e===oi&&(oi=e.parent_)}function th(e){return oi=fb(oi,e)}function hb(e){const t=e[yn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[yn].modified_&&(s0(t),On(4)),Go(e)&&(e=Ts(t,e),t.parent_||Os(t,e)),t.patches_&&Xo("Patches").generateReplacementPatches_(r[yn].base_,e,t.patches_,t.inversePatches_)):e=Ts(t,r,[]),s0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fm?e:void 0}function Ts(e,t,r){if(ol(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[yn];if(!o)return $s(t,(a,u)=>nh(e,o,t,a,u,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Os(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let u=a,l=!1;o.type_===3&&(u=new Set(a),a.clear(),l=!0),$s(u,(f,d)=>nh(e,o,a,f,d,r,l),n),Os(e,a,!1),r&&e.patches_&&Xo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function nh(e,t,r,n,o,a,u){if(o==null||typeof o!="object"&&!u)return;const l=ol(o);if(!(l&&!u)){if(Uo(o)){const f=a&&t&&t.type_!==3&&!a0(t.assigned_,n)?a.concat(n):void 0,d=Ts(e,o,f);if($m(r,n,d),Uo(d))e.canAutoFreeze_=!1;else return}else u&&r.add(o);if(Go(o)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&l)return;Ts(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Di(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Os(e,o)}}}function Os(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dc(t,r)}function pb(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Tm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=fc;r&&(o=[n],a=ai);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=u,l}var fc={get(e,t){if(t===yn)return e;const r=Io(e);if(!a0(r,t))return mb(e,r,t);const n=r[t];return e.finalized_||!Go(n)?n:n===eu(e.base_,t)?(tu(e),e.copy_[t]=c0(n,e)):n},has(e,t){return t in Io(e)},ownKeys(e){return Reflect.ownKeys(Io(e))},set(e,t,r){const n=Om(Io(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=eu(Io(e),t),a=o==null?void 0:o[yn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ub(r,o)&&(r!==void 0||a0(e.base_,t)))return!0;tu(e),u0(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return eu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,tu(e),u0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Io(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){On(11)},getPrototypeOf(e){return ni(e.base_)},setPrototypeOf(){On(12)}},ai={};$s(fc,(e,t)=>{ai[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ai.deleteProperty=function(e,t){return ai.set.call(this,e,t,void 0)};ai.set=function(e,t,r){return fc.set.call(this,e[0],t,r,e[0])};function eu(e,t){const r=e[yn];return(r?Io(r):e)[t]}function mb(e,t,r){var o;const n=Om(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Om(e,t){if(!(t in e))return;let r=ni(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ni(r)}}function u0(e){e.modified_||(e.modified_=!0,e.parent_&&u0(e.parent_))}function tu(e){e.copy_||(e.copy_=i0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var gb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const u=this;return function(l=a,...f){return u.produce(l,d=>r.call(this,d,...f))}}typeof r!="function"&&On(6),n!==void 0&&typeof n!="function"&&On(7);let o;if(Go(t)){const a=th(this),u=c0(t,void 0);let l=!0;try{o=r(u),l=!1}finally{l?s0(a):l0(a)}return eh(a,n),rh(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Fm&&(o=void 0),this.autoFreeze_&&dc(o,!0),n){const a=[],u=[];Xo("Patches").generateReplacementPatches_(t,o,a,u),n(a,u)}return o}else On(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...u)=>this.produceWithPatches(a,l=>t(l,...u));let n,o;return[this.produce(t,r,(a,u)=>{n=a,o=u}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Go(e)||On(8),Uo(e)&&(e=vb(e));const t=th(this),r=c0(e,void 0);return r[yn].isManual_=!0,l0(t),r}finishDraft(e,t){const r=e&&e[yn];(!r||!r.isManual_)&&On(9);const{scope_:n}=r;return eh(n,t),rh(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=Xo("Patches").applyPatches_;return Uo(e)?n(e,t):this.produce(e,o=>n(o,t))}};function c0(e,t){const r=Di(e)?Xo("MapSet").proxyMap_(e,t):nl(e)?Xo("MapSet").proxySet_(e,t):pb(e,t);return(t?t.scope_:Tm()).drafts_.push(r),r}function vb(e){return Uo(e)||On(10,e),Rm(e)}function Rm(e){if(!Go(e)||ol(e))return e;const t=e[yn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=i0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=i0(e,!0);return $s(r,(o,a)=>{$m(r,o,Rm(a))},n),t&&(t.finalized_=!1),r}var ii=new gb,hc=ii.produce,oh=ii.createDraft.bind(ii),ah=ii.finishDraft.bind(ii),bb={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=se.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},yb={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Wt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},xb={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Fe.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Rs=new WeakMap,Ms=new WeakMap,Xa=new WeakMap,Mm=new WeakMap,ih=new WeakMap,sh=new WeakMap,lh=new WeakMap,se={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=se.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],u=t[r];return se.equals(n,o)&&a>u},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return se.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],u=t[r];return se.equals(n,o)&&a<u},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return se.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&se.compare(e,t)===0},isBefore(e,t){return se.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&se.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&se.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&se.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&se.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&se.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!se.isAncestor(t,e)&&!se.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(se.equals(a,n)||se.endsBefore(a,n)||se.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:u}=t;if(se.equals(u,n)||se.isAncestor(u,n))return null;se.endsBefore(u,n)&&(n[u.length-1]-=1);break}case"merge_node":{var{path:l,position:f}=t;se.equals(l,n)||se.endsBefore(l,n)?n[l.length-1]-=1:se.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=f);break}case"split_node":{var{path:d,position:p}=t;if(se.equals(d,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else se.endsBefore(d,n)?n[d.length-1]+=1:se.isAncestor(d,n)&&e[d.length]>=p&&(n[d.length-1]+=1,n[d.length]-=p);break}case"move_node":{var{path:v,newPath:g}=t;if(se.equals(v,g))return n;if(se.isAncestor(v,n)||se.equals(v,n)){var y=g.slice();return se.endsBefore(v,g)&&v.length<g.length&&(y[v.length-1]-=1),y.concat(n.slice(v.length))}else se.isSibling(v,g)&&(se.isAncestor(g,n)||se.equals(g,n))?se.endsBefore(v,n)?n[v.length-1]-=1:n[v.length-1]+=1:se.endsBefore(g,n)||se.equals(g,n)||se.isAncestor(g,n)?(se.endsBefore(v,n)&&(n[v.length-1]-=1),n[g.length-1]+=1):se.endsBefore(v,n)&&(se.equals(g,n)&&(n[g.length-1]+=1),n[v.length-1]-=1);break}}return n}};function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function wb(e,t){if(si(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cb(e){var t=wb(e,"string");return si(t)==="symbol"?t:String(t)}function ln(e,t,r){return t=Cb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Db=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Je.parent(e,n),u=n[n.length-1];if(u>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(u,0,o),t)for(var[l,f]of Fe.points(t))t[f]=Wt.transform(l,r);break}case"insert_text":{var{path:d,offset:p,text:v}=r;if(v.length===0)break;var g=Je.leaf(e,d),y=g.text.slice(0,p),x=g.text.slice(p);if(g.text=y+v+x,t)for(var[C,m]of Fe.points(t))t[m]=Wt.transform(C,r);break}case"merge_node":{var{path:A}=r,F=Je.get(e,A),B=se.previous(A),R=Je.get(e,B),S=Je.parent(e,A),z=A[A.length-1];if(ft.isText(F)&&ft.isText(R))R.text+=F.text;else if(!ft.isText(F)&&!ft.isText(R))R.children.push(...F.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(A,"] to nodes of different interfaces: ").concat(Vr.stringify(F)," ").concat(Vr.stringify(R)));if(S.children.splice(z,1),t)for(var[$,P]of Fe.points(t))t[P]=Wt.transform($,r);break}case"move_node":{var{path:N,newPath:K}=r;if(se.isAncestor(N,K))throw new Error("Cannot move a path [".concat(N,"] to new path [").concat(K,"] because the destination is inside itself."));var L=Je.get(e,N),Y=Je.parent(e,N),V=N[N.length-1];Y.children.splice(V,1);var _=se.transform(N,r),q=Je.get(e,se.parent(_)),U=_[_.length-1];if(q.children.splice(U,0,L),t)for(var[X,ee]of Fe.points(t))t[ee]=Wt.transform(X,r);break}case"remove_node":{var{path:j}=r,ie=j[j.length-1],de=Je.parent(e,j);if(de.children.splice(ie,1),t)for(var[pe,me]of Fe.points(t)){var we=Wt.transform(pe,r);if(t!=null&&we!=null)t[me]=we;else{var Ie=void 0,Z=void 0;for(var[ne,oe]of Je.texts(e))if(se.compare(oe,j)===-1)Ie=[ne,oe];else{Z=[ne,oe];break}var Q=!1;Ie&&Z&&(se.equals(Z[1],j)?Q=!se.hasPrevious(Z[1]):Q=se.common(Ie[1],j).length<se.common(Z[1],j).length),Ie&&!Q?(pe.path=Ie[1],pe.offset=Ie[0].text.length):Z?(pe.path=Z[1],pe.offset=0):t=null}}break}case"remove_text":{var{path:le,offset:ge,text:he}=r;if(he.length===0)break;var ke=Je.leaf(e,le),Ce=ke.text.slice(0,ge),xe=ke.text.slice(ge+he.length);if(ke.text=Ce+xe,t)for(var[Ae,$e]of Fe.points(t))t[$e]=Wt.transform(Ae,r);break}case"set_node":{var{path:He,properties:pt,newProperties:it}=r;if(He.length===0)throw new Error("Cannot set properties on the root node!");var Oe=Je.get(e,He);for(var Le in it){if(Le==="children"||Le==="text")throw new Error('Cannot set the "'.concat(Le,'" property of nodes!'));var Ke=it[Le];Ke==null?delete Oe[Le]:Oe[Le]=Ke}for(var st in pt)it.hasOwnProperty(st)||delete Oe[st];break}case"set_selection":{var{newProperties:Ze}=r;if(Ze==null)t=Ze;else{if(t==null){if(!Fe.isRange(Ze))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Vr.stringify(Ze)," when there is no current selection."));t=Pa({},Ze)}for(var Qe in Ze){var $t=Ze[Qe];if($t==null){if(Qe==="anchor"||Qe==="focus")throw new Error('Cannot remove the "'.concat(Qe,'" selection property'));delete t[Qe]}else t[Qe]=$t}}break}case"split_node":{var{path:wt,position:nt,properties:kt}=r;if(wt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(wt,"] because the root node cannot be split."));var ze=Je.get(e,wt),ce=Je.parent(e,wt),mt=wt[wt.length-1],At;if(ft.isText(ze)){var Nt=ze.text.slice(0,nt),Ct=ze.text.slice(nt);ze.text=Nt,At=Pa(Pa({},kt),{},{text:Ct})}else{var nr=ze.children.slice(0,nt),Dt=ze.children.slice(nt);ze.children=nr,At=Pa(Pa({},kt),{},{children:Dt})}if(ce.children.splice(mt+1,0,At),t)for(var[zt,Qt]of Fe.points(t))t[Qt]=Wt.transform(zt,r);break}}return t},Eb={transform(e,t){e.children=oh(e.children);var r=e.selection&&oh(e.selection);try{r=Db(e,r,t)}finally{e.children=ah(e.children),r?e.selection=Uo(r)?ah(r):r:e.selection=null}}},kb={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},Sb={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},Im=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Jr(n)&&Jr(o)){if(!Im(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var u in t)if(e[u]===void 0&&t[u]!==void 0)return!1;return!0};function Ab(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function uo(e,t){if(e==null)return{};var r=Ab(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Bb=["anchor","focus"];function ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fe={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Fe.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Fe.edges(e);return t},equals(e,t){return Wt.equals(e.anchor,t.anchor)&&Wt.equals(e.focus,t.focus)},includes(e,t){if(Fe.isRange(t)){if(Fe.includes(e,t.anchor)||Fe.includes(e,t.focus))return!0;var[r,n]=Fe.edges(e),[o,a]=Fe.edges(t);return Wt.isBefore(r,o)&&Wt.isAfter(n,a)}var[u,l]=Fe.edges(e),f=!1,d=!1;return Wt.isPoint(t)?(f=Wt.compare(t,u)>=0,d=Wt.compare(t,l)<=0):(f=se.compare(t,u.path)>=0,d=se.compare(t,l.path)<=0),f&&d},intersection(e,t){var r=uo(e,Bb),[n,o]=Fe.edges(e),[a,u]=Fe.edges(t),l=Wt.isBefore(n,a)?a:n,f=Wt.isBefore(o,u)?o:u;return Wt.isBefore(f,l)?null:Fb({anchor:l,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return Wt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Wt.equals(t,r)},isExpanded(e){return!Fe.isCollapsed(e)},isForward(e){return!Fe.isBackward(e)},isRange(e){return Jr(e)&&Wt.isPoint(e.anchor)&&Wt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Fe.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hc(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,u;if(o==="inward"){var l=Fe.isCollapsed(n);Fe.isForward(n)?(a="forward",u=l?a:"backward"):(a="backward",u=l?a:"forward")}else o==="outward"?Fe.isForward(n)?(a="backward",u="forward"):(a="forward",u="backward"):(a=o,u=o);var f=Wt.transform(n.anchor,t,{affinity:a}),d=Wt.transform(n.focus,t,{affinity:u});if(!f||!d)return null;n.anchor=f,n.focus=d})}},dh=e=>Jr(e)&&Je.isNodeList(e.children)&&!M.isEditor(e),gt={isAncestor(e){return Jr(e)&&Je.isNodeList(e.children)},isElement:dh,isElementList(e){return Array.isArray(e)&&e.every(t=>gt.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return dh(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Nb=["children"],$b=["text"],fh=new WeakMap,Je={ancestor(e,t){var r=Je.get(e,t);if(ft.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Vr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of se.ancestors(t,r)){var o=Je.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(ft.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Vr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Vr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Je.ancestor(e,t),{children:a}=o,u=n?a.length-1:0;n?u>=0:u<a.length;){var l=Je.child(o,u),f=t.concat(u);yield[l,f],u=n?u-1:u+1}})()},common(e,t,r){var n=se.common(t,r),o=Je.get(e,n);return[o,n]},descendant(e,t){var r=Je.get(e,t);if(M.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Vr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Je.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Je.nodes(e,t))gt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(gt.isAncestor(e)){var t=uo(e,Nb);return t}else{var t=uo(e,$b);return t}},first(e,t){for(var r=t.slice(),n=Je.get(e,r);n&&!(ft.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ft.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Vr.stringify(e)));var r=hc({children:e.children},n=>{var[o,a]=Fe.edges(t),u=Je.nodes(n,{reverse:!0,pass:g=>{var[,y]=g;return!Fe.includes(t,y)}});for(var[,l]of u){if(!Fe.includes(t,l)){var f=Je.parent(n,l),d=l[l.length-1];f.children.splice(d,1)}if(se.equals(l,a.path)){var p=Je.leaf(n,l);p.text=p.text.slice(0,a.offset)}if(se.equals(l,o.path)){var v=Je.leaf(n,l);v.text=v.text.slice(o.offset)}}M.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ft.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Vr.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(ft.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return ft.isText(e)||gt.isElement(e)||M.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=fh.get(e);if(t!==void 0)return t;var r=e.every(n=>Je.isNode(n));return fh.set(e,r),r},last(e,t){for(var r=t.slice(),n=Je.get(e,r);n&&!(ft.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Je.get(e,t);if(!ft.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Vr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of se.levels(t,r)){var o=Je.get(e,n);yield[o,n]}})()},matches(e,t){return gt.isElement(e)&>.isElementProps(t)&>.matches(e,t)||ft.isText(e)&&ft.isTextProps(t)&&ft.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,u=new Set,l=[],f=e;!(a&&(n?se.isBefore(l,a):se.isAfter(l,a)));){if(u.has(f)||(yield[f,l]),!u.has(f)&&!ft.isText(f)&&f.children.length!==0&&(r==null||r([f,l])===!1)){u.add(f);var d=n?f.children.length-1:0;se.isAncestor(l,o)&&(d=o[l.length]),l=l.concat(d),f=Je.get(e,l);continue}if(l.length===0)break;if(!n){var p=se.next(l);if(Je.has(e,p)){l=p,f=Je.get(e,l);continue}}if(n&&l[l.length-1]!==0){var v=se.previous(l);l=v,f=Je.get(e,l);continue}l=se.parent(l),f=Je.get(e,l),u.add(f)}})()},parent(e,t){var r=se.parent(t),n=Je.get(e,r);if(ft.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return ft.isText(e)?e.text:e.children.map(Je.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Je.nodes(e,t))ft.isText(r)&&(yield[r,n])})()}};function hh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Sr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var La={isNodeOperation(e){return La.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Jr(e))return!1;switch(e.type){case"insert_node":return se.isPath(e.path)&&Je.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&se.isPath(e.path);case"merge_node":return typeof e.position=="number"&&se.isPath(e.path)&&Jr(e.properties);case"move_node":return se.isPath(e.path)&&se.isPath(e.newPath);case"remove_node":return se.isPath(e.path)&&Je.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&se.isPath(e.path);case"set_node":return se.isPath(e.path)&&Jr(e.properties)&&Jr(e.newProperties);case"set_selection":return e.properties===null&&Fe.isRange(e.newProperties)||e.newProperties===null&&Fe.isRange(e.properties)||Jr(e.properties)&&Jr(e.newProperties);case"split_node":return se.isPath(e.path)&&typeof e.position=="number"&&Jr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>La.isOperation(t))},isSelectionOperation(e){return La.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return La.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Sr(Sr({},e),{},{type:"remove_node"});case"insert_text":return Sr(Sr({},e),{},{type:"remove_text"});case"merge_node":return Sr(Sr({},e),{},{type:"split_node",path:se.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(se.equals(t,r))return e;if(se.isSibling(r,t))return Sr(Sr({},e),{},{path:t,newPath:r});var n=se.transform(r,e),o=se.transform(se.next(r),e);return Sr(Sr({},e),{},{path:n,newPath:o})}case"remove_node":return Sr(Sr({},e),{},{type:"insert_node"});case"remove_text":return Sr(Sr({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:u}=e;return Sr(Sr({},e),{},{properties:u,newProperties:a})}case"set_selection":{var{properties:l,newProperties:f}=e;return l==null?Sr(Sr({},e),{},{properties:f,newProperties:null}):f==null?Sr(Sr({},e),{},{properties:null,newProperties:l}):Sr(Sr({},e),{},{properties:f,newProperties:l})}case"split_node":return Sr(Sr({},e),{},{type:"merge_node",path:se.next(e.path)})}}},ph=new WeakMap,Tb=e=>{var t=ph.get(e);if(t!==void 0)return t;if(!Jr(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Jr(e.marks))&&(e.selection===null||Fe.isRange(e.selection))&&Je.isNodeList(e.children)&&La.isOperationList(e.operations);return ph.set(e,r),r},M={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return Tb(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},Ob={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(se.isPath)}};function mh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Wt={compare(e,t){var r=se.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Wt.compare(e,t)===1},isBefore(e,t){return Wt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&se.equals(e.path,t.path)},isPoint(e){return Jr(e)&&typeof e.offset=="number"&&se.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hc(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:u}=n;switch(t.type){case"insert_node":case"move_node":{n.path=se.transform(a,t,r);break}case"insert_text":{se.equals(t.path,a)&&(t.offset<u||t.offset===u&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{se.equals(t.path,a)&&(n.offset+=t.position),n.path=se.transform(a,t,r);break}case"remove_text":{se.equals(t.path,a)&&t.offset<=u&&(n.offset-=Math.min(u-t.offset,t.text.length));break}case"remove_node":{if(se.equals(t.path,a)||se.isAncestor(t.path,a))return null;n.path=se.transform(a,t,r);break}case"split_node":{if(se.equals(t.path,a)){if(t.position===u&&o==null)return null;(t.position<u||t.position===u&&o==="forward")&&(n.offset-=t.position,n.path=se.transform(a,t,gh(gh({},r),{},{affinity:"forward"})))}else n.path=se.transform(a,t,r);break}}})}},vh=void 0,Vr={setScrubber(e){vh=e},stringify(e){return JSON.stringify(e,vh)}},Rb=["text"],Mb=["anchor","focus"];function bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ro(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ft={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var u=uo(a,Rb);return u}return Im(n?o(e):e,n?o(t):t)},isText(e){return Jr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ft.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[ro({},e)];for(var n of t){var o=uo(n,Mb),[a,u]=Fe.edges(n),l=[],f=0,d=a.offset,p=u.offset;for(var v of r){var{length:g}=v.text,y=f;if(f+=g,d<=y&&f<=p){Object.assign(v,o),l.push(v);continue}if(d!==p&&(d===f||p===y)||d>f||p<y||p===y&&y!==0){l.push(v);continue}var x=v,C=void 0,m=void 0;if(p<f){var A=p-y;m=ro(ro({},x),{},{text:x.text.slice(A)}),x=ro(ro({},x),{},{text:x.text.slice(0,A)})}if(d>y){var F=d-y;C=ro(ro({},x),{},{text:x.text.slice(0,F)}),x=ro(ro({},x),{},{text:x.text.slice(F)})}Object.assign(x,o),C&&l.push(C),l.push(x),m&&l.push(m)}r=l}return r}},pc=e=>e.selection?e.selection:e.children.length>0?M.end(e,[]):[0],Ba=(e,t)=>{var[r]=M.node(e,t);return n=>n===r},mc=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?Lb(e):e,o=Mt.None,a=Mt.None,u=0,l=null,f=null;for(var d of n){var p=d.codePointAt(0);if(!p)break;var v=Qb(d,p);if([o,a]=r?[a,v]:[v,o],ia(o,Mt.ZWJ)&&ia(a,Mt.ExtPict)&&(r?l=yh(e.substring(0,u)):l=yh(e.substring(0,e.length-u)),!l)||ia(o,Mt.RI)&&ia(a,Mt.RI)&&(f!==null?f=!f:r?f=!0:f=oy(e.substring(0,e.length-u)),!f)||o!==Mt.None&&a!==Mt.None&&ty(o,a))break;u+=d.length}return u||1},Ib=/\s/,Pb=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,zb=/['\u2018\u2019]/,jb=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=mc(e,t),[a,u]=gc(e,o,t);if(_b(a,u,t))n=!0,r+=o;else if(!n)r+=o;else break;e=u}return r},gc=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},_b=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Ib.test(t))return!1;if(zb.test(t)){var o=mc(r,n),[a,u]=gc(r,o,n);if(e(a,u,n))return!0}return!Pb.test(t)},Lb=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(qb(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(Hb(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},Hb=e=>e>=55296&&e<=56319,qb=e=>e>=56320&&e<=57343,Mt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(Mt||(Mt={}));var Kb=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Wb=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Vb=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Ub=/^[\u1100-\u115F\uA960-\uA97C]$/,Gb=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Xb=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Yb=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Jb=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Zb=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Qb=(e,t)=>{var r=Mt.Any;return e.search(Kb)!==-1&&(r|=Mt.Extend),t===8205&&(r|=Mt.ZWJ),t>=127462&&t<=127487&&(r|=Mt.RI),e.search(Wb)!==-1&&(r|=Mt.Prepend),e.search(Vb)!==-1&&(r|=Mt.SpacingMark),e.search(Ub)!==-1&&(r|=Mt.L),e.search(Gb)!==-1&&(r|=Mt.V),e.search(Xb)!==-1&&(r|=Mt.T),e.search(Yb)!==-1&&(r|=Mt.LV),e.search(Jb)!==-1&&(r|=Mt.LVT),e.search(Zb)!==-1&&(r|=Mt.ExtPict),r};function ia(e,t){return(e&t)!==0}var ey=[[Mt.L,Mt.L|Mt.V|Mt.LV|Mt.LVT],[Mt.LV|Mt.V,Mt.V|Mt.T],[Mt.LVT|Mt.T,Mt.T],[Mt.Any,Mt.Extend|Mt.ZWJ],[Mt.Any,Mt.SpacingMark],[Mt.Prepend,Mt.Any],[Mt.ZWJ,Mt.ExtPict],[Mt.RI,Mt.RI]];function ty(e,t){return ey.findIndex(r=>ia(e,r[0])&&ia(t,r[1]))===-1}var ry=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,yh=e=>e.search(ry)!==-1,ny=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,oy=e=>{var t=e.match(ny);if(t===null)return!1;var r=t[0].length/2;return r%2===1},ay={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=pc(e)}=r;if(se.isPath(o)&&(o=M.range(e,o)),Fe.isRange(o))if(Fe.isCollapsed(o))o=o.anchor;else{var a=Fe.end(o);if(!n&&M.void(e,{at:a}))return;var u=Fe.start(o),l=M.pointRef(e,u),f=M.pointRef(e,a);qe.delete(e,{at:o,voids:n});var d=l.unref(),p=f.unref();o=d||p,qe.setSelection(e,{anchor:o,focus:o})}if(!(!n&&M.void(e,{at:o})||M.elementReadOnly(e,{at:o}))){var{path:v,offset:g}=o;t.length>0&&e.apply({type:"insert_text",path:v,offset:g,text:t})}})}};function xh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function _i(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qe=_i(_i(_i(_i({},Eb),kb),Sb),ay),os=new WeakMap,iy=e=>os.get(e)||!1,sy=(e,t,r)=>{var n=os.get(e)||!1;os.set(e,!0);try{t(),r()}finally{os.set(e,n)}};function Pm(e,t,r){var n=Rs.get(e)||[],o=Ms.get(e)||new Set,a,u,l=v=>{if(v){var g=v.join(",");u.has(g)||(u.add(g),a.push(v))}};if(r){a=[],u=new Set;for(var f of n){var d=r(f);l(d)}}else a=n,u=o;for(var p of t)l(p);Rs.set(e,a),Ms.set(e,u)}var ly=(e,t)=>{for(var r of M.pathRefs(e))bb.transform(r,t);for(var n of M.pointRefs(e))yb.transform(n,t);for(var o of M.rangeRefs(e))xb.transform(o,t);if(!iy(e)){var a=se.operationCanTransformPath(t)?u=>se.transform(u,t):void 0;Pm(e,e.getDirtyPaths(t),a)}qe.transform(e,t),e.operations.push(t),M.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Xa.get(e)||(Xa.set(e,!0),Promise.resolve().then(()=>{Xa.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},uy=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return se.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=se.levels(o),u=ft.isText(n)?[]:Array.from(Je.nodes(n),K=>{var[,L]=K;return o.concat(L)});return[...a,...u]}case"merge_node":{var{path:l}=t,f=se.ancestors(l),d=se.previous(l);return[...f,d]}case"move_node":{var{path:p,newPath:v}=t;if(se.equals(p,v))return[];var g=[],y=[];for(var x of se.ancestors(p)){var C=se.transform(x,t);g.push(C)}for(var m of se.ancestors(v)){var A=se.transform(m,t);y.push(A)}var F=y[y.length-1],B=v[v.length-1],R=F.concat(B);return[...g,...y,R]}case"remove_node":{var{path:S}=t,z=se.ancestors(S);return[...z]}case"split_node":{var{path:$}=t,P=se.levels($),N=se.next($);return[...P,N]}default:return[]}},cy=e=>{var{selection:t}=e;return t?Je.fragment(e,t):[]},dy=(e,t)=>{var[r,n]=t;if(!ft.isText(r)){if(gt.isElement(r)&&r.children.length===0){var o={text:""};qe.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=M.isEditor(r)?!1:gt.isElement(r)&&(e.isInline(r)||r.children.length===0||ft.isText(r.children[0])||e.isInline(r.children[0])),u=0,l=0;l<r.children.length;l++,u++){var f=Je.get(e,n);if(!ft.isText(f)){var d=f.children[u],p=f.children[u-1],v=l===r.children.length-1,g=ft.isText(d)||gt.isElement(d)&&e.isInline(d);if(g!==a)qe.removeNodes(e,{at:n.concat(u),voids:!0}),u--;else if(gt.isElement(d)){if(e.isInline(d)){if(p==null||!ft.isText(p)){var y={text:""};qe.insertNodes(e,y,{at:n.concat(u),voids:!0}),u++}else if(v){var x={text:""};qe.insertNodes(e,x,{at:n.concat(u+1),voids:!0}),u++}}}else{if(!ft.isText(d)&&!("children"in d)){var C=d;C.children=[]}p!=null&&ft.isText(p)&&(ft.equals(d,p,{loose:!0})?(qe.mergeNodes(e,{at:n.concat(u),voids:!0}),u--):p.text===""?(qe.removeNodes(e,{at:n.concat(u-1),voids:!0}),u--):d.text===""&&(qe.removeNodes(e,{at:n.concat(u),voids:!0}),u--))}}}}},fy=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},hy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var u=M.path(e,o),l=n==="lowest";for(var[f,d]of M.levels(e,{at:u,voids:r,match:a,reverse:l}))if(!ft.isText(f)){if(Fe.isRange(o)){if(se.isAncestor(d,o.anchor.path)&&se.isAncestor(d,o.focus.path))return[f,d]}else if(!se.equals(u,d))return[f,d]}}};function wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var py=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!ft.isText(v))return!1;var[y,x]=M.parent(e,g);return!e.isVoid(y)||e.markableVoid(y)},a=Fe.isExpanded(n),u=!1;if(!a){var[l,f]=M.node(e,n);if(l&&o(l,f)){var[d]=M.parent(e,f);u=d&&e.markableVoid(d)}}if(a||u)qe.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var p=Ch(Ch({},M.marks(e)||{}),{},{[t]:r});e.marks=p,Xa.get(e)||e.onChange()}}};function Dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var my=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.point(e,t,{edge:"end"}),o=M.end(e,[]),a={anchor:n,focus:o},{distance:u=1}=r,l=0,f;for(var d of M.positions(e,Eh(Eh({},r),{},{at:a}))){if(l>u)break;l!==0&&(f=d),l++}return f};function kh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.start(e,[]),o=M.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:u=1}=r,l=0,f;for(var d of M.positions(e,Sh(Sh({},r),{},{at:a,reverse:!0}))){if(l>u)break;l!==0&&(f=d),l++}return f},vy=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&qe.delete(e,{unit:t,reverse:!0})},by=(e,t)=>{var{selection:r}=e;r&&Fe.isCollapsed(r)&&qe.delete(e,{unit:t})},yy=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Fe.isExpanded(r)&&qe.delete(e,{reverse:t==="backward"})},xy=(e,t)=>[M.start(e,t),M.end(e,t)];function Ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ah(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var wy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M.above(e,Bh(Bh({},t),{},{match:r=>gt.isElement(r)&&M.isElementReadOnly(e,r)}))},Cy=(e,t)=>M.point(e,t,{edge:"end"}),Dy=(e,t)=>{var r=M.path(e,t,{edge:"start"});return M.node(e,r)},Ey=(e,t)=>{var r=M.range(e,t);return Je.fragment(e,r)};function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ky=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M.above(e,Nh(Nh({},t),{},{match:r=>gt.isElement(r)&&M.isVoid(e,r)}))},Sy=(e,t)=>t.children.some(r=>gt.isElement(r)&&M.isBlock(e,r)),Ay=(e,t)=>t.children.some(r=>ft.isText(r)||M.isInline(e,r)),By=(e,t)=>Je.has(e,t),Fy=(e,t)=>t.children.every(r=>ft.isText(r)),Ny=e=>{qe.splitNodes(e,{always:!0})},$y=(e,t,r)=>{qe.insertNodes(e,t,r)},Ty=e=>{qe.splitNodes(e,{always:!0})};function $h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Oy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$h(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ry=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=Oy({text:t},o);qe.insertNodes(e,a,{at:r.at,voids:r.voids})}else qe.insertText(e,t,r);e.marks=null}},My=(e,t)=>!e.isInline(t),Iy=(e,t,r)=>M.isStart(e,t,r)||M.isEnd(e,t,r),Py=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&ft.isText(n)&&n.text===""&&!e.isVoid(t)},zy=(e,t,r)=>{var n=M.end(e,r);return Wt.equals(t,n)},jy=e=>{var t=Mm.get(e);return t===void 0?!0:t},_y=(e,t,r)=>{if(t.offset!==0)return!1;var n=M.start(e,r);return Wt.equals(t,n)},Ly=(e,t)=>{var r=M.path(e,t,{edge:"end"});return M.node(e,r)},Hy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=Je.leaf(e,n);return[o,n]};function qy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var u=[],l=M.path(e,r);for(var[f,d]of Je.levels(e,l))if(a(f,d)&&(u.push([f,d]),!o&>.isElement(f)&&M.isVoid(e,f)))break;n&&u.reverse(),yield*u}})()}var Ky=["text"],Wy=["text"],Vy=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(Fe.isExpanded(r)){var a=M.isEnd(e,n,n.path);if(a){var u=M.after(e,n);u&&(n=u)}var[l]=M.nodes(e,{match:ft.isText,at:{anchor:n,focus:o}});if(l){var[f]=l,d=uo(f,Ky);return d}else return{}}var{path:p}=n,[v]=M.leaf(e,p);if(n.offset===0){var g=M.previous(e,{at:p,match:ft.isText}),y=M.above(e,{match:B=>gt.isElement(B)&&M.isVoid(e,B)&&e.markableVoid(B)});if(!y){var x=M.above(e,{match:B=>gt.isElement(B)&&M.isBlock(e,B)});if(g&&x){var[C,m]=g,[,A]=x;se.isAncestor(A,m)&&(v=C)}}}var F=uo(v,Wy);return F},Uy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var u=M.after(e,a,{voids:n});if(u){var[,l]=M.last(e,[]),f=[u.path,l];if(se.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(se.isPath(a)){var[d]=M.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=M.nodes(e,{at:f,match:o,mode:r,voids:n});return p}}},Gy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=Je.get(e,n);return[o,n]};function Xy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:u=!1,ignoreNonSelectable:l=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,p;if(Ob.isSpan(r))d=r[0],p=r[1];else{var v=M.path(e,r,{edge:"start"}),g=M.path(e,r,{edge:"end"});d=a?g:v,p=a?v:g}var y=Je.nodes(e,{reverse:a,from:d,to:p,pass:R=>{var[S]=R;return gt.isElement(S)?!!(!u&&(M.isVoid(e,S)||M.isElementReadOnly(e,S))||l&&!M.isSelectable(e,S)):!1}}),x=[],C;for(var[m,A]of y)if(!(l&>.isElement(m)&&!M.isSelectable(e,m))){var F=C&&se.compare(A,C[1])===0;if(!(n==="highest"&&F)){if(!f(m,A)){if(o&&!F&&ft.isText(m))return;continue}if(n==="lowest"&&F){C=[m,A];continue}var B=n==="lowest"?C:[m,A];B&&(o?x.push(B):yield B),C=[m,A]}}n==="lowest"&&C&&(o?x.push(C):yield C),o&&(yield*x)}})()}var Yy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=d=>Rs.get(d)||[],a=d=>Ms.get(d)||new Set,u=d=>{var p=o(d).pop(),v=p.join(",");return a(d).delete(v),p};if(M.isNormalizing(e)){if(r){var l=Array.from(Je.nodes(e),d=>{var[,p]=d;return p}),f=new Set(l.map(d=>d.join(",")));Rs.set(e,l),Ms.set(e,f)}o(e).length!==0&&M.withoutNormalizing(e,()=>{for(var d of o(e))if(Je.has(e,d)){var p=M.node(e,d),[v,g]=p;gt.isElement(v)&&v.children.length===0&&e.normalizeNode(p,{operation:n})}for(var y=o(e),x=y.length,C=0;y.length!==0;){if(!e.shouldNormalize({dirtyPaths:y,iteration:C,initialDirtyPathsLength:x,operation:n}))return;var m=u(e);if(Je.has(e,m)){var A=M.node(e,m);e.normalizeNode(A,{operation:n})}C++,y=o(e)}})}},Jy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=se.parent(n),a=M.node(e,o);return a},Zy=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:u}=o,l=M.pathRefs(e);return l.delete(o),o.current=null,u}},a=M.pathRefs(e);return a.add(o),o},Qy=e=>{var t=ih.get(e);return t||(t=new Set,ih.set(e,t)),t},ex=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(se.isPath(t)){if(o==="start"){var[,a]=Je.first(e,t);t=a}else if(o==="end"){var[,u]=Je.last(e,t);t=u}}return Fe.isRange(t)&&(o==="start"?t=Fe.start(t):o==="end"?t=Fe.end(t):t=se.common(t.anchor.path,t.focus.path)),Wt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},tx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:u}=o,l=M.pointRefs(e);return l.delete(o),o.current=null,u}},a=M.pointRefs(e);return a.add(o),o},rx=e=>{var t=sh.get(e);return t||(t=new Set,sh.set(e,t)),t},nx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(se.isPath(t)){var o;if(n==="end"){var[,a]=Je.last(e,t);o=a}else{var[,u]=Je.first(e,t);o=u}var l=Je.get(e,o);if(!ft.isText(l))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?l.text.length:0}}if(Fe.isRange(t)){var[f,d]=Fe.edges(t);return n==="start"?f:d}return t};function ox(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:u=!1}=t;if(!r)return;var l=M.range(e,r),[f,d]=Fe.edges(l),p=o?d:f,v=!1,g="",y=0,x=0,C=0;for(var[m,A]of M.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:u})){if(gt.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield M.start(e,A);continue}if(e.isInline(m))continue;if(M.hasInlines(e,m)){var F=se.isAncestor(A,d.path)?d:M.end(e,A),B=se.isAncestor(A,f.path)?f:M.start(e,A);g=M.string(e,{anchor:B,focus:F},{voids:a}),v=!0}}if(ft.isText(m)){var R=se.equals(A,p.path);for(R?(x=o?p.offset:m.text.length-p.offset,C=p.offset):(x=m.text.length,C=o?x:0),(R||v||n==="offset")&&(yield{path:A,offset:C},v=!1);;){if(y===0){if(g==="")break;y=S(g,n,o),g=gc(g,y,o)[1]}if(C=o?C-y:C+y,x=x-y,x<0){y=-x;break}y=0,yield{path:A,offset:C}}}}function S(z,$,P){return $==="character"?mc(z,P):$==="word"?jb(z,P):$==="line"||$==="block"?z.length:1}})()}var ax=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var u=M.before(e,a,{voids:n});if(u){var[,l]=M.first(e,[]),f=[u.path,l];if(se.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(se.isPath(a)){var[d]=M.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=M.nodes(e,{reverse:!0,at:f,match:o,mode:r,voids:n});return p}}},ix=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:u}=o,l=M.rangeRefs(e);return l.delete(o),o.current=null,u}},a=M.rangeRefs(e);return a.add(o),o},sx=e=>{var t=lh.get(e);return t||(t=new Set,lh.set(e,t)),t},lx=(e,t,r)=>{if(Fe.isRange(t)&&!r)return t;var n=M.start(e,t),o=M.end(e,r||t);return{anchor:n,focus:o}};function Th(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Th(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cx=(e,t)=>{var{selection:r}=e;if(r){var n=(p,v)=>{if(!ft.isText(p))return!1;var[g,y]=M.parent(e,v);return!e.isVoid(g)||e.markableVoid(g)},o=Fe.isExpanded(r),a=!1;if(!o){var[u,l]=M.node(e,r);if(u&&n(u,l)){var[f]=M.parent(e,l);a=f&&e.markableVoid(f)}}if(o||a)qe.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=ux({},M.marks(e)||{});delete d[t],e.marks=d,Xa.get(e)||e.onChange()}}},dx=(e,t)=>{Mm.set(e,t)},fx=(e,t)=>M.point(e,t,{edge:"start"}),hx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=M.range(e,t),[a,u]=Fe.edges(o),l="";for(var[f,d]of M.nodes(e,{at:o,match:ft.isText,voids:n})){var p=f.text;se.equals(d,u.path)&&(p=p.slice(0,u.offset)),se.equals(d,a.path)&&(p=p.slice(a.offset)),l+=p}return l},px=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=Fe.edges(t);if(o.offset!==0||a.offset!==0||Fe.isCollapsed(t)||se.hasPrevious(a.path))return t;var u=M.above(e,{at:a,match:y=>gt.isElement(y)&&M.isBlock(e,y),voids:n}),l=u?u[1]:[],f=M.start(e,o),d={anchor:f,focus:a},p=!0;for(var[v,g]of M.nodes(e,{at:d,match:ft.isText,reverse:!0,voids:n})){if(p){p=!1;continue}if(v.text!==""||se.isBefore(g,l)){a={path:g,offset:v.text.length};break}}return{anchor:o,focus:a}},mx=(e,t)=>{var r=M.isNormalizing(e);M.setNormalizing(e,!1);try{t()}finally{M.setNormalizing(e,r)}M.normalize(e)},gx=(e,t,r)=>{var[n,o]=t;return gt.isElement(n)&&M.isEmpty(e,n)||ft.isText(n)&&n.text===""&&o[o.length-1]!==0},vx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:u=1,voids:l=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var p=!1;if(Fe.isRange(f)&&Fe.isCollapsed(f)&&(p=!0,f=f.anchor),Wt.isPoint(f)){var v=M.void(e,{at:f,mode:"highest"});if(!l&&v){var[,g]=v;f=g}else{var y={unit:a,distance:u},x=o?M.before(e,f,y)||M.start(e,[]):M.after(e,f,y)||M.end(e,[]);f={anchor:f,focus:x},d=!0}}if(se.isPath(f)){qe.removeNodes(e,{at:f,voids:l});return}if(!Fe.isCollapsed(f)){if(!d){var[,C]=Fe.edges(f),m=M.end(e,[]);Wt.equals(C,m)||(f=M.unhangRange(e,f,{voids:l}))}var[A,F]=Fe.edges(f),B=M.above(e,{match:ke=>gt.isElement(ke)&&M.isBlock(e,ke),at:A,voids:l}),R=M.above(e,{match:ke=>gt.isElement(ke)&&M.isBlock(e,ke),at:F,voids:l}),S=B&&R&&!se.equals(B[1],R[1]),z=se.equals(A.path,F.path),$=l?null:(r=M.void(e,{at:A,mode:"highest"}))!==null&&r!==void 0?r:M.elementReadOnly(e,{at:A,mode:"highest"}),P=l?null:(n=M.void(e,{at:F,mode:"highest"}))!==null&&n!==void 0?n:M.elementReadOnly(e,{at:F,mode:"highest"});if($){var N=M.before(e,A);N&&B&&se.isAncestor(B[1],N.path)&&(A=N)}if(P){var K=M.after(e,F);K&&R&&se.isAncestor(R[1],K.path)&&(F=K)}var L=[],Y;for(var V of M.nodes(e,{at:f,voids:l})){var[_,q]=V;Y&&se.compare(q,Y)===0||(!l&>.isElement(_)&&(M.isVoid(e,_)||M.isElementReadOnly(e,_))||!se.isCommon(q,A.path)&&!se.isCommon(q,F.path))&&(L.push(V),Y=q)}var U=Array.from(L,ke=>{var[,Ce]=ke;return M.pathRef(e,Ce)}),X=M.pointRef(e,A),ee=M.pointRef(e,F),j="";if(!z&&!$){var ie=X.current,[de]=M.leaf(e,ie),{path:pe}=ie,{offset:me}=A,we=de.text.slice(me);we.length>0&&(e.apply({type:"remove_text",path:pe,offset:me,text:we}),j=we)}if(U.reverse().map(ke=>ke.unref()).filter(ke=>ke!==null).forEach(ke=>qe.removeNodes(e,{at:ke,voids:l})),!P){var Ie=ee.current,[Z]=M.leaf(e,Ie),{path:ne}=Ie,oe=z?A.offset:0,Q=Z.text.slice(oe,F.offset);Q.length>0&&(e.apply({type:"remove_text",path:ne,offset:oe,text:Q}),j=Q)}!z&&S&&ee.current&&X.current&&qe.mergeNodes(e,{at:ee.current,hanging:!0,voids:l}),p&&o&&a==="character"&&j.length>1&&j.match(/[\u0E00-\u0E7F]+/)&&qe.insertText(e,j.slice(0,j.length-u));var le=X.unref(),ge=ee.unref(),he=o?le||ge:ge||le;t.at==null&&he&&qe.select(e,he)}}})},bx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=pc(e),batchDirty:u=!0}=r;if(t.length){if(Fe.isRange(a))if(n||(a=M.unhangRange(e,a,{voids:o})),Fe.isCollapsed(a))a=a.anchor;else{var[,l]=Fe.edges(a);if(!o&&M.void(e,{at:l}))return;var f=M.pointRef(e,l);qe.delete(e,{at:a}),a=f.unref()}else se.isPath(a)&&(a=M.start(e,a));if(!(!o&&M.void(e,{at:a}))){var d=M.above(e,{at:a,match:we=>gt.isElement(we)&&M.isInline(e,we),mode:"highest",voids:o});if(d){var[,p]=d;if(M.isEnd(e,a,p)){var v=M.after(e,p);a=v}else if(M.isStart(e,a,p)){var g=M.before(e,p);a=g}}var y=M.above(e,{match:we=>gt.isElement(we)&&M.isBlock(e,we),at:a,voids:o}),[,x]=y,C=M.isStart(e,a,x),m=M.isEnd(e,a,x),A=C&&m,F=!C||C&&m,B=!m,[,R]=Je.first({children:t},[]),[,S]=Je.last({children:t},[]),z=[],$=we=>{var[Ie,Z]=we,ne=Z.length===0;return ne?!1:A?!0:!(F&&se.isAncestor(Z,R)&>.isElement(Ie)&&!e.isVoid(Ie)&&!e.isInline(Ie)||B&&se.isAncestor(Z,S)&>.isElement(Ie)&&!e.isVoid(Ie)&&!e.isInline(Ie))};for(var P of Je.nodes({children:t},{pass:$}))$(P)&&z.push(P);var N=[],K=[],L=[],Y=!0,V=!1;for(var[_]of z)gt.isElement(_)&&!e.isInline(_)?(Y=!1,V=!0,K.push(_)):Y?N.push(_):L.push(_);var[q]=M.nodes(e,{at:a,match:we=>ft.isText(we)||M.isInline(e,we),mode:"highest",voids:o}),[,U]=q,X=M.isStart(e,a,U),ee=M.isEnd(e,a,U),j=M.pathRef(e,m&&!L.length?se.next(x):x),ie=M.pathRef(e,ee?se.next(U):U);qe.splitNodes(e,{at:a,match:we=>V?gt.isElement(we)&&M.isBlock(e,we):ft.isText(we)||M.isInline(e,we),mode:V?"lowest":"highest",always:V&&(!C||N.length>0)&&(!m||L.length>0),voids:o});var de=M.pathRef(e,!X||X&&ee?se.next(U):U);if(qe.insertNodes(e,N,{at:de.current,match:we=>ft.isText(we)||M.isInline(e,we),mode:"highest",voids:o,batchDirty:u}),A&&!N.length&&K.length&&!L.length&&qe.delete(e,{at:x,voids:o}),qe.insertNodes(e,K,{at:j.current,match:we=>gt.isElement(we)&&M.isBlock(e,we),mode:"lowest",voids:o,batchDirty:u}),qe.insertNodes(e,L,{at:ie.current,match:we=>ft.isText(we)||M.isInline(e,we),mode:"highest",voids:o,batchDirty:u}),!r.at){var pe;if(L.length>0&&ie.current?pe=se.previous(ie.current):K.length>0&&j.current?pe=se.previous(j.current):de.current&&(pe=se.previous(de.current)),pe){var me=M.end(e,pe);qe.select(e,me)}}de.unref(),j.unref(),ie.unref()}}})},yx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")qe.select(e,n.anchor);else if(r==="focus")qe.select(e,n.focus);else if(r==="start"){var[o]=Fe.edges(n);qe.select(e,o)}else if(r==="end"){var[,a]=Fe.edges(n);qe.select(e,a)}}else return},xx=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},wx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:u=null}=t;if(r){u==="start"&&(u=Fe.isBackward(r)?"focus":"anchor"),u==="end"&&(u=Fe.isBackward(r)?"anchor":"focus");var{anchor:l,focus:f}=r,d={distance:n,unit:o,ignoreNonSelectable:!0},p={};if(u==null||u==="anchor"){var v=a?M.before(e,l,d):M.after(e,l,d);v&&(p.anchor=v)}if(u==null||u==="focus"){var g=a?M.before(e,f,d):M.after(e,f,d);g&&(p.focus=g)}qe.setSelection(e,p)}},Cx=(e,t)=>{var{selection:r}=e;if(t=M.range(e,t),r){qe.setSelection(e,t);return}if(!Fe.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Vr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Rh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Dx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=Fe.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Fe.isBackward(n)?"anchor":"focus");var{anchor:a,focus:u}=n,l=o==="anchor"?a:u;qe.setSelection(e,{[o==="anchor"?"anchor":"focus"]:Rh(Rh({},l),t)})}},Ex=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!Wt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!Wt.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},kx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:u=!0}=r,{at:l,match:f,select:d}=r;if(Je.isNode(t)&&(t=[t]),t.length!==0){var[p]=t;if(l||(l=pc(e),d!==!1&&(d=!0)),d==null&&(d=!1),Fe.isRange(l))if(n||(l=M.unhangRange(e,l,{voids:o})),Fe.isCollapsed(l))l=l.anchor;else{var[,v]=Fe.edges(l),g=M.pointRef(e,v);qe.delete(e,{at:l}),l=g.unref()}if(Wt.isPoint(l)){f==null&&(ft.isText(p)?f=N=>ft.isText(N):e.isInline(p)?f=N=>ft.isText(N)||M.isInline(e,N):f=N=>gt.isElement(N)&&M.isBlock(e,N));var[y]=M.nodes(e,{at:l.path,match:f,mode:a,voids:o});if(y){var[,x]=y,C=M.pathRef(e,x),m=M.isEnd(e,l,x);qe.splitNodes(e,{at:l,match:f,mode:a,voids:o});var A=C.unref();l=m?se.next(A):A}else return}var F=se.parent(l),B=l[l.length-1];if(!(!o&&M.void(e,{at:F}))){if(u){var R=[],S=se.levels(F);sy(e,()=>{var N=function(){var L=F.concat(B);B++;var Y={type:"insert_node",path:L,node:K};e.apply(Y),l=se.next(l),R.push(Y),ft.isText?S.push(...Array.from(Je.nodes(K),V=>{var[,_]=V;return L.concat(_)})):S.push(L)};for(var K of t)N()},()=>{Pm(e,S,N=>{var K=N;for(var L of R)if(se.operationCanTransformPath(L)&&(K=se.transform(K,L),!K))return null;return K})})}else for(var z of t){var $=F.concat(B);B++,e.apply({type:"insert_node",path:$,node:z}),l=se.next(l)}if(l=se.previous(l),d){var P=M.end(e,l);P&&qe.select(e,P)}}}})},Sx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=se.isPath(r)?Ba(e,r):B=>gt.isElement(B)&&M.isBlock(e,B)),!!r){var u=M.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(u,B=>{var[,R]=B;return M.pathRef(e,R)});for(var f of l){var d=f.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var p=M.node(e,se.parent(d)),[v,g]=p,y=d[d.length-1],{length:x}=v.children;if(x===1){var C=se.next(g);qe.moveNodes(e,{at:d,to:C,voids:o}),qe.removeNodes(e,{at:g,voids:o})}else if(y===0)qe.moveNodes(e,{at:d,to:g,voids:o});else if(y===x-1){var m=se.next(g);qe.moveNodes(e,{at:d,to:m,voids:o})}else{var A=se.next(d),F=se.next(g);qe.splitNodes(e,{at:A,voids:o}),qe.moveNodes(e,{at:d,to:F,voids:o})}}}})},Ax=["text"],Bx=["children"],zm=(e,t)=>{if(gt.isElement(t)){var r=t;return M.isVoid(e,t)?!0:r.children.length===1?zm(e,r.children[0]):!1}else return!M.isEditor(t)},Fx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:u="lowest"}=t;if(n){if(r==null)if(se.isPath(n)){var[l]=M.parent(e,n);r=N=>l.children.includes(N)}else r=N=>gt.isElement(N)&&M.isBlock(e,N);if(!o&&Fe.isRange(n)&&(n=M.unhangRange(e,n,{voids:a})),Fe.isRange(n))if(Fe.isCollapsed(n))n=n.anchor;else{var[,f]=Fe.edges(n),d=M.pointRef(e,f);qe.delete(e,{at:n}),n=d.unref(),t.at==null&&qe.select(e,n)}var[p]=M.nodes(e,{at:n,match:r,voids:a,mode:u}),v=M.previous(e,{at:n,match:r,voids:a,mode:u});if(!(!p||!v)){var[g,y]=p,[x,C]=v;if(!(y.length===0||C.length===0)){var m=se.next(C),A=se.common(y,C),F=se.isSibling(y,C),B=Array.from(M.levels(e,{at:y}),N=>{var[K]=N;return K}).slice(A.length).slice(0,-1),R=M.above(e,{at:y,mode:"highest",match:N=>B.includes(N)&&zm(e,N)}),S=R&&M.pathRef(e,R[1]),z,$;if(ft.isText(g)&&ft.isText(x)){var P=uo(g,Ax);$=x.text.length,z=P}else if(gt.isElement(g)&>.isElement(x)){var P=uo(g,Bx);$=x.children.length,z=P}else throw new Error("Cannot merge the node at path [".concat(y,"] with the previous sibling because it is not the same kind: ").concat(Vr.stringify(g)," ").concat(Vr.stringify(x)));F||qe.moveNodes(e,{at:y,to:m,voids:a}),S&&qe.removeNodes(e,{at:S.current,voids:a}),M.shouldMergeNodesRemovePrevNode(e,v,p)?qe.removeNodes(e,{at:C,voids:a}):e.apply({type:"merge_node",path:m,position:$,properties:z}),S&&S.unref()}}}})},Nx=(e,t)=>{M.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:u}=t;if(n){u==null&&(u=se.isPath(n)?Ba(e,n):y=>gt.isElement(y)&&M.isBlock(e,y));var l=M.pathRef(e,r),f=M.nodes(e,{at:n,match:u,mode:o,voids:a}),d=Array.from(f,y=>{var[,x]=y;return M.pathRef(e,x)});for(var p of d){var v=p.unref(),g=l.current;v.length!==0&&e.apply({type:"move_node",path:v,newPath:g}),l.current&&se.isSibling(g,v)&&se.isAfter(g,v)&&(l.current=se.next(l.current))}l.unref()}})},$x=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:u}=t;if(a){u==null&&(u=se.isPath(a)?Ba(e,a):g=>gt.isElement(g)&&M.isBlock(e,g)),!r&&Fe.isRange(a)&&(a=M.unhangRange(e,a,{voids:n}));var l=M.nodes(e,{at:a,match:u,mode:o,voids:n}),f=Array.from(l,g=>{var[,y]=g;return M.pathRef(e,y)});for(var d of f){var p=d.unref();if(p){var[v]=M.node(e,p);e.apply({type:"remove_node",path:p,node:v})}}}})},Tx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:u}=r,{hanging:l=!1,mode:f="lowest",split:d=!1,voids:p=!1}=r;if(o){if(n==null&&(n=se.isPath(o)?Ba(e,o):$=>gt.isElement($)&&M.isBlock(e,$)),!l&&Fe.isRange(o)&&(o=M.unhangRange(e,o,{voids:p})),d&&Fe.isRange(o)){if(Fe.isCollapsed(o)&&M.leaf(e,o.anchor)[0].text.length>0)return;var v=M.rangeRef(e,o,{affinity:"inward"}),[g,y]=Fe.edges(o),x=f==="lowest"?"lowest":"highest",C=M.isEnd(e,y,y.path);qe.splitNodes(e,{at:y,match:n,mode:x,voids:p,always:!C});var m=M.isStart(e,g,g.path);qe.splitNodes(e,{at:g,match:n,mode:x,voids:p,always:!m}),o=v.unref(),r.at==null&&qe.select(e,o)}a||(a=($,P)=>$!==P);for(var[A,F]of M.nodes(e,{at:o,match:n,mode:f,voids:p})){var B={},R={};if(F.length!==0){var S=!1;for(var z in t)z==="children"||z==="text"||a(t[z],A[z])&&(S=!0,A.hasOwnProperty(z)&&(B[z]=A[z]),u?t[z]!=null&&(R[z]=u(A[z],t[z])):t[z]!=null&&(R[z]=t[z]));S&&e.apply({type:"set_node",path:F,properties:B,newProperties:R})}}}})},Ox=(e,t)=>{if(Fe.isCollapsed(t))return t.anchor;var[,r]=Fe.edges(t),n=M.pointRef(e,r);return qe.delete(e,{at:t}),n.unref()},Rx=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:u=0,always:l=!1}=t;if(o==null&&(o=ee=>gt.isElement(ee)&&M.isBlock(e,ee)),Fe.isRange(a)&&(a=Ox(e,a)),se.isPath(a)){var f=a,d=M.point(e,f),[p]=M.parent(e,f);o=ee=>ee===p,u=d.path.length-f.length+1,a=d,l=!0}if(a){var v=M.pointRef(e,a,{affinity:"backward"}),g;try{var[y]=M.nodes(e,{at:a,match:o,mode:r,voids:n});if(!y)return;var x=M.void(e,{at:a,mode:"highest"}),C=0;if(!n&&x){var[m,A]=x;if(gt.isElement(m)&&e.isInline(m)){var F=M.after(e,A);if(!F){var B={text:""},R=se.next(A);qe.insertNodes(e,B,{at:R,voids:n}),F=M.point(e,R)}a=F,l=!0}var S=a.path.length-A.length;u=S+1,l=!0}g=M.pointRef(e,a);var z=a.path.length-u,[,$]=y,P=a.path.slice(0,z),N=u===0?a.offset:a.path[z]+C;for(var[K,L]of M.levels(e,{at:P,reverse:!0,voids:n})){var Y=!1;if(L.length<$.length||L.length===0||!n&>.isElement(K)&&M.isVoid(e,K))break;var V=v.current,_=M.isEnd(e,V,L);if(l||!v||!M.isEdge(e,V,L)){Y=!0;var q=Je.extractProps(K);e.apply({type:"split_node",path:L,position:N,properties:q})}N=L[L.length-1]+(Y||_?1:0)}if(t.at==null){var U=g.current||M.end(e,[]);qe.select(e,U)}}finally{var X;v.unref(),(X=g)===null||X===void 0||X.unref()}}})},Mx=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;qe.setNodes(e,n,r)},Ix=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:u}=t;if(a){u==null&&(u=se.isPath(a)?Ba(e,a):g=>gt.isElement(g)&&M.isBlock(e,g)),se.isPath(a)&&(a=M.range(e,a));var l=Fe.isRange(a)?M.rangeRef(e,a):null,f=M.nodes(e,{at:a,match:u,mode:r,voids:o}),d=Array.from(f,g=>{var[,y]=g;return M.pathRef(e,y)}).reverse(),p=function(){var g=v.unref(),[y]=M.node(e,g),x=M.range(e,g);n&&l&&(x=Fe.intersection(l.current,x)),qe.liftNodes(e,{at:x,match:C=>gt.isAncestor(y)&&y.children.includes(C),voids:o})};for(var v of d)p();l&&l.unref()}})};function Mh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mh(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Px=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:u,at:l=e.selection}=r;if(l){if(u==null&&(se.isPath(l)?u=Ba(e,l):e.isInline(t)?u=x=>gt.isElement(x)&&M.isInline(e,x)||ft.isText(x):u=x=>gt.isElement(x)&&M.isBlock(e,x)),o&&Fe.isRange(l)){var[f,d]=Fe.edges(l),p=M.rangeRef(e,l,{affinity:"inward"});qe.splitNodes(e,{at:d,match:u,voids:a}),qe.splitNodes(e,{at:f,match:u,voids:a}),l=p.unref(),r.at==null&&qe.select(e,l)}var v=Array.from(M.nodes(e,{at:l,match:e.isInline(t)?x=>gt.isElement(x)&&M.isBlock(e,x):x=>M.isEditor(x),mode:"lowest",voids:a})),g=function(){var x=Fe.isRange(l)?Fe.intersection(l,M.range(e,y)):l;if(!x)return 0;var C=Array.from(M.nodes(e,{at:x,match:u,mode:n,voids:a}));if(C.length>0){var[m]=C,A=C[C.length-1],[,F]=m,[,B]=A;if(F.length===0&&B.length===0)return 0;var R=se.equals(F,B)?se.parent(F):se.common(F,B),S=M.range(e,F,B),z=M.node(e,R),[$]=z,P=R.length+1,N=se.next(B.slice(0,P)),K=Ih(Ih({},t),{},{children:[]});qe.insertNodes(e,K,{at:N,voids:a}),qe.moveNodes(e,{at:S,match:L=>gt.isAncestor($)&&$.children.includes(L),to:N.concat(0),voids:a})}};for(var[,y]of v)g()}})},zx=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ly(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return py(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vy(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return by(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yy(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cy(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ny(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ty(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bx(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $y(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ry(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dy(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cx(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uy(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fy(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hy(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return my(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gy(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yx(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vx(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xx(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xy(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wy(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cy(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dy(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ey(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vy(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sy(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ay(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return By(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fy(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kx(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return My(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iy(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Py(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zy(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jy(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _y(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ly(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hy(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qy(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sx(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fx(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wx(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nx(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uy(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gy(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xy(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yy(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jy(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ex(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zy(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qy(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nx(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tx(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rx(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ox(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ax(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lx(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ix(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sx(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $x(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cx(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tx(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dx(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dx(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ex(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rx(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fx(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hx(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return px(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mx(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ix(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ky(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mx(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Px(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gx(e,...r)}};return e},ru,Ph;function jx(){if(Ph)return ru;Ph=1,ru=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return ru}var _x=jx();const jm=tl(_x);var nu,zh;function vc(){if(zh)return nu;zh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return nu=e,nu}var ou,jh;function Lx(){if(jh)return ou;jh=1;var e=typeof zi=="object"&&zi&&zi.Object===Object&&zi;return ou=e,ou}var au,_h;function _m(){if(_h)return au;_h=1;var e=Lx(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return au=r,au}var iu,Lh;function Hx(){if(Lh)return iu;Lh=1;var e=_m(),t=function(){return e.Date.now()};return iu=t,iu}var su,Hh;function qx(){if(Hh)return su;Hh=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return su=t,su}var lu,qh;function Kx(){if(qh)return lu;qh=1;var e=qx(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return lu=r,lu}var uu,Kh;function Lm(){if(Kh)return uu;Kh=1;var e=_m(),t=e.Symbol;return uu=t,uu}var cu,Wh;function Wx(){if(Wh)return cu;Wh=1;var e=Lm(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(u){var l=r.call(u,o),f=u[o];try{u[o]=void 0;var d=!0}catch{}var p=n.call(u);return d&&(l?u[o]=f:delete u[o]),p}return cu=a,cu}var du,Vh;function Vx(){if(Vh)return du;Vh=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return du=r,du}var fu,Uh;function Ux(){if(Uh)return fu;Uh=1;var e=Lm(),t=Wx(),r=Vx(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function u(l){return l==null?l===void 0?o:n:a&&a in Object(l)?t(l):r(l)}return fu=u,fu}var hu,Gh;function Gx(){if(Gh)return hu;Gh=1;function e(t){return t!=null&&typeof t=="object"}return hu=e,hu}var pu,Xh;function Xx(){if(Xh)return pu;Xh=1;var e=Ux(),t=Gx(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return pu=n,pu}var mu,Yh;function Yx(){if(Yh)return mu;Yh=1;var e=Kx(),t=vc(),r=Xx(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=t(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=e(d);var v=a.test(d);return v||u.test(d)?l(d.slice(2),v?2:8):o.test(d)?n:+d}return mu=f,mu}var gu,Jh;function Hm(){if(Jh)return gu;Jh=1;var e=vc(),t=Hx(),r=Yx(),n="Expected a function",o=Math.max,a=Math.min;function u(l,f,d){var p,v,g,y,x,C,m=0,A=!1,F=!1,B=!0;if(typeof l!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(A=!!d.leading,F="maxWait"in d,g=F?o(r(d.maxWait)||0,f):g,B="trailing"in d?!!d.trailing:B);function R(V){var _=p,q=v;return p=v=void 0,m=V,y=l.apply(q,_),y}function S(V){return m=V,x=setTimeout(P,f),A?R(V):y}function z(V){var _=V-C,q=V-m,U=f-_;return F?a(U,g-q):U}function $(V){var _=V-C,q=V-m;return C===void 0||_>=f||_<0||F&&q>=g}function P(){var V=t();if($(V))return N(V);x=setTimeout(P,z(V))}function N(V){return x=void 0,B&&p?R(V):(p=v=void 0,y)}function K(){x!==void 0&&clearTimeout(x),m=0,p=C=v=x=void 0}function L(){return x===void 0?y:N(t())}function Y(){var V=t(),_=$(V);if(p=arguments,v=this,C=V,_){if(x===void 0)return S(C);if(F)return clearTimeout(x),x=setTimeout(P,f),R(C)}return x===void 0&&(x=setTimeout(P,f)),y}return Y.cancel=K,Y.flush=L,Y}return gu=u,gu}var Jx=Hm();const Zx=tl(Jx);var vu,Zh;function Qx(){if(Zh)return vu;Zh=1;var e=Hm(),t=vc(),r="Expected a function";function n(o,a,u){var l=!0,f=!0;if(typeof o!="function")throw new TypeError(r);return t(u)&&(l="leading"in u?!!u.leading:l,f="trailing"in u?!!u.trailing:f),e(o,a,{leading:l,maxWait:a,trailing:f})}return vu=n,vu}var e9=Qx();const t9=tl(e9),Qh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,e1=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Li=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return e1(r.overflowY,t)||e1(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},Hi=(e,t,r,n,o,a,u,l)=>a<e&&u>t||a>e&&u<t?0:a<=e&&l<=r||u>=t&&l>=r?a-e-n:u>t&&l<r||a<e&&l>r?u-t+o:0,r9=e=>e.parentElement??(e.getRootNode().host||null),t1=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:u,block:l,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,v=typeof d=="function"?d:U=>U!==d;if(!Qh(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,y=[];let x=e;for(;Qh(x)&&v(x);){if(x=r9(x),x===g){y.push(x);break}x!=null&&x===document.body&&Li(x)&&!Li(document.documentElement)||x!=null&&Li(x,p)&&y.push(x)}const C=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:A,scrollY:F}=window,{height:B,width:R,top:S,right:z,bottom:$,left:P}=e.getBoundingClientRect(),{top:N,right:K,bottom:L,left:Y}=(U=>{const X=window.getComputedStyle(U);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(e);let V=l==="start"||l==="nearest"?S-N:l==="end"?$+L:S+B/2-N+L,_=f==="center"?P+R/2-Y+K:f==="end"?z+K:P-Y;const q=[];for(let U=0;U<y.length;U++){const X=y[U],{height:ee,width:j,top:ie,right:de,bottom:pe,left:me}=X.getBoundingClientRect();if(u==="if-needed"&&S>=0&&P>=0&&$<=m&&z<=C&&(X===g&&!Li(X)||S>=ie&&$<=pe&&P>=me&&z<=de))return q;const we=getComputedStyle(X),Ie=parseInt(we.borderLeftWidth,10),Z=parseInt(we.borderTopWidth,10),ne=parseInt(we.borderRightWidth,10),oe=parseInt(we.borderBottomWidth,10);let Q=0,le=0;const ge="offsetWidth"in X?X.offsetWidth-X.clientWidth-Ie-ne:0,he="offsetHeight"in X?X.offsetHeight-X.clientHeight-Z-oe:0,ke="offsetWidth"in X?X.offsetWidth===0?0:j/X.offsetWidth:0,Ce="offsetHeight"in X?X.offsetHeight===0?0:ee/X.offsetHeight:0;if(g===X)Q=l==="start"?V:l==="end"?V-m:l==="nearest"?Hi(F,F+m,m,Z,oe,F+V,F+V+B,B):V-m/2,le=f==="start"?_:f==="center"?_-C/2:f==="end"?_-C:Hi(A,A+C,C,Ie,ne,A+_,A+_+R,R),Q=Math.max(0,Q+F),le=Math.max(0,le+A);else{Q=l==="start"?V-ie-Z:l==="end"?V-pe+oe+he:l==="nearest"?Hi(ie,pe,ee,Z,oe+he,V,V+B,B):V-(ie+ee/2)+he/2,le=f==="start"?_-me-Ie:f==="center"?_-(me+j/2)+ge/2:f==="end"?_-de+ne+ge:Hi(me,de,j,Ie,ne+ge,_,_+R,R);const{scrollLeft:xe,scrollTop:Ae}=X;Q=Ce===0?0:Math.max(0,Math.min(Ae+Q/Ce,X.scrollHeight-ee/Ce+he)),le=ke===0?0:Math.max(0,Math.min(xe+le/ke,X.scrollWidth-j/ke+ge)),V+=Ae-Q,_+=xe-le}q.push({el:X,top:Q,left:le})}return q},n9=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function o9(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(t1(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:u}of t1(e,n9(t))){const l=a-r.top+r.bottom,f=u-r.left+r.right;o.scroll({top:l,left:f,behavior:n})}}var _o=[],a9=function(){return _o.some(function(e){return e.activeTargets.length>0})},i9=function(){return _o.some(function(e){return e.skippedTargets.length>0})},r1="ResizeObserver loop completed with undelivered notifications.",s9=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:r1}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=r1),window.dispatchEvent(e)},li;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(li||(li={}));var Lo=function(e){return Object.freeze(e)},l9=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Lo(this)}return e})(),qm=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Lo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,u=t.bottom,l=t.left,f=t.width,d=t.height;return{x:r,y:n,top:o,right:a,bottom:u,left:l,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),bc=function(e){return e instanceof SVGElement&&"getBBox"in e},Km=function(e){if(bc(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,u=o.offsetHeight;return!(a||u||e.getClientRects().length)},n1=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},u9=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ya=typeof window<"u"?window:{},qi=new WeakMap,o1=/auto|scroll/,c9=/^tb|vertical/,d9=/msie|trident/i.test(Ya.navigator&&Ya.navigator.userAgent),Kn=function(e){return parseFloat(e||"0")},da=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new l9((r?t:e)||0,(r?e:t)||0)},a1=Lo({devicePixelContentBoxSize:da(),borderBoxSize:da(),contentBoxSize:da(),contentRect:new qm(0,0,0,0)}),Wm=function(e,t){if(t===void 0&&(t=!1),qi.has(e)&&!t)return qi.get(e);if(Km(e))return qi.set(e,a1),a1;var r=getComputedStyle(e),n=bc(e)&&e.ownerSVGElement&&e.getBBox(),o=!d9&&r.boxSizing==="border-box",a=c9.test(r.writingMode||""),u=!n&&o1.test(r.overflowY||""),l=!n&&o1.test(r.overflowX||""),f=n?0:Kn(r.paddingTop),d=n?0:Kn(r.paddingRight),p=n?0:Kn(r.paddingBottom),v=n?0:Kn(r.paddingLeft),g=n?0:Kn(r.borderTopWidth),y=n?0:Kn(r.borderRightWidth),x=n?0:Kn(r.borderBottomWidth),C=n?0:Kn(r.borderLeftWidth),m=v+d,A=f+p,F=C+y,B=g+x,R=l?e.offsetHeight-B-e.clientHeight:0,S=u?e.offsetWidth-F-e.clientWidth:0,z=o?m+F:0,$=o?A+B:0,P=n?n.width:Kn(r.width)-z-S,N=n?n.height:Kn(r.height)-$-R,K=P+m+S+F,L=N+A+R+B,Y=Lo({devicePixelContentBoxSize:da(Math.round(P*devicePixelRatio),Math.round(N*devicePixelRatio),a),borderBoxSize:da(K,L,a),contentBoxSize:da(P,N,a),contentRect:new qm(v,f,P,N)});return qi.set(e,Y),Y},Vm=function(e,t,r){var n=Wm(e,r),o=n.borderBoxSize,a=n.contentBoxSize,u=n.devicePixelContentBoxSize;switch(t){case li.DEVICE_PIXEL_CONTENT_BOX:return u;case li.BORDER_BOX:return o;default:return a}},f9=(function(){function e(t){var r=Wm(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Lo([r.borderBoxSize]),this.contentBoxSize=Lo([r.contentBoxSize]),this.devicePixelContentBoxSize=Lo([r.devicePixelContentBoxSize])}return e})(),Um=function(e){if(Km(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},h9=function(){var e=1/0,t=[];_o.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(l){var f=new f9(l.target),d=Um(l.target);u.push(f),l.lastReportedSize=Vm(l.target,l.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,u,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},i1=function(e){_o.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(Um(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},p9=function(){var e=0;for(i1(e);a9();)e=h9(),i1(e);return i9()&&s9(),e>0},bu,Gm=[],m9=function(){return Gm.splice(0).forEach(function(e){return e()})},g9=function(e){if(!bu){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return m9()}).observe(r,n),bu=function(){r.textContent="".concat(t?t--:t++)}}Gm.push(e),bu()},v9=function(e){g9(function(){requestAnimationFrame(e)})},as=0,b9=function(){return!!as},y9=250,x9={attributes:!0,characterData:!0,childList:!0,subtree:!0},s1=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],l1=function(e){return e===void 0&&(e=0),Date.now()+e},yu=!1,w9=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=y9),!yu){yu=!0;var n=l1(t);v9(function(){var o=!1;try{o=p9()}finally{if(yu=!1,t=n-l1(),!b9())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,x9)};document.body?r():Ya.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),s1.forEach(function(r){return Ya.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),s1.forEach(function(r){return Ya.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),d0=new w9,u1=function(e){!as&&e>0&&d0.start(),as+=e,!as&&d0.stop()},C9=function(e){return!bc(e)&&!u9(e)&&getComputedStyle(e).display==="inline"},D9=(function(){function e(t,r){this.target=t,this.observedBox=r||li.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Vm(this.target,this.observedBox,!0);return C9(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),E9=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ki=new WeakMap,c1=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Wi=(function(){function e(){}return e.connect=function(t,r){var n=new E9(t,r);Ki.set(t,n)},e.observe=function(t,r,n){var o=Ki.get(t),a=o.observationTargets.length===0;c1(o.observationTargets,r)<0&&(a&&_o.push(o),o.observationTargets.push(new D9(r,n&&n.box)),u1(1),d0.schedule())},e.unobserve=function(t,r){var n=Ki.get(t),o=c1(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&_o.splice(_o.indexOf(n),1),n.observationTargets.splice(o,1),u1(-1))},e.disconnect=function(t){var r=this,n=Ki.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),k9=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Wi.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!n1(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Wi.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!n1(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Wi.unobserve(this,t)},e.prototype.disconnect=function(){Wi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),$n={},d1;function S9(){if(d1)return $n;d1=1,Object.defineProperty($n,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(g,y,x){y&&!("byKey"in y)&&(x=y,y=null),Array.isArray(g)||(g=[g]);var C=g.map(function(F){return f(F,y)}),m=function(F){return C.some(function(B){return d(B,F)})},A=x==null?m:m(x);return A}function u(g,y){return a(g,y)}function l(g,y){return a(g,{byKey:!0},y)}function f(g,y){var x=y&&y.byKey,C={};g=g.replace("++","+add");var m=g.split("+"),A=m.length;for(var F in t)C[t[F]]=!1;var B=!0,R=!1,S=void 0;try{for(var z=m[Symbol.iterator](),$;!(B=($=z.next()).done);B=!0){var P=$.value,N=P.endsWith("?")&&P.length>1;N&&(P=P.slice(0,-1));var K=v(P),L=t[K];if(P.length>1&&!L&&!r[P]&&!n[K])throw new TypeError('Unknown modifier: "'+P+'"');(A===1||!L)&&(x?C.key=K:C.which=p(P)),L&&(C[L]=N?null:!0)}}catch(Y){R=!0,S=Y}finally{try{!B&&z.return&&z.return()}finally{if(R)throw S}}return C}function d(g,y){for(var x in g){var C=g[x],m=void 0;if(C!=null&&(x==="key"&&y.key!=null?m=y.key.toLowerCase():x==="which"?m=C===91&&y.which===93?91:y.which:m=y[x],!(m==null&&C===!1)&&m!==C))return!1}return!0}function p(g){g=v(g);var y=n[g]||g.toUpperCase().charCodeAt(0);return y}function v(g){return g=g.toLowerCase(),g=r[g]||g,g}return $n.default=a,$n.isHotkey=a,$n.isCodeHotkey=u,$n.isKeyHotkey=l,$n.parseHotkey=f,$n.compareHotkey=d,$n.toKeyCode=p,$n.toKeyName=v,$n}var xu=S9();function A9(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function ma(e,t){if(e==null)return{};var r=A9(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function B9(e,t){if(ui(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F9(e){var t=B9(e,"string");return ui(t)==="symbol"?t:String(t)}function An(e,t,r){return t=F9(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yc=co(null),Oo=()=>{var e=To(yc);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},wu,Cu,Xm=parseInt(_e.version.split(".")[0],10),Ym=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,f1=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),an=typeof navigator<"u"&&/Android/.test(navigator.userAgent),sa=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Po=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),N9=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Jm=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),$9=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),T9=an&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),O9=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),R9=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),M9=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),is=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(wu=navigator.userAgent.match(/Version\/(\d+)/))!==null&&wu!==void 0&&wu[1]&&parseInt((Cu=navigator.userAgent.match(/Version\/(\d+)/))===null||Cu===void 0?void 0:Cu[1],10)<17;var yo=(!$9||!T9)&&!N9&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",fa=new WeakMap,xc=new WeakMap,wc=new WeakMap,Zm=new WeakMap,ss=new WeakMap,f0=new WeakMap,ci=new WeakMap,Ho=new WeakMap,Is=new WeakMap,al=new WeakMap,h0=new WeakMap,So=new WeakMap,zo=new WeakMap,Ja=new WeakMap,p0=new WeakMap,Cc=new WeakMap,Rn=new WeakMap,ao=new WeakMap,fn=new WeakMap,Do=new WeakMap,Eo=new WeakMap,Qm=new WeakMap,ga=Symbol("placeholder"),eg=Symbol("mark-placeholder"),tg=globalThis.Node,I9=globalThis.Text,Dc=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,P9=e=>No(e)&&e.nodeType===8,kn=e=>No(e)&&e.nodeType===1,No=e=>{var t=Dc(e);return!!t&&e instanceof t.Node},m0=e=>{var t=e&&e.anchorNode&&Dc(e.anchorNode);return!!t&&e instanceof t.Selection},rg=e=>No(e)&&e.nodeType===3,z9=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,j9=e=>{var[t,r]=e;if(kn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=ng(t,o,n?"backward":"forward"),n=o<r;kn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=L9(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},_9=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},ng=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,u=!1,l=!1;(P9(o)||kn(o)&&o.childNodes.length===0||kn(o)&&o.getAttribute("contenteditable")==="false")&&!(u&&l);){if(a>=n.length){u=!0,a=t-1,r="backward";continue}if(a<0){l=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},L9=(e,t,r)=>{var[n]=ng(e,t,r);return n},og=e=>{var t="";if(rg(e)&&e.nodeValue)return e.nodeValue;if(kn(e)){for(var r of Array.from(e.childNodes))t+=og(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
103
|
+
`)}return t},H9=/data-slate-fragment="(.+?)"/m,q9=e=>{var t=e.getData("text/html"),[,r]=t.match(H9)||[];return r},Za=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Ec=(e,t,r)=>{var{target:n}=t;if(kn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=Te.getWindow(e);if(o.contains(n))return Te.hasDOMNode(e,n,{editable:!0});var a=r.find(u=>{var{addedNodes:l,removedNodes:f}=u;for(var d of l)if(d===n||d.contains(n))return!0;for(var p of f)if(p===n||p.contains(n))return!0});return!a||a===t?!1:Ec(e,a,r)},K9=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},h1=(e,t)=>!!(e.compareDocumentPosition(t)&tg.DOCUMENT_POSITION_PRECEDING),W9=(e,t)=>!!(e.compareDocumentPosition(t)&tg.DOCUMENT_POSITION_FOLLOWING),V9=0;class U9{constructor(){An(this,"id",void 0),this.id="".concat(V9++)}}var Te={androidPendingDiffs:e=>fn.get(e),androidScheduleFlush:e=>{var t;(t=Cc.get(e))===null||t===void 0||t()},blur:e=>{var t=Te.toDOMNode(e,e),r=Te.findDocumentOrShadowRoot(e);So.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Te.findDocumentOrShadowRoot(e),n=Za(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&qe.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Te.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=Te.toSlateNode(e,t.target),u=Te.findPath(e,a);if(gt.isElement(a)&&M.isVoid(e,a)){var l=o.getBoundingClientRect(),f=e.isInline(a)?r-l.left<l.left+l.width-r:n-l.top<l.top+l.height-n,d=M.point(e,u,{edge:f?"start":"end"}),p=f?M.before(e,d):M.after(e,d);if(p){var v=M.range(e,p);return v}}var g,{document:y}=Te.getWindow(e);if(y.caretRangeFromPoint)g=y.caretRangeFromPoint(r,n);else{var x=y.caretPositionFromPoint(r,n);x&&(g=y.createRange(),g.setStart(x.offsetNode,x.offset),g.setEnd(x.offsetNode,x.offset))}if(!g)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var C=Te.toSlateRange(e,g,{exactMatch:!1,suppressThrow:!1});return C},findKey:(e,t)=>{var r=Is.get(t);return r||(r=new U9,Is.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=wc.get(n);if(o==null){if(M.isEditor(n))return r;break}var a=xc.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Vr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!So.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Te.focus(e,{retries:t.retries-1})},10);return}var r=Te.toDOMNode(e,e),n=Te.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Za(n),a=Te.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||qe.select(e,M.start(e,[])),So.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=Zm.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=Te.toDOMNode(e,e),a;try{a=kn(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>No(t)&&Te.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return M.hasPath(e,r.path)&&M.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>Te.hasEditableTarget(e,t)||Te.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>No(t)&&Te.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!zo.get(e),isFocused:e=>!!So.get(e),isReadOnly:e=>!!h0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(h0.get(e))return!1;var r=Te.hasTarget(e,t)&&Te.toSlateNode(e,t);return gt.isElement(r)&&M.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=al.get(e),n=M.isEditor(t)?ss.get(e):r==null?void 0:r.get(Te.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Vr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=M.node(e,t.path),n=Te.toDOMNode(e,r),o;M.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",u=Array.from(n.querySelectorAll(a)),l=0,f=0;f<u.length;f++){var d=u[f],p=d.childNodes[0];if(!(p==null||p.textContent==null)){var{length:v}=p.textContent,g=d.getAttribute("data-slate-length"),y=g==null?v:parseInt(g,10),x=l+y,C=u[f+1];if(t.offset===x&&C!==null&&C!==void 0&&C.hasAttribute("data-slate-mark-placeholder")){var m,A=C.childNodes[0];o=[A instanceof I9?A:C,(m=C.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=x){var F=Math.min(v,Math.max(0,t.offset-l));o=[p,F];break}l=x}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Vr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Fe.isBackward(t),a=Te.toDOMPoint(e,r),u=Fe.isCollapsed(t)?a:Te.toDOMPoint(e,n),l=Te.getWindow(e),f=l.document.createRange(),[d,p]=o?u:a,[v,g]=o?a:u,y=kn(d)?d:d.parentElement,x=!!y.getAttribute("data-slate-zero-width"),C=kn(v)?v:v.parentElement,m=!!C.getAttribute("data-slate-zero-width");return f.setStart(d,x?1:p),f.setEnd(v,m?1:g),f},toSlateNode:(e,t)=>{var r=kn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?ci.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[u,l]=n?t:j9(t),f=u.parentNode,d=null,p=0;if(f){var v,g,y=Te.toDOMNode(e,e),x=f.closest('[data-slate-void="true"]'),C=x&&y.contains(x)?x:null,m=f.closest('[contenteditable="false"]'),A=m&&y.contains(m)?m:null,F=f.closest("[data-slate-leaf]"),B=null;if(F){if(d=F.closest('[data-slate-node="text"]'),d){var R=Te.getWindow(e),S=R.document.createRange();S.setStart(d,0),S.setEnd(u,l);var z=S.cloneContents(),$=[...Array.prototype.slice.call(z.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(z.querySelectorAll("[contenteditable=false]"))];$.forEach(me=>{if(an&&!n&&me.hasAttribute("data-slate-zero-width")&&me.textContent.length>0&&me.textContext!=="\uFEFF"){me.textContent.startsWith("\uFEFF")&&(me.textContent=me.textContent.slice(1));return}me.parentNode.removeChild(me)}),p=z.textContent.length,B=d}}else if(C){for(var P=C.querySelectorAll("[data-slate-leaf]"),N=0;N<P.length;N++){var K=P[N];if(Te.hasDOMNode(e,K)){F=K;break}}F?(d=F.closest('[data-slate-node="text"]'),B=F,p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(me=>{p-=me.textContent.length})):p=1}else if(A){var L=me=>me?me.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Y=A.closest('[data-slate-node="element"]');if(a==="forward"){var V,_=[...L(Y),...L(Y==null?void 0:Y.nextElementSibling)];F=(V=_.find(me=>W9(A,me)))!==null&&V!==void 0?V:null}else{var q,U=[...L(Y==null?void 0:Y.previousElementSibling),...L(Y)];F=(q=U.findLast(me=>h1(A,me)))!==null&&q!==void 0?q:null}F&&(d=F.closest('[data-slate-node="text"]'),B=F,a==="forward"?p=0:(p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(me=>{p-=me.textContent.length})))}B&&p===B.textContent.length&&an&&B.getAttribute("data-slate-zero-width")==="z"&&(v=B.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||sa&&(g=B.textContent)!==null&&g!==void 0&&g.endsWith(`
|
|
104
|
+
|
|
105
|
+
`))&&p--}if(an&&!d&&!n){var X=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(X&&Te.hasDOMNode(e,X,{editable:!0})){var ee=Te.toSlateNode(e,X),{path:j,offset:ie}=M.start(e,Te.findPath(e,ee));return X.querySelector("[data-slate-leaf]")||(ie=l),{path:j,offset:ie}}}if(!d){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var de=Te.toSlateNode(e,d),pe=Te.findPath(e,de);return{path:pe,offset:p}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,u=m0(t)?t.anchorNode:t.startContainer,l,f,d,p,v;if(u)if(m0(t)){if(sa&&t.rangeCount>1){d=t.focusNode;var g=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let z=function($){return $.childElementCount>0?z($.children[0]):$};var x=g.startContainer,C=y.startContainer,m=z(x.children[g.startOffset]),A=z(C.children[y.startOffset]);p=0,A.childNodes.length>0?l=A.childNodes[0]:l=A,m.childNodes.length>0?d=m.childNodes[0]:d=m,A instanceof HTMLElement?f=A.innerHTML.length:f=0}else g.startContainer===d?(l=y.endContainer,f=y.endOffset,p=g.startOffset):(l=g.startContainer,f=g.endOffset,p=y.startOffset)}else l=t.anchorNode,f=t.anchorOffset,d=t.focusNode,p=t.focusOffset;Jm&&_9(l)||sa?v=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:v=t.isCollapsed}else l=t.startContainer,f=t.startOffset,d=t.endContainer,p=t.endOffset,v=t.collapsed;if(l==null||d==null||f==null||p==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));sa&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
106
|
+
|
|
107
|
+
`)&&p===d.textContent.length&&p--;var F=Te.toSlatePoint(e,[l,f],{exactMatch:o,suppressThrow:a});if(!F)return null;var B=h1(l,d)||l===d&&p<f,R=v?F:Te.toSlatePoint(e,[d,p],{exactMatch:o,suppressThrow:a,searchDirection:B?"forward":"backward"});if(!R)return null;var S={anchor:F,focus:R};return Fe.isExpanded(S)&&Fe.isForward(S)&&kn(d)&&M.void(e,{at:S.focus,mode:"highest"})&&(S=M.unhangRange(e,S,{voids:!0})),S}};function G9(e,t){var{path:r,diff:n}=t;if(!M.hasPath(e,r))return!1;var o=Je.get(e,r);if(!ft.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=se.next(r);if(!M.hasPath(e,a))return!1;var u=Je.get(e,a);return ft.isText(u)&&u.text.startsWith(n.text)}function ag(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function X9(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function Y9(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function ig(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),u=X9(a,o),l=Math.min(a.length-u,o.length-u),f=Y9(a,o,l),d={start:r+u,end:n-f,text:o.slice(u,o.length-f)};return d.start===d.end&&d.text.length===0?null:d}function J9(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=ag(e,t,r),u=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),l=a.slice(n,u),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return ig(e,{start:n,end:f,text:l})}function Z9(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function g0(e,t){var{path:r,offset:n}=t;if(!M.hasPath(e,r))return null;var o=Je.get(e,r);if(!ft.isText(o))return null;var a=M.above(e,{match:l=>gt.isElement(l)&&M.isBlock(e,l),at:r});if(!a)return null;for(;n>o.text.length;){var u=M.next(e,{at:r,match:ft.isText});if(!u||!se.isDescendant(u[1],a[1]))return null;n-=o.text.length,o=u[0],r=u[1]}return{path:r,offset:n}}function p1(e,t){var r=g0(e,t.anchor);if(!r)return null;if(Fe.isCollapsed(t))return{anchor:r,focus:r};var n=g0(e,t.focus);return n?{anchor:r,focus:n}:null}function v0(e,t,r){var n=fn.get(e),o=n==null?void 0:n.find(p=>{var{path:v}=p;return se.equals(v,t.path)});if(!o||t.offset<=o.diff.start)return Wt.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var u={path:t.path,offset:a.start},l=Wt.transform(u,r,{affinity:"backward"});return l?{path:l.path,offset:l.offset+t.offset-a.start}:null}var f={path:t.path,offset:t.offset-a.text.length+a.end-a.start},d=Wt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&se.equals(r.path,t.path)&&f.offset<r.position&&a.start<r.position?d:{path:d.path,offset:d.offset+a.text.length-a.end+a.start}:null}function m1(e,t,r){var n=v0(e,t.anchor,r);if(!n)return null;if(Fe.isCollapsed(t))return{anchor:n,focus:n};var o=v0(e,t.focus,r);return o?{anchor:n,focus:o}:null}function Q9(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!se.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!se.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!se.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:se.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:se.transform(r,t,{affinity:"forward"})};case"merge_node":return se.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:se.transform(r,t)}:{diff:n,id:o,path:se.transform(r,t)}}var a=se.transform(r,t);return a?{diff:n,path:a,id:o}:null}function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var e8=25,t8=200,r8=function(){},n8=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function o8(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,u=null,l=null,f=0,d=!1,p=()=>{var Y=Eo.get(t);if(Eo.delete(t),Y){var{selection:V}=t,_=p1(t,Y);_&&(!V||!Fe.equals(_,V))&&qe.select(t,_)}},v=()=>{var Y=Do.get(t);if(Do.delete(t),!!Y){if(Y.at){var V=Wt.isPoint(Y.at)?g0(t,Y.at):p1(t,Y.at);if(!V)return;var _=M.range(t,V);(!t.selection||!Fe.equals(t.selection,_))&&qe.select(t,V)}Y.run()}},g=()=>{if(u&&(clearTimeout(u),u=null),l&&(clearTimeout(l),l=null),!R()&&!B()){p();return}o||(o=!0,setTimeout(()=>o=!1)),B()&&(o="action");var Y=t.selection&&M.rangeRef(t,t.selection,{affinity:"forward"});ao.set(t,t.marks),r8("flush",Do.get(t),fn.get(t));for(var V=R(),_;_=(q=fn.get(t))===null||q===void 0?void 0:q[0];){var q,U,X=Rn.get(t);X!==void 0&&(Rn.delete(t),t.marks=X),X&&d===!1&&(d=null);var ee=Z9(_);(!t.selection||!Fe.equals(t.selection,ee))&&qe.select(t,ee),_.diff.text?M.insertText(t,_.diff.text):M.deleteFragment(t),fn.set(t,(U=fn.get(t))===null||U===void 0?void 0:U.filter(de=>{var{id:pe}=de;return pe!==_.id})),G9(t,_)||(V=!1,Do.delete(t),ao.delete(t),o="action",Eo.delete(t),r.cancel(),n.cancel(),Y==null||Y.unref())}var j=Y==null?void 0:Y.unref();if(j&&!Eo.get(t)&&(!t.selection||!Fe.equals(j,t.selection))&&qe.select(t,j),B()){v();return}V&&r(),r.flush(),n.flush(),p();var ie=ao.get(t);ao.delete(t),ie!==void 0&&(t.marks=ie,t.onChange())},y=Y=>{a&&clearTimeout(a),a=setTimeout(()=>{zo.set(t,!1),g()},e8)},x=Y=>{zo.set(t,!0),a&&(clearTimeout(a),a=null)},C=function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,V=f0.get(t);if(V){if(R()||Y){V.style.display="none";return}V.style.removeProperty("display")}},m=(Y,V)=>{var _,q=(_=fn.get(t))!==null&&_!==void 0?_:[];fn.set(t,q);var U=Je.leaf(t,Y),X=q.findIndex(ie=>se.equals(ie.path,Y));if(X<0){var ee=ig(U.text,V);ee&&q.push({path:Y,diff:V,id:f++}),C();return}var j=J9(U.text,q[X].diff,V);if(!j){q.splice(X,1),C();return}q[X]=Vi(Vi({},q[X]),{},{diff:j})},A=function(Y){var{at:V}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,Eo.delete(t),r.cancel(),n.cancel(),B()&&g(),Do.set(t,{at:V,run:Y}),l=setTimeout(g)},F=Y=>{var V;if(u&&(clearTimeout(u),u=null),!fa.get(t)){var{inputType:_}=Y,q=null,U=Y.dataTransfer||Y.data||void 0;d!==!1&&_!=="insertText"&&_!=="insertCompositionText"&&(d=!1);var[X]=Y.getTargetRanges();X&&(q=Te.toSlateRange(t,X,{exactMatch:!1,suppressThrow:!0}));var ee=Te.getWindow(t),j=ee.getSelection();if(!q&&j&&(X=j,q=Te.toSlateRange(t,j,{exactMatch:!1,suppressThrow:!0})),q=(V=q)!==null&&V!==void 0?V:t.selection,!!q){var ie=!0;if(_.startsWith("delete")){if(Fe.isExpanded(q)){var[de,pe]=Fe.edges(q),me=Je.leaf(t,de.path);if(me.text.length===de.offset&&pe.offset===0){var we=M.next(t,{at:de.path,match:ft.isText});we&&se.equals(we[1],pe.path)&&(q={anchor:pe,focus:pe})}}var Ie=_.endsWith("Backward")?"backward":"forward",[Z,ne]=Fe.edges(q),[oe,Q]=M.leaf(t,Z.path),le={text:"",start:Z.offset,end:ne.offset},ge=fn.get(t),he=ge==null?void 0:ge.find(wt=>se.equals(wt.path,Q)),ke=he?[he.diff,le]:[le],Ce=ag(oe.text,...ke);if(Ce.length===0&&(ie=!1),Fe.isExpanded(q)){if(ie&&se.equals(q.anchor.path,q.focus.path)){var xe={path:q.anchor.path,offset:Z.offset},Ae=M.range(t,xe,xe);return $(Ae),m(q.anchor.path,{text:"",end:ne.offset,start:Z.offset})}return A(()=>M.deleteFragment(t,{direction:Ie}),{at:q})}}switch(_){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return A(()=>M.deleteFragment(t),{at:q});case"deleteContent":case"deleteContentForward":{var{anchor:$e}=q;if(ie&&Fe.isCollapsed(q)){var He=Je.leaf(t,$e.path);if($e.offset<He.text.length)return m($e.path,{text:"",start:$e.offset,end:$e.offset+1})}return A(()=>M.deleteForward(t),{at:q})}case"deleteContentBackward":{var pt,{anchor:it}=q,Oe=m0(X)?X.isCollapsed:!!((pt=X)!==null&&pt!==void 0&&pt.collapsed);return ie&&Oe&&Fe.isCollapsed(q)&&it.offset>0?m(it.path,{text:"",start:it.offset-1,end:it.offset}):A(()=>M.deleteBackward(t),{at:q})}case"deleteEntireSoftLine":return A(()=>{M.deleteBackward(t,{unit:"line"}),M.deleteForward(t,{unit:"line"})},{at:q});case"deleteHardLineBackward":return A(()=>M.deleteBackward(t,{unit:"block"}),{at:q});case"deleteSoftLineBackward":return A(()=>M.deleteBackward(t,{unit:"line"}),{at:q});case"deleteHardLineForward":return A(()=>M.deleteForward(t,{unit:"block"}),{at:q});case"deleteSoftLineForward":return A(()=>M.deleteForward(t,{unit:"line"}),{at:q});case"deleteWordBackward":return A(()=>M.deleteBackward(t,{unit:"word"}),{at:q});case"deleteWordForward":return A(()=>M.deleteForward(t,{unit:"word"}),{at:q});case"insertLineBreak":return A(()=>M.insertSoftBreak(t),{at:q});case"insertParagraph":return A(()=>M.insertBreak(t),{at:q});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(n8(U))return A(()=>Te.insertData(t,U),{at:q});var Le=U??"";if(Rn.get(t)&&(Le=Le.replace("\uFEFF","")),_==="insertText"&&/.*\n.*\n$/.test(Le)&&(Le=Le.slice(0,-1)),Le.includes(`
|
|
108
|
+
`))return A(()=>{var wt=Le.split(`
|
|
109
|
+
`);wt.forEach((nt,kt)=>{nt&&M.insertText(t,nt),kt!==wt.length-1&&M.insertSoftBreak(t)})},{at:q});if(se.equals(q.anchor.path,q.focus.path)){var[Ke,st]=Fe.edges(q),Ze={start:Ke.offset,end:st.offset,text:Le};if(Le&&d&&_==="insertCompositionText"){var Qe=d.start+d.text.search(/\S|$/),$t=Ze.start+Ze.text.search(/\S|$/);$t===Qe+1&&Ze.end===d.start+d.text.length?(Ze.start-=1,d=null,K()):d=!1}else _==="insertText"?d===null?d=Ze:d&&Fe.isCollapsed(q)&&d.end+d.text.length===Ke.offset?d=Vi(Vi({},d),{},{text:d.text+Le}):d=!1:d=!1;if(ie){m(Ke.path,Ze);return}}return A(()=>M.insertText(t,Le),{at:q})}}}}},B=()=>!!Do.get(t),R=()=>{var Y;return!!((Y=fn.get(t))!==null&&Y!==void 0&&Y.length)},S=()=>B()||R(),z=()=>o,$=Y=>{Eo.set(t,Y),u&&(clearTimeout(u),u=null);var{selection:V}=t;if(Y){var _=!V||!se.equals(V.anchor.path,Y.anchor.path),q=!V||!se.equals(V.anchor.path.slice(0,-1),Y.anchor.path.slice(0,-1));(_&&d||q)&&(d=!1),(_||R())&&(u=setTimeout(g,t8))}},P=()=>{(B()||!R())&&g()},N=Y=>{R()||(C(!0),setTimeout(C))},K=()=>{B()||(l=setTimeout(g))},L=Y=>{if(!(R()||B())&&Y.some(_=>Ec(t,_,Y))){var V;(V=Qm.get(t))===null||V===void 0||V()}};return{flush:g,scheduleFlush:K,hasPendingDiffs:R,hasPendingAction:B,hasPendingChanges:S,isFlushing:z,handleUserSelect:$,handleCompositionEnd:y,handleCompositionStart:x,handleDOMBeforeInput:F,handleKeyDown:N,handleDomMutations:L,handleInput:P}}function a8(){var e=Bt(!1);return Jt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var di=is?e4:Jt;function i8(e,t,r){var[n]=Tt(()=>new MutationObserver(t));di(()=>{n.takeRecords()}),Jt(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var s8=["node"];function v1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function l8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u8={subtree:!0,childList:!0,characterData:!0},c8=an?e=>{var{node:t}=e,r=ma(e,s8);if(!an)return null;var n=Oo(),o=a8(),[a]=Tt(()=>o8(l8({editor:n},r)));return i8(t,a.handleDomMutations,u8),Cc.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,d8=["anchor","focus"],f8=["anchor","focus"],h8=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),sg=(e,t)=>{var r=ma(e,d8),n=ma(t,f8);return e[ga]===t[ga]&&h8(r,n)},p8=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!Fe.equals(n,o)||!sg(n,o))return!1}return!0},m8=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!sg(n,o))return!1}return!0};function b1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function g8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var v8=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Oo(),u=Te.findPath(a,o),l=se.parent(u),f=!!r[eg];return a.isVoid(n)?_e.createElement(Du,{length:Je.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&M.string(a,l)===""?_e.createElement(Du,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?_e.createElement(Du,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
110
|
+
`?_e.createElement(y1,{isTrailing:!0,text:r.text}):_e.createElement(y1,{text:r.text})},y1=e=>{var{text:t,isTrailing:r=!1}=e,n=Bt(null),o=()=>"".concat(t??"").concat(r?`
|
|
111
|
+
`:""),[a]=Tt(o);return di(()=>{var u=o();n.current&&n.current.textContent!==u&&(n.current.textContent=u)}),_e.createElement(b8,{ref:n},a)},b8=n4($o((e,t)=>_e.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Du=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),_e.createElement("span",g8({},o),!(an||Ym)||!r?"\uFEFF":null,r?_e.createElement("br",null):null)};function x1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var y8=an?300:0;function x8(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function w1(e){e.current&&(clearTimeout(e.current),e.current=null)}var w8=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:u=F=>_e.createElement(D8,lg({},F))}=e,l=Oo(),f=Bt(null),d=Bt(null),[p,v]=Tt(!1),g=Bt(null),y=St(F=>{if(x8(f,F==null),F==null){var B;f0.delete(l),(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,null)}else{if(f0.set(l,F),!f.current){var R=window.ResizeObserver||k9;f.current=new R(()=>{var S;(S=t.onPlaceholderResize)===null||S===void 0||S.call(t,F)})}f.current.observe(F),d.current=F}},[d,t,l]),x=_e.createElement(v8,{isLast:r,leaf:t,parent:o,text:n}),C=!!t[ga];if(Jt(()=>(C?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},y8)):(w1(g),v(!1)),()=>w1(g)),[C,v]),C&&p){var m={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Po?"inherit":void 0},contentEditable:!1,ref:y}};x=_e.createElement(_e.Fragment,null,a(m),x)}var A={"data-slate-leaf":!0};return u({attributes:A,children:x,leaf:t,text:n})},C8=_e.memo(w8,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&ft.equals(t.leaf,e.leaf)&&t.leaf[ga]===e.leaf[ga]),D8=e=>{var{attributes:t,children:r}=e;return _e.createElement("span",lg({},t),r)},E8=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:u}=e,l=Oo(),f=Bt(null),d=ft.decorations(u,t),p=Te.findKey(l,u),v=[],g=0;g<d.length;g++){var y=d[g];v.push(_e.createElement(C8,{isLast:r&&g===d.length-1,key:"".concat(p.id,"-").concat(g),renderPlaceholder:o,leaf:y,text:u,parent:n,renderLeaf:a}))}var x=St(C=>{var m=al.get(l);C?(m==null||m.set(p,C),Ho.set(u,C),ci.set(C,u)):(m==null||m.delete(p),Ho.delete(u),f.current&&ci.delete(f.current)),f.current=C},[f,l,p,u]);return _e.createElement("span",{"data-slate-node":"text",ref:x},v)},ug=_e.memo(E8,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&m8(t.decorations,e.decorations));function C1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function b0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var k8=e=>{var{decorations:t,element:r,renderElement:n=F=>_e.createElement(A8,b0({},F)),renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=Oo(),f=N8(),d=l.isInline(r),p=Te.findKey(l,r),v=St(F=>{var B=al.get(l);F?(B==null||B.set(p,F),Ho.set(r,F),ci.set(F,r)):(B==null||B.delete(p),Ho.delete(r))},[l,p,r]),g=dg({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:u}),y={"data-slate-node":"element",ref:v};if(d&&(y["data-slate-inline"]=!0),!d&&M.hasInlines(l,r)){var x=Je.string(r),C=jm(x);C==="rtl"&&(y.dir=C)}if(M.isVoid(l,r)){y["data-slate-void"]=!0,!f&&d&&(y.contentEditable=!1);var m=d?"span":"div",[[A]]=Je.texts(r);g=_e.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},_e.createElement(ug,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:A})),xc.set(A,0),wc.set(A,r)}return n({attributes:y,children:g,element:r})},S8=_e.memo(k8,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&p8(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Fe.equals(e.selection,t.selection))),A8=e=>{var{attributes:t,children:r,element:n}=e,o=Oo(),a=o.isInline(n)?"span":"div";return _e.createElement(a,b0(b0({},t),{},{style:{position:"relative"}}),r)},cg=co(()=>[]),B8=()=>To(cg),F8=co(!1),dg=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:u}=e,l=B8(),f=Oo();fa.set(f,!1);for(var d=Te.findPath(f,r),p=[],v=gt.isElement(r)&&!f.isInline(r)&&M.hasInlines(f,r),g=0;g<r.children.length;g++){var y=d.concat(g),x=r.children[g],C=Te.findKey(f,x),m=M.range(f,y),A=u&&Fe.intersection(m,u),F=l([x,y]);for(var B of t){var R=Fe.intersection(B,m);R&&F.push(R)}gt.isElement(x)?p.push(_e.createElement(F8.Provider,{key:"provider-".concat(C.id),value:!!A},_e.createElement(S8,{decorations:F,element:x,key:C.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:A}))):p.push(_e.createElement(ug,{decorations:F,key:C.id,isLast:v&&g===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:x})),xc.set(x,g),wc.set(x,r)}return p},fg=co(!1),N8=()=>To(fg),hg=co(null),pg=()=>{var e=To(hg);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function $8(){var e=Oo(),t=Bt(!1),r=Bt(0),n=St(()=>{if(!t.current){t.current=!0;var o=Te.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Jt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var T8=3,O8={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},R8={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},M8={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ar=e=>{var t=O8[e],r=R8[e],n=M8[e],o=t&&xu.isHotkey(t),a=r&&xu.isHotkey(r),u=n&&xu.isHotkey(n);return l=>!!(o&&o(l)||f1&&a&&a(l)||!f1&&u&&u(l))},$r={isBold:Ar("bold"),isCompose:Ar("compose"),isMoveBackward:Ar("moveBackward"),isMoveForward:Ar("moveForward"),isDeleteBackward:Ar("deleteBackward"),isDeleteForward:Ar("deleteForward"),isDeleteLineBackward:Ar("deleteLineBackward"),isDeleteLineForward:Ar("deleteLineForward"),isDeleteWordBackward:Ar("deleteWordBackward"),isDeleteWordForward:Ar("deleteWordForward"),isExtendBackward:Ar("extendBackward"),isExtendForward:Ar("extendForward"),isExtendLineBackward:Ar("extendLineBackward"),isExtendLineForward:Ar("extendLineForward"),isItalic:Ar("italic"),isMoveLineBackward:Ar("moveLineBackward"),isMoveLineForward:Ar("moveLineForward"),isMoveWordBackward:Ar("moveWordBackward"),isMoveWordForward:Ar("moveWordForward"),isRedo:Ar("redo"),isSoftBreak:Ar("insertSoftBreak"),isSplitBlock:Ar("splitBlock"),isTransposeCharacter:Ar("transposeCharacter"),isUndo:Ar("undo")},I8=(e,t)=>{var r=[],n=()=>{r=[]},o=u=>{if(t.current){var l=u.filter(f=>Ec(e,f,u));r.push(...l)}};function a(){r.length>0&&(r.reverse().forEach(u=>{u.type!=="characterData"&&(u.removedNodes.forEach(l=>{u.target.insertBefore(l,u.nextSibling)}),u.addedNodes.forEach(l=>{u.target.removeChild(l)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},P8={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class mg extends r4{constructor(){super(...arguments),An(this,"context",null),An(this,"manager",null),An(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,P8)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=I8(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}An(mg,"contextType",yc);var z8=an?mg:e=>{var{children:t}=e;return _e.createElement(_e.Fragment,null,t)},j8=co(!1),_8=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],L8=["text"];function D1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var H8=e=>_e.createElement(_e.Fragment,null,dg(e)),y0=$o((e,t)=>{var r=St(Z=>_e.createElement(q8,Vn({},Z)),[]),{autoFocus:n,decorate:o=K8,onDOMBeforeInput:a,placeholder:u,readOnly:l=!1,renderElement:f,renderLeaf:d,renderPlaceholder:p=r,scrollSelectionIntoView:v=W8,style:g={},as:y="div",disableDefaultStyles:x=!1}=e,C=ma(e,_8),m=pg(),[A,F]=Tt(!1),B=Bt(null),R=Bt([]),[S,z]=Tt(),$=Bt(!1),{onUserInput:P,receivedUserInput:N}=$8(),[,K]=t4(Z=>Z+1,0);Qm.set(m,K),h0.set(m,l);var L=yt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Jt(()=>{B.current&&n&&B.current.focus()},[n]);var Y=Bt(),V=yt(()=>t9(()=>{if(fa.get(m)){V();return}var Z=Te.toDOMNode(m,m),ne=Z.getRootNode();if(!$.current&&Po&&ne instanceof ShadowRoot){$.current=!0;var oe=K9();oe?document.execCommand("indent"):qe.deselect(m),$.current=!1;return}var Q=Y.current;if((an||!Te.isComposing(m))&&(!L.isUpdatingSelection||Q!=null&&Q.isFlushing())&&!L.isDraggingInternally){var le=Te.findDocumentOrShadowRoot(m),{activeElement:ge}=le,he=Te.toDOMNode(m,m),ke=Za(le);if(ge===he?(L.latestElement=ge,So.set(m,!0)):So.delete(m),!ke)return qe.deselect(m);var{anchorNode:Ce,focusNode:xe}=ke,Ae=Te.hasEditableTarget(m,Ce)||Te.isTargetInsideNonReadonlyVoid(m,Ce),$e=Te.hasTarget(m,xe);if(Ae&&$e){var He=Te.toSlateRange(m,ke,{exactMatch:!1,suppressThrow:!0});He&&(!Te.isComposing(m)&&!(Q!=null&&Q.hasPendingChanges())&&!(Q!=null&&Q.isFlushing())?qe.select(m,He):Q==null||Q.handleUserSelect(He))}l&&(!Ae||!$e)&&qe.deselect(m)}},100),[m,l,L]),_=yt(()=>Zx(V,0),[V]);Y.current=c8({node:B,onDOMSelectionChange:V,scheduleOnDOMSelectionChange:_}),di(()=>{var Z,ne,oe;B.current&&(oe=Dc(B.current))?(Zm.set(m,oe),ss.set(m,B.current),Ho.set(m,B.current),ci.set(B.current,m)):Ho.delete(m);var{selection:Q}=m,le=Te.findDocumentOrShadowRoot(m),ge=Za(le);if(!(!ge||!Te.isFocused(m)||(Z=Y.current)!==null&&Z!==void 0&&Z.hasPendingAction())){var he=Ae=>{var $e=ge.type!=="None";if(!(!Q&&!$e)){var He=ge.focusNode,pt;if(sa&&ge.rangeCount>1){var it=ge.getRangeAt(0),Oe=ge.getRangeAt(ge.rangeCount-1);it.startContainer===He?pt=Oe.endContainer:pt=it.startContainer}else pt=ge.anchorNode;var Le=ss.get(m),Ke=!1;if(Le.contains(pt)&&Le.contains(He)&&(Ke=!0),$e&&Ke&&Q&&!Ae){var st=Te.toSlateRange(m,ge,{exactMatch:!0,suppressThrow:!0});if(st&&Fe.equals(st,Q)){var Ze;if(!L.hasMarkPlaceholder||(Ze=pt)!==null&&Ze!==void 0&&(Ze=Ze.parentElement)!==null&&Ze!==void 0&&Ze.hasAttribute("data-slate-mark-placeholder"))return}}if(Q&&!Te.hasRange(m,Q)){m.selection=Te.toSlateRange(m,ge,{exactMatch:!1,suppressThrow:!0});return}L.isUpdatingSelection=!0;var Qe=Q&&Te.toDOMRange(m,Q);return Qe?(Te.isComposing(m)&&!an?ge.collapseToEnd():Fe.isBackward(Q)?ge.setBaseAndExtent(Qe.endContainer,Qe.endOffset,Qe.startContainer,Qe.startOffset):ge.setBaseAndExtent(Qe.startContainer,Qe.startOffset,Qe.endContainer,Qe.endOffset),v(m,Qe)):ge.removeAllRanges(),Qe}};ge.rangeCount<=1&&he();var ke=((ne=Y.current)===null||ne===void 0?void 0:ne.isFlushing())==="action";if(!an||!ke){setTimeout(()=>{L.isUpdatingSelection=!1});return}var Ce=null,xe=requestAnimationFrame(()=>{if(ke){var Ae=$e=>{try{var He=Te.toDOMNode(m,m);He.focus(),he($e)}catch{}};Ae(),Ce=setTimeout(()=>{Ae(!0),L.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(xe),Ce&&clearTimeout(Ce)}}});var q=St(Z=>{var ne=Te.toDOMNode(m,m),oe=ne.getRootNode();if($!=null&&$.current&&Po&&oe instanceof ShadowRoot){var Q=Z.getTargetRanges(),le=Q[0],ge=new window.Range;ge.setStart(le.startContainer,le.startOffset),ge.setEnd(le.endContainer,le.endOffset);var he=Te.toSlateRange(m,ge,{exactMatch:!1,suppressThrow:!1});qe.select(m,he),Z.preventDefault(),Z.stopImmediatePropagation();return}if(P(),!l&&Te.hasEditableTarget(m,Z.target)&&!V8(Z,a)){var ke;if(Y.current)return Y.current.handleDOMBeforeInput(Z);_.flush(),V.flush();var{selection:Ce}=m,{inputType:xe}=Z,Ae=Z.dataTransfer||Z.data||void 0,$e=xe==="insertCompositionText"||xe==="deleteCompositionText";if($e&&Te.isComposing(m))return;var He=!1;if(xe==="insertText"&&Ce&&Fe.isCollapsed(Ce)&&Z.data&&Z.data.length===1&&/[a-z ]/i.test(Z.data)&&Ce.anchor.offset!==0&&(He=!0,m.marks&&(He=!1),!fa.get(m))){var pt,it,{anchor:Oe}=Ce,[Le,Ke]=Te.toDOMPoint(m,Oe),st=(pt=Le.parentElement)===null||pt===void 0?void 0:pt.closest("a"),Ze=Te.getWindow(m);if(He&&st&&Te.hasDOMNode(m,st)){var Qe,$t=Ze==null?void 0:Ze.document.createTreeWalker(st,NodeFilter.SHOW_TEXT).lastChild();$t===Le&&((Qe=$t.textContent)===null||Qe===void 0?void 0:Qe.length)===Ke&&(He=!1)}if(He&&Le.parentElement&&(Ze==null||(it=Ze.getComputedStyle(Le.parentElement))===null||it===void 0?void 0:it.whiteSpace)==="pre"){var wt=M.above(m,{at:Oe.path,match:At=>gt.isElement(At)&&M.isBlock(m,At)});wt&&Je.string(wt[0]).includes(" ")&&(He=!1)}}if((!xe.startsWith("delete")||xe.startsWith("deleteBy"))&&!fa.get(m)){var[nt]=Z.getTargetRanges();if(nt){var kt=Te.toSlateRange(m,nt,{exactMatch:!1,suppressThrow:!1});if(!Ce||!Fe.equals(Ce,kt)){He=!1;var ze=!$e&&m.selection&&M.rangeRef(m,m.selection);qe.select(m,kt),ze&&Ja.set(m,ze)}}}if($e)return;if(He||Z.preventDefault(),Ce&&Fe.isExpanded(Ce)&&xe.startsWith("delete")){var ce=xe.endsWith("Backward")?"backward":"forward";M.deleteFragment(m,{direction:ce});return}switch(xe){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{M.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{M.deleteForward(m);break}case"deleteContentBackward":{M.deleteBackward(m);break}case"deleteEntireSoftLine":{M.deleteBackward(m,{unit:"line"}),M.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{M.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{M.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{M.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{M.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{M.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{M.deleteForward(m,{unit:"word"});break}case"insertLineBreak":M.insertSoftBreak(m);break;case"insertParagraph":{M.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{xe==="insertFromComposition"&&Te.isComposing(m)&&(F(!1),zo.set(m,!1)),(Ae==null?void 0:Ae.constructor.name)==="DataTransfer"?Te.insertData(m,Ae):typeof Ae=="string"&&(He?R.current.push(()=>M.insertText(m,Ae)):M.insertText(m,Ae));break}}var mt=(ke=Ja.get(m))===null||ke===void 0?void 0:ke.unref();Ja.delete(m),mt&&(!m.selection||!Fe.equals(m.selection,mt))&&qe.select(m,mt)}},[m,V,P,a,l,_]),U=St(Z=>{Z==null?(V.cancel(),_.cancel(),ss.delete(m),Ho.delete(m),B.current&&yo&&B.current.removeEventListener("beforeinput",q)):yo&&Z.addEventListener("beforeinput",q),B.current=Z,typeof t=="function"?t(Z):t&&(t.current=Z)},[V,_,m,q,t]);di(()=>{var Z=Te.getWindow(m);Z.document.addEventListener("selectionchange",_);var ne=()=>{L.isDraggingInternally=!1};return Z.document.addEventListener("dragend",ne),Z.document.addEventListener("drop",ne),()=>{Z.document.removeEventListener("selectionchange",_),Z.document.removeEventListener("dragend",ne),Z.document.removeEventListener("drop",ne)}},[_,L]);var X=o([m,[]]),ee=u&&m.children.length===1&&Array.from(Je.texts(m)).length===1&&Je.string(m)===""&&!A,j=St(Z=>{if(Z&&ee){var ne;z((ne=Z.getBoundingClientRect())===null||ne===void 0?void 0:ne.height)}else z(void 0)},[ee]);if(ee){var ie=M.start(m,[]);X.push({[ga]:!0,placeholder:u,onPlaceholderResize:j,anchor:ie,focus:ie})}var{marks:de}=m;if(L.hasMarkPlaceholder=!1,m.selection&&Fe.isCollapsed(m.selection)&&de){var{anchor:pe}=m.selection,me=Je.leaf(m,pe.path),we=ma(me,L8);if(!ft.equals(me,de,{loose:!0})){L.hasMarkPlaceholder=!0;var Ie=Object.fromEntries(Object.keys(we).map(Z=>[Z,null]));X.push(Vn(Vn(Vn({[eg]:!0},Ie),de),{},{anchor:pe,focus:pe}))}}return Jt(()=>{setTimeout(()=>{var{selection:Z}=m;if(Z){var{anchor:ne}=Z,oe=Je.leaf(m,ne.path);if(de&&!ft.equals(oe,de,{loose:!0})){Rn.set(m,de);return}}Rn.delete(m)})}),_e.createElement(fg.Provider,{value:l},_e.createElement(j8.Provider,{value:A},_e.createElement(cg.Provider,{value:o},_e.createElement(z8,{node:B,receivedUserInput:N},_e.createElement(y,Vn(Vn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},C),{},{spellCheck:yo||!is?C.spellCheck:!1,autoCorrect:yo||!is?C.autoCorrect:"false",autoCapitalize:yo||!is?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:U,style:Vn(Vn({},x?{}:Vn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},S?{minHeight:S}:{})),g),onBeforeInput:St(Z=>{if(!yo&&!l&&!on(Z,C.onBeforeInput)&&Te.hasSelectableTarget(m,Z.target)&&(Z.preventDefault(),!Te.isComposing(m))){var ne=Z.data;M.insertText(m,ne)}},[C.onBeforeInput,m,l]),onInput:St(Z=>{if(!on(Z,C.onInput)){if(Y.current){Y.current.handleInput();return}for(var ne of R.current)ne();if(R.current=[],!Te.isFocused(m)){var oe=Z.nativeEvent,Q=m;if(oe.inputType==="historyUndo"&&typeof Q.undo=="function"){Q.undo();return}if(oe.inputType==="historyRedo"&&typeof Q.redo=="function"){Q.redo();return}}}},[C.onInput,m]),onBlur:St(Z=>{if(!(l||L.isUpdatingSelection||!Te.hasSelectableTarget(m,Z.target)||on(Z,C.onBlur))){var ne=Te.findDocumentOrShadowRoot(m);if(L.latestElement!==ne.activeElement){var{relatedTarget:oe}=Z,Q=Te.toDOMNode(m,m);if(oe!==Q&&!(kn(oe)&&oe.hasAttribute("data-slate-spacer"))){if(oe!=null&&No(oe)&&Te.hasDOMNode(m,oe)){var le=Te.toSlateNode(m,oe);if(gt.isElement(le)&&!m.isVoid(le))return}if(Po){var ge=Za(ne);ge==null||ge.removeAllRanges()}So.delete(m)}}}},[l,L.isUpdatingSelection,L.latestElement,m,C.onBlur]),onClick:St(Z=>{if(Te.hasTarget(m,Z.target)&&!on(Z,C.onClick)&&No(Z.target)){var ne=Te.toSlateNode(m,Z.target),oe=Te.findPath(m,ne);if(!M.hasPath(m,oe)||Je.get(m,oe)!==ne)return;if(Z.detail===T8&&oe.length>=1){var Q=oe;if(!(gt.isElement(ne)&&M.isBlock(m,ne))){var le,ge=M.above(m,{match:He=>gt.isElement(He)&&M.isBlock(m,He),at:oe});Q=(le=ge==null?void 0:ge[1])!==null&&le!==void 0?le:oe.slice(0,1)}var he=M.range(m,Q);qe.select(m,he);return}if(l)return;var ke=M.start(m,oe),Ce=M.end(m,oe),xe=M.void(m,{at:ke}),Ae=M.void(m,{at:Ce});if(xe&&Ae&&se.equals(xe[1],Ae[1])){var $e=M.range(m,ke);qe.select(m,$e)}}},[m,C.onClick,l]),onCompositionEnd:St(Z=>{if(Te.hasSelectableTarget(m,Z.target)){var ne;if(Te.isComposing(m)&&Promise.resolve().then(()=>{F(!1),zo.set(m,!1)}),(ne=Y.current)===null||ne===void 0||ne.handleCompositionEnd(Z),on(Z,C.onCompositionEnd)||an)return;if(!Po&&!O9&&!Ym&&!M9&&!R9&&Z.data){var oe=Rn.get(m);Rn.delete(m),oe!==void 0&&(ao.set(m,m.marks),m.marks=oe),M.insertText(m,Z.data);var Q=ao.get(m);ao.delete(m),Q!==void 0&&(m.marks=Q)}}},[C.onCompositionEnd,m]),onCompositionUpdate:St(Z=>{Te.hasSelectableTarget(m,Z.target)&&!on(Z,C.onCompositionUpdate)&&(Te.isComposing(m)||(F(!0),zo.set(m,!0)))},[C.onCompositionUpdate,m]),onCompositionStart:St(Z=>{if(Te.hasSelectableTarget(m,Z.target)){var ne;if((ne=Y.current)===null||ne===void 0||ne.handleCompositionStart(Z),on(Z,C.onCompositionStart)||an)return;F(!0);var{selection:oe}=m;if(oe&&Fe.isExpanded(oe)){M.deleteFragment(m);return}}},[C.onCompositionStart,m]),onCopy:St(Z=>{Te.hasSelectableTarget(m,Z.target)&&!on(Z,C.onCopy)&&!E1(Z)&&(Z.preventDefault(),Te.setFragmentData(m,Z.clipboardData,"copy"))},[C.onCopy,m]),onCut:St(Z=>{if(!l&&Te.hasSelectableTarget(m,Z.target)&&!on(Z,C.onCut)&&!E1(Z)){Z.preventDefault(),Te.setFragmentData(m,Z.clipboardData,"cut");var{selection:ne}=m;if(ne)if(Fe.isExpanded(ne))M.deleteFragment(m);else{var oe=Je.parent(m,ne.anchor.path);M.isVoid(m,oe)&&qe.delete(m)}}},[l,m,C.onCut]),onDragOver:St(Z=>{if(Te.hasTarget(m,Z.target)&&!on(Z,C.onDragOver)){var ne=Te.toSlateNode(m,Z.target);gt.isElement(ne)&&M.isVoid(m,ne)&&Z.preventDefault()}},[C.onDragOver,m]),onDragStart:St(Z=>{if(!l&&Te.hasTarget(m,Z.target)&&!on(Z,C.onDragStart)){var ne=Te.toSlateNode(m,Z.target),oe=Te.findPath(m,ne),Q=gt.isElement(ne)&&M.isVoid(m,ne)||M.void(m,{at:oe,voids:!0});if(Q){var le=M.range(m,oe);qe.select(m,le)}L.isDraggingInternally=!0,Te.setFragmentData(m,Z.dataTransfer,"drag")}},[l,m,C.onDragStart,L]),onDrop:St(Z=>{if(!l&&Te.hasTarget(m,Z.target)&&!on(Z,C.onDrop)){Z.preventDefault();var ne=m.selection,oe=Te.findEventRange(m,Z),Q=Z.dataTransfer;qe.select(m,oe),L.isDraggingInternally&&ne&&!Fe.equals(ne,oe)&&!M.void(m,{at:oe,voids:!0})&&qe.delete(m,{at:ne}),Te.insertData(m,Q),Te.isFocused(m)||Te.focus(m)}},[l,m,C.onDrop,L]),onDragEnd:St(Z=>{!l&&L.isDraggingInternally&&C.onDragEnd&&Te.hasTarget(m,Z.target)&&C.onDragEnd(Z)},[l,L,C,m]),onFocus:St(Z=>{if(!l&&!L.isUpdatingSelection&&Te.hasEditableTarget(m,Z.target)&&!on(Z,C.onFocus)){var ne=Te.toDOMNode(m,m),oe=Te.findDocumentOrShadowRoot(m);if(L.latestElement=oe.activeElement,sa&&Z.target!==ne){ne.focus();return}So.set(m,!0)}},[l,L,m,C.onFocus]),onKeyDown:St(Z=>{if(!l&&Te.hasEditableTarget(m,Z.target)){var ne;(ne=Y.current)===null||ne===void 0||ne.handleKeyDown(Z);var{nativeEvent:oe}=Z;if(Te.isComposing(m)&&oe.isComposing===!1&&(zo.set(m,!1),F(!1)),on(Z,C.onKeyDown)||Te.isComposing(m))return;var{selection:Q}=m,le=m.children[Q!==null?Q.focus.path[0]:0],ge=jm(Je.string(le))==="rtl";if($r.isRedo(oe)){Z.preventDefault();var he=m;typeof he.redo=="function"&&he.redo();return}if($r.isUndo(oe)){Z.preventDefault();var ke=m;typeof ke.undo=="function"&&ke.undo();return}if($r.isMoveLineBackward(oe)){Z.preventDefault(),qe.move(m,{unit:"line",reverse:!0});return}if($r.isMoveLineForward(oe)){Z.preventDefault(),qe.move(m,{unit:"line"});return}if($r.isExtendLineBackward(oe)){Z.preventDefault(),qe.move(m,{unit:"line",edge:"focus",reverse:!0});return}if($r.isExtendLineForward(oe)){Z.preventDefault(),qe.move(m,{unit:"line",edge:"focus"});return}if($r.isMoveBackward(oe)){Z.preventDefault(),Q&&Fe.isCollapsed(Q)?qe.move(m,{reverse:!ge}):qe.collapse(m,{edge:ge?"end":"start"});return}if($r.isMoveForward(oe)){Z.preventDefault(),Q&&Fe.isCollapsed(Q)?qe.move(m,{reverse:ge}):qe.collapse(m,{edge:ge?"start":"end"});return}if($r.isMoveWordBackward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:!ge});return}if($r.isMoveWordForward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)&&qe.collapse(m,{edge:"focus"}),qe.move(m,{unit:"word",reverse:ge});return}if(yo){if((Jm||Po)&&Q&&($r.isDeleteBackward(oe)||$r.isDeleteForward(oe))&&Fe.isCollapsed(Q)){var Ce=Je.parent(m,Q.anchor.path);if(gt.isElement(Ce)&&M.isVoid(m,Ce)&&(M.isInline(m,Ce)||M.isBlock(m,Ce))){Z.preventDefault(),M.deleteBackward(m,{unit:"block"});return}}}else{if($r.isBold(oe)||$r.isItalic(oe)||$r.isTransposeCharacter(oe)){Z.preventDefault();return}if($r.isSoftBreak(oe)){Z.preventDefault(),M.insertSoftBreak(m);return}if($r.isSplitBlock(oe)){Z.preventDefault(),M.insertBreak(m);return}if($r.isDeleteBackward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m);return}if($r.isDeleteForward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m);return}if($r.isDeleteLineBackward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m,{unit:"line"});return}if($r.isDeleteLineForward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m,{unit:"line"});return}if($r.isDeleteWordBackward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m,{unit:"word"});return}if($r.isDeleteWordForward(oe)){Z.preventDefault(),Q&&Fe.isExpanded(Q)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m,{unit:"word"});return}}}},[l,m,C.onKeyDown]),onPaste:St(Z=>{!l&&Te.hasEditableTarget(m,Z.target)&&!on(Z,C.onPaste)&&(!yo||z9(Z.nativeEvent)||Po)&&(Z.preventDefault(),Te.insertData(m,Z.clipboardData))},[l,m,C.onPaste])}),_e.createElement(H8,{decorations:X,node:m,renderElement:f,renderPlaceholder:p,renderLeaf:d,selection:m.selection}))))))}),q8=e=>{var{attributes:t,children:r}=e;return _e.createElement("span",Vn({},t),r,an&&_e.createElement("br",null))},K8=()=>[],W8=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Fe.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),o9(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},on=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},E1=e=>No(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),V8=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},U8=co(!1),G8=co({});function X8(e){var t=Bt([]).current,r=Bt({editor:e}).current,n=St(a=>{r.editor=a,t.forEach(u=>u(a))},[t,r]),o=yt(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var Y8=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],Ui=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:u}=e,l=ma(e,Y8),[f,d]=_e.useState(()=>{if(!Je.isNodeList(u))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Vr.stringify(u)));if(!M.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Vr.stringify(t)));return t.children=u,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:p,onChange:v}=X8(t),g=St(C=>{var m;switch(n&&n(t.children),C==null||(m=C.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}d(A=>({v:A.v+1,editor:t})),v(t)},[t,v,n,o,a]);Jt(()=>(p0.set(t,g),()=>{p0.set(t,()=>{})}),[t,g]);var[y,x]=Tt(Te.isFocused(t));return Jt(()=>{x(Te.isFocused(t))},[t]),di(()=>{var C=()=>x(Te.isFocused(t));return Xm>=17?(document.addEventListener("focusin",C),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",C)}):(document.addEventListener("focus",C,!0),document.addEventListener("blur",C,!0),()=>{document.removeEventListener("focus",C,!0),document.removeEventListener("blur",C,!0)})},[]),_e.createElement(G8.Provider,{value:p},_e.createElement(hg.Provider,{value:f},_e.createElement(yc.Provider,{value:f.editor},_e.createElement(U8.Provider,{value:y},r))))},k1=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},S1=(e,t,r)=>{var n=Te.toDOMRange(e,t).getBoundingClientRect(),o=Te.toDOMRange(e,r).getBoundingClientRect();return k1(n,o)&&k1(o,n)},J8=(e,t)=>{var r=M.range(e,Fe.end(t)),n=Array.from(M.positions(e,{at:t})),o=0,a=n.length,u=Math.floor(a/2);if(S1(e,M.range(e,n[o]),r))return M.range(e,n[o],r);if(n.length<2)return M.range(e,n[n.length-1],r);for(;u!==n.length&&u!==o;)S1(e,M.range(e,n[u]),r)?a=u:o=u,u=Math.floor((o+a)/2);return M.range(e,n[a],r)};function A1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function B1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A1(Object(r),!0).forEach(function(n){An(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:u,removeMark:l}=r;return al.set(r,new WeakMap),r.addMark=(f,d)=>{var p,v;(p=Cc.get(r))===null||p===void 0||p(),!Rn.get(r)&&(v=fn.get(r))!==null&&v!==void 0&&v.length&&Rn.set(r,null),ao.delete(r),u(f,d)},r.removeMark=f=>{var d;!Rn.get(r)&&(d=fn.get(r))!==null&&d!==void 0&&d.length&&Rn.set(r,null),ao.delete(r),l(f)},r.deleteBackward=f=>{if(f!=="line")return a(f);if(r.selection&&Fe.isCollapsed(r.selection)){var d=M.above(r,{match:y=>gt.isElement(y)&&M.isBlock(r,y),at:r.selection});if(d){var[,p]=d,v=M.range(r,p,r.selection.anchor),g=J8(r,v);Fe.isCollapsed(g)||qe.delete(r,{at:g})}}},r.apply=f=>{var d=[],p=[],v=fn.get(r);if(v!=null&&v.length){var g=v.map(V=>Q9(V,f)).filter(Boolean);fn.set(r,g)}var y=Eo.get(r);y&&Eo.set(r,m1(r,y,f));var x=Do.get(r);if(x!=null&&x.at){var C=Wt.isPoint(x==null?void 0:x.at)?v0(r,x.at,f):m1(r,x.at,f);Do.set(r,C?B1(B1({},x),{},{at:C}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...ra(r,f.path));break}case"set_selection":{var m;(m=Ja.get(r))===null||m===void 0||m.unref(),Ja.delete(r);break}case"insert_node":case"remove_node":{d.push(...ra(r,se.parent(f.path)));break}case"merge_node":{var A=se.previous(f.path);d.push(...ra(r,A));break}case"move_node":{var F=se.common(se.parent(f.path),se.parent(f.newPath));d.push(...ra(r,F));var B;se.isBefore(f.path,f.newPath)?(d.push(...ra(r,se.parent(f.path))),B=f.newPath):(d.push(...ra(r,se.parent(f.newPath))),B=f.path);var R=Je.get(e,se.parent(B)),S=Te.findKey(r,R),z=M.pathRef(r,se.parent(B));p.push([z,S]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":fa.set(r,!0)}for(var[$,P]of d){var[N]=M.node(r,$);Is.set(N,P)}for(var[K,L]of p){if(K.current){var[Y]=M.node(r,K.current);Is.set(Y,L)}K.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[p,v]=Fe.edges(d),g=M.void(r,{at:p.path}),y=M.void(r,{at:v.path});if(!(Fe.isCollapsed(d)&&!g)){var x=Te.toDOMRange(r,d),C=x.cloneContents(),m=C.childNodes[0];if(C.childNodes.forEach(N=>{N.textContent&&N.textContent.trim()!==""&&(m=N)}),y){var[A]=y,F=x.cloneRange(),B=Te.toDOMNode(r,A);F.setEndAfter(B),C=F.cloneContents()}if(g&&(m=C.querySelector("[data-slate-spacer]")),Array.from(C.querySelectorAll("[data-slate-zero-width]")).forEach(N=>{var K=N.getAttribute("data-slate-zero-width")==="n";N.textContent=K?`
|
|
112
|
+
`:""}),rg(m)){var R=m.ownerDocument.createElement("span");R.style.whiteSpace="pre",R.appendChild(m),C.appendChild(R),m=R}var S=r.getFragment(),z=JSON.stringify(S),$=window.btoa(encodeURIComponent(z));m.setAttribute("data-slate-fragment",$),f.setData("application/".concat(t),$);var P=C.ownerDocument.createElement("div");return P.appendChild(C),P.setAttribute("hidden","true"),C.ownerDocument.body.appendChild(P),f.setData("text/html",P.innerHTML),f.setData("text/plain",og(P)),C.ownerDocument.body.removeChild(P),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||q9(f);if(d){var p=decodeURIComponent(window.atob(d)),v=JSON.parse(p);return r.insertFragment(v),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var p=d.split(/\r\n|\r|\n/),v=!1;for(var g of p)v&&qe.splitNodes(r,{always:!0}),r.insertText(g),v=!0;return!0}return!1},r.onChange=f=>{var d=Xm<18?Pu.unstable_batchedUpdates:p=>p();d(()=>{var p=p0.get(r);p&&p(f),o(f)})},r},ra=(e,t)=>{var r=[];for(var[n,o]of M.levels(e,{at:t})){var a=Te.findKey(e,n);r.push([o,a])}return r};function kc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jo=kc();function gg(e){Jo=e}var Qa={exec:()=>null};function hr(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let u=typeof a=="string"?a:a.source;return u=u.replace(sn.caret,"$1"),r=r.replace(o,u),n},getRegex:()=>new RegExp(r,t)};return n}var sn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Q8=/^(?:[ \t]*(?:\n|$))+/,ew=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ei=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sc=/(?:[*+-]|\d{1,9}[.)])/,vg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bg=hr(vg).replace(/bull/g,Sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nw=hr(vg).replace(/bull/g,Sc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ac=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ow=/^[^\n]+/,Bc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,aw=hr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iw=hr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sc).getRegex(),il="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sw=hr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Fc).replace("tag",il).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yg=hr(Ac).replace("hr",Ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex(),lw=hr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yg).getRegex(),Nc={blockquote:lw,code:ew,def:aw,fences:tw,heading:rw,hr:Ei,html:sw,lheading:bg,list:iw,newline:Q8,paragraph:yg,table:Qa,text:ow},F1=hr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex(),uw={...Nc,lheading:nw,table:F1,paragraph:hr(Ac).replace("hr",Ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",F1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",il).getRegex()},cw={...Nc,html:hr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hr(Ac).replace("hr",Ei).replace("heading",` *#{1,6} *[^
|
|
113
|
+
]`).replace("lheading",bg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xg=/^( {2,}|\\)\n(?!\s*$)/,hw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,sl=/[\p{P}\p{S}]/u,$c=/[\s\p{P}\p{S}]/u,wg=/[^\s\p{P}\p{S}]/u,pw=hr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$c).getRegex(),Cg=/(?!~)[\p{P}\p{S}]/u,mw=/(?!~)[\s\p{P}\p{S}]/u,gw=/(?:[^\s\p{P}\p{S}]|~)/u,vw=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Dg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,bw=hr(Dg,"u").replace(/punct/g,sl).getRegex(),yw=hr(Dg,"u").replace(/punct/g,Cg).getRegex(),Eg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xw=hr(Eg,"gu").replace(/notPunctSpace/g,wg).replace(/punctSpace/g,$c).replace(/punct/g,sl).getRegex(),ww=hr(Eg,"gu").replace(/notPunctSpace/g,gw).replace(/punctSpace/g,mw).replace(/punct/g,Cg).getRegex(),Cw=hr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wg).replace(/punctSpace/g,$c).replace(/punct/g,sl).getRegex(),Dw=hr(/\\(punct)/,"gu").replace(/punct/g,sl).getRegex(),Ew=hr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),kw=hr(Fc).replace("(?:-->|$)","-->").getRegex(),Sw=hr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",kw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ps=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Aw=hr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ps).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kg=hr(/^!?\[(label)\]\[(ref)\]/).replace("label",Ps).replace("ref",Bc).getRegex(),Sg=hr(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bc).getRegex(),Bw=hr("reflink|nolink(?!\\()","g").replace("reflink",kg).replace("nolink",Sg).getRegex(),Tc={_backpedal:Qa,anyPunctuation:Dw,autolink:Ew,blockSkip:vw,br:xg,code:fw,del:Qa,emStrongLDelim:bw,emStrongRDelimAst:xw,emStrongRDelimUnd:Cw,escape:dw,link:Aw,nolink:Sg,punctuation:pw,reflink:kg,reflinkSearch:Bw,tag:Sw,text:hw,url:Qa},Fw={...Tc,link:hr(/^!?\[(label)\]\((.*?)\)/).replace("label",Ps).getRegex(),reflink:hr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ps).getRegex()},x0={...Tc,emStrongRDelimAst:ww,emStrongLDelim:yw,url:hr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Nw={...x0,br:hr(xg).replace("{2,}","*").getRegex(),text:hr(x0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Gi={normal:Nc,gfm:uw,pedantic:cw},za={normal:Tc,gfm:x0,breaks:Nw,pedantic:Fw},$w={"&":"&","<":"<",">":">",'"':""","'":"'"},N1=e=>$w[e];function Un(e,t){if(t){if(sn.escapeTest.test(e))return e.replace(sn.escapeReplace,N1)}else if(sn.escapeTestNoEncode.test(e))return e.replace(sn.escapeReplaceNoEncode,N1);return e}function $1(e){try{e=encodeURI(e).replace(sn.percentDecode,"%")}catch{return null}return e}function T1(e,t){var a;const r=e.replace(sn.findPipe,(u,l,f)=>{let d=!1,p=l;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(sn.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(sn.slashPipe,"|");return n}function ja(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function Tw(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function O1(e,t,r,n,o){const a=t.href,u=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:u,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,f}function Ow(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
|
|
114
|
+
`).map(a=>{const u=a.match(r.other.beginningSpace);if(u===null)return a;const[l]=u;return l.length>=o.length?a.slice(o.length):a}).join(`
|
|
115
|
+
`)}var zs=class{constructor(e){xr(this,"options"),xr(this,"rules"),xr(this,"lexer"),this.options=e||Jo}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ja(r,`
|
|
116
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=Ow(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=ja(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:ja(t[0],`
|
|
117
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=ja(t[0],`
|
|
118
|
+
`).split(`
|
|
119
|
+
`),n="",o="";const a=[];for(;r.length>0;){let u=!1;const l=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))l.push(r[f]),u=!0;else if(!u)l.push(r[f]);else break;r=r.slice(f);const d=l.join(`
|
|
120
|
+
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
121
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
122
|
+
${d}`:d,o=o?`${o}
|
|
123
|
+
${p}`:p;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=v,r.length===0)break;const g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const y=g,x=y.raw+`
|
|
124
|
+
`+r.join(`
|
|
125
|
+
`),C=this.blockquote(x);a[a.length-1]=C,n=n.substring(0,n.length-y.raw.length)+C.raw,o=o.substring(0,o.length-y.text.length)+C.text;break}else if((g==null?void 0:g.type)==="list"){const y=g,x=y.raw+`
|
|
126
|
+
`+r.join(`
|
|
127
|
+
`),C=this.list(x);a[a.length-1]=C,n=n.substring(0,n.length-g.raw.length)+C.raw,o=o.substring(0,o.length-y.raw.length)+C.raw,r=x.substring(a.at(-1).raw.length).split(`
|
|
128
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let u=!1;for(;e;){let f=!1,d="",p="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let v=t[2].split(`
|
|
129
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),g=e.split(`
|
|
130
|
+
`,1)[0],y=!v.trim(),x=0;if(this.options.pedantic?(x=2,p=v.trimStart()):y?x=t[1].length+1:(x=t[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,p=v.slice(x),x+=t[1].length),y&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
131
|
+
`,e=e.substring(g.length+1),f=!0),!f){const A=this.rules.other.nextBulletRegex(x),F=this.rules.other.hrRegex(x),B=this.rules.other.fencesBeginRegex(x),R=this.rules.other.headingBeginRegex(x),S=this.rules.other.htmlBeginRegex(x);for(;e;){const z=e.split(`
|
|
132
|
+
`,1)[0];let $;if(g=z,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),$=g):$=g.replace(this.rules.other.tabCharGlobal," "),B.test(g)||R.test(g)||S.test(g)||A.test(g)||F.test(g))break;if($.search(this.rules.other.nonSpaceChar)>=x||!g.trim())p+=`
|
|
133
|
+
`+$.slice(x);else{if(y||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(v)||R.test(v)||F.test(v))break;p+=`
|
|
134
|
+
`+g}!y&&!g.trim()&&(y=!0),d+=z+`
|
|
135
|
+
`,e=e.substring(z.length+1),v=$.slice(x)}}o.loose||(u?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(u=!0));let C=null,m;this.options.gfm&&(C=this.rules.other.listIsTask.exec(p),C&&(m=C[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!C,checked:m,loose:!1,text:p,tokens:[]}),o.raw+=d}const l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){const d=o.items[f].tokens.filter(v=>v.type==="space"),p=d.length>0&&d.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=p}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var u;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=T1(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(u=t[3])!=null&&u.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
136
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of o)a.rows.push(T1(l,a.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:a.align[d]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
137
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=ja(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Tw(t[2],"()");if(a===-2)return;if(a>-1){const u=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),O1(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return O1(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,u,l=o,f=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(n=d.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(u=[...a].length,n[3]||n[4]){l+=u;continue}else if((n[5]||n[6])&&o%3&&!((o+u)%3)){f+=u;continue}if(l-=u,l>0)continue;u=Math.min(u,u+l+f);const p=[...n[0]][0].length,v=e.slice(0,o+n.index+p+u);if(Math.min(o,u)%2){const y=v.slice(1,-1);return{type:"em",raw:v,text:y,tokens:this.lexer.inlineTokens(y)}}const g=v.slice(2,-2);return{type:"strong",raw:v,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},io=class w0{constructor(t){xr(this,"tokens"),xr(this,"options"),xr(this,"state"),xr(this,"tokenizer"),xr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Jo,this.options.tokenizer=this.options.tokenizer||new zs,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:sn,block:Gi.normal,inline:za.normal};this.options.pedantic?(r.block=Gi.pedantic,r.inline=za.pedantic):this.options.gfm&&(r.block=Gi.gfm,this.options.breaks?r.inline=za.breaks:r.inline=za.gfm),this.tokenizer.rules=r}static get rules(){return{block:Gi,inline:za}}static lex(t,r){return new w0(r).lex(t)}static lexInline(t,r){return new w0(r).inlineTokens(t)}lex(t){t=t.replace(sn.carriageReturn,`
|
|
138
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,u;for(this.options.pedantic&&(t=t.replace(sn.tabCharGlobal," ").replace(sn.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(d=>(l=d.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const d=r.at(-1);l.raw.length===1&&d!==void 0?d.raw+=`
|
|
139
|
+
`:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
140
|
+
`+l.raw,d.text+=`
|
|
141
|
+
`+l.text,this.inlineQueue.at(-1).src=d.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
142
|
+
`+l.raw,d.text+=`
|
|
143
|
+
`+l.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let f=t;if((u=this.options.extensions)!=null&&u.startBlock){let d=1/0;const p=t.slice(1);let v;this.options.extensions.startBlock.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(d=Math.min(d,v))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(l=this.tokenizer.paragraph(f))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
|
|
144
|
+
`+l.raw,d.text+=`
|
|
145
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l),n=f.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
|
|
146
|
+
`+l.raw,d.text+=`
|
|
147
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(l);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,f,d;let n=t,o=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,u="";for(;t;){a||(u=""),a=!1;let p;if((f=(l=this.options.extensions)==null?void 0:l.inline)!=null&&f.some(g=>(p=g.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);const g=r.at(-1);p.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,n,u)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let v=t;if((d=this.options.extensions)!=null&&d.startInline){let g=1/0;const y=t.slice(1);let x;this.options.extensions.startInline.forEach(C=>{x=C.call({lexer:this},y),typeof x=="number"&&x>=0&&(g=Math.min(g,x))}),g<1/0&&g>=0&&(v=t.substring(0,g+1))}if(p=this.tokenizer.inlineText(v)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(u=p.raw.slice(-1)),a=!0;const g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(t){const g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},js=class{constructor(e){xr(this,"options"),xr(this,"parser"),this.options=e||Jo}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(sn.notSpaceStart))==null?void 0:a[0],o=e.replace(sn.endingNewline,"")+`
|
|
148
|
+
`;return n?'<pre><code class="language-'+Un(n)+'">'+(r?o:Un(o,!0))+`</code></pre>
|
|
149
|
+
`:"<pre><code>"+(r?o:Un(o,!0))+`</code></pre>
|
|
150
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
151
|
+
${this.parser.parse(e)}</blockquote>
|
|
152
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
153
|
+
`}hr(e){return`<hr>
|
|
154
|
+
`}list(e){const t=e.ordered,r=e.start;let n="";for(let u=0;u<e.items.length;u++){const l=e.items[u];n+=this.listitem(l)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
|
|
155
|
+
`+n+"</"+o+`>
|
|
156
|
+
`}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Un(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
157
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
158
|
+
`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let u=0;u<a.length;u++)r+=this.tablecell(a[u]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
159
|
+
<thead>
|
|
160
|
+
`+t+`</thead>
|
|
161
|
+
`+n+`</table>
|
|
162
|
+
`}tablerow({text:e}){return`<tr>
|
|
163
|
+
${e}</tr>
|
|
164
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
165
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Un(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=$1(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Un(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=$1(e);if(o===null)return Un(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Un(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Un(e.text)}},Oc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},so=class C0{constructor(t){xr(this,"options"),xr(this,"renderer"),xr(this,"textRenderer"),this.options=t||Jo,this.options.renderer=this.options.renderer||new js,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Oc}static parse(t,r){return new C0(r).parse(t)}static parseInline(t,r){return new C0(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let u=0;u<t.length;u++){const l=t[u];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const d=l,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=p||"";continue}}const f=l;switch(f.type){case"space":{n+=this.renderer.space(f);continue}case"hr":{n+=this.renderer.hr(f);continue}case"heading":{n+=this.renderer.heading(f);continue}case"code":{n+=this.renderer.code(f);continue}case"table":{n+=this.renderer.table(f);continue}case"blockquote":{n+=this.renderer.blockquote(f);continue}case"list":{n+=this.renderer.list(f);continue}case"html":{n+=this.renderer.html(f);continue}case"paragraph":{n+=this.renderer.paragraph(f);continue}case"text":{let d=f,p=this.renderer.text(d);for(;u+1<t.length&&t[u+1].type==="text";)d=t[++u],p+=`
|
|
166
|
+
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let u=0;u<t.length;u++){const l=t[u];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const d=this.options.extensions.renderers[l.type].call({parser:this},l);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=d||"";continue}}const f=l;switch(f.type){case"escape":{n+=r.text(f);break}case"html":{n+=r.html(f);break}case"link":{n+=r.link(f);break}case"image":{n+=r.image(f);break}case"strong":{n+=r.strong(f);break}case"em":{n+=r.em(f);break}case"codespan":{n+=r.codespan(f);break}case"br":{n+=r.br(f);break}case"del":{n+=r.del(f);break}case"text":{n+=r.text(f);break}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},Eu,ls=(Eu=class{constructor(e){xr(this,"options"),xr(this,"block"),this.options=e||Jo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?io.lex:io.lexInline}provideParser(){return this.block?so.parse:so.parseInline}},xr(Eu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Eu),Rw=class{constructor(...e){xr(this,"defaults",kc()),xr(this,"options",this.setOptions),xr(this,"parse",this.parseMarkdown(!0)),xr(this,"parseInline",this.parseMarkdown(!1)),xr(this,"Parser",so),xr(this,"Renderer",js),xr(this,"TextRenderer",Oc),xr(this,"Lexer",io),xr(this,"Tokenizer",zs),xr(this,"Hooks",ls),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const u=a;for(const l of u.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of u.rows)for(const f of l)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const u=a;r=r.concat(this.walkTokens(u.items,t));break}default:{const u=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[u.type]?this.defaults.extensions.childTokens[u.type].forEach(l=>{const f=u[l].flat(1/0);r=r.concat(this.walkTokens(f,t))}):u.tokens&&(r=r.concat(this.walkTokens(u.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...u){let l=o.renderer.apply(this,u);return l===!1&&(l=a.apply(this,u)),l}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new js(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const u=a,l=r.renderer[u],f=o[u];o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new zs(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const u=a,l=r.tokenizer[u],f=o[u];o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new ls;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const u=a,l=r.hooks[u],f=o[u];ls.passThroughHooks.has(a)?o[u]=d=>{if(this.defaults.async)return Promise.resolve(l.call(o,d)).then(v=>f.call(o,v));const p=l.call(o,d);return f.call(o,p)}:o[u]=(...d)=>{let p=l.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(u){let l=[];return l.push(a.call(this,u)),o&&(l=l.concat(o.call(this,u))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return io.lex(e,t??this.defaults)}parser(e,t){return so.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const u=o.hooks?o.hooks.provideLexer():e?io.lex:io.lexInline,l=o.hooks?o.hooks.provideParser():e?so.parse:so.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>l(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let f=u(t,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let d=l(f,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(f){return a(f)}}}onError(e,t){return r=>{if(r.message+=`
|
|
167
|
+
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Un(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Yo=new Rw;function ur(e,t){return Yo.parse(e,t)}ur.options=ur.setOptions=function(e){return Yo.setOptions(e),ur.defaults=Yo.defaults,gg(ur.defaults),ur};ur.getDefaults=kc;ur.defaults=Jo;ur.use=function(...e){return Yo.use(...e),ur.defaults=Yo.defaults,gg(ur.defaults),ur};ur.walkTokens=function(e,t){return Yo.walkTokens(e,t)};ur.parseInline=Yo.parseInline;ur.Parser=so;ur.parser=so.parse;ur.Renderer=js;ur.TextRenderer=Oc;ur.Lexer=io;ur.lexer=io.lex;ur.Tokenizer=zs;ur.Hooks=ls;ur.parse=ur;ur.options;ur.setOptions;ur.use;ur.walkTokens;ur.parseInline;so.parse;io.lex;var mn=function(){return mn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mn.apply(this,arguments)};function fi(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Er="-ms-",ei="-moz-",fr="-webkit-",Ag="comm",ll="rule",Rc="decl",Mw="@import",Bg="@keyframes",Iw="@layer",Fg=Math.abs,Mc=String.fromCharCode,D0=Object.assign;function Pw(e,t){return Wr(e,0)^45?(((t<<2^Wr(e,0))<<2^Wr(e,1))<<2^Wr(e,2))<<2^Wr(e,3):0}function Ng(e){return e.trim()}function oo(e,t){return(e=t.exec(e))?e[0]:e}function Lt(e,t,r){return e.replace(t,r)}function us(e,t,r){return e.indexOf(t,r)}function Wr(e,t){return e.charCodeAt(t)|0}function va(e,t,r){return e.slice(t,r)}function Gn(e){return e.length}function $g(e){return e.length}function Ha(e,t){return t.push(e),e}function zw(e,t){return e.map(t).join("")}function R1(e,t){return e.filter(function(r){return!oo(r,t)})}var ul=1,ba=1,Tg=0,Bn=0,_r=0,Fa="";function cl(e,t,r,n,o,a,u,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:ul,column:ba,length:u,return:"",siblings:l}}function wo(e,t){return D0(cl("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function na(e){for(;e.root;)e=wo(e.root,{children:[e]});Ha(e,e.siblings)}function jw(){return _r}function _w(){return _r=Bn>0?Wr(Fa,--Bn):0,ba--,_r===10&&(ba=1,ul--),_r}function Mn(){return _r=Bn<Tg?Wr(Fa,Bn++):0,ba++,_r===10&&(ba=1,ul++),_r}function qo(){return Wr(Fa,Bn)}function cs(){return Bn}function dl(e,t){return va(Fa,e,t)}function E0(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Lw(e){return ul=ba=1,Tg=Gn(Fa=e),Bn=0,[]}function Hw(e){return Fa="",e}function ku(e){return Ng(dl(Bn-1,k0(e===91?e+2:e===40?e+1:e)))}function qw(e){for(;(_r=qo())&&_r<33;)Mn();return E0(e)>2||E0(_r)>3?"":" "}function Kw(e,t){for(;--t&&Mn()&&!(_r<48||_r>102||_r>57&&_r<65||_r>70&&_r<97););return dl(e,cs()+(t<6&&qo()==32&&Mn()==32))}function k0(e){for(;Mn();)switch(_r){case e:return Bn;case 34:case 39:e!==34&&e!==39&&k0(_r);break;case 40:e===41&&k0(e);break;case 92:Mn();break}return Bn}function Ww(e,t){for(;Mn()&&e+_r!==57&&!(e+_r===84&&qo()===47););return"/*"+dl(t,Bn-1)+"*"+Mc(e===47?e:Mn())}function Vw(e){for(;!E0(qo());)Mn();return dl(e,Bn)}function Uw(e){return Hw(ds("",null,null,null,[""],e=Lw(e),0,[0],e))}function ds(e,t,r,n,o,a,u,l,f){for(var d=0,p=0,v=u,g=0,y=0,x=0,C=1,m=1,A=1,F=0,B="",R=o,S=a,z=n,$=B;m;)switch(x=F,F=Mn()){case 40:if(x!=108&&Wr($,v-1)==58){us($+=Lt(ku(F),"&","&\f"),"&\f",Fg(d?l[d-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:$+=ku(F);break;case 9:case 10:case 13:case 32:$+=qw(x);break;case 92:$+=Kw(cs()-1,7);continue;case 47:switch(qo()){case 42:case 47:Ha(Gw(Ww(Mn(),cs()),t,r,f),f);break;default:$+="/"}break;case 123*C:l[d++]=Gn($)*A;case 125*C:case 59:case 0:switch(F){case 0:case 125:m=0;case 59+p:A==-1&&($=Lt($,/\f/g,"")),y>0&&Gn($)-v&&Ha(y>32?I1($+";",n,r,v-1,f):I1(Lt($," ","")+";",n,r,v-2,f),f);break;case 59:$+=";";default:if(Ha(z=M1($,t,r,d,p,o,l,B,R=[],S=[],v,a),a),F===123)if(p===0)ds($,t,z,z,R,a,v,l,S);else switch(g===99&&Wr($,3)===110?100:g){case 100:case 108:case 109:case 115:ds(e,z,z,n&&Ha(M1(e,z,z,0,0,o,l,B,o,R=[],v,S),S),o,S,v,l,n?R:S);break;default:ds($,z,z,z,[""],S,0,l,S)}}d=p=y=0,C=A=1,B=$="",v=u;break;case 58:v=1+Gn($),y=x;default:if(C<1){if(F==123)--C;else if(F==125&&C++==0&&_w()==125)continue}switch($+=Mc(F),F*C){case 38:A=p>0?1:($+="\f",-1);break;case 44:l[d++]=(Gn($)-1)*A,A=1;break;case 64:qo()===45&&($+=ku(Mn())),g=qo(),p=v=Gn(B=$+=Vw(cs())),F++;break;case 45:x===45&&Gn($)==2&&(C=0)}}return a}function M1(e,t,r,n,o,a,u,l,f,d,p,v){for(var g=o-1,y=o===0?a:[""],x=$g(y),C=0,m=0,A=0;C<n;++C)for(var F=0,B=va(e,g+1,g=Fg(m=u[C])),R=e;F<x;++F)(R=Ng(m>0?y[F]+" "+B:Lt(B,/&\f/g,y[F])))&&(f[A++]=R);return cl(e,t,r,o===0?ll:l,f,d,p,v)}function Gw(e,t,r,n){return cl(e,t,r,Ag,Mc(jw()),va(e,2,-2),0,n)}function I1(e,t,r,n,o){return cl(e,t,r,Rc,va(e,0,n),va(e,n+1,-1),n,o)}function Og(e,t,r){switch(Pw(e,t)){case 5103:return fr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return fr+e+e;case 4789:return ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fr+e+ei+e+Er+e+e;case 5936:switch(Wr(e,t+11)){case 114:return fr+e+Er+Lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fr+e+Er+Lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fr+e+Er+Lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return fr+e+Er+e+e;case 6165:return fr+e+Er+"flex-"+e+e;case 5187:return fr+e+Lt(e,/(\w+).+(:[^]+)/,fr+"box-$1$2"+Er+"flex-$1$2")+e;case 5443:return fr+e+Er+"flex-item-"+Lt(e,/flex-|-self/g,"")+(oo(e,/flex-|baseline/)?"":Er+"grid-row-"+Lt(e,/flex-|-self/g,""))+e;case 4675:return fr+e+Er+"flex-line-pack"+Lt(e,/align-content|flex-|-self/g,"")+e;case 5548:return fr+e+Er+Lt(e,"shrink","negative")+e;case 5292:return fr+e+Er+Lt(e,"basis","preferred-size")+e;case 6060:return fr+"box-"+Lt(e,"-grow","")+fr+e+Er+Lt(e,"grow","positive")+e;case 4554:return fr+Lt(e,/([^-])(transform)/g,"$1"+fr+"$2")+e;case 6187:return Lt(Lt(Lt(e,/(zoom-|grab)/,fr+"$1"),/(image-set)/,fr+"$1"),e,"")+e;case 5495:case 3959:return Lt(e,/(image-set\([^]*)/,fr+"$1$`$1");case 4968:return Lt(Lt(e,/(.+:)(flex-)?(.*)/,fr+"box-pack:$3"+Er+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fr+e+e;case 4200:if(!oo(e,/flex-|baseline/))return Er+"grid-column-align"+va(e,t)+e;break;case 2592:case 3360:return Er+Lt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,oo(n.props,/grid-\w+-end/)})?~us(e+(r=r[t].value),"span",0)?e:Er+Lt(e,"-start","")+e+Er+"grid-row-span:"+(~us(r,"span",0)?oo(r,/\d+/):+oo(r,/\d+/)-+oo(e,/\d+/))+";":Er+Lt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return oo(n.props,/grid-\w+-start/)})?e:Er+Lt(Lt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Lt(e,/(.+)-inline(.+)/,fr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gn(e)-1-t>6)switch(Wr(e,t+1)){case 109:if(Wr(e,t+4)!==45)break;case 102:return Lt(e,/(.+:)(.+)-([^]+)/,"$1"+fr+"$2-$3$1"+ei+(Wr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~us(e,"stretch",0)?Og(Lt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Lt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,u,l,f,d){return Er+o+":"+a+d+(u?Er+o+"-span:"+(l?f:+f-+a)+d:"")+e});case 4949:if(Wr(e,t+6)===121)return Lt(e,":",":"+fr)+e;break;case 6444:switch(Wr(e,Wr(e,14)===45?18:11)){case 120:return Lt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+fr+(Wr(e,14)===45?"inline-":"")+"box$3$1"+fr+"$2$3$1"+Er+"$2box$3")+e;case 100:return Lt(e,":",":"+Er)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Lt(e,"scroll-","scroll-snap-")+e}return e}function _s(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Xw(e,t,r,n){switch(e.type){case Iw:if(e.children.length)break;case Mw:case Rc:return e.return=e.return||e.value;case Ag:return"";case Bg:return e.return=e.value+"{"+_s(e.children,n)+"}";case ll:if(!Gn(e.value=e.props.join(",")))return""}return Gn(r=_s(e.children,n))?e.return=e.value+"{"+r+"}":""}function Yw(e){var t=$g(e);return function(r,n,o,a){for(var u="",l=0;l<t;l++)u+=e[l](r,n,o,a)||"";return u}}function Jw(e){return function(t){t.root||(t=t.return)&&e(t)}}function Zw(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Rc:e.return=Og(e.value,e.length,r);return;case Bg:return _s([wo(e,{value:Lt(e.value,"@","@"+fr)})],n);case ll:if(e.length)return zw(r=e.props,function(o){switch(oo(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":na(wo(e,{props:[Lt(o,/:(read-\w+)/,":"+ei+"$1")]})),na(wo(e,{props:[o]})),D0(e,{props:R1(r,n)});break;case"::placeholder":na(wo(e,{props:[Lt(o,/:(plac\w+)/,":"+fr+"input-$1")]})),na(wo(e,{props:[Lt(o,/:(plac\w+)/,":"+ei+"$1")]})),na(wo(e,{props:[Lt(o,/:(plac\w+)/,Er+"input-$1")]})),na(wo(e,{props:[o]})),D0(e,{props:R1(r,n)});break}return""})}}var Qw={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ya=typeof process<"u"&&bn!==void 0&&(bn.REACT_APP_SC_ATTR||bn.SC_ATTR)||"data-styled",Rg="active",Mg="data-styled-version",fl="6.1.19",Ic=`/*!sc*/
|
|
168
|
+
`,Ls=typeof window<"u"&&typeof document<"u",eC=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&bn!==void 0&&bn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&bn.REACT_APP_SC_DISABLE_SPEEDY!==""?bn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&bn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&bn!==void 0&&bn.SC_DISABLE_SPEEDY!==void 0&&bn.SC_DISABLE_SPEEDY!==""&&bn.SC_DISABLE_SPEEDY!=="false"&&bn.SC_DISABLE_SPEEDY),hl=Object.freeze([]),xa=Object.freeze({});function tC(e,t,r){return r===void 0&&(r=xa),e.theme!==r.theme&&e.theme||t||r.theme}var Ig=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),rC=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,nC=/(^-|-$)/g;function P1(e){return e.replace(rC,"-").replace(nC,"")}var oC=/(a)(d)/gi,Xi=52,z1=function(e){return String.fromCharCode(e+(e>25?39:97))};function S0(e){var t,r="";for(t=Math.abs(e);t>Xi;t=t/Xi|0)r=z1(t%Xi)+r;return(z1(t%Xi)+r).replace(oC,"$1-$2")}var Su,Pg=5381,la=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},zg=function(e){return la(Pg,e)};function jg(e){return S0(zg(e)>>>0)}function aC(e){return e.displayName||e.name||"Component"}function Au(e){return typeof e=="string"&&!0}var _g=typeof Symbol=="function"&&Symbol.for,Lg=_g?Symbol.for("react.memo"):60115,iC=_g?Symbol.for("react.forward_ref"):60112,sC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},lC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Hg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uC=((Su={})[iC]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Su[Lg]=Hg,Su);function j1(e){return("type"in(t=e)&&t.type.$$typeof)===Lg?Hg:"$$typeof"in e?uC[e.$$typeof]:sC;var t}var cC=Object.defineProperty,dC=Object.getOwnPropertyNames,_1=Object.getOwnPropertySymbols,fC=Object.getOwnPropertyDescriptor,hC=Object.getPrototypeOf,L1=Object.prototype;function qg(e,t,r){if(typeof t!="string"){if(L1){var n=hC(t);n&&n!==L1&&qg(e,n,r)}var o=dC(t);_1&&(o=o.concat(_1(t)));for(var a=j1(e),u=j1(t),l=0;l<o.length;++l){var f=o[l];if(!(f in lC||r&&r[f]||u&&f in u||a&&f in a)){var d=fC(t,f);try{cC(e,f,d)}catch{}}}}return e}function wa(e){return typeof e=="function"}function Pc(e){return typeof e=="object"&&"styledComponentId"in e}function jo(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function A0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function hi(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function B0(e,t,r){if(r===void 0&&(r=!1),!r&&!hi(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=B0(e[n],t[n]);else if(hi(t))for(var n in t)e[n]=B0(e[n],t[n]);return e}function zc(e,t){Object.defineProperty(e,"toString",{value:t})}function ki(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var pC=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw ki(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var u=o;u<a;u++)this.groupSizes[u]=0}for(var l=this.indexOfGroup(t+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(l,r[u])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,u=o;u<a;u++)r+="".concat(this.tag.getRule(u)).concat(Ic);return r},e})(),fs=new Map,Hs=new Map,hs=1,Yi=function(e){if(fs.has(e))return fs.get(e);for(;Hs.has(hs);)hs++;var t=hs++;return fs.set(e,t),Hs.set(t,e),t},mC=function(e,t){hs=t+1,fs.set(e,t),Hs.set(t,e)},gC="style[".concat(ya,"][").concat(Mg,'="').concat(fl,'"]'),vC=new RegExp("^".concat(ya,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),bC=function(e,t,r){for(var n,o=r.split(","),a=0,u=o.length;a<u;a++)(n=o[a])&&e.registerName(t,n)},yC=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Ic),o=[],a=0,u=n.length;a<u;a++){var l=n[a].trim();if(l){var f=l.match(vC);if(f){var d=0|parseInt(f[1],10),p=f[2];d!==0&&(mC(p,d),bC(e,p,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(l)}}},H1=function(e){for(var t=document.querySelectorAll(gC),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(ya)!==Rg&&(yC(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function xC(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Kg=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var f=Array.from(l.querySelectorAll("style[".concat(ya,"]")));return f[f.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(ya,Rg),n.setAttribute(Mg,fl);var u=xC();return u&&n.setAttribute("nonce",u),r.insertBefore(n,a),n},wC=(function(){function e(t){this.element=Kg(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var u=n[o];if(u.ownerNode===r)return u}throw ki(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),CC=(function(){function e(t){this.element=Kg(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),DC=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),q1=Ls,EC={isServer:!Ls,useCSSOMInjection:!eC},Wg=(function(){function e(t,r,n){t===void 0&&(t=xa),r===void 0&&(r={});var o=this;this.options=mn(mn({},EC),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ls&&q1&&(q1=!1,H1(this)),zc(this,function(){return(function(a){for(var u=a.getTag(),l=u.length,f="",d=function(v){var g=(function(A){return Hs.get(A)})(v);if(g===void 0)return"continue";var y=a.names.get(g),x=u.getGroup(v);if(y===void 0||!y.size||x.length===0)return"continue";var C="".concat(ya,".g").concat(v,'[id="').concat(g,'"]'),m="";y!==void 0&&y.forEach(function(A){A.length>0&&(m+="".concat(A,","))}),f+="".concat(x).concat(C,'{content:"').concat(m,'"}').concat(Ic)},p=0;p<l;p++)d(p);return f})(o)})}return e.registerId=function(t){return Yi(t)},e.prototype.rehydrate=function(){!this.server&&Ls&&H1(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(mn(mn({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new DC(o):n?new wC(o):new CC(o)})(this.options),new pC(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Yi(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Yi(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Yi(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),kC=/&/g,SC=/^\s*\/\/.*$/gm;function Vg(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Vg(r.children,t)),r})}function AC(e){var t,r,n,o=xa,a=o.options,u=a===void 0?xa:a,l=o.plugins,f=l===void 0?hl:l,d=function(g,y,x){return x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?".".concat(t):g},p=f.slice();p.push(function(g){g.type===ll&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(kC,r).replace(n,d))}),u.prefix&&p.push(Zw),p.push(Xw);var v=function(g,y,x,C){y===void 0&&(y=""),x===void 0&&(x=""),C===void 0&&(C="&"),t=C,r=y,n=new RegExp("\\".concat(r,"\\b"),"g");var m=g.replace(SC,""),A=Uw(x||y?"".concat(x," ").concat(y," { ").concat(m," }"):m);u.namespace&&(A=Vg(A,u.namespace));var F=[];return _s(A,Yw(p.concat(Jw(function(B){return F.push(B)})))),F};return v.hash=f.length?f.reduce(function(g,y){return y.name||ki(15),la(g,y.name)},Pg).toString():"",v}var BC=new Wg,F0=AC(),Ug=_e.createContext({shouldForwardProp:void 0,styleSheet:BC,stylis:F0});Ug.Consumer;_e.createContext(void 0);function K1(){return To(Ug)}var Gg=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=F0);var u=n.name+a.hash;o.hasNameForId(n.id,u)||o.insertRules(n.id,u,a(n.rules,u,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,zc(this,function(){throw ki(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=F0),this.name+t.hash},e})(),FC=function(e){return e>="A"&&e<="Z"};function W1(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;FC(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Xg=function(e){return e==null||e===!1||e===""},Yg=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!Xg(a)&&(Array.isArray(a)&&a.isCss||wa(a)?n.push("".concat(W1(o),":"),a,";"):hi(a)?n.push.apply(n,fi(fi(["".concat(o," {")],Yg(a),!1),["}"],!1)):n.push("".concat(W1(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in Qw||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Ko(e,t,r,n){if(Xg(e))return[];if(Pc(e))return[".".concat(e.styledComponentId)];if(wa(e)){if(!wa(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return Ko(o,t,r,n)}var a;return e instanceof Gg?r?(e.inject(r,n),[e.getName(n)]):[e]:hi(e)?Yg(e):Array.isArray(e)?Array.prototype.concat.apply(hl,e.map(function(u){return Ko(u,t,r,n)})):[e.toString()]}function NC(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(wa(r)&&!Pc(r))return!1}return!0}var $C=zg(fl),TC=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&NC(t),this.componentId=r,this.baseHash=la($C,r),this.baseStyle=n,Wg.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=jo(o,this.staticRulesId);else{var a=A0(Ko(this.rules,t,r,n)),u=S0(la(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,u)){var l=n(a,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,l)}o=jo(o,u),this.staticRulesId=u}else{for(var f=la(this.baseHash,n.hash),d="",p=0;p<this.rules.length;p++){var v=this.rules[p];if(typeof v=="string")d+=v;else if(v){var g=A0(Ko(v,t,r,n));f=la(f,g+p),d+=g}}if(d){var y=S0(f>>>0);r.hasNameForId(this.componentId,y)||r.insertRules(this.componentId,y,n(d,".".concat(y),void 0,this.componentId)),o=jo(o,y)}}return o},e})(),Jg=_e.createContext(void 0);Jg.Consumer;var Bu={};function OC(e,t,r){var n=Pc(e),o=e,a=!Au(e),u=t.attrs,l=u===void 0?hl:u,f=t.componentId,d=f===void 0?(function(R,S){var z=typeof R!="string"?"sc":P1(R);Bu[z]=(Bu[z]||0)+1;var $="".concat(z,"-").concat(jg(fl+z+Bu[z]));return S?"".concat(S,"-").concat($):$})(t.displayName,t.parentComponentId):f,p=t.displayName,v=p===void 0?(function(R){return Au(R)?"styled.".concat(R):"Styled(".concat(aC(R),")")})(e):p,g=t.displayName&&t.componentId?"".concat(P1(t.displayName),"-").concat(t.componentId):t.componentId||d,y=n&&o.attrs?o.attrs.concat(l).filter(Boolean):l,x=t.shouldForwardProp;if(n&&o.shouldForwardProp){var C=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;x=function(R,S){return C(R,S)&&m(R,S)}}else x=C}var A=new TC(r,g,n?o.componentStyle:void 0);function F(R,S){return(function(z,$,P){var N=z.attrs,K=z.componentStyle,L=z.defaultProps,Y=z.foldedComponentIds,V=z.styledComponentId,_=z.target,q=_e.useContext(Jg),U=K1(),X=z.shouldForwardProp||U.shouldForwardProp,ee=tC($,q,L)||xa,j=(function(Ie,Z,ne){for(var oe,Q=mn(mn({},Z),{className:void 0,theme:ne}),le=0;le<Ie.length;le+=1){var ge=wa(oe=Ie[le])?oe(Q):oe;for(var he in ge)Q[he]=he==="className"?jo(Q[he],ge[he]):he==="style"?mn(mn({},Q[he]),ge[he]):ge[he]}return Z.className&&(Q.className=jo(Q.className,Z.className)),Q})(N,$,ee),ie=j.as||_,de={};for(var pe in j)j[pe]===void 0||pe[0]==="$"||pe==="as"||pe==="theme"&&j.theme===ee||(pe==="forwardedAs"?de.as=j.forwardedAs:X&&!X(pe,ie)||(de[pe]=j[pe]));var me=(function(Ie,Z){var ne=K1(),oe=Ie.generateAndInjectStyles(Z,ne.styleSheet,ne.stylis);return oe})(K,j),we=jo(Y,V);return me&&(we+=" "+me),j.className&&(we+=" "+j.className),de[Au(ie)&&!Ig.has(ie)?"class":"className"]=we,P&&(de.ref=P),ms(ie,de)})(B,R,S)}F.displayName=v;var B=_e.forwardRef(F);return B.attrs=y,B.componentStyle=A,B.displayName=v,B.shouldForwardProp=x,B.foldedComponentIds=n?jo(o.foldedComponentIds,o.styledComponentId):"",B.styledComponentId=g,B.target=n?o.target:e,Object.defineProperty(B,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(R){this._foldedDefaultProps=n?(function(S){for(var z=[],$=1;$<arguments.length;$++)z[$-1]=arguments[$];for(var P=0,N=z;P<N.length;P++)B0(S,N[P],!0);return S})({},o.defaultProps,R):R}}),zc(B,function(){return".".concat(B.styledComponentId)}),a&&qg(B,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),B}function V1(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var U1=function(e){return Object.assign(e,{isCss:!0})};function pi(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(wa(e)||hi(e))return U1(Ko(V1(hl,fi([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Ko(n):U1(Ko(V1(n,t)))}function N0(e,t,r){if(r===void 0&&(r=xa),!t)throw ki(1,t);var n=function(o){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];return e(t,r,pi.apply(void 0,fi([o],a,!1)))};return n.attrs=function(o){return N0(e,t,mn(mn({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return N0(e,t,mn(mn({},r),o))},n}var Zg=function(e){return N0(OC,e)},Et=Zg;Ig.forEach(function(e){Et[e]=Zg(e)});function Qg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=A0(pi.apply(void 0,fi([e],t,!1))),o=jg(n);return new Gg(o,n)}const RC=Et.span.attrs({className:"unified-rich-text-template-container"})`
|
|
169
|
+
display: inline-block;
|
|
170
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
171
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
172
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
173
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
174
|
+
border: none !important;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
transition: all 0.2s;
|
|
177
|
+
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
178
|
+
user-select: none;
|
|
179
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
180
|
+
line-height: 2;
|
|
181
|
+
width: auto; /* 让宽度根据内容自动调整 */
|
|
182
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
183
|
+
min-height: ${e=>{var u,l,f,d;const t=((l=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:l.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
184
|
+
|
|
185
|
+
/* 高度自适应 */
|
|
186
|
+
height: auto; /* 允许高度根据内容自动调整 */
|
|
187
|
+
white-space: normal; /* 允许换行 */
|
|
188
|
+
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
189
|
+
overflow: visible; /* 确保内容不被隐藏 */
|
|
190
|
+
word-wrap: break-word; /* 允许长单词换行 */
|
|
191
|
+
max-width: 100%; /* 限制在容器宽度内 */
|
|
192
|
+
|
|
193
|
+
/* 使用传入的样式配置 */
|
|
194
|
+
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
195
|
+
color: #055AFF;
|
|
196
|
+
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
197
|
+
|
|
198
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
199
|
+
background-color: white !important;
|
|
200
|
+
color: #055AFF !important;
|
|
201
|
+
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
202
|
+
outline: none;
|
|
203
|
+
min-width: 30px;
|
|
204
|
+
`}}
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
opacity: 0.8;
|
|
208
|
+
}
|
|
209
|
+
`,MC=Et.input.attrs({className:"unified-rich-text-template-input"})`
|
|
210
|
+
background: white;
|
|
211
|
+
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
212
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
213
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
214
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
215
|
+
min-width: ${"30px"};
|
|
216
|
+
width: ${e=>{var d,p,v,g;const t=e.$value.length;if(t===0)return((p=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:p.minWidth)||"120px";const r=((g=(v=e.$styles)==null?void 0:v.templateField)==null?void 0:g.padding)||"2px 6.2px",n=r.split(" ").map(y=>parseInt(y)),o=n.length===2?n[1]:n[0],a=12.5,u=20,l=t*a+o*2+u,f=Math.min(Math.max(l,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:u,calculatedWidth:l,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
217
|
+
height: ${e=>{var u,l,f,d;const t=((l=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:l.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
218
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
219
|
+
font-family: inherit;
|
|
220
|
+
outline: none;
|
|
221
|
+
color: #055AFF;
|
|
222
|
+
line-height: 2;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
white-space: nowrap; /* 防止内部换行 */
|
|
225
|
+
overflow: hidden; /* 隐藏超出部分 */
|
|
226
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
227
|
+
|
|
228
|
+
&:focus {
|
|
229
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
230
|
+
box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
|
|
231
|
+
}
|
|
232
|
+
`,e2=$o(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var z,$,P,N,K,L,Y,V,_,q,U,X;const u=pg(),[l,f]=Tt(!1),[d,p]=Tt(e.value||""),[v,g]=Tt(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[y,x]=Tt(600),C=Bt(null),m=St(()=>{try{const ee=document.querySelector('[data-slate-editor="true"]');if(ee){const j=ee.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||ee.parentElement;if(j){const ie=j.clientWidth,de=ie-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",ie,"\u53EF\u7528\u5BBD\u5EA6:",de),Math.max(de,200)}}return 600}catch(ee){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",ee),600}},[]);Jt(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const ee=m();x(ee)},[e.value,e.placeholder,m]);const A=St(()=>{f(!0),p(e.value||""),setTimeout(()=>{C.current&&(C.current.focus(),C.current.select())},0)},[e.value]),F=St(ee=>{const j=ee.target.value;p(j)},[]),B=St(()=>{const ee=Te.findPath(u,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",ee),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),qe.setNodes(u,{value:d},{at:ee});const j=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(j);const ie=u.children[ee[0]];if(ie&&"children"in ie){const de=ie.children[ee[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",de)}f(!1)},[u,e,d]),R=St(()=>{B()},[B]),S=St(ee=>{ee.key==="Enter"?(ee.preventDefault(),B()):ee.key==="Escape"&&(ee.preventDefault(),p(e.value||""),f(!1))},[B,e.value]);return l?G.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[G.jsx(MC,{ref:C,value:d,onChange:F,onBlur:R,onKeyDown:S,placeholder:"",$styles:n,$value:d,$maxWidth:y,style:{backgroundColor:"white",color:((z=n==null?void 0:n.templateField)==null?void 0:z.textColor)||"#055AFF",border:`2px solid ${(($=n==null?void 0:n.templateField)==null?void 0:$.borderColor)||"#84ADFF"}`,minWidth:((P=n==null?void 0:n.templateField)==null?void 0:P.minWidth)||"120px"}}),r]}):G.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[G.jsxs(RC,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:A,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(N=n==null?void 0:n.templateField)==null?void 0:N.backgroundColor,borderColor:(K=n==null?void 0:n.templateField)==null?void 0:K.borderColor,borderRadius:(L=n==null?void 0:n.templateField)==null?void 0:L.borderRadius,padding:(Y=n==null?void 0:n.templateField)==null?void 0:Y.padding,margin:(V=n==null?void 0:n.templateField)==null?void 0:V.margin,fontSize:(_=n==null?void 0:n.templateField)==null?void 0:_.fontSize,fontWeight:(q=n==null?void 0:n.templateField)==null?void 0:q.fontWeight,minWidth:(U=n==null?void 0:n.templateField)==null?void 0:U.minWidth,color:(X=n==null?void 0:n.templateField)==null?void 0:X.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:v,displayValueLength:v.length,contentLength:v.length}),null),v]}),G.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});e2.displayName="TemplateField";const IC=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return G.jsxs("div",{...t,className:"think-container",children:[G.jsx("div",{className:"think-indicator"}),G.jsx("div",{className:"think-content py-2",children:G.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})},t2=_e.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},a)=>{var R;const[u,l]=Tt(null),[f,d]=Tt(!0),[p,v]=Tt(1),[g,y]=Tt(10);Jt(()=>{if(!u){if(!n){d(!0);try{const S=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(S)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const S=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",S);let z=null,$=null,P;for(const L of S){const Y=L==null?void 0:L.reply;if(!(Y!=null&&Y.databaseReference))continue;const V=Y.databaseReference;console.log(V,"123123123jk123lk12j3l12jl3"),V!=null&&V.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",V.retrieveSqlData.filePath),P=V.retrieveSqlData.filePath);let _=V;if(typeof V=="string")try{_=JSON.parse(V)}catch{}if(!_)continue;const q=Array.isArray(_)?_:[_],U=q.findIndex(j=>(j==null?void 0:j.id)===t.id),X=U>=0?q[U]:null;if(console.log("~~~~~~~~~~~~~~~",X),X){z=X,$=X.retrieveSqlData||X.retrieve_table_data||X.retrieveTableData;break}const ee=q.find(j=>{var ie,de;return(((de=(ie=j==null?void 0:j.retrieveSqlData)==null?void 0:ie.preData)==null?void 0:de.length)||0)>0});!z&&ee&&(z=ee,$=ee.retrieveSqlData||ee.retrieve_table_data||ee.retrieveTableData)}if(!z||!$){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const N=Array.isArray($==null?void 0:$.preData)?$.preData[0]:null;if(!N){console.warn("Matched item has no preData"),d(!1);return}const K={columns:(N.columns||[]).map(L=>({key:L.key,title:L.title})),rows:N.data||N.rows||[],total:($==null?void 0:$.total)||0,fetchUrl:($==null?void 0:$.fetchUrl)||"/index/knowledgeBase/file/stream",source:P||($==null?void 0:$.source)||(z==null?void 0:z.source)};l(K),d(!1)}catch(S){console.error("Init preData parsing failed:",S),d(!1)}}},[t.id,u,n]),Jt(()=>{const S=z=>{try{const $=(z==null?void 0:z.detail)||{},P=$==null?void 0:$.id;if(!P||String(P)!==String(t.id))return;const N=$.databaseReference;if(!N)return;let K=N;if(typeof N=="string")try{K=JSON.parse(N)}catch{}if(!K)return;const L=Array.isArray(K)?K:[K],Y=L.findIndex(X=>String(X==null?void 0:X.id)===String(t.id)),V=Y>=0?L[Y]:null;if(!V)return;const _=(V==null?void 0:V.retrieveSqlData)||(V==null?void 0:V.retrieve_table_data)||(V==null?void 0:V.retrieveTableData),q=Array.isArray(_==null?void 0:_.preData)?_.preData[0]:null;if(!q)return;const U={columns:(q.columns||[]).map(X=>({key:X.key,title:X.title})),rows:q.data||q.rows||[],total:(_==null?void 0:_.total)||0,fetchUrl:(_==null?void 0:_.fetchUrl)||"/index/knowledgeBase/file/stream",source:(V==null?void 0:V.source)||(_==null?void 0:_.source)};l(U),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",S),()=>{window.removeEventListener("retrieve-sql-data:data-response",S)}},[t.id]);const x=S=>{if(!S||S.length===0)return[];const z=S.find($=>$&&typeof $=="object")||{};return Object.keys(z).map($=>({key:$,title:$}))},C=(S,z)=>{v(S),z&&y(z);const $=P=>{let N=null;if(P&&Array.isArray(P.columns)&&Array.isArray(P.rows))N={columns:P.columns,rows:P.rows,total:Number(P.total)||0,fetchUrl:P.fetchUrl||(u==null?void 0:u.fetchUrl)||"",source:P.source||(u==null?void 0:u.source)};else if(P&&Array.isArray(P.data)){const K=P.data;N={columns:u!=null&&u.columns&&u.columns.length>0?u.columns:x(K),rows:K,total:Number(P.totalCount??P.total??(u==null?void 0:u.total)??K.length)||0,fetchUrl:(u==null?void 0:u.fetchUrl)||"",source:u==null?void 0:u.source},typeof P.currentPage=="number"&&v(P.currentPage),typeof P.pageSize=="number"&&y(P.pageSize)}else if(Array.isArray(P)){const K=P;N={columns:u!=null&&u.columns&&u.columns.length>0?u.columns:x(K),rows:K,total:Number((u==null?void 0:u.total)??K.length)||0,fetchUrl:(u==null?void 0:u.fetchUrl)||"",source:u==null?void 0:u.source}}if(!N){console.warn("replacePredataFunction received unsupported data format:",P);return}console.log("Replacing table data with:",N),l(N)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:S,pageSize:z||g,fetchUrl:u==null?void 0:u.fetchUrl,total:u==null?void 0:u.total,source:u==null?void 0:u.source,replacePredataFunction:$})},m=S=>u!=null&&u.rows?Math.max(...u.rows.map(z=>{const $=z[S];return $?String($).length:0})):0,A=(((R=u==null?void 0:u.columns)==null?void 0:R.length)||0)===1,F=(u==null?void 0:u.columns.map((S,z)=>({title:S.title||S.key,dataIndex:S.key,key:S.key,render:$=>{const P=$==null||$===""?"-":$;return A?G.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(P)}):P},...A?{width:void 0}:{}})))||[],B=(u==null?void 0:u.rows.map((S,z)=>({key:z,...S})))||[];return G.jsx("div",{...e,ref:a,className:"retrieve-sql-data-container my-4",children:f?G.jsxs("div",{className:"flex items-center justify-center py-8",children:[G.jsx(Ep,{size:"large"}),G.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):u?G.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&(()=>{const S=String(o).length;let z="12px",$="24px",P="24px";return S===2?(z="9px",$="22px",P="24px"):S===3?(z="8px",$="24px",P="24px"):S>=4&&(z="8px",$="24px",P="30px"),G.jsxs("div",{className:"mb-2 flex items-center",children:[G.jsx("span",{className:"bg-orange-100 text-orange-600 rounded font-medium flex items-center justify-center",style:{width:$,height:$,minWidth:P,fontSize:z,lineHeight:1},children:o}),G.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),G.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:G.jsx(po,{columns:F.map((S,z)=>({...S,...A?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:z===0?160:void 0,minWidth:120,maxWidth:z===0?180:300,fixed:z===0?"left":void 0,ellipsis:{showTitle:!0}},render:$=>{if($==null)return"-";const P=String($);if(A)return G.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:P,children:P});const N=m(S.key);let K="200px";return z===0?K="80px":N<=8?K="100px":N<=15?K="150px":N<=25?K="200px":N<=40?K="250px":K="300px",G.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:K,display:"inline-block",cursor:"default"},title:P,children:P})}})),dataSource:B,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:A?"100%":"1000px"},scroll:{x:A?void 0:"max-content",y:400}})}),u.total>g&&G.jsx("div",{className:"flex justify-center mt-3",children:G.jsx(kp,{current:p,pageSize:g,total:u.total,onChange:C,onShowSizeChange:C,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):G.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});t2.displayName="RetrieveSqlDataElement";var ps={exports:{}},Fu={exports:{}},Nu,G1;function PC(){if(G1)return Nu;G1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Nu=e,Nu}var $u,X1;function zC(){if(X1)return $u;X1=1;var e=PC();function t(){}function r(){}return r.resetWarningCache=t,$u=function(){function n(u,l,f,d,p,v){if(v!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},$u}var Y1;function jC(){return Y1||(Y1=1,Fu.exports=zC()()),Fu.exports}var $0={exports:{}},_C=$0.exports,J1;function LC(){return J1||(J1=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:_C,function(){return(function(){var r={};(function(){r.d=function(s,i){for(var c in i)r.o(i,c)&&!r.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:i[c]})}})(),(function(){r.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})();var n={};r.d(n,{default:function(){return J2}});class o{constructor(i,c){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+i,b,k;const T=c&&c.loc;if(T&&T.start<=T.end){const J=T.lexer.input;b=T.start,k=T.end,b===J.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const ae=J.slice(b,k).replace(/[^]/g,"$&\u0332");let fe;b>15?fe="\u2026"+J.slice(b-15,b):fe=J.slice(0,b);let be;k+15<J.length?be=J.slice(k,k+15)+"\u2026":be=J.slice(k),h+=fe+ae+be}const H=new Error(h);return H.name="ParseError",H.__proto__=o.prototype,H.position=b,b!=null&&k!=null&&(H.length=k-b),H.rawMessage=i,H}}o.prototype.__proto__=Error.prototype;var a=o;const u=function(s,i){return s===void 0?i:s},l=/([A-Z])/g,f=function(s){return s.replace(l,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g;function v(s){return String(s).replace(p,i=>d[i])}const g=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?g(s.body[0]):s:s.type==="font"?g(s.body):s},y=function(s){const i=g(s);return i.type==="mathord"||i.type==="textord"||i.type==="atom"},x=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var C={deflt:u,escape:v,hyphenate:f,getBaseElem:g,isCharacterBox:y,protocolFromUrl:function(s){const i=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(s);return i?i[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(i[1])?null:i[1].toLowerCase():"_relative"}};const m={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:s=>"#"+s},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(s,i)=>(i.push(s),i)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:s=>Math.max(0,s),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s=>Math.max(0,s),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:s=>Math.max(0,s),cli:"-e, --max-expand <n>",cliProcessor:s=>s==="Infinity"?1/0:parseInt(s)},globalGroup:{type:"boolean",cli:!1}};function A(s){if(s.default)return s.default;const i=s.type,c=Array.isArray(i)?i[0]:i;if(typeof c!="string")return c.enum[0];switch(c){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class F{constructor(i){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,i=i||{};for(const c in m)if(m.hasOwnProperty(c)){const h=m[c];this[c]=i[c]!==void 0?h.processor?h.processor(i[c]):i[c]:A(h)}}reportNonstrict(i,c,h){let b=this.strict;if(typeof b=="function"&&(b=b(i,c,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(c+" ["+i+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(c+" ["+i+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+c+" ["+i+"]"))}}useStrictBehavior(i,c,h){let b=this.strict;if(typeof b=="function")try{b=b(i,c,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(c+" ["+i+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+c+" ["+i+"]")),!1)}isTrusted(i){if(i.url&&!i.protocol){const c=C.protocolFromUrl(i.url);if(c==null)return!1;i.protocol=c}return!!(typeof this.trust=="function"?this.trust(i):this.trust)}}class B{constructor(i,c,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=i,this.size=c,this.cramped=h}sup(){return Y[V[this.id]]}sub(){return Y[_[this.id]]}fracNum(){return Y[q[this.id]]}fracDen(){return Y[U[this.id]]}cramp(){return Y[X[this.id]]}text(){return Y[ee[this.id]]}isTight(){return this.size>=2}}const R=0,S=1,z=2,$=3,P=4,N=5,K=6,L=7,Y=[new B(R,0,!1),new B(S,0,!0),new B(z,1,!1),new B($,1,!0),new B(P,2,!1),new B(N,2,!0),new B(K,3,!1),new B(L,3,!0)],V=[P,N,P,N,K,L,K,L],_=[N,N,N,N,L,L,L,L],q=[z,$,P,N,K,L,K,L],U=[$,$,N,N,L,L,L,L],X=[S,S,$,$,N,N,L,L],ee=[R,S,z,$,z,$,z,$];var j={DISPLAY:Y[R],TEXT:Y[z],SCRIPT:Y[P],SCRIPTSCRIPT:Y[K]};const ie=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function de(s){for(let i=0;i<ie.length;i++){const c=ie[i];for(let h=0;h<c.blocks.length;h++){const b=c.blocks[h];if(s>=b[0]&&s<=b[1])return c.name}}return null}const pe=[];ie.forEach(s=>s.blocks.forEach(i=>pe.push(...i)));function me(s){for(let i=0;i<pe.length;i+=2)if(s>=pe[i]&&s<=pe[i+1])return!0;return!1}const we=80,Ie=function(s,i){return"M95,"+(622+s+i)+`
|
|
233
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
234
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
235
|
+
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
236
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
237
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
238
|
+
l`+s/2.075+" -"+s+`
|
|
239
|
+
c5.3,-9.3,12,-14,20,-14
|
|
240
|
+
H400000v`+(40+s)+`H845.2724
|
|
241
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
242
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
243
|
+
M`+(834+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},Z=function(s,i){return"M263,"+(601+s+i)+`c0.7,0,18,39.7,52,119
|
|
244
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
245
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
246
|
+
l`+s/2.084+" -"+s+`
|
|
247
|
+
c4.7,-7.3,11,-11,19,-11
|
|
248
|
+
H40000v`+(40+s)+`H1012.3
|
|
249
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
250
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
251
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
252
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
253
|
+
M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},ne=function(s,i){return"M983 "+(10+s+i)+`
|
|
254
|
+
l`+s/3.13+" -"+s+`
|
|
255
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
|
|
256
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
257
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
258
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
259
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
260
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
261
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
262
|
+
M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},oe=function(s,i){return"M424,"+(2398+s+i)+`
|
|
263
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
264
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
265
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
266
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
267
|
+
l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
|
|
268
|
+
v`+(40+s)+`H1014.6
|
|
269
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
270
|
+
c-2,6,-10,9,-24,9
|
|
271
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+i+`
|
|
272
|
+
h400000v`+(40+s)+"h-400000z"},Q=function(s,i){return"M473,"+(2713+s+i)+`
|
|
273
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
|
|
274
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
|
|
275
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
276
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
277
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
278
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
279
|
+
606zM`+(1001+s)+" "+i+"h400000v"+(40+s)+"H1017.7z"},le=function(s){const i=s/2;return"M400000 "+s+" H0 L"+i+" 0 l65 45 L145 "+(s-80)+" H400000z"},ge=function(s,i,c){const h=c-54-i-s;return"M702 "+(s+i)+"H400000"+(40+s)+`
|
|
280
|
+
H742v`+h+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
281
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
282
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
283
|
+
219 661 l218 661zM702 `+i+"H400000v"+(40+s)+"H742z"},he=function(s,i,c){i=1e3*i;let h="";switch(s){case"sqrtMain":h=Ie(i,we);break;case"sqrtSize1":h=Z(i,we);break;case"sqrtSize2":h=ne(i,we);break;case"sqrtSize3":h=oe(i,we);break;case"sqrtSize4":h=Q(i,we);break;case"sqrtTall":h=ge(i,we,c)}return h},ke=function(s,i){switch(s){case"\u239C":return"M291 0 H417 V"+i+" H291z M291 0 H417 V"+i+" H291z";case"\u2223":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z";case"\u2225":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z"+("M367 0 H410 V"+i+" H367z M367 0 H410 V"+i+" H367z");case"\u239F":return"M457 0 H583 V"+i+" H457z M457 0 H583 V"+i+" H457z";case"\u23A2":return"M319 0 H403 V"+i+" H319z M319 0 H403 V"+i+" H319z";case"\u23A5":return"M263 0 H347 V"+i+" H263z M263 0 H347 V"+i+" H263z";case"\u23AA":return"M384 0 H504 V"+i+" H384z M384 0 H504 V"+i+" H384z";case"\u23D0":return"M312 0 H355 V"+i+" H312z M312 0 H355 V"+i+" H312z";case"\u2016":return"M257 0 H300 V"+i+" H257z M257 0 H300 V"+i+" H257z"+("M478 0 H521 V"+i+" H478z M478 0 H521 V"+i+" H478z");default:return""}},Ce={doubleleftarrow:`M262 157
|
|
284
|
+
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
285
|
+
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
286
|
+
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
287
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
288
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
289
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
290
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
291
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
292
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
293
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
294
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
295
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
296
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
297
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
298
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
299
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
300
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
301
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
302
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
303
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
304
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
305
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
306
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
307
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
308
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
309
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
310
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
311
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
312
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
313
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
314
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
315
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
316
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
317
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
318
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
319
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
320
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
321
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
322
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
323
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
324
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
325
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
326
|
+
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
327
|
+
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
328
|
+
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
329
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
330
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
331
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
332
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
333
|
+
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
334
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
335
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
336
|
+
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
337
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
338
|
+
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
339
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
340
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
341
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
342
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
343
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
344
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
345
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
346
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
347
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
348
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
349
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
350
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
351
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
352
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
353
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
354
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
355
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
356
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
357
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
358
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
359
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
360
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
361
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
362
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
363
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
364
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
365
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
366
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
367
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
368
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
369
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
370
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
371
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
372
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
373
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
374
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
375
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
376
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
377
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
378
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
379
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
380
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
381
|
+
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
382
|
+
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
383
|
+
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
384
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
385
|
+
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
386
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
387
|
+
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
388
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
389
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
390
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
391
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
392
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
393
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
394
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
395
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
396
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
397
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
398
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
399
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
400
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
401
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
402
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
403
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
404
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
405
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
406
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
407
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
408
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
409
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
410
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
411
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
412
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
413
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
414
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
415
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
416
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
417
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
418
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
419
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
420
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
421
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
422
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
423
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
424
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
425
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
426
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
427
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
428
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
429
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
430
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
431
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
432
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
433
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
434
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
435
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
436
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
437
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
438
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
439
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
440
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
441
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
442
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
443
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
444
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
445
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
446
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
447
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
448
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
449
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
450
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
451
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
452
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
453
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
454
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
455
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
456
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
457
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
458
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},xe=function(s,i){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v1759 h347 v-84
|
|
459
|
+
H403z M403 1759 V0 H319 V1759 v`+i+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v1759 H0 v84 H347z
|
|
460
|
+
M347 1759 V0 H263 V1759 v`+i+" v1759 h84z";case"vert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
|
|
461
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
462
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+" v585 h43z";case"doublevert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
|
|
463
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
464
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+` v585 h43z
|
|
465
|
+
M367 15 v585 v`+i+` v585 c2.667,10,9.667,15,21,15
|
|
466
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
467
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+i+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+i+` v1715 h263 v84 H319z
|
|
468
|
+
MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+i+` v1799 H0 v-84 H319z
|
|
469
|
+
MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v602 h84z
|
|
470
|
+
M403 1759 V0 H319 V1759 v`+i+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v602 h84z
|
|
471
|
+
M347 1759 V0 h-84 V1759 v`+i+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
472
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
473
|
+
-36,557 l0,`+(i+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
474
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
475
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
476
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
477
|
+
l0,-`+(i+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
478
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
479
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
480
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(i+9)+`
|
|
481
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
482
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
483
|
+
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
484
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
485
|
+
l0,-`+(i+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
486
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};var Ae={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const $e={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},He={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function pt(s,i){Ae[s]=i}function it(s,i,c){if(!Ae[i])throw new Error("Font metrics not found for font: "+i+".");let h=s.charCodeAt(0),b=Ae[i][h];if(!b&&s[0]in He&&(h=He[s[0]].charCodeAt(0),b=Ae[i][h]),!b&&c==="text"&&me(h)&&(b=Ae[i][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const Oe={};function Le(s){let i;if(s>=5?i=0:s>=3?i=1:i=2,!Oe[i]){const c=Oe[i]={cssEmPerMu:$e.quad[i]/18};for(const h in $e)$e.hasOwnProperty(h)&&(c[h]=$e[h][i])}return Oe[i]}const Ke=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],st=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ze=function(s,i){return i.size<2?s:Ke[s-1][i.size-1]};class Qe{constructor(i){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=i.style,this.color=i.color,this.size=i.size||Qe.BASESIZE,this.textSize=i.textSize||this.size,this.phantom=!!i.phantom,this.font=i.font||"",this.fontFamily=i.fontFamily||"",this.fontWeight=i.fontWeight||"",this.fontShape=i.fontShape||"",this.sizeMultiplier=st[this.size-1],this.maxSize=i.maxSize,this.minRuleThickness=i.minRuleThickness,this._fontMetrics=void 0}extend(i){const c={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const h in i)i.hasOwnProperty(h)&&(c[h]=i[h]);return new Qe(c)}havingStyle(i){return this.style===i?this:this.extend({style:i,size:Ze(this.textSize,i)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(i){return this.size===i&&this.textSize===i?this:this.extend({style:this.style.text(),size:i,textSize:i,sizeMultiplier:st[i-1]})}havingBaseStyle(i){i=i||this.style.text();const c=Ze(Qe.BASESIZE,i);return this.size===c&&this.textSize===Qe.BASESIZE&&this.style===i?this:this.extend({style:i,size:c})}havingBaseSizing(){let i;switch(this.style.id){case 4:case 5:i=3;break;case 6:case 7:i=1;break;default:i=6}return this.extend({style:this.style.text(),size:i})}withColor(i){return this.extend({color:i})}withPhantom(){return this.extend({phantom:!0})}withFont(i){return this.extend({font:i})}withTextFontFamily(i){return this.extend({fontFamily:i,font:""})}withTextFontWeight(i){return this.extend({fontWeight:i,font:""})}withTextFontShape(i){return this.extend({fontShape:i,font:""})}sizingClasses(i){return i.size!==this.size?["sizing","reset-size"+i.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Qe.BASESIZE?["sizing","reset-size"+this.size,"size"+Qe.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Le(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Qe.BASESIZE=6;var $t=Qe;const wt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},nt={ex:!0,em:!0,mu:!0},kt=function(s){return typeof s!="string"&&(s=s.unit),s in wt||s in nt||s==="ex"},ze=function(s,i){let c;if(s.unit in wt)c=wt[s.unit]/i.fontMetrics().ptPerEm/i.sizeMultiplier;else if(s.unit==="mu")c=i.fontMetrics().cssEmPerMu;else{let h;if(i.style.isTight()?h=i.havingStyle(i.style.text()):h=i,s.unit==="ex")c=h.fontMetrics().xHeight;else if(s.unit==="em")c=h.fontMetrics().quad;else throw new a("Invalid unit: '"+s.unit+"'");h!==i&&(c*=h.sizeMultiplier/i.sizeMultiplier)}return Math.min(s.number*c,i.maxSize)},ce=function(s){return+s.toFixed(4)+"em"},mt=function(s){return s.filter(i=>i).join(" ")},At=function(s,i,c){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=c||{},i){i.style.isTight()&&this.classes.push("mtight");const h=i.getColor();h&&(this.style.color=h)}},Nt=function(s){const i=document.createElement(s);i.className=mt(this.classes);for(const c in this.style)this.style.hasOwnProperty(c)&&(i.style[c]=this.style[c]);for(const c in this.attributes)this.attributes.hasOwnProperty(c)&&i.setAttribute(c,this.attributes[c]);for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i},Ct=/[\s"'>/=\x00-\x1f]/,nr=function(s){let i="<"+s;this.classes.length&&(i+=' class="'+C.escape(mt(this.classes))+'"');let c="";for(const h in this.style)this.style.hasOwnProperty(h)&&(c+=C.hyphenate(h)+":"+this.style[h]+";");c&&(i+=' style="'+C.escape(c)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(Ct.test(h))throw new a("Invalid attribute name '"+h+"'");i+=" "+h+'="'+C.escape(this.attributes[h])+'"'}i+=">";for(let h=0;h<this.children.length;h++)i+=this.children[h].toMarkup();return i+="</"+s+">",i};class Dt{constructor(i,c,h,b){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,At.call(this,i,h,b),this.children=c||[]}setAttribute(i,c){this.attributes[i]=c}hasClass(i){return this.classes.includes(i)}toNode(){return Nt.call(this,"span")}toMarkup(){return nr.call(this,"span")}}class zt{constructor(i,c,h,b){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,At.call(this,c,b),this.children=h||[],this.setAttribute("href",i)}setAttribute(i,c){this.attributes[i]=c}hasClass(i){return this.classes.includes(i)}toNode(){return Nt.call(this,"a")}toMarkup(){return nr.call(this,"a")}}class Qt{constructor(i,c,h){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=c,this.src=i,this.classes=["mord"],this.style=h}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.className="mord";for(const c in this.style)this.style.hasOwnProperty(c)&&(i.style[c]=this.style[c]);return i}toMarkup(){let i='<img src="'+C.escape(this.src)+'"'+(' alt="'+C.escape(this.alt)+'"'),c="";for(const h in this.style)this.style.hasOwnProperty(h)&&(c+=C.hyphenate(h)+":"+this.style[h]+";");return c&&(i+=' style="'+C.escape(c)+'"'),i+="'/>",i}}const lr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class dt{constructor(i,c,h,b,k,T,H,J){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=i,this.height=c||0,this.depth=h||0,this.italic=b||0,this.skew=k||0,this.width=T||0,this.classes=H||[],this.style=J||{},this.maxFontSize=0;const ae=de(this.text.charCodeAt(0));ae&&this.classes.push(ae+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=lr[this.text])}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createTextNode(this.text);let c=null;this.italic>0&&(c=document.createElement("span"),c.style.marginRight=ce(this.italic)),this.classes.length>0&&(c=c||document.createElement("span"),c.className=mt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(c=c||document.createElement("span"),c.style[h]=this.style[h]);return c?(c.appendChild(i),c):i}toMarkup(){let i=!1,c="<span";this.classes.length&&(i=!0,c+=' class="',c+=C.escape(mt(this.classes)),c+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const k in this.style)this.style.hasOwnProperty(k)&&(h+=C.hyphenate(k)+":"+this.style[k]+";");h&&(i=!0,c+=' style="'+C.escape(h)+'"');const b=C.escape(this.text);return i?(c+=">",c+=b,c+="</span>",c):b}}class Xt{constructor(i,c){this.children=void 0,this.attributes=void 0,this.children=i||[],this.attributes=c||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i}toMarkup(){let i='<svg xmlns="http://www.w3.org/2000/svg"';for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="'+C.escape(this.attributes[c])+'"');i+=">";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i+="</svg>",i}}class Yt{constructor(i,c){this.pathName=void 0,this.alternate=void 0,this.pathName=i,this.alternate=c}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?i.setAttribute("d",this.alternate):i.setAttribute("d",Ce[this.pathName]),i}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(Ce[this.pathName])+'"/>'}}class Gr{constructor(i){this.attributes=void 0,this.attributes=i||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","line");for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);return i}toMarkup(){let i="<line";for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="'+C.escape(this.attributes[c])+'"');return i+="/>",i}}function Mr(s){if(s instanceof dt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function Ir(s){if(s instanceof Dt)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Pr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},or={math:{},text:{}};var Ht=or;function w(s,i,c,h,b,k){or[s][b]={font:i,group:c,replace:h},k&&h&&(or[s][h]=or[s][b])}const E="math",Me="text",O="main",te="ams",qt="accent-token",Pe="bin",bt="close",xt="inner",et="mathord",Ot="op-token",ar="open",Br="punct",re="rel",vr="spacing",I="textord";w(E,O,re,"\u2261","\\equiv",!0),w(E,O,re,"\u227A","\\prec",!0),w(E,O,re,"\u227B","\\succ",!0),w(E,O,re,"\u223C","\\sim",!0),w(E,O,re,"\u22A5","\\perp"),w(E,O,re,"\u2AAF","\\preceq",!0),w(E,O,re,"\u2AB0","\\succeq",!0),w(E,O,re,"\u2243","\\simeq",!0),w(E,O,re,"\u2223","\\mid",!0),w(E,O,re,"\u226A","\\ll",!0),w(E,O,re,"\u226B","\\gg",!0),w(E,O,re,"\u224D","\\asymp",!0),w(E,O,re,"\u2225","\\parallel"),w(E,O,re,"\u22C8","\\bowtie",!0),w(E,O,re,"\u2323","\\smile",!0),w(E,O,re,"\u2291","\\sqsubseteq",!0),w(E,O,re,"\u2292","\\sqsupseteq",!0),w(E,O,re,"\u2250","\\doteq",!0),w(E,O,re,"\u2322","\\frown",!0),w(E,O,re,"\u220B","\\ni",!0),w(E,O,re,"\u221D","\\propto",!0),w(E,O,re,"\u22A2","\\vdash",!0),w(E,O,re,"\u22A3","\\dashv",!0),w(E,O,re,"\u220B","\\owns"),w(E,O,Br,".","\\ldotp"),w(E,O,Br,"\u22C5","\\cdotp"),w(E,O,I,"#","\\#"),w(Me,O,I,"#","\\#"),w(E,O,I,"&","\\&"),w(Me,O,I,"&","\\&"),w(E,O,I,"\u2135","\\aleph",!0),w(E,O,I,"\u2200","\\forall",!0),w(E,O,I,"\u210F","\\hbar",!0),w(E,O,I,"\u2203","\\exists",!0),w(E,O,I,"\u2207","\\nabla",!0),w(E,O,I,"\u266D","\\flat",!0),w(E,O,I,"\u2113","\\ell",!0),w(E,O,I,"\u266E","\\natural",!0),w(E,O,I,"\u2663","\\clubsuit",!0),w(E,O,I,"\u2118","\\wp",!0),w(E,O,I,"\u266F","\\sharp",!0),w(E,O,I,"\u2662","\\diamondsuit",!0),w(E,O,I,"\u211C","\\Re",!0),w(E,O,I,"\u2661","\\heartsuit",!0),w(E,O,I,"\u2111","\\Im",!0),w(E,O,I,"\u2660","\\spadesuit",!0),w(E,O,I,"\xA7","\\S",!0),w(Me,O,I,"\xA7","\\S"),w(E,O,I,"\xB6","\\P",!0),w(Me,O,I,"\xB6","\\P"),w(E,O,I,"\u2020","\\dag"),w(Me,O,I,"\u2020","\\dag"),w(Me,O,I,"\u2020","\\textdagger"),w(E,O,I,"\u2021","\\ddag"),w(Me,O,I,"\u2021","\\ddag"),w(Me,O,I,"\u2021","\\textdaggerdbl"),w(E,O,bt,"\u23B1","\\rmoustache",!0),w(E,O,ar,"\u23B0","\\lmoustache",!0),w(E,O,bt,"\u27EF","\\rgroup",!0),w(E,O,ar,"\u27EE","\\lgroup",!0),w(E,O,Pe,"\u2213","\\mp",!0),w(E,O,Pe,"\u2296","\\ominus",!0),w(E,O,Pe,"\u228E","\\uplus",!0),w(E,O,Pe,"\u2293","\\sqcap",!0),w(E,O,Pe,"\u2217","\\ast"),w(E,O,Pe,"\u2294","\\sqcup",!0),w(E,O,Pe,"\u25EF","\\bigcirc",!0),w(E,O,Pe,"\u2219","\\bullet",!0),w(E,O,Pe,"\u2021","\\ddagger"),w(E,O,Pe,"\u2240","\\wr",!0),w(E,O,Pe,"\u2A3F","\\amalg"),w(E,O,Pe,"&","\\And"),w(E,O,re,"\u27F5","\\longleftarrow",!0),w(E,O,re,"\u21D0","\\Leftarrow",!0),w(E,O,re,"\u27F8","\\Longleftarrow",!0),w(E,O,re,"\u27F6","\\longrightarrow",!0),w(E,O,re,"\u21D2","\\Rightarrow",!0),w(E,O,re,"\u27F9","\\Longrightarrow",!0),w(E,O,re,"\u2194","\\leftrightarrow",!0),w(E,O,re,"\u27F7","\\longleftrightarrow",!0),w(E,O,re,"\u21D4","\\Leftrightarrow",!0),w(E,O,re,"\u27FA","\\Longleftrightarrow",!0),w(E,O,re,"\u21A6","\\mapsto",!0),w(E,O,re,"\u27FC","\\longmapsto",!0),w(E,O,re,"\u2197","\\nearrow",!0),w(E,O,re,"\u21A9","\\hookleftarrow",!0),w(E,O,re,"\u21AA","\\hookrightarrow",!0),w(E,O,re,"\u2198","\\searrow",!0),w(E,O,re,"\u21BC","\\leftharpoonup",!0),w(E,O,re,"\u21C0","\\rightharpoonup",!0),w(E,O,re,"\u2199","\\swarrow",!0),w(E,O,re,"\u21BD","\\leftharpoondown",!0),w(E,O,re,"\u21C1","\\rightharpoondown",!0),w(E,O,re,"\u2196","\\nwarrow",!0),w(E,O,re,"\u21CC","\\rightleftharpoons",!0),w(E,te,re,"\u226E","\\nless",!0),w(E,te,re,"\uE010","\\@nleqslant"),w(E,te,re,"\uE011","\\@nleqq"),w(E,te,re,"\u2A87","\\lneq",!0),w(E,te,re,"\u2268","\\lneqq",!0),w(E,te,re,"\uE00C","\\@lvertneqq"),w(E,te,re,"\u22E6","\\lnsim",!0),w(E,te,re,"\u2A89","\\lnapprox",!0),w(E,te,re,"\u2280","\\nprec",!0),w(E,te,re,"\u22E0","\\npreceq",!0),w(E,te,re,"\u22E8","\\precnsim",!0),w(E,te,re,"\u2AB9","\\precnapprox",!0),w(E,te,re,"\u2241","\\nsim",!0),w(E,te,re,"\uE006","\\@nshortmid"),w(E,te,re,"\u2224","\\nmid",!0),w(E,te,re,"\u22AC","\\nvdash",!0),w(E,te,re,"\u22AD","\\nvDash",!0),w(E,te,re,"\u22EA","\\ntriangleleft"),w(E,te,re,"\u22EC","\\ntrianglelefteq",!0),w(E,te,re,"\u228A","\\subsetneq",!0),w(E,te,re,"\uE01A","\\@varsubsetneq"),w(E,te,re,"\u2ACB","\\subsetneqq",!0),w(E,te,re,"\uE017","\\@varsubsetneqq"),w(E,te,re,"\u226F","\\ngtr",!0),w(E,te,re,"\uE00F","\\@ngeqslant"),w(E,te,re,"\uE00E","\\@ngeqq"),w(E,te,re,"\u2A88","\\gneq",!0),w(E,te,re,"\u2269","\\gneqq",!0),w(E,te,re,"\uE00D","\\@gvertneqq"),w(E,te,re,"\u22E7","\\gnsim",!0),w(E,te,re,"\u2A8A","\\gnapprox",!0),w(E,te,re,"\u2281","\\nsucc",!0),w(E,te,re,"\u22E1","\\nsucceq",!0),w(E,te,re,"\u22E9","\\succnsim",!0),w(E,te,re,"\u2ABA","\\succnapprox",!0),w(E,te,re,"\u2246","\\ncong",!0),w(E,te,re,"\uE007","\\@nshortparallel"),w(E,te,re,"\u2226","\\nparallel",!0),w(E,te,re,"\u22AF","\\nVDash",!0),w(E,te,re,"\u22EB","\\ntriangleright"),w(E,te,re,"\u22ED","\\ntrianglerighteq",!0),w(E,te,re,"\uE018","\\@nsupseteqq"),w(E,te,re,"\u228B","\\supsetneq",!0),w(E,te,re,"\uE01B","\\@varsupsetneq"),w(E,te,re,"\u2ACC","\\supsetneqq",!0),w(E,te,re,"\uE019","\\@varsupsetneqq"),w(E,te,re,"\u22AE","\\nVdash",!0),w(E,te,re,"\u2AB5","\\precneqq",!0),w(E,te,re,"\u2AB6","\\succneqq",!0),w(E,te,re,"\uE016","\\@nsubseteqq"),w(E,te,Pe,"\u22B4","\\unlhd"),w(E,te,Pe,"\u22B5","\\unrhd"),w(E,te,re,"\u219A","\\nleftarrow",!0),w(E,te,re,"\u219B","\\nrightarrow",!0),w(E,te,re,"\u21CD","\\nLeftarrow",!0),w(E,te,re,"\u21CF","\\nRightarrow",!0),w(E,te,re,"\u21AE","\\nleftrightarrow",!0),w(E,te,re,"\u21CE","\\nLeftrightarrow",!0),w(E,te,re,"\u25B3","\\vartriangle"),w(E,te,I,"\u210F","\\hslash"),w(E,te,I,"\u25BD","\\triangledown"),w(E,te,I,"\u25CA","\\lozenge"),w(E,te,I,"\u24C8","\\circledS"),w(E,te,I,"\xAE","\\circledR"),w(Me,te,I,"\xAE","\\circledR"),w(E,te,I,"\u2221","\\measuredangle",!0),w(E,te,I,"\u2204","\\nexists"),w(E,te,I,"\u2127","\\mho"),w(E,te,I,"\u2132","\\Finv",!0),w(E,te,I,"\u2141","\\Game",!0),w(E,te,I,"\u2035","\\backprime"),w(E,te,I,"\u25B2","\\blacktriangle"),w(E,te,I,"\u25BC","\\blacktriangledown"),w(E,te,I,"\u25A0","\\blacksquare"),w(E,te,I,"\u29EB","\\blacklozenge"),w(E,te,I,"\u2605","\\bigstar"),w(E,te,I,"\u2222","\\sphericalangle",!0),w(E,te,I,"\u2201","\\complement",!0),w(E,te,I,"\xF0","\\eth",!0),w(Me,O,I,"\xF0","\xF0"),w(E,te,I,"\u2571","\\diagup"),w(E,te,I,"\u2572","\\diagdown"),w(E,te,I,"\u25A1","\\square"),w(E,te,I,"\u25A1","\\Box"),w(E,te,I,"\u25CA","\\Diamond"),w(E,te,I,"\xA5","\\yen",!0),w(Me,te,I,"\xA5","\\yen",!0),w(E,te,I,"\u2713","\\checkmark",!0),w(Me,te,I,"\u2713","\\checkmark"),w(E,te,I,"\u2136","\\beth",!0),w(E,te,I,"\u2138","\\daleth",!0),w(E,te,I,"\u2137","\\gimel",!0),w(E,te,I,"\u03DD","\\digamma",!0),w(E,te,I,"\u03F0","\\varkappa"),w(E,te,ar,"\u250C","\\@ulcorner",!0),w(E,te,bt,"\u2510","\\@urcorner",!0),w(E,te,ar,"\u2514","\\@llcorner",!0),w(E,te,bt,"\u2518","\\@lrcorner",!0),w(E,te,re,"\u2266","\\leqq",!0),w(E,te,re,"\u2A7D","\\leqslant",!0),w(E,te,re,"\u2A95","\\eqslantless",!0),w(E,te,re,"\u2272","\\lesssim",!0),w(E,te,re,"\u2A85","\\lessapprox",!0),w(E,te,re,"\u224A","\\approxeq",!0),w(E,te,Pe,"\u22D6","\\lessdot"),w(E,te,re,"\u22D8","\\lll",!0),w(E,te,re,"\u2276","\\lessgtr",!0),w(E,te,re,"\u22DA","\\lesseqgtr",!0),w(E,te,re,"\u2A8B","\\lesseqqgtr",!0),w(E,te,re,"\u2251","\\doteqdot"),w(E,te,re,"\u2253","\\risingdotseq",!0),w(E,te,re,"\u2252","\\fallingdotseq",!0),w(E,te,re,"\u223D","\\backsim",!0),w(E,te,re,"\u22CD","\\backsimeq",!0),w(E,te,re,"\u2AC5","\\subseteqq",!0),w(E,te,re,"\u22D0","\\Subset",!0),w(E,te,re,"\u228F","\\sqsubset",!0),w(E,te,re,"\u227C","\\preccurlyeq",!0),w(E,te,re,"\u22DE","\\curlyeqprec",!0),w(E,te,re,"\u227E","\\precsim",!0),w(E,te,re,"\u2AB7","\\precapprox",!0),w(E,te,re,"\u22B2","\\vartriangleleft"),w(E,te,re,"\u22B4","\\trianglelefteq"),w(E,te,re,"\u22A8","\\vDash",!0),w(E,te,re,"\u22AA","\\Vvdash",!0),w(E,te,re,"\u2323","\\smallsmile"),w(E,te,re,"\u2322","\\smallfrown"),w(E,te,re,"\u224F","\\bumpeq",!0),w(E,te,re,"\u224E","\\Bumpeq",!0),w(E,te,re,"\u2267","\\geqq",!0),w(E,te,re,"\u2A7E","\\geqslant",!0),w(E,te,re,"\u2A96","\\eqslantgtr",!0),w(E,te,re,"\u2273","\\gtrsim",!0),w(E,te,re,"\u2A86","\\gtrapprox",!0),w(E,te,Pe,"\u22D7","\\gtrdot"),w(E,te,re,"\u22D9","\\ggg",!0),w(E,te,re,"\u2277","\\gtrless",!0),w(E,te,re,"\u22DB","\\gtreqless",!0),w(E,te,re,"\u2A8C","\\gtreqqless",!0),w(E,te,re,"\u2256","\\eqcirc",!0),w(E,te,re,"\u2257","\\circeq",!0),w(E,te,re,"\u225C","\\triangleq",!0),w(E,te,re,"\u223C","\\thicksim"),w(E,te,re,"\u2248","\\thickapprox"),w(E,te,re,"\u2AC6","\\supseteqq",!0),w(E,te,re,"\u22D1","\\Supset",!0),w(E,te,re,"\u2290","\\sqsupset",!0),w(E,te,re,"\u227D","\\succcurlyeq",!0),w(E,te,re,"\u22DF","\\curlyeqsucc",!0),w(E,te,re,"\u227F","\\succsim",!0),w(E,te,re,"\u2AB8","\\succapprox",!0),w(E,te,re,"\u22B3","\\vartriangleright"),w(E,te,re,"\u22B5","\\trianglerighteq"),w(E,te,re,"\u22A9","\\Vdash",!0),w(E,te,re,"\u2223","\\shortmid"),w(E,te,re,"\u2225","\\shortparallel"),w(E,te,re,"\u226C","\\between",!0),w(E,te,re,"\u22D4","\\pitchfork",!0),w(E,te,re,"\u221D","\\varpropto"),w(E,te,re,"\u25C0","\\blacktriangleleft"),w(E,te,re,"\u2234","\\therefore",!0),w(E,te,re,"\u220D","\\backepsilon"),w(E,te,re,"\u25B6","\\blacktriangleright"),w(E,te,re,"\u2235","\\because",!0),w(E,te,re,"\u22D8","\\llless"),w(E,te,re,"\u22D9","\\gggtr"),w(E,te,Pe,"\u22B2","\\lhd"),w(E,te,Pe,"\u22B3","\\rhd"),w(E,te,re,"\u2242","\\eqsim",!0),w(E,O,re,"\u22C8","\\Join"),w(E,te,re,"\u2251","\\Doteq",!0),w(E,te,Pe,"\u2214","\\dotplus",!0),w(E,te,Pe,"\u2216","\\smallsetminus"),w(E,te,Pe,"\u22D2","\\Cap",!0),w(E,te,Pe,"\u22D3","\\Cup",!0),w(E,te,Pe,"\u2A5E","\\doublebarwedge",!0),w(E,te,Pe,"\u229F","\\boxminus",!0),w(E,te,Pe,"\u229E","\\boxplus",!0),w(E,te,Pe,"\u22C7","\\divideontimes",!0),w(E,te,Pe,"\u22C9","\\ltimes",!0),w(E,te,Pe,"\u22CA","\\rtimes",!0),w(E,te,Pe,"\u22CB","\\leftthreetimes",!0),w(E,te,Pe,"\u22CC","\\rightthreetimes",!0),w(E,te,Pe,"\u22CF","\\curlywedge",!0),w(E,te,Pe,"\u22CE","\\curlyvee",!0),w(E,te,Pe,"\u229D","\\circleddash",!0),w(E,te,Pe,"\u229B","\\circledast",!0),w(E,te,Pe,"\u22C5","\\centerdot"),w(E,te,Pe,"\u22BA","\\intercal",!0),w(E,te,Pe,"\u22D2","\\doublecap"),w(E,te,Pe,"\u22D3","\\doublecup"),w(E,te,Pe,"\u22A0","\\boxtimes",!0),w(E,te,re,"\u21E2","\\dashrightarrow",!0),w(E,te,re,"\u21E0","\\dashleftarrow",!0),w(E,te,re,"\u21C7","\\leftleftarrows",!0),w(E,te,re,"\u21C6","\\leftrightarrows",!0),w(E,te,re,"\u21DA","\\Lleftarrow",!0),w(E,te,re,"\u219E","\\twoheadleftarrow",!0),w(E,te,re,"\u21A2","\\leftarrowtail",!0),w(E,te,re,"\u21AB","\\looparrowleft",!0),w(E,te,re,"\u21CB","\\leftrightharpoons",!0),w(E,te,re,"\u21B6","\\curvearrowleft",!0),w(E,te,re,"\u21BA","\\circlearrowleft",!0),w(E,te,re,"\u21B0","\\Lsh",!0),w(E,te,re,"\u21C8","\\upuparrows",!0),w(E,te,re,"\u21BF","\\upharpoonleft",!0),w(E,te,re,"\u21C3","\\downharpoonleft",!0),w(E,O,re,"\u22B6","\\origof",!0),w(E,O,re,"\u22B7","\\imageof",!0),w(E,te,re,"\u22B8","\\multimap",!0),w(E,te,re,"\u21AD","\\leftrightsquigarrow",!0),w(E,te,re,"\u21C9","\\rightrightarrows",!0),w(E,te,re,"\u21C4","\\rightleftarrows",!0),w(E,te,re,"\u21A0","\\twoheadrightarrow",!0),w(E,te,re,"\u21A3","\\rightarrowtail",!0),w(E,te,re,"\u21AC","\\looparrowright",!0),w(E,te,re,"\u21B7","\\curvearrowright",!0),w(E,te,re,"\u21BB","\\circlearrowright",!0),w(E,te,re,"\u21B1","\\Rsh",!0),w(E,te,re,"\u21CA","\\downdownarrows",!0),w(E,te,re,"\u21BE","\\upharpoonright",!0),w(E,te,re,"\u21C2","\\downharpoonright",!0),w(E,te,re,"\u21DD","\\rightsquigarrow",!0),w(E,te,re,"\u21DD","\\leadsto"),w(E,te,re,"\u21DB","\\Rrightarrow",!0),w(E,te,re,"\u21BE","\\restriction"),w(E,O,I,"\u2018","`"),w(E,O,I,"$","\\$"),w(Me,O,I,"$","\\$"),w(Me,O,I,"$","\\textdollar"),w(E,O,I,"%","\\%"),w(Me,O,I,"%","\\%"),w(E,O,I,"_","\\_"),w(Me,O,I,"_","\\_"),w(Me,O,I,"_","\\textunderscore"),w(E,O,I,"\u2220","\\angle",!0),w(E,O,I,"\u221E","\\infty",!0),w(E,O,I,"\u2032","\\prime"),w(E,O,I,"\u25B3","\\triangle"),w(E,O,I,"\u0393","\\Gamma",!0),w(E,O,I,"\u0394","\\Delta",!0),w(E,O,I,"\u0398","\\Theta",!0),w(E,O,I,"\u039B","\\Lambda",!0),w(E,O,I,"\u039E","\\Xi",!0),w(E,O,I,"\u03A0","\\Pi",!0),w(E,O,I,"\u03A3","\\Sigma",!0),w(E,O,I,"\u03A5","\\Upsilon",!0),w(E,O,I,"\u03A6","\\Phi",!0),w(E,O,I,"\u03A8","\\Psi",!0),w(E,O,I,"\u03A9","\\Omega",!0),w(E,O,I,"A","\u0391"),w(E,O,I,"B","\u0392"),w(E,O,I,"E","\u0395"),w(E,O,I,"Z","\u0396"),w(E,O,I,"H","\u0397"),w(E,O,I,"I","\u0399"),w(E,O,I,"K","\u039A"),w(E,O,I,"M","\u039C"),w(E,O,I,"N","\u039D"),w(E,O,I,"O","\u039F"),w(E,O,I,"P","\u03A1"),w(E,O,I,"T","\u03A4"),w(E,O,I,"X","\u03A7"),w(E,O,I,"\xAC","\\neg",!0),w(E,O,I,"\xAC","\\lnot"),w(E,O,I,"\u22A4","\\top"),w(E,O,I,"\u22A5","\\bot"),w(E,O,I,"\u2205","\\emptyset"),w(E,te,I,"\u2205","\\varnothing"),w(E,O,et,"\u03B1","\\alpha",!0),w(E,O,et,"\u03B2","\\beta",!0),w(E,O,et,"\u03B3","\\gamma",!0),w(E,O,et,"\u03B4","\\delta",!0),w(E,O,et,"\u03F5","\\epsilon",!0),w(E,O,et,"\u03B6","\\zeta",!0),w(E,O,et,"\u03B7","\\eta",!0),w(E,O,et,"\u03B8","\\theta",!0),w(E,O,et,"\u03B9","\\iota",!0),w(E,O,et,"\u03BA","\\kappa",!0),w(E,O,et,"\u03BB","\\lambda",!0),w(E,O,et,"\u03BC","\\mu",!0),w(E,O,et,"\u03BD","\\nu",!0),w(E,O,et,"\u03BE","\\xi",!0),w(E,O,et,"\u03BF","\\omicron",!0),w(E,O,et,"\u03C0","\\pi",!0),w(E,O,et,"\u03C1","\\rho",!0),w(E,O,et,"\u03C3","\\sigma",!0),w(E,O,et,"\u03C4","\\tau",!0),w(E,O,et,"\u03C5","\\upsilon",!0),w(E,O,et,"\u03D5","\\phi",!0),w(E,O,et,"\u03C7","\\chi",!0),w(E,O,et,"\u03C8","\\psi",!0),w(E,O,et,"\u03C9","\\omega",!0),w(E,O,et,"\u03B5","\\varepsilon",!0),w(E,O,et,"\u03D1","\\vartheta",!0),w(E,O,et,"\u03D6","\\varpi",!0),w(E,O,et,"\u03F1","\\varrho",!0),w(E,O,et,"\u03C2","\\varsigma",!0),w(E,O,et,"\u03C6","\\varphi",!0),w(E,O,Pe,"\u2217","*",!0),w(E,O,Pe,"+","+"),w(E,O,Pe,"\u2212","-",!0),w(E,O,Pe,"\u22C5","\\cdot",!0),w(E,O,Pe,"\u2218","\\circ",!0),w(E,O,Pe,"\xF7","\\div",!0),w(E,O,Pe,"\xB1","\\pm",!0),w(E,O,Pe,"\xD7","\\times",!0),w(E,O,Pe,"\u2229","\\cap",!0),w(E,O,Pe,"\u222A","\\cup",!0),w(E,O,Pe,"\u2216","\\setminus",!0),w(E,O,Pe,"\u2227","\\land"),w(E,O,Pe,"\u2228","\\lor"),w(E,O,Pe,"\u2227","\\wedge",!0),w(E,O,Pe,"\u2228","\\vee",!0),w(E,O,I,"\u221A","\\surd"),w(E,O,ar,"\u27E8","\\langle",!0),w(E,O,ar,"\u2223","\\lvert"),w(E,O,ar,"\u2225","\\lVert"),w(E,O,bt,"?","?"),w(E,O,bt,"!","!"),w(E,O,bt,"\u27E9","\\rangle",!0),w(E,O,bt,"\u2223","\\rvert"),w(E,O,bt,"\u2225","\\rVert"),w(E,O,re,"=","="),w(E,O,re,":",":"),w(E,O,re,"\u2248","\\approx",!0),w(E,O,re,"\u2245","\\cong",!0),w(E,O,re,"\u2265","\\ge"),w(E,O,re,"\u2265","\\geq",!0),w(E,O,re,"\u2190","\\gets"),w(E,O,re,">","\\gt",!0),w(E,O,re,"\u2208","\\in",!0),w(E,O,re,"\uE020","\\@not"),w(E,O,re,"\u2282","\\subset",!0),w(E,O,re,"\u2283","\\supset",!0),w(E,O,re,"\u2286","\\subseteq",!0),w(E,O,re,"\u2287","\\supseteq",!0),w(E,te,re,"\u2288","\\nsubseteq",!0),w(E,te,re,"\u2289","\\nsupseteq",!0),w(E,O,re,"\u22A8","\\models"),w(E,O,re,"\u2190","\\leftarrow",!0),w(E,O,re,"\u2264","\\le"),w(E,O,re,"\u2264","\\leq",!0),w(E,O,re,"<","\\lt",!0),w(E,O,re,"\u2192","\\rightarrow",!0),w(E,O,re,"\u2192","\\to"),w(E,te,re,"\u2271","\\ngeq",!0),w(E,te,re,"\u2270","\\nleq",!0),w(E,O,vr,"\xA0","\\ "),w(E,O,vr,"\xA0","\\space"),w(E,O,vr,"\xA0","\\nobreakspace"),w(Me,O,vr,"\xA0","\\ "),w(Me,O,vr,"\xA0"," "),w(Me,O,vr,"\xA0","\\space"),w(Me,O,vr,"\xA0","\\nobreakspace"),w(E,O,vr,null,"\\nobreak"),w(E,O,vr,null,"\\allowbreak"),w(E,O,Br,",",","),w(E,O,Br,";",";"),w(E,te,Pe,"\u22BC","\\barwedge",!0),w(E,te,Pe,"\u22BB","\\veebar",!0),w(E,O,Pe,"\u2299","\\odot",!0),w(E,O,Pe,"\u2295","\\oplus",!0),w(E,O,Pe,"\u2297","\\otimes",!0),w(E,O,I,"\u2202","\\partial",!0),w(E,O,Pe,"\u2298","\\oslash",!0),w(E,te,Pe,"\u229A","\\circledcirc",!0),w(E,te,Pe,"\u22A1","\\boxdot",!0),w(E,O,Pe,"\u25B3","\\bigtriangleup"),w(E,O,Pe,"\u25BD","\\bigtriangledown"),w(E,O,Pe,"\u2020","\\dagger"),w(E,O,Pe,"\u22C4","\\diamond"),w(E,O,Pe,"\u22C6","\\star"),w(E,O,Pe,"\u25C3","\\triangleleft"),w(E,O,Pe,"\u25B9","\\triangleright"),w(E,O,ar,"{","\\{"),w(Me,O,I,"{","\\{"),w(Me,O,I,"{","\\textbraceleft"),w(E,O,bt,"}","\\}"),w(Me,O,I,"}","\\}"),w(Me,O,I,"}","\\textbraceright"),w(E,O,ar,"{","\\lbrace"),w(E,O,bt,"}","\\rbrace"),w(E,O,ar,"[","\\lbrack",!0),w(Me,O,I,"[","\\lbrack",!0),w(E,O,bt,"]","\\rbrack",!0),w(Me,O,I,"]","\\rbrack",!0),w(E,O,ar,"(","\\lparen",!0),w(E,O,bt,")","\\rparen",!0),w(Me,O,I,"<","\\textless",!0),w(Me,O,I,">","\\textgreater",!0),w(E,O,ar,"\u230A","\\lfloor",!0),w(E,O,bt,"\u230B","\\rfloor",!0),w(E,O,ar,"\u2308","\\lceil",!0),w(E,O,bt,"\u2309","\\rceil",!0),w(E,O,I,"\\","\\backslash"),w(E,O,I,"\u2223","|"),w(E,O,I,"\u2223","\\vert"),w(Me,O,I,"|","\\textbar",!0),w(E,O,I,"\u2225","\\|"),w(E,O,I,"\u2225","\\Vert"),w(Me,O,I,"\u2225","\\textbardbl"),w(Me,O,I,"~","\\textasciitilde"),w(Me,O,I,"\\","\\textbackslash"),w(Me,O,I,"^","\\textasciicircum"),w(E,O,re,"\u2191","\\uparrow",!0),w(E,O,re,"\u21D1","\\Uparrow",!0),w(E,O,re,"\u2193","\\downarrow",!0),w(E,O,re,"\u21D3","\\Downarrow",!0),w(E,O,re,"\u2195","\\updownarrow",!0),w(E,O,re,"\u21D5","\\Updownarrow",!0),w(E,O,Ot,"\u2210","\\coprod"),w(E,O,Ot,"\u22C1","\\bigvee"),w(E,O,Ot,"\u22C0","\\bigwedge"),w(E,O,Ot,"\u2A04","\\biguplus"),w(E,O,Ot,"\u22C2","\\bigcap"),w(E,O,Ot,"\u22C3","\\bigcup"),w(E,O,Ot,"\u222B","\\int"),w(E,O,Ot,"\u222B","\\intop"),w(E,O,Ot,"\u222C","\\iint"),w(E,O,Ot,"\u222D","\\iiint"),w(E,O,Ot,"\u220F","\\prod"),w(E,O,Ot,"\u2211","\\sum"),w(E,O,Ot,"\u2A02","\\bigotimes"),w(E,O,Ot,"\u2A01","\\bigoplus"),w(E,O,Ot,"\u2A00","\\bigodot"),w(E,O,Ot,"\u222E","\\oint"),w(E,O,Ot,"\u222F","\\oiint"),w(E,O,Ot,"\u2230","\\oiiint"),w(E,O,Ot,"\u2A06","\\bigsqcup"),w(E,O,Ot,"\u222B","\\smallint"),w(Me,O,xt,"\u2026","\\textellipsis"),w(E,O,xt,"\u2026","\\mathellipsis"),w(Me,O,xt,"\u2026","\\ldots",!0),w(E,O,xt,"\u2026","\\ldots",!0),w(E,O,xt,"\u22EF","\\@cdots",!0),w(E,O,xt,"\u22F1","\\ddots",!0),w(E,O,I,"\u22EE","\\varvdots"),w(Me,O,I,"\u22EE","\\varvdots"),w(E,O,qt,"\u02CA","\\acute"),w(E,O,qt,"\u02CB","\\grave"),w(E,O,qt,"\xA8","\\ddot"),w(E,O,qt,"~","\\tilde"),w(E,O,qt,"\u02C9","\\bar"),w(E,O,qt,"\u02D8","\\breve"),w(E,O,qt,"\u02C7","\\check"),w(E,O,qt,"^","\\hat"),w(E,O,qt,"\u20D7","\\vec"),w(E,O,qt,"\u02D9","\\dot"),w(E,O,qt,"\u02DA","\\mathring"),w(E,O,et,"\uE131","\\@imath"),w(E,O,et,"\uE237","\\@jmath"),w(E,O,I,"\u0131","\u0131"),w(E,O,I,"\u0237","\u0237"),w(Me,O,I,"\u0131","\\i",!0),w(Me,O,I,"\u0237","\\j",!0),w(Me,O,I,"\xDF","\\ss",!0),w(Me,O,I,"\xE6","\\ae",!0),w(Me,O,I,"\u0153","\\oe",!0),w(Me,O,I,"\xF8","\\o",!0),w(Me,O,I,"\xC6","\\AE",!0),w(Me,O,I,"\u0152","\\OE",!0),w(Me,O,I,"\xD8","\\O",!0),w(Me,O,qt,"\u02CA","\\'"),w(Me,O,qt,"\u02CB","\\`"),w(Me,O,qt,"\u02C6","\\^"),w(Me,O,qt,"\u02DC","\\~"),w(Me,O,qt,"\u02C9","\\="),w(Me,O,qt,"\u02D8","\\u"),w(Me,O,qt,"\u02D9","\\."),w(Me,O,qt,"\xB8","\\c"),w(Me,O,qt,"\u02DA","\\r"),w(Me,O,qt,"\u02C7","\\v"),w(Me,O,qt,"\xA8",'\\"'),w(Me,O,qt,"\u02DD","\\H"),w(Me,O,qt,"\u25EF","\\textcircled");const Re={"--":!0,"---":!0,"``":!0,"''":!0};w(Me,O,I,"\u2013","--",!0),w(Me,O,I,"\u2013","\\textendash"),w(Me,O,I,"\u2014","---",!0),w(Me,O,I,"\u2014","\\textemdash"),w(Me,O,I,"\u2018","`",!0),w(Me,O,I,"\u2018","\\textquoteleft"),w(Me,O,I,"\u2019","'",!0),w(Me,O,I,"\u2019","\\textquoteright"),w(Me,O,I,"\u201C","``",!0),w(Me,O,I,"\u201C","\\textquotedblleft"),w(Me,O,I,"\u201D","''",!0),w(Me,O,I,"\u201D","\\textquotedblright"),w(E,O,I,"\xB0","\\degree",!0),w(Me,O,I,"\xB0","\\degree"),w(Me,O,I,"\xB0","\\textdegree",!0),w(E,O,I,"\xA3","\\pounds"),w(E,O,I,"\xA3","\\mathsterling",!0),w(Me,O,I,"\xA3","\\pounds"),w(Me,O,I,"\xA3","\\textsterling",!0),w(E,te,I,"\u2720","\\maltese"),w(Me,te,I,"\u2720","\\maltese");const at='0123456789/@."';for(let s=0;s<at.length;s++){const i=at.charAt(s);w(E,O,I,i,i)}const We='0123456789!@*()-=+";:?/.,';for(let s=0;s<We.length;s++){const i=We.charAt(s);w(Me,O,I,i,i)}const ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<ye.length;s++){const i=ye.charAt(s);w(E,O,et,i,i),w(Me,O,I,i,i)}w(E,te,I,"C","\u2102"),w(Me,te,I,"C","\u2102"),w(E,te,I,"H","\u210D"),w(Me,te,I,"H","\u210D"),w(E,te,I,"N","\u2115"),w(Me,te,I,"N","\u2115"),w(E,te,I,"P","\u2119"),w(Me,te,I,"P","\u2119"),w(E,te,I,"Q","\u211A"),w(Me,te,I,"Q","\u211A"),w(E,te,I,"R","\u211D"),w(Me,te,I,"R","\u211D"),w(E,te,I,"Z","\u2124"),w(Me,te,I,"Z","\u2124"),w(E,O,et,"h","\u210E"),w(Me,O,et,"h","\u210E");let Be="";for(let s=0;s<ye.length;s++){const i=ye.charAt(s);Be=String.fromCharCode(55349,56320+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56372+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56424+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56580+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56684+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56736+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56788+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56840+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56944+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),s<26&&(Be=String.fromCharCode(55349,56632+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,56476+s),w(E,O,et,i,Be),w(Me,O,I,i,Be))}Be="\u{1D55C}",w(E,O,et,"k",Be),w(Me,O,I,"k",Be);for(let s=0;s<10;s++){const i=s.toString();Be=String.fromCharCode(55349,57294+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,57314+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,57324+s),w(E,O,et,i,Be),w(Me,O,I,i,Be),Be=String.fromCharCode(55349,57334+s),w(E,O,et,i,Be),w(Me,O,I,i,Be)}const Ve="\xD0\xDE\xFE";for(let s=0;s<Ve.length;s++){const i=Ve.charAt(s);w(E,O,et,i,i),w(Me,O,I,i,i)}const ct=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],ue=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ee=function(s,i){const c=s.charCodeAt(0),h=s.charCodeAt(1),b=(c-55296)*1024+(h-56320)+65536,k=i==="math"?0:1;if(119808<=b&&b<120484){const T=Math.floor((b-119808)/26);return[ct[T][2],ct[T][k]]}else if(120782<=b&&b<=120831){const T=Math.floor((b-120782)/10);return[ue[T][2],ue[T][k]]}else{if(b===120485||b===120486)return[ct[0][2],ct[0][k]];if(120486<b&&b<120782)return["",""];throw new a("Unsupported character: "+s)}};class De{constructor(i){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=i,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createDocumentFragment();for(let c=0;c<this.children.length;c++)i.appendChild(this.children[c].toNode());return i}toMarkup(){let i="";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i}toText(){const i=c=>c.toText();return this.children.map(i).join("")}}const Ye=function(s,i,c){return Ht[c][s]&&Ht[c][s].replace&&(s=Ht[c][s].replace),{value:s,metrics:it(s,i,c)}},lt=function(s,i,c,h,b){const k=Ye(s,i,c),T=k.metrics;s=k.value;let H;if(T){let J=T.italic;(c==="text"||h&&h.font==="mathit")&&(J=0),H=new dt(s,T.height,T.depth,J,T.skew,T.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+i+"' and mode '"+c+"'")),H=new dt(s,0,0,0,0,0,b);if(h){H.maxFontSize=h.sizeMultiplier,h.style.isTight()&&H.classes.push("mtight");const J=h.getColor();J&&(H.style.color=J)}return H},Vt=function(s,i,c,h){return h===void 0&&(h=[]),c.font==="boldsymbol"&&Ye(s,"Main-Bold",i).metrics?lt(s,"Main-Bold",i,c,h.concat(["mathbf"])):s==="\\"||Ht[i][s].font==="main"?lt(s,"Main-Regular",i,c,h):lt(s,"AMS-Regular",i,c,h.concat(["amsrm"]))},Rt=function(s,i,c,h,b){return b!=="textord"&&Ye(s,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},ut=function(s,i,c){const h=s.mode,b=s.text,k=["mord"],T=h==="math"||h==="text"&&i.font,H=T?i.font:i.fontFamily;let J="",ae="";if(b.charCodeAt(0)===55349&&([J,ae]=Ee(b,h)),J.length>0)return lt(b,J,h,i,k.concat(ae));if(H){let fe,be;if(H==="boldsymbol"){const Se=Rt(b,h,i,k,c);fe=Se.fontName,be=[Se.fontClass]}else T?(fe=Zn[H].fontName,be=[H]):(fe=Jn(H,i.fontWeight,i.fontShape),be=[H,i.fontWeight,i.fontShape]);if(Ye(b,fe,h).metrics)return lt(b,fe,h,i,k.concat(be));if(Re.hasOwnProperty(b)&&fe.slice(0,10)==="Typewriter"){const Se=[];for(let Ge=0;Ge<b.length;Ge++)Se.push(lt(b[Ge],fe,h,i,k.concat(be)));return cr(Se)}}if(c==="mathord")return lt(b,"Math-Italic",h,i,k.concat(["mathnormal"]));if(c==="textord"){const fe=Ht[h][b]&&Ht[h][b].font;if(fe==="ams"){const be=Jn("amsrm",i.fontWeight,i.fontShape);return lt(b,be,h,i,k.concat("amsrm",i.fontWeight,i.fontShape))}else if(fe==="main"||!fe){const be=Jn("textrm",i.fontWeight,i.fontShape);return lt(b,be,h,i,k.concat(i.fontWeight,i.fontShape))}else{const be=Jn(fe,i.fontWeight,i.fontShape);return lt(b,be,h,i,k.concat(be,i.fontWeight,i.fontShape))}}else throw new Error("unexpected type: "+c+" in makeOrd")},_t=(s,i)=>{if(mt(s.classes)!==mt(i.classes)||s.skew!==i.skew||s.maxFontSize!==i.maxFontSize)return!1;if(s.classes.length===1){const c=s.classes[0];if(c==="mbin"||c==="mord")return!1}for(const c in s.style)if(s.style.hasOwnProperty(c)&&s.style[c]!==i.style[c])return!1;for(const c in i.style)if(i.style.hasOwnProperty(c)&&s.style[c]!==i.style[c])return!1;return!0},un=s=>{for(let i=0;i<s.length-1;i++){const c=s[i],h=s[i+1];c instanceof dt&&h instanceof dt&&_t(c,h)&&(c.text+=h.text,c.height=Math.max(c.height,h.height),c.depth=Math.max(c.depth,h.depth),c.italic=h.italic,s.splice(i+1,1),i--)}return s},wn=function(s){let i=0,c=0,h=0;for(let b=0;b<s.children.length;b++){const k=s.children[b];k.height>i&&(i=k.height),k.depth>c&&(c=k.depth),k.maxFontSize>h&&(h=k.maxFontSize)}s.height=i,s.depth=c,s.maxFontSize=h},Fr=function(s,i,c,h){const b=new Dt(s,i,c,h);return wn(b),b},zn=(s,i,c,h)=>new Dt(s,i,c,h),br=function(s,i,c){const h=Fr([s],[],i);return h.height=Math.max(c||i.fontMetrics().defaultRuleThickness,i.minRuleThickness),h.style.borderBottomWidth=ce(h.height),h.maxFontSize=1,h},er=function(s,i,c,h){const b=new zt(s,i,c,h);return wn(b),b},cr=function(s){const i=new De(s);return wn(i),i},qr=function(s,i){return s instanceof De?Fr([],[s],i):s},zr=function(s){if(s.positionType==="individualShift"){const c=s.children,h=[c[0]],b=-c[0].shift-c[0].elem.depth;let k=b;for(let T=1;T<c.length;T++){const H=-c[T].shift-k-c[T].elem.depth,J=H-(c[T-1].elem.height+c[T-1].elem.depth);k=k+H,h.push({type:"kern",size:J}),h.push(c[T])}return{children:h,depth:b}}let i;if(s.positionType==="top"){let c=s.positionData;for(let h=0;h<s.children.length;h++){const b=s.children[h];c-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}i=c}else if(s.positionType==="bottom")i=-s.positionData;else{const c=s.children[0];if(c.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")i=-c.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")i=-c.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:i}},Yn=function(s,i){const{children:c,depth:h}=zr(s);let b=0;for(let Ge=0;Ge<c.length;Ge++){const ot=c[Ge];if(ot.type==="elem"){const It=ot.elem;b=Math.max(b,It.maxFontSize,It.height)}}b+=2;const k=Fr(["pstrut"],[]);k.style.height=ce(b);const T=[];let H=h,J=h,ae=h;for(let Ge=0;Ge<c.length;Ge++){const ot=c[Ge];if(ot.type==="kern")ae+=ot.size;else{const It=ot.elem,Zt=ot.wrapperClasses||[],Ut=ot.wrapperStyle||{},ir=Fr(Zt,[k,It],void 0,Ut);ir.style.top=ce(-b-ae-It.depth),ot.marginLeft&&(ir.style.marginLeft=ot.marginLeft),ot.marginRight&&(ir.style.marginRight=ot.marginRight),T.push(ir),ae+=It.height+It.depth}H=Math.min(H,ae),J=Math.max(J,ae)}const fe=Fr(["vlist"],T);fe.style.height=ce(J);let be;if(H<0){const Ge=Fr([],[]),ot=Fr(["vlist"],[Ge]);ot.style.height=ce(-H);const It=Fr(["vlist-s"],[new dt("\u200B")]);be=[Fr(["vlist-r"],[fe,It]),Fr(["vlist-r"],[ot])]}else be=[Fr(["vlist-r"],[fe])];const Se=Fr(["vlist-t"],be);return be.length===2&&Se.classes.push("vlist-t2"),Se.height=J,Se.depth=-H,Se},Ro=(s,i)=>{const c=Fr(["mspace"],[],i),h=ze(s,i);return c.style.marginRight=ce(h),c},Jn=function(s,i,c){let h="";switch(s){case"amsrm":h="AMS";break;case"textrm":h="Main";break;case"textsf":h="SansSerif";break;case"texttt":h="Typewriter";break;default:h=s}let b;return i==="textbf"&&c==="textit"?b="BoldItalic":i==="textbf"?b="Bold":i==="textit"?b="Italic":b="Regular",h+"-"+b},Zn={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},mo={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var ve={fontMap:Zn,makeSymbol:lt,mathsym:Vt,makeSpan:Fr,makeSvgSpan:zn,makeLineSpan:br,makeAnchor:er,makeFragment:cr,wrapFragment:qr,makeVList:Yn,makeOrd:ut,makeGlue:Ro,staticSvg:function(s,i){const[c,h,b]=mo[s],k=new Yt(c),T=new Xt([k],{width:ce(h),height:ce(b),style:"width:"+ce(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),H=zn(["overlay"],[T],i);return H.height=b,H.style.height=ce(b),H.style.width=ce(h),H},svgData:mo,tryCombineChars:un};const dr={number:3,unit:"mu"},Fn={number:4,unit:"mu"},Ft={number:5,unit:"mu"},Kt={mord:{mop:dr,mbin:Fn,mrel:Ft,minner:dr},mop:{mord:dr,mop:dr,mrel:Ft,minner:dr},mbin:{mord:Fn,mop:Fn,mopen:Fn,minner:Fn},mrel:{mord:Ft,mop:Ft,mopen:Ft,minner:Ft},mopen:{},mclose:{mop:dr,mbin:Fn,mrel:Ft,minner:dr},mpunct:{mord:dr,mop:dr,mrel:Ft,mopen:dr,mclose:dr,mpunct:dr,minner:dr},minner:{mord:dr,mop:dr,mbin:Fn,mrel:Ft,mopen:dr,mpunct:dr,minner:dr}},Lr={mord:{mop:dr},mop:{mord:dr,mop:dr},mbin:{},mrel:{},mopen:{},mclose:{mop:dr},mpunct:{},minner:{mop:dr}},tn={},Tr={},Nn={};function rt(s){let{type:i,names:c,props:h,handler:b,htmlBuilder:k,mathmlBuilder:T}=s;const H={type:i,numArgs:h.numArgs,argTypes:h.argTypes,allowedInArgument:!!h.allowedInArgument,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,primitive:!!h.primitive,handler:b};for(let J=0;J<c.length;++J)tn[c[J]]=H;i&&(k&&(Tr[i]=k),T&&(Nn[i]=T))}function rn(s){let{type:i,htmlBuilder:c,mathmlBuilder:h}=s;rt({type:i,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:c,mathmlBuilder:h})}const jn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},wr=function(s){return s.type==="ordgroup"?s.body:[s]},Qn=ve.makeSpan,a2=["leftmost","mbin","mopen","mrel","mop","mpunct"],i2=["rightmost","mrel","mclose","mpunct"],s2={display:j.DISPLAY,text:j.TEXT,script:j.SCRIPT,scriptscript:j.SCRIPTSCRIPT},l2={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Hr=function(s,i,c,h){h===void 0&&(h=[null,null]);const b=[];for(let ae=0;ae<s.length;ae++){const fe=tr(s[ae],i);if(fe instanceof De){const be=fe.children;b.push(...be)}else b.push(fe)}if(ve.tryCombineChars(b),!c)return b;let k=i;if(s.length===1){const ae=s[0];ae.type==="sizing"?k=i.havingSize(ae.size):ae.type==="styling"&&(k=i.havingStyle(s2[ae.style]))}const T=Qn([h[0]||"leftmost"],[],i),H=Qn([h[1]||"rightmost"],[],i),J=c==="root";return ml(b,(ae,fe)=>{const be=fe.classes[0],Se=ae.classes[0];be==="mbin"&&i2.includes(Se)?fe.classes[0]="mord":Se==="mbin"&&a2.includes(be)&&(ae.classes[0]="mord")},{node:T},H,J),ml(b,(ae,fe)=>{const be=vl(fe),Se=vl(ae),Ge=be&&Se?ae.hasClass("mtight")?Lr[be][Se]:Kt[be][Se]:null;if(Ge)return ve.makeGlue(Ge,k)},{node:T},H,J),b},ml=function(s,i,c,h,b){h&&s.push(h);let k=0;for(;k<s.length;k++){const T=s[k],H=Hc(T);if(H){ml(H.children,i,c,null,b);continue}const J=!T.hasClass("mspace");if(J){const ae=i(T,c.node);ae&&(c.insertAfter?c.insertAfter(ae):(s.unshift(ae),k++))}J?c.node=T:b&&T.hasClass("newline")&&(c.node=Qn(["leftmost"])),c.insertAfter=(ae=>fe=>{s.splice(ae+1,0,fe),k++})(k)}h&&s.pop()},Hc=function(s){return s instanceof De||s instanceof zt||s instanceof Dt&&s.hasClass("enclosing")?s:null},gl=function(s,i){const c=Hc(s);if(c){const h=c.children;if(h.length){if(i==="right")return gl(h[h.length-1],"right");if(i==="left")return gl(h[0],"left")}}return s},vl=function(s,i){return s?(i&&(s=gl(s,i)),l2[s.classes[0]]||null):null},Na=function(s,i){const c=["nulldelimiter"].concat(s.baseSizingClasses());return Qn(i.concat(c))},tr=function(s,i,c){if(!s)return Qn();if(Tr[s.type]){let h=Tr[s.type](s,i);if(c&&i.size!==c.size){h=Qn(i.sizingClasses(c),[h],i);const b=i.sizeMultiplier/c.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new a("Got group of unknown type: '"+s.type+"'")};function Si(s,i){const c=Qn(["base"],s,i),h=Qn(["strut"]);return h.style.height=ce(c.height+c.depth),c.depth&&(h.style.verticalAlign=ce(-c.depth)),c.children.unshift(h),c}function bl(s,i){let c=null;s.length===1&&s[0].type==="tag"&&(c=s[0].tag,s=s[0].body);const h=Hr(s,i,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=h.pop());const k=[];let T=[];for(let ae=0;ae<h.length;ae++)if(T.push(h[ae]),h[ae].hasClass("mbin")||h[ae].hasClass("mrel")||h[ae].hasClass("allowbreak")){let fe=!1;for(;ae<h.length-1&&h[ae+1].hasClass("mspace")&&!h[ae+1].hasClass("newline");)ae++,T.push(h[ae]),h[ae].hasClass("nobreak")&&(fe=!0);fe||(k.push(Si(T,i)),T=[])}else h[ae].hasClass("newline")&&(T.pop(),T.length>0&&(k.push(Si(T,i)),T=[]),k.push(h[ae]));T.length>0&&k.push(Si(T,i));let H;c?(H=Si(Hr(c,i,!0)),H.classes=["tag"],k.push(H)):b&&k.push(b);const J=Qn(["katex-html"],k);if(J.setAttribute("aria-hidden","true"),H){const ae=H.children[0];ae.style.height=ce(J.height+J.depth),J.depth&&(ae.style.verticalAlign=ce(-J.depth))}return J}function qc(s){return new De(s)}class gn{constructor(i,c,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=i,this.attributes={},this.children=c||[],this.classes=h||[]}setAttribute(i,c){this.attributes[i]=c}getAttribute(i){return this.attributes[i]}toNode(){const i=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&i.setAttribute(c,this.attributes[c]);this.classes.length>0&&(i.className=mt(this.classes));for(let c=0;c<this.children.length;c++)if(this.children[c]instanceof _n&&this.children[c+1]instanceof _n){let h=this.children[c].toText()+this.children[++c].toText();for(;this.children[c+1]instanceof _n;)h+=this.children[++c].toText();i.appendChild(new _n(h).toNode())}else i.appendChild(this.children[c].toNode());return i}toMarkup(){let i="<"+this.type;for(const c in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,c)&&(i+=" "+c+'="',i+=C.escape(this.attributes[c]),i+='"');this.classes.length>0&&(i+=' class ="'+C.escape(mt(this.classes))+'"'),i+=">";for(let c=0;c<this.children.length;c++)i+=this.children[c].toMarkup();return i+="</"+this.type+">",i}toText(){return this.children.map(i=>i.toText()).join("")}}class _n{constructor(i){this.text=void 0,this.text=i}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}class u2{constructor(i){this.width=void 0,this.character=void 0,this.width=i,i>=.05555&&i<=.05556?this.character="\u200A":i>=.1666&&i<=.1667?this.character="\u2009":i>=.2222&&i<=.2223?this.character="\u2005":i>=.2777&&i<=.2778?this.character="\u2005\u200A":i>=-.05556&&i<=-.05555?this.character="\u200A\u2063":i>=-.1667&&i<=-.1666?this.character="\u2009\u2063":i>=-.2223&&i<=-.2222?this.character="\u205F\u2063":i>=-.2778&&i<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const i=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return i.setAttribute("width",ce(this.width)),i}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ce(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ue={MathNode:gn,TextNode:_n,SpaceNode:u2,newDocumentFragment:qc};const Cn=function(s,i,c){return Ht[i][s]&&Ht[i][s].replace&&s.charCodeAt(0)!==55349&&!(Re.hasOwnProperty(s)&&c&&(c.fontFamily&&c.fontFamily.slice(4,6)==="tt"||c.font&&c.font.slice(4,6)==="tt"))&&(s=Ht[i][s].replace),new Ue.TextNode(s)},yl=function(s){return s.length===1?s[0]:new Ue.MathNode("mrow",s)},xl=function(s,i){if(i.fontFamily==="texttt")return"monospace";if(i.fontFamily==="textsf")return i.fontShape==="textit"&&i.fontWeight==="textbf"?"sans-serif-bold-italic":i.fontShape==="textit"?"sans-serif-italic":i.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(i.fontShape==="textit"&&i.fontWeight==="textbf")return"bold-italic";if(i.fontShape==="textit")return"italic";if(i.fontWeight==="textbf")return"bold";const c=i.font;if(!c||c==="mathnormal")return null;const h=s.mode;if(c==="mathit")return"italic";if(c==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(c==="mathbf")return"bold";if(c==="mathbb")return"double-struck";if(c==="mathsfit")return"sans-serif-italic";if(c==="mathfrak")return"fraktur";if(c==="mathscr"||c==="mathcal")return"script";if(c==="mathsf")return"sans-serif";if(c==="mathtt")return"monospace";let b=s.text;if(["\\imath","\\jmath"].includes(b))return null;Ht[h][b]&&Ht[h][b].replace&&(b=Ht[h][b].replace);const k=ve.fontMap[c].fontName;return it(b,k,h)?ve.fontMap[c].variant:null};function wl(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const i=s.children[0];return i instanceof _n&&i.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const i=s.children[0];return i instanceof _n&&i.text===","}else return!1}const cn=function(s,i,c){if(s.length===1){const k=yr(s[0],i);return c&&k instanceof gn&&k.type==="mo"&&(k.setAttribute("lspace","0em"),k.setAttribute("rspace","0em")),[k]}const h=[];let b;for(let k=0;k<s.length;k++){const T=yr(s[k],i);if(T instanceof gn&&b instanceof gn){if(T.type==="mtext"&&b.type==="mtext"&&T.getAttribute("mathvariant")===b.getAttribute("mathvariant")){b.children.push(...T.children);continue}else if(T.type==="mn"&&b.type==="mn"){b.children.push(...T.children);continue}else if(wl(T)&&b.type==="mn"){b.children.push(...T.children);continue}else if(T.type==="mn"&&wl(b))T.children=[...b.children,...T.children],h.pop();else if((T.type==="msup"||T.type==="msub")&&T.children.length>=1&&(b.type==="mn"||wl(b))){const H=T.children[0];H instanceof gn&&H.type==="mn"&&(H.children=[...b.children,...H.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const H=b.children[0];if(H instanceof _n&&H.text==="\u0338"&&(T.type==="mo"||T.type==="mi"||T.type==="mn")){const J=T.children[0];J instanceof _n&&J.text.length>0&&(J.text=J.text.slice(0,1)+"\u0338"+J.text.slice(1),h.pop())}}}h.push(T),b=T}return h},go=function(s,i,c){return yl(cn(s,i,c))},yr=function(s,i){if(!s)return new Ue.MathNode("mrow");if(Nn[s.type])return Nn[s.type](s,i);throw new a("Got group of unknown type: '"+s.type+"'")};function Kc(s,i,c,h,b){const k=cn(s,c);let T;k.length===1&&k[0]instanceof gn&&["mrow","mtable"].includes(k[0].type)?T=k[0]:T=new Ue.MathNode("mrow",k);const H=new Ue.MathNode("annotation",[new Ue.TextNode(i)]);H.setAttribute("encoding","application/x-tex");const J=new Ue.MathNode("semantics",[T,H]),ae=new Ue.MathNode("math",[J]);ae.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&ae.setAttribute("display","block");const fe=b?"katex":"katex-mathml";return ve.makeSpan([fe],[ae])}const Wc=function(s){return new $t({style:s.displayMode?j.DISPLAY:j.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},Vc=function(s,i){if(i.displayMode){const c=["katex-display"];i.leqno&&c.push("leqno"),i.fleqn&&c.push("fleqn"),s=ve.makeSpan(c,[s])}return s},c2=function(s,i,c){const h=Wc(c);let b;if(c.output==="mathml")return Kc(s,i,h,c.displayMode,!0);if(c.output==="html"){const k=bl(s,h);b=ve.makeSpan(["katex"],[k])}else{const k=Kc(s,i,h,c.displayMode,!1),T=bl(s,h);b=ve.makeSpan(["katex"],[k,T])}return Vc(b,c)},d2=function(s,i,c){const h=Wc(c),b=bl(s,h),k=ve.makeSpan(["katex"],[b]);return Vc(k,c)},f2={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},h2=function(s){const i=new Ue.MathNode("mo",[new Ue.TextNode(f2[s.replace(/^\\/,"")])]);return i.setAttribute("stretchy","true"),i},p2={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},m2=function(s){return s.type==="ordgroup"?s.body.length:1};var eo={encloseSpan:function(s,i,c,h,b){let k;const T=s.height+s.depth+c+h;if(/fbox|color|angl/.test(i)){if(k=ve.makeSpan(["stretchy",i],[],b),i==="fbox"){const H=b.color&&b.getColor();H&&(k.style.borderColor=H)}}else{const H=[];/^[bx]cancel$/.test(i)&&H.push(new Gr({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(i)&&H.push(new Gr({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const J=new Xt(H,{width:"100%",height:ce(T)});k=ve.makeSvgSpan([],[J],b)}return k.height=T,k.style.height=ce(T),k},mathMLnode:h2,svgSpan:function(s,i){function c(){let T=4e5;const H=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(H)){const J=m2(s.base);let ae,fe,be;if(J>5)H==="widehat"||H==="widecheck"?(ae=420,T=2364,be=.42,fe=H+"4"):(ae=312,T=2340,be=.34,fe="tilde4");else{const ot=[1,1,2,2,3,3][J];H==="widehat"||H==="widecheck"?(T=[0,1062,2364,2364,2364][ot],ae=[0,239,300,360,420][ot],be=[0,.24,.3,.3,.36,.42][ot],fe=H+ot):(T=[0,600,1033,2339,2340][ot],ae=[0,260,286,306,312][ot],be=[0,.26,.286,.3,.306,.34][ot],fe="tilde"+ot)}const Se=new Yt(fe),Ge=new Xt([Se],{width:"100%",height:ce(be),viewBox:"0 0 "+T+" "+ae,preserveAspectRatio:"none"});return{span:ve.makeSvgSpan([],[Ge],i),minWidth:0,height:be}}else{const J=[],ae=p2[H],[fe,be,Se]=ae,Ge=Se/1e3,ot=fe.length;let It,Zt;if(ot===1){const Ut=ae[3];It=["hide-tail"],Zt=[Ut]}else if(ot===2)It=["halfarrow-left","halfarrow-right"],Zt=["xMinYMin","xMaxYMin"];else if(ot===3)It=["brace-left","brace-center","brace-right"],Zt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
487
|
+
`+ot+" children.");for(let Ut=0;Ut<ot;Ut++){const ir=new Yt(fe[Ut]),rr=new Xt([ir],{width:"400em",height:ce(Ge),viewBox:"0 0 "+T+" "+Se,preserveAspectRatio:Zt[Ut]+" slice"}),Cr=ve.makeSvgSpan([It[Ut]],[rr],i);if(ot===1)return{span:Cr,minWidth:be,height:Ge};Cr.style.height=ce(Ge),J.push(Cr)}return{span:ve.makeSpan(["stretchy"],J,i),minWidth:be,height:Ge}}}const{span:h,minWidth:b,height:k}=c();return h.height=k,h.style.height=ce(k),b>0&&(h.style.minWidth=ce(b)),h}};function jt(s,i){if(!s||s.type!==i)throw new Error("Expected node of type "+i+", but got "+(s?"node of type "+s.type:String(s)));return s}function Cl(s){const i=Ai(s);if(!i)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return i}function Ai(s){return s&&(s.type==="atom"||gr.hasOwnProperty(s.type))?s:null}const Dl=(s,i)=>{let c,h,b;s&&s.type==="supsub"?(h=jt(s.base,"accent"),c=h.base,s.base=c,b=Ir(tr(s,i)),s.base=h):(h=jt(s,"accent"),c=h.base);const k=tr(c,i.havingCrampedStyle()),T=h.isShifty&&C.isCharacterBox(c);let H=0;if(T){const Se=C.getBaseElem(c),Ge=tr(Se,i.havingCrampedStyle());H=Mr(Ge).skew}const J=h.label==="\\c";let ae=J?k.height+k.depth:Math.min(k.height,i.fontMetrics().xHeight),fe;if(h.isStretchy)fe=eo.svgSpan(h,i),fe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"elem",elem:fe,wrapperClasses:["svg-align"],wrapperStyle:H>0?{width:"calc(100% - "+ce(2*H)+")",marginLeft:ce(2*H)}:void 0}]},i);else{let Se,Ge;h.label==="\\vec"?(Se=ve.staticSvg("vec",i),Ge=ve.svgData.vec[1]):(Se=ve.makeOrd({mode:h.mode,text:h.label},i,"textord"),Se=Mr(Se),Se.italic=0,Ge=Se.width,J&&(ae+=Se.depth)),fe=ve.makeSpan(["accent-body"],[Se]);const ot=h.label==="\\textcircled";ot&&(fe.classes.push("accent-full"),ae=k.height);let It=H;ot||(It-=Ge/2),fe.style.left=ce(It),h.label==="\\textcircled"&&(fe.style.top=".2em"),fe=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:-ae},{type:"elem",elem:fe}]},i)}const be=ve.makeSpan(["mord","accent"],[fe],i);return b?(b.children[0]=be,b.height=Math.max(be.height,b.height),b.classes[0]="mord",b):be},Uc=(s,i)=>{const c=s.isStretchy?eo.mathMLnode(s.label):new Ue.MathNode("mo",[Cn(s.label,s.mode)]),h=new Ue.MathNode("mover",[yr(s.base,i),c]);return h.setAttribute("accent","true"),h},g2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));rt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(s,i)=>{const c=jn(i[0]),h=!g2.test(s.funcName),b=!h||s.funcName==="\\widehat"||s.funcName==="\\widetilde"||s.funcName==="\\widecheck";return{type:"accent",mode:s.parser.mode,label:s.funcName,isStretchy:h,isShifty:b,base:c}},htmlBuilder:Dl,mathmlBuilder:Uc}),rt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,i)=>{const c=i[0];let h=s.parser.mode;return h==="math"&&(s.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+s.funcName+" works only in text mode"),h="text"),{type:"accent",mode:h,label:s.funcName,isStretchy:!1,isShifty:!0,base:c}},htmlBuilder:Dl,mathmlBuilder:Uc}),rt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0];return{type:"accentUnder",mode:c.mode,label:h,base:b}},htmlBuilder:(s,i)=>{const c=tr(s.base,i),h=eo.svgSpan(s,i),b=s.label==="\\utilde"?.12:0,k=ve.makeVList({positionType:"top",positionData:c.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:c}]},i);return ve.makeSpan(["mord","accentunder"],[k],i)},mathmlBuilder:(s,i)=>{const c=eo.mathMLnode(s.label),h=new Ue.MathNode("munder",[yr(s.base,i),c]);return h.setAttribute("accentunder","true"),h}});const Bi=s=>{const i=new Ue.MathNode("mpadded",s?[s]:[]);return i.setAttribute("width","+0.6em"),i.setAttribute("lspace","0.3em"),i};rt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,c){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:i[0],below:c[0]}},htmlBuilder(s,i){const c=i.style;let h=i.havingStyle(c.sup());const b=ve.wrapFragment(tr(s.body,h,i),i),k=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(k+"-arrow-pad");let T;s.below&&(h=i.havingStyle(c.sub()),T=ve.wrapFragment(tr(s.below,h,i),i),T.classes.push(k+"-arrow-pad"));const H=eo.svgSpan(s,i),J=-i.fontMetrics().axisHeight+.5*H.height;let ae=-i.fontMetrics().axisHeight-.5*H.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(ae-=b.depth);let fe;if(T){const be=-i.fontMetrics().axisHeight+T.height+.5*H.height+.111;fe=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ae},{type:"elem",elem:H,shift:J},{type:"elem",elem:T,shift:be}]},i)}else fe=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ae},{type:"elem",elem:H,shift:J}]},i);return fe.children[0].children[0].children[1].classes.push("svg-align"),ve.makeSpan(["mrel","x-arrow"],[fe],i)},mathmlBuilder(s,i){const c=eo.mathMLnode(s.label);c.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=Bi(yr(s.body,i));if(s.below){const k=Bi(yr(s.below,i));h=new Ue.MathNode("munderover",[c,k,b])}else h=new Ue.MathNode("mover",[c,b])}else if(s.below){const b=Bi(yr(s.below,i));h=new Ue.MathNode("munder",[c,b])}else h=Bi(),h=new Ue.MathNode("mover",[c,h]);return h}});const v2=ve.makeSpan;function Gc(s,i){const c=Hr(s.body,i,!0);return v2([s.mclass],c,i)}function Xc(s,i){let c;const h=cn(s.body,i);return s.mclass==="minner"?c=new Ue.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(c=h[0],c.type="mi"):c=new Ue.MathNode("mi",h):(s.isCharacterBox?(c=h[0],c.type="mo"):c=new Ue.MathNode("mo",h),s.mclass==="mbin"?(c.attributes.lspace="0.22em",c.attributes.rspace="0.22em"):s.mclass==="mpunct"?(c.attributes.lspace="0em",c.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(c.attributes.lspace="0em",c.attributes.rspace="0em"):s.mclass==="minner"&&(c.attributes.lspace="0.0556em",c.attributes.width="+0.1111em")),c}rt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,i){let{parser:c,funcName:h}=s;const b=i[0];return{type:"mclass",mode:c.mode,mclass:"m"+h.slice(5),body:wr(b),isCharacterBox:C.isCharacterBox(b)}},htmlBuilder:Gc,mathmlBuilder:Xc});const Fi=s=>{const i=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return i.type==="atom"&&(i.family==="bin"||i.family==="rel")?"m"+i.family:"mord"};rt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,i){let{parser:c}=s;return{type:"mclass",mode:c.mode,mclass:Fi(i[0]),body:wr(i[1]),isCharacterBox:C.isCharacterBox(i[1])}}}),rt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,i){let{parser:c,funcName:h}=s;const b=i[1],k=i[0];let T;h!=="\\stackrel"?T=Fi(b):T="mrel";const H={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:wr(b)},J={type:"supsub",mode:k.mode,base:H,sup:h==="\\underset"?null:k,sub:h==="\\underset"?k:null};return{type:"mclass",mode:c.mode,mclass:T,body:[J],isCharacterBox:C.isCharacterBox(J)}},htmlBuilder:Gc,mathmlBuilder:Xc}),rt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"pmb",mode:c.mode,mclass:Fi(i[0]),body:wr(i[0])}},htmlBuilder(s,i){const c=Hr(s.body,i,!0),h=ve.makeSpan([s.mclass],c,i);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,i){const c=cn(s.body,i),h=new Ue.MathNode("mstyle",c);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const b2={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Yc=()=>({type:"styling",body:[],mode:"math",style:"display"}),Jc=s=>s.type==="textord"&&s.text==="@",y2=(s,i)=>(s.type==="mathord"||s.type==="atom")&&s.text===i;function x2(s,i,c){const h=b2[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return c.callFunction(h,[i[0]],[i[1]]);case"\\uparrow":case"\\downarrow":{const b=c.callFunction("\\\\cdleft",[i[0]],[]),k={type:"atom",text:h,mode:"math",family:"rel"},T=c.callFunction("\\Big",[k],[]),H=c.callFunction("\\\\cdright",[i[1]],[]),J={type:"ordgroup",mode:"math",body:[b,T,H]};return c.callFunction("\\\\cdparent",[J],[])}case"\\\\cdlongequal":return c.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return c.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function w2(s){const i=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){i.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const k=s.fetch().text;if(k==="&"||k==="\\\\")s.consume();else if(k==="\\end"){i[i.length-1].length===0&&i.pop();break}else throw new a("Expected \\\\ or \\cr or \\end",s.nextToken)}let c=[];const h=[c];for(let k=0;k<i.length;k++){const T=i[k];let H=Yc();for(let J=0;J<T.length;J++)if(!Jc(T[J]))H.body.push(T[J]);else{c.push(H),J+=1;const ae=Cl(T[J]).text,fe=new Array(2);if(fe[0]={type:"ordgroup",mode:"math",body:[]},fe[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(ae)>-1))if("<>AV".indexOf(ae)>-1)for(let Se=0;Se<2;Se++){let Ge=!0;for(let ot=J+1;ot<T.length;ot++){if(y2(T[ot],ae)){Ge=!1,J=ot;break}if(Jc(T[ot]))throw new a("Missing a "+ae+" character to complete a CD arrow.",T[ot]);fe[Se].body.push(T[ot])}if(Ge)throw new a("Missing a "+ae+" character to complete a CD arrow.",T[J])}else throw new a('Expected one of "<>AV=|." after @',T[J]);const be={type:"styling",body:[x2(ae,fe,s)],mode:"math",style:"display"};c.push(be),H=Yc()}k%2===0?c.push(H):c.shift(),c=[],h.push(c)}s.gullet.endGroup(),s.gullet.endGroup();const b=new Array(h[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:h,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}rt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;return{type:"cdlabel",mode:c.mode,side:h.slice(4),label:i[0]}},htmlBuilder(s,i){const c=i.havingStyle(i.style.sup()),h=ve.wrapFragment(tr(s.label,c,i),i);return h.classes.push("cd-label-"+s.side),h.style.bottom=ce(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,i){let c=new Ue.MathNode("mrow",[yr(s.label,i)]);return c=new Ue.MathNode("mpadded",[c]),c.setAttribute("width","0"),s.side==="left"&&c.setAttribute("lspace","-1width"),c.setAttribute("voffset","0.7em"),c=new Ue.MathNode("mstyle",[c]),c.setAttribute("displaystyle","false"),c.setAttribute("scriptlevel","1"),c}}),rt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,i){let{parser:c}=s;return{type:"cdlabelparent",mode:c.mode,fragment:i[0]}},htmlBuilder(s,i){const c=ve.wrapFragment(tr(s.fragment,i),i);return c.classes.push("cd-vert-arrow"),c},mathmlBuilder(s,i){return new Ue.MathNode("mrow",[yr(s.fragment,i)])}}),rt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;const h=jt(i[0],"ordgroup").body;let b="";for(let H=0;H<h.length;H++){const J=jt(h[H],"textord");b+=J.text}let k=parseInt(b),T;if(isNaN(k))throw new a("\\@char has non-numeric argument "+b);if(k<0||k>=1114111)throw new a("\\@char with invalid code point "+b);return k<=65535?T=String.fromCharCode(k):(k-=65536,T=String.fromCharCode((k>>10)+55296,(k&1023)+56320)),{type:"textord",mode:c.mode,text:T}}});const Zc=(s,i)=>{const c=Hr(s.body,i.withColor(s.color),!1);return ve.makeFragment(c)},Qc=(s,i)=>{const c=cn(s.body,i.withColor(s.color)),h=new Ue.MathNode("mstyle",c);return h.setAttribute("mathcolor",s.color),h};rt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,i){let{parser:c}=s;const h=jt(i[0],"color-token").color,b=i[1];return{type:"color",mode:c.mode,color:h,body:wr(b)}},htmlBuilder:Zc,mathmlBuilder:Qc}),rt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,i){let{parser:c,breakOnTokenText:h}=s;const b=jt(i[0],"color-token").color;c.gullet.macros.set("\\current@color",b);const k=c.parseExpression(!0,h);return{type:"color",mode:c.mode,color:b,body:k}},htmlBuilder:Zc,mathmlBuilder:Qc}),rt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,i,c){let{parser:h}=s;const b=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,k=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:k,size:b&&jt(b,"size").value}},htmlBuilder(s,i){const c=ve.makeSpan(["mspace"],[],i);return s.newLine&&(c.classes.push("newline"),s.size&&(c.style.marginTop=ce(ze(s.size,i)))),c},mathmlBuilder(s,i){const c=new Ue.MathNode("mspace");return s.newLine&&(c.setAttribute("linebreak","newline"),s.size&&c.setAttribute("height",ce(ze(s.size,i)))),c}});const El={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ed=s=>{const i=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",s);return i},C2=s=>{let i=s.gullet.popToken();return i.text==="="&&(i=s.gullet.popToken(),i.text===" "&&(i=s.gullet.popToken())),i},td=(s,i,c,h)=>{let b=s.gullet.macros.get(c.text);b==null&&(c.noexpand=!0,b={tokens:[c],numArgs:0,unexpandable:!s.gullet.isExpandable(c.text)}),s.gullet.macros.set(i,b,h)};rt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:i,funcName:c}=s;i.consumeSpaces();const h=i.fetch();if(El[h.text])return(c==="\\global"||c==="\\\\globallong")&&(h.text=El[h.text]),jt(i.parseFunction(),"internal");throw new a("Invalid token after macro prefix",h)}}),rt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s,h=i.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new a("Expected a control sequence",h);let k=0,T;const H=[[]];for(;i.gullet.future().text!=="{";)if(h=i.gullet.popToken(),h.text==="#"){if(i.gullet.future().text==="{"){T=i.gullet.future(),H[k].push("{");break}if(h=i.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new a('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==k+1)throw new a('Argument number "'+h.text+'" out of order');k++,H.push([])}else{if(h.text==="EOF")throw new a("Expected a macro definition");H[k].push(h.text)}let{tokens:J}=i.gullet.consumeArg();return T&&J.unshift(T),(c==="\\edef"||c==="\\xdef")&&(J=i.gullet.expandTokens(J),J.reverse()),i.gullet.macros.set(b,{tokens:J,numArgs:k,delimiters:H},c===El[c]),{type:"internal",mode:i.mode}}}),rt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s;const h=ed(i.gullet.popToken());i.gullet.consumeSpaces();const b=C2(i);return td(i,h,b,c==="\\\\globallet"),{type:"internal",mode:i.mode}}}),rt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:c}=s;const h=ed(i.gullet.popToken()),b=i.gullet.popToken(),k=i.gullet.popToken();return td(i,h,k,c==="\\\\globalfuture"),i.gullet.pushToken(k),i.gullet.pushToken(b),{type:"internal",mode:i.mode}}});const $a=function(s,i,c){const h=Ht.math[s]&&Ht.math[s].replace,b=it(h||s,i,c);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+i+".");return b},kl=function(s,i,c,h){const b=c.havingBaseStyle(i),k=ve.makeSpan(h.concat(b.sizingClasses(c)),[s],c),T=b.sizeMultiplier/c.sizeMultiplier;return k.height*=T,k.depth*=T,k.maxFontSize=b.sizeMultiplier,k},rd=function(s,i,c){const h=i.havingBaseStyle(c),b=(1-i.sizeMultiplier/h.sizeMultiplier)*i.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=ce(b),s.height-=b,s.depth+=b},D2=function(s,i,c,h,b,k){const T=ve.makeSymbol(s,"Main-Regular",b,h),H=kl(T,i,h,k);return c&&rd(H,h,i),H},E2=function(s,i,c,h){return ve.makeSymbol(s,"Size"+i+"-Regular",c,h)},nd=function(s,i,c,h,b,k){const T=E2(s,i,b,h),H=kl(ve.makeSpan(["delimsizing","size"+i],[T],h),j.TEXT,h,k);return c&&rd(H,h,j.TEXT),H},Sl=function(s,i,c){let h;return i==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:ve.makeSpan(["delimsizinginner",h],[ve.makeSpan([],[ve.makeSymbol(s,i,c)])])}},Al=function(s,i,c){const h=Ae["Size4-Regular"][s.charCodeAt(0)]?Ae["Size4-Regular"][s.charCodeAt(0)][4]:Ae["Size1-Regular"][s.charCodeAt(0)][4],b=new Yt("inner",ke(s,Math.round(1e3*i))),k=new Xt([b],{width:ce(h),height:ce(i),style:"width:"+ce(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*i),preserveAspectRatio:"xMinYMin"}),T=ve.makeSvgSpan([],[k],c);return T.height=i,T.style.height=ce(i),T.style.width=ce(h),{type:"elem",elem:T}},Bl=.008,Ni={type:"kern",size:-1*Bl},k2=["|","\\lvert","\\rvert","\\vert"],S2=["\\|","\\lVert","\\rVert","\\Vert"],od=function(s,i,c,h,b,k){let T,H,J,ae,fe="",be=0;T=J=ae=s,H=null;let Se="Size1-Regular";s==="\\uparrow"?J=ae="\u23D0":s==="\\Uparrow"?J=ae="\u2016":s==="\\downarrow"?T=J="\u23D0":s==="\\Downarrow"?T=J="\u2016":s==="\\updownarrow"?(T="\\uparrow",J="\u23D0",ae="\\downarrow"):s==="\\Updownarrow"?(T="\\Uparrow",J="\u2016",ae="\\Downarrow"):k2.includes(s)?(J="\u2223",fe="vert",be=333):S2.includes(s)?(J="\u2225",fe="doublevert",be=556):s==="["||s==="\\lbrack"?(T="\u23A1",J="\u23A2",ae="\u23A3",Se="Size4-Regular",fe="lbrack",be=667):s==="]"||s==="\\rbrack"?(T="\u23A4",J="\u23A5",ae="\u23A6",Se="Size4-Regular",fe="rbrack",be=667):s==="\\lfloor"||s==="\u230A"?(J=T="\u23A2",ae="\u23A3",Se="Size4-Regular",fe="lfloor",be=667):s==="\\lceil"||s==="\u2308"?(T="\u23A1",J=ae="\u23A2",Se="Size4-Regular",fe="lceil",be=667):s==="\\rfloor"||s==="\u230B"?(J=T="\u23A5",ae="\u23A6",Se="Size4-Regular",fe="rfloor",be=667):s==="\\rceil"||s==="\u2309"?(T="\u23A4",J=ae="\u23A5",Se="Size4-Regular",fe="rceil",be=667):s==="("||s==="\\lparen"?(T="\u239B",J="\u239C",ae="\u239D",Se="Size4-Regular",fe="lparen",be=875):s===")"||s==="\\rparen"?(T="\u239E",J="\u239F",ae="\u23A0",Se="Size4-Regular",fe="rparen",be=875):s==="\\{"||s==="\\lbrace"?(T="\u23A7",H="\u23A8",ae="\u23A9",J="\u23AA",Se="Size4-Regular"):s==="\\}"||s==="\\rbrace"?(T="\u23AB",H="\u23AC",ae="\u23AD",J="\u23AA",Se="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?(T="\u23A7",ae="\u23A9",J="\u23AA",Se="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?(T="\u23AB",ae="\u23AD",J="\u23AA",Se="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?(T="\u23A7",ae="\u23AD",J="\u23AA",Se="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&(T="\u23AB",ae="\u23A9",J="\u23AA",Se="Size4-Regular");const Ge=$a(T,Se,b),ot=Ge.height+Ge.depth,It=$a(J,Se,b),Zt=It.height+It.depth,Ut=$a(ae,Se,b),ir=Ut.height+Ut.depth;let rr=0,Cr=1;if(H!==null){const Or=$a(H,Se,b);rr=Or.height+Or.depth,Cr=2}const Xr=ot+ir+rr,nn=Math.max(0,Math.ceil((i-Xr)/(Cr*Zt))),Dn=Xr+nn*Cr*Zt;let Qo=h.fontMetrics().axisHeight;c&&(Qo*=h.sizeMultiplier);const sr=Dn/2-Qo,pr=[];if(fe.length>0){const Or=Dn-ot-ir,Nr=Math.round(Dn*1e3),En=xe(fe,Math.round(Or*1e3)),Z2=new Yt(fe,En),Gd=(be/1e3).toFixed(3)+"em",Xd=(Nr/1e3).toFixed(3)+"em",Q2=new Xt([Z2],{width:Gd,height:Xd,viewBox:"0 0 "+be+" "+Nr}),Mi=ve.makeSvgSpan([],[Q2],h);Mi.height=Nr/1e3,Mi.style.width=Gd,Mi.style.height=Xd,pr.push({type:"elem",elem:Mi})}else{if(pr.push(Sl(ae,Se,b)),pr.push(Ni),H===null){const Or=Dn-ot-ir+2*Bl;pr.push(Al(J,Or,h))}else{const Or=(Dn-ot-ir-rr)/2+2*Bl;pr.push(Al(J,Or,h)),pr.push(Ni),pr.push(Sl(H,Se,b)),pr.push(Ni),pr.push(Al(J,Or,h))}pr.push(Ni),pr.push(Sl(T,Se,b))}const Dr=h.havingBaseStyle(j.TEXT),kr=ve.makeVList({positionType:"bottom",positionData:sr,children:pr},Dr);return kl(ve.makeSpan(["delimsizing","mult"],[kr],Dr),j.TEXT,h,k)},Fl=80,Nl=.08,$l=function(s,i,c,h,b){const k=he(s,h,c),T=new Yt(s,k),H=new Xt([T],{width:"400em",height:ce(i),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});return ve.makeSvgSpan(["hide-tail"],[H],b)},A2=function(s,i){const c=i.havingBaseSizing(),h=ld("\\surd",s*c.sizeMultiplier,sd,c);let b=c.sizeMultiplier;const k=Math.max(0,i.minRuleThickness-i.fontMetrics().sqrtRuleThickness);let T,H=0,J=0,ae=0,fe;return h.type==="small"?(ae=1e3+1e3*k+Fl,s<1?b=1:s<1.4&&(b=.7),H=(1+k+Nl)/b,J=(1+k)/b,T=$l("sqrtMain",H,ae,k,i),T.style.minWidth="0.853em",fe=.833/b):h.type==="large"?(ae=(1e3+Fl)*Ta[h.size],J=(Ta[h.size]+k)/b,H=(Ta[h.size]+k+Nl)/b,T=$l("sqrtSize"+h.size,H,ae,k,i),T.style.minWidth="1.02em",fe=1/b):(H=s+k+Nl,J=s+k,ae=Math.floor(1e3*s+k)+Fl,T=$l("sqrtTall",H,ae,k,i),T.style.minWidth="0.742em",fe=1.056),T.height=J,T.style.height=ce(H),{span:T,advanceWidth:fe,ruleWidth:(i.fontMetrics().sqrtRuleThickness+k)*b}},ad=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],B2=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],id=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ta=[0,1.2,1.8,2.4,3],F2=function(s,i,c,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),ad.includes(s)||id.includes(s))return nd(s,i,!1,c,h,b);if(B2.includes(s))return od(s,Ta[i],!1,c,h,b);throw new a("Illegal delimiter: '"+s+"'")},N2=[{type:"small",style:j.SCRIPTSCRIPT},{type:"small",style:j.SCRIPT},{type:"small",style:j.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],$2=[{type:"small",style:j.SCRIPTSCRIPT},{type:"small",style:j.SCRIPT},{type:"small",style:j.TEXT},{type:"stack"}],sd=[{type:"small",style:j.SCRIPTSCRIPT},{type:"small",style:j.SCRIPT},{type:"small",style:j.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],T2=function(s){if(s.type==="small")return"Main-Regular";if(s.type==="large")return"Size"+s.size+"-Regular";if(s.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+s.type+"' here.")},ld=function(s,i,c,h){const b=Math.min(2,3-h.style.size);for(let k=b;k<c.length&&c[k].type!=="stack";k++){const T=$a(s,T2(c[k]),"math");let H=T.height+T.depth;if(c[k].type==="small"){const J=h.havingBaseStyle(c[k].style);H*=J.sizeMultiplier}if(H>i)return c[k]}return c[c.length-1]},ud=function(s,i,c,h,b,k){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let T;id.includes(s)?T=N2:ad.includes(s)?T=sd:T=$2;const H=ld(s,i,T,h);return H.type==="small"?D2(s,H.style,c,h,b,k):H.type==="large"?nd(s,H.size,c,h,b,k):od(s,i,c,h,b,k)};var to={sqrtImage:A2,sizedDelim:F2,sizeToMaxHeight:Ta,customSizedDelim:ud,leftRightDelim:function(s,i,c,h,b,k){const T=h.fontMetrics().axisHeight*h.sizeMultiplier,H=901,J=5/h.fontMetrics().ptPerEm,ae=Math.max(i-T,c+T),fe=Math.max(ae/500*H,2*ae-J);return ud(s,fe,!0,h,b,k)}};const cd={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},O2=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function $i(s,i){const c=Ai(s);if(c&&O2.includes(c.text))return c;throw c?new a("Invalid delimiter '"+c.text+"' after '"+i.funcName+"'",s):new a("Invalid delimiter type '"+s.type+"'",s)}rt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(s,i)=>{const c=$i(i[0],s);return{type:"delimsizing",mode:s.parser.mode,size:cd[s.funcName].size,mclass:cd[s.funcName].mclass,delim:c.text}},htmlBuilder:(s,i)=>s.delim==="."?ve.makeSpan([s.mclass]):to.sizedDelim(s.delim,s.size,i,s.mode,[s.mclass]),mathmlBuilder:s=>{const i=[];s.delim!=="."&&i.push(Cn(s.delim,s.mode));const c=new Ue.MathNode("mo",i);s.mclass==="mopen"||s.mclass==="mclose"?c.setAttribute("fence","true"):c.setAttribute("fence","false"),c.setAttribute("stretchy","true");const h=ce(to.sizeToMaxHeight[s.size]);return c.setAttribute("minsize",h),c.setAttribute("maxsize",h),c}});function dd(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}rt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=s.parser.gullet.macros.get("\\current@color");if(c&&typeof c!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:$i(i[0],s).text,color:c}}}),rt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=$i(i[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const k=jt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:c.text,right:k.delim,rightColor:k.color}},htmlBuilder:(s,i)=>{dd(s);const c=Hr(s.body,i,!0,["mopen","mclose"]);let h=0,b=0,k=!1;for(let J=0;J<c.length;J++)c[J].isMiddle?k=!0:(h=Math.max(c[J].height,h),b=Math.max(c[J].depth,b));h*=i.sizeMultiplier,b*=i.sizeMultiplier;let T;if(s.left==="."?T=Na(i,["mopen"]):T=to.leftRightDelim(s.left,h,b,i,s.mode,["mopen"]),c.unshift(T),k)for(let J=1;J<c.length;J++){const ae=c[J].isMiddle;ae&&(c[J]=to.leftRightDelim(ae.delim,h,b,ae.options,s.mode,[]))}let H;if(s.right===".")H=Na(i,["mclose"]);else{const J=s.rightColor?i.withColor(s.rightColor):i;H=to.leftRightDelim(s.right,h,b,J,s.mode,["mclose"])}return c.push(H),ve.makeSpan(["minner"],c,i)},mathmlBuilder:(s,i)=>{dd(s);const c=cn(s.body,i);if(s.left!=="."){const h=new Ue.MathNode("mo",[Cn(s.left,s.mode)]);h.setAttribute("fence","true"),c.unshift(h)}if(s.right!=="."){const h=new Ue.MathNode("mo",[Cn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),c.push(h)}return yl(c)}}),rt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const c=$i(i[0],s);if(!s.parser.leftrightDepth)throw new a("\\middle without preceding \\left",c);return{type:"middle",mode:s.parser.mode,delim:c.text}},htmlBuilder:(s,i)=>{let c;if(s.delim===".")c=Na(i,[]);else{c=to.sizedDelim(s.delim,1,i,s.mode,[]);const h={delim:s.delim,options:i};c.isMiddle=h}return c},mathmlBuilder:(s,i)=>{const c=s.delim==="\\vert"||s.delim==="|"?Cn("|","text"):Cn(s.delim,s.mode),h=new Ue.MathNode("mo",[c]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Tl=(s,i)=>{const c=ve.wrapFragment(tr(s.body,i),i),h=s.label.slice(1);let b=i.sizeMultiplier,k,T=0;const H=C.isCharacterBox(s.body);if(h==="sout")k=ve.makeSpan(["stretchy","sout"]),k.height=i.fontMetrics().defaultRuleThickness/b,T=-.5*i.fontMetrics().xHeight;else if(h==="phase"){const ae=ze({number:.6,unit:"pt"},i),fe=ze({number:.35,unit:"ex"},i),be=i.havingBaseSizing();b=b/be.sizeMultiplier;const Se=c.height+c.depth+ae+fe;c.style.paddingLeft=ce(Se/2+ae);const Ge=Math.floor(1e3*Se*b),ot=le(Ge),It=new Xt([new Yt("phase",ot)],{width:"400em",height:ce(Ge/1e3),viewBox:"0 0 400000 "+Ge,preserveAspectRatio:"xMinYMin slice"});k=ve.makeSvgSpan(["hide-tail"],[It],i),k.style.height=ce(Se),T=c.depth+ae+fe}else{/cancel/.test(h)?H||c.classes.push("cancel-pad"):h==="angl"?c.classes.push("anglpad"):c.classes.push("boxpad");let ae=0,fe=0,be=0;/box/.test(h)?(be=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness),ae=i.fontMetrics().fboxsep+(h==="colorbox"?0:be),fe=ae):h==="angl"?(be=Math.max(i.fontMetrics().defaultRuleThickness,i.minRuleThickness),ae=4*be,fe=Math.max(0,.25-c.depth)):(ae=H?.2:0,fe=ae),k=eo.encloseSpan(c,h,ae,fe,i),/fbox|boxed|fcolorbox/.test(h)?(k.style.borderStyle="solid",k.style.borderWidth=ce(be)):h==="angl"&&be!==.049&&(k.style.borderTopWidth=ce(be),k.style.borderRightWidth=ce(be)),T=c.depth+fe,s.backgroundColor&&(k.style.backgroundColor=s.backgroundColor,s.borderColor&&(k.style.borderColor=s.borderColor))}let J;if(s.backgroundColor)J=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:k,shift:T},{type:"elem",elem:c,shift:0}]},i);else{const ae=/cancel|phase/.test(h)?["svg-align"]:[];J=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:k,shift:T,wrapperClasses:ae}]},i)}return/cancel/.test(h)&&(J.height=c.height,J.depth=c.depth),/cancel/.test(h)&&!H?ve.makeSpan(["mord","cancel-lap"],[J],i):ve.makeSpan(["mord"],[J],i)},Ol=(s,i)=>{let c=0;const h=new Ue.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yr(s.body,i)]);switch(s.label){case"\\cancel":h.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":h.setAttribute("notation","downdiagonalstrike");break;case"\\phase":h.setAttribute("notation","phasorangle");break;case"\\sout":h.setAttribute("notation","horizontalstrike");break;case"\\fbox":h.setAttribute("notation","box");break;case"\\angl":h.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(c=i.fontMetrics().fboxsep*i.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*c+"pt"),h.setAttribute("height","+"+2*c+"pt"),h.setAttribute("lspace",c+"pt"),h.setAttribute("voffset",c+"pt"),s.label==="\\fcolorbox"){const b=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness);h.setAttribute("style","border: "+b+"em solid "+String(s.borderColor))}break;case"\\xcancel":h.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return s.backgroundColor&&h.setAttribute("mathbackground",s.backgroundColor),h};rt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,i,c){let{parser:h,funcName:b}=s;const k=jt(i[0],"color-token").color,T=i[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:k,body:T}},htmlBuilder:Tl,mathmlBuilder:Ol}),rt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,i,c){let{parser:h,funcName:b}=s;const k=jt(i[0],"color-token").color,T=jt(i[1],"color-token").color,H=i[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:T,borderColor:k,body:H}},htmlBuilder:Tl,mathmlBuilder:Ol}),rt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"enclose",mode:c.mode,label:"\\fbox",body:i[0]}}}),rt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;const b=i[0];return{type:"enclose",mode:c.mode,label:h,body:b}},htmlBuilder:Tl,mathmlBuilder:Ol}),rt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,i){let{parser:c}=s;return{type:"enclose",mode:c.mode,label:"\\angl",body:i[0]}}});const fd={};function Ln(s){let{type:i,names:c,props:h,handler:b,htmlBuilder:k,mathmlBuilder:T}=s;const H={type:i,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let J=0;J<c.length;++J)fd[c[J]]=H;k&&(Tr[i]=k),T&&(Nn[i]=T)}const hd={};function W(s,i){hd[s]=i}class dn{constructor(i,c,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=i,this.start=c,this.end=h}static range(i,c){return c?!i||!i.loc||!c.loc||i.loc.lexer!==c.loc.lexer?null:new dn(i.loc.lexer,i.loc.start,c.loc.end):i&&i.loc}}class vn{constructor(i,c){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=i,this.loc=c}range(i,c){return new vn(c,dn.range(this,i))}}function pd(s){const i=[];s.consumeSpaces();let c=s.fetch().text;for(c==="\\relax"&&(s.consume(),s.consumeSpaces(),c=s.fetch().text);c==="\\hline"||c==="\\hdashline";)s.consume(),i.push(c==="\\hdashline"),s.consumeSpaces(),c=s.fetch().text;return i}const Ti=s=>{if(!s.parser.settings.displayMode)throw new a("{"+s.envName+"} can be used only in display mode.")};function Rl(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function vo(s,i,c){let{hskipBeforeAndAfter:h,addJot:b,cols:k,arraystretch:T,colSeparationType:H,autoTag:J,singleRow:ae,emptySingleRow:fe,maxNumCols:be,leqno:Se}=i;if(s.gullet.beginGroup(),ae||s.gullet.macros.set("\\cr","\\\\\\relax"),!T){const Cr=s.gullet.expandMacroAsText("\\arraystretch");if(Cr==null)T=1;else if(T=parseFloat(Cr),!T||T<0)throw new a("Invalid \\arraystretch: "+Cr)}s.gullet.beginGroup();let Ge=[];const ot=[Ge],It=[],Zt=[],Ut=J!=null?[]:void 0;function ir(){J&&s.gullet.macros.set("\\@eqnsw","1",!0)}function rr(){Ut&&(s.gullet.macros.get("\\df@tag")?(Ut.push(s.subparse([new vn("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):Ut.push(!!J&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(ir(),Zt.push(pd(s));;){let Cr=s.parseExpression(!1,ae?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),Cr={type:"ordgroup",mode:s.mode,body:Cr},c&&(Cr={type:"styling",mode:s.mode,style:c,body:[Cr]}),Ge.push(Cr);const Xr=s.fetch().text;if(Xr==="&"){if(be&&Ge.length===be){if(ae||H)throw new a("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(Xr==="\\end"){rr(),Ge.length===1&&Cr.type==="styling"&&Cr.body[0].body.length===0&&(ot.length>1||!fe)&&ot.pop(),Zt.length<ot.length+1&&Zt.push([]);break}else if(Xr==="\\\\"){s.consume();let nn;s.gullet.future().text!==" "&&(nn=s.parseSizeGroup(!0)),It.push(nn?nn.value:null),rr(),Zt.push(pd(s)),Ge=[],ot.push(Ge),ir()}else throw new a("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:b,arraystretch:T,body:ot,cols:k,rowGaps:It,hskipBeforeAndAfter:h,hLinesBeforeRow:Zt,colSeparationType:H,tags:Ut,leqno:Se}}function Ml(s){return s.slice(0,1)==="d"?"display":"text"}const Hn=function(s,i){let c,h;const b=s.body.length,k=s.hLinesBeforeRow;let T=0,H=new Array(b);const J=[],ae=Math.max(i.fontMetrics().arrayRuleWidth,i.minRuleThickness),fe=1/i.fontMetrics().ptPerEm;let be=5*fe;s.colSeparationType&&s.colSeparationType==="small"&&(be=.2778*(i.havingStyle(j.SCRIPT).sizeMultiplier/i.sizeMultiplier));const Se=s.colSeparationType==="CD"?ze({number:3,unit:"ex"},i):12*fe,Ge=3*fe,ot=s.arraystretch*Se,It=.7*ot,Zt=.3*ot;let Ut=0;function ir(sr){for(let pr=0;pr<sr.length;++pr)pr>0&&(Ut+=.25),J.push({pos:Ut,isDashed:sr[pr]})}for(ir(k[0]),c=0;c<s.body.length;++c){const sr=s.body[c];let pr=It,Dr=Zt;T<sr.length&&(T=sr.length);const kr=new Array(sr.length);for(h=0;h<sr.length;++h){const En=tr(sr[h],i);Dr<En.depth&&(Dr=En.depth),pr<En.height&&(pr=En.height),kr[h]=En}const Or=s.rowGaps[c];let Nr=0;Or&&(Nr=ze(Or,i),Nr>0&&(Nr+=Zt,Dr<Nr&&(Dr=Nr),Nr=0)),s.addJot&&(Dr+=Ge),kr.height=pr,kr.depth=Dr,Ut+=pr,kr.pos=Ut,Ut+=Dr+Nr,H[c]=kr,ir(k[c+1])}const rr=Ut/2+i.fontMetrics().axisHeight,Cr=s.cols||[],Xr=[];let nn,Dn;const Qo=[];if(s.tags&&s.tags.some(sr=>sr))for(c=0;c<b;++c){const sr=H[c],pr=sr.pos-rr,Dr=s.tags[c];let kr;Dr===!0?kr=ve.makeSpan(["eqn-num"],[],i):Dr===!1?kr=ve.makeSpan([],[],i):kr=ve.makeSpan([],Hr(Dr,i,!0),i),kr.depth=sr.depth,kr.height=sr.height,Qo.push({type:"elem",elem:kr,shift:pr})}for(h=0,Dn=0;h<T||Dn<Cr.length;++h,++Dn){let sr=Cr[Dn]||{},pr=!0;for(;sr.type==="separator";){if(pr||(nn=ve.makeSpan(["arraycolsep"],[]),nn.style.width=ce(i.fontMetrics().doubleRuleSep),Xr.push(nn)),sr.separator==="|"||sr.separator===":"){const Or=sr.separator==="|"?"solid":"dashed",Nr=ve.makeSpan(["vertical-separator"],[],i);Nr.style.height=ce(Ut),Nr.style.borderRightWidth=ce(ae),Nr.style.borderRightStyle=Or,Nr.style.margin="0 "+ce(-ae/2);const En=Ut-rr;En&&(Nr.style.verticalAlign=ce(-En)),Xr.push(Nr)}else throw new a("Invalid separator type: "+sr.separator);Dn++,sr=Cr[Dn]||{},pr=!1}if(h>=T)continue;let Dr;(h>0||s.hskipBeforeAndAfter)&&(Dr=C.deflt(sr.pregap,be),Dr!==0&&(nn=ve.makeSpan(["arraycolsep"],[]),nn.style.width=ce(Dr),Xr.push(nn)));let kr=[];for(c=0;c<b;++c){const Or=H[c],Nr=Or[h];if(!Nr)continue;const En=Or.pos-rr;Nr.depth=Or.depth,Nr.height=Or.height,kr.push({type:"elem",elem:Nr,shift:En})}kr=ve.makeVList({positionType:"individualShift",children:kr},i),kr=ve.makeSpan(["col-align-"+(sr.align||"c")],[kr]),Xr.push(kr),(h<T-1||s.hskipBeforeAndAfter)&&(Dr=C.deflt(sr.postgap,be),Dr!==0&&(nn=ve.makeSpan(["arraycolsep"],[]),nn.style.width=ce(Dr),Xr.push(nn)))}if(H=ve.makeSpan(["mtable"],Xr),J.length>0){const sr=ve.makeLineSpan("hline",i,ae),pr=ve.makeLineSpan("hdashline",i,ae),Dr=[{type:"elem",elem:H,shift:0}];for(;J.length>0;){const kr=J.pop(),Or=kr.pos-rr;kr.isDashed?Dr.push({type:"elem",elem:pr,shift:Or}):Dr.push({type:"elem",elem:sr,shift:Or})}H=ve.makeVList({positionType:"individualShift",children:Dr},i)}if(Qo.length===0)return ve.makeSpan(["mord"],[H],i);{let sr=ve.makeVList({positionType:"individualShift",children:Qo},i);return sr=ve.makeSpan(["tag"],[sr],i),ve.makeFragment([H,sr])}},R2={c:"center ",l:"left ",r:"right "},qn=function(s,i){const c=[],h=new Ue.MathNode("mtd",[],["mtr-glue"]),b=new Ue.MathNode("mtd",[],["mml-eqn-num"]);for(let be=0;be<s.body.length;be++){const Se=s.body[be],Ge=[];for(let ot=0;ot<Se.length;ot++)Ge.push(new Ue.MathNode("mtd",[yr(Se[ot],i)]));s.tags&&s.tags[be]&&(Ge.unshift(h),Ge.push(h),s.leqno?Ge.unshift(b):Ge.push(b)),c.push(new Ue.MathNode("mtr",Ge))}let k=new Ue.MathNode("mtable",c);const T=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);k.setAttribute("rowspacing",ce(T));let H="",J="";if(s.cols&&s.cols.length>0){const be=s.cols;let Se="",Ge=!1,ot=0,It=be.length;be[0].type==="separator"&&(H+="top ",ot=1),be[be.length-1].type==="separator"&&(H+="bottom ",It-=1);for(let Zt=ot;Zt<It;Zt++)be[Zt].type==="align"?(J+=R2[be[Zt].align],Ge&&(Se+="none "),Ge=!0):be[Zt].type==="separator"&&Ge&&(Se+=be[Zt].separator==="|"?"solid ":"dashed ",Ge=!1);k.setAttribute("columnalign",J.trim()),/[sd]/.test(Se)&&k.setAttribute("columnlines",Se.trim())}if(s.colSeparationType==="align"){const be=s.cols||[];let Se="";for(let Ge=1;Ge<be.length;Ge++)Se+=Ge%2?"0em ":"1em ";k.setAttribute("columnspacing",Se.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?k.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?k.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?k.setAttribute("columnspacing","0.5em"):k.setAttribute("columnspacing","1em");let ae="";const fe=s.hLinesBeforeRow;H+=fe[0].length>0?"left ":"",H+=fe[fe.length-1].length>0?"right ":"";for(let be=1;be<fe.length-1;be++)ae+=fe[be].length===0?"none ":fe[be][0]?"dashed ":"solid ";return/[sd]/.test(ae)&&k.setAttribute("rowlines",ae.trim()),H!==""&&(k=new Ue.MathNode("menclose",[k]),k.setAttribute("notation",H.trim())),s.arraystretch&&s.arraystretch<1&&(k=new Ue.MathNode("mstyle",[k]),k.setAttribute("scriptlevel","1")),k},md=function(s,i){s.envName.indexOf("ed")===-1&&Ti(s);const c=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",k=vo(s.parser,{cols:c,addJot:!0,autoTag:b?void 0:Rl(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let T,H=0;const J={type:"ordgroup",mode:s.mode,body:[]};if(i[0]&&i[0].type==="ordgroup"){let fe="";for(let be=0;be<i[0].body.length;be++){const Se=jt(i[0].body[be],"textord");fe+=Se.text}T=Number(fe),H=T*2}const ae=!H;k.body.forEach(function(fe){for(let be=1;be<fe.length;be+=2){const Se=jt(fe[be],"styling");jt(Se.body[0],"ordgroup").body.unshift(J)}if(ae)H<fe.length&&(H=fe.length);else{const be=fe.length/2;if(T<be)throw new a("Too many math in a row: "+("expected "+T+", but got "+be),fe[0])}});for(let fe=0;fe<H;++fe){let be="r",Se=0;fe%2===1?be="l":fe>0&&ae&&(Se=1),c[fe]={type:"align",align:be,pregap:Se,postgap:0}}return k.colSeparationType=ae?"align":"alignat",k};Ln({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,i){const c=(Ai(i[0])?[i[0]]:jt(i[0],"ordgroup").body).map(function(b){const k=Cl(b).text;if("lcr".indexOf(k)!==-1)return{type:"align",align:k};if(k==="|")return{type:"separator",separator:"|"};if(k===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+k,b)}),h={cols:c,hskipBeforeAndAfter:!0,maxNumCols:c.length};return vo(s.parser,h,Ml(s.envName))},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const i={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[s.envName.replace("*","")];let c="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:c}]};if(s.envName.charAt(s.envName.length-1)==="*"){const T=s.parser;if(T.consumeSpaces(),T.fetch().text==="["){if(T.consume(),T.consumeSpaces(),c=T.fetch().text,"lcr".indexOf(c)===-1)throw new a("Expected l or c or r",T.nextToken);T.consume(),T.consumeSpaces(),T.expect("]"),T.consume(),h.cols=[{type:"align",align:c}]}}const b=vo(s.parser,h,Ml(s.envName)),k=Math.max(0,...b.body.map(T=>T.length));return b.cols=new Array(k).fill({type:"align",align:c}),i?{type:"leftright",mode:s.mode,body:[b],left:i[0],right:i[1],rightColor:void 0}:b},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const i={arraystretch:.5},c=vo(s.parser,i,"script");return c.colSeparationType="small",c},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["subarray"],props:{numArgs:1},handler(s,i){const c=(Ai(i[0])?[i[0]]:jt(i[0],"ordgroup").body).map(function(b){const k=Cl(b).text;if("lc".indexOf(k)!==-1)return{type:"align",align:k};throw new a("Unknown column alignment: "+k,b)});if(c.length>1)throw new a("{subarray} can contain only one column");let h={cols:c,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=vo(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new a("{subarray} can contain only one column");return h},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const i={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},c=vo(s.parser,i,Ml(s.envName));return{type:"leftright",mode:s.mode,body:[c],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:md,htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&Ti(s);const i={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Rl(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return vo(s.parser,i,"display")},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:md,htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){Ti(s);const i={autoTag:Rl(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return vo(s.parser,i,"display")},htmlBuilder:Hn,mathmlBuilder:qn}),Ln({type:"array",names:["CD"],props:{numArgs:0},handler(s){return Ti(s),w2(s.parser)},htmlBuilder:Hn,mathmlBuilder:qn}),W("\\nonumber","\\gdef\\@eqnsw{0}"),W("\\notag","\\nonumber"),rt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,i){throw new a(s.funcName+" valid only within array environment")}});var gd=fd;rt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,i){let{parser:c,funcName:h}=s;const b=i[0];if(b.type!=="ordgroup")throw new a("Invalid environment name",b);let k="";for(let T=0;T<b.body.length;++T)k+=jt(b.body[T],"textord").text;if(h==="\\begin"){if(!gd.hasOwnProperty(k))throw new a("No such environment: "+k,b);const T=gd[k],{args:H,optArgs:J}=c.parseArguments("\\begin{"+k+"}",T),ae={mode:c.mode,envName:k,parser:c},fe=T.handler(ae,H,J);c.expect("\\end",!1);const be=c.nextToken,Se=jt(c.parseFunction(),"environment");if(Se.name!==k)throw new a("Mismatch: \\begin{"+k+"} matched by \\end{"+Se.name+"}",be);return fe}return{type:"environment",mode:c.mode,name:k,nameGroup:b}}});const vd=(s,i)=>{const c=s.font,h=i.withFont(c);return tr(s.body,h)},bd=(s,i)=>{const c=s.font,h=i.withFont(c);return yr(s.body,h)},yd={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};rt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=jn(i[0]);let k=h;return k in yd&&(k=yd[k]),{type:"font",mode:c.mode,font:k.slice(1),body:b}},htmlBuilder:vd,mathmlBuilder:bd}),rt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,i)=>{let{parser:c}=s;const h=i[0],b=C.isCharacterBox(h);return{type:"mclass",mode:c.mode,mclass:Fi(h),body:[{type:"font",mode:c.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),rt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h,breakOnTokenText:b}=s;const{mode:k}=c,T=c.parseExpression(!0,b),H="math"+h.slice(1);return{type:"font",mode:k,font:H,body:{type:"ordgroup",mode:c.mode,body:T}}},htmlBuilder:vd,mathmlBuilder:bd});const xd=(s,i)=>{let c=i;return s==="display"?c=c.id>=j.SCRIPT.id?c.text():j.DISPLAY:s==="text"&&c.size===j.DISPLAY.size?c=j.TEXT:s==="script"?c=j.SCRIPT:s==="scriptscript"&&(c=j.SCRIPTSCRIPT),c},Il=(s,i)=>{const c=xd(s.size,i.style),h=c.fracNum(),b=c.fracDen();let k;k=i.havingStyle(h);const T=tr(s.numer,k,i);if(s.continued){const ir=8.5/i.fontMetrics().ptPerEm,rr=3.5/i.fontMetrics().ptPerEm;T.height=T.height<ir?ir:T.height,T.depth=T.depth<rr?rr:T.depth}k=i.havingStyle(b);const H=tr(s.denom,k,i);let J,ae,fe;s.hasBarLine?(s.barSize?(ae=ze(s.barSize,i),J=ve.makeLineSpan("frac-line",i,ae)):J=ve.makeLineSpan("frac-line",i),ae=J.height,fe=J.height):(J=null,ae=0,fe=i.fontMetrics().defaultRuleThickness);let be,Se,Ge;c.size===j.DISPLAY.size||s.size==="display"?(be=i.fontMetrics().num1,ae>0?Se=3*fe:Se=7*fe,Ge=i.fontMetrics().denom1):(ae>0?(be=i.fontMetrics().num2,Se=fe):(be=i.fontMetrics().num3,Se=3*fe),Ge=i.fontMetrics().denom2);let ot;if(J){const ir=i.fontMetrics().axisHeight;be-T.depth-(ir+.5*ae)<Se&&(be+=Se-(be-T.depth-(ir+.5*ae))),ir-.5*ae-(H.height-Ge)<Se&&(Ge+=Se-(ir-.5*ae-(H.height-Ge)));const rr=-(ir-.5*ae);ot=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:H,shift:Ge},{type:"elem",elem:J,shift:rr},{type:"elem",elem:T,shift:-be}]},i)}else{const ir=be-T.depth-(H.height-Ge);ir<Se&&(be+=.5*(Se-ir),Ge+=.5*(Se-ir)),ot=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:H,shift:Ge},{type:"elem",elem:T,shift:-be}]},i)}k=i.havingStyle(c),ot.height*=k.sizeMultiplier/i.sizeMultiplier,ot.depth*=k.sizeMultiplier/i.sizeMultiplier;let It;c.size===j.DISPLAY.size?It=i.fontMetrics().delim1:c.size===j.SCRIPTSCRIPT.size?It=i.havingStyle(j.SCRIPT).fontMetrics().delim2:It=i.fontMetrics().delim2;let Zt,Ut;return s.leftDelim==null?Zt=Na(i,["mopen"]):Zt=to.customSizedDelim(s.leftDelim,It,!0,i.havingStyle(c),s.mode,["mopen"]),s.continued?Ut=ve.makeSpan([]):s.rightDelim==null?Ut=Na(i,["mclose"]):Ut=to.customSizedDelim(s.rightDelim,It,!0,i.havingStyle(c),s.mode,["mclose"]),ve.makeSpan(["mord"].concat(k.sizingClasses(i)),[Zt,ve.makeSpan(["mfrac"],[ot]),Ut],i)},Pl=(s,i)=>{let c=new Ue.MathNode("mfrac",[yr(s.numer,i),yr(s.denom,i)]);if(!s.hasBarLine)c.setAttribute("linethickness","0px");else if(s.barSize){const b=ze(s.barSize,i);c.setAttribute("linethickness",ce(b))}const h=xd(s.size,i.style);if(h.size!==i.style.size){c=new Ue.MathNode("mstyle",[c]);const b=h.size===j.DISPLAY.size?"true":"false";c.setAttribute("displaystyle",b),c.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const b=[];if(s.leftDelim!=null){const k=new Ue.MathNode("mo",[new Ue.TextNode(s.leftDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}if(b.push(c),s.rightDelim!=null){const k=new Ue.MathNode("mo",[new Ue.TextNode(s.rightDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}return yl(b)}return c};rt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0],k=i[1];let T,H=null,J=null,ae="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":T=!0;break;case"\\\\atopfrac":T=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":T=!1,H="(",J=")";break;case"\\\\bracefrac":T=!1,H="\\{",J="\\}";break;case"\\\\brackfrac":T=!1,H="[",J="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":ae="display";break;case"\\tfrac":case"\\tbinom":ae="text";break}return{type:"genfrac",mode:c.mode,continued:!1,numer:b,denom:k,hasBarLine:T,leftDelim:H,rightDelim:J,size:ae,barSize:null}},htmlBuilder:Il,mathmlBuilder:Pl}),rt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0],k=i[1];return{type:"genfrac",mode:c.mode,continued:!0,numer:b,denom:k,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),rt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:i,funcName:c,token:h}=s,b;switch(c){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:b,token:h}}});const wd=["display","text","script","scriptscript"],Cd=function(s){let i=null;return s.length>0&&(i=s,i=i==="."?null:i),i};rt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,i){let{parser:c}=s;const h=i[4],b=i[5],k=jn(i[0]),T=k.type==="atom"&&k.family==="open"?Cd(k.text):null,H=jn(i[1]),J=H.type==="atom"&&H.family==="close"?Cd(H.text):null,ae=jt(i[2],"size");let fe,be=null;ae.isBlank?fe=!0:(be=ae.value,fe=be.number>0);let Se="auto",Ge=i[3];if(Ge.type==="ordgroup"){if(Ge.body.length>0){const ot=jt(Ge.body[0],"textord");Se=wd[Number(ot.text)]}}else Ge=jt(Ge,"textord"),Se=wd[Number(Ge.text)];return{type:"genfrac",mode:c.mode,numer:h,denom:b,continued:!1,hasBarLine:fe,barSize:be,leftDelim:T,rightDelim:J,size:Se}},htmlBuilder:Il,mathmlBuilder:Pl}),rt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,i){let{parser:c,funcName:h,token:b}=s;return{type:"infix",mode:c.mode,replaceWith:"\\\\abovefrac",size:jt(i[0],"size").value,token:b}}}),rt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0],k=x(jt(i[1],"infix").size),T=i[2],H=k.number>0;return{type:"genfrac",mode:c.mode,numer:b,denom:T,continued:!1,hasBarLine:H,barSize:k,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Il,mathmlBuilder:Pl});const Dd=(s,i)=>{const c=i.style;let h,b;s.type==="supsub"?(h=s.sup?tr(s.sup,i.havingStyle(c.sup()),i):tr(s.sub,i.havingStyle(c.sub()),i),b=jt(s.base,"horizBrace")):b=jt(s,"horizBrace");const k=tr(b.base,i.havingBaseStyle(j.DISPLAY)),T=eo.svgSpan(b,i);let H;if(b.isOver?(H=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:.1},{type:"elem",elem:T}]},i),H.children[0].children[0].children[1].classes.push("svg-align")):(H=ve.makeVList({positionType:"bottom",positionData:k.depth+.1+T.height,children:[{type:"elem",elem:T},{type:"kern",size:.1},{type:"elem",elem:k}]},i),H.children[0].children[0].children[0].classes.push("svg-align")),h){const J=ve.makeSpan(["mord",b.isOver?"mover":"munder"],[H],i);b.isOver?H=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:J},{type:"kern",size:.2},{type:"elem",elem:h}]},i):H=ve.makeVList({positionType:"bottom",positionData:J.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:J}]},i)}return ve.makeSpan(["mord",b.isOver?"mover":"munder"],[H],i)};rt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,i){let{parser:c,funcName:h}=s;return{type:"horizBrace",mode:c.mode,label:h,isOver:/^\\over/.test(h),base:i[0]}},htmlBuilder:Dd,mathmlBuilder:(s,i)=>{const c=eo.mathMLnode(s.label);return new Ue.MathNode(s.isOver?"mover":"munder",[yr(s.base,i),c])}}),rt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[1],b=jt(i[0],"url").url;return c.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:c.mode,href:b,body:wr(h)}:c.formatUnsupportedCmd("\\href")},htmlBuilder:(s,i)=>{const c=Hr(s.body,i,!1);return ve.makeAnchor(s.href,[],c,i)},mathmlBuilder:(s,i)=>{let c=go(s.body,i);return c instanceof gn||(c=new gn("mrow",[c])),c.setAttribute("href",s.href),c}}),rt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=jt(i[0],"url").url;if(!c.settings.isTrusted({command:"\\url",url:h}))return c.formatUnsupportedCmd("\\url");const b=[];for(let T=0;T<h.length;T++){let H=h[T];H==="~"&&(H="\\textasciitilde"),b.push({type:"textord",mode:"text",text:H})}const k={type:"text",mode:c.mode,font:"\\texttt",body:b};return{type:"href",mode:c.mode,href:h,body:wr(k)}}}),rt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,i){let{parser:c}=s;return{type:"hbox",mode:c.mode,body:wr(i[0])}},htmlBuilder(s,i){const c=Hr(s.body,i,!1);return ve.makeFragment(c)},mathmlBuilder(s,i){return new Ue.MathNode("mrow",cn(s.body,i))}}),rt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h,token:b}=s;const k=jt(i[0],"raw").string,T=i[1];c.settings.strict&&c.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let H;const J={};switch(h){case"\\htmlClass":J.class=k,H={command:"\\htmlClass",class:k};break;case"\\htmlId":J.id=k,H={command:"\\htmlId",id:k};break;case"\\htmlStyle":J.style=k,H={command:"\\htmlStyle",style:k};break;case"\\htmlData":{const ae=k.split(",");for(let fe=0;fe<ae.length;fe++){const be=ae[fe].split("=");if(be.length!==2)throw new a("Error parsing key-value for \\htmlData");J["data-"+be[0].trim()]=be[1].trim()}H={command:"\\htmlData",attributes:J};break}default:throw new Error("Unrecognized html command")}return c.settings.isTrusted(H)?{type:"html",mode:c.mode,attributes:J,body:wr(T)}:c.formatUnsupportedCmd(h)},htmlBuilder:(s,i)=>{const c=Hr(s.body,i,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=ve.makeSpan(h,c,i);for(const k in s.attributes)k!=="class"&&s.attributes.hasOwnProperty(k)&&b.setAttribute(k,s.attributes[k]);return b},mathmlBuilder:(s,i)=>go(s.body,i)}),rt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;return{type:"htmlmathml",mode:c.mode,html:wr(i[0]),mathml:wr(i[1])}},htmlBuilder:(s,i)=>{const c=Hr(s.html,i,!1);return ve.makeFragment(c)},mathmlBuilder:(s,i)=>go(s.mathml,i)});const zl=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!i)throw new a("Invalid size: '"+s+"' in \\includegraphics");const c={number:+(i[1]+i[2]),unit:i[3]};if(!kt(c))throw new a("Invalid unit: '"+c.unit+"' in \\includegraphics.");return c}};rt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,i,c)=>{let{parser:h}=s,b={number:0,unit:"em"},k={number:.9,unit:"em"},T={number:0,unit:"em"},H="";if(c[0]){const ae=jt(c[0],"raw").string.split(",");for(let fe=0;fe<ae.length;fe++){const be=ae[fe].split("=");if(be.length===2){const Se=be[1].trim();switch(be[0].trim()){case"alt":H=Se;break;case"width":b=zl(Se);break;case"height":k=zl(Se);break;case"totalheight":T=zl(Se);break;default:throw new a("Invalid key: '"+be[0]+"' in \\includegraphics.")}}}}const J=jt(i[0],"url").url;return H===""&&(H=J,H=H.replace(/^.*[\\/]/,""),H=H.substring(0,H.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:J})?{type:"includegraphics",mode:h.mode,alt:H,width:b,height:k,totalheight:T,src:J}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,i)=>{const c=ze(s.height,i);let h=0;s.totalheight.number>0&&(h=ze(s.totalheight,i)-c);let b=0;s.width.number>0&&(b=ze(s.width,i));const k={height:ce(c+h)};b>0&&(k.width=ce(b)),h>0&&(k.verticalAlign=ce(-h));const T=new Qt(s.src,s.alt,k);return T.height=c,T.depth=h,T},mathmlBuilder:(s,i)=>{const c=new Ue.MathNode("mglyph",[]);c.setAttribute("alt",s.alt);const h=ze(s.height,i);let b=0;if(s.totalheight.number>0&&(b=ze(s.totalheight,i)-h,c.setAttribute("valign",ce(-b))),c.setAttribute("height",ce(h+b)),s.width.number>0){const k=ze(s.width,i);c.setAttribute("width",ce(k))}return c.setAttribute("src",s.src),c}}),rt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,i){let{parser:c,funcName:h}=s;const b=jt(i[0],"size");if(c.settings.strict){const k=h[1]==="m",T=b.value.unit==="mu";k?(T||c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+b.value.unit+" units")),c.mode!=="math"&&c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):T&&c.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:c.mode,dimension:b.value}},htmlBuilder(s,i){return ve.makeGlue(s.dimension,i)},mathmlBuilder(s,i){const c=ze(s.dimension,i);return new Ue.SpaceNode(c)}}),rt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0];return{type:"lap",mode:c.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,i)=>{let c;s.alignment==="clap"?(c=ve.makeSpan([],[tr(s.body,i)]),c=ve.makeSpan(["inner"],[c],i)):c=ve.makeSpan(["inner"],[tr(s.body,i)]);const h=ve.makeSpan(["fix"],[]);let b=ve.makeSpan([s.alignment],[c,h],i);const k=ve.makeSpan(["strut"]);return k.style.height=ce(b.height+b.depth),b.depth&&(k.style.verticalAlign=ce(-b.depth)),b.children.unshift(k),b=ve.makeSpan(["thinbox"],[b],i),ve.makeSpan(["mord","vbox"],[b],i)},mathmlBuilder:(s,i)=>{const c=new Ue.MathNode("mpadded",[yr(s.body,i)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";c.setAttribute("lspace",h+"width")}return c.setAttribute("width","0px"),c}}),rt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){let{funcName:c,parser:h}=s;const b=h.mode;h.switchMode("math");const k=c==="\\("?"\\)":"$",T=h.parseExpression(!1,k);return h.expect(k),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:T}}}),rt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){throw new a("Mismatched "+s.funcName)}});const Ed=(s,i)=>{switch(i.style.size){case j.DISPLAY.size:return s.display;case j.TEXT.size:return s.text;case j.SCRIPT.size:return s.script;case j.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};rt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,i)=>{let{parser:c}=s;return{type:"mathchoice",mode:c.mode,display:wr(i[0]),text:wr(i[1]),script:wr(i[2]),scriptscript:wr(i[3])}},htmlBuilder:(s,i)=>{const c=Ed(s,i),h=Hr(c,i,!1);return ve.makeFragment(h)},mathmlBuilder:(s,i)=>{const c=Ed(s,i);return go(c,i)}});const kd=(s,i,c,h,b,k,T)=>{s=ve.makeSpan([],[s]);const H=c&&C.isCharacterBox(c);let J,ae;if(i){const Se=tr(i,h.havingStyle(b.sup()),h);ae={elem:Se,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Se.depth)}}if(c){const Se=tr(c,h.havingStyle(b.sub()),h);J={elem:Se,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Se.height)}}let fe;if(ae&&J){const Se=h.fontMetrics().bigOpSpacing5+J.elem.height+J.elem.depth+J.kern+s.depth+T;fe=ve.makeVList({positionType:"bottom",positionData:Se,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:J.elem,marginLeft:ce(-k)},{type:"kern",size:J.kern},{type:"elem",elem:s},{type:"kern",size:ae.kern},{type:"elem",elem:ae.elem,marginLeft:ce(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(J){const Se=s.height-T;fe=ve.makeVList({positionType:"top",positionData:Se,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:J.elem,marginLeft:ce(-k)},{type:"kern",size:J.kern},{type:"elem",elem:s}]},h)}else if(ae){const Se=s.depth+T;fe=ve.makeVList({positionType:"bottom",positionData:Se,children:[{type:"elem",elem:s},{type:"kern",size:ae.kern},{type:"elem",elem:ae.elem,marginLeft:ce(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const be=[fe];if(J&&k!==0&&!H){const Se=ve.makeSpan(["mspace"],[],h);Se.style.marginRight=ce(k),be.unshift(Se)}return ve.makeSpan(["mop","op-limits"],be,h)},Sd=["\\smallint"],Zo=(s,i)=>{let c,h,b=!1,k;s.type==="supsub"?(c=s.sup,h=s.sub,k=jt(s.base,"op"),b=!0):k=jt(s,"op");const T=i.style;let H=!1;T.size===j.DISPLAY.size&&k.symbol&&!Sd.includes(k.name)&&(H=!0);let J;if(k.symbol){const be=H?"Size2-Regular":"Size1-Regular";let Se="";if((k.name==="\\oiint"||k.name==="\\oiiint")&&(Se=k.name.slice(1),k.name=Se==="oiint"?"\\iint":"\\iiint"),J=ve.makeSymbol(k.name,be,"math",i,["mop","op-symbol",H?"large-op":"small-op"]),Se.length>0){const Ge=J.italic,ot=ve.staticSvg(Se+"Size"+(H?"2":"1"),i);J=ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:J,shift:0},{type:"elem",elem:ot,shift:H?.08:0}]},i),k.name="\\"+Se,J.classes.unshift("mop"),J.italic=Ge}}else if(k.body){const be=Hr(k.body,i,!0);be.length===1&&be[0]instanceof dt?(J=be[0],J.classes[0]="mop"):J=ve.makeSpan(["mop"],be,i)}else{const be=[];for(let Se=1;Se<k.name.length;Se++)be.push(ve.mathsym(k.name[Se],k.mode,i));J=ve.makeSpan(["mop"],be,i)}let ae=0,fe=0;return(J instanceof dt||k.name==="\\oiint"||k.name==="\\oiiint")&&!k.suppressBaseShift&&(ae=(J.height-J.depth)/2-i.fontMetrics().axisHeight,fe=J.italic),b?kd(J,c,h,i,T,fe,ae):(ae&&(J.style.position="relative",J.style.top=ce(ae)),J)},Oa=(s,i)=>{let c;if(s.symbol)c=new gn("mo",[Cn(s.name,s.mode)]),Sd.includes(s.name)&&c.setAttribute("largeop","false");else if(s.body)c=new gn("mo",cn(s.body,i));else{c=new gn("mi",[new _n(s.name.slice(1))]);const h=new gn("mo",[Cn("\u2061","text")]);s.parentIsSupSub?c=new gn("mrow",[c,h]):c=qc([c,h])}return c},M2={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};rt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(s,i)=>{let{parser:c,funcName:h}=s,b=h;return b.length===1&&(b=M2[b]),{type:"op",mode:c.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:Zo,mathmlBuilder:Oa}),rt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:wr(h)}},htmlBuilder:Zo,mathmlBuilder:Oa});const I2={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};rt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s;return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:c}},htmlBuilder:Zo,mathmlBuilder:Oa}),rt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s;return{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:c}},htmlBuilder:Zo,mathmlBuilder:Oa}),rt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:i,funcName:c}=s,h=c;return h.length===1&&(h=I2[h]),{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:Zo,mathmlBuilder:Oa});const Ad=(s,i)=>{let c,h,b=!1,k;s.type==="supsub"?(c=s.sup,h=s.sub,k=jt(s.base,"operatorname"),b=!0):k=jt(s,"operatorname");let T;if(k.body.length>0){const H=k.body.map(ae=>{const fe=ae.text;return typeof fe=="string"?{type:"textord",mode:ae.mode,text:fe}:ae}),J=Hr(H,i.withFont("mathrm"),!0);for(let ae=0;ae<J.length;ae++){const fe=J[ae];fe instanceof dt&&(fe.text=fe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}T=ve.makeSpan(["mop"],J,i)}else T=ve.makeSpan(["mop"],[],i);return b?kd(T,c,h,i,i.style,0,0):T};rt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,i)=>{let{parser:c,funcName:h}=s;const b=i[0];return{type:"operatorname",mode:c.mode,body:wr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ad,mathmlBuilder:(s,i)=>{let c=cn(s.body,i.withFont("mathrm")),h=!0;for(let T=0;T<c.length;T++){const H=c[T];if(!(H instanceof Ue.SpaceNode))if(H instanceof Ue.MathNode)switch(H.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const J=H.children[0];H.children.length===1&&J instanceof Ue.TextNode?J.text=J.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const T=c.map(H=>H.toText()).join("");c=[new Ue.TextNode(T)]}const b=new Ue.MathNode("mi",c);b.setAttribute("mathvariant","normal");const k=new Ue.MathNode("mo",[Cn("\u2061","text")]);return s.parentIsSupSub?new Ue.MathNode("mrow",[b,k]):Ue.newDocumentFragment([b,k])}}),W("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),rn({type:"ordgroup",htmlBuilder(s,i){return s.semisimple?ve.makeFragment(Hr(s.body,i,!1)):ve.makeSpan(["mord"],Hr(s.body,i,!0),i)},mathmlBuilder(s,i){return go(s.body,i,!0)}}),rt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,i){let{parser:c}=s;const h=i[0];return{type:"overline",mode:c.mode,body:h}},htmlBuilder(s,i){const c=tr(s.body,i.havingCrampedStyle()),h=ve.makeLineSpan("overline-line",i),b=i.fontMetrics().defaultRuleThickness,k=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},i);return ve.makeSpan(["mord","overline"],[k],i)},mathmlBuilder(s,i){const c=new Ue.MathNode("mo",[new Ue.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Ue.MathNode("mover",[yr(s.body,i),c]);return h.setAttribute("accent","true"),h}}),rt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"phantom",mode:c.mode,body:wr(h)}},htmlBuilder:(s,i)=>{const c=Hr(s.body,i.withPhantom(),!1);return ve.makeFragment(c)},mathmlBuilder:(s,i)=>{const c=cn(s.body,i);return new Ue.MathNode("mphantom",c)}}),rt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"hphantom",mode:c.mode,body:h}},htmlBuilder:(s,i)=>{let c=ve.makeSpan([],[tr(s.body,i.withPhantom())]);if(c.height=0,c.depth=0,c.children)for(let h=0;h<c.children.length;h++)c.children[h].height=0,c.children[h].depth=0;return c=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i),ve.makeSpan(["mord"],[c],i)},mathmlBuilder:(s,i)=>{const c=cn(wr(s.body),i),h=new Ue.MathNode("mphantom",c),b=new Ue.MathNode("mpadded",[h]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),rt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:c}=s;const h=i[0];return{type:"vphantom",mode:c.mode,body:h}},htmlBuilder:(s,i)=>{const c=ve.makeSpan(["inner"],[tr(s.body,i.withPhantom())]),h=ve.makeSpan(["fix"],[]);return ve.makeSpan(["mord","rlap"],[c,h],i)},mathmlBuilder:(s,i)=>{const c=cn(wr(s.body),i),h=new Ue.MathNode("mphantom",c),b=new Ue.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),rt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,i){let{parser:c}=s;const h=jt(i[0],"size").value,b=i[1];return{type:"raisebox",mode:c.mode,dy:h,body:b}},htmlBuilder(s,i){const c=tr(s.body,i),h=ze(s.dy,i);return ve.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){const c=new Ue.MathNode("mpadded",[yr(s.body,i)]),h=s.dy.number+s.dy.unit;return c.setAttribute("voffset",h),c}}),rt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:i}=s;return{type:"internal",mode:i.mode}}}),rt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,i,c){let{parser:h}=s;const b=c[0],k=jt(i[0],"size"),T=jt(i[1],"size");return{type:"rule",mode:h.mode,shift:b&&jt(b,"size").value,width:k.value,height:T.value}},htmlBuilder(s,i){const c=ve.makeSpan(["mord","rule"],[],i),h=ze(s.width,i),b=ze(s.height,i),k=s.shift?ze(s.shift,i):0;return c.style.borderRightWidth=ce(h),c.style.borderTopWidth=ce(b),c.style.bottom=ce(k),c.width=h,c.height=b+k,c.depth=-k,c.maxFontSize=b*1.125*i.sizeMultiplier,c},mathmlBuilder(s,i){const c=ze(s.width,i),h=ze(s.height,i),b=s.shift?ze(s.shift,i):0,k=i.color&&i.getColor()||"black",T=new Ue.MathNode("mspace");T.setAttribute("mathbackground",k),T.setAttribute("width",ce(c)),T.setAttribute("height",ce(h));const H=new Ue.MathNode("mpadded",[T]);return b>=0?H.setAttribute("height",ce(b)):(H.setAttribute("height",ce(b)),H.setAttribute("depth",ce(-b))),H.setAttribute("voffset",ce(b)),H}});function Bd(s,i,c){const h=Hr(s,i,!1),b=i.sizeMultiplier/c.sizeMultiplier;for(let k=0;k<h.length;k++){const T=h[k].classes.indexOf("sizing");T<0?Array.prototype.push.apply(h[k].classes,i.sizingClasses(c)):h[k].classes[T+1]==="reset-size"+i.size&&(h[k].classes[T+1]="reset-size"+c.size),h[k].height*=b,h[k].depth*=b}return ve.makeFragment(h)}const Fd=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];rt({type:"sizing",names:Fd,props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{breakOnTokenText:c,funcName:h,parser:b}=s;const k=b.parseExpression(!1,c);return{type:"sizing",mode:b.mode,size:Fd.indexOf(h)+1,body:k}},htmlBuilder:(s,i)=>{const c=i.havingSize(s.size);return Bd(s.body,c,i)},mathmlBuilder:(s,i)=>{const c=i.havingSize(s.size),h=cn(s.body,c),b=new Ue.MathNode("mstyle",h);return b.setAttribute("mathsize",ce(c.sizeMultiplier)),b}}),rt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,i,c)=>{let{parser:h}=s,b=!1,k=!1;const T=c[0]&&jt(c[0],"ordgroup");if(T){let J="";for(let ae=0;ae<T.body.length;++ae)if(J=T.body[ae].text,J==="t")b=!0;else if(J==="b")k=!0;else{b=!1,k=!1;break}}else b=!0,k=!0;const H=i[0];return{type:"smash",mode:h.mode,body:H,smashHeight:b,smashDepth:k}},htmlBuilder:(s,i)=>{const c=ve.makeSpan([],[tr(s.body,i)]);if(!s.smashHeight&&!s.smashDepth)return c;if(s.smashHeight&&(c.height=0,c.children))for(let b=0;b<c.children.length;b++)c.children[b].height=0;if(s.smashDepth&&(c.depth=0,c.children))for(let b=0;b<c.children.length;b++)c.children[b].depth=0;const h=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c}]},i);return ve.makeSpan(["mord"],[h],i)},mathmlBuilder:(s,i)=>{const c=new Ue.MathNode("mpadded",[yr(s.body,i)]);return s.smashHeight&&c.setAttribute("height","0px"),s.smashDepth&&c.setAttribute("depth","0px"),c}}),rt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,c){let{parser:h}=s;const b=c[0],k=i[0];return{type:"sqrt",mode:h.mode,body:k,index:b}},htmlBuilder(s,i){let c=tr(s.body,i.havingCrampedStyle());c.height===0&&(c.height=i.fontMetrics().xHeight),c=ve.wrapFragment(c,i);const h=i.fontMetrics().defaultRuleThickness;let b=h;i.style.id<j.TEXT.id&&(b=i.fontMetrics().xHeight);let k=h+b/4;const T=c.height+c.depth+k+h,{span:H,ruleWidth:J,advanceWidth:ae}=to.sqrtImage(T,i),fe=H.height-J;fe>c.height+c.depth+k&&(k=(k+fe-c.height-c.depth)/2);const be=H.height-c.height-k-J;c.style.paddingLeft=ce(ae);const Se=ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c,wrapperClasses:["svg-align"]},{type:"kern",size:-(c.height+be)},{type:"elem",elem:H},{type:"kern",size:J}]},i);if(s.index){const Ge=i.havingStyle(j.SCRIPTSCRIPT),ot=tr(s.index,Ge,i),It=.6*(Se.height-Se.depth),Zt=ve.makeVList({positionType:"shift",positionData:-It,children:[{type:"elem",elem:ot}]},i),Ut=ve.makeSpan(["root"],[Zt]);return ve.makeSpan(["mord","sqrt"],[Ut,Se],i)}else return ve.makeSpan(["mord","sqrt"],[Se],i)},mathmlBuilder(s,i){const{body:c,index:h}=s;return h?new Ue.MathNode("mroot",[yr(c,i),yr(h,i)]):new Ue.MathNode("msqrt",[yr(c,i)])}});const Nd={display:j.DISPLAY,text:j.TEXT,script:j.SCRIPT,scriptscript:j.SCRIPTSCRIPT};rt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,i){let{breakOnTokenText:c,funcName:h,parser:b}=s;const k=b.parseExpression(!0,c),T=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:T,body:k}},htmlBuilder(s,i){const c=Nd[s.style],h=i.havingStyle(c).withFont("");return Bd(s.body,h,i)},mathmlBuilder(s,i){const c=Nd[s.style],h=i.havingStyle(c),b=cn(s.body,h),k=new Ue.MathNode("mstyle",b),T={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return k.setAttribute("scriptlevel",T[0]),k.setAttribute("displaystyle",T[1]),k}});const P2=function(s,i){const c=s.base;return c?c.type==="op"?c.limits&&(i.style.size===j.DISPLAY.size||c.alwaysHandleSupSub)?Zo:null:c.type==="operatorname"?c.alwaysHandleSupSub&&(i.style.size===j.DISPLAY.size||c.limits)?Ad:null:c.type==="accent"?C.isCharacterBox(c.base)?Dl:null:c.type==="horizBrace"&&!s.sub===c.isOver?Dd:null:null};rn({type:"supsub",htmlBuilder(s,i){const c=P2(s,i);if(c)return c(s,i);const{base:h,sup:b,sub:k}=s,T=tr(h,i);let H,J;const ae=i.fontMetrics();let fe=0,be=0;const Se=h&&C.isCharacterBox(h);if(b){const rr=i.havingStyle(i.style.sup());H=tr(b,rr,i),Se||(fe=T.height-rr.fontMetrics().supDrop*rr.sizeMultiplier/i.sizeMultiplier)}if(k){const rr=i.havingStyle(i.style.sub());J=tr(k,rr,i),Se||(be=T.depth+rr.fontMetrics().subDrop*rr.sizeMultiplier/i.sizeMultiplier)}let Ge;i.style===j.DISPLAY?Ge=ae.sup1:i.style.cramped?Ge=ae.sup3:Ge=ae.sup2;const ot=i.sizeMultiplier,It=ce(.5/ae.ptPerEm/ot);let Zt=null;if(J){const rr=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");(T instanceof dt||rr)&&(Zt=ce(-T.italic))}let Ut;if(H&&J){fe=Math.max(fe,Ge,H.depth+.25*ae.xHeight),be=Math.max(be,ae.sub2);const rr=4*ae.defaultRuleThickness;if(fe-H.depth-(J.height-be)<rr){be=rr-(fe-H.depth)+J.height;const Xr=.8*ae.xHeight-(fe-H.depth);Xr>0&&(fe+=Xr,be-=Xr)}const Cr=[{type:"elem",elem:J,shift:be,marginRight:It,marginLeft:Zt},{type:"elem",elem:H,shift:-fe,marginRight:It}];Ut=ve.makeVList({positionType:"individualShift",children:Cr},i)}else if(J){be=Math.max(be,ae.sub1,J.height-.8*ae.xHeight);const rr=[{type:"elem",elem:J,marginLeft:Zt,marginRight:It}];Ut=ve.makeVList({positionType:"shift",positionData:be,children:rr},i)}else if(H)fe=Math.max(fe,Ge,H.depth+.25*ae.xHeight),Ut=ve.makeVList({positionType:"shift",positionData:-fe,children:[{type:"elem",elem:H,marginRight:It}]},i);else throw new Error("supsub must have either sup or sub.");const ir=vl(T,"right")||"mord";return ve.makeSpan([ir],[T,ve.makeSpan(["msupsub"],[Ut])],i)},mathmlBuilder(s,i){let c=!1,h,b;s.base&&s.base.type==="horizBrace"&&(b=!!s.sup,b===s.base.isOver&&(c=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const k=[yr(s.base,i)];s.sub&&k.push(yr(s.sub,i)),s.sup&&k.push(yr(s.sup,i));let T;if(c)T=h?"mover":"munder";else if(s.sub)if(s.sup){const H=s.base;H&&H.type==="op"&&H.limits&&i.style===j.DISPLAY||H&&H.type==="operatorname"&&H.alwaysHandleSupSub&&(i.style===j.DISPLAY||H.limits)?T="munderover":T="msubsup"}else{const H=s.base;H&&H.type==="op"&&H.limits&&(i.style===j.DISPLAY||H.alwaysHandleSupSub)||H&&H.type==="operatorname"&&H.alwaysHandleSupSub&&(H.limits||i.style===j.DISPLAY)?T="munder":T="msub"}else{const H=s.base;H&&H.type==="op"&&H.limits&&(i.style===j.DISPLAY||H.alwaysHandleSupSub)||H&&H.type==="operatorname"&&H.alwaysHandleSupSub&&(H.limits||i.style===j.DISPLAY)?T="mover":T="msup"}return new Ue.MathNode(T,k)}}),rn({type:"atom",htmlBuilder(s,i){return ve.mathsym(s.text,s.mode,i,["m"+s.family])},mathmlBuilder(s,i){const c=new Ue.MathNode("mo",[Cn(s.text,s.mode)]);if(s.family==="bin"){const h=xl(s,i);h==="bold-italic"&&c.setAttribute("mathvariant",h)}else s.family==="punct"?c.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&c.setAttribute("stretchy","false");return c}});const $d={mi:"italic",mn:"normal",mtext:"normal"};rn({type:"mathord",htmlBuilder(s,i){return ve.makeOrd(s,i,"mathord")},mathmlBuilder(s,i){const c=new Ue.MathNode("mi",[Cn(s.text,s.mode,i)]),h=xl(s,i)||"italic";return h!==$d[c.type]&&c.setAttribute("mathvariant",h),c}}),rn({type:"textord",htmlBuilder(s,i){return ve.makeOrd(s,i,"textord")},mathmlBuilder(s,i){const c=Cn(s.text,s.mode,i),h=xl(s,i)||"normal";let b;return s.mode==="text"?b=new Ue.MathNode("mtext",[c]):/[0-9]/.test(s.text)?b=new Ue.MathNode("mn",[c]):s.text==="\\prime"?b=new Ue.MathNode("mo",[c]):b=new Ue.MathNode("mi",[c]),h!==$d[b.type]&&b.setAttribute("mathvariant",h),b}});const jl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},_l={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};rn({type:"spacing",htmlBuilder(s,i){if(_l.hasOwnProperty(s.text)){const c=_l[s.text].className||"";if(s.mode==="text"){const h=ve.makeOrd(s,i,"textord");return h.classes.push(c),h}else return ve.makeSpan(["mspace",c],[ve.mathsym(s.text,s.mode,i)],i)}else{if(jl.hasOwnProperty(s.text))return ve.makeSpan(["mspace",jl[s.text]],[],i);throw new a('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,i){let c;if(_l.hasOwnProperty(s.text))c=new Ue.MathNode("mtext",[new Ue.TextNode("\xA0")]);else{if(jl.hasOwnProperty(s.text))return new Ue.MathNode("mspace");throw new a('Unknown type of space "'+s.text+'"')}return c}});const Td=()=>{const s=new Ue.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};rn({type:"tag",mathmlBuilder(s,i){const c=new Ue.MathNode("mtable",[new Ue.MathNode("mtr",[Td(),new Ue.MathNode("mtd",[go(s.body,i)]),Td(),new Ue.MathNode("mtd",[go(s.tag,i)])])]);return c.setAttribute("width","100%"),c}});const Od={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Rd={"\\textbf":"textbf","\\textmd":"textmd"},z2={"\\textit":"textit","\\textup":"textup"},Md=(s,i)=>{const c=s.font;if(c){if(Od[c])return i.withTextFontFamily(Od[c]);if(Rd[c])return i.withTextFontWeight(Rd[c]);if(c==="\\emph")return i.fontShape==="textit"?i.withTextFontShape("textup"):i.withTextFontShape("textit")}else return i;return i.withTextFontShape(z2[c])};rt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(s,i){let{parser:c,funcName:h}=s;const b=i[0];return{type:"text",mode:c.mode,body:wr(b),font:h}},htmlBuilder(s,i){const c=Md(s,i),h=Hr(s.body,c,!0);return ve.makeSpan(["mord","text"],h,c)},mathmlBuilder(s,i){const c=Md(s,i);return go(s.body,c)}}),rt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:c}=s;return{type:"underline",mode:c.mode,body:i[0]}},htmlBuilder(s,i){const c=tr(s.body,i),h=ve.makeLineSpan("underline-line",i),b=i.fontMetrics().defaultRuleThickness,k=ve.makeVList({positionType:"top",positionData:c.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:c}]},i);return ve.makeSpan(["mord","underline"],[k],i)},mathmlBuilder(s,i){const c=new Ue.MathNode("mo",[new Ue.TextNode("\u203E")]);c.setAttribute("stretchy","true");const h=new Ue.MathNode("munder",[yr(s.body,i),c]);return h.setAttribute("accentunder","true"),h}}),rt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,i){let{parser:c}=s;return{type:"vcenter",mode:c.mode,body:i[0]}},htmlBuilder(s,i){const c=tr(s.body,i),h=i.fontMetrics().axisHeight,b=.5*(c.height-h-(c.depth+h));return ve.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:c}]},i)},mathmlBuilder(s,i){return new Ue.MathNode("mpadded",[yr(s.body,i)],["vcenter"])}}),rt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,i,c){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,i){const c=Id(s),h=[],b=i.havingStyle(i.style.text());for(let k=0;k<c.length;k++){let T=c[k];T==="~"&&(T="\\textasciitilde"),h.push(ve.makeSymbol(T,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return ve.makeSpan(["mord","text"].concat(b.sizingClasses(i)),ve.tryCombineChars(h),b)},mathmlBuilder(s,i){const c=new Ue.TextNode(Id(s)),h=new Ue.MathNode("mtext",[c]);return h.setAttribute("mathvariant","monospace"),h}});const Id=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var bo=tn;const Pd=`[ \r
|
|
488
|
+
]`,j2="\\\\[a-zA-Z@]+",_2="\\\\[^\uD800-\uDFFF]",L2="("+j2+")"+Pd+"*",H2=`\\\\(
|
|
489
|
+
|[ \r ]+
|
|
490
|
+
?)[ \r ]*`,Ll="[\u0300-\u036F]",q2=new RegExp(Ll+"+$"),K2="("+Pd+"+)|"+(H2+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Ll+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Ll+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+L2)+("|"+_2+")");class zd{constructor(i,c){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=i,this.settings=c,this.tokenRegex=new RegExp(K2,"g"),this.catcodes={"%":14,"~":13}}setCatcode(i,c){this.catcodes[i]=c}lex(){const i=this.input,c=this.tokenRegex.lastIndex;if(c===i.length)return new vn("EOF",new dn(this,c,c));const h=this.tokenRegex.exec(i);if(h===null||h.index!==c)throw new a("Unexpected character: '"+i[c]+"'",new vn(i[c],new dn(this,c,c+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===14){const k=i.indexOf(`
|
|
491
|
+
`,this.tokenRegex.lastIndex);return k===-1?(this.tokenRegex.lastIndex=i.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=k+1,this.lex()}return new vn(b,new dn(this,c,this.tokenRegex.lastIndex))}}class W2{constructor(i,c){i===void 0&&(i={}),c===void 0&&(c={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=c,this.builtins=i,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const i=this.undefStack.pop();for(const c in i)i.hasOwnProperty(c)&&(i[c]==null?delete this.current[c]:this.current[c]=i[c])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(i){return this.current.hasOwnProperty(i)||this.builtins.hasOwnProperty(i)}get(i){return this.current.hasOwnProperty(i)?this.current[i]:this.builtins[i]}set(i,c,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][i];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][i]=c)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(i)&&(b[i]=this.current[i])}c==null?delete this.current[i]:this.current[i]=c}}var V2=hd;W("\\noexpand",function(s){const i=s.popToken();return s.isExpandable(i.text)&&(i.noexpand=!0,i.treatAsRelax=!0),{tokens:[i],numArgs:0}}),W("\\expandafter",function(s){const i=s.popToken();return s.expandOnce(!0),{tokens:[i],numArgs:0}}),W("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),W("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),W("\\@ifnextchar",function(s){const i=s.consumeArgs(3);s.consumeSpaces();const c=s.future();return i[0].length===1&&i[0][0].text===c.text?{tokens:i[1],numArgs:0}:{tokens:i[2],numArgs:0}}),W("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),W("\\TextOrMath",function(s){const i=s.consumeArgs(2);return s.mode==="text"?{tokens:i[0],numArgs:0}:{tokens:i[1],numArgs:0}});const jd={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};W("\\char",function(s){let i=s.popToken(),c,h="";if(i.text==="'")c=8,i=s.popToken();else if(i.text==='"')c=16,i=s.popToken();else if(i.text==="`")if(i=s.popToken(),i.text[0]==="\\")h=i.text.charCodeAt(1);else{if(i.text==="EOF")throw new a("\\char` missing argument");h=i.text.charCodeAt(0)}else c=10;if(c){if(h=jd[i.text],h==null||h>=c)throw new a("Invalid base-"+c+" digit "+i.text);let b;for(;(b=jd[s.future().text])!=null&&b<c;)h*=c,h+=b,s.popToken()}return"\\@char{"+h+"}"});const Hl=(s,i,c,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new a("\\newcommand's first argument must be a macro name");const k=b[0].text,T=s.isDefined(k);if(T&&!i)throw new a("\\newcommand{"+k+"} attempting to redefine "+(k+"; use \\renewcommand"));if(!T&&!c)throw new a("\\renewcommand{"+k+"} when command "+k+" does not yet exist; use \\newcommand");let H=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let J="",ae=s.expandNextToken();for(;ae.text!=="]"&&ae.text!=="EOF";)J+=ae.text,ae=s.expandNextToken();if(!J.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+J);H=parseInt(J),b=s.consumeArg().tokens}return T&&h||s.macros.set(k,{tokens:b,numArgs:H}),""};W("\\newcommand",s=>Hl(s,!1,!0,!1)),W("\\renewcommand",s=>Hl(s,!0,!1,!1)),W("\\providecommand",s=>Hl(s,!0,!0,!0)),W("\\message",s=>{const i=s.consumeArgs(1)[0];return console.log(i.reverse().map(c=>c.text).join("")),""}),W("\\errmessage",s=>{const i=s.consumeArgs(1)[0];return console.error(i.reverse().map(c=>c.text).join("")),""}),W("\\show",s=>{const i=s.popToken(),c=i.text;return console.log(i,s.macros.get(c),bo[c],Ht.math[c],Ht.text[c]),""}),W("\\bgroup","{"),W("\\egroup","}"),W("~","\\nobreakspace"),W("\\lq","`"),W("\\rq","'"),W("\\aa","\\r a"),W("\\AA","\\r A"),W("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),W("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),W("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),W("\u212C","\\mathscr{B}"),W("\u2130","\\mathscr{E}"),W("\u2131","\\mathscr{F}"),W("\u210B","\\mathscr{H}"),W("\u2110","\\mathscr{I}"),W("\u2112","\\mathscr{L}"),W("\u2133","\\mathscr{M}"),W("\u211B","\\mathscr{R}"),W("\u212D","\\mathfrak{C}"),W("\u210C","\\mathfrak{H}"),W("\u2128","\\mathfrak{Z}"),W("\\Bbbk","\\Bbb{k}"),W("\xB7","\\cdotp"),W("\\llap","\\mathllap{\\textrm{#1}}"),W("\\rlap","\\mathrlap{\\textrm{#1}}"),W("\\clap","\\mathclap{\\textrm{#1}}"),W("\\mathstrut","\\vphantom{(}"),W("\\underbar","\\underline{\\text{#1}}"),W("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),W("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),W("\\ne","\\neq"),W("\u2260","\\neq"),W("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),W("\u2209","\\notin"),W("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),W("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),W("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),W("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),W("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),W("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),W("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),W("\u27C2","\\perp"),W("\u203C","\\mathclose{!\\mkern-0.8mu!}"),W("\u220C","\\notni"),W("\u231C","\\ulcorner"),W("\u231D","\\urcorner"),W("\u231E","\\llcorner"),W("\u231F","\\lrcorner"),W("\xA9","\\copyright"),W("\xAE","\\textregistered"),W("\uFE0F","\\textregistered"),W("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),W("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),W("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),W("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),W("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),W("\u22EE","\\vdots"),W("\\varGamma","\\mathit{\\Gamma}"),W("\\varDelta","\\mathit{\\Delta}"),W("\\varTheta","\\mathit{\\Theta}"),W("\\varLambda","\\mathit{\\Lambda}"),W("\\varXi","\\mathit{\\Xi}"),W("\\varPi","\\mathit{\\Pi}"),W("\\varSigma","\\mathit{\\Sigma}"),W("\\varUpsilon","\\mathit{\\Upsilon}"),W("\\varPhi","\\mathit{\\Phi}"),W("\\varPsi","\\mathit{\\Psi}"),W("\\varOmega","\\mathit{\\Omega}"),W("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),W("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),W("\\boxed","\\fbox{$\\displaystyle{#1}$}"),W("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),W("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),W("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),W("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),W("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const _d={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};W("\\dots",function(s){let i="\\dotso";const c=s.expandAfterFuture().text;return c in _d?i=_d[c]:(c.slice(0,4)==="\\not"||c in Ht.math&&["bin","rel"].includes(Ht.math[c].group))&&(i="\\dotsb"),i});const ql={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};W("\\dotso",function(s){return s.future().text in ql?"\\ldots\\,":"\\ldots"}),W("\\dotsc",function(s){const i=s.future().text;return i in ql&&i!==","?"\\ldots\\,":"\\ldots"}),W("\\cdots",function(s){return s.future().text in ql?"\\@cdots\\,":"\\@cdots"}),W("\\dotsb","\\cdots"),W("\\dotsm","\\cdots"),W("\\dotsi","\\!\\cdots"),W("\\dotsx","\\ldots\\,"),W("\\DOTSI","\\relax"),W("\\DOTSB","\\relax"),W("\\DOTSX","\\relax"),W("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),W("\\,","\\tmspace+{3mu}{.1667em}"),W("\\thinspace","\\,"),W("\\>","\\mskip{4mu}"),W("\\:","\\tmspace+{4mu}{.2222em}"),W("\\medspace","\\:"),W("\\;","\\tmspace+{5mu}{.2777em}"),W("\\thickspace","\\;"),W("\\!","\\tmspace-{3mu}{.1667em}"),W("\\negthinspace","\\!"),W("\\negmedspace","\\tmspace-{4mu}{.2222em}"),W("\\negthickspace","\\tmspace-{5mu}{.277em}"),W("\\enspace","\\kern.5em "),W("\\enskip","\\hskip.5em\\relax"),W("\\quad","\\hskip1em\\relax"),W("\\qquad","\\hskip2em\\relax"),W("\\tag","\\@ifstar\\tag@literal\\tag@paren"),W("\\tag@paren","\\tag@literal{({#1})}"),W("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),W("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),W("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),W("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),W("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),W("\\newline","\\\\\\relax"),W("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Ld=ce(Ae["Main-Regular"][84][1]-.7*Ae["Main-Regular"][65][1]);W("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ld+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),W("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ld+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),W("\\hspace","\\@ifstar\\@hspacer\\@hspace"),W("\\@hspace","\\hskip #1\\relax"),W("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),W("\\ordinarycolon",":"),W("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),W("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),W("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),W("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),W("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),W("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),W("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),W("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),W("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),W("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),W("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),W("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),W("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),W("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),W("\u2237","\\dblcolon"),W("\u2239","\\eqcolon"),W("\u2254","\\coloneqq"),W("\u2255","\\eqqcolon"),W("\u2A74","\\Coloneqq"),W("\\ratio","\\vcentcolon"),W("\\coloncolon","\\dblcolon"),W("\\colonequals","\\coloneqq"),W("\\coloncolonequals","\\Coloneqq"),W("\\equalscolon","\\eqqcolon"),W("\\equalscoloncolon","\\Eqqcolon"),W("\\colonminus","\\coloneq"),W("\\coloncolonminus","\\Coloneq"),W("\\minuscolon","\\eqcolon"),W("\\minuscoloncolon","\\Eqcolon"),W("\\coloncolonapprox","\\Colonapprox"),W("\\coloncolonsim","\\Colonsim"),W("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),W("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),W("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),W("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),W("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),W("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),W("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),W("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),W("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),W("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),W("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),W("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),W("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),W("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),W("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),W("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),W("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),W("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),W("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),W("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),W("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),W("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),W("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),W("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),W("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),W("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),W("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),W("\\imath","\\html@mathml{\\@imath}{\u0131}"),W("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),W("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),W("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),W("\u27E6","\\llbracket"),W("\u27E7","\\rrbracket"),W("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),W("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),W("\u2983","\\lBrace"),W("\u2984","\\rBrace"),W("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),W("\u29B5","\\minuso"),W("\\darr","\\downarrow"),W("\\dArr","\\Downarrow"),W("\\Darr","\\Downarrow"),W("\\lang","\\langle"),W("\\rang","\\rangle"),W("\\uarr","\\uparrow"),W("\\uArr","\\Uparrow"),W("\\Uarr","\\Uparrow"),W("\\N","\\mathbb{N}"),W("\\R","\\mathbb{R}"),W("\\Z","\\mathbb{Z}"),W("\\alef","\\aleph"),W("\\alefsym","\\aleph"),W("\\Alpha","\\mathrm{A}"),W("\\Beta","\\mathrm{B}"),W("\\bull","\\bullet"),W("\\Chi","\\mathrm{X}"),W("\\clubs","\\clubsuit"),W("\\cnums","\\mathbb{C}"),W("\\Complex","\\mathbb{C}"),W("\\Dagger","\\ddagger"),W("\\diamonds","\\diamondsuit"),W("\\empty","\\emptyset"),W("\\Epsilon","\\mathrm{E}"),W("\\Eta","\\mathrm{H}"),W("\\exist","\\exists"),W("\\harr","\\leftrightarrow"),W("\\hArr","\\Leftrightarrow"),W("\\Harr","\\Leftrightarrow"),W("\\hearts","\\heartsuit"),W("\\image","\\Im"),W("\\infin","\\infty"),W("\\Iota","\\mathrm{I}"),W("\\isin","\\in"),W("\\Kappa","\\mathrm{K}"),W("\\larr","\\leftarrow"),W("\\lArr","\\Leftarrow"),W("\\Larr","\\Leftarrow"),W("\\lrarr","\\leftrightarrow"),W("\\lrArr","\\Leftrightarrow"),W("\\Lrarr","\\Leftrightarrow"),W("\\Mu","\\mathrm{M}"),W("\\natnums","\\mathbb{N}"),W("\\Nu","\\mathrm{N}"),W("\\Omicron","\\mathrm{O}"),W("\\plusmn","\\pm"),W("\\rarr","\\rightarrow"),W("\\rArr","\\Rightarrow"),W("\\Rarr","\\Rightarrow"),W("\\real","\\Re"),W("\\reals","\\mathbb{R}"),W("\\Reals","\\mathbb{R}"),W("\\Rho","\\mathrm{P}"),W("\\sdot","\\cdot"),W("\\sect","\\S"),W("\\spades","\\spadesuit"),W("\\sub","\\subset"),W("\\sube","\\subseteq"),W("\\supe","\\supseteq"),W("\\Tau","\\mathrm{T}"),W("\\thetasym","\\vartheta"),W("\\weierp","\\wp"),W("\\Zeta","\\mathrm{Z}"),W("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),W("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),W("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),W("\\bra","\\mathinner{\\langle{#1}|}"),W("\\ket","\\mathinner{|{#1}\\rangle}"),W("\\braket","\\mathinner{\\langle{#1}\\rangle}"),W("\\Bra","\\left\\langle#1\\right|"),W("\\Ket","\\left|#1\\right\\rangle");const Hd=s=>i=>{const c=i.consumeArg().tokens,h=i.consumeArg().tokens,b=i.consumeArg().tokens,k=i.consumeArg().tokens,T=i.macros.get("|"),H=i.macros.get("\\|");i.macros.beginGroup();const J=be=>Se=>{s&&(Se.macros.set("|",T),b.length&&Se.macros.set("\\|",H));let Ge=be;return!be&&b.length&&Se.future().text==="|"&&(Se.popToken(),Ge=!0),{tokens:Ge?b:h,numArgs:0}};i.macros.set("|",J(!1)),b.length&&i.macros.set("\\|",J(!0));const ae=i.consumeArg().tokens,fe=i.expandTokens([...k,...ae,...c]);return i.macros.endGroup(),{tokens:fe.reverse(),numArgs:0}};W("\\bra@ket",Hd(!1)),W("\\bra@set",Hd(!0)),W("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),W("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),W("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),W("\\angln","{\\angl n}"),W("\\blue","\\textcolor{##6495ed}{#1}"),W("\\orange","\\textcolor{##ffa500}{#1}"),W("\\pink","\\textcolor{##ff00af}{#1}"),W("\\red","\\textcolor{##df0030}{#1}"),W("\\green","\\textcolor{##28ae7b}{#1}"),W("\\gray","\\textcolor{gray}{#1}"),W("\\purple","\\textcolor{##9d38bd}{#1}"),W("\\blueA","\\textcolor{##ccfaff}{#1}"),W("\\blueB","\\textcolor{##80f6ff}{#1}"),W("\\blueC","\\textcolor{##63d9ea}{#1}"),W("\\blueD","\\textcolor{##11accd}{#1}"),W("\\blueE","\\textcolor{##0c7f99}{#1}"),W("\\tealA","\\textcolor{##94fff5}{#1}"),W("\\tealB","\\textcolor{##26edd5}{#1}"),W("\\tealC","\\textcolor{##01d1c1}{#1}"),W("\\tealD","\\textcolor{##01a995}{#1}"),W("\\tealE","\\textcolor{##208170}{#1}"),W("\\greenA","\\textcolor{##b6ffb0}{#1}"),W("\\greenB","\\textcolor{##8af281}{#1}"),W("\\greenC","\\textcolor{##74cf70}{#1}"),W("\\greenD","\\textcolor{##1fab54}{#1}"),W("\\greenE","\\textcolor{##0d923f}{#1}"),W("\\goldA","\\textcolor{##ffd0a9}{#1}"),W("\\goldB","\\textcolor{##ffbb71}{#1}"),W("\\goldC","\\textcolor{##ff9c39}{#1}"),W("\\goldD","\\textcolor{##e07d10}{#1}"),W("\\goldE","\\textcolor{##a75a05}{#1}"),W("\\redA","\\textcolor{##fca9a9}{#1}"),W("\\redB","\\textcolor{##ff8482}{#1}"),W("\\redC","\\textcolor{##f9685d}{#1}"),W("\\redD","\\textcolor{##e84d39}{#1}"),W("\\redE","\\textcolor{##bc2612}{#1}"),W("\\maroonA","\\textcolor{##ffbde0}{#1}"),W("\\maroonB","\\textcolor{##ff92c6}{#1}"),W("\\maroonC","\\textcolor{##ed5fa6}{#1}"),W("\\maroonD","\\textcolor{##ca337c}{#1}"),W("\\maroonE","\\textcolor{##9e034e}{#1}"),W("\\purpleA","\\textcolor{##ddd7ff}{#1}"),W("\\purpleB","\\textcolor{##c6b9fc}{#1}"),W("\\purpleC","\\textcolor{##aa87ff}{#1}"),W("\\purpleD","\\textcolor{##7854ab}{#1}"),W("\\purpleE","\\textcolor{##543b78}{#1}"),W("\\mintA","\\textcolor{##f5f9e8}{#1}"),W("\\mintB","\\textcolor{##edf2df}{#1}"),W("\\mintC","\\textcolor{##e0e5cc}{#1}"),W("\\grayA","\\textcolor{##f6f7f7}{#1}"),W("\\grayB","\\textcolor{##f0f1f2}{#1}"),W("\\grayC","\\textcolor{##e3e5e6}{#1}"),W("\\grayD","\\textcolor{##d6d8da}{#1}"),W("\\grayE","\\textcolor{##babec2}{#1}"),W("\\grayF","\\textcolor{##888d93}{#1}"),W("\\grayG","\\textcolor{##626569}{#1}"),W("\\grayH","\\textcolor{##3b3e40}{#1}"),W("\\grayI","\\textcolor{##21242c}{#1}"),W("\\kaBlue","\\textcolor{##314453}{#1}"),W("\\kaGreen","\\textcolor{##71B307}{#1}");const qd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class U2{constructor(i,c,h){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=c,this.expansionCount=0,this.feed(i),this.macros=new W2(V2,c.macros),this.mode=h,this.stack=[]}feed(i){this.lexer=new zd(i,this.settings)}switchMode(i){this.mode=i}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(i){this.stack.push(i)}pushTokens(i){this.stack.push(...i)}scanArgument(i){let c,h,b;if(i){if(this.consumeSpaces(),this.future().text!=="[")return null;c=this.popToken(),{tokens:b,end:h}=this.consumeArg(["]"])}else({tokens:b,start:c,end:h}=this.consumeArg());return this.pushToken(new vn("EOF",h.loc)),this.pushTokens(b),new vn("",dn.range(c,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(i){const c=[],h=i&&i.length>0;h||this.consumeSpaces();const b=this.future();let k,T=0,H=0;do{if(k=this.popToken(),c.push(k),k.text==="{")++T;else if(k.text==="}"){if(--T,T===-1)throw new a("Extra }",k)}else if(k.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(i&&h?i[H]:"}")+"'",k);if(i&&h)if((T===0||T===1&&i[H]==="{")&&k.text===i[H]){if(++H,H===i.length){c.splice(-H,H);break}}else H=0}while(T!==0||h);return b.text==="{"&&c[c.length-1].text==="}"&&(c.pop(),c.shift()),c.reverse(),{tokens:c,start:b,end:k}}consumeArgs(i,c){if(c){if(c.length!==i+1)throw new a("The length of delimiters doesn't match the number of args!");const b=c[0];for(let k=0;k<b.length;k++){const T=this.popToken();if(b[k]!==T.text)throw new a("Use of the macro doesn't match its definition",T)}}const h=[];for(let b=0;b<i;b++)h.push(this.consumeArg(c&&c[b+1]).tokens);return h}countExpansion(i){if(this.expansionCount+=i,this.expansionCount>this.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(i){const c=this.popToken(),h=c.text,b=c.noexpand?null:this._getExpansion(h);if(b==null||i&&b.unexpandable){if(i&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new a("Undefined control sequence: "+h);return this.pushToken(c),!1}this.countExpansion(1);let k=b.tokens;const T=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){k=k.slice();for(let H=k.length-1;H>=0;--H){let J=k[H];if(J.text==="#"){if(H===0)throw new a("Incomplete placeholder at end of macro body",J);if(J=k[--H],J.text==="#")k.splice(H+1,1);else if(/^[1-9]$/.test(J.text))k.splice(H,2,...T[+J.text-1]);else throw new a("Not a valid argument number",J)}}}return this.pushTokens(k),k.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const i=this.stack.pop();return i.treatAsRelax&&(i.text="\\relax"),i}throw new Error}expandMacro(i){return this.macros.has(i)?this.expandTokens([new vn(i)]):void 0}expandTokens(i){const c=[],h=this.stack.length;for(this.pushTokens(i);this.stack.length>h;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),c.push(b)}return this.countExpansion(c.length),c}expandMacroAsText(i){const c=this.expandMacro(i);return c&&c.map(h=>h.text).join("")}_getExpansion(i){const c=this.macros.get(i);if(c==null)return c;if(i.length===1){const b=this.lexer.catcodes[i];if(b!=null&&b!==13)return}const h=typeof c=="function"?c(this):c;if(typeof h=="string"){let b=0;if(h.indexOf("#")!==-1){const J=h.replace(/##/g,"");for(;J.indexOf("#"+(b+1))!==-1;)++b}const k=new zd(h,this.settings),T=[];let H=k.lex();for(;H.text!=="EOF";)T.push(H),H=k.lex();return T.reverse(),{tokens:T,numArgs:b}}return h}isDefined(i){return this.macros.has(i)||bo.hasOwnProperty(i)||Ht.math.hasOwnProperty(i)||Ht.text.hasOwnProperty(i)||qd.hasOwnProperty(i)}isExpandable(i){const c=this.macros.get(i);return c!=null?typeof c=="string"||typeof c=="function"||!c.unexpandable:bo.hasOwnProperty(i)&&!bo[i].primitive}}const Kd=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Oi=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),Kl={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},Wd={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"};class Ri{constructor(i,c){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new U2(i,c,this.mode),this.settings=c,this.leftrightDepth=0}expect(i,c){if(c===void 0&&(c=!0),this.fetch().text!==i)throw new a("Expected '"+i+"', got '"+this.fetch().text+"'",this.fetch());c&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(i){this.mode=i,this.gullet.switchMode(i)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const i=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),i}finally{this.gullet.endGroups()}}subparse(i){const c=this.nextToken;this.consume(),this.gullet.pushToken(new vn("}")),this.gullet.pushTokens(i);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=c,h}parseExpression(i,c){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(Ri.endOfExpression.indexOf(b.text)!==-1||c&&b.text===c||i&&bo[b.text]&&bo[b.text].infix)break;const k=this.parseAtom(c);if(k){if(k.type==="internal")continue}else break;h.push(k)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(i){let c=-1,h;for(let b=0;b<i.length;b++)if(i[b].type==="infix"){if(c!==-1)throw new a("only one infix operator per group",i[b].token);c=b,h=i[b].replaceWith}if(c!==-1&&h){let b,k;const T=i.slice(0,c),H=i.slice(c+1);T.length===1&&T[0].type==="ordgroup"?b=T[0]:b={type:"ordgroup",mode:this.mode,body:T},H.length===1&&H[0].type==="ordgroup"?k=H[0]:k={type:"ordgroup",mode:this.mode,body:H};let J;return h==="\\\\abovefrac"?J=this.callFunction(h,[b,i[c],k],[]):J=this.callFunction(h,[b,k],[]),[J]}else return i}handleSupSubscript(i){const c=this.fetch(),h=c.text;this.consume(),this.consumeSpaces();let b;do{var k;b=this.parseGroup(i)}while(((k=b)==null?void 0:k.type)==="internal");if(!b)throw new a("Expected group after '"+h+"'",c);return b}formatUnsupportedCmd(i){const c=[];for(let b=0;b<i.length;b++)c.push({type:"textord",mode:"text",text:i[b]});const h={type:"text",mode:this.mode,body:c};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(i){const c=this.parseGroup("atom",i);if((c==null?void 0:c.type)==="internal"||this.mode==="text")return c;let h,b;for(;;){this.consumeSpaces();const k=this.fetch();if(k.text==="\\limits"||k.text==="\\nolimits"){if(c&&c.type==="op"){const T=k.text==="\\limits";c.limits=T,c.alwaysHandleSupSub=!0}else if(c&&c.type==="operatorname")c.alwaysHandleSupSub&&(c.limits=k.text==="\\limits");else throw new a("Limit controls must follow a math operator",k);this.consume()}else if(k.text==="^"){if(h)throw new a("Double superscript",k);h=this.handleSupSubscript("superscript")}else if(k.text==="_"){if(b)throw new a("Double subscript",k);b=this.handleSupSubscript("subscript")}else if(k.text==="'"){if(h)throw new a("Double superscript",k);const T={type:"textord",mode:this.mode,text:"\\prime"},H=[T];for(this.consume();this.fetch().text==="'";)H.push(T),this.consume();this.fetch().text==="^"&&H.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:H}}else if(Oi[k.text]){const T=Kd.test(k.text),H=[];for(H.push(new vn(Oi[k.text])),this.consume();;){const ae=this.fetch().text;if(!Oi[ae]||Kd.test(ae)!==T)break;H.unshift(new vn(Oi[ae])),this.consume()}const J=this.subparse(H);T?b={type:"ordgroup",mode:"math",body:J}:h={type:"ordgroup",mode:"math",body:J}}else break}return h||b?{type:"supsub",mode:this.mode,base:c,sup:h,sub:b}:c}parseFunction(i,c){const h=this.fetch(),b=h.text,k=bo[b];if(!k)return null;if(this.consume(),c&&c!=="atom"&&!k.allowedInArgument)throw new a("Got function '"+b+"' with no arguments"+(c?" as "+c:""),h);if(this.mode==="text"&&!k.allowedInText)throw new a("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&k.allowedInMath===!1)throw new a("Can't use function '"+b+"' in math mode",h);const{args:T,optArgs:H}=this.parseArguments(b,k);return this.callFunction(b,T,H,h,i)}callFunction(i,c,h,b,k){const T={funcName:i,parser:this,token:b,breakOnTokenText:k},H=bo[i];if(H&&H.handler)return H.handler(T,c,h);throw new a("No function handler for "+i)}parseArguments(i,c){const h=c.numArgs+c.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],k=[];for(let T=0;T<h;T++){let H=c.argTypes&&c.argTypes[T];const J=T<c.numOptionalArgs;(c.primitive&&H==null||c.type==="sqrt"&&T===1&&k[0]==null)&&(H="primitive");const ae=this.parseGroupOfType("argument to '"+i+"'",H,J);if(J)k.push(ae);else if(ae!=null)b.push(ae);else throw new a("Null argument, please report this as a bug")}return{args:b,optArgs:k}}parseGroupOfType(i,c,h){switch(c){case"color":return this.parseColorGroup(h);case"size":return this.parseSizeGroup(h);case"url":return this.parseUrlGroup(h);case"math":case"text":return this.parseArgumentGroup(h,c);case"hbox":{const b=this.parseArgumentGroup(h,"text");return b!=null?{type:"styling",mode:b.mode,body:[b],style:"text"}:null}case"raw":{const b=this.parseStringGroup("raw",h);return b!=null?{type:"raw",mode:"text",string:b.text}:null}case"primitive":{if(h)throw new a("A primitive argument cannot be optional");const b=this.parseGroup(i);if(b==null)throw new a("Expected group as "+i,this.fetch());return b}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new a("Unknown group type as "+i,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(i,c){const h=this.gullet.scanArgument(c);if(h==null)return null;let b="",k;for(;(k=this.fetch()).text!=="EOF";)b+=k.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(i,c){const h=this.fetch();let b=h,k="",T;for(;(T=this.fetch()).text!=="EOF"&&i.test(k+T.text);)b=T,k+=b.text,this.consume();if(k==="")throw new a("Invalid "+c+": '"+h.text+"'",h);return h.range(b,k)}parseColorGroup(i){const c=this.parseStringGroup("color",i);if(c==null)return null;const h=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(c.text);if(!h)throw new a("Invalid color: '"+c.text+"'",c);let b=h[0];return/^[0-9a-f]{6}$/i.test(b)&&(b="#"+b),{type:"color-token",mode:this.mode,color:b}}parseSizeGroup(i){let c,h=!1;if(this.gullet.consumeSpaces(),!i&&this.gullet.future().text!=="{"?c=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):c=this.parseStringGroup("size",i),!c)return null;!i&&c.text.length===0&&(c.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(c.text);if(!b)throw new a("Invalid size: '"+c.text+"'",c);const k={number:+(b[1]+b[2]),unit:b[3]};if(!kt(k))throw new a("Invalid unit: '"+k.unit+"'",c);return{type:"size",mode:this.mode,value:k,isBlank:h}}parseUrlGroup(i){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const c=this.parseStringGroup("url",i);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),c==null)return null;const h=c.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(i,c){const h=this.gullet.scanArgument(i);if(h==null)return null;const b=this.mode;c&&this.switchMode(c),this.gullet.beginGroup();const k=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const T={type:"ordgroup",mode:this.mode,loc:h.loc,body:k};return c&&this.switchMode(b),T}parseGroup(i,c){const h=this.fetch(),b=h.text;let k;if(b==="{"||b==="\\begingroup"){this.consume();const T=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const H=this.parseExpression(!1,T),J=this.fetch();this.expect(T),this.gullet.endGroup(),k={type:"ordgroup",mode:this.mode,loc:dn.range(h,J),body:H,semisimple:b==="\\begingroup"||void 0}}else if(k=this.parseFunction(c,i)||this.parseSymbol(),k==null&&b[0]==="\\"&&!qd.hasOwnProperty(b)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+b,h);k=this.formatUnsupportedCmd(b),this.consume()}return k}formLigatures(i){let c=i.length-1;for(let h=0;h<c;++h){const b=i[h],k=b.text;k==="-"&&i[h+1].text==="-"&&(h+1<c&&i[h+2].text==="-"?(i.splice(h,3,{type:"textord",mode:"text",loc:dn.range(b,i[h+2]),text:"---"}),c-=2):(i.splice(h,2,{type:"textord",mode:"text",loc:dn.range(b,i[h+1]),text:"--"}),c-=1)),(k==="'"||k==="`")&&i[h+1].text===k&&(i.splice(h,2,{type:"textord",mode:"text",loc:dn.range(b,i[h+1]),text:k+k}),c-=1)}}parseSymbol(){const i=this.fetch();let c=i.text;if(/^\\verb[^a-zA-Z]/.test(c)){this.consume();let k=c.slice(5);const T=k.charAt(0)==="*";if(T&&(k=k.slice(1)),k.length<2||k.charAt(0)!==k.slice(-1))throw new a(`\\verb assertion failed --
|
|
492
|
+
please report what input caused this bug`);return k=k.slice(1,-1),{type:"verb",mode:"text",body:k,star:T}}Wd.hasOwnProperty(c[0])&&!Ht[this.mode][c[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+c[0]+'" used in math mode',i),c=Wd[c[0]]+c.slice(1));const h=q2.exec(c);h&&(c=c.substring(0,h.index),c==="i"?c="\u0131":c==="j"&&(c="\u0237"));let b;if(Ht[this.mode][c]){this.settings.strict&&this.mode==="math"&&Ve.indexOf(c)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+c[0]+'" used in math mode',i);const k=Ht[this.mode][c].group,T=dn.range(i);let H;if(Pr.hasOwnProperty(k)){const J=k;H={type:"atom",mode:this.mode,family:J,loc:T,text:c}}else H={type:k,mode:this.mode,loc:T,text:c};b=H}else if(c.charCodeAt(0)>=128)this.settings.strict&&(me(c.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+c[0]+'" used in math mode',i):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+c[0]+'"'+(" ("+c.charCodeAt(0)+")"),i)),b={type:"textord",mode:"text",loc:dn.range(i),text:c};else return null;if(this.consume(),h)for(let k=0;k<h[0].length;k++){const T=h[0][k];if(!Kl[T])throw new a("Unknown accent ' "+T+"'",i);const H=Kl[T][this.mode]||Kl[T].text;if(!H)throw new a("Accent "+T+" unsupported in "+this.mode+" mode",i);b={type:"accent",mode:this.mode,loc:dn.range(i),label:H,isStretchy:!1,isShifty:!0,base:b}}return b}}Ri.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Wl=function(s,i){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const c=new Ri(s,i);delete c.gullet.macros.current["\\df@tag"];let h=c.parse();if(delete c.gullet.macros.current["\\current@color"],delete c.gullet.macros.current["\\color"],c.gullet.macros.get("\\df@tag")){if(!i.displayMode)throw new a("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:c.subparse([new vn("\\df@tag")])}]}return h};let Vd=function(s,i,c){i.textContent="";const h=Vl(s,c).toNode();i.appendChild(h)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Vd=function(){throw new a("KaTeX doesn't work in quirks mode.")});const G2=function(s,i){return Vl(s,i).toMarkup()},X2=function(s,i){const c=new F(i);return Wl(s,c)},Ud=function(s,i,c){if(c.throwOnError||!(s instanceof a))throw s;const h=ve.makeSpan(["katex-error"],[new dt(i)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+c.errorColor),h},Vl=function(s,i){const c=new F(i);try{const h=Wl(s,c);return c2(h,s,c)}catch(h){return Ud(h,s,c)}};var Y2={version:"0.16.25",render:Vd,renderToString:G2,ParseError:a,SETTINGS_SCHEMA:m,__parse:X2,__renderToDomTree:Vl,__renderToHTMLTree:function(s,i){const c=new F(i);try{const h=Wl(s,c);return d2(h,s,c)}catch(h){return Ud(h,s,c)}},__setFontMetrics:pt,__defineSymbol:w,__defineFunction:rt,__defineMacro:W,__domTree:{Span:Dt,Anchor:zt,SymbolNode:dt,SvgNode:Xt,PathNode:Yt,LineNode:Gr}},J2=Y2;return n=n.default,n})()})})($0)),$0.exports}var HC=ps.exports,Z1;function qC(){return Z1||(Z1=1,(function(e,t){(function(r,n){n(t,_e,jC(),LC())})(HC,function(r,n,o,a){Object.defineProperty(r,"__esModule",{value:!0});function u(m,A){for(var F in A)Object.defineProperty(m,F,{enumerable:!0,get:A[F]})}u(r,{BlockMath:()=>x,InlineMath:()=>C}),n=d(n),o=l(o),a=l(a);function l(m){return m&&m.__esModule?m:{default:m}}function f(m){if(typeof WeakMap!="function")return null;var A=new WeakMap,F=new WeakMap;return(f=function(B){return B?F:A})(m)}function d(m,A){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var F=f(A);if(F&&F.has(m))return F.get(m);var B={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in m)if(S!=="default"&&Object.prototype.hasOwnProperty.call(m,S)){var z=R?Object.getOwnPropertyDescriptor(m,S):null;z&&(z.get||z.set)?Object.defineProperty(B,S,z):B[S]=m[S]}return B.default=m,F&&F.set(m,B),B}const p=(m,{displayMode:A})=>{const F=({children:B,errorColor:R,math:S,renderError:z})=>{const $=S??B,{html:P,error:N}=(0,n.useMemo)(()=>{try{return{html:a.default.renderToString($,{displayMode:A,errorColor:R,throwOnError:!!z}),error:void 0}}catch(K){if(K instanceof a.default.ParseError||K instanceof TypeError)return{error:K};throw K}},[$,R,z]);return N?z?z(N):n.default.createElement(m,{html:`${N.message}`}):n.default.createElement(m,{html:P})};return F.propTypes={children:o.default.string,errorColor:o.default.string,math:o.default.string,renderError:o.default.func},F},v={html:o.default.string.isRequired},g=({html:m})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});g.propTypes=v;const y=({html:m})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});y.propTypes=v;const x=p(g,{displayMode:!0}),C=p(y,{displayMode:!1})})})(ps,ps.exports)),ps.exports}var r2=qC();const KC=Et.span.attrs({className:"latex-inline-wrapper"})`
|
|
493
|
+
display: inline-flex;
|
|
494
|
+
align-items: baseline;
|
|
495
|
+
column-gap: 4px;
|
|
496
|
+
line-height: 1.2;
|
|
497
|
+
color: ${({$color:e})=>e||"inherit"};
|
|
498
|
+
`,WC=Et.span.attrs({className:"latex-inline-error"})`
|
|
499
|
+
display: inline-flex;
|
|
500
|
+
align-items: center;
|
|
501
|
+
column-gap: 6px;
|
|
502
|
+
padding: 2px 4px;
|
|
503
|
+
border-radius: 4px;
|
|
504
|
+
background: rgba(215, 58, 73, 0.08);
|
|
505
|
+
color: #d73a49;
|
|
506
|
+
font-size: 0.85em;
|
|
507
|
+
`,VC=Et.span.attrs({className:"latex-inline-error-message"})`
|
|
508
|
+
font-size: 0.75em;
|
|
509
|
+
color: #d73a49;
|
|
510
|
+
`,UC=({attributes:e,formula:t,styles:r})=>{var a;const n=yt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?G.jsx(KC,{...e,$color:o,children:G.jsx(r2.InlineMath,{math:n,errorColor:"#d73a49",renderError:u=>G.jsxs(WC,{children:[G.jsx("span",{children:n}),G.jsx(VC,{children:u==null?void 0:u.message})]})})}):null},GC=Et.div.attrs({className:"latex-block-wrapper"})`
|
|
511
|
+
width: 100%;
|
|
512
|
+
display: flex;
|
|
513
|
+
justify-content: center;
|
|
514
|
+
align-items: center;
|
|
515
|
+
margin: 1.25rem 0;
|
|
516
|
+
padding: 0.75rem;
|
|
517
|
+
border-radius: 8px;
|
|
518
|
+
background: rgba(2, 132, 199, 0.05);
|
|
519
|
+
color: ${({$textColor:e})=>e||"inherit"};
|
|
520
|
+
`,XC=Et.div.attrs({className:"latex-block-error"})`
|
|
521
|
+
display: flex;
|
|
522
|
+
flex-direction: column;
|
|
523
|
+
width: 100%;
|
|
524
|
+
gap: 6px;
|
|
525
|
+
padding: 0.75rem;
|
|
526
|
+
background: rgba(215, 58, 73, 0.08);
|
|
527
|
+
border: 1px dashed #d73a49;
|
|
528
|
+
border-radius: 8px;
|
|
529
|
+
font-size: 0.9rem;
|
|
530
|
+
color: #d73a49;
|
|
531
|
+
`,YC=Et.span.attrs({className:"latex-block-error-title"})`
|
|
532
|
+
font-weight: 600;
|
|
533
|
+
`,JC=Et.code.attrs({className:"latex-block-error-formula"})`
|
|
534
|
+
font-size: 0.85rem;
|
|
535
|
+
color: #d73a49;
|
|
536
|
+
overflow-x: auto;
|
|
537
|
+
`,ZC=({attributes:e,formula:t,styles:r})=>{var a;const n=yt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?G.jsx(GC,{...e,$textColor:o,children:G.jsx(r2.BlockMath,{math:n,errorColor:"#d73a49",renderError:u=>G.jsxs(XC,{children:[G.jsx(YC,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),G.jsx(JC,{children:n}),G.jsx("span",{children:u==null?void 0:u.message})]})})}):null},QC=e=>{var a,u,l,f,d,p,v,g;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return G.jsx("p",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:(a=t==null?void 0:t.text)==null?void 0:a.color},children:n});case"heading-one":return G.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:(u=t==null?void 0:t.text)==null?void 0:u.color},children:n});case"heading-two":return G.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:(l=t==null?void 0:t.text)==null?void 0:l.color},children:n});case"heading-three":return G.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:(f=t==null?void 0:t.text)==null?void 0:f.color},children:n});case"bulleted-list":return G.jsx("ul",{...o,children:n});case"numbered-list":return G.jsx("ol",{...o,children:n});case"list-item":return G.jsx("li",{...o,children:n});case"table":return G.jsx("div",{className:"table-container",children:G.jsx("table",{...o,children:G.jsx("tbody",{children:n})})});case"table-row":return G.jsx("tr",{...o,children:n});case"table-cell":return r.header?G.jsx("th",{...o,children:n}):G.jsx("td",{...o,children:n});case"block-quote":return G.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:(d=t==null?void 0:t.text)==null?void 0:d.color},children:n});case"code-block":return G.jsx("pre",{...o,children:G.jsx("code",{style:{color:`${(p=t==null?void 0:t.text)==null?void 0:p.color} !important`},children:n})});case"think":const y=e.extraProps||{},x=y.isCollapsed!==void 0?y.isCollapsed:Object.values(y)[1]===!0,C={...y,isCollapsed:x};return G.jsx(IC,{attributes:o,styles:t,extraProps:C,children:n});case"template":return G.jsx(e2,{...o,element:r,children:n,styles:t});case"latex-inline":return G.jsx(UC,{attributes:o,formula:r.formula,styles:t});case"latex-block":return G.jsx(ZC,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const m=(A=>{if(!A)return null;try{const F=typeof A=="string"?JSON.parse(A):A;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(F)?F[0]:F}}]}}catch(F){return console.error("Failed to parse databaseReference:",F),null}})(((v=e.extraProps)==null?void 0:v.databaseReference)||e.databaseReference);return G.jsx(t2,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:m||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),G.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:A=>{const F=A.target;F.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),G.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:A=>{const F=A.target;F.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return G.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(g=t==null?void 0:t.text)==null?void 0:g.color} !important`},children:n})}},eD=e=>{var u,l,f,d,p,v;const{attributes:t,children:r,leaf:n,styles:o}=e;(u=o==null?void 0:o.text)!=null&&u.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const g=n.fromtype==="0",y=n.fromtype==="1",x=n.fromtype==="2",C=n.text||"";let m=C,A="#e6f7ff",F="#1890ff",B="#bae7ff";return g?(m=`${C}`,A="#e6f7ff",F="#1890ff",B="#bae7ff"):y?(m=`${C}`,A="#f6ffed",F="#52c41a",B="#d9f7be"):x&&(m=`${C}`,A="#E7F8FB",F="#10BBD9",B="#E7F8FB"),a=G.jsx("span",{...t,style:{display:"inline-block",background:A,color:F,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:R=>R.currentTarget.style.background=B,onMouseLeave:R=>R.currentTarget.style.background=A,children:m}),a}if(n.code)a=G.jsx("code",{...t,style:{backgroundColor:"rgba(0, 0, 0, 0.05)",padding:"2px 4px",borderRadius:"3px",fontFamily:"monospace",fontSize:"0.9em",color:`${((l=o==null?void 0:o.text)==null?void 0:l.color)||"#24292f"} !important`},children:a});else{const g={color:`${((f=o==null?void 0:o.text)==null?void 0:f.color)||"#24292f"} !important`,fontSize:(d=o==null?void 0:o.text)==null?void 0:d.fontSize,lineHeight:(p=o==null?void 0:o.text)==null?void 0:p.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing,fontWeight:n.bold?"bold":"normal",fontStyle:n.italic?"italic":"normal",textDecoration:[n.underline&&"underline",n.strikethrough&&"line-through"].filter(Boolean).join(" ")||"none"};a=G.jsx("span",{...t,style:g,children:a})}return n.link&&(a=G.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(v=o==null?void 0:o.text)==null?void 0:v.color} !important`},children:a})),a},Ji=Et.div.attrs({className:"unified-rich-text-container"})`
|
|
538
|
+
/* 编辑模式:不处理滚动,只负责内容布局 */
|
|
539
|
+
${e=>e.$isEditing&&`
|
|
540
|
+
display: flex;
|
|
541
|
+
flex-direction: column;
|
|
542
|
+
min-height: 0;
|
|
543
|
+
|
|
544
|
+
flex: 1;
|
|
545
|
+
`}
|
|
546
|
+
/* 移动端文本选择支持 */
|
|
547
|
+
-webkit-user-select: text;
|
|
548
|
+
-moz-user-select: text;
|
|
549
|
+
-ms-user-select: text;
|
|
550
|
+
user-select: text;
|
|
551
|
+
|
|
552
|
+
/* 移动端触摸优化 */
|
|
553
|
+
-webkit-touch-callout: none;
|
|
554
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
555
|
+
|
|
556
|
+
/* 确保编辑模式和预览模式使用相同的 padding */
|
|
557
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
558
|
+
|
|
559
|
+
& > * + * {
|
|
560
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/* 标题样式 */
|
|
564
|
+
& h1 {
|
|
565
|
+
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
566
|
+
font-weight: 600;
|
|
567
|
+
margin: 24px 0 16px 0;
|
|
568
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
569
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
570
|
+
padding-bottom: 8px;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
& h2 {
|
|
574
|
+
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
575
|
+
font-weight: 600;
|
|
576
|
+
margin: 24px 0 16px 0;
|
|
577
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
578
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
579
|
+
padding-bottom: 6px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
& h3 {
|
|
583
|
+
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
584
|
+
font-weight: 600;
|
|
585
|
+
margin: 24px 0 16px 0;
|
|
586
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* 段落样式 */
|
|
590
|
+
& p {
|
|
591
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
592
|
+
margin: 16px 0;
|
|
593
|
+
line-height: 1.6;
|
|
594
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/* 列表样式 - GitHub 风格简约设计 */
|
|
598
|
+
& ul, & ol {
|
|
599
|
+
margin: 16px 0;
|
|
600
|
+
padding-left: 24px;
|
|
601
|
+
line-height: 1.6;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
& ul {
|
|
605
|
+
list-style-type: disc;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
& ol {
|
|
609
|
+
list-style-type: decimal;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
& li {
|
|
613
|
+
margin: 4px 0;
|
|
614
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/* 嵌套列表 */
|
|
618
|
+
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
619
|
+
margin: 8px 0;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* 引用块样式 */
|
|
623
|
+
& blockquote {
|
|
624
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
625
|
+
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
626
|
+
padding: 0 16px;
|
|
627
|
+
margin: 16px 0;
|
|
628
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
629
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/* 行内代码样式 */
|
|
633
|
+
& code {
|
|
634
|
+
font-size: 0.875em;
|
|
635
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
636
|
+
padding: 0.125em 0.25em;
|
|
637
|
+
border-radius: 6px;
|
|
638
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
639
|
+
color: #d73a49;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/* 代码块样式 */
|
|
643
|
+
& pre {
|
|
644
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
645
|
+
padding: 16px;
|
|
646
|
+
border-radius: 6px;
|
|
647
|
+
overflow-x: auto;
|
|
648
|
+
margin: 16px 0;
|
|
649
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
& pre code {
|
|
653
|
+
background-color: transparent;
|
|
654
|
+
padding: 0;
|
|
655
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/* 表格样式 */
|
|
659
|
+
& table {
|
|
660
|
+
width: 100%;
|
|
661
|
+
border-collapse: collapse;
|
|
662
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
663
|
+
margin: 16px 0;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
& th, & td {
|
|
667
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
668
|
+
padding: 8px 12px;
|
|
669
|
+
text-align: left;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
& th {
|
|
673
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
674
|
+
font-weight: 600;
|
|
675
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
& tr:nth-child(even) {
|
|
679
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
& td {
|
|
683
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/* 图片样式 */
|
|
687
|
+
& img {
|
|
688
|
+
max-width: 100%;
|
|
689
|
+
height: auto;
|
|
690
|
+
border-radius: 6px;
|
|
691
|
+
margin: 16px 0;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/* 链接样式 */
|
|
695
|
+
& a {
|
|
696
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
697
|
+
text-decoration: none;
|
|
698
|
+
|
|
699
|
+
&:hover {
|
|
700
|
+
text-decoration: underline;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* 文本样式 */
|
|
705
|
+
& strong {
|
|
706
|
+
font-weight: 600;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
& em {
|
|
710
|
+
font-style: italic;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
& u {
|
|
714
|
+
text-decoration: underline;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
& s {
|
|
718
|
+
text-decoration: line-through;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/* 分割线样式 */
|
|
722
|
+
& hr {
|
|
723
|
+
border: none;
|
|
724
|
+
border-top: 1px solid #d0d7de;
|
|
725
|
+
margin: 24px 0;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/* 思考容器样式 */
|
|
729
|
+
& .think-container {
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
& .think-header {
|
|
735
|
+
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
& .think-icon {
|
|
739
|
+
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
& .think-title {
|
|
743
|
+
font-weight: 600;
|
|
744
|
+
color: #24292f;
|
|
745
|
+
font-size: 14px;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
& .think-text {
|
|
749
|
+
color: #86909C;
|
|
750
|
+
font-size: 14px;
|
|
751
|
+
line-height: 1.6;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* 召回标签样式 */
|
|
755
|
+
& .retrive-tag {
|
|
756
|
+
display: inline-block;
|
|
757
|
+
background: #e6f7ff;
|
|
758
|
+
color: #1890ff;
|
|
759
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
760
|
+
border-radius: 6px;
|
|
761
|
+
padding: 2px 6px;
|
|
762
|
+
margin: 0 2px;
|
|
763
|
+
font-weight: 500;
|
|
764
|
+
font-size: 12px;
|
|
765
|
+
line-height: 1.4;
|
|
766
|
+
cursor: pointer;
|
|
767
|
+
vertical-align: middle;
|
|
768
|
+
transition: background-color 0.2s ease;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
& .retrive-tag:hover {
|
|
772
|
+
background: #bae7ff;
|
|
773
|
+
}
|
|
774
|
+
`;function n2(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?n2([r])[0]:r)})}const Q1="__rtext_escaped_dollar__";function qs(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function tD(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rD(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,Q1);const o=(l,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${l.toUpperCase()}`;return t.set(d,{type:l,formula:(f||"").trim()}),d},a=/\$\$([\s\S]+?)\$\$/g;r=r.replace(a,(l,f)=>o("block",f));const u=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(u,(l,f)=>o("inline",f)),r=r.replace(new RegExp(Q1,"g"),"\\$"),{content:r,placeholders:t}}function nD(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,o)=>{const a=n.type==="block"?"latex-block":"latex-inline",u=encodeURIComponent(n.formula),l=`<${a} data-formula="${u}"></${a}>`;r=r.replace(new RegExp(tD(o),"g"),l)}),r}function qa(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(d){var p;if(d.indexOf("<think>")>-1)if(d.indexOf("</think>")>-1){const v=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,g=d.match(v);return g?{thinkContent:g[1],content:g[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const v=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((p=d.match(v))==null?void 0:p[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:o,content:a,finish:u}=n(e||"");let l=[],f=0;if(!r.includes("think")&&o){const d=o.split(/\n+/).map(p=>p.trim()).filter(Boolean).flatMap(p=>{if(/<retrive-tag/i.test(p)){const v=document.createElement("div");return v.innerHTML=p,ep(v,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:p}]}]});l.push({type:"think",id:`think-${f++}`,thinkContent:o,finish:u,children:d})}if(a){const{content:d,placeholders:p}=rD(a);let v=d;r.includes("retrive")||(v=v.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(x,C,m)=>`<retrive-tag${C?" "+C.trim():""}>${m}</retrive-tag>`)),r.includes("retrieve-sql-data")||(v=v.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(x,C)=>`<retrieve-sql-data id="${C}"></retrieve-sql-data>`)),ur.setOptions({gfm:!0,breaks:!0,pedantic:!1});const g=ur(v);let y=typeof g=="string"?g:"";if(y=nD(y,p),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:y.length,hasImgTags:y.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:y}),typeof g=="string"){const x=document.createElement("div");x.innerHTML=y,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:x.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(x.querySelectorAll("*")).map(m=>m.tagName),imgElements:Array.from(x.querySelectorAll("img")).map(m=>({src:m.src,alt:m.alt}))});const C=ep(x,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:C.length,hasImageElements:C.some(m=>m.type==="image")}),C&&C.length>0&&(l=l.concat(C))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:n2(l)}function ep(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(a=>{var u;if(a.nodeType===Node.ELEMENT_NODE){const l=a;switch(l.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:Kr(l,t)});break;case"h1":n.push({type:"heading-one",children:Kr(l,t)});break;case"h2":n.push({type:"heading-two",children:Kr(l,t)});break;case"h3":n.push({type:"heading-three",children:Kr(l,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Kr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(l.children).map(d=>({type:"list-item",children:Kr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Kr(l,t)});break;case"pre":{const d=l.querySelector("code");d?n.push({type:"code-block",children:Kr(d)}):n.push({type:"code-block",children:Kr(l,t)});break}case"code":{l.closest("pre")||n.push({type:"paragraph",children:Kr(l,t)});break}case"retrive-tag":{const d=Kr(l,t);d.length>0&&n.push({type:"paragraph",children:d});break}case"retrieve-sql-data":{const d=l.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:d,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:Kr(l,t)});break;case"table":n.push(oD(l));break;case"img":{const d=l.getAttribute("src")||"",p=l.getAttribute("alt")||"";let v=d;if(t)if(d.startsWith("./"))v=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=d.replace(/^\.\.\//,g+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(v=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:v}),n.push({type:"image",url:v,alt:p,children:[{text:""}]});break}case"iframe":{const d=l.getAttribute("src")||"",p=l.getAttribute("width")||"100%",v=l.getAttribute("height")||"400",g=l.getAttribute("frameborder")||"0",y=l.getAttribute("title")||"";let x=d;if(t)if(d.startsWith("./"))x=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(x=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:x}),n.push({type:"iframe",src:x,width:p,height:v,frameborder:g,title:y,children:[{text:""}]});break}case"latex-inline":{const d=qs(l.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=qs(l.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Kr(l)});break;default:n.push({type:"paragraph",children:Kr(l,t)});break}}else a.nodeType===Node.TEXT_NODE&&((u=a.textContent)!=null&&u.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function Kr(e,t){const r=[];function n(a){const u=[];let l="",f=!1,d=!1,p=0;for(;p<a.length;)a.startsWith("**",p)?(l&&(u.push({text:l,code:!0,bold:f,italic:d}),l=""),f=!f,p+=2):a.startsWith("*",p)?(l&&(u.push({text:l,code:!0,bold:f,italic:d}),l=""),d=!d,p+=1):(l+=a[p],p+=1);return l&&u.push({text:l,code:!0,bold:f,italic:d}),u}function o(a,u={}){var l,f;if(a.nodeType===Node.TEXT_NODE){const d=(l=a.textContent)==null?void 0:l.trim();return d?u.code?n(d):[{text:d,...u}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const d=a,p={...u};switch(d.tagName.toLowerCase()){case"em":case"i":p.italic=!0;break;case"strong":case"b":p.bold=!0;break;case"code":d.closest("pre")||(p.code=!0);break;case"del":case"s":p.strikethrough=!0;break;case"u":p.underline=!0;break;case"a":p.link=d.getAttribute("href")||void 0;break;case"retrive-tag":{const g={};for(const{name:y,value:x}of Array.from(d.attributes))g[y]=x;return[{text:d.textContent||""||"[0]",retrive:!0,...g}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const g=d.getAttribute("src")||"",y=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:g,alt:y,basePath:t});let x=g;if(t)if(g.startsWith("./"))x=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=g.replace(/^\.\.\//,C+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(x=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:x}),[{type:"image",url:x,alt:y,children:[{text:""}]}]}case"iframe":{const g=d.getAttribute("src")||"",y=d.getAttribute("width")||"100%",x=d.getAttribute("height")||"400",C=d.getAttribute("frameborder")||"0",m=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:g,width:y,height:x,basePath:t});let A=g;if(t)if(g.startsWith("./"))A=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const F=t.substring(0,t.lastIndexOf("/"));A=g.replace(/^\.\.\//,F+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(A=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:A}),[{type:"iframe",src:A,width:y,height:x,frameborder:C,title:m,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:qs(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:qs(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return p.code?n(d.textContent):[{text:d.textContent,...p}];let v=[];for(const g of Array.from(d.childNodes))v=v.concat(o(g,p));return v}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function oD(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:Kr(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(u=>({type:"table-cell",header:!1,children:Kr(u)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:Kr(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:Kr(a)}))})})}return{type:"table",children:t}}const aD=e=>!e||e.length===0?"":e.map(t=>{switch(t.type){case"heading-one":return`# ${Tn(t)}
|
|
775
|
+
|
|
776
|
+
`;case"heading-two":return`## ${Tn(t)}
|
|
777
|
+
|
|
778
|
+
`;case"heading-three":return`### ${Tn(t)}
|
|
779
|
+
|
|
780
|
+
`;case"paragraph":return`${Tn(t)}
|
|
781
|
+
|
|
782
|
+
`;case"bulleted-list":return jc(t)+`
|
|
783
|
+
`;case"numbered-list":return _c(t)+`
|
|
784
|
+
`;case"list-item":return Tn(t);case"block-quote":return iD(t)+`
|
|
785
|
+
`;case"code-block":return sD(t)+`
|
|
786
|
+
`;case"table":return lD(t)+`
|
|
787
|
+
`;case"table-row":return"";case"table-cell":return"";case"image":const r=t.align?` align="${t.align}"`:"";return`![${t.children&&t.children.length>0&&typeof t.children[0]=="object"&&"text"in t.children[0]?t.children[0].text:""}](${t.url}${r})
|
|
788
|
+
|
|
789
|
+
`;default:return Tn(t)+`
|
|
790
|
+
|
|
791
|
+
`}}).join(""),Tn=(e,t=!1)=>!e.children||e.children.length===0?"":e.children.map(r=>{if(typeof r=="string")return r;if("text"in r)return Lc(r);const n=r;return t&&(n.type==="bulleted-list"||n.type==="numbered-list")?"":Tn(n,t)}).join(""),jc=e=>!e.children||e.children.length===0?"":e.children.map(t=>{var r;if(t.type==="list-item"){const n=[],o=[];(r=t.children)==null||r.forEach(u=>{if(typeof u=="string"||"text"in u)n.push(u);else if(typeof u=="object"&&"type"in u){const l=u;l.type==="bulleted-list"||l.type==="numbered-list"?o.push(l):n.push(u)}});let a=`* ${n.map(u=>typeof u=="string"?u:"text"in u?Lc(u):Tn(u,!0)).join("")}`;return o.length>0&&o.forEach(u=>{u.type==="bulleted-list"?a+=`
|
|
792
|
+
`+jc(u).split(`
|
|
793
|
+
`).map(l=>" "+l).join(`
|
|
794
|
+
`):u.type==="numbered-list"&&(a+=`
|
|
795
|
+
`+_c(u).split(`
|
|
796
|
+
`).map(l=>" "+l).join(`
|
|
797
|
+
`))}),a}return""}).filter(Boolean).join(`
|
|
798
|
+
`),_c=e=>!e.children||e.children.length===0?"":e.children.map((t,r)=>{var n;if(t.type==="list-item"){const o=[],a=[];(n=t.children)==null||n.forEach(f=>{if(typeof f=="string"||"text"in f)o.push(f);else if(typeof f=="object"&&"type"in f){const d=f;d.type==="bulleted-list"||d.type==="numbered-list"?a.push(d):o.push(f)}});const u=o.map(f=>typeof f=="string"?f:"text"in f?Lc(f):Tn(f,!0)).join("");let l=`${r+1}. ${u}`;return a.length>0&&a.forEach(f=>{f.type==="bulleted-list"?l+=`
|
|
799
|
+
`+jc(f).split(`
|
|
800
|
+
`).map(d=>" "+d).join(`
|
|
801
|
+
`):f.type==="numbered-list"&&(l+=`
|
|
802
|
+
`+_c(f).split(`
|
|
803
|
+
`).map(d=>" "+d).join(`
|
|
804
|
+
`))}),l}return""}).filter(Boolean).join(`
|
|
805
|
+
`),iD=e=>Tn(e).split(`
|
|
806
|
+
`).map(t=>`> ${t}`).join(`
|
|
807
|
+
`),sD=e=>{const t=Tn(e);return`\`\`\`${e.language||""}
|
|
808
|
+
${t}
|
|
809
|
+
\`\`\``},Lc=e=>{if(!e||e.text===void 0)return"";let t=e.text||"";if(e.code)return t=`\`${t.replace(/`/g,"\\`")}\``,t;if(e.link){let r=t;return e.bold&&(r=`**${r}**`),e.italic&&(r=`_${r}_`),e.strikethrough&&(r=`~~${r}~~`),e.underline&&(r=`<u>${r}</u>`),t=`[${r}](${e.link})`,t}return e.strikethrough&&(t=`~~${t}~~`),e.bold&&(t=`**${t}**`),e.italic&&(t=`_${t}_`),e.underline&&(t=`<u>${t}</u>`),t},lD=e=>{const t=e.children;if(t.length===0)return"";const r=t[0].children;let n="| "+r.map(o=>o.children[0].text.replace(/\|/g,"\\|")).join(" | ")+` |
|
|
810
|
+
`;n+="| "+r.map(()=>"---").join(" | ")+` |
|
|
811
|
+
`;for(let o=1;o<t.length;o++){const a=t[o];n+="| "+a.children.map(u=>u.children[0].text.replace(/\|/g,"\\|")).join(" | ")+` |
|
|
812
|
+
`}return n},uD=(e,t=!0)=>{const r=Bt(null),n=Bt(null),o=Bt(null),a=Bt(!1),u=Bt(null),l=Bt(!1),f=Bt(!1),d=Bt(!1);return Jt(()=>{if(!t||!e||!r.current)return;const p=r.current,v=($,P)=>{const N=$.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote");if(!N)return!1;try{const K=N.getBoundingClientRect(),L=P.x>K.left+K.width*.5,Y=P.y>K.top+K.height*.7;return L||Y}catch(K){return console.warn("Failed to check paragraph end:",K),!1}},g=$=>{if(!e)return;const P=$.closest("p, h1, h2, h3, h4, h5, h6, li, blockquote");if(P)try{const N=document.createRange();N.selectNodeContents(P);const K=window.getSelection();K&&(K.removeAllRanges(),K.addRange(N));try{const L=Te.toSlateRange(e,N,{exactMatch:!1,suppressThrow:!0});L&&Fe.isRange(L)&&qe.select(e,L)}catch{try{const L=Te.toSlateNode(e,P);if(L){const Y=Te.findPath(e,L),V=M.start(e,Y),_=M.end(e,Y);qe.select(e,{anchor:V,focus:_})}}catch(L){console.warn("Failed to sync Slate selection:",L)}}}catch(N){console.warn("Failed to select paragraph:",N)}},y=$=>{if(!(!e||!r.current))try{let P=null;const N=document.elementFromPoint($.x,$.y);if(!N||!r.current.contains(N))return;if(document.caretRangeFromPoint)P=document.caretRangeFromPoint($.x,$.y);else if(document.caretPositionFromPoint){const K=document.caretPositionFromPoint($.x,$.y);K&&(P=document.createRange(),P.setStart(K.offsetNode,K.offset),P.collapse(!0))}if(P)try{const K=Te.toSlateRange(e,P,{exactMatch:!1,suppressThrow:!0});K&&qe.select(e,K)}catch(K){console.debug("Failed to convert range to Slate:",K)}}catch(P){console.warn("Failed to move cursor:",P)}},x=$=>{const P=$.touches[0];if(!P)return;a.current=!1,l.current=!1,f.current=!1,d.current=!1;const N={x:P.clientX,y:P.clientY},K=$.target;o.current={x:P.clientX,y:P.clientY,time:Date.now(),target:K,point:N},n.current=setTimeout(()=>{var L,Y;if(!a.current&&((L=o.current)!=null&&L.target)&&((Y=o.current)!=null&&Y.point))if(l.current=!0,v(o.current.target,o.current.point))g(o.current.target);else try{let V=null;const _=o.current.point;if(document.caretRangeFromPoint)V=document.caretRangeFromPoint(_.x,_.y);else if(document.caretPositionFromPoint){const q=document.caretPositionFromPoint(_.x,_.y);q&&(V=document.createRange(),V.setStart(q.offsetNode,q.offset),V.collapse(!0))}if(V){const q=window.getSelection();q&&(q.removeAllRanges(),q.addRange(V),C(),setTimeout(()=>{C()},200))}}catch(V){console.debug("Failed to create selection on long press:",V)}},400)},C=()=>{if(!(!e||!r.current||d.current||document.activeElement===p||p.contains(document.activeElement)))try{const $=window.getSelection();if(!$||$.rangeCount===0)return;const P=$.getRangeAt(0);if(!r.current.contains(P.commonAncestorContainer))return;try{const N=Te.toSlateRange(e,P,{exactMatch:!1,suppressThrow:!0});N&&Fe.isRange(N)&&qe.select(e,N)}catch(N){console.debug("Failed to sync selection to Slate:",N)}}catch($){console.debug("Error syncing selection:",$)}},m=$=>{const P=$.touches[0];if(!P||!o.current)return;const N=Math.abs(P.clientX-o.current.x),K=Math.abs(P.clientY-o.current.y),L=Math.sqrt(N*N+K*K);f.current=!0,L>10&&(n.current&&(clearTimeout(n.current),n.current=null),K<=N*2?(a.current=!0,u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{C()},50)):a.current=!1)},A=$=>{n.current&&(clearTimeout(n.current),n.current=null),a.current?(C(),a.current=!1):o.current&&!l.current&&!f.current&&Date.now()-o.current.time<300&&o.current.point&&!(document.activeElement===p||p.contains(document.activeElement))&&!d.current&&setTimeout(()=>{d.current||y(o.current.point)},0),l.current=!1,f.current=!1,o.current=null},F=$=>{!$.ctrlKey&&!$.metaKey&&!$.altKey&&($.key.length===1||["Backspace","Delete","Enter"].includes($.key))&&(d.current=!0,setTimeout(()=>{d.current=!1},100))},B=()=>{if(d.current||document.activeElement===p||p.contains(document.activeElement))return;const $=window.getSelection();!$||$.rangeCount===0||(a.current||l.current)&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{C()},50))},R=$=>{const P=$.target;P&&g(P)};p.addEventListener("touchstart",x,{passive:!0}),p.addEventListener("touchmove",m,{passive:!0}),p.addEventListener("touchend",A,{passive:!0}),p.addEventListener("dblclick",R),p.addEventListener("keydown",F,!0);const S=()=>{d.current=!0,setTimeout(()=>{d.current=!1},200)};p.addEventListener("input",S,!0);const z=()=>{document.activeElement===p||p.contains(document.activeElement)||B()};return document.addEventListener("selectionchange",z),()=>{p.removeEventListener("touchstart",x),p.removeEventListener("touchmove",m),p.removeEventListener("touchend",A),p.removeEventListener("dblclick",R),p.removeEventListener("keydown",F,!0),p.removeEventListener("input",S,!0),document.removeEventListener("selectionchange",z),n.current&&clearTimeout(n.current),u.current&&clearTimeout(u.current)}},[t,e]),r},cD=Et.div.attrs({className:"unified-rich-text-container"})`
|
|
813
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
814
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
815
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
816
|
+
min-height: ${e=>{var t;return e.$isEditing?"0":((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
817
|
+
transition: all 0.2s ease-in-out;
|
|
818
|
+
|
|
819
|
+
padding:${e=>e.$isEditing?"1rem":"0"};
|
|
820
|
+
padding-top: ${e=>e.$isEditing?"28px":"0"};
|
|
821
|
+
${e=>{var t,r,n,o,a;return e.$isEditing&&`
|
|
822
|
+
height: 100%;
|
|
823
|
+
max-height: 100%;
|
|
824
|
+
overflow-y: auto;
|
|
825
|
+
overflow-x: hidden;
|
|
826
|
+
display: flex;
|
|
827
|
+
flex-direction: column;
|
|
828
|
+
min-height: 0;
|
|
829
|
+
/* \u79FB\u52A8\u7AEF\u6EDA\u52A8\u652F\u6301 - \u5FC5\u987B\u5728\u6EDA\u52A8\u5BB9\u5668\u4E0A\u8BBE\u7F6E */
|
|
830
|
+
-webkit-overflow-scrolling: touch;
|
|
831
|
+
touch-action: pan-y;
|
|
832
|
+
/* \u6EDA\u52A8\u6761\u6837\u5F0F - \u4E0E\u9884\u89C8\u6A21\u5F0F\u7EDF\u4E00 */
|
|
833
|
+
&::-webkit-scrollbar {
|
|
834
|
+
width: 8px;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
&::-webkit-scrollbar-track {
|
|
838
|
+
background: ${((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"};
|
|
839
|
+
border-radius: 4px;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
&::-webkit-scrollbar-thumb {
|
|
843
|
+
background: ${((r=e.theme)==null?void 0:r.scrollbarThumb)||"#c1c1c1"};
|
|
844
|
+
border-radius: 4px;
|
|
845
|
+
|
|
846
|
+
&:hover {
|
|
847
|
+
background: ${((n=e.theme)==null?void 0:n.scrollbarThumbHover)||"#a8a8a8"};
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
&:focus-within {
|
|
851
|
+
border-color: ${((o=e.theme)==null?void 0:o.primaryColor)||"#007bff"};
|
|
852
|
+
box-shadow: 0 0 0 2px ${((a=e.theme)==null?void 0:a.primaryColor)||"#007bff"}20;
|
|
853
|
+
}
|
|
854
|
+
`}}
|
|
855
|
+
`,T0=Et.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
856
|
+
position: relative;
|
|
857
|
+
/* 不设置 padding,让 RichTextContainer 的 padding 统一控制,保持编辑模式和预览模式一致 */
|
|
858
|
+
padding: 0;
|
|
859
|
+
min-height: ${e=>e.$isEditing?"100%":"inherit"};
|
|
860
|
+
outline: none;
|
|
861
|
+
flex: ${e=>e.$isEditing?"1":"none"};
|
|
862
|
+
/* 编辑模式下不设置 overflow,让 RichTextContainer 处理滚动 */
|
|
863
|
+
overflow: ${e=>(e.$isEditing,"visible")};
|
|
864
|
+
height: ${e=>e.$isEditing?"100%":"auto"};
|
|
865
|
+
|
|
866
|
+
/* 移动端文本选择支持 - 允许拖拽选择 */
|
|
867
|
+
-webkit-user-select: text !important;
|
|
868
|
+
-moz-user-select: text !important;
|
|
869
|
+
-ms-user-select: text !important;
|
|
870
|
+
user-select: text !important;
|
|
871
|
+
|
|
872
|
+
/* 移动端触摸优化 - 允许原生文本选择行为 */
|
|
873
|
+
-webkit-touch-callout: none;
|
|
874
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
875
|
+
/* 注意:不在内容容器上设置 touch-action,让滚动容器(Container)处理滚动 */
|
|
876
|
+
|
|
877
|
+
/* 确保所有子元素都支持文本选择 */
|
|
878
|
+
* {
|
|
879
|
+
-webkit-user-select: text !important;
|
|
880
|
+
-moz-user-select: text !important;
|
|
881
|
+
-ms-user-select: text !important;
|
|
882
|
+
user-select: text !important;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/* 段落选择支持 - 双击或长按选择段落 */
|
|
886
|
+
& p, & h1, & h2, & h3, & h4, & h5, & h6, & li, & blockquote {
|
|
887
|
+
-webkit-user-select: text !important;
|
|
888
|
+
-moz-user-select: text !important;
|
|
889
|
+
-ms-user-select: text !important;
|
|
890
|
+
user-select: text !important;
|
|
891
|
+
cursor: text;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/* 不设置 margin,让 RichTextContainer 的样式统一控制 */
|
|
895
|
+
`,tp=({editor:e,theme:t,renderElementFunction:r,renderLeafFunction:n,placeholder:o,onFocus:a,onBlur:u,baseFontSize:l})=>{const f=uD(e,!0),d=St(p=>(p.preventDefault(),p.stopPropagation(),!1),[]);return G.jsx(T0,{ref:f,theme:t,$isEditing:!0,onContextMenu:d,children:G.jsx(y0,{renderElement:r,renderLeaf:n,placeholder:o,readOnly:!1,onFocus:a,onBlur:u,onContextMenu:d,style:{minHeight:"100%",outline:"none",fontSize:`${l}px`,WebkitUserSelect:"text",MozUserSelect:"text",msUserSelect:"text",userSelect:"text",WebkitTouchCallout:"none"}})})},rp=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,np=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let o=0;o<e.length;o++){if(e[o]==="\\"){o+=1;continue}if(r===2){if(e.startsWith("$$",o)){n===-1?n=o:n=-1,o+=1;continue}}else if(r===1&&e[o]==="$"){if(e[o+1]==="$"){o+=1;continue}n===-1?n=o:n=-1}}return n},Tu=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const o=[],a=np(t,"$$");a!==-1&&(r=rp(r,a),o.push(a),n=!0);const u=np(t,"$");if(u!==-1){const l=o.filter(f=>f<=u).length;r=rp(r,u+l),n=!0}return{content:r,hasPendingLatex:n}};var mi=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(mi||{});const pl=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:u,onFocus:l,onBlur:f,renderElement:d,renderLeaf:p,onRetriveTagClick:v,eventsEmit:g,onEditorReady:y,extraProps:x={},className:C,style:m,styles:A,enableTemplateInput:F=!1,disabledTags:B=[]})=>{const R=Us(),S=yt(()=>{var ne,oe,Q,le,ge,he,ke,Ce,xe;return{primaryColor:((ne=R==null?void 0:R.colors)==null?void 0:ne.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((oe=R==null?void 0:R.colors)==null?void 0:oe.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((Q=R==null?void 0:R.colors)==null?void 0:Q.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((le=R==null?void 0:R.colors)==null?void 0:le.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((ge=R==null?void 0:R.colors)==null?void 0:ge.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((he=R==null?void 0:R.colors)==null?void 0:he.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((ke=R==null?void 0:R.space)==null?void 0:ke.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((Ce=R==null?void 0:R.space)==null?void 0:Ce.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((xe=R==null?void 0:R.space)==null?void 0:xe.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[R,a,o]),z=Bt();if(!z.current){const ne=zx(),oe=Z8(ne),{isInline:Q}=oe;oe.isInline=he=>!B.includes("template")&&he.type==="template"?!0:Q(he);const{isVoid:le}=oe;oe.isVoid=he=>!B.includes("template")&&he.type==="template"?!0:le(he);const ge=he=>{if(!(F&&!B.includes("template")))return he;const{insertText:ke,insertData:Ce}=he,xe=()=>{const Ae=/<template>([^<]*)<\/template>/g,$e=Array.from(M.nodes(he,{match:He=>ft.isText(He)&&Ae.test(He.text)}));if($e.length!==0)for(const He of $e){const[pt,it]=He,Oe=pt.text||"",Le=[];let Ke=0,st;for(Ae.lastIndex=0;(st=Ae.exec(Oe))!==null;){if(st.index>Ke){const Ze=Oe.slice(Ke,st.index);Ze&&Le.push({text:Ze})}Le.push({type:"template",placeholder:(st[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Ke=st.index+st[0].length}if(Ke<Oe.length){const Ze=Oe.slice(Ke);Ze&&Le.push({text:Ze})}qe.removeNodes(he,{at:it}),qe.insertNodes(he,Le,{at:it})}};return he.insertText=Ae=>{ke(Ae),xe()},he.insertData=Ae=>{const $e=Ae.getData("text/plain");if($e&&/<template>[\s\S]*?<\/template>/.test($e)){ke($e),xe();return}return Ce(Ae)},he};z.current=ge(oe)}const $=z.current,[P,N]=Tt(()=>{if(e.type==="slate")return e.content||[{type:"paragraph",children:[{text:""}]}];if(e.type==="markdown"&&t){const ne=typeof e.content=="string"?e.content:"";if(ne){const oe=qa(ne,{basePath:n});return oe.length>0?oe:[{type:"paragraph",children:[{text:""}]}]}}return[{type:"paragraph",children:[{text:""}]}]}),[K,L]=Tt(0),Y=Bt(null),V=Bt(!1);Jt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const ne=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",ne),N(ne),L(oe=>oe+1),Y.current=e.content}else if(e.type==="markdown"){const ne=typeof e.content=="string"?e.content:"";if(t){if(ne===Y.current){const oe=Tu(ne);q.current=oe.content;return}if(!V.current&&ne){console.log("UnifiedRichText: \u68C0\u6D4B\u5230\u5916\u90E8\u5185\u5BB9\u53D8\u5316\uFF0C\u540C\u6B65\u7F16\u8F91\u5668");const oe=qa(ne,{basePath:n}),Q=oe.length>0?oe:[{type:"paragraph",children:[{text:""}]}];N(Q),L(le=>le+1),Y.current=ne}}else if(ne){const oe=qa(ne,{basePath:n}),Q=oe.length>0?oe:[{type:"paragraph",children:[{text:""}]}];N(Q),L(le=>le+1),Y.current=ne}}},[e.type,e.content,t,n]),Jt(()=>{$&&y&&t&&y($)},[$,y,t]);const _=Bt(K);Jt(()=>{if(!t||!$||K===_.current)return;const ne=_.current;_.current=K,console.log("UnifiedRichText: EditorKey changed from",ne,"to",K,"- checking selection");const oe=setTimeout(()=>{try{if($.selection)try{const{anchor:Q,focus:le}=$.selection;M.leaf($,Q.path),M.leaf($,le.path),console.log("UnifiedRichText: Selection is valid after rebuild")}catch(Q){console.warn("UnifiedRichText: Invalid selection after rebuild, fixing...",Q);try{const le=M.end($,[]);qe.select($,le)}catch(le){console.warn("UnifiedRichText: Failed to fix selection:",le)}}else{console.warn("UnifiedRichText: No selection after rebuild, setting to end");try{const Q=M.end($,[]);qe.select($,Q)}catch(Q){console.warn("UnifiedRichText: Failed to set selection to end:",Q)}}}catch(Q){console.warn("UnifiedRichText: Error checking selection after rebuild:",Q)}},0);return()=>clearTimeout(oe)},[K,t,$]);const q=Bt(void 0),U=yt(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const ne=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return Tu(ne)},[e.type,e.content]);Jt(()=>{if(e.type!=="markdown")return;if(t&&V.current){const oe=U.content;q.current=oe;return}const ne=U.content;if(t&&(typeof e.content=="string"?e.content:"")===Y.current){q.current=ne;return}q.current!==ne&&(q.current=ne,L(oe=>oe+1))},[e.type,e.content,U.content,t]);const X=yt(()=>e.type!=="markdown"?x:{...x||{},hasPendingLatex:U.hasPendingLatex},[x,e.type,U.hasPendingLatex]),ee=Bt("");Jt(()=>{if(e.type!=="markdown"||t&&V.current||t&&(typeof e.content=="string"?e.content:"")===Y.current)return;const ne=JSON.stringify(X||{});ne!==ee.current&&(ee.current=ne,L(oe=>oe+1))},[X,e.type,e.content,t]);const j=St(ne=>{if(console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",ne),ne&&Array.isArray(ne))if(e.type==="markdown"&&t)try{const oe=aD(ne);Y.current=oe,V.current=!0;const Q=Tu(oe);q.current=Q.content,console.log("UnifiedRichText: \u5185\u90E8\u53D8\u5316\uFF0C\u8BBE\u7F6E\u6807\u5FD7\uFF0CmarkdownContent:",oe.substring(0,50)),u==null||u(oe,"markdown"),N(ne),setTimeout(()=>{V.current=!1,console.log("UnifiedRichText: \u91CD\u7F6E\u5185\u90E8\u53D8\u5316\u6807\u5FD7")},200)}catch(oe){console.error("UnifiedRichText: Markdown \u5E8F\u5217\u5316\u5931\u8D25:",oe),u==null||u(ne,"slate"),N(ne)}else u==null||u(ne,"slate"),N(ne);else console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",ne)},[u,e.type,t,$]),ie=yt(()=>{const ne=S==null?void 0:S.baseFontSize;return typeof ne=="number"&&!Number.isNaN(ne)?ne:o==="md"?14:12},[S,o]),de=St(ne=>{const oe={...ne,size:o,styles:A,eventsEmit:g,extraProps:X};return d?d(oe):QC(oe)},[d,o,A,g,X]),pe=St(ne=>{const oe={...ne,styles:A,onRetriveTagClick:v};return p?p(oe):eD(oe)},[p,A,v]);Jt(()=>(window.copyCodeFromData=ne=>{const oe=ne.getAttribute("data-code");if(!oe){console.error("No code content found");return}const Q=oe.replace(/\\n/g,`
|
|
896
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(Q).then(()=>{const le=ne.innerHTML;ne.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',ne.classList.add("copied"),setTimeout(()=>{ne.innerHTML=le,ne.classList.remove("copied")},2e3)}).catch(le=>{console.error("\u590D\u5236\u5931\u8D25:",le);const ge=ne.innerHTML;ne.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',ne.style.background="#d73a49",ne.style.borderColor="#d73a49",ne.style.color="white",setTimeout(()=>{ne.innerHTML=ge,ne.style.background="",ne.style.borderColor="",ne.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const me=yt(()=>{var ne,oe;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(ne=U.content)==null?void 0:ne.length,basePath:n,hasImages:(oe=U.content)==null?void 0:oe.includes("!["),isEditing:t});const Q=qa(U.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:Q.length,isImageElements:Q.some(xe=>xe.type==="image"),imageElements:Q.filter(xe=>xe.type==="image")}),t&&Q&&Q.length>0)return G.jsx(Ji,{theme:S,$size:o,$isEditing:!0,children:G.jsx(Ui,{editor:$,initialValue:Q,onChange:j,children:G.jsx(tp,{editor:$,theme:S,renderElementFunction:de,renderLeafFunction:pe,placeholder:r,onFocus:l,onBlur:f,baseFontSize:ie})},K)});if(!t&&Q&&Q.length>0)return G.jsx(Ji,{theme:S,$size:o,$isEditing:!1,children:G.jsx(Ui,{editor:$,initialValue:Q,onChange:()=>{},children:G.jsx(T0,{theme:S,$isEditing:!1,children:G.jsx(y0,{renderElement:de,renderLeaf:pe,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${ie}px`}})})},K)});const le={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let ge=ur(U.content||"",le);ge=ge.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),ge=ge.replace(/<\/table>/g,"</table></div>"),ge=ge.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(xe,Ae,$e)=>{const He=$e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${Ae}>${$e}</code><button class="code-copy-btn" data-code="${He}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`});const he=(S==null?void 0:S.disabledBackground)||(S==null?void 0:S.backgroundColor)||"#ffffff",ke=(xe,Ae)=>xe.startsWith("#")?`${xe}${Math.round(Ae*255).toString(16).padStart(2,"0")}`:xe,Ce=`
|
|
897
|
+
<style>
|
|
898
|
+
.table-container{ overflow:auto; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
899
|
+
.table-container table{ background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
900
|
+
.table-container th{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
901
|
+
.table-container td{ color:${(S==null?void 0:S.textColor)||"#24292f"} !important; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
902
|
+
.table-container tr:nth-child(even) td{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; }
|
|
903
|
+
pre{ position:relative; background:${he}; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(S==null?void 0:S.textColor)||"#e5e7eb"}; }
|
|
904
|
+
pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${ke("#22c55e",.25)}, ${ke("#f59e0b",.25)}, ${ke("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
|
|
905
|
+
pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; color:${(S==null?void 0:S.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
|
|
906
|
+
pre .code-copy-btn:hover{ background:${(S==null?void 0:S.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
907
|
+
</style>
|
|
908
|
+
`;return G.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${ie}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},"data-pending-latex":U.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:Ce+ge}})}catch(Q){return console.error("Markdown parsing error:",Q),G.jsx("div",{children:e.content})}},[e,S,$,K,de,pe,ie,U]),we=yt(()=>e.type!=="html"?null:G.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${ie}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,S,ie]),Ie=yt(()=>e.type!=="text"?null:G.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${ie}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},children:G.jsx("span",{children:e.content||""})}),[e,S,ie]),Z=()=>{switch(e.type){case"markdown":return me;case"html":return we;case"text":return Ie;case"slate":default:return t?G.jsx(Ji,{theme:S,$size:o,$isEditing:!0,children:G.jsx(Ui,{editor:$,initialValue:P,onChange:j,children:G.jsx(tp,{editor:$,theme:S,renderElementFunction:de,renderLeafFunction:pe,placeholder:r,onFocus:l,onBlur:f,baseFontSize:ie})},K)}):G.jsx(Ji,{theme:S,$size:o,children:G.jsx(Ui,{editor:$,initialValue:P,onChange:()=>{},children:G.jsx(T0,{theme:S,$isEditing:!1,children:G.jsx(y0,{renderElement:de,renderLeaf:pe,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${ie}px`}})})},K)})}};return G.jsx(cD,{theme:S,$isEditing:t,className:C,style:m,children:Z()})};var O0={exports:{}},dD=O0.exports,op;function fD(){return op||(op=1,(function(e,t){(function(r,n){e.exports=n()})(dD,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",u="second",l="minute",f="hour",d="day",p="week",v="month",g="quarter",y="year",x="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(_){var q=["th","st","nd","rd"],U=_%100;return"["+_+(q[(U-20)%10]||q[U]||q[0])+"]"}},B=function(_,q,U){var X=String(_);return!X||X.length>=q?_:""+Array(q+1-X.length).join(U)+_},R={s:B,z:function(_){var q=-_.utcOffset(),U=Math.abs(q),X=Math.floor(U/60),ee=U%60;return(q<=0?"+":"-")+B(X,2,"0")+":"+B(ee,2,"0")},m:function _(q,U){if(q.date()<U.date())return-_(U,q);var X=12*(U.year()-q.year())+(U.month()-q.month()),ee=q.clone().add(X,v),j=U-ee<0,ie=q.clone().add(X+(j?-1:1),v);return+(-(X+(U-ee)/(j?ee-ie:ie-ee))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:v,y,w:p,d,D:x,h:f,m:l,s:u,ms:a,Q:g}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},S="en",z={};z[S]=F;var $="$isDayjsObject",P=function(_){return _ instanceof Y||!(!_||!_[$])},N=function _(q,U,X){var ee;if(!q)return S;if(typeof q=="string"){var j=q.toLowerCase();z[j]&&(ee=j),U&&(z[j]=U,ee=j);var ie=q.split("-");if(!ee&&ie.length>1)return _(ie[0])}else{var de=q.name;z[de]=q,ee=de}return!X&&ee&&(S=ee),ee||!X&&S},K=function(_,q){if(P(_))return _.clone();var U=typeof q=="object"?q:{};return U.date=_,U.args=arguments,new Y(U)},L=R;L.l=N,L.i=P,L.w=function(_,q){return K(_,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var Y=(function(){function _(U){this.$L=N(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[$]=!0}var q=_.prototype;return q.parse=function(U){this.$d=(function(X){var ee=X.date,j=X.utc;if(ee===null)return new Date(NaN);if(L.u(ee))return new Date;if(ee instanceof Date)return new Date(ee);if(typeof ee=="string"&&!/Z$/i.test(ee)){var ie=ee.match(m);if(ie){var de=ie[2]-1||0,pe=(ie[7]||"0").substring(0,3);return j?new Date(Date.UTC(ie[1],de,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,pe)):new Date(ie[1],de,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,pe)}}return new Date(ee)})(U),this.init()},q.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},q.$utils=function(){return L},q.isValid=function(){return this.$d.toString()!==C},q.isSame=function(U,X){var ee=K(U);return this.startOf(X)<=ee&&ee<=this.endOf(X)},q.isAfter=function(U,X){return K(U)<this.startOf(X)},q.isBefore=function(U,X){return this.endOf(X)<K(U)},q.$g=function(U,X,ee){return L.u(U)?this[X]:this.set(ee,U)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(U,X){var ee=this,j=!!L.u(X)||X,ie=L.p(U),de=function(Q,le){var ge=L.w(ee.$u?Date.UTC(ee.$y,le,Q):new Date(ee.$y,le,Q),ee);return j?ge:ge.endOf(d)},pe=function(Q,le){return L.w(ee.toDate()[Q].apply(ee.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(le)),ee)},me=this.$W,we=this.$M,Ie=this.$D,Z="set"+(this.$u?"UTC":"");switch(ie){case y:return j?de(1,0):de(31,11);case v:return j?de(1,we):de(0,we+1);case p:var ne=this.$locale().weekStart||0,oe=(me<ne?me+7:me)-ne;return de(j?Ie-oe:Ie+(6-oe),we);case d:case x:return pe(Z+"Hours",0);case f:return pe(Z+"Minutes",1);case l:return pe(Z+"Seconds",2);case u:return pe(Z+"Milliseconds",3);default:return this.clone()}},q.endOf=function(U){return this.startOf(U,!1)},q.$set=function(U,X){var ee,j=L.p(U),ie="set"+(this.$u?"UTC":""),de=(ee={},ee[d]=ie+"Date",ee[x]=ie+"Date",ee[v]=ie+"Month",ee[y]=ie+"FullYear",ee[f]=ie+"Hours",ee[l]=ie+"Minutes",ee[u]=ie+"Seconds",ee[a]=ie+"Milliseconds",ee)[j],pe=j===d?this.$D+(X-this.$W):X;if(j===v||j===y){var me=this.clone().set(x,1);me.$d[de](pe),me.init(),this.$d=me.set(x,Math.min(this.$D,me.daysInMonth())).$d}else de&&this.$d[de](pe);return this.init(),this},q.set=function(U,X){return this.clone().$set(U,X)},q.get=function(U){return this[L.p(U)]()},q.add=function(U,X){var ee,j=this;U=Number(U);var ie=L.p(X),de=function(we){var Ie=K(j);return L.w(Ie.date(Ie.date()+Math.round(we*U)),j)};if(ie===v)return this.set(v,this.$M+U);if(ie===y)return this.set(y,this.$y+U);if(ie===d)return de(1);if(ie===p)return de(7);var pe=(ee={},ee[l]=n,ee[f]=o,ee[u]=r,ee)[ie]||1,me=this.$d.getTime()+U*pe;return L.w(me,this)},q.subtract=function(U,X){return this.add(-1*U,X)},q.format=function(U){var X=this,ee=this.$locale();if(!this.isValid())return ee.invalidDate||C;var j=U||"YYYY-MM-DDTHH:mm:ssZ",ie=L.z(this),de=this.$H,pe=this.$m,me=this.$M,we=ee.weekdays,Ie=ee.months,Z=ee.meridiem,ne=function(le,ge,he,ke){return le&&(le[ge]||le(X,j))||he[ge].slice(0,ke)},oe=function(le){return L.s(de%12||12,le,"0")},Q=Z||function(le,ge,he){var ke=le<12?"AM":"PM";return he?ke.toLowerCase():ke};return j.replace(A,(function(le,ge){return ge||(function(he){switch(he){case"YY":return String(X.$y).slice(-2);case"YYYY":return L.s(X.$y,4,"0");case"M":return me+1;case"MM":return L.s(me+1,2,"0");case"MMM":return ne(ee.monthsShort,me,Ie,3);case"MMMM":return ne(Ie,me);case"D":return X.$D;case"DD":return L.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ne(ee.weekdaysMin,X.$W,we,2);case"ddd":return ne(ee.weekdaysShort,X.$W,we,3);case"dddd":return we[X.$W];case"H":return String(de);case"HH":return L.s(de,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return Q(de,pe,!0);case"A":return Q(de,pe,!1);case"m":return String(pe);case"mm":return L.s(pe,2,"0");case"s":return String(X.$s);case"ss":return L.s(X.$s,2,"0");case"SSS":return L.s(X.$ms,3,"0");case"Z":return ie}return null})(le)||ie.replace(":","")}))},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(U,X,ee){var j,ie=this,de=L.p(X),pe=K(U),me=(pe.utcOffset()-this.utcOffset())*n,we=this-pe,Ie=function(){return L.m(ie,pe)};switch(de){case y:j=Ie()/12;break;case v:j=Ie();break;case g:j=Ie()/3;break;case p:j=(we-me)/6048e5;break;case d:j=(we-me)/864e5;break;case f:j=we/o;break;case l:j=we/n;break;case u:j=we/r;break;default:j=we}return ee?j:L.a(j)},q.daysInMonth=function(){return this.endOf(v).$D},q.$locale=function(){return z[this.$L]},q.locale=function(U,X){if(!U)return this.$L;var ee=this.clone(),j=N(U,X,!0);return j&&(ee.$L=j),ee},q.clone=function(){return L.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},_})(),V=Y.prototype;return K.prototype=V,[["$ms",a],["$s",u],["$m",l],["$H",f],["$W",d],["$M",v],["$y",y],["$D",x]].forEach((function(_){V[_[1]]=function(q){return this.$g(q,_[0],_[1])}})),K.extend=function(_,q){return _.$i||(_(q,Y,K),_.$i=!0),K},K.locale=N,K.isDayjs=P,K.unix=function(_){return K(1e3*_)},K.en=z[S],K.Ls=z,K.p={},K}))})(O0)),O0.exports}var hD=fD();const pD=tl(hD);/**
|
|
909
|
+
* @license lucide-react v0.456.0 - ISC
|
|
910
|
+
*
|
|
911
|
+
* This source code is licensed under the ISC license.
|
|
912
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
913
|
+
*/const mD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o2=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
914
|
+
* @license lucide-react v0.456.0 - ISC
|
|
915
|
+
*
|
|
916
|
+
* This source code is licensed under the ISC license.
|
|
917
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
918
|
+
*/var gD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
919
|
+
* @license lucide-react v0.456.0 - ISC
|
|
920
|
+
*
|
|
921
|
+
* This source code is licensed under the ISC license.
|
|
922
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
923
|
+
*/const vD=$o(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:u,...l},f)=>ms("svg",{ref:f,...gD,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:o2("lucide",o),...l},[...u.map(([d,p])=>ms(d,p)),...Array.isArray(a)?a:[a]]));/**
|
|
924
|
+
* @license lucide-react v0.456.0 - ISC
|
|
925
|
+
*
|
|
926
|
+
* This source code is licensed under the ISC license.
|
|
927
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
928
|
+
*/const en=(e,t)=>{const r=$o(({className:n,...o},a)=>ms(vD,{ref:a,iconNode:t,className:o2(`lucide-${mD(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
929
|
+
* @license lucide-react v0.456.0 - ISC
|
|
930
|
+
*
|
|
931
|
+
* This source code is licensed under the ISC license.
|
|
932
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
933
|
+
*/const Ka=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
934
|
+
* @license lucide-react v0.456.0 - ISC
|
|
935
|
+
*
|
|
936
|
+
* This source code is licensed under the ISC license.
|
|
937
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
938
|
+
*/const bD=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
939
|
+
* @license lucide-react v0.456.0 - ISC
|
|
940
|
+
*
|
|
941
|
+
* This source code is licensed under the ISC license.
|
|
942
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
943
|
+
*/const Wa=en("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
944
|
+
* @license lucide-react v0.456.0 - ISC
|
|
945
|
+
*
|
|
946
|
+
* This source code is licensed under the ISC license.
|
|
947
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
948
|
+
*/const yD=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
949
|
+
* @license lucide-react v0.456.0 - ISC
|
|
950
|
+
*
|
|
951
|
+
* This source code is licensed under the ISC license.
|
|
952
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
953
|
+
*/const xD=en("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
954
|
+
* @license lucide-react v0.456.0 - ISC
|
|
955
|
+
*
|
|
956
|
+
* This source code is licensed under the ISC license.
|
|
957
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
958
|
+
*/const wD=en("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
959
|
+
* @license lucide-react v0.456.0 - ISC
|
|
960
|
+
*
|
|
961
|
+
* This source code is licensed under the ISC license.
|
|
962
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
963
|
+
*/const CD=en("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
|
|
964
|
+
* @license lucide-react v0.456.0 - ISC
|
|
965
|
+
*
|
|
966
|
+
* This source code is licensed under the ISC license.
|
|
967
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
968
|
+
*/const DD=en("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
969
|
+
* @license lucide-react v0.456.0 - ISC
|
|
970
|
+
*
|
|
971
|
+
* This source code is licensed under the ISC license.
|
|
972
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
973
|
+
*/const ED=en("MessageSquareDot",[["path",{d:"M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7",key:"uodpkb"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
974
|
+
* @license lucide-react v0.456.0 - ISC
|
|
975
|
+
*
|
|
976
|
+
* This source code is licensed under the ISC license.
|
|
977
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
978
|
+
*/const kD=en("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
979
|
+
* @license lucide-react v0.456.0 - ISC
|
|
980
|
+
*
|
|
981
|
+
* This source code is licensed under the ISC license.
|
|
982
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
983
|
+
*/const SD=en("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
984
|
+
* @license lucide-react v0.456.0 - ISC
|
|
985
|
+
*
|
|
986
|
+
* This source code is licensed under the ISC license.
|
|
987
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
988
|
+
*/const AD=en("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
989
|
+
* @license lucide-react v0.456.0 - ISC
|
|
990
|
+
*
|
|
991
|
+
* This source code is licensed under the ISC license.
|
|
992
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
993
|
+
*/const BD=en("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
|
|
994
|
+
* @license lucide-react v0.456.0 - ISC
|
|
995
|
+
*
|
|
996
|
+
* This source code is licensed under the ISC license.
|
|
997
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
998
|
+
*/const FD=en("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
999
|
+
* @license lucide-react v0.456.0 - ISC
|
|
1000
|
+
*
|
|
1001
|
+
* This source code is licensed under the ISC license.
|
|
1002
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1003
|
+
*/const ND=en("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
1004
|
+
* @license lucide-react v0.456.0 - ISC
|
|
1005
|
+
*
|
|
1006
|
+
* This source code is licensed under the ISC license.
|
|
1007
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1008
|
+
*/const $D=en("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Ou=({src:e,index:t,token:r,url:n,eventsEmit:o,...a})=>{const[u,l]=Tt(""),f=async v=>{try{const g=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:v})});if(!g.ok)throw new Error(`Fetch failed: ${g.status}`);return{data:await g.arrayBuffer()}}catch{return null}},d=async v=>{const g=await f(v);if(!g)return;const y=new Blob([g.data]);return window.URL.createObjectURL(y)},p=async v=>{const g=await d(v);l(g||"")};return Jt(()=>{try{if(!r||!n){l(e);return}p(e)}catch{l(e)}},[e]),G.jsx(G.Fragment,{children:u&&G.jsx(em,{src:u,...a,preview:!1},t||1)})},TD="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%207.99981C13.9999%209.26686%2013.5988%2010.5014%2012.854%2011.5264C12.1092%2012.5515%2011.059%2013.3144%209.85392%2013.7059C8.64886%2014.0974%207.3508%2014.0974%206.14576%2013.7058C4.94073%2013.3142%203.89059%2012.5512%203.14584%2011.5261C2.4011%2010.5011%201.99999%209.26653%202%207.99947C2.00001%206.73241%202.40114%205.49788%203.14589%204.47281C3.89065%203.44773%204.9408%202.68474%206.14584%202.29319C7.35088%201.90164%208.64895%201.90162%209.854%202.29314'%20stroke='%234E6EF2'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ap="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5260_38039)'%3e%3cpath%20d='M8.00004%2014.6668C11.6819%2014.6668%2014.6667%2011.6821%2014.6667%208.00016C14.6667%204.31826%2011.6819%201.3335%208.00004%201.3335C4.31814%201.3335%201.33337%204.31826%201.33337%208.00016C1.33337%2011.6821%204.31814%2014.6668%208.00004%2014.6668Z'%20fill='%234E6EF2'%20stroke='%234E6EF2'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%207.99984L7.33333%209.33317L10%206.6665'%20stroke='white'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5260_38039'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",OD="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5260_38091)'%3e%3cpath%20d='M7.99998%2014.6668C11.6819%2014.6668%2014.6666%2011.6821%2014.6666%208.00016C14.6666%204.31826%2011.6819%201.3335%207.99998%201.3335C4.31808%201.3335%201.33331%204.31826%201.33331%208.00016C1.33331%2011.6821%204.31808%2014.6668%207.99998%2014.6668Z'%20fill='%234E6EF2'%20stroke='%234E6EF2'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10%206L6%2010'%20stroke='white'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%206L10%2010'%20stroke='white'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5260_38091'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",RD="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.4867%2012L9.15333%202.66665C9.03704%202.46146%208.8684%202.29078%208.66462%202.17203C8.46083%202.05329%208.22919%201.99072%207.99333%201.99072C7.75747%201.99072%207.52584%202.05329%207.32205%202.17203C7.11826%202.29078%206.94962%202.46146%206.83333%202.66665L1.5%2012C1.38245%2012.2036%201.32082%2012.4346%201.32134%2012.6697C1.32186%2012.9047%201.38452%2013.1355%201.50296%2013.3385C1.62141%2013.5416%201.79143%2013.7097%201.9958%2013.8259C2.20016%2013.942%202.4316%2014.0021%202.66667%2014H13.3333C13.5673%2013.9997%2013.797%2013.938%2013.9995%2013.8208C14.202%2013.7037%2014.3701%2013.5354%2014.487%2013.3327C14.6039%2013.1301%2014.6654%2012.9002%2014.6653%2012.6663C14.6652%2012.4324%2014.6036%2012.2026%2014.4867%2012Z'%20fill='%234E6EF2'%20stroke='%234E6EF2'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%206V8.66667'%20stroke='white'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%2011.3335H8.00667'%20stroke='white'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",MD=Et.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
1009
|
+
padding: 12px 0 8px 0;
|
|
1010
|
+
`,ID=Et.div.attrs({className:"thought-chain-section-title-row"})`
|
|
1011
|
+
display: flex;
|
|
1012
|
+
align-items: center;
|
|
1013
|
+
gap: 8px;
|
|
1014
|
+
margin-bottom: 8px;
|
|
1015
|
+
padding-left: 20px;
|
|
1016
|
+
`,PD=Et.div.attrs({className:"thought-chain-section-title"})`
|
|
1017
|
+
font-size: 14px;
|
|
1018
|
+
font-weight: 600;
|
|
1019
|
+
color: #111827;
|
|
1020
|
+
`,zD=Qg`
|
|
1021
|
+
from {
|
|
1022
|
+
transform: rotate(0deg);
|
|
1023
|
+
}
|
|
1024
|
+
to {
|
|
1025
|
+
transform: rotate(360deg);
|
|
1026
|
+
}
|
|
1027
|
+
`,jD=Et.div.attrs({className:"thought-chain-section-icon"})`
|
|
1028
|
+
width: 16px;
|
|
1029
|
+
height: 16px;
|
|
1030
|
+
flex-shrink: 0;
|
|
1031
|
+
display: flex;
|
|
1032
|
+
align-items: center;
|
|
1033
|
+
justify-content: center;
|
|
1034
|
+
|
|
1035
|
+
img {
|
|
1036
|
+
width: 100%;
|
|
1037
|
+
height: 100%;
|
|
1038
|
+
object-fit: contain;
|
|
1039
|
+
display: block;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
${({$status:e})=>e==="in-progress"?pi`
|
|
1043
|
+
img {
|
|
1044
|
+
animation: ${zD} 1.5s linear infinite;
|
|
1045
|
+
}
|
|
1046
|
+
`:pi``}
|
|
1047
|
+
`,_D=Et.div.attrs({className:"thought-chain-vertical-line"})`
|
|
1048
|
+
position: absolute;
|
|
1049
|
+
left: 10px;
|
|
1050
|
+
top: 0;
|
|
1051
|
+
bottom: 0;
|
|
1052
|
+
width: 2px;
|
|
1053
|
+
background: #e5e7eb;
|
|
1054
|
+
z-index: 0;
|
|
1055
|
+
`,LD=Et.div.attrs({className:"thought-chain-content-container"})`
|
|
1056
|
+
position: relative;
|
|
1057
|
+
padding-left: 0px;
|
|
1058
|
+
margin-left: ${({$showTimeline:e})=>e?"18px":"0"};
|
|
1059
|
+
`,HD=Et.div.attrs({className:"thought-chain-node-item"})`
|
|
1060
|
+
display: flex;
|
|
1061
|
+
align-items: flex-start;
|
|
1062
|
+
gap: 12px;
|
|
1063
|
+
padding: ${({$showTimeline:e})=>e?"8px 0":"0"};
|
|
1064
|
+
position: relative;
|
|
1065
|
+
`,qD=Et.div.attrs({className:"thought-chain-node-content-area"})`
|
|
1066
|
+
flex: 1;
|
|
1067
|
+
margin-left: 20px;
|
|
1068
|
+
display: flex;
|
|
1069
|
+
flex-direction: column;
|
|
1070
|
+
gap: 4px;
|
|
1071
|
+
`,ip=Et.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
1072
|
+
font-size: 13px;
|
|
1073
|
+
line-height: 1.6;
|
|
1074
|
+
color: #374151;
|
|
1075
|
+
opacity: 0.7;
|
|
1076
|
+
`;function KD(e){return!e||e.length===0?"completed":e.some(t=>t.nodeStatus===1)?"in-progress":e.some(t=>t.nodeStatus===4)?"error":e.some(t=>t.nodeStatus===3)?"failed":"completed"}function WD(e){switch(e){case"in-progress":return G.jsx("img",{src:TD,alt:"\u8FDB\u884C\u4E2D"});case"completed":return G.jsx("img",{src:ap,alt:"\u5DF2\u5B8C\u6210"});case"failed":return G.jsx("img",{src:OD,alt:"\u5931\u8D25"});case"error":return G.jsx("img",{src:RD,alt:"\u5F02\u5E38"});default:return G.jsx("img",{src:ap,alt:"\u5DF2\u5B8C\u6210"})}}const Zi=({title:e,content:t,nodes:r,mode:n="history",showTimeline:o=!0,showHeader:a=!0})=>{if(!r||r.length===0)return null;const u=KD(r);return G.jsxs(MD,{children:[a&&G.jsxs(ID,{children:[G.jsx(jD,{$status:u,children:WD(u)}),G.jsx(PD,{children:e})]}),G.jsxs(LD,{$showTimeline:o,children:[o&&G.jsx(_D,{}),r.map(l=>{var d,p,v,g;const f=((d=l==null?void 0:l.rawContent)==null?void 0:d.type)==="markdown"||(l==null?void 0:l.format)==="markdown"||((p=l.content)==null?void 0:p.includes("```"))||((v=l.content)==null?void 0:v.includes("**"))||((g=l.content)==null?void 0:g.includes("##"));return G.jsx(HD,{$showTimeline:o,children:G.jsx(qD,{children:l.content&&(f?G.jsx(ip,{children:G.jsx(pl,{dataSource:{type:mi.MARKDOWN,content:l.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):G.jsx(ip,{className:o?"px-[15px]":"",children:l.content}))})},l.id)})]})]})},VD="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANzSURBVHgBlVbtUeMwEN2Vk5m7HwemgjMVwFVwUAAQKiAUcBAqwKmArwIIFRCgAKACoALcASEwcz/A2ntrSY5InB+nGU9sabX79PT0FKaodXrjjght4TXFM7KW7pOkfTc8/l5QQ+v0JC3LcdcYXtE5QlyIlaebs4VBiGEX+Dez8nlJIqtNiZhpwNzuh0IaL/JxCDBdam6FMe11ja8KbO2PLxHcYZLCGu4nQEIkqbXSQfodP2kkIv2EE7Fkc0WM+BGqDy1jpW4OCgsKcwZQd1cnC+vc6b2vWmsfNDkbi6pLxVcaXjJrTR4V8k1OjLE54kdT8anY5FkAANStGyrLtSqc6Go6uTbtuz5d7CqiiLIh+nrTyX38SEgu9L0sJTPR2ExwaJt7b8r3mlLCFVXU2fjz2qP5beSAoECZsP/gn02RuqFYX17FCB9YQwc+/kjpbZqDMVUVgaJHk1A51A9FpfxNB0Mt5+Edm3nOls4nY/aoqQDo9oXLR6OceX6hGtObIH9bg7pulZoJNCmqpy5Aa5t742e3Stc2euMuKlQq0v3jkAySvMXryJhymWx7B1I8rvNWCjO7w+Mfdy7+BXI0tyrHiJjcmNaFlY9bLaAK0ngOw+EskNug1CXGhnq5heTxCj2ouBV4FP0AZ2BXO2oVMZe7HCXXpMJBWZ+PNNPqvkJj/XumAJGrH6LqAiUlHfHJHb+yz1J/p7MF2lkcGw0gtpV9KaCbhGSHPrwP/RZKVyhopbU/nR70bAXUwWb0dPuxy6DIluv4VBvw3C3mGBwQJee1gkR62KMUMr2qUMFxgbobiqlimO3uFVSDuBWd5xWZV5u8uT9+djtfLsd2AfvuwtmOpJEiry7h/jCy51iR16cLSxw6QMsj0P+aTrK595oj1aFHqodyNLFp6cOT8uk54fxUZlfCYh0LdN+EUhNocf8J2XprAfqm5C6XPOmvml0rKeH7XDE11+zA7zZJ8uCQCwVrp/mt0ex+z4//RsJ6oXiE1fn4RvMBTcyO4wsCSzu4OVusLULvXGvfIVFRRaSVFFkp4Myh5GO1h/jO3t573ynJDsIqnRfB20GTc0bwzeAZl0YKqJEduxuMnCnmX264yZyMvD8FsDxBC0n6+7SehwsGK7swxgxnvchdpUiwhV1J4zlWqB+Y4Gn+3CUietyLeX9X/mfOP1bpFRs68mWiAAAAAElFTkSuQmCC",UD=Et.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
1077
|
+
width: 100%;
|
|
1078
|
+
border-radius: 8px;
|
|
1079
|
+
background-color: #f9fafb;
|
|
1080
|
+
padding: 12px 16px;
|
|
1081
|
+
box-sizing: border-box;
|
|
1082
|
+
`,GD=Et.div.attrs({className:"thought-chain-card-header"})`
|
|
1083
|
+
display: flex;
|
|
1084
|
+
align-items: center;
|
|
1085
|
+
justify-content: space-between;
|
|
1086
|
+
cursor: pointer;
|
|
1087
|
+
padding: 4px 0;
|
|
1088
|
+
`,XD=Et.div.attrs({className:"thought-chain-card-header-left"})`
|
|
1089
|
+
display: flex;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
gap: 8px;
|
|
1092
|
+
flex: 1;
|
|
1093
|
+
`,YD=Qg`
|
|
1094
|
+
from {
|
|
1095
|
+
transform: rotate(0deg);
|
|
1096
|
+
}
|
|
1097
|
+
to {
|
|
1098
|
+
transform: rotate(360deg);
|
|
1099
|
+
}
|
|
1100
|
+
`,JD=Et.div.attrs({className:"thought-chain-card-avatar"})`
|
|
1101
|
+
width: 25px;
|
|
1102
|
+
height: 25px;
|
|
1103
|
+
border-radius: 9999px;
|
|
1104
|
+
display: flex;
|
|
1105
|
+
align-items: center;
|
|
1106
|
+
justify-content: center;
|
|
1107
|
+
flex-shrink: 0;
|
|
1108
|
+
overflow: hidden;
|
|
1109
|
+
|
|
1110
|
+
img {
|
|
1111
|
+
width: 80%;
|
|
1112
|
+
height: 80%;
|
|
1113
|
+
object-fit: contain;
|
|
1114
|
+
${({$isRotating:e})=>e?pi`
|
|
1115
|
+
animation: ${YD} 2s linear infinite;
|
|
1116
|
+
`:""}
|
|
1117
|
+
}
|
|
1118
|
+
`,ZD=Et.div.attrs({className:"thought-chain-card-header-title"})`
|
|
1119
|
+
display: flex;
|
|
1120
|
+
align-items: center;
|
|
1121
|
+
gap: 6px;
|
|
1122
|
+
`,QD=Et.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1123
|
+
font-size: 14px;
|
|
1124
|
+
font-weight: 600;
|
|
1125
|
+
color: #111827;
|
|
1126
|
+
`,eE=Et.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1127
|
+
font-size: 12px;
|
|
1128
|
+
color: #6b7280;
|
|
1129
|
+
`,tE=Et.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1130
|
+
display: flex;
|
|
1131
|
+
align-items: center;
|
|
1132
|
+
flex-shrink: 0;
|
|
1133
|
+
`,rE=Et.div.attrs({className:"thought-chain-card-body"})`
|
|
1134
|
+
margin-top: 12px;
|
|
1135
|
+
display: flex;
|
|
1136
|
+
flex-direction: column;
|
|
1137
|
+
gap: 0;
|
|
1138
|
+
`,nE=Et.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1139
|
+
font-size: 12px;
|
|
1140
|
+
color: #9ca3af;
|
|
1141
|
+
`,oE=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:o})=>{const[a,u]=Tt(!1),l=yt(()=>{const x={};return(e||[]).forEach(C=>{x[C.businessType]||(x[C.businessType]=[]),x[C.businessType].push(C)}),x},[e]),f=yt(()=>typeof r=="number"?r===4:t==="live"?e.some(x=>x.nodeStatus===1):!1,[t,r,e]),d=yt(()=>!e||e.length===0?!1:e.every(x=>x.nodeStatus===2),[e]),p=yt(()=>typeof r=="number"?r===4?"\u6B63\u5728\u601D\u8003":"\u601D\u8003\u5B8C\u6210":f?"\u6B63\u5728\u601D\u8003":d?"\u601D\u8003\u5B8C\u6210":"\u6B63\u5728\u601D\u8003",[r,f,d]),v=yt(()=>{if(typeof o=="number"&&o>0){const m=o/1e3;if(Number.isFinite(m))return m}if(!e||e.length===0)return 0;const x=e.reduce((m,A)=>{var B;const F=(B=A.rawContent)==null?void 0:B.respTime;return typeof F=="number"&&!Number.isNaN(F)?m+F:m},0);if(!x)return 0;const C=x/1e3;return Number.isFinite(C)?C:0},[e,o]),g=yt(()=>v<=0?"":`\u7528\u65F6 ${v.toFixed(2)} \u79D2`,[v]),y=yt(()=>!e||e.length===0?!1:n?!!l.think&&l.think.length>0:!0,[e,l,n]);return G.jsxs(UD,{"data-mode":t,children:[G.jsxs(GD,{onClick:()=>u(x=>!x),children:[G.jsxs(XD,{children:[G.jsx(JD,{$isRotating:f,children:G.jsx("img",{src:VD,alt:"thinking"})}),G.jsxs(ZD,{children:[G.jsx(QD,{children:p}),g&&G.jsxs(eE,{children:["\xB7 ",g]})]})]}),G.jsx(tE,{children:a?G.jsx(Ka,{size:18,color:"#6b7280"}):G.jsx(Wa,{size:18,color:"#6b7280"})})]}),!a&&G.jsxs(rE,{children:[!y&&G.jsx(nE,{children:"\u5F53\u524D\u4F1A\u8BDD\u672A\u8FD4\u56DE\u7ED3\u6784\u5316\u601D\u7EF4\u94FE\u6570\u636E\u3002"}),n&&l.think&&l.think.length>0&&G.jsx(Zi,{title:(()=>{const x=l.think.every(C=>C.nodeStatus===2);return l.think.some(C=>C.nodeStatus===1)?"\u6A21\u578B\u601D\u8003\u4E2D":x?"\u6A21\u578B\u601D\u8003\u5B8C\u6210":"\u6A21\u578B\u601D\u8003\u4E2D"})(),nodes:l.think,mode:t,showTimeline:!1,showHeader:!1}),!n&&l.plan&&l.plan.length>0&&G.jsx(Zi,{title:(()=>{const x=l.plan.every(C=>C.nodeStatus===2);return l.plan.some(C=>C.nodeStatus===1)?"\u7406\u89E3\u89C4\u5212\u4E2D":x?"\u7406\u89E3\u89C4\u5212\u5B8C\u6210":"\u7406\u89E3\u89C4\u5212\u4E2D"})(),nodes:l.plan,mode:t}),!n&&l.retrieve&&l.retrieve.length>0&&G.jsx(Zi,{title:(()=>{const x=l.retrieve.every(C=>C.nodeStatus===2);return l.retrieve.some(C=>C.nodeStatus===1)?"\u53EC\u56DE\u4E2D":x?"\u53EC\u56DE\u6210\u529F":"\u53EC\u56DE\u4E2D"})(),nodes:l.retrieve,mode:t}),!n&&l.think&&l.think.length>0&&G.jsx(Zi,{title:(()=>{const x=l.think.every(C=>C.nodeStatus===2);return l.think.some(C=>C.nodeStatus===1)?"\u6A21\u578B\u601D\u8003\u4E2D":x?"\u6A21\u578B\u601D\u8003\u5B8C\u6210":"\u6A21\u578B\u601D\u8003\u4E2D"})(),nodes:l.think,mode:t})]})]})};function R0(e,t){if(t!==void 0){const r=t===2;switch(e){case"plan":return r?"\u7406\u89E3\u89C4\u5212\u5B8C\u6210":"\u7406\u89E3\u89C4\u5212\u4E2D";case"retrieve":return r?"\u53EC\u56DE\u6210\u529F":"\u53EC\u56DE\u4E2D";case"think":return r?"\u6A21\u578B\u601D\u8003\u5B8C\u6210":"\u6A21\u578B\u601D\u8003\u4E2D";case"reason":return r?"\u63A8\u7406\u5B8C\u6210":"\u63A8\u7406\u4E2D";default:return""}}switch(e){case"plan":return"\u7406\u89E3\u89C4\u5212\u5B8C\u6210";case"retrieve":return"\u53EC\u56DE\u6210\u529F";case"think":return"\u6A21\u578B\u601D\u8003\u5B8C\u6210";case"reason":return"\u63A8\u7406\u5B8C\u6210";default:return""}}function aE(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var u;const n=t.businessType||"plan",o=t.nodeStatus||2,a=t.content||((u=t==null?void 0:t.reply)==null?void 0:u.content)||"";return{id:`${n}-${r}`,businessType:n,nodeStatus:o,title:R0(n,o),content:a,rawContent:t}})}function zE(e,t){var l,f;const r=t.businessType;if(!r)return e;const n=[...e],o=n.findIndex(d=>d.businessType===r),a=((l=t.reply)==null?void 0:l.content)??"",u=t.nodeStatus??((f=n[o])==null?void 0:f.nodeStatus)??2;if(o===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:u,title:R0(r,u),content:a,rawContent:t});else{const d=n[o];n[o]={...d,nodeStatus:u,title:R0(r,u),content:d.content+a,rawContent:{...d.rawContent,lastChunk:t}}}return n}const iE=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:o,style:a,showCategoryIcon:u=!0,renderCategoryIcon:l})=>{const f=(t==null?void 0:t.theme)||{},d=y=>{r==null||r(y)},p=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},v=y=>l?l(y):u?G.jsx(DD,{size:16,style:{color:"#FFB800"}}):null,g=e.categories.filter(y=>y.visible!==!1);return!g||g.length===0?null:G.jsxs(sE,{className:`knowledge-base-document-list ${o||""}`,style:a,$theme:f,children:[G.jsx(lE,{children:e.title}),e.subtitle&&G.jsxs(uE,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),G.jsx(cE,{children:g.map((y,x)=>G.jsxs(dE,{onClick:()=>d(y),$theme:f,children:[v(y),G.jsx(fE,{children:y.name}),G.jsxs(hE,{children:["(",y.documentCount,")"]})]},y.id||x))}),e.showViewAll!==!1&&G.jsx(pE,{onClick:p,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},sE=Et.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1142
|
+
margin-bottom: 16px;
|
|
1143
|
+
padding: 16px;
|
|
1144
|
+
margin-left:25px;
|
|
1145
|
+
|
|
1146
|
+
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1147
|
+
border-radius: 8px;
|
|
1148
|
+
`,lE=Et.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1149
|
+
font-size: 18px;
|
|
1150
|
+
font-weight: 600;
|
|
1151
|
+
color: #1f2937;
|
|
1152
|
+
margin: 0 0 8px 0;
|
|
1153
|
+
`,uE=Et.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1154
|
+
font-size: 14px;
|
|
1155
|
+
color: #6b7280;
|
|
1156
|
+
margin-bottom: 12px;
|
|
1157
|
+
`,cE=Et.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1158
|
+
display: flex;
|
|
1159
|
+
flex-direction: column;
|
|
1160
|
+
gap: 8px;
|
|
1161
|
+
margin-bottom: 12px;
|
|
1162
|
+
`,dE=Et.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1163
|
+
display: flex;
|
|
1164
|
+
align-items: center;
|
|
1165
|
+
gap: 8px;
|
|
1166
|
+
padding: 8px 0;
|
|
1167
|
+
cursor: pointer;
|
|
1168
|
+
transition: all 0.2s ease;
|
|
1169
|
+
|
|
1170
|
+
&:hover {
|
|
1171
|
+
opacity: 0.8;
|
|
1172
|
+
}
|
|
1173
|
+
`,fE=Et.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1174
|
+
font-size: 14px;
|
|
1175
|
+
color: #1f2937;
|
|
1176
|
+
`,hE=Et.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1177
|
+
font-size: 14px;
|
|
1178
|
+
color: #6b7280;
|
|
1179
|
+
`,pE=Et.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1180
|
+
display: inline-block;
|
|
1181
|
+
font-size: 14px;
|
|
1182
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1183
|
+
text-decoration: none;
|
|
1184
|
+
cursor: pointer;
|
|
1185
|
+
transition: color 0.2s ease;
|
|
1186
|
+
|
|
1187
|
+
&:hover {
|
|
1188
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1189
|
+
text-decoration: underline;
|
|
1190
|
+
}
|
|
1191
|
+
`;function Ru(e,t,r=18){var u;const n=(e||"").toLowerCase(),o=((u=t==null?void 0:t.theme)==null?void 0:u.icons)||{},a=(l,f,d)=>{const p=[l,...d||[]];for(const v of p){const g=o[v];if(g){if(_e.isValidElement(g))return g;if(typeof g=="string")return G.jsx("img",{src:g,alt:v,style:{width:r,height:r}})}}return G.jsx(gs,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?a("image","Files/tupian_color",["png","jpg","jpeg"]):n==="pdf"?a("pdf","Files/pdf_color"):["doc","docx"].includes(n)?a("docx","Files/docx_color",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?a("sheets","Files/xls_color",["excel","xls","xlsx"]):n==="csv"?a("csv","Files/csv_color",["sheets","excel"]):["ppt","pptx"].includes(n)?a("pptx","Files/ppt_color",["ppt"]):n==="txt"||n==="md"?a("txt","Files/txt_color",["md"]):["zip","rar","7z"].includes(n)?a("archive","Files/yasuobao_color",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?a("odt","Files/odt_color"):["html","htm","url"].includes(n)?a("html","Files/lianjie_color",["htm","url"]):n==="json"?a("json","Files/unknow_color"):G.jsx(gs,{type:"Files/unknow_color",size:r})}function oa(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(oa(r.children)));return t}function mE(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const a=n[1].split(";").map(u=>u.trim()).filter(Boolean);t.push(...a)}const o=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=o.exec(e);){const a=n[1].split(";").map(u=>u.trim()).filter(Boolean);t.push(...a)}return Array.from(new Set(t))}function Qi(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function gE(e){const t=[];let r=1;const n=o=>{o.forEach(a=>{(a==null?void 0:a.type)==="retrieve-sql-data"&&(a!=null&&a.id)&&t.push({id:String(a.id),index:r++}),Array.isArray(a==null?void 0:a.children)&&a.children.length&&n(a.children)})};return Array.isArray(e)&&e.length&&n(e),t}const vE=Et.div.attrs({className:"chat-message-container"})`
|
|
1192
|
+
display: flex;
|
|
1193
|
+
flex-direction: column;
|
|
1194
|
+
margin-bottom: 0.5rem;
|
|
1195
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
1196
|
+
width: 100%;
|
|
1197
|
+
text-wrap: wrap;
|
|
1198
|
+
|
|
1199
|
+
${e=>e.$align==="right"&&`
|
|
1200
|
+
align-items: flex-end;
|
|
1201
|
+
`}
|
|
1202
|
+
|
|
1203
|
+
${e=>e.$align==="center"&&`
|
|
1204
|
+
align-items: center;
|
|
1205
|
+
`}
|
|
1206
|
+
|
|
1207
|
+
@keyframes fadeIn {
|
|
1208
|
+
from {
|
|
1209
|
+
opacity: 0;
|
|
1210
|
+
transform: translateY(10px);
|
|
1211
|
+
}
|
|
1212
|
+
to {
|
|
1213
|
+
opacity: 1;
|
|
1214
|
+
transform: translateY(0);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
`,bE=Et.div.attrs({className:"chat-message-header"})`
|
|
1218
|
+
display: flex;
|
|
1219
|
+
align-items: center;
|
|
1220
|
+
gap: 0.25rem;
|
|
1221
|
+
margin-bottom: 0.5rem;
|
|
1222
|
+
width: 100%;
|
|
1223
|
+
|
|
1224
|
+
${e=>e.$isUser&&`
|
|
1225
|
+
flex-direction: row-reverse;
|
|
1226
|
+
justify-content: end;
|
|
1227
|
+
`}
|
|
1228
|
+
`,yE=Et.div.attrs({className:"chat-message-avatar"})`
|
|
1229
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1230
|
+
border-radius: 50%;
|
|
1231
|
+
width: 2rem;
|
|
1232
|
+
height: 2rem;
|
|
1233
|
+
flex-shrink: 0;
|
|
1234
|
+
display: flex;
|
|
1235
|
+
align-items: center;
|
|
1236
|
+
justify-content: center;
|
|
1237
|
+
font-size: 1rem;
|
|
1238
|
+
`,xE=Et.div.attrs({className:"chat-message-content"})`
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
.message-time {
|
|
1241
|
+
font-size: 0.75rem;
|
|
1242
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.message-card {
|
|
1246
|
+
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1247
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1248
|
+
border-radius: 0.5rem;
|
|
1249
|
+
padding-top: 12px;
|
|
1250
|
+
padding-bottom: 12px;
|
|
1251
|
+
overflow: hidden;
|
|
1252
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1253
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1254
|
+
margin-right: ${e=>e.$isUser?"40px":"0"};
|
|
1255
|
+
padding: 0.25rem 1.8rem;
|
|
1256
|
+
.message-text {
|
|
1257
|
+
width: 100%;
|
|
1258
|
+
line-height: 1.6;
|
|
1259
|
+
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1260
|
+
border-radius: 0.5rem;
|
|
1261
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1262
|
+
font-size: 0.875rem;
|
|
1263
|
+
|
|
1264
|
+
/* 确保子元素也继承 white-space 属性 */
|
|
1265
|
+
& > * {
|
|
1266
|
+
white-space: pre-wrap !important;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
`,wE=Et.div.attrs({className:"chat-message-actions-container"})`
|
|
1271
|
+
margin-top: 0.5rem;
|
|
1272
|
+
display: flex;
|
|
1273
|
+
padding: 0.5rem;
|
|
1274
|
+
align-items: center;
|
|
1275
|
+
|
|
1276
|
+
gap: 0.75rem;
|
|
1277
|
+
|
|
1278
|
+
button {
|
|
1279
|
+
display: flex;
|
|
1280
|
+
align-items: center;
|
|
1281
|
+
gap: 0.25rem;
|
|
1282
|
+
font-size: 0.875rem;
|
|
1283
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1284
|
+
background: none;
|
|
1285
|
+
border: none;
|
|
1286
|
+
cursor: pointer;
|
|
1287
|
+
transition: color 0.2s;
|
|
1288
|
+
|
|
1289
|
+
&:hover {
|
|
1290
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
&.active {
|
|
1294
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
`,CE=Et.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1298
|
+
margin-top: 1rem;
|
|
1299
|
+
padding: 0 2.9rem;
|
|
1300
|
+
|
|
1301
|
+
border-radius: 0.5rem;
|
|
1302
|
+
|
|
1303
|
+
@keyframes followUpIn {
|
|
1304
|
+
from {
|
|
1305
|
+
opacity: 0;
|
|
1306
|
+
transform: translateY(6px);
|
|
1307
|
+
}
|
|
1308
|
+
to {
|
|
1309
|
+
opacity: 1;
|
|
1310
|
+
transform: translateY(0);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
.follow-up-title {
|
|
1315
|
+
font-size: 0.875rem;
|
|
1316
|
+
font-weight: 600;
|
|
1317
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1318
|
+
margin-bottom: 0.75rem;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.follow-up-list {
|
|
1322
|
+
display: flex;
|
|
1323
|
+
flex-direction: column;
|
|
1324
|
+
gap: 0.5rem;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.follow-up-item {
|
|
1328
|
+
width: fit-content;
|
|
1329
|
+
background: #ffffff;
|
|
1330
|
+
border: 1px solid #e5e7eb;
|
|
1331
|
+
border-radius: 0.375rem;
|
|
1332
|
+
padding: 0.75rem 1rem;
|
|
1333
|
+
cursor: pointer;
|
|
1334
|
+
transition: all 0.2s ease;
|
|
1335
|
+
text-align: left;
|
|
1336
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1337
|
+
font-size: 0.875rem;
|
|
1338
|
+
line-height: 1.4;
|
|
1339
|
+
opacity: 0;
|
|
1340
|
+
transform: translateY(6px);
|
|
1341
|
+
animation: followUpIn 280ms ease forwards;
|
|
1342
|
+
animation-play-state: running;
|
|
1343
|
+
|
|
1344
|
+
&:hover {
|
|
1345
|
+
background: #e5e7eb;
|
|
1346
|
+
border-color: #d1d5db;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
&:active {
|
|
1350
|
+
transform: translateY(1px);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
`,es=Et.div.attrs({className:"chat-message-reference-container"})`
|
|
1354
|
+
padding: 1rem;
|
|
1355
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1356
|
+
|
|
1357
|
+
border-radius: 0.5rem;
|
|
1358
|
+
|
|
1359
|
+
.reference-title {
|
|
1360
|
+
font-size: 0.875rem;
|
|
1361
|
+
font-weight: 600;
|
|
1362
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1363
|
+
margin-bottom: 0.75rem;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.reference-list {
|
|
1367
|
+
display: flex;
|
|
1368
|
+
flex-direction: column;
|
|
1369
|
+
gap: 0.5rem;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.reference-item {
|
|
1373
|
+
background: #ffffff;
|
|
1374
|
+
|
|
1375
|
+
border-radius: 0.375rem;
|
|
1376
|
+
padding: 0.75rem 0;
|
|
1377
|
+
display: flex;
|
|
1378
|
+
align-items: center;
|
|
1379
|
+
gap: 0.5rem;
|
|
1380
|
+
|
|
1381
|
+
.file-icon {
|
|
1382
|
+
width: 2rem;
|
|
1383
|
+
height: 2rem;
|
|
1384
|
+
background: #e2e8f0;
|
|
1385
|
+
border-radius: 0.25rem;
|
|
1386
|
+
display: flex;
|
|
1387
|
+
align-items: center;
|
|
1388
|
+
justify-content: center;
|
|
1389
|
+
font-size: 0.75rem;
|
|
1390
|
+
color: #64748b;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
.file-info {
|
|
1394
|
+
flex: 1;
|
|
1395
|
+
|
|
1396
|
+
.file-name {
|
|
1397
|
+
font-size: 0.875rem;
|
|
1398
|
+
font-weight: 500;
|
|
1399
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1400
|
+
margin-bottom: 0.25rem;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
.file-meta {
|
|
1404
|
+
font-size: 0.75rem;
|
|
1405
|
+
color: #64748b;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
.file-score {
|
|
1410
|
+
font-size: 0.75rem;
|
|
1411
|
+
color: #059669;
|
|
1412
|
+
font-weight: 500;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
`,DE=Et.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1416
|
+
position: fixed;
|
|
1417
|
+
top: 0;
|
|
1418
|
+
left: 0;
|
|
1419
|
+
right: 0;
|
|
1420
|
+
bottom: 0;
|
|
1421
|
+
background: rgba(0, 0, 0, 0.8);
|
|
1422
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
1423
|
+
align-items: center;
|
|
1424
|
+
justify-content: center;
|
|
1425
|
+
z-index: 1000;
|
|
1426
|
+
cursor: pointer;
|
|
1427
|
+
|
|
1428
|
+
.modal-content {
|
|
1429
|
+
max-width: 90vw;
|
|
1430
|
+
max-height: 90vh;
|
|
1431
|
+
position: relative;
|
|
1432
|
+
cursor: default;
|
|
1433
|
+
display: flex;
|
|
1434
|
+
flex-direction: column;
|
|
1435
|
+
align-items: center;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.modal-image {
|
|
1439
|
+
max-width: 100%;
|
|
1440
|
+
max-height: calc(90vh - 60px);
|
|
1441
|
+
object-fit: contain;
|
|
1442
|
+
border-radius: 8px;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
.modal-close {
|
|
1446
|
+
margin-top: 16px;
|
|
1447
|
+
background: rgba(255, 255, 255, 0.3);
|
|
1448
|
+
border: none;
|
|
1449
|
+
border-radius: 20px;
|
|
1450
|
+
padding: 8px 20px;
|
|
1451
|
+
display: flex;
|
|
1452
|
+
align-items: center;
|
|
1453
|
+
justify-content: center;
|
|
1454
|
+
cursor: pointer;
|
|
1455
|
+
font-size: 14px;
|
|
1456
|
+
color: #333;
|
|
1457
|
+
font-weight: 500;
|
|
1458
|
+
transition: all 0.2s ease;
|
|
1459
|
+
|
|
1460
|
+
&:hover {
|
|
1461
|
+
background: rgba(255, 255, 255, 1);
|
|
1462
|
+
transform: translateY(-1px);
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
`,Mu=Et.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1466
|
+
padding: 0rem 0.5rem;
|
|
1467
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1468
|
+
|
|
1469
|
+
.gallery-grid {
|
|
1470
|
+
display: grid;
|
|
1471
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1472
|
+
gap: 0.75rem;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.gallery-item {
|
|
1476
|
+
position: relative;
|
|
1477
|
+
aspect-ratio: 1;
|
|
1478
|
+
border-radius: 0.375rem;
|
|
1479
|
+
overflow: hidden;
|
|
1480
|
+
cursor: pointer;
|
|
1481
|
+
transition:
|
|
1482
|
+
transform 0.2s ease,
|
|
1483
|
+
box-shadow 0.2s ease;
|
|
1484
|
+
border: 2px solid transparent;
|
|
1485
|
+
|
|
1486
|
+
&:hover {
|
|
1487
|
+
transform: translateY(-2px);
|
|
1488
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1489
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.gallery-image {
|
|
1493
|
+
width: 100%;
|
|
1494
|
+
height: 100%;
|
|
1495
|
+
object-fit: cover;
|
|
1496
|
+
background: #f3f4f6;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
.gallery-overlay {
|
|
1500
|
+
position: absolute;
|
|
1501
|
+
bottom: 0;
|
|
1502
|
+
left: 0;
|
|
1503
|
+
right: 0;
|
|
1504
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1505
|
+
color: white;
|
|
1506
|
+
padding: 0.5rem;
|
|
1507
|
+
font-size: 0.75rem;
|
|
1508
|
+
text-align: center;
|
|
1509
|
+
opacity: 0;
|
|
1510
|
+
transition: opacity 0.2s ease;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
&:hover .gallery-overlay {
|
|
1514
|
+
opacity: 1;
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
`,jE=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:a="left",displayStatus:u="ready",avatar:l,isUser:f=!1,userAvatar:d,aiAvatar:p,date:v,time:g,timestamp:y,showTime:x=!0,errorMessage:C,styles:m,reference:A,webReference:F,databaseReference:B,graphReference:R,filePaths:S,currentFiles:z,fileManagerData:$,audioUrl:P,feedbackResult:N,queryId:K,defaultAnswer:L,isWelcome:Y=!1,isLast:V=!1,respTime:_,tokens:q,resultType:U,followUpQuestions:X=[],tools:ee={},eventsEmit:j,referenceMode:ie="list",enableThoughtChain:de=!1,thoughtChainVersionMode:pe="auto",chain:me,thoughtChainNodes:we,thoughtChainStatus:Ie,knowledgeBases:Z,enableCot:ne,chainRespTime:oe})=>{Jt(()=>{console.log("isUser",f),console.log("isLast",V)},[V,f]);const Q=Us(),le=yt(()=>{var I,Re,at,We,ye,Be,Ve,ct,ue,Ee,De;return{colors:{primary:((I=Q==null?void 0:Q.colors)==null?void 0:I.primary)||"#3b82f6",background:((Re=Q==null?void 0:Q.colors)==null?void 0:Re.background)||"#ffffff",userBackground:((at=Q==null?void 0:Q.colors)==null?void 0:at.primary)||"#3b82f6",border:((We=Q==null?void 0:Q.colors)==null?void 0:We.border)||"#e5e7eb",text:((ye=Q==null?void 0:Q.colors)==null?void 0:ye.text)||"#374151",disabled:((Be=Q==null?void 0:Q.colors)==null?void 0:Be.disabled)||"#6b7280",info:((Ve=Q==null?void 0:Q.colors)==null?void 0:Ve.info)||"#3b82f6",warning:((ct=Q==null?void 0:Q.colors)==null?void 0:ct.warning)||"#f59e0b",error:((ue=Q==null?void 0:Q.colors)==null?void 0:ue.error)||"#ef4444",...(Ee=m==null?void 0:m.theme)==null?void 0:Ee.colors},icons:{aiAvatar:p||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(De=m==null?void 0:m.theme)==null?void 0:De.icons}}},[Q,m,p,d]),ge=yt(()=>{const I=g||v||y;return!I||!x?null:pD(I).format("YY-MM-DD HH:mm:ss")},[g,v,y,x]),[he,ke]=Tt([]),[Ce,xe]=Tt(null),[Ae,$e]=Tt(!1),[He,pt]=Tt(!1),[it,Oe]=Tt(!1),[Le,Ke]=Tt(!1),[st,Ze]=Tt(!1),Qe=yt(()=>{if(!de)return[];if(pe==="v1")return[];if(Array.isArray(we)&&we.length)return we;const I=me||(n==null?void 0:n.chain),Re=aE(I);return ne===0?Re.filter(at=>at.businessType==="think"):Re},[de,pe,we,me,n,ne]),$t=()=>{if(de&&pe!=="v1")return null;const I={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:C||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:G.jsx(gs,{type:"rag/think",size:16})}}[u]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Re=typeof _=="number"&&_>0?`(\u7528\u65F6 ${(_/1e3).toFixed(2)} \u79D2)`:"";return G.jsx("div",{className:"think-header",children:G.jsx("div",{className:"think-header-left ml-[16px]",children:G.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[G.jsx("div",{className:"think-icon",children:I.icon}),G.jsx("div",{className:"think-title",children:I.text}),Re&&G.jsx("div",{className:"think-time",children:Re}),Ir&&G.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{Ze(!st)},children:G.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:st?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:G.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},wt=()=>{if(!de||pe==="v1"||f||!Qe.length)return null;let I=Ie;if(I===void 0){const at=n==null?void 0:n.status;typeof at=="number"?I=at:I=u==="ready"?2:4}const Re=ne===0;return G.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:G.jsx(oE,{mode:o==="stream"?"live":"history",nodes:Qe,status:I,simpleThinkOnly:Re,chainRespTime:oe})})},[nt,kt]=Tt([]),[ze,ce]=Tt(null),mt=yt(()=>{try{if(!A)return[];const I=JSON.parse(A);return Array.isArray(I)?I:[]}catch{return[]}},[A]),At=(I,Re)=>{var Ve,ct,ue;const at=((Ve=I==null?void 0:I.metadata)==null?void 0:Ve.source)||(I==null?void 0:I.file_path)||(I==null?void 0:I.path)||(I==null?void 0:I.convertedFilePath)||(I==null?void 0:I.parsedFilePath)||"",We=((ct=I==null?void 0:I.metadata)==null?void 0:ct.title)||(I==null?void 0:I.file_name)||"",ye=((ue=I==null?void 0:I.metadata)==null?void 0:ue.id)||(I==null?void 0:I.id)||(I==null?void 0:I.file_id)||"",Be=mt.find(Ee=>{var Vt,Rt,ut;const De=((Vt=Ee==null?void 0:Ee.metadata)==null?void 0:Vt.source)||(Ee==null?void 0:Ee.file_path)||(Ee==null?void 0:Ee.path)||(Ee==null?void 0:Ee.convertedFilePath)||(Ee==null?void 0:Ee.parsedFilePath)||"",Ye=((Rt=Ee==null?void 0:Ee.metadata)==null?void 0:Rt.title)||(Ee==null?void 0:Ee.file_name)||"",lt=((ut=Ee==null?void 0:Ee.metadata)==null?void 0:ut.id)||(Ee==null?void 0:Ee.id)||"";return ye&<&&String(ye)===String(lt)||at&&De&&De===at||We&&Ye&&Ye===We});if(Be){const Ee=(Be!=null&&Be.references&&Array.isArray(Be.references)?Be.references:[Be]).find(De=>String(De.order_num)===String(Re)||String(De.id)===String(Re));if(Ee)return Ee}for(const Ee of mt){if(Ee!=null&&Ee.references&&Array.isArray(Ee.references)){const De=Ee.references.find(Ye=>String(Ye.order_num)===String(Re)||String(Ye.id)===String(Re));if(De)return De}if(String(Ee.order_num)===String(Re)||String(Ee.id)===String(Re))return Ee}return null},Nt=(I,Re)=>{function at(ct,ue){for(const Ee of ct){if(Ee.references&&Array.isArray(Ee.references)){const De=Ee.references.find(Ye=>String(Ye.order_num)===String(ue)||String(Ye.id)===String(ue));if(De)return De}if(String(Ee.order_num)===String(ue)||String(Ee.id)===String(ue))return Ee}return null}let We=[];try{A&&(We=JSON.parse(A))}catch(ct){console.error("Failed to parse reference:",ct)}const ye=at(We,I.id),Be=ct=>{if(typeof n!="string")return;const ue=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ct}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(ue&&ue[1]){const Ee=Number(ue[1]);return Number.isNaN(Ee)?void 0:Ee}},Ve={tagInfo:{id:I==null?void 0:I.id,index:Be(String(I==null?void 0:I.id)),image_urls:(I==null?void 0:I.imageUrls)||(I==null?void 0:I.image_urls)||[]},fromtype:String((I==null?void 0:I.fromtype)??""),leaf:I,attributes:Re,referenceDoc:ye||void 0};if(String(I==null?void 0:I.fromtype)==="2"&&R)try{const ct=JSON.parse(R||"[]"),ue=(Array.isArray(ct)?ct:[]).find(Ee=>{if(Array.isArray(Ee==null?void 0:Ee.traceNodes))return Ee.traceNodes.some(Ye=>String(Ye==null?void 0:Ye.id)===String(I.id));const De=String(I.id||"").split("_")[0];return String(Ee==null?void 0:Ee.id)===De});ue&&(Ve.graph={id:ue.id,graphName:ue.graphName,fetchUrl:ue.fetchUrl,cyphers:ue.cyphers},Ve.traceNode=Array.isArray(ue.traceNodes)?ue.traceNodes.find(Ee=>String(Ee==null?void 0:Ee.id)===String(I.id)):void 0)}catch{}j==null||j("action_retrive_tag",Ve),j==null||j("retrive_tag:click",Ve)},Ct=I=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",I),console.log("databaseReference available:",!!B),I.id&&B){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",B);const Re=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:I.id,databaseReference:B}});console.log("Dispatching event:",Re),window.dispatchEvent(Re)}else console.log("Cannot send response - missing id or databaseReference")};_e.useEffect(()=>{const I=Re=>{Ct(Re.detail)};return window.addEventListener("retrieve-sql-data:request-data",I),()=>{window.removeEventListener("retrieve-sql-data:request-data",I)}},[B]),_e.useEffect(()=>{const I=Re=>{nr(Re.detail)};return window.addEventListener("rtext_pagination_click",I),()=>{window.removeEventListener("rtext_pagination_click",I)}},[ze]);const nr=I=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",I),I.replacePredataFunction&&ze){const Re={...ze,rows:ze.rows};I.replacePredataFunction(Re)}j==null||j("rtext_pagination_click",I)},Dt=Bt(new Map),zt=Bt(1),Qt=Bt(""),lr=Bt({0:1,1:1,2:1,3:1}),dt=yt(()=>{if(typeof n=="string"){let I=n;const Re=[];return K&&K!==Qt.current&&(Dt.current.clear(),zt.current=1,lr.current={0:1,1:1,2:1,3:1},Qt.current=K),o==="stream"&&(I=I.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(at,We)=>{const ye=We.match(/id=['"]([^'"]+)['"]/),Be=We.match(/fromType=['"]([^'"]+)['"]/);if(ye){const Ve=ye[1],ct=Be?Be[1]:"0";if(!Dt.current.has(Ve)){const Ee=lr.current,De=ct==="1"?"1":ct==="2"?"2":ct==="3"?"3":"0",Ye=Ee[De]??1;Dt.current.set(Ve,Ye),Ee[De]=Ye+1,lr.current=Ee}const ue=Dt.current.get(Ve);return`[retrive-tag${We}][${ue}][/retrive-tag]`}return at})),I=I.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,at=>{const We=at.match(/image_urls=['"]([^'"]+)['"]/);if(We){const ye=We[1].split(";").map(Be=>Be.trim()).filter(Boolean);Re.push(...ye)}return at}),Re.length>0&&ke(Re),I}return n},[n,o,K]),Xt=yt(()=>{if(typeof dt=="string")try{return qa(dt)}catch(I){return console.error("Failed to deserialize markdown:",I),[]}return[]},[dt]),Yt=St(I=>{if(!(!I||typeof dt!="string"))try{const Re=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${I}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(dt);if(Re&&Re[1]){const at=Number(Re[1]);return Number.isNaN(at)?Re[1]:at}}catch{}},[dt]),Gr=yt(()=>gE(Xt||[]),[Xt]),Mr=yt(()=>{const I={};return Gr.forEach(Re=>{Re!=null&&Re.id&&!I[Re.id]&&(I[Re.id]=Re.index)}),I},[Gr]);Jt(()=>{try{o==="stream"&&B&&(I=>{try{const Re=typeof I=="string"?JSON.parse(I):I;return Re?Array.isArray(Re)?Re:[Re]:[]}catch{return[]}})(B).forEach(I=>{const Re=I==null?void 0:I.id;if(!Re)return;const at=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Re,databaseReference:I}});window.dispatchEvent(at)})}catch{}},[o,B]);const Ir=yt(()=>{if(!Array.isArray(Xt))return!1;const I=at=>{for(const We of at)if(We.type==="think"||Array.isArray(We.children)&&I(We.children))return!0;return!1},Re=I(Xt);return console.log("Think detection:",{slateContent:Xt,hasThinkElement:Re,displayStatus:u,isUser:f}),Re},[Xt,u,f]),Pr=yt(()=>({databaseReference:B,...Ir&&{isThinkCollapsed:st}}),[B,Ir,st]),gr=yt(()=>l||(f?le.icons.userAvatar:le.icons.aiAvatar),[l,f,le.icons]),or=yt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(I=>typeof I=="string"?I:I.text||"").join(""):L||"",[n,L]),Ht=()=>{if(Y)return null;const I=[{key:"copy",show:ee.copy!==!1,icon:yD,label:"\u590D\u5236",onClick:()=>j==null?void 0:j("chatbox:copy",{content:or})},{key:"like",show:ee.like!==!1,icon:ND,label:"\u8D5E",onClick:()=>j==null?void 0:j("chatbox:like",{result:N,queryId:K}),active:N===1},{key:"dislike",show:ee.dislike!==!1,icon:FD,label:"\u8E29",onClick:()=>j==null?void 0:j("chatbox:dislike",{result:N,queryId:K}),active:N===0},{key:"repeat",show:!f&&V,icon:AD,label:"\u91CD\u53D1",onClick:()=>j==null?void 0:j("chatbox:repeat",{content:n,queryId:K,filePaths:S,audioUrl:P})},{key:"forward",show:ee.forward,icon:BD,label:"\u8F6C\u53D1",onClick:()=>j==null?void 0:j("chatbox:forward",{content:or,queryId:K})},{key:"delete",show:ee.delete,icon:$D,label:"\u5220\u9664",onClick:()=>j==null?void 0:j("chatbox:delete",{queryId:K})},{key:"edit",show:ee.edit,icon:kD,label:"\u7F16\u8F91",onClick:()=>j==null?void 0:j("chatbox:edit",{content:or,queryId:K})}];return G.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[G.jsx(wE,{$theme:le,children:I.filter(Re=>Re.show).map(Re=>{const at=Re.icon;return G.jsx(bs,{title:Re.label,placement:"top",children:G.jsx("button",{className:Re.active?"active":"",onClick:Re.onClick,children:G.jsx(at,{size:18})})},Re.key)})}),!f&&u=="ready"&&!Y&&G.jsxs("div",{className:"text-[12px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",G.jsx("span",{style:{color:le.colors.primary},children:q||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",G.jsx("span",{style:{color:le.colors.primary},children:((_||0)/1e3).toFixed(2)}),"\u79D2"]})]})},w=yt(()=>{if(!A)return[];let I=[];try{const ye=JSON.parse(A);I=Array.isArray(ye)?ye:[]}catch{return[]}let Re=I.map(ye=>{var Be;try{const Ve=ye.metadata||{};let ct="";Ve.type==="video"&&Ve.source_name&&typeof Ve.source_name=="string"?ct=Ve.source_name:ye.name&&typeof ye.name=="string"?ct=ye.name:ye.file_name&&typeof ye.file_name=="string"?ct=ye.file_name:Ve.title&&typeof Ve.title=="string"?ct=Ve.title:Ve.source&&typeof Ve.source=="string"?ct=Ve.source.split("/").pop()||"":ye.order_num?ct=String(ye.order_num):ct="\u672A\u77E5\u6587\u6863";let ue="pdf";if(Ve.type&&typeof Ve.type=="string")ue=Ve.type.toLowerCase();else if(ye.name&&typeof ye.name=="string"){const Rt=ye.name.split(".").pop();Rt&&(ue=Rt.toLowerCase())}else if(Ve.source&&typeof Ve.source=="string"){const Rt=Ve.source.split(".").pop();Rt&&(ue=Rt.toLowerCase())}else if(ye.file_path&&typeof ye.file_path=="string"){const Rt=ye.file_path.split(".").pop();Rt&&(ue=Rt.toLowerCase())}const Ee=ye.parsedFilePath||Ve.file_path||ye.file_path||ye.convertedFilePath||Ve.link||Ve.source_link||"",{metadata:De,...Ye}=ye,lt=Ve.source||"",Vt=Qi(ye.score??Ve.score);return{file_id:Ve.id||ye.uid||"",file_name:ct,file_type:ue,path:Ee,score:Vt,tags:[],parsedFilePath:ye.parsedFilePath,source:lt,...Ye}}catch(Ve){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Ve,ye);const{metadata:ct,...ue}=ye,Ee=((Be=ye.metadata)==null?void 0:Be.source)||ye.file_path||ye.convertedFilePath||"",De=Qi(ye.score);return{file_id:ye.uid||"",file_name:ye.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:ye.convertedFilePath||ye.file_path||"",score:De,tags:[],parsedFilePath:ye.parsedFilePath,source:Ee,...ue}}});const at=oa(Xt||[]);if(at&&at.length){const ye=at.filter(Ve=>Ve.fromtype==="0"),Be=at.filter(Ve=>Ve.fromtype==="3");Re=Re.map(Ve=>{const ct=ye.map(Ee=>{var Vt;const De=I.find(Rt=>String(Rt.order_num)===String(Ee.id));if(!De||!((Vt=De==null?void 0:De.metadata)!=null&&Vt.source))return null;const Ye=Ve.source||"",lt=De.metadata.source||"";return Ye&<&&Ye!==lt?null:{id:Ee.id||"",index:Yt(String(Ee.id))||Ee.indexId||"",image_urls:Ee.imageUrls?Array.isArray(Ee.imageUrls)?Ee.imageUrls:[Ee.imageUrls]:Ee.image_urls?Ee.image_urls.split(";").map(Rt=>Rt.trim()).filter(Boolean):[],metadata:De.metadata||{},order_num:De.order_num,parsedFilePath:De.parsedFilePath}}).filter(Ee=>Ee!==null),ue=Be.map(Ee=>{var Vt;const De=I.find(Rt=>String(Rt.order_num)===String(Ee.id));if(!De||!((Vt=De==null?void 0:De.metadata)!=null&&Vt.source))return null;const Ye=Ve.source||"",lt=De.metadata.source||"";return Ye&<&&Ye!==lt?null:{id:Ee.id||"",index:Yt(String(Ee.id))||Ee.indexId||"",image_urls:Ee.imageUrls?Array.isArray(Ee.imageUrls)?Ee.imageUrls:[Ee.imageUrls]:Ee.image_urls?Ee.image_urls.split(";").map(Rt=>Rt.trim()).filter(Boolean):[],metadata:De.metadata||{},order_num:De.order_num,parsedFilePath:De.parsedFilePath}}).filter(Ee=>Ee!==null);return{...Ve,tags:[...ct,...ue]}})}const We=new Map;return Re.filter(ye=>{const Be=(ye==null?void 0:ye.source)||ye.file_name;return Be?We.has(Be)?!1:(We.set(Be,!0),!0):!0}).sort((ye,Be)=>Number((Be==null?void 0:Be.score)??0)-Number((ye==null?void 0:ye.score)??0))},[A,Xt,dt,Yt]),E=yt(()=>{if(!F)return[];let I=[];try{const We=JSON.parse(F);I=Array.isArray(We)?We:[]}catch{return[]}if(!(I!=null&&I.length))return[];let Re=I.map(We=>{var Be,Ve,ct;const ye=(We==null?void 0:We.score)??((Be=We==null?void 0:We.metadata)==null?void 0:Be.score);return{link:(Ve=We==null?void 0:We.metadata)==null?void 0:Ve.link,file_name:(ct=We==null?void 0:We.metadata)==null?void 0:ct.title,score:Qi(ye),tags:[]}});const at=oa(Xt||[]);if(at&&at.length){const We=at.filter(ye=>ye.fromtype==="1");Re=Re.map(ye=>{const Be=We.map(Ve=>{var ue;const ct=I.find(Ee=>String(Ee.order_num)===String(Ve.id));return!ct||!((ue=ct==null?void 0:ct.metadata)!=null&&ue.title)||ct.metadata.title!==ye.file_name?null:{id:Ve.id||"",index:Yt(String(Ve.id))||Ve.indexId||"",image_urls:Ve.imageUrls?Array.isArray(Ve.imageUrls)?Ve.imageUrls:[Ve.imageUrls]:Ve.image_urls?Ve.image_urls.split(";").map(Ee=>Ee.trim()).filter(Boolean):[],metadata:ct.metadata||{},order_num:ct.order_num}}).filter(Ve=>Ve!==null);return{...ye,tags:Be}})}return Re.sort((We,ye)=>Number((ye==null?void 0:ye.score)??0)-Number((We==null?void 0:We.score)??0))},[F,Xt,dt,Yt]),Me=yt(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",R,"type:",typeof R),!R)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let I=[];try{if(typeof R=="string"){if(R==="[]"||R==="null"||R.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const We=JSON.parse(R);I=Array.isArray(We)?We:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",I.length)}else if(Array.isArray(R))I=R,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",I.length);else if(typeof R=="object"&&R!==null)I=[R],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",I.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof R,R),[]}catch(We){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",We,R),[]}let Re=I.map((We,ye)=>{const{metadata:Be,...Ve}=We;return{id:We.id||`graph-${ye}`,graphName:We.graphName||`\u56FE\u8C31${ye+1}`,tags:[],...Ve}});const at=oa(Xt||[]);if(at&&at.length){const We=at.filter(ye=>ye.fromtype==="2");Re=Re.map(ye=>{let Be=[];Array.isArray(ye.traceNodes)&&ye.traceNodes.length>0?Be=ye.traceNodes.map((ue,Ee)=>({id:ue.id,index:Yt(String(ue.id))??Ee+1,image_urls:[],metadata:ue.metadata||{},...ue})):Be=We.filter(ue=>String(ue.id)===String(ye.id)).map(ue=>({id:ue.id||"",index:Yt(String(ue.id))||ue.indexId||"",image_urls:ue.imageUrls?Array.isArray(ue.imageUrls)?ue.imageUrls:[ue.imageUrls]:ue.image_urls?ue.image_urls.split(";").map(Ee=>Ee.trim()).filter(Boolean):[],metadata:{}}));const Ve=new Set,ct=Be.filter(ue=>Ve.has(String(ue.id))?!1:(Ve.add(String(ue.id)),!0)).sort((ue,Ee)=>Number(ue.index)-Number(Ee.index));return{...ye,tags:ct}})}return Re},[R,Xt,dt,Yt]),O=yt(()=>{const I=[...oa(Xt||[]).filter(Re=>Re.imageUrls&&Array.isArray(Re.imageUrls)).flatMap(Re=>Re.imageUrls),...he];return Array.from(new Set(I))},[Xt,he]),te=yt(()=>typeof n!="string"?[]:mE(n),[n]),qt=yt(()=>Array.from(new Set([...O||[],...te||[]])),[O,te]),Pe=yt(()=>{var I,Re,at,We,ye,Be,Ve,ct;if(!B)return null;try{const ue=typeof B=="string"?JSON.parse(B):B;if(Array.isArray(ue)&&ue.length>0){const Ee=ue[0];if(Ee.retrieveSqlData)return{dataFetchUrl:Ee.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:Ee.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:Ee.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:Ee.retrieveSqlData.total||0,type:Ee.retrieveSqlData.type||"COLLECTION",preData:{columns:((Re=(I=Ee.retrieveSqlData.preData)==null?void 0:I[0])==null?void 0:Re.columns)||[],rows:((We=(at=Ee.retrieveSqlData.preData)==null?void 0:at[0])==null?void 0:We.data)||[]}}}return ue.retrieveSqlData?{dataFetchUrl:ue.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:ue.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:ue.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:ue.retrieveSqlData.total||0,type:ue.retrieveSqlData.type||"COLLECTION",preData:{columns:((Be=(ye=ue.retrieveSqlData.preData)==null?void 0:ye[0])==null?void 0:Be.columns)||[],rows:((ct=(Ve=ue.retrieveSqlData.preData)==null?void 0:Ve[0])==null?void 0:ct.data)||[]}}:{dataFetchUrl:ue.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:ue.databaseName||"\u6570\u636E\u5E93",tableName:ue.tableName||"\u6570\u636E\u8868",total:ue.total||0,type:ue.type||"COLLECTION",preData:ue.preData||{columns:[],rows:[]}}}catch(ue){return console.error("Failed to parse databaseReference:",ue),null}},[B]),bt=I=>{const{dataSourceType:Re,databaseName:at,businessTableName:We,tableName:ye}=I;return Re==="DataTable"?`${at||"\u6570\u636E\u5E93"} - ${We||"\u6570\u636E\u8868"}`:Re==="DirectDB"?`${at||"\u6570\u636E\u5E93"} - ${ye||"\u6570\u636E\u8868"}`:at||We||ye||"\u6570\u636E\u5E93"};_e.useEffect(()=>{ce(null),ke([])},[K]),_e.useEffect(()=>{var at;const I=We=>{try{const ye=typeof We=="string"?JSON.parse(We):We;return ye?Array.isArray(ye)?ye:[ye]:[]}catch(ye){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",ye),[]}},Re=(We,ye)=>{if(!Array.isArray(We))return[];const Be=ye!=null&&ye.id?String(ye.id):void 0,Ve=Be?Yt(Be):void 0,ct=Be?Mr[Be]:void 0,ue=Ve??ct??(ye==null?void 0:ye.referenceIndex)??void 0,Ee=Be&&ue!==void 0?[{id:Be,index:ue}]:[];return We.map(De=>{var Ye,lt,Vt,Rt;return{...De,id:De.id||Be||De.tableName,referenceId:Be,referenceIndex:ue,tags:Ee,fetchUrl:De.fetchUrl||((Ye=ye==null?void 0:ye.retrieveSqlData)==null?void 0:Ye.fetchUrl)||(Pe==null?void 0:Pe.dataFetchUrl)||"",databaseName:De.databaseName||((lt=ye==null?void 0:ye.retrieveSqlData)==null?void 0:lt.databaseName)||(Pe==null?void 0:Pe.databaseName)||"",tableName:De.tableName||((Vt=ye==null?void 0:ye.retrieveSqlData)==null?void 0:Vt.tableName)||(Pe==null?void 0:Pe.tableName)||"",dataSourceType:De.dataSourceType||((Rt=ye==null?void 0:ye.retrieveSqlData)==null?void 0:Rt.type)||(Pe==null?void 0:Pe.type)||"DataTable"}})};if(B){const We=I(B),ye=[];if(We.forEach(Be=>{var Ve,ct,ue;if(Array.isArray(Be==null?void 0:Be.retrieveTableDataList)&&Be.retrieveTableDataList.length)ye.push(...Re(Be.retrieveTableDataList,Be));else if(Array.isArray((ue=(ct=(Ve=Be==null?void 0:Be.retrieveSqlData)==null?void 0:Ve.preData)==null?void 0:ct[0])==null?void 0:ue.data)&&Be.retrieveSqlData.preData[0].data.length){const Ee={businessTableName:Be.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Be.retrieveSqlData.databaseName||(Pe==null?void 0:Pe.databaseName)||"\u6570\u636E\u5E93",tableName:Be.retrieveSqlData.tableName||(Pe==null?void 0:Pe.tableName)||"\u6570\u636E\u8868",fetchUrl:Be.retrieveSqlData.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",dataSourceType:Be.retrieveSqlData.type||"DirectDB",total:Be.retrieveSqlData.total};ye.push(...Re([Ee],Be))}}),ye.length>0){kt(ye);return}if((at=Pe==null?void 0:Pe.preData)!=null&&at.rows){const Be=Re(Pe.preData.rows,{});kt(Be);return}console.warn("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] \u672A\u627E\u5230\u53EF\u7528\u7684\u6570\u636E\u5E93\u6570\u636E")}else console.log("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] databaseReference \u4E0D\u5B58\u5728\uFF0C\u6E05\u7A7A databaseData");kt([])},[B,Pe,K,Mr,Yt]);const xt=St(()=>{try{const I=Array.isArray(w)?w:[],Re=Array.isArray(E)?E:[],at=Array.isArray(Me)?Me:[],We=qt,ye=oa(Xt||[]),Be=Ye=>typeof dt!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Ye}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(dt),Ve=Ye=>{const lt=new Map;return Ye.forEach(Vt=>{if(Vt.id){const Rt=String(Vt.id);if(!lt.has(Rt))lt.set(Rt,Vt);else{const ut=lt.get(Rt),_t=Number(Vt.index)||0,un=Number(ut.index)||0;(_t<un||_t===un&&!ut.index)&<.set(Rt,Vt)}}}),Array.from(lt.values())},ct=I.map(Ye=>({...Ye,tags:Ve((Ye.tags||[]).filter(lt=>lt.id&&Be(String(lt.id))))})),ue=Re.map(Ye=>({...Ye,tags:Ve((Ye.tags||[]).filter(lt=>lt.id&&Be(String(lt.id))))})),Ee=at.map(Ye=>({...Ye,tags:Ve((Ye.tags||[]).filter(lt=>lt.id&&Be(String(lt.id))))})),De=nt&&nt.length>0?nt.map(Ye=>({id:Ye.id||Ye.tableName||Ye.referenceId||"",databaseName:Ye.databaseName||(Pe==null?void 0:Pe.databaseName)||"",tableName:Ye.tableName||(Pe==null?void 0:Pe.tableName)||"",fetchUrl:Ye.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",score:Qi(Ye.score),tags:Ye.tags||[],referenceIndex:Ye.referenceIndex,metadata:Ye.metadata?{...Ye.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:K,knowledgeRefs:ct,webRefs:ue,graphRefs:Ee,databaseRefs:De,images:We,raw:{reference:A,webReference:F,graphReference:R,databaseReference:B,retriveNodes:ye}}}catch{return{queryId:K,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:A,webReference:F,graphReference:R,databaseReference:B,retriveNodes:[]}}}},[w,E,Me,Pe,nt,qt,Xt,K,A,F,R,B,dt]),et=yt(()=>{if(!f)return[];if(Array.isArray(z))return z;if(typeof z=="string"&&z)try{return JSON.parse(z)}catch{return[]}return[]},[f,z]),Ot=()=>{if(!f||et.length===0)return null;const I=ue=>{if(!ue)return"";if(typeof ue=="string"&&(ue.includes("KB")||ue.includes("MB")||ue.includes("GB")||ue.includes("B")))return ue;const Ee=typeof ue=="string"?parseFloat(ue)||0:ue;return Ee<1024?`${Ee}B`:Ee<1024*1024?`${(Ee/1024).toFixed(1)}KB`:`${(Ee/1024/1024).toFixed(1)}MB`},Re=ue=>ue!=null&&ue.status&&(String(ue.status).toLowerCase()==="uploading"||String(ue.status).toLowerCase()==="parsing")?!1:!!(ue!=null&&ue.url||ue!=null&&ue.filePath||ue!=null&&ue.convertedFilePath),at=et.filter(ue=>{const Ee=(ue.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(Ee.toLowerCase())}),We=et.filter(ue=>{const Ee=(ue.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(Ee.toLowerCase())}),ye=at.filter(Re),Be=at.filter(ue=>!Re(ue)),Ve=We.filter(Re),ct=We.filter(ue=>!Re(ue));return Ve.length+ct.length,G.jsxs("div",{className:"mt-4 mb-4",style:{width:"100%",paddingLeft:f?"0":"1.8rem",paddingRight:f?"1.8rem":"0",display:"flex",flexDirection:"column",alignItems:f?"flex-end":"flex-start"},children:[(ye.length>0||Be.length>0)&&G.jsx(Mu,{$theme:le,children:G.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Be.map((ue,Ee)=>{var De;return G.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:G.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((De=le.colors)==null?void 0:De.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${Ee}`)}),ye.map(ue=>G.jsxs("div",{className:"gallery-item",onClick:()=>{xe(ue.url||ue.filePath||null),j==null||j("reference_file:click",{...ue,file:ue.name,file_type:ue.file_type||"image",url:ue.url||ue.filePath,parse_url:ue.parseUrl||ue.convertedFilePath,retrieve_tags:ue.retrieveTags||[],file_id:ue.uid||ue.file_id,parsed_file_type:ue.parsed_file_type||"image",references:ue,type:ue.type||"image",isUploadFile:!0,pdfPages:ue.pdfPages||0})},children:[G.jsx(Ou,{src:ue.url||ue.filePath,alt:ue.name,className:"gallery-image",token:e,url:t}),G.jsx("div",{className:"gallery-overlay",children:ue.name})]},ue.uid||ue.name))]})}),(Ve.length>0||ct.length>0)&&G.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:G.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"flex-end",direction:"ltr",paddingLeft:f?"0":"0.5rem",paddingRight:f?"0.5rem":"0",justifyContent:"flex-end",width:"100%",maxWidth:"100%"},children:[ct.map((ue,Ee)=>{const De=(ue.name||"").split(".").pop()||"",Ye=Ru(De,m,18);return G.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all",children:[G.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:G.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:Ye})}),G.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:G.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[G.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),G.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${ue.uid||Ee}`)}),Ve.map(ue=>{var Vt;const Ee=(ue.name||"").split(".").pop()||"",De=ue.size??((Vt=ue.file)==null?void 0:Vt.size)??ue.fileSize,Ye=I(De),lt=Ru(Ee,m,18);return G.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] min-h-[56px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all hover:shadow-md hover:border-blue-300",style:{cursor:"pointer"},title:ue.name,onClick:()=>{j==null||j("reference_file:click",{...ue,file:ue.name,file_type:ue.file_type||Ee,url:ue.url||ue.filePath,parse_url:ue.parseUrl||ue.convertedFilePath,retrieve_tags:ue.retrieveTags||[],file_id:ue.uid||ue.file_id,parsed_file_type:ue.parsed_file_type||Ee,references:ue,type:ue.type||"file",isUploadFile:!0,pdfPages:ue.pdfPages||0})},children:[G.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:G.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:lt})}),G.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[G.jsx("div",{className:"flex",children:G.jsx("div",{className:"flex items-center justify-between gap-1.5",children:G.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:ue.name,children:ue.name})})}),G.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:Ye})]})]},ue.uid||ue.name)})]})})]})},ar=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",Z),!Z||!Array.isArray(Z)||Z.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const I=Z[0];if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - firstKB:",I),!I||!I.treeData||!Array.isArray(I.treeData))return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - firstKB \u6216 treeData \u65E0\u6548"),null;const Re=I.treeData.filter(We=>We.type==="dir").map((We,ye)=>({id:We.name||ye,name:We.name||"",documentCount:We.fileCount||0,visible:!0}));if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",Re),Re.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u76EE\u5F55\u7C7B\u578B\u7684\u5206\u7C7B"),null;const at={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:"\u6309\u76EE\u5F55\u5206\u7C7B",totalCount:Re.reduce((We,ye)=>We+ye.documentCount,0)||I.totalFileCount||0,categories:Re,showViewAll:!0,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",at),at},Br=()=>{if(f)return null;const I=ar();return I?G.jsx(iE,{data:I,styles:m,onCategoryClick:Re=>{j==null||j("knowledge_base_category:click",{category:Re,knowledgeBase:Z==null?void 0:Z[0]})},onViewAllClick:()=>{j==null||j("knowledge_base_view_all:click",{knowledgeBase:Z==null?void 0:Z[0]})}}):null},re=()=>{var Ee;if(f||u!=="ready")return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",ie),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",R),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",Me);const I=Array.isArray(w)?w:[],Re=Array.isArray(E)?E:[],at=Array.isArray(Me)?Me:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",I.length,"webList:",Re.length,"graphList:",at.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",at);const We=I.length>0&&U!==5,ye=Re.length>0,Be=at.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",We,"hasWebRefs:",ye,"hasGraphRefs:",Be);const Ve=qt.length>0,ct=nt&&nt.length>0,ue=We||ye||Be||Ve||ct;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",ue),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",B),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",nt),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",nt==null?void 0:nt.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",ct),ie==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",ue),!ue)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const De=We&&(I==null?void 0:I.length)||0,Ye=ye&&(Re==null?void 0:Re.length)||0,lt=Be&&(at==null?void 0:at.length)||0,Vt=ct&&(nt==null?void 0:nt.length)||0;let Rt=De+Ye+lt+Vt;return Rt===0&&Ve&&(Rt=1),G.jsxs(G.Fragment,{children:[Ve&&G.jsx(Mu,{$theme:le,children:G.jsx("div",{className:"gallery-grid",children:qt.map((ut,_t)=>G.jsxs("div",{className:"gallery-item",onClick:()=>{xe(ut),j==null||j("reference_file:click",{file:`\u56FE${_t+1}`,file_type:"image",url:ut,parse_url:ut,retrieve_tags:[],references:{url:ut},type:"image",isUploadFile:!1})},children:[G.jsx(Ou,{src:ut,alt:`\u56FE${_t+1}`,className:"gallery-image",token:e,url:t}),G.jsxs("div",{className:"gallery-overlay",children:["\u56FE",_t+1]})]},ut+_t))})}),G.jsx("div",{style:{padding:"6px 2.9rem"},children:G.jsxs("button",{style:{cursor:"pointer",color:((Ee=le.colors)==null?void 0:Ee.textDisabled)||"#86909C"},className:"text-sm flex items-center gap-x-1 px-3 py-1 rounded border border-gray-200 hover:border-blue-300 transition-colors",onClick:()=>{const ut=xt();j==null||j("references:click",ut)},onMouseEnter:ut=>{var _t;ut.currentTarget.style.color=((_t=le.colors)==null?void 0:_t.primary)||"#3b82f6"},onMouseLeave:ut=>{var _t;ut.currentTarget.style.color=((_t=le.colors)==null?void 0:_t.textDisabled)||"#86909C"},children:[G.jsx(CD,{size:16}),G.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Rt?` ${Rt}`:""]}),G.jsx(bD,{size:16})]})})]})}return ue?G.jsxs(G.Fragment,{children:[Ve&&G.jsx(Mu,{$theme:le,children:G.jsx("div",{className:"gallery-grid",children:qt.map((De,Ye)=>G.jsxs("div",{className:"gallery-item",onClick:()=>{xe(De),j==null||j("reference_file:click",{file:`\u56FE${Ye+1}`,file_type:"image",url:De,parse_url:De,retrieve_tags:[],references:{url:De},type:"image",isUploadFile:!1})},children:[G.jsx(Ou,{src:De,alt:`\u56FE${Ye+1}`,className:"gallery-image",token:e,url:t}),G.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Ye+1]})]},De+Ye))})}),We&&G.jsxs(es,{$theme:le,children:[G.jsx("div",{className:"reference-title justify-between items-center flex",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),G.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${I.length})`}),I.length>2&&G.jsx("div",{onClick:()=>$e(!Ae),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ae?G.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):G.jsx(Ka,{size:16,className:"text-[#b4b4b4]"})})]})}),G.jsx("div",{className:"reference-list",children:(Ae?I:I.slice(0,2)).map((De,Ye)=>De&&G.jsx("div",{className:"reference-item",children:G.jsxs("div",{className:"file-info flex items-end gap-2",children:[G.jsx("div",{className:"flex-shrink-0",children:(()=>{const lt=De.file_type||(De.file_name||"").split(".").pop()||"pdf",Vt=(De.file_name||"").split(".").pop()||"file";return lt==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(lt)?G.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:G.jsx(SD,{size:16,className:"text-red-600"})}):G.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Ru(Vt,m,16)})})()}),G.jsx("div",{className:"flex-1 min-w-0",children:G.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),j==null||j("knowledge_referenceFile_title:click",{data:{...De,file_type:De.file_type,file_name:De.file_name,metadata:De.metadata,parsedFilePath:De.parsedFilePath}})},children:De.file_name})}),G.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Vt=(De.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,_t)=>Number(ut.index)-Number(_t.index)),Rt=ut=>{if(typeof dt!="string")return ut;const _t=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(dt);return _t?_t[1]:ut};return Vt.slice(0,10).map(ut=>G.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:_t=>{_t.stopPropagation();const un=At(De,ut.id),wn=De.file_type==="video"?"3":"0";j==null||j("retrive_tag:click",{tagInfo:un||De,fromtype:wn,leaf:{id:ut.id,fromtype:wn},attributes:{}})},children:Rt(ut.id)},ut.id))})()}),typeof De.score=="number"&&G.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(De.score).toFixed(2)]}),De.file_type!=="video"&&G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx(wD,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:lt=>{r&&(lt.stopPropagation(),j==null||j("referenceFile_download",{data:{...De,file_type:De.file_type,file_name:De.file_name,metadata:De.metadata,parsedFilePath:De.parsedFilePath}}))}}),G.jsx("div",{className:"w-px h-4 bg-gray-300"}),G.jsx(ED,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:lt=>{lt.stopPropagation(),j==null||j("referenceFile_filechat",{data:{...De,file_type:De.file_type,file_name:De.file_name,metadata:De.metadata,parsedFilePath:De.parsedFilePath}})}})]})]})},De.file_id||Ye))})]}),ct&&G.jsxs(es,{$theme:le,children:[G.jsx("div",{className:"reference-title justify-between items-center flex",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),G.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${nt.length||0})`}),nt.length>2&&G.jsx("div",{onClick:()=>Oe(!it),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:it?G.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):G.jsx(Ka,{size:16,className:"text-[#b4b4b4]"})})]})}),G.jsx("div",{className:"reference-list",children:(it?nt:nt.slice(0,2)).map((De,Ye)=>G.jsx("div",{className:"reference-item",children:G.jsxs("div",{className:"file-info flex items-end gap-2",children:[G.jsx("div",{className:"flex-shrink-0",children:G.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:G.jsx(xD,{size:20,className:"text-blue-600"})})}),G.jsx("div",{className:"flex-1 min-w-0",children:G.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),j==null||j("database_referenceFile_title:click",{data:{...De,file_type:"database",file_name:bt(De),metadata:De,parsedFilePath:De.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",file:De.databaseName||"database",url:De.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",parse_url:De.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",retrieve_tags:De.tags||[],references:De,type:"database",isUploadFile:!1}})},children:bt(De)})}),G.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(De.tags)&&De.tags.length?De.tags:[{id:De.referenceId||`database-${Ye}`,index:De.referenceIndex??Ye+1}]).map(lt=>G.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:lt.index??Ye+1},`${lt.id||"database"}-${lt.index}`))}),typeof De.score=="number"&&G.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(De.score).toFixed(2)]})]})},De.tableName||Ye))})]}),ye&&G.jsxs(es,{$theme:le,children:[G.jsx("div",{className:"reference-title justify-between items-center flex",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),G.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Re.length})`}),Re.length>2&&G.jsx("div",{onClick:()=>pt(!He),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:He?G.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):G.jsx(Ka,{size:16,className:"text-[#b4b4b4]"})})]})}),G.jsx("div",{className:"reference-list",children:(He?Re:Re.slice(0,2)).map((De,Ye)=>G.jsx("div",{className:"reference-item",children:G.jsxs("div",{className:"file-info flex items-end gap-2",children:[G.jsx("div",{className:"flex-shrink-0",children:G.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:G.jsx(gs,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),G.jsx("div",{className:"flex-1 min-w-0",children:G.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),j==null||j("web_referenceFile_title:click",{data:{...De,file_type:De.file_type,file_name:De.file_name,metadata:De.metadata,parsedFilePath:De.parsedFilePath,file:De.file_name,url:De.link,parse_url:De.link,retrieve_tags:De.tags||[],references:De,type:"file",isUploadFile:!1}})},children:De.file_name})}),G.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Vt=(De.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,_t)=>Number(ut.index)-Number(_t.index)),Rt=ut=>{if(typeof dt!="string")return ut;const _t=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(dt);return _t?_t[1]:ut};return Vt.slice(0,1).map(ut=>G.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:_t=>{_t.stopPropagation();const un=At(De,ut.id);j==null||j("retrive_tag:click",{tagInfo:un||De,fromtype:"1",leaf:{id:ut.id,fromtype:"1"},attributes:{}})},children:Rt(ut.id)},ut.id))})()}),typeof De.score=="number"&&G.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(De.score).toFixed(2)]})]})},(De.link||"")+Ye))})]}),Be&&G.jsxs(es,{$theme:le,children:[G.jsx("div",{className:"reference-title justify-between items-center flex",children:G.jsxs("div",{className:"flex items-center gap-2",children:[G.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),G.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${at.length})`}),at.length>2&&G.jsx("div",{onClick:()=>Ke(!Le),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Le?G.jsx(Wa,{size:16,className:"text-[#b4b4b4]"}):G.jsx(Ka,{size:16,className:"text-[#b4b4b4]"})})]})}),G.jsx("div",{className:"reference-list",children:(Le?at:at.slice(0,2)).map((De,Ye)=>G.jsx("div",{className:"reference-item",children:G.jsxs("div",{className:"file-info flex items-end gap-2",children:[G.jsx("div",{className:"flex-shrink-0",children:G.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:G.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),G.jsx("div",{className:"flex-1 min-w-0",children:G.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:De.graphName||`\u56FE\u8C31${Ye+1}`})}),G.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Vt=(De.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,_t)=>Number(ut.index)-Number(_t.index)),Rt=ut=>{if(typeof dt!="string")return null;const _t=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(dt);return _t?_t[1]??null:null};return Vt.map(ut=>({tag:ut,num:Rt(ut.id)})).filter(ut=>ut.num!==null&&ut.num!==void 0&&ut.num!=="").slice(0,10).map(({tag:ut,num:_t})=>G.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:un=>{un.stopPropagation();const wn=Array.isArray(De.traceNodes)?De.traceNodes.find(Fr=>String(Fr==null?void 0:Fr.id)===String(ut.id)):void 0;j==null||j("retrive_tag:click",{tagInfo:{id:ut.id,index:ut.index,image_urls:ut.image_urls||[]},fromtype:"2",graph:{id:De.id,graphName:De.graphName,fetchUrl:De.fetchUrl,cyphers:De.cyphers},traceNode:wn})},children:_t},ut.id))})()})]})},De.id||Ye))})]})]}):null},vr=()=>f||!V||!X||X.length===0?null:G.jsx(CE,{$theme:le,children:G.jsx("div",{className:"follow-up-list",children:X.map((I,Re)=>G.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Re*260}ms`},onClick:()=>{j==null||j("chatbox:follow_up_question_click",{question:I,queryId:K})},children:I},`${String(I)}-${Re}`))})});return G.jsxs(vE,{$align:a,$isUser:f,children:[G.jsxs(bE,{$isUser:f,children:[G.jsx(yE,{$src:gr,$isUser:f}),ge&&G.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:ge})]}),Ot(),G.jsx(xE,{$isUser:f,$theme:le,children:G.jsx("div",{className:"message-card",children:G.jsx("div",{className:"message-text",children:o==="stream"?G.jsxs(G.Fragment,{children:[!f&&$t(),wt(),G.jsx(pl,{dataSource:{type:mi.MARKDOWN,content:dt},styles:{letterSpacing:m==null?void 0:m.letterSpacing,lineHeight:m==null?void 0:m.lineHeight,templateField:m==null?void 0:m.templateField,text:m==null?void 0:m.text},theme:{...m==null?void 0:m.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Nt,eventsEmit:j,extraProps:Pr},`md-${(dt||"").length}-think-${st}`)]}):G.jsx("div",{style:{whiteSpace:"pre-wrap"},children:or})})})}),Br(),re(),!f&&Ht(),vr(),typeof document<"u"&&i4(G.jsx(DE,{$show:Ce!==null,onClick:()=>xe(null),children:Ce&&G.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[G.jsx("img",{src:Ce,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),G.jsx("button",{className:"modal-close",onClick:()=>xe(null),children:"\u5173\u95ED"})]})}),document.body)]})},EE=Et.div`
|
|
1518
|
+
position: relative;
|
|
1519
|
+
width: 100%;
|
|
1520
|
+
height: 100%;
|
|
1521
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1522
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1523
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1524
|
+
/* 移动端滚动支持 */
|
|
1525
|
+
-webkit-overflow-scrolling: touch;
|
|
1526
|
+
touch-action: pan-y;
|
|
1527
|
+
|
|
1528
|
+
/* 自定义滚动条 */
|
|
1529
|
+
&::-webkit-scrollbar {
|
|
1530
|
+
width: 8px;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
&::-webkit-scrollbar-track {
|
|
1534
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1535
|
+
border-radius: 4px;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
&::-webkit-scrollbar-thumb {
|
|
1539
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1540
|
+
border-radius: 4px;
|
|
1541
|
+
|
|
1542
|
+
&:hover {
|
|
1543
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
`,kE=Et.div`
|
|
1547
|
+
position: relative;
|
|
1548
|
+
width: 100%;
|
|
1549
|
+
height: 100%;
|
|
1550
|
+
overflow: auto;
|
|
1551
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1552
|
+
|
|
1553
|
+
/* 自定义滚动条 */
|
|
1554
|
+
&::-webkit-scrollbar {
|
|
1555
|
+
width: 8px;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
&::-webkit-scrollbar-track {
|
|
1559
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1560
|
+
border-radius: 4px;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
&::-webkit-scrollbar-thumb {
|
|
1564
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1565
|
+
border-radius: 4px;
|
|
1566
|
+
|
|
1567
|
+
&:hover {
|
|
1568
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
`,sp=Et.div`
|
|
1572
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
1573
|
+
min-height: ${e=>e.height||"auto"};
|
|
1574
|
+
|
|
1575
|
+
/* 富文本内容样式增强 */
|
|
1576
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
1577
|
+
scroll-margin-top: 2rem;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
& img {
|
|
1581
|
+
max-width: 100%;
|
|
1582
|
+
height: auto;
|
|
1583
|
+
border-radius: 0.5rem;
|
|
1584
|
+
margin: 1rem 0;
|
|
1585
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
1586
|
+
transition: transform 0.2s ease-in-out;
|
|
1587
|
+
|
|
1588
|
+
&:hover {
|
|
1589
|
+
transform: scale(1.02);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/* 表格样式 - 主题感知 */
|
|
1594
|
+
& .table-container {
|
|
1595
|
+
overflow: auto;
|
|
1596
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1597
|
+
border-radius: 6px;
|
|
1598
|
+
margin: 1rem 0;
|
|
1599
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
& .table-container table {
|
|
1603
|
+
width: 100%;
|
|
1604
|
+
border-collapse: collapse;
|
|
1605
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1606
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
& .table-container th,
|
|
1610
|
+
& .table-container td {
|
|
1611
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
1612
|
+
padding: 8px 12px;
|
|
1613
|
+
text-align: left;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
& .table-container th {
|
|
1617
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1618
|
+
font-weight: 600;
|
|
1619
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
& .table-container td {
|
|
1623
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
& .table-container tr:nth-child(even) {
|
|
1627
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
& pre {
|
|
1631
|
+
position: relative;
|
|
1632
|
+
|
|
1633
|
+
&::before {
|
|
1634
|
+
content: '';
|
|
1635
|
+
position: absolute;
|
|
1636
|
+
top: 0;
|
|
1637
|
+
left: 0;
|
|
1638
|
+
right: 0;
|
|
1639
|
+
height: 2px;
|
|
1640
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1641
|
+
border-radius: 2px 2px 0 0;
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
& blockquote {
|
|
1646
|
+
position: relative;
|
|
1647
|
+
|
|
1648
|
+
&::before {
|
|
1649
|
+
content: '"';
|
|
1650
|
+
position: absolute;
|
|
1651
|
+
top: -0.5rem;
|
|
1652
|
+
left: -1rem;
|
|
1653
|
+
font-size: 3rem;
|
|
1654
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1655
|
+
opacity: 0.3;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
`,SE=Et.div`
|
|
1661
|
+
display: flex;
|
|
1662
|
+
align-items: center;
|
|
1663
|
+
justify-content: center;
|
|
1664
|
+
padding: 2rem;
|
|
1665
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1666
|
+
font-size: 0.875rem;
|
|
1667
|
+
|
|
1668
|
+
&::before {
|
|
1669
|
+
content: '';
|
|
1670
|
+
width: 20px;
|
|
1671
|
+
height: 20px;
|
|
1672
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1673
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1674
|
+
border-radius: 50%;
|
|
1675
|
+
animation: spin 1s linear infinite;
|
|
1676
|
+
margin-right: 0.5rem;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
@keyframes spin {
|
|
1680
|
+
0% { transform: rotate(0deg); }
|
|
1681
|
+
100% { transform: rotate(360deg); }
|
|
1682
|
+
}
|
|
1683
|
+
`,AE=Et.div`
|
|
1684
|
+
display: flex;
|
|
1685
|
+
flex-direction: column;
|
|
1686
|
+
align-items: center;
|
|
1687
|
+
justify-content: center;
|
|
1688
|
+
padding: 3rem;
|
|
1689
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1690
|
+
text-align: center;
|
|
1691
|
+
|
|
1692
|
+
&::before {
|
|
1693
|
+
content: '📄';
|
|
1694
|
+
font-size: 3rem;
|
|
1695
|
+
margin-bottom: 1rem;
|
|
1696
|
+
}
|
|
1697
|
+
`,BE=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:u=!1,size:l="sm",basePath:f,theme:d={},onChange:p,onScroll:v,onScrollToTop:g,onScrollToBottom:y,onSegmentClick:x,className:C,style:m,height:A="100%"})=>{const F=Us(),B=yt(()=>{var le,ge,he,ke,Ce,xe,Ae,$e,He;return{primaryColor:(d==null?void 0:d.primaryColor)||((le=F==null?void 0:F.colors)==null?void 0:le.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((ge=F==null?void 0:F.colors)==null?void 0:ge.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((he=F==null?void 0:F.colors)==null?void 0:he.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((ke=F==null?void 0:F.colors)==null?void 0:ke.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((Ce=F==null?void 0:F.colors)==null?void 0:Ce.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((xe=F==null?void 0:F.colors)==null?void 0:xe.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Ae=F==null?void 0:F.colors)==null?void 0:Ae.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||(($e=F==null?void 0:F.space)==null?void 0:$e.radius)||"8px",padding:(d==null?void 0:d.padding)||((He=F==null?void 0:F.space)==null?void 0:He.padding)||"1rem",scrollbarTrack:(d==null?void 0:d.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(d==null?void 0:d.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(d==null?void 0:d.scrollbarThumbHover)||"#a8a8a8",...d}},[F,d]),R=Bt(0);R.current+=1,console.log("[Markdownit] render count:",R.current);const[S,z]=Tt([]),[$,P]=Tt({start:0,end:10}),[N,K]=Tt(0),[L,Y]=Tt(0),[V,_]=Tt(!1),[q,U]=Tt(!1),[X,ee]=Tt(!1),j=Bt(null),ie=Bt(null),de=Bt(null),pe=yt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Jt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(pe)?pe.length:"n/a"),z(pe)},[pe]);const me=yt(()=>t?`${S.length*r}px`:"auto",[S.length,r,t]),we=yt(()=>{if(!t)return S;const le=Math.max(0,$.start-n),ge=Math.min(S.length,$.end+n);return S.slice(le,ge).map((he,ke)=>({...he,virtualIndex:le+ke}))},[S,$,t,n]),Ie=St(le=>{const{scrollTop:ge,scrollHeight:he,clientHeight:ke}=le.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:ge,scrollHeight:he,clientHeight:ke});const Ce=!t&&!v&&!g&&!y&&!o;if(console.log("[Markdownit] passiveOnly:",Ce),Ce||K(xe=>xe!==ge?(console.log("[Markdownit] setScrollTop:",ge),ge):xe),t&&!Ce){const xe=Math.floor(ge/r),Ae=Math.min(S.length,xe+Math.ceil(L/r)+1);P($e=>$e.start!==xe||$e.end!==Ae?(console.log("[Markdownit] setVisibleRange:",{start:xe,end:Ae}),{start:xe,end:Ae}):$e)}if(!Ce){const xe=ge<=10;xe!==q&&(console.log("[Markdownit] isAtTop ->",xe),U(xe),xe&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!Ce){const xe=ge+ke>=he-10;xe!==X&&(console.log("[Markdownit] isAtBottom ->",xe),ee(xe),xe&&y&&(console.log("[Markdownit] onScrollToBottom callback"),y()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:ge,scrollHeight:he}),v(ge,he)),o&&a&&!V&&!u&&he-ge-L<100&&Z()},[t,r,S.length,L,o,a,V,u,q,X,g,y,v]),Z=St(async()=>{if(!(!a||V||u)){_(!0);try{const le=S[S.length-1],ge=await a(le.id);z(he=>[...he,...ge])}catch(le){console.error("Failed to load more segments:",le)}finally{_(!1)}}},[a,S,V,u]);Jt(()=>{const le=()=>{j.current&&Y(j.current.clientHeight)};return le(),window.addEventListener("resize",le),()=>window.removeEventListener("resize",le)},[]);const ne=St((le,ge)=>{const he={type:le.type,content:le.content},ke=t?{position:"absolute",top:`${(le.virtualIndex||ge)*r}px`,left:0,right:0,height:`${r}px`}:{};return G.jsx("div",{style:ke,onClick:()=>x==null?void 0:x(le.id,le),className:x?"cursor-pointer hover:bg-gray-50":"",children:G.jsx(pl,{dataSource:he,isEditing:!1,size:l,basePath:f,theme:B,onChange:p,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto"}})},le.id)},[t,r,B,p,x]),oe=()=>(console.log("[Markdownit] renderContent segments.len:",S.length,"enableVirtualScroll:",t),S.length===0?G.jsxs(AE,{theme:B,children:[G.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),G.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?G.jsx("div",{ref:de,style:{height:me,position:"relative"},children:we.map(ne)}):G.jsx("div",{ref:de,children:S.map(ne)})),Q=()=>!V&&!u?null:G.jsx(SE,{theme:B,children:u?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return G.jsx(EE,{ref:j,theme:B,$isVirtualized:t,className:C,style:{height:A,...m},children:t?G.jsx(kE,{ref:ie,theme:B,onScroll:Ie,children:G.jsx(sp,{theme:B,height:me,children:oe()})}):G.jsxs(sp,{theme:B,onScroll:Ie,children:[oe(),Q()]})})},_E=e=>{const{onRendered:t}=e;return Jt(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),G.jsx("div",{"data-markdownit-root":"1",children:G.jsx(BE,{...e})})};Et.div`
|
|
1698
|
+
background: #f6f8fa;
|
|
1699
|
+
border: 1px solid #d0d7de;
|
|
1700
|
+
border-radius: 6px;
|
|
1701
|
+
padding: 16px;
|
|
1702
|
+
margin-bottom: 20px;
|
|
1703
|
+
`;Et.p`
|
|
1704
|
+
margin: 0 0 16px 0;
|
|
1705
|
+
color: #656d76;
|
|
1706
|
+
font-size: 14px;
|
|
1707
|
+
line-height: 1.5;
|
|
1708
|
+
`;const lp=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const u=o[0],l=o[1]||"",f=(o[2]||"").trim(),d=o.index,p=d+u.length;if(d>n){const A=e.slice(n,d);A.trim()!==""&&(r.push({text:A}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:A}))}const v=A=>{const F=new RegExp(`${A}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1709
|
+
])*?)\\1`,"i"),B=l.match(F);return B?B[2]:void 0},g=/\S/.test(l),y=v("key"),x=v("placeholder"),C=y||`template-${Date.now()}-${a++}`,m={type:"template",key:C,placeholder:g?x||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:g?f:"",style:"blue",fieldId:C,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=p}if(n<e.length){const u=e.slice(n);u.trim()!==""&&(r.push({text:u}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:u}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},Iu=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",u=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=o.value||"",f=` key="${String(a)}" placeholder="${String(u)}"`;r+=`<template${f}>${l}</template>`,n=l||u}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},FE=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},NE=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
1710
|
+
${n.value||n.placeholder}\`\`\`
|
|
1711
|
+
\`\`\`
|
|
1712
|
+
`)}),r},$E=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",u=n.value||"",l=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${l}>${u}</template>`}}),r},LE=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var y,x,C,m,A,F,B,R,S,z,$,P,N,K,L,Y,V,_,q,U,X,ee,j,ie,de,pe,me,we,Ie,Z,ne,oe,Q,le,ge,he,ke,Ce,xe,Ae,$e,He,pt,it,Oe,Le,Ke,st,Ze,Qe,$t,wt;const a=Us(),u={theme:{colors:{primary:((y=a==null?void 0:a.colors)==null?void 0:y.primary)||"#055AFF",secondary:((x=a==null?void 0:a.colors)==null?void 0:x.secondary)||"#84ADFF",background:((C=a==null?void 0:a.colors)==null?void 0:C.background)||"#E5EEFF",text:((m=a==null?void 0:a.colors)==null?void 0:m.text)||"#055AFF",border:((A=a==null?void 0:a.colors)==null?void 0:A.border)||"#84ADFF",success:((F=a==null?void 0:a.colors)==null?void 0:F.success)||"#008000",warning:((B=a==null?void 0:a.colors)==null?void 0:B.warning)||"#FFA500",error:((R=a==null?void 0:a.colors)==null?void 0:R.error)||"#FF0000",info:((S=a==null?void 0:a.colors)==null?void 0:S.info)||"#0000FF",disabled:((z=a==null?void 0:a.colors)==null?void 0:z.disabled)||"#808080",disabledBackground:(($=a==null?void 0:a.colors)==null?void 0:$.disabledBackground)||"#F5F5F5",disabledText:((P=a==null?void 0:a.colors)==null?void 0:P.disabledText)||"#808080",shadow:((N=a==null?void 0:a.colors)==null?void 0:N.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((K=a==null?void 0:a.colors)==null?void 0:K.appBackground)||"transparent",listBackground:((L=a==null?void 0:a.colors)==null?void 0:L.listBackground)||"#f9f9f9",dashboardBackground:((Y=a==null?void 0:a.colors)==null?void 0:Y.dashboardBackground)||"#ffffff",textSecondary:((V=a==null?void 0:a.colors)==null?void 0:V.textSecondary)||"#6b7280"},space:{sidebar:((_=a==null?void 0:a.space)==null?void 0:_.sidebar)||"260px",size:((q=a==null?void 0:a.space)==null?void 0:q.size)||"12px",radius:((U=a==null?void 0:a.space)==null?void 0:U.radius)||"6px",padding:((X=a==null?void 0:a.space)==null?void 0:X.padding)||"16px",margin:((ee=a==null?void 0:a.space)==null?void 0:ee.margin)||"20px",shadow:((j=a==null?void 0:a.space)==null?void 0:j.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((ie=a==null?void 0:a.space)==null?void 0:ie.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((pe=(de=a==null?void 0:a.fonts)==null?void 0:de.body)==null?void 0:pe.size)||"14px",weight:((we=(me=a==null?void 0:a.fonts)==null?void 0:me.body)==null?void 0:we.weight)||"normal",family:((Z=(Ie=a==null?void 0:a.fonts)==null?void 0:Ie.body)==null?void 0:Z.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((oe=(ne=a==null?void 0:a.fonts)==null?void 0:ne.heading)==null?void 0:oe.size)||"16px",weight:((le=(Q=a==null?void 0:a.fonts)==null?void 0:Q.heading)==null?void 0:le.weight)||"600",family:((he=(ge=a==null?void 0:a.fonts)==null?void 0:ge.heading)==null?void 0:he.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((ke=a==null?void 0:a.others)==null?void 0:ke.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},l={backgroundColor:((Ce=a==null?void 0:a.colors)==null?void 0:Ce.background)||"#E5EEFF",borderColor:((xe=a==null?void 0:a.colors)==null?void 0:xe.border)||"#84ADFF",borderRadius:((Ae=a==null?void 0:a.space)==null?void 0:Ae.radius)||"6px",padding:(($e=a==null?void 0:a.space)==null?void 0:$e.padding)||"8px 12px",margin:"2px",fontSize:((pt=(He=a==null?void 0:a.fonts)==null?void 0:He.body)==null?void 0:pt.size)||"14px",fontWeight:((Oe=(it=a==null?void 0:a.fonts)==null?void 0:it.body)==null?void 0:Oe.weight)||"500",minWidth:"30px",textColor:((Le=a==null?void 0:a.colors)==null?void 0:Le.text)||"#84ADFF"},f={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(Ke=u.theme)==null?void 0:Ke.colors,...(st=n==null?void 0:n.theme)==null?void 0:st.colors},space:{...(Ze=u.theme)==null?void 0:Ze.space,...(Qe=n==null?void 0:n.theme)==null?void 0:Qe.space},fonts:{...($t=u.theme)==null?void 0:$t.fonts,...(wt=n==null?void 0:n.theme)==null?void 0:wt.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[d,p]=Tt(()=>lp(e));Jt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const nt=lp(e);console.log("\u65B0\u7684Slate\u6570\u636E:",nt),p(nt)},[e]),Jt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",d)},[d]);const v=St((nt,kt)=>{if(kt===mi.SLATE&&nt){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",nt),p(nt);const ze=Iu(nt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",ze),t==null||t(ze)}},[t]),g=St(nt=>{if(!d||d.length===0)return"";switch(nt){case"pure_string":return FE(d);case"string":return Iu(d);case"markdown":return NE(d);case"html":return $E(d);default:return Iu(d)}},[d]);return Jt(()=>{o==null||o(g)},[g,o]),G.jsx(pl,{dataSource:{type:mi.SLATE,content:d},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:v,size:"md",styles:f,enableTemplateInput:!0})};export{Q0 as D,po as F,mi as K,cc as T,zE as i,_E as l,jE as o,LE as u};
|