bi-components-library 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
- (function(Ee,q){typeof exports=="object"&&typeof module<"u"?q(exports,require("react/jsx-runtime"),require("react"),require("antd"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","antd","@ant-design/icons","react-dom"],q):(Ee=typeof globalThis<"u"?globalThis:Ee||self,q(Ee.SealSeekBIComponents={},Ee.React,Ee.React,Ee.antd,Ee.AntdIcons,Ee.ReactDOM))})(this,function(Ee,q,L,ce,ht,rn){"use strict";const Ei=({variant:e="primary",loading:t=!1,children:n,...r})=>{const a=i=>{switch(i){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return q.jsx(ce.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ei.__docgenInfo={displayName:"Button",description:"基础按钮,用于触发操作",props:{variant:{name:"variant",required:!1,description:"视觉风格",type:{name:"ButtonVariant",raw:'"primary" | "ghost" | "dashed" | "link" | "text"'},defaultValue:{value:'"primary"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: MouseEvent) => void"}}}};const bi=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>q.jsx(ce.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});bi.__docgenInfo={displayName:"Card",description:"卡片容器,用于分组内容",props:{title:{name:"title",required:!1,description:"标题",type:{name:"ReactNode",raw:"React.ReactNode"}},children:{name:"children",required:!1,description:"内容区域",type:{name:"ReactNode",raw:"React.ReactNode"}},bordered:{name:"bordered",required:!1,description:"是否显示边框",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},hoverable:{name:"hoverable",required:!1,description:"是否可悬停",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},size:{name:"size",required:!1,description:"卡片大小",type:{name:"CardSize",raw:'"default" | "small"'},defaultValue:{value:'"default"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},actions:{name:"actions",required:!1,description:"卡片操作组",type:{name:"ReactNode[]",raw:"React.ReactNode[]"}}}};const Ti=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>q.jsxs(q.Fragment,{children:[q.jsx(a,{}),q.jsx(i,{})]}):null;return q.jsx(ce.Modal,{...t,footer:n})};Ti.__docgenInfo={displayName:"AppModal",description:"应用级模态框组件,基于 Ant Design Modal 封装",props:{showDefaultFooter:{name:"showDefaultFooter",required:!1,description:"是否显示默认的确定和取消按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},title:{name:"title",required:!1,description:"模态框标题",type:{name:"ReactNode",raw:"React.ReactNode"}},open:{name:"open",required:!1,description:"是否显示模态框",type:{name:"boolean",raw:"boolean"}},onCancel:{name:"onCancel",required:!1,description:"取消按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},onOk:{name:"onOk",required:!1,description:"确定按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},children:{name:"children",required:!1,description:"模态框内容",type:{name:"ReactNode",raw:"React.ReactNode"}},width:{name:"width",required:!1,description:"模态框宽度",type:{name:"string | number",raw:"string | number"}},centered:{name:"centered",required:!1,description:"是否居中显示",type:{name:"boolean",raw:"boolean"}},maskClosable:{name:"maskClosable",required:!1,description:"点击蒙层是否允许关闭",type:{name:"boolean",raw:"boolean"}}}};const yi=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>q.jsx(ce.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});yi.__docgenInfo={displayName:"PageTable",description:"页面级表格组件,高度铺满容器,自动滚动",props:{scrollX:{name:"scrollX",required:!1,description:"水平滚动宽度",type:{name:"number",raw:"number"}},showPagination:{name:"showPagination",required:!1,description:"是否显示分页器",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},columns:{name:"columns",required:!1,description:"表格列配置",type:{name:"ColumnType[]",raw:"ColumnType<any>[]"}},dataSource:{name:"dataSource",required:!1,description:"数据源",type:{name:"any[]",raw:"any[]"}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},rowKey:{name:"rowKey",required:!1,description:"行数据的 Key",type:{name:"string | function",raw:"string | ((record: any) => string)"}}}};const dl=ht.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),xi=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return q.jsx(dl,{...a,type:e,style:i})};xi.__docgenInfo={displayName:"XcIcon",description:"自定义图标组件,基于 iconfont",props:{name:{name:"name",required:!0,description:"图标名称",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"图标大小",type:{name:"number | string",raw:"number | string"}},color:{name:"color",required:!1,description:"图标颜色",type:{name:"string",raw:"string"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Ci=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?q.jsxs(ce.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[q.jsx(ce.Spin,{size:"large"}),a&&q.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):q.jsx(ce.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:q.jsx(ce.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});Ci.__docgenInfo={displayName:"EmptyAndSpin",description:"空状态和加载状态组合组件",props:{loading:{name:"loading",required:!0,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},description:{name:"description",required:!1,description:"空状态描述",type:{name:"ReactNode",raw:"React.ReactNode"},defaultValue:{value:'"暂无数据"'}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},emptyChildren:{name:"emptyChildren",required:!1,description:"空状态额外内容",type:{name:"ReactNode",raw:"React.ReactNode"}},loadingText:{name:"loadingText",required:!1,description:"加载中提示文字",type:{name:"string",raw:"string"}},emptyImage:{name:"emptyImage",required:!1,description:"空状态图片",type:{name:"string",raw:"string"}}}};const Si=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>q.jsx(ce.Button,{size:r,type:a,icon:q.jsx(ht.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});Si.__docgenInfo={displayName:"BackButton",description:"返回按钮组件",props:{onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"() => void"}},showText:{name:"showText",required:!1,description:"是否显示文字",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'},defaultValue:{value:'"small"'}},type:{name:"type",required:!1,description:"按钮类型",type:{name:"ButtonType",raw:'"primary" | "default" | "dashed" | "link" | "text"'},defaultValue:{value:'"default"'}}}};const Ai=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return q.jsx(ce.Button,{type:"link",...n,className:r,children:n.children})};Ai.__docgenInfo={displayName:"LinkButton",description:"链接样式按钮组件,适用于表格操作列",props:{removePadding:{name:"removePadding",required:!1,description:"是否去除默认内边距",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLButtonElement>) => void"}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}}}};const{Option:fl}=ce.Select,_i=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:o=!0,externalParams:u={},...l})=>{const[d,p]=L.useState([]),[E,c]=L.useState(!1),[y,h]=L.useState({current:1,pageSize:i,total:0}),[m,g]=L.useState({}),[b,T]=L.useState({}),[_]=ce.Form.useForm(),w=L.useRef(y);w.current=y;const C=L.useRef(u);C.current=u;const O=L.useRef(!1),A=L.useMemo(()=>e.map(N=>{const{sortable:x,render:H,...U}=N;return{...U,sorter:x?!0:void 0,render:H||($=>$)}}),[e]),S=L.useCallback(async(N={})=>{if(t){c(!0);try{const x={page:w.current.current,pageSize:w.current.pageSize,sortField:b.field,sortOrder:b.order,searchParams:{...m,...C.current},...N},H=await t(x);H.success&&(p(H.data),h(U=>({...U,total:H.total,current:x.page||U.current})))}catch(x){console.error("加载数据失败:",x)}finally{c(!1)}}},[t,b,m]),k=L.useCallback(N=>{g(N),h(x=>({...x,current:1}))},[]),I=L.useCallback(()=>{_.resetFields(),g({}),h(N=>({...N,current:1}))},[_]),M=L.useCallback(()=>{S()},[S]),B=L.useCallback((N,x,H)=>{const U={current:N.current||1,pageSize:N.pageSize||i,total:N.total||0},$={field:H?.field,order:H?.order};h(U),T($)},[i]);return L.useEffect(()=>{const N=Object.keys(u).length>0;(o&&!O.current||N)&&(S(),O.current=!0)},[o,u,S]),q.jsxs("div",{children:[r&&n.length>0&&q.jsx(ce.Card,{size:"small",style:{marginBottom:16},children:q.jsxs(ce.Form,{form:_,layout:"inline",onFinish:k,initialValues:n.reduce((N,x)=>(x.defaultValue!==void 0&&(N[x.key]=x.defaultValue),N),{}),children:[n.map(N=>q.jsx(ce.Form.Item,{name:N.key,label:N.label,children:N.type==="input"?q.jsx(ce.Input,{placeholder:N.placeholder||`请输入${N.label}`,style:{width:200}}):q.jsx(ce.Select,{placeholder:N.placeholder||`请选择${N.label}`,style:{width:200},allowClear:!0,children:N.options?.map(x=>q.jsx(fl,{value:x.value,children:x.label},x.value))})},N.key)),q.jsx(ce.Form.Item,{children:q.jsxs(ce.Space,{children:[q.jsx(ce.Button,{type:"primary",htmlType:"submit",icon:q.jsx(ht.SearchOutlined,{}),children:"查询"}),q.jsx(ce.Button,{onClick:I,children:"重置"}),a&&q.jsx(ce.Button,{icon:q.jsx(ht.ReloadOutlined,{}),onClick:M,children:"刷新"})]})})]})}),q.jsx(ce.Table,{...l,columns:A,dataSource:d,loading:E,pagination:{...y,showSizeChanger:!0,showQuickJumper:!0,showTotal:(N,x)=>`第 ${x[0]}-${x[1]} 条/共 ${N} 条`,pageSizeOptions:s},onChange:B,scroll:{x:"max-content",y:"50vh"}})]})};_i.__docgenInfo={displayName:"AdvancedTable",description:"高阶表格组件,支持异步请求、搜索、排序等功能",props:{columns:{name:"columns",required:!0,description:"列配置",type:{name:"AdvancedColumnType[]",raw:"AdvancedColumnType<any>[]"}},request:{name:"request",required:!1,description:"异步请求函数",type:{name:"function",raw:"(params: RequestParams) => Promise<RequestResponse>"}},searchFields:{name:"searchFields",required:!1,description:"搜索字段配置",type:{name:"SearchFieldConfig[]",raw:"SearchFieldConfig[]"},defaultValue:{value:"[]"}},showSearch:{name:"showSearch",required:!1,description:"是否显示搜索区域",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},showRefresh:{name:"showRefresh",required:!1,description:"是否显示刷新按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},pageSizeOptions:{name:"pageSizeOptions",required:!1,description:"页面大小选项",type:{name:"string[]",raw:"string[]"},defaultValue:{value:'["10", "20", "50", "100"]'}},autoLoad:{name:"autoLoad",required:!1,description:"是否自动加载",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},externalParams:{name:"externalParams",required:!1,description:"外部请求参数",type:{name:"Record<string, any>",raw:"Record<string, any>"},defaultValue:{value:"{}"}}}};const pl=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",o=L.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[u,l]=L.useState(s||void 0),[d,p]=L.useState(64),E=L.useRef(null),c=m=>{l(m),e.setAttribute("data-value",m),t(n,m)};L.useEffect(()=>{l(s||void 0)},[s]);const y=L.useCallback(()=>{if(u!=null&&u!==""){const m=o.find(g=>String(g.value)===String(u));return m?typeof m.label=="string"?m.label:String(m.label??u):String(u)}return r||"请选择"},[u,o,r]),h=L.useCallback(()=>{const m=E.current;if(!m)return;const g=m.querySelector(".ant-select-selection-item"),b=m.querySelector(".ant-select-selection-placeholder"),T=g||b,_=(T?.textContent||"").trim()||y(),w=m.querySelector(".ant-select-selector"),C=T||w||m,O=window.getComputedStyle(C),A=T?O.fontSize:"16px",S=O.fontFamily||"sans-serif",k=O.fontWeight||"400",M=`${O.fontStyle||"normal"} ${k} ${A} ${S}`,N=document.createElement("canvas").getContext("2d"),x=N?Math.ceil((N.font=M,N.measureText(_).width||0)):0;let H=0;if(w){const J=window.getComputedStyle(w);H=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const U=m.querySelector(".ant-select-arrow"),$=U?Math.ceil(U.getBoundingClientRect().width):12,V=m.querySelector(".ant-select-clear");let v=0;if(V){const J=window.getComputedStyle(V);J.display!=="none"&&J.visibility!=="hidden"&&(v=Math.ceil(V.getBoundingClientRect().width))}const Y=Math.max(36,x+H+$+v+6);p(J=>J===Y?J:Y)},[y]);return L.useLayoutEffect(()=>{const m=window.requestAnimationFrame(()=>{h()}),g=window.setTimeout(()=>{h()},60);return()=>{window.cancelAnimationFrame(m),window.clearTimeout(g)}},[h]),L.useEffect(()=>{if(!("fonts"in document))return;let m=!1;const g=document.fonts;if(g?.ready)return g.ready.then(()=>{m||h()}),()=>{m=!0}},[h]),rn.createPortal(q.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:E,style:{display:"inline-block",width:d},children:q.jsx(ce.Select,{value:u,onChange:c,placeholder:r||"请选择",style:{width:"100%"},options:o,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:q.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},hl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(pl,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`select-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},ml=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",o=L.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[u,l]=L.useState(s||void 0),[d,p]=L.useState(""),[E,c]=L.useState(null),[y,h]=L.useState(64),m=L.useRef(null),g=L.useMemo(()=>{const S=[...o];return E&&!o.some(k=>k.value===E)&&S.unshift({label:E,value:E}),S},[o,E]),b=L.useMemo(()=>{if(!d)return g;const S=d.toLowerCase();return g.filter(k=>k.label.toLowerCase().includes(S)||k.value.toLowerCase().includes(S))},[g,d]),T=S=>{S!=null&&(E&&S!==E&&c(null),l(S),p(""),e.setAttribute("data-value",S),t(n,S))},_=S=>{p(S)},w=S=>{if(S.key==="Enter"&&d.trim()){S.preventDefault(),S.stopPropagation();const k=d.trim(),I=o.find(M=>M.label===k||M.value===k);I?T(I.value):(c(k),l(k),p(""),e.setAttribute("data-value",k),t(n,k))}},C=()=>{c(null),l(void 0),p(""),e.setAttribute("data-value",""),t(n,"")};L.useEffect(()=>{l(s||void 0)},[s]);const O=L.useCallback(()=>{if(u!=null&&u!==""){const S=g.find(k=>String(k.value)===String(u));return S?typeof S.label=="string"?S.label:String(S.label??u):String(u)}return r||"请选择"},[u,g,r]),A=L.useCallback(()=>{const S=m.current;if(!S)return;const k=S.querySelector(".ant-select-selection-item"),I=S.querySelector(".ant-select-selection-placeholder"),M=k||I,B=(M?.textContent||"").trim()||O(),N=S.querySelector(".ant-select-selector"),x=M||N||S,H=window.getComputedStyle(x),U=M?H.fontSize:"16px",$=H.fontFamily||"sans-serif",V=H.fontWeight||"400",Y=`${H.fontStyle||"normal"} ${V} ${U} ${$}`,P=document.createElement("canvas").getContext("2d"),ee=P?Math.ceil((P.font=Y,P.measureText(B).width||0)):0;let te=0;if(N){const oe=window.getComputedStyle(N);te=(Number.parseFloat(oe.paddingLeft)||0)+(Number.parseFloat(oe.paddingRight)||0)}const ae=S.querySelector(".ant-select-arrow");ae&&Math.ceil(ae.getBoundingClientRect().width);const Q=S.querySelector(".ant-select-clear");if(Q){const oe=window.getComputedStyle(Q);oe.display!=="none"&&oe.visibility!=="hidden"&&Math.ceil(Q.getBoundingClientRect().width)}const re=Math.max(80,ee+te+4);h(oe=>oe===re?oe:re)},[O]);return L.useLayoutEffect(()=>{const S=window.requestAnimationFrame(()=>{A()}),k=window.setTimeout(()=>{A()},60);return()=>{window.cancelAnimationFrame(S),window.clearTimeout(k)}},[A]),L.useEffect(()=>{if(!("fonts"in document))return;let S=!1;const k=document.fonts;if(k?.ready)return k.ready.then(()=>{S||A()}),()=>{S=!0}},[A]),rn.createPortal(q.jsx("div",{className:`rte-searchable-select-wrapper ${u?"rte-searchable-has-value":""}`,contentEditable:!1,ref:m,style:{display:"inline-block",width:y},children:q.jsx(ce.Select,{showSearch:!0,value:u,searchValue:d,onChange:T,onSearch:_,onClear:C,onInputKeyDown:w,filterOption:!1,placeholder:r||"搜索或输入",style:{width:"100%"},options:b,allowClear:!i,size:"small",popupClassName:"rte-searchable-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,notFoundContent:q.jsx("span",{style:{color:"#999",fontSize:13},children:"暂无数据"}),suffixIcon:q.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},gl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-searchable-select-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(ml,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`searchable-select-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-searchable-select-host")||p.querySelector?.(".rte-searchable-select-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-searchable-select-host")||p.querySelector?.(".rte-searchable-select-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function El(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function bl(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function Tl(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const o=e.split(`
2
- `);let u=0;for(const c of o){const y=s.measureText(c||" ").width||0;u=Math.max(u,y)}const l=Number.parseFloat(n),d=Number.isFinite(l)?l:0,p=o.reduce((c,y)=>c.length>=y.length?c:y,""),E=d>0?d*Math.max(0,(p||"").length-1):0;return Math.ceil(u+E+r+a)}const yl=({host:e,onChange:t})=>{const n=e.dataset.key||"",r=e.dataset.placeholder||"",a=e.dataset.tooltip||"",i=e.dataset.allowNewline!=="0",s=L.useMemo(()=>El(e.dataset.value||""),[e]),[o,u]=L.useState(s),l=L.useRef(s),d=L.useMemo(()=>{const _=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(_)&&_>0?_:64},[e]),[p,E]=L.useState(d),c=L.useRef(null),y=(o||"").trim().length>0,h=!!a&&!y,m=(o||"").includes(`
3
- `);L.useEffect(()=>{u(s),l.current=s},[s]),L.useEffect(()=>{l.current=o},[o]),L.useEffect(()=>{e.classList.toggle("rte-variable-multiline",m)},[e,m]);const g=L.useCallback(()=>{const _=c.current;if(!_)return;const w=_.querySelector("textarea");if(!w)return;const C=window.getComputedStyle(w),O=C.fontStyle||"normal",A=C.fontWeight||"400",S=C.fontSize||"16px",k=C.fontFamily||"sans-serif",I=`${O} ${A} ${S} ${k}`,M=Number.parseFloat(C.paddingLeft)||0,B=Number.parseFloat(C.paddingRight)||0,N=(o&&o.length>0?o:r)||" ",x=Tl(N,I,C.letterSpacing||"0",M,B),U=Math.max(24,Math.min(600,x+2));E($=>$===U?$:U)},[r,o]);L.useEffect(()=>{const _=c.current;if(!_||typeof ResizeObserver>"u")return;let w=0;const C=new ResizeObserver(()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{t(n,l.current)})});return C.observe(_),()=>{w&&window.cancelAnimationFrame(w),C.disconnect()}},[n,t]),L.useLayoutEffect(()=>{const _=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(_)}},[g]),L.useEffect(()=>{if(!("fonts"in document))return;let _=!1;const w=document.fonts;if(w?.ready)return w.ready.then(()=>{_||g()}),()=>{_=!0}},[g]);const b=_=>{const w=_.target.value??"";u(w),e.setAttribute("data-value",bl(w)),t(n,w)},T=_=>{_.key==="Enter"&&!i&&_.preventDefault()};return rn.createPortal(q.jsxs("div",{className:`rte-variable-v2-wrapper ${h?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:c,"data-placeholder":r,"data-has-value":y?"1":"0",style:{verticalAlign:"middle",width:m?"100%":p,lineHeight:"30px"},children:[q.jsx(ce.Input.TextArea,{value:o,onChange:b,onKeyDown:T,placeholder:r,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),a?q.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${h?"":"hidden"}`,"data-variable-key":n,"data-tooltip":a}):null]}),e)},xl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll('[data-variable-render="antd-textarea"]'),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(yl,{host:u,onChange:()=>{const d=()=>{if(!e.current)return;const p=new Event("input",{bubbles:!0});e.current.dispatchEvent(p)};d(),window.requestAnimationFrame(d)}},`variable-v2-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s){if(u.type!=="childList")continue;const l=d=>{d.forEach(p=>{if(p.nodeType!==Node.ELEMENT_NODE)return;const E=p;(E.matches?.('[data-variable-render="antd-textarea"]')||E.querySelector?.('[data-variable-render="antd-textarea"]'))&&(o=!0)})};if(l(u.addedNodes),l(u.removedNodes),o)break}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Cl(e,t=[]){L.useLayoutEffect(()=>{if(!e.current)return;const n=new Map,r=new Map,a=p=>{const E=p.value||p.placeholder||"",c=window.getComputedStyle(p),y=Number.parseFloat(c.paddingLeft)||0,h=Number.parseFloat(c.paddingRight)||0,m=document.createElement("span");m.style.cssText=`
1
+ (function(Ee,q){typeof exports=="object"&&typeof module<"u"?q(exports,require("react/jsx-runtime"),require("react"),require("antd"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","antd","@ant-design/icons","react-dom"],q):(Ee=typeof globalThis<"u"?globalThis:Ee||self,q(Ee.SealSeekBIComponents={},Ee.React,Ee.React,Ee.antd,Ee.AntdIcons,Ee.ReactDOM))})(this,function(Ee,q,L,ce,ht,rn){"use strict";const Ei=({variant:e="primary",loading:t=!1,children:n,...r})=>{const a=i=>{switch(i){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return q.jsx(ce.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ei.__docgenInfo={displayName:"Button",description:"基础按钮,用于触发操作",props:{variant:{name:"variant",required:!1,description:"视觉风格",type:{name:"ButtonVariant",raw:'"primary" | "ghost" | "dashed" | "link" | "text"'},defaultValue:{value:'"primary"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: MouseEvent) => void"}}}};const bi=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>q.jsx(ce.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});bi.__docgenInfo={displayName:"Card",description:"卡片容器,用于分组内容",props:{title:{name:"title",required:!1,description:"标题",type:{name:"ReactNode",raw:"React.ReactNode"}},children:{name:"children",required:!1,description:"内容区域",type:{name:"ReactNode",raw:"React.ReactNode"}},bordered:{name:"bordered",required:!1,description:"是否显示边框",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},hoverable:{name:"hoverable",required:!1,description:"是否可悬停",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},size:{name:"size",required:!1,description:"卡片大小",type:{name:"CardSize",raw:'"default" | "small"'},defaultValue:{value:'"default"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},actions:{name:"actions",required:!1,description:"卡片操作组",type:{name:"ReactNode[]",raw:"React.ReactNode[]"}}}};const Ti=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>q.jsxs(q.Fragment,{children:[q.jsx(a,{}),q.jsx(i,{})]}):null;return q.jsx(ce.Modal,{...t,footer:n})};Ti.__docgenInfo={displayName:"AppModal",description:"应用级模态框组件,基于 Ant Design Modal 封装",props:{showDefaultFooter:{name:"showDefaultFooter",required:!1,description:"是否显示默认的确定和取消按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},title:{name:"title",required:!1,description:"模态框标题",type:{name:"ReactNode",raw:"React.ReactNode"}},open:{name:"open",required:!1,description:"是否显示模态框",type:{name:"boolean",raw:"boolean"}},onCancel:{name:"onCancel",required:!1,description:"取消按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},onOk:{name:"onOk",required:!1,description:"确定按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},children:{name:"children",required:!1,description:"模态框内容",type:{name:"ReactNode",raw:"React.ReactNode"}},width:{name:"width",required:!1,description:"模态框宽度",type:{name:"string | number",raw:"string | number"}},centered:{name:"centered",required:!1,description:"是否居中显示",type:{name:"boolean",raw:"boolean"}},maskClosable:{name:"maskClosable",required:!1,description:"点击蒙层是否允许关闭",type:{name:"boolean",raw:"boolean"}}}};const yi=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>q.jsx(ce.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});yi.__docgenInfo={displayName:"PageTable",description:"页面级表格组件,高度铺满容器,自动滚动",props:{scrollX:{name:"scrollX",required:!1,description:"水平滚动宽度",type:{name:"number",raw:"number"}},showPagination:{name:"showPagination",required:!1,description:"是否显示分页器",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},columns:{name:"columns",required:!1,description:"表格列配置",type:{name:"ColumnType[]",raw:"ColumnType<any>[]"}},dataSource:{name:"dataSource",required:!1,description:"数据源",type:{name:"any[]",raw:"any[]"}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},rowKey:{name:"rowKey",required:!1,description:"行数据的 Key",type:{name:"string | function",raw:"string | ((record: any) => string)"}}}};const dl=ht.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),xi=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return q.jsx(dl,{...a,type:e,style:i})};xi.__docgenInfo={displayName:"XcIcon",description:"自定义图标组件,基于 iconfont",props:{name:{name:"name",required:!0,description:"图标名称",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"图标大小",type:{name:"number | string",raw:"number | string"}},color:{name:"color",required:!1,description:"图标颜色",type:{name:"string",raw:"string"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Ci=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?q.jsxs(ce.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[q.jsx(ce.Spin,{size:"large"}),a&&q.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):q.jsx(ce.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:q.jsx(ce.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});Ci.__docgenInfo={displayName:"EmptyAndSpin",description:"空状态和加载状态组合组件",props:{loading:{name:"loading",required:!0,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},description:{name:"description",required:!1,description:"空状态描述",type:{name:"ReactNode",raw:"React.ReactNode"},defaultValue:{value:'"暂无数据"'}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},emptyChildren:{name:"emptyChildren",required:!1,description:"空状态额外内容",type:{name:"ReactNode",raw:"React.ReactNode"}},loadingText:{name:"loadingText",required:!1,description:"加载中提示文字",type:{name:"string",raw:"string"}},emptyImage:{name:"emptyImage",required:!1,description:"空状态图片",type:{name:"string",raw:"string"}}}};const Si=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>q.jsx(ce.Button,{size:r,type:a,icon:q.jsx(ht.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});Si.__docgenInfo={displayName:"BackButton",description:"返回按钮组件",props:{onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"() => void"}},showText:{name:"showText",required:!1,description:"是否显示文字",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'},defaultValue:{value:'"small"'}},type:{name:"type",required:!1,description:"按钮类型",type:{name:"ButtonType",raw:'"primary" | "default" | "dashed" | "link" | "text"'},defaultValue:{value:'"default"'}}}};const Ai=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return q.jsx(ce.Button,{type:"link",...n,className:r,children:n.children})};Ai.__docgenInfo={displayName:"LinkButton",description:"链接样式按钮组件,适用于表格操作列",props:{removePadding:{name:"removePadding",required:!1,description:"是否去除默认内边距",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLButtonElement>) => void"}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}}}};const{Option:fl}=ce.Select,_i=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:o=!0,externalParams:u={},...l})=>{const[d,p]=L.useState([]),[E,c]=L.useState(!1),[x,h]=L.useState({current:1,pageSize:i,total:0}),[m,g]=L.useState({}),[b,T]=L.useState({}),[C]=ce.Form.useForm(),w=L.useRef(x);w.current=x;const S=L.useRef(u);S.current=u;const O=L.useRef(!1),A=L.useMemo(()=>e.map(I=>{const{sortable:y,render:F,...U}=I;return{...U,sorter:y?!0:void 0,render:F||($=>$)}}),[e]),v=L.useCallback(async(I={})=>{if(t){c(!0);try{const y={page:w.current.current,pageSize:w.current.pageSize,sortField:b.field,sortOrder:b.order,searchParams:{...m,...S.current},...I},F=await t(y);F.success&&(p(F.data),h(U=>({...U,total:F.total,current:y.page||U.current})))}catch(y){console.error("加载数据失败:",y)}finally{c(!1)}}},[t,b,m]),k=L.useCallback(I=>{g(I),h(y=>({...y,current:1}))},[]),N=L.useCallback(()=>{C.resetFields(),g({}),h(I=>({...I,current:1}))},[C]),M=L.useCallback(()=>{v()},[v]),R=L.useCallback((I,y,F)=>{const U={current:I.current||1,pageSize:I.pageSize||i,total:I.total||0},$={field:F?.field,order:F?.order};h(U),T($)},[i]);return L.useEffect(()=>{const I=Object.keys(u).length>0;(o&&!O.current||I)&&(v(),O.current=!0)},[o,u,v]),q.jsxs("div",{children:[r&&n.length>0&&q.jsx(ce.Card,{size:"small",style:{marginBottom:16},children:q.jsxs(ce.Form,{form:C,layout:"inline",onFinish:k,initialValues:n.reduce((I,y)=>(y.defaultValue!==void 0&&(I[y.key]=y.defaultValue),I),{}),children:[n.map(I=>q.jsx(ce.Form.Item,{name:I.key,label:I.label,children:I.type==="input"?q.jsx(ce.Input,{placeholder:I.placeholder||`请输入${I.label}`,style:{width:200}}):q.jsx(ce.Select,{placeholder:I.placeholder||`请选择${I.label}`,style:{width:200},allowClear:!0,children:I.options?.map(y=>q.jsx(fl,{value:y.value,children:y.label},y.value))})},I.key)),q.jsx(ce.Form.Item,{children:q.jsxs(ce.Space,{children:[q.jsx(ce.Button,{type:"primary",htmlType:"submit",icon:q.jsx(ht.SearchOutlined,{}),children:"查询"}),q.jsx(ce.Button,{onClick:N,children:"重置"}),a&&q.jsx(ce.Button,{icon:q.jsx(ht.ReloadOutlined,{}),onClick:M,children:"刷新"})]})})]})}),q.jsx(ce.Table,{...l,columns:A,dataSource:d,loading:E,pagination:{...x,showSizeChanger:!0,showQuickJumper:!0,showTotal:(I,y)=>`第 ${y[0]}-${y[1]} 条/共 ${I} 条`,pageSizeOptions:s},onChange:R,scroll:{x:"max-content",y:"50vh"}})]})};_i.__docgenInfo={displayName:"AdvancedTable",description:"高阶表格组件,支持异步请求、搜索、排序等功能",props:{columns:{name:"columns",required:!0,description:"列配置",type:{name:"AdvancedColumnType[]",raw:"AdvancedColumnType<any>[]"}},request:{name:"request",required:!1,description:"异步请求函数",type:{name:"function",raw:"(params: RequestParams) => Promise<RequestResponse>"}},searchFields:{name:"searchFields",required:!1,description:"搜索字段配置",type:{name:"SearchFieldConfig[]",raw:"SearchFieldConfig[]"},defaultValue:{value:"[]"}},showSearch:{name:"showSearch",required:!1,description:"是否显示搜索区域",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},showRefresh:{name:"showRefresh",required:!1,description:"是否显示刷新按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},pageSizeOptions:{name:"pageSizeOptions",required:!1,description:"页面大小选项",type:{name:"string[]",raw:"string[]"},defaultValue:{value:'["10", "20", "50", "100"]'}},autoLoad:{name:"autoLoad",required:!1,description:"是否自动加载",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},externalParams:{name:"externalParams",required:!1,description:"外部请求参数",type:{name:"Record<string, any>",raw:"Record<string, any>"},defaultValue:{value:"{}"}}}};const pl=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",o=L.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[u,l]=L.useState(s||void 0),[d,p]=L.useState(64),E=L.useRef(null),c=m=>{l(m),e.setAttribute("data-value",m),t(n,m)};L.useEffect(()=>{l(s||void 0)},[s]);const x=L.useCallback(()=>{if(u!=null&&u!==""){const m=o.find(g=>String(g.value)===String(u));return m?typeof m.label=="string"?m.label:String(m.label??u):String(u)}return r||"请选择"},[u,o,r]),h=L.useCallback(()=>{const m=E.current;if(!m)return;const g=m.querySelector(".ant-select-selection-item"),b=m.querySelector(".ant-select-selection-placeholder"),T=g||b,C=(T?.textContent||"").trim()||x(),w=m.querySelector(".ant-select-selector"),S=T||w||m,O=window.getComputedStyle(S),A=T?O.fontSize:"16px",v=O.fontFamily||"sans-serif",k=O.fontWeight||"400",M=`${O.fontStyle||"normal"} ${k} ${A} ${v}`,I=document.createElement("canvas").getContext("2d"),y=I?Math.ceil((I.font=M,I.measureText(C).width||0)):0;let F=0;if(w){const J=window.getComputedStyle(w);F=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const U=m.querySelector(".ant-select-arrow"),$=U?Math.ceil(U.getBoundingClientRect().width):12,V=m.querySelector(".ant-select-clear");let _=0;if(V){const J=window.getComputedStyle(V);J.display!=="none"&&J.visibility!=="hidden"&&(_=Math.ceil(V.getBoundingClientRect().width))}const Y=Math.max(36,y+F+$+_+6);p(J=>J===Y?J:Y)},[x]);return L.useLayoutEffect(()=>{const m=window.requestAnimationFrame(()=>{h()}),g=window.setTimeout(()=>{h()},60);return()=>{window.cancelAnimationFrame(m),window.clearTimeout(g)}},[h]),L.useEffect(()=>{if(!("fonts"in document))return;let m=!1;const g=document.fonts;if(g?.ready)return g.ready.then(()=>{m||h()}),()=>{m=!0}},[h]),rn.createPortal(q.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:E,style:{display:"inline-block",width:d},children:q.jsx(ce.Select,{value:u,onChange:c,placeholder:r||"请选择",style:{width:"100%"},options:o,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:q.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},hl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(pl,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`select-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},ml=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",o=L.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[u,l]=L.useState(s||void 0),[d,p]=L.useState(""),[E,c]=L.useState(null),[x,h]=L.useState(64),m=L.useRef(null),g=L.useMemo(()=>{const v=[...o];return E&&!o.some(k=>k.value===E)&&v.unshift({label:E,value:E}),v},[o,E]),b=L.useMemo(()=>{if(!d)return g;const v=d.toLowerCase();return g.filter(k=>k.label.toLowerCase().includes(v)||k.value.toLowerCase().includes(v))},[g,d]),T=v=>{v!=null&&(E&&v!==E&&c(null),l(v),p(""),e.setAttribute("data-value",v),t(n,v))},C=v=>{p(v)},w=v=>{if(v.key==="Enter"&&d.trim()){v.preventDefault(),v.stopPropagation();const k=d.trim(),N=o.find(M=>M.label===k||M.value===k);N?T(N.value):(c(k),l(k),p(""),e.setAttribute("data-value",k),t(n,k))}},S=()=>{c(null),l(void 0),p(""),e.setAttribute("data-value",""),t(n,"")};L.useEffect(()=>{l(s||void 0)},[s]);const O=L.useCallback(()=>{if(u!=null&&u!==""){const v=g.find(k=>String(k.value)===String(u));return v?typeof v.label=="string"?v.label:String(v.label??u):String(u)}return r||"请选择"},[u,g,r]),A=L.useCallback(()=>{const v=m.current;if(!v)return;const k=v.querySelector(".ant-select-selection-item"),N=v.querySelector(".ant-select-selection-placeholder"),M=k||N,R=(M?.textContent||"").trim()||O(),I=v.querySelector(".ant-select-selector"),y=M||I||v,F=window.getComputedStyle(y),U=M?F.fontSize:"16px",$=F.fontFamily||"sans-serif",V=F.fontWeight||"400",Y=`${F.fontStyle||"normal"} ${V} ${U} ${$}`,P=document.createElement("canvas").getContext("2d"),ee=P?Math.ceil((P.font=Y,P.measureText(R).width||0)):0;let te=0;if(I){const oe=window.getComputedStyle(I);te=(Number.parseFloat(oe.paddingLeft)||0)+(Number.parseFloat(oe.paddingRight)||0)}const ae=v.querySelector(".ant-select-arrow");ae&&Math.ceil(ae.getBoundingClientRect().width);const Q=v.querySelector(".ant-select-clear");if(Q){const oe=window.getComputedStyle(Q);oe.display!=="none"&&oe.visibility!=="hidden"&&Math.ceil(Q.getBoundingClientRect().width)}const re=Math.max(80,ee+te+4);h(oe=>oe===re?oe:re)},[O]);return L.useLayoutEffect(()=>{const v=window.requestAnimationFrame(()=>{A()}),k=window.setTimeout(()=>{A()},60);return()=>{window.cancelAnimationFrame(v),window.clearTimeout(k)}},[A]),L.useEffect(()=>{if(!("fonts"in document))return;let v=!1;const k=document.fonts;if(k?.ready)return k.ready.then(()=>{v||A()}),()=>{v=!0}},[A]),rn.createPortal(q.jsx("div",{className:`rte-searchable-select-wrapper ${u?"rte-searchable-has-value":""}`,contentEditable:!1,ref:m,style:{display:"inline-block",width:x},children:q.jsx(ce.Select,{showSearch:!0,value:u,searchValue:d,onChange:T,onSearch:C,onClear:S,onInputKeyDown:w,filterOption:!1,placeholder:r||"搜索或输入",style:{width:"100%"},options:b,allowClear:!i,size:"small",popupClassName:"rte-searchable-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,notFoundContent:q.jsx("span",{style:{color:"#999",fontSize:13},children:"暂无数据"}),suffixIcon:q.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},gl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-searchable-select-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(ml,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`searchable-select-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-searchable-select-host")||p.querySelector?.(".rte-searchable-select-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-searchable-select-host")||p.querySelector?.(".rte-searchable-select-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function El(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function bl(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function Tl(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const o=e.split(`
2
+ `);let u=0;for(const c of o){const x=s.measureText(c||" ").width||0;u=Math.max(u,x)}const l=Number.parseFloat(n),d=Number.isFinite(l)?l:0,p=o.reduce((c,x)=>c.length>=x.length?c:x,""),E=d>0?d*Math.max(0,(p||"").length-1):0;return Math.ceil(u+E+r+a)}const yl=({host:e,onChange:t})=>{const n=e.dataset.key||"",r=e.dataset.placeholder||"",a=e.dataset.tooltip||"",i=e.dataset.allowNewline!=="0",s=L.useMemo(()=>El(e.dataset.value||""),[e]),[o,u]=L.useState(s),l=L.useRef(s),d=L.useMemo(()=>{const C=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(C)&&C>0?C:64},[e]),[p,E]=L.useState(d),c=L.useRef(null),x=(o||"").trim().length>0,h=!!a&&!x,m=(o||"").includes(`
3
+ `);L.useEffect(()=>{u(s),l.current=s},[s]),L.useEffect(()=>{l.current=o},[o]),L.useEffect(()=>{e.classList.toggle("rte-variable-multiline",m)},[e,m]);const g=L.useCallback(()=>{const C=c.current;if(!C)return;const w=C.querySelector("textarea");if(!w)return;const S=window.getComputedStyle(w),O=S.fontStyle||"normal",A=S.fontWeight||"400",v=S.fontSize||"16px",k=S.fontFamily||"sans-serif",N=`${O} ${A} ${v} ${k}`,M=Number.parseFloat(S.paddingLeft)||0,R=Number.parseFloat(S.paddingRight)||0,I=(o&&o.length>0?o:r)||" ",y=Tl(I,N,S.letterSpacing||"0",M,R),U=Math.max(24,Math.min(600,y+2));E($=>$===U?$:U)},[r,o]);L.useEffect(()=>{const C=c.current;if(!C||typeof ResizeObserver>"u")return;let w=0;const S=new ResizeObserver(()=>{w&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{t(n,l.current)})});return S.observe(C),()=>{w&&window.cancelAnimationFrame(w),S.disconnect()}},[n,t]),L.useLayoutEffect(()=>{const C=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(C)}},[g]),L.useEffect(()=>{if(!("fonts"in document))return;let C=!1;const w=document.fonts;if(w?.ready)return w.ready.then(()=>{C||g()}),()=>{C=!0}},[g]);const b=C=>{const w=C.target.value??"";u(w),e.setAttribute("data-value",bl(w)),t(n,w)},T=C=>{C.key==="Enter"&&!i&&C.preventDefault()};return rn.createPortal(q.jsxs("div",{className:`rte-variable-v2-wrapper ${h?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:c,"data-placeholder":r,"data-has-value":x?"1":"0",style:{verticalAlign:"middle",width:m?"100%":p,lineHeight:"30px"},children:[q.jsx(ce.Input.TextArea,{value:o,onChange:b,onKeyDown:T,placeholder:r,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),a?q.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${h?"":"hidden"}`,"data-variable-key":n,"data-tooltip":a}):null]}),e)},xl=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll('[data-variable-render="antd-textarea"]'),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx(yl,{host:u,onChange:()=>{const d=()=>{if(!e.current)return;const p=new Event("input",{bubbles:!0});e.current.dispatchEvent(p)};d(),window.requestAnimationFrame(d)}},`variable-v2-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s){if(u.type!=="childList")continue;const l=d=>{d.forEach(p=>{if(p.nodeType!==Node.ELEMENT_NODE)return;const E=p;(E.matches?.('[data-variable-render="antd-textarea"]')||E.querySelector?.('[data-variable-render="antd-textarea"]'))&&(o=!0)})};if(l(u.addedNodes),l(u.removedNodes),o)break}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Cl(e,t=[]){L.useLayoutEffect(()=>{if(!e.current)return;const n=new Map,r=new Map,a=p=>{const E=p.value||p.placeholder||"",c=window.getComputedStyle(p),x=Number.parseFloat(c.paddingLeft)||0,h=Number.parseFloat(c.paddingRight)||0,m=document.createElement("span");m.style.cssText=`
4
4
  position: absolute;
5
5
  visibility: hidden;
6
6
  white-space: nowrap;
@@ -8,16 +8,16 @@
8
8
  font-family: ${c.fontFamily||"inherit"};
9
9
  font-weight: ${c.fontWeight||"inherit"};
10
10
  letter-spacing: ${c.letterSpacing||"normal"};
11
- padding-left: ${y}px;
11
+ padding-left: ${x}px;
12
12
  padding-right: ${h}px;
13
- `,m.textContent=E||"0",document.body.appendChild(m);const b=Math.max(24,Math.min(600,Math.ceil(m.offsetWidth)+2));return document.body.removeChild(m),b},i=p=>{const E=p.target;if(!E)return;let c=E.value;if(c=c.replace(/[^\d]/g,""),c!==""&&c!=="0"){const h=parseInt(c,10);if(Number.isNaN(h))E.value="";else{const m=E.getAttribute("min"),g=E.getAttribute("max"),b=m!==null?parseInt(m,10):0,T=g!==null?parseInt(g,10):1/0,_=Math.min(Math.max(h,b),T);E.value=String(_)}}else if(c==="0"){const h=E.getAttribute("min");0<(h!==null?parseInt(h,10):0)?E.value="":E.value="0"}E.style.width=`${a(E)}px`;const y=E.closest(".rte-number-input-wrap");y&&(y.dataset.hasValue=E.value?"1":"0")},s=p=>{const E=p.key;(E==="-"||E==="."||E===","||E==="e"||E==="E"||E==="+"||E==="="||E===" ")&&p.preventDefault()},o=()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="number-input"]').forEach(E=>{const c=E.closest(".rte-number-input-wrap");c&&(c.dataset.hasValue=E.value?"1":"0",c.dataset.placeholder===void 0&&(c.dataset.placeholder=E.placeholder||""));const y=document.activeElement===E,h=a(E),m=Number.parseFloat(E.style.width||""),g=Number.isFinite(m),b=g?Math.abs(m-h):1/0;E.dataset.rteWidthInited==="1"?!y&&(!g||b>8)&&(E.style.width=`${h}px`):(E.dataset.rteWidthInited="1",!y&&(!g||b>2)&&(E.style.width=`${h}px`)),n.has(E)||(E.addEventListener("input",i,!1),E.addEventListener("keydown",s,!1),n.set(E,i),r.set(E,s))})};o();let u=!1;const l=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,o()}))},d=new MutationObserver(p=>{let E=!1;p.forEach(c=>{c.type==="childList"&&c.addedNodes.forEach(y=>{if(y.nodeType===Node.ELEMENT_NODE){const h=y;h.matches&&(h.matches('[data-type="number-input"]')||h.querySelector('[data-type="number-input"]'))&&(E=!0)}})}),E&&l()});return e.current&&d.observe(e.current,{childList:!0,subtree:!0}),()=>{u=!1,d.disconnect(),n.forEach((p,E)=>{E.removeEventListener("input",p,!1)}),n.clear(),r.forEach((p,E)=>{E.removeEventListener("keydown",p,!1)}),r.clear()}},[e,...t])}function Sl(e,t,n=[]){L.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((o,u)=>u.removeEventListener("blur",o,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]'),s=o=>{o.stopPropagation(),o.stopImmediatePropagation();const u=o.target?.closest('[data-type="variable"][data-node-type="report-url"]');if(!u||!e.current||!e.current.contains(u))return;const l=u.dataset.key;if(!l)return;const d=u.innerText.replace(/[\u200B\n]/g,"").trim();t(l,d)};i.forEach(o=>{o.addEventListener("blur",s,!1),r.set(o,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function Al(e,t,n=[]){const r=L.useRef(t);L.useEffect(()=>{r.current=t},[t]),L.useEffect(()=>{const a=e.current;if(!a)return;const i=s=>{const o=s.target?.closest?.('[data-type="variable"][data-node-type="markdown-name"]');if(!o||!a.contains(o))return;const u=o.dataset.key;if(!u)return;const l=o.innerText.replace(/[\u200B\n]/g,"").trim();requestAnimationFrame(()=>{o.isConnected&&r.current(u,l)})};return a.addEventListener("focusout",i,!1),()=>{a.removeEventListener("focusout",i,!1)}},[e])}function _l(e,t,n=[]){L.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((o,u)=>u.removeEventListener("blur",o,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),s=o=>{o.stopPropagation(),o.stopImmediatePropagation();const u=o.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!u||!e.current||!e.current.contains(u))return;const l=u.dataset.key;if(!l)return;const d=u.innerText.replace(/[\u200B\n]/g,"").trim();t(l,d)};i.forEach(o=>{o.addEventListener("blur",s,!1),r.set(o,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}const ie=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Ke=e=>e?typeof e=="string"?e:JSON.stringify(e):"",vl=e=>{const t=(e?.name||"").toLowerCase(),n=/\.(png|jpe?g|gif|webp|bmp|svg)$/.test(t),r=(e?.type||"").toLowerCase();return n||(r==="image/png"||r==="image/jpeg"||r==="image/gif"||r==="image/webp"||r==="image/bmp"||r==="image/svg+xml")},qn=e=>{const t=(e||"").trim()||" ";let n=0;for(let r=0;r<t.length;r++){const a=t.charCodeAt(r);a>19968||a>=65280&&a<=65519?n+=16:n+=8}return Math.max(24,Math.min(600,n+22))},vi=e=>`\`\`\`
13
+ `,m.textContent=E||"0",document.body.appendChild(m);const b=Math.max(24,Math.min(600,Math.ceil(m.offsetWidth)+2));return document.body.removeChild(m),b},i=p=>{const E=p.target;if(!E)return;let c=E.value;if(c=c.replace(/[^\d]/g,""),c!==""&&c!=="0"){const h=parseInt(c,10);if(Number.isNaN(h))E.value="";else{const m=E.getAttribute("min"),g=E.getAttribute("max"),b=m!==null?parseInt(m,10):0,T=g!==null?parseInt(g,10):1/0,C=Math.min(Math.max(h,b),T);E.value=String(C)}}else if(c==="0"){const h=E.getAttribute("min");0<(h!==null?parseInt(h,10):0)?E.value="":E.value="0"}E.style.width=`${a(E)}px`;const x=E.closest(".rte-number-input-wrap");x&&(x.dataset.hasValue=E.value?"1":"0")},s=p=>{const E=p.key;(E==="-"||E==="."||E===","||E==="e"||E==="E"||E==="+"||E==="="||E===" ")&&p.preventDefault()},o=()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="number-input"]').forEach(E=>{const c=E.closest(".rte-number-input-wrap");c&&(c.dataset.hasValue=E.value?"1":"0",c.dataset.placeholder===void 0&&(c.dataset.placeholder=E.placeholder||""));const x=document.activeElement===E,h=a(E),m=Number.parseFloat(E.style.width||""),g=Number.isFinite(m),b=g?Math.abs(m-h):1/0;E.dataset.rteWidthInited==="1"?!x&&(!g||b>8)&&(E.style.width=`${h}px`):(E.dataset.rteWidthInited="1",!x&&(!g||b>2)&&(E.style.width=`${h}px`)),n.has(E)||(E.addEventListener("input",i,!1),E.addEventListener("keydown",s,!1),n.set(E,i),r.set(E,s))})};o();let u=!1;const l=()=>{u||(u=!0,queueMicrotask(()=>{u=!1,o()}))},d=new MutationObserver(p=>{let E=!1;p.forEach(c=>{c.type==="childList"&&c.addedNodes.forEach(x=>{if(x.nodeType===Node.ELEMENT_NODE){const h=x;h.matches&&(h.matches('[data-type="number-input"]')||h.querySelector('[data-type="number-input"]'))&&(E=!0)}})}),E&&l()});return e.current&&d.observe(e.current,{childList:!0,subtree:!0}),()=>{u=!1,d.disconnect(),n.forEach((p,E)=>{E.removeEventListener("input",p,!1)}),n.clear(),r.forEach((p,E)=>{E.removeEventListener("keydown",p,!1)}),r.clear()}},[e,...t])}function Sl(e,t,n=[]){L.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((o,u)=>u.removeEventListener("blur",o,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]'),s=o=>{o.stopPropagation(),o.stopImmediatePropagation();const u=o.target?.closest('[data-type="variable"][data-node-type="report-url"]');if(!u||!e.current||!e.current.contains(u))return;const l=u.dataset.key;if(!l)return;const d=u.innerText.replace(/[\u200B\n]/g,"").trim();t(l,d)};i.forEach(o=>{o.addEventListener("blur",s,!1),r.set(o,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function Al(e,t,n=[]){const r=L.useRef(t);L.useEffect(()=>{r.current=t},[t]),L.useEffect(()=>{const a=e.current;if(!a)return;const i=s=>{const o=s.target?.closest?.('[data-type="variable"][data-node-type="markdown-name"]');if(!o||!a.contains(o))return;const u=o.dataset.key;if(!u)return;const l=o.innerText.replace(/[\u200B\n]/g,"").trim();requestAnimationFrame(()=>{o.isConnected&&r.current(u,l)})};return a.addEventListener("focusout",i,!1),()=>{a.removeEventListener("focusout",i,!1)}},[e])}function _l(e,t,n=[]){L.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((o,u)=>u.removeEventListener("blur",o,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),s=o=>{o.stopPropagation(),o.stopImmediatePropagation();const u=o.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!u||!e.current||!e.current.contains(u))return;const l=u.dataset.key;if(!l)return;const d=u.innerText.replace(/[\u200B\n]/g,"").trim();t(l,d)};i.forEach(o=>{o.addEventListener("blur",s,!1),r.set(o,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}const ie=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Ke=e=>e?typeof e=="string"?e:JSON.stringify(e):"",vl=e=>{const t=(e?.name||"").toLowerCase(),n=/\.(png|jpe?g|gif|webp|bmp|svg)$/.test(t),r=(e?.type||"").toLowerCase();return n||(r==="image/png"||r==="image/jpeg"||r==="image/gif"||r==="image/webp"||r==="image/bmp"||r==="image/svg+xml")},qn=e=>{const t=(e||"").trim()||" ";let n=0;for(let r=0;r<t.length;r++){const a=t.charCodeAt(r);a>19968||a>=65280&&a<=65519?n+=16:n+=8}return Math.max(24,Math.min(600,n+22))},vi=e=>`\`\`\`
14
14
  ${(e||"").replace(/\r\n/g,`
15
15
  `)}
16
16
  \`\`\``,ki=e=>{const t=(e||"").replace(/\r\n/g,`
17
- `).trim(),n=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return n?`<pre><code>${ie(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${ie(t)}</div>`},kl=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:o,setFiles:u})=>{const l=L.useCallback(p=>{if(!p.target.files){p.target&&(p.target.value=""),i(null),s(null),o(null);return}const E=10*1024*1024,c=h=>h.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name||""),y=h=>c(h)&&h.size>E;if(n&&p.target.files&&p.target.files.length>0){const h=n,m=e.find(_=>_.type==="upload"&&_.key===h),g=Array.from(p.target.files),b=g.filter(_=>!y(_)),T=g.length-b.length;if(T>0&&t.error(`已自动过滤 ${T} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`),m&&typeof m.maxCount=="number"&&typeof m.minCount=="number"){const _=m.maxCount,w=typeof a=="number"?a:0;u(C=>{const O={...C};let A=Math.min(Math.max(w,0),_-1);for(const S of b){for(;A<_&&O[`${h}-${A}`]!=null;)A+=1;if(A>=_)break;O[`${h}-${A}`]=S,A+=1}return O})}}else if(r&&p.target.files[0]){const h=p.target.files[0],m=r;y(h)?t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)"):u(g=>({...g,[m]:h}))}p.target&&(p.target.value=""),i(null),s(null),o(null)},[n,a,r,e,t,s,o,i,u]),d=L.useCallback(p=>{u(E=>{const c={...E};return delete c[p],c})},[u]);return{handleFileChange:l,handleRemoveFile:d}};function wl(e){const t=e.trim();try{const r=new URL(t);if(r.protocol==="http:"||r.protocol==="https:")return t}catch{}const n=t.match(/https?:\/\/[^\s\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]+/);return n?n[0]:t}function Nl(e){return new Promise((t,n)=>{const r=document.createElement("video"),a=URL.createObjectURL(e);r.preload="auto",r.muted=!0,r.src=a,r.onloadeddata=()=>{r.currentTime=0},r.onseeked=()=>{try{const i=document.createElement("canvas");i.width=r.videoWidth,i.height=r.videoHeight;const s=i.getContext("2d");if(!s)return URL.revokeObjectURL(a),n(new Error("canvas context unavailable"));s.drawImage(r,0,0,i.width,i.height);const o=i.toDataURL("image/jpeg",.7);URL.revokeObjectURL(a),t(o)}catch(i){URL.revokeObjectURL(a),n(i)}},r.onerror=()=>{URL.revokeObjectURL(a),n(new Error("video load error"))}})}function Il(e){return new Promise(t=>{const n=document.createElement("video");n.crossOrigin="anonymous",n.preload="auto",n.muted=!0,n.playsInline=!0,n.src=e;const r=setTimeout(()=>{a(),t("")},1e4),a=()=>{clearTimeout(r),n.onloadeddata=null,n.onseeked=null,n.onerror=null};n.onloadeddata=()=>{n.currentTime=0},n.onseeked=()=>{try{const i=document.createElement("canvas");i.width=n.videoWidth||320,i.height=n.videoHeight||180;const s=i.getContext("2d");if(s){s.drawImage(n,0,0,i.width,i.height);const o=i.toDataURL("image/jpeg",.7);a(),t(o)}else a(),t("")}catch{a(),t("")}},n.onerror=()=>{a(),t("")}})}function Ll(e,t,n,r,a=[]){const i=L.useRef(n);i.current=n;const s=L.useCallback(async(o,u)=>{if(!t||!u.trim())return;const l=wl(u);r(c=>({...c,[o]:{status:"loading",progress:0}}));const d=2*Math.PI*6.5;let p=0;const E=setInterval(()=>{p=Math.min(p+Math.random()*15+5,90);const c=e.current?.querySelector(`[data-type="video-url"][data-key="${o}"] .video-upload-progress-ring circle:last-child`);c&&c.setAttribute("stroke-dashoffset",String(d*(1-p/100)))},400);try{const c=await t({url:l});if(clearInterval(E),r(y=>({...y,[o]:{status:"success",videoUrl:c.videoUrl,thumbnail:c.thumbnail||"",fileName:l}})),!c.thumbnail&&c.videoUrl){const y=`/api/download-report-pdf?url=${encodeURIComponent(c.videoUrl)}`;Il(y).then(h=>{h&&r(m=>{const g=m[o];return!g||g.status!=="success"?m:{...m,[o]:{...g,thumbnail:h}}})})}}catch(c){clearInterval(E),r(y=>({...y,[o]:{status:"error",errorMsg:c instanceof Error?c.message:"解析失败"}}))}},[t,r,e]);L.useEffect(()=>{const o=e.current;if(!o||!t)return;const u=d=>{const p=d.target?.closest?.('[data-node-type="video-url"]');if(!p)return;const E=p.dataset.key;E&&setTimeout(()=>{const c=(p.innerText||"").replace(/\u200B/g,"").trim();c&&s(E,c)},0)},l=d=>{const p=d.target?.closest?.('[data-node-type="video-url"]');if(!p)return;const E=p.dataset.key;if(!E)return;const c=i.current[E];if(c?.status==="success"||c?.status==="loading")return;const y=(p.innerText||"").replace(/\u200B/g,"").trim();y&&s(E,y)};return o.addEventListener("paste",u,!0),o.addEventListener("focusout",l,!0),()=>{o.removeEventListener("paste",u,!0),o.removeEventListener("focusout",l,!0)}},[e,t,s,...a])}function Ol(e,t){return L.useCallback(async(n,r)=>{if(!e)return;t(s=>({...s,[n]:{status:"loading",file:r,fileName:r.name,progress:0}}));const a=await Nl(r).catch(()=>"");a&&t(s=>{const o=s[n];return!o||o.status!=="loading"?s:{...s,[n]:{...o,thumbnail:a}}});const i=s=>{t(o=>{const u=o[n];return!u||u.status!=="loading"?o:{...o,[n]:{...u,progress:s}}})};try{const s=await e(r,i);t(o=>({...o,[n]:{status:"success",videoUrl:s.videoUrl,thumbnail:s.thumbnail||a,file:r,fileName:r.name}}))}catch(s){t(o=>({...o,[n]:{status:"error",file:r,fileName:r.name,errorMsg:s instanceof Error?s.message:"上传失败"}}))}},[e,t])}function Dl(e,t,n,r){L.useEffect(()=>{const a=e.current;if(!a)return;const i=o=>{const u=o.target?.closest?.('[data-type="video-url"], [data-type="video-upload"]');if(!u)return;const l=u.dataset.key;if(!l)return;const d=t[l];d?.status==="success"&&d.videoUrl&&n({key:l,anchorEl:u,type:"video-preview"})},s=o=>{if(r)return;const u=o.target?.closest?.('[data-type="video-url"], [data-type="video-upload"]');if(!u)return;const l=o.relatedTarget;l?.closest?.(".rte-tooltip-overlay")||l&&u.contains(l)||n(null)};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[e,t,n,r])}const Pl=e=>{const t=e.trim();if(!t)return{url:""};let n=null;try{n=new URL(t)}catch{try{n=new URL(`https://${t}`)}catch{return{url:t}}}const r=n.pathname.split("/").filter(Boolean),a=r.findIndex(u=>u==="report"),i=a>=0?r[a+1]:void 0,s=r[0]&&r[0].length<=5?r[0]:void 0,o=n.searchParams.get("agentId")||void 0;return{url:t,reportId:i,agentId:o,lang:s}},Ml=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.content||"").trim();return{title:r,content:a.length>0?a:`请补充:${r}`}}),kr=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.markdown||"").trim(),i=(t?.content||"").trim()||(a?ki(a):"");return{title:r,content:i.length>0?i:`请补充:${r}`,markdown:a}}),Bl=({config:e,editorRef:t,files:n,setFiles:r,multiVariableCounts:a,setMultiVariableCounts:i,reportAnalyzeState:s,setReportAnalyzeState:o,markdownAnalyzeState:u,setMarkdownAnalyzeState:l,markdownNameAnalyzeState:d,setMarkdownNameAnalyzeState:p,nodeValues:E})=>{const c=L.useRef({}),y=L.useRef({}),h=L.useRef({}),m=L.useRef(s),g=L.useRef(u),b=L.useRef(d),T=L.useCallback(C=>C.find(A=>A.type==="tag")?.text||null,[]),_=L.useRef(e),w=L.useRef(null);L.useEffect(()=>{y.current=n},[n]),L.useEffect(()=>{h.current=a},[a]),L.useEffect(()=>{m.current=s},[s]),L.useEffect(()=>{g.current=u},[u]),L.useEffect(()=>{b.current=d},[d]),L.useEffect(()=>{const C=T(_.current),O=T(e);if(C&&C!==O&&t.current){const A={};t.current.querySelectorAll('[data-type="variable"]').forEach(B=>{const N=B.dataset.key;if(N){const x=B.innerText.replace(/[\u200B\n]/g,"").trim();x&&(A[N]=x)}}),t.current.querySelectorAll('[data-type="select"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.getAttribute("data-value")||"").trim();x&&(A[N]=x)}}),t.current.querySelectorAll('[data-type="searchable-select"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.getAttribute("data-value")||"").trim();x&&(A[N]=x)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(B=>{const N=B.dataset.key;if(N){const x=B.value.replace(/[\u200B]/g,"").trim();x&&(A[N]=x)}}),c.current[C]={variableValues:A,files:{...y.current},multiVariableCounts:{...h.current},reportAnalyzeState:{...m.current},markdownAnalyzeState:{...g.current},markdownNameAnalyzeState:{...b.current}}}if(O&&c.current[O]){const A=c.current[O];w.current=A,r(A.files),i(A.multiVariableCounts),o(A.reportAnalyzeState),l(A.markdownAnalyzeState),p(A.markdownNameAnalyzeState)}else if(O){w.current=null;const A={};e.forEach(S=>{if(S.type==="multi-variable"&&S.key){const k=E?.[S.key];Array.isArray(k)&&k.length>0?A[S.key]=Math.min(k.length+1,S.maxCount??9):A[S.key]=1}}),i(A),r({}),o({}),l({}),p({})}else w.current=null,i({}),r({}),o({}),l({}),p({});_.current=e},[e,t,T,r,i,o,l,p]),L.useLayoutEffect(()=>{w.current&&t.current&&(t.current.__tempVariableValues=w.current.variableValues,setTimeout(()=>{w.current&&(w.current=null)},0))})},Rl=e=>{const t={},n=e.current;return n&&(n.querySelectorAll('[data-type="variable"]').forEach(r=>{const a=r.dataset.key;if(!a)return;if(r.dataset.variableRender==="antd-textarea"){const s=(r.getAttribute("data-value")||"").trim();if(!s)return;try{const u=(decodeURIComponent(s)||"").replace(/\r\n/g,`
17
+ `).trim(),n=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return n?`<pre><code>${ie(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${ie(t)}</div>`},kl=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:o,setFiles:u})=>{const l=L.useCallback(p=>{if(!p.target.files){p.target&&(p.target.value=""),i(null),s(null),o(null);return}const E=10*1024*1024,c=h=>h.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name||""),x=h=>c(h)&&h.size>E;if(n&&p.target.files&&p.target.files.length>0){const h=n,m=e.find(C=>C.type==="upload"&&C.key===h),g=Array.from(p.target.files),b=g.filter(C=>!x(C)),T=g.length-b.length;if(T>0&&t.error(`已自动过滤 ${T} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`),m&&typeof m.maxCount=="number"&&typeof m.minCount=="number"){const C=m.maxCount,w=typeof a=="number"?a:0;u(S=>{const O={...S};let A=Math.min(Math.max(w,0),C-1);for(const v of b){for(;A<C&&O[`${h}-${A}`]!=null;)A+=1;if(A>=C)break;O[`${h}-${A}`]=v,A+=1}return O})}}else if(r&&p.target.files[0]){const h=p.target.files[0],m=r;x(h)?t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)"):u(g=>({...g,[m]:h}))}p.target&&(p.target.value=""),i(null),s(null),o(null)},[n,a,r,e,t,s,o,i,u]),d=L.useCallback(p=>{u(E=>{const c={...E};return delete c[p],c})},[u]);return{handleFileChange:l,handleRemoveFile:d}};function wl(e){const t=e.trim();try{const r=new URL(t);if(r.protocol==="http:"||r.protocol==="https:")return t}catch{}const n=t.match(/https?:\/\/[^\s\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]+/);return n?n[0]:t}function Nl(e){return new Promise((t,n)=>{const r=document.createElement("video"),a=URL.createObjectURL(e);r.preload="auto",r.muted=!0,r.src=a,r.onloadeddata=()=>{r.currentTime=0},r.onseeked=()=>{try{const i=document.createElement("canvas");i.width=r.videoWidth,i.height=r.videoHeight;const s=i.getContext("2d");if(!s)return URL.revokeObjectURL(a),n(new Error("canvas context unavailable"));s.drawImage(r,0,0,i.width,i.height);const o=i.toDataURL("image/jpeg",.7);URL.revokeObjectURL(a),t(o)}catch(i){URL.revokeObjectURL(a),n(i)}},r.onerror=()=>{URL.revokeObjectURL(a),n(new Error("video load error"))}})}function Il(e){return new Promise(t=>{const n=document.createElement("video");n.crossOrigin="anonymous",n.preload="auto",n.muted=!0,n.playsInline=!0,n.src=e;const r=setTimeout(()=>{a(),t("")},1e4),a=()=>{clearTimeout(r),n.onloadeddata=null,n.onseeked=null,n.onerror=null};n.onloadeddata=()=>{n.currentTime=0},n.onseeked=()=>{try{const i=document.createElement("canvas");i.width=n.videoWidth||320,i.height=n.videoHeight||180;const s=i.getContext("2d");if(s){s.drawImage(n,0,0,i.width,i.height);const o=i.toDataURL("image/jpeg",.7);a(),t(o)}else a(),t("")}catch{a(),t("")}},n.onerror=()=>{a(),t("")}})}function Ll(e,t,n,r,a=[]){const i=L.useRef(n);i.current=n;const s=L.useCallback(async(o,u)=>{if(!t||!u.trim())return;const l=wl(u);r(c=>({...c,[o]:{status:"loading",progress:0}}));const d=2*Math.PI*6.5;let p=0;const E=setInterval(()=>{p=Math.min(p+Math.random()*15+5,90);const c=e.current?.querySelector(`[data-type="video-url"][data-key="${o}"] .video-upload-progress-ring circle:last-child`);c&&c.setAttribute("stroke-dashoffset",String(d*(1-p/100)))},400);try{const c=await t({url:l});if(clearInterval(E),r(x=>({...x,[o]:{status:"success",videoUrl:c.videoUrl,thumbnail:c.thumbnail||"",fileName:l}})),!c.thumbnail&&c.videoUrl){const x=`/api/download-report-pdf?url=${encodeURIComponent(c.videoUrl)}`;Il(x).then(h=>{h&&r(m=>{const g=m[o];return!g||g.status!=="success"?m:{...m,[o]:{...g,thumbnail:h}}})})}}catch(c){clearInterval(E),r(x=>({...x,[o]:{status:"error",errorMsg:c instanceof Error?c.message:"解析失败"}}))}},[t,r,e]);L.useEffect(()=>{const o=e.current;if(!o||!t)return;const u=d=>{const p=d.target?.closest?.('[data-node-type="video-url"]');if(!p)return;const E=p.dataset.key;E&&setTimeout(()=>{const c=(p.innerText||"").replace(/\u200B/g,"").trim();c&&s(E,c)},0)},l=d=>{const p=d.target?.closest?.('[data-node-type="video-url"]');if(!p)return;const E=p.dataset.key;if(!E)return;const c=i.current[E];if(c?.status==="success"||c?.status==="loading")return;const x=(p.innerText||"").replace(/\u200B/g,"").trim();x&&s(E,x)};return o.addEventListener("paste",u,!0),o.addEventListener("focusout",l,!0),()=>{o.removeEventListener("paste",u,!0),o.removeEventListener("focusout",l,!0)}},[e,t,s,...a])}function Ol(e,t){return L.useCallback(async(n,r)=>{if(!e)return;t(s=>({...s,[n]:{status:"loading",file:r,fileName:r.name,progress:0}}));const a=await Nl(r).catch(()=>"");a&&t(s=>{const o=s[n];return!o||o.status!=="loading"?s:{...s,[n]:{...o,thumbnail:a}}});const i=s=>{t(o=>{const u=o[n];return!u||u.status!=="loading"?o:{...o,[n]:{...u,progress:s}}})};try{const s=await e(r,i);t(o=>({...o,[n]:{status:"success",videoUrl:s.videoUrl,thumbnail:s.thumbnail||a,file:r,fileName:r.name}}))}catch(s){t(o=>({...o,[n]:{status:"error",file:r,fileName:r.name,errorMsg:s instanceof Error?s.message:"上传失败"}}))}},[e,t])}function Dl(e,t,n,r){L.useEffect(()=>{const a=e.current;if(!a)return;const i=o=>{const u=o.target?.closest?.('[data-type="video-url"], [data-type="video-upload"]');if(!u)return;const l=u.dataset.key;if(!l)return;const d=t[l];d?.status==="success"&&d.videoUrl&&n({key:l,anchorEl:u,type:"video-preview"})},s=o=>{if(r)return;const u=o.target?.closest?.('[data-type="video-url"], [data-type="video-upload"]');if(!u)return;const l=o.relatedTarget;l?.closest?.(".rte-tooltip-overlay")||l&&u.contains(l)||n(null)};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[e,t,n,r])}const Pl=e=>{const t=e.trim();if(!t)return{url:""};let n=null;try{n=new URL(t)}catch{try{n=new URL(`https://${t}`)}catch{return{url:t}}}const r=n.pathname.split("/").filter(Boolean),a=r.findIndex(u=>u==="report"),i=a>=0?r[a+1]:void 0,s=r[0]&&r[0].length<=5?r[0]:void 0,o=n.searchParams.get("agentId")||void 0;return{url:t,reportId:i,agentId:o,lang:s}},Ml=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.content||"").trim();return{title:r,content:a.length>0?a:`请补充:${r}`}}),kr=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.markdown||"").trim(),i=(t?.content||"").trim()||(a?ki(a):"");return{title:r,content:i.length>0?i:`请补充:${r}`,markdown:a}}),Bl=({config:e,editorRef:t,files:n,setFiles:r,multiVariableCounts:a,setMultiVariableCounts:i,reportAnalyzeState:s,setReportAnalyzeState:o,markdownAnalyzeState:u,setMarkdownAnalyzeState:l,markdownNameAnalyzeState:d,setMarkdownNameAnalyzeState:p,nodeValues:E})=>{const c=L.useRef({}),x=L.useRef({}),h=L.useRef({}),m=L.useRef(s),g=L.useRef(u),b=L.useRef(d),T=L.useCallback(S=>S.find(A=>A.type==="tag")?.text||null,[]),C=L.useRef(e),w=L.useRef(null);L.useEffect(()=>{x.current=n},[n]),L.useEffect(()=>{h.current=a},[a]),L.useEffect(()=>{m.current=s},[s]),L.useEffect(()=>{g.current=u},[u]),L.useEffect(()=>{b.current=d},[d]),L.useEffect(()=>{const S=T(C.current),O=T(e);if(S&&S!==O&&t.current){const A={};t.current.querySelectorAll('[data-type="variable"]').forEach(R=>{const I=R.dataset.key;if(I){const y=R.innerText.replace(/[\u200B\n]/g,"").trim();y&&(A[I]=y)}}),t.current.querySelectorAll('[data-type="select"]').forEach(R=>{const I=R.dataset.key;if(I){const y=(R.getAttribute("data-value")||"").trim();y&&(A[I]=y)}}),t.current.querySelectorAll('[data-type="searchable-select"]').forEach(R=>{const I=R.dataset.key;if(I){const y=(R.getAttribute("data-value")||"").trim();y&&(A[I]=y)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(R=>{const I=R.dataset.key;if(I){const y=R.value.replace(/[\u200B]/g,"").trim();y&&(A[I]=y)}}),c.current[S]={variableValues:A,files:{...x.current},multiVariableCounts:{...h.current},reportAnalyzeState:{...m.current},markdownAnalyzeState:{...g.current},markdownNameAnalyzeState:{...b.current}}}if(O&&c.current[O]){const A=c.current[O];w.current=A,r(A.files),i(A.multiVariableCounts),o(A.reportAnalyzeState),l(A.markdownAnalyzeState),p(A.markdownNameAnalyzeState)}else if(O){w.current=null;const A={};e.forEach(v=>{if(v.type==="multi-variable"&&v.key){const k=E?.[v.key];Array.isArray(k)&&k.length>0?A[v.key]=Math.min(k.length+1,v.maxCount??9):A[v.key]=1}}),i(A),r({}),o({}),l({}),p({})}else w.current=null,i({}),r({}),o({}),l({}),p({});C.current=e},[e,t,T,r,i,o,l,p]),L.useLayoutEffect(()=>{w.current&&t.current&&(t.current.__tempVariableValues=w.current.variableValues,setTimeout(()=>{w.current&&(w.current=null)},0))})},Rl=e=>{const t={},n=e.current;return n&&(n.querySelectorAll('[data-type="variable"]').forEach(r=>{const a=r.dataset.key;if(!a)return;if(r.dataset.variableRender==="antd-textarea"){const s=(r.getAttribute("data-value")||"").trim();if(!s)return;try{const u=(decodeURIComponent(s)||"").replace(/\r\n/g,`
18
18
  `).trim();u&&(t[a]=u)}catch{const o=s.trim();o&&(t[a]=o)}return}const i=(r.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
19
- `).trim();if(i){const s=r.getAttribute("data-node-type")||"";s==="report-url"?t[`${a}__url`]=i:s==="markdown-name"?t[`${a}__name`]=i:t[a]=i}}),n.querySelectorAll('[data-type="select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="textarea"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.value.replace(/[\u200B]/g,"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="richtext"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.getAttribute("data-node-type")||"";if(i==="report-module"||i==="markdown-module"){const o=Number.parseInt(r.getAttribute("data-module-index")||"0",10),u=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(o)?o:0}`]=u;return}const s=(r.textContent||"").replace(/[\u200B]/g,"").trim();s&&(t[a]=s)}),n.querySelectorAll('[data-type="datepicker"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="number-input"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.value||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="searchable-select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)})),t},Fl=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:o,setMarkdownNameAnalyzeState:u,editorRef:l,reportAnalyzeRef:d,markdownAnalyzeRef:p,markdownNameAnalyzeRef:E,markdownAnalyzeStateRef:c,markdownNameAnalyzeStateRef:y})=>{const h=L.useCallback(()=>Rl(l),[l]),m=L.useCallback((C,O)=>{const A=(O||"").trim();if(!C)return;if(!A){a(M=>({...M,[C]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}const S=r[C];if(S?.lastParsedUrl&&S.lastParsedUrl===A&&(S.status==="loading"||S.status==="success"))return;a(M=>({...M,[C]:{...M[C],status:"loading",error:void 0,lastParsedUrl:A}}));const k=Pl(A);(e||(async M=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
20
- (reportId=${M.reportId||"unknown"}, agentId=${M.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(k).then(M=>{const B=Ml(M);if(l.current){const N=h();B.forEach((x,H)=>{N[`${C}__module_${H}`]=x.content}),l.current.__tempVariableValues=N}a(N=>({...N,[C]:{status:"success",error:void 0,lastParsedUrl:A,modules:B}}))}).catch(M=>{const B=M instanceof Error?M.message:String(M);a(N=>({...N,[C]:{...N[C]||{modules:[]},status:"error",error:B||"解析失败",lastParsedUrl:A,modules:[]}}))})},[h,l,e,r,a]),g=L.useCallback((C,O)=>{const A=(O||"").trim();if(!C)return;if(!A){s(N=>({...N,[C]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const S=i[C];if(S?.lastParsedText&&S.lastParsedText===A&&S.status==="success")return;if(!t){const N=vi(A),x=kr({modules:[{title:"内容",content:ki(N),markdown:N}]});if(l.current){const H=h();x.forEach((U,$)=>{H[`${C}__module_${$}`]=U.content}),l.current.__tempVariableValues=H}s(H=>({...H,[C]:{status:"success",error:void 0,lastParsedText:A,modules:x}}));return}const k=c.current[C]?.status==="loading";k||s(N=>({...N,[C]:{...N[C],status:"loading",error:void 0,lastParsedText:A}}));const I=500,M=Date.now();setTimeout(()=>{t({text:A}).then(x=>{const H=kr(x),U=Date.now()-M,$=Math.max(0,I-U);setTimeout(()=>{if(l.current){const V=h();H.forEach((v,Y)=>{V[`${C}__module_${Y}`]=v.content}),l.current.__tempVariableValues=V}s(V=>({...V,[C]:{status:"success",error:void 0,lastParsedText:A,modules:H}}))},$)}).catch(x=>{const H=x instanceof Error?x.message:String(x);s(U=>({...U,[C]:{...U[C]||{modules:[]},status:"error",error:H,lastParsedText:A}}))})},k?0:50)},[h,l,t,i,c,s]),b=L.useCallback((C,O)=>{const A=(O||"").trim();if(!C)return;if(!A){u(N=>({...N,[C]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const S=y.current[C];if(S?.lastParsedText&&S.lastParsedText===A&&S.status==="success"||!n)return;const k=y.current[C]?.status==="loading";k||u(N=>({...N,[C]:{...N[C],status:"loading",error:void 0,lastParsedText:A}}));const I=500,M=Date.now();setTimeout(()=>{n({text:A}).then(x=>{const H=kr(x),U=Date.now()-M,$=Math.max(0,I-U);setTimeout(()=>{if(l.current){const V=h();H.forEach((v,Y)=>{V[`${C}__module_${Y}`]=v.content}),l.current.__tempVariableValues=V}u(V=>({...V,[C]:{status:"success",error:void 0,lastParsedText:A,modules:H}}))},$)}).catch(x=>{const H=x instanceof Error?x.message:String(x);u(U=>({...U,[C]:{...U[C]||{modules:[]},status:"error",error:H,lastParsedText:A}}))})},k?0:50)},[h,l,n,y,u]);L.useEffect(()=>{d.current=m},[d,m]),L.useEffect(()=>{p.current=g},[p,g]),L.useLayoutEffect(()=>{E.current=b},[E,b]);const T=L.useCallback((C,O)=>{d.current(C,O)},[d]),_=L.useCallback((C,O)=>{p.current(C,O)},[p]),w=L.useCallback((C,O)=>{E.current(C,O)},[E]);return{handleReportUrlBlur:T,handleMarkdownBlur:_,handleMarkdownNameBlur:w}},Hl=({collapsed:e,collapseTransitionMs:t,contentRef:n,contentBodyRef:r,editorRef:a,debugIdRef:i,setCollapsedContentMaxHeightPx:s,setExpandedContentMaxHeightPx:o,setIsCollapseAnimating:u,effectiveConfig:l,files:d,multiVariableCounts:p,selectPortalsLength:E,datePickerPortalsLength:c,variablePortalsLength:y})=>{const h=L.useRef(""),m=L.useCallback(()=>{const b=r.current;if(!b)return;const T=Math.max(0,Math.ceil(b.scrollHeight||0));!Number.isFinite(T)||T<=0||o(_=>_===T?_:T)},[r,o]);L.useLayoutEffect(()=>{if(!e)return;const b=n.current,T=a.current;if(!(!b||!T))try{const _=T.getBoundingClientRect(),w=document.createRange();w.selectNodeContents(T);const C=Array.from(w.getClientRects());let O;if(C.length>0){const A=Math.min(...C.map(I=>I.top)),S=2;let k=0;for(const I of C)Math.abs(I.top-A)<=S&&(k=Math.max(k,I.bottom));O=k>0?Math.max(0,Math.ceil(k-_.top)):58}else{const A=window.getComputedStyle(T),S=Number.parseFloat(A.paddingTop)||0,k=Number.parseFloat(A.lineHeight)||34;O=Math.max(0,Math.ceil(S+k))||58}if(!Number.isFinite(O)||O<=0)return;s(A=>A===O?A:O)}catch{}},[e,n,a,l,d,p,E,c,y,s]),L.useLayoutEffect(()=>{if(!e)return;const b=n.current,T=r.current,_=a.current;if(!b)return;const w=()=>{b.scrollTop=0,b.scrollLeft=0,T&&(T.scrollTop=0,T.scrollLeft=0),_&&(_.scrollTop=0,_.scrollLeft=0)},O=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;w();const A=B=>{B.preventDefault(),B.stopPropagation(),w()};b.addEventListener("wheel",A,{passive:!1}),b.addEventListener("touchmove",A,{passive:!1}),T&&(T.addEventListener("wheel",A,{passive:!1}),T.addEventListener("touchmove",A,{passive:!1}));const S=performance.now();let k=0;const I=B=>{w(),B-S<O&&(k=window.requestAnimationFrame(I))};k=window.requestAnimationFrame(I);const M=window.setTimeout(()=>{w()},O);return()=>{b.removeEventListener("wheel",A),b.removeEventListener("touchmove",A),T&&(T.removeEventListener("wheel",A),T.removeEventListener("touchmove",A)),window.cancelAnimationFrame(k),window.clearTimeout(M)}},[e,t,r,n,i,a]);const g=l.filter(b=>b.key&&b.type!=="report-module"&&b.type!=="markdown-module").map(b=>`${b.type}:${b.key}`).join("|");return g!==""&&h.current!==g&&(e||o(9999)),h.current=g,L.useEffect(()=>{if(e)return;const b=window.requestAnimationFrame(()=>{m();const T=window.setTimeout(()=>{m()},150);window.__rteSecondMeasureTimer=T});return()=>{window.cancelAnimationFrame(b);const T=window.__rteSecondMeasureTimer;T&&window.clearTimeout(T)}},[e,l,d,p,E,c,y,m]),L.useEffect(()=>{const b=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(b<=0){u(!1);return}u(!0);const T=window.setTimeout(()=>u(!1),b);return()=>window.clearTimeout(T)},[e,t,u]),{measureExpandedContentHeight:m}},$l=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r})=>{L.useEffect(()=>{if(e.length>0){n(!1);return}const a=()=>{if(!t.current){n(!0);return}const s=t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"",o=t.current.querySelectorAll('[data-type="variable"]'),u=t.current.querySelectorAll('[data-type="upload"]');let l=!1;o.forEach(p=>{(p.textContent?.replace(/[\u200B\n]/g,"").trim()||"")&&(l=!0)}),u.forEach(p=>{p.querySelector(".upload-inner-wrapper.has-file")&&(l=!0)});const d=!s&&!l;n(d),e.length===0&&r(!d)};a();const i=new MutationObserver(a);return t.current&&i.observe(t.current,{childList:!0,subtree:!0,characterData:!0}),()=>{i.disconnect()}},[e,t,n,r])},Ul=({config:e,reportAnalyzeState:t,markdownAnalyzeState:n,markdownNameAnalyzeState:r})=>L.useMemo(()=>{if(e.length===0)return e;const a=[];let i=!1;for(const s of e){if(s.type==="markdown"&&s.key==="tableData"||(i&&s.type==="text"&&s.text?.startsWith(`
19
+ `).trim();if(i){const s=r.getAttribute("data-node-type")||"";s==="report-url"?t[`${a}__url`]=i:s==="markdown-name"?t[`${a}__name`]=i:t[a]=i}}),n.querySelectorAll('[data-type="select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="textarea"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.value.replace(/[\u200B]/g,"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="richtext"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.getAttribute("data-node-type")||"";if(i==="report-module"||i==="markdown-module"){const o=Number.parseInt(r.getAttribute("data-module-index")||"0",10),u=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(o)?o:0}`]=u;return}const s=(r.textContent||"").replace(/[\u200B]/g,"").trim();s&&(t[a]=s)}),n.querySelectorAll('[data-type="datepicker"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="number-input"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.value||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="searchable-select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)})),t},Fl=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:o,setMarkdownNameAnalyzeState:u,editorRef:l,reportAnalyzeRef:d,markdownAnalyzeRef:p,markdownNameAnalyzeRef:E,markdownAnalyzeStateRef:c,markdownNameAnalyzeStateRef:x})=>{const h=L.useCallback(()=>Rl(l),[l]),m=L.useCallback((S,O)=>{const A=(O||"").trim();if(!S)return;if(!A){a(M=>({...M,[S]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}const v=r[S];if(v?.lastParsedUrl&&v.lastParsedUrl===A&&(v.status==="loading"||v.status==="success"))return;a(M=>({...M,[S]:{...M[S],status:"loading",error:void 0,lastParsedUrl:A}}));const k=Pl(A);(e||(async M=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
20
+ (reportId=${M.reportId||"unknown"}, agentId=${M.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(k).then(M=>{const R=Ml(M);if(l.current){const I=h();R.forEach((y,F)=>{I[`${S}__module_${F}`]=y.content}),l.current.__tempVariableValues=I}a(I=>({...I,[S]:{status:"success",error:void 0,lastParsedUrl:A,modules:R}}))}).catch(M=>{const R=M instanceof Error?M.message:String(M);a(I=>({...I,[S]:{...I[S]||{modules:[]},status:"error",error:R||"解析失败",lastParsedUrl:A,modules:[]}}))})},[h,l,e,r,a]),g=L.useCallback((S,O)=>{const A=(O||"").trim();if(!S)return;if(!A){s(I=>({...I,[S]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const v=i[S];if(v?.lastParsedText&&v.lastParsedText===A&&v.status==="success")return;if(!t){const I=vi(A),y=kr({modules:[{title:"内容",content:ki(I),markdown:I}]});if(l.current){const F=h();y.forEach((U,$)=>{F[`${S}__module_${$}`]=U.content}),l.current.__tempVariableValues=F}s(F=>({...F,[S]:{status:"success",error:void 0,lastParsedText:A,modules:y}}));return}const k=c.current[S]?.status==="loading";k||s(I=>({...I,[S]:{...I[S],status:"loading",error:void 0,lastParsedText:A}}));const N=500,M=Date.now();setTimeout(()=>{t({text:A}).then(y=>{const F=kr(y),U=Date.now()-M,$=Math.max(0,N-U);setTimeout(()=>{if(l.current){const V=h();F.forEach((_,Y)=>{V[`${S}__module_${Y}`]=_.content}),l.current.__tempVariableValues=V}s(V=>({...V,[S]:{status:"success",error:void 0,lastParsedText:A,modules:F}}))},$)}).catch(y=>{const F=y instanceof Error?y.message:String(y);s(U=>({...U,[S]:{...U[S]||{modules:[]},status:"error",error:F,lastParsedText:A}}))})},k?0:50)},[h,l,t,i,c,s]),b=L.useCallback((S,O)=>{const A=(O||"").trim();if(!S)return;if(!A){u(I=>({...I,[S]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const v=x.current[S];if(v?.lastParsedText&&v.lastParsedText===A&&v.status==="success"||!n)return;const k=x.current[S]?.status==="loading";k||u(I=>({...I,[S]:{...I[S],status:"loading",error:void 0,lastParsedText:A}}));const N=500,M=Date.now();setTimeout(()=>{n({text:A}).then(y=>{const F=kr(y),U=Date.now()-M,$=Math.max(0,N-U);setTimeout(()=>{if(l.current){const V=h();F.forEach((_,Y)=>{V[`${S}__module_${Y}`]=_.content}),l.current.__tempVariableValues=V}u(V=>({...V,[S]:{status:"success",error:void 0,lastParsedText:A,modules:F}}))},$)}).catch(y=>{const F=y instanceof Error?y.message:String(y);u(U=>({...U,[S]:{...U[S]||{modules:[]},status:"error",error:F,lastParsedText:A}}))})},k?0:50)},[h,l,n,x,u]);L.useEffect(()=>{d.current=m},[d,m]),L.useEffect(()=>{p.current=g},[p,g]),L.useLayoutEffect(()=>{E.current=b},[E,b]);const T=L.useCallback((S,O)=>{d.current(S,O)},[d]),C=L.useCallback((S,O)=>{p.current(S,O)},[p]),w=L.useCallback((S,O)=>{E.current(S,O)},[E]);return{handleReportUrlBlur:T,handleMarkdownBlur:C,handleMarkdownNameBlur:w}},Hl=({collapsed:e,collapseTransitionMs:t,contentRef:n,contentBodyRef:r,editorRef:a,debugIdRef:i,setCollapsedContentMaxHeightPx:s,setExpandedContentMaxHeightPx:o,setIsCollapseAnimating:u,effectiveConfig:l,files:d,multiVariableCounts:p,selectPortalsLength:E,datePickerPortalsLength:c,variablePortalsLength:x})=>{const h=L.useRef(""),m=L.useCallback(()=>{const b=r.current;if(!b)return;const T=Math.max(0,Math.ceil(b.scrollHeight||0));!Number.isFinite(T)||T<=0||o(C=>C===T?C:T)},[r,o]);L.useLayoutEffect(()=>{if(!e)return;const b=n.current,T=a.current;if(!(!b||!T))try{const C=T.getBoundingClientRect(),w=document.createRange();w.selectNodeContents(T);const S=Array.from(w.getClientRects());let O;if(S.length>0){const A=Math.min(...S.map(N=>N.top)),v=2;let k=0;for(const N of S)Math.abs(N.top-A)<=v&&(k=Math.max(k,N.bottom));O=k>0?Math.max(0,Math.ceil(k-C.top)):58}else{const A=window.getComputedStyle(T),v=Number.parseFloat(A.paddingTop)||0,k=Number.parseFloat(A.lineHeight)||34;O=Math.max(0,Math.ceil(v+k))||58}if(!Number.isFinite(O)||O<=0)return;s(A=>A===O?A:O)}catch{}},[e,n,a,l,d,p,E,c,x,s]),L.useLayoutEffect(()=>{if(!e)return;const b=n.current,T=r.current,C=a.current;if(!b)return;const w=()=>{b.scrollTop=0,b.scrollLeft=0,T&&(T.scrollTop=0,T.scrollLeft=0),C&&(C.scrollTop=0,C.scrollLeft=0)},O=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;w();const A=R=>{R.preventDefault(),R.stopPropagation(),w()};b.addEventListener("wheel",A,{passive:!1}),b.addEventListener("touchmove",A,{passive:!1}),T&&(T.addEventListener("wheel",A,{passive:!1}),T.addEventListener("touchmove",A,{passive:!1}));const v=performance.now();let k=0;const N=R=>{w(),R-v<O&&(k=window.requestAnimationFrame(N))};k=window.requestAnimationFrame(N);const M=window.setTimeout(()=>{w()},O);return()=>{b.removeEventListener("wheel",A),b.removeEventListener("touchmove",A),T&&(T.removeEventListener("wheel",A),T.removeEventListener("touchmove",A)),window.cancelAnimationFrame(k),window.clearTimeout(M)}},[e,t,r,n,i,a]);const g=l.filter(b=>b.key&&b.type!=="report-module"&&b.type!=="markdown-module").map(b=>`${b.type}:${b.key}`).join("|");return g!==""&&h.current!==g&&(e||o(9999)),h.current=g,L.useEffect(()=>{if(e)return;const b=window.requestAnimationFrame(()=>{m();const T=window.setTimeout(()=>{m()},150);window.__rteSecondMeasureTimer=T});return()=>{window.cancelAnimationFrame(b);const T=window.__rteSecondMeasureTimer;T&&window.clearTimeout(T)}},[e,l,d,p,E,c,x,m]),L.useEffect(()=>{const b=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(b<=0){u(!1);return}u(!0);const T=window.setTimeout(()=>u(!1),b);return()=>window.clearTimeout(T)},[e,t,u]),{measureExpandedContentHeight:m}},$l=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r})=>{L.useEffect(()=>{if(e.length>0){n(!1);return}const a=()=>{if(!t.current){n(!0);return}const s=t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"",o=t.current.querySelectorAll('[data-type="variable"]'),u=t.current.querySelectorAll('[data-type="upload"]');let l=!1;o.forEach(p=>{(p.textContent?.replace(/[\u200B\n]/g,"").trim()||"")&&(l=!0)}),u.forEach(p=>{p.querySelector(".upload-inner-wrapper.has-file")&&(l=!0)});const d=!s&&!l;n(d),e.length===0&&r(!d)};a();const i=new MutationObserver(a);return t.current&&i.observe(t.current,{childList:!0,subtree:!0,characterData:!0}),()=>{i.disconnect()}},[e,t,n,r])},Ul=({config:e,reportAnalyzeState:t,markdownAnalyzeState:n,markdownNameAnalyzeState:r})=>L.useMemo(()=>{if(e.length===0)return e;const a=[];let i=!1;for(const s of e){if(s.type==="markdown"&&s.key==="tableData"||(i&&s.type==="text"&&s.text?.startsWith(`
21
21
  `)?(a.push({...s,text:s.text.slice(1)}),i=!1):a.push(s)),s.type==="report-url"&&s.key){const o=t[s.key],u=o?.status??"idle",l=o?.modules??[];u==="loading"&&a.push({type:"text",className:"rte-report-parsing",text:`解析中...
22
22
  `}),u==="error"&&o?.error&&a.push({type:"text",className:"rte-report-error",text:`解析失败:${ie(o.error)}
23
23
  `}),l.length>0&&(l.forEach((d,p)=>{a.push({type:"report-module",key:s.key,moduleIndex:p,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:d.content})}),a.push({type:"text",text:`
@@ -31,47 +31,47 @@ ${(e||"").replace(/\r\n/g,`
31
31
  `}),u==="error"&&o?.error&&a.push({type:"text",className:"rte-markdown-error",text:`解析失败:${ie(o.error)}
32
32
  `}),l.length>0&&u!=="loading"&&(l.forEach((d,p)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:p,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:d.content})}),i=!0)}}return a},[e,n,r,t]);function ql(e,t){const r=document.createElement("canvas").getContext("2d");if(!r)return 0;const a=window.getComputedStyle(t),i=a.fontStyle||"normal",s=a.fontWeight||"400",o=a.fontSize||"16px",u=a.fontFamily||"sans-serif";r.font=`${i} ${s} ${o} ${u}`;const d=(e||"").replace(/\r\n/g,`
33
33
  `).split(`
34
- `);let p=0;for(const y of d){const h=r.measureText(y||" ").width||0;p=Math.max(p,h)}const E=Number.parseFloat(a.letterSpacing||""),c=Number.isFinite(E)?E:0;if(c>0){const y=d.reduce((h,m)=>h.length>=m.length?h:m,"");p+=c*Math.max(0,y.length-1)}return Math.ceil(p)}function zn(e,t){if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(r=>{if(r.dataset.variableRender==="antd-textarea")return;const i=r.innerText.replace(/\u200B/g,"").trim();if(i.length===0){const c=r.querySelector(".variable-info-icon");Array.from(r.childNodes).forEach(m=>{if(m.nodeType===Node.TEXT_NODE){r.removeChild(m);return}m.nodeType===Node.ELEMENT_NODE&&m.tagName==="BR"&&r.removeChild(m)});const y=document.createTextNode("​");c&&c.parentNode===r?r.insertBefore(y,c):r.firstChild?r.insertBefore(y,r.firstChild):r.appendChild(y),r.classList.add("show-placeholder");const h=r.dataset.placeholder||"";if(h){const b=(()=>{try{const O=ql(h,r);if(!O||!Number.isFinite(O)){const A=qn(h);return Math.max(0,A-22)}return O}catch{const O=qn(h);return Math.max(0,O-22)}})(),T=(()=>{if(!r.classList.contains("rte-variable-with-icon"))return 0;const O=r.querySelector(".variable-info-icon:not(.hidden)");if(!O)return 24;try{const A=window.getComputedStyle(O),S=Math.ceil(O.getBoundingClientRect().width||0)||16,k=Math.ceil(Number.parseFloat(A.right||"0"))||4;return Math.max(16,Math.min(120,S+k+2))}catch{return 24}})();T>0?r.style.setProperty("--rte-icon-pad-right",`${T}px`):r.style.removeProperty("--rte-icon-pad-right");const _=2,w=T>0?T:8,C=Math.max(24,Math.min(600,Math.ceil(b+8+w+_)));r.style.minWidth=`${C}px`}else r.style.minWidth=""}else r.classList.remove("show-placeholder"),r.style.minWidth="",r.style.removeProperty("--rte-icon-pad-right");const s=r.innerText||"",o=!!r.querySelector("br")||s.includes(`
35
- `),u=r.offsetHeight>32,l=i.length>0&&(o||u);r.classList.toggle("rte-variable-multiline",l),r.classList.toggle("rte-variable-force-block",l);const d=r.closest(".rte-inline-group");d&&d.classList.toggle("rte-inline-group-force-block",l);const p=r.closest(".required-upload-group, .required-multi-first");p&&p.classList.toggle("rte-required-group-force-block",l);const E=p?p.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");E&&E!==p&&E.classList.toggle("rte-exclusion-force-block",l)})}function wr(e,t,n,r){if(!e.current)return;const a=h=>{h.classList.contains("rte-richtext-host-expanded")&&(h.style.setProperty("display","flex","important"),h.style.setProperty("flex-direction","column","important"),h.style.setProperty("flex","1 1 auto","important"),h.style.setProperty("min-height","0","important"),h.style.setProperty("width","100%","important"),h.style.setProperty("align-self","stretch","important"))},i=h=>{if(!h.closest('[data-rte-force-hidden="1"]')){if(h.classList.contains("rte-richtext-host-expanded")){a(h);return}if(h.classList.contains("required-upload-group")){h.style.setProperty("display","inline-flex","important");return}if(h.classList.contains("exclusion-wrapper")){h.classList.contains("rte-exclusion-force-block")?h.style.setProperty("display","block","important"):h.style.setProperty("display","inline-block","important");return}h.style.setProperty("display","inline-block","important")}},s=h=>{h.closest('[data-rte-force-hidden="1"]')||(h.style.display="none",h.style.setProperty("display","none","important"))},o=t.some(h=>h.exclusionGroup==="separator");if(o){const h=[];let m=[];for(const S of t){if(S.exclusionGroup==="separator"){m.length&&h.push(m),m=[];continue}!S.exclusionGroup||S.exclusionGroup==="separator"||(S.type==="upload"&&S.key?m.push({type:"upload",key:S.key}):(S.type==="video-url"||S.type==="video-upload")&&S.key?m.push({type:S.type,key:S.key}):(S.type==="variable"||S.type==="multi-variable"||S.type==="markdown"||S.type==="markdown-name"||S.type==="markdown-module")&&S.key?m.push({type:S.type==="multi-variable"?"multi-variable":"variable",key:S.key}):m.push({type:"other",nodeType:S.type}))}m.length&&h.push(m);const g=S=>{const k=t.find(I=>I.type==="upload"&&I.key===S);return k?typeof k.maxCount=="number"&&k.maxCount>1?k.maxCount:1:0},b=h.map(S=>{for(const k of S)if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const I=r?.[k.key];if(I?.status==="success"&&I.videoUrl||I?.status==="loading")return!0;if(k.type==="video-url"){const M=e.current.querySelector(`[data-type="variable"][data-node-type="video-url"][data-key="${k.key}"]`);if(M&&!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(k.type==="upload"){if(n[k.key]!==null&&n[k.key]!==void 0)return!0;const I=g(k.key);for(let M=0;M<I;M++){const B=`${k.key}-${M}`;if(n[B]!==null&&n[B]!==void 0)return!0}continue}if(k.type==="multi-variable"){const I=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`);for(const M of I){if(M.dataset.variableRender==="antd-textarea"){const B=M.dataset.value||"";let N=B;try{N=decodeURIComponent(B)}catch{N=B}if(N.trim().length>0)return!0;continue}if(!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(k.type==="variable"){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${k.key}"]`))return!0;const M=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);if(!M)continue;if(M.dataset.variableRender==="antd-textarea"){const B=M.dataset.value||"";let N=B;try{N=decodeURIComponent(B)}catch{N=B}if(N.trim().length>0)return!0}else if(!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0;continue}}return!1}),T=b.some(Boolean),_=T?b.findIndex(Boolean):-1,w=S=>e.current.querySelector(`[data-type="video-url"][data-key="${S}"], [data-type="video-upload"][data-key="${S}"], [data-type="variable"][data-node-type="video-url"][data-key="${S}"]`),C=S=>{for(const k of h[S]||[])if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const I=w(k.key);I&&i(I.closest(".exclusion-wrapper")||I);continue}if(k.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${k.key}"], [data-type="upload"][data-key^="${k.key}-"]`).forEach(M=>i(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`).forEach(M=>{const B=M.closest(".exclusion-wrapper")||M;i(B)});continue}if(k.type==="variable"){const I=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);I&&i(I.closest(".exclusion-wrapper")||I),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${k.key}"]`).forEach(B=>{const N=B.closest(".exclusion-wrapper")||B.closest(".rte-markdown-module-container")||B;i(N)})}}},O=S=>{for(const k of h[S]||[])if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const I=w(k.key);I&&s(I.closest(".exclusion-wrapper")||I);continue}if(k.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${k.key}"], [data-type="upload"][data-key^="${k.key}-"]`).forEach(M=>s(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`).forEach(M=>s(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="variable"){const I=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);I&&s(I.closest(".exclusion-wrapper")||I),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${k.key}"]`).forEach(B=>{const N=B.closest(".exclusion-wrapper")||B.closest(".rte-markdown-module-container")||B;s(N)})}}};for(let S=0;S<h.length;S++)!T||S===_?C(S):O(S);e.current.querySelectorAll('[data-group="separator"]').forEach(S=>{S.closest('[data-rte-force-hidden="1"]')||(T?s(S):S.style.setProperty("display","inline-flex","important"))});return}const u=new Set,l={};for(const h of t)h.exclusionGroup&&h.exclusionGroup!=="separator"&&(u.add(h.exclusionGroup),l[h.exclusionGroup]||(l[h.exclusionGroup]=[]),l[h.exclusionGroup].push({type:h.type,key:h.key,exclusionGroup:h.exclusionGroup}));const d={};for(const h of u){d[h]=!1;for(const m of l[h])if((m.type==="video-url"||m.type==="video-upload")&&m.key){const g=r?.[m.key];if(g?.status==="success"&&g.videoUrl||g?.status==="loading"){d[h]=!0;break}if(m.type==="video-url"){const b=e.current.querySelector(`[data-type="variable"][data-node-type="video-url"][data-key="${m.key}"]`);if(b&&!b.classList.contains("show-placeholder")&&b.innerText.replace(/[\u200B\n]/g,"").trim().length>0){d[h]=!0;break}}}else if(m.type==="upload"&&m.key){if(n[m.key]!==null&&n[m.key]!==void 0){d[h]=!0;break}const g=t.find(b=>b.type==="upload"&&b.key===m.key);if(g&&typeof g.maxCount=="number")for(let b=0;b<g.maxCount;b++){const T=`${m.key}-${b}`;if(n[T]!==null&&n[T]!==void 0){d[h]=!0;break}}if(d[h])break}else if((m.type==="variable"||m.type==="multi-variable"||m.type==="markdown"||m.type==="markdown-name")&&m.key){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${m.key}"]`)){d[h]=!0;break}const b=m.type==="multi-variable"?e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${m.key}"]`):[e.current.querySelector(`[data-type="variable"][data-key="${m.key}"]`)].filter(Boolean);for(const T of b){if(T.dataset.variableRender==="antd-textarea"){const _=T.dataset.value||"";let w=_;try{w=decodeURIComponent(_)}catch{w=_}if(w.trim().length>0){d[h]=!0;break}continue}if(!T.classList.contains("show-placeholder")&&T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){d[h]=!0;break}}if(d[h])break}}const E=Object.keys(d).filter(h=>d[h]).length>0;let c=null;if(E&&o){for(const h of t)if(h.exclusionGroup&&h.exclusionGroup!=="separator"&&d[h.exclusionGroup]){c=h.exclusionGroup;break}}for(const h of u){const m=e.current.querySelectorAll(`[data-group="${h}"]`);o&&E&&c?h===c?m.forEach(i):m.forEach(s):m.forEach(i)}e.current.querySelectorAll('[data-group="separator"]').forEach(h=>{h.closest('[data-rte-force-hidden="1"]')||(E?s(h):h.style.setProperty("display","inline-flex","important"))})}function Nr(e,t,n,r,a){if(!e.current){r(!1);return}const i=h=>{const m=h.getAttribute("data-node-type")||"";if(m!=="report-module"&&m!=="markdown-module")return(h.textContent||"").replace(/[\u200B]/g,"").trim();const g=(h.textContent||"").replace(/[\u200B]/g,"").trim(),b=Array.from(h.querySelectorAll(":scope > div"));if(b.length===0)return g;let T=-1;for(let C=0;C<b.length;C++)if((b[C].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=C;break}return b.filter((C,O)=>O!==T).map(C=>(C.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
36
- `).trim()||g},s=h=>h?!!h.closest('[data-rte-force-hidden="1"]'):!1,o=[];for(let h=0;h<t.length;h++){const m=t[h];if((m.type==="variable"||m.type==="report-url"||m.type==="markdown"||m.type==="markdown-name"||m.type==="upload"||m.type==="multi-variable"||m.type==="select"||m.type==="textarea"||m.type==="richtext"||m.type==="report-module"||m.type==="markdown-module"||m.type==="datepicker"||m.type==="number-input"||m.type==="video-url"||m.type==="video-upload")&&m.required&&m.key){o.push({exclusionGroup:m.exclusionGroup||"",key:m.key,type:m.type==="multi-variable"||m.type==="report-url"||m.type==="markdown"||m.type==="markdown-name"?"variable":m.type==="report-module"||m.type==="markdown-module"?"richtext":m.type==="video-url"?"video-url":m.type==="video-upload"?"video-upload":m.type,isMultiVariable:m.type==="multi-variable",minCount:m.type==="multi-variable"||m.type==="upload"&&typeof m.minCount=="number"?m.minCount:void 0,moduleIndex:m.type==="report-module"||m.type==="markdown-module"?m.moduleIndex:void 0,__index:h});continue}if(m.type==="text"&&m.className?.includes("rte-text-required"))if(m.exclusionGroup)for(let g=h+1;g<t.length;g++){const b=t[g];if(b.exclusionGroup===m.exclusionGroup&&(b.type==="variable"||b.type==="markdown"||b.type==="upload"||b.type==="select"||b.type==="textarea"||b.type==="richtext"||b.type==="datepicker"||b.type==="number-input")&&b.key){o.push({exclusionGroup:m.exclusionGroup,key:b.key,type:b.type==="markdown"?"variable":b.type,__index:g});break}}else for(let g=h+1;g<t.length;g++){const b=t[g];if((b.type==="variable"||b.type==="markdown"||b.type==="upload"||b.type==="select"||b.type==="textarea"||b.type==="richtext"||b.type==="datepicker"||b.type==="number-input")&&b.key){o.push({exclusionGroup:b.exclusionGroup||"",key:b.key,type:b.type==="markdown"?"variable":b.type,__index:g});break}}}const u=t.some(h=>h.exclusionGroup==="separator"),l=[];if(u&&o.length>1){const h=[];t.forEach((m,g)=>{m.exclusionGroup==="separator"&&h.push(g)});for(const m of h){const b=o.filter(w=>typeof w.__index=="number"&&w.__index<m).sort((w,C)=>(C.__index??0)-(w.__index??0))[0],_=o.filter(w=>typeof w.__index=="number"&&w.__index>m).sort((w,C)=>(w.__index??0)-(C.__index??0))[0];b&&_&&l.push([b,_])}}if(o.length===0){if(t.length===0){if(!e.current){r(!1);return}const h=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(h.length>0);return}r(!0);return}const d=o.filter(h=>{if(!e.current)return!1;if(h.exclusionGroup){const m=e.current.querySelectorAll(`[data-group="${h.exclusionGroup}"]`);if(m.length>0){const g=m[0];return s(g)?!0:g.style.display!=="none"}}if(h.type==="upload"&&h.key){const m=e.current.querySelector(`[data-type="upload"][data-key="${h.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="variable"&&h.key)if(h.isMultiVariable){const m=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${h.key}"]`);if(m.length>0){const g=m[0],b=g.closest("[data-group]")||g.parentElement;return s(b)?!0:b?b.style.display!=="none":!0}}else{const m=e.current.querySelector(`[data-type="variable"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="select"&&h.key){const m=e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="textarea"&&h.key){const m=e.current.querySelector(`[data-type="textarea"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="richtext"&&h.key){const m=typeof h.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]`:`[data-type="richtext"][data-key="${h.key}"]`,g=e.current.querySelector(m);if(g){const b=g.closest("[data-group]")||g.parentElement;return s(b)?!0:b?b.style.display!=="none":!0}}else if(h.type==="datepicker"&&h.key){const m=e.current.querySelector(`[data-type="datepicker"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="number-input"&&h.key){const m=e.current.querySelector(`[data-type="number-input"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if((h.type==="video-url"||h.type==="video-upload")&&h.key){const m=e.current.querySelector(`[data-type="${h.type}"][data-key="${h.key}"], [data-type="variable"][data-key="${h.key}"][data-node-type="video-url"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}return!1});if(d.length===0){r(!0);return}const p=new Set;l.forEach(h=>{h.forEach(m=>{m.key&&p.add(m.key)})});const E=d.filter(h=>!h.key||!p.has(h.key));let c=(l.length===0,!0);for(const h of l){const m=h.filter(b=>{if(!e.current)return!1;if(b.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${b.exclusionGroup}"]`);if(T.length>0){const _=T[0];return s(_)?!0:_.style.display!=="none"}}return!0});if(m.length===0)continue;let g=!1;for(const b of m)if(b.type==="upload"&&b.key){if(b.minCount&&b.minCount>0){let T=0;const _=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${b.key}"]`);if(_.length===0)continue;for(let w=0;w<_.length;w++){const O=_[w].dataset.key;O&&n[O]!=null&&(T+=1)}if(T>=b.minCount){g=!0;break}}else if(n[b.key]!==null&&n[b.key]!==void 0){g=!0;break}}else if(b.type==="variable"&&b.key)if(b.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${b.key}"]`);let _=0;for(const C of Array.from(T)){if(C.classList.contains("show-placeholder"))continue;C.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(_+=1)}const w=b.minCount&&b.minCount>0?b.minCount:1;if(_>=w){g=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${b.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){const w=T.dataset.nodeType;if((w==="markdown"||w==="markdown-name")&&!!!e.current.querySelector(`[data-node-type="markdown-module"][data-key="${b.key}"]`))continue;g=!0;break}}}else if(b.type==="select"&&b.key){const T=e.current.querySelector(`[data-type="select"][data-key="${b.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){g=!0;break}}else if(b.type==="textarea"&&b.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${b.key}"]`);if(T&&(T.value||"").trim().length>0){g=!0;break}}else if(b.type==="richtext"&&b.key){const T=typeof b.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${b.key}"][data-module-index="${b.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${b.key}"][data-module-index="${b.moduleIndex}"]`:`[data-type="richtext"][data-key="${b.key}"]`,_=e.current.querySelector(T);if(_){if(_.getAttribute("data-is-placeholder")==="true")continue;if(i(_).length>0){g=!0;break}}}else if(b.type==="datepicker"&&b.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${b.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){g=!0;break}}else if(b.type==="number-input"&&b.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${b.key}"]`);if(T&&(T.value||"").trim().length>0){g=!0;break}}else if((b.type==="video-url"||b.type==="video-upload")&&b.key&&a?.[b.key]?.status==="success"){g=!0;break}if(!g){c=!1;break}}let y=!0;for(const h of E)if(h.type==="upload"&&h.key){if(h.minCount&&h.minCount>0){let m=0;const g=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${h.key}"]`);if(g.length===0){y=!1;break}for(let b=0;b<g.length;b++){const _=g[b].dataset.key;_&&n[_]!=null&&(m+=1)}if(m<h.minCount){y=!1;break}}else if(n[h.key]===null||n[h.key]===void 0){y=!1;break}}else if(h.type==="variable"&&h.key)if(h.isMultiVariable){const m=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${h.key}"]`);let g=0;for(const T of Array.from(m)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(g+=1)}const b=h.minCount&&h.minCount>0?h.minCount:1;if(g<b){y=!1;break}}else{const m=e.current.querySelector(`[data-type="variable"][data-key="${h.key}"]`);if(!m){y=!1;break}if(m.classList.contains("show-placeholder")){y=!1;break}if(m.innerText.replace(/[\u200B\n]/g,"").trim().length===0){y=!1;break}const b=m.dataset.nodeType;if((b==="markdown"||b==="markdown-name")&&!!!e.current.querySelector(`[data-node-type="markdown-module"][data-key="${h.key}"]`)){y=!1;break}}else if(h.type==="select"&&h.key){const m=e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);if(!m||(m.getAttribute("data-value")||"").trim().length===0){y=!1;break}}else if(h.type==="textarea"&&h.key){const m=e.current.querySelector(`[data-type="textarea"][data-key="${h.key}"]`);if(!m||(m.value||"").trim().length===0){y=!1;break}}else if(h.type==="richtext"&&h.key){const m=typeof h.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]`:`[data-type="richtext"][data-key="${h.key}"]`,g=e.current.querySelector(m);if(g&&g.getAttribute("data-is-placeholder")==="true"){y=!1;break}if(!g||i(g).length===0){y=!1;break}}else if(h.type==="datepicker"&&h.key){const m=e.current.querySelector(`[data-type="datepicker"][data-key="${h.key}"]`);if(!m||(m.getAttribute("data-value")||"").trim().length===0){y=!1;break}}else if(h.type==="number-input"&&h.key){const m=e.current.querySelector(`[data-type="number-input"][data-key="${h.key}"]`);if(!m||(m.value||"").trim().length===0){y=!1;break}}else if((h.type==="video-url"||h.type==="video-upload")&&h.key&&a?.[h.key]?.status!=="success"){y=!1;break}r(c&&y)}const zl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s,videoState:o})=>{L.useLayoutEffect(()=>{const u=r.current;if(!u)return;const l=new Map,d=c=>{const y=c.target,h=c.relatedTarget;!y||!r.current||!r.current.contains(y)||h&&r.current.contains(h)||setTimeout(()=>{if(r.current){if(e.length===0){const m=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(m.length>0);return}zn(r),wr(r,t,n,o),Nr(r,t,n,a,o)}},0)};u.addEventListener("blur",d,!0);const p=()=>{if(!r.current)return;l.forEach((h,m)=>{m.removeEventListener("blur",h,!1)}),l.clear();const c=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),y=h=>{h.stopPropagation(),h.stopImmediatePropagation();const m=h.target;if(!m||!r.current||!r.current.contains(m))return;const g=m.closest('[data-type="variable"][data-multi-key]');if(!g||!r.current.contains(g))return;let b=!1;if(l.forEach((k,I)=>{(I===g||I.contains(m))&&(b=!0)}),!b)return;const T=g.dataset.multiKey,_=g.dataset.key,w=g.dataset.index;if(!T||!_||w===void 0)return;const C=h.relatedTarget;if(!(!C||!r.current.contains(C)))return;const A=g.innerText.replace(/[\u200B\n]/g,"").trim(),S=/[、,,\s]+/;if(S.test(A)){const M=A.split(S).map(B=>B.trim()).filter(B=>B.length>0).slice(0,9);if(M.length>1){const B=e.find(N=>N.type==="multi-variable"&&N.key===T);if(B){const N=i[T]||1,x=parseInt(w,10),H=B.maxCount||9,U=[];for(let J=0;J<N;J++){const P=`${T}_${J}`,ee=r.current.querySelector(`[data-type="variable"][data-key="${P}"][data-multi-key="${T}"]`);if(ee){const te=ee.innerText.replace(/[\u200B\n]/g,"").trim();U.push(te)}}U.splice(x,1,...M);const $=U.slice(0,H);$.length>0&&$[$.length-1]!==""&&$.length<H&&$.push("");const V=Math.max($.length,1),v={};$.forEach((J,P)=>{J&&(v[`${T}_${P}`]=J)}),r.current.querySelectorAll('[data-type="variable"]').forEach(J=>{const P=J.dataset.key,ee=J.dataset.multiKey;if(P&&ee!==T){const te=J.innerText.replace(/[\u200B\n]/g,"").trim();te&&(v[P]=te)}}),r.current.__tempVariableValues=v,s(J=>({...J,[T]:V}))}}}};c.forEach(h=>{h.addEventListener("blur",y,!1),l.set(h,y)})},E=setTimeout(()=>{p()},0);return()=>{clearTimeout(E),u.removeEventListener("blur",d,!0),l.forEach((c,y)=>{y.removeEventListener("blur",c,!1)}),l.clear()}},[e,t,r,n,i,a,s])},Vl=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:o,onBeforeFilePickerOpen:u,files:l,setFiles:d,handleRemoveFile:p,setActiveBatchKey:E,setActiveBatchStartIndex:c,setActiveFileKey:y,isDraggingRef:h,richtextPrevScrollTopRef:m,videoState:g,setVideoState:b,videoFileInputRef:T,activeVideoKeyRef:_})=>{const w=(...O)=>{},C=O=>{try{const A=window.getSelection();if(!A)return w(O,"no selection");const S=A.rangeCount>0?A.getRangeAt(0):null;w(O,{rangeCount:A.rangeCount,isCollapsed:A.isCollapsed,anchorNode:A.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":A.anchorNode?.nodeName,anchorOffset:A.anchorOffset,focusNode:A.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":A.focusNode?.nodeName,focusOffset:A.focusOffset,range:S?{startContainer:S.startContainer.nodeType===Node.TEXT_NODE?"TEXT":S.startContainer.nodeName,startOffset:S.startOffset,endContainer:S.endContainer.nodeType===Node.TEXT_NODE?"TEXT":S.endContainer.nodeName,endOffset:S.endOffset}:null})}catch{}};return L.useCallback(O=>{if(e)return;t&&n?.(!1);const A=O.target;if(w("click",{tag:A.tagName,cls:A.className}),C("before click"),A.closest('[data-type="datepicker"]'))return;if(A.closest(".tag-close-btn")){O.preventDefault(),O.stopPropagation();return}if(r.length===0)return;const I=(v,Y)=>{if(!i.current)return;Array.from(i.current.children).forEach(P=>{if(P!==v)if(Y)P.dataset.prevDisplay===void 0&&(P.dataset.prevDisplay=P.style.display||""),P.dataset.rteForceHidden="1",P.style.setProperty("display","none","important");else{if(P.dataset.prevDisplay!==void 0){const ee=P.dataset.prevDisplay;ee?P.style.display=ee:P.style.removeProperty("display"),delete P.dataset.prevDisplay}else P.style.removeProperty("display");delete P.dataset.rteForceHidden}})},M=A.closest(".rte-textarea-toggle");if(M){O.preventDefault(),O.stopPropagation();const v=M.closest(".rte-textarea-wrapper"),Y=v?.querySelector('[data-type="textarea"]'),P=!(M.getAttribute("data-expanded")==="true");M.setAttribute("data-expanded",String(P)),M.textContent=P?"收起":"展开",v&&v.classList.toggle("rte-textarea-expanded",P);const ee=v?.closest(".rte-textarea-required");if(ee?ee.classList.toggle("rte-textarea-overlay",P):v&&v.classList.toggle("rte-textarea-overlay",P),Y)if(P)Y.classList.add("rte-textarea-expanded"),Y.style.maxHeight="none",Y.style.height="100%";else{Y.classList.remove("rte-textarea-expanded");const te=Y.dataset.maxHeight||"252";Y.style.maxHeight=`${te}px`,Y.style.height="auto"}i.current&&(P?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const B=A.closest(".rte-richtext-toggle");if(B){O.preventDefault(),O.stopPropagation();const v=B.closest(".rte-richtext-wrapper"),Y=v?.querySelector('[data-type="richtext"]'),P=!(B.getAttribute("data-expanded")==="true");((Q,re)=>{Q.setAttribute("data-expanded",String(re)),Q.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})(B,P);const te=v?.closest(".rte-richtext-required");te?te.classList.toggle("rte-richtext-expanded",P):v&&v.classList.toggle("rte-richtext-expanded",P);const ae=v?.closest(".exclusion-wrapper")||v?.parentElement;if(Y&&(P?(Y.style.height="100%",Y.style.overflow="auto"):(Y.style.height="",Y.style.overflow="")),ae&&(ae.classList.toggle("rte-richtext-host-expanded",P),I(ae,P)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",P),s.current?.classList.toggle("rte-richtext-container-expanded",P),s.current)if(P){const Q=Math.ceil(s.current.getBoundingClientRect().height||0);Q>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${Q}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if(P)m.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const Q=m.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=Q)},0)}}return}if(A.closest('[data-type="text"]')){O.preventDefault(),O.stopPropagation();const v=window.getSelection();v&&v.removeAllRanges();return}if(a&&A.closest(".tag-node")){O.preventDefault(),O.stopPropagation();const Y=window.getSelection();Y&&Y.removeAllRanges();return}const x=A.closest('[data-type="variable"]');if(x){if(h.current)return;if(x.dataset.variableRender!=="antd-textarea"){const v=!!A.closest(".variable-info-icon"),Y=x.classList.contains("show-placeholder")||(x.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(w("v1 variable click",{key:x.dataset.key,isPlaceholder:Y,isOnIcon:v,classes:x.className,innerText:x.innerText}),Y&&!v){O.preventDefault();const J=()=>{try{x.focus();const P=window.getSelection();if(!P)return;const ee=document.createTreeWalker(x,NodeFilter.SHOW_TEXT),te=ee.nextNode()?ee.currentNode:null,ae=document.createRange();te?(ae.setStart(te,0),ae.collapse(!0)):(ae.selectNodeContents(x),ae.collapse(!0)),P.removeAllRanges(),P.addRange(ae),C("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(J),window.requestAnimationFrame(()=>C("post-raf (click)"))},0)}}setTimeout(()=>{const v=window.getSelection();v&&!v.isCollapsed||zn(i)},10);return}const H=A.closest(".video-remove-btn");if(H){O.preventDefault(),O.stopPropagation();const Y=H.closest('[data-type="video-url"], [data-type="video-upload"]')?.dataset.key;Y&&b&&b(J=>{const P={...J};return delete P[Y],P});return}const U=A.closest('[data-type="video-upload"]');if(U){O.preventDefault(),O.stopPropagation();const v=U.dataset.key;v&&T?.current&&_&&(_.current=v,T.current.value="",T.current.click());return}const $=A.closest(".file-remove-btn");if($){O.preventDefault(),O.stopPropagation();const v=$.closest('[data-type="upload"]'),Y=v?.dataset.key,J=v?.dataset.batchKey;if(Y)if(J){const P=r.find(ee=>ee.type==="upload"&&ee.key===J);if(P&&typeof P.maxCount=="number"&&typeof P.minCount=="number"){const ee=P.maxCount;d(te=>{const ae={...te},Q=[];for(let re=0;re<ee;re++){const oe=`${J}-${re}`,ge=ae[oe];ge!=null&&oe!==Y&&Q.push(ge)}for(let re=0;re<ee;re++)delete ae[`${J}-${re}`];return Q.forEach((re,oe)=>{ae[`${J}-${oe}`]=re}),ae})}else p(Y)}else p(Y);return}const V=A.closest('[data-type="upload"]');if(V){const v=V.dataset.key,Y=V.dataset.batchKey,J=V.dataset.batchIndex;if(v){const P=Y||v,ee=r.find(te=>te.type==="upload"&&te.key===P);if(o.current&&(ee?.accept?o.current.accept=ee.accept:ee?.acceptType==="image"?o.current.accept="image/*":ee?.acceptType==="file"?o.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":o.current.accept=""),Y){const te=r.find(ae=>ae.type==="upload"&&ae.key===Y);if(te&&typeof te.maxCount=="number"&&typeof te.minCount=="number"){const ae=te.maxCount,Q=l[v]!=null,re=J!=null?Number.parseInt(J,10):NaN;if(Q){o.current&&(o.current.multiple=!1),E(null),c(null),y(v),u?.(),o.current?.click();return}let oe=0;for(let ge=0;ge<ae;ge++)l[`${Y}-${ge}`]!=null&&(oe+=1);oe<ae&&o.current?(o.current.multiple=!0,E(Y),c(Number.isFinite(re)?re:null),y(null),u?.(),o.current.click()):(o.current&&(o.current.multiple=!1),E(null),c(null),y(v),u?.(),o.current?.click())}else o.current&&(o.current.multiple=!1),E(null),c(null),y(v),u?.(),o.current?.click()}else o.current&&(o.current.multiple=!1),E(null),c(null),y(v),u?.(),o.current?.click()}return}},[t,r,s,e,i,o,u,l,p,h,a,n,m,E,c,y,d,b,T,_])},Gl=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:o,measureExpandedContentHeight:u,effectiveConfig:l,files:d,multiVariableCounts:p,setMultiVariableCounts:E,savedCursorRef:c,videoState:y})=>L.useCallback(()=>{if(e.length===0){if(t.current){const g=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(g),r(!g)}return}if(zn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||a(_=>{const w=_[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?_:{..._,[b]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||i(_=>{const w=_[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?_:{..._,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||s(_=>{const w=_[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?_:{..._,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(g=>{const b=g.dataset.key;if(!b)return;const T=g.innerText.replace(/[\u200B\n]/g,"").trim();g.getAttribute("data-is-placeholder")==="true"&&T&&!T.startsWith("请补充:")&&g.removeAttribute("data-is-placeholder"),T||(i(_=>{const w=_[b];return!w||w.status==="idle"?_:{..._,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(_=>{const w=_[b];return!w||w.status==="idle"?_:{..._,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(g=>{if(g.dataset.variableRender==="antd-textarea")return;const b=g.innerText||"",T=!!g.querySelector("br")||b.includes(`
37
- `),_=g.offsetHeight>32,C=b.replace(/\u200B/g,"").trim().length>0&&(T||_);g.classList.toggle("rte-variable-multiline",C),g.classList.toggle("rte-variable-force-block",C);const O=g.closest(".rte-inline-group");O&&O.classList.toggle("rte-inline-group-force-block",C);const A=g.closest(".required-upload-group, .required-multi-first");A&&A.classList.toggle("rte-required-group-force-block",C);const S=g.querySelector(".variable-info-icon");if(S){let k=!1;const I=document.createTreeWalker(g,NodeFilter.SHOW_TEXT,{acceptNode:M=>S.contains(M)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;I.nextNode();)if(I.currentNode.textContent?.replace(/[\u200B\n]/g,"").trim()){k=!0;break}k?S.classList.add("hidden"):S.classList.remove("hidden"),g.classList.toggle("rte-variable-with-icon",!S.classList.contains("hidden"))}}),o||window.requestAnimationFrame(()=>{u()}),wr(t,l,d,y),Nr(t,l,d,r,y),!t.current)return;e.filter(m=>m.type==="multi-variable"&&m.key).forEach(m=>{if(!m.key)return;const g=m.maxCount||9,b=p[m.key]||1,T=[];for(let A=0;A<b;A++){const S=`${m.key}_${A}`,k=t.current.querySelector(`[data-type="variable"][data-key="${S}"][data-multi-key="${m.key}"]`);if(k){const I=(k.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
38
- `).trim();T.push(I)}}const w=(T[T.length-1]||"")==="";let C=!1,O=-1;for(let A=0;A<T.length-1;A++)if(T[A]===""){C=!0,O=A;break}if(C&&O>=0){const A=window.getSelection();if(A&&A.rangeCount>0){const B=A.getRangeAt(0),N=B.startContainer,x=N.nodeType===Node.ELEMENT_NODE?N.closest('[data-type="variable"][data-multi-key]'):N.parentElement?.closest('[data-type="variable"][data-multi-key]');if(x){const H=x.dataset.key;if(H){const U=document.createRange();U.setStartBefore(x),U.setEnd(B.startContainer,B.startOffset);const $=U.toString().length;c.current={key:H,offset:$}}}}const S=[...T];for(let B=O;B<S.length-1;B++)S[B]=S[B+1];S.pop();const k={};S.forEach((B,N)=>{B&&(k[`${m.key}_${N}`]=B)});const I=Math.max(w?S.length:S.length+1,1);t.current.querySelectorAll('[data-type="variable"]').forEach(B=>{const N=B.dataset.key,x=B.dataset.multiKey;if(N&&x!==m.key){const H=(B.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
39
- `).trim();H&&(k[N]=H)}}),t.current.__tempVariableValues=k,E(B=>({...B,[m.key]:I}));return}if(!w){const A=b-1,S=`${m.key}_${A}`,k=t.current.querySelector(`[data-type="variable"][data-key="${S}"][data-multi-key="${m.key}"]`);if(k&&(k.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
40
- `).trim().length>0&&b<g){const M=window.getSelection();if(M&&M.rangeCount>0){const B=M.getRangeAt(0),N=B.startContainer,x=N.nodeType===Node.ELEMENT_NODE?N.closest('[data-type="variable"][data-multi-key]'):N.parentElement?.closest('[data-type="variable"][data-multi-key]');if(x){const H=x.dataset.key;if(H){const U=document.createRange();U.setStartBefore(x),U.setEnd(B.startContainer,B.startOffset);const $=U.toString().length;c.current={key:H,offset:$}}}}E(B=>({...B,[m.key]:b+1}))}}})},[o,e,t,l,d,u,p,c,n,r,i,s,E,a]),Yl=({disabled:e,lockStructure:t,config:n,editorRef:r,handleInput:a})=>L.useCallback(i=>{if(e){i.preventDefault();return}const s=i.target;if(s&&(s.tagName==="TEXTAREA"||s.tagName==="INPUT")&&s.closest?.('[data-variable-render="antd-textarea"]'))return;if(i.key==="Enter"){const u=i.target,l=u?.closest?.('[data-type="variable"]'),d=!!u?.closest?.('[data-type="richtext"]'),p=u?.tagName==="TEXTAREA"||!!u?.closest?.('[data-type="textarea"]');if(l){const E=l.getAttribute("data-node-type")||"";if(E==="report-url"||E==="markdown"||E==="markdown-name"){i.preventDefault();return}if(!(()=>{const h=l.dataset.multiKey;if(h)return n.find(T=>T.type==="multi-variable"&&T.key===h)?.allowNewline!==!1;const m=l.dataset.key;return n.find(b=>b.type==="variable"&&b.key===m)?.allowNewline!==!1})()){i.preventDefault();return}i.preventDefault();const y=window.getSelection();if(y&&y.rangeCount>0){const h=y.getRangeAt(0);h.deleteContents();const m=document.createElement("br");h.insertNode(m);const g=document.createTextNode("​");m.parentNode?.insertBefore(g,m.nextSibling),h.setStart(g,0),h.collapse(!0),y.removeAllRanges(),y.addRange(h)}a();return}if(!d&&!p){i.preventDefault();return}}const o=window.getSelection();if(o&&o.rangeCount>0){const u=o.anchorNode;let l=null;if(u&&(u.nodeType===Node.ELEMENT_NODE?l=u.closest('[data-type="text"]'):u.nodeType===Node.TEXT_NODE&&u.parentElement&&(l=u.parentElement.closest('[data-type="text"]'))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const d=r.current.querySelector('[data-type="variable"], [data-type="upload"]');d&&d.focus()}return}}if(t&&o&&o.rangeCount>0){const u=o.anchorNode;let l=null;if(u&&(u.nodeType===Node.ELEMENT_NODE?l=u.closest(".tag-node"):u.nodeType===Node.TEXT_NODE&&u.parentElement&&(l=u.parentElement.closest(".tag-node"))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const d=r.current.querySelector('[data-type="variable"], [data-type="upload"]');d&&d.focus()}return}}if(i.key==="Escape"&&r.current){if(t){i.preventDefault();return}r.current.innerHTML="",r.current.focus()}if(i.key==="Backspace"){const u=window.getSelection();if(u&&u.rangeCount>0){const l=u.getRangeAt(0),d=u.anchorNode;if(t){let E=null,c=null;if(d&&(d.nodeType===Node.ELEMENT_NODE?(E=d.closest(".tag-node"),c=d.closest('[data-type="text"]')):d.nodeType===Node.TEXT_NODE&&d.parentElement&&(E=d.parentElement.closest(".tag-node"),c=d.parentElement.closest('[data-type="text"]'))),(E||c)&&l.collapsed&&l.startOffset===0){i.preventDefault();return}}let p=null;if(d&&(d.nodeType===Node.ELEMENT_NODE?p=d.closest('[data-type="variable"]'):d.nodeType===Node.TEXT_NODE&&d.parentElement&&(p=d.parentElement.closest('[data-type="variable"]'))),p){if(!l.collapsed)return;const E=p.innerText;if(E==="​"||E===""){i.preventDefault();return}if((()=>{try{const h=document.createRange();h.selectNodeContents(p),h.setEnd(l.startContainer,l.startOffset);const m=h.cloneContents(),g=document.createTreeWalker(m,NodeFilter.SHOW_ALL);for(;g.nextNode();){const b=g.currentNode;if(b.nodeType===Node.ELEMENT_NODE){if(b.tagName==="BR")return!1}else if(b.nodeType===Node.TEXT_NODE&&(b.textContent||"").replace(/\u200B/g,"").trim().length>0)return!1}return!0}catch{return l.startOffset===0}})()){i.preventDefault();return}if(E.startsWith("​")&&l.startOffset===1){i.preventDefault();return}}}}},[n,e,r,a,t]),Wl=({lockStructure:e,onAgentExit:t,editorRef:n,setPopoverVisible:r,isDraggingRef:a,mouseDownPosRef:i})=>{const s=(...E)=>{},o=E=>{try{const c=window.getSelection();if(!c)return s(E,"no selection");const y=c.rangeCount>0?c.getRangeAt(0):null;s(E,{rangeCount:c.rangeCount,isCollapsed:c.isCollapsed,anchorNode:c.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":c.anchorNode?.nodeName,anchorOffset:c.anchorOffset,focusNode:c.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":c.focusNode?.nodeName,focusOffset:c.focusOffset,range:y?{startContainer:y.startContainer.nodeType===Node.TEXT_NODE?"TEXT":y.startContainer.nodeName,startOffset:y.startOffset,endContainer:y.endContainer.nodeType===Node.TEXT_NODE?"TEXT":y.endContainer.nodeName,endOffset:y.endOffset}:null})}catch{}},u=L.useCallback(E=>{const c=E.target;if(s("mousedown",{tag:c.tagName,cls:c.className}),o("before mousedown"),c.closest(".rte-datepicker-wrapper")||c.closest(".rte-datepicker-host")||c.closest(".rte-select-wrapper")||c.closest(".rte-select-host")||c.closest(".ant-select-dropdown"))return;if(c.closest(".tag-close-btn")){if(E.preventDefault(),E.stopPropagation(),e)return;r(null),t?t():n.current&&(n.current.innerHTML="",n.current.focus());return}if(e){const m=c.closest(".tag-node"),g=c.closest('[data-type="text"]');if(m||g){E.preventDefault(),E.stopPropagation();const b=window.getSelection();b&&b.removeAllRanges();return}}const h=c.closest('[data-type="variable"]');if(h){if(s("mousedown on variable",{key:h.dataset.key,multiKey:h.dataset.multiKey,nodeType:h.getAttribute("data-node-type")||"",render:h.dataset.variableRender||"v1",classes:h.className}),h.dataset.variableRender==="antd-textarea")return;const m=!!c.closest(".variable-info-icon"),g=h.classList.contains("show-placeholder")||(h.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(s("v1 variable mousedown",{isPlaceholder:g,isOnIcon:m,innerText:h.innerText}),g&&!m){E.preventDefault(),window.requestAnimationFrame(()=>{o("raf before setRange (mousedown)");const b=window.getSelection();if(!b)return;const T=h;T.focus();const _=document.createTreeWalker(T,NodeFilter.SHOW_TEXT),w=_.nextNode()?_.currentNode:null,C=document.createRange();w?(C.setStart(w,0),C.collapse(!0)):(C.selectNodeContents(T),C.collapse(!0)),b.removeAllRanges(),b.addRange(C),o("raf after setRange (mousedown)")});return}return}i.current={x:E.clientX,y:E.clientY},a.current=!1,c.closest(".file-remove-btn")&&(E.preventDefault(),E.stopPropagation())},[n,a,e,i,t,r]),l=L.useCallback(E=>{if(!E.target.closest('[data-type="variable"]')&&i.current){const h=Math.abs(E.clientX-i.current.x),m=Math.abs(E.clientY-i.current.y);(h>3||m>3)&&(a.current=!0)}},[a,i]),d=L.useCallback(E=>{const c=E.target;s("mouseup",{tag:c.tagName,cls:c.className}),o("before mouseup");const y=c.closest('[data-type="variable"]');if(y){if(y.dataset.variableRender!=="antd-textarea"){const h=!!c.closest(".variable-info-icon"),m=y.classList.contains("show-placeholder")||(y.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;s("v1 variable mouseup",{key:y.dataset.key,isPlaceholder:m,isOnIcon:h,classes:y.className}),m&&!h&&(E.preventDefault(),window.requestAnimationFrame(()=>{o("raf before setRange (mouseup)");const g=window.getSelection();if(!g)return;const b=y;b.focus();const T=document.createTreeWalker(b,NodeFilter.SHOW_TEXT),_=T.nextNode()?T.currentNode:null,w=document.createRange();_?(w.setStart(_,0),w.collapse(!0)):(w.selectNodeContents(b),w.collapse(!0)),g.removeAllRanges(),g.addRange(w),o("raf after setRange (mouseup)")}))}i.current=null,a.current=!1;return}i.current=null,a.current=!1},[a,i]),p=L.useCallback(E=>{const y=E.target.closest('[data-type="variable"]');if(y){const h=window.getSelection();if(h){const m=document.createRange(),g=y.textContent||"";if(g.replace(/\u200B/g,"")){let T=0,_=g.length;g.startsWith("​")&&(T=1),g.endsWith("​")&&g.length>1&&(_=g.length-1);const w=y.firstChild;w&&w.nodeType===Node.TEXT_NODE?(m.setStart(w,T),m.setEnd(w,_)):m.selectNodeContents(y)}else m.selectNodeContents(y),m.collapse(!0);h.removeAllRanges(),h.addRange(m)}}},[]);return{handleMouseDown:u,handleMouseMove:l,handleMouseUp:d,handleDoubleClick:p}},jl=({disabled:e,config:t,multiVariableCounts:n,setMultiVariableCounts:r,editorRef:a,handleInput:i,markdownAnalyzeRef:s,reportAnalyzeRef:o,markdownNameAnalyzeRef:u,markdownAnalyzeStateRef:l,markdownRawTextRef:d,setMarkdownAnalyzeState:p})=>L.useCallback(E=>{const c=E.target;if(c&&(c.tagName==="TEXTAREA"||c.tagName==="INPUT")&&c.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){E.preventDefault();return}E.preventDefault();const h=(E.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
41
- `).replace(/\n+$/g,""),m=window.getSelection();if(m&&m.rangeCount>0){const _=m.anchorNode;if(_){let w=null;if(_.nodeType===Node.ELEMENT_NODE?w=_.closest('[data-type="variable"]'):_.nodeType===Node.TEXT_NODE&&_.parentElement&&(w=_.parentElement.closest('[data-type="variable"]')),w){const C=w.dataset.multiKey;if(C){const S=/[、,,\s\n\r\t]+/,k=h.split(S).map(I=>I.trim()).filter(I=>I.length>0);if(k.length>1){const I=parseInt(w.dataset.index||"0",10),M=t.find(Y=>Y.type==="multi-variable"&&Y.key===C)?.maxCount||9,B=n[C]||1,N=Math.min(I+k.length,M);N>B&&r(v=>({...v,[C]:N}));const x=[];for(let v=0;v<B;v++){const Y=`${C}_${v}`,J=a.current.querySelector(`[data-type="variable"][data-key="${Y}"][data-multi-key="${C}"]`);if(J){const P=J.innerText.replace(/[\u200B\n]/g,"").trim();x.push(P)}}x.splice(I,1,...k.slice(0,M-I));const H=x.slice(0,M);H.length>0&&H[H.length-1]!==""&&H.length<M&&H.push("");const U=Math.max(H.length,1),$={};H.forEach((v,Y)=>{v&&($[`${C}_${Y}`]=v)}),a.current.querySelectorAll('[data-type="variable"]').forEach(v=>{const Y=v.dataset.key,J=v.dataset.multiKey;if(Y&&J!==C){const P=v.innerText.replace(/[\u200B\n]/g,"").trim();P&&($[Y]=P)}}),a.current.__tempVariableValues=$,r(v=>({...v,[C]:U}));return}}const O=w.getAttribute("data-node-type")||"";if(!(O==="markdown"||O==="report-url"||O==="markdown-name")){const S=(()=>{const I=w.getAttribute("data-node-type")||"";if(I==="report-url"||I==="markdown"||I==="markdown-name")return!1;const M=w.dataset.multiKey;if(M)return t.find(H=>H.type==="multi-variable"&&H.key===M)?.allowNewline!==!1;const B=w.dataset.key;return t.find(x=>x.type==="variable"&&x.key===B)?.allowNewline!==!1})(),k=window.getSelection();if(k&&k.rangeCount>0){const I=k.getRangeAt(0);I.deleteContents();const M=document.createDocumentFragment(),N=(S?h:h.replace(/\n+/g," ")).split(`
42
- `);for(let H=0;H<N.length;H++)M.appendChild(document.createTextNode(N[H])),S&&H<N.length-1&&M.appendChild(document.createElement("br"));I.insertNode(M),k.removeAllRanges();const x=document.createRange();x.selectNodeContents(w),x.collapse(!1),k.addRange(x)}i();return}}}}let g=!1,b="";const T=window.getSelection();if(T&&T.rangeCount>0){const _=T.anchorNode;if(_){let w=null;if(_.nodeType===Node.ELEMENT_NODE?w=_.closest('[data-type="variable"]'):_.nodeType===Node.TEXT_NODE&&_.parentElement&&(w=_.parentElement.closest('[data-type="variable"]')),w){const C=w.getAttribute("data-node-type")||"",O=w.dataset.key;if(C==="markdown"&&O&&/20\d{2}-\d{2}-\d{2}/.test(h))g=!0,b=O,d.current[O]=h,p(A=>({...A,[O]:{...A[O],status:"loading",error:void 0}}));else if(C==="report-url"&&O){document.execCommand("insertText",!1,h),i(),setTimeout(()=>{const A=w.innerText.replace(/[\u200B\n]/g,"").trim();o.current(O,A)},0);return}else if(C==="markdown-name"&&O){document.execCommand("insertText",!1,h),i(),setTimeout(()=>{const A=w.innerText.replace(/[\u200B\n]/g,"").trim();u.current(O,A)},0);return}}}}if(g&&b){setTimeout(()=>{s.current(b,h)},0);return}document.execCommand("insertText",!1,h),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(h)&&l.current.tableData?.status==="success"&&(p(w=>({...w,tableData:{status:"loading",modules:[],lastParsedText:h,error:void 0}})),setTimeout(()=>{d.current.tableData=h,s.current("tableData",h)},0))},0)},[t,e,a,i,s,l,d,n,o,p,r]);async function wi(e){const t=e.split("/").pop()?.split("?")[0]||"file",n=decodeURIComponent(t),r=async a=>{const i=await a.blob();return new File([i],n,{type:i.type||"application/octet-stream"})};try{const a=`/api/image-proxy?url=${encodeURIComponent(e)}`,i=await fetch(a);if(i.ok)return r(i)}catch{}return null}const Xl=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:o,markdownAnalyzeState:u,markdownNameAnalyzeState:l,videoState:d})=>L.useCallback(()=>{if(r||a||i||!s||!o.current)return;if(e.length===0){const m=o.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!m)return;if(n(m,m),o.current){o.current.textContent="";const g=new Event("input",{bubbles:!0});o.current.dispatchEvent(g)}return}const p=o.current;let E="";const c={},y=m=>{if(!(m.nodeType===Node.ELEMENT_NODE&&m.style.display==="none")){if(m.nodeType===Node.TEXT_NODE)E+=(m.textContent||"").replace(/\u200B/g,"");else if(m.nodeType===Node.ELEMENT_NODE){const g=m,b=g.dataset.type,T=g.dataset.key;if(b==="variable"&&T){let _="";const w=document.createTreeWalker(g,NodeFilter.SHOW_TEXT,{acceptNode:O=>{const A=g.querySelector(".variable-info-icon");return A&&A.contains(O)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;w.nextNode();)_+=w.currentNode.textContent||"";const C=_.replace(/[\u200B\n]/g,"").trim();if(C){const O=g.dataset.multiKey;if(O){(!c[O]||!Array.isArray(c[O]))&&(c[O]=[]);const A=c[O];A.push(C),A.length>1&&(E+=" "),E+=C}else c[T]=C,E+=C;if(g.dataset.nodeType==="report-url")if(c.url===void 0)c.url=C;else{const A=c.url;Array.isArray(A)?A.push(C):c.url=[String(A),C]}if(g.dataset.nodeType==="markdown-name"){const A=`${T}__sourceText`;c[A]===void 0&&(c[A]=C)}if(g.dataset.nodeType==="markdown"){const A=g.dataset.sourceTextKey||`${T}__sourceText`;if(c[A]===void 0)c[A]=C;else{const k=c[A];Array.isArray(k)?k.push(C):c[A]=[String(k),C]}const S=`${T}__markdown`;c[S]===void 0&&(c[S]=[vi(C)])}}}else if((b==="select"||b==="searchable-select")&&T){const _=(g.getAttribute("data-value")||"").trim();_&&(c[T]=_,E+=_)}else if(b==="textarea"&&T){const w=(g.value||"").replace(/\u200B/g,"").trim();w&&(c[T]=w,E+=w)}else if(b==="richtext"&&T){const _=g,w=_.dataset.nodeType,C=(_.textContent||"").replace(/\u200B/g,"").trim();if(C)if(w==="report-module"||w==="markdown-module"){(!c[T]||!Array.isArray(c[T]))&&(c[T]=[]);const O=c[T];O.push(C),O.length>1&&(E+=" "),E+=C}else c[T]=C,E+=C}else if(b==="datepicker"&&T){const w=(g.getAttribute("data-value")||"").trim();if(w)if(w.includes(",")){const C=w.split(",");C.length===2?(c[T]=C,E+=`[${C[0]}, ${C[1]}]`):(c[T]=w,E+=w)}else c[T]=w,E+=w}else if(b==="number-input"&&T){const w=(g.value||"").trim();w&&(c[T]=w,E+=w)}else if(b==="upload"&&T){const _=g.dataset.batchKey;if(_){const w=e.find(C=>C.type==="upload"&&C.key===_);if(w&&typeof w.maxCount=="number"&&typeof w.minCount=="number"){const C=[];for(let O=0;O<w.maxCount;O++){const A=`${_}-${O}`,S=t[A];S&&C.push(S)}c[_]||(c[_]=C.length>0?C:null,C.length>0&&(E+=` [附带${C.length}个文件: ${C.map(O=>typeof O=="string"?O.split("/").pop()||"file":O.name).join(", ")}] `))}else if(c[T]=t[T]??null,t[T]){const C=t[T];E+=` [附带文件: ${typeof C=="string"?C.split("/").pop()||"file":C.name}] `}}else if(c[T]=t[T]??null,t[T]){const w=t[T];E+=` [附带文件: ${typeof w=="string"?w.split("/").pop()||"file":w.name}] `}}else if((b==="video-url"||b==="video-upload")&&T){const _=d?.[T];if(_?.status==="success"&&_.videoUrl){c[T]=_.videoUrl,_.file&&(c[`${T}__file`]=_.file);const w=_.fileName||"视频";E+=` [附带视频: ${w}] `}}else{if(g.classList.contains("tag-close-btn")||g.classList.contains("file-remove-btn")||g.classList.contains("video-remove-btn"))return;g.getAttribute("contenteditable")==="false"&&!b&&g.classList.contains("tag-node")?E+=g.innerText:g.childNodes.forEach(y)}}}};if(p.childNodes.forEach(y),E=E.trim(),!E)return;Object.keys(u).forEach(m=>{const g=u[m];if(!g||!g.modules||g.modules.length===0)return;const b=g.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);b.length!==0&&(c[`${m}__markdown`]=b)}),Object.keys(l).forEach(m=>{const g=l[m];if(!g||!g.modules||g.modules.length===0)return;const b=g.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);b.length!==0&&(c[`${m}__markdown`]=b)}),(async()=>{for(const g of Object.keys(c)){const b=c[g];if(typeof b=="string"&&b.startsWith("http")){if(e.find(_=>_.type==="upload"&&_.key===g)){const _=await wi(b);_&&(c[g]=_)}}else if(Array.isArray(b)&&e.find(_=>_.type==="upload"&&_.key===g)){for(let _=0;_<b.length;_++)if(typeof b[_]=="string"&&b[_].startsWith("http")){const w=await wi(b[_]);w&&(b[_]=w)}}}const m=new FormData;m.append("fullPrompt",E),Object.keys(c).forEach(g=>{const b=c[g];if(b!=null)if(b instanceof File)m.append(g,b);else if(Array.isArray(b)){const T=e.some(O=>O.type==="multi-variable"&&O.key===g),_=e.some(O=>O.type==="report-url"&&O.key===g),w=g.endsWith("__markdown");T||_||w||g==="url"?b.forEach(O=>{O!=null&&O!==""&&m.append(g,String(O))}):b.forEach((O,A)=>{O!=null&&(O instanceof File?m.append(`${g}[${A}]`,O):typeof O=="string"?m.append(`${g}[${A}]`,O):m.append(`${g}[${A}]`,String(O)))})}else typeof b=="string"?m.append(g,b):m.append(g,String(b))}),n(m,E)})()},[e,t,n,r,a,i,s,o,u,l,d]);function Ni(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Ir(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Ni(t[r])&&Ni(e[r])&&Object.keys(t[r]).length>0&&Ir(e[r],t[r])})}const Ii={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function _t(){const e=typeof document<"u"?document:{};return Ir(e,Ii),e}const Kl={document:Ii,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Fe(){const e=typeof window<"u"?window:{};return Ir(e,Kl),e}function Ql(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function Jl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Li(e,t=0){return setTimeout(e,t)}function Vn(){return Date.now()}function Zl(e){const t=Fe();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function ec(e,t="x"){const n=Fe();let r,a,i;const s=Zl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(o=>o.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix(a==="none"?"":a)):(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?a=i.m41:r.length===16?a=parseFloat(r[12]):a=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?a=i.m42:r.length===16?a=parseFloat(r[13]):a=parseFloat(r[5])),a||0}function Gn(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function tc(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Ge(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let r=1;r<e.length;r+=1){const a=e[r];if(a!=null&&!tc(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,o=i.length;s<o;s+=1){const u=i[s],l=Object.getOwnPropertyDescriptor(a,u);l!==void 0&&l.enumerable&&(Gn(t[u])&&Gn(a[u])?a[u].__swiper__?t[u]=a[u]:Ge(t[u],a[u]):!Gn(t[u])&&Gn(a[u])?(t[u]={},a[u].__swiper__?t[u]=a[u]:Ge(t[u],a[u])):t[u]=a[u])}}}return t}function Ft(e,t,n){e.style.setProperty(t,n)}function Oi({swiper:e,targetPosition:t,side:n}){const r=Fe(),a=-e.translate;let i=null,s;const o=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const u=t>a?"next":"prev",l=(p,E)=>u==="next"&&p>=E||u==="prev"&&p<=E,d=()=>{s=new Date().getTime(),i===null&&(i=s);const p=Math.max(Math.min((s-i)/o,1),0),E=.5-Math.cos(p*Math.PI)/2;let c=a+E*(t-a);if(l(c,t)&&(c=t),e.wrapperEl.scrollTo({[n]:c}),l(c,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:c})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(d)};d()}function tt(e,t=""){const n=Fe(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function nc(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function rc(e,t){const n=Fe();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=nc(e,t))),r}function Yn(e){try{console.warn(e);return}catch{}}function Wn(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Ql(t)),n}function ac(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ic(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function mt(e,t){return Fe().getComputedStyle(e,null).getPropertyValue(t)}function jn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Di(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function Lr(e,t,n){const r=Fe();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ne(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function an(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let Or;function sc(){const e=Fe(),t=_t();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function Pi(){return Or||(Or=sc()),Or}let Dr;function oc({userAgent:e}={}){const t=Pi(),n=Fe(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,o=n.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const d=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),E=r==="Win32";let c=r==="MacIntel";const y=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&c&&t.touch&&y.indexOf(`${s}x${o}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),c=!1),u&&!E&&(i.os="android",i.android=!0),(l||p||d)&&(i.os="ios",i.ios=!0),i}function Mi(e={}){return Dr||(Dr=oc(e)),Dr}let Pr;function uc(){const e=Fe(),t=Mi();let n=!1;function r(){const o=e.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(r()){const o=String(e.navigator.userAgent);if(o.includes("Version/")){const[u,l]=o.split("Version/")[1].split(" ")[0].split(".").map(d=>Number(d));n=u<16||u===16&&l<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r(),s=i||a&&t.ios;return{isSafari:n||i,needPerspectiveFix:n,need3dFix:s,isWebView:a}}function Bi(){return Pr||(Pr=uc()),Pr}function lc({swiper:e,on:t,emit:n}){const r=Fe();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},o=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(d=>{i=r.requestAnimationFrame(()=>{const{width:p,height:E}=e;let c=p,y=E;d.forEach(({contentBoxSize:h,contentRect:m,target:g})=>{g&&g!==e.el||(c=m?m.width:(h[0]||h).inlineSize,y=m?m.height:(h[0]||h).blockSize)}),(c!==p||y!==E)&&s()})}),a.observe(e.el))},u=()=>{i&&r.cancelAnimationFrame(i),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null)},l=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof r.ResizeObserver<"u"){o();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{u(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function cc({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=Fe(),s=(l,d={})=>{const p=i.MutationObserver||i.WebkitMutationObserver,E=new p(c=>{if(e.__preventObserver__)return;if(c.length===1){r("observerUpdate",c[0]);return}const y=function(){r("observerUpdate",c[0])};i.requestAnimationFrame?i.requestAnimationFrame(y):i.setTimeout(y,0)});E.observe(l,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:e.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),a.push(E)},o=()=>{if(e.params.observer){if(e.params.observeParents){const l=Di(e.hostEl);for(let d=0;d<l.length;d+=1)s(l[d])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},u=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",o),n("destroy",u)}var dc={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const a=n?"unshift":"push";return e.split(" ").forEach(i=>{r.eventsListeners[i]||(r.eventsListeners[i]=[]),r.eventsListeners[i][a](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function a(...i){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(r,i)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&n.eventsListeners[r].splice(i,1)})}),n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let n,r,a;return typeof e[0]=="string"||Array.isArray(e[0])?(n=e[0],r=e.slice(1,e.length),a=t):(n=e[0].events,r=e[0].data,a=e[0].context||t),r.unshift(a),(Array.isArray(n)?n:n.split(" ")).forEach(s=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(o=>{o.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(o=>{o.apply(a,r)})}),t}};function fc(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(mt(r,"padding-left")||0,10)-parseInt(mt(r,"padding-right")||0,10),n=n-parseInt(mt(r,"padding-top")||0,10)-parseInt(mt(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function pc(){const e=this;function t(k,I){return parseFloat(k.getPropertyValue(e.getDirectionLabel(I))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,o=e.virtual&&n.virtual.enabled,u=o?e.virtual.slides.length:e.slides.length,l=tt(a,`.${e.params.slideClass}, swiper-slide`),d=o?e.virtual.slides.length:l.length;let p=[];const E=[],c=[];let y=n.slidesOffsetBefore;typeof y=="function"&&(y=n.slidesOffsetBefore.call(e));let h=n.slidesOffsetAfter;typeof h=="function"&&(h=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,g=e.slidesGrid.length,b=e.size-y-h;let T=n.spaceBetween,_=-y,w=0,C=0;if(typeof b>"u")return;typeof T=="string"&&T.indexOf("%")>=0?T=parseFloat(T.replace("%",""))/100*b:typeof T=="string"&&(T=parseFloat(T)),e.virtualSize=-T-y-h,l.forEach(k=>{i?k.style.marginLeft="":k.style.marginRight="",k.style.marginBottom="",k.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Ft(r,"--swiper-centered-offset-before",""),Ft(r,"--swiper-centered-offset-after","")),n.cssMode&&(Ft(r,"--swiper-slides-offset-before",`${y}px`),Ft(r,"--swiper-slides-offset-after",`${h}px`));const O=n.grid&&n.grid.rows>1&&e.grid;O?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let A;const S=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(k=>typeof n.breakpoints[k].slidesPerView<"u").length>0;for(let k=0;k<d;k+=1){A=0;const I=l[k];if(!(I&&(O&&e.grid.updateSlide(k,I,l),mt(I,"display")==="none"))){if(o&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(A=n.virtual.slidesPerViewAutoSlideSize),A&&I&&(n.roundLengths&&(A=Math.floor(A)),I.style[e.getDirectionLabel("width")]=`${A}px`);else if(n.slidesPerView==="auto"){S&&(I.style[e.getDirectionLabel("width")]="");const M=getComputedStyle(I),B=I.style.transform,N=I.style.webkitTransform;if(B&&(I.style.transform="none"),N&&(I.style.webkitTransform="none"),n.roundLengths)A=e.isHorizontal()?Lr(I,"width"):Lr(I,"height");else{const x=t(M,"width"),H=t(M,"padding-left"),U=t(M,"padding-right"),$=t(M,"margin-left"),V=t(M,"margin-right"),v=M.getPropertyValue("box-sizing");if(v&&v==="border-box")A=x+$+V;else{const{clientWidth:Y,offsetWidth:J}=I;A=x+H+U+$+V+(J-Y)}}B&&(I.style.transform=B),N&&(I.style.webkitTransform=N),n.roundLengths&&(A=Math.floor(A))}else A=(b-(n.slidesPerView-1)*T)/n.slidesPerView,n.roundLengths&&(A=Math.floor(A)),I&&(I.style[e.getDirectionLabel("width")]=`${A}px`);I&&(I.swiperSlideSize=A),c.push(A),n.centeredSlides?(_=_+A/2+w/2+T,w===0&&k!==0&&(_=_-b/2-T),k===0&&(_=_-b/2-T),Math.abs(_)<1/1e3&&(_=0),n.roundLengths&&(_=Math.floor(_)),C%n.slidesPerGroup===0&&p.push(_),E.push(_)):(n.roundLengths&&(_=Math.floor(_)),(C-Math.min(e.params.slidesPerGroupSkip,C))%e.params.slidesPerGroup===0&&p.push(_),E.push(_),_=_+A+T),e.virtualSize+=A+T,w=A,C+=1}}if(e.virtualSize=Math.max(e.virtualSize,b)+h,i&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+T}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+T}px`),O&&e.grid.updateWrapperSize(A,p),!n.centeredSlides){const k=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,I=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||k);let M=p.length;if(I){let N;if(n.slidesPerView==="auto"){N=1;let x=0;for(let H=c.length-1;H>=0&&(x+=c[H]+(H<c.length-1?T:0),x<=b);H-=1)N=c.length-H}else N=Math.floor(n.slidesPerView);M=Math.max(d-N,0)}const B=[];for(let N=0;N<p.length;N+=1){let x=p[N];n.roundLengths&&(x=Math.floor(x)),I?N<=M&&B.push(x):p[N]<=e.virtualSize-b&&B.push(x)}p=B,Math.floor(e.virtualSize-b)-Math.floor(p[p.length-1])>1&&(I||p.push(e.virtualSize-b))}if(o&&n.loop){const k=c[0]+T;if(n.slidesPerGroup>1){const I=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),M=k*n.slidesPerGroup;for(let B=0;B<I;B+=1)p.push(p[p.length-1]+M)}for(let I=0;I<e.virtual.slidesBefore+e.virtual.slidesAfter;I+=1)n.slidesPerGroup===1&&p.push(p[p.length-1]+k),E.push(E[E.length-1]+k),e.virtualSize+=k}if(p.length===0&&(p=[0]),T!==0){const k=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((I,M)=>!n.cssMode||n.loop?!0:M!==l.length-1).forEach(I=>{I.style[k]=`${T}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let k=0;c.forEach(M=>{k+=M+(T||0)}),k-=T;const I=k>b?k-b:0;p=p.map(M=>M<=0?-y:M>I?I+h:M)}if(n.centerInsufficientSlides){let k=0;c.forEach(M=>{k+=M+(T||0)}),k-=T;const I=(y||0)+(h||0);if(k+I<b){const M=(b-k-I)/2;p.forEach((B,N)=>{p[N]=B-M}),E.forEach((B,N)=>{E[N]=B+M})}}if(Object.assign(e,{slides:l,snapGrid:p,slidesGrid:E,slidesSizesGrid:c}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Ft(r,"--swiper-centered-offset-before",`${-p[0]}px`),Ft(r,"--swiper-centered-offset-after",`${e.size/2-c[c.length-1]/2}px`);const k=-e.snapGrid[0],I=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(M=>M+k),e.slidesGrid=e.slidesGrid.map(M=>M+I)}if(d!==u&&e.emit("slidesLengthChange"),p.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),E.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!o&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const k=`${n.containerModifierClass}backface-hidden`,I=e.el.classList.contains(k);d<=n.maxBackfaceHiddenSlides?I||e.el.classList.add(k):I&&e.el.classList.remove(k)}}function hc(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=o=>r?t.slides[t.getSlideIndexByData(o)]:t.slides[o];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(o=>{n.push(o)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const o=t.activeIndex+i;if(o>t.slides.length&&!r)break;n.push(s(o))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const o=n[i].offsetHeight;a=o>a?o:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function mc(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const Ri=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function gc(e=this&&this.translate||0){const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:i}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;a&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let o=n.spaceBetween;typeof o=="string"&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*t.size:typeof o=="string"&&(o=parseFloat(o));for(let u=0;u<r.length;u+=1){const l=r[u];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=r[0].swiperSlideOffset);const p=(s+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),E=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),c=-(s-d),y=c+t.slidesSizesGrid[u],h=c>=0&&c<=t.size-t.slidesSizesGrid[u],m=c>=0&&c<t.size-1||y>1&&y<=t.size||c<=0&&y>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),Ri(l,m,n.slideVisibleClass),Ri(l,h,n.slideFullyVisibleClass),l.progress=a?-p:p,l.originalProgress=a?-E:E}}function Ec(e){const t=this;if(typeof e>"u"){const d=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*d||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:o}=t;const u=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const d=Math.abs(e-t.minTranslate())<1,p=Math.abs(e-t.maxTranslate())<1;i=d||a<=0,s=p||a>=1,d&&(a=0),p&&(a=1)}if(n.loop){const d=t.getSlideIndexByData(0),p=t.getSlideIndexByData(t.slides.length-1),E=t.slidesGrid[d],c=t.slidesGrid[p],y=t.slidesGrid[t.slidesGrid.length-1],h=Math.abs(e);h>=E?o=(h-E)/y:o=(h+y-c)/y,o>1&&(o-=1)}Object.assign(t,{progress:a,progressLoop:o,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!u&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(u&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Mr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function bc(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,i=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,o=p=>tt(r,`.${n.slideClass}${p}, swiper-slide${p}`)[0];let u,l,d;if(i)if(n.loop){let p=a-e.virtual.slidesBefore;p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),u=o(`[data-swiper-slide-index="${p}"]`)}else u=o(`[data-swiper-slide-index="${a}"]`);else s?(u=t.find(p=>p.column===a),d=t.find(p=>p.column===a+1),l=t.find(p=>p.column===a-1)):u=t[a];u&&(s||(d=ic(u,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),l=ac(u,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(p=>{Mr(p,p===u,n.slideActiveClass),Mr(p,p===d,n.slideNextClass),Mr(p,p===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Xn=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let a=r.querySelector(`.${e.params.lazyPreloaderClass}`);!a&&e.isElement&&(r.shadowRoot?a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),a&&!a.lazyPreloaderManaged&&a.remove())})),a&&!a.lazyPreloaderManaged&&a.remove()}},Br=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Rr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,o=[s-t];o.push(...Array.from({length:t}).map((u,l)=>s+r+l)),e.slides.forEach((u,l)=>{o.includes(u.column)&&Br(e,l)});return}const i=a+r-1;if(e.params.rewind||e.params.loop)for(let s=a-t;s<=i+t;s+=1){const o=(s%n+n)%n;(o<a||o>i)&&Br(e,o)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&Br(e,s)};function Tc(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let i=0;i<t.length;i+=1)typeof t[i+1]<"u"?r>=t[i]&&r<t[i+1]-(t[i+1]-t[i])/2?a=i:r>=t[i]&&r<t[i+1]&&(a=i+1):r>=t[i]&&(a=i);return n.normalizeSlideIndex&&(a<0||typeof a>"u")&&(a=0),a}function yc(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:o}=t;let u=e,l;const d=c=>{let y=c-t.virtual.slidesBefore;return y<0&&(y=t.virtual.slides.length+y),y>=t.virtual.slides.length&&(y-=t.virtual.slides.length),y};if(typeof u>"u"&&(u=Tc(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const c=Math.min(a.slidesPerGroupSkip,u);l=c+Math.floor((u-c)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),u===i&&!t.params.loop){l!==o&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(u===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=d(u);return}const p=t.grid&&a.grid&&a.grid.rows>1;let E;if(t.virtual&&a.virtual.enabled)a.loop?E=d(u):E=u;else if(p){const c=t.slides.find(h=>h.column===u);let y=parseInt(c.getAttribute("data-swiper-slide-index"),10);Number.isNaN(y)&&(y=Math.max(t.slides.indexOf(c),0)),E=Math.floor(y/a.grid.rows)}else if(t.slides[u]){const c=t.slides[u].getAttribute("data-swiper-slide-index");c?E=parseInt(c,10):E=u}else E=u;Object.assign(t,{previousSnapIndex:o,snapIndex:l,previousRealIndex:s,realIndex:E,previousIndex:i,activeIndex:u}),t.initialized&&Rr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==E&&t.emit("realIndexChange"),t.emit("slideChange"))}function xc(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(o=>{!a&&o.matches&&o.matches(`.${r.slideClass}, swiper-slide`)&&(a=o)});let i=!1,s;if(a){for(let o=0;o<n.slides.length;o+=1)if(n.slides[o]===a){i=!0,s=o;break}}if(a&&i)n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var Cc={updateSize:fc,updateSlides:pc,updateAutoHeight:hc,updateSlidesOffset:mc,updateSlidesProgress:gc,updateProgress:Ec,updateSlidesClasses:bc,updateActiveIndex:yc,updateClickedSlide:xc};function Sc(e=this.isHorizontal()?"x":"y"){const t=this,{params:n,rtlTranslate:r,translate:a,wrapperEl:i}=t;if(n.virtualTranslate)return r?-a:a;if(n.cssMode)return a;let s=ec(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function Ac(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let o=0,u=0;const l=0;n.isHorizontal()?o=r?-e:e:u=e,a.roundLengths&&(o=Math.floor(o),u=Math.floor(u)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?o:u,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-o:-u:a.virtualTranslate||(n.isHorizontal()?o-=n.cssOverflowAdjustment():u-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${o}px, ${u}px, ${l}px)`);let d;const p=n.maxTranslate()-n.minTranslate();p===0?d=0:d=(e-n.minTranslate())/p,d!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function _c(){return-this.snapGrid[0]}function vc(){return-this.snapGrid[this.snapGrid.length-1]}function kc(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:o}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const u=i.minTranslate(),l=i.maxTranslate();let d;if(r&&e>u?d=u:r&&e<l?d=l:d=e,i.updateProgress(d),s.cssMode){const p=i.isHorizontal();if(t===0)o[p?"scrollLeft":"scrollTop"]=-d;else{if(!i.support.smoothScroll)return Oi({swiper:i,targetPosition:-d,side:p?"left":"top"}),!0;o.scrollTo({[p?"left":"top"]:-d,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(E){!i||i.destroyed||E.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}var wc={getTranslate:Sc,setTranslate:Ac,minTranslate:_c,maxTranslate:vc,translateTo:kc};function Nc(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function Fi({swiper:e,runCallbacks:t,direction:n,step:r}){const{activeIndex:a,previousIndex:i}=e;let s=n;s||(a>i?s="next":a<i?s="prev":s="reset"),e.emit(`transition${r}`),t&&s==="reset"?e.emit(`slideResetTransition${r}`):t&&a!==i&&(e.emit(`slideChangeTransition${r}`),s==="next"?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`))}function Ic(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),Fi({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function Lc(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),Fi({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var Oc={setTransition:Nc,transitionStart:Ic,transitionEnd:Lc};function Dc(e=0,t,n=!0,r,a){typeof e=="string"&&(e=parseInt(e,10));const i=this;let s=e;s<0&&(s=0);const{params:o,snapGrid:u,slidesGrid:l,previousIndex:d,activeIndex:p,rtlTranslate:E,wrapperEl:c,enabled:y}=i;if(!y&&!r&&!a||i.destroyed||i.animating&&o.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const h=Math.min(i.params.slidesPerGroupSkip,s);let m=h+Math.floor((s-h)/i.params.slidesPerGroup);m>=u.length&&(m=u.length-1);const g=-u[m];if(o.normalizeSlideIndex)for(let O=0;O<l.length;O+=1){const A=-Math.floor(g*100),S=Math.floor(l[O]*100),k=Math.floor(l[O+1]*100);typeof l[O+1]<"u"?A>=S&&A<k-(k-S)/2?s=O:A>=S&&A<k&&(s=O+1):A>=S&&(s=O)}if(i.initialized&&s!==p&&(!i.allowSlideNext&&(E?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate())||!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(p||0)!==s))return!1;s!==(d||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g);let b;s>p?b="next":s<p?b="prev":b="reset";const T=i.virtual&&i.params.virtual.enabled;if(!(T&&a)&&(E&&-g===i.translate||!E&&g===i.translate))return i.updateActiveIndex(s),o.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),o.effect!=="slide"&&i.setTranslate(g),b!=="reset"&&(i.transitionStart(n,b),i.transitionEnd(n,b)),!1;if(o.cssMode){const O=i.isHorizontal(),A=E?g:-g;if(t===0)T&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),T&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c[O?"scrollLeft":"scrollTop"]=A})):c[O?"scrollLeft":"scrollTop"]=A,T&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return Oi({swiper:i,targetPosition:A,side:O?"left":"top"}),!0;c.scrollTo({[O?"left":"top"]:A,behavior:"smooth"})}return!0}const C=Bi().isSafari;return T&&!a&&C&&i.isElement&&i.virtual.update(!1,!1,s),i.setTransition(t),i.setTranslate(g),i.updateActiveIndex(s),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,b),t===0?i.transitionEnd(n,b):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(A){!i||i.destroyed||A.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,b))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function Pc(e=0,t,n=!0,r){typeof e=="string"&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;typeof t>"u"&&(t=a.params.speed);const i=a.grid&&a.params.grid&&a.params.grid.rows>1;let s=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)s=s+a.virtual.slidesBefore;else{let o;if(i){const h=s*a.params.grid.rows;o=a.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===h).column}else o=a.getSlideIndexByData(s);const u=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:d,slidesOffsetAfter:p}=a.params,E=l||!!d||!!p;let c=a.params.slidesPerView;c==="auto"?c=a.slidesPerViewDynamic():(c=Math.ceil(parseFloat(a.params.slidesPerView,10)),E&&c%2===0&&(c=c+1));let y=u-o<c;if(E&&(y=y||o<Math.ceil(c/2)),r&&E&&a.params.slidesPerView!=="auto"&&!i&&(y=!1),y){const h=E?o<a.activeIndex?"prev":"next":o-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:h,slideTo:!0,activeSlideIndex:h==="next"?o+1:o-u+1,slideRealIndex:h==="next"?a.realIndex:void 0})}if(i){const h=s*a.params.grid.rows;s=a.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===h).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function Mc(e,t=!0,n){const r=this,{enabled:a,params:i,animating:s}=r;if(!a||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let o=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(o=Math.max(r.slidesPerViewDynamic("current",!0),1));const u=r.activeIndex<i.slidesPerGroupSkip?1:o,l=r.virtual&&i.virtual.enabled;if(i.loop){if(s&&!l&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+u,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+u,e,t,n)}function Bc(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:o,enabled:u,animating:l}=r;if(!u||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const d=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const p=o?r.translate:-r.translate;function E(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const c=E(p),y=i.map(b=>E(b)),h=a.freeMode&&a.freeMode.enabled;let m=i[y.indexOf(c)-1];if(typeof m>"u"&&(a.cssMode||h)){let b;i.forEach((T,_)=>{c>=T&&(b=_)}),typeof b<"u"&&(m=h?i[b]:i[b>0?b-1:b])}let g=0;if(typeof m<"u"&&(g=s.indexOf(m),g<0&&(g=r.activeIndex-1),a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(g=g-r.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(a.loop&&r.activeIndex===0&&a.cssMode)return requestAnimationFrame(()=>{r.slideTo(g,e,t,n)}),!0;return r.slideTo(g,e,t,n)}function Rc(e,t=!0,n){const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function Fc(e,t=!0,n,r=.5){const a=this;if(a.destroyed)return;typeof e>"u"&&(e=a.params.speed);let i=a.activeIndex;const s=Math.min(a.params.slidesPerGroupSkip,i),o=s+Math.floor((i-s)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[o]){const l=a.snapGrid[o],d=a.snapGrid[o+1];u-l>(d-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[o-1],d=a.snapGrid[o];u-l<=(d-l)*r&&(i-=a.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,a.slidesGrid.length-1),a.slideTo(i,e,t,n)}function Hc(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let a=e.getSlideIndexWhenGrid(e.clickedIndex),i;const s=e.isElement?"swiper-slide":`.${t.slideClass}`,o=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(o?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(tt(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),Li(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var $c={slideTo:Dc,slideToLoop:Pc,slideNext:Mc,slidePrev:Bc,slideReset:Rc,slideToClosest:Fc,slideToClickedSlide:Hc};function Uc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{tt(a,`.${r.slideClass}, swiper-slide`).forEach((y,h)=>{y.setAttribute("data-swiper-slide-index",h)})},s=()=>{const c=tt(a,`.${r.slideBlankClass}`);c.forEach(y=>{y.remove()}),c.length>0&&(n.recalcSlides(),n.updateSlides())},o=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||o)&&s();const u=r.slidesPerGroup*(o?r.grid.rows:1),l=n.slides.length%u!==0,d=o&&n.slides.length%r.grid.rows!==0,p=c=>{for(let y=0;y<c;y+=1){const h=n.isElement?Wn("swiper-slide",[r.slideBlankClass]):Wn("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(h)}};if(l){if(r.loopAddBlankSlides){const c=u-n.slides.length%u;p(c),n.recalcSlides(),n.updateSlides()}else Yn("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else if(d){if(r.loopAddBlankSlides){const c=r.grid.rows-n.slides.length%r.grid.rows;p(c),n.recalcSlides(),n.updateSlides()}else Yn("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else i();const E=r.centeredSlides||!!r.slidesOffsetBefore||!!r.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:E?void 0:"next",initial:t})}function qc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:o}={}){const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:l,allowSlidePrev:d,allowSlideNext:p,slidesEl:E,params:c}=u,{centeredSlides:y,slidesOffsetBefore:h,slidesOffsetAfter:m,initialSlide:g}=c,b=y||!!h||!!m;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&c.virtual.enabled){t&&(!b&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):b&&u.snapIndex<c.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=p,u.emit("loopFix");return}let T=c.slidesPerView;T==="auto"?T=u.slidesPerViewDynamic():(T=Math.ceil(parseFloat(c.slidesPerView,10)),b&&T%2===0&&(T=T+1));const _=c.slidesPerGroupAuto?T:c.slidesPerGroup;let w=b?Math.max(_,Math.ceil(T/2)):_;w%_!==0&&(w+=_-w%_),w+=c.loopAdditionalSlides,u.loopedSlides=w;const C=u.grid&&c.grid&&c.grid.rows>1;l.length<T+w||u.params.effect==="cards"&&l.length<T+w*2?Yn("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):C&&c.grid.fill==="row"&&Yn("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const O=[],A=[],S=C?Math.ceil(l.length/c.grid.rows):l.length,k=i&&S-g<T&&!b;let I=k?g:u.activeIndex;typeof a>"u"?a=u.getSlideIndex(l.find($=>$.classList.contains(c.slideActiveClass))):I=a;const M=n==="next"||!n,B=n==="prev"||!n;let N=0,x=0;const U=(C?l[a].column:a)+(b&&typeof r>"u"?-T/2+.5:0);if(U<w){N=Math.max(w-U,_);for(let $=0;$<w-U;$+=1){const V=$-Math.floor($/S)*S;if(C){const v=S-V-1;for(let Y=l.length-1;Y>=0;Y-=1)l[Y].column===v&&O.push(Y)}else O.push(S-V-1)}}else if(U+T>S-w){x=Math.max(U-(S-w*2),_),k&&(x=Math.max(x,T-S+g+1));for(let $=0;$<x;$+=1){const V=$-Math.floor($/S)*S;C?l.forEach((v,Y)=>{v.column===V&&A.push(Y)}):A.push(V)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&l.length<T+w*2&&(A.includes(a)&&A.splice(A.indexOf(a),1),O.includes(a)&&O.splice(O.indexOf(a),1)),B&&O.forEach($=>{l[$].swiperLoopMoveDOM=!0,E.prepend(l[$]),l[$].swiperLoopMoveDOM=!1}),M&&A.forEach($=>{l[$].swiperLoopMoveDOM=!0,E.append(l[$]),l[$].swiperLoopMoveDOM=!1}),u.recalcSlides(),c.slidesPerView==="auto"?u.updateSlides():C&&(O.length>0&&B||A.length>0&&M)&&u.slides.forEach(($,V)=>{u.grid.updateSlide(V,$,u.slides)}),c.watchSlidesProgress&&u.updateSlidesOffset(),t){if(O.length>0&&B){if(typeof e>"u"){const $=u.slidesGrid[I],v=u.slidesGrid[I+N]-$;o?u.setTranslate(u.translate-v):(u.slideTo(I+Math.ceil(N),0,!1,!0),r&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-v,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-v))}else if(r){const $=C?O.length/c.grid.rows:O.length;u.slideTo(u.activeIndex+$,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(A.length>0&&M)if(typeof e>"u"){const $=u.slidesGrid[I],v=u.slidesGrid[I-x]-$;o?u.setTranslate(u.translate-v):(u.slideTo(I-x,0,!1,!0),r&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-v,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-v))}else{const $=C?A.length/c.grid.rows:A.length;u.slideTo(u.activeIndex-$,0,!1,!0)}}if(u.allowSlidePrev=d,u.allowSlideNext=p,u.controller&&u.controller.control&&!s){const $={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...$,slideTo:V.params.slidesPerView===c.slidesPerView?t:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...$,slideTo:u.controller.control.params.slidesPerView===c.slidesPerView?t:!1})}u.emit("loopFix")}function zc(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(a=>{const i=typeof a.swiperSlideIndex>"u"?a.getAttribute("data-swiper-slide-index")*1:a.swiperSlideIndex;r[i]=a}),e.slides.forEach(a=>{a.removeAttribute("data-swiper-slide-index")}),r.forEach(a=>{n.append(a)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Vc={loopCreate:Uc,loopFix:qc,loopDestroy:zc};function Gc(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Yc(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Wc={setGrabCursor:Gc,unsetGrabCursor:Yc};function jc(e,t=this){function n(r){if(!r||r===_t()||r===Fe())return null;r.assignedSlot&&(r=r.assignedSlot);const a=r.closest(e);return!a&&!r.getRootNode?null:a||n(r.getRootNode().host)}return n(t)}function Hi(e,t,n){const r=Fe(),{params:a}=e,i=a.edgeSwipeDetection,s=a.edgeSwipeThreshold;return i&&(n<=s||n>=r.innerWidth-s)?i==="prevent"?(t.preventDefault(),!0):!1:!0}function Xc(e){const t=this,n=_t();let r=e;r.originalEvent&&(r=r.originalEvent);const a=t.touchEventsData;if(r.type==="pointerdown"){if(a.pointerId!==null&&a.pointerId!==r.pointerId)return;a.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(a.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){Hi(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:o}=t;if(!o||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let u=r.target;if(i.touchEventsTarget==="wrapper"&&!rc(u,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||a.isTouched&&a.isMoved)return;const l=!!i.noSwipingClass&&i.noSwipingClass!=="",d=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&d&&(u=d[0]);const p=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,E=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(E?jc(p,u):u.closest(p))){t.allowClick=!0;return}if(i.swipeHandler&&!u.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const c=s.currentX,y=s.currentY;if(!Hi(t,r,c))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=c,s.startY=y,a.touchStartTime=Vn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let h=!0;u.matches(a.focusableElements)&&(h=!1,u.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==u&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!u.matches(a.focusableElements))&&n.activeElement.blur();const m=h&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||m)&&!u.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Kc(e){const t=_t(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:o}=n;if(!o||!a.simulateTouch&&e.pointerType==="mouse")return;let u=e;if(u.originalEvent&&(u=u.originalEvent),u.type==="pointermove"&&(r.touchId!==null||u.pointerId!==r.pointerId))return;let l;if(u.type==="touchmove"){if(l=[...u.changedTouches].find(w=>w.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=u;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",u);return}const d=l.pageX,p=l.pageY;if(u.preventedByNestedSwiper){i.startX=d,i.startY=p;return}if(!n.allowTouchMove){u.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:d,startY:p,currentX:d,currentY:p}),r.touchStartTime=Vn());return}if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(p<i.startY&&n.translate<=n.maxTranslate()||p>i.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(d>i.startX&&-n.translate<=n.maxTranslate()||d<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(d<i.startX&&n.translate<=n.maxTranslate()||d>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==u.target&&u.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",u),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=d,i.currentY=p;const E=i.currentX-i.startX,c=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(E**2+c**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let w;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:E*E+c*c>=25&&(w=Math.atan2(Math.abs(c),Math.abs(E))*180/Math.PI,r.isScrolling=n.isHorizontal()?w>a.touchAngle:90-w>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",u),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||u.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();let y=n.isHorizontal()?E:c,h=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(y=Math.abs(y)*(s?1:-1),h=Math.abs(h)*(s?1:-1)),i.diff=y,y*=a.touchRatio,s&&(y=-y,h=-h);const m=n.touchesDirection;n.swipeDirection=y>0?"prev":"next",n.touchesDirection=h>0?"prev":"next";const g=n.params.loop&&!a.cssMode,b=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(g&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const w=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(w)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",u)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&m!==n.touchesDirection&&g&&b&&Math.abs(y)>=1){Object.assign(i,{startX:d,startY:p,currentX:d,currentY:p,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",u),r.isMoved=!0,r.currentTranslate=y+r.startTranslate;let T=!0,_=a.resistanceRatio;if(a.touchReleaseOnEdges&&(_=0),y>0?(g&&b&&r.allowThresholdMove&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(T=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+y)**_))):y<0&&(g&&b&&r.allowThresholdMove&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(a.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(T=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-y)**_))),T&&(u.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),a.threshold>0)if(Math.abs(y)>a.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{r.currentTranslate=r.startTranslate;return}!a.followFinger||a.cssMode||((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Qc(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let a;if(r.type==="touchend"||r.type==="touchcancel"){if(a=[...r.changedTouches].find(w=>w.identifier===n.touchId),!a||a.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;a=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:o,rtlTranslate:u,slidesGrid:l,enabled:d}=t;if(!d||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const p=Vn(),E=p-n.touchStartTime;if(t.allowClick){const w=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(w&&w[0]||r.target,w),t.emit("tap click",r),E<300&&p-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Vn(),Li(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||o.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let c;if(s.followFinger?c=u?t.translate:-t.translate:c=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:c});return}const y=c>=-t.maxTranslate()&&!t.params.loop;let h=0,m=t.slidesSizesGrid[0];for(let w=0;w<l.length;w+=w<s.slidesPerGroupSkip?1:s.slidesPerGroup){const C=w<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[w+C]<"u"?(y||c>=l[w]&&c<l[w+C])&&(h=w,m=l[w+C]-l[w]):(y||c>=l[w])&&(h=w,m=l[l.length-1]-l[l.length-2])}let g=null,b=null;s.rewind&&(t.isBeginning?b=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const T=(c-l[h])/m,_=h<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(E>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(T>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:h+_):t.slideTo(h)),t.swipeDirection==="prev"&&(T>1-s.longSwipesRatio?t.slideTo(h+_):b!==null&&T<0&&Math.abs(T)>s.longSwipesRatio?t.slideTo(b):t.slideTo(h))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(h+_):t.slideTo(h):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:h+_),t.swipeDirection==="prev"&&t.slideTo(b!==null?b:h))}}function $i(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const o=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!o?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function Jc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Zc(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let a;const i=e.maxTranslate()-e.minTranslate();i===0?a=0:a=(e.translate-e.minTranslate())/i,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function ed(e){const t=this;Xn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function td(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Ui=(e,t)=>{const n=_t(),{params:r,el:a,wrapperEl:i,device:s}=e,o=!!r.nested,u=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),n[u]("touchmove",e.onTouchMove,{passive:!1,capture:o}),n[u]("pointermove",e.onTouchMove,{passive:!1,capture:o}),n[u]("touchend",e.onTouchEnd,{passive:!0}),n[u]("pointerup",e.onTouchEnd,{passive:!0}),n[u]("pointercancel",e.onTouchEnd,{passive:!0}),n[u]("touchcancel",e.onTouchEnd,{passive:!0}),n[u]("pointerout",e.onTouchEnd,{passive:!0}),n[u]("pointerleave",e.onTouchEnd,{passive:!0}),n[u]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[u]("click",e.onClick,!0),r.cssMode&&i[u]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",$i,!0):e[l]("observerUpdate",$i,!0),a[u]("load",e.onLoad,{capture:!0}))};function nd(){const e=this,{params:t}=e;e.onTouchStart=Xc.bind(e),e.onTouchMove=Kc.bind(e),e.onTouchEnd=Qc.bind(e),e.onDocumentTouchStart=td.bind(e),t.cssMode&&(e.onScroll=Zc.bind(e)),e.onClick=Jc.bind(e),e.onLoad=ed.bind(e),Ui(e,"on")}function rd(){Ui(this,"off")}var ad={attachEvents:nd,detachEvents:rd};const qi=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function id(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,i=r.breakpoints;if(!i||i&&Object.keys(i).length===0)return;const s=_t(),o=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",u=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,o,u);if(!l||e.currentBreakpoint===l)return;const p=(l in i?i[l]:void 0)||e.originalParams,E=qi(e,r),c=qi(e,p),y=e.params.grabCursor,h=p.grabCursor,m=r.enabled;E&&!c?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!E&&c&&(a.classList.add(`${r.containerModifierClass}grid`),(p.grid.fill&&p.grid.fill==="column"||!p.grid.fill&&r.grid.fill==="column")&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),y&&!h?e.unsetGrabCursor():!y&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(C=>{if(typeof p[C]>"u")return;const O=r[C]&&r[C].enabled,A=p[C]&&p[C].enabled;O&&!A&&e[C].disable(),!O&&A&&e[C].enable()});const g=p.direction&&p.direction!==r.direction,b=r.loop&&(p.slidesPerView!==r.slidesPerView||g),T=r.loop;g&&n&&e.changeDirection(),Ge(e.params,p);const _=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!_?e.disable():!m&&_&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",p),n&&(b?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!T&&w?(e.loopCreate(t),e.updateSlides()):T&&!w&&e.loopDestroy()),e.emit("breakpoint",p)}function sd(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=Fe(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const u=parseFloat(o.substr(1));return{value:i*u,point:o}}return{value:o,point:o}});s.sort((o,u)=>parseInt(o.value,10)-parseInt(u.value,10));for(let o=0;o<s.length;o+=1){const{point:u,value:l}=s[o];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=u):l<=n.clientWidth&&(r=u)}return r||"max"}var od={setBreakpoint:id,getBreakpoint:sd};function ud(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(a=>{r[a]&&n.push(t+a)}):typeof r=="string"&&n.push(t+r)}),n}function ld(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=ud(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),a.classList.add(...t),e.emitContainerClasses()}function cd(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var dd={addClasses:ld,removeClasses:cd};function fd(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const a=e.slides.length-1,i=e.slidesGrid[a]+e.slidesSizesGrid[a]+r*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var pd={checkOverflow:fd},Fr={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function hd(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){Ge(t,r);return}if(e[a]===!0&&(e[a]={enabled:!0}),a==="navigation"&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),!(a in e&&"enabled"in i)){Ge(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),Ge(t,r)}}const Hr={eventsEmitter:dc,update:Cc,translate:wc,transition:Oc,slide:$c,loop:Vc,grabCursor:Wc,events:ad,breakpoints:od,checkOverflow:pd,classes:dd},$r={};let Ur=class pt{constructor(...t){let n,r;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?r=t[0]:[n,r]=t,r||(r={}),r=Ge({},r),n&&!r.el&&(r.el=n);const a=_t();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const u=[];return a.querySelectorAll(r.el).forEach(l=>{const d=Ge({},r,{el:l});u.push(new pt(d))}),u}const i=this;i.__swiper__=!0,i.support=Pi(),i.device=Mi({userAgent:r.userAgent}),i.browser=Bi(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(u=>{u({params:r,swiper:i,extendParams:hd(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const o=Ge({},Fr,s);return i.params=Ge({},o,$r,r),i.originalParams=Ge({},i.params),i.passedParams=Ge({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(u=>{i.on(u,i.params.on[u])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return i.params.direction==="horizontal"},isVertical(){return i.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,a=tt(n,`.${r.slideClass}, swiper-slide`),i=jn(a[0]);return jn(t)-i}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.getAttribute("data-swiper-slide-index")*1===t))}getSlideIndexWhenGrid(t){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?t=Math.floor(t/this.params.grid.rows):this.params.grid.fill==="row"&&(t=t%Math.ceil(this.slides.length/this.params.grid.rows))),t}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=tt(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const a=r.minTranslate(),s=(r.maxTranslate()-a)*t+a;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const a=t.getSlideClasses(r);n.push({slideEl:r,classNames:a}),t.emit("_slideClass",r,a)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t="current",n=!1){const r=this,{params:a,slides:i,slidesGrid:s,slidesSizesGrid:o,size:u,activeIndex:l}=r;let d=1;if(typeof a.slidesPerView=="number")return a.slidesPerView;if(a.centeredSlides){let p=i[l]?Math.ceil(i[l].swiperSlideSize):0,E;for(let c=l+1;c<i.length;c+=1)i[c]&&!E&&(p+=Math.ceil(i[c].swiperSlideSize),d+=1,p>u&&(E=!0));for(let c=l-1;c>=0;c-=1)i[c]&&!E&&(p+=i[c].swiperSlideSize,d+=1,p>u&&(E=!0))}else if(t==="current")for(let p=l+1;p<i.length;p+=1)(n?s[p]+o[p]-s[l]<u:s[p]-s[l]<u)&&(d+=1);else for(let p=l-1;p>=0;p-=1)s[l]-s[p]<u&&(d+=1);return d}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&Xn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,o=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(o),t.updateActiveIndex(),t.updateSlidesClasses()}let i;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)a(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(s.length-1,0,!1,!0)}else i=t.slideTo(t.activeIndex,0,!1,!0);i||a()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n=!0){const r=this,a=r.params.direction;return t||(t=a==="horizontal"?"vertical":"horizontal"),t===a||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${a}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(i=>{t==="vertical"?i.style.width="":i.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const a=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(a()):tt(r,a())[0];return!s&&n.params.createElements&&(s=Wn("div",n.params.wrapperClass),r.append(s),tt(r,`.${n.params.slideClass}`).forEach(o=>{s.append(o)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||mt(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||mt(r,"direction")==="rtl"),wrongRTL:mt(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const a=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&a.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),a.forEach(i=>{i.complete?Xn(n,i):i.addEventListener("load",s=>{Xn(n,s.target)})}),Rr(n),n.initialized=!0,Rr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:o}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),a.loop&&r.loopDestroy(),n&&(r.removeClasses(),i&&typeof i!="string"&&i.removeAttribute("style"),s&&s.removeAttribute("style"),o&&o.length&&o.forEach(u=>{u.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),u.removeAttribute("style"),u.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(u=>{r.off(u)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),Jl(r)),r.destroyed=!0),null}static extendDefaults(t){Ge($r,t)}static get extendedDefaults(){return $r}static get defaults(){return Fr}static installModule(t){pt.prototype.__modules__||(pt.prototype.__modules__=[]);const n=pt.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>pt.installModule(n)),pt):(pt.installModule(t),pt)}};Object.keys(Hr).forEach(e=>{Object.keys(Hr[e]).forEach(t=>{Ur.prototype[t]=Hr[e][t]})}),Ur.use([lc,cc]);const zi=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function vt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Ht(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:vt(t[r])&&vt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Ht(e[r],t[r]):e[r]=t[r]})}function Vi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function Gi(e={}){return e.pagination&&typeof e.pagination.el>"u"}function Yi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function Wi(e=""){const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function md(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function gd({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:o}){const u=r.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:l,pagination:d,navigation:p,scrollbar:E,virtual:c,thumbs:y}=e;let h,m,g,b,T,_,w,C;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(h=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(m=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||o)&&(l.pagination||l.pagination===!1)&&d&&!d.el&&(g=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&E&&!E.el&&(b=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||a)&&(l.navigation||l.navigation===!1)&&p&&!p.prevEl&&!p.nextEl&&(T=!0);const O=A=>{e[A]&&(e[A].destroy(),A==="navigation"?(e.isElement&&(e[A].prevEl.remove(),e[A].nextEl.remove()),l[A].prevEl=void 0,l[A].nextEl=void 0,e[A].prevEl=void 0,e[A].nextEl=void 0):(e.isElement&&e[A].el.remove(),l[A].el=void 0,e[A].el=void 0))};r.includes("loop")&&e.isElement&&(l.loop&&!n.loop?_=!0:!l.loop&&n.loop?w=!0:C=!0),u.forEach(A=>{if(vt(l[A])&&vt(n[A]))Object.assign(l[A],n[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in n[A]&&!n[A].enabled&&O(A);else{const S=n[A];(S===!0||S===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?S===!1&&O(A):l[A]=n[A]}}),u.includes("controller")&&!m&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&c&&l.virtual.enabled?(c.slides=t,c.update(!0)):r.includes("virtual")&&c&&l.virtual.enabled&&(t&&(c.slides=t),c.update(!0)),r.includes("children")&&t&&l.loop&&(C=!0),h&&y.init()&&y.update(!0),m&&(e.controller.control=l.controller.control),g&&(e.isElement&&(!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-pagination"),o.part.add("pagination"),e.el.appendChild(o)),o&&(l.pagination.el=o),d.init(),d.render(),d.update()),b&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),e.el.appendChild(s)),s&&(l.scrollbar.el=s),E.init(),E.updateSize(),E.setTranslate()),T&&(e.isElement&&((!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-next"),an(a,e.navigation.arrowSvg),a.part.add("button-next"),e.el.appendChild(a)),(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-button-prev"),an(i,e.navigation.arrowSvg),i.part.add("button-prev"),e.el.appendChild(i))),a&&(l.navigation.nextEl=a),i&&(l.navigation.prevEl=i),p.init(),p.update()),r.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&e.changeDirection(n.direction,!1),(_||C)&&e.loopDestroy(),(w||C)&&e.loopCreate(),e.update()}function Ed(e={},t=!0){const n={on:{}},r={},a={};Ht(n,Fr),n._emitClasses=!0,n.init=!1;const i={},s=zi.map(u=>u.replace(/_/,"")),o=Object.assign({},e);return Object.keys(o).forEach(u=>{typeof e[u]>"u"||(s.indexOf(u)>=0?vt(e[u])?(n[u]={},a[u]={},Ht(n[u],e[u]),Ht(a[u],e[u])):(n[u]=e[u],a[u]=e[u]):u.search(/on[A-Z]/)===0&&typeof e[u]=="function"?t?r[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:n.on[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:i[u]=e[u])}),["navigation","pagination","scrollbar"].forEach(u=>{n[u]===!0&&(n[u]={}),n[u]===!1&&delete n[u]}),{params:n,passedParams:a,rest:i,events:r}}function bd({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){Vi(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),Gi(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),Yi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function Td(e,t,n,r,a){const i=[];if(!t)return i;const s=u=>{i.indexOf(u)<0&&i.push(u)};if(n&&r){const u=r.map(a),l=n.map(a);u.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return zi.filter(u=>u[0]==="_").map(u=>u.replace(/_/,"")).forEach(u=>{if(u in e&&u in t)if(vt(e[u])&&vt(t[u])){const l=Object.keys(e[u]),d=Object.keys(t[u]);l.length!==d.length?s(u):(l.forEach(p=>{e[u][p]!==t[u][p]&&s(u)}),d.forEach(p=>{e[u][p]!==t[u][p]&&s(u)}))}else e[u]!==t[u]&&s(u)}),i}const yd=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Kn(){return Kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kn.apply(this,arguments)}function ji(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Xi(e){const t=[];return L.Children.toArray(e).forEach(n=>{ji(n)?t.push(n):n.props&&n.props.children&&Xi(n.props.children).forEach(r=>t.push(r))}),t}function xd(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return L.Children.toArray(e).forEach(r=>{if(ji(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const a=Xi(r.props.children);a.length>0?a.forEach(i=>t.push(i)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Cd(e,t,n){if(!n)return null;const r=d=>{let p=d;return d<0?p=t.length+d:p>=t.length&&(p=p-t.length),p},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:i,to:s}=n,o=e.params.loop?-t.length:0,u=e.params.loop?t.length*2:t.length,l=[];for(let d=o;d<u;d+=1)d>=i&&d<=s&&l.push(t[r(d)]);return l.map((d,p)=>L.cloneElement(d,{swiper:e,style:a,key:d.props.virtualIndex||d.key||`slide-${p}`}))}function sn(e,t){return typeof window>"u"?L.useEffect(e,t):L.useLayoutEffect(e,t)}const Ki=L.createContext(null),Sd=L.createContext(null),Qi=L.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let o=!1;const[u,l]=L.useState("swiper"),[d,p]=L.useState(null),[E,c]=L.useState(!1),y=L.useRef(!1),h=L.useRef(null),m=L.useRef(null),g=L.useRef(null),b=L.useRef(null),T=L.useRef(null),_=L.useRef(null),w=L.useRef(null),C=L.useRef(null),{params:O,passedParams:A,rest:S,events:k}=Ed(i),{slides:I,slots:M}=xd(r),B=()=>{c(!E)};Object.assign(O.on,{_containerClasses($,V){l(V)}});const N=()=>{Object.assign(O.on,k),o=!0;const $={...O};if(delete $.wrapperClass,m.current=new Ur($),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=I;const V={cache:!1,slides:I,renderExternal:p,renderExternalUpdate:!1};Ht(m.current.params.virtual,V),Ht(m.current.originalParams.virtual,V)}};h.current||N(),m.current&&m.current.on("_beforeBreakpoint",B);const x=()=>{o||!k||!m.current||Object.keys(k).forEach($=>{m.current.on($,k[$])})},H=()=>{!k||!m.current||Object.keys(k).forEach($=>{m.current.off($,k[$])})};L.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",B)}),L.useEffect(()=>{!y.current&&m.current&&(m.current.emitSlidesClasses(),y.current=!0)}),sn(()=>{if(s&&(s.current=h.current),!!h.current)return m.current.destroyed&&N(),bd({el:h.current,nextEl:T.current,prevEl:_.current,paginationEl:w.current,scrollbarEl:C.current,swiper:m.current},O),a&&!m.current.destroyed&&a(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),sn(()=>{x();const $=Td(A,g.current,I,b.current,V=>V.key);return g.current=A,b.current=I,$.length&&m.current&&!m.current.destroyed&&gd({swiper:m.current,slides:I,passedParams:A,changedParams:$,nextEl:T.current,prevEl:_.current,scrollbarEl:C.current,paginationEl:w.current}),()=>{H()}}),sn(()=>{yd(m.current)},[d]);function U(){return O.virtual?Cd(m.current,I,d):I.map(($,V)=>L.cloneElement($,{swiper:m.current,swiperSlideIndex:V}))}return L.createElement(t,Kn({ref:h,className:Wi(`${u}${e?` ${e}`:""}`)},S),L.createElement(Sd.Provider,{value:m.current},M["container-start"],L.createElement(n,{className:md(O.wrapperClass)},M["wrapper-start"],U(),M["wrapper-end"]),Vi(O)&&L.createElement(L.Fragment,null,L.createElement("div",{ref:_,className:"swiper-button-prev"}),L.createElement("div",{ref:T,className:"swiper-button-next"})),Yi(O)&&L.createElement("div",{ref:C,className:"swiper-scrollbar"}),Gi(O)&&L.createElement("div",{ref:w,className:"swiper-pagination"}),M["container-end"]))});Qi.displayName="Swiper";const Ji=L.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:o,...u}={},l)=>{const d=L.useRef(null),[p,E]=L.useState("swiper-slide"),[c,y]=L.useState(!1);function h(T,_,w){_===d.current&&E(w)}sn(()=>{if(typeof o<"u"&&(d.current.swiperSlideIndex=o),l&&(l.current=d.current),!(!d.current||!r)){if(r.destroyed){p!=="swiper-slide"&&E("swiper-slide");return}return r.on("_slideClass",h),()=>{r&&r.off("_slideClass",h)}}}),sn(()=>{r&&d.current&&!r.destroyed&&E(r.getSlideClasses(d.current))},[r]);const m={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},g=()=>typeof t=="function"?t(m):t,b=()=>{y(!0)};return L.createElement(e,Kn({ref:d,className:Wi(`${p}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:b},u),a&&L.createElement(Ki.Provider,{value:m},L.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g(),i&&!c&&L.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}}))),!a&&L.createElement(Ki.Provider,{value:m},g(),i&&!c&&L.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}})))});Ji.displayName="SwiperSlide";function Zi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=tt(e.el,`.${r[a]}`)[0];i||(i=Wn("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const es='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function Ad({swiper:e,extendParams:t,on:n,emit:r}){t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:es};function a(c){let y;return c&&typeof c=="string"&&e.isElement&&(y=e.el.querySelector(c)||e.hostEl.querySelector(c),y)?y:(c&&(typeof c=="string"&&(y=[...document.querySelectorAll(c)]),e.params.uniqueNavElements&&typeof c=="string"&&y&&y.length>1&&e.el.querySelectorAll(c).length===1?y=e.el.querySelector(c):y&&y.length===1&&(y=y[0])),c&&!y?c:y)}function i(c,y){const h=e.params.navigation;c=Ne(c),c.forEach(m=>{m&&(m.classList[y?"add":"remove"](...h.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=y),e.params.watchOverflow&&e.enabled&&m.classList[e.isLocked?"add":"remove"](h.lockClass))})}function s(){const{nextEl:c,prevEl:y}=e.navigation;if(e.params.loop){i(y,!1),i(c,!1);return}i(y,e.isBeginning&&!e.params.rewind),i(c,e.isEnd&&!e.params.rewind)}function o(c){c.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function u(c){c.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const c=e.params.navigation;if(e.params.navigation=Zi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(c.nextEl||c.prevEl))return;let y=a(c.nextEl),h=a(c.prevEl);Object.assign(e.navigation,{nextEl:y,prevEl:h}),y=Ne(y),h=Ne(h);const m=(g,b)=>{if(g){if(c.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const T=document.createElement("div");an(T,es),g.appendChild(T.querySelector("svg")),T.remove()}g.addEventListener("click",b==="next"?u:o)}!e.enabled&&g&&g.classList.add(...c.lockClass.split(" "))};y.forEach(g=>m(g,"next")),h.forEach(g=>m(g,"prev"))}function d(){let{nextEl:c,prevEl:y}=e.navigation;c=Ne(c),y=Ne(y);const h=(m,g)=>{m.removeEventListener("click",g==="next"?u:o),m.classList.remove(...e.params.navigation.disabledClass.split(" "))};c.forEach(m=>h(m,"next")),y.forEach(m=>h(m,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?E():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{d()}),n("enable disable",()=>{let{nextEl:c,prevEl:y}=e.navigation;if(c=Ne(c),y=Ne(y),e.enabled){s();return}[...c,...y].filter(h=>!!h).forEach(h=>h.classList.add(e.params.navigation.lockClass))}),n("click",(c,y)=>{let{nextEl:h,prevEl:m}=e.navigation;h=Ne(h),m=Ne(m);const g=y.target;let b=m.includes(g)||h.includes(g);if(e.isElement&&!b){const T=y.path||y.composedPath&&y.composedPath();T&&(b=T.find(_=>h.includes(_)||m.includes(_)))}if(e.params.navigation.hideOnClick&&!b){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let T;h.length?T=h[0].classList.contains(e.params.navigation.hiddenClass):m.length&&(T=m[0].classList.contains(e.params.navigation.hiddenClass)),r(T===!0?"navigationShow":"navigationHide"),[...h,...m].filter(_=>!!_).forEach(_=>_.classList.toggle(e.params.navigation.hiddenClass))}});const p=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),l(),s()},E=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),d()};Object.assign(e.navigation,{enable:p,disable:E,update:s,init:l,destroy:d})}function on(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function _d({swiper:e,extendParams:t,on:n,emit:r}){const a="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:g=>g,formatFractionTotal:g=>g,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),e.pagination={el:null,bullets:[]};let i,s=0;function o(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function u(g,b){const{bulletActiveClass:T}=e.params.pagination;g&&(g=g[`${b==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${T}-${b}`),g=g[`${b==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${T}-${b}-${b}`)))}function l(g,b,T){if(g=g%T,b=b%T,b===g+1)return"next";if(b===g-1)return"previous"}function d(g){const b=g.target.closest(on(e.params.pagination.bulletClass));if(!b)return;g.preventDefault();const T=jn(b)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===T)return;const _=l(e.realIndex,T,e.slides.length);_==="next"?e.slideNext():_==="previous"?e.slidePrev():e.slideToLoop(T)}else e.slideTo(T)}function p(){const g=e.rtl,b=e.params.pagination;if(o())return;let T=e.pagination.el;T=Ne(T);let _,w;const C=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,O=e.params.loop?Math.ceil(C/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(w=e.previousRealIndex||0,_=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(_=e.snapIndex,w=e.previousSnapIndex):(w=e.previousIndex||0,_=e.activeIndex||0),b.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const A=e.pagination.bullets;let S,k,I;if(b.dynamicBullets&&(i=Lr(A[0],e.isHorizontal()?"width":"height"),T.forEach(M=>{M.style[e.isHorizontal()?"width":"height"]=`${i*(b.dynamicMainBullets+4)}px`}),b.dynamicMainBullets>1&&w!==void 0&&(s+=_-(w||0),s>b.dynamicMainBullets-1?s=b.dynamicMainBullets-1:s<0&&(s=0)),S=Math.max(_-s,0),k=S+(Math.min(A.length,b.dynamicMainBullets)-1),I=(k+S)/2),A.forEach(M=>{const B=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(N=>`${b.bulletActiveClass}${N}`)].map(N=>typeof N=="string"&&N.includes(" ")?N.split(" "):N).flat();M.classList.remove(...B)}),T.length>1)A.forEach(M=>{const B=jn(M);B===_?M.classList.add(...b.bulletActiveClass.split(" ")):e.isElement&&M.setAttribute("part","bullet"),b.dynamicBullets&&(B>=S&&B<=k&&M.classList.add(...`${b.bulletActiveClass}-main`.split(" ")),B===S&&u(M,"prev"),B===k&&u(M,"next"))});else{const M=A[_];if(M&&M.classList.add(...b.bulletActiveClass.split(" ")),e.isElement&&A.forEach((B,N)=>{B.setAttribute("part",N===_?"bullet-active":"bullet")}),b.dynamicBullets){const B=A[S],N=A[k];for(let x=S;x<=k;x+=1)A[x]&&A[x].classList.add(...`${b.bulletActiveClass}-main`.split(" "));u(B,"prev"),u(N,"next")}}if(b.dynamicBullets){const M=Math.min(A.length,b.dynamicMainBullets+4),B=(i*M-i)/2-I*i,N=g?"right":"left";A.forEach(x=>{x.style[e.isHorizontal()?N:"top"]=`${B}px`})}}T.forEach((A,S)=>{if(b.type==="fraction"&&(A.querySelectorAll(on(b.currentClass)).forEach(k=>{k.textContent=b.formatFractionCurrent(_+1)}),A.querySelectorAll(on(b.totalClass)).forEach(k=>{k.textContent=b.formatFractionTotal(O)})),b.type==="progressbar"){let k;b.progressbarOpposite?k=e.isHorizontal()?"vertical":"horizontal":k=e.isHorizontal()?"horizontal":"vertical";const I=(_+1)/O;let M=1,B=1;k==="horizontal"?M=I:B=I,A.querySelectorAll(on(b.progressbarFillClass)).forEach(N=>{N.style.transform=`translate3d(0,0,0) scaleX(${M}) scaleY(${B})`,N.style.transitionDuration=`${e.params.speed}ms`})}b.type==="custom"&&b.renderCustom?(an(A,b.renderCustom(e,_+1,O)),S===0&&r("paginationRender",A)):(S===0&&r("paginationRender",A),r("paginationUpdate",A)),e.params.watchOverflow&&e.enabled&&A.classList[e.isLocked?"add":"remove"](b.lockClass)})}function E(){const g=e.params.pagination;if(o())return;const b=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let T=e.pagination.el;T=Ne(T);let _="";if(g.type==="bullets"){let w=e.params.loop?Math.ceil(b/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&w>b&&(w=b);for(let C=0;C<w;C+=1)g.renderBullet?_+=g.renderBullet.call(e,C,g.bulletClass):_+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?_=g.renderFraction.call(e,g.currentClass,g.totalClass):_=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?_=g.renderProgressbar.call(e,g.progressbarFillClass):_=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],T.forEach(w=>{g.type!=="custom"&&an(w,_||""),g.type==="bullets"&&e.pagination.bullets.push(...w.querySelectorAll(on(g.bulletClass)))}),g.type!=="custom"&&r("paginationRender",T[0])}function c(){e.params.pagination=Zi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let b;typeof g.el=="string"&&e.isElement&&(b=e.el.querySelector(g.el)),!b&&typeof g.el=="string"&&(b=[...document.querySelectorAll(g.el)]),b||(b=g.el),!(!b||b.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(b)&&b.length>1&&(b=[...e.el.querySelectorAll(g.el)],b.length>1&&(b=b.find(T=>Di(T,".swiper")[0]===e.el))),Array.isArray(b)&&b.length===1&&(b=b[0]),Object.assign(e.pagination,{el:b}),b=Ne(b),b.forEach(T=>{g.type==="bullets"&&g.clickable&&T.classList.add(...(g.clickableClass||"").split(" ")),T.classList.add(g.modifierClass+g.type),T.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.type==="bullets"&&g.dynamicBullets&&(T.classList.add(`${g.modifierClass}${g.type}-dynamic`),s=0,g.dynamicMainBullets<1&&(g.dynamicMainBullets=1)),g.type==="progressbar"&&g.progressbarOpposite&&T.classList.add(g.progressbarOppositeClass),g.clickable&&T.addEventListener("click",d),e.enabled||T.classList.add(g.lockClass)}))}function y(){const g=e.params.pagination;if(o())return;let b=e.pagination.el;b&&(b=Ne(b),b.forEach(T=>{T.classList.remove(g.hiddenClass),T.classList.remove(g.modifierClass+g.type),T.classList.remove(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.clickable&&(T.classList.remove(...(g.clickableClass||"").split(" ")),T.removeEventListener("click",d))})),e.pagination.bullets&&e.pagination.bullets.forEach(T=>T.classList.remove(...g.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const g=e.params.pagination;let{el:b}=e.pagination;b=Ne(b),b.forEach(T=>{T.classList.remove(g.horizontalClass,g.verticalClass),T.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?m():(c(),E(),p())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&p()}),n("snapIndexChange",()=>{p()}),n("snapGridLengthChange",()=>{E(),p()}),n("destroy",()=>{y()}),n("enable disable",()=>{let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{p()}),n("click",(g,b)=>{const T=b.target,_=Ne(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&_&&_.length>0&&!T.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&T===e.navigation.nextEl||e.navigation.prevEl&&T===e.navigation.prevEl))return;const w=_[0].classList.contains(e.params.pagination.hiddenClass);r(w===!0?"paginationShow":"paginationHide"),_.forEach(C=>C.classList.toggle(e.params.pagination.hiddenClass))}});const h=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList.remove(e.params.pagination.paginationDisabledClass))),c(),E(),p()},m=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList.add(e.params.pagination.paginationDisabledClass))),y()};Object.assign(e.pagination,{enable:h,disable:m,render:E,update:p,init:c,destroy:y})}function TT(){}function yT(){}function ts(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function ns(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wd={};function rs(e,t){return(wd.jsx?kd:vd).test(e)}const Nd=/[ \t\n\f\r]/g;function Id(e){return typeof e=="object"?e.type==="text"?as(e.value):!1:as(e)}function as(e){return e.replace(Nd,"")===""}class un{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}un.prototype.normal={},un.prototype.property={},un.prototype.space=void 0;function is(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new un(n,r,t)}function ln(e){return e.toLowerCase()}class $e{constructor(t,n){this.attribute=n,this.property=t}}$e.prototype.attribute="",$e.prototype.booleanish=!1,$e.prototype.boolean=!1,$e.prototype.commaOrSpaceSeparated=!1,$e.prototype.commaSeparated=!1,$e.prototype.defined=!1,$e.prototype.mustUseProperty=!1,$e.prototype.number=!1,$e.prototype.overloadedBoolean=!1,$e.prototype.property="",$e.prototype.spaceSeparated=!1,$e.prototype.space=void 0;let Ld=0;const le=kt(),we=kt(),qr=kt(),K=kt(),xe=kt(),$t=kt(),Ye=kt();function kt(){return 2**++Ld}const zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:we,commaOrSpaceSeparated:Ye,commaSeparated:$t,number:K,overloadedBoolean:qr,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Vr=Object.keys(zr);class Gr extends $e{constructor(t,n,r,a){let i=-1;if(super(t,n),ss(this,"space",a),typeof r=="number")for(;++i<Vr.length;){const s=Vr[i];ss(this,Vr[i],(r&zr[s])===zr[s])}}}Gr.prototype.defined=!0;function ss(e,t,n){n&&(e[t]=n)}function Ut(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Gr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ln(r)]=r,n[ln(i.attribute)]=r}return new un(t,n,e.space)}const os=Ut({properties:{ariaActiveDescendant:null,ariaAtomic:we,ariaAutoComplete:null,ariaBusy:we,ariaChecked:we,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:we,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:we,ariaFlowTo:xe,ariaGrabbed:we,ariaHasPopup:null,ariaHidden:we,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:K,ariaLive:null,ariaModal:we,ariaMultiLine:we,ariaMultiSelectable:we,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:we,ariaReadOnly:we,ariaRelevant:null,ariaRequired:we,ariaRoleDescription:xe,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:we,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function us(e,t){return t in e?e[t]:t}function ls(e,t){return us(e,t.toLowerCase())}const Od=Ut({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$t,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:xe,autoFocus:le,autoPlay:le,blocking:xe,capture:null,charSet:null,checked:le,cite:null,className:xe,cols:K,colSpan:null,content:null,contentEditable:we,controls:le,controlsList:xe,coords:K|$t,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:qr,draggable:we,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:xe,height:K,hidden:qr,high:K,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:xe,itemRef:xe,itemScope:le,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:le,optimum:K,pattern:null,ping:xe,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:xe,required:le,reversed:le,rows:K,rowSpan:K,sandbox:xe,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:we,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:we,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:we,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:ls}),Dd=Ut({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ye,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$t,g2:$t,glyphName:$t,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Ye,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ye,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ye,rev:Ye,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ye,requiredFeatures:Ye,requiredFonts:Ye,requiredFormats:Ye,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Ye,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ye,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ye,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:us}),cs=Ut({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ds=Ut({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ls}),fs=Ut({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pd={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Md=/[A-Z]/g,ps=/-[a-z]/g,Bd=/^data[-\w.:]+$/i;function Qn(e,t){const n=ln(t);let r=t,a=$e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ps,Fd);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ps.test(i)){let s=i.replace(Md,Rd);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Gr}return new a(r,t)}function Rd(e){return"-"+e.toLowerCase()}function Fd(e){return e.charAt(1).toUpperCase()}const cn=is([os,Od,cs,ds,fs],"html"),gt=is([os,Dd,cs,ds,fs],"svg");function hs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ms(e){return e.join(" ").trim()}function Yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qt={},Wr,gs;function Hd(){if(gs)return Wr;gs=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
43
- `,l="/",d="*",p="",E="comment",c="declaration";function y(m,g){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];g=g||{};var b=1,T=1;function _(N){var x=N.match(t);x&&(b+=x.length);var H=N.lastIndexOf(u);T=~H?N.length-H:T+N.length}function w(){var N={line:b,column:T};return function(x){return x.position=new C(N),S(),x}}function C(N){this.start=N,this.end={line:b,column:T},this.source=g.source}C.prototype.content=m;function O(N){var x=new Error(g.source+":"+b+":"+T+": "+N);if(x.reason=N,x.filename=g.source,x.line=b,x.column=T,x.source=m,!g.silent)throw x}function A(N){var x=N.exec(m);if(x){var H=x[0];return _(H),m=m.slice(H.length),x}}function S(){A(n)}function k(N){var x;for(N=N||[];x=I();)x!==!1&&N.push(x);return N}function I(){var N=w();if(!(l!=m.charAt(0)||d!=m.charAt(1))){for(var x=2;p!=m.charAt(x)&&(d!=m.charAt(x)||l!=m.charAt(x+1));)++x;if(x+=2,p===m.charAt(x-1))return O("End of comment missing");var H=m.slice(2,x-2);return T+=2,_(H),m=m.slice(x),T+=2,N({type:E,comment:H})}}function M(){var N=w(),x=A(r);if(x){if(I(),!A(a))return O("property missing ':'");var H=A(i),U=N({type:c,property:h(x[0].replace(e,p)),value:H?h(H[0].replace(e,p)):p});return A(s),U}}function B(){var N=[];k(N);for(var x;x=M();)x!==!1&&(N.push(x),k(N));return N}return S(),B()}function h(m){return m?m.replace(o,p):p}return Wr=y,Wr}var Es;function $d(){if(Es)return qt;Es=1;var e=qt&&qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=n;const t=e(Hd());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),o=typeof a=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:d}=u;o?a(l,d,u):d&&(i=i||{},i[l]=d)}),i}return qt}var dn={},bs;function Ud(){if(bs)return dn;bs=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(l){return!l||n.test(l)||e.test(l)},s=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),i(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(a,o):l=l.replace(r,o),l.replace(t,s))};return dn.camelCase=u,dn}var fn,Ts;function qd(){if(Ts)return fn;Ts=1;var e=fn&&fn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e($d()),n=Ud();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(o,u){o&&u&&(s[(0,n.camelCase)(o,i)]=u)}),s}return r.default=r,fn=r,fn}var zd=qd();const Vd=Yr(zd),Jn=ys("end"),nt=ys("start");function ys(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xs(e){const t=nt(e),n=Jn(e);if(t&&n)return{start:t,end:n}}function pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cs(e.position):"start"in e||"end"in e?Cs(e):"line"in e||"column"in e?jr(e):""}function jr(e){return Ss(e&&e.line)+":"+Ss(e&&e.column)}function Cs(e){return jr(e&&e.start)+"-"+jr(e&&e.end)}function Ss(e){return e&&typeof e=="number"?e:1}class Me extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?i.ruleId=r:(i.source=r.slice(0,u),i.ruleId=r.slice(u+1))}if(!i.place&&i.ancestors&&i.ancestors){const u=i.ancestors[i.ancestors.length-1];u&&(i.place=u.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=o?o.line:void 0,this.name=pn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Me.prototype.file="",Me.prototype.name="",Me.prototype.reason="",Me.prototype.message="",Me.prototype.stack="",Me.prototype.column=void 0,Me.prototype.line=void 0,Me.prototype.ancestors=void 0,Me.prototype.cause=void 0,Me.prototype.fatal=void 0,Me.prototype.place=void 0,Me.prototype.ruleId=void 0,Me.prototype.source=void 0;const Xr={}.hasOwnProperty,Gd=new Map,Yd=/[A-Z]/g,Wd=new Set(["table","tbody","thead","tfoot","tr"]),jd=new Set(["td","th"]),As="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xd(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rf(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=nf(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gt:cn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=_s(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function _s(e,t,n){if(t.type==="element")return Kd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Zd(e,t,n);if(t.type==="mdxjsEsm")return Jd(e,t);if(t.type==="root")return ef(e,t,n);if(t.type==="text")return tf(e,t)}function Kd(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=gt,e.schema=a),e.ancestors.push(t);const i=ks(e,t.tagName,!1),s=af(e,t);let o=Qr(e,t);return Wd.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Id(u):!0})),vs(e,s,i,t),Kr(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Qd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hn(e,t.position)}function Jd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hn(e,t.position)}function Zd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=gt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:ks(e,t.name,!0),s=sf(e,t),o=Qr(e,t);return vs(e,s,i,t),Kr(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function ef(e,t,n){const r={};return Kr(r,Qr(e,t)),e.create(t,e.Fragment,r,n)}function tf(e,t){return t.value}function vs(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nf(e,t,n){return r;function r(a,i,s,o){const l=Array.isArray(s.children)?n:t;return o?l(i,s,o):l(i,s)}}function rf(e,t){return n;function n(r,a,i,s){const o=Array.isArray(i.children),u=nt(r);return t(a,i,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function af(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Xr.call(t.properties,a)){const i=of(e,a,t.properties[a]);if(i){const[s,o]=i;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&jd.has(t.tagName)?r=o:n[s]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function sf(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else hn(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else hn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Qr(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Gd;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const u=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(u){const l=a.get(u)||0;s=u+"-"+l,a.set(u,l+1)}}const o=_s(e,i,s);o!==void 0&&n.push(o)}return n}function of(e,t,n){const r=Qn(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ns(n):ms(n)),r.property==="style"){let a=typeof n=="object"?n:uf(e,String(n));return e.stylePropertyNameCase==="css"&&(a=lf(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Pd[r.property]||r.property:r.attribute,n]}}function uf(e,t){try{return Vd(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Me("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=As+"#cannot-parse-style-attribute",a}}function ks(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const o=rs(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=s}else r=rs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Xr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);hn(e)}function hn(e,t){const n=new Me("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=As+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lf(e){const t={};let n;for(n in e)Xr.call(e,n)&&(t[cf(n)]=e[n]);return t}function cf(e){let t=e.replace(Yd,df);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function df(e){return"-"+e.toLowerCase()}const Jr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ff={};function pf(e,t){const n=ff,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ws(e,r,a)}function ws(e,t,n){if(hf(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ns(e.children,t,n)}return Array.isArray(e)?Ns(e,t,n):""}function Ns(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ws(e[a],t,n);return r.join("")}function hf(e){return!!(e&&typeof e=="object")}const Is=document.createElement("i");function mn(e){const t="&"+e+";";Is.innerHTML=t;const n=Is.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function rt(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Qe(e,t){return e.length>0?(rt(e,e.length,0,t),e):t}const Ls={}.hasOwnProperty;function mf(e){const t={};let n=-1;for(;++n<e.length;)gf(t,e[n]);return t}function gf(e,t){let n;for(n in t){const a=(Ls.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){Ls.call(a,s)||(a[s]=[]);const o=i[s];Ef(a[s],Array.isArray(o)?o:o?[o]:[])}}}function Ef(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);rt(e,0,0,r)}function Os(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const at=Et(/[A-Za-z]/),We=Et(/[\dA-Za-z]/),bf=Et(/[#-'*+\--9=?A-Z^-~]/);function Zr(e){return e!==null&&(e<32||e===127)}const ea=Et(/\d/),Tf=Et(/[\dA-Fa-f]/),yf=Et(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<-2}function ve(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const gn=Et(new RegExp("\\p{P}|\\p{S}","u")),En=Et(/\s/);function Et(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Vt(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(s=String.fromCharCode(i,o),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function me(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(u){return he(u)?(e.enter(n),o(u)):t(u)}function o(u){return he(u)&&i++<a?(e.consume(u),o):(e.exit(n),t(u))}}const xf={tokenize:Cf};function Cf(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),me(e,t,"linePrefix")}function a(o){return e.enter("paragraph"),i(o)}function i(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ne(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),s)}}const Sf={tokenize:Af},Ds={tokenize:_f};function Af(e){const t=this,n=[];let r=0,a,i,s;return o;function o(T){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,u,l)(T)}return l(T)}function u(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&b();const _=t.events.length;let w=_,C;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){C=t.events[w][1].end;break}g(r);let O=_;for(;O<t.events.length;)t.events[O][1].end={...C},O++;return rt(t.events,w+1,0,t.events.slice(_)),t.events.length=O,l(T)}return o(T)}function l(T){if(r===n.length){if(!a)return E(T);if(a.currentConstruct&&a.currentConstruct.concrete)return y(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ds,d,p)(T)}function d(T){return a&&b(),g(r),E(T)}function p(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,y(T)}function E(T){return t.containerState={},e.attempt(Ds,c,y)(T)}function c(T){return r++,n.push([t.currentConstruct,t.containerState]),E(T)}function y(T){if(T===null){a&&b(),g(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),h(T)}function h(T){if(T===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(T);return}return ne(T)?(e.consume(T),m(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(T),h)}function m(T,_){const w=t.sliceStream(T);if(_&&w.push(null),T.previous=i,i&&(i.next=T),i=T,a.defineSkip(T.start),a.write(w),t.parser.lazy[T.start.line]){let C=a.events.length;for(;C--;)if(a.events[C][1].start.offset<s&&(!a.events[C][1].end||a.events[C][1].end.offset>s))return;const O=t.events.length;let A=O,S,k;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(S){k=t.events[A][1].end;break}S=!0}for(g(r),C=O;C<t.events.length;)t.events[C][1].end={...k},C++;rt(t.events,A+1,0,t.events.slice(O)),t.events.length=C}}function g(T){let _=n.length;for(;_-- >T;){const w=n[_];t.containerState=w[1],w[0].exit.call(t,e)}n.length=T}function b(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function _f(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ps(e){if(e===null||ve(e)||En(e))return 1;if(gn(e))return 2}function ta(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const na={name:"attention",resolveAll:vf,tokenize:kf};function vf(e,t){let n=-1,r,a,i,s,o,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},E={...e[n][1].start};Ms(p,-u),Ms(E,u),s={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},i={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Qe(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Qe(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Qe(l,ta(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Qe(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Qe(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,rt(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kf(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Ps(r);let i;return s;function s(u){return i=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===i)return e.consume(u),o;const l=e.exit("attentionSequence"),d=Ps(u),p=!d||d===2&&a||n.includes(u),E=!a||a===2&&d||n.includes(r);return l._open=!!(i===42?p:p&&(a||!E)),l._close=!!(i===42?E:E&&(d||!p)),t(u)}}function Ms(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wf={name:"autolink",tokenize:Nf};function Nf(e,t,n){let r=0;return a;function a(c){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(c){return at(c)?(e.consume(c),s):c===64?n(c):l(c)}function s(c){return c===43||c===45||c===46||We(c)?(r=1,o(c)):l(c)}function o(c){return c===58?(e.consume(c),r=0,u):(c===43||c===45||c===46||We(c))&&r++<32?(e.consume(c),o):(r=0,l(c))}function u(c){return c===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.exit("autolink"),t):c===null||c===32||c===60||Zr(c)?n(c):(e.consume(c),u)}function l(c){return c===64?(e.consume(c),d):bf(c)?(e.consume(c),l):n(c)}function d(c){return We(c)?p(c):n(c)}function p(c){return c===46?(e.consume(c),r=0,d):c===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.exit("autolink"),t):E(c)}function E(c){if((c===45||We(c))&&r++<63){const y=c===45?E:p;return e.consume(c),y}return n(c)}}const Zn={partial:!0,tokenize:If};function If(e,t,n){return r;function r(i){return he(i)?me(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ne(i)?t(i):n(i)}}const Bs={continuation:{tokenize:Of},exit:Df,name:"blockQuote",tokenize:Lf};function Lf(e,t,n){const r=this;return a;function a(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Of(e,t,n){const r=this;return a;function a(s){return he(s)?me(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Bs,t,n)(s)}}function Df(e){e.exit("blockQuote")}const Rs={name:"characterEscape",tokenize:Pf};function Pf(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return yf(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Fs={name:"characterReference",tokenize:Mf};function Mf(e,t,n){const r=this;let a=0,i,s;return o;function o(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),u}function u(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=We,d(p))}function l(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=Tf,d):(e.enter("characterReferenceValue"),i=7,s=ea,d(p))}function d(p){if(p===59&&a){const E=e.exit("characterReferenceValue");return s===We&&!mn(r.sliceSerialize(E))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&a++<i?(e.consume(p),d):n(p)}}const Hs={partial:!0,tokenize:Rf},$s={concrete:!0,name:"codeFenced",tokenize:Bf};function Bf(e,t,n){const r=this,a={partial:!0,tokenize:w};let i=0,s=0,o;return u;function u(C){return l(C)}function l(C){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,o=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===o?(s++,e.consume(C),d):s<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?me(e,p,"whitespace")(C):p(C))}function p(C){return C===null||ne(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Hs,h,_)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(C))}function E(C){return C===null||ne(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,c,"whitespace")(C)):C===96&&C===o?n(C):(e.consume(C),E)}function c(C){return C===null||ne(C)?p(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===null||ne(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(C)):C===96&&C===o?n(C):(e.consume(C),y)}function h(C){return e.attempt(a,_,m)(C)}function m(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return i>0&&he(C)?me(e,b,"linePrefix",i+1)(C):b(C)}function b(C){return C===null||ne(C)?e.check(Hs,h,_)(C):(e.enter("codeFlowValue"),T(C))}function T(C){return C===null||ne(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),T)}function _(C){return e.exit("codeFenced"),t(C)}function w(C,O,A){let S=0;return k;function k(x){return C.enter("lineEnding"),C.consume(x),C.exit("lineEnding"),I}function I(x){return C.enter("codeFencedFence"),he(x)?me(C,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):M(x)}function M(x){return x===o?(C.enter("codeFencedFenceSequence"),B(x)):A(x)}function B(x){return x===o?(S++,C.consume(x),B):S>=s?(C.exit("codeFencedFenceSequence"),he(x)?me(C,N,"whitespace")(x):N(x)):A(x)}function N(x){return x===null||ne(x)?(C.exit("codeFencedFence"),O(x)):A(x)}}}function Rf(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ra={name:"codeIndented",tokenize:Hf},Ff={partial:!0,tokenize:$f};function Hf(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),me(e,i,"linePrefix",5)(l)}function i(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):ne(l)?e.attempt(Ff,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ne(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function $f(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):me(e,i,"linePrefix",5)(s)}function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ne(s)?a(s):n(s)}}const Uf={name:"codeText",previous:zf,resolve:qf,tokenize:Vf};function qf(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function zf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vf(e,t,n){let r=0,a,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),o(p)}function o(p){return p===96?(e.consume(p),r++,o):(e.exit("codeTextSequence"),u(p))}function u(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),u):p===96?(i=e.enter("codeTextSequence"),a=0,d(p)):ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(p))}function l(p){return p===null||p===32||p===96||ne(p)?(e.exit("codeTextData"),u(p)):(e.consume(p),l)}function d(p){return p===96?(e.consume(p),a++,d):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",l(p))}}class Gf{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&bn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);bn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bn(this.left,n.reverse())}}}function bn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Us(e){const t={};let n=-1,r,a,i,s,o,u,l;const d=new Gf(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,i=0,i<u.length&&u[i][1].type==="lineEndingBlank"&&(i+=2),i<u.length&&u[i][1].type==="content"))for(;++i<u.length&&u[i][1].type!=="content";)u[i][1].type==="chunkText"&&(u[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Yf(d,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=d.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},o=d.slice(a,n),o.unshift(r),d.splice(a,n-a+1,o))}}return rt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function Yf(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let d,p,E=-1,c=n,y=0,h=0;const m=[h];for(;c;){for(;e.get(++a)[1]!==c;);i.push(a),c._tokenizer||(d=r.sliceStream(c),c.next||d.push(null),p&&s.defineSkip(c.start),c._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),c._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=c,c=c.next}for(c=n;++E<o.length;)o[E][0]==="exit"&&o[E-1][0]==="enter"&&o[E][1].type===o[E-1][1].type&&o[E][1].start.line!==o[E][1].end.line&&(h=E+1,m.push(h),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(s.events=[],c?(c._tokenizer=void 0,c.previous=void 0):m.pop(),E=m.length;E--;){const g=o.slice(m[E],m[E+1]),b=i.pop();u.push([b,b+g.length-1]),e.splice(b,2,g)}for(u.reverse(),E=-1;++E<u.length;)l[y+u[E][0]]=y+u[E][1],y+=u[E][1]-u[E][0]-1;return l}const Wf={resolve:Xf,tokenize:Kf},jf={partial:!0,tokenize:Qf};function Xf(e){return Us(e),e}function Kf(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(o)}function a(o){return o===null?i(o):ne(o)?e.check(jf,s,i)(o):(e.consume(o),a)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Qf(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,i,"linePrefix")}function i(s){if(s===null||ne(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function qs(e,t,n,r,a,i,s,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return p;function p(g){return g===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(g),e.exit(i),E):g===null||g===32||g===41||Zr(g)?n(g):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),h(g))}function E(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===62?(e.exit("chunkString"),e.exit(o),E(g)):g===null||g===60||ne(g)?n(g):(e.consume(g),g===92?y:c)}function y(g){return g===60||g===62||g===92?(e.consume(g),c):c(g)}function h(g){return!d&&(g===null||g===41||ve(g))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(g)):d<l&&g===40?(e.consume(g),d++,h):g===41?(e.consume(g),d--,h):g===null||g===32||g===40||Zr(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function zs(e,t,n,r,a,i){const s=this;let o=0,u;return l;function l(c){return e.enter(r),e.enter(a),e.consume(c),e.exit(a),e.enter(i),d}function d(c){return o>999||c===null||c===91||c===93&&!u||c===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):c===93?(e.exit(i),e.enter(a),e.consume(c),e.exit(a),e.exit(r),t):ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(c))}function p(c){return c===null||c===91||c===93||ne(c)||o++>999?(e.exit("chunkString"),d(c)):(e.consume(c),u||(u=!he(c)),c===92?E:p)}function E(c){return c===91||c===92||c===93?(e.consume(c),o++,p):p(c)}}function Vs(e,t,n,r,a,i){let s;return o;function o(E){return E===34||E===39||E===40?(e.enter(r),e.enter(a),e.consume(E),e.exit(a),s=E===40?41:E,u):n(E)}function u(E){return E===s?(e.enter(a),e.consume(E),e.exit(a),e.exit(r),t):(e.enter(i),l(E))}function l(E){return E===s?(e.exit(i),u(s)):E===null?n(E):ne(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),me(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===s||E===null||ne(E)?(e.exit("chunkString"),l(E)):(e.consume(E),E===92?p:d)}function p(E){return E===s||E===92?(e.consume(E),d):d(E)}}function ct(e,t){let n;return r;function r(a){return ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):he(a)?me(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Jf={name:"definition",tokenize:ep},Zf={partial:!0,tokenize:tp};function ep(e,t,n){const r=this;let a;return i;function i(c){return e.enter("definition"),s(c)}function s(c){return zs.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function o(c){return a=zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),c===58?(e.enter("definitionMarker"),e.consume(c),e.exit("definitionMarker"),u):n(c)}function u(c){return ve(c)?ct(e,l)(c):l(c)}function l(c){return qs(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function d(c){return e.attempt(Zf,p,p)(c)}function p(c){return he(c)?me(e,E,"whitespace")(c):E(c)}function E(c){return c===null||ne(c)?(e.exit("definition"),r.parser.defined.push(a),t(c)):n(c)}}function tp(e,t,n){return r;function r(o){return ve(o)?ct(e,a)(o):n(o)}function a(o){return Vs(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return he(o)?me(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ne(o)?t(o):n(o)}}const np={name:"hardBreakEscape",tokenize:rp};function rp(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ne(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const ap={name:"headingAtx",resolve:ip,tokenize:sp};function ip(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},rt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function sp(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ve(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ne(d)?(e.exit("atxHeading"),t(d)):he(d)?me(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||ve(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const op=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gs=["pre","script","style","textarea"],up={concrete:!0,name:"htmlFlow",resolveTo:dp,tokenize:fp},lp={partial:!0,tokenize:hp},cp={partial:!0,tokenize:pp};function dp(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fp(e,t,n){const r=this;let a,i,s,o,u;return l;function l(P){return d(P)}function d(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),E):P===47?(e.consume(P),i=!0,h):P===63?(e.consume(P),a=3,r.interrupt?t:v):at(P)?(e.consume(P),s=String.fromCharCode(P),m):n(P)}function E(P){return P===45?(e.consume(P),a=2,c):P===91?(e.consume(P),a=5,o=0,y):at(P)?(e.consume(P),a=4,r.interrupt?t:v):n(P)}function c(P){return P===45?(e.consume(P),r.interrupt?t:v):n(P)}function y(P){const ee="CDATA[";return P===ee.charCodeAt(o++)?(e.consume(P),o===ee.length?r.interrupt?t:M:y):n(P)}function h(P){return at(P)?(e.consume(P),s=String.fromCharCode(P),m):n(P)}function m(P){if(P===null||P===47||P===62||ve(P)){const ee=P===47,te=s.toLowerCase();return!ee&&!i&&Gs.includes(te)?(a=1,r.interrupt?t(P):M(P)):op.includes(s.toLowerCase())?(a=6,ee?(e.consume(P),g):r.interrupt?t(P):M(P)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):i?b(P):T(P))}return P===45||We(P)?(e.consume(P),s+=String.fromCharCode(P),m):n(P)}function g(P){return P===62?(e.consume(P),r.interrupt?t:M):n(P)}function b(P){return he(P)?(e.consume(P),b):k(P)}function T(P){return P===47?(e.consume(P),k):P===58||P===95||at(P)?(e.consume(P),_):he(P)?(e.consume(P),T):k(P)}function _(P){return P===45||P===46||P===58||P===95||We(P)?(e.consume(P),_):w(P)}function w(P){return P===61?(e.consume(P),C):he(P)?(e.consume(P),w):T(P)}function C(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),u=P,O):he(P)?(e.consume(P),C):A(P)}function O(P){return P===u?(e.consume(P),u=null,S):P===null||ne(P)?n(P):(e.consume(P),O)}function A(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ve(P)?w(P):(e.consume(P),A)}function S(P){return P===47||P===62||he(P)?T(P):n(P)}function k(P){return P===62?(e.consume(P),I):n(P)}function I(P){return P===null||ne(P)?M(P):he(P)?(e.consume(P),I):n(P)}function M(P){return P===45&&a===2?(e.consume(P),H):P===60&&a===1?(e.consume(P),U):P===62&&a===4?(e.consume(P),Y):P===63&&a===3?(e.consume(P),v):P===93&&a===5?(e.consume(P),V):ne(P)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(lp,J,B)(P)):P===null||ne(P)?(e.exit("htmlFlowData"),B(P)):(e.consume(P),M)}function B(P){return e.check(cp,N,J)(P)}function N(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),x}function x(P){return P===null||ne(P)?B(P):(e.enter("htmlFlowData"),M(P))}function H(P){return P===45?(e.consume(P),v):M(P)}function U(P){return P===47?(e.consume(P),s="",$):M(P)}function $(P){if(P===62){const ee=s.toLowerCase();return Gs.includes(ee)?(e.consume(P),Y):M(P)}return at(P)&&s.length<8?(e.consume(P),s+=String.fromCharCode(P),$):M(P)}function V(P){return P===93?(e.consume(P),v):M(P)}function v(P){return P===62?(e.consume(P),Y):P===45&&a===2?(e.consume(P),v):M(P)}function Y(P){return P===null||ne(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),Y)}function J(P){return e.exit("htmlFlow"),t(P)}}function pp(e,t,n){const r=this;return a;function a(s){return ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function hp(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Zn,t,n)}}const mp={name:"htmlText",tokenize:gp};function gp(e,t,n){const r=this;let a,i,s;return o;function o(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),u}function u(v){return v===33?(e.consume(v),l):v===47?(e.consume(v),w):v===63?(e.consume(v),T):at(v)?(e.consume(v),A):n(v)}function l(v){return v===45?(e.consume(v),d):v===91?(e.consume(v),i=0,y):at(v)?(e.consume(v),b):n(v)}function d(v){return v===45?(e.consume(v),c):n(v)}function p(v){return v===null?n(v):v===45?(e.consume(v),E):ne(v)?(s=p,U(v)):(e.consume(v),p)}function E(v){return v===45?(e.consume(v),c):p(v)}function c(v){return v===62?H(v):v===45?E(v):p(v)}function y(v){const Y="CDATA[";return v===Y.charCodeAt(i++)?(e.consume(v),i===Y.length?h:y):n(v)}function h(v){return v===null?n(v):v===93?(e.consume(v),m):ne(v)?(s=h,U(v)):(e.consume(v),h)}function m(v){return v===93?(e.consume(v),g):h(v)}function g(v){return v===62?H(v):v===93?(e.consume(v),g):h(v)}function b(v){return v===null||v===62?H(v):ne(v)?(s=b,U(v)):(e.consume(v),b)}function T(v){return v===null?n(v):v===63?(e.consume(v),_):ne(v)?(s=T,U(v)):(e.consume(v),T)}function _(v){return v===62?H(v):T(v)}function w(v){return at(v)?(e.consume(v),C):n(v)}function C(v){return v===45||We(v)?(e.consume(v),C):O(v)}function O(v){return ne(v)?(s=O,U(v)):he(v)?(e.consume(v),O):H(v)}function A(v){return v===45||We(v)?(e.consume(v),A):v===47||v===62||ve(v)?S(v):n(v)}function S(v){return v===47?(e.consume(v),H):v===58||v===95||at(v)?(e.consume(v),k):ne(v)?(s=S,U(v)):he(v)?(e.consume(v),S):H(v)}function k(v){return v===45||v===46||v===58||v===95||We(v)?(e.consume(v),k):I(v)}function I(v){return v===61?(e.consume(v),M):ne(v)?(s=I,U(v)):he(v)?(e.consume(v),I):S(v)}function M(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),a=v,B):ne(v)?(s=M,U(v)):he(v)?(e.consume(v),M):(e.consume(v),N)}function B(v){return v===a?(e.consume(v),a=void 0,x):v===null?n(v):ne(v)?(s=B,U(v)):(e.consume(v),B)}function N(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||ve(v)?S(v):(e.consume(v),N)}function x(v){return v===47||v===62||ve(v)?S(v):n(v)}function H(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function U(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),$}function $(v){return he(v)?me(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):V(v)}function V(v){return e.enter("htmlTextData"),s(v)}}const aa={name:"labelEnd",resolveAll:yp,resolveTo:xp,tokenize:Cp},Ep={tokenize:Sp},bp={tokenize:Ap},Tp={tokenize:_p};function yp(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&rt(e,0,e.length,n),e}function xp(e,t){let n=e.length,r=0,a,i,s,o;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const u={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Qe(o,e.slice(i+1,i+r+3)),o=Qe(o,[["enter",d,t]]),o=Qe(o,ta(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),o=Qe(o,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),o=Qe(o,e.slice(s+1)),o=Qe(o,[["exit",u,t]]),rt(e,i,e.length,o),e}function Cp(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return o;function o(E){return i?i._inactive?p(E):(s=r.parser.defined.includes(zt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),u):n(E)}function u(E){return E===40?e.attempt(Ep,d,s?d:p)(E):E===91?e.attempt(bp,d,s?l:p)(E):s?d(E):p(E)}function l(E){return e.attempt(Tp,d,p)(E)}function d(E){return t(E)}function p(E){return i._balanced=!0,n(E)}}function Sp(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return ve(p)?ct(e,i)(p):i(p)}function i(p){return p===41?d(p):qs(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return ve(p)?ct(e,u)(p):d(p)}function o(p){return n(p)}function u(p){return p===34||p===39||p===40?Vs(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function l(p){return ve(p)?ct(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ap(e,t,n){const r=this;return a;function a(o){return zs.call(r,e,i,s,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function _p(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const vp={name:"labelStartImage",resolveAll:aa.resolveAll,tokenize:kp};function kp(e,t,n){const r=this;return a;function a(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const wp={name:"labelStartLink",resolveAll:aa.resolveAll,tokenize:Np};function Np(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ia={name:"lineEnding",tokenize:Ip};function Ip(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),me(e,t,"linePrefix")}}const er={name:"thematicBreak",tokenize:Lp};function Lp(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,o(l)}function o(l){return l===a?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||ne(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===a?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),he(l)?me(e,o,"whitespace")(l):o(l))}}const Ue={continuation:{tokenize:Mp},exit:Rp,name:"list",tokenize:Pp},Op={partial:!0,tokenize:Fp},Dp={partial:!0,tokenize:Bp};function Pp(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return o;function o(c){const y=r.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||c===r.containerState.marker:ea(c)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),c===42||c===45?e.check(er,n,l)(c):l(c);if(!r.interrupt||c===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(c)}return n(c)}function u(c){return ea(c)&&++s<10?(e.consume(c),u):(!r.interrupt||s<2)&&(r.containerState.marker?c===r.containerState.marker:c===41||c===46)?(e.exit("listItemValue"),l(c)):n(c)}function l(c){return e.enter("listItemMarker"),e.consume(c),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||c,e.check(Zn,r.interrupt?n:d,e.attempt(Op,E,p))}function d(c){return r.containerState.initialBlankLine=!0,i++,E(c)}function p(c){return he(c)?(e.enter("listItemPrefixWhitespace"),e.consume(c),e.exit("listItemPrefixWhitespace"),E):n(c)}function E(c){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(c)}}function Mp(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zn,a,i);function a(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,me(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!he(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Dp,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,me(e,e.attempt(Ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Bp(e,t,n){const r=this;return me(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function Rp(e){e.exit(this.containerState.type)}function Fp(e,t,n){const r=this;return me(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!he(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Ys={name:"setextUnderline",resolveTo:Hp,tokenize:$p};function Hp(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function $p(e,t,n){const r=this;let a;return i;function i(l){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===a?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),he(l)?me(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||ne(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Up={tokenize:qp};function qp(e){const t=this,n=e.attempt(Zn,r,e.attempt(this.parser.constructs.flowInitial,a,me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Wf,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zp={resolveAll:js()},Vp=Ws("string"),Gp=Ws("text");function Ws(e){return{resolveAll:js(e==="text"?Yp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,o);return s;function s(d){return l(d)?i(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),i(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const p=a[d];let E=-1;if(p)for(;++E<p.length;){const c=p[E];if(!c.previous||c.previous.call(r,r.previous))return!0}return!1}}}function js(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function Yp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,o=0,u;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const Wp=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Jf},disable:{null:[]},document:{42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:Bs},flow:{35:ap,42:er,45:[Ys,er],60:up,61:Ys,95:er,96:$s,126:$s},flowInitial:{[-2]:ra,[-1]:ra,32:ra},insideSpan:{null:[na,zp]},string:{38:Fs,92:Rs},text:{[-5]:ia,[-4]:ia,[-3]:ia,33:vp,38:Fs,42:na,60:[wf,mp],91:wp,92:[np,Rs],93:aa,95:na,96:Uf}},Symbol.toStringTag,{value:"Module"}));function jp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],o=[];const u={attempt:O(w),check:O(C),consume:b,enter:T,exit:_,interrupt:O(C,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:y,parser:e,previous:null,sliceSerialize:E,sliceStream:c,write:p};let d=t.tokenize.call(l,u);return t.resolveAll&&i.push(t),l;function p(I){return s=Qe(s,I),m(),s[s.length-1]!==null?[]:(A(t,0),l.events=ta(i,l.events,l),l.events)}function E(I,M){return Kp(c(I),M)}function c(I){return Xp(s,I)}function y(){const{_bufferIndex:I,_index:M,line:B,column:N,offset:x}=r;return{_bufferIndex:I,_index:M,line:B,column:N,offset:x}}function h(I){a[I.line]=I.column,k()}function m(){let I;for(;r._index<s.length;){const M=s[r._index];if(typeof M=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<M.length;)g(M.charCodeAt(r._bufferIndex));else g(M)}}function g(I){d=d(I)}function b(I){ne(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,k()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=I}function T(I,M){const B=M||{};return B.type=I,B.start=y(),l.events.push(["enter",B,l]),o.push(B),B}function _(I){const M=o.pop();return M.end=y(),l.events.push(["exit",M,l]),M}function w(I,M){A(I,M.from)}function C(I,M){M.restore()}function O(I,M){return B;function B(N,x,H){let U,$,V,v;return Array.isArray(N)?J(N):"tokenize"in N?J([N]):Y(N);function Y(ae){return Q;function Q(re){const oe=re!==null&&ae[re],ge=re!==null&&ae.null,Oe=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return J(Oe)(re)}}function J(ae){return U=ae,$=0,ae.length===0?H:P(ae[$])}function P(ae){return Q;function Q(re){return v=S(),V=ae,ae.partial||(l.currentConstruct=ae),ae.name&&l.parser.constructs.disable.null.includes(ae.name)?te():ae.tokenize.call(M?Object.assign(Object.create(l),M):l,u,ee,te)(re)}}function ee(ae){return I(V,v),x}function te(ae){return v.restore(),++$<U.length?P(U[$]):H}}}function A(I,M){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&rt(l.events,M,l.events.length-M,I.resolve(l.events.slice(M),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function S(){const I=y(),M=l.previous,B=l.currentConstruct,N=l.events.length,x=Array.from(o);return{from:N,restore:H};function H(){r=I,l.previous=M,l.currentConstruct=B,l.events.length=N,o=x,k()}}function k(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Xp(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function Kp(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
34
+ `);let p=0;for(const x of d){const h=r.measureText(x||" ").width||0;p=Math.max(p,h)}const E=Number.parseFloat(a.letterSpacing||""),c=Number.isFinite(E)?E:0;if(c>0){const x=d.reduce((h,m)=>h.length>=m.length?h:m,"");p+=c*Math.max(0,x.length-1)}return Math.ceil(p)}function zn(e,t){if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(r=>{if(r.dataset.variableRender==="antd-textarea")return;const i=r.innerText.replace(/\u200B/g,"").trim();if(i.length===0){const c=r.querySelector(".variable-info-icon");Array.from(r.childNodes).forEach(m=>{if(m.nodeType===Node.TEXT_NODE){r.removeChild(m);return}m.nodeType===Node.ELEMENT_NODE&&m.tagName==="BR"&&r.removeChild(m)});const x=document.createTextNode("​");c&&c.parentNode===r?r.insertBefore(x,c):r.firstChild?r.insertBefore(x,r.firstChild):r.appendChild(x),r.classList.add("show-placeholder");const h=r.dataset.placeholder||"";if(h){const b=(()=>{try{const O=ql(h,r);if(!O||!Number.isFinite(O)){const A=qn(h);return Math.max(0,A-22)}return O}catch{const O=qn(h);return Math.max(0,O-22)}})(),T=(()=>{if(!r.classList.contains("rte-variable-with-icon"))return 0;const O=r.querySelector(".variable-info-icon:not(.hidden)");if(!O)return 24;try{const A=window.getComputedStyle(O),v=Math.ceil(O.getBoundingClientRect().width||0)||16,k=Math.ceil(Number.parseFloat(A.right||"0"))||4;return Math.max(16,Math.min(120,v+k+2))}catch{return 24}})();T>0?r.style.setProperty("--rte-icon-pad-right",`${T}px`):r.style.removeProperty("--rte-icon-pad-right");const C=2,w=T>0?T:8,S=Math.max(24,Math.min(600,Math.ceil(b+8+w+C)));r.style.minWidth=`${S}px`}else r.style.minWidth=""}else r.classList.remove("show-placeholder"),r.style.minWidth="",r.style.removeProperty("--rte-icon-pad-right");const s=r.innerText||"",o=!!r.querySelector("br")||s.includes(`
35
+ `),u=r.offsetHeight>32,l=i.length>0&&(o||u);r.classList.toggle("rte-variable-multiline",l),r.classList.toggle("rte-variable-force-block",l);const d=r.closest(".rte-inline-group");d&&d.classList.toggle("rte-inline-group-force-block",l);const p=r.closest(".required-upload-group, .required-multi-first");p&&p.classList.toggle("rte-required-group-force-block",l);const E=p?p.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");E&&E!==p&&E.classList.toggle("rte-exclusion-force-block",l)})}function wr(e,t,n,r){if(!e.current)return;const a=h=>{h.classList.contains("rte-richtext-host-expanded")&&(h.style.setProperty("display","flex","important"),h.style.setProperty("flex-direction","column","important"),h.style.setProperty("flex","1 1 auto","important"),h.style.setProperty("min-height","0","important"),h.style.setProperty("width","100%","important"),h.style.setProperty("align-self","stretch","important"))},i=h=>{if(!h.closest('[data-rte-force-hidden="1"]')){if(h.classList.contains("rte-richtext-host-expanded")){a(h);return}if(h.classList.contains("required-upload-group")){h.style.setProperty("display","inline-flex","important");return}if(h.classList.contains("exclusion-wrapper")){h.classList.contains("rte-exclusion-force-block")?h.style.setProperty("display","block","important"):h.style.setProperty("display","inline-block","important");return}h.style.setProperty("display","inline-block","important")}},s=h=>{h.closest('[data-rte-force-hidden="1"]')||(h.style.display="none",h.style.setProperty("display","none","important"))},o=t.some(h=>h.exclusionGroup==="separator");if(o){const h=[];let m=[];for(const v of t){if(v.exclusionGroup==="separator"){m.length&&h.push(m),m=[];continue}!v.exclusionGroup||v.exclusionGroup==="separator"||(v.type==="upload"&&v.key?m.push({type:"upload",key:v.key}):(v.type==="video-url"||v.type==="video-upload")&&v.key?m.push({type:v.type,key:v.key}):(v.type==="variable"||v.type==="multi-variable"||v.type==="markdown"||v.type==="markdown-name"||v.type==="markdown-module")&&v.key?m.push({type:v.type==="multi-variable"?"multi-variable":"variable",key:v.key}):m.push({type:"other",nodeType:v.type}))}m.length&&h.push(m);const g=v=>{const k=t.find(N=>N.type==="upload"&&N.key===v);return k?typeof k.maxCount=="number"&&k.maxCount>1?k.maxCount:1:0},b=h.map(v=>{for(const k of v)if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const N=r?.[k.key];if(N?.status==="success"&&N.videoUrl||N?.status==="loading")return!0;if(k.type==="video-url"){const M=e.current.querySelector(`[data-type="variable"][data-node-type="video-url"][data-key="${k.key}"]`);if(M&&!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(k.type==="upload"){if(n[k.key]!==null&&n[k.key]!==void 0)return!0;const N=g(k.key);for(let M=0;M<N;M++){const R=`${k.key}-${M}`;if(n[R]!==null&&n[R]!==void 0)return!0}continue}if(k.type==="multi-variable"){const N=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`);for(const M of N){if(M.dataset.variableRender==="antd-textarea"){const R=M.dataset.value||"";let I=R;try{I=decodeURIComponent(R)}catch{I=R}if(I.trim().length>0)return!0;continue}if(!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(k.type==="variable"){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${k.key}"]`))return!0;const M=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);if(!M)continue;if(M.dataset.variableRender==="antd-textarea"){const R=M.dataset.value||"";let I=R;try{I=decodeURIComponent(R)}catch{I=R}if(I.trim().length>0)return!0}else if(!M.classList.contains("show-placeholder")&&M.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0;continue}}return!1}),T=b.some(Boolean),C=T?b.findIndex(Boolean):-1,w=v=>e.current.querySelector(`[data-type="video-url"][data-key="${v}"], [data-type="video-upload"][data-key="${v}"], [data-type="variable"][data-node-type="video-url"][data-key="${v}"]`),S=v=>{for(const k of h[v]||[])if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const N=w(k.key);N&&i(N.closest(".exclusion-wrapper")||N);continue}if(k.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${k.key}"], [data-type="upload"][data-key^="${k.key}-"]`).forEach(M=>i(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`).forEach(M=>{const R=M.closest(".exclusion-wrapper")||M;i(R)});continue}if(k.type==="variable"){const N=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);N&&i(N.closest(".exclusion-wrapper")||N),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${k.key}"]`).forEach(R=>{const I=R.closest(".exclusion-wrapper")||R.closest(".rte-markdown-module-container")||R;i(I)})}}},O=v=>{for(const k of h[v]||[])if(k.type!=="other"){if(k.type==="video-url"||k.type==="video-upload"){const N=w(k.key);N&&s(N.closest(".exclusion-wrapper")||N);continue}if(k.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${k.key}"], [data-type="upload"][data-key^="${k.key}-"]`).forEach(M=>s(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${k.key}"]`).forEach(M=>s(M.closest(".exclusion-wrapper")||M));continue}if(k.type==="variable"){const N=e.current.querySelector(`[data-type="variable"][data-key="${k.key}"]`);N&&s(N.closest(".exclusion-wrapper")||N),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${k.key}"]`).forEach(R=>{const I=R.closest(".exclusion-wrapper")||R.closest(".rte-markdown-module-container")||R;s(I)})}}};for(let v=0;v<h.length;v++)!T||v===C?S(v):O(v);e.current.querySelectorAll('[data-group="separator"]').forEach(v=>{v.closest('[data-rte-force-hidden="1"]')||(T?s(v):v.style.setProperty("display","inline-flex","important"))});return}const u=new Set,l={};for(const h of t)h.exclusionGroup&&h.exclusionGroup!=="separator"&&(u.add(h.exclusionGroup),l[h.exclusionGroup]||(l[h.exclusionGroup]=[]),l[h.exclusionGroup].push({type:h.type,key:h.key,exclusionGroup:h.exclusionGroup}));const d={};for(const h of u){d[h]=!1;for(const m of l[h])if((m.type==="video-url"||m.type==="video-upload")&&m.key){const g=r?.[m.key];if(g?.status==="success"&&g.videoUrl||g?.status==="loading"){d[h]=!0;break}if(m.type==="video-url"){const b=e.current.querySelector(`[data-type="variable"][data-node-type="video-url"][data-key="${m.key}"]`);if(b&&!b.classList.contains("show-placeholder")&&b.innerText.replace(/[\u200B\n]/g,"").trim().length>0){d[h]=!0;break}}}else if(m.type==="upload"&&m.key){if(n[m.key]!==null&&n[m.key]!==void 0){d[h]=!0;break}const g=t.find(b=>b.type==="upload"&&b.key===m.key);if(g&&typeof g.maxCount=="number")for(let b=0;b<g.maxCount;b++){const T=`${m.key}-${b}`;if(n[T]!==null&&n[T]!==void 0){d[h]=!0;break}}if(d[h])break}else if((m.type==="variable"||m.type==="multi-variable"||m.type==="markdown"||m.type==="markdown-name")&&m.key){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${m.key}"]`)){d[h]=!0;break}const b=m.type==="multi-variable"?e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${m.key}"]`):[e.current.querySelector(`[data-type="variable"][data-key="${m.key}"]`)].filter(Boolean);for(const T of b){if(T.dataset.variableRender==="antd-textarea"){const C=T.dataset.value||"";let w=C;try{w=decodeURIComponent(C)}catch{w=C}if(w.trim().length>0){d[h]=!0;break}continue}if(!T.classList.contains("show-placeholder")&&T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){d[h]=!0;break}}if(d[h])break}}const E=Object.keys(d).filter(h=>d[h]).length>0;let c=null;if(E&&o){for(const h of t)if(h.exclusionGroup&&h.exclusionGroup!=="separator"&&d[h.exclusionGroup]){c=h.exclusionGroup;break}}for(const h of u){const m=e.current.querySelectorAll(`[data-group="${h}"]`);o&&E&&c?h===c?m.forEach(i):m.forEach(s):m.forEach(i)}e.current.querySelectorAll('[data-group="separator"]').forEach(h=>{h.closest('[data-rte-force-hidden="1"]')||(E?s(h):h.style.setProperty("display","inline-flex","important"))})}function Nr(e,t,n,r,a){if(!e.current){r(!1);return}const i=h=>{const m=h.getAttribute("data-node-type")||"";if(m!=="report-module"&&m!=="markdown-module")return(h.textContent||"").replace(/[\u200B]/g,"").trim();const g=(h.textContent||"").replace(/[\u200B]/g,"").trim(),b=Array.from(h.querySelectorAll(":scope > div"));if(b.length===0)return g;let T=-1;for(let S=0;S<b.length;S++)if((b[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return b.filter((S,O)=>O!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
36
+ `).trim()||g},s=h=>h?!!h.closest('[data-rte-force-hidden="1"]'):!1,o=[];for(let h=0;h<t.length;h++){const m=t[h];if((m.type==="variable"||m.type==="report-url"||m.type==="markdown"||m.type==="markdown-name"||m.type==="upload"||m.type==="multi-variable"||m.type==="select"||m.type==="textarea"||m.type==="richtext"||m.type==="report-module"||m.type==="markdown-module"||m.type==="datepicker"||m.type==="number-input"||m.type==="video-url"||m.type==="video-upload")&&m.required&&m.key){o.push({exclusionGroup:m.exclusionGroup||"",key:m.key,type:m.type==="multi-variable"||m.type==="report-url"||m.type==="markdown"||m.type==="markdown-name"?"variable":m.type==="report-module"||m.type==="markdown-module"?"richtext":m.type==="video-url"?"video-url":m.type==="video-upload"?"video-upload":m.type,isMultiVariable:m.type==="multi-variable",minCount:m.type==="multi-variable"||m.type==="upload"&&typeof m.minCount=="number"?m.minCount:void 0,moduleIndex:m.type==="report-module"||m.type==="markdown-module"?m.moduleIndex:void 0,__index:h});continue}if(m.type==="text"&&m.className?.includes("rte-text-required"))if(m.exclusionGroup)for(let g=h+1;g<t.length;g++){const b=t[g];if(b.exclusionGroup===m.exclusionGroup&&(b.type==="variable"||b.type==="markdown"||b.type==="upload"||b.type==="select"||b.type==="textarea"||b.type==="richtext"||b.type==="datepicker"||b.type==="number-input")&&b.key){o.push({exclusionGroup:m.exclusionGroup,key:b.key,type:b.type==="markdown"?"variable":b.type,__index:g});break}}else for(let g=h+1;g<t.length;g++){const b=t[g];if((b.type==="variable"||b.type==="markdown"||b.type==="upload"||b.type==="select"||b.type==="textarea"||b.type==="richtext"||b.type==="datepicker"||b.type==="number-input")&&b.key){o.push({exclusionGroup:b.exclusionGroup||"",key:b.key,type:b.type==="markdown"?"variable":b.type,__index:g});break}}}const u=t.some(h=>h.exclusionGroup==="separator"),l=[];if(u&&o.length>1){const h=[];t.forEach((m,g)=>{m.exclusionGroup==="separator"&&h.push(g)});for(const m of h){const b=o.filter(w=>typeof w.__index=="number"&&w.__index<m).sort((w,S)=>(S.__index??0)-(w.__index??0))[0],C=o.filter(w=>typeof w.__index=="number"&&w.__index>m).sort((w,S)=>(w.__index??0)-(S.__index??0))[0];b&&C&&l.push([b,C])}}if(o.length===0){if(t.length===0){if(!e.current){r(!1);return}const h=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(h.length>0);return}r(!0);return}const d=o.filter(h=>{if(!e.current)return!1;if(h.exclusionGroup){const m=e.current.querySelectorAll(`[data-group="${h.exclusionGroup}"]`);if(m.length>0){const g=m[0];return s(g)?!0:g.style.display!=="none"}}if(h.type==="upload"&&h.key){const m=e.current.querySelector(`[data-type="upload"][data-key="${h.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="variable"&&h.key)if(h.isMultiVariable){const m=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${h.key}"]`);if(m.length>0){const g=m[0],b=g.closest("[data-group]")||g.parentElement;return s(b)?!0:b?b.style.display!=="none":!0}}else{const m=e.current.querySelector(`[data-type="variable"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="select"&&h.key){const m=e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="textarea"&&h.key){const m=e.current.querySelector(`[data-type="textarea"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="richtext"&&h.key){const m=typeof h.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]`:`[data-type="richtext"][data-key="${h.key}"]`,g=e.current.querySelector(m);if(g){const b=g.closest("[data-group]")||g.parentElement;return s(b)?!0:b?b.style.display!=="none":!0}}else if(h.type==="datepicker"&&h.key){const m=e.current.querySelector(`[data-type="datepicker"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if(h.type==="number-input"&&h.key){const m=e.current.querySelector(`[data-type="number-input"][data-key="${h.key}"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}else if((h.type==="video-url"||h.type==="video-upload")&&h.key){const m=e.current.querySelector(`[data-type="${h.type}"][data-key="${h.key}"], [data-type="variable"][data-key="${h.key}"][data-node-type="video-url"]`);if(m){const g=m.closest("[data-group]")||m.parentElement;return s(g)?!0:g?g.style.display!=="none":!0}}return!1});if(d.length===0){r(!0);return}const p=new Set;l.forEach(h=>{h.forEach(m=>{m.key&&p.add(m.key)})});const E=d.filter(h=>!h.key||!p.has(h.key));let c=(l.length===0,!0);for(const h of l){const m=h.filter(b=>{if(!e.current)return!1;if(b.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${b.exclusionGroup}"]`);if(T.length>0){const C=T[0];return s(C)?!0:C.style.display!=="none"}}return!0});if(m.length===0)continue;let g=!1;for(const b of m)if(b.type==="upload"&&b.key){if(b.minCount&&b.minCount>0){let T=0;const C=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${b.key}"]`);if(C.length===0)continue;for(let w=0;w<C.length;w++){const O=C[w].dataset.key;O&&n[O]!=null&&(T+=1)}if(T>=b.minCount){g=!0;break}}else if(n[b.key]!==null&&n[b.key]!==void 0){g=!0;break}}else if(b.type==="variable"&&b.key)if(b.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${b.key}"]`);let C=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(C+=1)}const w=b.minCount&&b.minCount>0?b.minCount:1;if(C>=w){g=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${b.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){const w=T.dataset.nodeType;if((w==="markdown"||w==="markdown-name")&&!!!e.current.querySelector(`[data-node-type="markdown-module"][data-key="${b.key}"]`))continue;g=!0;break}}}else if(b.type==="select"&&b.key){const T=e.current.querySelector(`[data-type="select"][data-key="${b.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){g=!0;break}}else if(b.type==="textarea"&&b.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${b.key}"]`);if(T&&(T.value||"").trim().length>0){g=!0;break}}else if(b.type==="richtext"&&b.key){const T=typeof b.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${b.key}"][data-module-index="${b.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${b.key}"][data-module-index="${b.moduleIndex}"]`:`[data-type="richtext"][data-key="${b.key}"]`,C=e.current.querySelector(T);if(C){if(C.getAttribute("data-is-placeholder")==="true")continue;if(i(C).length>0){g=!0;break}}}else if(b.type==="datepicker"&&b.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${b.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){g=!0;break}}else if(b.type==="number-input"&&b.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${b.key}"]`);if(T&&(T.value||"").trim().length>0){g=!0;break}}else if((b.type==="video-url"||b.type==="video-upload")&&b.key&&a?.[b.key]?.status==="success"){g=!0;break}if(!g){c=!1;break}}let x=!0;for(const h of E)if(h.type==="upload"&&h.key){if(h.minCount&&h.minCount>0){let m=0;const g=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${h.key}"]`);if(g.length===0){x=!1;break}for(let b=0;b<g.length;b++){const C=g[b].dataset.key;C&&n[C]!=null&&(m+=1)}if(m<h.minCount){x=!1;break}}else if(n[h.key]===null||n[h.key]===void 0){x=!1;break}}else if(h.type==="variable"&&h.key)if(h.isMultiVariable){const m=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${h.key}"]`);let g=0;for(const T of Array.from(m)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(g+=1)}const b=h.minCount&&h.minCount>0?h.minCount:1;if(g<b){x=!1;break}}else{const m=e.current.querySelector(`[data-type="variable"][data-key="${h.key}"]`);if(!m){x=!1;break}if(m.classList.contains("show-placeholder")){x=!1;break}if(m.innerText.replace(/[\u200B\n]/g,"").trim().length===0){x=!1;break}const b=m.dataset.nodeType;if((b==="markdown"||b==="markdown-name")&&!!!e.current.querySelector(`[data-node-type="markdown-module"][data-key="${h.key}"]`)){x=!1;break}}else if(h.type==="select"&&h.key){const m=e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);if(!m||(m.getAttribute("data-value")||"").trim().length===0){x=!1;break}}else if(h.type==="textarea"&&h.key){const m=e.current.querySelector(`[data-type="textarea"][data-key="${h.key}"]`);if(!m||(m.value||"").trim().length===0){x=!1;break}}else if(h.type==="richtext"&&h.key){const m=typeof h.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]`:`[data-type="richtext"][data-key="${h.key}"]`,g=e.current.querySelector(m);if(g&&g.getAttribute("data-is-placeholder")==="true"){x=!1;break}if(!g||i(g).length===0){x=!1;break}}else if(h.type==="datepicker"&&h.key){const m=e.current.querySelector(`[data-type="datepicker"][data-key="${h.key}"]`);if(!m||(m.getAttribute("data-value")||"").trim().length===0){x=!1;break}}else if(h.type==="number-input"&&h.key){const m=e.current.querySelector(`[data-type="number-input"][data-key="${h.key}"]`);if(!m||(m.value||"").trim().length===0){x=!1;break}}else if((h.type==="video-url"||h.type==="video-upload")&&h.key&&a?.[h.key]?.status!=="success"){x=!1;break}r(c&&x)}const zl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s,videoState:o})=>{L.useLayoutEffect(()=>{const u=r.current;if(!u)return;const l=new Map,d=c=>{const x=c.target,h=c.relatedTarget;!x||!r.current||!r.current.contains(x)||h&&r.current.contains(h)||setTimeout(()=>{if(r.current){if(e.length===0){const m=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(m.length>0);return}zn(r),wr(r,t,n,o),Nr(r,t,n,a,o)}},0)};u.addEventListener("blur",d,!0);const p=()=>{if(!r.current)return;l.forEach((h,m)=>{m.removeEventListener("blur",h,!1)}),l.clear();const c=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),x=h=>{h.stopPropagation(),h.stopImmediatePropagation();const m=h.target;if(!m||!r.current||!r.current.contains(m))return;const g=m.closest('[data-type="variable"][data-multi-key]');if(!g||!r.current.contains(g))return;let b=!1;if(l.forEach((k,N)=>{(N===g||N.contains(m))&&(b=!0)}),!b)return;const T=g.dataset.multiKey,C=g.dataset.key,w=g.dataset.index;if(!T||!C||w===void 0)return;const S=h.relatedTarget;if(!(!S||!r.current.contains(S)))return;const A=g.innerText.replace(/[\u200B\n]/g,"").trim(),v=/[、,,\s]+/;if(v.test(A)){const M=A.split(v).map(R=>R.trim()).filter(R=>R.length>0).slice(0,9);if(M.length>1){const R=e.find(I=>I.type==="multi-variable"&&I.key===T);if(R){const I=i[T]||1,y=parseInt(w,10),F=R.maxCount||9,U=[];for(let J=0;J<I;J++){const P=`${T}_${J}`,ee=r.current.querySelector(`[data-type="variable"][data-key="${P}"][data-multi-key="${T}"]`);if(ee){const te=ee.innerText.replace(/[\u200B\n]/g,"").trim();U.push(te)}}U.splice(y,1,...M);const $=U.slice(0,F);$.length>0&&$[$.length-1]!==""&&$.length<F&&$.push("");const V=Math.max($.length,1),_={};$.forEach((J,P)=>{J&&(_[`${T}_${P}`]=J)}),r.current.querySelectorAll('[data-type="variable"]').forEach(J=>{const P=J.dataset.key,ee=J.dataset.multiKey;if(P&&ee!==T){const te=J.innerText.replace(/[\u200B\n]/g,"").trim();te&&(_[P]=te)}}),r.current.__tempVariableValues=_,s(J=>({...J,[T]:V}))}}}};c.forEach(h=>{h.addEventListener("blur",x,!1),l.set(h,x)})},E=setTimeout(()=>{p()},0);return()=>{clearTimeout(E),u.removeEventListener("blur",d,!0),l.forEach((c,x)=>{x.removeEventListener("blur",c,!1)}),l.clear()}},[e,t,r,n,i,a,s])},Vl=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:o,onBeforeFilePickerOpen:u,files:l,setFiles:d,handleRemoveFile:p,setActiveBatchKey:E,setActiveBatchStartIndex:c,setActiveFileKey:x,isDraggingRef:h,richtextPrevScrollTopRef:m,videoState:g,setVideoState:b,videoFileInputRef:T,activeVideoKeyRef:C})=>{const w=(...O)=>{},S=O=>{try{const A=window.getSelection();if(!A)return w(O,"no selection");const v=A.rangeCount>0?A.getRangeAt(0):null;w(O,{rangeCount:A.rangeCount,isCollapsed:A.isCollapsed,anchorNode:A.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":A.anchorNode?.nodeName,anchorOffset:A.anchorOffset,focusNode:A.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":A.focusNode?.nodeName,focusOffset:A.focusOffset,range:v?{startContainer:v.startContainer.nodeType===Node.TEXT_NODE?"TEXT":v.startContainer.nodeName,startOffset:v.startOffset,endContainer:v.endContainer.nodeType===Node.TEXT_NODE?"TEXT":v.endContainer.nodeName,endOffset:v.endOffset}:null})}catch{}};return L.useCallback(O=>{if(e)return;t&&n?.(!1);const A=O.target;if(w("click",{tag:A.tagName,cls:A.className}),S("before click"),A.closest('[data-type="datepicker"]'))return;if(A.closest(".tag-close-btn")){O.preventDefault(),O.stopPropagation();return}if(r.length===0)return;const N=(_,Y)=>{if(!i.current)return;Array.from(i.current.children).forEach(P=>{if(P!==_)if(Y)P.dataset.prevDisplay===void 0&&(P.dataset.prevDisplay=P.style.display||""),P.dataset.rteForceHidden="1",P.style.setProperty("display","none","important");else{if(P.dataset.prevDisplay!==void 0){const ee=P.dataset.prevDisplay;ee?P.style.display=ee:P.style.removeProperty("display"),delete P.dataset.prevDisplay}else P.style.removeProperty("display");delete P.dataset.rteForceHidden}})},M=A.closest(".rte-textarea-toggle");if(M){O.preventDefault(),O.stopPropagation();const _=M.closest(".rte-textarea-wrapper"),Y=_?.querySelector('[data-type="textarea"]'),P=!(M.getAttribute("data-expanded")==="true");M.setAttribute("data-expanded",String(P)),M.textContent=P?"收起":"展开",_&&_.classList.toggle("rte-textarea-expanded",P);const ee=_?.closest(".rte-textarea-required");if(ee?ee.classList.toggle("rte-textarea-overlay",P):_&&_.classList.toggle("rte-textarea-overlay",P),Y)if(P)Y.classList.add("rte-textarea-expanded"),Y.style.maxHeight="none",Y.style.height="100%";else{Y.classList.remove("rte-textarea-expanded");const te=Y.dataset.maxHeight||"252";Y.style.maxHeight=`${te}px`,Y.style.height="auto"}i.current&&(P?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const R=A.closest(".rte-richtext-toggle");if(R){O.preventDefault(),O.stopPropagation();const _=R.closest(".rte-richtext-wrapper"),Y=_?.querySelector('[data-type="richtext"]'),P=!(R.getAttribute("data-expanded")==="true");((Q,re)=>{Q.setAttribute("data-expanded",String(re)),Q.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})(R,P);const te=_?.closest(".rte-richtext-required");te?te.classList.toggle("rte-richtext-expanded",P):_&&_.classList.toggle("rte-richtext-expanded",P);const ae=_?.closest(".exclusion-wrapper")||_?.parentElement;if(Y&&(P?(Y.style.height="100%",Y.style.overflow="auto"):(Y.style.height="",Y.style.overflow="")),ae&&(ae.classList.toggle("rte-richtext-host-expanded",P),N(ae,P)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",P),s.current?.classList.toggle("rte-richtext-container-expanded",P),s.current)if(P){const Q=Math.ceil(s.current.getBoundingClientRect().height||0);Q>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${Q}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if(P)m.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const Q=m.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=Q)},0)}}return}if(A.closest('[data-type="text"]')){O.preventDefault(),O.stopPropagation();const _=window.getSelection();_&&_.removeAllRanges();return}if(a&&A.closest(".tag-node")){O.preventDefault(),O.stopPropagation();const Y=window.getSelection();Y&&Y.removeAllRanges();return}const y=A.closest('[data-type="variable"]');if(y){if(h.current)return;if(y.dataset.variableRender!=="antd-textarea"){const _=!!A.closest(".variable-info-icon"),Y=y.classList.contains("show-placeholder")||(y.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(w("v1 variable click",{key:y.dataset.key,isPlaceholder:Y,isOnIcon:_,classes:y.className,innerText:y.innerText}),Y&&!_){O.preventDefault();const J=()=>{try{y.focus();const P=window.getSelection();if(!P)return;const ee=document.createTreeWalker(y,NodeFilter.SHOW_TEXT),te=ee.nextNode()?ee.currentNode:null,ae=document.createRange();te?(ae.setStart(te,0),ae.collapse(!0)):(ae.selectNodeContents(y),ae.collapse(!0)),P.removeAllRanges(),P.addRange(ae),S("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(J),window.requestAnimationFrame(()=>S("post-raf (click)"))},0)}}setTimeout(()=>{const _=window.getSelection();_&&!_.isCollapsed||zn(i)},10);return}const F=A.closest(".video-remove-btn");if(F){O.preventDefault(),O.stopPropagation();const Y=F.closest('[data-type="video-url"], [data-type="video-upload"]')?.dataset.key;Y&&b&&b(J=>{const P={...J};return delete P[Y],P});return}const U=A.closest('[data-type="video-upload"]');if(U){O.preventDefault(),O.stopPropagation();const _=U.dataset.key;_&&T?.current&&C&&(C.current=_,T.current.value="",T.current.click());return}const $=A.closest(".file-remove-btn");if($){O.preventDefault(),O.stopPropagation();const _=$.closest('[data-type="upload"]'),Y=_?.dataset.key,J=_?.dataset.batchKey;if(Y)if(J){const P=r.find(ee=>ee.type==="upload"&&ee.key===J);if(P&&typeof P.maxCount=="number"&&typeof P.minCount=="number"){const ee=P.maxCount;d(te=>{const ae={...te},Q=[];for(let re=0;re<ee;re++){const oe=`${J}-${re}`,ge=ae[oe];ge!=null&&oe!==Y&&Q.push(ge)}for(let re=0;re<ee;re++)delete ae[`${J}-${re}`];return Q.forEach((re,oe)=>{ae[`${J}-${oe}`]=re}),ae})}else p(Y)}else p(Y);return}const V=A.closest('[data-type="upload"]');if(V){const _=V.dataset.key,Y=V.dataset.batchKey,J=V.dataset.batchIndex;if(_){const P=Y||_,ee=r.find(te=>te.type==="upload"&&te.key===P);if(o.current&&(ee?.accept?o.current.accept=ee.accept:ee?.acceptType==="image"?o.current.accept="image/*":ee?.acceptType==="file"?o.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":o.current.accept=""),Y){const te=r.find(ae=>ae.type==="upload"&&ae.key===Y);if(te&&typeof te.maxCount=="number"&&typeof te.minCount=="number"){const ae=te.maxCount,Q=l[_]!=null,re=J!=null?Number.parseInt(J,10):NaN;if(Q){o.current&&(o.current.multiple=!1),E(null),c(null),x(_),u?.(),o.current?.click();return}let oe=0;for(let ge=0;ge<ae;ge++)l[`${Y}-${ge}`]!=null&&(oe+=1);oe<ae&&o.current?(o.current.multiple=!0,E(Y),c(Number.isFinite(re)?re:null),x(null),u?.(),o.current.click()):(o.current&&(o.current.multiple=!1),E(null),c(null),x(_),u?.(),o.current?.click())}else o.current&&(o.current.multiple=!1),E(null),c(null),x(_),u?.(),o.current?.click()}else o.current&&(o.current.multiple=!1),E(null),c(null),x(_),u?.(),o.current?.click()}return}},[t,r,s,e,i,o,u,l,p,h,a,n,m,E,c,x,d,b,T,C])},Gl=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:o,measureExpandedContentHeight:u,effectiveConfig:l,files:d,multiVariableCounts:p,setMultiVariableCounts:E,savedCursorRef:c,videoState:x})=>L.useCallback(()=>{if(e.length===0){if(t.current){const g=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(g),r(!g)}return}if(zn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||a(C=>{const w=C[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?C:{...C,[b]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||i(C=>{const w=C[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?C:{...C,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(g=>{const b=g.dataset.key;if(!b)return;g.innerText.replace(/[\u200B\n]/g,"").trim()||s(C=>{const w=C[b];return!w||w.status==="idle"&&(!w.modules||w.modules.length===0)?C:{...C,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(g=>{const b=g.dataset.key;if(!b)return;const T=g.innerText.replace(/[\u200B\n]/g,"").trim();g.getAttribute("data-is-placeholder")==="true"&&T&&!T.startsWith("请补充:")&&g.removeAttribute("data-is-placeholder"),T||(i(C=>{const w=C[b];return!w||w.status==="idle"?C:{...C,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(C=>{const w=C[b];return!w||w.status==="idle"?C:{...C,[b]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(g=>{if(g.dataset.variableRender==="antd-textarea")return;const b=g.innerText||"",T=!!g.querySelector("br")||b.includes(`
37
+ `),C=g.offsetHeight>32,S=b.replace(/\u200B/g,"").trim().length>0&&(T||C);g.classList.toggle("rte-variable-multiline",S),g.classList.toggle("rte-variable-force-block",S);const O=g.closest(".rte-inline-group");O&&O.classList.toggle("rte-inline-group-force-block",S);const A=g.closest(".required-upload-group, .required-multi-first");A&&A.classList.toggle("rte-required-group-force-block",S);const v=g.querySelector(".variable-info-icon");if(v){let k=!1;const N=document.createTreeWalker(g,NodeFilter.SHOW_TEXT,{acceptNode:M=>v.contains(M)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;N.nextNode();)if(N.currentNode.textContent?.replace(/[\u200B\n]/g,"").trim()){k=!0;break}k?v.classList.add("hidden"):v.classList.remove("hidden"),g.classList.toggle("rte-variable-with-icon",!v.classList.contains("hidden"))}}),o||window.requestAnimationFrame(()=>{u()}),wr(t,l,d,x),Nr(t,l,d,r,x),!t.current)return;e.filter(m=>m.type==="multi-variable"&&m.key).forEach(m=>{if(!m.key)return;const g=m.maxCount||9,b=p[m.key]||1,T=[];for(let A=0;A<b;A++){const v=`${m.key}_${A}`,k=t.current.querySelector(`[data-type="variable"][data-key="${v}"][data-multi-key="${m.key}"]`);if(k){const N=(k.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
38
+ `).trim();T.push(N)}}const w=(T[T.length-1]||"")==="";let S=!1,O=-1;for(let A=0;A<T.length-1;A++)if(T[A]===""){S=!0,O=A;break}if(S&&O>=0){const A=window.getSelection();if(A&&A.rangeCount>0){const R=A.getRangeAt(0),I=R.startContainer,y=I.nodeType===Node.ELEMENT_NODE?I.closest('[data-type="variable"][data-multi-key]'):I.parentElement?.closest('[data-type="variable"][data-multi-key]');if(y){const F=y.dataset.key;if(F){const U=document.createRange();U.setStartBefore(y),U.setEnd(R.startContainer,R.startOffset);const $=U.toString().length;c.current={key:F,offset:$}}}}const v=[...T];for(let R=O;R<v.length-1;R++)v[R]=v[R+1];v.pop();const k={};v.forEach((R,I)=>{R&&(k[`${m.key}_${I}`]=R)});const N=Math.max(w?v.length:v.length+1,1);t.current.querySelectorAll('[data-type="variable"]').forEach(R=>{const I=R.dataset.key,y=R.dataset.multiKey;if(I&&y!==m.key){const F=(R.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
39
+ `).trim();F&&(k[I]=F)}}),t.current.__tempVariableValues=k,E(R=>({...R,[m.key]:N}));return}if(!w){const A=b-1,v=`${m.key}_${A}`,k=t.current.querySelector(`[data-type="variable"][data-key="${v}"][data-multi-key="${m.key}"]`);if(k&&(k.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
40
+ `).trim().length>0&&b<g){const M=window.getSelection();if(M&&M.rangeCount>0){const R=M.getRangeAt(0),I=R.startContainer,y=I.nodeType===Node.ELEMENT_NODE?I.closest('[data-type="variable"][data-multi-key]'):I.parentElement?.closest('[data-type="variable"][data-multi-key]');if(y){const F=y.dataset.key;if(F){const U=document.createRange();U.setStartBefore(y),U.setEnd(R.startContainer,R.startOffset);const $=U.toString().length;c.current={key:F,offset:$}}}}E(R=>({...R,[m.key]:b+1}))}}})},[o,e,t,l,d,u,p,c,n,r,i,s,E,a]),Yl=({disabled:e,lockStructure:t,config:n,editorRef:r,handleInput:a})=>L.useCallback(i=>{if(e){i.preventDefault();return}const s=i.target;if(s&&(s.tagName==="TEXTAREA"||s.tagName==="INPUT")&&s.closest?.('[data-variable-render="antd-textarea"]'))return;if(i.key==="Enter"){const u=i.target,l=u?.closest?.('[data-type="variable"]'),d=!!u?.closest?.('[data-type="richtext"]'),p=u?.tagName==="TEXTAREA"||!!u?.closest?.('[data-type="textarea"]');if(l){const E=l.getAttribute("data-node-type")||"";if(E==="report-url"||E==="markdown"||E==="markdown-name"){i.preventDefault();return}if(!(()=>{const h=l.dataset.multiKey;if(h)return n.find(T=>T.type==="multi-variable"&&T.key===h)?.allowNewline!==!1;const m=l.dataset.key;return n.find(b=>b.type==="variable"&&b.key===m)?.allowNewline!==!1})()){i.preventDefault();return}i.preventDefault();const x=window.getSelection();if(x&&x.rangeCount>0){const h=x.getRangeAt(0);h.deleteContents();const m=document.createElement("br");h.insertNode(m);const g=document.createTextNode("​");m.parentNode?.insertBefore(g,m.nextSibling),h.setStart(g,0),h.collapse(!0),x.removeAllRanges(),x.addRange(h)}a();return}if(!d&&!p){i.preventDefault();return}}const o=window.getSelection();if(o&&o.rangeCount>0){const u=o.anchorNode;let l=null;if(u&&(u.nodeType===Node.ELEMENT_NODE?l=u.closest('[data-type="text"]'):u.nodeType===Node.TEXT_NODE&&u.parentElement&&(l=u.parentElement.closest('[data-type="text"]'))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const d=r.current.querySelector('[data-type="variable"], [data-type="upload"]');d&&d.focus()}return}}if(t&&o&&o.rangeCount>0){const u=o.anchorNode;let l=null;if(u&&(u.nodeType===Node.ELEMENT_NODE?l=u.closest(".tag-node"):u.nodeType===Node.TEXT_NODE&&u.parentElement&&(l=u.parentElement.closest(".tag-node"))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const d=r.current.querySelector('[data-type="variable"], [data-type="upload"]');d&&d.focus()}return}}if(i.key==="Escape"&&r.current){if(t){i.preventDefault();return}r.current.innerHTML="",r.current.focus()}if(i.key==="Backspace"){const u=window.getSelection();if(u&&u.rangeCount>0){const l=u.getRangeAt(0),d=u.anchorNode;if(t){let E=null,c=null;if(d&&(d.nodeType===Node.ELEMENT_NODE?(E=d.closest(".tag-node"),c=d.closest('[data-type="text"]')):d.nodeType===Node.TEXT_NODE&&d.parentElement&&(E=d.parentElement.closest(".tag-node"),c=d.parentElement.closest('[data-type="text"]'))),(E||c)&&l.collapsed&&l.startOffset===0){i.preventDefault();return}}let p=null;if(d&&(d.nodeType===Node.ELEMENT_NODE?p=d.closest('[data-type="variable"]'):d.nodeType===Node.TEXT_NODE&&d.parentElement&&(p=d.parentElement.closest('[data-type="variable"]'))),p){if(!l.collapsed)return;const E=p.innerText;if(E==="​"||E===""){i.preventDefault();return}if((()=>{try{const h=document.createRange();h.selectNodeContents(p),h.setEnd(l.startContainer,l.startOffset);const m=h.cloneContents(),g=document.createTreeWalker(m,NodeFilter.SHOW_ALL);for(;g.nextNode();){const b=g.currentNode;if(b.nodeType===Node.ELEMENT_NODE){if(b.tagName==="BR")return!1}else if(b.nodeType===Node.TEXT_NODE&&(b.textContent||"").replace(/\u200B/g,"").trim().length>0)return!1}return!0}catch{return l.startOffset===0}})()){i.preventDefault();return}if(E.startsWith("​")&&l.startOffset===1){i.preventDefault();return}}}}},[n,e,r,a,t]),Wl=({lockStructure:e,onAgentExit:t,editorRef:n,setPopoverVisible:r,isDraggingRef:a,mouseDownPosRef:i})=>{const s=(...E)=>{},o=E=>{try{const c=window.getSelection();if(!c)return s(E,"no selection");const x=c.rangeCount>0?c.getRangeAt(0):null;s(E,{rangeCount:c.rangeCount,isCollapsed:c.isCollapsed,anchorNode:c.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":c.anchorNode?.nodeName,anchorOffset:c.anchorOffset,focusNode:c.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":c.focusNode?.nodeName,focusOffset:c.focusOffset,range:x?{startContainer:x.startContainer.nodeType===Node.TEXT_NODE?"TEXT":x.startContainer.nodeName,startOffset:x.startOffset,endContainer:x.endContainer.nodeType===Node.TEXT_NODE?"TEXT":x.endContainer.nodeName,endOffset:x.endOffset}:null})}catch{}},u=L.useCallback(E=>{const c=E.target;if(s("mousedown",{tag:c.tagName,cls:c.className}),o("before mousedown"),c.closest(".rte-datepicker-wrapper")||c.closest(".rte-datepicker-host")||c.closest(".rte-select-wrapper")||c.closest(".rte-select-host")||c.closest(".ant-select-dropdown"))return;if(c.closest(".tag-close-btn")){if(E.preventDefault(),E.stopPropagation(),e)return;r(null),t?t():n.current&&(n.current.innerHTML="",n.current.focus());return}if(e){const m=c.closest(".tag-node"),g=c.closest('[data-type="text"]');if(m||g){E.preventDefault(),E.stopPropagation();const b=window.getSelection();b&&b.removeAllRanges();return}}const h=c.closest('[data-type="variable"]');if(h){if(s("mousedown on variable",{key:h.dataset.key,multiKey:h.dataset.multiKey,nodeType:h.getAttribute("data-node-type")||"",render:h.dataset.variableRender||"v1",classes:h.className}),h.dataset.variableRender==="antd-textarea")return;const m=!!c.closest(".variable-info-icon"),g=h.classList.contains("show-placeholder")||(h.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(s("v1 variable mousedown",{isPlaceholder:g,isOnIcon:m,innerText:h.innerText}),g&&!m){E.preventDefault(),window.requestAnimationFrame(()=>{o("raf before setRange (mousedown)");const b=window.getSelection();if(!b)return;const T=h;T.focus();const C=document.createTreeWalker(T,NodeFilter.SHOW_TEXT),w=C.nextNode()?C.currentNode:null,S=document.createRange();w?(S.setStart(w,0),S.collapse(!0)):(S.selectNodeContents(T),S.collapse(!0)),b.removeAllRanges(),b.addRange(S),o("raf after setRange (mousedown)")});return}return}i.current={x:E.clientX,y:E.clientY},a.current=!1,c.closest(".file-remove-btn")&&(E.preventDefault(),E.stopPropagation())},[n,a,e,i,t,r]),l=L.useCallback(E=>{if(!E.target.closest('[data-type="variable"]')&&i.current){const h=Math.abs(E.clientX-i.current.x),m=Math.abs(E.clientY-i.current.y);(h>3||m>3)&&(a.current=!0)}},[a,i]),d=L.useCallback(E=>{const c=E.target;s("mouseup",{tag:c.tagName,cls:c.className}),o("before mouseup");const x=c.closest('[data-type="variable"]');if(x){if(x.dataset.variableRender!=="antd-textarea"){const h=!!c.closest(".variable-info-icon"),m=x.classList.contains("show-placeholder")||(x.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;s("v1 variable mouseup",{key:x.dataset.key,isPlaceholder:m,isOnIcon:h,classes:x.className}),m&&!h&&(E.preventDefault(),window.requestAnimationFrame(()=>{o("raf before setRange (mouseup)");const g=window.getSelection();if(!g)return;const b=x;b.focus();const T=document.createTreeWalker(b,NodeFilter.SHOW_TEXT),C=T.nextNode()?T.currentNode:null,w=document.createRange();C?(w.setStart(C,0),w.collapse(!0)):(w.selectNodeContents(b),w.collapse(!0)),g.removeAllRanges(),g.addRange(w),o("raf after setRange (mouseup)")}))}i.current=null,a.current=!1;return}i.current=null,a.current=!1},[a,i]),p=L.useCallback(E=>{const x=E.target.closest('[data-type="variable"]');if(x){const h=window.getSelection();if(h){const m=document.createRange(),g=x.textContent||"";if(g.replace(/\u200B/g,"")){let T=0,C=g.length;g.startsWith("​")&&(T=1),g.endsWith("​")&&g.length>1&&(C=g.length-1);const w=x.firstChild;w&&w.nodeType===Node.TEXT_NODE?(m.setStart(w,T),m.setEnd(w,C)):m.selectNodeContents(x)}else m.selectNodeContents(x),m.collapse(!0);h.removeAllRanges(),h.addRange(m)}}},[]);return{handleMouseDown:u,handleMouseMove:l,handleMouseUp:d,handleDoubleClick:p}},jl=({disabled:e,config:t,multiVariableCounts:n,setMultiVariableCounts:r,editorRef:a,handleInput:i,markdownAnalyzeRef:s,reportAnalyzeRef:o,markdownNameAnalyzeRef:u,markdownAnalyzeStateRef:l,markdownRawTextRef:d,setMarkdownAnalyzeState:p})=>L.useCallback(E=>{const c=E.target;if(c&&(c.tagName==="TEXTAREA"||c.tagName==="INPUT")&&c.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){E.preventDefault();return}E.preventDefault();const h=(E.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
41
+ `).replace(/\n+$/g,""),m=window.getSelection();if(m&&m.rangeCount>0){const C=m.anchorNode;if(C){let w=null;if(C.nodeType===Node.ELEMENT_NODE?w=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(w=C.parentElement.closest('[data-type="variable"]')),w){const S=w.dataset.multiKey;if(S){const v=/[、,,\s\n\r\t]+/,k=h.split(v).map(N=>N.trim()).filter(N=>N.length>0);if(k.length>1){const N=parseInt(w.dataset.index||"0",10),M=t.find(Y=>Y.type==="multi-variable"&&Y.key===S)?.maxCount||9,R=n[S]||1,I=Math.min(N+k.length,M);I>R&&r(_=>({..._,[S]:I}));const y=[];for(let _=0;_<R;_++){const Y=`${S}_${_}`,J=a.current.querySelector(`[data-type="variable"][data-key="${Y}"][data-multi-key="${S}"]`);if(J){const P=J.innerText.replace(/[\u200B\n]/g,"").trim();y.push(P)}}y.splice(N,1,...k.slice(0,M-N));const F=y.slice(0,M);F.length>0&&F[F.length-1]!==""&&F.length<M&&F.push("");const U=Math.max(F.length,1),$={};F.forEach((_,Y)=>{_&&($[`${S}_${Y}`]=_)}),a.current.querySelectorAll('[data-type="variable"]').forEach(_=>{const Y=_.dataset.key,J=_.dataset.multiKey;if(Y&&J!==S){const P=_.innerText.replace(/[\u200B\n]/g,"").trim();P&&($[Y]=P)}}),a.current.__tempVariableValues=$,r(_=>({..._,[S]:U}));return}}const O=w.getAttribute("data-node-type")||"";if(!(O==="markdown"||O==="report-url"||O==="markdown-name")){const v=(()=>{const N=w.getAttribute("data-node-type")||"";if(N==="report-url"||N==="markdown"||N==="markdown-name")return!1;const M=w.dataset.multiKey;if(M)return t.find(F=>F.type==="multi-variable"&&F.key===M)?.allowNewline!==!1;const R=w.dataset.key;return t.find(y=>y.type==="variable"&&y.key===R)?.allowNewline!==!1})(),k=window.getSelection();if(k&&k.rangeCount>0){const N=k.getRangeAt(0);N.deleteContents();const M=document.createDocumentFragment(),I=(v?h:h.replace(/\n+/g," ")).split(`
42
+ `);for(let F=0;F<I.length;F++)M.appendChild(document.createTextNode(I[F])),v&&F<I.length-1&&M.appendChild(document.createElement("br"));N.insertNode(M),k.removeAllRanges();const y=document.createRange();y.selectNodeContents(w),y.collapse(!1),k.addRange(y)}i();return}}}}let g=!1,b="";const T=window.getSelection();if(T&&T.rangeCount>0){const C=T.anchorNode;if(C){let w=null;if(C.nodeType===Node.ELEMENT_NODE?w=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(w=C.parentElement.closest('[data-type="variable"]')),w){const S=w.getAttribute("data-node-type")||"",O=w.dataset.key;if(S==="markdown"&&O&&/20\d{2}-\d{2}-\d{2}/.test(h))g=!0,b=O,d.current[O]=h,p(A=>({...A,[O]:{...A[O],status:"loading",error:void 0}}));else if(S==="report-url"&&O){document.execCommand("insertText",!1,h),i(),setTimeout(()=>{const A=w.innerText.replace(/[\u200B\n]/g,"").trim();o.current(O,A)},0);return}else if(S==="markdown-name"&&O){document.execCommand("insertText",!1,h),i(),setTimeout(()=>{const A=w.innerText.replace(/[\u200B\n]/g,"").trim();u.current(O,A)},0);return}}}}if(g&&b){setTimeout(()=>{s.current(b,h)},0);return}document.execCommand("insertText",!1,h),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(h)&&l.current.tableData?.status==="success"&&(p(w=>({...w,tableData:{status:"loading",modules:[],lastParsedText:h,error:void 0}})),setTimeout(()=>{d.current.tableData=h,s.current("tableData",h)},0))},0)},[t,e,a,i,s,l,d,n,o,p,r]);async function wi(e){const t=e.split("/").pop()?.split("?")[0]||"file",n=decodeURIComponent(t),r=async a=>{const i=await a.blob();return new File([i],n,{type:i.type||"application/octet-stream"})};try{const a=`/api/image-proxy?url=${encodeURIComponent(e)}`,i=await fetch(a);if(i.ok)return r(i)}catch{}return null}const Xl=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:o,markdownAnalyzeState:u,markdownNameAnalyzeState:l,videoState:d})=>L.useCallback(()=>{if(r||a||i||!s||!o.current)return;if(e.length===0){const m=o.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!m)return;if(n(m,m),o.current){o.current.textContent="";const g=new Event("input",{bubbles:!0});o.current.dispatchEvent(g)}return}const p=o.current;let E="";const c={},x=m=>{if(!(m.nodeType===Node.ELEMENT_NODE&&m.style.display==="none")){if(m.nodeType===Node.TEXT_NODE)E+=(m.textContent||"").replace(/\u200B/g,"");else if(m.nodeType===Node.ELEMENT_NODE){const g=m,b=g.dataset.type,T=g.dataset.key;if(b==="variable"&&T){let C="";const w=document.createTreeWalker(g,NodeFilter.SHOW_TEXT,{acceptNode:O=>{const A=g.querySelector(".variable-info-icon");return A&&A.contains(O)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;w.nextNode();)C+=w.currentNode.textContent||"";const S=C.replace(/[\u200B\n]/g,"").trim();if(S){const O=g.dataset.multiKey;if(O){(!c[O]||!Array.isArray(c[O]))&&(c[O]=[]);const A=c[O];A.push(S),A.length>1&&(E+=" "),E+=S}else c[T]=S,E+=S;if(g.dataset.nodeType==="report-url")if(c.url===void 0)c.url=S;else{const A=c.url;Array.isArray(A)?A.push(S):c.url=[String(A),S]}if(g.dataset.nodeType==="markdown-name"){const A=`${T}__sourceText`;c[A]===void 0&&(c[A]=S)}if(g.dataset.nodeType==="markdown"){const A=g.dataset.sourceTextKey||`${T}__sourceText`;if(c[A]===void 0)c[A]=S;else{const k=c[A];Array.isArray(k)?k.push(S):c[A]=[String(k),S]}const v=`${T}__markdown`;c[v]===void 0&&(c[v]=[vi(S)])}}}else if((b==="select"||b==="searchable-select")&&T){const C=(g.getAttribute("data-value")||"").trim();C&&(c[T]=C,E+=C)}else if(b==="textarea"&&T){const w=(g.value||"").replace(/\u200B/g,"").trim();w&&(c[T]=w,E+=w)}else if(b==="richtext"&&T){const C=g,w=C.dataset.nodeType,S=(C.textContent||"").replace(/\u200B/g,"").trim();if(S)if(w==="report-module"||w==="markdown-module"){(!c[T]||!Array.isArray(c[T]))&&(c[T]=[]);const O=c[T];O.push(S),O.length>1&&(E+=" "),E+=S}else c[T]=S,E+=S}else if(b==="datepicker"&&T){const w=(g.getAttribute("data-value")||"").trim();if(w)if(w.includes(",")){const S=w.split(",");S.length===2?(c[T]=S,E+=`[${S[0]}, ${S[1]}]`):(c[T]=w,E+=w)}else c[T]=w,E+=w}else if(b==="number-input"&&T){const w=(g.value||"").trim();w&&(c[T]=w,E+=w)}else if(b==="upload"&&T){const C=g.dataset.batchKey;if(C){const w=e.find(S=>S.type==="upload"&&S.key===C);if(w&&typeof w.maxCount=="number"&&typeof w.minCount=="number"){const S=[];for(let O=0;O<w.maxCount;O++){const A=`${C}-${O}`,v=t[A];v&&S.push(v)}c[C]||(c[C]=S.length>0?S:null,S.length>0&&(E+=` [附带${S.length}个文件: ${S.map(O=>typeof O=="string"?O.split("/").pop()||"file":O.name).join(", ")}] `))}else if(c[T]=t[T]??null,t[T]){const S=t[T];E+=` [附带文件: ${typeof S=="string"?S.split("/").pop()||"file":S.name}] `}}else if(c[T]=t[T]??null,t[T]){const w=t[T];E+=` [附带文件: ${typeof w=="string"?w.split("/").pop()||"file":w.name}] `}}else if((b==="video-url"||b==="video-upload")&&T){const C=d?.[T];if(C?.status==="success"&&C.videoUrl){c[T]=C.videoUrl,C.file&&(c[`${T}__file`]=C.file);const w=C.fileName||"视频";E+=` [附带视频: ${w}] `}}else{if(g.classList.contains("tag-close-btn")||g.classList.contains("file-remove-btn")||g.classList.contains("video-remove-btn"))return;g.getAttribute("contenteditable")==="false"&&!b&&g.classList.contains("tag-node")?E+=g.innerText:g.childNodes.forEach(x)}}}};if(p.childNodes.forEach(x),E=E.trim(),!E)return;Object.keys(u).forEach(m=>{const g=u[m];if(!g||!g.modules||g.modules.length===0)return;const b=g.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);b.length!==0&&(c[`${m}__markdown`]=b)}),Object.keys(l).forEach(m=>{const g=l[m];if(!g||!g.modules||g.modules.length===0)return;const b=g.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);b.length!==0&&(c[`${m}__markdown`]=b)}),(async()=>{for(const g of Object.keys(c)){const b=c[g];if(typeof b=="string"&&b.startsWith("http")){if(e.find(C=>C.type==="upload"&&C.key===g)){const C=await wi(b);C&&(c[g]=C)}}else if(Array.isArray(b)&&e.find(C=>C.type==="upload"&&C.key===g)){for(let C=0;C<b.length;C++)if(typeof b[C]=="string"&&b[C].startsWith("http")){const w=await wi(b[C]);w&&(b[C]=w)}}}const m=new FormData;m.append("fullPrompt",E),Object.keys(c).forEach(g=>{const b=c[g];if(b!=null)if(b instanceof File)m.append(g,b);else if(Array.isArray(b)){const T=e.some(O=>O.type==="multi-variable"&&O.key===g),C=e.some(O=>O.type==="report-url"&&O.key===g),w=g.endsWith("__markdown");T||C||w||g==="url"?b.forEach(O=>{O!=null&&O!==""&&m.append(g,String(O))}):b.forEach((O,A)=>{O!=null&&(O instanceof File?m.append(`${g}[${A}]`,O):typeof O=="string"?m.append(`${g}[${A}]`,O):m.append(`${g}[${A}]`,String(O)))})}else typeof b=="string"?m.append(g,b):m.append(g,String(b))}),n(m,E)})()},[e,t,n,r,a,i,s,o,u,l,d]);function Ni(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Ir(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Ni(t[r])&&Ni(e[r])&&Object.keys(t[r]).length>0&&Ir(e[r],t[r])})}const Ii={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function _t(){const e=typeof document<"u"?document:{};return Ir(e,Ii),e}const Kl={document:Ii,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Fe(){const e=typeof window<"u"?window:{};return Ir(e,Kl),e}function Ql(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function Jl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Li(e,t=0){return setTimeout(e,t)}function Vn(){return Date.now()}function Zl(e){const t=Fe();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function ec(e,t="x"){const n=Fe();let r,a,i;const s=Zl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(o=>o.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix(a==="none"?"":a)):(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?a=i.m41:r.length===16?a=parseFloat(r[12]):a=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?a=i.m42:r.length===16?a=parseFloat(r[13]):a=parseFloat(r[5])),a||0}function Gn(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function tc(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Ge(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let r=1;r<e.length;r+=1){const a=e[r];if(a!=null&&!tc(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,o=i.length;s<o;s+=1){const u=i[s],l=Object.getOwnPropertyDescriptor(a,u);l!==void 0&&l.enumerable&&(Gn(t[u])&&Gn(a[u])?a[u].__swiper__?t[u]=a[u]:Ge(t[u],a[u]):!Gn(t[u])&&Gn(a[u])?(t[u]={},a[u].__swiper__?t[u]=a[u]:Ge(t[u],a[u])):t[u]=a[u])}}}return t}function Ft(e,t,n){e.style.setProperty(t,n)}function Oi({swiper:e,targetPosition:t,side:n}){const r=Fe(),a=-e.translate;let i=null,s;const o=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const u=t>a?"next":"prev",l=(p,E)=>u==="next"&&p>=E||u==="prev"&&p<=E,d=()=>{s=new Date().getTime(),i===null&&(i=s);const p=Math.max(Math.min((s-i)/o,1),0),E=.5-Math.cos(p*Math.PI)/2;let c=a+E*(t-a);if(l(c,t)&&(c=t),e.wrapperEl.scrollTo({[n]:c}),l(c,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:c})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(d)};d()}function tt(e,t=""){const n=Fe(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function nc(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function rc(e,t){const n=Fe();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=nc(e,t))),r}function Yn(e){try{console.warn(e);return}catch{}}function Wn(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:Ql(t)),n}function ac(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ic(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function mt(e,t){return Fe().getComputedStyle(e,null).getPropertyValue(t)}function jn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function Di(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function Lr(e,t,n){const r=Fe();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ne(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function an(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let Or;function sc(){const e=Fe(),t=_t();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function Pi(){return Or||(Or=sc()),Or}let Dr;function oc({userAgent:e}={}){const t=Pi(),n=Fe(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,o=n.screen.height,u=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const d=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),E=r==="Win32";let c=r==="MacIntel";const x=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&c&&t.touch&&x.indexOf(`${s}x${o}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),c=!1),u&&!E&&(i.os="android",i.android=!0),(l||p||d)&&(i.os="ios",i.ios=!0),i}function Mi(e={}){return Dr||(Dr=oc(e)),Dr}let Pr;function uc(){const e=Fe(),t=Mi();let n=!1;function r(){const o=e.navigator.userAgent.toLowerCase();return o.indexOf("safari")>=0&&o.indexOf("chrome")<0&&o.indexOf("android")<0}if(r()){const o=String(e.navigator.userAgent);if(o.includes("Version/")){const[u,l]=o.split("Version/")[1].split(" ")[0].split(".").map(d=>Number(d));n=u<16||u===16&&l<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r(),s=i||a&&t.ios;return{isSafari:n||i,needPerspectiveFix:n,need3dFix:s,isWebView:a}}function Bi(){return Pr||(Pr=uc()),Pr}function lc({swiper:e,on:t,emit:n}){const r=Fe();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},o=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(d=>{i=r.requestAnimationFrame(()=>{const{width:p,height:E}=e;let c=p,x=E;d.forEach(({contentBoxSize:h,contentRect:m,target:g})=>{g&&g!==e.el||(c=m?m.width:(h[0]||h).inlineSize,x=m?m.height:(h[0]||h).blockSize)}),(c!==p||x!==E)&&s()})}),a.observe(e.el))},u=()=>{i&&r.cancelAnimationFrame(i),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null)},l=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof r.ResizeObserver<"u"){o();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{u(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function cc({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=Fe(),s=(l,d={})=>{const p=i.MutationObserver||i.WebkitMutationObserver,E=new p(c=>{if(e.__preventObserver__)return;if(c.length===1){r("observerUpdate",c[0]);return}const x=function(){r("observerUpdate",c[0])};i.requestAnimationFrame?i.requestAnimationFrame(x):i.setTimeout(x,0)});E.observe(l,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:e.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),a.push(E)},o=()=>{if(e.params.observer){if(e.params.observeParents){const l=Di(e.hostEl);for(let d=0;d<l.length;d+=1)s(l[d])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},u=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",o),n("destroy",u)}var dc={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const a=n?"unshift":"push";return e.split(" ").forEach(i=>{r.eventsListeners[i]||(r.eventsListeners[i]=[]),r.eventsListeners[i][a](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function a(...i){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(r,i)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&n.eventsListeners[r].splice(i,1)})}),n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let n,r,a;return typeof e[0]=="string"||Array.isArray(e[0])?(n=e[0],r=e.slice(1,e.length),a=t):(n=e[0].events,r=e[0].data,a=e[0].context||t),r.unshift(a),(Array.isArray(n)?n:n.split(" ")).forEach(s=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(o=>{o.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(o=>{o.apply(a,r)})}),t}};function fc(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(mt(r,"padding-left")||0,10)-parseInt(mt(r,"padding-right")||0,10),n=n-parseInt(mt(r,"padding-top")||0,10)-parseInt(mt(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function pc(){const e=this;function t(k,N){return parseFloat(k.getPropertyValue(e.getDirectionLabel(N))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,o=e.virtual&&n.virtual.enabled,u=o?e.virtual.slides.length:e.slides.length,l=tt(a,`.${e.params.slideClass}, swiper-slide`),d=o?e.virtual.slides.length:l.length;let p=[];const E=[],c=[];let x=n.slidesOffsetBefore;typeof x=="function"&&(x=n.slidesOffsetBefore.call(e));let h=n.slidesOffsetAfter;typeof h=="function"&&(h=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,g=e.slidesGrid.length,b=e.size-x-h;let T=n.spaceBetween,C=-x,w=0,S=0;if(typeof b>"u")return;typeof T=="string"&&T.indexOf("%")>=0?T=parseFloat(T.replace("%",""))/100*b:typeof T=="string"&&(T=parseFloat(T)),e.virtualSize=-T-x-h,l.forEach(k=>{i?k.style.marginLeft="":k.style.marginRight="",k.style.marginBottom="",k.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Ft(r,"--swiper-centered-offset-before",""),Ft(r,"--swiper-centered-offset-after","")),n.cssMode&&(Ft(r,"--swiper-slides-offset-before",`${x}px`),Ft(r,"--swiper-slides-offset-after",`${h}px`));const O=n.grid&&n.grid.rows>1&&e.grid;O?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let A;const v=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(k=>typeof n.breakpoints[k].slidesPerView<"u").length>0;for(let k=0;k<d;k+=1){A=0;const N=l[k];if(!(N&&(O&&e.grid.updateSlide(k,N,l),mt(N,"display")==="none"))){if(o&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(A=n.virtual.slidesPerViewAutoSlideSize),A&&N&&(n.roundLengths&&(A=Math.floor(A)),N.style[e.getDirectionLabel("width")]=`${A}px`);else if(n.slidesPerView==="auto"){v&&(N.style[e.getDirectionLabel("width")]="");const M=getComputedStyle(N),R=N.style.transform,I=N.style.webkitTransform;if(R&&(N.style.transform="none"),I&&(N.style.webkitTransform="none"),n.roundLengths)A=e.isHorizontal()?Lr(N,"width"):Lr(N,"height");else{const y=t(M,"width"),F=t(M,"padding-left"),U=t(M,"padding-right"),$=t(M,"margin-left"),V=t(M,"margin-right"),_=M.getPropertyValue("box-sizing");if(_&&_==="border-box")A=y+$+V;else{const{clientWidth:Y,offsetWidth:J}=N;A=y+F+U+$+V+(J-Y)}}R&&(N.style.transform=R),I&&(N.style.webkitTransform=I),n.roundLengths&&(A=Math.floor(A))}else A=(b-(n.slidesPerView-1)*T)/n.slidesPerView,n.roundLengths&&(A=Math.floor(A)),N&&(N.style[e.getDirectionLabel("width")]=`${A}px`);N&&(N.swiperSlideSize=A),c.push(A),n.centeredSlides?(C=C+A/2+w/2+T,w===0&&k!==0&&(C=C-b/2-T),k===0&&(C=C-b/2-T),Math.abs(C)<1/1e3&&(C=0),n.roundLengths&&(C=Math.floor(C)),S%n.slidesPerGroup===0&&p.push(C),E.push(C)):(n.roundLengths&&(C=Math.floor(C)),(S-Math.min(e.params.slidesPerGroupSkip,S))%e.params.slidesPerGroup===0&&p.push(C),E.push(C),C=C+A+T),e.virtualSize+=A+T,w=A,S+=1}}if(e.virtualSize=Math.max(e.virtualSize,b)+h,i&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+T}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+T}px`),O&&e.grid.updateWrapperSize(A,p),!n.centeredSlides){const k=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,N=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||k);let M=p.length;if(N){let I;if(n.slidesPerView==="auto"){I=1;let y=0;for(let F=c.length-1;F>=0&&(y+=c[F]+(F<c.length-1?T:0),y<=b);F-=1)I=c.length-F}else I=Math.floor(n.slidesPerView);M=Math.max(d-I,0)}const R=[];for(let I=0;I<p.length;I+=1){let y=p[I];n.roundLengths&&(y=Math.floor(y)),N?I<=M&&R.push(y):p[I]<=e.virtualSize-b&&R.push(y)}p=R,Math.floor(e.virtualSize-b)-Math.floor(p[p.length-1])>1&&(N||p.push(e.virtualSize-b))}if(o&&n.loop){const k=c[0]+T;if(n.slidesPerGroup>1){const N=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),M=k*n.slidesPerGroup;for(let R=0;R<N;R+=1)p.push(p[p.length-1]+M)}for(let N=0;N<e.virtual.slidesBefore+e.virtual.slidesAfter;N+=1)n.slidesPerGroup===1&&p.push(p[p.length-1]+k),E.push(E[E.length-1]+k),e.virtualSize+=k}if(p.length===0&&(p=[0]),T!==0){const k=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((N,M)=>!n.cssMode||n.loop?!0:M!==l.length-1).forEach(N=>{N.style[k]=`${T}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let k=0;c.forEach(M=>{k+=M+(T||0)}),k-=T;const N=k>b?k-b:0;p=p.map(M=>M<=0?-x:M>N?N+h:M)}if(n.centerInsufficientSlides){let k=0;c.forEach(M=>{k+=M+(T||0)}),k-=T;const N=(x||0)+(h||0);if(k+N<b){const M=(b-k-N)/2;p.forEach((R,I)=>{p[I]=R-M}),E.forEach((R,I)=>{E[I]=R+M})}}if(Object.assign(e,{slides:l,snapGrid:p,slidesGrid:E,slidesSizesGrid:c}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Ft(r,"--swiper-centered-offset-before",`${-p[0]}px`),Ft(r,"--swiper-centered-offset-after",`${e.size/2-c[c.length-1]/2}px`);const k=-e.snapGrid[0],N=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(M=>M+k),e.slidesGrid=e.slidesGrid.map(M=>M+N)}if(d!==u&&e.emit("slidesLengthChange"),p.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),E.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!o&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const k=`${n.containerModifierClass}backface-hidden`,N=e.el.classList.contains(k);d<=n.maxBackfaceHiddenSlides?N||e.el.classList.add(k):N&&e.el.classList.remove(k)}}function hc(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=o=>r?t.slides[t.getSlideIndexByData(o)]:t.slides[o];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(o=>{n.push(o)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const o=t.activeIndex+i;if(o>t.slides.length&&!r)break;n.push(s(o))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const o=n[i].offsetHeight;a=o>a?o:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function mc(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const Ri=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function gc(e=this&&this.translate||0){const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:i}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;a&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let o=n.spaceBetween;typeof o=="string"&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*t.size:typeof o=="string"&&(o=parseFloat(o));for(let u=0;u<r.length;u+=1){const l=r[u];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=r[0].swiperSlideOffset);const p=(s+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),E=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),c=-(s-d),x=c+t.slidesSizesGrid[u],h=c>=0&&c<=t.size-t.slidesSizesGrid[u],m=c>=0&&c<t.size-1||x>1&&x<=t.size||c<=0&&x>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(u)),Ri(l,m,n.slideVisibleClass),Ri(l,h,n.slideFullyVisibleClass),l.progress=a?-p:p,l.originalProgress=a?-E:E}}function Ec(e){const t=this;if(typeof e>"u"){const d=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*d||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:o}=t;const u=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const d=Math.abs(e-t.minTranslate())<1,p=Math.abs(e-t.maxTranslate())<1;i=d||a<=0,s=p||a>=1,d&&(a=0),p&&(a=1)}if(n.loop){const d=t.getSlideIndexByData(0),p=t.getSlideIndexByData(t.slides.length-1),E=t.slidesGrid[d],c=t.slidesGrid[p],x=t.slidesGrid[t.slidesGrid.length-1],h=Math.abs(e);h>=E?o=(h-E)/x:o=(h+x-c)/x,o>1&&(o-=1)}Object.assign(t,{progress:a,progressLoop:o,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!u&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(u&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Mr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function bc(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,i=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,o=p=>tt(r,`.${n.slideClass}${p}, swiper-slide${p}`)[0];let u,l,d;if(i)if(n.loop){let p=a-e.virtual.slidesBefore;p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),u=o(`[data-swiper-slide-index="${p}"]`)}else u=o(`[data-swiper-slide-index="${a}"]`);else s?(u=t.find(p=>p.column===a),d=t.find(p=>p.column===a+1),l=t.find(p=>p.column===a-1)):u=t[a];u&&(s||(d=ic(u,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d&&(d=t[0]),l=ac(u,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(p=>{Mr(p,p===u,n.slideActiveClass),Mr(p,p===d,n.slideNextClass),Mr(p,p===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Xn=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let a=r.querySelector(`.${e.params.lazyPreloaderClass}`);!a&&e.isElement&&(r.shadowRoot?a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),a&&!a.lazyPreloaderManaged&&a.remove())})),a&&!a.lazyPreloaderManaged&&a.remove()}},Br=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Rr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,o=[s-t];o.push(...Array.from({length:t}).map((u,l)=>s+r+l)),e.slides.forEach((u,l)=>{o.includes(u.column)&&Br(e,l)});return}const i=a+r-1;if(e.params.rewind||e.params.loop)for(let s=a-t;s<=i+t;s+=1){const o=(s%n+n)%n;(o<a||o>i)&&Br(e,o)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&Br(e,s)};function Tc(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let i=0;i<t.length;i+=1)typeof t[i+1]<"u"?r>=t[i]&&r<t[i+1]-(t[i+1]-t[i])/2?a=i:r>=t[i]&&r<t[i+1]&&(a=i+1):r>=t[i]&&(a=i);return n.normalizeSlideIndex&&(a<0||typeof a>"u")&&(a=0),a}function yc(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:o}=t;let u=e,l;const d=c=>{let x=c-t.virtual.slidesBefore;return x<0&&(x=t.virtual.slides.length+x),x>=t.virtual.slides.length&&(x-=t.virtual.slides.length),x};if(typeof u>"u"&&(u=Tc(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const c=Math.min(a.slidesPerGroupSkip,u);l=c+Math.floor((u-c)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),u===i&&!t.params.loop){l!==o&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(u===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=d(u);return}const p=t.grid&&a.grid&&a.grid.rows>1;let E;if(t.virtual&&a.virtual.enabled)a.loop?E=d(u):E=u;else if(p){const c=t.slides.find(h=>h.column===u);let x=parseInt(c.getAttribute("data-swiper-slide-index"),10);Number.isNaN(x)&&(x=Math.max(t.slides.indexOf(c),0)),E=Math.floor(x/a.grid.rows)}else if(t.slides[u]){const c=t.slides[u].getAttribute("data-swiper-slide-index");c?E=parseInt(c,10):E=u}else E=u;Object.assign(t,{previousSnapIndex:o,snapIndex:l,previousRealIndex:s,realIndex:E,previousIndex:i,activeIndex:u}),t.initialized&&Rr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==E&&t.emit("realIndexChange"),t.emit("slideChange"))}function xc(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(o=>{!a&&o.matches&&o.matches(`.${r.slideClass}, swiper-slide`)&&(a=o)});let i=!1,s;if(a){for(let o=0;o<n.slides.length;o+=1)if(n.slides[o]===a){i=!0,s=o;break}}if(a&&i)n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var Cc={updateSize:fc,updateSlides:pc,updateAutoHeight:hc,updateSlidesOffset:mc,updateSlidesProgress:gc,updateProgress:Ec,updateSlidesClasses:bc,updateActiveIndex:yc,updateClickedSlide:xc};function Sc(e=this.isHorizontal()?"x":"y"){const t=this,{params:n,rtlTranslate:r,translate:a,wrapperEl:i}=t;if(n.virtualTranslate)return r?-a:a;if(n.cssMode)return a;let s=ec(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function Ac(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let o=0,u=0;const l=0;n.isHorizontal()?o=r?-e:e:u=e,a.roundLengths&&(o=Math.floor(o),u=Math.floor(u)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?o:u,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-o:-u:a.virtualTranslate||(n.isHorizontal()?o-=n.cssOverflowAdjustment():u-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${o}px, ${u}px, ${l}px)`);let d;const p=n.maxTranslate()-n.minTranslate();p===0?d=0:d=(e-n.minTranslate())/p,d!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function _c(){return-this.snapGrid[0]}function vc(){return-this.snapGrid[this.snapGrid.length-1]}function kc(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:o}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const u=i.minTranslate(),l=i.maxTranslate();let d;if(r&&e>u?d=u:r&&e<l?d=l:d=e,i.updateProgress(d),s.cssMode){const p=i.isHorizontal();if(t===0)o[p?"scrollLeft":"scrollTop"]=-d;else{if(!i.support.smoothScroll)return Oi({swiper:i,targetPosition:-d,side:p?"left":"top"}),!0;o.scrollTo({[p?"left":"top"]:-d,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(d),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(E){!i||i.destroyed||E.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}var wc={getTranslate:Sc,setTranslate:Ac,minTranslate:_c,maxTranslate:vc,translateTo:kc};function Nc(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function Fi({swiper:e,runCallbacks:t,direction:n,step:r}){const{activeIndex:a,previousIndex:i}=e;let s=n;s||(a>i?s="next":a<i?s="prev":s="reset"),e.emit(`transition${r}`),t&&s==="reset"?e.emit(`slideResetTransition${r}`):t&&a!==i&&(e.emit(`slideChangeTransition${r}`),s==="next"?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`))}function Ic(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),Fi({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function Lc(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),Fi({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var Oc={setTransition:Nc,transitionStart:Ic,transitionEnd:Lc};function Dc(e=0,t,n=!0,r,a){typeof e=="string"&&(e=parseInt(e,10));const i=this;let s=e;s<0&&(s=0);const{params:o,snapGrid:u,slidesGrid:l,previousIndex:d,activeIndex:p,rtlTranslate:E,wrapperEl:c,enabled:x}=i;if(!x&&!r&&!a||i.destroyed||i.animating&&o.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const h=Math.min(i.params.slidesPerGroupSkip,s);let m=h+Math.floor((s-h)/i.params.slidesPerGroup);m>=u.length&&(m=u.length-1);const g=-u[m];if(o.normalizeSlideIndex)for(let O=0;O<l.length;O+=1){const A=-Math.floor(g*100),v=Math.floor(l[O]*100),k=Math.floor(l[O+1]*100);typeof l[O+1]<"u"?A>=v&&A<k-(k-v)/2?s=O:A>=v&&A<k&&(s=O+1):A>=v&&(s=O)}if(i.initialized&&s!==p&&(!i.allowSlideNext&&(E?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate())||!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(p||0)!==s))return!1;s!==(d||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g);let b;s>p?b="next":s<p?b="prev":b="reset";const T=i.virtual&&i.params.virtual.enabled;if(!(T&&a)&&(E&&-g===i.translate||!E&&g===i.translate))return i.updateActiveIndex(s),o.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),o.effect!=="slide"&&i.setTranslate(g),b!=="reset"&&(i.transitionStart(n,b),i.transitionEnd(n,b)),!1;if(o.cssMode){const O=i.isHorizontal(),A=E?g:-g;if(t===0)T&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),T&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c[O?"scrollLeft":"scrollTop"]=A})):c[O?"scrollLeft":"scrollTop"]=A,T&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return Oi({swiper:i,targetPosition:A,side:O?"left":"top"}),!0;c.scrollTo({[O?"left":"top"]:A,behavior:"smooth"})}return!0}const S=Bi().isSafari;return T&&!a&&S&&i.isElement&&i.virtual.update(!1,!1,s),i.setTransition(t),i.setTranslate(g),i.updateActiveIndex(s),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,b),t===0?i.transitionEnd(n,b):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(A){!i||i.destroyed||A.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,b))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function Pc(e=0,t,n=!0,r){typeof e=="string"&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;typeof t>"u"&&(t=a.params.speed);const i=a.grid&&a.params.grid&&a.params.grid.rows>1;let s=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)s=s+a.virtual.slidesBefore;else{let o;if(i){const h=s*a.params.grid.rows;o=a.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===h).column}else o=a.getSlideIndexByData(s);const u=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:d,slidesOffsetAfter:p}=a.params,E=l||!!d||!!p;let c=a.params.slidesPerView;c==="auto"?c=a.slidesPerViewDynamic():(c=Math.ceil(parseFloat(a.params.slidesPerView,10)),E&&c%2===0&&(c=c+1));let x=u-o<c;if(E&&(x=x||o<Math.ceil(c/2)),r&&E&&a.params.slidesPerView!=="auto"&&!i&&(x=!1),x){const h=E?o<a.activeIndex?"prev":"next":o-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:h,slideTo:!0,activeSlideIndex:h==="next"?o+1:o-u+1,slideRealIndex:h==="next"?a.realIndex:void 0})}if(i){const h=s*a.params.grid.rows;s=a.slides.find(m=>m.getAttribute("data-swiper-slide-index")*1===h).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function Mc(e,t=!0,n){const r=this,{enabled:a,params:i,animating:s}=r;if(!a||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let o=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(o=Math.max(r.slidesPerViewDynamic("current",!0),1));const u=r.activeIndex<i.slidesPerGroupSkip?1:o,l=r.virtual&&i.virtual.enabled;if(i.loop){if(s&&!l&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+u,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+u,e,t,n)}function Bc(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:o,enabled:u,animating:l}=r;if(!u||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const d=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!d&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const p=o?r.translate:-r.translate;function E(b){return b<0?-Math.floor(Math.abs(b)):Math.floor(b)}const c=E(p),x=i.map(b=>E(b)),h=a.freeMode&&a.freeMode.enabled;let m=i[x.indexOf(c)-1];if(typeof m>"u"&&(a.cssMode||h)){let b;i.forEach((T,C)=>{c>=T&&(b=C)}),typeof b<"u"&&(m=h?i[b]:i[b>0?b-1:b])}let g=0;if(typeof m<"u"&&(g=s.indexOf(m),g<0&&(g=r.activeIndex-1),a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(g=g-r.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&r.isBeginning){const b=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(b,e,t,n)}else if(a.loop&&r.activeIndex===0&&a.cssMode)return requestAnimationFrame(()=>{r.slideTo(g,e,t,n)}),!0;return r.slideTo(g,e,t,n)}function Rc(e,t=!0,n){const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function Fc(e,t=!0,n,r=.5){const a=this;if(a.destroyed)return;typeof e>"u"&&(e=a.params.speed);let i=a.activeIndex;const s=Math.min(a.params.slidesPerGroupSkip,i),o=s+Math.floor((i-s)/a.params.slidesPerGroup),u=a.rtlTranslate?a.translate:-a.translate;if(u>=a.snapGrid[o]){const l=a.snapGrid[o],d=a.snapGrid[o+1];u-l>(d-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[o-1],d=a.snapGrid[o];u-l<=(d-l)*r&&(i-=a.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,a.slidesGrid.length-1),a.slideTo(i,e,t,n)}function Hc(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let a=e.getSlideIndexWhenGrid(e.clickedIndex),i;const s=e.isElement?"swiper-slide":`.${t.slideClass}`,o=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(o?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(tt(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),Li(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var $c={slideTo:Dc,slideToLoop:Pc,slideNext:Mc,slidePrev:Bc,slideReset:Rc,slideToClosest:Fc,slideToClickedSlide:Hc};function Uc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{tt(a,`.${r.slideClass}, swiper-slide`).forEach((x,h)=>{x.setAttribute("data-swiper-slide-index",h)})},s=()=>{const c=tt(a,`.${r.slideBlankClass}`);c.forEach(x=>{x.remove()}),c.length>0&&(n.recalcSlides(),n.updateSlides())},o=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||o)&&s();const u=r.slidesPerGroup*(o?r.grid.rows:1),l=n.slides.length%u!==0,d=o&&n.slides.length%r.grid.rows!==0,p=c=>{for(let x=0;x<c;x+=1){const h=n.isElement?Wn("swiper-slide",[r.slideBlankClass]):Wn("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(h)}};if(l){if(r.loopAddBlankSlides){const c=u-n.slides.length%u;p(c),n.recalcSlides(),n.updateSlides()}else Yn("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else if(d){if(r.loopAddBlankSlides){const c=r.grid.rows-n.slides.length%r.grid.rows;p(c),n.recalcSlides(),n.updateSlides()}else Yn("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else i();const E=r.centeredSlides||!!r.slidesOffsetBefore||!!r.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:E?void 0:"next",initial:t})}function qc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:o}={}){const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:l,allowSlidePrev:d,allowSlideNext:p,slidesEl:E,params:c}=u,{centeredSlides:x,slidesOffsetBefore:h,slidesOffsetAfter:m,initialSlide:g}=c,b=x||!!h||!!m;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&c.virtual.enabled){t&&(!b&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):b&&u.snapIndex<c.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=d,u.allowSlideNext=p,u.emit("loopFix");return}let T=c.slidesPerView;T==="auto"?T=u.slidesPerViewDynamic():(T=Math.ceil(parseFloat(c.slidesPerView,10)),b&&T%2===0&&(T=T+1));const C=c.slidesPerGroupAuto?T:c.slidesPerGroup;let w=b?Math.max(C,Math.ceil(T/2)):C;w%C!==0&&(w+=C-w%C),w+=c.loopAdditionalSlides,u.loopedSlides=w;const S=u.grid&&c.grid&&c.grid.rows>1;l.length<T+w||u.params.effect==="cards"&&l.length<T+w*2?Yn("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):S&&c.grid.fill==="row"&&Yn("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const O=[],A=[],v=S?Math.ceil(l.length/c.grid.rows):l.length,k=i&&v-g<T&&!b;let N=k?g:u.activeIndex;typeof a>"u"?a=u.getSlideIndex(l.find($=>$.classList.contains(c.slideActiveClass))):N=a;const M=n==="next"||!n,R=n==="prev"||!n;let I=0,y=0;const U=(S?l[a].column:a)+(b&&typeof r>"u"?-T/2+.5:0);if(U<w){I=Math.max(w-U,C);for(let $=0;$<w-U;$+=1){const V=$-Math.floor($/v)*v;if(S){const _=v-V-1;for(let Y=l.length-1;Y>=0;Y-=1)l[Y].column===_&&O.push(Y)}else O.push(v-V-1)}}else if(U+T>v-w){y=Math.max(U-(v-w*2),C),k&&(y=Math.max(y,T-v+g+1));for(let $=0;$<y;$+=1){const V=$-Math.floor($/v)*v;S?l.forEach((_,Y)=>{_.column===V&&A.push(Y)}):A.push(V)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&l.length<T+w*2&&(A.includes(a)&&A.splice(A.indexOf(a),1),O.includes(a)&&O.splice(O.indexOf(a),1)),R&&O.forEach($=>{l[$].swiperLoopMoveDOM=!0,E.prepend(l[$]),l[$].swiperLoopMoveDOM=!1}),M&&A.forEach($=>{l[$].swiperLoopMoveDOM=!0,E.append(l[$]),l[$].swiperLoopMoveDOM=!1}),u.recalcSlides(),c.slidesPerView==="auto"?u.updateSlides():S&&(O.length>0&&R||A.length>0&&M)&&u.slides.forEach(($,V)=>{u.grid.updateSlide(V,$,u.slides)}),c.watchSlidesProgress&&u.updateSlidesOffset(),t){if(O.length>0&&R){if(typeof e>"u"){const $=u.slidesGrid[N],_=u.slidesGrid[N+I]-$;o?u.setTranslate(u.translate-_):(u.slideTo(N+Math.ceil(I),0,!1,!0),r&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else if(r){const $=S?O.length/c.grid.rows:O.length;u.slideTo(u.activeIndex+$,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(A.length>0&&M)if(typeof e>"u"){const $=u.slidesGrid[N],_=u.slidesGrid[N-y]-$;o?u.setTranslate(u.translate-_):(u.slideTo(N-y,0,!1,!0),r&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else{const $=S?A.length/c.grid.rows:A.length;u.slideTo(u.activeIndex-$,0,!1,!0)}}if(u.allowSlidePrev=d,u.allowSlideNext=p,u.controller&&u.controller.control&&!s){const $={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...$,slideTo:V.params.slidesPerView===c.slidesPerView?t:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...$,slideTo:u.controller.control.params.slidesPerView===c.slidesPerView?t:!1})}u.emit("loopFix")}function zc(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(a=>{const i=typeof a.swiperSlideIndex>"u"?a.getAttribute("data-swiper-slide-index")*1:a.swiperSlideIndex;r[i]=a}),e.slides.forEach(a=>{a.removeAttribute("data-swiper-slide-index")}),r.forEach(a=>{n.append(a)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Vc={loopCreate:Uc,loopFix:qc,loopDestroy:zc};function Gc(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Yc(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Wc={setGrabCursor:Gc,unsetGrabCursor:Yc};function jc(e,t=this){function n(r){if(!r||r===_t()||r===Fe())return null;r.assignedSlot&&(r=r.assignedSlot);const a=r.closest(e);return!a&&!r.getRootNode?null:a||n(r.getRootNode().host)}return n(t)}function Hi(e,t,n){const r=Fe(),{params:a}=e,i=a.edgeSwipeDetection,s=a.edgeSwipeThreshold;return i&&(n<=s||n>=r.innerWidth-s)?i==="prevent"?(t.preventDefault(),!0):!1:!0}function Xc(e){const t=this,n=_t();let r=e;r.originalEvent&&(r=r.originalEvent);const a=t.touchEventsData;if(r.type==="pointerdown"){if(a.pointerId!==null&&a.pointerId!==r.pointerId)return;a.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(a.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){Hi(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:o}=t;if(!o||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let u=r.target;if(i.touchEventsTarget==="wrapper"&&!rc(u,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||a.isTouched&&a.isMoved)return;const l=!!i.noSwipingClass&&i.noSwipingClass!=="",d=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&d&&(u=d[0]);const p=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,E=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(E?jc(p,u):u.closest(p))){t.allowClick=!0;return}if(i.swipeHandler&&!u.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const c=s.currentX,x=s.currentY;if(!Hi(t,r,c))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=c,s.startY=x,a.touchStartTime=Vn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let h=!0;u.matches(a.focusableElements)&&(h=!1,u.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==u&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!u.matches(a.focusableElements))&&n.activeElement.blur();const m=h&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||m)&&!u.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Kc(e){const t=_t(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:o}=n;if(!o||!a.simulateTouch&&e.pointerType==="mouse")return;let u=e;if(u.originalEvent&&(u=u.originalEvent),u.type==="pointermove"&&(r.touchId!==null||u.pointerId!==r.pointerId))return;let l;if(u.type==="touchmove"){if(l=[...u.changedTouches].find(w=>w.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=u;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",u);return}const d=l.pageX,p=l.pageY;if(u.preventedByNestedSwiper){i.startX=d,i.startY=p;return}if(!n.allowTouchMove){u.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:d,startY:p,currentX:d,currentY:p}),r.touchStartTime=Vn());return}if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(p<i.startY&&n.translate<=n.maxTranslate()||p>i.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(d>i.startX&&-n.translate<=n.maxTranslate()||d<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(d<i.startX&&n.translate<=n.maxTranslate()||d>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==u.target&&u.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",u),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=d,i.currentY=p;const E=i.currentX-i.startX,c=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(E**2+c**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let w;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:E*E+c*c>=25&&(w=Math.atan2(Math.abs(c),Math.abs(E))*180/Math.PI,r.isScrolling=n.isHorizontal()?w>a.touchAngle:90-w>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",u),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||u.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&u.cancelable&&u.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&u.stopPropagation();let x=n.isHorizontal()?E:c,h=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(x=Math.abs(x)*(s?1:-1),h=Math.abs(h)*(s?1:-1)),i.diff=x,x*=a.touchRatio,s&&(x=-x,h=-h);const m=n.touchesDirection;n.swipeDirection=x>0?"prev":"next",n.touchesDirection=h>0?"prev":"next";const g=n.params.loop&&!a.cssMode,b=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(g&&b&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const w=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(w)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",u)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&m!==n.touchesDirection&&g&&b&&Math.abs(x)>=1){Object.assign(i,{startX:d,startY:p,currentX:d,currentY:p,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",u),r.isMoved=!0,r.currentTranslate=x+r.startTranslate;let T=!0,C=a.resistanceRatio;if(a.touchReleaseOnEdges&&(C=0),x>0?(g&&b&&r.allowThresholdMove&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(T=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+x)**C))):x<0&&(g&&b&&r.allowThresholdMove&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(a.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(T=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-x)**C))),T&&(u.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),a.threshold>0)if(Math.abs(x)>a.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{r.currentTranslate=r.startTranslate;return}!a.followFinger||a.cssMode||((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Qc(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let a;if(r.type==="touchend"||r.type==="touchcancel"){if(a=[...r.changedTouches].find(w=>w.identifier===n.touchId),!a||a.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;a=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:o,rtlTranslate:u,slidesGrid:l,enabled:d}=t;if(!d||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const p=Vn(),E=p-n.touchStartTime;if(t.allowClick){const w=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(w&&w[0]||r.target,w),t.emit("tap click",r),E<300&&p-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Vn(),Li(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||o.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let c;if(s.followFinger?c=u?t.translate:-t.translate:c=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:c});return}const x=c>=-t.maxTranslate()&&!t.params.loop;let h=0,m=t.slidesSizesGrid[0];for(let w=0;w<l.length;w+=w<s.slidesPerGroupSkip?1:s.slidesPerGroup){const S=w<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[w+S]<"u"?(x||c>=l[w]&&c<l[w+S])&&(h=w,m=l[w+S]-l[w]):(x||c>=l[w])&&(h=w,m=l[l.length-1]-l[l.length-2])}let g=null,b=null;s.rewind&&(t.isBeginning?b=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const T=(c-l[h])/m,C=h<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(E>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(T>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:h+C):t.slideTo(h)),t.swipeDirection==="prev"&&(T>1-s.longSwipesRatio?t.slideTo(h+C):b!==null&&T<0&&Math.abs(T)>s.longSwipesRatio?t.slideTo(b):t.slideTo(h))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(h+C):t.slideTo(h):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:h+C),t.swipeDirection==="prev"&&t.slideTo(b!==null?b:h))}}function $i(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const o=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!o?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=a,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function Jc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Zc(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let a;const i=e.maxTranslate()-e.minTranslate();i===0?a=0:a=(e.translate-e.minTranslate())/i,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function ed(e){const t=this;Xn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function td(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Ui=(e,t)=>{const n=_t(),{params:r,el:a,wrapperEl:i,device:s}=e,o=!!r.nested,u=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),a[u]("touchstart",e.onTouchStart,{passive:!1}),a[u]("pointerdown",e.onTouchStart,{passive:!1}),n[u]("touchmove",e.onTouchMove,{passive:!1,capture:o}),n[u]("pointermove",e.onTouchMove,{passive:!1,capture:o}),n[u]("touchend",e.onTouchEnd,{passive:!0}),n[u]("pointerup",e.onTouchEnd,{passive:!0}),n[u]("pointercancel",e.onTouchEnd,{passive:!0}),n[u]("touchcancel",e.onTouchEnd,{passive:!0}),n[u]("pointerout",e.onTouchEnd,{passive:!0}),n[u]("pointerleave",e.onTouchEnd,{passive:!0}),n[u]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[u]("click",e.onClick,!0),r.cssMode&&i[u]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",$i,!0):e[l]("observerUpdate",$i,!0),a[u]("load",e.onLoad,{capture:!0}))};function nd(){const e=this,{params:t}=e;e.onTouchStart=Xc.bind(e),e.onTouchMove=Kc.bind(e),e.onTouchEnd=Qc.bind(e),e.onDocumentTouchStart=td.bind(e),t.cssMode&&(e.onScroll=Zc.bind(e)),e.onClick=Jc.bind(e),e.onLoad=ed.bind(e),Ui(e,"on")}function rd(){Ui(this,"off")}var ad={attachEvents:nd,detachEvents:rd};const qi=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function id(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,i=r.breakpoints;if(!i||i&&Object.keys(i).length===0)return;const s=_t(),o=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",u=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,o,u);if(!l||e.currentBreakpoint===l)return;const p=(l in i?i[l]:void 0)||e.originalParams,E=qi(e,r),c=qi(e,p),x=e.params.grabCursor,h=p.grabCursor,m=r.enabled;E&&!c?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!E&&c&&(a.classList.add(`${r.containerModifierClass}grid`),(p.grid.fill&&p.grid.fill==="column"||!p.grid.fill&&r.grid.fill==="column")&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),x&&!h?e.unsetGrabCursor():!x&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(S=>{if(typeof p[S]>"u")return;const O=r[S]&&r[S].enabled,A=p[S]&&p[S].enabled;O&&!A&&e[S].disable(),!O&&A&&e[S].enable()});const g=p.direction&&p.direction!==r.direction,b=r.loop&&(p.slidesPerView!==r.slidesPerView||g),T=r.loop;g&&n&&e.changeDirection(),Ge(e.params,p);const C=e.params.enabled,w=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!C?e.disable():!m&&C&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",p),n&&(b?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!T&&w?(e.loopCreate(t),e.updateSlides()):T&&!w&&e.loopDestroy()),e.emit("breakpoint",p)}function sd(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=Fe(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(o=>{if(typeof o=="string"&&o.indexOf("@")===0){const u=parseFloat(o.substr(1));return{value:i*u,point:o}}return{value:o,point:o}});s.sort((o,u)=>parseInt(o.value,10)-parseInt(u.value,10));for(let o=0;o<s.length;o+=1){const{point:u,value:l}=s[o];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=u):l<=n.clientWidth&&(r=u)}return r||"max"}var od={setBreakpoint:id,getBreakpoint:sd};function ud(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(a=>{r[a]&&n.push(t+a)}):typeof r=="string"&&n.push(t+r)}),n}function ld(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=ud(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),a.classList.add(...t),e.emitContainerClasses()}function cd(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var dd={addClasses:ld,removeClasses:cd};function fd(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const a=e.slides.length-1,i=e.slidesGrid[a]+e.slidesSizesGrid[a]+r*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var pd={checkOverflow:fd},Fr={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function hd(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){Ge(t,r);return}if(e[a]===!0&&(e[a]={enabled:!0}),a==="navigation"&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),!(a in e&&"enabled"in i)){Ge(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),Ge(t,r)}}const Hr={eventsEmitter:dc,update:Cc,translate:wc,transition:Oc,slide:$c,loop:Vc,grabCursor:Wc,events:ad,breakpoints:od,checkOverflow:pd,classes:dd},$r={};let Ur=class pt{constructor(...t){let n,r;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?r=t[0]:[n,r]=t,r||(r={}),r=Ge({},r),n&&!r.el&&(r.el=n);const a=_t();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const u=[];return a.querySelectorAll(r.el).forEach(l=>{const d=Ge({},r,{el:l});u.push(new pt(d))}),u}const i=this;i.__swiper__=!0,i.support=Pi(),i.device=Mi({userAgent:r.userAgent}),i.browser=Bi(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(u=>{u({params:r,swiper:i,extendParams:hd(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const o=Ge({},Fr,s);return i.params=Ge({},o,$r,r),i.originalParams=Ge({},i.params),i.passedParams=Ge({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(u=>{i.on(u,i.params.on[u])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return i.params.direction==="horizontal"},isVertical(){return i.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,a=tt(n,`.${r.slideClass}, swiper-slide`),i=jn(a[0]);return jn(t)-i}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.getAttribute("data-swiper-slide-index")*1===t))}getSlideIndexWhenGrid(t){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?t=Math.floor(t/this.params.grid.rows):this.params.grid.fill==="row"&&(t=t%Math.ceil(this.slides.length/this.params.grid.rows))),t}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=tt(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const a=r.minTranslate(),s=(r.maxTranslate()-a)*t+a;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const a=t.getSlideClasses(r);n.push({slideEl:r,classNames:a}),t.emit("_slideClass",r,a)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t="current",n=!1){const r=this,{params:a,slides:i,slidesGrid:s,slidesSizesGrid:o,size:u,activeIndex:l}=r;let d=1;if(typeof a.slidesPerView=="number")return a.slidesPerView;if(a.centeredSlides){let p=i[l]?Math.ceil(i[l].swiperSlideSize):0,E;for(let c=l+1;c<i.length;c+=1)i[c]&&!E&&(p+=Math.ceil(i[c].swiperSlideSize),d+=1,p>u&&(E=!0));for(let c=l-1;c>=0;c-=1)i[c]&&!E&&(p+=i[c].swiperSlideSize,d+=1,p>u&&(E=!0))}else if(t==="current")for(let p=l+1;p<i.length;p+=1)(n?s[p]+o[p]-s[l]<u:s[p]-s[l]<u)&&(d+=1);else for(let p=l-1;p>=0;p-=1)s[l]-s[p]<u&&(d+=1);return d}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&Xn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,o=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(o),t.updateActiveIndex(),t.updateSlidesClasses()}let i;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)a(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(s.length-1,0,!1,!0)}else i=t.slideTo(t.activeIndex,0,!1,!0);i||a()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n=!0){const r=this,a=r.params.direction;return t||(t=a==="horizontal"?"vertical":"horizontal"),t===a||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${a}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(i=>{t==="vertical"?i.style.width="":i.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const a=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(a()):tt(r,a())[0];return!s&&n.params.createElements&&(s=Wn("div",n.params.wrapperClass),r.append(s),tt(r,`.${n.params.slideClass}`).forEach(o=>{s.append(o)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||mt(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||mt(r,"direction")==="rtl"),wrongRTL:mt(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const a=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&a.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),a.forEach(i=>{i.complete?Xn(n,i):i.addEventListener("load",s=>{Xn(n,s.target)})}),Rr(n),n.initialized=!0,Rr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:o}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),a.loop&&r.loopDestroy(),n&&(r.removeClasses(),i&&typeof i!="string"&&i.removeAttribute("style"),s&&s.removeAttribute("style"),o&&o.length&&o.forEach(u=>{u.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),u.removeAttribute("style"),u.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(u=>{r.off(u)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),Jl(r)),r.destroyed=!0),null}static extendDefaults(t){Ge($r,t)}static get extendedDefaults(){return $r}static get defaults(){return Fr}static installModule(t){pt.prototype.__modules__||(pt.prototype.__modules__=[]);const n=pt.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>pt.installModule(n)),pt):(pt.installModule(t),pt)}};Object.keys(Hr).forEach(e=>{Object.keys(Hr[e]).forEach(t=>{Ur.prototype[t]=Hr[e][t]})}),Ur.use([lc,cc]);const zi=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function vt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Ht(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:vt(t[r])&&vt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Ht(e[r],t[r]):e[r]=t[r]})}function Vi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function Gi(e={}){return e.pagination&&typeof e.pagination.el>"u"}function Yi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function Wi(e=""){const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function md(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function gd({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:o}){const u=r.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:l,pagination:d,navigation:p,scrollbar:E,virtual:c,thumbs:x}=e;let h,m,g,b,T,C,w,S;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(h=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(m=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||o)&&(l.pagination||l.pagination===!1)&&d&&!d.el&&(g=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&E&&!E.el&&(b=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||a)&&(l.navigation||l.navigation===!1)&&p&&!p.prevEl&&!p.nextEl&&(T=!0);const O=A=>{e[A]&&(e[A].destroy(),A==="navigation"?(e.isElement&&(e[A].prevEl.remove(),e[A].nextEl.remove()),l[A].prevEl=void 0,l[A].nextEl=void 0,e[A].prevEl=void 0,e[A].nextEl=void 0):(e.isElement&&e[A].el.remove(),l[A].el=void 0,e[A].el=void 0))};r.includes("loop")&&e.isElement&&(l.loop&&!n.loop?C=!0:!l.loop&&n.loop?w=!0:S=!0),u.forEach(A=>{if(vt(l[A])&&vt(n[A]))Object.assign(l[A],n[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in n[A]&&!n[A].enabled&&O(A);else{const v=n[A];(v===!0||v===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?v===!1&&O(A):l[A]=n[A]}}),u.includes("controller")&&!m&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&c&&l.virtual.enabled?(c.slides=t,c.update(!0)):r.includes("virtual")&&c&&l.virtual.enabled&&(t&&(c.slides=t),c.update(!0)),r.includes("children")&&t&&l.loop&&(S=!0),h&&x.init()&&x.update(!0),m&&(e.controller.control=l.controller.control),g&&(e.isElement&&(!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-pagination"),o.part.add("pagination"),e.el.appendChild(o)),o&&(l.pagination.el=o),d.init(),d.render(),d.update()),b&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),e.el.appendChild(s)),s&&(l.scrollbar.el=s),E.init(),E.updateSize(),E.setTranslate()),T&&(e.isElement&&((!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-next"),an(a,e.navigation.arrowSvg),a.part.add("button-next"),e.el.appendChild(a)),(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-button-prev"),an(i,e.navigation.arrowSvg),i.part.add("button-prev"),e.el.appendChild(i))),a&&(l.navigation.nextEl=a),i&&(l.navigation.prevEl=i),p.init(),p.update()),r.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&e.changeDirection(n.direction,!1),(C||S)&&e.loopDestroy(),(w||S)&&e.loopCreate(),e.update()}function Ed(e={},t=!0){const n={on:{}},r={},a={};Ht(n,Fr),n._emitClasses=!0,n.init=!1;const i={},s=zi.map(u=>u.replace(/_/,"")),o=Object.assign({},e);return Object.keys(o).forEach(u=>{typeof e[u]>"u"||(s.indexOf(u)>=0?vt(e[u])?(n[u]={},a[u]={},Ht(n[u],e[u]),Ht(a[u],e[u])):(n[u]=e[u],a[u]=e[u]):u.search(/on[A-Z]/)===0&&typeof e[u]=="function"?t?r[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:n.on[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:i[u]=e[u])}),["navigation","pagination","scrollbar"].forEach(u=>{n[u]===!0&&(n[u]={}),n[u]===!1&&delete n[u]}),{params:n,passedParams:a,rest:i,events:r}}function bd({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){Vi(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),Gi(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),Yi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function Td(e,t,n,r,a){const i=[];if(!t)return i;const s=u=>{i.indexOf(u)<0&&i.push(u)};if(n&&r){const u=r.map(a),l=n.map(a);u.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return zi.filter(u=>u[0]==="_").map(u=>u.replace(/_/,"")).forEach(u=>{if(u in e&&u in t)if(vt(e[u])&&vt(t[u])){const l=Object.keys(e[u]),d=Object.keys(t[u]);l.length!==d.length?s(u):(l.forEach(p=>{e[u][p]!==t[u][p]&&s(u)}),d.forEach(p=>{e[u][p]!==t[u][p]&&s(u)}))}else e[u]!==t[u]&&s(u)}),i}const yd=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Kn(){return Kn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kn.apply(this,arguments)}function ji(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Xi(e){const t=[];return L.Children.toArray(e).forEach(n=>{ji(n)?t.push(n):n.props&&n.props.children&&Xi(n.props.children).forEach(r=>t.push(r))}),t}function xd(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return L.Children.toArray(e).forEach(r=>{if(ji(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const a=Xi(r.props.children);a.length>0?a.forEach(i=>t.push(i)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Cd(e,t,n){if(!n)return null;const r=d=>{let p=d;return d<0?p=t.length+d:p>=t.length&&(p=p-t.length),p},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:i,to:s}=n,o=e.params.loop?-t.length:0,u=e.params.loop?t.length*2:t.length,l=[];for(let d=o;d<u;d+=1)d>=i&&d<=s&&l.push(t[r(d)]);return l.map((d,p)=>L.cloneElement(d,{swiper:e,style:a,key:d.props.virtualIndex||d.key||`slide-${p}`}))}function sn(e,t){return typeof window>"u"?L.useEffect(e,t):L.useLayoutEffect(e,t)}const Ki=L.createContext(null),Sd=L.createContext(null),Qi=L.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let o=!1;const[u,l]=L.useState("swiper"),[d,p]=L.useState(null),[E,c]=L.useState(!1),x=L.useRef(!1),h=L.useRef(null),m=L.useRef(null),g=L.useRef(null),b=L.useRef(null),T=L.useRef(null),C=L.useRef(null),w=L.useRef(null),S=L.useRef(null),{params:O,passedParams:A,rest:v,events:k}=Ed(i),{slides:N,slots:M}=xd(r),R=()=>{c(!E)};Object.assign(O.on,{_containerClasses($,V){l(V)}});const I=()=>{Object.assign(O.on,k),o=!0;const $={...O};if(delete $.wrapperClass,m.current=new Ur($),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=N;const V={cache:!1,slides:N,renderExternal:p,renderExternalUpdate:!1};Ht(m.current.params.virtual,V),Ht(m.current.originalParams.virtual,V)}};h.current||I(),m.current&&m.current.on("_beforeBreakpoint",R);const y=()=>{o||!k||!m.current||Object.keys(k).forEach($=>{m.current.on($,k[$])})},F=()=>{!k||!m.current||Object.keys(k).forEach($=>{m.current.off($,k[$])})};L.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",R)}),L.useEffect(()=>{!x.current&&m.current&&(m.current.emitSlidesClasses(),x.current=!0)}),sn(()=>{if(s&&(s.current=h.current),!!h.current)return m.current.destroyed&&I(),bd({el:h.current,nextEl:T.current,prevEl:C.current,paginationEl:w.current,scrollbarEl:S.current,swiper:m.current},O),a&&!m.current.destroyed&&a(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),sn(()=>{y();const $=Td(A,g.current,N,b.current,V=>V.key);return g.current=A,b.current=N,$.length&&m.current&&!m.current.destroyed&&gd({swiper:m.current,slides:N,passedParams:A,changedParams:$,nextEl:T.current,prevEl:C.current,scrollbarEl:S.current,paginationEl:w.current}),()=>{F()}}),sn(()=>{yd(m.current)},[d]);function U(){return O.virtual?Cd(m.current,N,d):N.map(($,V)=>L.cloneElement($,{swiper:m.current,swiperSlideIndex:V}))}return L.createElement(t,Kn({ref:h,className:Wi(`${u}${e?` ${e}`:""}`)},v),L.createElement(Sd.Provider,{value:m.current},M["container-start"],L.createElement(n,{className:md(O.wrapperClass)},M["wrapper-start"],U(),M["wrapper-end"]),Vi(O)&&L.createElement(L.Fragment,null,L.createElement("div",{ref:C,className:"swiper-button-prev"}),L.createElement("div",{ref:T,className:"swiper-button-next"})),Yi(O)&&L.createElement("div",{ref:S,className:"swiper-scrollbar"}),Gi(O)&&L.createElement("div",{ref:w,className:"swiper-pagination"}),M["container-end"]))});Qi.displayName="Swiper";const Ji=L.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:o,...u}={},l)=>{const d=L.useRef(null),[p,E]=L.useState("swiper-slide"),[c,x]=L.useState(!1);function h(T,C,w){C===d.current&&E(w)}sn(()=>{if(typeof o<"u"&&(d.current.swiperSlideIndex=o),l&&(l.current=d.current),!(!d.current||!r)){if(r.destroyed){p!=="swiper-slide"&&E("swiper-slide");return}return r.on("_slideClass",h),()=>{r&&r.off("_slideClass",h)}}}),sn(()=>{r&&d.current&&!r.destroyed&&E(r.getSlideClasses(d.current))},[r]);const m={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},g=()=>typeof t=="function"?t(m):t,b=()=>{x(!0)};return L.createElement(e,Kn({ref:d,className:Wi(`${p}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:b},u),a&&L.createElement(Ki.Provider,{value:m},L.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g(),i&&!c&&L.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}}))),!a&&L.createElement(Ki.Provider,{value:m},g(),i&&!c&&L.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}})))});Ji.displayName="SwiperSlide";function Zi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=tt(e.el,`.${r[a]}`)[0];i||(i=Wn("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const es='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function Ad({swiper:e,extendParams:t,on:n,emit:r}){t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:es};function a(c){let x;return c&&typeof c=="string"&&e.isElement&&(x=e.el.querySelector(c)||e.hostEl.querySelector(c),x)?x:(c&&(typeof c=="string"&&(x=[...document.querySelectorAll(c)]),e.params.uniqueNavElements&&typeof c=="string"&&x&&x.length>1&&e.el.querySelectorAll(c).length===1?x=e.el.querySelector(c):x&&x.length===1&&(x=x[0])),c&&!x?c:x)}function i(c,x){const h=e.params.navigation;c=Ne(c),c.forEach(m=>{m&&(m.classList[x?"add":"remove"](...h.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=x),e.params.watchOverflow&&e.enabled&&m.classList[e.isLocked?"add":"remove"](h.lockClass))})}function s(){const{nextEl:c,prevEl:x}=e.navigation;if(e.params.loop){i(x,!1),i(c,!1);return}i(x,e.isBeginning&&!e.params.rewind),i(c,e.isEnd&&!e.params.rewind)}function o(c){c.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function u(c){c.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const c=e.params.navigation;if(e.params.navigation=Zi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(c.nextEl||c.prevEl))return;let x=a(c.nextEl),h=a(c.prevEl);Object.assign(e.navigation,{nextEl:x,prevEl:h}),x=Ne(x),h=Ne(h);const m=(g,b)=>{if(g){if(c.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const T=document.createElement("div");an(T,es),g.appendChild(T.querySelector("svg")),T.remove()}g.addEventListener("click",b==="next"?u:o)}!e.enabled&&g&&g.classList.add(...c.lockClass.split(" "))};x.forEach(g=>m(g,"next")),h.forEach(g=>m(g,"prev"))}function d(){let{nextEl:c,prevEl:x}=e.navigation;c=Ne(c),x=Ne(x);const h=(m,g)=>{m.removeEventListener("click",g==="next"?u:o),m.classList.remove(...e.params.navigation.disabledClass.split(" "))};c.forEach(m=>h(m,"next")),x.forEach(m=>h(m,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?E():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{d()}),n("enable disable",()=>{let{nextEl:c,prevEl:x}=e.navigation;if(c=Ne(c),x=Ne(x),e.enabled){s();return}[...c,...x].filter(h=>!!h).forEach(h=>h.classList.add(e.params.navigation.lockClass))}),n("click",(c,x)=>{let{nextEl:h,prevEl:m}=e.navigation;h=Ne(h),m=Ne(m);const g=x.target;let b=m.includes(g)||h.includes(g);if(e.isElement&&!b){const T=x.path||x.composedPath&&x.composedPath();T&&(b=T.find(C=>h.includes(C)||m.includes(C)))}if(e.params.navigation.hideOnClick&&!b){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let T;h.length?T=h[0].classList.contains(e.params.navigation.hiddenClass):m.length&&(T=m[0].classList.contains(e.params.navigation.hiddenClass)),r(T===!0?"navigationShow":"navigationHide"),[...h,...m].filter(C=>!!C).forEach(C=>C.classList.toggle(e.params.navigation.hiddenClass))}});const p=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),l(),s()},E=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),d()};Object.assign(e.navigation,{enable:p,disable:E,update:s,init:l,destroy:d})}function on(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function _d({swiper:e,extendParams:t,on:n,emit:r}){const a="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:g=>g,formatFractionTotal:g=>g,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),e.pagination={el:null,bullets:[]};let i,s=0;function o(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function u(g,b){const{bulletActiveClass:T}=e.params.pagination;g&&(g=g[`${b==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${T}-${b}`),g=g[`${b==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${T}-${b}-${b}`)))}function l(g,b,T){if(g=g%T,b=b%T,b===g+1)return"next";if(b===g-1)return"previous"}function d(g){const b=g.target.closest(on(e.params.pagination.bulletClass));if(!b)return;g.preventDefault();const T=jn(b)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===T)return;const C=l(e.realIndex,T,e.slides.length);C==="next"?e.slideNext():C==="previous"?e.slidePrev():e.slideToLoop(T)}else e.slideTo(T)}function p(){const g=e.rtl,b=e.params.pagination;if(o())return;let T=e.pagination.el;T=Ne(T);let C,w;const S=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,O=e.params.loop?Math.ceil(S/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(w=e.previousRealIndex||0,C=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(C=e.snapIndex,w=e.previousSnapIndex):(w=e.previousIndex||0,C=e.activeIndex||0),b.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const A=e.pagination.bullets;let v,k,N;if(b.dynamicBullets&&(i=Lr(A[0],e.isHorizontal()?"width":"height"),T.forEach(M=>{M.style[e.isHorizontal()?"width":"height"]=`${i*(b.dynamicMainBullets+4)}px`}),b.dynamicMainBullets>1&&w!==void 0&&(s+=C-(w||0),s>b.dynamicMainBullets-1?s=b.dynamicMainBullets-1:s<0&&(s=0)),v=Math.max(C-s,0),k=v+(Math.min(A.length,b.dynamicMainBullets)-1),N=(k+v)/2),A.forEach(M=>{const R=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(I=>`${b.bulletActiveClass}${I}`)].map(I=>typeof I=="string"&&I.includes(" ")?I.split(" "):I).flat();M.classList.remove(...R)}),T.length>1)A.forEach(M=>{const R=jn(M);R===C?M.classList.add(...b.bulletActiveClass.split(" ")):e.isElement&&M.setAttribute("part","bullet"),b.dynamicBullets&&(R>=v&&R<=k&&M.classList.add(...`${b.bulletActiveClass}-main`.split(" ")),R===v&&u(M,"prev"),R===k&&u(M,"next"))});else{const M=A[C];if(M&&M.classList.add(...b.bulletActiveClass.split(" ")),e.isElement&&A.forEach((R,I)=>{R.setAttribute("part",I===C?"bullet-active":"bullet")}),b.dynamicBullets){const R=A[v],I=A[k];for(let y=v;y<=k;y+=1)A[y]&&A[y].classList.add(...`${b.bulletActiveClass}-main`.split(" "));u(R,"prev"),u(I,"next")}}if(b.dynamicBullets){const M=Math.min(A.length,b.dynamicMainBullets+4),R=(i*M-i)/2-N*i,I=g?"right":"left";A.forEach(y=>{y.style[e.isHorizontal()?I:"top"]=`${R}px`})}}T.forEach((A,v)=>{if(b.type==="fraction"&&(A.querySelectorAll(on(b.currentClass)).forEach(k=>{k.textContent=b.formatFractionCurrent(C+1)}),A.querySelectorAll(on(b.totalClass)).forEach(k=>{k.textContent=b.formatFractionTotal(O)})),b.type==="progressbar"){let k;b.progressbarOpposite?k=e.isHorizontal()?"vertical":"horizontal":k=e.isHorizontal()?"horizontal":"vertical";const N=(C+1)/O;let M=1,R=1;k==="horizontal"?M=N:R=N,A.querySelectorAll(on(b.progressbarFillClass)).forEach(I=>{I.style.transform=`translate3d(0,0,0) scaleX(${M}) scaleY(${R})`,I.style.transitionDuration=`${e.params.speed}ms`})}b.type==="custom"&&b.renderCustom?(an(A,b.renderCustom(e,C+1,O)),v===0&&r("paginationRender",A)):(v===0&&r("paginationRender",A),r("paginationUpdate",A)),e.params.watchOverflow&&e.enabled&&A.classList[e.isLocked?"add":"remove"](b.lockClass)})}function E(){const g=e.params.pagination;if(o())return;const b=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let T=e.pagination.el;T=Ne(T);let C="";if(g.type==="bullets"){let w=e.params.loop?Math.ceil(b/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&w>b&&(w=b);for(let S=0;S<w;S+=1)g.renderBullet?C+=g.renderBullet.call(e,S,g.bulletClass):C+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?C=g.renderFraction.call(e,g.currentClass,g.totalClass):C=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?C=g.renderProgressbar.call(e,g.progressbarFillClass):C=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],T.forEach(w=>{g.type!=="custom"&&an(w,C||""),g.type==="bullets"&&e.pagination.bullets.push(...w.querySelectorAll(on(g.bulletClass)))}),g.type!=="custom"&&r("paginationRender",T[0])}function c(){e.params.pagination=Zi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let b;typeof g.el=="string"&&e.isElement&&(b=e.el.querySelector(g.el)),!b&&typeof g.el=="string"&&(b=[...document.querySelectorAll(g.el)]),b||(b=g.el),!(!b||b.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(b)&&b.length>1&&(b=[...e.el.querySelectorAll(g.el)],b.length>1&&(b=b.find(T=>Di(T,".swiper")[0]===e.el))),Array.isArray(b)&&b.length===1&&(b=b[0]),Object.assign(e.pagination,{el:b}),b=Ne(b),b.forEach(T=>{g.type==="bullets"&&g.clickable&&T.classList.add(...(g.clickableClass||"").split(" ")),T.classList.add(g.modifierClass+g.type),T.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.type==="bullets"&&g.dynamicBullets&&(T.classList.add(`${g.modifierClass}${g.type}-dynamic`),s=0,g.dynamicMainBullets<1&&(g.dynamicMainBullets=1)),g.type==="progressbar"&&g.progressbarOpposite&&T.classList.add(g.progressbarOppositeClass),g.clickable&&T.addEventListener("click",d),e.enabled||T.classList.add(g.lockClass)}))}function x(){const g=e.params.pagination;if(o())return;let b=e.pagination.el;b&&(b=Ne(b),b.forEach(T=>{T.classList.remove(g.hiddenClass),T.classList.remove(g.modifierClass+g.type),T.classList.remove(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.clickable&&(T.classList.remove(...(g.clickableClass||"").split(" ")),T.removeEventListener("click",d))})),e.pagination.bullets&&e.pagination.bullets.forEach(T=>T.classList.remove(...g.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const g=e.params.pagination;let{el:b}=e.pagination;b=Ne(b),b.forEach(T=>{T.classList.remove(g.horizontalClass,g.verticalClass),T.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?m():(c(),E(),p())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&p()}),n("snapIndexChange",()=>{p()}),n("snapGridLengthChange",()=>{E(),p()}),n("destroy",()=>{x()}),n("enable disable",()=>{let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{p()}),n("click",(g,b)=>{const T=b.target,C=Ne(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&C&&C.length>0&&!T.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&T===e.navigation.nextEl||e.navigation.prevEl&&T===e.navigation.prevEl))return;const w=C[0].classList.contains(e.params.pagination.hiddenClass);r(w===!0?"paginationShow":"paginationHide"),C.forEach(S=>S.classList.toggle(e.params.pagination.hiddenClass))}});const h=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList.remove(e.params.pagination.paginationDisabledClass))),c(),E(),p()},m=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ne(g),g.forEach(b=>b.classList.add(e.params.pagination.paginationDisabledClass))),x()};Object.assign(e.pagination,{enable:h,disable:m,render:E,update:p,init:c,destroy:x})}function TT(){}function yT(){}function ts(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function ns(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wd={};function rs(e,t){return(wd.jsx?kd:vd).test(e)}const Nd=/[ \t\n\f\r]/g;function Id(e){return typeof e=="object"?e.type==="text"?as(e.value):!1:as(e)}function as(e){return e.replace(Nd,"")===""}class un{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}un.prototype.normal={},un.prototype.property={},un.prototype.space=void 0;function is(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new un(n,r,t)}function ln(e){return e.toLowerCase()}class $e{constructor(t,n){this.attribute=n,this.property=t}}$e.prototype.attribute="",$e.prototype.booleanish=!1,$e.prototype.boolean=!1,$e.prototype.commaOrSpaceSeparated=!1,$e.prototype.commaSeparated=!1,$e.prototype.defined=!1,$e.prototype.mustUseProperty=!1,$e.prototype.number=!1,$e.prototype.overloadedBoolean=!1,$e.prototype.property="",$e.prototype.spaceSeparated=!1,$e.prototype.space=void 0;let Ld=0;const le=kt(),we=kt(),qr=kt(),K=kt(),xe=kt(),$t=kt(),Ye=kt();function kt(){return 2**++Ld}const zr=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:we,commaOrSpaceSeparated:Ye,commaSeparated:$t,number:K,overloadedBoolean:qr,spaceSeparated:xe},Symbol.toStringTag,{value:"Module"})),Vr=Object.keys(zr);class Gr extends $e{constructor(t,n,r,a){let i=-1;if(super(t,n),ss(this,"space",a),typeof r=="number")for(;++i<Vr.length;){const s=Vr[i];ss(this,Vr[i],(r&zr[s])===zr[s])}}}Gr.prototype.defined=!0;function ss(e,t,n){n&&(e[t]=n)}function Ut(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Gr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ln(r)]=r,n[ln(i.attribute)]=r}return new un(t,n,e.space)}const os=Ut({properties:{ariaActiveDescendant:null,ariaAtomic:we,ariaAutoComplete:null,ariaBusy:we,ariaChecked:we,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:xe,ariaCurrent:null,ariaDescribedBy:xe,ariaDetails:null,ariaDisabled:we,ariaDropEffect:xe,ariaErrorMessage:null,ariaExpanded:we,ariaFlowTo:xe,ariaGrabbed:we,ariaHasPopup:null,ariaHidden:we,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xe,ariaLevel:K,ariaLive:null,ariaModal:we,ariaMultiLine:we,ariaMultiSelectable:we,ariaOrientation:null,ariaOwns:xe,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:we,ariaReadOnly:we,ariaRelevant:null,ariaRequired:we,ariaRoleDescription:xe,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:we,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function us(e,t){return t in e?e[t]:t}function ls(e,t){return us(e,t.toLowerCase())}const Od=Ut({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$t,acceptCharset:xe,accessKey:xe,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:xe,autoFocus:le,autoPlay:le,blocking:xe,capture:null,charSet:null,checked:le,cite:null,className:xe,cols:K,colSpan:null,content:null,contentEditable:we,controls:le,controlsList:xe,coords:K|$t,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:qr,draggable:we,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:xe,height:K,hidden:qr,high:K,href:null,hrefLang:null,htmlFor:xe,httpEquiv:xe,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:xe,itemRef:xe,itemScope:le,itemType:xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:le,optimum:K,pattern:null,ping:xe,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:xe,required:le,reversed:le,rows:K,rowSpan:K,sandbox:xe,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:we,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:we,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xe,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:we,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:ls}),Dd=Ut({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ye,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:xe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$t,g2:$t,glyphName:$t,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Ye,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:K,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ye,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ye,rev:Ye,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ye,requiredFeatures:Ye,requiredFonts:Ye,requiredFormats:Ye,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Ye,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ye,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ye,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:us}),cs=Ut({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ds=Ut({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ls}),fs=Ut({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pd={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Md=/[A-Z]/g,ps=/-[a-z]/g,Bd=/^data[-\w.:]+$/i;function Qn(e,t){const n=ln(t);let r=t,a=$e;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ps,Fd);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ps.test(i)){let s=i.replace(Md,Rd);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Gr}return new a(r,t)}function Rd(e){return"-"+e.toLowerCase()}function Fd(e){return e.charAt(1).toUpperCase()}const cn=is([os,Od,cs,ds,fs],"html"),gt=is([os,Dd,cs,ds,fs],"svg");function hs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function ms(e){return e.join(" ").trim()}function Yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qt={},Wr,gs;function Hd(){if(gs)return Wr;gs=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
43
+ `,l="/",d="*",p="",E="comment",c="declaration";function x(m,g){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];g=g||{};var b=1,T=1;function C(I){var y=I.match(t);y&&(b+=y.length);var F=I.lastIndexOf(u);T=~F?I.length-F:T+I.length}function w(){var I={line:b,column:T};return function(y){return y.position=new S(I),v(),y}}function S(I){this.start=I,this.end={line:b,column:T},this.source=g.source}S.prototype.content=m;function O(I){var y=new Error(g.source+":"+b+":"+T+": "+I);if(y.reason=I,y.filename=g.source,y.line=b,y.column=T,y.source=m,!g.silent)throw y}function A(I){var y=I.exec(m);if(y){var F=y[0];return C(F),m=m.slice(F.length),y}}function v(){A(n)}function k(I){var y;for(I=I||[];y=N();)y!==!1&&I.push(y);return I}function N(){var I=w();if(!(l!=m.charAt(0)||d!=m.charAt(1))){for(var y=2;p!=m.charAt(y)&&(d!=m.charAt(y)||l!=m.charAt(y+1));)++y;if(y+=2,p===m.charAt(y-1))return O("End of comment missing");var F=m.slice(2,y-2);return T+=2,C(F),m=m.slice(y),T+=2,I({type:E,comment:F})}}function M(){var I=w(),y=A(r);if(y){if(N(),!A(a))return O("property missing ':'");var F=A(i),U=I({type:c,property:h(y[0].replace(e,p)),value:F?h(F[0].replace(e,p)):p});return A(s),U}}function R(){var I=[];k(I);for(var y;y=M();)y!==!1&&(I.push(y),k(I));return I}return v(),R()}function h(m){return m?m.replace(o,p):p}return Wr=x,Wr}var Es;function $d(){if(Es)return qt;Es=1;var e=qt&&qt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=n;const t=e(Hd());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),o=typeof a=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:d}=u;o?a(l,d,u):d&&(i=i||{},i[l]=d)}),i}return qt}var dn={},bs;function Ud(){if(bs)return dn;bs=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(l){return!l||n.test(l)||e.test(l)},s=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),i(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(a,o):l=l.replace(r,o),l.replace(t,s))};return dn.camelCase=u,dn}var fn,Ts;function qd(){if(Ts)return fn;Ts=1;var e=fn&&fn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e($d()),n=Ud();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(o,u){o&&u&&(s[(0,n.camelCase)(o,i)]=u)}),s}return r.default=r,fn=r,fn}var zd=qd();const Vd=Yr(zd),Jn=ys("end"),nt=ys("start");function ys(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xs(e){const t=nt(e),n=Jn(e);if(t&&n)return{start:t,end:n}}function pn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cs(e.position):"start"in e||"end"in e?Cs(e):"line"in e||"column"in e?jr(e):""}function jr(e){return Ss(e&&e.line)+":"+Ss(e&&e.column)}function Cs(e){return jr(e&&e.start)+"-"+jr(e&&e.end)}function Ss(e){return e&&typeof e=="number"?e:1}class Me extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?i.ruleId=r:(i.source=r.slice(0,u),i.ruleId=r.slice(u+1))}if(!i.place&&i.ancestors&&i.ancestors){const u=i.ancestors[i.ancestors.length-1];u&&(i.place=u.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=o?o.line:void 0,this.name=pn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Me.prototype.file="",Me.prototype.name="",Me.prototype.reason="",Me.prototype.message="",Me.prototype.stack="",Me.prototype.column=void 0,Me.prototype.line=void 0,Me.prototype.ancestors=void 0,Me.prototype.cause=void 0,Me.prototype.fatal=void 0,Me.prototype.place=void 0,Me.prototype.ruleId=void 0,Me.prototype.source=void 0;const Xr={}.hasOwnProperty,Gd=new Map,Yd=/[A-Z]/g,Wd=new Set(["table","tbody","thead","tfoot","tr"]),jd=new Set(["td","th"]),As="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xd(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rf(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=nf(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?gt:cn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=_s(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function _s(e,t,n){if(t.type==="element")return Kd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Zd(e,t,n);if(t.type==="mdxjsEsm")return Jd(e,t);if(t.type==="root")return ef(e,t,n);if(t.type==="text")return tf(e,t)}function Kd(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=gt,e.schema=a),e.ancestors.push(t);const i=ks(e,t.tagName,!1),s=af(e,t);let o=Qr(e,t);return Wd.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Id(u):!0})),vs(e,s,i,t),Kr(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Qd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hn(e,t.position)}function Jd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hn(e,t.position)}function Zd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=gt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:ks(e,t.name,!0),s=sf(e,t),o=Qr(e,t);return vs(e,s,i,t),Kr(s,o),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function ef(e,t,n){const r={};return Kr(r,Qr(e,t)),e.create(t,e.Fragment,r,n)}function tf(e,t){return t.value}function vs(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nf(e,t,n){return r;function r(a,i,s,o){const l=Array.isArray(s.children)?n:t;return o?l(i,s,o):l(i,s)}}function rf(e,t){return n;function n(r,a,i,s){const o=Array.isArray(i.children),u=nt(r);return t(a,i,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function af(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Xr.call(t.properties,a)){const i=of(e,a,t.properties[a]);if(i){const[s,o]=i;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&jd.has(t.tagName)?r=o:n[s]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function sf(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else hn(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else hn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Qr(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Gd;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const u=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(u){const l=a.get(u)||0;s=u+"-"+l,a.set(u,l+1)}}const o=_s(e,i,s);o!==void 0&&n.push(o)}return n}function of(e,t,n){const r=Qn(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ns(n):ms(n)),r.property==="style"){let a=typeof n=="object"?n:uf(e,String(n));return e.stylePropertyNameCase==="css"&&(a=lf(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Pd[r.property]||r.property:r.attribute,n]}}function uf(e,t){try{return Vd(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Me("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=As+"#cannot-parse-style-attribute",a}}function ks(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const o=rs(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=s}else r=rs(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Xr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);hn(e)}function hn(e,t){const n=new Me("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=As+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lf(e){const t={};let n;for(n in e)Xr.call(e,n)&&(t[cf(n)]=e[n]);return t}function cf(e){let t=e.replace(Yd,df);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function df(e){return"-"+e.toLowerCase()}const Jr={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ff={};function pf(e,t){const n=ff,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ws(e,r,a)}function ws(e,t,n){if(hf(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ns(e.children,t,n)}return Array.isArray(e)?Ns(e,t,n):""}function Ns(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ws(e[a],t,n);return r.join("")}function hf(e){return!!(e&&typeof e=="object")}const Is=document.createElement("i");function mn(e){const t="&"+e+";";Is.innerHTML=t;const n=Is.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function rt(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Qe(e,t){return e.length>0?(rt(e,e.length,0,t),e):t}const Ls={}.hasOwnProperty;function mf(e){const t={};let n=-1;for(;++n<e.length;)gf(t,e[n]);return t}function gf(e,t){let n;for(n in t){const a=(Ls.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){Ls.call(a,s)||(a[s]=[]);const o=i[s];Ef(a[s],Array.isArray(o)?o:o?[o]:[])}}}function Ef(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);rt(e,0,0,r)}function Os(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const at=Et(/[A-Za-z]/),We=Et(/[\dA-Za-z]/),bf=Et(/[#-'*+\--9=?A-Z^-~]/);function Zr(e){return e!==null&&(e<32||e===127)}const ea=Et(/\d/),Tf=Et(/[\dA-Fa-f]/),yf=Et(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<-2}function ve(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const gn=Et(new RegExp("\\p{P}|\\p{S}","u")),En=Et(/\s/);function Et(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Vt(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&We(e.charCodeAt(n+1))&&We(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(s=String.fromCharCode(i,o),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function me(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(u){return he(u)?(e.enter(n),o(u)):t(u)}function o(u){return he(u)&&i++<a?(e.consume(u),o):(e.exit(n),t(u))}}const xf={tokenize:Cf};function Cf(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),me(e,t,"linePrefix")}function a(o){return e.enter("paragraph"),i(o)}function i(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ne(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),s)}}const Sf={tokenize:Af},Ds={tokenize:_f};function Af(e){const t=this,n=[];let r=0,a,i,s;return o;function o(T){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,u,l)(T)}return l(T)}function u(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&b();const C=t.events.length;let w=C,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}g(r);let O=C;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return rt(t.events,w+1,0,t.events.slice(C)),t.events.length=O,l(T)}return o(T)}function l(T){if(r===n.length){if(!a)return E(T);if(a.currentConstruct&&a.currentConstruct.concrete)return x(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ds,d,p)(T)}function d(T){return a&&b(),g(r),E(T)}function p(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,x(T)}function E(T){return t.containerState={},e.attempt(Ds,c,x)(T)}function c(T){return r++,n.push([t.currentConstruct,t.containerState]),E(T)}function x(T){if(T===null){a&&b(),g(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),h(T)}function h(T){if(T===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(T);return}return ne(T)?(e.consume(T),m(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(T),h)}function m(T,C){const w=t.sliceStream(T);if(C&&w.push(null),T.previous=i,i&&(i.next=T),i=T,a.defineSkip(T.start),a.write(w),t.parser.lazy[T.start.line]){let S=a.events.length;for(;S--;)if(a.events[S][1].start.offset<s&&(!a.events[S][1].end||a.events[S][1].end.offset>s))return;const O=t.events.length;let A=O,v,k;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(v){k=t.events[A][1].end;break}v=!0}for(g(r),S=O;S<t.events.length;)t.events[S][1].end={...k},S++;rt(t.events,A+1,0,t.events.slice(O)),t.events.length=S}}function g(T){let C=n.length;for(;C-- >T;){const w=n[C];t.containerState=w[1],w[0].exit.call(t,e)}n.length=T}function b(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function _f(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ps(e){if(e===null||ve(e)||En(e))return 1;if(gn(e))return 2}function ta(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const na={name:"attention",resolveAll:vf,tokenize:kf};function vf(e,t){let n=-1,r,a,i,s,o,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},E={...e[n][1].start};Ms(p,-u),Ms(E,u),s={type:u>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},i={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Qe(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Qe(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Qe(l,ta(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Qe(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=Qe(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,rt(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function kf(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Ps(r);let i;return s;function s(u){return i=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===i)return e.consume(u),o;const l=e.exit("attentionSequence"),d=Ps(u),p=!d||d===2&&a||n.includes(u),E=!a||a===2&&d||n.includes(r);return l._open=!!(i===42?p:p&&(a||!E)),l._close=!!(i===42?E:E&&(d||!p)),t(u)}}function Ms(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wf={name:"autolink",tokenize:Nf};function Nf(e,t,n){let r=0;return a;function a(c){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(c){return at(c)?(e.consume(c),s):c===64?n(c):l(c)}function s(c){return c===43||c===45||c===46||We(c)?(r=1,o(c)):l(c)}function o(c){return c===58?(e.consume(c),r=0,u):(c===43||c===45||c===46||We(c))&&r++<32?(e.consume(c),o):(r=0,l(c))}function u(c){return c===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.exit("autolink"),t):c===null||c===32||c===60||Zr(c)?n(c):(e.consume(c),u)}function l(c){return c===64?(e.consume(c),d):bf(c)?(e.consume(c),l):n(c)}function d(c){return We(c)?p(c):n(c)}function p(c){return c===46?(e.consume(c),r=0,d):c===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(c),e.exit("autolinkMarker"),e.exit("autolink"),t):E(c)}function E(c){if((c===45||We(c))&&r++<63){const x=c===45?E:p;return e.consume(c),x}return n(c)}}const Zn={partial:!0,tokenize:If};function If(e,t,n){return r;function r(i){return he(i)?me(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ne(i)?t(i):n(i)}}const Bs={continuation:{tokenize:Of},exit:Df,name:"blockQuote",tokenize:Lf};function Lf(e,t,n){const r=this;return a;function a(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return he(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Of(e,t,n){const r=this;return a;function a(s){return he(s)?me(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Bs,t,n)(s)}}function Df(e){e.exit("blockQuote")}const Rs={name:"characterEscape",tokenize:Pf};function Pf(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return yf(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Fs={name:"characterReference",tokenize:Mf};function Mf(e,t,n){const r=this;let a=0,i,s;return o;function o(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),u}function u(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=We,d(p))}function l(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=Tf,d):(e.enter("characterReferenceValue"),i=7,s=ea,d(p))}function d(p){if(p===59&&a){const E=e.exit("characterReferenceValue");return s===We&&!mn(r.sliceSerialize(E))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&a++<i?(e.consume(p),d):n(p)}}const Hs={partial:!0,tokenize:Rf},$s={concrete:!0,name:"codeFenced",tokenize:Bf};function Bf(e,t,n){const r=this,a={partial:!0,tokenize:w};let i=0,s=0,o;return u;function u(S){return l(S)}function l(S){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(S)}function d(S){return S===o?(s++,e.consume(S),d):s<3?n(S):(e.exit("codeFencedFenceSequence"),he(S)?me(e,p,"whitespace")(S):p(S))}function p(S){return S===null||ne(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Hs,h,C)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(S))}function E(S){return S===null||ne(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(S)):he(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,c,"whitespace")(S)):S===96&&S===o?n(S):(e.consume(S),E)}function c(S){return S===null||ne(S)?p(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===null||ne(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(S)):S===96&&S===o?n(S):(e.consume(S),x)}function h(S){return e.attempt(a,C,m)(S)}function m(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return i>0&&he(S)?me(e,b,"linePrefix",i+1)(S):b(S)}function b(S){return S===null||ne(S)?e.check(Hs,h,C)(S):(e.enter("codeFlowValue"),T(S))}function T(S){return S===null||ne(S)?(e.exit("codeFlowValue"),b(S)):(e.consume(S),T)}function C(S){return e.exit("codeFenced"),t(S)}function w(S,O,A){let v=0;return k;function k(y){return S.enter("lineEnding"),S.consume(y),S.exit("lineEnding"),N}function N(y){return S.enter("codeFencedFence"),he(y)?me(S,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):M(y)}function M(y){return y===o?(S.enter("codeFencedFenceSequence"),R(y)):A(y)}function R(y){return y===o?(v++,S.consume(y),R):v>=s?(S.exit("codeFencedFenceSequence"),he(y)?me(S,I,"whitespace")(y):I(y)):A(y)}function I(y){return y===null||ne(y)?(S.exit("codeFencedFence"),O(y)):A(y)}}}function Rf(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ra={name:"codeIndented",tokenize:Hf},Ff={partial:!0,tokenize:$f};function Hf(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),me(e,i,"linePrefix",5)(l)}function i(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):ne(l)?e.attempt(Ff,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ne(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function $f(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):me(e,i,"linePrefix",5)(s)}function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ne(s)?a(s):n(s)}}const Uf={name:"codeText",previous:zf,resolve:qf,tokenize:Vf};function qf(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function zf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Vf(e,t,n){let r=0,a,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),o(p)}function o(p){return p===96?(e.consume(p),r++,o):(e.exit("codeTextSequence"),u(p))}function u(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),u):p===96?(i=e.enter("codeTextSequence"),a=0,d(p)):ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(p))}function l(p){return p===null||p===32||p===96||ne(p)?(e.exit("codeTextData"),u(p)):(e.consume(p),l)}function d(p){return p===96?(e.consume(p),a++,d):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",l(p))}}class Gf{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&bn(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);bn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bn(this.left,n.reverse())}}}function bn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Us(e){const t={};let n=-1,r,a,i,s,o,u,l;const d=new Gf(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,i=0,i<u.length&&u[i][1].type==="lineEndingBlank"&&(i+=2),i<u.length&&u[i][1].type==="content"))for(;++i<u.length&&u[i][1].type!=="content";)u[i][1].type==="chunkText"&&(u[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Yf(d,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=d.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},o=d.slice(a,n),o.unshift(r),d.splice(a,n-a+1,o))}}return rt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function Yf(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let d,p,E=-1,c=n,x=0,h=0;const m=[h];for(;c;){for(;e.get(++a)[1]!==c;);i.push(a),c._tokenizer||(d=r.sliceStream(c),c.next||d.push(null),p&&s.defineSkip(c.start),c._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),c._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=c,c=c.next}for(c=n;++E<o.length;)o[E][0]==="exit"&&o[E-1][0]==="enter"&&o[E][1].type===o[E-1][1].type&&o[E][1].start.line!==o[E][1].end.line&&(h=E+1,m.push(h),c._tokenizer=void 0,c.previous=void 0,c=c.next);for(s.events=[],c?(c._tokenizer=void 0,c.previous=void 0):m.pop(),E=m.length;E--;){const g=o.slice(m[E],m[E+1]),b=i.pop();u.push([b,b+g.length-1]),e.splice(b,2,g)}for(u.reverse(),E=-1;++E<u.length;)l[x+u[E][0]]=x+u[E][1],x+=u[E][1]-u[E][0]-1;return l}const Wf={resolve:Xf,tokenize:Kf},jf={partial:!0,tokenize:Qf};function Xf(e){return Us(e),e}function Kf(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(o)}function a(o){return o===null?i(o):ne(o)?e.check(jf,s,i)(o):(e.consume(o),a)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Qf(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,i,"linePrefix")}function i(s){if(s===null||ne(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function qs(e,t,n,r,a,i,s,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return p;function p(g){return g===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(g),e.exit(i),E):g===null||g===32||g===41||Zr(g)?n(g):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),h(g))}function E(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),c(g))}function c(g){return g===62?(e.exit("chunkString"),e.exit(o),E(g)):g===null||g===60||ne(g)?n(g):(e.consume(g),g===92?x:c)}function x(g){return g===60||g===62||g===92?(e.consume(g),c):c(g)}function h(g){return!d&&(g===null||g===41||ve(g))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(g)):d<l&&g===40?(e.consume(g),d++,h):g===41?(e.consume(g),d--,h):g===null||g===32||g===40||Zr(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===40||g===41||g===92?(e.consume(g),h):h(g)}}function zs(e,t,n,r,a,i){const s=this;let o=0,u;return l;function l(c){return e.enter(r),e.enter(a),e.consume(c),e.exit(a),e.enter(i),d}function d(c){return o>999||c===null||c===91||c===93&&!u||c===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):c===93?(e.exit(i),e.enter(a),e.consume(c),e.exit(a),e.exit(r),t):ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(c))}function p(c){return c===null||c===91||c===93||ne(c)||o++>999?(e.exit("chunkString"),d(c)):(e.consume(c),u||(u=!he(c)),c===92?E:p)}function E(c){return c===91||c===92||c===93?(e.consume(c),o++,p):p(c)}}function Vs(e,t,n,r,a,i){let s;return o;function o(E){return E===34||E===39||E===40?(e.enter(r),e.enter(a),e.consume(E),e.exit(a),s=E===40?41:E,u):n(E)}function u(E){return E===s?(e.enter(a),e.consume(E),e.exit(a),e.exit(r),t):(e.enter(i),l(E))}function l(E){return E===s?(e.exit(i),u(s)):E===null?n(E):ne(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),me(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===s||E===null||ne(E)?(e.exit("chunkString"),l(E)):(e.consume(E),E===92?p:d)}function p(E){return E===s||E===92?(e.consume(E),d):d(E)}}function ct(e,t){let n;return r;function r(a){return ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):he(a)?me(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Jf={name:"definition",tokenize:ep},Zf={partial:!0,tokenize:tp};function ep(e,t,n){const r=this;let a;return i;function i(c){return e.enter("definition"),s(c)}function s(c){return zs.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function o(c){return a=zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),c===58?(e.enter("definitionMarker"),e.consume(c),e.exit("definitionMarker"),u):n(c)}function u(c){return ve(c)?ct(e,l)(c):l(c)}function l(c){return qs(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(c)}function d(c){return e.attempt(Zf,p,p)(c)}function p(c){return he(c)?me(e,E,"whitespace")(c):E(c)}function E(c){return c===null||ne(c)?(e.exit("definition"),r.parser.defined.push(a),t(c)):n(c)}}function tp(e,t,n){return r;function r(o){return ve(o)?ct(e,a)(o):n(o)}function a(o){return Vs(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return he(o)?me(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ne(o)?t(o):n(o)}}const np={name:"hardBreakEscape",tokenize:rp};function rp(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ne(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const ap={name:"headingAtx",resolve:ip,tokenize:sp};function ip(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},rt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function sp(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ve(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||ne(d)?(e.exit("atxHeading"),t(d)):he(d)?me(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||ve(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const op=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gs=["pre","script","style","textarea"],up={concrete:!0,name:"htmlFlow",resolveTo:dp,tokenize:fp},lp={partial:!0,tokenize:hp},cp={partial:!0,tokenize:pp};function dp(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fp(e,t,n){const r=this;let a,i,s,o,u;return l;function l(P){return d(P)}function d(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),p}function p(P){return P===33?(e.consume(P),E):P===47?(e.consume(P),i=!0,h):P===63?(e.consume(P),a=3,r.interrupt?t:_):at(P)?(e.consume(P),s=String.fromCharCode(P),m):n(P)}function E(P){return P===45?(e.consume(P),a=2,c):P===91?(e.consume(P),a=5,o=0,x):at(P)?(e.consume(P),a=4,r.interrupt?t:_):n(P)}function c(P){return P===45?(e.consume(P),r.interrupt?t:_):n(P)}function x(P){const ee="CDATA[";return P===ee.charCodeAt(o++)?(e.consume(P),o===ee.length?r.interrupt?t:M:x):n(P)}function h(P){return at(P)?(e.consume(P),s=String.fromCharCode(P),m):n(P)}function m(P){if(P===null||P===47||P===62||ve(P)){const ee=P===47,te=s.toLowerCase();return!ee&&!i&&Gs.includes(te)?(a=1,r.interrupt?t(P):M(P)):op.includes(s.toLowerCase())?(a=6,ee?(e.consume(P),g):r.interrupt?t(P):M(P)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):i?b(P):T(P))}return P===45||We(P)?(e.consume(P),s+=String.fromCharCode(P),m):n(P)}function g(P){return P===62?(e.consume(P),r.interrupt?t:M):n(P)}function b(P){return he(P)?(e.consume(P),b):k(P)}function T(P){return P===47?(e.consume(P),k):P===58||P===95||at(P)?(e.consume(P),C):he(P)?(e.consume(P),T):k(P)}function C(P){return P===45||P===46||P===58||P===95||We(P)?(e.consume(P),C):w(P)}function w(P){return P===61?(e.consume(P),S):he(P)?(e.consume(P),w):T(P)}function S(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),u=P,O):he(P)?(e.consume(P),S):A(P)}function O(P){return P===u?(e.consume(P),u=null,v):P===null||ne(P)?n(P):(e.consume(P),O)}function A(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ve(P)?w(P):(e.consume(P),A)}function v(P){return P===47||P===62||he(P)?T(P):n(P)}function k(P){return P===62?(e.consume(P),N):n(P)}function N(P){return P===null||ne(P)?M(P):he(P)?(e.consume(P),N):n(P)}function M(P){return P===45&&a===2?(e.consume(P),F):P===60&&a===1?(e.consume(P),U):P===62&&a===4?(e.consume(P),Y):P===63&&a===3?(e.consume(P),_):P===93&&a===5?(e.consume(P),V):ne(P)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(lp,J,R)(P)):P===null||ne(P)?(e.exit("htmlFlowData"),R(P)):(e.consume(P),M)}function R(P){return e.check(cp,I,J)(P)}function I(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),y}function y(P){return P===null||ne(P)?R(P):(e.enter("htmlFlowData"),M(P))}function F(P){return P===45?(e.consume(P),_):M(P)}function U(P){return P===47?(e.consume(P),s="",$):M(P)}function $(P){if(P===62){const ee=s.toLowerCase();return Gs.includes(ee)?(e.consume(P),Y):M(P)}return at(P)&&s.length<8?(e.consume(P),s+=String.fromCharCode(P),$):M(P)}function V(P){return P===93?(e.consume(P),_):M(P)}function _(P){return P===62?(e.consume(P),Y):P===45&&a===2?(e.consume(P),_):M(P)}function Y(P){return P===null||ne(P)?(e.exit("htmlFlowData"),J(P)):(e.consume(P),Y)}function J(P){return e.exit("htmlFlow"),t(P)}}function pp(e,t,n){const r=this;return a;function a(s){return ne(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function hp(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Zn,t,n)}}const mp={name:"htmlText",tokenize:gp};function gp(e,t,n){const r=this;let a,i,s;return o;function o(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),l):_===47?(e.consume(_),w):_===63?(e.consume(_),T):at(_)?(e.consume(_),A):n(_)}function l(_){return _===45?(e.consume(_),d):_===91?(e.consume(_),i=0,x):at(_)?(e.consume(_),b):n(_)}function d(_){return _===45?(e.consume(_),c):n(_)}function p(_){return _===null?n(_):_===45?(e.consume(_),E):ne(_)?(s=p,U(_)):(e.consume(_),p)}function E(_){return _===45?(e.consume(_),c):p(_)}function c(_){return _===62?F(_):_===45?E(_):p(_)}function x(_){const Y="CDATA[";return _===Y.charCodeAt(i++)?(e.consume(_),i===Y.length?h:x):n(_)}function h(_){return _===null?n(_):_===93?(e.consume(_),m):ne(_)?(s=h,U(_)):(e.consume(_),h)}function m(_){return _===93?(e.consume(_),g):h(_)}function g(_){return _===62?F(_):_===93?(e.consume(_),g):h(_)}function b(_){return _===null||_===62?F(_):ne(_)?(s=b,U(_)):(e.consume(_),b)}function T(_){return _===null?n(_):_===63?(e.consume(_),C):ne(_)?(s=T,U(_)):(e.consume(_),T)}function C(_){return _===62?F(_):T(_)}function w(_){return at(_)?(e.consume(_),S):n(_)}function S(_){return _===45||We(_)?(e.consume(_),S):O(_)}function O(_){return ne(_)?(s=O,U(_)):he(_)?(e.consume(_),O):F(_)}function A(_){return _===45||We(_)?(e.consume(_),A):_===47||_===62||ve(_)?v(_):n(_)}function v(_){return _===47?(e.consume(_),F):_===58||_===95||at(_)?(e.consume(_),k):ne(_)?(s=v,U(_)):he(_)?(e.consume(_),v):F(_)}function k(_){return _===45||_===46||_===58||_===95||We(_)?(e.consume(_),k):N(_)}function N(_){return _===61?(e.consume(_),M):ne(_)?(s=N,U(_)):he(_)?(e.consume(_),N):v(_)}function M(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),a=_,R):ne(_)?(s=M,U(_)):he(_)?(e.consume(_),M):(e.consume(_),I)}function R(_){return _===a?(e.consume(_),a=void 0,y):_===null?n(_):ne(_)?(s=R,U(_)):(e.consume(_),R)}function I(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||ve(_)?v(_):(e.consume(_),I)}function y(_){return _===47||_===62||ve(_)?v(_):n(_)}function F(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function U(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),$}function $(_){return he(_)?me(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):V(_)}function V(_){return e.enter("htmlTextData"),s(_)}}const aa={name:"labelEnd",resolveAll:yp,resolveTo:xp,tokenize:Cp},Ep={tokenize:Sp},bp={tokenize:Ap},Tp={tokenize:_p};function yp(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&rt(e,0,e.length,n),e}function xp(e,t){let n=e.length,r=0,a,i,s,o;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const u={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Qe(o,e.slice(i+1,i+r+3)),o=Qe(o,[["enter",d,t]]),o=Qe(o,ta(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),o=Qe(o,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),o=Qe(o,e.slice(s+1)),o=Qe(o,[["exit",u,t]]),rt(e,i,e.length,o),e}function Cp(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return o;function o(E){return i?i._inactive?p(E):(s=r.parser.defined.includes(zt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),u):n(E)}function u(E){return E===40?e.attempt(Ep,d,s?d:p)(E):E===91?e.attempt(bp,d,s?l:p)(E):s?d(E):p(E)}function l(E){return e.attempt(Tp,d,p)(E)}function d(E){return t(E)}function p(E){return i._balanced=!0,n(E)}}function Sp(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return ve(p)?ct(e,i)(p):i(p)}function i(p){return p===41?d(p):qs(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return ve(p)?ct(e,u)(p):d(p)}function o(p){return n(p)}function u(p){return p===34||p===39||p===40?Vs(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function l(p){return ve(p)?ct(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ap(e,t,n){const r=this;return a;function a(o){return zs.call(r,e,i,s,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function _p(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const vp={name:"labelStartImage",resolveAll:aa.resolveAll,tokenize:kp};function kp(e,t,n){const r=this;return a;function a(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const wp={name:"labelStartLink",resolveAll:aa.resolveAll,tokenize:Np};function Np(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const ia={name:"lineEnding",tokenize:Ip};function Ip(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),me(e,t,"linePrefix")}}const er={name:"thematicBreak",tokenize:Lp};function Lp(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,o(l)}function o(l){return l===a?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||ne(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===a?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),he(l)?me(e,o,"whitespace")(l):o(l))}}const Ue={continuation:{tokenize:Mp},exit:Rp,name:"list",tokenize:Pp},Op={partial:!0,tokenize:Fp},Dp={partial:!0,tokenize:Bp};function Pp(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return o;function o(c){const x=r.containerState.type||(c===42||c===43||c===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||c===r.containerState.marker:ea(c)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),c===42||c===45?e.check(er,n,l)(c):l(c);if(!r.interrupt||c===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(c)}return n(c)}function u(c){return ea(c)&&++s<10?(e.consume(c),u):(!r.interrupt||s<2)&&(r.containerState.marker?c===r.containerState.marker:c===41||c===46)?(e.exit("listItemValue"),l(c)):n(c)}function l(c){return e.enter("listItemMarker"),e.consume(c),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||c,e.check(Zn,r.interrupt?n:d,e.attempt(Op,E,p))}function d(c){return r.containerState.initialBlankLine=!0,i++,E(c)}function p(c){return he(c)?(e.enter("listItemPrefixWhitespace"),e.consume(c),e.exit("listItemPrefixWhitespace"),E):n(c)}function E(c){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(c)}}function Mp(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Zn,a,i);function a(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,me(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!he(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Dp,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,me(e,e.attempt(Ue,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Bp(e,t,n){const r=this;return me(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function Rp(e){e.exit(this.containerState.type)}function Fp(e,t,n){const r=this;return me(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!he(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Ys={name:"setextUnderline",resolveTo:Hp,tokenize:$p};function Hp(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function $p(e,t,n){const r=this;let a;return i;function i(l){let d=r.events.length,p;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){p=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===a?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),he(l)?me(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||ne(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Up={tokenize:qp};function qp(e){const t=this,n=e.attempt(Zn,r,e.attempt(this.parser.constructs.flowInitial,a,me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Wf,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zp={resolveAll:js()},Vp=Ws("string"),Gp=Ws("text");function Ws(e){return{resolveAll:js(e==="text"?Yp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,o);return s;function s(d){return l(d)?i(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),i(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const p=a[d];let E=-1;if(p)for(;++E<p.length;){const c=p[E];if(!c.previous||c.previous.call(r,r.previous))return!0}return!1}}}function js(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function Yp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,o=0,u;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const Wp=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Jf},disable:{null:[]},document:{42:Ue,43:Ue,45:Ue,48:Ue,49:Ue,50:Ue,51:Ue,52:Ue,53:Ue,54:Ue,55:Ue,56:Ue,57:Ue,62:Bs},flow:{35:ap,42:er,45:[Ys,er],60:up,61:Ys,95:er,96:$s,126:$s},flowInitial:{[-2]:ra,[-1]:ra,32:ra},insideSpan:{null:[na,zp]},string:{38:Fs,92:Rs},text:{[-5]:ia,[-4]:ia,[-3]:ia,33:vp,38:Fs,42:na,60:[wf,mp],91:wp,92:[np,Rs],93:aa,95:na,96:Uf}},Symbol.toStringTag,{value:"Module"}));function jp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],o=[];const u={attempt:O(w),check:O(S),consume:b,enter:T,exit:C,interrupt:O(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:x,parser:e,previous:null,sliceSerialize:E,sliceStream:c,write:p};let d=t.tokenize.call(l,u);return t.resolveAll&&i.push(t),l;function p(N){return s=Qe(s,N),m(),s[s.length-1]!==null?[]:(A(t,0),l.events=ta(i,l.events,l),l.events)}function E(N,M){return Kp(c(N),M)}function c(N){return Xp(s,N)}function x(){const{_bufferIndex:N,_index:M,line:R,column:I,offset:y}=r;return{_bufferIndex:N,_index:M,line:R,column:I,offset:y}}function h(N){a[N.line]=N.column,k()}function m(){let N;for(;r._index<s.length;){const M=s[r._index];if(typeof M=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<M.length;)g(M.charCodeAt(r._bufferIndex));else g(M)}}function g(N){d=d(N)}function b(N){ne(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=N}function T(N,M){const R=M||{};return R.type=N,R.start=x(),l.events.push(["enter",R,l]),o.push(R),R}function C(N){const M=o.pop();return M.end=x(),l.events.push(["exit",M,l]),M}function w(N,M){A(N,M.from)}function S(N,M){M.restore()}function O(N,M){return R;function R(I,y,F){let U,$,V,_;return Array.isArray(I)?J(I):"tokenize"in I?J([I]):Y(I);function Y(ae){return Q;function Q(re){const oe=re!==null&&ae[re],ge=re!==null&&ae.null,Oe=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return J(Oe)(re)}}function J(ae){return U=ae,$=0,ae.length===0?F:P(ae[$])}function P(ae){return Q;function Q(re){return _=v(),V=ae,ae.partial||(l.currentConstruct=ae),ae.name&&l.parser.constructs.disable.null.includes(ae.name)?te():ae.tokenize.call(M?Object.assign(Object.create(l),M):l,u,ee,te)(re)}}function ee(ae){return N(V,_),y}function te(ae){return _.restore(),++$<U.length?P(U[$]):F}}}function A(N,M){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&rt(l.events,M,l.events.length-M,N.resolve(l.events.slice(M),l)),N.resolveTo&&(l.events=N.resolveTo(l.events,l))}function v(){const N=x(),M=l.previous,R=l.currentConstruct,I=l.events.length,y=Array.from(o);return{from:I,restore:F};function F(){r=N,l.previous=M,l.currentConstruct=R,l.events.length=I,o=y,k()}}function k(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Xp(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function Kp(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
44
44
  `;break}case-3:{s=`\r
45
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function Qp(e){const r={constructs:mf([Wp,...(e||{}).extensions||[]]),content:a(xf),defined:[],document:a(Sf),flow:a(Up),lazy:{},string:a(Vp),text:a(Gp)};return r;function a(i){return s;function s(o){return jp(r,i,o)}}}function Jp(e){for(;!Us(e););return e}const Xs=/[\0\t\n\r]/g;function Zp(){let e=1,t="",n=!0,r;return a;function a(i,s,o){const u=[];let l,d,p,E,c;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Xs.lastIndex=p,l=Xs.exec(i),E=l&&l.index!==void 0?l.index:i.length,c=i.charCodeAt(E),!l){t=i.slice(p);break}if(c===10&&p===E&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),p<E&&(u.push(i.slice(p,E)),e+=E-p),c){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}p=E+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const eh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function th(e){return e.replace(eh,nh)}function nh(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return Os(n.slice(i?2:1),i?16:10)}return mn(n)||e}const Ks={}.hasOwnProperty;function rh(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ah(n)(Jp(Qp(n).document().write(Zp()(e,t,!0))))}function ah(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ar),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(en),blockQuote:i(ge),characterEscape:S,characterReference:S,codeFenced:i(Oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Oe,s),codeText:i(Pe,s),codeTextData:S,data:S,codeFlowValue:S,definition:i(ot),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Zt),hardBreakEscape:i(Cr),hardBreakTrailing:i(Cr),htmlFlow:i(ft,s),htmlFlowData:S,htmlText:i(ft,s),htmlTextData:S,image:i(Sr),label:s,link:i(Ar),listItem:i(ri),listItemValue:E,listOrdered:i(tn,p),listUnordered:i(tn),paragraph:i(ai),reference:P,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(en),strong:i(ii),thematicBreak:i(oi)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:oe,autolinkProtocol:re,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ae,characterReference:Q,codeFenced:u(m),codeFencedFence:h,codeFencedFenceInfo:c,codeFencedFenceMeta:y,codeFlowValue:k,codeIndented:u(g),codeText:u(x),codeTextData:k,data:k,definition:u(),definitionDestinationString:_,definitionLabelString:b,definitionTitleString:T,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(B),htmlFlowData:k,htmlText:u(N),htmlTextData:k,image:u(U),label:V,labelText:$,lineEnding:I,link:u(H),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ee,resourceDestinationString:v,resourceTitleString:Y,resource:J,setextHeading:u(A),setextHeadingLineSequence:O,setextHeadingText:C,strong:u(),thematicBreak:u()}};Qs(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let Z={type:"root",children:[]};const se={stack:[Z],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:d,data:n},fe=[];let be=-1;for(;++be<W.length;)if(W[be][1].type==="listOrdered"||W[be][1].type==="listUnordered")if(W[be][0]==="enter")fe.push(be);else{const je=fe.pop();be=a(W,je,be)}for(be=-1;++be<W.length;){const je=t[W[be][0]];Ks.call(je,W[be][1].type)&&je[W[be][1].type].call(Object.assign({sliceSerialize:W[be][2].sliceSerialize},se),W[be][1])}if(se.tokenStack.length>0){const je=se.tokenStack[se.tokenStack.length-1];(je[1]||Js).call(se,void 0,je[0])}for(Z.position={start:bt(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:bt(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)Z=t.transforms[be](Z)||Z;return Z}function a(W,Z,se){let fe=Z-1,be=-1,je=!1,ut,et,Dt,Pt;for(;++fe<=se;){const He=W[fe];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?be++:be--,Pt=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(ut&&!Pt&&!be&&!Dt&&(Dt=fe),Pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pt=void 0}if(!be&&He[0]==="enter"&&He[1].type==="listItemPrefix"||be===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(ut){let St=fe;for(et=void 0;St--;){const ze=W[St];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;et&&(W[et][1].type="lineEndingBlank",je=!0),ze[1].type="lineEnding",et=St}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}Dt&&(!et||Dt<et)&&(ut._spread=!0),ut.end=Object.assign({},et?W[et][1].start:He[1].end),W.splice(et||fe,0,["exit",ut,He[2]]),fe++,se++}if(He[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};ut=St,W.splice(fe,0,["enter",St,He[2]]),fe++,se++,Dt=void 0,Pt=!0}}}return W[Z][1]._spread=je,se}function i(W,Z){return se;function se(fe){o.call(this,W(fe),fe),Z&&Z.call(this,fe)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(W,Z,se){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([Z,se||void 0]),W.position={start:bt(Z.start),end:void 0}}function u(W){return Z;function Z(se){W&&W.call(this,se),l.call(this,se)}}function l(W,Z){const se=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==W.type&&(Z?Z.call(this,W,fe[0]):(fe[1]||Js).call(this,W,fe[0]));else throw new Error("Cannot close `"+W.type+"` ("+pn({start:W.start,end:W.end})+"): it’s not open");se.position.end=bt(W.end)}function d(){return pf(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function E(W){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function c(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=W}function y(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=W}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W.replace(/(\r?\n|\r)$/g,"")}function b(W){const Z=this.resume(),se=this.stack[this.stack.length-1];se.label=Z,se.identifier=zt(this.sliceSerialize(W)).toLowerCase()}function T(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.title=W}function _(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.url=W}function w(W){const Z=this.stack[this.stack.length-1];if(!Z.depth){const se=this.sliceSerialize(W).length;Z.depth=se}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function O(W){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function S(W){const se=this.stack[this.stack.length-1].children;let fe=se[se.length-1];(!fe||fe.type!=="text")&&(fe=si(),fe.position={start:bt(W.start),end:void 0},se.push(fe)),this.stack.push(fe)}function k(W){const Z=this.stack.pop();Z.value+=this.sliceSerialize(W),Z.position.end=bt(W.end)}function I(W){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=Z.children[Z.children.length-1];se.position.end=bt(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(S.call(this,W),k.call(this,W))}function M(){this.data.atHardBreak=!0}function B(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function N(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function x(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function H(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function $(W){const Z=this.sliceSerialize(W),se=this.stack[this.stack.length-2];se.label=th(Z),se.identifier=zt(Z).toLowerCase()}function V(){const W=this.stack[this.stack.length-1],Z=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const fe=W.children;se.children=fe}else se.alt=Z}function v(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.url=W}function Y(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.title=W}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ee(W){const Z=this.resume(),se=this.stack[this.stack.length-1];se.label=Z,se.identifier=zt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function te(W){this.data.characterReferenceType=W.type}function ae(W){const Z=this.sliceSerialize(W),se=this.data.characterReferenceType;let fe;se?(fe=Os(Z,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=mn(Z);const be=this.stack[this.stack.length-1];be.value+=fe}function Q(W){const Z=this.stack.pop();Z.position.end=bt(W.end)}function re(W){k.call(this,W);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(W)}function oe(W){k.call(this,W);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(W)}function ge(){return{type:"blockquote",children:[]}}function Oe(){return{type:"code",lang:null,meta:null,value:""}}function Pe(){return{type:"inlineCode",value:""}}function ot(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zt(){return{type:"emphasis",children:[]}}function en(){return{type:"heading",depth:0,children:[]}}function Cr(){return{type:"break"}}function ft(){return{type:"html",value:""}}function Sr(){return{type:"image",title:null,url:"",alt:null}}function Ar(){return{type:"link",title:null,url:"",children:[]}}function tn(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ri(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ai(){return{type:"paragraph",children:[]}}function ii(){return{type:"strong",children:[]}}function si(){return{type:"text",value:""}}function oi(){return{type:"thematicBreak"}}}function bt(e){return{line:e.line,column:e.column,offset:e.offset}}function Qs(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qs(e,r):ih(e,r)}}function ih(e,t){let n;for(n in t)if(Ks.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Js(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is still open")}function sh(e){const t=this;t.parser=n;function n(r){return rh(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oh(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uh(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
45
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function Qp(e){const r={constructs:mf([Wp,...(e||{}).extensions||[]]),content:a(xf),defined:[],document:a(Sf),flow:a(Up),lazy:{},string:a(Vp),text:a(Gp)};return r;function a(i){return s;function s(o){return jp(r,i,o)}}}function Jp(e){for(;!Us(e););return e}const Xs=/[\0\t\n\r]/g;function Zp(){let e=1,t="",n=!0,r;return a;function a(i,s,o){const u=[];let l,d,p,E,c;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Xs.lastIndex=p,l=Xs.exec(i),E=l&&l.index!==void 0?l.index:i.length,c=i.charCodeAt(E),!l){t=i.slice(p);break}if(c===10&&p===E&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),p<E&&(u.push(i.slice(p,E)),e+=E-p),c){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}p=E+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const eh=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function th(e){return e.replace(eh,nh)}function nh(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return Os(n.slice(i?2:1),i?16:10)}return mn(n)||e}const Ks={}.hasOwnProperty;function rh(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ah(n)(Jp(Qp(n).document().write(Zp()(e,t,!0))))}function ah(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ar),autolinkProtocol:v,autolinkEmail:v,atxHeading:i(en),blockQuote:i(ge),characterEscape:v,characterReference:v,codeFenced:i(Oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Oe,s),codeText:i(Pe,s),codeTextData:v,data:v,codeFlowValue:v,definition:i(ot),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Zt),hardBreakEscape:i(Cr),hardBreakTrailing:i(Cr),htmlFlow:i(ft,s),htmlFlowData:v,htmlText:i(ft,s),htmlTextData:v,image:i(Sr),label:s,link:i(Ar),listItem:i(ri),listItemValue:E,listOrdered:i(tn,p),listUnordered:i(tn),paragraph:i(ai),reference:P,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(en),strong:i(ii),thematicBreak:i(oi)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:oe,autolinkProtocol:re,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ae,characterReference:Q,codeFenced:u(m),codeFencedFence:h,codeFencedFenceInfo:c,codeFencedFenceMeta:x,codeFlowValue:k,codeIndented:u(g),codeText:u(y),codeTextData:k,data:k,definition:u(),definitionDestinationString:C,definitionLabelString:b,definitionTitleString:T,emphasis:u(),hardBreakEscape:u(M),hardBreakTrailing:u(M),htmlFlow:u(R),htmlFlowData:k,htmlText:u(I),htmlTextData:k,image:u(U),label:V,labelText:$,lineEnding:N,link:u(F),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ee,resourceDestinationString:_,resourceTitleString:Y,resource:J,setextHeading:u(A),setextHeadingLineSequence:O,setextHeadingText:S,strong:u(),thematicBreak:u()}};Qs(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let Z={type:"root",children:[]};const se={stack:[Z],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:d,data:n},fe=[];let be=-1;for(;++be<W.length;)if(W[be][1].type==="listOrdered"||W[be][1].type==="listUnordered")if(W[be][0]==="enter")fe.push(be);else{const je=fe.pop();be=a(W,je,be)}for(be=-1;++be<W.length;){const je=t[W[be][0]];Ks.call(je,W[be][1].type)&&je[W[be][1].type].call(Object.assign({sliceSerialize:W[be][2].sliceSerialize},se),W[be][1])}if(se.tokenStack.length>0){const je=se.tokenStack[se.tokenStack.length-1];(je[1]||Js).call(se,void 0,je[0])}for(Z.position={start:bt(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:bt(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)Z=t.transforms[be](Z)||Z;return Z}function a(W,Z,se){let fe=Z-1,be=-1,je=!1,ut,et,Dt,Pt;for(;++fe<=se;){const He=W[fe];switch(He[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{He[0]==="enter"?be++:be--,Pt=void 0;break}case"lineEndingBlank":{He[0]==="enter"&&(ut&&!Pt&&!be&&!Dt&&(Dt=fe),Pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pt=void 0}if(!be&&He[0]==="enter"&&He[1].type==="listItemPrefix"||be===-1&&He[0]==="exit"&&(He[1].type==="listUnordered"||He[1].type==="listOrdered")){if(ut){let St=fe;for(et=void 0;St--;){const ze=W[St];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;et&&(W[et][1].type="lineEndingBlank",je=!0),ze[1].type="lineEnding",et=St}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}Dt&&(!et||Dt<et)&&(ut._spread=!0),ut.end=Object.assign({},et?W[et][1].start:He[1].end),W.splice(et||fe,0,["exit",ut,He[2]]),fe++,se++}if(He[1].type==="listItemPrefix"){const St={type:"listItem",_spread:!1,start:Object.assign({},He[1].start),end:void 0};ut=St,W.splice(fe,0,["enter",St,He[2]]),fe++,se++,Dt=void 0,Pt=!0}}}return W[Z][1]._spread=je,se}function i(W,Z){return se;function se(fe){o.call(this,W(fe),fe),Z&&Z.call(this,fe)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(W,Z,se){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([Z,se||void 0]),W.position={start:bt(Z.start),end:void 0}}function u(W){return Z;function Z(se){W&&W.call(this,se),l.call(this,se)}}function l(W,Z){const se=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==W.type&&(Z?Z.call(this,W,fe[0]):(fe[1]||Js).call(this,W,fe[0]));else throw new Error("Cannot close `"+W.type+"` ("+pn({start:W.start,end:W.end})+"): it’s not open");se.position.end=bt(W.end)}function d(){return pf(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function E(W){if(this.data.expectingFirstListItemValue){const Z=this.stack[this.stack.length-2];Z.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function c(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.lang=W}function x(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.meta=W}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W.replace(/(\r?\n|\r)$/g,"")}function b(W){const Z=this.resume(),se=this.stack[this.stack.length-1];se.label=Z,se.identifier=zt(this.sliceSerialize(W)).toLowerCase()}function T(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.title=W}function C(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.url=W}function w(W){const Z=this.stack[this.stack.length-1];if(!Z.depth){const se=this.sliceSerialize(W).length;Z.depth=se}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function O(W){const Z=this.stack[this.stack.length-1];Z.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function v(W){const se=this.stack[this.stack.length-1].children;let fe=se[se.length-1];(!fe||fe.type!=="text")&&(fe=si(),fe.position={start:bt(W.start),end:void 0},se.push(fe)),this.stack.push(fe)}function k(W){const Z=this.stack.pop();Z.value+=this.sliceSerialize(W),Z.position.end=bt(W.end)}function N(W){const Z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=Z.children[Z.children.length-1];se.position.end=bt(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Z.type)&&(v.call(this,W),k.call(this,W))}function M(){this.data.atHardBreak=!0}function R(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function I(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function y(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.value=W}function F(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function $(W){const Z=this.sliceSerialize(W),se=this.stack[this.stack.length-2];se.label=th(Z),se.identifier=zt(Z).toLowerCase()}function V(){const W=this.stack[this.stack.length-1],Z=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const fe=W.children;se.children=fe}else se.alt=Z}function _(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.url=W}function Y(){const W=this.resume(),Z=this.stack[this.stack.length-1];Z.title=W}function J(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ee(W){const Z=this.resume(),se=this.stack[this.stack.length-1];se.label=Z,se.identifier=zt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function te(W){this.data.characterReferenceType=W.type}function ae(W){const Z=this.sliceSerialize(W),se=this.data.characterReferenceType;let fe;se?(fe=Os(Z,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=mn(Z);const be=this.stack[this.stack.length-1];be.value+=fe}function Q(W){const Z=this.stack.pop();Z.position.end=bt(W.end)}function re(W){k.call(this,W);const Z=this.stack[this.stack.length-1];Z.url=this.sliceSerialize(W)}function oe(W){k.call(this,W);const Z=this.stack[this.stack.length-1];Z.url="mailto:"+this.sliceSerialize(W)}function ge(){return{type:"blockquote",children:[]}}function Oe(){return{type:"code",lang:null,meta:null,value:""}}function Pe(){return{type:"inlineCode",value:""}}function ot(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zt(){return{type:"emphasis",children:[]}}function en(){return{type:"heading",depth:0,children:[]}}function Cr(){return{type:"break"}}function ft(){return{type:"html",value:""}}function Sr(){return{type:"image",title:null,url:"",alt:null}}function Ar(){return{type:"link",title:null,url:"",children:[]}}function tn(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ri(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ai(){return{type:"paragraph",children:[]}}function ii(){return{type:"strong",children:[]}}function si(){return{type:"text",value:""}}function oi(){return{type:"thematicBreak"}}}function bt(e){return{line:e.line,column:e.column,offset:e.offset}}function Qs(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qs(e,r):ih(e,r)}}function ih(e,t){let n;for(n in t)if(Ks.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Js(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+pn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+pn({start:t.start,end:t.end})+") is still open")}function sh(e){const t=this;t.parser=n;function n(r){return rh(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oh(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uh(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
46
46
  `}]}function lh(e,t){const n=t.value?t.value+`
47
47
  `:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function ch(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dh(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fh(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Vt(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function ph(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hh(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zs(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=r:a.push({type:"text",value:r}),a}function mh(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zs(e,t);const a={src:Vt(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function gh(e,t){const n={src:Vt(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Eh(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function bh(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zs(e,t);const a={href:Vt(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Th(e,t){const n={href:Vt(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yh(e,t,n){const r=e.all(t),a=n?xh(n):eo(t),i={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(a||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
48
48
  `}),d.type==="element"&&d.tagName==="p"&&!a?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(a||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
49
- `});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function xh(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=eo(n[r])}return t}function eo(e){const t=e.spread;return t??e.children.length>1}function Ch(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Sh(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ah(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _h(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vh(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=nt(t.children[1]),u=Jn(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function kh(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const p=t.children[u],E={},c=s?s[u]:void 0;c&&(E.align=c);let y={type:"element",tagName:i,properties:E,children:[]};p&&(y.children=e.all(p),e.patch(p,y),y=e.applyData(p,y)),l.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function wh(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const to=9,no=32;function Nh(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(ro(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(ro(t.slice(a),a>0,!1)),i.join("")}function ro(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===to||i===no;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===to||i===no;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Ih(e,t){const n={type:"text",value:Nh(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Lh(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Oh={blockquote:oh,break:uh,code:lh,delete:ch,emphasis:dh,footnoteReference:fh,heading:ph,html:hh,imageReference:mh,image:gh,inlineCode:Eh,linkReference:bh,link:Th,listItem:yh,list:Ch,paragraph:Sh,root:Ah,strong:_h,table:vh,tableCell:wh,tableRow:kh,text:Ih,thematicBreak:Lh,toml:tr,yaml:tr,definition:tr,footnoteDefinition:tr};function tr(){}const ao=-1,nr=0,Tn=1,rr=2,sa=3,oa=4,ua=5,la=6,io=7,so=8,oo=typeof self=="object"?self:globalThis,Dh=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case nr:case ao:return n(s,a);case Tn:{const o=n([],a);for(const u of s)o.push(r(u));return o}case rr:{const o=n({},a);for(const[u,l]of s)o[r(u)]=r(l);return o}case sa:return n(new Date(s),a);case oa:{const{source:o,flags:u}=s;return n(new RegExp(o,u),a)}case ua:{const o=n(new Map,a);for(const[u,l]of s)o.set(r(u),r(l));return o}case la:{const o=n(new Set,a);for(const u of s)o.add(r(u));return o}case io:{const{name:o,message:u}=s;return n(new oo[o](u),a)}case so:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new oo[i](s),a)};return r},uo=e=>Dh(new Map,e)(0),Gt="",{toString:Ph}={},{keys:Mh}=Object,yn=e=>{const t=typeof e;if(t!=="object"||!e)return[nr,t];const n=Ph.call(e).slice(8,-1);switch(n){case"Array":return[Tn,Gt];case"Object":return[rr,Gt];case"Date":return[sa,Gt];case"RegExp":return[oa,Gt];case"Map":return[ua,Gt];case"Set":return[la,Gt];case"DataView":return[Tn,n]}return n.includes("Array")?[Tn,n]:n.includes("Error")?[io,n]:[rr,n]},ar=([e,t])=>e===nr&&(t==="function"||t==="symbol"),Bh=(e,t,n,r)=>{const a=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},i=s=>{if(n.has(s))return n.get(s);let[o,u]=yn(s);switch(o){case nr:{let d=s;switch(u){case"bigint":o=so,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return a([ao],s)}return a([o,d],s)}case Tn:{if(u){let E=s;return u==="DataView"?E=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(E=new Uint8Array(s)),a([u,[...E]],s)}const d=[],p=a([o,d],s);for(const E of s)d.push(i(E));return p}case rr:{if(u)switch(u){case"BigInt":return a([u,s.toString()],s);case"Boolean":case"Number":case"String":return a([u,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const d=[],p=a([o,d],s);for(const E of Mh(s))(e||!ar(yn(s[E])))&&d.push([i(E),i(s[E])]);return p}case sa:return a([o,s.toISOString()],s);case oa:{const{source:d,flags:p}=s;return a([o,{source:d,flags:p}],s)}case ua:{const d=[],p=a([o,d],s);for(const[E,c]of s)(e||!(ar(yn(E))||ar(yn(c))))&&d.push([i(E),i(c)]);return p}case la:{const d=[],p=a([o,d],s);for(const E of s)(e||!ar(yn(E)))&&d.push(i(E));return p}}const{message:l}=s;return a([o,{name:u,message:l}],s)};return i},lo=(e,{json:t,lossy:n}={})=>{const r=[];return Bh(!(t||n),!!t,new Map,r)(e),r},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?uo(lo(e,t)):structuredClone(e):(e,t)=>uo(lo(e,t));function Rh(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Fh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Hh(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Rh,r=e.options.footnoteBackLabel||Fh,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),p=String(l.identifier).toUpperCase(),E=Vt(p.toLowerCase());let c=0;const y=[],h=e.footnoteCounts.get(p);for(;h!==void 0&&++c<=h;){y.length>0&&y.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,c);typeof b=="string"&&(b={type:"text",value:b}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,c),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const m=d[d.length-1];if(m&&m.type==="element"&&m.tagName==="p"){const b=m.children[m.children.length-1];b&&b.type==="text"?b.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...y)}else d.push(...y);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(d,!0)};e.patch(l,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...wt(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
49
+ `});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function xh(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=eo(n[r])}return t}function eo(e){const t=e.spread;return t??e.children.length>1}function Ch(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Sh(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ah(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _h(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vh(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=nt(t.children[1]),u=Jn(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function kh(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const p=t.children[u],E={},c=s?s[u]:void 0;c&&(E.align=c);let x={type:"element",tagName:i,properties:E,children:[]};p&&(x.children=e.all(p),e.patch(p,x),x=e.applyData(p,x)),l.push(x)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function wh(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const to=9,no=32;function Nh(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(ro(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(ro(t.slice(a),a>0,!1)),i.join("")}function ro(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===to||i===no;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===to||i===no;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Ih(e,t){const n={type:"text",value:Nh(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Lh(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Oh={blockquote:oh,break:uh,code:lh,delete:ch,emphasis:dh,footnoteReference:fh,heading:ph,html:hh,imageReference:mh,image:gh,inlineCode:Eh,linkReference:bh,link:Th,listItem:yh,list:Ch,paragraph:Sh,root:Ah,strong:_h,table:vh,tableCell:wh,tableRow:kh,text:Ih,thematicBreak:Lh,toml:tr,yaml:tr,definition:tr,footnoteDefinition:tr};function tr(){}const ao=-1,nr=0,Tn=1,rr=2,sa=3,oa=4,ua=5,la=6,io=7,so=8,oo=typeof self=="object"?self:globalThis,Dh=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case nr:case ao:return n(s,a);case Tn:{const o=n([],a);for(const u of s)o.push(r(u));return o}case rr:{const o=n({},a);for(const[u,l]of s)o[r(u)]=r(l);return o}case sa:return n(new Date(s),a);case oa:{const{source:o,flags:u}=s;return n(new RegExp(o,u),a)}case ua:{const o=n(new Map,a);for(const[u,l]of s)o.set(r(u),r(l));return o}case la:{const o=n(new Set,a);for(const u of s)o.add(r(u));return o}case io:{const{name:o,message:u}=s;return n(new oo[o](u),a)}case so:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}}return n(new oo[i](s),a)};return r},uo=e=>Dh(new Map,e)(0),Gt="",{toString:Ph}={},{keys:Mh}=Object,yn=e=>{const t=typeof e;if(t!=="object"||!e)return[nr,t];const n=Ph.call(e).slice(8,-1);switch(n){case"Array":return[Tn,Gt];case"Object":return[rr,Gt];case"Date":return[sa,Gt];case"RegExp":return[oa,Gt];case"Map":return[ua,Gt];case"Set":return[la,Gt];case"DataView":return[Tn,n]}return n.includes("Array")?[Tn,n]:n.includes("Error")?[io,n]:[rr,n]},ar=([e,t])=>e===nr&&(t==="function"||t==="symbol"),Bh=(e,t,n,r)=>{const a=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},i=s=>{if(n.has(s))return n.get(s);let[o,u]=yn(s);switch(o){case nr:{let d=s;switch(u){case"bigint":o=so,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return a([ao],s)}return a([o,d],s)}case Tn:{if(u){let E=s;return u==="DataView"?E=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(E=new Uint8Array(s)),a([u,[...E]],s)}const d=[],p=a([o,d],s);for(const E of s)d.push(i(E));return p}case rr:{if(u)switch(u){case"BigInt":return a([u,s.toString()],s);case"Boolean":case"Number":case"String":return a([u,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const d=[],p=a([o,d],s);for(const E of Mh(s))(e||!ar(yn(s[E])))&&d.push([i(E),i(s[E])]);return p}case sa:return a([o,s.toISOString()],s);case oa:{const{source:d,flags:p}=s;return a([o,{source:d,flags:p}],s)}case ua:{const d=[],p=a([o,d],s);for(const[E,c]of s)(e||!(ar(yn(E))||ar(yn(c))))&&d.push([i(E),i(c)]);return p}case la:{const d=[],p=a([o,d],s);for(const E of s)(e||!ar(yn(E)))&&d.push(i(E));return p}}const{message:l}=s;return a([o,{name:u,message:l}],s)};return i},lo=(e,{json:t,lossy:n}={})=>{const r=[];return Bh(!(t||n),!!t,new Map,r)(e),r},wt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?uo(lo(e,t)):structuredClone(e):(e,t)=>uo(lo(e,t));function Rh(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Fh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Hh(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Rh,r=e.options.footnoteBackLabel||Fh,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),p=String(l.identifier).toUpperCase(),E=Vt(p.toLowerCase());let c=0;const x=[],h=e.footnoteCounts.get(p);for(;h!==void 0&&++c<=h;){x.length>0&&x.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,c);typeof b=="string"&&(b={type:"text",value:b}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,c),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const m=d[d.length-1];if(m&&m.type==="element"&&m.tagName==="p"){const b=m.children[m.children.length-1];b&&b.type==="text"?b.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...x)}else d.push(...x);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(d,!0)};e.patch(l,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...wt(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
50
50
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
51
- `}]}}const co=function(e){if(e==null)return zh;if(typeof e=="function")return ir(e);if(typeof e=="object")return Array.isArray(e)?$h(e):Uh(e);if(typeof e=="string")return qh(e);throw new Error("Expected function, string, or object as test")};function $h(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=co(e[n]);return ir(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Uh(e){const t=e;return ir(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function qh(e){return ir(t);function t(n){return n&&n.type===e}}function ir(e){return t;function t(n,r,a){return!!(Vh(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function zh(){return!0}function Vh(e){return e!==null&&typeof e=="object"&&"type"in e}function IT(e){return e}const fo=[],Gh=!0,po=!1,Yh="skip";function ho(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=co(a),s=r?-1:1;o(e,void 0,[])();function o(u,l,d){const p=u&&typeof u=="object"?u:{};if(typeof p.type=="string"){const c=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(u.type+(c?"<"+c+">":""))+")"})}return E;function E(){let c=fo,y,h,m;if((!t||i(u,l,d[d.length-1]||void 0))&&(c=Wh(n(u,d)),c[0]===po))return c;if("children"in u&&u.children){const g=u;if(g.children&&c[0]!==Yh)for(h=(r?g.children.length:-1)+s,m=d.concat(g);h>-1&&h<g.children.length;){const b=g.children[h];if(y=o(b,h,m)(),y[0]===po)return y;h=typeof y[1]=="number"?y[1]:h+s}}return c}}}function Wh(e){return Array.isArray(e)?e:typeof e=="number"?[Gh,e]:e==null?fo:[e]}function sr(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),ho(e,i,o,a);function o(u,l){const d=l[l.length-1],p=d?d.children.indexOf(u):void 0;return s(u,p,d)}}const ca={}.hasOwnProperty,jh={};function Xh(e,t){const n=t||jh,r=new Map,a=new Map,i=new Map,s={...Oh,...n.handlers},o={all:l,applyData:Qh,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:u,options:n,patch:Kh,wrap:Zh};return sr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?r:a,E=String(d.identifier).toUpperCase();p.has(E)||p.set(E,d)}}),o;function u(d,p){const E=d.type,c=o.handlers[E];if(ca.call(o.handlers,E)&&c)return c(o,d,p);if(o.options.passThrough&&o.options.passThrough.includes(E)){if("children"in d){const{children:h,...m}=d,g=wt(m);return g.children=o.all(d),g}return wt(d)}return(o.options.unknownHandler||Jh)(o,d,p)}function l(d){const p=[];if("children"in d){const E=d.children;let c=-1;for(;++c<E.length;){const y=o.one(E[c],d);if(y){if(c&&E[c-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=mo(y.value)),!Array.isArray(y)&&y.type==="element")){const h=y.children[0];h&&h.type==="text"&&(h.value=mo(h.value))}Array.isArray(y)?p.push(...y):p.push(y)}}}return p}}function Kh(e,t){e.position&&(t.position=xs(e))}function Qh(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,wt(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Jh(e,t){const n=t.data||{},r="value"in t&&!(ca.call(n,"hProperties")||ca.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zh(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
51
+ `}]}}const co=function(e){if(e==null)return zh;if(typeof e=="function")return ir(e);if(typeof e=="object")return Array.isArray(e)?$h(e):Uh(e);if(typeof e=="string")return qh(e);throw new Error("Expected function, string, or object as test")};function $h(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=co(e[n]);return ir(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Uh(e){const t=e;return ir(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function qh(e){return ir(t);function t(n){return n&&n.type===e}}function ir(e){return t;function t(n,r,a){return!!(Vh(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function zh(){return!0}function Vh(e){return e!==null&&typeof e=="object"&&"type"in e}function IT(e){return e}const fo=[],Gh=!0,po=!1,Yh="skip";function ho(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=co(a),s=r?-1:1;o(e,void 0,[])();function o(u,l,d){const p=u&&typeof u=="object"?u:{};if(typeof p.type=="string"){const c=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(u.type+(c?"<"+c+">":""))+")"})}return E;function E(){let c=fo,x,h,m;if((!t||i(u,l,d[d.length-1]||void 0))&&(c=Wh(n(u,d)),c[0]===po))return c;if("children"in u&&u.children){const g=u;if(g.children&&c[0]!==Yh)for(h=(r?g.children.length:-1)+s,m=d.concat(g);h>-1&&h<g.children.length;){const b=g.children[h];if(x=o(b,h,m)(),x[0]===po)return x;h=typeof x[1]=="number"?x[1]:h+s}}return c}}}function Wh(e){return Array.isArray(e)?e:typeof e=="number"?[Gh,e]:e==null?fo:[e]}function sr(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),ho(e,i,o,a);function o(u,l){const d=l[l.length-1],p=d?d.children.indexOf(u):void 0;return s(u,p,d)}}const ca={}.hasOwnProperty,jh={};function Xh(e,t){const n=t||jh,r=new Map,a=new Map,i=new Map,s={...Oh,...n.handlers},o={all:l,applyData:Qh,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:u,options:n,patch:Kh,wrap:Zh};return sr(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?r:a,E=String(d.identifier).toUpperCase();p.has(E)||p.set(E,d)}}),o;function u(d,p){const E=d.type,c=o.handlers[E];if(ca.call(o.handlers,E)&&c)return c(o,d,p);if(o.options.passThrough&&o.options.passThrough.includes(E)){if("children"in d){const{children:h,...m}=d,g=wt(m);return g.children=o.all(d),g}return wt(d)}return(o.options.unknownHandler||Jh)(o,d,p)}function l(d){const p=[];if("children"in d){const E=d.children;let c=-1;for(;++c<E.length;){const x=o.one(E[c],d);if(x){if(c&&E[c-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=mo(x.value)),!Array.isArray(x)&&x.type==="element")){const h=x.children[0];h&&h.type==="text"&&(h.value=mo(h.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function Kh(e,t){e.position&&(t.position=xs(e))}function Qh(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,wt(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Jh(e,t){const n=t.data||{},r="value"in t&&!(ca.call(n,"hProperties")||ca.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zh(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
52
52
  `});++r<e.length;)r&&n.push({type:"text",value:`
53
53
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
54
54
  `}),n}function mo(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function go(e,t){const n=Xh(e,t),r=n.one(e,void 0),a=Hh(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
55
- `},a),i}function e0(e,t){return e&&"run"in e?async function(n,r){const a=go(n,{file:r,...t});await e.run(a,r)}:function(n,r){return go(n,{file:r,...e||t})}}function Eo(e){if(e)throw e}var da,bo;function t0(){if(bo)return da;bo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!p)return!1;var E;for(E in l);return typeof E>"u"||e.call(l,E)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return da=function u(){var l,d,p,E,c,y,h=arguments[0],m=1,g=arguments.length,b=!1;for(typeof h=="boolean"&&(b=h,h=arguments[1]||{},m=2),(h==null||typeof h!="object"&&typeof h!="function")&&(h={});m<g;++m)if(l=arguments[m],l!=null)for(d in l)p=o(h,d),E=o(l,d),h!==E&&(b&&E&&(i(E)||(c=a(E)))?(c?(c=!1,y=p&&a(p)?p:[]):y=p&&i(p)?p:{},s(h,{name:d,newValue:u(b,y,E)})):typeof E<"u"&&s(h,{name:d,newValue:E}));return h},da}var n0=t0();const fa=Yr(n0);function pa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function r0(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...a);function o(u,...l){const d=e[++i];let p=-1;if(u){s(u);return}for(;++p<a.length;)(l[p]===null||l[p]===void 0)&&(l[p]=a[p]);a=l,d?a0(d,o)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function a0(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(a);try{u=e.apply(this,s)}catch(l){const d=l;if(o&&n)throw d;return a(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(i,a):u instanceof Error?a(u):i(u))}function a(s,...o){n||(n=!0,t(s,...o))}function i(s){a(null,s)}}const it={basename:i0,dirname:s0,extname:o0,join:u0,sep:"/"};function i0(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xn(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(r=a):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function s0(e){if(xn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function o0(e){xn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function u0(...e){let t=-1,n;for(;++t<e.length;)xn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":l0(n)}function l0(e){xn(e);const t=e.codePointAt(0)===47;let n=c0(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function c0(e,t){let n="",r=0,a=-1,i=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else o===46&&i>-1?i++:i=-1}return n}function xn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const d0={cwd:f0};function f0(){return"/"}function ha(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p0(e){if(typeof e=="string")e=new URL(e);else if(!ha(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return h0(e)}function h0(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const ma=["history","path","basename","stem","extname","dirname"];class To{constructor(t){let n;t?ha(t)?n={path:t}:typeof t=="string"||m0(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":d0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ma.length;){const i=ma[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)ma.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?it.basename(this.path):void 0}set basename(t){Ea(t,"basename"),ga(t,"basename"),this.path=it.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?it.dirname(this.path):void 0}set dirname(t){yo(this.basename,"dirname"),this.path=it.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?it.extname(this.path):void 0}set extname(t){if(ga(t,"extname"),yo(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=it.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ha(t)&&(t=p0(t)),Ea(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?it.basename(this.path,this.extname):void 0}set stem(t){Ea(t,"stem"),ga(t,"stem"),this.path=it.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Me(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ga(e,t){if(e&&e.includes(it.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+it.sep+"`")}function Ea(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function m0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const g0=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},E0={}.hasOwnProperty;class ba extends g0{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=r0()}copy(){const t=new ba;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xa("data",this.frozen),this.namespace[t]=n,this):E0.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xa("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=or(t),r=this.parser||this.Parser;return Ta("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ta("process",this.parser||this.Parser),ya("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const o=or(t),u=r.parse(o);r.run(u,o,function(d,p,E){if(d||!p||!E)return l(d);const c=p,y=r.stringify(c,E);y0(y)?E.value=y:E.result=y,l(d,E)});function l(d,p){d||!p?s(d):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Ta("processSync",this.parser||this.Parser),ya("processSync",this.compiler||this.Compiler),this.process(t,a),Co("processSync","process",n),r;function a(i,s){n=!0,Eo(i),r=s}}run(t,n,r){xo(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,o){const u=or(n);a.run(t,u,l);function l(d,p,E){const c=p||t;d?o(d):s?s(c):r(void 0,c,E)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Co("runSync","run",r),a;function i(s,o){Eo(s),a=o,r=!0}}stringify(t,n){this.freeze();const r=or(n),a=this.compiler||this.Compiler;return ya("stringify",a),xo(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(xa("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...p]=l;u(d,p)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(a.settings=fa(!0,a.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const p=l[d];i(p)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let p=-1,E=-1;for(;++p<r.length;)if(r[p][0]===l){E=p;break}if(E===-1)r.push([l,...d]);else if(d.length>0){let[c,...y]=d;const h=r[E][1];pa(h)&&pa(c)&&(c=fa(!0,h,c)),r[E]=[l,c,...y]}}}}const b0=new ba().freeze();function Ta(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ya(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xo(e){if(!pa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Co(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function or(e){return T0(e)?e:new To(e)}function T0(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y0(e){return typeof e=="string"||x0(e)}function x0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C0="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",So=[],Ao={allowDangerousHtml:!0},S0=/^(https?|ircs?|mailto|xmpp)$/i,A0=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ca(e){const t=_0(e),n=v0(e);return k0(t.runSync(t.parse(n),n),e)}function _0(e){const t=e.rehypePlugins||So,n=e.remarkPlugins||So,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ao}:Ao;return b0().use(sh).use(n).use(e0,r).use(t)}function v0(e){const t=e.children||"",n=new To;return typeof t=="string"&&(n.value=t),n}function k0(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,u=t.urlTransform||w0;for(const d of A0)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C0+d.id,void 0);return sr(e,l),Xd(e,{Fragment:q.Fragment,components:a,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function l(d,p,E){if(d.type==="raw"&&E&&typeof p=="number")return s?E.children.splice(p,1):E.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let c;for(c in Jr)if(Object.hasOwn(Jr,c)&&Object.hasOwn(d.properties,c)){const y=d.properties[c],h=Jr[c];(h===null||h.includes(d.tagName))&&(d.properties[c]=u(String(y||""),c,d))}}if(d.type==="element"){let c=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!c&&r&&typeof p=="number"&&(c=!r(d,p,E)),c&&E&&typeof p=="number")return o&&d.children?E.children.splice(p,1,...d.children):E.children.splice(p,1),p}}}function w0(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||S0.test(e.slice(0,t))?e:""}const _o=/[#.]/g;function N0(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){_o.lastIndex=a;const o=_o.exec(n),u=n.slice(a,o?o.index:n.length);u&&(i?i==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,a+=u.length),o&&(i=o[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function vo(e,t,n){const r=n?D0(n):void 0;function a(i,s,...o){let u;if(i==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=N0(i,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,I0(s))o.unshift(s);else for(const[p,E]of Object.entries(s))L0(e,u.properties,p,E)}for(const l of o)Sa(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return a}function I0(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function L0(e,t,n,r){const a=Qn(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?a.spaceSeparated?i=hs(r):a.commaSeparated?i=ts(r):a.commaOrSpaceSeparated?i=hs(ts(r).join(" ")):i=ko(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?O0(r):String(r);if(Array.isArray(i)){const s=[];for(const o of i)s.push(ko(a,a.property,o));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function Sa(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Sa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Sa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ko(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ln(n)===ln(t)))return!0}return n}function O0(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function D0(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const P0=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],M0=vo(cn,"div"),B0=vo(gt,"g",P0);function R0(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=wo(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const o=n[n.length-1],u=wo(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function wo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
56
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Nt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},No={}.hasOwnProperty,F0=Object.prototype;function H0(e,t){const n=t||{};return Aa({file:n.file||void 0,location:!1,schema:n.space==="svg"?gt:cn,verbose:n.verbose||!1},e)}function Aa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ur(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Io(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=R0(i),o=s.toPoint(0),u=s.toPoint(i.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ur(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ur(e,r,n),n}default:return n=$0(e,t),n}}function Io(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Aa(e,t[n]);r.push(a)}return r}function $0(e,t){const n=e.schema;e.schema=t.namespaceURI===Nt.svg?gt:cn;let r=-1;const a={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;No.call(F0,u)||(a[u]=o.value)}const s=(e.schema.space==="svg"?B0:M0)(t.tagName,a,Io(e,t.childNodes));if(ur(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Yt(u.startTag),d=u&&u.endTag&&Yt(u.endTag),p=Aa(e,o.content);l&&d&&e.file&&(p.position={start:l.end,end:d.start}),s.content=p}return e.schema=n,s}function ur(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=U0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function U0(e,t,n){const r=Yt(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)No.call(n.attrs,s)&&(i[Qn(e.schema,s).property]=Yt(n.attrs[s]));n.startTag;const o=Yt(n.startTag),u=n.endTag?Yt(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=i,t.data={position:l}}}return r}function Yt(e){const t=Lo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Lo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Lo(e){return e.line&&e.column?e:void 0}const Oo={}.hasOwnProperty;function Do(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Oo.call(a,e)){const u=String(a[e]);s=Oo.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const q0={},z0={}.hasOwnProperty,Po=Do("type",{handlers:{root:G0,element:K0,text:j0,comment:X0,doctype:W0}});function V0(e,t){const r=(t||q0).space;return Po(e,r==="svg"?gt:cn)}function G0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=_a(e.children,n,t),Wt(e,n),n}function Y0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=_a(e.children,n,t),Wt(e,n),n}function W0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Wt(e,t),t}function j0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Wt(e,t),t}function X0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Wt(e,t),t}function K0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=gt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&z0.call(e.properties,i)){const u=Q0(r,i,e.properties[i]);u&&a.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Nt[s],childNodes:[],parentNode:null};return o.childNodes=_a(e.children,o,r),Wt(e,o),e.tagName==="template"&&e.content&&(o.content=Y0(e.content,r)),o}function Q0(e,t,n){const r=Qn(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ns(n):ms(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=Nt[r.space]}return a}function _a(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=Po(e[r],n);i.parentNode=t,a.push(i)}return a}function Wt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const J0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Z0=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Se="�";var D;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(D||(D={}));const qe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Mo(e){return e>=55296&&e<=57343}function em(e){return e>=56320&&e<=57343}function tm(e,t){return(e-55296)*1024+9216+t}function Bo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ro(e){return e>=64976&&e<=65007||Z0.has(e)}var G;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(G||(G={}));const nm=65536;class rm{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=nm,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:i}=this,s=a+n,o=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(em(n))return this.pos++,this._addGap(),tm(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(G.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;const r=this.html.charCodeAt(n);return r===D.CARRIAGE_RETURN?D.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let t=this.html.charCodeAt(this.pos);return t===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):t===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Mo(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===D.LINE_FEED||t===D.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Bo(t)?this._err(G.controlCharacterInInputStream):Ro(t)&&this._err(G.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var de;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(de||(de={}));function Fo(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const am=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),im=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function sm(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=im.get(e))!==null&&t!==void 0?t:e}var Ie;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ie||(Ie={}));const om=32;var Tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tt||(Tt={}));function va(e){return e>=Ie.ZERO&&e<=Ie.NINE}function um(e){return e>=Ie.UPPER_A&&e<=Ie.UPPER_F||e>=Ie.LOWER_A&&e<=Ie.LOWER_F}function lm(e){return e>=Ie.UPPER_A&&e<=Ie.UPPER_Z||e>=Ie.LOWER_A&&e<=Ie.LOWER_Z||va(e)}function cm(e){return e===Ie.EQUALS||lm(e)}var Le;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Le||(Le={}));var dt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(dt||(dt={}));class dm{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=dt.Strict}startEntity(t){this.decodeMode=t,this.state=Le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Le.EntityStart:return t.charCodeAt(n)===Ie.NUM?(this.state=Le.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Le.NamedEntity,this.stateNamedEntity(t,n));case Le.NumericStart:return this.stateNumericStart(t,n);case Le.NumericDecimal:return this.stateNumericDecimal(t,n);case Le.NumericHex:return this.stateNumericHex(t,n);case Le.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|om)===Ie.LOWER_X?(this.state=Le.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Le.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+Number.parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(va(a)||um(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(va(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ie.SEMI)this.consumed+=1;else if(this.decodeMode===dt.Strict)return 0;return this.emitCodePoint(sm(this.result),this.consumed),this.errors&&(t!==Ie.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&Tt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=fm(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===dt.Attribute&&(i===0||cm(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&Tt.VALUE_LENGTH)>>14,i!==0){if(s===Ie.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==dt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&Tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Tt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Le.NamedEntity:return this.result!==0&&(this.decodeMode!==dt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Le.NumericDecimal:return this.emitNumericEntity(0,2);case Le.NumericHex:return this.emitNumericEntity(0,3);case Le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Le.EntityStart:return 0}}}function fm(e,t,n,r){const a=(t&Tt.BRANCH_LENGTH)>>7,i=t&Tt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=a?-1:e[n+u]-1}let s=n,o=s+a-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)o=u-1;else return e[u+a]}return-1}var j;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(j||(j={}));var It;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(It||(It={}));var Je;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Je||(Je={}));var z;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(z||(z={}));var f;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(f||(f={}));const pm=new Map([[z.A,f.A],[z.ADDRESS,f.ADDRESS],[z.ANNOTATION_XML,f.ANNOTATION_XML],[z.APPLET,f.APPLET],[z.AREA,f.AREA],[z.ARTICLE,f.ARTICLE],[z.ASIDE,f.ASIDE],[z.B,f.B],[z.BASE,f.BASE],[z.BASEFONT,f.BASEFONT],[z.BGSOUND,f.BGSOUND],[z.BIG,f.BIG],[z.BLOCKQUOTE,f.BLOCKQUOTE],[z.BODY,f.BODY],[z.BR,f.BR],[z.BUTTON,f.BUTTON],[z.CAPTION,f.CAPTION],[z.CENTER,f.CENTER],[z.CODE,f.CODE],[z.COL,f.COL],[z.COLGROUP,f.COLGROUP],[z.DD,f.DD],[z.DESC,f.DESC],[z.DETAILS,f.DETAILS],[z.DIALOG,f.DIALOG],[z.DIR,f.DIR],[z.DIV,f.DIV],[z.DL,f.DL],[z.DT,f.DT],[z.EM,f.EM],[z.EMBED,f.EMBED],[z.FIELDSET,f.FIELDSET],[z.FIGCAPTION,f.FIGCAPTION],[z.FIGURE,f.FIGURE],[z.FONT,f.FONT],[z.FOOTER,f.FOOTER],[z.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[z.FORM,f.FORM],[z.FRAME,f.FRAME],[z.FRAMESET,f.FRAMESET],[z.H1,f.H1],[z.H2,f.H2],[z.H3,f.H3],[z.H4,f.H4],[z.H5,f.H5],[z.H6,f.H6],[z.HEAD,f.HEAD],[z.HEADER,f.HEADER],[z.HGROUP,f.HGROUP],[z.HR,f.HR],[z.HTML,f.HTML],[z.I,f.I],[z.IMG,f.IMG],[z.IMAGE,f.IMAGE],[z.INPUT,f.INPUT],[z.IFRAME,f.IFRAME],[z.KEYGEN,f.KEYGEN],[z.LABEL,f.LABEL],[z.LI,f.LI],[z.LINK,f.LINK],[z.LISTING,f.LISTING],[z.MAIN,f.MAIN],[z.MALIGNMARK,f.MALIGNMARK],[z.MARQUEE,f.MARQUEE],[z.MATH,f.MATH],[z.MENU,f.MENU],[z.META,f.META],[z.MGLYPH,f.MGLYPH],[z.MI,f.MI],[z.MO,f.MO],[z.MN,f.MN],[z.MS,f.MS],[z.MTEXT,f.MTEXT],[z.NAV,f.NAV],[z.NOBR,f.NOBR],[z.NOFRAMES,f.NOFRAMES],[z.NOEMBED,f.NOEMBED],[z.NOSCRIPT,f.NOSCRIPT],[z.OBJECT,f.OBJECT],[z.OL,f.OL],[z.OPTGROUP,f.OPTGROUP],[z.OPTION,f.OPTION],[z.P,f.P],[z.PARAM,f.PARAM],[z.PLAINTEXT,f.PLAINTEXT],[z.PRE,f.PRE],[z.RB,f.RB],[z.RP,f.RP],[z.RT,f.RT],[z.RTC,f.RTC],[z.RUBY,f.RUBY],[z.S,f.S],[z.SCRIPT,f.SCRIPT],[z.SEARCH,f.SEARCH],[z.SECTION,f.SECTION],[z.SELECT,f.SELECT],[z.SOURCE,f.SOURCE],[z.SMALL,f.SMALL],[z.SPAN,f.SPAN],[z.STRIKE,f.STRIKE],[z.STRONG,f.STRONG],[z.STYLE,f.STYLE],[z.SUB,f.SUB],[z.SUMMARY,f.SUMMARY],[z.SUP,f.SUP],[z.TABLE,f.TABLE],[z.TBODY,f.TBODY],[z.TEMPLATE,f.TEMPLATE],[z.TEXTAREA,f.TEXTAREA],[z.TFOOT,f.TFOOT],[z.TD,f.TD],[z.TH,f.TH],[z.THEAD,f.THEAD],[z.TITLE,f.TITLE],[z.TR,f.TR],[z.TRACK,f.TRACK],[z.TT,f.TT],[z.U,f.U],[z.UL,f.UL],[z.SVG,f.SVG],[z.VAR,f.VAR],[z.WBR,f.WBR],[z.XMP,f.XMP]]);function jt(e){var t;return(t=pm.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const X=f,hm={[j.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[j.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[j.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[j.XLINK]:new Set,[j.XML]:new Set,[j.XMLNS]:new Set},ka=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT;var R;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(R||(R={}));const ke={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function mm(e){return e>=D.DIGIT_0&&e<=D.DIGIT_9}function Cn(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function gm(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z}function yt(e){return gm(e)||Cn(e)}function Ho(e){return yt(e)||mm(e)}function lr(e){return e+32}function $o(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function Uo(e){return $o(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}function Em(e){return e===D.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:Mo(e)?G.surrogateCharacterReference:Ro(e)?G.noncharacterCharacterReference:Bo(e)||e===D.CARRIAGE_RETURN?G.controlCharacterReference:null}class bm{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new rm(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new dm(am,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=Em(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:de.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:de.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:de.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:de.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Fo(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=jt(t.tagName),t.type===de.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(G.endTagWithAttributes),t.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case de.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case de.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case de.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:de.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=$o(t)?de.WHITESPACE_CHARACTER:t===D.NULL?de.NULL_CHARACTER:de.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(de.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?dt.Attribute:dt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitCodePoint(t);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case D.AMPERSAND:{this._startCharacterReference();break}case D.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case D.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(yt(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case D.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case D.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case D.QUESTION_MARK:{this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case D.EOF:{this._err(G.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(yt(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case D.GREATER_THAN_SIGN:{this._err(G.missingEndTagName),this.state=R.DATA;break}case D.EOF:{this._err(G.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.tagName+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateRcdataLessThanSign(t){t===D.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){yt(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===D.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){yt(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case D.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case D.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){yt(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===D.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===D.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===D.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:yt(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){yt(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&Uo(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===D.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&Uo(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:{this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.name+=Se;break}default:this.currentAttr.name+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateAfterAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case D.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case D.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case D.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:{this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case D.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case D.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Se;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qe.DASH_DASH,!0)?(this._createCommentToken(qe.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(qe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qe.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(qe.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(qe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case D.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case D.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Se;break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case D.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case D.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===D.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===D.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==D.GREATER_THAN_SIGN&&t!==D.EOF&&this._err(G.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case D.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case D.HYPHEN_MINUS:{n.data+="-";break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case D.GREATER_THAN_SIGN:{this._err(G.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case D.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Cn(t))this._createDoctypeToken(String.fromCharCode(lr(t))),this.state=R.DOCTYPE_NAME;else switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:{this._err(G.unexpectedNullCharacter),this._createDoctypeToken(Se),this.state=R.DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.name+=Se;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qe.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qe.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case D.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case D.NULL:{this._err(G.unexpectedNullCharacter);break}case D.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case D.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case D.EOF:{this._err(G.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===D.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case D.GREATER_THAN_SIGN:{this.state=R.DATA;break}case D.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ho(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ho(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===D.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const qo=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),zo=new Set([...qo,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),cr=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),Tm=new Set([...cr,f.OL,f.UL]),ym=new Set([...cr,f.BUTTON]),Vo=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),Go=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),xm=new Set([f.TR,f.TEMPLATE,f.HTML]),Cm=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),Sm=new Set([f.TABLE,f.TEMPLATE,f.HTML]),Am=new Set([f.TD,f.TH]);class _m{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===j.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==j.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ka,j.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Am,j.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Sm,j.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Cm,j.HTML)}clearBackToTableRowContext(){this.clearBackTo(xm,j.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===f.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case j.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case j.SVG:{if(Go.has(a))return!1;break}case j.MATHML:{if(Vo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,cr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Tm)}hasInButtonScope(t){return this.hasInDynamicScope(t,ym)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case j.HTML:{if(ka.has(n))return!0;if(cr.has(n))return!1;break}case j.SVG:{if(Go.has(n))return!1;break}case j.MATHML:{if(Vo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===j.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===j.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===j.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&qo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&zo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&zo.has(this.currentTagId);)this.pop()}}const wa=3;var st;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(st||(st={}));const Yo={type:st.Marker};class vm{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===st.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===a&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<wa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<wa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>a.get(u.name)===u.value)&&(i+=1,i>=wa&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Yo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:st.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:st.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Yo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===st.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===st.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===st.Element&&n.element===t)}}const xt={createDocument(){return{nodeName:"#document",mode:Je.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};xt.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(xt.isTextNode(n)){n.value+=t;return}}xt.appendChild(e,xt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&xt.isTextNode(r)?r.value+=t:xt.insertBefore(e,xt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Wo="html",km="about:legacy-compat",wm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jo=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Nm=[...jo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Im=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Xo=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Lm=[...Xo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ko(e,t){return t.some(n=>e.startsWith(n))}function Om(e){return e.name===Wo&&e.publicId===null&&(e.systemId===null||e.systemId===km)}function Dm(e){if(e.name!==Wo)return Je.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===wm)return Je.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Im.has(n))return Je.QUIRKS;let r=t===null?Nm:jo;if(Ko(n,r))return Je.QUIRKS;if(r=t===null?Xo:Lm,Ko(n,r))return Je.LIMITED_QUIRKS}return Je.NO_QUIRKS}const Qo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Pm="definitionurl",Mm="definitionURL",Bm=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Rm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:j.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:j.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:j.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:j.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:j.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:j.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:j.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:j.XML}],["xml:space",{prefix:"xml",name:"space",namespace:j.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:j.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:j.XMLNS}]]),Fm=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Hm=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function $m(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===It.COLOR||r===It.SIZE||r===It.FACE)||Hm.has(t)}function Jo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Pm){e.attrs[t].name=Mm;break}}function Zo(e){for(let t=0;t<e.attrs.length;t++){const n=Bm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Na(e){for(let t=0;t<e.attrs.length;t++){const n=Rm.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Um(e){const t=Fm.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=jt(e.tagName))}function qm(e,t){return t===j.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function zm(e,t,n){if(t===j.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===It.ENCODING){const a=n[r].value.toLowerCase();return a===Qo.TEXT_HTML||a===Qo.APPLICATION_XML}}return t===j.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function Vm(e,t,n,r){return(!r||r===j.HTML)&&zm(e,t,n)||(!r||r===j.MATHML)&&qm(e,t)}const Gm="hidden",Ym=8,Wm=3;var F;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(F||(F={}));const jm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},eu=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),tu={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:xt,onParseError:null};class nu{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...tu,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new bm(this.options,this),this.activeFormattingElements=new vm(this.treeAdapter),this.fragmentContextID=r?jt(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new _m(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...tu,...n};t??(t=r.treeAdapter.createElement(z.TEMPLATE,j.HTML,[]));const a=r.treeAdapter.createElement("documentmock",j.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===f.TEMPLATE&&i.tmplInsertionModeStack.unshift(F.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:jm,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===j.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,j.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=ke.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===z.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==j.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=ke.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=ke.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=ke.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=ke.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,j.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,j.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,j.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===de.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===f.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===j.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,j.HTML)}_processToken(t){switch(t.type){case de.CHARACTER:{this.onCharacter(t);break}case de.NULL_CHARACTER:{this.onNullCharacter(t);break}case de.COMMENT:{this.onComment(t);break}case de.DOCTYPE:{this.onDoctype(t);break}case de.START_TAG:{this._processStartTag(t);break}case de.END_TAG:{this.onEndTag(t);break}case de.EOF:{this.onEof(t);break}case de.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Vm(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===st.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=F.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=F.IN_TABLE;return}case f.BODY:{this.insertionMode=F.IN_BODY;return}case f.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return eu.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===j.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return hm[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AE(this,t);return}switch(this.insertionMode){case F.INITIAL:{Sn(this,t);break}case F.BEFORE_HTML:{An(this,t);break}case F.BEFORE_HEAD:{_n(this,t);break}case F.IN_HEAD:{vn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case F.AFTER_HEAD:{wn(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{au(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Da(this,t);break}case F.IN_TABLE_TEXT:{fu(this,t);break}case F.IN_COLUMN_GROUP:{pr(this,t);break}case F.AFTER_BODY:{gr(this,t);break}case F.AFTER_AFTER_BODY:{Er(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){SE(this,t);return}switch(this.insertionMode){case F.INITIAL:{Sn(this,t);break}case F.BEFORE_HTML:{An(this,t);break}case F.BEFORE_HEAD:{_n(this,t);break}case F.IN_HEAD:{vn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case F.AFTER_HEAD:{wn(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Da(this,t);break}case F.IN_COLUMN_GROUP:{pr(this,t);break}case F.AFTER_BODY:{gr(this,t);break}case F.AFTER_AFTER_BODY:{Er(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){La(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{La(this,t);break}case F.IN_TABLE_TEXT:{Ln(this,t);break}case F.AFTER_BODY:{tg(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{ng(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{rg(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,G.misplacedDoctype);break}case F.IN_TABLE_TEXT:{Ln(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?_E(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Sn(this,t);break}case F.BEFORE_HTML:{ag(this,t);break}case F.BEFORE_HEAD:{sg(this,t);break}case F.IN_HEAD:{Ze(this,t);break}case F.IN_HEAD_NO_SCRIPT:{lg(this,t);break}case F.AFTER_HEAD:{dg(this,t);break}case F.IN_BODY:{Be(this,t);break}case F.IN_TABLE:{Xt(this,t);break}case F.IN_TABLE_TEXT:{Ln(this,t);break}case F.IN_CAPTION:{oE(this,t);break}case F.IN_COLUMN_GROUP:{Pa(this,t);break}case F.IN_TABLE_BODY:{hr(this,t);break}case F.IN_ROW:{mr(this,t);break}case F.IN_CELL:{cE(this,t);break}case F.IN_SELECT:{mu(this,t);break}case F.IN_SELECT_IN_TABLE:{fE(this,t);break}case F.IN_TEMPLATE:{hE(this,t);break}case F.AFTER_BODY:{gE(this,t);break}case F.IN_FRAMESET:{EE(this,t);break}case F.AFTER_FRAMESET:{TE(this,t);break}case F.AFTER_AFTER_BODY:{xE(this,t);break}case F.AFTER_AFTER_FRAMESET:{CE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Sn(this,t);break}case F.BEFORE_HTML:{ig(this,t);break}case F.BEFORE_HEAD:{og(this,t);break}case F.IN_HEAD:{ug(this,t);break}case F.IN_HEAD_NO_SCRIPT:{cg(this,t);break}case F.AFTER_HEAD:{fg(this,t);break}case F.IN_BODY:{fr(this,t);break}case F.TEXT:{Qg(this,t);break}case F.IN_TABLE:{Nn(this,t);break}case F.IN_TABLE_TEXT:{Ln(this,t);break}case F.IN_CAPTION:{uE(this,t);break}case F.IN_COLUMN_GROUP:{lE(this,t);break}case F.IN_TABLE_BODY:{Ma(this,t);break}case F.IN_ROW:{hu(this,t);break}case F.IN_CELL:{dE(this,t);break}case F.IN_SELECT:{gu(this,t);break}case F.IN_SELECT_IN_TABLE:{pE(this,t);break}case F.IN_TEMPLATE:{mE(this,t);break}case F.AFTER_BODY:{bu(this,t);break}case F.IN_FRAMESET:{bE(this,t);break}case F.AFTER_FRAMESET:{yE(this,t);break}case F.AFTER_AFTER_BODY:{Er(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{Sn(this,t);break}case F.BEFORE_HTML:{An(this,t);break}case F.BEFORE_HEAD:{_n(this,t);break}case F.IN_HEAD:{vn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case F.AFTER_HEAD:{wn(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{cu(this,t);break}case F.TEXT:{Jg(this,t);break}case F.IN_TABLE_TEXT:{Ln(this,t);break}case F.IN_TEMPLATE:{Eu(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Oa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===D.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{ru(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Da(this,t);break}case F.IN_TABLE_TEXT:{du(this,t);break}}}}function Xm(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):lu(e,t),n}function Km(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Qm(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&i>=Wm;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=Jm(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Jm(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Zm(e,t,n){const r=e.treeAdapter.getTagName(t),a=jt(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===f.TEMPLATE&&i===j.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function eg(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function Ia(e,t){for(let n=0;n<Ym;n++){const r=Xm(e,t);if(!r)break;const a=Km(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=Qm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&Zm(e,s,i),eg(e,a,r)}}function La(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function tg(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ng(e,t){e._appendCommentNode(t,e.document)}function Oa(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function rg(e,t){e._setDocumentType(t);const n=t.forceQuirks?Je.QUIRKS:Dm(t);Om(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function Sn(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Je.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function ag(e,t){t.tagID===f.HTML?(e._insertElement(t,j.HTML),e.insertionMode=F.BEFORE_HEAD):An(e,t)}function ig(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&An(e,t)}function An(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function sg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.HEAD:{e._insertElement(t,j.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:_n(e,t)}}function og(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?_n(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function _n(e,t){e._insertFakeElement(z.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function Ze(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,ke.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ke.RAWTEXT):(e._insertElement(t,j.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,ke.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,ke.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case f.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:vn(e,t)}}function ug(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{vn(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Lt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function vn(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function lg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{Ze(e,t);break}case f.NOSCRIPT:{e._err(t,G.nestedNoscriptInHead);break}default:kn(e,t)}}function cg(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case f.BR:{kn(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function kn(e,t){const n=t.type===de.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function dg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BODY:{e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,j.HTML),e.insertionMode=F.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),Ze(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:wn(e,t)}}function fg(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{wn(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function wn(e,t){e._insertFakeElement(z.BODY,f.BODY),e.insertionMode=F.IN_BODY,dr(e,t)}function dr(e,t){switch(t.type){case de.CHARACTER:{au(e,t);break}case de.WHITESPACE_CHARACTER:{ru(e,t);break}case de.COMMENT:{La(e,t);break}case de.START_TAG:{Be(e,t);break}case de.END_TAG:{fr(e,t);break}case de.EOF:{cu(e,t);break}}}function ru(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function au(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function pg(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function hg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_FRAMESET)}function gg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML)}function Eg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ka.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,j.HTML)}function bg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Tg(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),n||(e.formElement=e.openElements.current))}function yg(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===f.LI&&a===f.LI||(n===f.DD||n===f.DT)&&(a===f.DD||a===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==f.ADDRESS&&a!==f.DIV&&a!==f.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML)}function xg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.tokenizer.state=ke.PLAINTEXT}function Cg(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.framesetOk=!1}function Sg(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Ia(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ag(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _g(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(Ia(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function kg(e,t){e.treeAdapter.getDocumentMode(e.document)!==Je.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function iu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,j.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function su(e){const t=Fo(e,It.TYPE);return t!=null&&t.toLowerCase()===Gm}function wg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,j.HTML),su(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ng(e,t){e._appendElement(t,j.HTML),t.ackSelfClosing=!0}function Ig(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,j.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lg(e,t){t.tagName=z.IMG,t.tagID=f.IMG,iu(e,t)}function Og(e,t){e._insertElement(t,j.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ke.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function Dg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ke.RAWTEXT)}function Pg(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ke.RAWTEXT)}function ou(e,t){e._switchToTextParsing(t,ke.RAWTEXT)}function Mg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function Bg(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML)}function Rg(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,j.HTML)}function Fg(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,j.HTML)}function Hg(e,t){e._reconstructActiveFormattingElements(),Jo(t),Na(t),t.selfClosing?e._appendElement(t,j.MATHML):e._insertElement(t,j.MATHML),t.ackSelfClosing=!0}function $g(e,t){e._reconstructActiveFormattingElements(),Zo(t),Na(t),t.selfClosing?e._appendElement(t,j.SVG):e._insertElement(t,j.SVG),t.ackSelfClosing=!0}function uu(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML)}function Be(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{Ag(e,t);break}case f.A:{Sg(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{Eg(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{gg(e,t);break}case f.LI:case f.DD:case f.DT:{yg(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{iu(e,t);break}case f.HR:{Ig(e,t);break}case f.RB:case f.RTC:{Rg(e,t);break}case f.RT:case f.RP:{Fg(e,t);break}case f.PRE:case f.LISTING:{bg(e,t);break}case f.XMP:{Dg(e,t);break}case f.SVG:{$g(e,t);break}case f.HTML:{pg(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{Ze(e,t);break}case f.BODY:{hg(e,t);break}case f.FORM:{Tg(e,t);break}case f.NOBR:{_g(e,t);break}case f.MATH:{Hg(e,t);break}case f.TABLE:{kg(e,t);break}case f.INPUT:{wg(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{Ng(e,t);break}case f.IMAGE:{Lg(e,t);break}case f.BUTTON:{Cg(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{vg(e,t);break}case f.IFRAME:{Pg(e,t);break}case f.SELECT:{Mg(e,t);break}case f.OPTION:case f.OPTGROUP:{Bg(e,t);break}case f.NOEMBED:case f.NOFRAMES:{ou(e,t);break}case f.FRAMESET:{mg(e,t);break}case f.TEXTAREA:{Og(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?ou(e,t):uu(e,t);break}case f.PLAINTEXT:{xg(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:uu(e,t)}}function Ug(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function qg(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=F.AFTER_BODY,bu(e,t))}function zg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Vg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function Gg(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(z.P,f.P),e._closePElement()}function Yg(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function Wg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jg(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Xg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Kg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function lu(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function fr(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{Ia(e,t);break}case f.P:{Gg(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{zg(e,t);break}case f.LI:{Yg(e);break}case f.DD:case f.DT:{Wg(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{jg(e);break}case f.BR:{Kg(e);break}case f.BODY:{Ug(e,t);break}case f.HTML:{qg(e,t);break}case f.FORM:{Vg(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{Xg(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:lu(e,t)}}function cu(e,t){e.tmplInsertionModeStack.length>0?Eu(e,t):Oa(e,t)}function Qg(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Jg(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Da(e,t){if(e.openElements.currentTagId!==void 0&&eu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case de.CHARACTER:{fu(e,t);break}case de.WHITESPACE_CHARACTER:{du(e,t);break}}else In(e,t)}function Zg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_CAPTION}function eE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function tE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,f.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,Pa(e,t)}function nE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_TABLE_BODY}function rE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,f.TBODY),e.insertionMode=F.IN_TABLE_BODY,hr(e,t)}function aE(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function iE(e,t){su(t)?e._appendElement(t,j.HTML):In(e,t),t.ackSelfClosing=!0}function sE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,j.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xt(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{rE(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{Ze(e,t);break}case f.COL:{tE(e,t);break}case f.FORM:{sE(e,t);break}case f.TABLE:{aE(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{nE(e,t);break}case f.INPUT:{iE(e,t);break}case f.CAPTION:{Zg(e,t);break}case f.COLGROUP:{eE(e,t);break}default:In(e,t)}}function Nn(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{Lt(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dr(e,t),e.fosterParentingEnabled=n}function du(e,t){e.pendingCharacterTokens.push(t)}function fu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ln(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pu=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function oE(e,t){const n=t.tagID;pu.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Xt(e,t)):Be(e,t)}function uE(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===f.TABLE&&Nn(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:fr(e,t)}}function Pa(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.COL:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{Ze(e,t);break}default:pr(e,t)}}function lE(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case f.TEMPLATE:{Lt(e,t);break}case f.COL:break;default:pr(e,t)}}function pr(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function hr(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,f.TR),e.insertionMode=F.IN_ROW,mr(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Xt(e,t));break}default:Xt(e,t)}}function Ma(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Nn(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:Nn(e,t)}}function mr(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,j.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,hr(e,t));break}default:Xt(e,t)}}function hu(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ma(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ma(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:Nn(e,t)}}function cE(e,t){const n=t.tagID;pu.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),mr(e,t)):Be(e,t)}function dE(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),hu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:fr(e,t)}}function mu(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,j.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,j.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{Ze(e,t);break}}}function gu(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{Lt(e,t);break}}}function fE(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):mu(e,t)}function pE(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):gu(e,t)}function hE(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{Ze(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Xt(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,Pa(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,hr(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,mr(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Be(e,t)}}function mE(e,t){t.tagID===f.TEMPLATE&&Lt(e,t)}function Eu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Oa(e,t)}function gE(e,t){t.tagID===f.HTML?Be(e,t):gr(e,t)}function bu(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else gr(e,t)}function gr(e,t){e.insertionMode=F.IN_BODY,dr(e,t)}function EE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.FRAMESET:{e._insertElement(t,j.HTML);break}case f.FRAME:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{Ze(e,t);break}}}function bE(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function TE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.NOFRAMES:{Ze(e,t);break}}}function yE(e,t){t.tagID===f.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function xE(e,t){t.tagID===f.HTML?Be(e,t):Er(e,t)}function Er(e,t){e.insertionMode=F.IN_BODY,dr(e,t)}function CE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.NOFRAMES:{Ze(e,t);break}}}function SE(e,t){t.chars=Se,e._insertCharacters(t)}function AE(e,t){e._insertCharacters(t),e.framesetOk=!1}function Tu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==j.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function _E(e,t){if($m(t))Tu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===j.MATHML?Jo(t):r===j.SVG&&(Um(t),Zo(t)),Na(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function vE(e,t){if(t.tagID===f.P||t.tagID===f.BR){Tu(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===j.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR;const kE=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,wE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),yu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xu(e,t){const n=FE(e),r=Do("type",{handlers:{root:NE,element:IE,text:LE,comment:Su,doctype:OE,raw:PE},unknown:ME}),a={parser:n?new nu(yu):nu.getFragmentParser(void 0,yu),handle(o){r(o,a)},stitches:!1,options:t||{}};r(e,a),Kt(a,nt());const i=n?a.parser.document:a.parser.getFragment(),s=H0(i,{file:a.options.file});return a.stitches&&sr(s,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const p=l.children;return p[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Cu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function NE(e,t){Cu(e.children,t)}function IE(e,t){BE(e,t),Cu(e.children,t),RE(e,t)}function LE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:de.CHARACTER,chars:e.value,location:On(e)};Kt(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function OE(e,t){const n={type:de.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:On(e)};Kt(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DE(e,t){t.stitches=!0;const n=HE(e);if("children"in e&&"children"in n){const r=xu({type:"root",children:e.children},t.options);n.children=r.children}Su({type:"comment",value:{stitch:n}},t)}function Su(e,t){const n=e.value,r={type:de.COMMENT,data:n,location:On(e)};Kt(t,nt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function PE(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Au(t,nt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kE,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function ME(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DE(n,t);else{let r="";throw wE.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Kt(e,t){Au(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ke.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Au(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function BE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ke.PLAINTEXT)return;Kt(t,nt(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Nt.html;a===Nt.html&&n==="svg"&&(a=Nt.svg);const i=V0({...e,children:[]},{space:a===Nt.svg?"svg":"html"}),s={type:de.START_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:On(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function RE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&J0.includes(n)||t.parser.tokenizer.state===ke.PLAINTEXT)return;Kt(t,Jn(e));const r={type:de.END_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:On(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ke.RCDATA||t.parser.tokenizer.state===ke.RAWTEXT||t.parser.tokenizer.state===ke.SCRIPT_DATA)&&(t.parser.tokenizer.state=ke.DATA)}function FE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function On(e){const t=nt(e)||{line:void 0,column:void 0,offset:void 0},n=Jn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function HE(e){return"children"in e?wt({...e,children:[]}):wt(e)}function Ba(e){return function(t,n){return xu(t,{...e,file:n})}}const Ot=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Qt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ot,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ot],h2:[["className","sr-only"]],img:[...Ot,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ot,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ot],table:[...Ot],ul:[...Ot,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ct={}.hasOwnProperty;function $E(e,t){let n={type:"root",children:[]};const r={schema:t?{...Qt,...t}:Qt,stack:[]},a=_u(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function _u(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return UE(e,n);case"doctype":return qE(e,n);case"element":return zE(e,n);case"root":return VE(e,n);case"text":return GE(e,n)}}}function UE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Dn(i,t),i}}function qE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Dn(n,t),n}}function zE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=vu(e,t.children),a=YE(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&Ct.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(i=!1;++u<o.length;)e.stack.includes(o[u])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:a,children:r};return Dn(s,t),s}function VE(e,t){const r={type:"root",children:vu(e,t.children)};return Dn(r,t),r}function GE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Dn(r,t),r}function vu(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=_u(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function YE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&Ct.call(r,n)?r[n]:void 0,s=r&&Ct.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(Ct.call(o,l)){const d=o[l];let p=ku(e,Nu(i,l),l,d);p==null&&(p=ku(e,Nu(s,l),l,d)),p!=null&&(u[l]=p)}if(a&&Ct.call(a,n)){const d=a[n];for(l in d)Ct.call(d,l)&&!Ct.call(u,l)&&(u[l]=d[l])}return u}function ku(e,t,n,r){return t?Array.isArray(r)?WE(e,t,n,r):wu(e,t,n,r):void 0}function WE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=wu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function wu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&jE(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const s=t[i];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){a=!0;break}}else if(s===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function jE(e,t,n){const r=e.schema.protocols&&Ct.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),s=a.indexOf("?"),o=a.indexOf("#"),u=a.indexOf("/");if(i<0||u>-1&&i>u||s>-1&&i>s||o>-1&&i>o)return!0;let l=-1;for(;++l<r.length;){const d=r[l];if(i===d.length&&a.slice(0,d.length)===d)return!0}return!1}function Dn(e,t){const n=xs(t);t.data&&(e.data=wt(t.data)),n&&(e.position=n)}function Nu(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Ra(e){return function(t){return $E(t,e)}}function Iu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}const XE=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Lu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Ou(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function KE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function QE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Du(e){return QE(e)||Ou(e)}const JE=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Fa(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,o="",u,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,u=n.position.start):u=n.position);let d=(u?u.line:0)||1,p=(u?u.column:0)||1,E=y(),c;for(i--;++i<=e.length;)if(c===10&&(p=(l?l[s]:0)||1),c=e.charCodeAt(i),c===38){const g=e.charCodeAt(i+1);if(g===9||g===10||g===12||g===32||g===38||g===60||Number.isNaN(g)||r&&g===r){o+=String.fromCharCode(c),p++;continue}const b=i+1;let T=b,_=b,w;if(g===35){_=++T;const B=e.charCodeAt(_);B===88||B===120?(w="hexadecimal",_=++T):w="decimal"}else w="named";let C="",O="",A="";const S=w==="named"?Du:w==="decimal"?Ou:KE;for(_--;++_<=e.length;){const B=e.charCodeAt(_);if(!S(B))break;A+=String.fromCharCode(B),w==="named"&&XE.includes(A)&&(C=A,O=mn(A))}let k=e.charCodeAt(_)===59;if(k){_++;const B=w==="named"?mn(A):!1;B&&(C=A,O=B)}let I=1+_-b,M="";if(!(!k&&n.nonTerminated===!1))if(!A)w!=="named"&&h(4,I);else if(w==="named"){if(k&&!O)h(5,1);else if(C!==A&&(_=T+C.length,I=1+_-T,k=!1),!k){const B=C?1:3;if(n.attribute){const N=e.charCodeAt(_);N===61?(h(B,I),O=""):Du(N)?O="":h(B,I)}else h(B,I)}M=O}else{k||h(2,I);let B=Number.parseInt(A,w==="hexadecimal"?16:10);if(ZE(B))h(7,I),M="�";else if(B in Lu)h(6,I),M=Lu[B];else{let N="";e1(B)&&h(6,I),B>65535&&(B-=65536,N+=String.fromCharCode(B>>>10|55296),B=56320|B&1023),M=N+String.fromCharCode(B)}}if(M){m(),E=y(),i=_-1,p+=_-b+1,a.push(M);const B=y();B.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,M,{start:E,end:B},e.slice(b-1,_)),E=B}else A=e.slice(b-1,_),o+=A,p+=A.length,i=_-1}else c===10&&(d++,s++,p=0),Number.isNaN(c)?m():(o+=String.fromCharCode(c),p++);return a.join("");function y(){return{line:d,column:p,offset:i+((u?u.offset:0)||0)}}function h(g,b){let T;n.warning&&(T=y(),T.column+=b,T.offset+=b,n.warning.call(n.warningContext||void 0,JE[g],T,g))}function m(){o&&(a.push(o),n.text&&n.text.call(n.textContext||void 0,o,{start:E,end:y()}),o="")}}function ZE(e){return e>=55296&&e<=57343||e>1114111}function e1(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const t1=/["&'<>`]/g,n1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,a1=/[|\\{}()[\]^$+*?.]/g,Pu=new WeakMap;function i1(e,t){if(e=e.replace(t.subset?s1(t.subset):t1,r),t.subset||t.escapeOnly)return e;return e.replace(n1,n).replace(r1,r);function n(a,i,s){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(a,i,s){return t.format(a.charCodeAt(0),s.charCodeAt(i+1),t)}}function s1(e){let t=Pu.get(e);return t||(t=o1(e),Pu.set(e,t)),t}function o1(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(a1,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function u1(e){return"&#x"+e.toString(16).toUpperCase()+";"}function l1(e,t){return i1(e,Object.assign({format:u1},t))}const c1={}.hasOwnProperty,d1={},Mu=/^[^\t\n\r "#'.<=>`}]+$/,f1=/^[^\t\n\r "'<=>`}]+$/;function p1(){return{canContainEols:["textDirective"],enter:{directiveContainer:m1,directiveContainerAttributes:Ua,directiveContainerLabel:b1,directiveLeaf:g1,directiveLeafAttributes:Ua,directiveText:E1,directiveTextAttributes:Ua},exit:{directiveContainer:Wa,directiveContainerAttributeClassValue:za,directiveContainerAttributeIdValue:qa,directiveContainerAttributeName:Ga,directiveContainerAttributeValue:Va,directiveContainerAttributes:Ya,directiveContainerLabel:T1,directiveContainerName:$a,directiveLeaf:Wa,directiveLeafAttributeClassValue:za,directiveLeafAttributeIdValue:qa,directiveLeafAttributeName:Ga,directiveLeafAttributeValue:Va,directiveLeafAttributes:Ya,directiveLeafName:$a,directiveText:Wa,directiveTextAttributeClassValue:za,directiveTextAttributeIdValue:qa,directiveTextAttributeName:Ga,directiveTextAttributeValue:Va,directiveTextAttributes:Ya,directiveTextName:$a}}}function h1(e){const t=d1;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=y1,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
57
- `,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(i,s,o,u){const l=o.createTracker(u),d=x1(i),p=o.enter(i.type);let E=l.move(d+(i.name||"")),c;if(i.type==="containerDirective"){const y=(i.children||[])[0];c=Bu(y)?y:void 0}else c=i;if(c&&c.children&&c.children.length>0){const y=o.enter("label"),h=`${i.type}Label`,m=o.enter(h);E+=l.move("["),E+=l.move(o.containerPhrasing(c,{...l.current(),before:E,after:"]"})),E+=l.move("]"),m(),y()}if(E+=l.move(r(i,o)),i.type==="containerDirective"){const y=(i.children||[])[0];let h=i;Bu(y)&&(h=Object.assign({},i,{children:i.children.slice(1)})),h&&h.children&&h.children.length>0&&(E+=l.move(`
55
+ `},a),i}function e0(e,t){return e&&"run"in e?async function(n,r){const a=go(n,{file:r,...t});await e.run(a,r)}:function(n,r){return go(n,{file:r,...e||t})}}function Eo(e){if(e)throw e}var da,bo;function t0(){if(bo)return da;bo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!p)return!1;var E;for(E in l);return typeof E>"u"||e.call(l,E)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return da=function u(){var l,d,p,E,c,x,h=arguments[0],m=1,g=arguments.length,b=!1;for(typeof h=="boolean"&&(b=h,h=arguments[1]||{},m=2),(h==null||typeof h!="object"&&typeof h!="function")&&(h={});m<g;++m)if(l=arguments[m],l!=null)for(d in l)p=o(h,d),E=o(l,d),h!==E&&(b&&E&&(i(E)||(c=a(E)))?(c?(c=!1,x=p&&a(p)?p:[]):x=p&&i(p)?p:{},s(h,{name:d,newValue:u(b,x,E)})):typeof E<"u"&&s(h,{name:d,newValue:E}));return h},da}var n0=t0();const fa=Yr(n0);function pa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function r0(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...a);function o(u,...l){const d=e[++i];let p=-1;if(u){s(u);return}for(;++p<a.length;)(l[p]===null||l[p]===void 0)&&(l[p]=a[p]);a=l,d?a0(d,o)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function a0(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(a);try{u=e.apply(this,s)}catch(l){const d=l;if(o&&n)throw d;return a(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(i,a):u instanceof Error?a(u):i(u))}function a(s,...o){n||(n=!0,t(s,...o))}function i(s){a(null,s)}}const it={basename:i0,dirname:s0,extname:o0,join:u0,sep:"/"};function i0(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xn(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(r=a):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function s0(e){if(xn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function o0(e){xn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function u0(...e){let t=-1,n;for(;++t<e.length;)xn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":l0(n)}function l0(e){xn(e);const t=e.codePointAt(0)===47;let n=c0(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function c0(e,t){let n="",r=0,a=-1,i=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else o===46&&i>-1?i++:i=-1}return n}function xn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const d0={cwd:f0};function f0(){return"/"}function ha(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p0(e){if(typeof e=="string")e=new URL(e);else if(!ha(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return h0(e)}function h0(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const ma=["history","path","basename","stem","extname","dirname"];class To{constructor(t){let n;t?ha(t)?n={path:t}:typeof t=="string"||m0(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":d0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ma.length;){const i=ma[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)ma.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?it.basename(this.path):void 0}set basename(t){Ea(t,"basename"),ga(t,"basename"),this.path=it.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?it.dirname(this.path):void 0}set dirname(t){yo(this.basename,"dirname"),this.path=it.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?it.extname(this.path):void 0}set extname(t){if(ga(t,"extname"),yo(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=it.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ha(t)&&(t=p0(t)),Ea(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?it.basename(this.path,this.extname):void 0}set stem(t){Ea(t,"stem"),ga(t,"stem"),this.path=it.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Me(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ga(e,t){if(e&&e.includes(it.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+it.sep+"`")}function Ea(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function m0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const g0=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},E0={}.hasOwnProperty;class ba extends g0{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=r0()}copy(){const t=new ba;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fa(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(xa("data",this.frozen),this.namespace[t]=n,this):E0.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xa("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=or(t),r=this.parser||this.Parser;return Ta("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ta("process",this.parser||this.Parser),ya("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const o=or(t),u=r.parse(o);r.run(u,o,function(d,p,E){if(d||!p||!E)return l(d);const c=p,x=r.stringify(c,E);y0(x)?E.value=x:E.result=x,l(d,E)});function l(d,p){d||!p?s(d):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Ta("processSync",this.parser||this.Parser),ya("processSync",this.compiler||this.Compiler),this.process(t,a),Co("processSync","process",n),r;function a(i,s){n=!0,Eo(i),r=s}}run(t,n,r){xo(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,o){const u=or(n);a.run(t,u,l);function l(d,p,E){const c=p||t;d?o(d):s?s(c):r(void 0,c,E)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Co("runSync","run",r),a;function i(s,o){Eo(s),a=o,r=!0}}stringify(t,n){this.freeze();const r=or(n),a=this.compiler||this.Compiler;return ya("stringify",a),xo(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(xa("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...p]=l;u(d,p)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(a.settings=fa(!0,a.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const p=l[d];i(p)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let p=-1,E=-1;for(;++p<r.length;)if(r[p][0]===l){E=p;break}if(E===-1)r.push([l,...d]);else if(d.length>0){let[c,...x]=d;const h=r[E][1];pa(h)&&pa(c)&&(c=fa(!0,h,c)),r[E]=[l,c,...x]}}}}const b0=new ba().freeze();function Ta(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ya(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xo(e){if(!pa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Co(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function or(e){return T0(e)?e:new To(e)}function T0(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y0(e){return typeof e=="string"||x0(e)}function x0(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C0="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",So=[],Ao={allowDangerousHtml:!0},S0=/^(https?|ircs?|mailto|xmpp)$/i,A0=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ca(e){const t=_0(e),n=v0(e);return k0(t.runSync(t.parse(n),n),e)}function _0(e){const t=e.rehypePlugins||So,n=e.remarkPlugins||So,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ao}:Ao;return b0().use(sh).use(n).use(e0,r).use(t)}function v0(e){const t=e.children||"",n=new To;return typeof t=="string"&&(n.value=t),n}function k0(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,o=t.unwrapDisallowed,u=t.urlTransform||w0;for(const d of A0)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C0+d.id,void 0);return sr(e,l),Xd(e,{Fragment:q.Fragment,components:a,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function l(d,p,E){if(d.type==="raw"&&E&&typeof p=="number")return s?E.children.splice(p,1):E.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let c;for(c in Jr)if(Object.hasOwn(Jr,c)&&Object.hasOwn(d.properties,c)){const x=d.properties[c],h=Jr[c];(h===null||h.includes(d.tagName))&&(d.properties[c]=u(String(x||""),c,d))}}if(d.type==="element"){let c=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!c&&r&&typeof p=="number"&&(c=!r(d,p,E)),c&&E&&typeof p=="number")return o&&d.children?E.children.splice(p,1,...d.children):E.children.splice(p,1),p}}}function w0(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||S0.test(e.slice(0,t))?e:""}const _o=/[#.]/g;function N0(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){_o.lastIndex=a;const o=_o.exec(n),u=n.slice(a,o?o.index:n.length);u&&(i?i==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,a+=u.length),o&&(i=o[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function vo(e,t,n){const r=n?D0(n):void 0;function a(i,s,...o){let u;if(i==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=N0(i,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,I0(s))o.unshift(s);else for(const[p,E]of Object.entries(s))L0(e,u.properties,p,E)}for(const l of o)Sa(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return a}function I0(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function L0(e,t,n,r){const a=Qn(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?a.spaceSeparated?i=hs(r):a.commaSeparated?i=ts(r):a.commaOrSpaceSeparated?i=hs(ts(r).join(" ")):i=ko(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?O0(r):String(r);if(Array.isArray(i)){const s=[];for(const o of i)s.push(ko(a,a.property,o));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function Sa(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Sa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Sa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ko(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ln(n)===ln(t)))return!0}return n}function O0(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function D0(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const P0=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],M0=vo(cn,"div"),B0=vo(gt,"g",P0);function R0(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=wo(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const o=n[n.length-1],u=wo(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function wo(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
56
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Nt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},No={}.hasOwnProperty,F0=Object.prototype;function H0(e,t){const n=t||{};return Aa({file:n.file||void 0,location:!1,schema:n.space==="svg"?gt:cn,verbose:n.verbose||!1},e)}function Aa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ur(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Io(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=R0(i),o=s.toPoint(0),u=s.toPoint(i.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ur(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ur(e,r,n),n}default:return n=$0(e,t),n}}function Io(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=Aa(e,t[n]);r.push(a)}return r}function $0(e,t){const n=e.schema;e.schema=t.namespaceURI===Nt.svg?gt:cn;let r=-1;const a={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;No.call(F0,u)||(a[u]=o.value)}const s=(e.schema.space==="svg"?B0:M0)(t.tagName,a,Io(e,t.childNodes));if(ur(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Yt(u.startTag),d=u&&u.endTag&&Yt(u.endTag),p=Aa(e,o.content);l&&d&&e.file&&(p.position={start:l.end,end:d.start}),s.content=p}return e.schema=n,s}function ur(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=U0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function U0(e,t,n){const r=Yt(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)No.call(n.attrs,s)&&(i[Qn(e.schema,s).property]=Yt(n.attrs[s]));n.startTag;const o=Yt(n.startTag),u=n.endTag?Yt(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=i,t.data={position:l}}}return r}function Yt(e){const t=Lo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Lo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Lo(e){return e.line&&e.column?e:void 0}const Oo={}.hasOwnProperty;function Do(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const o=r.handlers;if(a&&Oo.call(a,e)){const u=String(a[e]);s=Oo.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const q0={},z0={}.hasOwnProperty,Po=Do("type",{handlers:{root:G0,element:K0,text:j0,comment:X0,doctype:W0}});function V0(e,t){const r=(t||q0).space;return Po(e,r==="svg"?gt:cn)}function G0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=_a(e.children,n,t),Wt(e,n),n}function Y0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=_a(e.children,n,t),Wt(e,n),n}function W0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Wt(e,t),t}function j0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Wt(e,t),t}function X0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Wt(e,t),t}function K0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=gt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&z0.call(e.properties,i)){const u=Q0(r,i,e.properties[i]);u&&a.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Nt[s],childNodes:[],parentNode:null};return o.childNodes=_a(e.children,o,r),Wt(e,o),e.tagName==="template"&&e.content&&(o.content=Y0(e.content,r)),o}function Q0(e,t,n){const r=Qn(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ns(n):ms(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=Nt[r.space]}return a}function _a(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=Po(e[r],n);i.parentNode=t,a.push(i)}return a}function Wt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const J0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Z0=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Se="�";var D;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(D||(D={}));const qe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Mo(e){return e>=55296&&e<=57343}function em(e){return e>=56320&&e<=57343}function tm(e,t){return(e-55296)*1024+9216+t}function Bo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Ro(e){return e>=64976&&e<=65007||Z0.has(e)}var G;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(G||(G={}));const nm=65536;class rm{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=nm,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:a,offset:i}=this,s=a+n,o=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(em(n))return this.pos++,this._addGap(),tm(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(G.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;const r=this.html.charCodeAt(n);return r===D.CARRIAGE_RETURN?D.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let t=this.html.charCodeAt(this.pos);return t===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):t===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Mo(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===D.LINE_FEED||t===D.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Bo(t)?this._err(G.controlCharacterInInputStream):Ro(t)&&this._err(G.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var de;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(de||(de={}));function Fo(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const am=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),im=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function sm(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=im.get(e))!==null&&t!==void 0?t:e}var Ie;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ie||(Ie={}));const om=32;var Tt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tt||(Tt={}));function va(e){return e>=Ie.ZERO&&e<=Ie.NINE}function um(e){return e>=Ie.UPPER_A&&e<=Ie.UPPER_F||e>=Ie.LOWER_A&&e<=Ie.LOWER_F}function lm(e){return e>=Ie.UPPER_A&&e<=Ie.UPPER_Z||e>=Ie.LOWER_A&&e<=Ie.LOWER_Z||va(e)}function cm(e){return e===Ie.EQUALS||lm(e)}var Le;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Le||(Le={}));var dt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(dt||(dt={}));class dm{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Le.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=dt.Strict}startEntity(t){this.decodeMode=t,this.state=Le.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Le.EntityStart:return t.charCodeAt(n)===Ie.NUM?(this.state=Le.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Le.NamedEntity,this.stateNamedEntity(t,n));case Le.NumericStart:return this.stateNumericStart(t,n);case Le.NumericDecimal:return this.stateNumericDecimal(t,n);case Le.NumericHex:return this.stateNumericHex(t,n);case Le.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|om)===Ie.LOWER_X?(this.state=Le.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Le.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+Number.parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(va(a)||um(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(va(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ie.SEMI)this.consumed+=1;else if(this.decodeMode===dt.Strict)return 0;return this.emitCodePoint(sm(this.result),this.consumed),this.errors&&(t!==Ie.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&Tt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=fm(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===dt.Attribute&&(i===0||cm(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&Tt.VALUE_LENGTH)>>14,i!==0){if(s===Ie.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==dt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&Tt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Tt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Le.NamedEntity:return this.result!==0&&(this.decodeMode!==dt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Le.NumericDecimal:return this.emitNumericEntity(0,2);case Le.NumericHex:return this.emitNumericEntity(0,3);case Le.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Le.EntityStart:return 0}}}function fm(e,t,n,r){const a=(t&Tt.BRANCH_LENGTH)>>7,i=t&Tt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const u=r-i;return u<0||u>=a?-1:e[n+u]-1}let s=n,o=s+a-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)o=u-1;else return e[u+a]}return-1}var j;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(j||(j={}));var It;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(It||(It={}));var Je;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Je||(Je={}));var z;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(z||(z={}));var f;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(f||(f={}));const pm=new Map([[z.A,f.A],[z.ADDRESS,f.ADDRESS],[z.ANNOTATION_XML,f.ANNOTATION_XML],[z.APPLET,f.APPLET],[z.AREA,f.AREA],[z.ARTICLE,f.ARTICLE],[z.ASIDE,f.ASIDE],[z.B,f.B],[z.BASE,f.BASE],[z.BASEFONT,f.BASEFONT],[z.BGSOUND,f.BGSOUND],[z.BIG,f.BIG],[z.BLOCKQUOTE,f.BLOCKQUOTE],[z.BODY,f.BODY],[z.BR,f.BR],[z.BUTTON,f.BUTTON],[z.CAPTION,f.CAPTION],[z.CENTER,f.CENTER],[z.CODE,f.CODE],[z.COL,f.COL],[z.COLGROUP,f.COLGROUP],[z.DD,f.DD],[z.DESC,f.DESC],[z.DETAILS,f.DETAILS],[z.DIALOG,f.DIALOG],[z.DIR,f.DIR],[z.DIV,f.DIV],[z.DL,f.DL],[z.DT,f.DT],[z.EM,f.EM],[z.EMBED,f.EMBED],[z.FIELDSET,f.FIELDSET],[z.FIGCAPTION,f.FIGCAPTION],[z.FIGURE,f.FIGURE],[z.FONT,f.FONT],[z.FOOTER,f.FOOTER],[z.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[z.FORM,f.FORM],[z.FRAME,f.FRAME],[z.FRAMESET,f.FRAMESET],[z.H1,f.H1],[z.H2,f.H2],[z.H3,f.H3],[z.H4,f.H4],[z.H5,f.H5],[z.H6,f.H6],[z.HEAD,f.HEAD],[z.HEADER,f.HEADER],[z.HGROUP,f.HGROUP],[z.HR,f.HR],[z.HTML,f.HTML],[z.I,f.I],[z.IMG,f.IMG],[z.IMAGE,f.IMAGE],[z.INPUT,f.INPUT],[z.IFRAME,f.IFRAME],[z.KEYGEN,f.KEYGEN],[z.LABEL,f.LABEL],[z.LI,f.LI],[z.LINK,f.LINK],[z.LISTING,f.LISTING],[z.MAIN,f.MAIN],[z.MALIGNMARK,f.MALIGNMARK],[z.MARQUEE,f.MARQUEE],[z.MATH,f.MATH],[z.MENU,f.MENU],[z.META,f.META],[z.MGLYPH,f.MGLYPH],[z.MI,f.MI],[z.MO,f.MO],[z.MN,f.MN],[z.MS,f.MS],[z.MTEXT,f.MTEXT],[z.NAV,f.NAV],[z.NOBR,f.NOBR],[z.NOFRAMES,f.NOFRAMES],[z.NOEMBED,f.NOEMBED],[z.NOSCRIPT,f.NOSCRIPT],[z.OBJECT,f.OBJECT],[z.OL,f.OL],[z.OPTGROUP,f.OPTGROUP],[z.OPTION,f.OPTION],[z.P,f.P],[z.PARAM,f.PARAM],[z.PLAINTEXT,f.PLAINTEXT],[z.PRE,f.PRE],[z.RB,f.RB],[z.RP,f.RP],[z.RT,f.RT],[z.RTC,f.RTC],[z.RUBY,f.RUBY],[z.S,f.S],[z.SCRIPT,f.SCRIPT],[z.SEARCH,f.SEARCH],[z.SECTION,f.SECTION],[z.SELECT,f.SELECT],[z.SOURCE,f.SOURCE],[z.SMALL,f.SMALL],[z.SPAN,f.SPAN],[z.STRIKE,f.STRIKE],[z.STRONG,f.STRONG],[z.STYLE,f.STYLE],[z.SUB,f.SUB],[z.SUMMARY,f.SUMMARY],[z.SUP,f.SUP],[z.TABLE,f.TABLE],[z.TBODY,f.TBODY],[z.TEMPLATE,f.TEMPLATE],[z.TEXTAREA,f.TEXTAREA],[z.TFOOT,f.TFOOT],[z.TD,f.TD],[z.TH,f.TH],[z.THEAD,f.THEAD],[z.TITLE,f.TITLE],[z.TR,f.TR],[z.TRACK,f.TRACK],[z.TT,f.TT],[z.U,f.U],[z.UL,f.UL],[z.SVG,f.SVG],[z.VAR,f.VAR],[z.WBR,f.WBR],[z.XMP,f.XMP]]);function jt(e){var t;return(t=pm.get(e))!==null&&t!==void 0?t:f.UNKNOWN}const X=f,hm={[j.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[j.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[j.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[j.XLINK]:new Set,[j.XML]:new Set,[j.XMLNS]:new Set},ka=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT;var B;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(B||(B={}));const ke={DATA:B.DATA,RCDATA:B.RCDATA,RAWTEXT:B.RAWTEXT,SCRIPT_DATA:B.SCRIPT_DATA,PLAINTEXT:B.PLAINTEXT,CDATA_SECTION:B.CDATA_SECTION};function mm(e){return e>=D.DIGIT_0&&e<=D.DIGIT_9}function Cn(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function gm(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z}function yt(e){return gm(e)||Cn(e)}function Ho(e){return yt(e)||mm(e)}function lr(e){return e+32}function $o(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function Uo(e){return $o(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}function Em(e){return e===D.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:Mo(e)?G.surrogateCharacterReference:Ro(e)?G.noncharacterCharacterReference:Bo(e)||e===D.CARRIAGE_RETURN?G.controlCharacterReference:null}class bm{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=B.DATA,this.returnState=B.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new rm(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new dm(am,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(G.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(G.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=Em(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:de.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:de.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:de.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:de.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(Fo(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(G.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=jt(t.tagName),t.type===de.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(G.endTagWithAttributes),t.selfClosing&&this._err(G.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case de.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case de.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case de.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:de.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=$o(t)?de.WHITESPACE_CHARACTER:t===D.NULL?de.NULL_CHARACTER:de.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(de.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=B.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?dt.Attribute:dt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===B.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===B.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case B.DATA:{this._stateData(t);break}case B.RCDATA:{this._stateRcdata(t);break}case B.RAWTEXT:{this._stateRawtext(t);break}case B.SCRIPT_DATA:{this._stateScriptData(t);break}case B.PLAINTEXT:{this._statePlaintext(t);break}case B.TAG_OPEN:{this._stateTagOpen(t);break}case B.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case B.TAG_NAME:{this._stateTagName(t);break}case B.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case B.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case B.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case B.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case B.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case B.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case B.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case B.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case B.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case B.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case B.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case B.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case B.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case B.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case B.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case B.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case B.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case B.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case B.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case B.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case B.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case B.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case B.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case B.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case B.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case B.BOGUS_COMMENT:{this._stateBogusComment(t);break}case B.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case B.COMMENT_START:{this._stateCommentStart(t);break}case B.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case B.COMMENT:{this._stateComment(t);break}case B.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case B.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case B.COMMENT_END:{this._stateCommentEnd(t);break}case B.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case B.DOCTYPE:{this._stateDoctype(t);break}case B.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case B.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case B.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case B.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case B.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case B.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case B.CDATA_SECTION:{this._stateCdataSection(t);break}case B.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case B.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case B.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case B.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.TAG_OPEN;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitCodePoint(t);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case D.AMPERSAND:{this._startCharacterReference();break}case D.LESS_THAN_SIGN:{this.state=B.RCDATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.RAWTEXT_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(yt(t))this._createStartTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case D.EXCLAMATION_MARK:{this.state=B.MARKUP_DECLARATION_OPEN;break}case D.SOLIDUS:{this.state=B.END_TAG_OPEN;break}case D.QUESTION_MARK:{this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t);break}case D.EOF:{this._err(G.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=B.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(yt(t))this._createEndTagToken(),this.state=B.TAG_NAME,this._stateTagName(t);else switch(t){case D.GREATER_THAN_SIGN:{this._err(G.missingEndTagName),this.state=B.DATA;break}case D.EOF:{this._err(G.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.tagName+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateRcdataLessThanSign(t){t===D.SOLIDUS?this.state=B.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){yt(t)?(this.state=B.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=B.BEFORE_ATTRIBUTE_NAME,!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=B.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=B.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===D.SOLIDUS?this.state=B.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){yt(t)?(this.state=B.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case D.SOLIDUS:{this.state=B.SCRIPT_DATA_END_TAG_OPEN;break}case D.EXCLAMATION_MARK:{this.state=B.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=B.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){yt(t)?(this.state=B.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===D.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===D.HYPHEN_MINUS?(this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=B.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===D.SOLIDUS?this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:yt(t)?(this._emitChars("<"),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){yt(t)?(this.state=B.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&Uo(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.GREATER_THAN_SIGN:{this.state=B.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case D.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===D.SOLIDUS?(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(qe.SCRIPT,!1)&&Uo(this.preprocessor.peek(qe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=B.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=B.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=B.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this._leaveAttrName(),this.state=B.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._leaveAttrName(),this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:{this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.name+=Se;break}default:this.currentAttr.name+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateAfterAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:{this.state=B.SELF_CLOSING_START_TAG;break}case D.EQUALS_SIGN:{this.state=B.BEFORE_ATTRIBUTE_VALUE;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=B.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{this.state=B.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this.state=B.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingAttributeValue),this.state=B.DATA,this.emitCurrentTagToken();break}default:this.state=B.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case D.APOSTROPHE:{this.state=B.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:{this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=B.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this._leaveAttrValue(),this.state=B.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBetweenAttributes),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case D.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=B.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.unexpectedSolidusInTag),this.state=B.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(n);break}case D.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Se;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qe.DASH_DASH,!0)?(this._createCommentToken(qe.DASH_DASH.length+1),this.state=B.COMMENT_START):this._consumeSequenceIfMatch(qe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qe.DOCTYPE.length+1),this.state=B.DOCTYPE):this._consumeSequenceIfMatch(qe.CDATA_START,!0)?this.inForeignNode?this.state=B.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(qe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=B.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=B.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_START_DASH;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=B.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=B.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END_DASH;break}case D.LESS_THAN_SIGN:{n.data+="<",this.state=B.COMMENT_LESS_THAN_SIGN;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Se;break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case D.EXCLAMATION_MARK:{n.data+="!",this.state=B.COMMENT_LESS_THAN_SIGN_BANG;break}case D.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=B.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===D.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=B.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===D.HYPHEN_MINUS?this.state=B.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=B.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==D.GREATER_THAN_SIGN&&t!==D.EOF&&this._err(G.nestedComment),this.state=B.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=B.COMMENT_END;break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentComment(n);break}case D.EXCLAMATION_MARK:{this.state=B.COMMENT_END_BANG;break}case D.HYPHEN_MINUS:{n.data+="-";break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=B.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case D.HYPHEN_MINUS:{n.data+="--!",this.state=B.COMMENT_END_DASH;break}case D.GREATER_THAN_SIGN:{this._err(G.incorrectlyClosedComment),this.state=B.DATA,this.emitCurrentComment(n);break}case D.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=B.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case D.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBeforeDoctypeName),this.state=B.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Cn(t))this._createDoctypeToken(String.fromCharCode(lr(t))),this.state=B.DOCTYPE_NAME;else switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:{this._err(G.unexpectedNullCharacter),this._createDoctypeToken(Se),this.state=B.DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=B.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.AFTER_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.name+=Se;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Cn(t)?lr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qe.PUBLIC,!1)?this.state=B.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qe.SYSTEM,!1)?this.state=B.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.publicId="",this.state=B.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case D.GREATER_THAN_SIGN:{this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.QUOTATION_MARK:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=B.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{n.systemId="",this.state=B.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.DATA,this.emitCurrentDoctype(n);break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=B.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Se;break}case D.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=B.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=B.DATA;break}case D.NULL:{this._err(G.unexpectedNullCharacter);break}case D.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case D.RIGHT_SQUARE_BRACKET:{this.state=B.CDATA_SECTION_BRACKET;break}case D.EOF:{this._err(G.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===D.RIGHT_SQUARE_BRACKET?this.state=B.CDATA_SECTION_END:(this._emitChars("]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case D.GREATER_THAN_SIGN:{this.state=B.DATA;break}case D.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=B.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ho(this.preprocessor.peek(1))?B.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ho(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===D.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const qo=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),zo=new Set([...qo,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),cr=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),Tm=new Set([...cr,f.OL,f.UL]),ym=new Set([...cr,f.BUTTON]),Vo=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),Go=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),xm=new Set([f.TR,f.TEMPLATE,f.HTML]),Cm=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),Sm=new Set([f.TABLE,f.TEMPLATE,f.HTML]),Am=new Set([f.TD,f.TH]);class _m{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=f.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===j.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==j.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ka,j.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Am,j.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Sm,j.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Cm,j.HTML)}clearBackToTableRowContext(){this.clearBackTo(xm,j.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===f.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===f.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case j.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case j.SVG:{if(Go.has(a))return!1;break}case j.MATHML:{if(Vo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,cr)}hasInListItemScope(t){return this.hasInDynamicScope(t,Tm)}hasInButtonScope(t){return this.hasInDynamicScope(t,ym)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case j.HTML:{if(ka.has(n))return!0;if(cr.has(n))return!1;break}case j.SVG:{if(Go.has(n))return!1;break}case j.MATHML:{if(Vo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===j.HTML)switch(this.tagIDs[n]){case t:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===j.HTML)switch(this.tagIDs[t]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===j.HTML)switch(this.tagIDs[n]){case t:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&qo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&zo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&zo.has(this.currentTagId);)this.pop()}}const wa=3;var st;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(st||(st={}));const Yo={type:st.Marker};class vm{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===st.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===a&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<wa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<wa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>a.get(u.name)===u.value)&&(i+=1,i>=wa&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Yo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:st.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:st.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Yo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===st.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===st.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===st.Element&&n.element===t)}}const xt={createDocument(){return{nodeName:"#document",mode:Je.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};xt.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(xt.isTextNode(n)){n.value+=t;return}}xt.appendChild(e,xt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&xt.isTextNode(r)?r.value+=t:xt.insertBefore(e,xt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Wo="html",km="about:legacy-compat",wm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jo=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Nm=[...jo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Im=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Xo=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Lm=[...Xo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ko(e,t){return t.some(n=>e.startsWith(n))}function Om(e){return e.name===Wo&&e.publicId===null&&(e.systemId===null||e.systemId===km)}function Dm(e){if(e.name!==Wo)return Je.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===wm)return Je.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Im.has(n))return Je.QUIRKS;let r=t===null?Nm:jo;if(Ko(n,r))return Je.QUIRKS;if(r=t===null?Xo:Lm,Ko(n,r))return Je.LIMITED_QUIRKS}return Je.NO_QUIRKS}const Qo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Pm="definitionurl",Mm="definitionURL",Bm=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Rm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:j.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:j.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:j.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:j.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:j.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:j.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:j.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:j.XML}],["xml:space",{prefix:"xml",name:"space",namespace:j.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:j.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:j.XMLNS}]]),Fm=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Hm=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function $m(e){const t=e.tagID;return t===f.FONT&&e.attrs.some(({name:r})=>r===It.COLOR||r===It.SIZE||r===It.FACE)||Hm.has(t)}function Jo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Pm){e.attrs[t].name=Mm;break}}function Zo(e){for(let t=0;t<e.attrs.length;t++){const n=Bm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Na(e){for(let t=0;t<e.attrs.length;t++){const n=Rm.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Um(e){const t=Fm.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=jt(e.tagName))}function qm(e,t){return t===j.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}function zm(e,t,n){if(t===j.MATHML&&e===f.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===It.ENCODING){const a=n[r].value.toLowerCase();return a===Qo.TEXT_HTML||a===Qo.APPLICATION_XML}}return t===j.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}function Vm(e,t,n,r){return(!r||r===j.HTML)&&zm(e,t,n)||(!r||r===j.MATHML)&&qm(e,t)}const Gm="hidden",Ym=8,Wm=3;var H;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(H||(H={}));const jm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},eu=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),tu={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:xt,onParseError:null};class nu{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...tu,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new bm(this.options,this),this.activeFormattingElements=new vm(this.treeAdapter),this.fragmentContextID=r?jt(this.treeAdapter.getTagName(r)):f.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new _m(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...tu,...n};t??(t=r.treeAdapter.createElement(z.TEMPLATE,j.HTML,[]));const a=r.treeAdapter.createElement("documentmock",j.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===f.TEMPLATE&&i.tmplInsertionModeStack.unshift(H.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:jm,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===j.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,j.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=ke.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===z.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==j.HTML))switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:{this.tokenizer.state=ke.RCDATA;break}case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:{this.tokenizer.state=ke.RAWTEXT;break}case f.SCRIPT:{this.tokenizer.state=ke.SCRIPT_DATA;break}case f.PLAINTEXT:{this.tokenizer.state=ke.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,j.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,j.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,j.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,f.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===de.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===f.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===j.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===f.MGLYPH||t.tagID===f.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,j.HTML)}_processToken(t){switch(t.type){case de.CHARACTER:{this.onCharacter(t);break}case de.NULL_CHARACTER:{this.onNullCharacter(t);break}case de.COMMENT:{this.onComment(t);break}case de.DOCTYPE:{this.onDoctype(t);break}case de.START_TAG:{this._processStartTag(t);break}case de.END_TAG:{this.onEndTag(t);break}case de.EOF:{this.onEof(t);break}case de.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Vm(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===st.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case f.TR:{this.insertionMode=H.IN_ROW;return}case f.TBODY:case f.THEAD:case f.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case f.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case f.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case f.TABLE:{this.insertionMode=H.IN_TABLE;return}case f.BODY:{this.insertionMode=H.IN_BODY;return}case f.FRAMESET:{this.insertionMode=H.IN_FRAMESET;return}case f.SELECT:{this._resetInsertionModeForSelect(t);return}case f.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case f.HTML:{this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return}case f.TD:case f.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case f.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===f.TEMPLATE)break;if(r===f.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return eu.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case f.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===j.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case f.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return hm[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AE(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sn(this,t);break}case H.BEFORE_HTML:{An(this,t);break}case H.BEFORE_HEAD:{_n(this,t);break}case H.IN_HEAD:{vn(this,t);break}case H.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case H.AFTER_HEAD:{wn(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{au(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Da(this,t);break}case H.IN_TABLE_TEXT:{fu(this,t);break}case H.IN_COLUMN_GROUP:{pr(this,t);break}case H.AFTER_BODY:{gr(this,t);break}case H.AFTER_AFTER_BODY:{Er(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){SE(this,t);return}switch(this.insertionMode){case H.INITIAL:{Sn(this,t);break}case H.BEFORE_HTML:{An(this,t);break}case H.BEFORE_HEAD:{_n(this,t);break}case H.IN_HEAD:{vn(this,t);break}case H.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case H.AFTER_HEAD:{wn(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Da(this,t);break}case H.IN_COLUMN_GROUP:{pr(this,t);break}case H.AFTER_BODY:{gr(this,t);break}case H.AFTER_AFTER_BODY:{Er(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){La(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{La(this,t);break}case H.IN_TABLE_TEXT:{Ln(this,t);break}case H.AFTER_BODY:{tg(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{ng(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{rg(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,G.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Ln(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,G.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?_E(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sn(this,t);break}case H.BEFORE_HTML:{ag(this,t);break}case H.BEFORE_HEAD:{sg(this,t);break}case H.IN_HEAD:{Ze(this,t);break}case H.IN_HEAD_NO_SCRIPT:{lg(this,t);break}case H.AFTER_HEAD:{dg(this,t);break}case H.IN_BODY:{Be(this,t);break}case H.IN_TABLE:{Xt(this,t);break}case H.IN_TABLE_TEXT:{Ln(this,t);break}case H.IN_CAPTION:{oE(this,t);break}case H.IN_COLUMN_GROUP:{Pa(this,t);break}case H.IN_TABLE_BODY:{hr(this,t);break}case H.IN_ROW:{mr(this,t);break}case H.IN_CELL:{cE(this,t);break}case H.IN_SELECT:{mu(this,t);break}case H.IN_SELECT_IN_TABLE:{fE(this,t);break}case H.IN_TEMPLATE:{hE(this,t);break}case H.AFTER_BODY:{gE(this,t);break}case H.IN_FRAMESET:{EE(this,t);break}case H.AFTER_FRAMESET:{TE(this,t);break}case H.AFTER_AFTER_BODY:{xE(this,t);break}case H.AFTER_AFTER_FRAMESET:{CE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{Sn(this,t);break}case H.BEFORE_HTML:{ig(this,t);break}case H.BEFORE_HEAD:{og(this,t);break}case H.IN_HEAD:{ug(this,t);break}case H.IN_HEAD_NO_SCRIPT:{cg(this,t);break}case H.AFTER_HEAD:{fg(this,t);break}case H.IN_BODY:{fr(this,t);break}case H.TEXT:{Qg(this,t);break}case H.IN_TABLE:{Nn(this,t);break}case H.IN_TABLE_TEXT:{Ln(this,t);break}case H.IN_CAPTION:{uE(this,t);break}case H.IN_COLUMN_GROUP:{lE(this,t);break}case H.IN_TABLE_BODY:{Ma(this,t);break}case H.IN_ROW:{hu(this,t);break}case H.IN_CELL:{dE(this,t);break}case H.IN_SELECT:{gu(this,t);break}case H.IN_SELECT_IN_TABLE:{pE(this,t);break}case H.IN_TEMPLATE:{mE(this,t);break}case H.AFTER_BODY:{bu(this,t);break}case H.IN_FRAMESET:{bE(this,t);break}case H.AFTER_FRAMESET:{yE(this,t);break}case H.AFTER_AFTER_BODY:{Er(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{Sn(this,t);break}case H.BEFORE_HTML:{An(this,t);break}case H.BEFORE_HEAD:{_n(this,t);break}case H.IN_HEAD:{vn(this,t);break}case H.IN_HEAD_NO_SCRIPT:{kn(this,t);break}case H.AFTER_HEAD:{wn(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{cu(this,t);break}case H.TEXT:{Jg(this,t);break}case H.IN_TABLE_TEXT:{Ln(this,t);break}case H.IN_TEMPLATE:{Eu(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{Oa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===D.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{ru(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Da(this,t);break}case H.IN_TABLE_TEXT:{du(this,t);break}}}}function Xm(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):lu(e,t),n}function Km(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Qm(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&i>=Wm;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=Jm(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Jm(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Zm(e,t,n){const r=e.treeAdapter.getTagName(t),a=jt(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===f.TEMPLATE&&i===j.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function eg(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function Ia(e,t){for(let n=0;n<Ym;n++){const r=Xm(e,t);if(!r)break;const a=Km(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=Qm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&Zm(e,s,i),eg(e,a,r)}}function La(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function tg(e,t){e._appendCommentNode(t,e.openElements.items[0])}function ng(e,t){e._appendCommentNode(t,e.document)}function Oa(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function rg(e,t){e._setDocumentType(t);const n=t.forceQuirks?Je.QUIRKS:Dm(t);Om(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function Sn(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Je.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function ag(e,t){t.tagID===f.HTML?(e._insertElement(t,j.HTML),e.insertionMode=H.BEFORE_HEAD):An(e,t)}function ig(e,t){const n=t.tagID;(n===f.HTML||n===f.HEAD||n===f.BODY||n===f.BR)&&An(e,t)}function An(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function sg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.HEAD:{e._insertElement(t,j.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:_n(e,t)}}function og(e,t){const n=t.tagID;n===f.HEAD||n===f.BODY||n===f.HTML||n===f.BR?_n(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function _n(e,t){e._insertFakeElement(z.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function Ze(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.TITLE:{e._switchToTextParsing(t,ke.RCDATA);break}case f.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ke.RAWTEXT):(e._insertElement(t,j.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case f.NOFRAMES:case f.STYLE:{e._switchToTextParsing(t,ke.RAWTEXT);break}case f.SCRIPT:{e._switchToTextParsing(t,ke.SCRIPT_DATA);break}case f.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case f.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:vn(e,t)}}function ug(e,t){switch(t.tagID){case f.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case f.BODY:case f.BR:case f.HTML:{vn(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function Lt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function vn(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function lg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:{Ze(e,t);break}case f.NOSCRIPT:{e._err(t,G.nestedNoscriptInHead);break}default:kn(e,t)}}function cg(e,t){switch(t.tagID){case f.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case f.BR:{kn(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function kn(e,t){const n=t.type===de.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function dg(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.BODY:{e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case f.FRAMESET:{e._insertElement(t,j.HTML),e.insertionMode=H.IN_FRAMESET;break}case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,f.HEAD),Ze(e,t),e.openElements.remove(e.headElement);break}case f.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:wn(e,t)}}function fg(e,t){switch(t.tagID){case f.BODY:case f.HTML:case f.BR:{wn(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function wn(e,t){e._insertFakeElement(z.BODY,f.BODY),e.insertionMode=H.IN_BODY,dr(e,t)}function dr(e,t){switch(t.type){case de.CHARACTER:{au(e,t);break}case de.WHITESPACE_CHARACTER:{ru(e,t);break}case de.COMMENT:{La(e,t);break}case de.START_TAG:{Be(e,t);break}case de.END_TAG:{fr(e,t);break}case de.EOF:{cu(e,t);break}}}function ru(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function au(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function pg(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function hg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mg(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_FRAMESET)}function gg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML)}function Eg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ka.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,j.HTML)}function bg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Tg(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),n||(e.formElement=e.openElements.current))}function yg(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===f.LI&&a===f.LI||(n===f.DD||n===f.DT)&&(a===f.DD||a===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==f.ADDRESS&&a!==f.DIV&&a!==f.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML)}function xg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.tokenizer.state=ke.PLAINTEXT}function Cg(e,t){e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.framesetOk=!1}function Sg(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Ia(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ag(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _g(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(Ia(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,j.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function kg(e,t){e.treeAdapter.getDocumentMode(e.document)!==Je.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function iu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,j.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function su(e){const t=Fo(e,It.TYPE);return t!=null&&t.toLowerCase()===Gm}function wg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,j.HTML),su(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Ng(e,t){e._appendElement(t,j.HTML),t.ackSelfClosing=!0}function Ig(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,j.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lg(e,t){t.tagName=z.IMG,t.tagID=f.IMG,iu(e,t)}function Og(e,t){e._insertElement(t,j.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ke.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function Dg(e,t){e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ke.RAWTEXT)}function Pg(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ke.RAWTEXT)}function ou(e,t){e._switchToTextParsing(t,ke.RAWTEXT)}function Mg(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function Bg(e,t){e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML)}function Rg(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,j.HTML)}function Fg(e,t){e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,j.HTML)}function Hg(e,t){e._reconstructActiveFormattingElements(),Jo(t),Na(t),t.selfClosing?e._appendElement(t,j.MATHML):e._insertElement(t,j.MATHML),t.ackSelfClosing=!0}function $g(e,t){e._reconstructActiveFormattingElements(),Zo(t),Na(t),t.selfClosing?e._appendElement(t,j.SVG):e._insertElement(t,j.SVG),t.ackSelfClosing=!0}function uu(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,j.HTML)}function Be(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:{Ag(e,t);break}case f.A:{Sg(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{Eg(e,t);break}case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{gg(e,t);break}case f.LI:case f.DD:case f.DT:{yg(e,t);break}case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:{iu(e,t);break}case f.HR:{Ig(e,t);break}case f.RB:case f.RTC:{Rg(e,t);break}case f.RT:case f.RP:{Fg(e,t);break}case f.PRE:case f.LISTING:{bg(e,t);break}case f.XMP:{Dg(e,t);break}case f.SVG:{$g(e,t);break}case f.HTML:{pg(e,t);break}case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:{Ze(e,t);break}case f.BODY:{hg(e,t);break}case f.FORM:{Tg(e,t);break}case f.NOBR:{_g(e,t);break}case f.MATH:{Hg(e,t);break}case f.TABLE:{kg(e,t);break}case f.INPUT:{wg(e,t);break}case f.PARAM:case f.TRACK:case f.SOURCE:{Ng(e,t);break}case f.IMAGE:{Lg(e,t);break}case f.BUTTON:{Cg(e,t);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{vg(e,t);break}case f.IFRAME:{Pg(e,t);break}case f.SELECT:{Mg(e,t);break}case f.OPTION:case f.OPTGROUP:{Bg(e,t);break}case f.NOEMBED:case f.NOFRAMES:{ou(e,t);break}case f.FRAMESET:{mg(e,t);break}case f.TEXTAREA:{Og(e,t);break}case f.NOSCRIPT:{e.options.scriptingEnabled?ou(e,t):uu(e,t);break}case f.PLAINTEXT:{xg(e,t);break}case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:uu(e,t)}}function Ug(e,t){if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function qg(e,t){e.openElements.hasInScope(f.BODY)&&(e.insertionMode=H.AFTER_BODY,bu(e,t))}function zg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Vg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(f.FORM):n&&e.openElements.remove(n))}function Gg(e){e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(z.P,f.P),e._closePElement()}function Yg(e){e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI))}function Wg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jg(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Xg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Kg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,f.BR),e.openElements.pop(),e.framesetOk=!1}function lu(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function fr(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:{Ia(e,t);break}case f.P:{Gg(e);break}case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:{zg(e,t);break}case f.LI:{Yg(e);break}case f.DD:case f.DT:{Wg(e,t);break}case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:{jg(e);break}case f.BR:{Kg(e);break}case f.BODY:{Ug(e,t);break}case f.HTML:{qg(e,t);break}case f.FORM:{Vg(e);break}case f.APPLET:case f.OBJECT:case f.MARQUEE:{Xg(e,t);break}case f.TEMPLATE:{Lt(e,t);break}default:lu(e,t)}}function cu(e,t){e.tmplInsertionModeStack.length>0?Eu(e,t):Oa(e,t)}function Qg(e,t){var n;t.tagID===f.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Jg(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Da(e,t){if(e.openElements.currentTagId!==void 0&&eu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case de.CHARACTER:{fu(e,t);break}case de.WHITESPACE_CHARACTER:{du(e,t);break}}else In(e,t)}function Zg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_CAPTION}function eE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function tE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,f.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,Pa(e,t)}function nE(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_TABLE_BODY}function rE(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,f.TBODY),e.insertionMode=H.IN_TABLE_BODY,hr(e,t)}function aE(e,t){e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function iE(e,t){su(t)?e._appendElement(t,j.HTML):In(e,t),t.ackSelfClosing=!0}function sE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,j.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xt(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:{rE(e,t);break}case f.STYLE:case f.SCRIPT:case f.TEMPLATE:{Ze(e,t);break}case f.COL:{tE(e,t);break}case f.FORM:{sE(e,t);break}case f.TABLE:{aE(e,t);break}case f.TBODY:case f.TFOOT:case f.THEAD:{nE(e,t);break}case f.INPUT:{iE(e,t);break}case f.CAPTION:{Zg(e,t);break}case f.COLGROUP:{eE(e,t);break}default:In(e,t)}}function Nn(e,t){switch(t.tagID){case f.TABLE:{e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break}case f.TEMPLATE:{Lt(e,t);break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dr(e,t),e.fosterParentingEnabled=n}function du(e,t){e.pendingCharacterTokens.push(t)}function fu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ln(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pu=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function oE(e,t){const n=t.tagID;pu.has(n)?e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,Xt(e,t)):Be(e,t)}function uE(e,t){const n=t.tagID;switch(n){case f.CAPTION:case f.TABLE:{e.openElements.hasInTableScope(f.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===f.TABLE&&Nn(e,t));break}case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:fr(e,t)}}function Pa(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.COL:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.TEMPLATE:{Ze(e,t);break}default:pr(e,t)}}function lE(e,t){switch(t.tagID){case f.COLGROUP:{e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case f.TEMPLATE:{Lt(e,t);break}case f.COL:break;default:pr(e,t)}}function pr(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function hr(e,t){switch(t.tagID){case f.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_ROW;break}case f.TH:case f.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,f.TR),e.insertionMode=H.IN_ROW,mr(e,t);break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Xt(e,t));break}default:Xt(e,t)}}function Ma(e,t){const n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case f.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Nn(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:Nn(e,t)}}function mr(e,t){switch(t.tagID){case f.TH:case f.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,j.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break}case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,hr(e,t));break}default:Xt(e,t)}}function hu(e,t){switch(t.tagID){case f.TR:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case f.TABLE:{e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Ma(e,t));break}case f.TBODY:case f.TFOOT:case f.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Ma(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:Nn(e,t)}}function cE(e,t){const n=t.tagID;pu.has(n)?(e.openElements.hasInTableScope(f.TD)||e.openElements.hasInTableScope(f.TH))&&(e._closeTableCell(),mr(e,t)):Be(e,t)}function dE(e,t){const n=t.tagID;switch(n){case f.TD:case f.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break}case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),hu(e,t));break}case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:fr(e,t)}}function mu(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,j.HTML);break}case f.OPTGROUP:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,j.HTML);break}case f.HR:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break}case f.SCRIPT:case f.TEMPLATE:{Ze(e,t);break}}}function gu(e,t){switch(t.tagID){case f.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break}case f.OPTION:{e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break}case f.SELECT:{e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break}case f.TEMPLATE:{Lt(e,t);break}}}function fE(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e._processStartTag(t)):mu(e,t)}function pE(e,t){const n=t.tagID;n===f.CAPTION||n===f.TABLE||n===f.TBODY||n===f.TFOOT||n===f.THEAD||n===f.TR||n===f.TD||n===f.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),e.onEndTag(t)):gu(e,t)}function hE(e,t){switch(t.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:{Ze(e,t);break}case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,Xt(e,t);break}case f.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,Pa(e,t);break}case f.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,hr(e,t);break}case f.TD:case f.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,mr(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,Be(e,t)}}function mE(e,t){t.tagID===f.TEMPLATE&&Lt(e,t)}function Eu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Oa(e,t)}function gE(e,t){t.tagID===f.HTML?Be(e,t):gr(e,t)}function bu(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else gr(e,t)}function gr(e,t){e.insertionMode=H.IN_BODY,dr(e,t)}function EE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.FRAMESET:{e._insertElement(t,j.HTML);break}case f.FRAME:{e._appendElement(t,j.HTML),t.ackSelfClosing=!0;break}case f.NOFRAMES:{Ze(e,t);break}}}function bE(e,t){t.tagID===f.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==f.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function TE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.NOFRAMES:{Ze(e,t);break}}}function yE(e,t){t.tagID===f.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function xE(e,t){t.tagID===f.HTML?Be(e,t):Er(e,t)}function Er(e,t){e.insertionMode=H.IN_BODY,dr(e,t)}function CE(e,t){switch(t.tagID){case f.HTML:{Be(e,t);break}case f.NOFRAMES:{Ze(e,t);break}}}function SE(e,t){t.chars=Se,e._insertCharacters(t)}function AE(e,t){e._insertCharacters(t),e.framesetOk=!1}function Tu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==j.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function _E(e,t){if($m(t))Tu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===j.MATHML?Jo(t):r===j.SVG&&(Um(t),Zo(t)),Na(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function vE(e,t){if(t.tagID===f.P||t.tagID===f.BR){Tu(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===j.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR;const kE=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,wE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),yu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xu(e,t){const n=FE(e),r=Do("type",{handlers:{root:NE,element:IE,text:LE,comment:Su,doctype:OE,raw:PE},unknown:ME}),a={parser:n?new nu(yu):nu.getFragmentParser(void 0,yu),handle(o){r(o,a)},stitches:!1,options:t||{}};r(e,a),Kt(a,nt());const i=n?a.parser.document:a.parser.getFragment(),s=H0(i,{file:a.options.file});return a.stitches&&sr(s,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const p=l.children;return p[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Cu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function NE(e,t){Cu(e.children,t)}function IE(e,t){BE(e,t),Cu(e.children,t),RE(e,t)}function LE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:de.CHARACTER,chars:e.value,location:On(e)};Kt(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function OE(e,t){const n={type:de.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:On(e)};Kt(t,nt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function DE(e,t){t.stitches=!0;const n=HE(e);if("children"in e&&"children"in n){const r=xu({type:"root",children:e.children},t.options);n.children=r.children}Su({type:"comment",value:{stitch:n}},t)}function Su(e,t){const n=e.value,r={type:de.COMMENT,data:n,location:On(e)};Kt(t,nt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function PE(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Au(t,nt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(kE,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function ME(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))DE(n,t);else{let r="";throw wE.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Kt(e,t){Au(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ke.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Au(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function BE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ke.PLAINTEXT)return;Kt(t,nt(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:Nt.html;a===Nt.html&&n==="svg"&&(a=Nt.svg);const i=V0({...e,children:[]},{space:a===Nt.svg?"svg":"html"}),s={type:de.START_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:On(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function RE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&J0.includes(n)||t.parser.tokenizer.state===ke.PLAINTEXT)return;Kt(t,Jn(e));const r={type:de.END_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:On(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ke.RCDATA||t.parser.tokenizer.state===ke.RAWTEXT||t.parser.tokenizer.state===ke.SCRIPT_DATA)&&(t.parser.tokenizer.state=ke.DATA)}function FE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function On(e){const t=nt(e)||{line:void 0,column:void 0,offset:void 0},n=Jn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function HE(e){return"children"in e?wt({...e,children:[]}):wt(e)}function Ba(e){return function(t,n){return xu(t,{...e,file:n})}}const Ot=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Qt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ot,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ot],h2:[["className","sr-only"]],img:[...Ot,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ot,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ot],table:[...Ot],ul:[...Ot,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Ct={}.hasOwnProperty;function $E(e,t){let n={type:"root",children:[]};const r={schema:t?{...Qt,...t}:Qt,stack:[]},a=_u(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function _u(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return UE(e,n);case"doctype":return qE(e,n);case"element":return zE(e,n);case"root":return VE(e,n);case"text":return GE(e,n)}}}function UE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Dn(i,t),i}}function qE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Dn(n,t),n}}function zE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=vu(e,t.children),a=YE(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&Ct.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(i=!1;++u<o.length;)e.stack.includes(o[u])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:a,children:r};return Dn(s,t),s}function VE(e,t){const r={type:"root",children:vu(e,t.children)};return Dn(r,t),r}function GE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Dn(r,t),r}function vu(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=_u(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function YE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&Ct.call(r,n)?r[n]:void 0,s=r&&Ct.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(Ct.call(o,l)){const d=o[l];let p=ku(e,Nu(i,l),l,d);p==null&&(p=ku(e,Nu(s,l),l,d)),p!=null&&(u[l]=p)}if(a&&Ct.call(a,n)){const d=a[n];for(l in d)Ct.call(d,l)&&!Ct.call(u,l)&&(u[l]=d[l])}return u}function ku(e,t,n,r){return t?Array.isArray(r)?WE(e,t,n,r):wu(e,t,n,r):void 0}function WE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=wu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function wu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&jE(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const s=t[i];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){a=!0;break}}else if(s===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function jE(e,t,n){const r=e.schema.protocols&&Ct.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),s=a.indexOf("?"),o=a.indexOf("#"),u=a.indexOf("/");if(i<0||u>-1&&i>u||s>-1&&i>s||o>-1&&i>o)return!0;let l=-1;for(;++l<r.length;){const d=r[l];if(i===d.length&&a.slice(0,d.length)===d)return!0}return!1}function Dn(e,t){const n=xs(t);t.data&&(e.data=wt(t.data)),n&&(e.position=n)}function Nu(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Ra(e){return function(t){return $E(t,e)}}function Iu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}const XE=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Lu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Ou(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function KE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function QE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Du(e){return QE(e)||Ou(e)}const JE=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Fa(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,o="",u,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,u=n.position.start):u=n.position);let d=(u?u.line:0)||1,p=(u?u.column:0)||1,E=x(),c;for(i--;++i<=e.length;)if(c===10&&(p=(l?l[s]:0)||1),c=e.charCodeAt(i),c===38){const g=e.charCodeAt(i+1);if(g===9||g===10||g===12||g===32||g===38||g===60||Number.isNaN(g)||r&&g===r){o+=String.fromCharCode(c),p++;continue}const b=i+1;let T=b,C=b,w;if(g===35){C=++T;const R=e.charCodeAt(C);R===88||R===120?(w="hexadecimal",C=++T):w="decimal"}else w="named";let S="",O="",A="";const v=w==="named"?Du:w==="decimal"?Ou:KE;for(C--;++C<=e.length;){const R=e.charCodeAt(C);if(!v(R))break;A+=String.fromCharCode(R),w==="named"&&XE.includes(A)&&(S=A,O=mn(A))}let k=e.charCodeAt(C)===59;if(k){C++;const R=w==="named"?mn(A):!1;R&&(S=A,O=R)}let N=1+C-b,M="";if(!(!k&&n.nonTerminated===!1))if(!A)w!=="named"&&h(4,N);else if(w==="named"){if(k&&!O)h(5,1);else if(S!==A&&(C=T+S.length,N=1+C-T,k=!1),!k){const R=S?1:3;if(n.attribute){const I=e.charCodeAt(C);I===61?(h(R,N),O=""):Du(I)?O="":h(R,N)}else h(R,N)}M=O}else{k||h(2,N);let R=Number.parseInt(A,w==="hexadecimal"?16:10);if(ZE(R))h(7,N),M="�";else if(R in Lu)h(6,N),M=Lu[R];else{let I="";e1(R)&&h(6,N),R>65535&&(R-=65536,I+=String.fromCharCode(R>>>10|55296),R=56320|R&1023),M=I+String.fromCharCode(R)}}if(M){m(),E=x(),i=C-1,p+=C-b+1,a.push(M);const R=x();R.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,M,{start:E,end:R},e.slice(b-1,C)),E=R}else A=e.slice(b-1,C),o+=A,p+=A.length,i=C-1}else c===10&&(d++,s++,p=0),Number.isNaN(c)?m():(o+=String.fromCharCode(c),p++);return a.join("");function x(){return{line:d,column:p,offset:i+((u?u.offset:0)||0)}}function h(g,b){let T;n.warning&&(T=x(),T.column+=b,T.offset+=b,n.warning.call(n.warningContext||void 0,JE[g],T,g))}function m(){o&&(a.push(o),n.text&&n.text.call(n.textContext||void 0,o,{start:E,end:x()}),o="")}}function ZE(e){return e>=55296&&e<=57343||e>1114111}function e1(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const t1=/["&'<>`]/g,n1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r1=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,a1=/[|\\{}()[\]^$+*?.]/g,Pu=new WeakMap;function i1(e,t){if(e=e.replace(t.subset?s1(t.subset):t1,r),t.subset||t.escapeOnly)return e;return e.replace(n1,n).replace(r1,r);function n(a,i,s){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(a,i,s){return t.format(a.charCodeAt(0),s.charCodeAt(i+1),t)}}function s1(e){let t=Pu.get(e);return t||(t=o1(e),Pu.set(e,t)),t}function o1(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(a1,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function u1(e){return"&#x"+e.toString(16).toUpperCase()+";"}function l1(e,t){return i1(e,Object.assign({format:u1},t))}const c1={}.hasOwnProperty,d1={},Mu=/^[^\t\n\r "#'.<=>`}]+$/,f1=/^[^\t\n\r "'<=>`}]+$/;function p1(){return{canContainEols:["textDirective"],enter:{directiveContainer:m1,directiveContainerAttributes:Ua,directiveContainerLabel:b1,directiveLeaf:g1,directiveLeafAttributes:Ua,directiveText:E1,directiveTextAttributes:Ua},exit:{directiveContainer:Wa,directiveContainerAttributeClassValue:za,directiveContainerAttributeIdValue:qa,directiveContainerAttributeName:Ga,directiveContainerAttributeValue:Va,directiveContainerAttributes:Ya,directiveContainerLabel:T1,directiveContainerName:$a,directiveLeaf:Wa,directiveLeafAttributeClassValue:za,directiveLeafAttributeIdValue:qa,directiveLeafAttributeName:Ga,directiveLeafAttributeValue:Va,directiveLeafAttributes:Ya,directiveLeafName:$a,directiveText:Wa,directiveTextAttributeClassValue:za,directiveTextAttributeIdValue:qa,directiveTextAttributeName:Ga,directiveTextAttributeValue:Va,directiveTextAttributes:Ya,directiveTextName:$a}}}function h1(e){const t=d1;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=y1,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
57
+ `,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(i,s,o,u){const l=o.createTracker(u),d=x1(i),p=o.enter(i.type);let E=l.move(d+(i.name||"")),c;if(i.type==="containerDirective"){const x=(i.children||[])[0];c=Bu(x)?x:void 0}else c=i;if(c&&c.children&&c.children.length>0){const x=o.enter("label"),h=`${i.type}Label`,m=o.enter(h);E+=l.move("["),E+=l.move(o.containerPhrasing(c,{...l.current(),before:E,after:"]"})),E+=l.move("]"),m(),x()}if(E+=l.move(r(i,o)),i.type==="containerDirective"){const x=(i.children||[])[0];let h=i;Bu(x)&&(h=Object.assign({},i,{children:i.children.slice(1)})),h&&h.children&&h.children.length>0&&(E+=l.move(`
58
58
  `),E+=l.move(o.containerFlow(h,l.current()))),E+=l.move(`
59
- `+d)}return p(),E}function r(i,s){const o=i.attributes||{},u=[];let l,d,p,E;for(E in o)if(c1.call(o,E)&&o[E]!==void 0&&o[E]!==null){const c=String(o[E]);if(E==="id")p=t.preferShortcut!==!1&&Mu.test(c)?"#"+c:a("id",c,i,s);else if(E==="class"){const y=c.split(/[\t\n\r ]+/g),h=[],m=[];let g=-1;for(;++g<y.length;)(t.preferShortcut!==!1&&Mu.test(y[g])?m:h).push(y[g]);l=h.length>0?a("class",h.join(" "),i,s):"",d=m.length>0?"."+m.join("."):""}else u.push(a(E,c,i,s))}return l&&u.unshift(l),d&&u.unshift(d),p&&u.unshift(p),u.length>0?"{"+u.join(" ")+"}":""}function a(i,s,o,u){if(t.collapseEmptyAttributes!==!1&&!s)return i;if(t.preferUnquoted&&f1.test(s))return i+"="+s;const l=t.quote||u.options.quote||'"',d=l==='"'?"'":'"',p=t.quoteSmart&&Iu(s,l)>Iu(s,d)?d:l,E=o.type==="textDirective"?[p]:[p,`
60
- `,"\r"];return i+"="+p+l1(s,{subset:E})+p}}function m1(e){Ha.call(this,"containerDirective",e)}function g1(e){Ha.call(this,"leafDirective",e)}function E1(e){Ha.call(this,"textDirective",e)}function Ha(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function $a(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function b1(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function T1(e){this.exit(e)}function Ua(){this.data.directiveAttributes=[],this.buffer()}function qa(e){this.data.directiveAttributes.push(["id",Fa(this.sliceSerialize(e),{attribute:!0})])}function za(e){this.data.directiveAttributes.push(["class",Fa(this.sliceSerialize(e),{attribute:!0})])}function Va(e){const t=this.data.directiveAttributes;t[t.length-1][1]=Fa(this.sliceSerialize(e),{attribute:!0})}function Ga(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ya(){const e=this.data.directiveAttributes,t={};let n=-1;for(;++n<e.length;){const a=e[n];a[0]==="class"&&t.class?t.class+=" "+a[1]:t[a[0]]=a[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=t}function Wa(e){this.exit(e)}function y1(){return":"}function Bu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function x1(e){let t=0;return e.type==="containerDirective"?(ho(e,function(n,r){if(n.type==="containerDirective"){let a=r.length,i=0;for(;a--;)r[a].type==="containerDirective"&&i++;i>t&&(t=i)}}),t+=3):e.type==="leafDirective"?t=2:t=1,":".repeat(t)}function ja(e,t,n,r,a,i,s,o,u,l,d,p,E,c,y){let h,m;return g;function g(x){return e.enter(r),e.enter(a),e.consume(x),e.exit(a),b}function b(x){return x===35?(h=s,T(x)):x===46?(h=o,T(x)):y&&he(x)?me(e,b,"whitespace")(x):!y&&ve(x)?ct(e,b)(x):x===null||ne(x)||En(x)||gn(x)&&x!==45&&x!==95?N(x):(e.enter(i),e.enter(u),e.consume(x),C)}function T(x){const H=h+"Marker";return e.enter(i),e.enter(h),e.enter(H),e.consume(x),e.exit(H),_}function _(x){if(x===null||x===34||x===35||x===39||x===46||x===60||x===61||x===62||x===96||x===125||ve(x))return n(x);const H=h+"Value";return e.enter(H),e.consume(x),w}function w(x){if(x===null||x===34||x===39||x===60||x===61||x===62||x===96)return n(x);if(x===35||x===46||x===125||ve(x)){const H=h+"Value";return e.exit(H),e.exit(h),e.exit(i),b(x)}return e.consume(x),w}function C(x){return x===null||ne(x)||En(x)||gn(x)&&x!==45&&x!==46&&x!==58&&x!==95?(e.exit(u),y&&he(x)?me(e,O,"whitespace")(x):!y&&ve(x)?ct(e,O)(x):O(x)):(e.consume(x),C)}function O(x){return x===61?(e.enter(l),e.consume(x),e.exit(l),A):(e.exit(i),b(x))}function A(x){return x===null||x===60||x===61||x===62||x===96||x===125||y&&ne(x)?n(x):x===34||x===39?(e.enter(d),e.enter(E),e.consume(x),e.exit(E),m=x,k):y&&he(x)?me(e,A,"whitespace")(x):!y&&ve(x)?ct(e,A)(x):(e.enter(p),e.enter(c),e.consume(x),m=void 0,S)}function S(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96?n(x):x===125||ve(x)?(e.exit(c),e.exit(p),e.exit(i),b(x)):(e.consume(x),S)}function k(x){return x===m?(e.enter(E),e.consume(x),e.exit(E),e.exit(d),e.exit(i),B):(e.enter(p),I(x))}function I(x){return x===m?(e.exit(p),k(x)):x===null?n(x):ne(x)?y?n(x):ct(e,I)(x):(e.enter(c),e.consume(x),M)}function M(x){return x===m||x===null||ne(x)?(e.exit(c),I(x)):(e.consume(x),M)}function B(x){return x===125||ve(x)?b(x):N(x)}function N(x){return x===125?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),t):n(x)}}function Xa(e,t,n,r,a,i,s){let o=0,u=0,l;return d;function d(m){return e.enter(r),e.enter(a),e.consume(m),e.exit(a),p}function p(m){return m===93?(e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):(e.enter(i),E(m))}function E(m){if(m===93&&!u)return h(m);const g=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=g),l=g,c(m)}function c(m){return m===null||o>999||m===91&&++u>32?n(m):m===93&&!u--?(e.exit("chunkText"),h(m)):ne(m)?s?n(m):(e.consume(m),e.exit("chunkText"),E):(e.consume(m),m===92?y:c)}function y(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function h(m){return e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t}}function Ka(e,t,n,r){const a=this;return i;function i(o){return o===null||ne(o)||gn(o)||En(o)?n(o):(e.enter(r),e.consume(o),s)}function s(o){return o===null||ne(o)||En(o)||gn(o)&&o!==45&&o!==95?(e.exit(r),a.previous===45||a.previous===95?n(o):t(o)):(e.consume(o),s)}}const C1={tokenize:_1,concrete:!0},S1={tokenize:v1,partial:!0},A1={tokenize:k1,partial:!0},br={tokenize:w1,partial:!0};function _1(e,t,n){const r=this,a=r.events[r.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0,o;return u;function u(S){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(S)}function l(S){return S===58?(e.consume(S),s++,l):s<3?n(S):(e.exit("directiveContainerSequence"),Ka.call(r,e,d,n,"directiveContainerName")(S))}function d(S){return S===91?e.attempt(S1,p,p)(S):p(S)}function p(S){return S===123?e.attempt(A1,E,E)(S):E(S)}function E(S){return me(e,c,"whitespace")(S)}function c(S){return e.exit("directiveContainerFence"),S===null?O(S):ne(S)?r.interrupt?t(S):e.attempt(br,y,O)(S):n(S)}function y(S){return S===null?O(S):ne(S)?e.check(br,T,O)(S):(e.enter("directiveContainerContent"),h(S))}function h(S){return e.attempt({tokenize:A,partial:!0},C,i?me(e,m,"linePrefix",i+1):m)(S)}function m(S){return S===null?C(S):ne(S)?e.check(br,b,C)(S):b(S)}function g(S){if(S===null){const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,C(S)}return ne(S)?e.check(br,_,w)(S):(e.consume(S),g)}function b(S){const k=e.enter("chunkDocument",{contentType:"document",previous:o});return o&&(o.next=k),o=k,g(S)}function T(S){return e.enter("directiveContainerContent"),h(S)}function _(S){e.consume(S);const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,h}function w(S){const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,C(S)}function C(S){return e.exit("directiveContainerContent"),O(S)}function O(S){return e.exit("directiveContainer"),t(S)}function A(S,k,I){let M=0;return me(S,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function B(H){return S.enter("directiveContainerFence"),S.enter("directiveContainerSequence"),N(H)}function N(H){return H===58?(S.consume(H),M++,N):M<s?I(H):(S.exit("directiveContainerSequence"),me(S,x,"whitespace")(H))}function x(H){return H===null||ne(H)?(S.exit("directiveContainerFence"),k(H)):I(H)}}}function v1(e,t,n){return Xa(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function k1(e,t,n){return ja(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function w1(e,t,n){const r=this;return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const N1={tokenize:O1},I1={tokenize:D1,partial:!0},L1={tokenize:P1,partial:!0};function O1(e,t,n){const r=this;return a;function a(d){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(d),i}function i(d){return d===58?(e.consume(d),e.exit("directiveLeafSequence"),Ka.call(r,e,s,n,"directiveLeafName")):n(d)}function s(d){return d===91?e.attempt(I1,o,o)(d):o(d)}function o(d){return d===123?e.attempt(L1,u,u)(d):u(d)}function u(d){return me(e,l,"whitespace")(d)}function l(d){return d===null||ne(d)?(e.exit("directiveLeaf"),t(d)):n(d)}}function D1(e,t,n){return Xa(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function P1(e,t,n){return ja(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const M1={tokenize:H1,previous:F1},B1={tokenize:$1,partial:!0},R1={tokenize:U1,partial:!0};function F1(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function H1(e,t,n){const r=this;return a;function a(u){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(u),e.exit("directiveTextMarker"),Ka.call(r,e,i,n,"directiveTextName")}function i(u){return u===58?n(u):u===91?e.attempt(B1,s,s)(u):s(u)}function s(u){return u===123?e.attempt(R1,o,o)(u):o(u)}function o(u){return e.exit("directiveText"),t(u)}}function $1(e,t,n){return Xa(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function U1(e,t,n){return ja(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function q1(){return{text:{58:M1},flow:{58:[C1,N1]}}}function Qa(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(q1()),r.push(p1()),a.push(h1())}const Ja={...Qt,attributes:{...Qt.attributes||{},span:[...(Qt.attributes||{}).span||[],"style"],font:[...(Qt.attributes||{}).font||[],"color"]}},Za=()=>e=>{sr(e,t=>{const n=t;if(!n||n.type!=="textDirective"&&n.type!=="leafDirective"&&n.type!=="containerDirective"||n.name!=="color")return;const r=n.attributes||{},a=r.hex??r.color??r.value,i=typeof a=="string"?a.trim():"",s=/^#([0-9a-fA-F]{6})$/.test(i)?i:"#7C3AED",o=r.bold,l=`${o===!0||o==="true"||o===1||o==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},z1=e=>{const t=(e??"").trim();if(!t)return null;if(!(t.startsWith("{")&&t.endsWith("}")))return{kind:"text",text:t};try{const n=JSON.parse(t);if(!n||typeof n!="object")return{kind:"text",text:t};const r=n;return r.type==="steps"&&typeof r.title=="string"&&Array.isArray(r.images)&&Array.isArray(r.stepDescriptions)?{kind:"steps",data:n}:{kind:"text",text:t}}catch{return{kind:"text",text:t}}},V1=({config:e,files:t,debugTooltipSticky:n=!1,videoState:r})=>{const[a,i]=L.useState(null),[s,o]=L.useState(!1),u=L.useRef(null),l=L.useRef(null),d=L.useRef(null),p=200,E=200,c=L.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),l.current&&(window.clearTimeout(l.current),l.current=null),d.current!==null&&(window.cancelAnimationFrame(d.current),d.current=null)},[]),y=L.useCallback(()=>{c(),o(!0)},[c]),h=L.useCallback(I=>{if(c(),I){i(I),o(!1),d.current=window.requestAnimationFrame(()=>{d.current=null,o(!0)});return}u.current=window.setTimeout(()=>{u.current=null,o(!1),l.current=window.setTimeout(()=>{i(null),l.current=null},E)},p)},[c]);L.useEffect(()=>()=>{c()},[c]);const[m,g]=L.useState(0),b=L.useRef(null),[T,_]=L.useState(!1),w=L.useRef(new Map),[C,O]=L.useState(357),[A,S]=L.useState("bottom");return L.useEffect(()=>{g(0),_(!1),S("bottom")},[a?.key,a?.type]),L.useEffect(()=>{const I=w.current,M=new Set,B=N=>{if(!N||M.has(N)||I.has(N))return;M.add(N);const x=new window.Image;x.decoding="async",x.onload=()=>{const H=x.naturalWidth||x.width||0,U=x.naturalHeight||x.height||0;H>0&&U>0&&I.set(N,`${H} / ${U}`)},x.src=N};e.forEach(N=>{const x=N.tooltip;if(!x)return;const U=typeof x=="string"?(()=>{try{return JSON.parse(x)}catch{return null}})():x;if(!U||U.type!=="steps")return;const $=U.images;Array.isArray($)&&$.forEach(V=>{typeof V=="string"&&B(V)})})},[e]),L.useLayoutEffect(()=>{if(!s)return;if(a?.type!=="upload"&&a?.type!=="tag"&&a?.type!=="variable"){O(null);return}const I=requestAnimationFrame(()=>{const M=document.querySelector(".rte-steps-tooltip"),B=document.querySelector(".rte-steps-tooltip-title"),N=document.querySelector(".rte-steps-tooltip-step-badge");if(!M||!B||!N)return;const x=window.getComputedStyle(M),H=Number.parseFloat(x.paddingLeft)||0,U=Number.parseFloat(x.paddingRight)||0,$=Math.ceil(B.getBoundingClientRect().width||0),V=Math.ceil(N.getBoundingClientRect().width||0),Y=$+16+V+Math.ceil(H+U),J=357,P=Math.max(240,Math.floor(window.innerWidth-32));O(Math.min(Math.max(Y,J),P));const ee=a?.anchorEl;if(ee){const te=ee.getBoundingClientRect(),ae=M.getBoundingClientRect(),Q=Math.ceil(ae.height||0),re=Math.max(0,Math.floor(window.innerHeight-te.bottom)),oe=Math.max(0,Math.floor(te.top)),Oe=re<Q+12&&oe>re;S(Oe?"top":"bottom")}});return()=>cancelAnimationFrame(I)},[s,a?.key,a?.type,m,a?.anchorEl]),L.useEffect(()=>{if(!n)return;const I=M=>{M.key==="Escape"&&h(null)};return window.addEventListener("keydown",I,!0),()=>window.removeEventListener("keydown",I,!0)},[n,h]),{tooltipPortal:a?.anchorEl?(()=>{if(!document.body.contains(a.anchorEl))return null;let I="",M={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},B=!1;const N=U=>{const $=z1(U);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const V=$.data,v=Math.max(0,V.images?.length||0);if(v<=0)return{node:V.title,steps:!1};const Y=Math.min(Math.max(m,0),v-1),J=Array.isArray(V.stepDescriptions)&&V.stepDescriptions[Y]||"",P=(V.disclaimer||"").trim(),ee=Array.isArray(V.images)?V.images[Y]:void 0,te=typeof ee=="string"?w.current.get(ee):void 0;return{node:q.jsxs("div",{className:"rte-steps-tooltip",style:C?{width:`${C}px`}:void 0,onMouseEnter:()=>y(),onMouseLeave:()=>{n||h(null)},onClick:Q=>{Q.preventDefault(),Q.stopPropagation()},children:[q.jsxs("div",{className:"rte-steps-tooltip-header",children:[q.jsx("div",{className:"rte-steps-tooltip-title",children:V.title}),q.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",Y+1,"/",v]})]}),V.description?q.jsx("div",{className:"rte-steps-tooltip-desc",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:V.description})}):null,q.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:q.jsx(ce.Image.PreviewGroup,{preview:{visible:T,current:Y,onVisibleChange:Q=>_(Q),onChange:Q=>{const re=Math.min(Math.max(Q,0),v-1);g(re),b.current?.slideTo(re)}},children:q.jsx(Qi,{className:"rte-steps-tooltip-swiper",modules:[Ad,_d],navigation:!0,pagination:{clickable:!0},initialSlide:Y,onSwiper:Q=>{b.current=Q},onSlideChange:Q=>g(Q.activeIndex),children:V.images.map((Q,re)=>q.jsx(Ji,{children:q.jsx(ce.Image,{className:"rte-steps-tooltip-img",src:Q,alt:`step-${re+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{g(re),b.current?.slideTo(re),_(!0)}})},`${Q}-${re}`))},`${a.key}-${a.type}`)})}),q.jsx("div",{className:"rte-steps-tooltip-footer",children:q.jsx("div",{className:"rte-steps-tooltip-step-text",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:J})})}),P?q.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[q.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),q.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:P})})]}):null]}),steps:!0}};if(a.type==="upload"){const U=a.anchorEl.dataset.tooltip,$=N(U);if($)I=$.node,B=$.steps;else{const V=e.find(Y=>Y.type==="upload"&&Y.key===a.key),v=N(typeof V?.tooltip=="string"?V?.tooltip:V?.tooltip?JSON.stringify(V.tooltip):"");I=v?.node||"",B=v?.steps||!1}}else if(a.type==="tag"){const U=a.anchorEl.dataset.tooltip,$=N(U);I=$?.node||"",B=$?.steps||!1}else if(a.type==="upload-label")I=a.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||a.anchorEl.dataset.fileName||"";else if(a.type==="variable"){const U=a.anchorEl.dataset.tooltip,$=N(U);I=$?.node||"",B=$?.steps||!1}else if(a.type==="upload-preview"){const U=t[a.key];let $=null,V=!1;typeof U=="string"?$=U:U instanceof File&&(U.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(U.name||""))&&($=URL.createObjectURL(U),V=!0),$?(I=q.jsx("div",{className:"rte-upload-preview",children:q.jsx("img",{className:"rte-upload-preview-img",src:$,alt:"preview"})}),M={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},V&&setTimeout(()=>URL.revokeObjectURL($),1e3)):I=""}else if(a.type==="video-preview"){const U=r?.[a.key];U?.status==="success"&&U.videoUrl?(I=q.jsx("div",{className:"rte-video-preview",children:q.jsx("video",{src:U.videoUrl,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,style:{width:120,height:120,borderRadius:8,objectFit:"cover"}})}),M={background:"#fff",padding:0,borderRadius:8,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"}):I=""}if(!I)return null;B&&(M={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const x="#0A0A0A",H=A;return rn.createPortal(q.jsx(ce.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!B,align:B?{points:H==="top"?["bc","tc"]:["tc","bc"],offset:H==="top"?[0,-4]:[0,4]}:void 0,title:a.type==="upload-preview"?q.jsx("div",{onMouseEnter:()=>y(),onMouseLeave:()=>{n||h(null)},onClick:U=>{U.preventDefault(),U.stopPropagation()},children:I}):B?I:q.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:x},onMouseEnter:()=>y(),onMouseLeave:()=>{n||h(null)},onClick:U=>{U.preventDefault(),U.stopPropagation()},children:I}),open:s,placement:B?H==="top"?"top":"bottom":a.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:M,overlayClassName:"rte-tooltip-overlay",children:q.jsx("div",{style:{position:"fixed",left:`${a.anchorEl.getBoundingClientRect().left}px`,top:`${a.anchorEl.getBoundingClientRect().top-(a.type==="upload-label"?4:0)}px`,width:`${a.anchorEl.offsetWidth}px`,height:`${a.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:h}},G1=(e,t)=>{const n=t.hideButtons==="hideTagClose",r=t.lockStructure||n?"":'<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>',a=t.lockStructure?' data-locked="true"':"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}" data-tag-key="${e.key||""}"`:"";return`<span contenteditable="false" class="tag-node group"${a}${s}><span class="tag-label">${e.text}</span>${r}</span>`},Y1=(e,t)=>{const n=t?' data-locked="true" contenteditable="false"':' contenteditable="false"',a=(e.text??"").replace(/\n/g,"<br/>");return e.className?`<span data-type="text" class="${e.className}"${n}>${a}</span>`:t?`<span data-type="text"${n}>${a}</span>`:`<span data-type="text" contenteditable="false">${a}</span>`},W1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Ru=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const E=r?encodeURIComponent(r):"",c=ie(e.placeholder||""),y=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',h=qn(r||e.placeholder||""),m=i&&!r?18:0;return`<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${E}" data-placeholder="${c}" data-estimated-width="${Math.min(600,h+m)}"${y}${a}${s} class="rte-variable-host-v2"></span>`}const o=!r,u=o?"​":ie(r).replace(/\n/g,"<br/>"),l=o?"show-placeholder":"",d=i&&o?"rte-variable-with-icon":"",p=i&&o?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${d?` ${d}`:""}">${u}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${ie(i)}" ></i>`:""}</span>`},j1=(e,t)=>{const n=Ru(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${W1}${n}</span>`:n},Fu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,X1=e=>/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(e);function ei(e,t){if(e==null)return{hasFile:!1,fileName:t,uploadIcon:"<i class='iconfont icon-shangchuan1'></i>"};if(typeof e=="string"){const r=decodeURIComponent(e.split("/").pop()?.split("?")[0]||"file"),a=X1(e)?`<img class="upload-icon-img upload-icon-preview" src="${e}" alt="preview" />`:"<i class='iconfont icon-exlwenjian'></i>";return{hasFile:!0,fileName:r,uploadIcon:a}}const n=vl(e)?`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(e)}" alt="preview" />`:"<i class='iconfont icon-exlwenjian'></i>";return{hasFile:!0,fileName:e.name,uploadIcon:n}}const K1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Ke(e.tooltip),a=r?` data-tooltip="${ie(r)}"`:"",{hasFile:i,fileName:s,uploadIcon:o}=ei(t[e.key],e.text),u=i?"":"hidden",l=r&&!i?"":"hidden",d=i?"has-file":"",p=i&&s?` data-file-name="${s.replace(/"/g,"&quot;")}"`:"",E=(e.text||"").trim(),y=i&&E.length>=12?`<span ${n} contenteditable="false" class="exclusion-wrapper upload-hint">${E}</span>`:"";return{uploadHtml:`<span contenteditable="false" data-type="upload" data-key="${e.key}"${a} class="upload-chip"><span class="upload-inner-wrapper ${d}"><span class="upload-icon">${o}</span><span class="upload-label"${p}>${s||e.text}</span>${r?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${l}" data-upload-key="${e.key}" data-tooltip="${ie(r)}" ></i>`:""}<span class="file-remove-btn ${u}" title="移除文件">×</span></span></span>`,hintHtml:y}},Q1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const b=Ke(e.tooltip),T=b?` data-tooltip="${ie(b)}"`:"",_=e.minCount||1,w=e.maxCount||3;let C=0;for(let k=0;k<w;k++){const I=`${e.key}-${k}`;t[I]!=null&&(C+=1)}const O=Math.min(w,Math.max(_,C+(C<w?1:0)));let A="";for(let k=0;k<O;k++){const I=`${e.key}-${k}`,{hasFile:M,fileName:B,uploadIcon:N}=ei(t[I],e.text),x=M?"":"hidden",H=b&&!M?"":"hidden",U=M?"has-file":"",$=M&&B?` data-file-name="${B.replace(/"/g,"&quot;")}"`:"",V=` data-batch-key="${e.key}"`,v=` data-batch-index="${k}"`,Y=`<span contenteditable="false" data-type="upload" data-key="${I}"${V}${v}${T} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${U}"><span class="upload-icon">${N}</span><span class="upload-label"${$}>${B||e.text}</span>${b?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${I}" data-tooltip="${ie(b)}" ></i>`:""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;A+=Y}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${Fu}<span class="rte-upload-batch-chips">${A}${n}</span></span>`:`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-upload-batch-chips">${A}${n}</span>`}const i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"",{hasFile:o,fileName:u,uploadIcon:l}=ei(t[e.key],e.text),d=o?"":"hidden",p=i&&!o?"":"hidden",E=o?"has-file":"",c=o&&u?` data-file-name="${u.replace(/"/g,"&quot;")}"`:"",y=(e.text||"").trim(),m=o&&e.showHint===!0&&y.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${y}</span>`:"",g=`<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${E}"><span class="upload-icon">${l}</span><span class="upload-label"${c}>${u||e.text}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${ie(i)}" ></i>`:""}<span class="file-remove-btn ${d}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${Fu}${g}${n}</span>${m}`:g+n+m},J1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Z1=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",o=`<span data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${J1}${o}</span>`:o},eb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,tb=(e,t,n)=>{const r=t[e.key]||"",a=typeof e.maxHeight=="number"?e.maxHeight:252,i=e.placeholder?` placeholder="${e.placeholder}"`:"",s=`<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${a}px;"${i}>${r}</textarea>`,o=`<div class="rte-textarea-wrapper" data-key="${e.key}">${s}</div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${eb}${o}</span>`:o},nb=(e,t,n)=>{const r=t[e.key]||e.text||"",a=typeof e.minHeight=="number"?e.minHeight:40,i=typeof e.maxHeight=="number"?e.maxHeight:160,s=Math.max(i,a),o=e.placeholder?` data-placeholder="${e.placeholder}"`:"",u=e.expandable!==!1,l=r,d=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${o} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,p=u?`<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>`:"",E=`<div class="rte-richtext-wrapper${u?" rte-richtext-toggleable":""}" data-key="${e.key}">${d}${p}</div>`,c=`<div class="rte-richtext-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${c}</div>`:c},rb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,ab=(e,t)=>{const n=`${e.key}__url`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ke(e.tooltip),E=p?` data-tooltip="${ie(p)}" data-variable-key="${e.key||""}"`:"",c=p&&o?"rte-variable-with-icon":"",y=p&&o?"":"hidden",h=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ie(e.placeholder||"")}"${d}${E} class="variable-chip rte-report-url ${l}${c?` ${c}`:""}">${u}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${ie(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${rb}${h}</span>`:h},ib=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,sb=(e,t)=>{const n=`${e.key}__name`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ke(e.tooltip),E=p?` data-tooltip="${ie(p)}" data-variable-key="${e.key||""}"`:"",c=p&&o?"rte-variable-with-icon":"",y=p&&o?"":"hidden",h=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${ie(e.placeholder||"")}"${d}${E} class="variable-chip rte-markdown-name ${l}${c?` ${c}`:""}">${u}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${ie(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ib}${h}</span>`:h},ob=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,ub=(e,t)=>{const n=e.sourceTextKey||`${e.key}__sourceText`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=e.sourceTextKey?` data-source-text-key="${ie(e.sourceTextKey)}"`:"",E=Ke(e.tooltip),c=E?` data-tooltip="${ie(E)}" data-variable-key="${e.key||""}"`:"",y=E&&o?"rte-variable-with-icon":"",h=E&&o?"":"hidden",m=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${ie(e.placeholder||"")}"${d}${p}${c} class="variable-chip rte-markdown-input ${l}${y?` ${y}`:""}">${u}${E?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${h}" data-variable-key="${e.key}" data-tooltip="${ie(E)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ob}${m}</span>`:m},lb=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,o=typeof e.maxHeight=="number"?e.maxHeight:240,u=Math.max(o,s),l=e.placeholder?` data-placeholder="${ie(e.placeholder)}"`:"",d=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${d}</div>`,E=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`,c=`<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${c}</div>`:c},cb=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,o=typeof e.maxHeight=="number"?e.maxHeight:240,u=Math.max(o,s),l=e.placeholder?` data-placeholder="${ie(e.placeholder)}"`:"",d=i,E=typeof d=="string"&&d.startsWith("请补充:")?' data-is-placeholder="true"':"",c=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="markdown-module" data-module-index="${n}" class="rte-richtext rte-markdown-module"${l}${E} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${d}</div>`,y=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${c}</div>`,h=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${y}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},db=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,fb=(e,t)=>{const n=t[e.key]||"",r=e.placeholder?` data-placeholder="${e.placeholder}"`:"",a=e.limitRange?` data-limit-range="${e.limitRange}"`:"",i=e.disableFuture?' data-disable-future="true"':"",s=`<div data-type="datepicker" data-key="${e.key}" data-value="${n}" class="rte-datepicker-host"${r}${a}${i}></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${db}${s}</span>`:s},pb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,hb=(e,t)=>{const n=t[e.key]||(typeof e.defaultNumber=="number"?String(e.defaultNumber):""),r=typeof e.min=="number"?` min="${e.min}"`:"",a=typeof e.max=="number"?` max="${e.max}"`:"",i=e.placeholder?ie(e.placeholder):"",s=i?` placeholder="${i}"`:"",o=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",u=n||e.placeholder||"",l=qn(u),d=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${ie(n)}" style="width: ${l}px;"${r}${a}${s}${o} />`,E=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${d}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${pb}${E}</span>`:E},mb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,gb=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const u=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Ke(e.tooltip);let d="";for(let p=0;p<i;p++){const E=`${e.key}_${p}`,c=t[E]||"",y=!c,h=y?"​":ie(c).replace(/\n/g,"<br/>"),m=y?"show-placeholder":"",g=l&&y?"rte-variable-with-icon":"",b=l?` data-tooltip="${ie(l)}" data-variable-key="${e.key||""}"`:"",T=l&&y?"":"hidden",_=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",w=`<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder||""}"${_}${b} class="variable-chip ${m}${g?` ${g}`:""}">${h}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${T}" data-variable-key="${e.key}" data-tooltip="${ie(l)}" ></i>`:""}</span>`;p===0?d+=`<span ${u} class="exclusion-wrapper required-upload-group required-multi-first">${mb}${w}</span>`:d+=w}return d}const s=Ke(e.tooltip);let o="";for(let u=0;u<i;u++){const l=`${e.key}_${u}`,d=t[l]||"",p=!d,E=p?"​":ie(d).replace(/\n/g,"<br/>"),c=p?"show-placeholder":"",y=s&&p?"rte-variable-with-icon":"",h=s?` data-tooltip="${ie(s)}" data-variable-key="${e.key||""}"`:"",m=s&&p?"":"hidden",g=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",b=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${u}" data-placeholder="${e.placeholder||""}"${g}${h} class="variable-chip ${c}${y?` ${y}`:""}">${E}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${m}" data-variable-key="${e.key}" data-tooltip="${ie(s)}" ></i>`:""}</span>`;o+=b}return o},ti=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Eb=(e,t)=>{const n=e.key,r=t[n],a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"";let o;if(r?.status==="loading"){const l=typeof r.progress=="number"?Math.min(Math.max(r.progress,0),100):0,d="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Crect fill='%23999' width='1' height='1'/%3E%3C/svg%3E",p=2*Math.PI*6.5,E=p*(1-l/100),c=`<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${p}" stroke-dashoffset="${E}" transform="rotate(-90 8 8)"/></svg>`;o=`<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${d}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${c}</span><span class="video-label">解析中...</span></span>`}else if(r?.status==="success"&&r.videoUrl){const l=r.fileName||"视频",d='<svg class="video-play-icon" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="rgba(0,0,0,0.5)"/><polygon points="6.5,4.5 6.5,11.5 12,8" fill="#fff"/></svg>';o=`<span class="video-inner-wrapper video-url-inner has-video">${r.thumbnail?`<span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(r.thumbnail)}" alt="thumbnail" />${d}</span>`:`<span class="video-thumbnail-wrapper"><span class="video-thumbnail video-thumbnail-placeholder"><i class="iconfont icon-shipin" style="font-size:20px;color:#8c8c8c;"></i></span>${d}</span>`}<span class="video-label" data-file-name="${ie(l)}">${ie(l)}</span><span class="video-remove-btn" title="移除视频">×</span></span>`}else{const l=e.placeholder||"请粘贴想要分析的抖音视频链接",d=i?"rte-variable-with-icon":"",p=i?"":"hidden",E=`<span contenteditable="true" data-type="variable" data-key="${n}" data-node-type="video-url" data-placeholder="${ie(l)}"${a}${s} class="variable-chip rte-video-url show-placeholder${d?` ${d}`:""}">​${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${n}" data-tooltip="${ie(i)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${E}</span>`:E}const u=`<span contenteditable="false" data-type="video-url" data-key="${n}"${s}${a} class="video-chip">${o}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${u}</span>`:u},bb=(e,t)=>{const n=e.key,r=t[n],a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"";let o;if(r?.status==="loading"){const l=typeof r.progress=="number"?Math.min(Math.max(r.progress,0),100):0,d=r.fileName||"上传中...",p=r.thumbnail||"",E=2*Math.PI*6.5,c=E*(1-l/100),y=`<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${E}" stroke-dashoffset="${c}" transform="rotate(-90 8 8)"/></svg>`;o=`<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(p)}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${y}</span><span class="video-label">${ie(d)}</span></span>`}else if(r?.status==="success"&&r.thumbnail&&r.videoUrl){const l=r.fileName||"视频文件";o=`<span class="video-inner-wrapper video-upload-inner has-video"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(r.thumbnail)}" alt="thumbnail" /><svg class="video-play-icon" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="rgba(0,0,0,0.5)"/><polygon points="6.5,4.5 6.5,11.5 12,8" fill="#fff"/></svg></span><span class="video-label" data-file-name="${ie(l)}">${ie(l)}</span><span class="video-remove-btn" title="移除视频">×</span></span>`}else{const l=e.text||"请上传想要分析的视频文件",d=i?"":"hidden";o=`<span class="video-inner-wrapper video-upload-inner"><i class="iconfont icon-shangchuan1" style="font-size:16px;"></i><span class="video-label">${ie(l)}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${d}" data-upload-key="${n}" data-tooltip="${ie(i)}" ></i>`:""}</span>`}const u=`<span contenteditable="false" data-type="video-upload" data-key="${n}"${s}${a} class="video-chip">${o}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${u}</span>`:u},Tb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,yb=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",o=`<span data-type="searchable-select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-searchable-select-host"></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${Tb}${o}</span>`:o};function xb(e,t,n,r,a,i={},s,o,u){if(!e.current)return;const l=/[;;,,。.!!??::、]/,d=h=>{const m=(h??"").trim();return m.length===1&&l.test(m)},p=h=>{const m=h??"",g=m.match(new RegExp(`^\\s*(${l.source})`));if(!g)return null;const b=g[1],T=m.replace(new RegExp(`^\\s*${l.source}`),"");return{punct:b,rest:T}},E=h=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${h}</span>`,c=[];let y=0;for(;y<t.length;){const h=t[y],m=y+1<t.length?t[y+1]:null;let g=!1;if(h.type==="text"&&(h.text?.includes("icon-bitian")||h.className==="rte-text-required")&&m){const A=m.type==="upload"&&m.exclusionGroup==="fileInput"&&h.exclusionGroup==="fileInput"&&h.exclusionGroup===m.exclusionGroup,S=m.type==="variable"&&m.exclusionGroup==="textInput"&&h.exclusionGroup==="textInput"&&h.exclusionGroup===m.exclusionGroup;if(A){const I=`<span ${h.exclusionGroup?`data-group="${h.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,M="</span>";let B="";h.className?B=`<span class="${h.className}">${h.text??""}</span>`:B=h.text??"";const N=m,{uploadHtml:x,hintHtml:H}=K1(N,n);c.push(I+B+x+M+H),y+=2;continue}if(S){const I=`<span ${h.exclusionGroup?`data-group="${h.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,M="</span>";let B="";h.className?B=`<span class="${h.className}">${h.text??""}</span>`:B=h.text??"";const x=Ru(m,a);c.push(I+B+x+M),y+=2;continue}}const T=h.exclusionGroup?`data-group="${h.exclusionGroup}"`:"",_=h.exclusionGroup?`<span ${T} class="exclusion-wrapper">`:"",w=h.exclusionGroup?"</span>":"";let C="";if(h.type==="tag")C=G1(h,{lockStructure:r,hideButtons:s});else if(h.type==="text")C=Y1(h,r);else if(h.type==="variable"&&h.key)C=j1(h,a);else if(h.type==="report-url"&&h.key)C=ab(h,a);else if(h.type==="markdown-name"&&h.key)C=sb(h,a);else if(h.type==="markdown"&&h.key)C=ub(h,a);else if(h.type==="upload"&&h.key){const A=!!m&&m.type==="text"&&!m.className&&!m.exclusionGroup&&d(m.text),S=A?(m.text??"").trim():"",k=S?E(S):"";A&&(g=!0),C=Q1(h,n,k)}else h.type==="select"&&h.key?C=Z1(h,a):h.type==="textarea"&&h.key?C=tb(h,a):h.type==="richtext"&&h.key?C=nb(h,a):h.type==="report-module"&&h.key?C=lb(h,a):h.type==="markdown-module"&&h.key?C=cb(h,a):h.type==="datepicker"&&h.key?C=fb(h,a):h.type==="number-input"&&h.key?C=hb(h,a):h.type==="multi-variable"&&h.key?C=gb(h,a,i):h.type==="video-url"&&h.key?C=Eb(h,u||{}):h.type==="video-upload"&&h.key?C=bb(h,u||{}):h.type==="searchable-select"&&h.key&&(C=yb(h,a));const O=_+C+w;if(h.type==="text"&&!h.className&&!h.exclusionGroup){if(d(h.text)&&c.length>0){const S=c[c.length-1],k=(h.text??"").trim();c[c.length-1]=`<span class="rte-inline-group">${S}${E(k)}</span>`,y++;continue}const A=p(h.text);if(A&&c.length>0){const S=c[c.length-1];c[c.length-1]=`<span class="rte-inline-group">${S}${E(A.punct)}</span>`;const k=A.rest;if(k){const I=k.replace(/\n/g,"<br/>");c.push(`<span data-type="text" contenteditable="false">${I}</span>`)}y++;continue}}c.push(O),y+=g?2:1}e.current&&(e.current.innerHTML=c.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(m=>{if(m.dataset.variableRender==="antd-textarea")return;if(m.innerText.replace(/\n/g,"").replace(/\u200B/g,""))m.classList.remove("show-placeholder");else{const T=Array.from(m.childNodes),_=m.querySelector(".variable-info-icon");T.forEach(C=>{if(C.nodeType===Node.TEXT_NODE){m.removeChild(C);return}C.nodeType===Node.ELEMENT_NODE&&C.tagName==="BR"&&m.removeChild(C)});const w=document.createTextNode("​");_&&_.parentNode===m?m.insertBefore(w,_):m.firstChild?m.insertBefore(w,m.firstChild):m.appendChild(w),m.classList.add("show-placeholder")}})},0))}function Cb(e,t,n,r,a={},i,s,o,u,l,d){const p=L.useRef(new Set),E=L.useRef(""),c=L.useRef(!1),y=L.useRef(l),h=L.useCallback(()=>{if(!e.current)return;if(t.length===0){e.current.innerHTML="";return}const m=t.filter(C=>C.key&&C.type!=="report-module"&&C.type!=="markdown-module").map(C=>`${C.type}:${C.key}`).join("|");E.current!==m&&(E.current=m,p.current=new Set,c.current=!0);const g=c.current;let b={};const T=new Set;e.current&&!g&&e.current.querySelectorAll('[data-type="variable"]').forEach(O=>{const A=O.dataset.key;if(!A)return;let S="";if(O.dataset.variableRender==="antd-textarea"){const k=(O.getAttribute("data-value")||"").trim();try{S=k?decodeURIComponent(k).replace(/\r\n/g,`
61
- `).trim():""}catch{S=k.trim()}}else{const k=(O.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
62
- `);S=k.replace(/\n/g,"").trim().length>0?k:""}if(S)p.current.add(A);else if(p.current.has(A)){T.add(A);const k=O.getAttribute("data-node-type");k==="report-url"?T.add(`${A}__url`):k==="markdown-name"&&T.add(`${A}__name`)}});const w=e.current.__tempVariableValues;if(w?(b=w,setTimeout(()=>{if(e.current){const C=e.current;C.__tempVariableValues===w&&delete C.__tempVariableValues}},100)):g||(e.current.querySelectorAll('[data-type="variable"]').forEach(B=>{const N=B.dataset.key;if(N){const H=(()=>{if(B.dataset.variableRender==="antd-textarea"){const V=(B.getAttribute("data-value")||"").trim();if(!V)return"";try{return decodeURIComponent(V).replace(/\r\n/g,`
63
- `).trim()}catch{return V.trim()}}const U=(B.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
64
- `);return U.replace(/\n/g,"").trim().length>0?U:""})();H&&(B.getAttribute("data-node-type")==="report-url"?b[`${N}__url`]=H:B.getAttribute("data-node-type")==="markdown-name"?b[`${N}__name`]=H:b[N]=H)}}),e.current.querySelectorAll('[data-type="select"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.getAttribute("data-value")||"").trim();x&&(b[N]=x)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.getAttribute("data-value")||"").trim();x&&(b[N]=x)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(B=>{const N=B.dataset.key;if(N){const x=B.value.replace(/[\u200B]/g,"").trim();x&&(b[N]=x)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(B=>{const N=B.dataset.key;if(N){const x=B.getAttribute("data-node-type")||"",H=x==="report-module"||x==="markdown-module",U=H?(B.innerHTML||"").replace(/[\u200B]/g,"").trim():(B.textContent||"").replace(/[\u200B]/g,"").trim();if(H){const $=Number.parseInt(B.getAttribute("data-module-index")||"0",10);b[`${N}__module_${Number.isFinite($)?$:0}`]=U}else U&&(b[N]=U)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.getAttribute("data-value")||"").trim();x&&(b[N]=x)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(B=>{const N=B.dataset.key;if(N){const x=(B.value||"").trim();x&&(b[N]=x)}})),l&&Object.keys(l).length>0){const C=new Set(t.filter(S=>S.type==="upload"&&S.key).map(S=>S.key)),O={};g||Object.entries(l).forEach(([S,k])=>{if(!Array.isArray(k))return;let I=0;for(let B=0;B<k.length;B++)`${S}_${B}`in b&&I++;let M=-1;for(let B=0;B<k.length;B++)p.current.has(`${S}_${B}`)&&(M=B);if(M>=I&&I<k.length)for(let B=I;B<k.length;B++)T.add(`${S}_${B}`)}),Object.entries(l).forEach(([S,k])=>{C.has(S)||(Array.isArray(k)?k.forEach((I,M)=>{I!=null&&String(I).trim()!==""&&(O[`${S}_${M}`]=String(I))}):k!=null&&String(k).trim()!==""&&(t.find(M=>M.key===S&&M.type==="report-url")?O[`${S}__url`]=String(k):O[S]=String(k)))});const A=y.current!==l;Object.entries(O).forEach(([S,k])=>{const I=S in b;!T.has(S)&&(!I||A)&&(b[S]=k)})}if(y.current=l,xb(e,t,n,r,b,a,o,u,d),g&&(c.current=!1),setTimeout(()=>{zn(e)},0),i?.current){const{key:C,offset:O}=i.current;setTimeout(()=>{if(!e.current)return;const A=e.current.querySelector(`[data-type="variable"][data-key="${C}"]`);if(A){if(A.dataset.variableRender==="antd-textarea"){const S=A.querySelector("textarea");if(S){S.focus();try{const k=S.value?.length??0;S.setSelectionRange(Math.min(O,k),Math.min(O,k))}catch{}i.current=null;return}}try{const S=document.createRange(),k=document.createTreeWalker(A,NodeFilter.SHOW_TEXT,null);let I=0,M=null,B=0;for(;k.nextNode();){const N=k.currentNode,x=N.textContent?.length||0;if(I+x>=O){M=N,B=O-I;break}I+=x}if(M){S.setStart(M,Math.min(B,M.textContent?.length||0)),S.collapse(!0);const N=window.getSelection();N&&(N.removeAllRanges(),N.addRange(S),A.focus())}else{S.selectNodeContents(A),S.collapse(!1);const N=window.getSelection();N&&(N.removeAllRanges(),N.addRange(S),A.focus())}}catch{const S=document.createRange();S.selectNodeContents(A),S.collapse(!1);const k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(S),A.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,o,u,l,d]);L.useEffect(()=>{h()},[h])}function Sb(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=l=>typeof l=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(l):l.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(l.name||""),o=l=>{const d=l.target?.closest(".upload-info-icon");if(d&&d.classList.contains("upload-info-icon")){const E=d.dataset.uploadKey;if(E){const c=d.dataset.tooltip||"";let y=!1;try{const m=JSON.parse(c);m&&m.type==="steps"&&Array.isArray(m.images)&&(y=!0)}catch{}if(y){const h=d.closest('[data-type="upload"], [data-type="video-upload"]');r({key:E,anchorEl:h||d,type:"upload"})}else{const h=d.closest('[data-type="upload"], [data-type="video-upload"]');r({key:E,anchorEl:h||d,type:"upload"})}}return}const p=l.target?.closest('[data-type="upload"]');if(p){const E=p.dataset.key;if(E){const c=n[E];c&&s(c)&&r({key:E,anchorEl:p,type:"upload-preview"})}}},u=l=>{if(a)return;const d=l.target?.closest(".upload-info-icon"),p=l.relatedTarget;if(p?.closest?.(".rte-tooltip-overlay"))return;if(d&&d.classList.contains("upload-info-icon")){const c=d.closest('[data-type="upload"], [data-type="video-upload"]');if(p&&c&&c.contains(p))return;if(!p||!i.contains(p))r(null);else{const y=p.closest('[data-type="upload"], [data-type="video-upload"]');(!y||y!==c)&&r(null)}return}const E=l.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(E){const c=p;if(c?.closest?.(".rte-tooltip-overlay")||c&&E.contains(c))return;r(null)}};return i.addEventListener("mouseover",o,!0),i.addEventListener("mouseout",u,!0),()=>{i.removeEventListener("mouseover",o,!0),i.removeEventListener("mouseout",u,!0)}},[t,n,e,r,a])}function Ab(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=d=>{if(r==="hideTagClose")return;const p=d.currentTarget,E=p.dataset.tooltip,c=p.dataset.tagKey||"";E&&n({key:c,anchorEl:p,type:"tag"})},o=d=>{a||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let u;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.addEventListener("mouseenter",s),p.addEventListener("mouseleave",o)})};return u=requestAnimationFrame(()=>{u=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(u),i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.removeEventListener("mouseenter",s),p.removeEventListener("mouseleave",o)})}},[t,e,n,r,a])}function _b(e,t,n,r){L.useEffect(()=>{const a=e.current;if(!a)return;const i=o=>{const u=o.target?.closest(".variable-info-icon");if(u&&u.classList.contains("variable-info-icon")){const d=u.dataset.variableKey;d&&n({key:d,anchorEl:u,type:"variable"});return}const l=o.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const d=l.dataset.key;d&&n({key:d,anchorEl:l,type:"variable"})}},s=o=>{if(r)return;const u=o.target,l=o.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const d=u?.closest?.(".variable-info-icon"),p=u?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(d||p){if(!l||!a.contains(l)){n(null);return}const E=!!l.closest?.(".variable-info-icon"),c=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!E&&!c&&n(null)}};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[t,e,n,r])}function vb(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=p=>typeof p=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(p):p.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name||""),o=p=>{const E=p.currentTarget,c=E.dataset.fileName,y=E.closest('[data-type="upload"]'),h=y?.dataset.key||"",m=h?n[h]:null;if(m&&s(m)){r({key:h,anchorEl:y||E,type:"upload-preview"});return}c&&r({key:h,anchorEl:y||E,type:"upload-label"})},u=p=>{a||p.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const d=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.addEventListener("mouseenter",o),E.addEventListener("mouseleave",u)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(d)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.removeEventListener("mouseenter",o),E.removeEventListener("mouseleave",u)})}},[t,n,e,r,a])}function kb(e,t,n,r,a,i){L.useEffect(()=>{const s=setTimeout(()=>{wr(e,t,n,a),Nr(e,t,n,r,a)},0);return()=>clearTimeout(s)},[n,t,e,r,a,i])}function wb(e,t){const n=L.useRef(0),r=L.useRef(0);L.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=b=>b instanceof HTMLElement?!!(b.closest(".rte-datepicker-wrapper")||b.closest(".rte-datepicker-host")||b.closest(".ant-picker")||b.closest(".ant-picker-dropdown")):!1,o=b=>b instanceof HTMLElement?!!(b.closest(".rte-select-wrapper")||b.closest(".rte-select-host")||b.closest(".ant-select")||b.closest(".ant-select-dropdown")):!1,u=b=>{a=!0,s(b.target)&&(n.current=Date.now()),o(b.target)&&(r.current=Date.now())},l=()=>{a=!1,i=Date.now()};let d=!1,p=0;const E=()=>{d=!0},c=()=>{d=!1,p=Date.now()},y=()=>{p=Date.now()},h=b=>{s(b.target)&&(n.current=Date.now()),o(b.target)&&(r.current=Date.now())},m=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800)return;const b=document.activeElement;if(b&&(b.closest(".rte-datepicker-wrapper")||b.closest(".rte-datepicker-host")||b.closest(".ant-picker-dropdown")||b.tagName==="INPUT"&&b.closest(".ant-picker")||b.closest(".rte-select-wrapper")||b.closest(".rte-select-host")||b.closest(".ant-select")||b.closest(".ant-select-dropdown"))||!e.current)return;const T=window.getSelection();if(!T||T.rangeCount===0||t.current||a||d||Date.now()-p<500)return;const _=T.getRangeAt(0);if(!_.collapsed)return e.current.contains(_.commonAncestorContainer),void 0;const w=T.anchorNode;if(!w||!e.current.contains(w))return;let C=!1,O=!1;if(w.nodeType===Node.ELEMENT_NODE){const S=w;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(C=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}else if(w.parentElement){const S=w.parentElement;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(C=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(O=!0)}if(C||O)return;let A=null;if(w.nodeType===Node.ELEMENT_NODE?A=w.closest('[data-type="variable"]'):w.nodeType===Node.TEXT_NODE&&w.parentElement&&(A=w.parentElement.closest('[data-type="variable"]')),!A){if(Date.now()-i>500)return;const S=e.current.querySelectorAll('[data-type="variable"]');if(S.length>0){let k=null;for(const I of Array.from(S))if(I.style.display!=="none"){k=I;break}if(!k&&S.length>0&&(k=S[0]),k){const I=document.createRange();I.selectNodeContents(k),I.collapse(!1),T.removeAllRanges(),T.addRange(I),k.focus()}else T.removeAllRanges()}else T.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",E),g.addEventListener("compositionend",c),g.addEventListener("input",y)),document.addEventListener("mousedown",u),document.addEventListener("mouseup",l),document.addEventListener("focusin",h),document.addEventListener("selectionchange",m),()=>{g&&(g.removeEventListener("compositionstart",E),g.removeEventListener("compositionend",c),g.removeEventListener("input",y)),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",h),document.removeEventListener("selectionchange",m)}},[e,t])}var Tr={exports:{}},Nb=Tr.exports,Hu;function $u(){return Hu||(Hu=1,function(e,t){(function(n,r){e.exports=r()})(Nb,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",o="minute",u="hour",l="day",d="week",p="month",E="quarter",c="year",y="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,b={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(N){var x=["th","st","nd","rd"],H=N%100;return"["+N+(x[(H-20)%10]||x[H]||x[0])+"]"}},T=function(N,x,H){var U=String(N);return!U||U.length>=x?N:""+Array(x+1-U.length).join(H)+N},_={s:T,z:function(N){var x=-N.utcOffset(),H=Math.abs(x),U=Math.floor(H/60),$=H%60;return(x<=0?"+":"-")+T(U,2,"0")+":"+T($,2,"0")},m:function N(x,H){if(x.date()<H.date())return-N(H,x);var U=12*(H.year()-x.year())+(H.month()-x.month()),$=x.clone().add(U,p),V=H-$<0,v=x.clone().add(U+(V?-1:1),p);return+(-(U+(H-$)/(V?$-v:v-$))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:p,y:c,w:d,d:l,D:y,h:u,m:o,s,ms:i,Q:E}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},w="en",C={};C[w]=b;var O="$isDayjsObject",A=function(N){return N instanceof M||!(!N||!N[O])},S=function N(x,H,U){var $;if(!x)return w;if(typeof x=="string"){var V=x.toLowerCase();C[V]&&($=V),H&&(C[V]=H,$=V);var v=x.split("-");if(!$&&v.length>1)return N(v[0])}else{var Y=x.name;C[Y]=x,$=Y}return!U&&$&&(w=$),$||!U&&w},k=function(N,x){if(A(N))return N.clone();var H=typeof x=="object"?x:{};return H.date=N,H.args=arguments,new M(H)},I=_;I.l=S,I.i=A,I.w=function(N,x){return k(N,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var M=function(){function N(H){this.$L=S(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[O]=!0}var x=N.prototype;return x.parse=function(H){this.$d=function(U){var $=U.date,V=U.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var v=$.match(m);if(v){var Y=v[2]-1||0,J=(v[7]||"0").substring(0,3);return V?new Date(Date.UTC(v[1],Y,v[3]||1,v[4]||0,v[5]||0,v[6]||0,J)):new Date(v[1],Y,v[3]||1,v[4]||0,v[5]||0,v[6]||0,J)}}return new Date($)}(H),this.init()},x.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},x.$utils=function(){return I},x.isValid=function(){return this.$d.toString()!==h},x.isSame=function(H,U){var $=k(H);return this.startOf(U)<=$&&$<=this.endOf(U)},x.isAfter=function(H,U){return k(H)<this.startOf(U)},x.isBefore=function(H,U){return this.endOf(U)<k(H)},x.$g=function(H,U,$){return I.u(H)?this[U]:this.set($,H)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(H,U){var $=this,V=!!I.u(U)||U,v=I.p(H),Y=function(oe,ge){var Oe=I.w($.$u?Date.UTC($.$y,ge,oe):new Date($.$y,ge,oe),$);return V?Oe:Oe.endOf(l)},J=function(oe,ge){return I.w($.toDate()[oe].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ge)),$)},P=this.$W,ee=this.$M,te=this.$D,ae="set"+(this.$u?"UTC":"");switch(v){case c:return V?Y(1,0):Y(31,11);case p:return V?Y(1,ee):Y(0,ee+1);case d:var Q=this.$locale().weekStart||0,re=(P<Q?P+7:P)-Q;return Y(V?te-re:te+(6-re),ee);case l:case y:return J(ae+"Hours",0);case u:return J(ae+"Minutes",1);case o:return J(ae+"Seconds",2);case s:return J(ae+"Milliseconds",3);default:return this.clone()}},x.endOf=function(H){return this.startOf(H,!1)},x.$set=function(H,U){var $,V=I.p(H),v="set"+(this.$u?"UTC":""),Y=($={},$[l]=v+"Date",$[y]=v+"Date",$[p]=v+"Month",$[c]=v+"FullYear",$[u]=v+"Hours",$[o]=v+"Minutes",$[s]=v+"Seconds",$[i]=v+"Milliseconds",$)[V],J=V===l?this.$D+(U-this.$W):U;if(V===p||V===c){var P=this.clone().set(y,1);P.$d[Y](J),P.init(),this.$d=P.set(y,Math.min(this.$D,P.daysInMonth())).$d}else Y&&this.$d[Y](J);return this.init(),this},x.set=function(H,U){return this.clone().$set(H,U)},x.get=function(H){return this[I.p(H)]()},x.add=function(H,U){var $,V=this;H=Number(H);var v=I.p(U),Y=function(ee){var te=k(V);return I.w(te.date(te.date()+Math.round(ee*H)),V)};if(v===p)return this.set(p,this.$M+H);if(v===c)return this.set(c,this.$y+H);if(v===l)return Y(1);if(v===d)return Y(7);var J=($={},$[o]=r,$[u]=a,$[s]=n,$)[v]||1,P=this.$d.getTime()+H*J;return I.w(P,this)},x.subtract=function(H,U){return this.add(-1*H,U)},x.format=function(H){var U=this,$=this.$locale();if(!this.isValid())return $.invalidDate||h;var V=H||"YYYY-MM-DDTHH:mm:ssZ",v=I.z(this),Y=this.$H,J=this.$m,P=this.$M,ee=$.weekdays,te=$.months,ae=$.meridiem,Q=function(ge,Oe,Pe,ot){return ge&&(ge[Oe]||ge(U,V))||Pe[Oe].slice(0,ot)},re=function(ge){return I.s(Y%12||12,ge,"0")},oe=ae||function(ge,Oe,Pe){var ot=ge<12?"AM":"PM";return Pe?ot.toLowerCase():ot};return V.replace(g,function(ge,Oe){return Oe||function(Pe){switch(Pe){case"YY":return String(U.$y).slice(-2);case"YYYY":return I.s(U.$y,4,"0");case"M":return P+1;case"MM":return I.s(P+1,2,"0");case"MMM":return Q($.monthsShort,P,te,3);case"MMMM":return Q(te,P);case"D":return U.$D;case"DD":return I.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Q($.weekdaysMin,U.$W,ee,2);case"ddd":return Q($.weekdaysShort,U.$W,ee,3);case"dddd":return ee[U.$W];case"H":return String(Y);case"HH":return I.s(Y,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return oe(Y,J,!0);case"A":return oe(Y,J,!1);case"m":return String(J);case"mm":return I.s(J,2,"0");case"s":return String(U.$s);case"ss":return I.s(U.$s,2,"0");case"SSS":return I.s(U.$ms,3,"0");case"Z":return v}return null}(ge)||v.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(H,U,$){var V,v=this,Y=I.p(U),J=k(H),P=(J.utcOffset()-this.utcOffset())*r,ee=this-J,te=function(){return I.m(v,J)};switch(Y){case c:V=te()/12;break;case p:V=te();break;case E:V=te()/3;break;case d:V=(ee-P)/6048e5;break;case l:V=(ee-P)/864e5;break;case u:V=ee/a;break;case o:V=ee/r;break;case s:V=ee/n;break;default:V=ee}return $?V:I.a(V)},x.daysInMonth=function(){return this.endOf(p).$D},x.$locale=function(){return C[this.$L]},x.locale=function(H,U){if(!H)return this.$L;var $=this.clone(),V=S(H,U,!0);return V&&($.$L=V),$},x.clone=function(){return I.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},N}(),B=M.prototype;return k.prototype=B,[["$ms",i],["$s",s],["$m",o],["$H",u],["$W",l],["$M",p],["$y",c],["$D",y]].forEach(function(N){B[N[1]]=function(x){return this.$g(x,N[0],N[1])}}),k.extend=function(N,x){return N.$i||(N(x,M,k),N.$i=!0),k},k.locale=S,k.isDayjs=A,k.unix=function(N){return k(1e3*N)},k.en=C[w],k.Ls=C,k.p={},k})}(Tr)),Tr.exports}var Ib=$u();const yr=Yr(Ib);var xr={exports:{}},Lb=xr.exports,Uu;function Ob(){return Uu||(Uu=1,function(e,t){(function(n,r){e.exports=r($u())})(Lb,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var a=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,o){return o==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,o){var u=100*s+o;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(xr)),xr.exports}Ob();function Pn(e){"@babel/helpers - typeof";return Pn=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},Pn(e)}function Db(e,t){if(Pn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pb(e){var t=Db(e,"string");return Pn(t)=="symbol"?t:t+""}function Mb(e,t,n){return(t=Pb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qu(Object(n),!0).forEach(function(r){Mb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Bb={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Rb=zu(zu({},Bb),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const Fb={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Vu={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Rb),timePickerLocale:Object.assign({},Fb)};Vu.lang.ok="确定",yr.locale("zh-cn");const{RangePicker:Hb}=ce.DatePicker,$b=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.value,a=e.dataset.placeholder,i=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,s=e.dataset.disableFuture==="true",[o,u]=L.useState(()=>{if(!r)return null;const h=r.split(",");return h.length===2&&h[0]&&h[1]?[yr(h[0]),yr(h[1])]:null}),[l,d]=L.useState(null),p=h=>h?s&&h.isAfter(yr(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(h.diff(l[0],"days"))>i:!1,E=h=>{d(h)},c=h=>{if(u(h),d(null),h&&h[0]&&h[1]){const m=`${h[0].format("YYYY-MM-DD")},${h[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",m),t(n,m)}else e.setAttribute("data-value",""),t(n,"")},y=h=>{d(h?o:null)};return rn.createPortal(q.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:q.jsx(Hb,{value:o,disabledDate:p,onCalendarChange:E,onChange:c,onOpenChange:y,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:Vu,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},Ub=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx($b,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`datepicker-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},Gu=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:o,onAgentExit:u,loading:l=!1,placeholder:d,border:p,background:E="transparent",hideButtons:c,maxHeight:y,minHeight:h,editorMinHeight:m,editorPadding:g,footerPadding:b,collapsed:T=!1,reportAnalyze:_,markdownAnalyze:w,markdownNameAnalyze:C,onCollapsedChange:O,collapseTransitionMs:A=260,debugTooltipSticky:S=!1,nodeValues:k,onFilesChange:I,showFooterUpload:M=!0,videoUrlParse:B,videoUpload:N})=>{const[x,H]=ce.message.useMessage(),U=L.useRef(null),$=L.useRef(null),V=L.useRef(null),v=L.useRef(null),Y=L.useRef(null),J=L.useRef(null),P=L.useRef("");if(!P.current){const ue=Math.random().toString(36).slice(2,8);P.current=`rte_${ue}`}const[ee,te]=L.useState({});L.useEffect(()=>{I?.(ee)},[ee,I]);const[ae,Q]=L.useState(null),[re,oe]=L.useState(null),[ge,Oe]=L.useState(null),[Pe,ot]=L.useState({}),Zt=L.useRef(null),en=L.useRef(null),{tooltipPortal:Cr,setPopoverVisible:ft}=V1({config:e,files:ee,debugTooltipSticky:S,videoState:Pe}),{handleFileChange:Sr,handleRemoveFile:Ar}=kl({config:e,messageApi:x,activeBatchKey:re,activeFileKey:ae,activeBatchStartIndex:ge,setActiveFileKey:Q,setActiveBatchKey:oe,setActiveBatchStartIndex:Oe,setFiles:te}),tn=L.useRef(!1),ri=L.useRef(null),{handleMouseDown:ai,handleMouseMove:ii,handleMouseUp:si,handleDoubleClick:oi}=Wl({lockStructure:i,onAgentExit:u,editorRef:v,setPopoverVisible:ft,isDraggingRef:tn,mouseDownPosRef:ri}),[W,Z]=L.useState(!1),se=L.useRef(null),[fe,be]=L.useState(!0),je=L.useRef(0),[ut,et]=L.useState(58),[Dt,Pt]=L.useState(58),[He,St]=L.useState(!1),[ze,ui]=L.useState(null),Rn=L.useRef(!1),Fn=L.useRef(!1),lt=L.useRef(null),[li,ci]=L.useState({}),_r=L.useRef(()=>{}),[Mt,vr]=L.useState({}),el=L.useRef(()=>{}),tT=L.useRef({}),di=L.useRef(Mt);L.useEffect(()=>{di.current=Mt},[Mt]);const[Bt,fi]=L.useState({}),tl=L.useRef(()=>{}),nl=L.useRef(Bt);L.useEffect(()=>{nl.current=Bt},[Bt]);const[Rt,Hn]=L.useState(()=>{const ue={};return e.forEach(pe=>{pe.type==="multi-variable"&&pe.key&&(ue[pe.key]=1)}),ue});Bl({config:e,editorRef:v,files:ee,setFiles:te,multiVariableCounts:Rt,setMultiVariableCounts:Hn,reportAnalyzeState:li,setReportAnalyzeState:ci,markdownAnalyzeState:Mt,setMarkdownAnalyzeState:vr,markdownNameAnalyzeState:Bt,setMarkdownNameAnalyzeState:fi,nodeValues:k});const rl=L.useRef(k);if(k!==rl.current&&(rl.current=k,k)){const ue={};let pe=!1;e.forEach(Te=>{if(Te.type==="multi-variable"&&Te.key){const Xe=k[Te.key];if(Array.isArray(Xe)&&Xe.length>0){const nn=Te.maxCount??9,Un=Math.min(Xe.length+1,nn);Rt[Te.key]!==Un&&(ue[Te.key]=Un,pe=!0)}}}),pe&&Hn(Te=>({...Te,...ue}))}const _e=Ul({config:e,reportAnalyzeState:li,markdownAnalyzeState:Mt,markdownNameAnalyzeState:Bt}),{handleReportUrlBlur:nT,handleMarkdownBlur:rT,handleMarkdownNameBlur:aT}=Fl({reportAnalyze:_,markdownAnalyze:w,markdownNameAnalyze:C,reportAnalyzeState:li,setReportAnalyzeState:ci,markdownAnalyzeState:Mt,setMarkdownAnalyzeState:vr,markdownNameAnalyzeState:Bt,setMarkdownNameAnalyzeState:fi,editorRef:v,reportAnalyzeRef:_r,markdownAnalyzeRef:el,markdownNameAnalyzeRef:tl,markdownAnalyzeStateRef:di,markdownNameAnalyzeStateRef:nl});Sl(v,nT,[_e]),Al(v,aT,[_e]),_l(v,rT,[_e]),Cl(v,[_e]),Cb(v,_e,ee,i,Rt,se,void 0,c,void 0,k,Pe);const pi=L.useRef(new Set),al=L.useRef(_e),il=L.useRef(k);(al.current!==_e||il.current!==k)&&(al.current=_e,il.current=k,pi.current=new Set),L.useEffect(()=>{if(!k||!_e||_e.length===0)return;const ue=_e.filter(ye=>ye.type==="upload"&&ye.key);if(ue.length===0)return;const pe={},Te=(ye,Ce)=>{Ce&&(Ce instanceof File?pe[ye]=Ce:typeof Ce=="string"&&Ce.trim()&&(pe[ye]=Ce.trim()))};for(const ye of ue){const Ce=ye.key;if(pi.current.has(Ce))continue;const Ae=k[Ce],Re=typeof ye.maxCount=="number"&&ye.maxCount>1;if(Array.isArray(Ae)&&Ae.length>0){Re?Ae.forEach((De,Ve)=>Te(`${Ce}-${Ve}`,De)):Te(Ce,Ae[0]);continue}if(Ae&&!Array.isArray(Ae)){Te(Ce,Ae);continue}if(Re)for(let De=0;De<ye.maxCount;De++){const Ve=`${Ce}-${De}`,At=k[Ve];if(!At)break;Te(Ve,At)}}if(Object.keys(pe).length===0)return;for(const ye of ue)k[ye.key]!==void 0&&pi.current.add(ye.key);te(ye=>{const Ce={...ye};let Ae=!1;for(const Re of ue){const De=Re.key;if(k[De]===void 0)continue;if(typeof Re.maxCount=="number"&&Re.maxCount>1)for(let At=0;At<Re.maxCount;At++){const gi=`${De}-${At}`;!pe[gi]&&ye[gi]&&(Ce[gi]=null,Ae=!0)}}for(const[Re,De]of Object.entries(pe))ye[Re]!==De&&(Ce[Re]=De,Ae=!0);return Ae?Ce:ye});const Xe=Object.entries(pe).filter(([,ye])=>typeof ye=="string");if(Xe.length===0)return;const nn=async ye=>{const Ce=ye.split("/").pop()?.split("?")[0]||"file",Ae=decodeURIComponent(Ce),Re=async De=>{const Ve=await De.blob();return new File([Ve],Ae,{type:Ve.type||"application/octet-stream"})};try{const De=`/api/image-proxy?url=${encodeURIComponent(ye)}`,Ve=await fetch(De);if(Ve.ok)return Re(Ve)}catch{}return null};let Un=!1;return Promise.all(Xe.map(async([ye,Ce])=>{const Ae=await nn(Ce);return Ae?{key:ye,file:Ae}:null})).then(ye=>{if(Un)return;const Ce={};for(const Ae of ye)Ae&&(Ce[Ae.key]=Ae.file);Object.keys(Ce).length>0&&te(Ae=>{const Re={...Ae};let De=!1;for(const[Ve,At]of Object.entries(Ce))typeof Re[Ve]=="string"&&(Re[Ve]=At,De=!0);return De?Re:Ae})}),()=>{Un=!0}},[k,_e]);const hi=L.useRef(new Set),sl=L.useRef(""),ol=(e||[]).filter(ue=>ue.key&&ue.type!=="report-module"&&ue.type!=="markdown-module").map(ue=>`${ue.type}:${ue.key}`).join("|");sl.current!==ol&&(sl.current=ol,hi.current=new Set),L.useEffect(()=>{if(!k||!e||e.length===0)return;const ue=e.filter(pe=>pe.type==="report-url"&&pe.key);if(ue.length!==0)for(const pe of ue){const Te=pe.key;if(hi.current.has(Te))continue;const Xe=k[Te]??k[`${Te}__url`];if(!Xe||typeof Xe=="string"&&!Xe.trim())continue;const nn=Array.isArray(Xe)?Xe[0]:String(Xe);nn&&(hi.current.add(Te),setTimeout(()=>{_r.current(Te,nn)},100))}},[k,e,_r]),Sb(v,_e,ee,ft,S),Ab(v,_e,ft,c,S),vb(v,_e,ee,ft,S),_b(v,_e,ft,S),kb(v,_e,ee,Z,Pe,k),Ll(v,B,Pe,ot,[_e]);const iT=Ol(N,ot);Dl(v,Pe,ft,S),wb(v,tn);const ul=hl(v),sT=gl(v),ll=xl(v);L.useEffect(()=>{if(!v.current)return;v.current.querySelectorAll(".rte-richtext-toggle").forEach(pe=>{const Te=pe.getAttribute("data-expanded")==="true";pe.innerHTML=Te?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[_e,v]);const cl=Ub(v),{measureExpandedContentHeight:$n}=Hl({collapsed:T,collapseTransitionMs:A,contentRef:$,contentBodyRef:V,editorRef:v,debugIdRef:P,setCollapsedContentMaxHeightPx:et,setExpandedContentMaxHeightPx:Pt,setIsCollapseAnimating:St,effectiveConfig:_e,files:ee,multiVariableCounts:Rt,selectPortalsLength:ul.length,datePickerPortalsLength:cl.length,variablePortalsLength:ll.length}),oT=()=>{if(T)return;const ue=V.current;if(!ue)return;const pe=Math.ceil(ue.getBoundingClientRect().height||0);pe>0&&ui(pe),Rn.current=!0,Fn.current=!1,lt.current&&(window.clearTimeout(lt.current),lt.current=null)};L.useEffect(()=>{const ue=()=>{Rn.current&&(Fn.current=!0,lt.current&&window.clearTimeout(lt.current),lt.current=window.setTimeout(()=>{lt.current=null,Rn.current=!1,Fn.current=!1,ui(null),window.requestAnimationFrame(()=>$n())},450))};return window.addEventListener("focus",ue),()=>window.removeEventListener("focus",ue)},[$n]),L.useEffect(()=>{!Rn.current||!Fn.current||(lt.current&&(window.clearTimeout(lt.current),lt.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{ui(null),$n(),Rn.current=!1,Fn.current=!1})}))},[ee,$n]),$l({config:e,editorRef:v,setIsEmpty:be,setIsFormValid:Z});const uT=Vl({disabled:r,collapsed:T,onCollapsedChange:O,config:e,lockStructure:i,editorRef:v,containerRef:U,fileInputRef:Y,onBeforeFilePickerOpen:oT,files:ee,setFiles:te,handleRemoveFile:Ar,setActiveBatchKey:oe,setActiveBatchStartIndex:Oe,setActiveFileKey:Q,isDraggingRef:tn,richtextPrevScrollTopRef:je,videoState:Pe,setVideoState:ot,videoFileInputRef:Zt,activeVideoKeyRef:en}),mi=Gl({config:e,editorRef:v,setIsEmpty:be,setIsFormValid:Z,setReportAnalyzeState:ci,setMarkdownAnalyzeState:vr,setMarkdownNameAnalyzeState:fi,collapsed:T,measureExpandedContentHeight:$n,effectiveConfig:_e,files:ee,multiVariableCounts:Rt,setMultiVariableCounts:Hn,savedCursorRef:se,videoState:Pe}),lT=jl({disabled:r,config:e,multiVariableCounts:Rt,setMultiVariableCounts:Hn,editorRef:v,handleInput:mi,markdownAnalyzeRef:el,reportAnalyzeRef:_r,markdownNameAnalyzeRef:tl,markdownAnalyzeStateRef:di,markdownRawTextRef:tT,setMarkdownAnalyzeState:vr});zl({config:e,effectiveConfig:_e,files:ee,editorRef:v,setIsFormValid:Z,multiVariableCounts:Rt,setMultiVariableCounts:Hn,videoState:Pe});const cT=Yl({disabled:r,lockStructure:i,config:e,editorRef:v,handleInput:mi}),dT=Xl({config:e,files:ee,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:W,editorRef:v,markdownAnalyzeState:Mt,markdownNameAnalyzeState:Bt,videoState:Pe}),fT={...a?{width:typeof a=="number"?`${a}px`:a}:{},...p?{border:p}:{},...E?{background:E}:{},...y?{maxHeight:typeof y=="number"?`${y}px`:y}:{},...h?{minHeight:typeof h=="number"?`${h}px`:h}:{},...y?{"--rte-richtext-fullscreen-height":typeof y=="number"?`${y}px`:y}:{},...m?{"--rte-editor-min-height":typeof m=="number"?`${m}px`:m}:{},...g?{"--rte-editor-padding":g}:{},...b?{"--rte-footer-padding":b}:{}},pT=typeof A=="number"&&Number.isFinite(A)&&A>=0?A:260,hT={overflow:"hidden"},mT=ze!=null?`${ze}px`:T?`${ut}px`:`${Math.max(Dt,ut)}px`,gT=ze!=null||T||He?"hidden":"auto",ET=ze!=null?"none":`max-height ${pT}ms cubic-bezier(0.4, 0, 0.2, 1)`,bT={maxHeight:mT,minHeight:T?0:void 0,overflow:gT,overscrollBehavior:"contain",transition:ET,willChange:"max-height"};return q.jsxs("div",{className:"rich-text-editor",style:fT,"data-disabled":r,ref:U,children:[H,q.jsx("div",{className:"rich-text-editor-content",ref:$,style:hT,children:q.jsxs("div",{ref:V,className:"rich-text-editor-content-body",style:bT,children:[q.jsx("div",{ref:v,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${fe&&d?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":d,onMouseDown:ai,onMouseMove:ii,onMouseUp:si,onClick:uT,onDoubleClick:oi,onInput:mi,onKeyDown:cT,onPaste:lT}),q.jsx("input",{type:"file",ref:Y,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:Sr}),q.jsx("input",{type:"file",ref:Zt,className:"rte-file-input",accept:"video/*",onChange:ue=>{const pe=ue.target.files?.[0],Te=en.current;pe&&pe.size>1024*1024*1024?x.warning("视频文件不能超过1GB"):pe&&Te&&iT(Te,pe),en.current=null,Zt.current&&(Zt.current.value="")}})]})}),q.jsxs("div",{className:"rich-text-editor-footer",children:[q.jsxs("div",{className:"rich-text-editor-footer-left",children:[q.jsx("div",{className:"rich-text-editor-brand",children:c!=="hideAgent"&&q.jsx(ce.Dropdown,{placement:"topLeft",menu:{items:s.filter(ue=>ue.isShowNew!==1).map(ue=>({key:ue.key,label:q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[ue.icon&&q.jsx("i",{className:ue.icon}),q.jsx("span",{children:ue.label})]}),onClick:()=>{o?.(ue)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:q.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[q.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),q.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})}),M&&q.jsxs(q.Fragment,{children:[q.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>J.current?.click(),title:"上传文件",children:q.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),q.jsx("input",{type:"file",ref:J,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Sr})]})]}),q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[q.jsxs("div",{className:"rte-brand-badge",children:[q.jsx("div",{className:"rte-brand-badge",children:q.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),q.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),(()=>{const ue=e.find(Te=>Te.type==="tag");if(!ue||!ue.text)return null;const pe=s.find(Te=>Te.label===ue.text);return!pe||pe.points===void 0||pe.points===null?null:q.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[q.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),q.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(pe.points)]}),pe.labelValue===2&&q.jsx("div",{className:"rte-limited-free-badge",children:q.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),q.jsx("button",{type:"button",onClick:dT,disabled:n||r||l||!W,className:"rich-text-editor-send-button",children:n||l?q.jsx("span",{className:"rte-send-spinner"}):q.jsx("i",{className:"iconfont icon-fasong"})})]})]}),Cr,cl,ul,sT,ll]})};Gu.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const Yu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",qb=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],zb=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:o})=>e&&n?q.jsxs("div",{className:"auto_load_progress",children:[r||q.jsx("img",{src:Yu,alt:"自动加载",width:14,height:14}),q.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),q.jsx(ce.Progress,{percent:n.percentage,type:"line",size:[160,8]}),q.jsx("span",{onClick:o,className:"auto_load_stop_btn",children:"停止加载"})]}):q.jsxs("div",{className:"auto_load_container",children:[q.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),q.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[q.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||q.jsx("img",{src:Yu,alt:"自动加载",width:14,height:14}),q.jsx("span",{children:"自动加载"})]}),q.jsx(ce.Select,{value:t,onChange:a,options:qb,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),Vb=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:o,onChange:u,onLoadNextPage:l,onStartAutoLoad:d,onStopLoading:p})=>{const[E,c]=L.useState(5),y=Math.ceil(r/n),h=L.useMemo(()=>a.length>=y,[a,y]),m=()=>Array.from({length:y},(T,_)=>_+1).filter(T=>!a.includes(T)).slice(0,E),g=(b,T,_)=>{const w=a.includes(b);return T==="prev"||T==="next"||T==="jump-prev"||T==="jump-next"?q.jsx("div",{className:"pageBox",children:_}):q.jsxs("div",{className:"pageBox",style:{backgroundColor:e===b?"#2563EB":"#f5f5f5",color:e===b?"#fff":w?"#171717":"#a3a3a3"},children:[b,!w&&q.jsx("span",{className:"unload_spot"})]})};return q.jsxs("div",{className:"pagination_footer",children:[q.jsxs("div",{className:"pagination_leftWrap",children:[q.jsxs("span",{className:"pagination_total",children:[q.jsx(ht.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!h&&q.jsx(zb,{loadIcon:t||void 0,autoLoading:s,batchSize:E,loadingProgress:o,disabled:!l||!d,onBatchSizeChange:c,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const b=m();d?.(b)},onStopLoad:()=>p?.()})]}),q.jsx(ce.Pagination,{current:e,pageSize:n,total:r,onChange:b=>u(b),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Wu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:o,pageSize:u,cachedPages:l,onChangePage:d,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:c,...y}=e,h=L.useRef(null),m=L.useCallback(g=>{d(g),l.includes(g)&&h.current?.scrollTo({key:`${(g-1)*u+1}`})},[l,d,u]);return q.jsxs("div",{className:"flex flex-col",children:[q.jsx(ce.Table,{ref:h,...y,columns:a,dataSource:i,pagination:!1,virtual:!0}),q.jsx(Vb,{loading:t,autoLoading:n,loadingProgress:r,current:o,pageSize:u,total:s,loadedCount:i.length,cachedPages:l,onChange:m,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:c})]})};Wu.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const ju=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[o,u]=L.useState(""),[l,d]=L.useState(0),[p,E]=L.useState(!1),[c,y]=L.useState(!1),[h,m]=L.useState(!1),g=L.useRef(void 0),b=L.useRef(void 0),T=L.useRef(e),_=L.useRef(l),w=L.useRef(c),C=L.useRef(o);L.useEffect(()=>{T.current=e,_.current=l,w.current=c,C.current=o});const O=L.useCallback((N,x)=>{let H=0;m(!0);const U=()=>{H<N.length?(u(N.slice(0,H+1)),H++,b.current=window.setTimeout(U,n)):(m(!1),x?.())};U()},[n]),A=L.useCallback(N=>{let x=C.current.length;const H=()=>{x>0?(u(C.current.slice(0,x-1)),x--,b.current=window.setTimeout(H,n/2)):N?.()};H()},[n]),S=L.useCallback(()=>{if(T.current.length===0||w.current)return;E(!0);const N=T.current[_.current];C.current?A(()=>{O(N,()=>{g.current=window.setTimeout(()=>{d(x=>(x+1)%T.current.length),E(!1)},2e3)})}):O(N,()=>{g.current=window.setTimeout(()=>{d(x=>(x+1)%T.current.length),E(!1)},2e3)})},[A,O]);L.useEffect(()=>(r&&e.length>0&&!c&&S(),()=>{g.current&&window.clearTimeout(g.current),b.current&&window.clearTimeout(b.current)}),[l,c,r,e.length,S]),L.useEffect(()=>{!p&&r&&e.length>0&&!c&&S()},[l,p,r,e.length,c,S]);const k=N=>{y(!0),g.current&&window.clearTimeout(g.current),b.current&&window.clearTimeout(b.current),E(!1),m(!1),s.onFocus?.(N)},I=N=>{y(!1),!a&&e.length>0&&(u(""),d(0)),s.onBlur?.(N)},M=N=>{i?.(N.target.value),s.onChange?.(N)},B=()=>c||a?t:o||t;return q.jsxs("div",{style:{position:"relative"},children:[q.jsx(ce.Input,{...s,value:a,onChange:M,onFocus:k,onBlur:I,placeholder:B(),style:{...s.style,position:"relative",zIndex:1}}),!c&&!a&&o&&q.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[q.jsx("span",{children:o}),h&&q.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),q.jsx("style",{children:`
59
+ `+d)}return p(),E}function r(i,s){const o=i.attributes||{},u=[];let l,d,p,E;for(E in o)if(c1.call(o,E)&&o[E]!==void 0&&o[E]!==null){const c=String(o[E]);if(E==="id")p=t.preferShortcut!==!1&&Mu.test(c)?"#"+c:a("id",c,i,s);else if(E==="class"){const x=c.split(/[\t\n\r ]+/g),h=[],m=[];let g=-1;for(;++g<x.length;)(t.preferShortcut!==!1&&Mu.test(x[g])?m:h).push(x[g]);l=h.length>0?a("class",h.join(" "),i,s):"",d=m.length>0?"."+m.join("."):""}else u.push(a(E,c,i,s))}return l&&u.unshift(l),d&&u.unshift(d),p&&u.unshift(p),u.length>0?"{"+u.join(" ")+"}":""}function a(i,s,o,u){if(t.collapseEmptyAttributes!==!1&&!s)return i;if(t.preferUnquoted&&f1.test(s))return i+"="+s;const l=t.quote||u.options.quote||'"',d=l==='"'?"'":'"',p=t.quoteSmart&&Iu(s,l)>Iu(s,d)?d:l,E=o.type==="textDirective"?[p]:[p,`
60
+ `,"\r"];return i+"="+p+l1(s,{subset:E})+p}}function m1(e){Ha.call(this,"containerDirective",e)}function g1(e){Ha.call(this,"leafDirective",e)}function E1(e){Ha.call(this,"textDirective",e)}function Ha(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function $a(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function b1(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function T1(e){this.exit(e)}function Ua(){this.data.directiveAttributes=[],this.buffer()}function qa(e){this.data.directiveAttributes.push(["id",Fa(this.sliceSerialize(e),{attribute:!0})])}function za(e){this.data.directiveAttributes.push(["class",Fa(this.sliceSerialize(e),{attribute:!0})])}function Va(e){const t=this.data.directiveAttributes;t[t.length-1][1]=Fa(this.sliceSerialize(e),{attribute:!0})}function Ga(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ya(){const e=this.data.directiveAttributes,t={};let n=-1;for(;++n<e.length;){const a=e[n];a[0]==="class"&&t.class?t.class+=" "+a[1]:t[a[0]]=a[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=t}function Wa(e){this.exit(e)}function y1(){return":"}function Bu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function x1(e){let t=0;return e.type==="containerDirective"?(ho(e,function(n,r){if(n.type==="containerDirective"){let a=r.length,i=0;for(;a--;)r[a].type==="containerDirective"&&i++;i>t&&(t=i)}}),t+=3):e.type==="leafDirective"?t=2:t=1,":".repeat(t)}function ja(e,t,n,r,a,i,s,o,u,l,d,p,E,c,x){let h,m;return g;function g(y){return e.enter(r),e.enter(a),e.consume(y),e.exit(a),b}function b(y){return y===35?(h=s,T(y)):y===46?(h=o,T(y)):x&&he(y)?me(e,b,"whitespace")(y):!x&&ve(y)?ct(e,b)(y):y===null||ne(y)||En(y)||gn(y)&&y!==45&&y!==95?I(y):(e.enter(i),e.enter(u),e.consume(y),S)}function T(y){const F=h+"Marker";return e.enter(i),e.enter(h),e.enter(F),e.consume(y),e.exit(F),C}function C(y){if(y===null||y===34||y===35||y===39||y===46||y===60||y===61||y===62||y===96||y===125||ve(y))return n(y);const F=h+"Value";return e.enter(F),e.consume(y),w}function w(y){if(y===null||y===34||y===39||y===60||y===61||y===62||y===96)return n(y);if(y===35||y===46||y===125||ve(y)){const F=h+"Value";return e.exit(F),e.exit(h),e.exit(i),b(y)}return e.consume(y),w}function S(y){return y===null||ne(y)||En(y)||gn(y)&&y!==45&&y!==46&&y!==58&&y!==95?(e.exit(u),x&&he(y)?me(e,O,"whitespace")(y):!x&&ve(y)?ct(e,O)(y):O(y)):(e.consume(y),S)}function O(y){return y===61?(e.enter(l),e.consume(y),e.exit(l),A):(e.exit(i),b(y))}function A(y){return y===null||y===60||y===61||y===62||y===96||y===125||x&&ne(y)?n(y):y===34||y===39?(e.enter(d),e.enter(E),e.consume(y),e.exit(E),m=y,k):x&&he(y)?me(e,A,"whitespace")(y):!x&&ve(y)?ct(e,A)(y):(e.enter(p),e.enter(c),e.consume(y),m=void 0,v)}function v(y){return y===null||y===34||y===39||y===60||y===61||y===62||y===96?n(y):y===125||ve(y)?(e.exit(c),e.exit(p),e.exit(i),b(y)):(e.consume(y),v)}function k(y){return y===m?(e.enter(E),e.consume(y),e.exit(E),e.exit(d),e.exit(i),R):(e.enter(p),N(y))}function N(y){return y===m?(e.exit(p),k(y)):y===null?n(y):ne(y)?x?n(y):ct(e,N)(y):(e.enter(c),e.consume(y),M)}function M(y){return y===m||y===null||ne(y)?(e.exit(c),N(y)):(e.consume(y),M)}function R(y){return y===125||ve(y)?b(y):I(y)}function I(y){return y===125?(e.enter(a),e.consume(y),e.exit(a),e.exit(r),t):n(y)}}function Xa(e,t,n,r,a,i,s){let o=0,u=0,l;return d;function d(m){return e.enter(r),e.enter(a),e.consume(m),e.exit(a),p}function p(m){return m===93?(e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):(e.enter(i),E(m))}function E(m){if(m===93&&!u)return h(m);const g=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=g),l=g,c(m)}function c(m){return m===null||o>999||m===91&&++u>32?n(m):m===93&&!u--?(e.exit("chunkText"),h(m)):ne(m)?s?n(m):(e.consume(m),e.exit("chunkText"),E):(e.consume(m),m===92?x:c)}function x(m){return m===91||m===92||m===93?(e.consume(m),o++,c):c(m)}function h(m){return e.exit(i),e.enter(a),e.consume(m),e.exit(a),e.exit(r),t}}function Ka(e,t,n,r){const a=this;return i;function i(o){return o===null||ne(o)||gn(o)||En(o)?n(o):(e.enter(r),e.consume(o),s)}function s(o){return o===null||ne(o)||En(o)||gn(o)&&o!==45&&o!==95?(e.exit(r),a.previous===45||a.previous===95?n(o):t(o)):(e.consume(o),s)}}const C1={tokenize:_1,concrete:!0},S1={tokenize:v1,partial:!0},A1={tokenize:k1,partial:!0},br={tokenize:w1,partial:!0};function _1(e,t,n){const r=this,a=r.events[r.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0,o;return u;function u(v){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(v)}function l(v){return v===58?(e.consume(v),s++,l):s<3?n(v):(e.exit("directiveContainerSequence"),Ka.call(r,e,d,n,"directiveContainerName")(v))}function d(v){return v===91?e.attempt(S1,p,p)(v):p(v)}function p(v){return v===123?e.attempt(A1,E,E)(v):E(v)}function E(v){return me(e,c,"whitespace")(v)}function c(v){return e.exit("directiveContainerFence"),v===null?O(v):ne(v)?r.interrupt?t(v):e.attempt(br,x,O)(v):n(v)}function x(v){return v===null?O(v):ne(v)?e.check(br,T,O)(v):(e.enter("directiveContainerContent"),h(v))}function h(v){return e.attempt({tokenize:A,partial:!0},S,i?me(e,m,"linePrefix",i+1):m)(v)}function m(v){return v===null?S(v):ne(v)?e.check(br,b,S)(v):b(v)}function g(v){if(v===null){const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,S(v)}return ne(v)?e.check(br,C,w)(v):(e.consume(v),g)}function b(v){const k=e.enter("chunkDocument",{contentType:"document",previous:o});return o&&(o.next=k),o=k,g(v)}function T(v){return e.enter("directiveContainerContent"),h(v)}function C(v){e.consume(v);const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,h}function w(v){const k=e.exit("chunkDocument");return r.parser.lazy[k.start.line]=!1,S(v)}function S(v){return e.exit("directiveContainerContent"),O(v)}function O(v){return e.exit("directiveContainer"),t(v)}function A(v,k,N){let M=0;return me(v,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function R(F){return v.enter("directiveContainerFence"),v.enter("directiveContainerSequence"),I(F)}function I(F){return F===58?(v.consume(F),M++,I):M<s?N(F):(v.exit("directiveContainerSequence"),me(v,y,"whitespace")(F))}function y(F){return F===null||ne(F)?(v.exit("directiveContainerFence"),k(F)):N(F)}}}function v1(e,t,n){return Xa(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function k1(e,t,n){return ja(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function w1(e,t,n){const r=this;return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const N1={tokenize:O1},I1={tokenize:D1,partial:!0},L1={tokenize:P1,partial:!0};function O1(e,t,n){const r=this;return a;function a(d){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(d),i}function i(d){return d===58?(e.consume(d),e.exit("directiveLeafSequence"),Ka.call(r,e,s,n,"directiveLeafName")):n(d)}function s(d){return d===91?e.attempt(I1,o,o)(d):o(d)}function o(d){return d===123?e.attempt(L1,u,u)(d):u(d)}function u(d){return me(e,l,"whitespace")(d)}function l(d){return d===null||ne(d)?(e.exit("directiveLeaf"),t(d)):n(d)}}function D1(e,t,n){return Xa(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function P1(e,t,n){return ja(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const M1={tokenize:H1,previous:F1},B1={tokenize:$1,partial:!0},R1={tokenize:U1,partial:!0};function F1(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function H1(e,t,n){const r=this;return a;function a(u){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(u),e.exit("directiveTextMarker"),Ka.call(r,e,i,n,"directiveTextName")}function i(u){return u===58?n(u):u===91?e.attempt(B1,s,s)(u):s(u)}function s(u){return u===123?e.attempt(R1,o,o)(u):o(u)}function o(u){return e.exit("directiveText"),t(u)}}function $1(e,t,n){return Xa(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function U1(e,t,n){return ja(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function q1(){return{text:{58:M1},flow:{58:[C1,N1]}}}function Qa(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(q1()),r.push(p1()),a.push(h1())}const Ja={...Qt,attributes:{...Qt.attributes||{},span:[...(Qt.attributes||{}).span||[],"style"],font:[...(Qt.attributes||{}).font||[],"color"]}},Za=()=>e=>{sr(e,t=>{const n=t;if(!n||n.type!=="textDirective"&&n.type!=="leafDirective"&&n.type!=="containerDirective"||n.name!=="color")return;const r=n.attributes||{},a=r.hex??r.color??r.value,i=typeof a=="string"?a.trim():"",s=/^#([0-9a-fA-F]{6})$/.test(i)?i:"#7C3AED",o=r.bold,l=`${o===!0||o==="true"||o===1||o==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},z1=e=>{const t=(e??"").trim();if(!t)return null;if(!(t.startsWith("{")&&t.endsWith("}")))return{kind:"text",text:t};try{const n=JSON.parse(t);if(!n||typeof n!="object")return{kind:"text",text:t};const r=n;return r.type==="steps"&&typeof r.title=="string"&&Array.isArray(r.images)&&Array.isArray(r.stepDescriptions)?{kind:"steps",data:n}:{kind:"text",text:t}}catch{return{kind:"text",text:t}}},V1=({config:e,files:t,debugTooltipSticky:n=!1,videoState:r})=>{const[a,i]=L.useState(null),[s,o]=L.useState(!1),u=L.useRef(null),l=L.useRef(null),d=L.useRef(null),p=200,E=200,c=L.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),l.current&&(window.clearTimeout(l.current),l.current=null),d.current!==null&&(window.cancelAnimationFrame(d.current),d.current=null)},[]),x=L.useCallback(()=>{c(),o(!0)},[c]),h=L.useCallback(N=>{if(c(),N){i(N),o(!1),d.current=window.requestAnimationFrame(()=>{d.current=null,o(!0)});return}u.current=window.setTimeout(()=>{u.current=null,o(!1),l.current=window.setTimeout(()=>{i(null),l.current=null},E)},p)},[c]);L.useEffect(()=>()=>{c()},[c]);const[m,g]=L.useState(0),b=L.useRef(null),[T,C]=L.useState(!1),w=L.useRef(new Map),[S,O]=L.useState(357),[A,v]=L.useState("bottom");return L.useEffect(()=>{g(0),C(!1),v("bottom")},[a?.key,a?.type]),L.useEffect(()=>{const N=w.current,M=new Set,R=I=>{if(!I||M.has(I)||N.has(I))return;M.add(I);const y=new window.Image;y.decoding="async",y.onload=()=>{const F=y.naturalWidth||y.width||0,U=y.naturalHeight||y.height||0;F>0&&U>0&&N.set(I,`${F} / ${U}`)},y.src=I};e.forEach(I=>{const y=I.tooltip;if(!y)return;const U=typeof y=="string"?(()=>{try{return JSON.parse(y)}catch{return null}})():y;if(!U||U.type!=="steps")return;const $=U.images;Array.isArray($)&&$.forEach(V=>{typeof V=="string"&&R(V)})})},[e]),L.useLayoutEffect(()=>{if(!s)return;if(a?.type!=="upload"&&a?.type!=="tag"&&a?.type!=="variable"){O(null);return}const N=requestAnimationFrame(()=>{const M=document.querySelector(".rte-steps-tooltip"),R=document.querySelector(".rte-steps-tooltip-title"),I=document.querySelector(".rte-steps-tooltip-step-badge");if(!M||!R||!I)return;const y=window.getComputedStyle(M),F=Number.parseFloat(y.paddingLeft)||0,U=Number.parseFloat(y.paddingRight)||0,$=Math.ceil(R.getBoundingClientRect().width||0),V=Math.ceil(I.getBoundingClientRect().width||0),Y=$+16+V+Math.ceil(F+U),J=357,P=Math.max(240,Math.floor(window.innerWidth-32));O(Math.min(Math.max(Y,J),P));const ee=a?.anchorEl;if(ee){const te=ee.getBoundingClientRect(),ae=M.getBoundingClientRect(),Q=Math.ceil(ae.height||0),re=Math.max(0,Math.floor(window.innerHeight-te.bottom)),oe=Math.max(0,Math.floor(te.top)),Oe=re<Q+12&&oe>re;v(Oe?"top":"bottom")}});return()=>cancelAnimationFrame(N)},[s,a?.key,a?.type,m,a?.anchorEl]),L.useEffect(()=>{if(!n)return;const N=M=>{M.key==="Escape"&&h(null)};return window.addEventListener("keydown",N,!0),()=>window.removeEventListener("keydown",N,!0)},[n,h]),{tooltipPortal:a?.anchorEl?(()=>{if(!document.body.contains(a.anchorEl))return null;let N="",M={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},R=!1;const I=U=>{const $=z1(U);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const V=$.data,_=Math.max(0,V.images?.length||0);if(_<=0)return{node:V.title,steps:!1};const Y=Math.min(Math.max(m,0),_-1),J=Array.isArray(V.stepDescriptions)&&V.stepDescriptions[Y]||"",P=(V.disclaimer||"").trim(),ee=Array.isArray(V.images)?V.images[Y]:void 0,te=typeof ee=="string"?w.current.get(ee):void 0;return{node:q.jsxs("div",{className:"rte-steps-tooltip",style:S?{width:`${S}px`}:void 0,onMouseEnter:()=>x(),onMouseLeave:()=>{n||h(null)},onClick:Q=>{Q.preventDefault(),Q.stopPropagation()},children:[q.jsxs("div",{className:"rte-steps-tooltip-header",children:[q.jsx("div",{className:"rte-steps-tooltip-title",children:V.title}),q.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",Y+1,"/",_]})]}),V.description?q.jsx("div",{className:"rte-steps-tooltip-desc",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:V.description})}):null,q.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:q.jsx(ce.Image.PreviewGroup,{preview:{visible:T,current:Y,onVisibleChange:Q=>C(Q),onChange:Q=>{const re=Math.min(Math.max(Q,0),_-1);g(re),b.current?.slideTo(re)}},children:q.jsx(Qi,{className:"rte-steps-tooltip-swiper",modules:[Ad,_d],navigation:!0,pagination:{clickable:!0},initialSlide:Y,onSwiper:Q=>{b.current=Q},onSlideChange:Q=>g(Q.activeIndex),children:V.images.map((Q,re)=>q.jsx(Ji,{children:q.jsx(ce.Image,{className:"rte-steps-tooltip-img",src:Q,alt:`step-${re+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{g(re),b.current?.slideTo(re),C(!0)}})},`${Q}-${re}`))},`${a.key}-${a.type}`)})}),q.jsx("div",{className:"rte-steps-tooltip-footer",children:q.jsx("div",{className:"rte-steps-tooltip-step-text",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:J})})}),P?q.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[q.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),q.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:q.jsx(Ca,{remarkPlugins:[Qa,Za],rehypePlugins:[Ba,[Ra,Ja]],components:{p:({children:Q})=>q.jsx("p",{style:{margin:0},children:Q})},children:P})})]}):null]}),steps:!0}};if(a.type==="upload"){const U=a.anchorEl.dataset.tooltip,$=I(U);if($)N=$.node,R=$.steps;else{const V=e.find(Y=>Y.type==="upload"&&Y.key===a.key),_=I(typeof V?.tooltip=="string"?V?.tooltip:V?.tooltip?JSON.stringify(V.tooltip):"");N=_?.node||"",R=_?.steps||!1}}else if(a.type==="tag"){const U=a.anchorEl.dataset.tooltip,$=I(U);N=$?.node||"",R=$?.steps||!1}else if(a.type==="upload-label")N=a.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||a.anchorEl.dataset.fileName||"";else if(a.type==="variable"){const U=a.anchorEl.dataset.tooltip,$=I(U);N=$?.node||"",R=$?.steps||!1}else if(a.type==="upload-preview"){const U=t[a.key];let $=null,V=!1;typeof U=="string"?$=U:U instanceof File&&(U.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(U.name||""))&&($=URL.createObjectURL(U),V=!0),$?(N=q.jsx("div",{className:"rte-upload-preview",children:q.jsx("img",{className:"rte-upload-preview-img",src:$,alt:"preview"})}),M={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},V&&setTimeout(()=>URL.revokeObjectURL($),1e3)):N=""}else if(a.type==="video-preview"){const U=r?.[a.key];U?.status==="success"&&U.videoUrl?(N=q.jsx("div",{className:"rte-video-preview",children:q.jsx("video",{src:U.videoUrl,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,style:{width:120,height:120,borderRadius:8,objectFit:"cover"}})}),M={background:"#fff",padding:0,borderRadius:8,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"}):N=""}if(!N)return null;R&&(M={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const y="#0A0A0A",F=A;return rn.createPortal(q.jsx(ce.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!R,align:R?{points:F==="top"?["bc","tc"]:["tc","bc"],offset:F==="top"?[0,-4]:[0,4]}:void 0,title:a.type==="upload-preview"?q.jsx("div",{onMouseEnter:()=>x(),onMouseLeave:()=>{n||h(null)},onClick:U=>{U.preventDefault(),U.stopPropagation()},children:N}):R?N:q.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:y},onMouseEnter:()=>x(),onMouseLeave:()=>{n||h(null)},onClick:U=>{U.preventDefault(),U.stopPropagation()},children:N}),open:s,placement:R?F==="top"?"top":"bottom":a.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:M,overlayClassName:"rte-tooltip-overlay",children:q.jsx("div",{style:{position:"fixed",left:`${a.anchorEl.getBoundingClientRect().left}px`,top:`${a.anchorEl.getBoundingClientRect().top-(a.type==="upload-label"?4:0)}px`,width:`${a.anchorEl.offsetWidth}px`,height:`${a.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:h}},G1=(e,t)=>{const n=t.hideButtons==="hideTagClose",r=t.lockStructure||n?"":'<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>',a=t.lockStructure?' data-locked="true"':"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}" data-tag-key="${e.key||""}"`:"";return`<span contenteditable="false" class="tag-node group"${a}${s}><span class="tag-label">${e.text}</span>${r}</span>`},Y1=(e,t)=>{const n=t?' data-locked="true" contenteditable="false"':' contenteditable="false"',a=(e.text??"").replace(/\n/g,"<br/>");return e.className?`<span data-type="text" class="${e.className}"${n}>${a}</span>`:t?`<span data-type="text"${n}>${a}</span>`:`<span data-type="text" contenteditable="false">${a}</span>`},W1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Ru=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const E=r?encodeURIComponent(r):"",c=ie(e.placeholder||""),x=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',h=qn(r||e.placeholder||""),m=i&&!r?18:0;return`<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${E}" data-placeholder="${c}" data-estimated-width="${Math.min(600,h+m)}"${x}${a}${s} class="rte-variable-host-v2"></span>`}const o=!r,u=o?"​":ie(r).replace(/\n/g,"<br/>"),l=o?"show-placeholder":"",d=i&&o?"rte-variable-with-icon":"",p=i&&o?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${d?` ${d}`:""}">${u}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${ie(i)}" ></i>`:""}</span>`},j1=(e,t)=>{const n=Ru(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${W1}${n}</span>`:n},Fu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,X1=e=>/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(e);function ei(e,t){if(e==null)return{hasFile:!1,fileName:t,uploadIcon:"<i class='iconfont icon-shangchuan1'></i>"};if(typeof e=="string"){const r=decodeURIComponent(e.split("/").pop()?.split("?")[0]||"file"),a=X1(e)?`<img class="upload-icon-img upload-icon-preview" src="${e}" alt="preview" />`:"<i class='iconfont icon-exlwenjian'></i>";return{hasFile:!0,fileName:r,uploadIcon:a}}const n=vl(e)?`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(e)}" alt="preview" />`:"<i class='iconfont icon-exlwenjian'></i>";return{hasFile:!0,fileName:e.name,uploadIcon:n}}const K1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Ke(e.tooltip),a=r?` data-tooltip="${ie(r)}"`:"",{hasFile:i,fileName:s,uploadIcon:o}=ei(t[e.key],e.text),u=i?"":"hidden",l=r&&!i?"":"hidden",d=i?"has-file":"",p=i&&s?` data-file-name="${s.replace(/"/g,"&quot;")}"`:"",E=(e.text||"").trim(),x=i&&E.length>=12?`<span ${n} contenteditable="false" class="exclusion-wrapper upload-hint">${E}</span>`:"";return{uploadHtml:`<span contenteditable="false" data-type="upload" data-key="${e.key}"${a} class="upload-chip"><span class="upload-inner-wrapper ${d}"><span class="upload-icon">${o}</span><span class="upload-label"${p}>${s||e.text}</span>${r?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${l}" data-upload-key="${e.key}" data-tooltip="${ie(r)}" ></i>`:""}<span class="file-remove-btn ${u}" title="移除文件">×</span></span></span>`,hintHtml:x}},Q1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const b=Ke(e.tooltip),T=b?` data-tooltip="${ie(b)}"`:"",C=e.minCount||1,w=e.maxCount||3;let S=0;for(let k=0;k<w;k++){const N=`${e.key}-${k}`;t[N]!=null&&(S+=1)}const O=Math.min(w,Math.max(C,S+(S<w?1:0)));let A="";for(let k=0;k<O;k++){const N=`${e.key}-${k}`,{hasFile:M,fileName:R,uploadIcon:I}=ei(t[N],e.text),y=M?"":"hidden",F=b&&!M?"":"hidden",U=M?"has-file":"",$=M&&R?` data-file-name="${R.replace(/"/g,"&quot;")}"`:"",V=` data-batch-key="${e.key}"`,_=` data-batch-index="${k}"`,Y=`<span contenteditable="false" data-type="upload" data-key="${N}"${V}${_}${T} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${U}"><span class="upload-icon">${I}</span><span class="upload-label"${$}>${R||e.text}</span>${b?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${F}" data-upload-key="${N}" data-tooltip="${ie(b)}" ></i>`:""}<span class="file-remove-btn ${y}" title="移除文件">×</span></span></span>`;A+=Y}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${Fu}<span class="rte-upload-batch-chips">${A}${n}</span></span>`:`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-upload-batch-chips">${A}${n}</span>`}const i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"",{hasFile:o,fileName:u,uploadIcon:l}=ei(t[e.key],e.text),d=o?"":"hidden",p=i&&!o?"":"hidden",E=o?"has-file":"",c=o&&u?` data-file-name="${u.replace(/"/g,"&quot;")}"`:"",x=(e.text||"").trim(),m=o&&e.showHint===!0&&x.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${x}</span>`:"",g=`<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${E}"><span class="upload-icon">${l}</span><span class="upload-label"${c}>${u||e.text}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${ie(i)}" ></i>`:""}<span class="file-remove-btn ${d}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${Fu}${g}${n}</span>${m}`:g+n+m},J1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Z1=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",o=`<span data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${J1}${o}</span>`:o},eb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,tb=(e,t,n)=>{const r=t[e.key]||"",a=typeof e.maxHeight=="number"?e.maxHeight:252,i=e.placeholder?` placeholder="${e.placeholder}"`:"",s=`<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${a}px;"${i}>${r}</textarea>`,o=`<div class="rte-textarea-wrapper" data-key="${e.key}">${s}</div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${eb}${o}</span>`:o},nb=(e,t,n)=>{const r=t[e.key]||e.text||"",a=typeof e.minHeight=="number"?e.minHeight:40,i=typeof e.maxHeight=="number"?e.maxHeight:160,s=Math.max(i,a),o=e.placeholder?` data-placeholder="${e.placeholder}"`:"",u=e.expandable!==!1,l=r,d=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${o} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,p=u?`<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>`:"",E=`<div class="rte-richtext-wrapper${u?" rte-richtext-toggleable":""}" data-key="${e.key}">${d}${p}</div>`,c=`<div class="rte-richtext-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${c}</div>`:c},rb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,ab=(e,t)=>{const n=`${e.key}__url`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ke(e.tooltip),E=p?` data-tooltip="${ie(p)}" data-variable-key="${e.key||""}"`:"",c=p&&o?"rte-variable-with-icon":"",x=p&&o?"":"hidden",h=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ie(e.placeholder||"")}"${d}${E} class="variable-chip rte-report-url ${l}${c?` ${c}`:""}">${u}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${x}" data-variable-key="${e.key}" data-tooltip="${ie(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${rb}${h}</span>`:h},ib=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,sb=(e,t)=>{const n=`${e.key}__name`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ke(e.tooltip),E=p?` data-tooltip="${ie(p)}" data-variable-key="${e.key||""}"`:"",c=p&&o?"rte-variable-with-icon":"",x=p&&o?"":"hidden",h=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${ie(e.placeholder||"")}"${d}${E} class="variable-chip rte-markdown-name ${l}${c?` ${c}`:""}">${u}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${x}" data-variable-key="${e.key}" data-tooltip="${ie(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ib}${h}</span>`:h},ob=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,ub=(e,t)=>{const n=e.sourceTextKey||`${e.key}__sourceText`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",o=!s,u=o?"​":s,l=o?"show-placeholder":"",d=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=e.sourceTextKey?` data-source-text-key="${ie(e.sourceTextKey)}"`:"",E=Ke(e.tooltip),c=E?` data-tooltip="${ie(E)}" data-variable-key="${e.key||""}"`:"",x=E&&o?"rte-variable-with-icon":"",h=E&&o?"":"hidden",m=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${ie(e.placeholder||"")}"${d}${p}${c} class="variable-chip rte-markdown-input ${l}${x?` ${x}`:""}">${u}${E?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${h}" data-variable-key="${e.key}" data-tooltip="${ie(E)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ob}${m}</span>`:m},lb=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,o=typeof e.maxHeight=="number"?e.maxHeight:240,u=Math.max(o,s),l=e.placeholder?` data-placeholder="${ie(e.placeholder)}"`:"",d=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${d}</div>`,E=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`,c=`<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${c}</div>`:c},cb=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,o=typeof e.maxHeight=="number"?e.maxHeight:240,u=Math.max(o,s),l=e.placeholder?` data-placeholder="${ie(e.placeholder)}"`:"",d=i,E=typeof d=="string"&&d.startsWith("请补充:")?' data-is-placeholder="true"':"",c=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="markdown-module" data-module-index="${n}" class="rte-richtext rte-markdown-module"${l}${E} style="min-height:${s}px;max-height:${u}px;overflow:auto;">${d}</div>`,x=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${c}</div>`,h=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${x}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},db=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,fb=(e,t)=>{const n=t[e.key]||"",r=e.placeholder?` data-placeholder="${e.placeholder}"`:"",a=e.limitRange?` data-limit-range="${e.limitRange}"`:"",i=e.disableFuture?' data-disable-future="true"':"",s=`<div data-type="datepicker" data-key="${e.key}" data-value="${n}" class="rte-datepicker-host"${r}${a}${i}></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${db}${s}</span>`:s},pb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,hb=(e,t)=>{const n=t[e.key]||(typeof e.defaultNumber=="number"?String(e.defaultNumber):""),r=typeof e.min=="number"?` min="${e.min}"`:"",a=typeof e.max=="number"?` max="${e.max}"`:"",i=e.placeholder?ie(e.placeholder):"",s=i?` placeholder="${i}"`:"",o=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",u=n||e.placeholder||"",l=qn(u),d=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${ie(n)}" style="width: ${l}px;"${r}${a}${s}${o} />`,E=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${d}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${pb}${E}</span>`:E},mb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,gb=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const u=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Ke(e.tooltip);let d="";for(let p=0;p<i;p++){const E=`${e.key}_${p}`,c=t[E]||"",x=!c,h=x?"​":ie(c).replace(/\n/g,"<br/>"),m=x?"show-placeholder":"",g=l&&x?"rte-variable-with-icon":"",b=l?` data-tooltip="${ie(l)}" data-variable-key="${e.key||""}"`:"",T=l&&x?"":"hidden",C=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",w=`<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder||""}"${C}${b} class="variable-chip ${m}${g?` ${g}`:""}">${h}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${T}" data-variable-key="${e.key}" data-tooltip="${ie(l)}" ></i>`:""}</span>`;p===0?d+=`<span ${u} class="exclusion-wrapper required-upload-group required-multi-first">${mb}${w}</span>`:d+=w}return d}const s=Ke(e.tooltip);let o="";for(let u=0;u<i;u++){const l=`${e.key}_${u}`,d=t[l]||"",p=!d,E=p?"​":ie(d).replace(/\n/g,"<br/>"),c=p?"show-placeholder":"",x=s&&p?"rte-variable-with-icon":"",h=s?` data-tooltip="${ie(s)}" data-variable-key="${e.key||""}"`:"",m=s&&p?"":"hidden",g=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",b=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${u}" data-placeholder="${e.placeholder||""}"${g}${h} class="variable-chip ${c}${x?` ${x}`:""}">${E}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${m}" data-variable-key="${e.key}" data-tooltip="${ie(s)}" ></i>`:""}</span>`;o+=b}return o},ti=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,Eb=(e,t)=>{const n=e.key,r=t[n],a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"";let o;if(r?.status==="loading"){const l=typeof r.progress=="number"?Math.min(Math.max(r.progress,0),100):0,d="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Crect fill='%23999' width='1' height='1'/%3E%3C/svg%3E",p=2*Math.PI*6.5,E=p*(1-l/100),c=`<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${p}" stroke-dashoffset="${E}" transform="rotate(-90 8 8)"/></svg>`;o=`<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${d}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${c}</span><span class="video-label">解析中...</span></span>`}else if(r?.status==="success"&&r.videoUrl){const l=r.fileName||"视频",d='<svg class="video-play-icon" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="rgba(0,0,0,0.5)"/><polygon points="6.5,4.5 6.5,11.5 12,8" fill="#fff"/></svg>';o=`<span class="video-inner-wrapper video-url-inner has-video">${r.thumbnail?`<span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(r.thumbnail)}" alt="thumbnail" />${d}</span>`:`<span class="video-thumbnail-wrapper"><span class="video-thumbnail video-thumbnail-placeholder"><i class="iconfont icon-shipin" style="font-size:20px;color:#8c8c8c;"></i></span>${d}</span>`}<span class="video-label" data-file-name="${ie(l)}">${ie(l)}</span><span class="video-remove-btn" title="移除视频">×</span></span>`}else{const l=e.placeholder||"请粘贴想要分析的抖音视频链接",d=i?"rte-variable-with-icon":"",p=i?"":"hidden",E=`<span contenteditable="true" data-type="variable" data-key="${n}" data-node-type="video-url" data-placeholder="${ie(l)}"${a}${s} class="variable-chip rte-video-url show-placeholder${d?` ${d}`:""}">​${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${n}" data-tooltip="${ie(i)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${E}</span>`:E}const u=`<span contenteditable="false" data-type="video-url" data-key="${n}"${s}${a} class="video-chip">${o}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${u}</span>`:u},bb=(e,t)=>{const n=e.key,r=t[n],a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ke(e.tooltip),s=i?` data-tooltip="${ie(i)}"`:"";let o;if(r?.status==="loading"){const l=typeof r.progress=="number"?Math.min(Math.max(r.progress,0),100):0,d=r.fileName||"上传中...",p=r.thumbnail||"",E=2*Math.PI*6.5,c=E*(1-l/100),x=`<svg class="video-upload-progress-ring" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="6.5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1.5"/><circle cx="8" cy="8" r="6.5" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="${E}" stroke-dashoffset="${c}" transform="rotate(-90 8 8)"/></svg>`;o=`<span class="video-inner-wrapper video-upload-inner video-uploading"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(p)}" alt="thumbnail" /><span class="video-thumbnail-overlay"></span>${x}</span><span class="video-label">${ie(d)}</span></span>`}else if(r?.status==="success"&&r.thumbnail&&r.videoUrl){const l=r.fileName||"视频文件";o=`<span class="video-inner-wrapper video-upload-inner has-video"><span class="video-thumbnail-wrapper"><img class="video-thumbnail" src="${ie(r.thumbnail)}" alt="thumbnail" /><svg class="video-play-icon" viewBox="0 0 16 16" width="16" height="16"><circle cx="8" cy="8" r="8" fill="rgba(0,0,0,0.5)"/><polygon points="6.5,4.5 6.5,11.5 12,8" fill="#fff"/></svg></span><span class="video-label" data-file-name="${ie(l)}">${ie(l)}</span><span class="video-remove-btn" title="移除视频">×</span></span>`}else{const l=e.text||"请上传想要分析的视频文件",d=i?"":"hidden";o=`<span class="video-inner-wrapper video-upload-inner"><i class="iconfont icon-shangchuan1" style="font-size:16px;"></i><span class="video-label">${ie(l)}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${d}" data-upload-key="${n}" data-tooltip="${ie(i)}" ></i>`:""}</span>`}const u=`<span contenteditable="false" data-type="video-upload" data-key="${n}"${s}${a} class="video-chip">${o}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${ti}${u}</span>`:u},Tb=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,yb=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",o=`<span data-type="searchable-select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-searchable-select-host"></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${Tb}${o}</span>`:o};function xb(e,t,n,r,a,i={},s,o,u){if(!e.current)return;const l=/[;;,,。.!!??::、]/,d=h=>{const m=(h??"").trim();return m.length===1&&l.test(m)},p=h=>{const m=h??"",g=m.match(new RegExp(`^\\s*(${l.source})`));if(!g)return null;const b=g[1],T=m.replace(new RegExp(`^\\s*${l.source}`),"");return{punct:b,rest:T}},E=h=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${h}</span>`,c=[];let x=0;for(;x<t.length;){const h=t[x],m=x+1<t.length?t[x+1]:null;let g=!1;if(h.type==="text"&&(h.text?.includes("icon-bitian")||h.className==="rte-text-required")&&m){const A=m.type==="upload"&&m.exclusionGroup==="fileInput"&&h.exclusionGroup==="fileInput"&&h.exclusionGroup===m.exclusionGroup,v=m.type==="variable"&&m.exclusionGroup==="textInput"&&h.exclusionGroup==="textInput"&&h.exclusionGroup===m.exclusionGroup;if(A){const N=`<span ${h.exclusionGroup?`data-group="${h.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,M="</span>";let R="";h.className?R=`<span class="${h.className}">${h.text??""}</span>`:R=h.text??"";const I=m,{uploadHtml:y,hintHtml:F}=K1(I,n);c.push(N+R+y+M+F),x+=2;continue}if(v){const N=`<span ${h.exclusionGroup?`data-group="${h.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,M="</span>";let R="";h.className?R=`<span class="${h.className}">${h.text??""}</span>`:R=h.text??"";const y=Ru(m,a);c.push(N+R+y+M),x+=2;continue}}const T=h.exclusionGroup?`data-group="${h.exclusionGroup}"`:"",C=h.exclusionGroup?`<span ${T} class="exclusion-wrapper">`:"",w=h.exclusionGroup?"</span>":"";let S="";if(h.type==="tag")S=G1(h,{lockStructure:r,hideButtons:s});else if(h.type==="text")S=Y1(h,r);else if(h.type==="variable"&&h.key)S=j1(h,a);else if(h.type==="report-url"&&h.key)S=ab(h,a);else if(h.type==="markdown-name"&&h.key)S=sb(h,a);else if(h.type==="markdown"&&h.key)S=ub(h,a);else if(h.type==="upload"&&h.key){const A=!!m&&m.type==="text"&&!m.className&&!m.exclusionGroup&&d(m.text),v=A?(m.text??"").trim():"",k=v?E(v):"";A&&(g=!0),S=Q1(h,n,k)}else h.type==="select"&&h.key?S=Z1(h,a):h.type==="textarea"&&h.key?S=tb(h,a):h.type==="richtext"&&h.key?S=nb(h,a):h.type==="report-module"&&h.key?S=lb(h,a):h.type==="markdown-module"&&h.key?S=cb(h,a):h.type==="datepicker"&&h.key?S=fb(h,a):h.type==="number-input"&&h.key?S=hb(h,a):h.type==="multi-variable"&&h.key?S=gb(h,a,i):h.type==="video-url"&&h.key?S=Eb(h,u||{}):h.type==="video-upload"&&h.key?S=bb(h,u||{}):h.type==="searchable-select"&&h.key&&(S=yb(h,a));const O=C+S+w;if(h.type==="text"&&!h.className&&!h.exclusionGroup){if(d(h.text)&&c.length>0){const v=c[c.length-1],k=(h.text??"").trim();c[c.length-1]=`<span class="rte-inline-group">${v}${E(k)}</span>`,x++;continue}const A=p(h.text);if(A&&c.length>0){const v=c[c.length-1];c[c.length-1]=`<span class="rte-inline-group">${v}${E(A.punct)}</span>`;const k=A.rest;if(k){const N=k.replace(/\n/g,"<br/>");c.push(`<span data-type="text" contenteditable="false">${N}</span>`)}x++;continue}}c.push(O),x+=g?2:1}e.current&&(e.current.innerHTML=c.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(m=>{if(m.dataset.variableRender==="antd-textarea")return;if(m.innerText.replace(/\n/g,"").replace(/\u200B/g,""))m.classList.remove("show-placeholder");else{const T=Array.from(m.childNodes),C=m.querySelector(".variable-info-icon");T.forEach(S=>{if(S.nodeType===Node.TEXT_NODE){m.removeChild(S);return}S.nodeType===Node.ELEMENT_NODE&&S.tagName==="BR"&&m.removeChild(S)});const w=document.createTextNode("​");C&&C.parentNode===m?m.insertBefore(w,C):m.firstChild?m.insertBefore(w,m.firstChild):m.appendChild(w),m.classList.add("show-placeholder")}})},0))}function Cb(e,t,n,r,a={},i,s,o,u,l,d){const p=L.useRef(new Set),E=L.useRef(""),c=L.useRef(!1),x=L.useRef(""),h=g=>{if(!g||Object.keys(g).length===0)return"";try{return JSON.stringify(g)}catch{return""}},m=L.useCallback(()=>{if(!e.current)return;if(t.length===0){e.current.innerHTML="";return}const g=t.filter(O=>O.key&&O.type!=="report-module"&&O.type!=="markdown-module").map(O=>`${O.type}:${O.key}`).join("|");E.current!==g&&(E.current=g,p.current=new Set,c.current=!0);const b=c.current;let T={};const C=new Set;e.current&&!b&&e.current.querySelectorAll('[data-type="variable"]').forEach(A=>{const v=A.dataset.key;if(!v)return;let k="";if(A.dataset.variableRender==="antd-textarea"){const N=(A.getAttribute("data-value")||"").trim();try{k=N?decodeURIComponent(N).replace(/\r\n/g,`
61
+ `).trim():""}catch{k=N.trim()}}else{const N=(A.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
62
+ `);k=N.replace(/\n/g,"").trim().length>0?N:""}if(k)p.current.add(v);else if(p.current.has(v)){C.add(v);const N=A.getAttribute("data-node-type");N==="report-url"?C.add(`${v}__url`):N==="markdown-name"&&C.add(`${v}__name`)}});const S=e.current.__tempVariableValues;if(S?(T=S,setTimeout(()=>{if(e.current){const O=e.current;O.__tempVariableValues===S&&delete O.__tempVariableValues}},100)):b||(e.current.querySelectorAll('[data-type="variable"]').forEach(I=>{const y=I.dataset.key;if(y){const U=(()=>{if(I.dataset.variableRender==="antd-textarea"){const _=(I.getAttribute("data-value")||"").trim();if(!_)return"";try{return decodeURIComponent(_).replace(/\r\n/g,`
63
+ `).trim()}catch{return _.trim()}}const $=(I.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
64
+ `);return $.replace(/\n/g,"").trim().length>0?$:""})();U&&(I.getAttribute("data-node-type")==="report-url"?T[`${y}__url`]=U:I.getAttribute("data-node-type")==="markdown-name"?T[`${y}__name`]=U:T[y]=U)}}),e.current.querySelectorAll('[data-type="select"]').forEach(I=>{const y=I.dataset.key;if(y){const F=(I.getAttribute("data-value")||"").trim();F&&(T[y]=F)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(I=>{const y=I.dataset.key;if(y){const F=(I.getAttribute("data-value")||"").trim();F&&(T[y]=F)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(I=>{const y=I.dataset.key;if(y){const F=I.value.replace(/[\u200B]/g,"").trim();F&&(T[y]=F)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(I=>{const y=I.dataset.key;if(y){const F=I.getAttribute("data-node-type")||"",U=F==="report-module"||F==="markdown-module",$=U?(I.innerHTML||"").replace(/[\u200B]/g,"").trim():(I.textContent||"").replace(/[\u200B]/g,"").trim();if(U){const V=Number.parseInt(I.getAttribute("data-module-index")||"0",10);T[`${y}__module_${Number.isFinite(V)?V:0}`]=$}else $&&(T[y]=$)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(I=>{const y=I.dataset.key;if(y){const F=(I.getAttribute("data-value")||"").trim();F&&(T[y]=F)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(I=>{const y=I.dataset.key;if(y){const F=(I.value||"").trim();F&&(T[y]=F)}})),l&&Object.keys(l).length>0){const O=new Set(t.filter(N=>N.type==="upload"&&N.key).map(N=>N.key)),A={};b||Object.entries(l).forEach(([N,M])=>{if(!Array.isArray(M))return;let R=0;for(let y=0;y<M.length;y++)`${N}_${y}`in T&&R++;let I=-1;for(let y=0;y<M.length;y++)p.current.has(`${N}_${y}`)&&(I=y);if(I>=R&&R<M.length)for(let y=R;y<M.length;y++)C.add(`${N}_${y}`)}),Object.entries(l).forEach(([N,M])=>{O.has(N)||(Array.isArray(M)?M.forEach((R,I)=>{R!=null&&String(R).trim()!==""&&(A[`${N}_${I}`]=String(R))}):M!=null&&String(M).trim()!==""&&(t.find(I=>I.key===N&&I.type==="report-url")?A[`${N}__url`]=String(M):A[N]=String(M)))});const k=h(l)!==x.current;Object.entries(A).forEach(([N,M])=>{const R=N in T;!C.has(N)&&(!R||k)&&(T[N]=M)})}if(x.current=h(l),xb(e,t,n,r,T,a,o,u,d),b&&(c.current=!1),setTimeout(()=>{zn(e)},0),i?.current){const{key:O,offset:A}=i.current;setTimeout(()=>{if(!e.current)return;const v=e.current.querySelector(`[data-type="variable"][data-key="${O}"]`);if(v){if(v.dataset.variableRender==="antd-textarea"){const k=v.querySelector("textarea");if(k){k.focus();try{const N=k.value?.length??0;k.setSelectionRange(Math.min(A,N),Math.min(A,N))}catch{}i.current=null;return}}try{const k=document.createRange(),N=document.createTreeWalker(v,NodeFilter.SHOW_TEXT,null);let M=0,R=null,I=0;for(;N.nextNode();){const y=N.currentNode,F=y.textContent?.length||0;if(M+F>=A){R=y,I=A-M;break}M+=F}if(R){k.setStart(R,Math.min(I,R.textContent?.length||0)),k.collapse(!0);const y=window.getSelection();y&&(y.removeAllRanges(),y.addRange(k),v.focus())}else{k.selectNodeContents(v),k.collapse(!1);const y=window.getSelection();y&&(y.removeAllRanges(),y.addRange(k),v.focus())}}catch{const k=document.createRange();k.selectNodeContents(v),k.collapse(!1);const N=window.getSelection();N&&(N.removeAllRanges(),N.addRange(k),v.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,o,u,l,d]);L.useEffect(()=>{m()},[m])}function Sb(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=l=>typeof l=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(l):l.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(l.name||""),o=l=>{const d=l.target?.closest(".upload-info-icon");if(d&&d.classList.contains("upload-info-icon")){const E=d.dataset.uploadKey;if(E){const c=d.dataset.tooltip||"";let x=!1;try{const m=JSON.parse(c);m&&m.type==="steps"&&Array.isArray(m.images)&&(x=!0)}catch{}if(x){const h=d.closest('[data-type="upload"], [data-type="video-upload"]');r({key:E,anchorEl:h||d,type:"upload"})}else{const h=d.closest('[data-type="upload"], [data-type="video-upload"]');r({key:E,anchorEl:h||d,type:"upload"})}}return}const p=l.target?.closest('[data-type="upload"]');if(p){const E=p.dataset.key;if(E){const c=n[E];c&&s(c)&&r({key:E,anchorEl:p,type:"upload-preview"})}}},u=l=>{if(a)return;const d=l.target?.closest(".upload-info-icon"),p=l.relatedTarget;if(p?.closest?.(".rte-tooltip-overlay"))return;if(d&&d.classList.contains("upload-info-icon")){const c=d.closest('[data-type="upload"], [data-type="video-upload"]');if(p&&c&&c.contains(p))return;if(!p||!i.contains(p))r(null);else{const x=p.closest('[data-type="upload"], [data-type="video-upload"]');(!x||x!==c)&&r(null)}return}const E=l.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(E){const c=p;if(c?.closest?.(".rte-tooltip-overlay")||c&&E.contains(c))return;r(null)}};return i.addEventListener("mouseover",o,!0),i.addEventListener("mouseout",u,!0),()=>{i.removeEventListener("mouseover",o,!0),i.removeEventListener("mouseout",u,!0)}},[t,n,e,r,a])}function Ab(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=d=>{if(r==="hideTagClose")return;const p=d.currentTarget,E=p.dataset.tooltip,c=p.dataset.tagKey||"";E&&n({key:c,anchorEl:p,type:"tag"})},o=d=>{a||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let u;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.addEventListener("mouseenter",s),p.addEventListener("mouseleave",o)})};return u=requestAnimationFrame(()=>{u=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(u),i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.removeEventListener("mouseenter",s),p.removeEventListener("mouseleave",o)})}},[t,e,n,r,a])}function _b(e,t,n,r){L.useEffect(()=>{const a=e.current;if(!a)return;const i=o=>{const u=o.target?.closest(".variable-info-icon");if(u&&u.classList.contains("variable-info-icon")){const d=u.dataset.variableKey;d&&n({key:d,anchorEl:u,type:"variable"});return}const l=o.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const d=l.dataset.key;d&&n({key:d,anchorEl:l,type:"variable"})}},s=o=>{if(r)return;const u=o.target,l=o.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const d=u?.closest?.(".variable-info-icon"),p=u?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(d||p){if(!l||!a.contains(l)){n(null);return}const E=!!l.closest?.(".variable-info-icon"),c=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!E&&!c&&n(null)}};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[t,e,n,r])}function vb(e,t,n,r,a){L.useEffect(()=>{const i=e.current;if(!i)return;const s=p=>typeof p=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(p):p.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name||""),o=p=>{const E=p.currentTarget,c=E.dataset.fileName,x=E.closest('[data-type="upload"]'),h=x?.dataset.key||"",m=h?n[h]:null;if(m&&s(m)){r({key:h,anchorEl:x||E,type:"upload-preview"});return}c&&r({key:h,anchorEl:x||E,type:"upload-label"})},u=p=>{a||p.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const d=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.addEventListener("mouseenter",o),E.addEventListener("mouseleave",u)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(d)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.removeEventListener("mouseenter",o),E.removeEventListener("mouseleave",u)})}},[t,n,e,r,a])}function kb(e,t,n,r,a,i){L.useEffect(()=>{const s=setTimeout(()=>{wr(e,t,n,a),Nr(e,t,n,r,a)},0);return()=>clearTimeout(s)},[n,t,e,r,a,i])}function wb(e,t){const n=L.useRef(0),r=L.useRef(0);L.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=b=>b instanceof HTMLElement?!!(b.closest(".rte-datepicker-wrapper")||b.closest(".rte-datepicker-host")||b.closest(".ant-picker")||b.closest(".ant-picker-dropdown")):!1,o=b=>b instanceof HTMLElement?!!(b.closest(".rte-select-wrapper")||b.closest(".rte-select-host")||b.closest(".ant-select")||b.closest(".ant-select-dropdown")):!1,u=b=>{a=!0,s(b.target)&&(n.current=Date.now()),o(b.target)&&(r.current=Date.now())},l=()=>{a=!1,i=Date.now()};let d=!1,p=0;const E=()=>{d=!0},c=()=>{d=!1,p=Date.now()},x=()=>{p=Date.now()},h=b=>{s(b.target)&&(n.current=Date.now()),o(b.target)&&(r.current=Date.now())},m=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800)return;const b=document.activeElement;if(b&&(b.closest(".rte-datepicker-wrapper")||b.closest(".rte-datepicker-host")||b.closest(".ant-picker-dropdown")||b.tagName==="INPUT"&&b.closest(".ant-picker")||b.closest(".rte-select-wrapper")||b.closest(".rte-select-host")||b.closest(".ant-select")||b.closest(".ant-select-dropdown"))||!e.current)return;const T=window.getSelection();if(!T||T.rangeCount===0||t.current||a||d||Date.now()-p<500)return;const C=T.getRangeAt(0);if(!C.collapsed)return e.current.contains(C.commonAncestorContainer),void 0;const w=T.anchorNode;if(!w||!e.current.contains(w))return;let S=!1,O=!1;if(w.nodeType===Node.ELEMENT_NODE){const v=w;(v.closest('[data-type="datepicker"]')||v.closest(".rte-datepicker-wrapper")||v.closest(".rte-datepicker-host"))&&(S=!0),(v.closest('[data-type="select"]')||v.closest(".rte-select-wrapper")||v.closest(".rte-select-host"))&&(O=!0)}else if(w.parentElement){const v=w.parentElement;(v.closest('[data-type="datepicker"]')||v.closest(".rte-datepicker-wrapper")||v.closest(".rte-datepicker-host"))&&(S=!0),(v.closest('[data-type="select"]')||v.closest(".rte-select-wrapper")||v.closest(".rte-select-host"))&&(O=!0)}if(S||O)return;let A=null;if(w.nodeType===Node.ELEMENT_NODE?A=w.closest('[data-type="variable"]'):w.nodeType===Node.TEXT_NODE&&w.parentElement&&(A=w.parentElement.closest('[data-type="variable"]')),!A){if(Date.now()-i>500)return;const v=e.current.querySelectorAll('[data-type="variable"]');if(v.length>0){let k=null;for(const N of Array.from(v))if(N.style.display!=="none"){k=N;break}if(!k&&v.length>0&&(k=v[0]),k){const N=document.createRange();N.selectNodeContents(k),N.collapse(!1),T.removeAllRanges(),T.addRange(N),k.focus()}else T.removeAllRanges()}else T.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",E),g.addEventListener("compositionend",c),g.addEventListener("input",x)),document.addEventListener("mousedown",u),document.addEventListener("mouseup",l),document.addEventListener("focusin",h),document.addEventListener("selectionchange",m),()=>{g&&(g.removeEventListener("compositionstart",E),g.removeEventListener("compositionend",c),g.removeEventListener("input",x)),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",h),document.removeEventListener("selectionchange",m)}},[e,t])}var Tr={exports:{}},Nb=Tr.exports,Hu;function $u(){return Hu||(Hu=1,function(e,t){(function(n,r){e.exports=r()})(Nb,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",o="minute",u="hour",l="day",d="week",p="month",E="quarter",c="year",x="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,b={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(I){var y=["th","st","nd","rd"],F=I%100;return"["+I+(y[(F-20)%10]||y[F]||y[0])+"]"}},T=function(I,y,F){var U=String(I);return!U||U.length>=y?I:""+Array(y+1-U.length).join(F)+I},C={s:T,z:function(I){var y=-I.utcOffset(),F=Math.abs(y),U=Math.floor(F/60),$=F%60;return(y<=0?"+":"-")+T(U,2,"0")+":"+T($,2,"0")},m:function I(y,F){if(y.date()<F.date())return-I(F,y);var U=12*(F.year()-y.year())+(F.month()-y.month()),$=y.clone().add(U,p),V=F-$<0,_=y.clone().add(U+(V?-1:1),p);return+(-(U+(F-$)/(V?$-_:_-$))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:p,y:c,w:d,d:l,D:x,h:u,m:o,s,ms:i,Q:E}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},w="en",S={};S[w]=b;var O="$isDayjsObject",A=function(I){return I instanceof M||!(!I||!I[O])},v=function I(y,F,U){var $;if(!y)return w;if(typeof y=="string"){var V=y.toLowerCase();S[V]&&($=V),F&&(S[V]=F,$=V);var _=y.split("-");if(!$&&_.length>1)return I(_[0])}else{var Y=y.name;S[Y]=y,$=Y}return!U&&$&&(w=$),$||!U&&w},k=function(I,y){if(A(I))return I.clone();var F=typeof y=="object"?y:{};return F.date=I,F.args=arguments,new M(F)},N=C;N.l=v,N.i=A,N.w=function(I,y){return k(I,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var M=function(){function I(F){this.$L=v(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[O]=!0}var y=I.prototype;return y.parse=function(F){this.$d=function(U){var $=U.date,V=U.utc;if($===null)return new Date(NaN);if(N.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var _=$.match(m);if(_){var Y=_[2]-1||0,J=(_[7]||"0").substring(0,3);return V?new Date(Date.UTC(_[1],Y,_[3]||1,_[4]||0,_[5]||0,_[6]||0,J)):new Date(_[1],Y,_[3]||1,_[4]||0,_[5]||0,_[6]||0,J)}}return new Date($)}(F),this.init()},y.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},y.$utils=function(){return N},y.isValid=function(){return this.$d.toString()!==h},y.isSame=function(F,U){var $=k(F);return this.startOf(U)<=$&&$<=this.endOf(U)},y.isAfter=function(F,U){return k(F)<this.startOf(U)},y.isBefore=function(F,U){return this.endOf(U)<k(F)},y.$g=function(F,U,$){return N.u(F)?this[U]:this.set($,F)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(F,U){var $=this,V=!!N.u(U)||U,_=N.p(F),Y=function(oe,ge){var Oe=N.w($.$u?Date.UTC($.$y,ge,oe):new Date($.$y,ge,oe),$);return V?Oe:Oe.endOf(l)},J=function(oe,ge){return N.w($.toDate()[oe].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ge)),$)},P=this.$W,ee=this.$M,te=this.$D,ae="set"+(this.$u?"UTC":"");switch(_){case c:return V?Y(1,0):Y(31,11);case p:return V?Y(1,ee):Y(0,ee+1);case d:var Q=this.$locale().weekStart||0,re=(P<Q?P+7:P)-Q;return Y(V?te-re:te+(6-re),ee);case l:case x:return J(ae+"Hours",0);case u:return J(ae+"Minutes",1);case o:return J(ae+"Seconds",2);case s:return J(ae+"Milliseconds",3);default:return this.clone()}},y.endOf=function(F){return this.startOf(F,!1)},y.$set=function(F,U){var $,V=N.p(F),_="set"+(this.$u?"UTC":""),Y=($={},$[l]=_+"Date",$[x]=_+"Date",$[p]=_+"Month",$[c]=_+"FullYear",$[u]=_+"Hours",$[o]=_+"Minutes",$[s]=_+"Seconds",$[i]=_+"Milliseconds",$)[V],J=V===l?this.$D+(U-this.$W):U;if(V===p||V===c){var P=this.clone().set(x,1);P.$d[Y](J),P.init(),this.$d=P.set(x,Math.min(this.$D,P.daysInMonth())).$d}else Y&&this.$d[Y](J);return this.init(),this},y.set=function(F,U){return this.clone().$set(F,U)},y.get=function(F){return this[N.p(F)]()},y.add=function(F,U){var $,V=this;F=Number(F);var _=N.p(U),Y=function(ee){var te=k(V);return N.w(te.date(te.date()+Math.round(ee*F)),V)};if(_===p)return this.set(p,this.$M+F);if(_===c)return this.set(c,this.$y+F);if(_===l)return Y(1);if(_===d)return Y(7);var J=($={},$[o]=r,$[u]=a,$[s]=n,$)[_]||1,P=this.$d.getTime()+F*J;return N.w(P,this)},y.subtract=function(F,U){return this.add(-1*F,U)},y.format=function(F){var U=this,$=this.$locale();if(!this.isValid())return $.invalidDate||h;var V=F||"YYYY-MM-DDTHH:mm:ssZ",_=N.z(this),Y=this.$H,J=this.$m,P=this.$M,ee=$.weekdays,te=$.months,ae=$.meridiem,Q=function(ge,Oe,Pe,ot){return ge&&(ge[Oe]||ge(U,V))||Pe[Oe].slice(0,ot)},re=function(ge){return N.s(Y%12||12,ge,"0")},oe=ae||function(ge,Oe,Pe){var ot=ge<12?"AM":"PM";return Pe?ot.toLowerCase():ot};return V.replace(g,function(ge,Oe){return Oe||function(Pe){switch(Pe){case"YY":return String(U.$y).slice(-2);case"YYYY":return N.s(U.$y,4,"0");case"M":return P+1;case"MM":return N.s(P+1,2,"0");case"MMM":return Q($.monthsShort,P,te,3);case"MMMM":return Q(te,P);case"D":return U.$D;case"DD":return N.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Q($.weekdaysMin,U.$W,ee,2);case"ddd":return Q($.weekdaysShort,U.$W,ee,3);case"dddd":return ee[U.$W];case"H":return String(Y);case"HH":return N.s(Y,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return oe(Y,J,!0);case"A":return oe(Y,J,!1);case"m":return String(J);case"mm":return N.s(J,2,"0");case"s":return String(U.$s);case"ss":return N.s(U.$s,2,"0");case"SSS":return N.s(U.$ms,3,"0");case"Z":return _}return null}(ge)||_.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(F,U,$){var V,_=this,Y=N.p(U),J=k(F),P=(J.utcOffset()-this.utcOffset())*r,ee=this-J,te=function(){return N.m(_,J)};switch(Y){case c:V=te()/12;break;case p:V=te();break;case E:V=te()/3;break;case d:V=(ee-P)/6048e5;break;case l:V=(ee-P)/864e5;break;case u:V=ee/a;break;case o:V=ee/r;break;case s:V=ee/n;break;default:V=ee}return $?V:N.a(V)},y.daysInMonth=function(){return this.endOf(p).$D},y.$locale=function(){return S[this.$L]},y.locale=function(F,U){if(!F)return this.$L;var $=this.clone(),V=v(F,U,!0);return V&&($.$L=V),$},y.clone=function(){return N.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},I}(),R=M.prototype;return k.prototype=R,[["$ms",i],["$s",s],["$m",o],["$H",u],["$W",l],["$M",p],["$y",c],["$D",x]].forEach(function(I){R[I[1]]=function(y){return this.$g(y,I[0],I[1])}}),k.extend=function(I,y){return I.$i||(I(y,M,k),I.$i=!0),k},k.locale=v,k.isDayjs=A,k.unix=function(I){return k(1e3*I)},k.en=S[w],k.Ls=S,k.p={},k})}(Tr)),Tr.exports}var Ib=$u();const yr=Yr(Ib);var xr={exports:{}},Lb=xr.exports,Uu;function Ob(){return Uu||(Uu=1,function(e,t){(function(n,r){e.exports=r($u())})(Lb,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var a=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,o){return o==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,o){var u=100*s+o;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(xr)),xr.exports}Ob();function Pn(e){"@babel/helpers - typeof";return Pn=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},Pn(e)}function Db(e,t){if(Pn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pb(e){var t=Db(e,"string");return Pn(t)=="symbol"?t:t+""}function Mb(e,t,n){return(t=Pb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qu(Object(n),!0).forEach(function(r){Mb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Bb={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Rb=zu(zu({},Bb),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const Fb={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Vu={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Rb),timePickerLocale:Object.assign({},Fb)};Vu.lang.ok="确定",yr.locale("zh-cn");const{RangePicker:Hb}=ce.DatePicker,$b=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.value,a=e.dataset.placeholder,i=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,s=e.dataset.disableFuture==="true",[o,u]=L.useState(()=>{if(!r)return null;const h=r.split(",");return h.length===2&&h[0]&&h[1]?[yr(h[0]),yr(h[1])]:null}),[l,d]=L.useState(null),p=h=>h?s&&h.isAfter(yr(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(h.diff(l[0],"days"))>i:!1,E=h=>{d(h)},c=h=>{if(u(h),d(null),h&&h[0]&&h[1]){const m=`${h[0].format("YYYY-MM-DD")},${h[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",m),t(n,m)}else e.setAttribute("data-value",""),t(n,"")},x=h=>{d(h?o:null)};return rn.createPortal(q.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:q.jsx(Hb,{value:o,disabledDate:p,onCalendarChange:E,onChange:c,onOpenChange:x,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:Vu,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},Ub=e=>{const[t,n]=L.useState([]);return L.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),o=[];s.forEach(u=>{const l=u.getAttribute("data-key");l&&o.push(q.jsx($b,{host:u,onChange:()=>{if(e.current){const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)}}},`datepicker-${l}`))}),n(o)};a();const i=new MutationObserver(s=>{let o=!1;for(const u of s)if(u.type==="childList"){let l=!1;if(u.addedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),u.removedNodes.forEach(d=>{if(d.nodeType===Node.ELEMENT_NODE){const p=d;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){o=!0;break}}o&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},Gu=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:o,onAgentExit:u,loading:l=!1,placeholder:d,border:p,background:E="transparent",hideButtons:c,maxHeight:x,minHeight:h,editorMinHeight:m,editorPadding:g,footerPadding:b,collapsed:T=!1,reportAnalyze:C,markdownAnalyze:w,markdownNameAnalyze:S,onCollapsedChange:O,collapseTransitionMs:A=260,debugTooltipSticky:v=!1,nodeValues:k,onFilesChange:N,showFooterUpload:M=!0,videoUrlParse:R,videoUpload:I})=>{const[y,F]=ce.message.useMessage(),U=L.useRef(null),$=L.useRef(null),V=L.useRef(null),_=L.useRef(null),Y=L.useRef(null),J=L.useRef(null),P=L.useRef("");if(!P.current){const ue=Math.random().toString(36).slice(2,8);P.current=`rte_${ue}`}const[ee,te]=L.useState({});L.useEffect(()=>{N?.(ee)},[ee,N]);const[ae,Q]=L.useState(null),[re,oe]=L.useState(null),[ge,Oe]=L.useState(null),[Pe,ot]=L.useState({}),Zt=L.useRef(null),en=L.useRef(null),{tooltipPortal:Cr,setPopoverVisible:ft}=V1({config:e,files:ee,debugTooltipSticky:v,videoState:Pe}),{handleFileChange:Sr,handleRemoveFile:Ar}=kl({config:e,messageApi:y,activeBatchKey:re,activeFileKey:ae,activeBatchStartIndex:ge,setActiveFileKey:Q,setActiveBatchKey:oe,setActiveBatchStartIndex:Oe,setFiles:te}),tn=L.useRef(!1),ri=L.useRef(null),{handleMouseDown:ai,handleMouseMove:ii,handleMouseUp:si,handleDoubleClick:oi}=Wl({lockStructure:i,onAgentExit:u,editorRef:_,setPopoverVisible:ft,isDraggingRef:tn,mouseDownPosRef:ri}),[W,Z]=L.useState(!1),se=L.useRef(null),[fe,be]=L.useState(!0),je=L.useRef(0),[ut,et]=L.useState(58),[Dt,Pt]=L.useState(58),[He,St]=L.useState(!1),[ze,ui]=L.useState(null),Rn=L.useRef(!1),Fn=L.useRef(!1),lt=L.useRef(null),[li,ci]=L.useState({}),_r=L.useRef(()=>{}),[Mt,vr]=L.useState({}),el=L.useRef(()=>{}),tT=L.useRef({}),di=L.useRef(Mt);L.useEffect(()=>{di.current=Mt},[Mt]);const[Bt,fi]=L.useState({}),tl=L.useRef(()=>{}),nl=L.useRef(Bt);L.useEffect(()=>{nl.current=Bt},[Bt]);const[Rt,Hn]=L.useState(()=>{const ue={};return e.forEach(pe=>{pe.type==="multi-variable"&&pe.key&&(ue[pe.key]=1)}),ue});Bl({config:e,editorRef:_,files:ee,setFiles:te,multiVariableCounts:Rt,setMultiVariableCounts:Hn,reportAnalyzeState:li,setReportAnalyzeState:ci,markdownAnalyzeState:Mt,setMarkdownAnalyzeState:vr,markdownNameAnalyzeState:Bt,setMarkdownNameAnalyzeState:fi,nodeValues:k});const rl=L.useRef(k);if(k!==rl.current&&(rl.current=k,k)){const ue={};let pe=!1;e.forEach(Te=>{if(Te.type==="multi-variable"&&Te.key){const Xe=k[Te.key];if(Array.isArray(Xe)&&Xe.length>0){const nn=Te.maxCount??9,Un=Math.min(Xe.length+1,nn);Rt[Te.key]!==Un&&(ue[Te.key]=Un,pe=!0)}}}),pe&&Hn(Te=>({...Te,...ue}))}const _e=Ul({config:e,reportAnalyzeState:li,markdownAnalyzeState:Mt,markdownNameAnalyzeState:Bt}),{handleReportUrlBlur:nT,handleMarkdownBlur:rT,handleMarkdownNameBlur:aT}=Fl({reportAnalyze:C,markdownAnalyze:w,markdownNameAnalyze:S,reportAnalyzeState:li,setReportAnalyzeState:ci,markdownAnalyzeState:Mt,setMarkdownAnalyzeState:vr,markdownNameAnalyzeState:Bt,setMarkdownNameAnalyzeState:fi,editorRef:_,reportAnalyzeRef:_r,markdownAnalyzeRef:el,markdownNameAnalyzeRef:tl,markdownAnalyzeStateRef:di,markdownNameAnalyzeStateRef:nl});Sl(_,nT,[_e]),Al(_,aT,[_e]),_l(_,rT,[_e]),Cl(_,[_e]),Cb(_,_e,ee,i,Rt,se,void 0,c,void 0,k,Pe);const pi=L.useRef(new Set),al=L.useRef(_e),il=L.useRef(k);(al.current!==_e||il.current!==k)&&(al.current=_e,il.current=k,pi.current=new Set),L.useEffect(()=>{if(!k||!_e||_e.length===0)return;const ue=_e.filter(ye=>ye.type==="upload"&&ye.key);if(ue.length===0)return;const pe={},Te=(ye,Ce)=>{Ce&&(Ce instanceof File?pe[ye]=Ce:typeof Ce=="string"&&Ce.trim()&&(pe[ye]=Ce.trim()))};for(const ye of ue){const Ce=ye.key;if(pi.current.has(Ce))continue;const Ae=k[Ce],Re=typeof ye.maxCount=="number"&&ye.maxCount>1;if(Array.isArray(Ae)&&Ae.length>0){Re?Ae.forEach((De,Ve)=>Te(`${Ce}-${Ve}`,De)):Te(Ce,Ae[0]);continue}if(Ae&&!Array.isArray(Ae)){Te(Ce,Ae);continue}if(Re)for(let De=0;De<ye.maxCount;De++){const Ve=`${Ce}-${De}`,At=k[Ve];if(!At)break;Te(Ve,At)}}if(Object.keys(pe).length===0)return;for(const ye of ue)k[ye.key]!==void 0&&pi.current.add(ye.key);te(ye=>{const Ce={...ye};let Ae=!1;for(const Re of ue){const De=Re.key;if(k[De]===void 0)continue;if(typeof Re.maxCount=="number"&&Re.maxCount>1)for(let At=0;At<Re.maxCount;At++){const gi=`${De}-${At}`;!pe[gi]&&ye[gi]&&(Ce[gi]=null,Ae=!0)}}for(const[Re,De]of Object.entries(pe))ye[Re]!==De&&(Ce[Re]=De,Ae=!0);return Ae?Ce:ye});const Xe=Object.entries(pe).filter(([,ye])=>typeof ye=="string");if(Xe.length===0)return;const nn=async ye=>{const Ce=ye.split("/").pop()?.split("?")[0]||"file",Ae=decodeURIComponent(Ce),Re=async De=>{const Ve=await De.blob();return new File([Ve],Ae,{type:Ve.type||"application/octet-stream"})};try{const De=`/api/image-proxy?url=${encodeURIComponent(ye)}`,Ve=await fetch(De);if(Ve.ok)return Re(Ve)}catch{}return null};let Un=!1;return Promise.all(Xe.map(async([ye,Ce])=>{const Ae=await nn(Ce);return Ae?{key:ye,file:Ae}:null})).then(ye=>{if(Un)return;const Ce={};for(const Ae of ye)Ae&&(Ce[Ae.key]=Ae.file);Object.keys(Ce).length>0&&te(Ae=>{const Re={...Ae};let De=!1;for(const[Ve,At]of Object.entries(Ce))typeof Re[Ve]=="string"&&(Re[Ve]=At,De=!0);return De?Re:Ae})}),()=>{Un=!0}},[k,_e]);const hi=L.useRef(new Set),sl=L.useRef(""),ol=(e||[]).filter(ue=>ue.key&&ue.type!=="report-module"&&ue.type!=="markdown-module").map(ue=>`${ue.type}:${ue.key}`).join("|");sl.current!==ol&&(sl.current=ol,hi.current=new Set),L.useEffect(()=>{if(!k||!e||e.length===0)return;const ue=e.filter(pe=>pe.type==="report-url"&&pe.key);if(ue.length!==0)for(const pe of ue){const Te=pe.key;if(hi.current.has(Te))continue;const Xe=k[Te]??k[`${Te}__url`];if(!Xe||typeof Xe=="string"&&!Xe.trim())continue;const nn=Array.isArray(Xe)?Xe[0]:String(Xe);nn&&(hi.current.add(Te),setTimeout(()=>{_r.current(Te,nn)},100))}},[k,e,_r]),Sb(_,_e,ee,ft,v),Ab(_,_e,ft,c,v),vb(_,_e,ee,ft,v),_b(_,_e,ft,v),kb(_,_e,ee,Z,Pe,k),Ll(_,R,Pe,ot,[_e]);const iT=Ol(I,ot);Dl(_,Pe,ft,v),wb(_,tn);const ul=hl(_),sT=gl(_),ll=xl(_);L.useEffect(()=>{if(!_.current)return;_.current.querySelectorAll(".rte-richtext-toggle").forEach(pe=>{const Te=pe.getAttribute("data-expanded")==="true";pe.innerHTML=Te?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[_e,_]);const cl=Ub(_),{measureExpandedContentHeight:$n}=Hl({collapsed:T,collapseTransitionMs:A,contentRef:$,contentBodyRef:V,editorRef:_,debugIdRef:P,setCollapsedContentMaxHeightPx:et,setExpandedContentMaxHeightPx:Pt,setIsCollapseAnimating:St,effectiveConfig:_e,files:ee,multiVariableCounts:Rt,selectPortalsLength:ul.length,datePickerPortalsLength:cl.length,variablePortalsLength:ll.length}),oT=()=>{if(T)return;const ue=V.current;if(!ue)return;const pe=Math.ceil(ue.getBoundingClientRect().height||0);pe>0&&ui(pe),Rn.current=!0,Fn.current=!1,lt.current&&(window.clearTimeout(lt.current),lt.current=null)};L.useEffect(()=>{const ue=()=>{Rn.current&&(Fn.current=!0,lt.current&&window.clearTimeout(lt.current),lt.current=window.setTimeout(()=>{lt.current=null,Rn.current=!1,Fn.current=!1,ui(null),window.requestAnimationFrame(()=>$n())},450))};return window.addEventListener("focus",ue),()=>window.removeEventListener("focus",ue)},[$n]),L.useEffect(()=>{!Rn.current||!Fn.current||(lt.current&&(window.clearTimeout(lt.current),lt.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{ui(null),$n(),Rn.current=!1,Fn.current=!1})}))},[ee,$n]),$l({config:e,editorRef:_,setIsEmpty:be,setIsFormValid:Z});const uT=Vl({disabled:r,collapsed:T,onCollapsedChange:O,config:e,lockStructure:i,editorRef:_,containerRef:U,fileInputRef:Y,onBeforeFilePickerOpen:oT,files:ee,setFiles:te,handleRemoveFile:Ar,setActiveBatchKey:oe,setActiveBatchStartIndex:Oe,setActiveFileKey:Q,isDraggingRef:tn,richtextPrevScrollTopRef:je,videoState:Pe,setVideoState:ot,videoFileInputRef:Zt,activeVideoKeyRef:en}),mi=Gl({config:e,editorRef:_,setIsEmpty:be,setIsFormValid:Z,setReportAnalyzeState:ci,setMarkdownAnalyzeState:vr,setMarkdownNameAnalyzeState:fi,collapsed:T,measureExpandedContentHeight:$n,effectiveConfig:_e,files:ee,multiVariableCounts:Rt,setMultiVariableCounts:Hn,savedCursorRef:se,videoState:Pe}),lT=jl({disabled:r,config:e,multiVariableCounts:Rt,setMultiVariableCounts:Hn,editorRef:_,handleInput:mi,markdownAnalyzeRef:el,reportAnalyzeRef:_r,markdownNameAnalyzeRef:tl,markdownAnalyzeStateRef:di,markdownRawTextRef:tT,setMarkdownAnalyzeState:vr});zl({config:e,effectiveConfig:_e,files:ee,editorRef:_,setIsFormValid:Z,multiVariableCounts:Rt,setMultiVariableCounts:Hn,videoState:Pe});const cT=Yl({disabled:r,lockStructure:i,config:e,editorRef:_,handleInput:mi}),dT=Xl({config:e,files:ee,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:W,editorRef:_,markdownAnalyzeState:Mt,markdownNameAnalyzeState:Bt,videoState:Pe}),fT={...a?{width:typeof a=="number"?`${a}px`:a}:{},...p?{border:p}:{},...E?{background:E}:{},...x?{maxHeight:typeof x=="number"?`${x}px`:x}:{},...h?{minHeight:typeof h=="number"?`${h}px`:h}:{},...x?{"--rte-richtext-fullscreen-height":typeof x=="number"?`${x}px`:x}:{},...m?{"--rte-editor-min-height":typeof m=="number"?`${m}px`:m}:{},...g?{"--rte-editor-padding":g}:{},...b?{"--rte-footer-padding":b}:{}},pT=typeof A=="number"&&Number.isFinite(A)&&A>=0?A:260,hT={overflow:"hidden"},mT=ze!=null?`${ze}px`:T?`${ut}px`:`${Math.max(Dt,ut)}px`,gT=ze!=null||T||He?"hidden":"auto",ET=ze!=null?"none":`max-height ${pT}ms cubic-bezier(0.4, 0, 0.2, 1)`,bT={maxHeight:mT,minHeight:T?0:void 0,overflow:gT,overscrollBehavior:"contain",transition:ET,willChange:"max-height"};return q.jsxs("div",{className:"rich-text-editor",style:fT,"data-disabled":r,ref:U,children:[F,q.jsx("div",{className:"rich-text-editor-content",ref:$,style:hT,children:q.jsxs("div",{ref:V,className:"rich-text-editor-content-body",style:bT,children:[q.jsx("div",{ref:_,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${fe&&d?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":d,onMouseDown:ai,onMouseMove:ii,onMouseUp:si,onClick:uT,onDoubleClick:oi,onInput:mi,onKeyDown:cT,onPaste:lT}),q.jsx("input",{type:"file",ref:Y,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:Sr}),q.jsx("input",{type:"file",ref:Zt,className:"rte-file-input",accept:"video/*",onChange:ue=>{const pe=ue.target.files?.[0],Te=en.current;pe&&pe.size>1024*1024*1024?y.warning("视频文件不能超过1GB"):pe&&Te&&iT(Te,pe),en.current=null,Zt.current&&(Zt.current.value="")}})]})}),q.jsxs("div",{className:"rich-text-editor-footer",children:[q.jsxs("div",{className:"rich-text-editor-footer-left",children:[q.jsx("div",{className:"rich-text-editor-brand",children:c!=="hideAgent"&&q.jsx(ce.Dropdown,{placement:"topLeft",menu:{items:s.filter(ue=>ue.isShowNew!==1).map(ue=>({key:ue.key,label:q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[ue.icon&&q.jsx("i",{className:ue.icon}),q.jsx("span",{children:ue.label})]}),onClick:()=>{o?.(ue)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:q.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[q.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),q.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})}),M&&q.jsxs(q.Fragment,{children:[q.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>J.current?.click(),title:"上传文件",children:q.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),q.jsx("input",{type:"file",ref:J,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Sr})]})]}),q.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[q.jsxs("div",{className:"rte-brand-badge",children:[q.jsx("div",{className:"rte-brand-badge",children:q.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),q.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),(()=>{const ue=e.find(Te=>Te.type==="tag");if(!ue||!ue.text)return null;const pe=s.find(Te=>Te.label===ue.text);return!pe||pe.points===void 0||pe.points===null?null:q.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[q.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),q.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(pe.points)]}),pe.labelValue===2&&q.jsx("div",{className:"rte-limited-free-badge",children:q.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),q.jsx("button",{type:"button",onClick:dT,disabled:n||r||l||!W,className:"rich-text-editor-send-button",children:n||l?q.jsx("span",{className:"rte-send-spinner"}):q.jsx("i",{className:"iconfont icon-fasong"})})]})]}),Cr,cl,ul,sT,ll]})};Gu.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const Yu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",qb=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],zb=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:o})=>e&&n?q.jsxs("div",{className:"auto_load_progress",children:[r||q.jsx("img",{src:Yu,alt:"自动加载",width:14,height:14}),q.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),q.jsx(ce.Progress,{percent:n.percentage,type:"line",size:[160,8]}),q.jsx("span",{onClick:o,className:"auto_load_stop_btn",children:"停止加载"})]}):q.jsxs("div",{className:"auto_load_container",children:[q.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),q.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[q.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||q.jsx("img",{src:Yu,alt:"自动加载",width:14,height:14}),q.jsx("span",{children:"自动加载"})]}),q.jsx(ce.Select,{value:t,onChange:a,options:qb,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),Vb=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:o,onChange:u,onLoadNextPage:l,onStartAutoLoad:d,onStopLoading:p})=>{const[E,c]=L.useState(5),x=Math.ceil(r/n),h=L.useMemo(()=>a.length>=x,[a,x]),m=()=>Array.from({length:x},(T,C)=>C+1).filter(T=>!a.includes(T)).slice(0,E),g=(b,T,C)=>{const w=a.includes(b);return T==="prev"||T==="next"||T==="jump-prev"||T==="jump-next"?q.jsx("div",{className:"pageBox",children:C}):q.jsxs("div",{className:"pageBox",style:{backgroundColor:e===b?"#2563EB":"#f5f5f5",color:e===b?"#fff":w?"#171717":"#a3a3a3"},children:[b,!w&&q.jsx("span",{className:"unload_spot"})]})};return q.jsxs("div",{className:"pagination_footer",children:[q.jsxs("div",{className:"pagination_leftWrap",children:[q.jsxs("span",{className:"pagination_total",children:[q.jsx(ht.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!h&&q.jsx(zb,{loadIcon:t||void 0,autoLoading:s,batchSize:E,loadingProgress:o,disabled:!l||!d,onBatchSizeChange:c,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const b=m();d?.(b)},onStopLoad:()=>p?.()})]}),q.jsx(ce.Pagination,{current:e,pageSize:n,total:r,onChange:b=>u(b),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Wu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:o,pageSize:u,cachedPages:l,onChangePage:d,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:c,...x}=e,h=L.useRef(null),m=L.useCallback(g=>{d(g),l.includes(g)&&h.current?.scrollTo({key:`${(g-1)*u+1}`})},[l,d,u]);return q.jsxs("div",{className:"flex flex-col",children:[q.jsx(ce.Table,{ref:h,...x,columns:a,dataSource:i,pagination:!1,virtual:!0}),q.jsx(Vb,{loading:t,autoLoading:n,loadingProgress:r,current:o,pageSize:u,total:s,loadedCount:i.length,cachedPages:l,onChange:m,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:c})]})};Wu.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const ju=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[o,u]=L.useState(""),[l,d]=L.useState(0),[p,E]=L.useState(!1),[c,x]=L.useState(!1),[h,m]=L.useState(!1),g=L.useRef(void 0),b=L.useRef(void 0),T=L.useRef(e),C=L.useRef(l),w=L.useRef(c),S=L.useRef(o);L.useEffect(()=>{T.current=e,C.current=l,w.current=c,S.current=o});const O=L.useCallback((I,y)=>{let F=0;m(!0);const U=()=>{F<I.length?(u(I.slice(0,F+1)),F++,b.current=window.setTimeout(U,n)):(m(!1),y?.())};U()},[n]),A=L.useCallback(I=>{let y=S.current.length;const F=()=>{y>0?(u(S.current.slice(0,y-1)),y--,b.current=window.setTimeout(F,n/2)):I?.()};F()},[n]),v=L.useCallback(()=>{if(T.current.length===0||w.current)return;E(!0);const I=T.current[C.current];S.current?A(()=>{O(I,()=>{g.current=window.setTimeout(()=>{d(y=>(y+1)%T.current.length),E(!1)},2e3)})}):O(I,()=>{g.current=window.setTimeout(()=>{d(y=>(y+1)%T.current.length),E(!1)},2e3)})},[A,O]);L.useEffect(()=>(r&&e.length>0&&!c&&v(),()=>{g.current&&window.clearTimeout(g.current),b.current&&window.clearTimeout(b.current)}),[l,c,r,e.length,v]),L.useEffect(()=>{!p&&r&&e.length>0&&!c&&v()},[l,p,r,e.length,c,v]);const k=I=>{x(!0),g.current&&window.clearTimeout(g.current),b.current&&window.clearTimeout(b.current),E(!1),m(!1),s.onFocus?.(I)},N=I=>{x(!1),!a&&e.length>0&&(u(""),d(0)),s.onBlur?.(I)},M=I=>{i?.(I.target.value),s.onChange?.(I)},R=()=>c||a?t:o||t;return q.jsxs("div",{style:{position:"relative"},children:[q.jsx(ce.Input,{...s,value:a,onChange:M,onFocus:k,onBlur:N,placeholder:R(),style:{...s.style,position:"relative",zIndex:1}}),!c&&!a&&o&&q.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[q.jsx("span",{children:o}),h&&q.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),q.jsx("style",{children:`
65
65
  @keyframes blink {
66
66
  0%, 50% { opacity: 1; }
67
67
  51%, 100% { opacity: 0; }
68
68
  }
69
- `})]})};ju.__docgenInfo={displayName:"DynamicInput",description:"动态文案输入框组件,支持流式文字动画效果",props:{texts:{name:"texts",required:!0,description:"动态展示的文案数组",type:{name:"string[]",raw:"string[]"}},placeholder:{name:"placeholder",required:!1,description:"输入框占位符",type:{name:"string",raw:"string"},defaultValue:{value:'"请输入内容"'}},animationSpeed:{name:"animationSpeed",required:!1,description:"动画速度(毫秒)",type:{name:"number",raw:"number"},defaultValue:{value:"100"}},autoPlay:{name:"autoPlay",required:!1,description:"是否自动播放动画",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},value:{name:"value",required:!1,description:"输入框值",type:{name:"string",raw:"string"}},onChange:{name:"onChange",required:!1,description:"输入框变化回调",type:{name:"function",raw:"(value: string) => void"}}}};const Xu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:o=500,showCount:u=!0,submitText:l="发送",disabled:d=!1,rows:p=4,style:E,...c})=>{const[y,h]=L.useState(""),[m,g]=L.useState(0),[b,T]=L.useState(!1),[_,w]=L.useState(!1),[C,O]=L.useState(!1),[A,S]=L.useState(a||""),k=L.useRef(void 0),I=L.useRef(void 0),M=L.useRef(e),B=L.useRef(m),N=L.useRef(_),x=L.useRef(y),H=L.useRef(null);L.useEffect(()=>{M.current=e,B.current=m,N.current=_,x.current=y});const U=L.useCallback((Q,re)=>{let oe=0;O(!0);const ge=()=>{oe<Q.length?(h(Q.slice(0,oe+1)),oe++,I.current=window.setTimeout(ge,n)):(O(!1),re?.())};ge()},[n]),$=L.useCallback(Q=>{let re=x.current.length;const oe=()=>{re>0?(h(x.current.slice(0,re-1)),re--,I.current=window.setTimeout(oe,n/2)):Q?.()};oe()},[n]),V=L.useCallback(()=>{if(M.current.length===0||N.current)return;T(!0);const Q=M.current[B.current];x.current?$(()=>{U(Q,()=>{k.current=window.setTimeout(()=>{g(re=>(re+1)%M.current.length),T(!1)},2e3)})}):U(Q,()=>{k.current=window.setTimeout(()=>{g(re=>(re+1)%M.current.length),T(!1)},2e3)})},[$,U]);L.useEffect(()=>(r&&e.length>0&&!_&&V(),()=>{k.current&&window.clearTimeout(k.current),I.current&&window.clearTimeout(I.current)}),[m,_,r,e.length,V]),L.useEffect(()=>{!b&&r&&e.length>0&&!_&&V()},[m,b,r,e.length,_,V]);const v=Q=>{w(!0),k.current&&window.clearTimeout(k.current),I.current&&window.clearTimeout(I.current),T(!1),O(!1),c.onFocus?.(Q)},Y=Q=>{w(!1),!a&&e.length>0&&(h(""),g(0)),c.onBlur?.(Q)},J=Q=>{const re=Q.target.value;o&&re.length>o||(i?i(re):S(re),c.onChange?.(Q))},P=()=>{const Q=i?a:A;Q.trim()&&!d&&(s?.(Q),i||S(""))},ee=Q=>{(Q.ctrlKey||Q.metaKey)&&Q.key==="Enter"&&(Q.preventDefault(),P()),c.onKeyDown?.(Q)},te=i?a:A,ae=d||!te.trim()||(o?te.length>o:!1);return q.jsxs("div",{style:{position:"relative",...E},children:[q.jsxs("div",{style:{position:"relative"},children:[q.jsx("textarea",{ref:H,value:i?a:A,onChange:J,onFocus:Q=>{Q.target.style.borderColor="#1890ff",Q.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.2)",v(Q)},onBlur:Q=>{Q.target.style.borderColor="#d9d9d9",Q.target.style.boxShadow="none",Y(Q)},onKeyDown:ee,placeholder:_||te?t:"",maxLength:o,rows:p,disabled:d,style:{width:"100%",minHeight:`${p*24+16}px`,padding:"8px 60px 8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"14px",lineHeight:"1.5",fontFamily:"inherit",resize:"vertical",outline:"none",transition:"border-color 0.3s, box-shadow 0.3s",backgroundColor:"#fff",...c.style},...c}),!_&&!te&&y&&q.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"flex-start",paddingTop:8,paddingLeft:12,paddingRight:12,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit",lineHeight:"1.5"},children:[q.jsx("span",{children:y}),C&&q.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),q.jsx("div",{style:{position:"absolute",bottom:8,right:8,zIndex:3},children:q.jsx(ce.Button,{type:"primary",size:"small",icon:q.jsx(ht.SendOutlined,{}),onClick:P,disabled:ae,style:{borderRadius:6,minWidth:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:l})})]}),u&&q.jsxs("div",{style:{marginTop:4,textAlign:"right",fontSize:"12px",color:"#999"},children:[te.length,"/",o]}),q.jsx("style",{children:`
69
+ `})]})};ju.__docgenInfo={displayName:"DynamicInput",description:"动态文案输入框组件,支持流式文字动画效果",props:{texts:{name:"texts",required:!0,description:"动态展示的文案数组",type:{name:"string[]",raw:"string[]"}},placeholder:{name:"placeholder",required:!1,description:"输入框占位符",type:{name:"string",raw:"string"},defaultValue:{value:'"请输入内容"'}},animationSpeed:{name:"animationSpeed",required:!1,description:"动画速度(毫秒)",type:{name:"number",raw:"number"},defaultValue:{value:"100"}},autoPlay:{name:"autoPlay",required:!1,description:"是否自动播放动画",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},value:{name:"value",required:!1,description:"输入框值",type:{name:"string",raw:"string"}},onChange:{name:"onChange",required:!1,description:"输入框变化回调",type:{name:"function",raw:"(value: string) => void"}}}};const Xu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:o=500,showCount:u=!0,submitText:l="发送",disabled:d=!1,rows:p=4,style:E,...c})=>{const[x,h]=L.useState(""),[m,g]=L.useState(0),[b,T]=L.useState(!1),[C,w]=L.useState(!1),[S,O]=L.useState(!1),[A,v]=L.useState(a||""),k=L.useRef(void 0),N=L.useRef(void 0),M=L.useRef(e),R=L.useRef(m),I=L.useRef(C),y=L.useRef(x),F=L.useRef(null);L.useEffect(()=>{M.current=e,R.current=m,I.current=C,y.current=x});const U=L.useCallback((Q,re)=>{let oe=0;O(!0);const ge=()=>{oe<Q.length?(h(Q.slice(0,oe+1)),oe++,N.current=window.setTimeout(ge,n)):(O(!1),re?.())};ge()},[n]),$=L.useCallback(Q=>{let re=y.current.length;const oe=()=>{re>0?(h(y.current.slice(0,re-1)),re--,N.current=window.setTimeout(oe,n/2)):Q?.()};oe()},[n]),V=L.useCallback(()=>{if(M.current.length===0||I.current)return;T(!0);const Q=M.current[R.current];y.current?$(()=>{U(Q,()=>{k.current=window.setTimeout(()=>{g(re=>(re+1)%M.current.length),T(!1)},2e3)})}):U(Q,()=>{k.current=window.setTimeout(()=>{g(re=>(re+1)%M.current.length),T(!1)},2e3)})},[$,U]);L.useEffect(()=>(r&&e.length>0&&!C&&V(),()=>{k.current&&window.clearTimeout(k.current),N.current&&window.clearTimeout(N.current)}),[m,C,r,e.length,V]),L.useEffect(()=>{!b&&r&&e.length>0&&!C&&V()},[m,b,r,e.length,C,V]);const _=Q=>{w(!0),k.current&&window.clearTimeout(k.current),N.current&&window.clearTimeout(N.current),T(!1),O(!1),c.onFocus?.(Q)},Y=Q=>{w(!1),!a&&e.length>0&&(h(""),g(0)),c.onBlur?.(Q)},J=Q=>{const re=Q.target.value;o&&re.length>o||(i?i(re):v(re),c.onChange?.(Q))},P=()=>{const Q=i?a:A;Q.trim()&&!d&&(s?.(Q),i||v(""))},ee=Q=>{(Q.ctrlKey||Q.metaKey)&&Q.key==="Enter"&&(Q.preventDefault(),P()),c.onKeyDown?.(Q)},te=i?a:A,ae=d||!te.trim()||(o?te.length>o:!1);return q.jsxs("div",{style:{position:"relative",...E},children:[q.jsxs("div",{style:{position:"relative"},children:[q.jsx("textarea",{ref:F,value:i?a:A,onChange:J,onFocus:Q=>{Q.target.style.borderColor="#1890ff",Q.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.2)",_(Q)},onBlur:Q=>{Q.target.style.borderColor="#d9d9d9",Q.target.style.boxShadow="none",Y(Q)},onKeyDown:ee,placeholder:C||te?t:"",maxLength:o,rows:p,disabled:d,style:{width:"100%",minHeight:`${p*24+16}px`,padding:"8px 60px 8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"14px",lineHeight:"1.5",fontFamily:"inherit",resize:"vertical",outline:"none",transition:"border-color 0.3s, box-shadow 0.3s",backgroundColor:"#fff",...c.style},...c}),!C&&!te&&x&&q.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"flex-start",paddingTop:8,paddingLeft:12,paddingRight:12,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit",lineHeight:"1.5"},children:[q.jsx("span",{children:x}),S&&q.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),q.jsx("div",{style:{position:"absolute",bottom:8,right:8,zIndex:3},children:q.jsx(ce.Button,{type:"primary",size:"small",icon:q.jsx(ht.SendOutlined,{}),onClick:P,disabled:ae,style:{borderRadius:6,minWidth:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:l})})]}),u&&q.jsxs("div",{style:{marginTop:4,textAlign:"right",fontSize:"12px",color:"#999"},children:[te.length,"/",o]}),q.jsx("style",{children:`
70
70
  @keyframes blink {
71
71
  0%, 50% { opacity: 1; }
72
72
  51%, 100% { opacity: 0; }
73
73
  }
74
- `})]})};Xu.__docgenInfo={displayName:"DynamicTextArea",description:"动态文案文本域组件,支持流式文字动画效果",props:{texts:{name:"texts",required:!0,description:"动态展示的文案数组",type:{name:"string[]",raw:"string[]"}},placeholder:{name:"placeholder",required:!1,description:"输入框占位符",type:{name:"string",raw:"string"},defaultValue:{value:'"请输入内容"'}},animationSpeed:{name:"animationSpeed",required:!1,description:"动画速度(毫秒)",type:{name:"number",raw:"number"},defaultValue:{value:"100"}},autoPlay:{name:"autoPlay",required:!1,description:"是否自动播放动画",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},value:{name:"value",required:!1,description:"输入框值",type:{name:"string",raw:"string"}},onChange:{name:"onChange",required:!1,description:"输入框变化回调",type:{name:"function",raw:"(value: string) => void"}},onSubmit:{name:"onSubmit",required:!1,description:"提交回调",type:{name:"function",raw:"(value: string) => void"}},maxLength:{name:"maxLength",required:!1,description:"最大输入字数",type:{name:"number",raw:"number"},defaultValue:{value:"500"}},showCount:{name:"showCount",required:!1,description:"是否显示字数统计",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},submitText:{name:"submitText",required:!1,description:"提交按钮文本",type:{name:"string",raw:"string"},defaultValue:{value:'"发送"'}},disabled:{name:"disabled",required:!1,description:"是否禁用提交按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},rows:{name:"rows",required:!1,description:"文本域行数",type:{name:"number",raw:"number"},defaultValue:{value:"4"}}}};const ni=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:o=!0,onClick:u,onVideoLoaded:l,onVideoPlay:d,onVideoPause:p,onVideoEnded:E,className:c,style:y,...h})=>{const m=L.useRef(null),[g,b]=L.useState(!1),[T,_]=L.useState(!1),[w,C]=L.useState(!1),O=L.useCallback(()=>{m.current&&(m.current.play(),b(!0),d?.())},[d]),A=L.useCallback(()=>{m.current&&(m.current.pause(),b(!1),p?.())},[p]),S=L.useCallback(U=>{U.stopPropagation(),g?A():O()},[g,O,A]),k=L.useCallback(()=>{_(!0),o&&!g&&O()},[o,g,O]),I=L.useCallback(()=>{_(!1),o&&g&&A()},[o,g,A]),M=L.useCallback(()=>{C(!0),l?.()},[l]),B=L.useCallback(()=>{b(!0),d?.()},[d]),N=L.useCallback(()=>{b(!1),p?.()},[p]),x=L.useCallback(()=>{b(!1),E?.()},[E]),H=L.useCallback(U=>{u?.(U)},[u]);return q.jsx(ce.Card,{...h,className:`video-card ${c||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:u?"pointer":"default",border:"none",borderRadius:0,...y},bordered:!1,onMouseEnter:k,onMouseLeave:I,onClick:H,children:q.jsxs("div",{className:"video-card-container",children:[q.jsx("video",{ref:m,src:e,poster:t,preload:"metadata",onLoadedData:M,onPlay:B,onPause:N,onEnded:x,muted:!0,loop:!0}),s&&q.jsx("div",{className:`video-play-button ${T?"hovered":""}`,onClick:S,children:g?q.jsx(ht.PauseCircleOutlined,{className:"play-icon"}):q.jsx(ht.PlayCircleOutlined,{className:"play-icon"})}),!w&&q.jsx("div",{className:"video-loading-mask",children:q.jsx("div",{className:"loading-spinner"})})]})})};ni.__docgenInfo={displayName:"VideoCard",description:"视频卡片组件,支持鼠标悬浮播放控制",props:{src:{name:"src",required:!0,description:"视频源地址",type:{name:"string",raw:"string"}},poster:{name:"poster",required:!1,description:"视频海报图片",type:{name:"string",raw:"string"}},width:{name:"width",required:!1,description:"卡片宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:"300"}},height:{name:"height",required:!1,description:"卡片高度",type:{name:"number | string",raw:"number | string"}},videoWidth:{name:"videoWidth",required:!1,description:"视频宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},videoHeight:{name:"videoHeight",required:!1,description:"视频高度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},showPlayButton:{name:"showPlayButton",required:!1,description:"是否显示播放按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},autoPlayOnHover:{name:"autoPlayOnHover",required:!1,description:"是否自动播放(鼠标悬浮时)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLDivElement>) => void"}},onVideoLoaded:{name:"onVideoLoaded",required:!1,description:"视频加载完成事件",type:{name:"function",raw:"() => void"}},onVideoPlay:{name:"onVideoPlay",required:!1,description:"视频播放事件",type:{name:"function",raw:"() => void"}},onVideoPause:{name:"onVideoPause",required:!1,description:"视频暂停事件",type:{name:"function",raw:"() => void"}},onVideoEnded:{name:"onVideoEnded",required:!1,description:"视频结束事件",type:{name:"function",raw:"() => void"}},className:{name:"className",required:!1,description:"自定义样式类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Gb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),Yb=e=>e.type?e.type:Gb(e.url)?"video":"image",Ku=({items:e,columns:t,gap:n=0,responsive:r=!0,breakpoints:a={xs:1,sm:2,md:3,lg:4,xl:5,xxl:6},className:i,style:s,onClick:o})=>{const u=L.useRef(null),[l,d]=L.useState(t||a.md||3),p=L.useRef(new Map),E=L.useCallback(()=>{if(!r||t)return t||a.md||3;const m=window.innerWidth;return m<576?a.xs||1:m<768?a.sm||2:m<992?a.md||3:m<1200?a.lg||4:m<1600?a.xl||5:a.xxl||6},[r,t,a]),c=L.useCallback(()=>{if(!u.current)return;const m=l,g=u.current,T=(g.offsetWidth-n*(m-1))/m,_=new Array(m).fill(0);e.forEach((C,O)=>{const A=C.id||O,S=p.current.get(A);if(!S)return;const k=Math.min(..._),I=_.indexOf(k),M=I*(T+n),B=_[I];S.style.position="absolute",S.style.left=`${M}px`,S.style.top=`${B}px`,S.style.width=`${T}px`,_[I]+=S.offsetHeight+n});const w=Math.max(..._);g.style.height=`${w}px`},[e,l,n]);L.useEffect(()=>{const m=()=>{const g=E();g!==l&&d(g)};if(r)return window.addEventListener("resize",m),m(),()=>window.removeEventListener("resize",m)},[r,E,l]),L.useEffect(()=>{const m=setTimeout(()=>{c()},100);return()=>clearTimeout(m)},[e,l,c]);const y=L.useCallback(()=>{c()},[c]),h=L.useCallback(m=>{o&&o(m),m.onClick?.(m)},[o]);return q.jsx("div",{ref:u,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((m,g)=>{const b=m.id||g,T=Yb(m);return q.jsx("div",{ref:_=>{_?p.current.set(b,_):p.current.delete(b)},className:"waterfall-item",children:T==="video"?q.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:o||m.onClick?"pointer":"default"},children:q.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:q.jsx(ni,{src:m.url,poster:m.poster,width:"100%",height:"100%",onClick:()=>h(m),onVideoLoaded:y,autoPlayOnHover:!0,showPlayButton:!1})})}):q.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>h(m),style:{cursor:o||m.onClick?"pointer":"default"},children:q.jsx("img",{src:m.url,alt:`瀑布流图片 ${g+1}`,className:"waterfall-image",onLoad:y,onError:y,style:{display:"block",width:"100%",height:"auto"}})})},b)})})};Ku.__docgenInfo={displayName:"Waterfall",description:"瀑布流布局组件,支持图片和视频混合展示",props:{items:{name:"items",required:!0,description:"媒体资源数组",type:{name:"WaterfallItem[]",raw:"WaterfallItem[]"}},columns:{name:"columns",required:!1,description:"列数(默认会根据屏幕宽度自动响应)",type:{name:"number",raw:"number"}},gap:{name:"gap",required:!1,description:"间隔大小",type:{name:"number",raw:"number"},defaultValue:{value:"0"}},responsive:{name:"responsive",required:!1,description:"是否启用响应式布局",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},breakpoints:{name:"breakpoints",required:!1,description:"响应式断点配置",type:{name:"object",raw:"{ xs?: number; sm?: number; md?: number; lg?: number; xl?: number; xxl?: number; }"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}},onClick:{name:"onClick",required:!1,description:"点击回调",type:{name:"function",raw:"(item: any) => void"}}}};const Mn=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Jt={日期:"date",展现量:"impressions",点击量:"clicks","花费(元)":"cost",点击率:"clickRate","平均点击花费(元)":"avgClickCost","千次展现花费(元)":"cpm","总成交金额(元)":"totalTransactionAmount",总成交笔数:"totalTransactionCount",点击转化率:"clickConversionRate","直接成交金额(元)":"directTransactionAmount","间接成交金额(元)":"indirectTransactionAmount",直接成交笔数:"directTransactionCount",间接成交笔数:"indirectTransactionCount",投入产出比:"roi",含预售投产比:"roiWithPresale","总成交成本(元)":"totalTransactionCost","总预售成交金额(元)":"totalPresaleAmount",总预售成交笔数:"totalPresaleCount","直接预售成交金额(元)":"directPresaleAmount",直接预售成交笔数:"directPresaleCount","间接预售成交金额(元)":"indirectPresaleAmount",间接预售成交笔数:"indirectPresaleCount",拍下订单笔数:"orderCount","拍下订单金额(元)":"orderAmount",总购物车数:"totalCartCount",直接购物车数:"directCartCount",间接购物车数:"indirectCartCount",加购率:"addToCartRate","加购成本(元)":"addToCartCost",收藏宝贝数:"productCollectionCount",收藏店铺数:"shopCollectionCount",总收藏数:"totalCollectionCount",直接收藏宝贝数:"directProductCollectionCount",间接收藏宝贝数:"indirectProductCollectionCount",宝贝收藏率:"productCollectionRate","宝贝收藏成本(元)":"productCollectionCost","店铺收藏成本(元)":"shopCollectionCost",总收藏加购数:"totalCollectionAndCartCount","总收藏加购成本(元)":"totalCollectionAndCartCost",宝贝收藏加购数:"productCollectionAndCartCount","宝贝收藏加购成本(元)":"productCollectionAndCartCost",引导访问量:"guidedVisitCount",引导访问人数:"guidedVisitorCount",引导访问潜客数:"guidedPotentialCustomerCount",引导访问潜客占比:"guidedPotentialCustomerRate",引导访问率:"guidedVisitRate",深度访问量:"deepVisitCount",平均访问页面数:"avgPageViews",成交人数:"transactionCustomerCount",成交新客数:"newCustomerCount",成交新客占比:"newCustomerRate",人均成交笔数:"avgTransactionPerCustomer",人均成交金额:"avgAmountPerCustomer",优惠券领取量:"couponClaimCount",购物金充值笔数:"shoppingCreditRechargeCount","购物金充值金额(元)":"shoppingCreditRechargeAmount",旺旺咨询量:"wangwangConsultationCount",自然流量转化金额:"organicTrafficAmount",自然流量曝光量:"organicTrafficImpressions"},Wb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],Bn=e=>Jt[e]??e,jb=e=>e?!!(Jt[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,Xb=e=>{const t=e.trim();if(!t)return[];const n=t.split(/[\r\n]+/).map(s=>s.trim()).filter(Boolean);if(n.length===0)return[];const r=n[0];if(r.includes(" ")){const s=r.split(/\t/).map(u=>u.trim()).filter(Boolean),o=s.some(u=>Jt[u]!==void 0);if(s.length>=2&&o)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(u=>u.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const o=s.some(u=>Jt[u]!==void 0);return s.length>=2&&o?s:[]}const a=n.filter(jb);return a.some(s=>Jt[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},Kb=e=>{if(!e||e.trim()==="")return"";const t=e.trim();if(t.toLowerCase()==="nan")return"NaN";const n=t.match(/^(.+?)([+-]\d)/);return n?n[1].trim():t},Qb=e=>e.replace(/[\u00a0\u3000]/g," ").replace(/[–—]/g,"-").replace(/%(\d)/g,"% $1").replace(/NaN(\d)/gi,"NaN $1").replace(/(\.\d+)(\d,\d{3})/g,"$1 $2").replace(/(\.\d+)(\d+\.)/g,"$1 $2").replace(/(\.\d{2})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").replace(/(,\d{3})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").split(/\s+/).map(n=>n.trim()).filter(n=>n!==""),Qu=e=>{const t=(e||"").replace(/[\u00a0\u3000]/g," "),n=/20\d{2}-\d{2}-\d{2}/g,r=t.match(n)||[];if(r.length===0)return{markdown:"",jsonData:[]};const a=t.split(n).filter(g=>g.trim()!==""),i=a.length>0?Xb(a[0]):[],s=i.length>=2,o=s?i:Wb,u=s||a.length>0&&a[0].includes("展现量")?1:0,l=o.filter(g=>g!=="日期"),d=l.length,p=[];r.forEach((g,b)=>{const T=b+u;if(T>=a.length)return;const _=a[T];let w=_.split(/[\r\n]+/).map(A=>A.trim()).filter(A=>A!=="");w.length<d&&(w=Qb(_));const C=A=>w.length===d*2?w[A*2]??"":w[A]??"",O={};O[Bn("日期")]=g,l.forEach((A,S)=>{const k=C(S),I=Kb(k),M=Bn(A);O[M]=I}),p.push(O)});const E=o.filter(g=>{const b=Bn(g);return p.some(T=>{const _=T[b];return _!==void 0&&String(_).trim()!==""})}),c=`| ${E.join(" | ")} |`,y=`| ${E.map(()=>"---").join(" | ")} |`,h=p.map(g=>`| ${E.map(T=>{const _=Bn(T);return g[_]??"-"}).join(" | ")} |`);return{markdown:[c,y,...h].join(`
74
+ `})]})};Xu.__docgenInfo={displayName:"DynamicTextArea",description:"动态文案文本域组件,支持流式文字动画效果",props:{texts:{name:"texts",required:!0,description:"动态展示的文案数组",type:{name:"string[]",raw:"string[]"}},placeholder:{name:"placeholder",required:!1,description:"输入框占位符",type:{name:"string",raw:"string"},defaultValue:{value:'"请输入内容"'}},animationSpeed:{name:"animationSpeed",required:!1,description:"动画速度(毫秒)",type:{name:"number",raw:"number"},defaultValue:{value:"100"}},autoPlay:{name:"autoPlay",required:!1,description:"是否自动播放动画",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},value:{name:"value",required:!1,description:"输入框值",type:{name:"string",raw:"string"}},onChange:{name:"onChange",required:!1,description:"输入框变化回调",type:{name:"function",raw:"(value: string) => void"}},onSubmit:{name:"onSubmit",required:!1,description:"提交回调",type:{name:"function",raw:"(value: string) => void"}},maxLength:{name:"maxLength",required:!1,description:"最大输入字数",type:{name:"number",raw:"number"},defaultValue:{value:"500"}},showCount:{name:"showCount",required:!1,description:"是否显示字数统计",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},submitText:{name:"submitText",required:!1,description:"提交按钮文本",type:{name:"string",raw:"string"},defaultValue:{value:'"发送"'}},disabled:{name:"disabled",required:!1,description:"是否禁用提交按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},rows:{name:"rows",required:!1,description:"文本域行数",type:{name:"number",raw:"number"},defaultValue:{value:"4"}}}};const ni=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:o=!0,onClick:u,onVideoLoaded:l,onVideoPlay:d,onVideoPause:p,onVideoEnded:E,className:c,style:x,...h})=>{const m=L.useRef(null),[g,b]=L.useState(!1),[T,C]=L.useState(!1),[w,S]=L.useState(!1),O=L.useCallback(()=>{m.current&&(m.current.play(),b(!0),d?.())},[d]),A=L.useCallback(()=>{m.current&&(m.current.pause(),b(!1),p?.())},[p]),v=L.useCallback(U=>{U.stopPropagation(),g?A():O()},[g,O,A]),k=L.useCallback(()=>{C(!0),o&&!g&&O()},[o,g,O]),N=L.useCallback(()=>{C(!1),o&&g&&A()},[o,g,A]),M=L.useCallback(()=>{S(!0),l?.()},[l]),R=L.useCallback(()=>{b(!0),d?.()},[d]),I=L.useCallback(()=>{b(!1),p?.()},[p]),y=L.useCallback(()=>{b(!1),E?.()},[E]),F=L.useCallback(U=>{u?.(U)},[u]);return q.jsx(ce.Card,{...h,className:`video-card ${c||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:u?"pointer":"default",border:"none",borderRadius:0,...x},bordered:!1,onMouseEnter:k,onMouseLeave:N,onClick:F,children:q.jsxs("div",{className:"video-card-container",children:[q.jsx("video",{ref:m,src:e,poster:t,preload:"metadata",onLoadedData:M,onPlay:R,onPause:I,onEnded:y,muted:!0,loop:!0}),s&&q.jsx("div",{className:`video-play-button ${T?"hovered":""}`,onClick:v,children:g?q.jsx(ht.PauseCircleOutlined,{className:"play-icon"}):q.jsx(ht.PlayCircleOutlined,{className:"play-icon"})}),!w&&q.jsx("div",{className:"video-loading-mask",children:q.jsx("div",{className:"loading-spinner"})})]})})};ni.__docgenInfo={displayName:"VideoCard",description:"视频卡片组件,支持鼠标悬浮播放控制",props:{src:{name:"src",required:!0,description:"视频源地址",type:{name:"string",raw:"string"}},poster:{name:"poster",required:!1,description:"视频海报图片",type:{name:"string",raw:"string"}},width:{name:"width",required:!1,description:"卡片宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:"300"}},height:{name:"height",required:!1,description:"卡片高度",type:{name:"number | string",raw:"number | string"}},videoWidth:{name:"videoWidth",required:!1,description:"视频宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},videoHeight:{name:"videoHeight",required:!1,description:"视频高度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},showPlayButton:{name:"showPlayButton",required:!1,description:"是否显示播放按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},autoPlayOnHover:{name:"autoPlayOnHover",required:!1,description:"是否自动播放(鼠标悬浮时)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLDivElement>) => void"}},onVideoLoaded:{name:"onVideoLoaded",required:!1,description:"视频加载完成事件",type:{name:"function",raw:"() => void"}},onVideoPlay:{name:"onVideoPlay",required:!1,description:"视频播放事件",type:{name:"function",raw:"() => void"}},onVideoPause:{name:"onVideoPause",required:!1,description:"视频暂停事件",type:{name:"function",raw:"() => void"}},onVideoEnded:{name:"onVideoEnded",required:!1,description:"视频结束事件",type:{name:"function",raw:"() => void"}},className:{name:"className",required:!1,description:"自定义样式类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Gb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),Yb=e=>e.type?e.type:Gb(e.url)?"video":"image",Ku=({items:e,columns:t,gap:n=0,responsive:r=!0,breakpoints:a={xs:1,sm:2,md:3,lg:4,xl:5,xxl:6},className:i,style:s,onClick:o})=>{const u=L.useRef(null),[l,d]=L.useState(t||a.md||3),p=L.useRef(new Map),E=L.useCallback(()=>{if(!r||t)return t||a.md||3;const m=window.innerWidth;return m<576?a.xs||1:m<768?a.sm||2:m<992?a.md||3:m<1200?a.lg||4:m<1600?a.xl||5:a.xxl||6},[r,t,a]),c=L.useCallback(()=>{if(!u.current)return;const m=l,g=u.current,T=(g.offsetWidth-n*(m-1))/m,C=new Array(m).fill(0);e.forEach((S,O)=>{const A=S.id||O,v=p.current.get(A);if(!v)return;const k=Math.min(...C),N=C.indexOf(k),M=N*(T+n),R=C[N];v.style.position="absolute",v.style.left=`${M}px`,v.style.top=`${R}px`,v.style.width=`${T}px`,C[N]+=v.offsetHeight+n});const w=Math.max(...C);g.style.height=`${w}px`},[e,l,n]);L.useEffect(()=>{const m=()=>{const g=E();g!==l&&d(g)};if(r)return window.addEventListener("resize",m),m(),()=>window.removeEventListener("resize",m)},[r,E,l]),L.useEffect(()=>{const m=setTimeout(()=>{c()},100);return()=>clearTimeout(m)},[e,l,c]);const x=L.useCallback(()=>{c()},[c]),h=L.useCallback(m=>{o&&o(m),m.onClick?.(m)},[o]);return q.jsx("div",{ref:u,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((m,g)=>{const b=m.id||g,T=Yb(m);return q.jsx("div",{ref:C=>{C?p.current.set(b,C):p.current.delete(b)},className:"waterfall-item",children:T==="video"?q.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:o||m.onClick?"pointer":"default"},children:q.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:q.jsx(ni,{src:m.url,poster:m.poster,width:"100%",height:"100%",onClick:()=>h(m),onVideoLoaded:x,autoPlayOnHover:!0,showPlayButton:!1})})}):q.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>h(m),style:{cursor:o||m.onClick?"pointer":"default"},children:q.jsx("img",{src:m.url,alt:`瀑布流图片 ${g+1}`,className:"waterfall-image",onLoad:x,onError:x,style:{display:"block",width:"100%",height:"auto"}})})},b)})})};Ku.__docgenInfo={displayName:"Waterfall",description:"瀑布流布局组件,支持图片和视频混合展示",props:{items:{name:"items",required:!0,description:"媒体资源数组",type:{name:"WaterfallItem[]",raw:"WaterfallItem[]"}},columns:{name:"columns",required:!1,description:"列数(默认会根据屏幕宽度自动响应)",type:{name:"number",raw:"number"}},gap:{name:"gap",required:!1,description:"间隔大小",type:{name:"number",raw:"number"},defaultValue:{value:"0"}},responsive:{name:"responsive",required:!1,description:"是否启用响应式布局",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},breakpoints:{name:"breakpoints",required:!1,description:"响应式断点配置",type:{name:"object",raw:"{ xs?: number; sm?: number; md?: number; lg?: number; xl?: number; xxl?: number; }"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}},onClick:{name:"onClick",required:!1,description:"点击回调",type:{name:"function",raw:"(item: any) => void"}}}};const Mn=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Jt={日期:"date",展现量:"impressions",点击量:"clicks","花费(元)":"cost",点击率:"clickRate","平均点击花费(元)":"avgClickCost","千次展现花费(元)":"cpm","总成交金额(元)":"totalTransactionAmount",总成交笔数:"totalTransactionCount",点击转化率:"clickConversionRate","直接成交金额(元)":"directTransactionAmount","间接成交金额(元)":"indirectTransactionAmount",直接成交笔数:"directTransactionCount",间接成交笔数:"indirectTransactionCount",投入产出比:"roi",含预售投产比:"roiWithPresale","总成交成本(元)":"totalTransactionCost","总预售成交金额(元)":"totalPresaleAmount",总预售成交笔数:"totalPresaleCount","直接预售成交金额(元)":"directPresaleAmount",直接预售成交笔数:"directPresaleCount","间接预售成交金额(元)":"indirectPresaleAmount",间接预售成交笔数:"indirectPresaleCount",拍下订单笔数:"orderCount","拍下订单金额(元)":"orderAmount",总购物车数:"totalCartCount",直接购物车数:"directCartCount",间接购物车数:"indirectCartCount",加购率:"addToCartRate","加购成本(元)":"addToCartCost",收藏宝贝数:"productCollectionCount",收藏店铺数:"shopCollectionCount",总收藏数:"totalCollectionCount",直接收藏宝贝数:"directProductCollectionCount",间接收藏宝贝数:"indirectProductCollectionCount",宝贝收藏率:"productCollectionRate","宝贝收藏成本(元)":"productCollectionCost","店铺收藏成本(元)":"shopCollectionCost",总收藏加购数:"totalCollectionAndCartCount","总收藏加购成本(元)":"totalCollectionAndCartCost",宝贝收藏加购数:"productCollectionAndCartCount","宝贝收藏加购成本(元)":"productCollectionAndCartCost",引导访问量:"guidedVisitCount",引导访问人数:"guidedVisitorCount",引导访问潜客数:"guidedPotentialCustomerCount",引导访问潜客占比:"guidedPotentialCustomerRate",引导访问率:"guidedVisitRate",深度访问量:"deepVisitCount",平均访问页面数:"avgPageViews",成交人数:"transactionCustomerCount",成交新客数:"newCustomerCount",成交新客占比:"newCustomerRate",人均成交笔数:"avgTransactionPerCustomer",人均成交金额:"avgAmountPerCustomer",优惠券领取量:"couponClaimCount",购物金充值笔数:"shoppingCreditRechargeCount","购物金充值金额(元)":"shoppingCreditRechargeAmount",旺旺咨询量:"wangwangConsultationCount",自然流量转化金额:"organicTrafficAmount",自然流量曝光量:"organicTrafficImpressions"},Wb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],Bn=e=>Jt[e]??e,jb=e=>e?!!(Jt[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,Xb=e=>{const t=e.trim();if(!t)return[];const n=t.split(/[\r\n]+/).map(s=>s.trim()).filter(Boolean);if(n.length===0)return[];const r=n[0];if(r.includes(" ")){const s=r.split(/\t/).map(u=>u.trim()).filter(Boolean),o=s.some(u=>Jt[u]!==void 0);if(s.length>=2&&o)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(u=>u.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const o=s.some(u=>Jt[u]!==void 0);return s.length>=2&&o?s:[]}const a=n.filter(jb);return a.some(s=>Jt[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},Kb=e=>{if(!e||e.trim()==="")return"";const t=e.trim();if(t.toLowerCase()==="nan")return"NaN";const n=t.match(/^(.+?)([+-]\d)/);return n?n[1].trim():t},Qb=e=>e.replace(/[\u00a0\u3000]/g," ").replace(/[–—]/g,"-").replace(/%(\d)/g,"% $1").replace(/NaN(\d)/gi,"NaN $1").replace(/(\.\d+)(\d,\d{3})/g,"$1 $2").replace(/(\.\d+)(\d+\.)/g,"$1 $2").replace(/(\.\d{2})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").replace(/(,\d{3})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").split(/\s+/).map(n=>n.trim()).filter(n=>n!==""),Qu=e=>{const t=(e||"").replace(/[\u00a0\u3000]/g," "),n=/20\d{2}-\d{2}-\d{2}/g,r=t.match(n)||[];if(r.length===0)return{markdown:"",jsonData:[]};const a=t.split(n).filter(g=>g.trim()!==""),i=a.length>0?Xb(a[0]):[],s=i.length>=2,o=s?i:Wb,u=s||a.length>0&&a[0].includes("展现量")?1:0,l=o.filter(g=>g!=="日期"),d=l.length,p=[];r.forEach((g,b)=>{const T=b+u;if(T>=a.length)return;const C=a[T];let w=C.split(/[\r\n]+/).map(A=>A.trim()).filter(A=>A!=="");w.length<d&&(w=Qb(C));const S=A=>w.length===d*2?w[A*2]??"":w[A]??"",O={};O[Bn("日期")]=g,l.forEach((A,v)=>{const k=S(v),N=Kb(k),M=Bn(A);O[M]=N}),p.push(O)});const E=o.filter(g=>{const b=Bn(g);return p.some(T=>{const C=T[b];return C!==void 0&&String(C).trim()!==""})}),c=`| ${E.join(" | ")} |`,x=`| ${E.map(()=>"---").join(" | ")} |`,h=p.map(g=>`| ${E.map(T=>{const C=Bn(T);return g[C]??"-"}).join(" | ")} |`);return{markdown:[c,x,...h].join(`
75
75
  `),jsonData:p}},Ju=e=>{if(!e)return"";const t=e.trim().split(`
76
- `);if(t.length<2)return Mn(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return Mn(e);const s=t[0].split("|").map(p=>p.trim()).filter(p=>p!==""),o=t.slice(2).map(p=>p.split("|").map(E=>E.trim()).filter((E,c,y)=>c>0&&c<y.length)),u="border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;",l="border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";let d='<div style="overflow-x:auto;max-width:100%;">';return d+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',d+="<thead><tr>",s.forEach(p=>{d+=`<th style="${u}">${Mn(p)}</th>`}),d+="</tr></thead>",d+="<tbody>",o.forEach(p=>{d+="<tr>",s.forEach((E,c)=>{const y=p[c]||"-";d+=`<td style="${l}">${Mn(y)}</td>`}),d+="</tr>"}),d+="</tbody></table></div>",d},Zu=e=>{const t=[],n=e.querySelector("thead tr");if(!n)return t;const r=[];return n.querySelectorAll("th").forEach(i=>{r.push(i.textContent?.trim()||"")}),e.querySelectorAll("tbody tr").forEach(i=>{const s={};i.querySelectorAll("td").forEach((u,l)=>{const d=r[l];if(d==null)return;const p=Bn(d),E=u.textContent?.trim()||"";s[p]=E==="-"?"":E}),Object.keys(s).length>0&&t.push(s)}),t},Jb=e=>async t=>{const n=Qu(t.text);return e&&e(n.jsonData),{modules:[{title:"推广分析表格",content:Ju(n.markdown),markdown:n.markdown}]}},Zb=(e,t,n)=>{const r=parseFloat(String(e.get("grossProfitMargin")||"0"))||0,a=parseFloat(String(e.get("refundRate")||"0"))||0;let i=[];if(t){const s=Zu(t);s.length>0&&(i=s)}return i.length===0&&n&&n.length>0&&(i=n),{grossProfitMargin:r,refundRate:a,tableData:i}},eT={algorithm:ce.theme.defaultAlgorithm,token:{colorPrimary:"#3b82f6",colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#ef4444",colorInfo:"#3b82f6",colorBgBase:"#ffffff",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBgLayout:"#f8fafc",colorTextBase:"#1e293b",colorText:"#1e293b",colorTextSecondary:"#64748b",colorTextTertiary:"#94a3b8",colorTextQuaternary:"#cbd5e1",colorBorder:"#e2e8f0",colorBorderSecondary:"#f1f5f9",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",borderRadius:8,borderRadiusLG:12,borderRadiusSM:6,fontFamily:"Inter, system-ui, Arial, sans-serif",fontSize:14,fontSizeLG:16,fontSizeSM:12,padding:16,paddingLG:24,paddingSM:12,paddingXS:8,controlHeight:32,controlHeightLG:40,controlHeightSM:24},components:{Button:{borderRadius:8,controlHeight:32,fontWeight:500},Card:{borderRadiusLG:12,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},Input:{borderRadius:8,controlHeight:32},Table:{borderRadiusLG:8,headerBg:"#f8fafc",headerColor:"#374151"}}};Ee.AdvancedTable=_i,Ee.AppModal=Ti,Ee.BackButton=Si,Ee.Button=Ei,Ee.Card=bi,Ee.DynamicInput=ju,Ee.DynamicTextArea=Xu,Ee.EmptyAndSpin=Ci,Ee.HEADER_TO_FIELD=Jt,Ee.LinkButton=Ai,Ee.PageTable=yi,Ee.RichTextEditor=Gu,Ee.VideoCard=ni,Ee.VirtualTable=Wu,Ee.Waterfall=Ku,Ee.XcIcon=xi,Ee.buildPromotionSendPayload=Zb,Ee.createMarkdownAnalyze=Jb,Ee.escapeHtml=Mn,Ee.extractTableDataFromHtml=Zu,Ee.lightTheme=eT,Ee.parsePromotionTableMarkdown=Qu,Ee.renderMarkdownToHtml=Ju,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
76
+ `);if(t.length<2)return Mn(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return Mn(e);const s=t[0].split("|").map(p=>p.trim()).filter(p=>p!==""),o=t.slice(2).map(p=>p.split("|").map(E=>E.trim()).filter((E,c,x)=>c>0&&c<x.length)),u="border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;",l="border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";let d='<div style="overflow-x:auto;max-width:100%;">';return d+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',d+="<thead><tr>",s.forEach(p=>{d+=`<th style="${u}">${Mn(p)}</th>`}),d+="</tr></thead>",d+="<tbody>",o.forEach(p=>{d+="<tr>",s.forEach((E,c)=>{const x=p[c]||"-";d+=`<td style="${l}">${Mn(x)}</td>`}),d+="</tr>"}),d+="</tbody></table></div>",d},Zu=e=>{const t=[],n=e.querySelector("thead tr");if(!n)return t;const r=[];return n.querySelectorAll("th").forEach(i=>{r.push(i.textContent?.trim()||"")}),e.querySelectorAll("tbody tr").forEach(i=>{const s={};i.querySelectorAll("td").forEach((u,l)=>{const d=r[l];if(d==null)return;const p=Bn(d),E=u.textContent?.trim()||"";s[p]=E==="-"?"":E}),Object.keys(s).length>0&&t.push(s)}),t},Jb=e=>async t=>{const n=Qu(t.text);return e&&e(n.jsonData),{modules:[{title:"推广分析表格",content:Ju(n.markdown),markdown:n.markdown}]}},Zb=(e,t,n)=>{const r=parseFloat(String(e.get("grossProfitMargin")||"0"))||0,a=parseFloat(String(e.get("refundRate")||"0"))||0;let i=[];if(t){const s=Zu(t);s.length>0&&(i=s)}return i.length===0&&n&&n.length>0&&(i=n),{grossProfitMargin:r,refundRate:a,tableData:i}},eT={algorithm:ce.theme.defaultAlgorithm,token:{colorPrimary:"#3b82f6",colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#ef4444",colorInfo:"#3b82f6",colorBgBase:"#ffffff",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBgLayout:"#f8fafc",colorTextBase:"#1e293b",colorText:"#1e293b",colorTextSecondary:"#64748b",colorTextTertiary:"#94a3b8",colorTextQuaternary:"#cbd5e1",colorBorder:"#e2e8f0",colorBorderSecondary:"#f1f5f9",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",borderRadius:8,borderRadiusLG:12,borderRadiusSM:6,fontFamily:"Inter, system-ui, Arial, sans-serif",fontSize:14,fontSizeLG:16,fontSizeSM:12,padding:16,paddingLG:24,paddingSM:12,paddingXS:8,controlHeight:32,controlHeightLG:40,controlHeightSM:24},components:{Button:{borderRadius:8,controlHeight:32,fontWeight:500},Card:{borderRadiusLG:12,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},Input:{borderRadius:8,controlHeight:32},Table:{borderRadiusLG:8,headerBg:"#f8fafc",headerColor:"#374151"}}};Ee.AdvancedTable=_i,Ee.AppModal=Ti,Ee.BackButton=Si,Ee.Button=Ei,Ee.Card=bi,Ee.DynamicInput=ju,Ee.DynamicTextArea=Xu,Ee.EmptyAndSpin=Ci,Ee.HEADER_TO_FIELD=Jt,Ee.LinkButton=Ai,Ee.PageTable=yi,Ee.RichTextEditor=Gu,Ee.VideoCard=ni,Ee.VirtualTable=Wu,Ee.Waterfall=Ku,Ee.XcIcon=xi,Ee.buildPromotionSendPayload=Zb,Ee.createMarkdownAnalyze=Jb,Ee.escapeHtml=Mn,Ee.extractTableDataFromHtml=Zu,Ee.lightTheme=eT,Ee.parsePromotionTableMarkdown=Qu,Ee.renderMarkdownToHtml=Ju,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});
77
77
  //# sourceMappingURL=index.umd.js.map