bi-components-library 1.1.49 → 1.1.50

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(he,z){typeof exports=="object"&&typeof module<"u"?z(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"],z):(he=typeof globalThis<"u"?globalThis:he||self,z(he.SealSeekBIComponents={},he.React,he.React,he.antd,he.AntdIcons,he.ReactDOM))})(this,function(he,z,D,se,lt,Ln){"use strict";const Ja=({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 z.jsx(se.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ja.__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 Za=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>z.jsx(se.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});Za.__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 ei=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>z.jsxs(z.Fragment,{children:[z.jsx(a,{}),z.jsx(i,{})]}):null;return z.jsx(se.Modal,{...t,footer:n})};ei.__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 ti=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>z.jsx(se.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});ti.__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 zu=lt.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),ni=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return z.jsx(zu,{...a,type:e,style:i})};ni.__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 ri=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?z.jsxs(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[z.jsx(se.Spin,{size:"large"}),a&&z.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):z.jsx(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:z.jsx(se.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});ri.__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 ai=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>z.jsx(se.Button,{size:r,type:a,icon:z.jsx(lt.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});ai.__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 ii=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return z.jsx(se.Button,{type:"link",...n,className:r,children:n.children})};ii.__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:Vu}=se.Select,si=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:u=!0,externalParams:o={},...l})=>{const[m,p]=D.useState([]),[E,h]=D.useState(!1),[c,f]=D.useState({current:1,pageSize:i,total:0}),[b,g]=D.useState({}),[y,T]=D.useState({}),[x]=se.Form.useForm(),S=D.useRef(c);S.current=c;const A=D.useRef(o);A.current=o;const N=D.useRef(!1),_=D.useMemo(()=>e.map(v=>{const{sortable:C,render:B,...$}=v;return{...$,sorter:C?!0:void 0,render:B||(U=>U)}}),[e]),w=D.useCallback(async(v={})=>{if(t){h(!0);try{const C={page:S.current.current,pageSize:S.current.pageSize,sortField:y.field,sortOrder:y.order,searchParams:{...b,...A.current},...v},B=await t(C);B.success&&(p(B.data),f($=>({...$,total:B.total,current:C.page||$.current})))}catch(C){console.error("加载数据失败:",C)}finally{h(!1)}}},[t,y,b]),O=D.useCallback(v=>{g(v),f(C=>({...C,current:1}))},[]),I=D.useCallback(()=>{x.resetFields(),g({}),f(v=>({...v,current:1}))},[x]),P=D.useCallback(()=>{w()},[w]),H=D.useCallback((v,C,B)=>{const $={current:v.current||1,pageSize:v.pageSize||i,total:v.total||0},U={field:B?.field,order:B?.order};f($),T(U)},[i]);return D.useEffect(()=>{const v=Object.keys(o).length>0;(u&&!N.current||v)&&(w(),N.current=!0)},[u,o,w]),z.jsxs("div",{children:[r&&n.length>0&&z.jsx(se.Card,{size:"small",style:{marginBottom:16},children:z.jsxs(se.Form,{form:x,layout:"inline",onFinish:O,initialValues:n.reduce((v,C)=>(C.defaultValue!==void 0&&(v[C.key]=C.defaultValue),v),{}),children:[n.map(v=>z.jsx(se.Form.Item,{name:v.key,label:v.label,children:v.type==="input"?z.jsx(se.Input,{placeholder:v.placeholder||`请输入${v.label}`,style:{width:200}}):z.jsx(se.Select,{placeholder:v.placeholder||`请选择${v.label}`,style:{width:200},allowClear:!0,children:v.options?.map(C=>z.jsx(Vu,{value:C.value,children:C.label},C.value))})},v.key)),z.jsx(se.Form.Item,{children:z.jsxs(se.Space,{children:[z.jsx(se.Button,{type:"primary",htmlType:"submit",icon:z.jsx(lt.SearchOutlined,{}),children:"查询"}),z.jsx(se.Button,{onClick:I,children:"重置"}),a&&z.jsx(se.Button,{icon:z.jsx(lt.ReloadOutlined,{}),onClick:P,children:"刷新"})]})})]})}),z.jsx(se.Table,{...l,columns:_,dataSource:m,loading:E,pagination:{...c,showSizeChanger:!0,showQuickJumper:!0,showTotal:(v,C)=>`第 ${C[0]}-${C[1]} 条/共 ${v} 条`,pageSizeOptions:s},onChange:H,scroll:{x:"max-content",y:"50vh"}})]})};si.__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 Gu=({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||"",u=D.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[o,l]=D.useState(s||void 0),[m,p]=D.useState(64),E=D.useRef(null),h=b=>{l(b),e.setAttribute("data-value",b),t(n,b)};D.useEffect(()=>{l(s||void 0)},[s]);const c=D.useCallback(()=>{if(o!=null&&o!==""){const b=u.find(g=>String(g.value)===String(o));return b?typeof b.label=="string"?b.label:String(b.label??o):String(o)}return r||"请选择"},[o,u,r]),f=D.useCallback(()=>{const b=E.current;if(!b)return;const g=b.querySelector(".ant-select-selection-item"),y=b.querySelector(".ant-select-selection-placeholder"),T=g||y,x=(T?.textContent||"").trim()||c(),S=b.querySelector(".ant-select-selector"),A=T||S||b,N=window.getComputedStyle(A),_=T?N.fontSize:"16px",w=N.fontFamily||"sans-serif",O=N.fontWeight||"400",P=`${N.fontStyle||"normal"} ${O} ${_} ${w}`,v=document.createElement("canvas").getContext("2d"),C=v?Math.ceil((v.font=P,v.measureText(x).width||0)):0;let B=0;if(S){const J=window.getComputedStyle(S);B=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const $=b.querySelector(".ant-select-arrow"),U=$?Math.ceil($.getBoundingClientRect().width):12,V=b.querySelector(".ant-select-clear");let k=0;if(V){const J=window.getComputedStyle(V);J.display!=="none"&&J.visibility!=="hidden"&&(k=Math.ceil(V.getBoundingClientRect().width))}const j=Math.max(36,C+B+U+k+6);p(J=>J===j?J:j)},[c]);return D.useLayoutEffect(()=>{const b=window.requestAnimationFrame(()=>{f()}),g=window.setTimeout(()=>{f()},60);return()=>{window.cancelAnimationFrame(b),window.clearTimeout(g)}},[f]),D.useEffect(()=>{if(!("fonts"in document))return;let b=!1;const g=document.fonts;if(g?.ready)return g.ready.then(()=>{b||f()}),()=>{b=!0}},[f]),Ln.createPortal(z.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:E,style:{display:"inline-block",width:m},children:z.jsx(se.Select,{value:o,onChange:h,placeholder:r||"请选择",style:{width:"100%"},options:u,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:z.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},Yu=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Gu,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`select-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Wu(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function ju(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function Xu(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const u=e.split(`
2
- `);let o=0;for(const h of u){const c=s.measureText(h||" ").width||0;o=Math.max(o,c)}const l=Number.parseFloat(n),m=Number.isFinite(l)?l:0,p=u.reduce((h,c)=>h.length>=c.length?h:c,""),E=m>0?m*Math.max(0,(p||"").length-1):0;return Math.ceil(o+E+r+a)}const Ku=({host:e,onChange:t})=>{const n=e.dataset.key||"",r=e.dataset.placeholder||"",a=e.dataset.tooltip||"",i=e.dataset.allowNewline!=="0",s=D.useMemo(()=>Wu(e.dataset.value||""),[e]),[u,o]=D.useState(s),l=D.useRef(s),m=D.useMemo(()=>{const x=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(x)&&x>0?x:64},[e]),[p,E]=D.useState(m),h=D.useRef(null),c=(u||"").trim().length>0,f=!!a&&!c,b=(u||"").includes(`
3
- `);D.useEffect(()=>{o(s),l.current=s},[s]),D.useEffect(()=>{l.current=u},[u]),D.useEffect(()=>{e.classList.toggle("rte-variable-multiline",b)},[e,b]);const g=D.useCallback(()=>{const x=h.current;if(!x)return;const S=x.querySelector("textarea");if(!S)return;const A=window.getComputedStyle(S),N=A.fontStyle||"normal",_=A.fontWeight||"400",w=A.fontSize||"16px",O=A.fontFamily||"sans-serif",I=`${N} ${_} ${w} ${O}`,P=Number.parseFloat(A.paddingLeft)||0,H=Number.parseFloat(A.paddingRight)||0,v=(u&&u.length>0?u:r)||" ",C=Xu(v,I,A.letterSpacing||"0",P,H),$=Math.max(24,Math.min(600,C+2));E(U=>U===$?U:$)},[r,u]);D.useEffect(()=>{const x=h.current;if(!x||typeof ResizeObserver>"u")return;let S=0;const A=new ResizeObserver(()=>{S&&window.cancelAnimationFrame(S),S=window.requestAnimationFrame(()=>{t(n,l.current)})});return A.observe(x),()=>{S&&window.cancelAnimationFrame(S),A.disconnect()}},[n,t]),D.useLayoutEffect(()=>{const x=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(x)}},[g]),D.useEffect(()=>{if(!("fonts"in document))return;let x=!1;const S=document.fonts;if(S?.ready)return S.ready.then(()=>{x||g()}),()=>{x=!0}},[g]);const y=x=>{const S=x.target.value??"";o(S),e.setAttribute("data-value",ju(S)),t(n,S)},T=x=>{x.key==="Enter"&&!i&&x.preventDefault()};return Ln.createPortal(z.jsxs("div",{className:`rte-variable-v2-wrapper ${f?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:h,"data-placeholder":r,"data-has-value":c?"1":"0",style:{verticalAlign:"middle",width:b?"100%":p,lineHeight:"30px"},children:[z.jsx(se.Input.TextArea,{value:u,onChange:y,onKeyDown:T,placeholder:r,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),a?z.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${f?"":"hidden"}`,"data-variable-key":n,"data-tooltip":a}):null]}),e)},Qu=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll('[data-variable-render="antd-textarea"]'),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Ku,{host:o,onChange:()=>{const m=()=>{if(!e.current)return;const p=new Event("input",{bubbles:!0});e.current.dispatchEvent(p)};m(),window.requestAnimationFrame(m)}},`variable-v2-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s){if(o.type!=="childList")continue;const l=m=>{m.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"]'))&&(u=!0)})};if(l(o.addedNodes),l(o.removedNodes),u)break}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Ju(e,t=[]){D.useLayoutEffect(()=>{if(!e.current)return;const n=new Map,r=new Map,a=p=>{const E=p.value||p.placeholder||"",h=window.getComputedStyle(p),c=Number.parseFloat(h.paddingLeft)||0,f=Number.parseFloat(h.paddingRight)||0,b=document.createElement("span");b.style.cssText=`
1
+ (function(he,z){typeof exports=="object"&&typeof module<"u"?z(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"],z):(he=typeof globalThis<"u"?globalThis:he||self,z(he.SealSeekBIComponents={},he.React,he.React,he.antd,he.AntdIcons,he.ReactDOM))})(this,function(he,z,D,se,lt,Ln){"use strict";const Ja=({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 z.jsx(se.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ja.__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 Za=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>z.jsx(se.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});Za.__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 ei=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>z.jsxs(z.Fragment,{children:[z.jsx(a,{}),z.jsx(i,{})]}):null;return z.jsx(se.Modal,{...t,footer:n})};ei.__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 ti=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>z.jsx(se.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});ti.__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 zu=lt.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),ni=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return z.jsx(zu,{...a,type:e,style:i})};ni.__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 ri=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?z.jsxs(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[z.jsx(se.Spin,{size:"large"}),a&&z.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):z.jsx(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:z.jsx(se.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});ri.__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 ai=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>z.jsx(se.Button,{size:r,type:a,icon:z.jsx(lt.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});ai.__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 ii=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return z.jsx(se.Button,{type:"link",...n,className:r,children:n.children})};ii.__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:Vu}=se.Select,si=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:u=!0,externalParams:o={},...l})=>{const[m,f]=D.useState([]),[E,h]=D.useState(!1),[c,p]=D.useState({current:1,pageSize:i,total:0}),[b,g]=D.useState({}),[T,y]=D.useState({}),[x]=se.Form.useForm(),S=D.useRef(c);S.current=c;const _=D.useRef(o);_.current=o;const N=D.useRef(!1),A=D.useMemo(()=>e.map(v=>{const{sortable:C,render:B,...$}=v;return{...$,sorter:C?!0:void 0,render:B||(U=>U)}}),[e]),I=D.useCallback(async(v={})=>{if(t){h(!0);try{const C={page:S.current.current,pageSize:S.current.pageSize,sortField:T.field,sortOrder:T.order,searchParams:{...b,..._.current},...v},B=await t(C);B.success&&(f(B.data),p($=>({...$,total:B.total,current:C.page||$.current})))}catch(C){console.error("加载数据失败:",C)}finally{h(!1)}}},[t,T,b]),O=D.useCallback(v=>{g(v),p(C=>({...C,current:1}))},[]),w=D.useCallback(()=>{x.resetFields(),g({}),p(v=>({...v,current:1}))},[x]),P=D.useCallback(()=>{I()},[I]),H=D.useCallback((v,C,B)=>{const $={current:v.current||1,pageSize:v.pageSize||i,total:v.total||0},U={field:B?.field,order:B?.order};p($),y(U)},[i]);return D.useEffect(()=>{const v=Object.keys(o).length>0;(u&&!N.current||v)&&(I(),N.current=!0)},[u,o,I]),z.jsxs("div",{children:[r&&n.length>0&&z.jsx(se.Card,{size:"small",style:{marginBottom:16},children:z.jsxs(se.Form,{form:x,layout:"inline",onFinish:O,initialValues:n.reduce((v,C)=>(C.defaultValue!==void 0&&(v[C.key]=C.defaultValue),v),{}),children:[n.map(v=>z.jsx(se.Form.Item,{name:v.key,label:v.label,children:v.type==="input"?z.jsx(se.Input,{placeholder:v.placeholder||`请输入${v.label}`,style:{width:200}}):z.jsx(se.Select,{placeholder:v.placeholder||`请选择${v.label}`,style:{width:200},allowClear:!0,children:v.options?.map(C=>z.jsx(Vu,{value:C.value,children:C.label},C.value))})},v.key)),z.jsx(se.Form.Item,{children:z.jsxs(se.Space,{children:[z.jsx(se.Button,{type:"primary",htmlType:"submit",icon:z.jsx(lt.SearchOutlined,{}),children:"查询"}),z.jsx(se.Button,{onClick:w,children:"重置"}),a&&z.jsx(se.Button,{icon:z.jsx(lt.ReloadOutlined,{}),onClick:P,children:"刷新"})]})})]})}),z.jsx(se.Table,{...l,columns:A,dataSource:m,loading:E,pagination:{...c,showSizeChanger:!0,showQuickJumper:!0,showTotal:(v,C)=>`第 ${C[0]}-${C[1]} 条/共 ${v} 条`,pageSizeOptions:s},onChange:H,scroll:{x:"max-content",y:"50vh"}})]})};si.__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 Gu=({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||"",u=D.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[o,l]=D.useState(s||void 0),[m,f]=D.useState(64),E=D.useRef(null),h=b=>{l(b),e.setAttribute("data-value",b),t(n,b)};D.useEffect(()=>{l(s||void 0)},[s]);const c=D.useCallback(()=>{if(o!=null&&o!==""){const b=u.find(g=>String(g.value)===String(o));return b?typeof b.label=="string"?b.label:String(b.label??o):String(o)}return r||"请选择"},[o,u,r]),p=D.useCallback(()=>{const b=E.current;if(!b)return;const g=b.querySelector(".ant-select-selection-item"),T=b.querySelector(".ant-select-selection-placeholder"),y=g||T,x=(y?.textContent||"").trim()||c(),S=b.querySelector(".ant-select-selector"),_=y||S||b,N=window.getComputedStyle(_),A=y?N.fontSize:"16px",I=N.fontFamily||"sans-serif",O=N.fontWeight||"400",P=`${N.fontStyle||"normal"} ${O} ${A} ${I}`,v=document.createElement("canvas").getContext("2d"),C=v?Math.ceil((v.font=P,v.measureText(x).width||0)):0;let B=0;if(S){const J=window.getComputedStyle(S);B=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const $=b.querySelector(".ant-select-arrow"),U=$?Math.ceil($.getBoundingClientRect().width):12,V=b.querySelector(".ant-select-clear");let k=0;if(V){const J=window.getComputedStyle(V);J.display!=="none"&&J.visibility!=="hidden"&&(k=Math.ceil(V.getBoundingClientRect().width))}const j=Math.max(36,C+B+U+k+6);f(J=>J===j?J:j)},[c]);return D.useLayoutEffect(()=>{const b=window.requestAnimationFrame(()=>{p()}),g=window.setTimeout(()=>{p()},60);return()=>{window.cancelAnimationFrame(b),window.clearTimeout(g)}},[p]),D.useEffect(()=>{if(!("fonts"in document))return;let b=!1;const g=document.fonts;if(g?.ready)return g.ready.then(()=>{b||p()}),()=>{b=!0}},[p]),Ln.createPortal(z.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:E,style:{display:"inline-block",width:m},children:z.jsx(se.Select,{value:o,onChange:h,placeholder:r||"请选择",style:{width:"100%"},options:u,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:z.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},Yu=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Gu,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`select-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const f=m;(f.classList?.contains("rte-select-host")||f.querySelector?.(".rte-select-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const f=m;(f.classList?.contains("rte-select-host")||f.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Wu(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function ju(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function Xu(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const u=e.split(`
2
+ `);let o=0;for(const h of u){const c=s.measureText(h||" ").width||0;o=Math.max(o,c)}const l=Number.parseFloat(n),m=Number.isFinite(l)?l:0,f=u.reduce((h,c)=>h.length>=c.length?h:c,""),E=m>0?m*Math.max(0,(f||"").length-1):0;return Math.ceil(o+E+r+a)}const Ku=({host:e,onChange:t})=>{const n=e.dataset.key||"",r=e.dataset.placeholder||"",a=e.dataset.tooltip||"",i=e.dataset.allowNewline!=="0",s=D.useMemo(()=>Wu(e.dataset.value||""),[e]),[u,o]=D.useState(s),l=D.useRef(s),m=D.useMemo(()=>{const x=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(x)&&x>0?x:64},[e]),[f,E]=D.useState(m),h=D.useRef(null),c=(u||"").trim().length>0,p=!!a&&!c,b=(u||"").includes(`
3
+ `);D.useEffect(()=>{o(s),l.current=s},[s]),D.useEffect(()=>{l.current=u},[u]),D.useEffect(()=>{e.classList.toggle("rte-variable-multiline",b)},[e,b]);const g=D.useCallback(()=>{const x=h.current;if(!x)return;const S=x.querySelector("textarea");if(!S)return;const _=window.getComputedStyle(S),N=_.fontStyle||"normal",A=_.fontWeight||"400",I=_.fontSize||"16px",O=_.fontFamily||"sans-serif",w=`${N} ${A} ${I} ${O}`,P=Number.parseFloat(_.paddingLeft)||0,H=Number.parseFloat(_.paddingRight)||0,v=(u&&u.length>0?u:r)||" ",C=Xu(v,w,_.letterSpacing||"0",P,H),$=Math.max(24,Math.min(600,C+2));E(U=>U===$?U:$)},[r,u]);D.useEffect(()=>{const x=h.current;if(!x||typeof ResizeObserver>"u")return;let S=0;const _=new ResizeObserver(()=>{S&&window.cancelAnimationFrame(S),S=window.requestAnimationFrame(()=>{t(n,l.current)})});return _.observe(x),()=>{S&&window.cancelAnimationFrame(S),_.disconnect()}},[n,t]),D.useLayoutEffect(()=>{const x=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(x)}},[g]),D.useEffect(()=>{if(!("fonts"in document))return;let x=!1;const S=document.fonts;if(S?.ready)return S.ready.then(()=>{x||g()}),()=>{x=!0}},[g]);const T=x=>{const S=x.target.value??"";o(S),e.setAttribute("data-value",ju(S)),t(n,S)},y=x=>{x.key==="Enter"&&!i&&x.preventDefault()};return Ln.createPortal(z.jsxs("div",{className:`rte-variable-v2-wrapper ${p?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:h,"data-placeholder":r,"data-has-value":c?"1":"0",style:{verticalAlign:"middle",width:b?"100%":f,lineHeight:"30px"},children:[z.jsx(se.Input.TextArea,{value:u,onChange:T,onKeyDown:y,placeholder:r,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),a?z.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${p?"":"hidden"}`,"data-variable-key":n,"data-tooltip":a}):null]}),e)},Qu=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll('[data-variable-render="antd-textarea"]'),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Ku,{host:o,onChange:()=>{const m=()=>{if(!e.current)return;const f=new Event("input",{bubbles:!0});e.current.dispatchEvent(f)};m(),window.requestAnimationFrame(m)}},`variable-v2-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s){if(o.type!=="childList")continue;const l=m=>{m.forEach(f=>{if(f.nodeType!==Node.ELEMENT_NODE)return;const E=f;(E.matches?.('[data-variable-render="antd-textarea"]')||E.querySelector?.('[data-variable-render="antd-textarea"]'))&&(u=!0)})};if(l(o.addedNodes),l(o.removedNodes),u)break}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Ju(e,t=[]){D.useLayoutEffect(()=>{if(!e.current)return;const n=new Map,r=new Map,a=f=>{const E=f.value||f.placeholder||"",h=window.getComputedStyle(f),c=Number.parseFloat(h.paddingLeft)||0,p=Number.parseFloat(h.paddingRight)||0,b=document.createElement("span");b.style.cssText=`
4
4
  position: absolute;
5
5
  visibility: hidden;
6
6
  white-space: nowrap;
@@ -9,70 +9,70 @@
9
9
  font-weight: ${h.fontWeight||"inherit"};
10
10
  letter-spacing: ${h.letterSpacing||"normal"};
11
11
  padding-left: ${c}px;
12
- padding-right: ${f}px;
13
- `,b.textContent=E||"0",document.body.appendChild(b);const y=Math.max(24,Math.min(600,Math.ceil(b.offsetWidth)+2));return document.body.removeChild(b),y},i=p=>{const E=p.target;if(!E)return;let h=E.value;if(h=h.replace(/[^\d]/g,""),h!==""&&h!=="0"){const f=parseInt(h,10);if(Number.isNaN(f))E.value="";else{const b=E.getAttribute("min"),g=E.getAttribute("max"),y=b!==null?parseInt(b,10):0,T=g!==null?parseInt(g,10):1/0,x=Math.min(Math.max(f,y),T);E.value=String(x)}}else if(h==="0"){const f=E.getAttribute("min");0<(f!==null?parseInt(f,10):0)?E.value="":E.value="0"}E.style.width=`${a(E)}px`;const c=E.closest(".rte-number-input-wrap");c&&(c.dataset.hasValue=E.value?"1":"0")},s=p=>{const E=p.key;(E==="-"||E==="."||E===","||E==="e"||E==="E"||E==="+"||E==="="||E===" ")&&p.preventDefault()},u=()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="number-input"]').forEach(E=>{const h=E.closest(".rte-number-input-wrap");h&&(h.dataset.hasValue=E.value?"1":"0",h.dataset.placeholder===void 0&&(h.dataset.placeholder=E.placeholder||""));const c=document.activeElement===E,f=a(E),b=Number.parseFloat(E.style.width||""),g=Number.isFinite(b),y=g?Math.abs(b-f):1/0;E.dataset.rteWidthInited==="1"?!c&&(!g||y>8)&&(E.style.width=`${f}px`):(E.dataset.rteWidthInited="1",!c&&(!g||y>2)&&(E.style.width=`${f}px`)),n.has(E)||(E.addEventListener("input",i,!1),E.addEventListener("keydown",s,!1),n.set(E,i),r.set(E,s))})};u();let o=!1;const l=()=>{o||(o=!0,queueMicrotask(()=>{o=!1,u()}))},m=new MutationObserver(p=>{let E=!1;p.forEach(h=>{h.type==="childList"&&h.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const f=c;f.matches&&(f.matches('[data-type="number-input"]')||f.querySelector('[data-type="number-input"]'))&&(E=!0)}})}),E&&l()});return e.current&&m.observe(e.current,{childList:!0,subtree:!0}),()=>{o=!1,m.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 Zu(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="report-url"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function el(e,t,n=[]){const r=D.useRef(t);D.useEffect(()=>{r.current=t},[t]),D.useEffect(()=>{const a=e.current;if(!a)return;const i=s=>{const u=s.target?.closest?.('[data-type="variable"][data-node-type="markdown-name"]');if(!u||!a.contains(u))return;const o=u.dataset.key;if(!o)return;const l=u.innerText.replace(/[\u200B\n]/g,"").trim();requestAnimationFrame(()=>{u.isConnected&&r.current(o,l)})};return a.addEventListener("focusout",i,!1),()=>{a.removeEventListener("focusout",i,!1)}},[e])}function tl(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}const le=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Xe=e=>e?typeof e=="string"?e:JSON.stringify(e):"",nl=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")},On=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))},oi=e=>`\`\`\`
12
+ padding-right: ${p}px;
13
+ `,b.textContent=E||"0",document.body.appendChild(b);const T=Math.max(24,Math.min(600,Math.ceil(b.offsetWidth)+2));return document.body.removeChild(b),T},i=f=>{const E=f.target;if(!E)return;let h=E.value;if(h=h.replace(/[^\d]/g,""),h!==""&&h!=="0"){const p=parseInt(h,10);if(Number.isNaN(p))E.value="";else{const b=E.getAttribute("min"),g=E.getAttribute("max"),T=b!==null?parseInt(b,10):0,y=g!==null?parseInt(g,10):1/0,x=Math.min(Math.max(p,T),y);E.value=String(x)}}else if(h==="0"){const p=E.getAttribute("min");0<(p!==null?parseInt(p,10):0)?E.value="":E.value="0"}E.style.width=`${a(E)}px`;const c=E.closest(".rte-number-input-wrap");c&&(c.dataset.hasValue=E.value?"1":"0")},s=f=>{const E=f.key;(E==="-"||E==="."||E===","||E==="e"||E==="E"||E==="+"||E==="="||E===" ")&&f.preventDefault()},u=()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="number-input"]').forEach(E=>{const h=E.closest(".rte-number-input-wrap");h&&(h.dataset.hasValue=E.value?"1":"0",h.dataset.placeholder===void 0&&(h.dataset.placeholder=E.placeholder||""));const c=document.activeElement===E,p=a(E),b=Number.parseFloat(E.style.width||""),g=Number.isFinite(b),T=g?Math.abs(b-p):1/0;E.dataset.rteWidthInited==="1"?!c&&(!g||T>8)&&(E.style.width=`${p}px`):(E.dataset.rteWidthInited="1",!c&&(!g||T>2)&&(E.style.width=`${p}px`)),n.has(E)||(E.addEventListener("input",i,!1),E.addEventListener("keydown",s,!1),n.set(E,i),r.set(E,s))})};u();let o=!1;const l=()=>{o||(o=!0,queueMicrotask(()=>{o=!1,u()}))},m=new MutationObserver(f=>{let E=!1;f.forEach(h=>{h.type==="childList"&&h.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const p=c;p.matches&&(p.matches('[data-type="number-input"]')||p.querySelector('[data-type="number-input"]'))&&(E=!0)}})}),E&&l()});return e.current&&m.observe(e.current,{childList:!0,subtree:!0}),()=>{o=!1,m.disconnect(),n.forEach((f,E)=>{E.removeEventListener("input",f,!1)}),n.clear(),r.forEach((f,E)=>{E.removeEventListener("keydown",f,!1)}),r.clear()}},[e,...t])}function Zu(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="report-url"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function el(e,t,n=[]){const r=D.useRef(t);D.useEffect(()=>{r.current=t},[t]),D.useEffect(()=>{const a=e.current;if(!a)return;const i=s=>{const u=s.target?.closest?.('[data-type="variable"][data-node-type="markdown-name"]');if(!u||!a.contains(u))return;const o=u.dataset.key;if(!o)return;const l=u.innerText.replace(/[\u200B\n]/g,"").trim();requestAnimationFrame(()=>{u.isConnected&&r.current(o,l)})};return a.addEventListener("focusout",i,!1),()=>{a.removeEventListener("focusout",i,!1)}},[e])}function tl(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}const le=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Xe=e=>e?typeof e=="string"?e:JSON.stringify(e):"",nl=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")},On=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))},oi=e=>`\`\`\`
14
14
  ${(e||"").replace(/\r\n/g,`
15
15
  `)}
16
16
  \`\`\``,ui=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>${le(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${le(t)}</div>`},rl=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:u,setFiles:o})=>{const l=D.useCallback(p=>{if(!p.target.files){p.target&&(p.target.value=""),i(null),s(null),u(null);return}const E=10*1024*1024,h=f=>f.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(f.name||""),c=f=>h(f)&&f.size>E;if(n&&p.target.files&&p.target.files.length>0){const f=n,b=e.find(x=>x.type==="upload"&&x.key===f),g=Array.from(p.target.files),y=g.filter(x=>!c(x)),T=g.length-y.length;if(T>0&&t.error(`已自动过滤 ${T} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`),b&&typeof b.maxCount=="number"&&typeof b.minCount=="number"){const x=b.maxCount,S=typeof a=="number"?a:0;o(A=>{const N={...A};let _=Math.min(Math.max(S,0),x-1);for(const w of y){for(;_<x&&N[`${f}-${_}`]!=null;)_+=1;if(_>=x)break;N[`${f}-${_}`]=w,_+=1}return N})}}else if(r&&p.target.files[0]){const f=p.target.files[0],b=r;c(f)?t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)"):o(g=>({...g,[b]:f}))}p.target&&(p.target.value=""),i(null),s(null),u(null)},[n,a,r,e,t,s,u,i,o]),m=D.useCallback(p=>{o(E=>{const h={...E};return delete h[p],h})},[o]);return{handleFileChange:l,handleRemoveFile:m}},al=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(o=>o==="report"),i=a>=0?r[a+1]:void 0,s=r[0]&&r[0].length<=5?r[0]:void 0,u=n.searchParams.get("agentId")||void 0;return{url:t,reportId:i,agentId:u,lang:s}},il=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}`}}),Er=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.markdown||"").trim(),i=(t?.content||"").trim()||(a?ui(a):"");return{title:r,content:i.length>0?i:`请补充:${r}`,markdown:a}}),sl=({config:e,editorRef:t,files:n,setFiles:r,multiVariableCounts:a,setMultiVariableCounts:i})=>{const s=D.useRef({}),u=D.useRef({}),o=D.useRef({}),l=D.useCallback(E=>E.find(c=>c.type==="tag")?.text||null,[]),m=D.useRef(e),p=D.useRef(null);D.useEffect(()=>{u.current=n},[n]),D.useEffect(()=>{o.current=a},[a]),D.useEffect(()=>{const E=l(m.current),h=l(e);if(E&&E!==h&&t.current){const c={};t.current.querySelectorAll('[data-type="variable"]').forEach(y=>{const T=y.dataset.key;if(T){const x=y.innerText.replace(/[\u200B\n]/g,"").trim();x&&(c[T]=x)}}),t.current.querySelectorAll('[data-type="select"]').forEach(y=>{const T=y.dataset.key;if(T){const x=(y.getAttribute("data-value")||"").trim();x&&(c[T]=x)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(y=>{const T=y.dataset.key;if(T){const x=y.value.replace(/[\u200B]/g,"").trim();x&&(c[T]=x)}}),s.current[E]={variableValues:c,files:{...u.current},multiVariableCounts:{...o.current}}}if(h&&s.current[h]){const c=s.current[h];p.current=c,r(c.files),i(c.multiVariableCounts)}else if(h){p.current=null;const c={};e.forEach(f=>{f.type==="multi-variable"&&f.key&&(c[f.key]=1)}),i(c),r({})}else p.current=null,i({}),r({});m.current=e},[e,t,l,r,i]),D.useLayoutEffect(()=>{p.current&&t.current&&(t.current.__tempVariableValues=p.current.variableValues,setTimeout(()=>{p.current&&(p.current=null)},0))})},ol=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 o=(decodeURIComponent(s)||"").replace(/\r\n/g,`
17
+ `).trim(),n=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return n?`<pre><code>${le(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${le(t)}</div>`},rl=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:u,setFiles:o})=>{const l=D.useCallback(f=>{if(!f.target.files){f.target&&(f.target.value=""),i(null),s(null),u(null);return}const E=10*1024*1024,h=p=>p.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name||""),c=p=>h(p)&&p.size>E;if(n&&f.target.files&&f.target.files.length>0){const p=n,b=e.find(x=>x.type==="upload"&&x.key===p),g=Array.from(f.target.files),T=g.filter(x=>!c(x)),y=g.length-T.length;if(y>0&&t.error(`已自动过滤 ${y} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`),b&&typeof b.maxCount=="number"&&typeof b.minCount=="number"){const x=b.maxCount,S=typeof a=="number"?a:0;o(_=>{const N={..._};let A=Math.min(Math.max(S,0),x-1);for(const I of T){for(;A<x&&N[`${p}-${A}`]!=null;)A+=1;if(A>=x)break;N[`${p}-${A}`]=I,A+=1}return N})}}else if(r&&f.target.files[0]){const p=f.target.files[0],b=r;c(p)?t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)"):o(g=>({...g,[b]:p}))}f.target&&(f.target.value=""),i(null),s(null),u(null)},[n,a,r,e,t,s,u,i,o]),m=D.useCallback(f=>{o(E=>{const h={...E};return delete h[f],h})},[o]);return{handleFileChange:l,handleRemoveFile:m}},al=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(o=>o==="report"),i=a>=0?r[a+1]:void 0,s=r[0]&&r[0].length<=5?r[0]:void 0,u=n.searchParams.get("agentId")||void 0;return{url:t,reportId:i,agentId:u,lang:s}},il=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}`}}),Er=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.markdown||"").trim(),i=(t?.content||"").trim()||(a?ui(a):"");return{title:r,content:i.length>0?i:`请补充:${r}`,markdown:a}}),sl=({config:e,editorRef:t,files:n,setFiles:r,multiVariableCounts:a,setMultiVariableCounts:i})=>{const s=D.useRef({}),u=D.useRef({}),o=D.useRef({}),l=D.useCallback(E=>E.find(c=>c.type==="tag")?.text||null,[]),m=D.useRef(e),f=D.useRef(null);D.useEffect(()=>{u.current=n},[n]),D.useEffect(()=>{o.current=a},[a]),D.useEffect(()=>{const E=l(m.current),h=l(e);if(E&&E!==h&&t.current){const c={};t.current.querySelectorAll('[data-type="variable"]').forEach(T=>{const y=T.dataset.key;if(y){const x=T.innerText.replace(/[\u200B\n]/g,"").trim();x&&(c[y]=x)}}),t.current.querySelectorAll('[data-type="select"]').forEach(T=>{const y=T.dataset.key;if(y){const x=(T.getAttribute("data-value")||"").trim();x&&(c[y]=x)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(T=>{const y=T.dataset.key;if(y){const x=T.value.replace(/[\u200B]/g,"").trim();x&&(c[y]=x)}}),s.current[E]={variableValues:c,files:{...u.current},multiVariableCounts:{...o.current}}}if(h&&s.current[h]){const c=s.current[h];f.current=c,r(c.files),i(c.multiVariableCounts)}else if(h){f.current=null;const c={};e.forEach(p=>{p.type==="multi-variable"&&p.key&&(c[p.key]=1)}),i(c),r({})}else f.current=null,i({}),r({});m.current=e},[e,t,l,r,i]),D.useLayoutEffect(()=>{f.current&&t.current&&(t.current.__tempVariableValues=f.current.variableValues,setTimeout(()=>{f.current&&(f.current=null)},0))})},ol=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 o=(decodeURIComponent(s)||"").replace(/\r\n/g,`
18
18
  `).trim();o&&(t[a]=o)}catch{const u=s.trim();u&&(t[a]=u)}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 u=Number.parseInt(r.getAttribute("data-module-index")||"0",10),o=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(u)?u:0}`]=o;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)})),t},ul=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:u,setMarkdownNameAnalyzeState:o,editorRef:l,reportAnalyzeRef:m,markdownAnalyzeRef:p,markdownNameAnalyzeRef:E,markdownAnalyzeStateRef:h,markdownNameAnalyzeStateRef:c})=>{const f=D.useCallback(()=>ol(l),[l]),b=D.useCallback((A,N)=>{const _=(N||"").trim();if(!A)return;if(!_){a(P=>({...P,[A]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}const w=r[A];if(w?.lastParsedUrl&&w.lastParsedUrl===_&&w.status==="loading")return;a(P=>({...P,[A]:{...P[A],status:"loading",error:void 0,lastParsedUrl:_}}));const O=al(_);(e||(async P=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
20
- (reportId=${P.reportId||"unknown"}, agentId=${P.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(O).then(P=>{const H=il(P);if(l.current){const v=f();H.forEach((C,B)=>{v[`${A}__module_${B}`]=C.content}),l.current.__tempVariableValues=v}a(v=>({...v,[A]:{status:"success",error:void 0,lastParsedUrl:_,modules:H}}))}).catch(P=>{const H=P instanceof Error?P.message:String(P);a(v=>({...v,[A]:{...v[A]||{modules:[]},status:"error",error:H||"解析失败",lastParsedUrl:_,modules:[]}}))})},[f,l,e,r,a]),g=D.useCallback((A,N)=>{const _=(N||"").trim();if(!A)return;if(!_){s(v=>({...v,[A]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const w=i[A];if(w?.lastParsedText&&w.lastParsedText===_&&w.status==="success")return;if(!t){const v=oi(_),C=Er({modules:[{title:"内容",content:ui(v),markdown:v}]});if(l.current){const B=f();C.forEach(($,U)=>{B[`${A}__module_${U}`]=$.content}),l.current.__tempVariableValues=B}s(B=>({...B,[A]:{status:"success",error:void 0,lastParsedText:_,modules:C}}));return}const O=h.current[A]?.status==="loading";O||s(v=>({...v,[A]:{...v[A],status:"loading",error:void 0,lastParsedText:_}}));const I=500,P=Date.now();setTimeout(()=>{t({text:_}).then(C=>{const B=Er(C),$=Date.now()-P,U=Math.max(0,I-$);setTimeout(()=>{if(l.current){const V=f();B.forEach((k,j)=>{V[`${A}__module_${j}`]=k.content}),l.current.__tempVariableValues=V}s(V=>({...V,[A]:{status:"success",error:void 0,lastParsedText:_,modules:B}}))},U)}).catch(C=>{const B=C instanceof Error?C.message:String(C);s($=>({...$,[A]:{...$[A]||{modules:[]},status:"error",error:B,lastParsedText:_}}))})},O?0:50)},[f,l,t,i,h,s]),y=D.useCallback((A,N)=>{console.log("接受到了,在triggerMarkdownNameAnalyze方法,238行",A,"rawText",N);const _=(N||"").trim();if(!A)return;if(!_){o(v=>({...v,[A]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const w=c.current[A];if(w?.lastParsedText&&w.lastParsedText===_&&w.status==="success"||!n)return;const O=c.current[A]?.status==="loading";O||o(v=>({...v,[A]:{...v[A],status:"loading",error:void 0,lastParsedText:_}}));const I=500,P=Date.now();setTimeout(()=>{n({text:_}).then(C=>{const B=Er(C),$=Date.now()-P,U=Math.max(0,I-$);setTimeout(()=>{if(l.current){const V=f();B.forEach((k,j)=>{V[`${A}__module_${j}`]=k.content}),l.current.__tempVariableValues=V}o(V=>({...V,[A]:{status:"success",error:void 0,lastParsedText:_,modules:B}}))},U)}).catch(C=>{const B=C instanceof Error?C.message:String(C);o($=>({...$,[A]:{...$[A]||{modules:[]},status:"error",error:B,lastParsedText:_}}))})},O?0:50)},[f,l,n,c,o]);D.useEffect(()=>{m.current=b},[m,b]),D.useEffect(()=>{p.current=g},[p,g]),D.useLayoutEffect(()=>{E.current=y},[E,y]);const T=D.useCallback((A,N)=>{m.current(A,N)},[m]),x=D.useCallback((A,N)=>{p.current(A,N)},[p]),S=D.useCallback((A,N)=>{E.current(A,N)},[E]);return{handleReportUrlBlur:T,handleMarkdownBlur:x,handleMarkdownNameBlur:S}},ll=({collapsed:e,collapseTransitionMs:t,contentRef:n,contentBodyRef:r,editorRef:a,debugIdRef:i,setCollapsedContentMaxHeightPx:s,setExpandedContentMaxHeightPx:u,setIsCollapseAnimating:o,effectiveConfig:l,files:m,multiVariableCounts:p,selectPortalsLength:E,datePickerPortalsLength:h,variablePortalsLength:c})=>{const f=D.useCallback(()=>{const g=r.current;if(!g)return;const y=Math.max(0,Math.ceil(g.scrollHeight||0));!Number.isFinite(y)||y<=0||u(T=>T===y?T:y)},[r,u]);D.useLayoutEffect(()=>{if(!e)return;const g=n.current,y=a.current;if(!(!g||!y))try{const T=window.getComputedStyle(y),x=Number.parseFloat(T.paddingTop)||0,S=Number.parseFloat(T.lineHeight)||34,A=Math.max(0,Math.ceil(x+S)),N=y.getBoundingClientRect(),_=document.createRange();_.selectNodeContents(y);const w=Array.from(_.getClientRects());let O=A>0?A:58;if(w.length>0){const I=Math.min(...w.map(v=>v.top)),P=2;let H=0;for(const v of w)Math.abs(v.top-I)<=P&&(H=Math.max(H,v.bottom));if(H>0){const v=Math.max(0,Math.ceil(H-N.top));O=A>0?Math.max(v,A):v}}else O=A>0?A:58;if(!Number.isFinite(O)||O<=0)return;s(I=>I===O?I:O)}catch{}},[e,n,a,l,m,p,E,h,c,s]);const b=D.useRef({ts:0,contentScrollTop:0,bodyScrollTop:0,editorScrollTop:0});return D.useEffect(()=>{if(e)return;const g=n.current,y=r.current,T=a.current;if(!g)return;const x=()=>{b.current={ts:Date.now(),contentScrollTop:g.scrollTop||0,bodyScrollTop:y?.scrollTop||0,editorScrollTop:T?.scrollTop||0}};x();const S=()=>{x(),console.log(`[RTE collapse debug][${i.current}] (expanded) content scroll`,b.current)},A=()=>{x(),console.log(`[RTE collapse debug][${i.current}] (expanded) body scroll`,b.current)};return g.addEventListener("scroll",S,{passive:!0}),y?.addEventListener("scroll",A,{passive:!0}),()=>{g.removeEventListener("scroll",S),y?.removeEventListener("scroll",A)}},[e,r,n,i,a]),D.useEffect(()=>{if(typeof window>"u")return;const g=i.current,y=window;return y.__rteDebug=y.__rteDebug||{},y.__rteDebug[g]={contentEl:n.current,contentBodyEl:r.current,editorEl:a.current},()=>{y.__rteDebug&&y.__rteDebug[g]&&delete y.__rteDebug[g]}},[r,n,i,a]),D.useLayoutEffect(()=>{if(!e)return;const g=n.current,y=r.current,T=a.current;if(!g)return;const x=()=>({content:{scrollTop:g.scrollTop,scrollLeft:g.scrollLeft,scrollHeight:g.scrollHeight,clientHeight:g.clientHeight},body:y?{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft,scrollHeight:y.scrollHeight,clientHeight:y.clientHeight}:void 0,editor:T?{scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,scrollHeight:T.scrollHeight,clientHeight:T.clientHeight}:void 0,style:(()=>{try{const C=window.getComputedStyle(g),B=y?window.getComputedStyle(y):void 0;return{contentOverflow:`${C.overflow}/${C.overflowY}`,bodyOverflow:B?`${B.overflow}/${B.overflowY}`:void 0,bodyMaxHeight:B?.maxHeight,bodyHeight:B?.height}}catch{return}})()}),S=()=>{g.scrollTop=0,g.scrollLeft=0,y&&(y.scrollTop=0,y.scrollLeft=0),T&&(T.scrollTop=0,T.scrollLeft=0)},N=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;console.log(`[RTE collapse debug][${i.current}] pre-collapse lastScrollStateRef`,b.current),console.log(`[RTE collapse debug][${i.current}] lock start (before reset)`,x()),S(),console.log(`[RTE collapse debug][${i.current}] lock start (after reset)`,x()),window.requestAnimationFrame(()=>{console.log(`[RTE collapse debug][${i.current}] lock start (after rAF)`,x())});const _=C=>{C.preventDefault(),C.stopPropagation(),S(),console.log(`[RTE collapse debug][${i.current}] prevented scroll event`,{type:C.type},x())},w=()=>console.log(`[RTE collapse debug][${i.current}] content scroll event`,x()),O=()=>console.log(`[RTE collapse debug][${i.current}] body scroll event`,x());g.addEventListener("wheel",_,{passive:!1}),g.addEventListener("touchmove",_,{passive:!1}),g.addEventListener("scroll",w,{passive:!0}),y&&(y.addEventListener("wheel",_,{passive:!1}),y.addEventListener("touchmove",_,{passive:!1}),y.addEventListener("scroll",O,{passive:!0}));const I=performance.now();let P=0;const H=C=>{S(),C-I<N&&(P=window.requestAnimationFrame(H))};P=window.requestAnimationFrame(H);const v=window.setTimeout(()=>{S(),console.log(`[RTE collapse debug][${i.current}] lock end (after timeout)`,x())},N);return()=>{g.removeEventListener("wheel",_),g.removeEventListener("touchmove",_),g.removeEventListener("scroll",w),y&&(y.removeEventListener("wheel",_),y.removeEventListener("touchmove",_),y.removeEventListener("scroll",O)),window.cancelAnimationFrame(P),window.clearTimeout(v),console.log(`[RTE collapse debug][${i.current}] lock cleanup`,x())}},[e,t,r,n,i,a]),D.useEffect(()=>{if(e)return;let g=0;return g=window.requestAnimationFrame(()=>{f()}),()=>window.cancelAnimationFrame(g)},[e,l,m,p,E,h,c,f]),D.useEffect(()=>{const g=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(g<=0){o(!1);return}o(!0);const y=window.setTimeout(()=>o(!1),g);return()=>window.clearTimeout(y)},[e,t,o]),{measureExpandedContentHeight:f}},cl=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r})=>{D.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()||"",u=t.current.querySelectorAll('[data-type="variable"]'),o=t.current.querySelectorAll('[data-type="upload"]');let l=!1;u.forEach(p=>{(p.textContent?.replace(/[\u200B\n]/g,"").trim()||"")&&(l=!0)}),o.forEach(p=>{p.querySelector(".upload-inner-wrapper.has-file")&&(l=!0)});const m=!s&&!l;n(m),e.length===0&&r(!m)};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])},dl=({config:e,reportAnalyzeState:t,markdownAnalyzeState:n,markdownNameAnalyzeState:r})=>D.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 u=Number.parseInt(r.getAttribute("data-module-index")||"0",10),o=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(u)?u:0}`]=o;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)})),t},ul=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:u,setMarkdownNameAnalyzeState:o,editorRef:l,reportAnalyzeRef:m,markdownAnalyzeRef:f,markdownNameAnalyzeRef:E,markdownAnalyzeStateRef:h,markdownNameAnalyzeStateRef:c})=>{const p=D.useCallback(()=>ol(l),[l]),b=D.useCallback((_,N)=>{const A=(N||"").trim();if(!_)return;if(!A){a(P=>({...P,[_]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}const I=r[_];if(I?.lastParsedUrl&&I.lastParsedUrl===A&&I.status==="loading")return;a(P=>({...P,[_]:{...P[_],status:"loading",error:void 0,lastParsedUrl:A}}));const O=al(A);(e||(async P=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
20
+ (reportId=${P.reportId||"unknown"}, agentId=${P.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(O).then(P=>{const H=il(P);if(l.current){const v=p();H.forEach((C,B)=>{v[`${_}__module_${B}`]=C.content}),l.current.__tempVariableValues=v}a(v=>({...v,[_]:{status:"success",error:void 0,lastParsedUrl:A,modules:H}}))}).catch(P=>{const H=P instanceof Error?P.message:String(P);a(v=>({...v,[_]:{...v[_]||{modules:[]},status:"error",error:H||"解析失败",lastParsedUrl:A,modules:[]}}))})},[p,l,e,r,a]),g=D.useCallback((_,N)=>{const A=(N||"").trim();if(!_)return;if(!A){s(v=>({...v,[_]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const I=i[_];if(I?.lastParsedText&&I.lastParsedText===A&&I.status==="success")return;if(!t){const v=oi(A),C=Er({modules:[{title:"内容",content:ui(v),markdown:v}]});if(l.current){const B=p();C.forEach(($,U)=>{B[`${_}__module_${U}`]=$.content}),l.current.__tempVariableValues=B}s(B=>({...B,[_]:{status:"success",error:void 0,lastParsedText:A,modules:C}}));return}const O=h.current[_]?.status==="loading";O||s(v=>({...v,[_]:{...v[_],status:"loading",error:void 0,lastParsedText:A}}));const w=500,P=Date.now();setTimeout(()=>{t({text:A}).then(C=>{const B=Er(C),$=Date.now()-P,U=Math.max(0,w-$);setTimeout(()=>{if(l.current){const V=p();B.forEach((k,j)=>{V[`${_}__module_${j}`]=k.content}),l.current.__tempVariableValues=V}s(V=>({...V,[_]:{status:"success",error:void 0,lastParsedText:A,modules:B}}))},U)}).catch(C=>{const B=C instanceof Error?C.message:String(C);s($=>({...$,[_]:{...$[_]||{modules:[]},status:"error",error:B,lastParsedText:A}}))})},O?0:50)},[p,l,t,i,h,s]),T=D.useCallback((_,N)=>{console.log("接受到了,在triggerMarkdownNameAnalyze方法,238行",_,"rawText",N);const A=(N||"").trim();if(!_)return;if(!A){o(v=>({...v,[_]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const I=c.current[_];if(I?.lastParsedText&&I.lastParsedText===A&&I.status==="success"||!n)return;const O=c.current[_]?.status==="loading";O||o(v=>({...v,[_]:{...v[_],status:"loading",error:void 0,lastParsedText:A}}));const w=500,P=Date.now();setTimeout(()=>{n({text:A}).then(C=>{const B=Er(C),$=Date.now()-P,U=Math.max(0,w-$);setTimeout(()=>{if(l.current){const V=p();B.forEach((k,j)=>{V[`${_}__module_${j}`]=k.content}),l.current.__tempVariableValues=V}o(V=>({...V,[_]:{status:"success",error:void 0,lastParsedText:A,modules:B}}))},U)}).catch(C=>{const B=C instanceof Error?C.message:String(C);o($=>({...$,[_]:{...$[_]||{modules:[]},status:"error",error:B,lastParsedText:A}}))})},O?0:50)},[p,l,n,c,o]);D.useEffect(()=>{m.current=b},[m,b]),D.useEffect(()=>{f.current=g},[f,g]),D.useLayoutEffect(()=>{E.current=T},[E,T]);const y=D.useCallback((_,N)=>{m.current(_,N)},[m]),x=D.useCallback((_,N)=>{f.current(_,N)},[f]),S=D.useCallback((_,N)=>{E.current(_,N)},[E]);return{handleReportUrlBlur:y,handleMarkdownBlur:x,handleMarkdownNameBlur:S}},ll=({collapsed:e,collapseTransitionMs:t,contentRef:n,contentBodyRef:r,editorRef:a,debugIdRef:i,setCollapsedContentMaxHeightPx:s,setExpandedContentMaxHeightPx:u,setIsCollapseAnimating:o,effectiveConfig:l,files:m,multiVariableCounts:f,selectPortalsLength:E,datePickerPortalsLength:h,variablePortalsLength:c})=>{const p=D.useCallback(()=>{const g=r.current;if(!g)return;const T=Math.max(0,Math.ceil(g.scrollHeight||0));!Number.isFinite(T)||T<=0||u(y=>y===T?y:T)},[r,u]);D.useLayoutEffect(()=>{if(!e)return;const g=n.current,T=a.current;if(!(!g||!T))try{const y=window.getComputedStyle(T),x=Number.parseFloat(y.paddingTop)||0,S=Number.parseFloat(y.lineHeight)||34,_=Math.max(0,Math.ceil(x+S)),N=T.getBoundingClientRect(),A=document.createRange();A.selectNodeContents(T);const I=Array.from(A.getClientRects());let O=_>0?_:58;if(I.length>0){const w=Math.min(...I.map(v=>v.top)),P=2;let H=0;for(const v of I)Math.abs(v.top-w)<=P&&(H=Math.max(H,v.bottom));if(H>0){const v=Math.max(0,Math.ceil(H-N.top));O=_>0?Math.max(v,_):v}}else O=_>0?_:58;if(!Number.isFinite(O)||O<=0)return;s(w=>w===O?w:O)}catch{}},[e,n,a,l,m,f,E,h,c,s]);const b=D.useRef({ts:0,contentScrollTop:0,bodyScrollTop:0,editorScrollTop:0});return D.useEffect(()=>{if(e)return;const g=n.current,T=r.current,y=a.current;if(!g)return;const x=()=>{b.current={ts:Date.now(),contentScrollTop:g.scrollTop||0,bodyScrollTop:T?.scrollTop||0,editorScrollTop:y?.scrollTop||0}};x();const S=()=>{x(),console.log(`[RTE collapse debug][${i.current}] (expanded) content scroll`,b.current)},_=()=>{x(),console.log(`[RTE collapse debug][${i.current}] (expanded) body scroll`,b.current)};return g.addEventListener("scroll",S,{passive:!0}),T?.addEventListener("scroll",_,{passive:!0}),()=>{g.removeEventListener("scroll",S),T?.removeEventListener("scroll",_)}},[e,r,n,i,a]),D.useEffect(()=>{if(typeof window>"u")return;const g=i.current,T=window;return T.__rteDebug=T.__rteDebug||{},T.__rteDebug[g]={contentEl:n.current,contentBodyEl:r.current,editorEl:a.current},()=>{T.__rteDebug&&T.__rteDebug[g]&&delete T.__rteDebug[g]}},[r,n,i,a]),D.useLayoutEffect(()=>{if(!e)return;const g=n.current,T=r.current,y=a.current;if(!g)return;const x=()=>({content:{scrollTop:g.scrollTop,scrollLeft:g.scrollLeft,scrollHeight:g.scrollHeight,clientHeight:g.clientHeight},body:T?{scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,scrollHeight:T.scrollHeight,clientHeight:T.clientHeight}:void 0,editor:y?{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft,scrollHeight:y.scrollHeight,clientHeight:y.clientHeight}:void 0,style:(()=>{try{const C=window.getComputedStyle(g),B=T?window.getComputedStyle(T):void 0;return{contentOverflow:`${C.overflow}/${C.overflowY}`,bodyOverflow:B?`${B.overflow}/${B.overflowY}`:void 0,bodyMaxHeight:B?.maxHeight,bodyHeight:B?.height}}catch{return}})()}),S=()=>{g.scrollTop=0,g.scrollLeft=0,T&&(T.scrollTop=0,T.scrollLeft=0),y&&(y.scrollTop=0,y.scrollLeft=0)},N=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;console.log(`[RTE collapse debug][${i.current}] pre-collapse lastScrollStateRef`,b.current),console.log(`[RTE collapse debug][${i.current}] lock start (before reset)`,x()),S(),console.log(`[RTE collapse debug][${i.current}] lock start (after reset)`,x()),window.requestAnimationFrame(()=>{console.log(`[RTE collapse debug][${i.current}] lock start (after rAF)`,x())});const A=C=>{C.preventDefault(),C.stopPropagation(),S(),console.log(`[RTE collapse debug][${i.current}] prevented scroll event`,{type:C.type},x())},I=()=>console.log(`[RTE collapse debug][${i.current}] content scroll event`,x()),O=()=>console.log(`[RTE collapse debug][${i.current}] body scroll event`,x());g.addEventListener("wheel",A,{passive:!1}),g.addEventListener("touchmove",A,{passive:!1}),g.addEventListener("scroll",I,{passive:!0}),T&&(T.addEventListener("wheel",A,{passive:!1}),T.addEventListener("touchmove",A,{passive:!1}),T.addEventListener("scroll",O,{passive:!0}));const w=performance.now();let P=0;const H=C=>{S(),C-w<N&&(P=window.requestAnimationFrame(H))};P=window.requestAnimationFrame(H);const v=window.setTimeout(()=>{S(),console.log(`[RTE collapse debug][${i.current}] lock end (after timeout)`,x())},N);return()=>{g.removeEventListener("wheel",A),g.removeEventListener("touchmove",A),g.removeEventListener("scroll",I),T&&(T.removeEventListener("wheel",A),T.removeEventListener("touchmove",A),T.removeEventListener("scroll",O)),window.cancelAnimationFrame(P),window.clearTimeout(v),console.log(`[RTE collapse debug][${i.current}] lock cleanup`,x())}},[e,t,r,n,i,a]),D.useEffect(()=>{if(e)return;let g=0;return g=window.requestAnimationFrame(()=>{p()}),()=>window.cancelAnimationFrame(g)},[e,l,m,f,E,h,c,p]),D.useEffect(()=>{const g=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(g<=0){o(!1);return}o(!0);const T=window.setTimeout(()=>o(!1),g);return()=>window.clearTimeout(T)},[e,t,o]),{measureExpandedContentHeight:p}},cl=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r})=>{D.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()||"",u=t.current.querySelectorAll('[data-type="variable"]'),o=t.current.querySelectorAll('[data-type="upload"]');let l=!1;u.forEach(f=>{(f.textContent?.replace(/[\u200B\n]/g,"").trim()||"")&&(l=!0)}),o.forEach(f=>{f.querySelector(".upload-inner-wrapper.has-file")&&(l=!0)});const m=!s&&!l;n(m),e.length===0&&r(!m)};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])},dl=({config:e,reportAnalyzeState:t,markdownAnalyzeState:n,markdownNameAnalyzeState:r})=>D.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 u=t[s.key],o=u?.status??"idle",l=u?.modules??[];o==="loading"&&a.push({type:"text",className:"rte-report-parsing",text:`解析中...
22
22
  `}),o==="error"&&u?.error&&a.push({type:"text",className:"rte-report-error",text:`解析失败:${le(u.error)}
23
- `}),l.length>0&&(l.forEach((m,p)=>{a.push({type:"report-module",key:s.key,moduleIndex:p,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:m.content})}),a.push({type:"text",text:`
23
+ `}),l.length>0&&(l.forEach((m,f)=>{a.push({type:"report-module",key:s.key,moduleIndex:f,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:m.content})}),a.push({type:"text",text:`
24
24
  `}))}if(s.type==="markdown"&&s.key){const u=n[s.key],o=u?.status??"idle",l=u?.modules??[];if(s.key==="tableData")if(o==="loading")a.push({type:"text",className:"rte-markdown-parsing",text:"解析中..."}),a.push({type:"text",text:`
25
- `});else if(o==="success"&&l.length>0){const p=a[a.length-1];p?.type==="text"&&p.text?.endsWith(`
26
- `)&&(a[a.length-1]={...p,text:p.text.slice(0,-1)}),l.forEach((E,h)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:h,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:E.content,exclusionGroup:s.exclusionGroup})}),i=!0}else a.push(s),o==="error"&&u?.error&&a.push({type:"text",className:"rte-markdown-error",text:`解析失败:${le(u.error)}
25
+ `});else if(o==="success"&&l.length>0){const f=a[a.length-1];f?.type==="text"&&f.text?.endsWith(`
26
+ `)&&(a[a.length-1]={...f,text:f.text.slice(0,-1)}),l.forEach((E,h)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:h,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:E.content,exclusionGroup:s.exclusionGroup})}),i=!0}else a.push(s),o==="error"&&u?.error&&a.push({type:"text",className:"rte-markdown-error",text:`解析失败:${le(u.error)}
27
27
  `});else o==="loading"?a.push({type:"text",className:"rte-markdown-parsing",text:`解析中...
28
28
  `}):o==="error"&&u?.error&&a.push({type:"text",className:"rte-markdown-error",text:`解析失败:${le(u.error)}
29
- `}),l.length>0&&o!=="loading"&&l.forEach((p,E)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:E,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:p.content})}),o!=="loading"&&a.push({type:"text",text:`
29
+ `}),l.length>0&&o!=="loading"&&l.forEach((f,E)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:E,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:f.content})}),o!=="loading"&&a.push({type:"text",text:`
30
30
  `})}if(s.type==="markdown-name"&&s.key){const u=r[s.key],o=u?.status??"idle",l=u?.modules??[];o==="loading"&&a.push({type:"text",className:"rte-markdown-parsing",text:`解析中...
31
31
  `}),o==="error"&&u?.error&&a.push({type:"text",className:"rte-markdown-error",text:`解析失败:${le(u.error)}
32
- `}),l.length>0&&o!=="loading"&&(l.forEach((m,p)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:p,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:m.content})}),i=!0)}}return a},[e,n,r,t]);function fl(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",u=a.fontSize||"16px",o=a.fontFamily||"sans-serif";r.font=`${i} ${s} ${u} ${o}`;const m=(e||"").replace(/\r\n/g,`
32
+ `}),l.length>0&&o!=="loading"&&(l.forEach((m,f)=>{a.push({type:"markdown-module",key:s.key,moduleIndex:f,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:m.content})}),i=!0)}}return a},[e,n,r,t]);function fl(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",u=a.fontSize||"16px",o=a.fontFamily||"sans-serif";r.font=`${i} ${s} ${u} ${o}`;const m=(e||"").replace(/\r\n/g,`
33
33
  `).split(`
34
- `);let p=0;for(const c of m){const f=r.measureText(c||" ").width||0;p=Math.max(p,f)}const E=Number.parseFloat(a.letterSpacing||""),h=Number.isFinite(E)?E:0;if(h>0){const c=m.reduce((f,b)=>f.length>=b.length?f:b,"");p+=h*Math.max(0,c.length-1)}return Math.ceil(p)}function Dn(e,t){if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(r=>{if(r.dataset.variableRender==="antd-textarea")return;const a=r.innerText;if(a.replace(/\u200B/g,"").trim().length===0){const E=r.querySelector(".variable-info-icon");Array.from(r.childNodes).forEach(f=>{if(f.nodeType===Node.TEXT_NODE){r.removeChild(f);return}f.nodeType===Node.ELEMENT_NODE&&f.tagName==="BR"&&r.removeChild(f)});const h=document.createTextNode("​");E&&E.parentNode===r?r.insertBefore(h,E):r.firstChild?r.insertBefore(h,r.firstChild):r.appendChild(h),r.classList.add("show-placeholder");const c=r.dataset.placeholder||"";if(c){const g=(()=>{try{const A=fl(c,r);if(!A||!Number.isFinite(A)){const N=On(c);return Math.max(0,N-22)}return A}catch{const A=On(c);return Math.max(0,A-22)}})(),y=(()=>{if(!r.classList.contains("rte-variable-with-icon"))return 0;const A=r.querySelector(".variable-info-icon:not(.hidden)");if(!A)return 24;try{const N=window.getComputedStyle(A),_=Math.ceil(A.getBoundingClientRect().width||0)||16,w=Math.ceil(Number.parseFloat(N.right||"0"))||4;return Math.max(16,Math.min(120,_+w+2))}catch{return 24}})();y>0?r.style.setProperty("--rte-icon-pad-right",`${y}px`):r.style.removeProperty("--rte-icon-pad-right");const T=2,x=y>0?y:8,S=Math.max(24,Math.min(600,Math.ceil(g+8+x+T)));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.querySelector("br")||(a||"").includes(`
35
- `),u=r.offsetHeight>32,o=s||u;r.classList.toggle("rte-variable-multiline",o),r.classList.toggle("rte-variable-force-block",o);const l=r.closest(".rte-inline-group");l&&l.classList.toggle("rte-inline-group-force-block",o);const m=r.closest(".required-upload-group, .required-multi-first");m&&m.classList.toggle("rte-required-group-force-block",o);const p=m?m.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");p&&p!==m&&p.classList.toggle("rte-exclusion-force-block",o)})}function br(e,t,n){if(!e.current)return;const r=c=>{c.classList.contains("rte-richtext-host-expanded")&&(c.style.setProperty("display","flex","important"),c.style.setProperty("flex-direction","column","important"),c.style.setProperty("flex","1 1 auto","important"),c.style.setProperty("min-height","0","important"),c.style.setProperty("width","100%","important"),c.style.setProperty("align-self","stretch","important"))},a=c=>{if(!c.closest('[data-rte-force-hidden="1"]')){if(c.classList.contains("rte-richtext-host-expanded")){r(c);return}if(c.classList.contains("required-upload-group")){c.style.setProperty("display","inline-flex","important");return}if(c.classList.contains("exclusion-wrapper")){c.classList.contains("rte-exclusion-force-block")?c.style.setProperty("display","block","important"):c.style.setProperty("display","inline-block","important");return}c.style.setProperty("display","inline-block","important")}},i=c=>{c.closest('[data-rte-force-hidden="1"]')||(c.style.display="none",c.style.setProperty("display","none","important"))},s=t.some(c=>c.exclusionGroup==="separator");if(s){const c=[];let f=[];for(const N of t){if(N.exclusionGroup==="separator"){f.length&&c.push(f),f=[];continue}!N.exclusionGroup||N.exclusionGroup==="separator"||(N.type==="upload"&&N.key?f.push({type:"upload",key:N.key}):(N.type==="variable"||N.type==="multi-variable"||N.type==="markdown"||N.type==="markdown-name"||N.type==="markdown-module")&&N.key?f.push({type:N.type==="multi-variable"?"multi-variable":"variable",key:N.key}):f.push({type:"other",nodeType:N.type}))}f.length&&c.push(f);const b=N=>{const _=t.find(w=>w.type==="upload"&&w.key===N);return _?typeof _.maxCount=="number"&&_.maxCount>1?_.maxCount:1:0},g=c.map(N=>{for(const _ of N)if(_.type!=="other"){if(_.type==="upload"){if(n[_.key]!==null&&n[_.key]!==void 0)return!0;const w=b(_.key);for(let O=0;O<w;O++){const I=`${_.key}-${O}`;if(n[I]!==null&&n[I]!==void 0)return!0}continue}if(_.type==="multi-variable"){const w=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`);for(const O of w){if(O.dataset.variableRender==="antd-textarea"){const I=O.dataset.value||"";let P=I;try{P=decodeURIComponent(I)}catch{P=I}if(P.trim().length>0)return!0;continue}if(!O.classList.contains("show-placeholder")&&O.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(_.type==="variable"){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${_.key}"]`))return!0;const O=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);if(!O)continue;if(O.dataset.variableRender==="antd-textarea"){const I=O.dataset.value||"";let P=I;try{P=decodeURIComponent(I)}catch{P=I}if(P.trim().length>0)return!0}else if(!O.classList.contains("show-placeholder")&&O.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0;continue}}return!1}),y=g.some(Boolean),T=y?g.findIndex(Boolean):-1,x=N=>{for(const _ of c[N]||[])if(_.type!=="other"){if(_.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${_.key}"], [data-type="upload"][data-key^="${_.key}-"]`).forEach(O=>a(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`).forEach(O=>{const I=O.closest(".exclusion-wrapper")||O;a(I)});continue}if(_.type==="variable"){const w=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);w&&a(w.closest(".exclusion-wrapper")||w),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${_.key}"]`).forEach(I=>{const P=I.closest(".exclusion-wrapper")||I.closest(".rte-markdown-module-container")||I;a(P)})}}},S=N=>{for(const _ of c[N]||[])if(_.type!=="other"){if(_.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${_.key}"], [data-type="upload"][data-key^="${_.key}-"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="variable"){const w=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);w&&i(w.closest(".exclusion-wrapper")||w),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${_.key}"]`).forEach(I=>{const P=I.closest(".exclusion-wrapper")||I.closest(".rte-markdown-module-container")||I;i(P)})}}};for(let N=0;N<c.length;N++)!y||N===T?x(N):S(N);e.current.querySelectorAll('[data-group="separator"]').forEach(N=>{N.closest('[data-rte-force-hidden="1"]')||(y?i(N):N.style.setProperty("display","inline-flex","important"))});return}const u=new Set,o={};for(const c of t)c.exclusionGroup&&c.exclusionGroup!=="separator"&&(u.add(c.exclusionGroup),o[c.exclusionGroup]||(o[c.exclusionGroup]=[]),o[c.exclusionGroup].push({type:c.type,key:c.key,exclusionGroup:c.exclusionGroup}));const l={};for(const c of u){l[c]=!1;for(const f of o[c])if(f.type==="upload"&&f.key){if(n[f.key]!==null&&n[f.key]!==void 0){l[c]=!0;break}const b=t.find(g=>g.type==="upload"&&g.key===f.key);if(b&&typeof b.maxCount=="number")for(let g=0;g<b.maxCount;g++){const y=`${f.key}-${g}`;if(n[y]!==null&&n[y]!==void 0){l[c]=!0;break}}if(l[c])break}else if((f.type==="variable"||f.type==="multi-variable"||f.type==="markdown"||f.type==="markdown-name")&&f.key){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${f.key}"]`)){l[c]=!0;break}const g=f.type==="multi-variable"?e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${f.key}"]`):[e.current.querySelector(`[data-type="variable"][data-key="${f.key}"]`)].filter(Boolean);for(const y of g){if(y.dataset.variableRender==="antd-textarea"){const T=y.dataset.value||"";let x=T;try{x=decodeURIComponent(T)}catch{x=T}if(x.trim().length>0){l[c]=!0;break}continue}if(!y.classList.contains("show-placeholder")&&y.innerText.replace(/[\u200B\n]/g,"").trim().length>0){l[c]=!0;break}}if(l[c])break}}const p=Object.keys(l).filter(c=>l[c]).length>0;let E=null;if(p&&s){for(const c of t)if(c.exclusionGroup&&c.exclusionGroup!=="separator"&&l[c.exclusionGroup]){E=c.exclusionGroup;break}}for(const c of u){const f=e.current.querySelectorAll(`[data-group="${c}"]`);s&&p&&E?c===E?f.forEach(a):f.forEach(i):f.forEach(a)}e.current.querySelectorAll('[data-group="separator"]').forEach(c=>{c.closest('[data-rte-force-hidden="1"]')||(p?i(c):c.style.setProperty("display","inline-flex","important"))})}function li(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const f=c.getAttribute("data-node-type")||"";if(f!=="report-module"&&f!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let y=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){y=S;break}return g.filter((S,A)=>A!==y).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
36
- `).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const f=t[c];if((f.type==="variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"||f.type==="upload"||f.type==="multi-variable"||f.type==="select"||f.type==="textarea"||f.type==="richtext"||f.type==="report-module"||f.type==="markdown-module"||f.type==="datepicker"||f.type==="number-input")&&f.required&&f.key){s.push({exclusionGroup:f.exclusionGroup||"",key:f.key,type:f.type==="multi-variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"?"variable":f.type==="report-module"||f.type==="markdown-module"?"richtext":f.type,isMultiVariable:f.type==="multi-variable",minCount:f.type==="multi-variable"||f.type==="upload"&&typeof f.minCount=="number"?f.minCount:void 0,moduleIndex:f.type==="report-module"||f.type==="markdown-module"?f.moduleIndex:void 0,__index:c});continue}if(f.type==="text"&&f.className?.includes("rte-text-required"))if(f.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===f.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:f.exclusionGroup,key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((f,b)=>{f.exclusionGroup==="separator"&&c.push(b)});for(const f of c){const g=s.filter(x=>typeof x.__index=="number"&&x.__index<f).sort((x,S)=>(S.__index??0)-(x.__index??0))[0],T=s.filter(x=>typeof x.__index=="number"&&x.__index>f).sort((x,S)=>(x.__index??0)-(S.__index??0))[0];g&&T&&o.push([g,T])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const f=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(f.length>0){const b=f[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const f=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(f.length>0){const b=f[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(f=>{f.key&&m.add(f.key)})});const p=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const f=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const y=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(y.length>0){const T=y[0];return i(T)?!0:T.style.display!=="none"}}return!0});if(f.length===0)continue;let b=!1;for(const g of f)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let y=0;const T=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(T.length===0)continue;for(let x=0;x<T.length;x++){const A=T[x].dataset.key;A&&n[A]!=null&&(y+=1)}if(y>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const y=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let T=0;for(const S of Array.from(y)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(T+=1)}const x=g.minCount&&g.minCount>0?g.minCount:1;if(T>=x){b=!0;break}}else{const y=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(y){if(y.classList.contains("show-placeholder"))continue;if(y.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const y=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(y&&(y.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const y=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(y&&(y.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const y=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,T=e.current.querySelector(y);if(T&&a(T).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const y=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(y&&(y.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const y=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(y&&(y.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of p)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let f=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const T=b[g].dataset.key;T&&n[T]!=null&&(f+=1)}if(f<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const y of Array.from(f)){if(y.classList.contains("show-placeholder"))continue;y.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!f){h=!1;break}if(f.classList.contains("show-placeholder")){h=!1;break}if(f.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}r(E&&h)}const pl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s})=>{D.useLayoutEffect(()=>{const u=r.current;if(!u)return;const o=new Map,l=E=>{const h=E.target,c=E.relatedTarget;!h||!r.current||!r.current.contains(h)||c&&r.current.contains(c)||setTimeout(()=>{if(r.current){if(e.length===0){const f=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(f.length>0);return}Dn(r),br(r,t,n),li(r,t,n,a)}},0)};u.addEventListener("blur",l,!0);const m=()=>{if(!r.current)return;o.forEach((c,f)=>{f.removeEventListener("blur",c,!1)}),o.clear();const E=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),h=c=>{c.stopPropagation(),c.stopImmediatePropagation();const f=c.target;if(!f||!r.current||!r.current.contains(f))return;const b=f.closest('[data-type="variable"][data-multi-key]');if(!b||!r.current.contains(b))return;let g=!1;if(o.forEach((w,O)=>{(O===b||O.contains(f))&&(g=!0)}),!g)return;const y=b.dataset.multiKey,T=b.dataset.key,x=b.dataset.index;if(!y||!T||x===void 0)return;const S=c.relatedTarget;if(!(!S||!r.current.contains(S)))return;const N=b.innerText.replace(/[\u200B\n]/g,"").trim(),_=/[、,,\s]+/;if(_.test(N)){const I=N.split(_).map(P=>P.trim()).filter(P=>P.length>0).slice(0,9);if(I.length>1){const P=e.find(H=>H.type==="multi-variable"&&H.key===y);if(P){const H=i[y]||1,v=parseInt(x,10),C=P.maxCount||9,B=[];for(let j=0;j<H;j++){const J=`${y}_${j}`,R=r.current.querySelector(`[data-type="variable"][data-key="${J}"][data-multi-key="${y}"]`);if(R){const te=R.innerText.replace(/[\u200B\n]/g,"").trim();B.push(te)}}B.splice(v,1,...I);const $=B.slice(0,C);$.length>0&&$[$.length-1]!==""&&$.length<C&&$.push("");const U=Math.max($.length,1),V={};$.forEach((j,J)=>{j&&(V[`${y}_${J}`]=j)}),r.current.querySelectorAll('[data-type="variable"]').forEach(j=>{const J=j.dataset.key,R=j.dataset.multiKey;if(J&&R!==y){const te=j.innerText.replace(/[\u200B\n]/g,"").trim();te&&(V[J]=te)}}),r.current.__tempVariableValues=V,s(j=>({...j,[y]:U}))}}}};E.forEach(c=>{c.addEventListener("blur",h,!1),o.set(c,h)})},p=setTimeout(()=>{m()},0);return()=>{clearTimeout(p),u.removeEventListener("blur",l,!0),o.forEach((E,h)=>{h.removeEventListener("blur",E,!1)}),o.clear()}},[e,t,r,n,i,a,s])},hl=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:u,onBeforeFilePickerOpen:o,files:l,setFiles:m,handleRemoveFile:p,setActiveBatchKey:E,setActiveBatchStartIndex:h,setActiveFileKey:c,isDraggingRef:f,richtextPrevScrollTopRef:b})=>{const g=(...T)=>{},y=T=>{try{const x=window.getSelection();if(!x)return g(T,"no selection");const S=x.rangeCount>0?x.getRangeAt(0):null;g(T,{rangeCount:x.rangeCount,isCollapsed:x.isCollapsed,anchorNode:x.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":x.anchorNode?.nodeName,anchorOffset:x.anchorOffset,focusNode:x.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":x.focusNode?.nodeName,focusOffset:x.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 D.useCallback(T=>{if(e)return;t&&n?.(!1);const x=T.target;if(g("click",{tag:x.tagName,cls:x.className}),y("before click"),x.closest('[data-type="datepicker"]'))return;if(x.closest(".tag-close-btn")){T.preventDefault(),T.stopPropagation();return}if(r.length===0)return;const N=(v,C)=>{if(!i.current)return;Array.from(i.current.children).forEach($=>{if($!==v)if(C)$.dataset.prevDisplay===void 0&&($.dataset.prevDisplay=$.style.display||""),$.dataset.rteForceHidden="1",$.style.setProperty("display","none","important");else{if($.dataset.prevDisplay!==void 0){const U=$.dataset.prevDisplay;U?$.style.display=U:$.style.removeProperty("display"),delete $.dataset.prevDisplay}else $.style.removeProperty("display");delete $.dataset.rteForceHidden}})},_=x.closest(".rte-textarea-toggle");if(_){T.preventDefault(),T.stopPropagation();const v=_.closest(".rte-textarea-wrapper"),C=v?.querySelector('[data-type="textarea"]'),$=!(_.getAttribute("data-expanded")==="true");_.setAttribute("data-expanded",String($)),_.textContent=$?"收起":"展开",v&&v.classList.toggle("rte-textarea-expanded",$);const U=v?.closest(".rte-textarea-required");if(U?U.classList.toggle("rte-textarea-overlay",$):v&&v.classList.toggle("rte-textarea-overlay",$),C)if($)C.classList.add("rte-textarea-expanded"),C.style.maxHeight="none",C.style.height="100%";else{C.classList.remove("rte-textarea-expanded");const V=C.dataset.maxHeight||"252";C.style.maxHeight=`${V}px`,C.style.height="auto"}i.current&&($?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const w=x.closest(".rte-richtext-toggle");if(w){T.preventDefault(),T.stopPropagation();const v=w.closest(".rte-richtext-wrapper"),C=v?.querySelector('[data-type="richtext"]'),$=!(w.getAttribute("data-expanded")==="true");((j,J)=>{j.setAttribute("data-expanded",String(J)),j.innerHTML=J?'<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>'})(w,$);const V=v?.closest(".rte-richtext-required");V?V.classList.toggle("rte-richtext-expanded",$):v&&v.classList.toggle("rte-richtext-expanded",$);const k=v?.closest(".exclusion-wrapper")||v?.parentElement;if(C&&($?(C.style.height="100%",C.style.overflow="auto"):(C.style.height="",C.style.overflow="")),k&&(k.classList.toggle("rte-richtext-host-expanded",$),N(k,$)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",$),s.current?.classList.toggle("rte-richtext-container-expanded",$),s.current)if($){const j=Math.ceil(s.current.getBoundingClientRect().height||0);j>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${j}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if($)b.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const j=b.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=j)},0)}}return}if(x.closest('[data-type="text"]')){T.preventDefault(),T.stopPropagation();const v=window.getSelection();v&&v.removeAllRanges();return}if(a&&x.closest(".tag-node")){T.preventDefault(),T.stopPropagation();const C=window.getSelection();C&&C.removeAllRanges();return}const I=x.closest('[data-type="variable"]');if(I){if(f.current)return;if(I.dataset.variableRender!=="antd-textarea"){const v=!!x.closest(".variable-info-icon"),C=I.classList.contains("show-placeholder")||(I.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(g("v1 variable click",{key:I.dataset.key,isPlaceholder:C,isOnIcon:v,classes:I.className,innerText:I.innerText}),C&&!v){T.preventDefault();const B=()=>{try{I.focus();const $=window.getSelection();if(!$)return;const U=document.createTreeWalker(I,NodeFilter.SHOW_TEXT),V=U.nextNode()?U.currentNode:null,k=document.createRange();V?(k.setStart(V,0),k.collapse(!0)):(k.selectNodeContents(I),k.collapse(!0)),$.removeAllRanges(),$.addRange(k),y("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(B),window.requestAnimationFrame(()=>y("post-raf (click)"))},0)}}setTimeout(()=>{const v=window.getSelection();v&&!v.isCollapsed||Dn(i)},10);return}const P=x.closest(".file-remove-btn");if(P){T.preventDefault(),T.stopPropagation();const v=P.closest('[data-type="upload"]'),C=v?.dataset.key,B=v?.dataset.batchKey;if(C)if(B){const $=r.find(U=>U.type==="upload"&&U.key===B);if($&&typeof $.maxCount=="number"&&typeof $.minCount=="number"){const U=$.maxCount;m(V=>{const k={...V},j=[];for(let J=0;J<U;J++){const R=`${B}-${J}`,te=k[R];te!=null&&R!==C&&j.push(te)}for(let J=0;J<U;J++)delete k[`${B}-${J}`];return j.forEach((J,R)=>{k[`${B}-${R}`]=J}),k})}else p(C)}else p(C);return}const H=x.closest('[data-type="upload"]');if(H){const v=H.dataset.key,C=H.dataset.batchKey,B=H.dataset.batchIndex;if(v){const $=C||v,U=r.find(V=>V.type==="upload"&&V.key===$);if(u.current&&(U?.accept?u.current.accept=U.accept:U?.acceptType==="image"?u.current.accept="image/*":U?.acceptType==="file"?u.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":u.current.accept=""),C){const V=r.find(k=>k.type==="upload"&&k.key===C);if(V&&typeof V.maxCount=="number"&&typeof V.minCount=="number"){const k=V.maxCount,j=l[v]!=null,J=B!=null?Number.parseInt(B,10):NaN;if(j){u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click();return}let R=0;for(let te=0;te<k;te++)l[`${C}-${te}`]!=null&&(R+=1);R<k&&u.current?(u.current.multiple=!0,E(C),h(Number.isFinite(J)?J:null),c(null),o?.(),u.current.click()):(u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click())}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}return}},[t,r,s,e,i,u,o,l,p,f,a,n,b,E,h,c,m])},ml=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:u,measureExpandedContentHeight:o,effectiveConfig:l,files:m,multiVariableCounts:p,setMultiVariableCounts:E,savedCursorRef:h})=>D.useCallback(()=>{if(e.length===0){if(t.current){const b=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(b),r(!b)}return}if(Dn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||a(T=>{const x=T[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?T:{...T,[g]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||i(T=>{const x=T[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?T:{...T,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||s(T=>{const x=T[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?T:{...T,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||(i(T=>{const x=T[g];return!x||x.status==="idle"?T:{...T,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(T=>{const x=T[g];return!x||x.status==="idle"?T:{...T,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(b=>{if(b.dataset.variableRender==="antd-textarea")return;const g=!!b.querySelector("br")||(b.innerText||"").includes(`
37
- `),y=b.offsetHeight>32,T=g||y;b.classList.toggle("rte-variable-multiline",T),b.classList.toggle("rte-variable-force-block",T);const x=b.closest(".rte-inline-group");x&&x.classList.toggle("rte-inline-group-force-block",T);const S=b.closest(".required-upload-group, .required-multi-first");S&&S.classList.toggle("rte-required-group-force-block",T);const A=b.querySelector(".variable-info-icon");if(A){let N=!1;const _=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:w=>A.contains(w)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;_.nextNode();)if(_.currentNode.textContent?.replace(/[\u200B\n]/g,"").trim()){N=!0;break}N?A.classList.add("hidden"):A.classList.remove("hidden"),b.classList.toggle("rte-variable-with-icon",!A.classList.contains("hidden"))}}),u||window.requestAnimationFrame(()=>{o()}),br(t,l,m),li(t,l,m,r),!t.current)return;e.filter(f=>f.type==="multi-variable"&&f.key).forEach(f=>{if(!f.key)return;const b=f.maxCount||9,g=p[f.key]||1,y=[];for(let N=0;N<g;N++){const _=`${f.key}_${N}`,w=t.current.querySelector(`[data-type="variable"][data-key="${_}"][data-multi-key="${f.key}"]`);if(w){const O=(w.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
38
- `).trim();y.push(O)}}const x=(y[y.length-1]||"")==="";let S=!1,A=-1;for(let N=0;N<y.length-1;N++)if(y[N]===""){S=!0,A=N;break}if(S&&A>=0){const N=window.getSelection();if(N&&N.rangeCount>0){const P=N.getRangeAt(0),H=P.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const C=v.dataset.key;if(C){const B=document.createRange();B.setStartBefore(v),B.setEnd(P.startContainer,P.startOffset);const $=B.toString().length;h.current={key:C,offset:$}}}}const _=[...y];for(let P=A;P<_.length-1;P++)_[P]=_[P+1];_.pop();const w={};_.forEach((P,H)=>{P&&(w[`${f.key}_${H}`]=P)});const O=Math.max(x?_.length:_.length+1,1);t.current.querySelectorAll('[data-type="variable"]').forEach(P=>{const H=P.dataset.key,v=P.dataset.multiKey;if(H&&v!==f.key){const C=(P.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
39
- `).trim();C&&(w[H]=C)}}),t.current.__tempVariableValues=w,E(P=>({...P,[f.key]:O}));return}if(!x){const N=g-1,_=`${f.key}_${N}`,w=t.current.querySelector(`[data-type="variable"][data-key="${_}"][data-multi-key="${f.key}"]`);if(w&&(w.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
40
- `).trim().length>0&&g<b){const I=window.getSelection();if(I&&I.rangeCount>0){const P=I.getRangeAt(0),H=P.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const C=v.dataset.key;if(C){const B=document.createRange();B.setStartBefore(v),B.setEnd(P.startContainer,P.startOffset);const $=B.toString().length;h.current={key:C,offset:$}}}}E(P=>({...P,[f.key]:g+1}))}}})},[u,e,t,l,m,o,p,h,n,r,i,s,E,a]),gl=({disabled:e,lockStructure:t,config:n,editorRef:r,handleInput:a})=>D.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 o=i.target,l=o?.closest?.('[data-type="variable"]'),m=!!o?.closest?.('[data-type="richtext"]'),p=o?.tagName==="TEXTAREA"||!!o?.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 f=l.dataset.multiKey;if(f)return n.find(T=>T.type==="multi-variable"&&T.key===f)?.allowNewline!==!1;const b=l.dataset.key;return n.find(y=>y.type==="variable"&&y.key===b)?.allowNewline!==!1})()){i.preventDefault();return}i.preventDefault();const c=window.getSelection();if(c&&c.rangeCount>0){const f=c.getRangeAt(0);f.deleteContents();const b=document.createElement("br");f.insertNode(b);const g=document.createTextNode("​");b.parentNode?.insertBefore(g,b.nextSibling),f.setStart(g,0),f.collapse(!0),c.removeAllRanges(),c.addRange(f)}a();return}if(!m&&!p){i.preventDefault();return}}const u=window.getSelection();if(u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest('[data-type="text"]'):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest('[data-type="text"]'))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(t&&u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest(".tag-node"):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest(".tag-node"))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(i.key==="Escape"&&r.current){if(t){i.preventDefault();return}r.current.innerHTML="",r.current.focus()}if(i.key==="Backspace"){const o=window.getSelection();if(o&&o.rangeCount>0){const l=o.getRangeAt(0),m=o.anchorNode;if(t){let E=null,h=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?(E=m.closest(".tag-node"),h=m.closest('[data-type="text"]')):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(E=m.parentElement.closest(".tag-node"),h=m.parentElement.closest('[data-type="text"]'))),(E||h)&&l.collapsed&&l.startOffset===0){i.preventDefault();return}}let p=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?p=m.closest('[data-type="variable"]'):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(p=m.parentElement.closest('[data-type="variable"]'))),p){if(!l.collapsed)return;const E=p.innerText;if(E==="​"||E===""){i.preventDefault();return}if((()=>{try{const f=document.createRange();f.selectNodeContents(p),f.setEnd(l.startContainer,l.startOffset);const b=f.cloneContents(),g=document.createTreeWalker(b,NodeFilter.SHOW_ALL);for(;g.nextNode();){const y=g.currentNode;if(y.nodeType===Node.ELEMENT_NODE){if(y.tagName==="BR")return!1}else if(y.nodeType===Node.TEXT_NODE&&(y.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]),El=({lockStructure:e,onAgentExit:t,editorRef:n,setPopoverVisible:r,isDraggingRef:a,mouseDownPosRef:i})=>{const s=(...E)=>{},u=E=>{try{const h=window.getSelection();if(!h)return s(E,"no selection");const c=h.rangeCount>0?h.getRangeAt(0):null;s(E,{rangeCount:h.rangeCount,isCollapsed:h.isCollapsed,anchorNode:h.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":h.anchorNode?.nodeName,anchorOffset:h.anchorOffset,focusNode:h.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":h.focusNode?.nodeName,focusOffset:h.focusOffset,range:c?{startContainer:c.startContainer.nodeType===Node.TEXT_NODE?"TEXT":c.startContainer.nodeName,startOffset:c.startOffset,endContainer:c.endContainer.nodeType===Node.TEXT_NODE?"TEXT":c.endContainer.nodeName,endOffset:c.endOffset}:null})}catch{}},o=D.useCallback(E=>{const h=E.target;if(s("mousedown",{tag:h.tagName,cls:h.className}),u("before mousedown"),h.closest(".rte-datepicker-wrapper")||h.closest(".rte-datepicker-host")||h.closest(".rte-select-wrapper")||h.closest(".rte-select-host")||h.closest(".ant-select-dropdown"))return;if(h.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 b=h.closest(".tag-node"),g=h.closest('[data-type="text"]');if(b||g){E.preventDefault(),E.stopPropagation();const y=window.getSelection();y&&y.removeAllRanges();return}}const f=h.closest('[data-type="variable"]');if(f){if(s("mousedown on variable",{key:f.dataset.key,multiKey:f.dataset.multiKey,nodeType:f.getAttribute("data-node-type")||"",render:f.dataset.variableRender||"v1",classes:f.className}),f.dataset.variableRender==="antd-textarea")return;const b=!!h.closest(".variable-info-icon"),g=f.classList.contains("show-placeholder")||(f.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(s("v1 variable mousedown",{isPlaceholder:g,isOnIcon:b,innerText:f.innerText}),g&&!b){E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mousedown)");const y=window.getSelection();if(!y)return;const T=f;T.focus();const x=document.createTreeWalker(T,NodeFilter.SHOW_TEXT),S=x.nextNode()?x.currentNode:null,A=document.createRange();S?(A.setStart(S,0),A.collapse(!0)):(A.selectNodeContents(T),A.collapse(!0)),y.removeAllRanges(),y.addRange(A),u("raf after setRange (mousedown)")});return}return}i.current={x:E.clientX,y:E.clientY},a.current=!1,h.closest(".file-remove-btn")&&(E.preventDefault(),E.stopPropagation())},[n,a,e,i,t,r]),l=D.useCallback(E=>{if(!E.target.closest('[data-type="variable"]')&&i.current){const f=Math.abs(E.clientX-i.current.x),b=Math.abs(E.clientY-i.current.y);(f>3||b>3)&&(a.current=!0)}},[a,i]),m=D.useCallback(E=>{const h=E.target;s("mouseup",{tag:h.tagName,cls:h.className}),u("before mouseup");const c=h.closest('[data-type="variable"]');if(c){if(c.dataset.variableRender!=="antd-textarea"){const f=!!h.closest(".variable-info-icon"),b=c.classList.contains("show-placeholder")||(c.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;s("v1 variable mouseup",{key:c.dataset.key,isPlaceholder:b,isOnIcon:f,classes:c.className}),b&&!f&&(E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mouseup)");const g=window.getSelection();if(!g)return;const y=c;y.focus();const T=document.createTreeWalker(y,NodeFilter.SHOW_TEXT),x=T.nextNode()?T.currentNode:null,S=document.createRange();x?(S.setStart(x,0),S.collapse(!0)):(S.selectNodeContents(y),S.collapse(!0)),g.removeAllRanges(),g.addRange(S),u("raf after setRange (mouseup)")}))}i.current=null,a.current=!1;return}i.current=null,a.current=!1},[a,i]),p=D.useCallback(E=>{const c=E.target.closest('[data-type="variable"]');if(c){const f=window.getSelection();if(f){const b=document.createRange(),g=c.textContent||"";if(g.replace(/\u200B/g,"")){let T=0,x=g.length;g.startsWith("​")&&(T=1),g.endsWith("​")&&g.length>1&&(x=g.length-1);const S=c.firstChild;S&&S.nodeType===Node.TEXT_NODE?(b.setStart(S,T),b.setEnd(S,x)):b.selectNodeContents(c)}else b.selectNodeContents(c),b.collapse(!0);f.removeAllRanges(),f.addRange(b)}}},[]);return{handleMouseDown:o,handleMouseMove:l,handleMouseUp:m,handleDoubleClick:p}},bl=({disabled:e,config:t,multiVariableCounts:n,setMultiVariableCounts:r,editorRef:a,handleInput:i,markdownAnalyzeRef:s,reportAnalyzeRef:u,markdownNameAnalyzeRef:o,markdownAnalyzeStateRef:l,markdownRawTextRef:m,setMarkdownAnalyzeState:p})=>D.useCallback(E=>{const h=E.target;if(h&&(h.tagName==="TEXTAREA"||h.tagName==="INPUT")&&h.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){E.preventDefault();return}E.preventDefault();const f=(E.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
41
- `).replace(/\n+$/g,""),b=window.getSelection();if(b&&b.rangeCount>0){const x=b.anchorNode;if(x){let S=null;if(x.nodeType===Node.ELEMENT_NODE?S=x.closest('[data-type="variable"]'):x.nodeType===Node.TEXT_NODE&&x.parentElement&&(S=x.parentElement.closest('[data-type="variable"]')),S){const A=S.dataset.multiKey;if(A){const w=/[、,,\s\n\r\t]+/,O=f.split(w).map(I=>I.trim()).filter(I=>I.length>0);if(O.length>1){const I=parseInt(S.dataset.index||"0",10),P=t.find(j=>j.type==="multi-variable"&&j.key===A)?.maxCount||9,H=n[A]||1,v=Math.min(I+O.length,P);v>H&&r(k=>({...k,[A]:v}));const C=[];for(let k=0;k<H;k++){const j=`${A}_${k}`,J=a.current.querySelector(`[data-type="variable"][data-key="${j}"][data-multi-key="${A}"]`);if(J){const R=J.innerText.replace(/[\u200B\n]/g,"").trim();C.push(R)}}C.splice(I,1,...O.slice(0,P-I));const B=C.slice(0,P);B.length>0&&B[B.length-1]!==""&&B.length<P&&B.push("");const $=Math.max(B.length,1),U={};B.forEach((k,j)=>{k&&(U[`${A}_${j}`]=k)}),a.current.querySelectorAll('[data-type="variable"]').forEach(k=>{const j=k.dataset.key,J=k.dataset.multiKey;if(j&&J!==A){const R=k.innerText.replace(/[\u200B\n]/g,"").trim();R&&(U[j]=R)}}),a.current.__tempVariableValues=U,r(k=>({...k,[A]:$}));return}}const N=S.getAttribute("data-node-type")||"";if(!(N==="markdown"||N==="report-url"||N==="markdown-name")){const w=(()=>{const I=S.getAttribute("data-node-type")||"";if(I==="report-url"||I==="markdown"||I==="markdown-name")return!1;const P=S.dataset.multiKey;if(P)return t.find(B=>B.type==="multi-variable"&&B.key===P)?.allowNewline!==!1;const H=S.dataset.key;return t.find(C=>C.type==="variable"&&C.key===H)?.allowNewline!==!1})(),O=window.getSelection();if(O&&O.rangeCount>0){const I=O.getRangeAt(0);I.deleteContents();const P=document.createDocumentFragment(),v=(w?f:f.replace(/\n+/g," ")).split(`
42
- `);for(let B=0;B<v.length;B++)P.appendChild(document.createTextNode(v[B])),w&&B<v.length-1&&P.appendChild(document.createElement("br"));I.insertNode(P),O.removeAllRanges();const C=document.createRange();C.selectNodeContents(S),C.collapse(!1),O.addRange(C)}i();return}}}}let g=!1,y="";const T=window.getSelection();if(T&&T.rangeCount>0){const x=T.anchorNode;if(x){let S=null;if(x.nodeType===Node.ELEMENT_NODE?S=x.closest('[data-type="variable"]'):x.nodeType===Node.TEXT_NODE&&x.parentElement&&(S=x.parentElement.closest('[data-type="variable"]')),S){const A=S.getAttribute("data-node-type")||"",N=S.dataset.key;if(A==="markdown"&&N&&/20\d{2}-\d{2}-\d{2}/.test(f))g=!0,y=N,m.current[N]=f,p(_=>({..._,[N]:{..._[N],status:"loading",error:void 0}}));else if(A==="report-url"&&N){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();u.current(N,_)},0);return}else if(A==="markdown-name"&&N){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();o.current(N,_)},0);return}}}}if(g&&y){setTimeout(()=>{s.current(y,f)},0);return}document.execCommand("insertText",!1,f),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(f)&&l.current.tableData?.status==="success"&&(p(S=>({...S,tableData:{status:"loading",modules:[],lastParsedText:f,error:void 0}})),setTimeout(()=>{m.current.tableData=f,s.current("tableData",f)},0))},0)},[t,e,a,i,s,l,m,n,u,p,r]),yl=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:u,markdownAnalyzeState:o,markdownNameAnalyzeState:l})=>D.useCallback(()=>{if(r||a||i||!s||!u.current)return;if(e.length===0){const f=u.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!f)return;if(n(f,f),u.current){u.current.textContent="";const b=new Event("input",{bubbles:!0});u.current.dispatchEvent(b)}return}const m=u.current;let p="";const E={},h=f=>{if(!(f.nodeType===Node.ELEMENT_NODE&&f.style.display==="none")){if(f.nodeType===Node.TEXT_NODE)p+=(f.textContent||"").replace(/\u200B/g,"");else if(f.nodeType===Node.ELEMENT_NODE){const b=f,g=b.dataset.type,y=b.dataset.key;if(g==="variable"&&y){let T="";const x=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:A=>{const N=b.querySelector(".variable-info-icon");return N&&N.contains(A)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;x.nextNode();)T+=x.currentNode.textContent||"";const S=T.replace(/[\u200B\n]/g,"").trim();if(S){const A=b.dataset.multiKey;if(A){(!E[A]||!Array.isArray(E[A]))&&(E[A]=[]);const N=E[A];N.push(S),N.length>1&&(p+=" "),p+=S}else E[y]=S,p+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const N=E.url;Array.isArray(N)?N.push(S):E.url=[String(N),S]}if(b.dataset.nodeType==="markdown-name"){const N=`${y}__sourceText`;E[N]===void 0&&(E[N]=S)}if(b.dataset.nodeType==="markdown"){const N=b.dataset.sourceTextKey||`${y}__sourceText`;if(E[N]===void 0)E[N]=S;else{const w=E[N];Array.isArray(w)?w.push(S):E[N]=[String(w),S]}const _=`${y}__markdown`;E[_]===void 0&&(E[_]=[oi(S)])}}}else if(g==="select"&&y){const T=(b.getAttribute("data-value")||"").trim();T&&(E[y]=T,p+=T)}else if(g==="textarea"&&y){const x=(b.value||"").replace(/\u200B/g,"").trim();x&&(E[y]=x,p+=x)}else if(g==="richtext"&&y){const T=b,x=T.dataset.nodeType,S=(T.textContent||"").replace(/\u200B/g,"").trim();if(S)if(x==="report-module"||x==="markdown-module"){(!E[y]||!Array.isArray(E[y]))&&(E[y]=[]);const A=E[y];A.push(S),A.length>1&&(p+=" "),p+=S}else E[y]=S,p+=S}else if(g==="datepicker"&&y){const x=(b.getAttribute("data-value")||"").trim();if(x)if(x.includes(",")){const S=x.split(",");S.length===2?(E[y]=S,p+=`[${S[0]}, ${S[1]}]`):(E[y]=x,p+=x)}else E[y]=x,p+=x}else if(g==="number-input"&&y){const x=(b.value||"").trim();x&&(E[y]=x,p+=x)}else if(g==="upload"&&y){const T=b.dataset.batchKey;if(T){const x=e.find(S=>S.type==="upload"&&S.key===T);if(x&&typeof x.maxCount=="number"&&typeof x.minCount=="number"){const S=[];for(let A=0;A<x.maxCount;A++){const N=`${T}-${A}`,_=t[N];_&&S.push(_)}E[T]||(E[T]=S.length>0?S:null,S.length>0&&(p+=` [附带${S.length}个文件: ${S.map(A=>typeof A=="string"?A.split("/").pop()||"file":A.name).join(", ")}] `))}else if(E[y]=t[y]??null,t[y]){const S=t[y];p+=` [附带文件: ${typeof S=="string"?S.split("/").pop()||"file":S.name}] `}}else if(E[y]=t[y]??null,t[y]){const x=t[y];p+=` [附带文件: ${typeof x=="string"?x.split("/").pop()||"file":x.name}] `}}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!g&&b.classList.contains("tag-node")?p+=b.innerText:b.childNodes.forEach(h)}}}};if(m.childNodes.forEach(h),p=p.trim(),!p)return;Object.keys(o).forEach(f=>{const b=o[f];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(y=>(y?.markdown||"").trim()).filter(y=>y.length>0);g.length!==0&&(E[`${f}__markdown`]=g)}),Object.keys(l).forEach(f=>{const b=l[f];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(y=>(y?.markdown||"").trim()).filter(y=>y.length>0);g.length!==0&&(E[`${f}__markdown`]=g)});const c=new FormData;c.append("fullPrompt",p),Object.keys(E).forEach(f=>{const b=E[f];if(b!=null)if(b instanceof File)c.append(f,b);else if(Array.isArray(b)){const g=e.some(S=>S.type==="multi-variable"&&S.key===f),y=e.some(S=>S.type==="report-url"&&S.key===f),T=f.endsWith("__markdown");g||y||T||f==="url"?b.forEach(S=>{S!=null&&S!==""&&c.append(f,String(S))}):b.forEach((S,A)=>{S!=null&&(S instanceof File?c.append(`${f}[${A}]`,S):typeof S=="string"?c.append(`${f}[${A}]`,S):c.append(`${f}[${A}]`,String(S)))})}else typeof b=="string"?c.append(f,b):c.append(f,String(b))}),n(c,p)},[e,t,n,r,a,i,s,u,o,l]);function ci(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function yr(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]:ci(t[r])&&ci(e[r])&&Object.keys(t[r]).length>0&&yr(e[r],t[r])})}const di={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 Tt(){const e=typeof document<"u"?document:{};return yr(e,di),e}const Tl={document:di,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 De(){const e=typeof window<"u"?window:{};return yr(e,Tl),e}function xl(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function Cl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function fi(e,t=0){return setTimeout(e,t)}function Pn(){return Date.now()}function Sl(e){const t=De();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Al(e,t="x"){const n=De();let r,a,i;const s=Sl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(u=>u.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 Mn(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function _l(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function $e(...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&&!_l(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,u=i.length;s<u;s+=1){const o=i[s],l=Object.getOwnPropertyDescriptor(a,o);l!==void 0&&l.enumerable&&(Mn(t[o])&&Mn(a[o])?a[o].__swiper__?t[o]=a[o]:$e(t[o],a[o]):!Mn(t[o])&&Mn(a[o])?(t[o]={},a[o].__swiper__?t[o]=a[o]:$e(t[o],a[o])):t[o]=a[o])}}}return t}function It(e,t,n){e.style.setProperty(t,n)}function pi({swiper:e,targetPosition:t,side:n}){const r=De(),a=-e.translate;let i=null,s;const u=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const o=t>a?"next":"prev",l=(p,E)=>o==="next"&&p>=E||o==="prev"&&p<=E,m=()=>{s=new Date().getTime(),i===null&&(i=s);const p=Math.max(Math.min((s-i)/u,1),0),E=.5-Math.cos(p*Math.PI)/2;let h=a+E*(t-a);if(l(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),l(h,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(m)};m()}function Ke(e,t=""){const n=De(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function kl(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 vl(e,t){const n=De();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=kl(e,t))),r}function Bn(e){try{console.warn(e);return}catch{}}function Rn(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:xl(t)),n}function Nl(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 wl(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 ct(e,t){return De().getComputedStyle(e,null).getPropertyValue(t)}function Fn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function hi(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 Tr(e,t,n){const r=De();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 ke(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function Wt(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let xr;function Il(){const e=De(),t=Tt();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function mi(){return xr||(xr=Il()),xr}let Cr;function Ll({userAgent:e}={}){const t=mi(),n=De(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,u=n.screen.height,o=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const m=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),E=r==="Win32";let h=r==="MacIntel";const c=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&h&&t.touch&&c.indexOf(`${s}x${u}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),h=!1),o&&!E&&(i.os="android",i.android=!0),(l||p||m)&&(i.os="ios",i.ios=!0),i}function gi(e={}){return Cr||(Cr=Ll(e)),Cr}let Sr;function Ol(){const e=De(),t=gi();let n=!1;function r(){const u=e.navigator.userAgent.toLowerCase();return u.indexOf("safari")>=0&&u.indexOf("chrome")<0&&u.indexOf("android")<0}if(r()){const u=String(e.navigator.userAgent);if(u.includes("Version/")){const[o,l]=u.split("Version/")[1].split(" ")[0].split(".").map(m=>Number(m));n=o<16||o===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 Ei(){return Sr||(Sr=Ol()),Sr}function Dl({swiper:e,on:t,emit:n}){const r=De();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},u=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(m=>{i=r.requestAnimationFrame(()=>{const{width:p,height:E}=e;let h=p,c=E;m.forEach(({contentBoxSize:f,contentRect:b,target:g})=>{g&&g!==e.el||(h=b?b.width:(f[0]||f).inlineSize,c=b?b.height:(f[0]||f).blockSize)}),(h!==p||c!==E)&&s()})}),a.observe(e.el))},o=()=>{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"){u();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{o(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function Pl({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=De(),s=(l,m={})=>{const p=i.MutationObserver||i.WebkitMutationObserver,E=new p(h=>{if(e.__preventObserver__)return;if(h.length===1){r("observerUpdate",h[0]);return}const c=function(){r("observerUpdate",h[0])};i.requestAnimationFrame?i.requestAnimationFrame(c):i.setTimeout(c,0)});E.observe(l,{attributes:typeof m.attributes>"u"?!0:m.attributes,childList:e.isElement||(typeof m.childList>"u"?!0:m).childList,characterData:typeof m.characterData>"u"?!0:m.characterData}),a.push(E)},u=()=>{if(e.params.observer){if(e.params.observeParents){const l=hi(e.hostEl);for(let m=0;m<l.length;m+=1)s(l[m])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},o=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",u),n("destroy",o)}var Ml={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(u=>{u.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(u=>{u.apply(a,r)})}),t}};function Bl(){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(ct(r,"padding-left")||0,10)-parseInt(ct(r,"padding-right")||0,10),n=n-parseInt(ct(r,"padding-top")||0,10)-parseInt(ct(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 Rl(){const e=this;function t(O,I){return parseFloat(O.getPropertyValue(e.getDirectionLabel(I))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,u=e.virtual&&n.virtual.enabled,o=u?e.virtual.slides.length:e.slides.length,l=Ke(a,`.${e.params.slideClass}, swiper-slide`),m=u?e.virtual.slides.length:l.length;let p=[];const E=[],h=[];let c=n.slidesOffsetBefore;typeof c=="function"&&(c=n.slidesOffsetBefore.call(e));let f=n.slidesOffsetAfter;typeof f=="function"&&(f=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,g=e.slidesGrid.length,y=e.size-c-f;let T=n.spaceBetween,x=-c,S=0,A=0;if(typeof y>"u")return;typeof T=="string"&&T.indexOf("%")>=0?T=parseFloat(T.replace("%",""))/100*y:typeof T=="string"&&(T=parseFloat(T)),e.virtualSize=-T-c-f,l.forEach(O=>{i?O.style.marginLeft="":O.style.marginRight="",O.style.marginBottom="",O.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(It(r,"--swiper-centered-offset-before",""),It(r,"--swiper-centered-offset-after","")),n.cssMode&&(It(r,"--swiper-slides-offset-before",`${c}px`),It(r,"--swiper-slides-offset-after",`${f}px`));const N=n.grid&&n.grid.rows>1&&e.grid;N?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let _;const w=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(O=>typeof n.breakpoints[O].slidesPerView<"u").length>0;for(let O=0;O<m;O+=1){_=0;const I=l[O];if(!(I&&(N&&e.grid.updateSlide(O,I,l),ct(I,"display")==="none"))){if(u&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(_=n.virtual.slidesPerViewAutoSlideSize),_&&I&&(n.roundLengths&&(_=Math.floor(_)),I.style[e.getDirectionLabel("width")]=`${_}px`);else if(n.slidesPerView==="auto"){w&&(I.style[e.getDirectionLabel("width")]="");const P=getComputedStyle(I),H=I.style.transform,v=I.style.webkitTransform;if(H&&(I.style.transform="none"),v&&(I.style.webkitTransform="none"),n.roundLengths)_=e.isHorizontal()?Tr(I,"width"):Tr(I,"height");else{const C=t(P,"width"),B=t(P,"padding-left"),$=t(P,"padding-right"),U=t(P,"margin-left"),V=t(P,"margin-right"),k=P.getPropertyValue("box-sizing");if(k&&k==="border-box")_=C+U+V;else{const{clientWidth:j,offsetWidth:J}=I;_=C+B+$+U+V+(J-j)}}H&&(I.style.transform=H),v&&(I.style.webkitTransform=v),n.roundLengths&&(_=Math.floor(_))}else _=(y-(n.slidesPerView-1)*T)/n.slidesPerView,n.roundLengths&&(_=Math.floor(_)),I&&(I.style[e.getDirectionLabel("width")]=`${_}px`);I&&(I.swiperSlideSize=_),h.push(_),n.centeredSlides?(x=x+_/2+S/2+T,S===0&&O!==0&&(x=x-y/2-T),O===0&&(x=x-y/2-T),Math.abs(x)<1/1e3&&(x=0),n.roundLengths&&(x=Math.floor(x)),A%n.slidesPerGroup===0&&p.push(x),E.push(x)):(n.roundLengths&&(x=Math.floor(x)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&p.push(x),E.push(x),x=x+_+T),e.virtualSize+=_+T,S=_,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,y)+f,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`),N&&e.grid.updateWrapperSize(_,p),!n.centeredSlides){const O=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,I=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||O);let P=p.length;if(I){let v;if(n.slidesPerView==="auto"){v=1;let C=0;for(let B=h.length-1;B>=0&&(C+=h[B]+(B<h.length-1?T:0),C<=y);B-=1)v=h.length-B}else v=Math.floor(n.slidesPerView);P=Math.max(m-v,0)}const H=[];for(let v=0;v<p.length;v+=1){let C=p[v];n.roundLengths&&(C=Math.floor(C)),I?v<=P&&H.push(C):p[v]<=e.virtualSize-y&&H.push(C)}p=H,Math.floor(e.virtualSize-y)-Math.floor(p[p.length-1])>1&&(I||p.push(e.virtualSize-y))}if(u&&n.loop){const O=h[0]+T;if(n.slidesPerGroup>1){const I=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),P=O*n.slidesPerGroup;for(let H=0;H<I;H+=1)p.push(p[p.length-1]+P)}for(let I=0;I<e.virtual.slidesBefore+e.virtual.slidesAfter;I+=1)n.slidesPerGroup===1&&p.push(p[p.length-1]+O),E.push(E[E.length-1]+O),e.virtualSize+=O}if(p.length===0&&(p=[0]),T!==0){const O=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((I,P)=>!n.cssMode||n.loop?!0:P!==l.length-1).forEach(I=>{I.style[O]=`${T}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let O=0;h.forEach(P=>{O+=P+(T||0)}),O-=T;const I=O>y?O-y:0;p=p.map(P=>P<=0?-c:P>I?I+f:P)}if(n.centerInsufficientSlides){let O=0;h.forEach(P=>{O+=P+(T||0)}),O-=T;const I=(c||0)+(f||0);if(O+I<y){const P=(y-O-I)/2;p.forEach((H,v)=>{p[v]=H-P}),E.forEach((H,v)=>{E[v]=H+P})}}if(Object.assign(e,{slides:l,snapGrid:p,slidesGrid:E,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){It(r,"--swiper-centered-offset-before",`${-p[0]}px`),It(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const O=-e.snapGrid[0],I=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(P=>P+O),e.slidesGrid=e.slidesGrid.map(P=>P+I)}if(m!==o&&e.emit("slidesLengthChange"),p.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),E.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!u&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const O=`${n.containerModifierClass}backface-hidden`,I=e.el.classList.contains(O);m<=n.maxBackfaceHiddenSlides?I||e.el.classList.add(O):I&&e.el.classList.remove(O)}}function Fl(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=u=>r?t.slides[t.getSlideIndexByData(u)]:t.slides[u];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(u=>{n.push(u)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const u=t.activeIndex+i;if(u>t.slides.length&&!r)break;n.push(s(u))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const u=n[i].offsetHeight;a=u>a?u:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function Hl(){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 bi=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function $l(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 u=n.spaceBetween;typeof u=="string"&&u.indexOf("%")>=0?u=parseFloat(u.replace("%",""))/100*t.size:typeof u=="string"&&(u=parseFloat(u));for(let o=0;o<r.length;o+=1){const l=r[o];let m=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(m-=r[0].swiperSlideOffset);const p=(s+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),E=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),h=-(s-m),c=h+t.slidesSizesGrid[o],f=h>=0&&h<=t.size-t.slidesSizesGrid[o],b=h>=0&&h<t.size-1||c>1&&c<=t.size||h<=0&&c>=t.size;b&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(o)),bi(l,b,n.slideVisibleClass),bi(l,f,n.slideFullyVisibleClass),l.progress=a?-p:p,l.originalProgress=a?-E:E}}function Ul(e){const t=this;if(typeof e>"u"){const m=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*m||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:u}=t;const o=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const m=Math.abs(e-t.minTranslate())<1,p=Math.abs(e-t.maxTranslate())<1;i=m||a<=0,s=p||a>=1,m&&(a=0),p&&(a=1)}if(n.loop){const m=t.getSlideIndexByData(0),p=t.getSlideIndexByData(t.slides.length-1),E=t.slidesGrid[m],h=t.slidesGrid[p],c=t.slidesGrid[t.slidesGrid.length-1],f=Math.abs(e);f>=E?u=(f-E)/c:u=(f+c-h)/c,u>1&&(u-=1)}Object.assign(t,{progress:a,progressLoop:u,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!o&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(o&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Ar=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function ql(){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,u=p=>Ke(r,`.${n.slideClass}${p}, swiper-slide${p}`)[0];let o,l,m;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),o=u(`[data-swiper-slide-index="${p}"]`)}else o=u(`[data-swiper-slide-index="${a}"]`);else s?(o=t.find(p=>p.column===a),m=t.find(p=>p.column===a+1),l=t.find(p=>p.column===a-1)):o=t[a];o&&(s||(m=wl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!m&&(m=t[0]),l=Nl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(p=>{Ar(p,p===o,n.slideActiveClass),Ar(p,p===m,n.slideNextClass),Ar(p,p===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Hn=(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()}},_r=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},kr=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,u=[s-t];u.push(...Array.from({length:t}).map((o,l)=>s+r+l)),e.slides.forEach((o,l)=>{u.includes(o.column)&&_r(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 u=(s%n+n)%n;(u<a||u>i)&&_r(e,u)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&_r(e,s)};function zl(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 Vl(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:u}=t;let o=e,l;const m=h=>{let c=h-t.virtual.slidesBefore;return c<0&&(c=t.virtual.slides.length+c),c>=t.virtual.slides.length&&(c-=t.virtual.slides.length),c};if(typeof o>"u"&&(o=zl(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const h=Math.min(a.slidesPerGroupSkip,o);l=h+Math.floor((o-h)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),o===i&&!t.params.loop){l!==u&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(o===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=m(o);return}const p=t.grid&&a.grid&&a.grid.rows>1;let E;if(t.virtual&&a.virtual.enabled)a.loop?E=m(o):E=o;else if(p){const h=t.slides.find(f=>f.column===o);let c=parseInt(h.getAttribute("data-swiper-slide-index"),10);Number.isNaN(c)&&(c=Math.max(t.slides.indexOf(h),0)),E=Math.floor(c/a.grid.rows)}else if(t.slides[o]){const h=t.slides[o].getAttribute("data-swiper-slide-index");h?E=parseInt(h,10):E=o}else E=o;Object.assign(t,{previousSnapIndex:u,snapIndex:l,previousRealIndex:s,realIndex:E,previousIndex:i,activeIndex:o}),t.initialized&&kr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==E&&t.emit("realIndexChange"),t.emit("slideChange"))}function Gl(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(u=>{!a&&u.matches&&u.matches(`.${r.slideClass}, swiper-slide`)&&(a=u)});let i=!1,s;if(a){for(let u=0;u<n.slides.length;u+=1)if(n.slides[u]===a){i=!0,s=u;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 Yl={updateSize:Bl,updateSlides:Rl,updateAutoHeight:Fl,updateSlidesOffset:Hl,updateSlidesProgress:$l,updateProgress:Ul,updateSlidesClasses:ql,updateActiveIndex:Vl,updateClickedSlide:Gl};function Wl(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=Al(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function jl(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let u=0,o=0;const l=0;n.isHorizontal()?u=r?-e:e:o=e,a.roundLengths&&(u=Math.floor(u),o=Math.floor(o)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?u:o,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-u:-o:a.virtualTranslate||(n.isHorizontal()?u-=n.cssOverflowAdjustment():o-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${u}px, ${o}px, ${l}px)`);let m;const p=n.maxTranslate()-n.minTranslate();p===0?m=0:m=(e-n.minTranslate())/p,m!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function Xl(){return-this.snapGrid[0]}function Kl(){return-this.snapGrid[this.snapGrid.length-1]}function Ql(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:u}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const o=i.minTranslate(),l=i.maxTranslate();let m;if(r&&e>o?m=o:r&&e<l?m=l:m=e,i.updateProgress(m),s.cssMode){const p=i.isHorizontal();if(t===0)u[p?"scrollLeft":"scrollTop"]=-m;else{if(!i.support.smoothScroll)return pi({swiper:i,targetPosition:-m,side:p?"left":"top"}),!0;u.scrollTo({[p?"left":"top"]:-m,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(m),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 Jl={getTranslate:Wl,setTranslate:jl,minTranslate:Xl,maxTranslate:Kl,translateTo:Ql};function Zl(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 yi({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 ec(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),yi({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function tc(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),yi({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var nc={setTransition:Zl,transitionStart:ec,transitionEnd:tc};function rc(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:u,snapGrid:o,slidesGrid:l,previousIndex:m,activeIndex:p,rtlTranslate:E,wrapperEl:h,enabled:c}=i;if(!c&&!r&&!a||i.destroyed||i.animating&&u.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const f=Math.min(i.params.slidesPerGroupSkip,s);let b=f+Math.floor((s-f)/i.params.slidesPerGroup);b>=o.length&&(b=o.length-1);const g=-o[b];if(u.normalizeSlideIndex)for(let N=0;N<l.length;N+=1){const _=-Math.floor(g*100),w=Math.floor(l[N]*100),O=Math.floor(l[N+1]*100);typeof l[N+1]<"u"?_>=w&&_<O-(O-w)/2?s=N:_>=w&&_<O&&(s=N+1):_>=w&&(s=N)}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!==(m||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g);let y;s>p?y="next":s<p?y="prev":y="reset";const T=i.virtual&&i.params.virtual.enabled;if(!(T&&a)&&(E&&-g===i.translate||!E&&g===i.translate))return i.updateActiveIndex(s),u.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),u.effect!=="slide"&&i.setTranslate(g),y!=="reset"&&(i.transitionStart(n,y),i.transitionEnd(n,y)),!1;if(u.cssMode){const N=i.isHorizontal(),_=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(()=>{h[N?"scrollLeft":"scrollTop"]=_})):h[N?"scrollLeft":"scrollTop"]=_,T&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return pi({swiper:i,targetPosition:_,side:N?"left":"top"}),!0;h.scrollTo({[N?"left":"top"]:_,behavior:"smooth"})}return!0}const A=Ei().isSafari;return T&&!a&&A&&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,y),t===0?i.transitionEnd(n,y):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(_){!i||i.destroyed||_.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,y))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function ac(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 u;if(i){const f=s*a.params.grid.rows;u=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===f).column}else u=a.getSlideIndexByData(s);const o=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:m,slidesOffsetAfter:p}=a.params,E=l||!!m||!!p;let h=a.params.slidesPerView;h==="auto"?h=a.slidesPerViewDynamic():(h=Math.ceil(parseFloat(a.params.slidesPerView,10)),E&&h%2===0&&(h=h+1));let c=o-u<h;if(E&&(c=c||u<Math.ceil(h/2)),r&&E&&a.params.slidesPerView!=="auto"&&!i&&(c=!1),c){const f=E?u<a.activeIndex?"prev":"next":u-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:f,slideTo:!0,activeSlideIndex:f==="next"?u+1:u-o+1,slideRealIndex:f==="next"?a.realIndex:void 0})}if(i){const f=s*a.params.grid.rows;s=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===f).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function ic(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 u=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(u=Math.max(r.slidesPerViewDynamic("current",!0),1));const o=r.activeIndex<i.slidesPerGroupSkip?1:u,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+o,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+o,e,t,n)}function sc(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:u,enabled:o,animating:l}=r;if(!o||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const m=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!m&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const p=u?r.translate:-r.translate;function E(y){return y<0?-Math.floor(Math.abs(y)):Math.floor(y)}const h=E(p),c=i.map(y=>E(y)),f=a.freeMode&&a.freeMode.enabled;let b=i[c.indexOf(h)-1];if(typeof b>"u"&&(a.cssMode||f)){let y;i.forEach((T,x)=>{h>=T&&(y=x)}),typeof y<"u"&&(b=f?i[y]:i[y>0?y-1:y])}let g=0;if(typeof b<"u"&&(g=s.indexOf(b),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 y=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(y,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 oc(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 uc(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),u=s+Math.floor((i-s)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[u]){const l=a.snapGrid[u],m=a.snapGrid[u+1];o-l>(m-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[u-1],m=a.snapGrid[u];o-l<=(m-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 lc(){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}`,u=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>(u?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(Ke(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),fi(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var cc={slideTo:rc,slideToLoop:ac,slideNext:ic,slidePrev:sc,slideReset:oc,slideToClosest:uc,slideToClickedSlide:lc};function dc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{Ke(a,`.${r.slideClass}, swiper-slide`).forEach((c,f)=>{c.setAttribute("data-swiper-slide-index",f)})},s=()=>{const h=Ke(a,`.${r.slideBlankClass}`);h.forEach(c=>{c.remove()}),h.length>0&&(n.recalcSlides(),n.updateSlides())},u=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||u)&&s();const o=r.slidesPerGroup*(u?r.grid.rows:1),l=n.slides.length%o!==0,m=u&&n.slides.length%r.grid.rows!==0,p=h=>{for(let c=0;c<h;c+=1){const f=n.isElement?Rn("swiper-slide",[r.slideBlankClass]):Rn("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(f)}};if(l){if(r.loopAddBlankSlides){const h=o-n.slides.length%o;p(h),n.recalcSlides(),n.updateSlides()}else Bn("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(m){if(r.loopAddBlankSlides){const h=r.grid.rows-n.slides.length%r.grid.rows;p(h),n.recalcSlides(),n.updateSlides()}else Bn("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 fc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:u}={}){const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:l,allowSlidePrev:m,allowSlideNext:p,slidesEl:E,params:h}=o,{centeredSlides:c,slidesOffsetBefore:f,slidesOffsetAfter:b,initialSlide:g}=h,y=c||!!f||!!b;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&&h.virtual.enabled){t&&(!y&&o.snapIndex===0?o.slideTo(o.virtual.slides.length,0,!1,!0):y&&o.snapIndex<h.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&&o.slideTo(o.virtual.slidesBefore,0,!1,!0)),o.allowSlidePrev=m,o.allowSlideNext=p,o.emit("loopFix");return}let T=h.slidesPerView;T==="auto"?T=o.slidesPerViewDynamic():(T=Math.ceil(parseFloat(h.slidesPerView,10)),y&&T%2===0&&(T=T+1));const x=h.slidesPerGroupAuto?T:h.slidesPerGroup;let S=y?Math.max(x,Math.ceil(T/2)):x;S%x!==0&&(S+=x-S%x),S+=h.loopAdditionalSlides,o.loopedSlides=S;const A=o.grid&&h.grid&&h.grid.rows>1;l.length<T+S||o.params.effect==="cards"&&l.length<T+S*2?Bn("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"):A&&h.grid.fill==="row"&&Bn("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const N=[],_=[],w=A?Math.ceil(l.length/h.grid.rows):l.length,O=i&&w-g<T&&!y;let I=O?g:o.activeIndex;typeof a>"u"?a=o.getSlideIndex(l.find(U=>U.classList.contains(h.slideActiveClass))):I=a;const P=n==="next"||!n,H=n==="prev"||!n;let v=0,C=0;const $=(A?l[a].column:a)+(y&&typeof r>"u"?-T/2+.5:0);if($<S){v=Math.max(S-$,x);for(let U=0;U<S-$;U+=1){const V=U-Math.floor(U/w)*w;if(A){const k=w-V-1;for(let j=l.length-1;j>=0;j-=1)l[j].column===k&&N.push(j)}else N.push(w-V-1)}}else if($+T>w-S){C=Math.max($-(w-S*2),x),O&&(C=Math.max(C,T-w+g+1));for(let U=0;U<C;U+=1){const V=U-Math.floor(U/w)*w;A?l.forEach((k,j)=>{k.column===V&&_.push(j)}):_.push(V)}}if(o.__preventObserver__=!0,requestAnimationFrame(()=>{o.__preventObserver__=!1}),o.params.effect==="cards"&&l.length<T+S*2&&(_.includes(a)&&_.splice(_.indexOf(a),1),N.includes(a)&&N.splice(N.indexOf(a),1)),H&&N.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.prepend(l[U]),l[U].swiperLoopMoveDOM=!1}),P&&_.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.append(l[U]),l[U].swiperLoopMoveDOM=!1}),o.recalcSlides(),h.slidesPerView==="auto"?o.updateSlides():A&&(N.length>0&&H||_.length>0&&P)&&o.slides.forEach((U,V)=>{o.grid.updateSlide(V,U,o.slides)}),h.watchSlidesProgress&&o.updateSlidesOffset(),t){if(N.length>0&&H){if(typeof e>"u"){const U=o.slidesGrid[I],k=o.slidesGrid[I+v]-U;u?o.setTranslate(o.translate-k):(o.slideTo(I+Math.ceil(v),0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else if(r){const U=A?N.length/h.grid.rows:N.length;o.slideTo(o.activeIndex+U,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(_.length>0&&P)if(typeof e>"u"){const U=o.slidesGrid[I],k=o.slidesGrid[I-C]-U;u?o.setTranslate(o.translate-k):(o.slideTo(I-C,0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else{const U=A?_.length/h.grid.rows:_.length;o.slideTo(o.activeIndex-U,0,!1,!0)}}if(o.allowSlidePrev=m,o.allowSlideNext=p,o.controller&&o.controller.control&&!s){const U={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...U,slideTo:V.params.slidesPerView===h.slidesPerView?t:!1})}):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...U,slideTo:o.controller.control.params.slidesPerView===h.slidesPerView?t:!1})}o.emit("loopFix")}function pc(){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 hc={loopCreate:dc,loopFix:fc,loopDestroy:pc};function mc(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 gc(){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 Ec={setGrabCursor:mc,unsetGrabCursor:gc};function bc(e,t=this){function n(r){if(!r||r===Tt()||r===De())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 Ti(e,t,n){const r=De(),{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 yc(e){const t=this,n=Tt();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"){Ti(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:u}=t;if(!u||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let o=r.target;if(i.touchEventsTarget==="wrapper"&&!vl(o,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!=="",m=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&m&&(o=m[0]);const p=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,E=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(E?bc(p,o):o.closest(p))){t.allowClick=!0;return}if(i.swipeHandler&&!o.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const h=s.currentX,c=s.currentY;if(!Ti(t,r,h))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=c,a.touchStartTime=Pn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let f=!0;o.matches(a.focusableElements)&&(f=!1,o.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==o&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!o.matches(a.focusableElements))&&n.activeElement.blur();const b=f&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||b)&&!o.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function Tc(e){const t=Tt(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:u}=n;if(!u||!a.simulateTouch&&e.pointerType==="mouse")return;let o=e;if(o.originalEvent&&(o=o.originalEvent),o.type==="pointermove"&&(r.touchId!==null||o.pointerId!==r.pointerId))return;let l;if(o.type==="touchmove"){if(l=[...o.changedTouches].find(S=>S.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=o;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",o);return}const m=l.pageX,p=l.pageY;if(o.preventedByNestedSwiper){i.startX=m,i.startY=p;return}if(!n.allowTouchMove){o.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p}),r.touchStartTime=Pn());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&&(m>i.startX&&-n.translate<=n.maxTranslate()||m<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(m<i.startX&&n.translate<=n.maxTranslate()||m>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==o.target&&o.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&o.target===t.activeElement&&o.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",o),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=m,i.currentY=p;const E=i.currentX-i.startX,h=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(E**2+h**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let S;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:E*E+h*h>=25&&(S=Math.atan2(Math.abs(h),Math.abs(E))*180/Math.PI,r.isScrolling=n.isHorizontal()?S>a.touchAngle:90-S>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",o),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||o.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&o.cancelable&&o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.stopPropagation();let c=n.isHorizontal()?E:h,f=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(c=Math.abs(c)*(s?1:-1),f=Math.abs(f)*(s?1:-1)),i.diff=c,c*=a.touchRatio,s&&(c=-c,f=-f);const b=n.touchesDirection;n.swipeDirection=c>0?"prev":"next",n.touchesDirection=f>0?"prev":"next";const g=n.params.loop&&!a.cssMode,y=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(g&&y&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const S=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(S)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",o)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&b!==n.touchesDirection&&g&&y&&Math.abs(c)>=1){Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",o),r.isMoved=!0,r.currentTranslate=c+r.startTranslate;let T=!0,x=a.resistanceRatio;if(a.touchReleaseOnEdges&&(x=0),c>0?(g&&y&&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+c)**x))):c<0&&(g&&y&&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-c)**x))),T&&(o.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(c)>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 xc(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(S=>S.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:u,rtlTranslate:o,slidesGrid:l,enabled:m}=t;if(!m||!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=Pn(),E=p-n.touchStartTime;if(t.allowClick){const S=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(S&&S[0]||r.target,S),t.emit("tap click",r),E<300&&p-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Pn(),fi(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||u.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 h;if(s.followFinger?h=o?t.translate:-t.translate:h=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:h});return}const c=h>=-t.maxTranslate()&&!t.params.loop;let f=0,b=t.slidesSizesGrid[0];for(let S=0;S<l.length;S+=S<s.slidesPerGroupSkip?1:s.slidesPerGroup){const A=S<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[S+A]<"u"?(c||h>=l[S]&&h<l[S+A])&&(f=S,b=l[S+A]-l[S]):(c||h>=l[S])&&(f=S,b=l[l.length-1]-l[l.length-2])}let g=null,y=null;s.rewind&&(t.isBeginning?y=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const T=(h-l[f])/b,x=f<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:f+x):t.slideTo(f)),t.swipeDirection==="prev"&&(T>1-s.longSwipesRatio?t.slideTo(f+x):y!==null&&T<0&&Math.abs(T)>s.longSwipesRatio?t.slideTo(y):t.slideTo(f))}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(f+x):t.slideTo(f):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:f+x),t.swipeDirection==="prev"&&t.slideTo(y!==null?y:f))}}function xi(){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 u=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!u?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 Cc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Sc(){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 Ac(e){const t=this;Hn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function _c(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Ci=(e,t)=>{const n=Tt(),{params:r,el:a,wrapperEl:i,device:s}=e,u=!!r.nested,o=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:u}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),n[o]("touchmove",e.onTouchMove,{passive:!1,capture:u}),n[o]("pointermove",e.onTouchMove,{passive:!1,capture:u}),n[o]("touchend",e.onTouchEnd,{passive:!0}),n[o]("pointerup",e.onTouchEnd,{passive:!0}),n[o]("pointercancel",e.onTouchEnd,{passive:!0}),n[o]("touchcancel",e.onTouchEnd,{passive:!0}),n[o]("pointerout",e.onTouchEnd,{passive:!0}),n[o]("pointerleave",e.onTouchEnd,{passive:!0}),n[o]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[o]("click",e.onClick,!0),r.cssMode&&i[o]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",xi,!0):e[l]("observerUpdate",xi,!0),a[o]("load",e.onLoad,{capture:!0}))};function kc(){const e=this,{params:t}=e;e.onTouchStart=yc.bind(e),e.onTouchMove=Tc.bind(e),e.onTouchEnd=xc.bind(e),e.onDocumentTouchStart=_c.bind(e),t.cssMode&&(e.onScroll=Sc.bind(e)),e.onClick=Cc.bind(e),e.onLoad=Ac.bind(e),Ci(e,"on")}function vc(){Ci(this,"off")}var Nc={attachEvents:kc,detachEvents:vc};const Si=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function wc(){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=Tt(),u=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",o=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,u,o);if(!l||e.currentBreakpoint===l)return;const p=(l in i?i[l]:void 0)||e.originalParams,E=Si(e,r),h=Si(e,p),c=e.params.grabCursor,f=p.grabCursor,b=r.enabled;E&&!h?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!E&&h&&(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()),c&&!f?e.unsetGrabCursor():!c&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof p[A]>"u")return;const N=r[A]&&r[A].enabled,_=p[A]&&p[A].enabled;N&&!_&&e[A].disable(),!N&&_&&e[A].enable()});const g=p.direction&&p.direction!==r.direction,y=r.loop&&(p.slidesPerView!==r.slidesPerView||g),T=r.loop;g&&n&&e.changeDirection(),$e(e.params,p);const x=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),b&&!x?e.disable():!b&&x&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",p),n&&(y?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!T&&S?(e.loopCreate(t),e.updateSlides()):T&&!S&&e.loopDestroy()),e.emit("breakpoint",p)}function Ic(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=De(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(u=>{if(typeof u=="string"&&u.indexOf("@")===0){const o=parseFloat(u.substr(1));return{value:i*o,point:u}}return{value:u,point:u}});s.sort((u,o)=>parseInt(u.value,10)-parseInt(o.value,10));for(let u=0;u<s.length;u+=1){const{point:o,value:l}=s[u];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=o):l<=n.clientWidth&&(r=o)}return r||"max"}var Lc={setBreakpoint:wc,getBreakpoint:Ic};function Oc(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 Dc(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=Oc(["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 Pc(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Mc={addClasses:Dc,removeClasses:Pc};function Bc(){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 Rc={checkOverflow:Bc},vr={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 Fc(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){$e(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)){$e(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),$e(t,r)}}const Nr={eventsEmitter:Ml,update:Yl,translate:Jl,transition:nc,slide:cc,loop:hc,grabCursor:Ec,events:Nc,breakpoints:Lc,checkOverflow:Rc,classes:Mc},wr={};let Ir=class ut{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=$e({},r),n&&!r.el&&(r.el=n);const a=Tt();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const o=[];return a.querySelectorAll(r.el).forEach(l=>{const m=$e({},r,{el:l});o.push(new ut(m))}),o}const i=this;i.__swiper__=!0,i.support=mi(),i.device=gi({userAgent:r.userAgent}),i.browser=Ei(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(o=>{o({params:r,swiper:i,extendParams:Fc(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const u=$e({},vr,s);return i.params=$e({},u,wr,r),i.originalParams=$e({},i.params),i.passedParams=$e({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(o=>{i.on(o,i.params.on[o])}),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=Ke(n,`.${r.slideClass}, swiper-slide`),i=Fn(a[0]);return Fn(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=Ke(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:u,size:o,activeIndex:l}=r;let m=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 h=l+1;h<i.length;h+=1)i[h]&&!E&&(p+=Math.ceil(i[h].swiperSlideSize),m+=1,p>o&&(E=!0));for(let h=l-1;h>=0;h-=1)i[h]&&!E&&(p+=i[h].swiperSlideSize,m+=1,p>o&&(E=!0))}else if(t==="current")for(let p=l+1;p<i.length;p+=1)(n?s[p]+u[p]-s[l]<o:s[p]-s[l]<o)&&(m+=1);else for(let p=l-1;p>=0;p-=1)s[l]-s[p]<o&&(m+=1);return m}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&&Hn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,u=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(u),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()):Ke(r,a())[0];return!s&&n.params.createElements&&(s=Rn("div",n.params.wrapperClass),r.append(s),Ke(r,`.${n.params.slideClass}`).forEach(u=>{s.append(u)})),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"||ct(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ct(r,"direction")==="rtl"),wrongRTL:ct(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?Hn(n,i):i.addEventListener("load",s=>{Hn(n,s.target)})}),kr(n),n.initialized=!0,kr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:u}=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"),u&&u.length&&u.forEach(o=>{o.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),o.removeAttribute("style"),o.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(o=>{r.off(o)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),Cl(r)),r.destroyed=!0),null}static extendDefaults(t){$e(wr,t)}static get extendedDefaults(){return wr}static get defaults(){return vr}static installModule(t){ut.prototype.__modules__||(ut.prototype.__modules__=[]);const n=ut.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ut.installModule(n)),ut):(ut.installModule(t),ut)}};Object.keys(Nr).forEach(e=>{Object.keys(Nr[e]).forEach(t=>{Ir.prototype[t]=Nr[e][t]})}),Ir.use([Dl,Pl]);const Ai=["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 xt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Lt(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]:xt(t[r])&&xt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Lt(e[r],t[r]):e[r]=t[r]})}function _i(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function ki(e={}){return e.pagination&&typeof e.pagination.el>"u"}function vi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function Ni(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 Hc(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function $c({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:u}){const o=r.filter(_=>_!=="children"&&_!=="direction"&&_!=="wrapperClass"),{params:l,pagination:m,navigation:p,scrollbar:E,virtual:h,thumbs:c}=e;let f,b,g,y,T,x,S,A;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(f=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(b=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||u)&&(l.pagination||l.pagination===!1)&&m&&!m.el&&(g=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&E&&!E.el&&(y=!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 N=_=>{e[_]&&(e[_].destroy(),_==="navigation"?(e.isElement&&(e[_].prevEl.remove(),e[_].nextEl.remove()),l[_].prevEl=void 0,l[_].nextEl=void 0,e[_].prevEl=void 0,e[_].nextEl=void 0):(e.isElement&&e[_].el.remove(),l[_].el=void 0,e[_].el=void 0))};r.includes("loop")&&e.isElement&&(l.loop&&!n.loop?x=!0:!l.loop&&n.loop?S=!0:A=!0),o.forEach(_=>{if(xt(l[_])&&xt(n[_]))Object.assign(l[_],n[_]),(_==="navigation"||_==="pagination"||_==="scrollbar")&&"enabled"in n[_]&&!n[_].enabled&&N(_);else{const w=n[_];(w===!0||w===!1)&&(_==="navigation"||_==="pagination"||_==="scrollbar")?w===!1&&N(_):l[_]=n[_]}}),o.includes("controller")&&!b&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&h&&l.virtual.enabled?(h.slides=t,h.update(!0)):r.includes("virtual")&&h&&l.virtual.enabled&&(t&&(h.slides=t),h.update(!0)),r.includes("children")&&t&&l.loop&&(A=!0),f&&c.init()&&c.update(!0),b&&(e.controller.control=l.controller.control),g&&(e.isElement&&(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-pagination"),u.part.add("pagination"),e.el.appendChild(u)),u&&(l.pagination.el=u),m.init(),m.render(),m.update()),y&&(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"),Wt(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"),Wt(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),(x||A)&&e.loopDestroy(),(S||A)&&e.loopCreate(),e.update()}function Uc(e={},t=!0){const n={on:{}},r={},a={};Lt(n,vr),n._emitClasses=!0,n.init=!1;const i={},s=Ai.map(o=>o.replace(/_/,"")),u=Object.assign({},e);return Object.keys(u).forEach(o=>{typeof e[o]>"u"||(s.indexOf(o)>=0?xt(e[o])?(n[o]={},a[o]={},Lt(n[o],e[o]),Lt(a[o],e[o])):(n[o]=e[o],a[o]=e[o]):o.search(/on[A-Z]/)===0&&typeof e[o]=="function"?t?r[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:n.on[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:i[o]=e[o])}),["navigation","pagination","scrollbar"].forEach(o=>{n[o]===!0&&(n[o]={}),n[o]===!1&&delete n[o]}),{params:n,passedParams:a,rest:i,events:r}}function qc({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){_i(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),ki(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),vi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function zc(e,t,n,r,a){const i=[];if(!t)return i;const s=o=>{i.indexOf(o)<0&&i.push(o)};if(n&&r){const o=r.map(a),l=n.map(a);o.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return Ai.filter(o=>o[0]==="_").map(o=>o.replace(/_/,"")).forEach(o=>{if(o in e&&o in t)if(xt(e[o])&&xt(t[o])){const l=Object.keys(e[o]),m=Object.keys(t[o]);l.length!==m.length?s(o):(l.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}),m.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}))}else e[o]!==t[o]&&s(o)}),i}const Vc=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 $n(){return $n=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},$n.apply(this,arguments)}function wi(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Ii(e){const t=[];return D.Children.toArray(e).forEach(n=>{wi(n)?t.push(n):n.props&&n.props.children&&Ii(n.props.children).forEach(r=>t.push(r))}),t}function Gc(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return D.Children.toArray(e).forEach(r=>{if(wi(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=Ii(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 Yc(e,t,n){if(!n)return null;const r=m=>{let p=m;return m<0?p=t.length+m: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,u=e.params.loop?-t.length:0,o=e.params.loop?t.length*2:t.length,l=[];for(let m=u;m<o;m+=1)m>=i&&m<=s&&l.push(t[r(m)]);return l.map((m,p)=>D.cloneElement(m,{swiper:e,style:a,key:m.props.virtualIndex||m.key||`slide-${p}`}))}function jt(e,t){return typeof window>"u"?D.useEffect(e,t):D.useLayoutEffect(e,t)}const Li=D.createContext(null),Wc=D.createContext(null),Oi=D.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let u=!1;const[o,l]=D.useState("swiper"),[m,p]=D.useState(null),[E,h]=D.useState(!1),c=D.useRef(!1),f=D.useRef(null),b=D.useRef(null),g=D.useRef(null),y=D.useRef(null),T=D.useRef(null),x=D.useRef(null),S=D.useRef(null),A=D.useRef(null),{params:N,passedParams:_,rest:w,events:O}=Uc(i),{slides:I,slots:P}=Gc(r),H=()=>{h(!E)};Object.assign(N.on,{_containerClasses(U,V){l(V)}});const v=()=>{Object.assign(N.on,O),u=!0;const U={...N};if(delete U.wrapperClass,b.current=new Ir(U),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=I;const V={cache:!1,slides:I,renderExternal:p,renderExternalUpdate:!1};Lt(b.current.params.virtual,V),Lt(b.current.originalParams.virtual,V)}};f.current||v(),b.current&&b.current.on("_beforeBreakpoint",H);const C=()=>{u||!O||!b.current||Object.keys(O).forEach(U=>{b.current.on(U,O[U])})},B=()=>{!O||!b.current||Object.keys(O).forEach(U=>{b.current.off(U,O[U])})};D.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",H)}),D.useEffect(()=>{!c.current&&b.current&&(b.current.emitSlidesClasses(),c.current=!0)}),jt(()=>{if(s&&(s.current=f.current),!!f.current)return b.current.destroyed&&v(),qc({el:f.current,nextEl:T.current,prevEl:x.current,paginationEl:S.current,scrollbarEl:A.current,swiper:b.current},N),a&&!b.current.destroyed&&a(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),jt(()=>{C();const U=zc(_,g.current,I,y.current,V=>V.key);return g.current=_,y.current=I,U.length&&b.current&&!b.current.destroyed&&$c({swiper:b.current,slides:I,passedParams:_,changedParams:U,nextEl:T.current,prevEl:x.current,scrollbarEl:A.current,paginationEl:S.current}),()=>{B()}}),jt(()=>{Vc(b.current)},[m]);function $(){return N.virtual?Yc(b.current,I,m):I.map((U,V)=>D.cloneElement(U,{swiper:b.current,swiperSlideIndex:V}))}return D.createElement(t,$n({ref:f,className:Ni(`${o}${e?` ${e}`:""}`)},w),D.createElement(Wc.Provider,{value:b.current},P["container-start"],D.createElement(n,{className:Hc(N.wrapperClass)},P["wrapper-start"],$(),P["wrapper-end"]),_i(N)&&D.createElement(D.Fragment,null,D.createElement("div",{ref:x,className:"swiper-button-prev"}),D.createElement("div",{ref:T,className:"swiper-button-next"})),vi(N)&&D.createElement("div",{ref:A,className:"swiper-scrollbar"}),ki(N)&&D.createElement("div",{ref:S,className:"swiper-pagination"}),P["container-end"]))});Oi.displayName="Swiper";const Di=D.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:u,...o}={},l)=>{const m=D.useRef(null),[p,E]=D.useState("swiper-slide"),[h,c]=D.useState(!1);function f(T,x,S){x===m.current&&E(S)}jt(()=>{if(typeof u<"u"&&(m.current.swiperSlideIndex=u),l&&(l.current=m.current),!(!m.current||!r)){if(r.destroyed){p!=="swiper-slide"&&E("swiper-slide");return}return r.on("_slideClass",f),()=>{r&&r.off("_slideClass",f)}}}),jt(()=>{r&&m.current&&!r.destroyed&&E(r.getSlideClasses(m.current))},[r]);const b={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(b):t,y=()=>{c(!0)};return D.createElement(e,$n({ref:m,className:Ni(`${p}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:y},o),a&&D.createElement(Li.Provider,{value:b},D.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}}))),!a&&D.createElement(Li.Provider,{value:b},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:T=>{T&&(T.lazyPreloaderManaged=!0)}})))});Di.displayName="SwiperSlide";function Pi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=Ke(e.el,`.${r[a]}`)[0];i||(i=Rn("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const Mi='<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 jc({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:Mi};function a(h){let c;return h&&typeof h=="string"&&e.isElement&&(c=e.el.querySelector(h)||e.hostEl.querySelector(h),c)?c:(h&&(typeof h=="string"&&(c=[...document.querySelectorAll(h)]),e.params.uniqueNavElements&&typeof h=="string"&&c&&c.length>1&&e.el.querySelectorAll(h).length===1?c=e.el.querySelector(h):c&&c.length===1&&(c=c[0])),h&&!c?h:c)}function i(h,c){const f=e.params.navigation;h=ke(h),h.forEach(b=>{b&&(b.classList[c?"add":"remove"](...f.disabledClass.split(" ")),b.tagName==="BUTTON"&&(b.disabled=c),e.params.watchOverflow&&e.enabled&&b.classList[e.isLocked?"add":"remove"](f.lockClass))})}function s(){const{nextEl:h,prevEl:c}=e.navigation;if(e.params.loop){i(c,!1),i(h,!1);return}i(c,e.isBeginning&&!e.params.rewind),i(h,e.isEnd&&!e.params.rewind)}function u(h){h.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function o(h){h.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const h=e.params.navigation;if(e.params.navigation=Pi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(h.nextEl||h.prevEl))return;let c=a(h.nextEl),f=a(h.prevEl);Object.assign(e.navigation,{nextEl:c,prevEl:f}),c=ke(c),f=ke(f);const b=(g,y)=>{if(g){if(h.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const T=document.createElement("div");Wt(T,Mi),g.appendChild(T.querySelector("svg")),T.remove()}g.addEventListener("click",y==="next"?o:u)}!e.enabled&&g&&g.classList.add(...h.lockClass.split(" "))};c.forEach(g=>b(g,"next")),f.forEach(g=>b(g,"prev"))}function m(){let{nextEl:h,prevEl:c}=e.navigation;h=ke(h),c=ke(c);const f=(b,g)=>{b.removeEventListener("click",g==="next"?o:u),b.classList.remove(...e.params.navigation.disabledClass.split(" "))};h.forEach(b=>f(b,"next")),c.forEach(b=>f(b,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?E():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{m()}),n("enable disable",()=>{let{nextEl:h,prevEl:c}=e.navigation;if(h=ke(h),c=ke(c),e.enabled){s();return}[...h,...c].filter(f=>!!f).forEach(f=>f.classList.add(e.params.navigation.lockClass))}),n("click",(h,c)=>{let{nextEl:f,prevEl:b}=e.navigation;f=ke(f),b=ke(b);const g=c.target;let y=b.includes(g)||f.includes(g);if(e.isElement&&!y){const T=c.path||c.composedPath&&c.composedPath();T&&(y=T.find(x=>f.includes(x)||b.includes(x)))}if(e.params.navigation.hideOnClick&&!y){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let T;f.length?T=f[0].classList.contains(e.params.navigation.hiddenClass):b.length&&(T=b[0].classList.contains(e.params.navigation.hiddenClass)),r(T===!0?"navigationShow":"navigationHide"),[...f,...b].filter(x=>!!x).forEach(x=>x.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(" ")),m()};Object.assign(e.navigation,{enable:p,disable:E,update:s,init:l,destroy:m})}function Xt(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Xc({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 u(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function o(g,y){const{bulletActiveClass:T}=e.params.pagination;g&&(g=g[`${y==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${T}-${y}`),g=g[`${y==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${T}-${y}-${y}`)))}function l(g,y,T){if(g=g%T,y=y%T,y===g+1)return"next";if(y===g-1)return"previous"}function m(g){const y=g.target.closest(Xt(e.params.pagination.bulletClass));if(!y)return;g.preventDefault();const T=Fn(y)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===T)return;const x=l(e.realIndex,T,e.slides.length);x==="next"?e.slideNext():x==="previous"?e.slidePrev():e.slideToLoop(T)}else e.slideTo(T)}function p(){const g=e.rtl,y=e.params.pagination;if(u())return;let T=e.pagination.el;T=ke(T);let x,S;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,N=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(S=e.previousRealIndex||0,x=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(x=e.snapIndex,S=e.previousSnapIndex):(S=e.previousIndex||0,x=e.activeIndex||0),y.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const _=e.pagination.bullets;let w,O,I;if(y.dynamicBullets&&(i=Tr(_[0],e.isHorizontal()?"width":"height"),T.forEach(P=>{P.style[e.isHorizontal()?"width":"height"]=`${i*(y.dynamicMainBullets+4)}px`}),y.dynamicMainBullets>1&&S!==void 0&&(s+=x-(S||0),s>y.dynamicMainBullets-1?s=y.dynamicMainBullets-1:s<0&&(s=0)),w=Math.max(x-s,0),O=w+(Math.min(_.length,y.dynamicMainBullets)-1),I=(O+w)/2),_.forEach(P=>{const H=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(v=>`${y.bulletActiveClass}${v}`)].map(v=>typeof v=="string"&&v.includes(" ")?v.split(" "):v).flat();P.classList.remove(...H)}),T.length>1)_.forEach(P=>{const H=Fn(P);H===x?P.classList.add(...y.bulletActiveClass.split(" ")):e.isElement&&P.setAttribute("part","bullet"),y.dynamicBullets&&(H>=w&&H<=O&&P.classList.add(...`${y.bulletActiveClass}-main`.split(" ")),H===w&&o(P,"prev"),H===O&&o(P,"next"))});else{const P=_[x];if(P&&P.classList.add(...y.bulletActiveClass.split(" ")),e.isElement&&_.forEach((H,v)=>{H.setAttribute("part",v===x?"bullet-active":"bullet")}),y.dynamicBullets){const H=_[w],v=_[O];for(let C=w;C<=O;C+=1)_[C]&&_[C].classList.add(...`${y.bulletActiveClass}-main`.split(" "));o(H,"prev"),o(v,"next")}}if(y.dynamicBullets){const P=Math.min(_.length,y.dynamicMainBullets+4),H=(i*P-i)/2-I*i,v=g?"right":"left";_.forEach(C=>{C.style[e.isHorizontal()?v:"top"]=`${H}px`})}}T.forEach((_,w)=>{if(y.type==="fraction"&&(_.querySelectorAll(Xt(y.currentClass)).forEach(O=>{O.textContent=y.formatFractionCurrent(x+1)}),_.querySelectorAll(Xt(y.totalClass)).forEach(O=>{O.textContent=y.formatFractionTotal(N)})),y.type==="progressbar"){let O;y.progressbarOpposite?O=e.isHorizontal()?"vertical":"horizontal":O=e.isHorizontal()?"horizontal":"vertical";const I=(x+1)/N;let P=1,H=1;O==="horizontal"?P=I:H=I,_.querySelectorAll(Xt(y.progressbarFillClass)).forEach(v=>{v.style.transform=`translate3d(0,0,0) scaleX(${P}) scaleY(${H})`,v.style.transitionDuration=`${e.params.speed}ms`})}y.type==="custom"&&y.renderCustom?(Wt(_,y.renderCustom(e,x+1,N)),w===0&&r("paginationRender",_)):(w===0&&r("paginationRender",_),r("paginationUpdate",_)),e.params.watchOverflow&&e.enabled&&_.classList[e.isLocked?"add":"remove"](y.lockClass)})}function E(){const g=e.params.pagination;if(u())return;const y=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=ke(T);let x="";if(g.type==="bullets"){let S=e.params.loop?Math.ceil(y/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&S>y&&(S=y);for(let A=0;A<S;A+=1)g.renderBullet?x+=g.renderBullet.call(e,A,g.bulletClass):x+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?x=g.renderFraction.call(e,g.currentClass,g.totalClass):x=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?x=g.renderProgressbar.call(e,g.progressbarFillClass):x=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],T.forEach(S=>{g.type!=="custom"&&Wt(S,x||""),g.type==="bullets"&&e.pagination.bullets.push(...S.querySelectorAll(Xt(g.bulletClass)))}),g.type!=="custom"&&r("paginationRender",T[0])}function h(){e.params.pagination=Pi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let y;typeof g.el=="string"&&e.isElement&&(y=e.el.querySelector(g.el)),!y&&typeof g.el=="string"&&(y=[...document.querySelectorAll(g.el)]),y||(y=g.el),!(!y||y.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(y)&&y.length>1&&(y=[...e.el.querySelectorAll(g.el)],y.length>1&&(y=y.find(T=>hi(T,".swiper")[0]===e.el))),Array.isArray(y)&&y.length===1&&(y=y[0]),Object.assign(e.pagination,{el:y}),y=ke(y),y.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",m),e.enabled||T.classList.add(g.lockClass)}))}function c(){const g=e.params.pagination;if(u())return;let y=e.pagination.el;y&&(y=ke(y),y.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",m))})),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:y}=e.pagination;y=ke(y),y.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?b():(h(),E(),p())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&p()}),n("snapIndexChange",()=>{p()}),n("snapGridLengthChange",()=>{E(),p()}),n("destroy",()=>{c()}),n("enable disable",()=>{let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(y=>y.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{p()}),n("click",(g,y)=>{const T=y.target,x=ke(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&x&&x.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 S=x[0].classList.contains(e.params.pagination.hiddenClass);r(S===!0?"paginationShow":"paginationHide"),x.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const f=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(y=>y.classList.remove(e.params.pagination.paginationDisabledClass))),h(),E(),p()},b=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(y=>y.classList.add(e.params.pagination.paginationDisabledClass))),c()};Object.assign(e.pagination,{enable:f,disable:b,render:E,update:p,init:h,destroy:c})}function Pb(){}function Mb(){}function Bi(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 Ri(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Kc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jc={};function Fi(e,t){return(Jc.jsx?Qc:Kc).test(e)}const Zc=/[ \t\n\f\r]/g;function ed(e){return typeof e=="object"?e.type==="text"?Hi(e.value):!1:Hi(e)}function Hi(e){return e.replace(Zc,"")===""}class Kt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Kt.prototype.normal={},Kt.prototype.property={},Kt.prototype.space=void 0;function $i(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Kt(n,r,t)}function Qt(e){return e.toLowerCase()}class Me{constructor(t,n){this.attribute=n,this.property=t}}Me.prototype.attribute="",Me.prototype.booleanish=!1,Me.prototype.boolean=!1,Me.prototype.commaOrSpaceSeparated=!1,Me.prototype.commaSeparated=!1,Me.prototype.defined=!1,Me.prototype.mustUseProperty=!1,Me.prototype.number=!1,Me.prototype.overloadedBoolean=!1,Me.prototype.property="",Me.prototype.spaceSeparated=!1,Me.prototype.space=void 0;let td=0;const ae=Ct(),Ae=Ct(),Lr=Ct(),K=Ct(),be=Ct(),Ot=Ct(),Ue=Ct();function Ct(){return 2**++td}const Or=Object.freeze(Object.defineProperty({__proto__:null,boolean:ae,booleanish:Ae,commaOrSpaceSeparated:Ue,commaSeparated:Ot,number:K,overloadedBoolean:Lr,spaceSeparated:be},Symbol.toStringTag,{value:"Module"})),Dr=Object.keys(Or);class Pr extends Me{constructor(t,n,r,a){let i=-1;if(super(t,n),Ui(this,"space",a),typeof r=="number")for(;++i<Dr.length;){const s=Dr[i];Ui(this,Dr[i],(r&Or[s])===Or[s])}}}Pr.prototype.defined=!0;function Ui(e,t,n){n&&(e[t]=n)}function Dt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Pr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Qt(r)]=r,n[Qt(i.attribute)]=r}return new Kt(t,n,e.space)}const qi=Dt({properties:{ariaActiveDescendant:null,ariaAtomic:Ae,ariaAutoComplete:null,ariaBusy:Ae,ariaChecked:Ae,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:be,ariaCurrent:null,ariaDescribedBy:be,ariaDetails:null,ariaDisabled:Ae,ariaDropEffect:be,ariaErrorMessage:null,ariaExpanded:Ae,ariaFlowTo:be,ariaGrabbed:Ae,ariaHasPopup:null,ariaHidden:Ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:be,ariaLevel:K,ariaLive:null,ariaModal:Ae,ariaMultiLine:Ae,ariaMultiSelectable:Ae,ariaOrientation:null,ariaOwns:be,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:Ae,ariaReadOnly:Ae,ariaRelevant:null,ariaRequired:Ae,ariaRoleDescription:be,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:Ae,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 zi(e,t){return t in e?e[t]:t}function Vi(e,t){return zi(e,t.toLowerCase())}const nd=Dt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ot,acceptCharset:be,accessKey:be,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:be,autoFocus:ae,autoPlay:ae,blocking:be,capture:null,charSet:null,checked:ae,cite:null,className:be,cols:K,colSpan:null,content:null,contentEditable:Ae,controls:ae,controlsList:be,coords:K|Ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:Lr,draggable:Ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:be,height:K,hidden:Lr,high:K,href:null,hrefLang:null,htmlFor:be,httpEquiv:be,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:be,itemRef:be,itemScope:ae,itemType:be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:K,pattern:null,ping:be,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:be,required:ae,reversed:ae,rows:K,rowSpan:K,sandbox:be,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:Ae,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:ae,useMap:null,value:Ae,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:be,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:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:Ae,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:ae,disableRemotePlayback:ae,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:Vi}),rd=Dt({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:Ue,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:be,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:ae,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:Ot,g2:Ot,glyphName:Ot,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:Ue,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:be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ue,rev:Ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ue,requiredFeatures:Ue,requiredFonts:Ue,requiredFormats:Ue,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:Ue,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:Ue,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:Ue,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:zi}),Gi=Dt({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()}}),Yi=Dt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vi}),Wi=Dt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ad={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"},id=/[A-Z]/g,ji=/-[a-z]/g,sd=/^data[-\w.:]+$/i;function Un(e,t){const n=Qt(t);let r=t,a=Me;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ji,ud);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ji.test(i)){let s=i.replace(id,od);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Pr}return new a(r,t)}function od(e){return"-"+e.toLowerCase()}function ud(e){return e.charAt(1).toUpperCase()}const Jt=$i([qi,nd,Gi,Yi,Wi],"html"),dt=$i([qi,rd,Gi,Yi,Wi],"svg");function Xi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ki(e){return e.join(" ").trim()}function Mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pt={},Br,Qi;function ld(){if(Qi)return Br;Qi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
43
- `,l="/",m="*",p="",E="comment",h="declaration";function c(b,g){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];g=g||{};var y=1,T=1;function x(v){var C=v.match(t);C&&(y+=C.length);var B=v.lastIndexOf(o);T=~B?v.length-B:T+v.length}function S(){var v={line:y,column:T};return function(C){return C.position=new A(v),w(),C}}function A(v){this.start=v,this.end={line:y,column:T},this.source=g.source}A.prototype.content=b;function N(v){var C=new Error(g.source+":"+y+":"+T+": "+v);if(C.reason=v,C.filename=g.source,C.line=y,C.column=T,C.source=b,!g.silent)throw C}function _(v){var C=v.exec(b);if(C){var B=C[0];return x(B),b=b.slice(B.length),C}}function w(){_(n)}function O(v){var C;for(v=v||[];C=I();)C!==!1&&v.push(C);return v}function I(){var v=S();if(!(l!=b.charAt(0)||m!=b.charAt(1))){for(var C=2;p!=b.charAt(C)&&(m!=b.charAt(C)||l!=b.charAt(C+1));)++C;if(C+=2,p===b.charAt(C-1))return N("End of comment missing");var B=b.slice(2,C-2);return T+=2,x(B),b=b.slice(C),T+=2,v({type:E,comment:B})}}function P(){var v=S(),C=_(r);if(C){if(I(),!_(a))return N("property missing ':'");var B=_(i),$=v({type:h,property:f(C[0].replace(e,p)),value:B?f(B[0].replace(e,p)):p});return _(s),$}}function H(){var v=[];O(v);for(var C;C=P();)C!==!1&&(v.push(C),O(v));return v}return w(),H()}function f(b){return b?b.replace(u,p):p}return Br=c,Br}var Ji;function cd(){if(Ji)return Pt;Ji=1;var e=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.default=n;const t=e(ld());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),u=typeof a=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:m}=o;u?a(l,m,o):m&&(i=i||{},i[l]=m)}),i}return Pt}var Zt={},Zi;function dd(){if(Zi)return Zt;Zi=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.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,m){return m.toUpperCase()},u=function(l,m){return"".concat(m,"-")},o=function(l,m){return m===void 0&&(m={}),i(l)?l:(l=l.toLowerCase(),m.reactCompat?l=l.replace(a,u):l=l.replace(r,u),l.replace(t,s))};return Zt.camelCase=o,Zt}var en,es;function fd(){if(es)return en;es=1;var e=en&&en.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(cd()),n=dd();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(u,o){u&&o&&(s[(0,n.camelCase)(u,i)]=o)}),s}return r.default=r,en=r,en}var pd=fd();const hd=Mr(pd),qn=ts("end"),Qe=ts("start");function ts(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 ns(e){const t=Qe(e),n=qn(e);if(t&&n)return{start:t,end:n}}function tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rs(e.position):"start"in e||"end"in e?rs(e):"line"in e||"column"in e?Rr(e):""}function Rr(e){return as(e&&e.line)+":"+as(e&&e.column)}function rs(e){return Rr(e&&e.start)+"-"+Rr(e&&e.end)}function as(e){return e&&typeof e=="number"?e:1}class we 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 o=r.indexOf(":");o===-1?i.ruleId=r:(i.source=r.slice(0,o),i.ruleId=r.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=tn(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}}we.prototype.file="",we.prototype.name="",we.prototype.reason="",we.prototype.message="",we.prototype.stack="",we.prototype.column=void 0,we.prototype.line=void 0,we.prototype.ancestors=void 0,we.prototype.cause=void 0,we.prototype.fatal=void 0,we.prototype.place=void 0,we.prototype.ruleId=void 0,we.prototype.source=void 0;const Fr={}.hasOwnProperty,md=new Map,gd=/[A-Z]/g,Ed=new Set(["table","tbody","thead","tfoot","tr"]),bd=new Set(["td","th"]),is="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yd(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=vd(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=kd(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"?dt:Jt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=ss(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function ss(e,t,n){if(t.type==="element")return Td(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Sd(e,t,n);if(t.type==="mdxjsEsm")return Cd(e,t);if(t.type==="root")return Ad(e,t,n);if(t.type==="text")return _d(e,t)}function Td(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=dt,e.schema=a),e.ancestors.push(t);const i=us(e,t.tagName,!1),s=Nd(e,t);let u=$r(e,t);return Ed.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!ed(o):!0})),os(e,s,i,t),Hr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function xd(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)}nn(e,t.position)}function Cd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nn(e,t.position)}function Sd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=dt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:us(e,t.name,!0),s=wd(e,t),u=$r(e,t);return os(e,s,i,t),Hr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Ad(e,t,n){const r={};return Hr(r,$r(e,t)),e.create(t,e.Fragment,r,n)}function _d(e,t){return t.value}function os(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kd(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function vd(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),o=Qe(r);return t(a,i,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Nd(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Fr.call(t.properties,a)){const i=Id(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&bd.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function wd(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else nn(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 u=r.value.data.estree.body[0];u.type,i=e.evaluater.evaluateExpression(u.expression)}else nn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function $r(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:md;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){const l=a.get(o)||0;s=o+"-"+l,a.set(o,l+1)}}const u=ss(e,i,s);u!==void 0&&n.push(u)}return n}function Id(e,t,n){const r=Un(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ri(n):Ki(n)),r.property==="style"){let a=typeof n=="object"?n:Ld(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Od(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?ad[r.property]||r.property:r.attribute,n]}}function Ld(e,t){try{return hd(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new we("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=is+"#cannot-parse-style-attribute",a}}function us(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 u=Fi(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}r=s}else r=Fi(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Fr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);nn(e)}function nn(e,t){const n=new we("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=is+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Od(e){const t={};let n;for(n in e)Fr.call(e,n)&&(t[Dd(n)]=e[n]);return t}function Dd(e){let t=e.replace(gd,Pd);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Pd(e){return"-"+e.toLowerCase()}const Ur={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"]},Md={};function Bd(e,t){const n=Md,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ls(e,r,a)}function ls(e,t,n){if(Rd(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 cs(e.children,t,n)}return Array.isArray(e)?cs(e,t,n):""}function cs(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ls(e[a],t,n);return r.join("")}function Rd(e){return!!(e&&typeof e=="object")}const ds=document.createElement("i");function rn(e){const t="&"+e+";";ds.innerHTML=t;const n=ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Je(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 Ve(e,t){return e.length>0?(Je(e,e.length,0,t),e):t}const fs={}.hasOwnProperty;function Fd(e){const t={};let n=-1;for(;++n<e.length;)Hd(t,e[n]);return t}function Hd(e,t){let n;for(n in t){const a=(fs.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){fs.call(a,s)||(a[s]=[]);const u=i[s];$d(a[s],Array.isArray(u)?u:u?[u]:[])}}}function $d(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Je(e,0,0,r)}function ps(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 Mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ze=ft(/[A-Za-z]/),qe=ft(/[\dA-Za-z]/),Ud=ft(/[#-'*+\--9=?A-Z^-~]/);function qr(e){return e!==null&&(e<32||e===127)}const zr=ft(/\d/),qd=ft(/[\dA-Fa-f]/),zd=ft(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const an=ft(new RegExp("\\p{P}|\\p{S}","u")),sn=ft(/\s/);function ft(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bt(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&qe(e.charCodeAt(n+1))&&qe(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 u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),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 fe(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(o){return de(o)?(e.enter(n),u(o)):t(o)}function u(o){return de(o)&&i++<a?(e.consume(o),u):(e.exit(n),t(o))}}const Vd={tokenize:Gd};function Gd(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),fe(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),i(u)}function i(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Z(u)?(e.consume(u),e.exit("chunkText"),i):(e.consume(u),s)}}const Yd={tokenize:Wd},hs={tokenize:jd};function Wd(e){const t=this,n=[];let r=0,a,i,s;return u;function u(T){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,o,l)(T)}return l(T)}function o(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&y();const x=t.events.length;let S=x,A;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){A=t.events[S][1].end;break}g(r);let N=x;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return Je(t.events,S+1,0,t.events.slice(x)),t.events.length=N,l(T)}return u(T)}function l(T){if(r===n.length){if(!a)return E(T);if(a.currentConstruct&&a.currentConstruct.concrete)return c(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hs,m,p)(T)}function m(T){return a&&y(),g(r),E(T)}function p(T){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,c(T)}function E(T){return t.containerState={},e.attempt(hs,h,c)(T)}function h(T){return r++,n.push([t.currentConstruct,t.containerState]),E(T)}function c(T){if(T===null){a&&y(),g(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),f(T)}function f(T){if(T===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(T);return}return Z(T)?(e.consume(T),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(T),f)}function b(T,x){const S=t.sliceStream(T);if(x&&S.push(null),T.previous=i,i&&(i.next=T),i=T,a.defineSkip(T.start),a.write(S),t.parser.lazy[T.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<s&&(!a.events[A][1].end||a.events[A][1].end.offset>s))return;const N=t.events.length;let _=N,w,O;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(w){O=t.events[_][1].end;break}w=!0}for(g(r),A=N;A<t.events.length;)t.events[A][1].end={...O},A++;Je(t.events,_+1,0,t.events.slice(N)),t.events.length=A}}function g(T){let x=n.length;for(;x-- >T;){const S=n[x];t.containerState=S[1],S[0].exit.call(t,e)}n.length=T}function y(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function jd(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ms(e){if(e===null||xe(e)||sn(e))return 1;if(an(e))return 2}function Vr(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 Gr={name:"attention",resolveAll:Xd,tokenize:Kd};function Xd(e,t){let n=-1,r,a,i,s,u,o,l,m;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;o=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};gs(p,-o),gs(E,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},i={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ve(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ve(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Ve(l,Vr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ve(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,l=Ve(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Je(e,r-1,n-r+3,l),n=r+l.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Kd(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=ms(r);let i;return s;function s(o){return i=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===i)return e.consume(o),u;const l=e.exit("attentionSequence"),m=ms(o),p=!m||m===2&&a||n.includes(o),E=!a||a===2&&m||n.includes(r);return l._open=!!(i===42?p:p&&(a||!E)),l._close=!!(i===42?E:E&&(m||!p)),t(o)}}function gs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Qd={name:"autolink",tokenize:Jd};function Jd(e,t,n){let r=0;return a;function a(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Ze(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||qe(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||qe(h))&&r++<32?(e.consume(h),u):(r=0,l(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||qr(h)?n(h):(e.consume(h),o)}function l(h){return h===64?(e.consume(h),m):Ud(h)?(e.consume(h),l):n(h)}function m(h){return qe(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),r=0,m):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):E(h)}function E(h){if((h===45||qe(h))&&r++<63){const c=h===45?E:p;return e.consume(h),c}return n(h)}}const zn={partial:!0,tokenize:Zd};function Zd(e,t,n){return r;function r(i){return de(i)?fe(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Z(i)?t(i):n(i)}}const Es={continuation:{tokenize:tf},exit:nf,name:"blockQuote",tokenize:ef};function ef(e,t,n){const r=this;return a;function a(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function tf(e,t,n){const r=this;return a;function a(s){return de(s)?fe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Es,t,n)(s)}}function nf(e){e.exit("blockQuote")}const bs={name:"characterEscape",tokenize:rf};function rf(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 zd(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const ys={name:"characterReference",tokenize:af};function af(e,t,n){const r=this;let a=0,i,s;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=qe,m(p))}function l(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=qd,m):(e.enter("characterReferenceValue"),i=7,s=zr,m(p))}function m(p){if(p===59&&a){const E=e.exit("characterReferenceValue");return s===qe&&!rn(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),m):n(p)}}const Ts={partial:!0,tokenize:of},xs={concrete:!0,name:"codeFenced",tokenize:sf};function sf(e,t,n){const r=this,a={partial:!0,tokenize:S};let i=0,s=0,u;return o;function o(A){return l(A)}function l(A){const N=r.events[r.events.length-1];return i=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===u?(s++,e.consume(A),m):s<3?n(A):(e.exit("codeFencedFenceSequence"),de(A)?fe(e,p,"whitespace")(A):p(A))}function p(A){return A===null||Z(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Ts,f,x)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,h,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),E)}function h(A){return A===null||Z(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(A))}function c(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===u?n(A):(e.consume(A),c)}function f(A){return e.attempt(a,x,b)(A)}function b(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g}function g(A){return i>0&&de(A)?fe(e,y,"linePrefix",i+1)(A):y(A)}function y(A){return A===null||Z(A)?e.check(Ts,f,x)(A):(e.enter("codeFlowValue"),T(A))}function T(A){return A===null||Z(A)?(e.exit("codeFlowValue"),y(A)):(e.consume(A),T)}function x(A){return e.exit("codeFenced"),t(A)}function S(A,N,_){let w=0;return O;function O(C){return A.enter("lineEnding"),A.consume(C),A.exit("lineEnding"),I}function I(C){return A.enter("codeFencedFence"),de(C)?fe(A,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):P(C)}function P(C){return C===u?(A.enter("codeFencedFenceSequence"),H(C)):_(C)}function H(C){return C===u?(w++,A.consume(C),H):w>=s?(A.exit("codeFencedFenceSequence"),de(C)?fe(A,v,"whitespace")(C):v(C)):_(C)}function v(C){return C===null||Z(C)?(A.exit("codeFencedFence"),N(C)):_(C)}}}function of(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 Yr={name:"codeIndented",tokenize:lf},uf={partial:!0,tokenize:cf};function lf(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),fe(e,i,"linePrefix",5)(l)}function i(l){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):Z(l)?e.attempt(uf,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||Z(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function cf(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):fe(e,i,"linePrefix",5)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Z(s)?a(s):n(s)}}const df={name:"codeText",previous:pf,resolve:ff,tokenize:hf};function ff(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 pf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hf(e,t,n){let r=0,a,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),o(p))}function o(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),o):p===96?(i=e.enter("codeTextSequence"),a=0,m(p)):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(p))}function l(p){return p===null||p===32||p===96||Z(p)?(e.exit("codeTextData"),o(p)):(e.consume(p),l)}function m(p){return p===96?(e.consume(p),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",l(p))}}class mf{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&&on(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),on(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),on(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);on(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);on(this.left,n.reverse())}}}function on(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 Cs(e){const t={};let n=-1,r,a,i,s,u,o,l;const m=new mf(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,gf(m,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=m.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(m.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={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return Je(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!l}function gf(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 u=s.events,o=[],l={};let m,p,E=-1,h=n,c=0,f=0;const b=[f];for(;h;){for(;e.get(++a)[1]!==h;);i.push(a),h._tokenizer||(m=r.sliceStream(h),h.next||m.push(null),p&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(m),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++E<u.length;)u[E][0]==="exit"&&u[E-1][0]==="enter"&&u[E][1].type===u[E-1][1].type&&u[E][1].start.line!==u[E][1].end.line&&(f=E+1,b.push(f),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),E=b.length;E--;){const g=u.slice(b[E],b[E+1]),y=i.pop();o.push([y,y+g.length-1]),e.splice(y,2,g)}for(o.reverse(),E=-1;++E<o.length;)l[c+o[E][0]]=c+o[E][1],c+=o[E][1]-o[E][0]-1;return l}const Ef={resolve:yf,tokenize:Tf},bf={partial:!0,tokenize:xf};function yf(e){return Cs(e),e}function Tf(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?i(u):Z(u)?e.check(bf,s,i)(u):(e.consume(u),a)}function i(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function xf(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),fe(e,i,"linePrefix")}function i(s){if(s===null||Z(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ss(e,t,n,r,a,i,s,u,o){const l=o||Number.POSITIVE_INFINITY;let m=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||qr(g)?n(g):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),f(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(u),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(u),E(g)):g===null||g===60||Z(g)?n(g):(e.consume(g),g===92?c:h)}function c(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function f(g){return!m&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(g)):m<l&&g===40?(e.consume(g),m++,f):g===41?(e.consume(g),m--,f):g===null||g===32||g===40||qr(g)?n(g):(e.consume(g),g===92?b:f)}function b(g){return g===40||g===41||g===92?(e.consume(g),f):f(g)}}function As(e,t,n,r,a,i){const s=this;let u=0,o;return l;function l(h){return e.enter(r),e.enter(a),e.consume(h),e.exit(a),e.enter(i),m}function m(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(i),e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||Z(h)||u++>999?(e.exit("chunkString"),m(h)):(e.consume(h),o||(o=!de(h)),h===92?E:p)}function E(h){return h===91||h===92||h===93?(e.consume(h),u++,p):p(h)}}function _s(e,t,n,r,a,i){let s;return u;function u(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,o):n(E)}function o(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),o(s)):E===null?n(E):Z(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),fe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===s||E===null||Z(E)?(e.exit("chunkString"),l(E)):(e.consume(E),E===92?p:m)}function p(E){return E===s||E===92?(e.consume(E),m):m(E)}}function at(e,t){let n;return r;function r(a){return Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):de(a)?fe(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Cf={name:"definition",tokenize:Af},Sf={partial:!0,tokenize:_f};function Af(e,t,n){const r=this;let a;return i;function i(h){return e.enter("definition"),s(h)}function s(h){return As.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return a=Mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return xe(h)?at(e,l)(h):l(h)}function l(h){return Ss(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function m(h){return e.attempt(Sf,p,p)(h)}function p(h){return de(h)?fe(e,E,"whitespace")(h):E(h)}function E(h){return h===null||Z(h)?(e.exit("definition"),r.parser.defined.push(a),t(h)):n(h)}}function _f(e,t,n){return r;function r(u){return xe(u)?at(e,a)(u):n(u)}function a(u){return _s(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function i(u){return de(u)?fe(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Z(u)?t(u):n(u)}}const kf={name:"hardBreakEscape",tokenize:vf};function vf(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Z(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Nf={name:"headingAtx",resolve:wf,tokenize:If};function wf(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"},Je(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function If(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),i(m)}function i(m){return e.enter("atxHeadingSequence"),s(m)}function s(m){return m===35&&r++<6?(e.consume(m),s):m===null||xe(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||Z(m)?(e.exit("atxHeading"),t(m)):de(m)?fe(e,u,"whitespace")(m):(e.enter("atxHeadingText"),l(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),u(m))}function l(m){return m===null||m===35||xe(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),l)}}const Lf=["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"],ks=["pre","script","style","textarea"],Of={concrete:!0,name:"htmlFlow",resolveTo:Mf,tokenize:Bf},Df={partial:!0,tokenize:Ff},Pf={partial:!0,tokenize:Rf};function Mf(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 Bf(e,t,n){const r=this;let a,i,s,u,o;return l;function l(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),E):R===47?(e.consume(R),i=!0,f):R===63?(e.consume(R),a=3,r.interrupt?t:k):Ze(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function E(R){return R===45?(e.consume(R),a=2,h):R===91?(e.consume(R),a=5,u=0,c):Ze(R)?(e.consume(R),a=4,r.interrupt?t:k):n(R)}function h(R){return R===45?(e.consume(R),r.interrupt?t:k):n(R)}function c(R){const te="CDATA[";return R===te.charCodeAt(u++)?(e.consume(R),u===te.length?r.interrupt?t:P:c):n(R)}function f(R){return Ze(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function b(R){if(R===null||R===47||R===62||xe(R)){const te=R===47,ce=s.toLowerCase();return!te&&!i&&ks.includes(ce)?(a=1,r.interrupt?t(R):P(R)):Lf.includes(s.toLowerCase())?(a=6,te?(e.consume(R),g):r.interrupt?t(R):P(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):i?y(R):T(R))}return R===45||qe(R)?(e.consume(R),s+=String.fromCharCode(R),b):n(R)}function g(R){return R===62?(e.consume(R),r.interrupt?t:P):n(R)}function y(R){return de(R)?(e.consume(R),y):O(R)}function T(R){return R===47?(e.consume(R),O):R===58||R===95||Ze(R)?(e.consume(R),x):de(R)?(e.consume(R),T):O(R)}function x(R){return R===45||R===46||R===58||R===95||qe(R)?(e.consume(R),x):S(R)}function S(R){return R===61?(e.consume(R),A):de(R)?(e.consume(R),S):T(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,N):de(R)?(e.consume(R),A):_(R)}function N(R){return R===o?(e.consume(R),o=null,w):R===null||Z(R)?n(R):(e.consume(R),N)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||xe(R)?S(R):(e.consume(R),_)}function w(R){return R===47||R===62||de(R)?T(R):n(R)}function O(R){return R===62?(e.consume(R),I):n(R)}function I(R){return R===null||Z(R)?P(R):de(R)?(e.consume(R),I):n(R)}function P(R){return R===45&&a===2?(e.consume(R),B):R===60&&a===1?(e.consume(R),$):R===62&&a===4?(e.consume(R),j):R===63&&a===3?(e.consume(R),k):R===93&&a===5?(e.consume(R),V):Z(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Df,J,H)(R)):R===null||Z(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),P)}function H(R){return e.check(Pf,v,J)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),C}function C(R){return R===null||Z(R)?H(R):(e.enter("htmlFlowData"),P(R))}function B(R){return R===45?(e.consume(R),k):P(R)}function $(R){return R===47?(e.consume(R),s="",U):P(R)}function U(R){if(R===62){const te=s.toLowerCase();return ks.includes(te)?(e.consume(R),j):P(R)}return Ze(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),U):P(R)}function V(R){return R===93?(e.consume(R),k):P(R)}function k(R){return R===62?(e.consume(R),j):R===45&&a===2?(e.consume(R),k):P(R)}function j(R){return R===null||Z(R)?(e.exit("htmlFlowData"),J(R)):(e.consume(R),j)}function J(R){return e.exit("htmlFlow"),t(R)}}function Rf(e,t,n){const r=this;return a;function a(s){return Z(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 Ff(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(zn,t,n)}}const Hf={name:"htmlText",tokenize:$f};function $f(e,t,n){const r=this;let a,i,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),S):k===63?(e.consume(k),T):Ze(k)?(e.consume(k),_):n(k)}function l(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),i=0,c):Ze(k)?(e.consume(k),y):n(k)}function m(k){return k===45?(e.consume(k),h):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),E):Z(k)?(s=p,$(k)):(e.consume(k),p)}function E(k){return k===45?(e.consume(k),h):p(k)}function h(k){return k===62?B(k):k===45?E(k):p(k)}function c(k){const j="CDATA[";return k===j.charCodeAt(i++)?(e.consume(k),i===j.length?f:c):n(k)}function f(k){return k===null?n(k):k===93?(e.consume(k),b):Z(k)?(s=f,$(k)):(e.consume(k),f)}function b(k){return k===93?(e.consume(k),g):f(k)}function g(k){return k===62?B(k):k===93?(e.consume(k),g):f(k)}function y(k){return k===null||k===62?B(k):Z(k)?(s=y,$(k)):(e.consume(k),y)}function T(k){return k===null?n(k):k===63?(e.consume(k),x):Z(k)?(s=T,$(k)):(e.consume(k),T)}function x(k){return k===62?B(k):T(k)}function S(k){return Ze(k)?(e.consume(k),A):n(k)}function A(k){return k===45||qe(k)?(e.consume(k),A):N(k)}function N(k){return Z(k)?(s=N,$(k)):de(k)?(e.consume(k),N):B(k)}function _(k){return k===45||qe(k)?(e.consume(k),_):k===47||k===62||xe(k)?w(k):n(k)}function w(k){return k===47?(e.consume(k),B):k===58||k===95||Ze(k)?(e.consume(k),O):Z(k)?(s=w,$(k)):de(k)?(e.consume(k),w):B(k)}function O(k){return k===45||k===46||k===58||k===95||qe(k)?(e.consume(k),O):I(k)}function I(k){return k===61?(e.consume(k),P):Z(k)?(s=I,$(k)):de(k)?(e.consume(k),I):w(k)}function P(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,H):Z(k)?(s=P,$(k)):de(k)?(e.consume(k),P):(e.consume(k),v)}function H(k){return k===a?(e.consume(k),a=void 0,C):k===null?n(k):Z(k)?(s=H,$(k)):(e.consume(k),H)}function v(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||xe(k)?w(k):(e.consume(k),v)}function C(k){return k===47||k===62||xe(k)?w(k):n(k)}function B(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function $(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return de(k)?fe(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):V(k)}function V(k){return e.enter("htmlTextData"),s(k)}}const Wr={name:"labelEnd",resolveAll:Vf,resolveTo:Gf,tokenize:Yf},Uf={tokenize:Wf},qf={tokenize:jf},zf={tokenize:Xf};function Vf(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&&Je(e,0,e.length,n),e}function Gf(e,t){let n=e.length,r=0,a,i,s,u;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 o={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}},m={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ve(u,e.slice(i+1,i+r+3)),u=Ve(u,[["enter",m,t]]),u=Ve(u,Vr(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=Ve(u,[["exit",m,t],e[s-2],e[s-1],["exit",l,t]]),u=Ve(u,e.slice(s+1)),u=Ve(u,[["exit",o,t]]),Je(e,i,e.length,u),e}function Yf(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 u;function u(E){return i?i._inactive?p(E):(s=r.parser.defined.includes(Mt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),o):n(E)}function o(E){return E===40?e.attempt(Uf,m,s?m:p)(E):E===91?e.attempt(qf,m,s?l:p)(E):s?m(E):p(E)}function l(E){return e.attempt(zf,m,p)(E)}function m(E){return t(E)}function p(E){return i._balanced=!0,n(E)}}function Wf(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 xe(p)?at(e,i)(p):i(p)}function i(p){return p===41?m(p):Ss(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return xe(p)?at(e,o)(p):m(p)}function u(p){return n(p)}function o(p){return p===34||p===39||p===40?_s(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function l(p){return xe(p)?at(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function jf(e,t,n){const r=this;return a;function a(u){return As.call(r,e,i,s,"reference","referenceMarker","referenceString")(u)}function i(u){return r.parser.defined.includes(Mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Xf(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 Kf={name:"labelStartImage",resolveAll:Wr.resolveAll,tokenize:Qf};function Qf(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),i}function i(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Jf={name:"labelStartLink",resolveAll:Wr.resolveAll,tokenize:Zf};function Zf(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 jr={name:"lineEnding",tokenize:ep};function ep(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const Vn={name:"thematicBreak",tokenize:tp};function tp(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,u(l)}function u(l){return l===a?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Z(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===a?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?fe(e,u,"whitespace")(l):u(l))}}const Be={continuation:{tokenize:ip},exit:op,name:"list",tokenize:ap},np={partial:!0,tokenize:up},rp={partial:!0,tokenize:sp};function ap(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 u;function u(h){const c=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(c==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:zr(h)){if(r.containerState.type||(r.containerState.type=c,e.enter(c,{_container:!0})),c==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Vn,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return zr(h)&&++s<10?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zn,r.interrupt?n:m,e.attempt(np,E,p))}function m(h){return r.containerState.initialBlankLine=!0,i++,E(h)}function p(h){return de(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),E):n(h)}function E(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ip(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zn,a,i);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(u)}function i(u){return r.containerState.furtherBlankLines||!de(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rp,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(Be,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function sp(e,t,n){const r=this;return fe(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 op(e){e.exit(this.containerState.type)}function up(e,t,n){const r=this;return fe(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!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const vs={name:"setextUnderline",resolveTo:lp,tokenize:cp};function lp(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 cp(e,t,n){const r=this;let a;return i;function i(l){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][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"),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),de(l)?fe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Z(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const dp={tokenize:fp};function fp(e){const t=this,n=e.attempt(zn,r,e.attempt(this.parser.constructs.flowInitial,a,fe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Ef,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 pp={resolveAll:ws()},hp=Ns("string"),mp=Ns("text");function Ns(e){return{resolveAll:ws(e==="text"?gp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(m){return l(m)?i(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),o}function o(m){return l(m)?(n.exit("data"),i(m)):(n.consume(m),o)}function l(m){if(m===null)return!0;const p=a[m];let E=-1;if(p)for(;++E<p.length;){const h=p[E];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ws(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 gp(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,u=0,o;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},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 Ep=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Cf},disable:{null:[]},document:{42:Be,43:Be,45:Be,48:Be,49:Be,50:Be,51:Be,52:Be,53:Be,54:Be,55:Be,56:Be,57:Be,62:Es},flow:{35:Nf,42:Vn,45:[vs,Vn],60:Of,61:vs,95:Vn,96:xs,126:xs},flowInitial:{[-2]:Yr,[-1]:Yr,32:Yr},insideSpan:{null:[Gr,pp]},string:{38:ys,92:bs},text:{[-5]:jr,[-4]:jr,[-3]:jr,33:Kf,38:ys,42:Gr,60:[Qd,Hf],91:Jf,92:[kf,bs],93:Wr,95:Gr,96:df}},Symbol.toStringTag,{value:"Module"}));function bp(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=[],u=[];const o={attempt:N(S),check:N(A),consume:y,enter:T,exit:x,interrupt:N(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:f,events:[],now:c,parser:e,previous:null,sliceSerialize:E,sliceStream:h,write:p};let m=t.tokenize.call(l,o);return t.resolveAll&&i.push(t),l;function p(I){return s=Ve(s,I),b(),s[s.length-1]!==null?[]:(_(t,0),l.events=Vr(i,l.events,l),l.events)}function E(I,P){return Tp(h(I),P)}function h(I){return yp(s,I)}function c(){const{_bufferIndex:I,_index:P,line:H,column:v,offset:C}=r;return{_bufferIndex:I,_index:P,line:H,column:v,offset:C}}function f(I){a[I.line]=I.column,O()}function b(){let I;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(I){m=m(I)}function y(I){Z(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,O()):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,P){const H=P||{};return H.type=I,H.start=c(),l.events.push(["enter",H,l]),u.push(H),H}function x(I){const P=u.pop();return P.end=c(),l.events.push(["exit",P,l]),P}function S(I,P){_(I,P.from)}function A(I,P){P.restore()}function N(I,P){return H;function H(v,C,B){let $,U,V,k;return Array.isArray(v)?J(v):"tokenize"in v?J([v]):j(v);function j(ne){return ee;function ee(pe){const Te=pe!==null&&ne[pe],ge=pe!==null&&ne.null,Pe=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return J(Pe)(pe)}}function J(ne){return $=ne,U=0,ne.length===0?B:R(ne[U])}function R(ne){return ee;function ee(pe){return k=w(),V=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?ce():ne.tokenize.call(P?Object.assign(Object.create(l),P):l,o,te,ce)(pe)}}function te(ne){return I(V,k),C}function ce(ne){return k.restore(),++U<$.length?R($[U]):B}}}function _(I,P){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&Je(l.events,P,l.events.length-P,I.resolve(l.events.slice(P),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function w(){const I=c(),P=l.previous,H=l.currentConstruct,v=l.events.length,C=Array.from(u);return{from:v,restore:B};function B(){r=I,l.previous=P,l.currentConstruct=H,l.events.length=v,u=C,O()}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function yp(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function Tp(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 f=0;for(const c of m){const p=r.measureText(c||" ").width||0;f=Math.max(f,p)}const E=Number.parseFloat(a.letterSpacing||""),h=Number.isFinite(E)?E:0;if(h>0){const c=m.reduce((p,b)=>p.length>=b.length?p:b,"");f+=h*Math.max(0,c.length-1)}return Math.ceil(f)}function Dn(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 h=r.querySelector(".variable-info-icon");Array.from(r.childNodes).forEach(b=>{if(b.nodeType===Node.TEXT_NODE){r.removeChild(b);return}b.nodeType===Node.ELEMENT_NODE&&b.tagName==="BR"&&r.removeChild(b)});const c=document.createTextNode("​");h&&h.parentNode===r?r.insertBefore(c,h):r.firstChild?r.insertBefore(c,r.firstChild):r.appendChild(c),r.classList.add("show-placeholder");const p=r.dataset.placeholder||"";if(p){const T=(()=>{try{const N=fl(p,r);if(!N||!Number.isFinite(N)){const A=On(p);return Math.max(0,A-22)}return N}catch{const N=On(p);return Math.max(0,N-22)}})(),y=(()=>{if(!r.classList.contains("rte-variable-with-icon"))return 0;const N=r.querySelector(".variable-info-icon:not(.hidden)");if(!N)return 24;try{const A=window.getComputedStyle(N),I=Math.ceil(N.getBoundingClientRect().width||0)||16,O=Math.ceil(Number.parseFloat(A.right||"0"))||4;return Math.max(16,Math.min(120,I+O+2))}catch{return 24}})();y>0?r.style.setProperty("--rte-icon-pad-right",`${y}px`):r.style.removeProperty("--rte-icon-pad-right");const x=2,S=y>0?y:8,_=Math.max(24,Math.min(600,Math.ceil(T+8+S+x)));r.style.minWidth=`${_}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||"",u=!!r.querySelector("br")||s.includes(`
35
+ `),o=r.offsetHeight>32,l=i.length>0&&(u||o);r.classList.toggle("rte-variable-multiline",l),r.classList.toggle("rte-variable-force-block",l);const m=r.closest(".rte-inline-group");m&&m.classList.toggle("rte-inline-group-force-block",l);const f=r.closest(".required-upload-group, .required-multi-first");f&&f.classList.toggle("rte-required-group-force-block",l);const E=f?f.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");E&&E!==f&&E.classList.toggle("rte-exclusion-force-block",l)})}function br(e,t,n){if(!e.current)return;const r=c=>{c.classList.contains("rte-richtext-host-expanded")&&(c.style.setProperty("display","flex","important"),c.style.setProperty("flex-direction","column","important"),c.style.setProperty("flex","1 1 auto","important"),c.style.setProperty("min-height","0","important"),c.style.setProperty("width","100%","important"),c.style.setProperty("align-self","stretch","important"))},a=c=>{if(!c.closest('[data-rte-force-hidden="1"]')){if(c.classList.contains("rte-richtext-host-expanded")){r(c);return}if(c.classList.contains("required-upload-group")){c.style.setProperty("display","inline-flex","important");return}if(c.classList.contains("exclusion-wrapper")){c.classList.contains("rte-exclusion-force-block")?c.style.setProperty("display","block","important"):c.style.setProperty("display","inline-block","important");return}c.style.setProperty("display","inline-block","important")}},i=c=>{c.closest('[data-rte-force-hidden="1"]')||(c.style.display="none",c.style.setProperty("display","none","important"))},s=t.some(c=>c.exclusionGroup==="separator");if(s){const c=[];let p=[];for(const N of t){if(N.exclusionGroup==="separator"){p.length&&c.push(p),p=[];continue}!N.exclusionGroup||N.exclusionGroup==="separator"||(N.type==="upload"&&N.key?p.push({type:"upload",key:N.key}):(N.type==="variable"||N.type==="multi-variable"||N.type==="markdown"||N.type==="markdown-name"||N.type==="markdown-module")&&N.key?p.push({type:N.type==="multi-variable"?"multi-variable":"variable",key:N.key}):p.push({type:"other",nodeType:N.type}))}p.length&&c.push(p);const b=N=>{const A=t.find(I=>I.type==="upload"&&I.key===N);return A?typeof A.maxCount=="number"&&A.maxCount>1?A.maxCount:1:0},g=c.map(N=>{for(const A of N)if(A.type!=="other"){if(A.type==="upload"){if(n[A.key]!==null&&n[A.key]!==void 0)return!0;const I=b(A.key);for(let O=0;O<I;O++){const w=`${A.key}-${O}`;if(n[w]!==null&&n[w]!==void 0)return!0}continue}if(A.type==="multi-variable"){const I=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${A.key}"]`);for(const O of I){if(O.dataset.variableRender==="antd-textarea"){const w=O.dataset.value||"";let P=w;try{P=decodeURIComponent(w)}catch{P=w}if(P.trim().length>0)return!0;continue}if(!O.classList.contains("show-placeholder")&&O.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(A.type==="variable"){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${A.key}"]`))return!0;const O=e.current.querySelector(`[data-type="variable"][data-key="${A.key}"]`);if(!O)continue;if(O.dataset.variableRender==="antd-textarea"){const w=O.dataset.value||"";let P=w;try{P=decodeURIComponent(w)}catch{P=w}if(P.trim().length>0)return!0}else if(!O.classList.contains("show-placeholder")&&O.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0;continue}}return!1}),T=g.some(Boolean),y=T?g.findIndex(Boolean):-1,x=N=>{for(const A of c[N]||[])if(A.type!=="other"){if(A.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${A.key}"], [data-type="upload"][data-key^="${A.key}-"]`).forEach(O=>a(O.closest(".exclusion-wrapper")||O));continue}if(A.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${A.key}"]`).forEach(O=>{const w=O.closest(".exclusion-wrapper")||O;a(w)});continue}if(A.type==="variable"){const I=e.current.querySelector(`[data-type="variable"][data-key="${A.key}"]`);I&&a(I.closest(".exclusion-wrapper")||I),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${A.key}"]`).forEach(w=>{const P=w.closest(".exclusion-wrapper")||w.closest(".rte-markdown-module-container")||w;a(P)})}}},S=N=>{for(const A of c[N]||[])if(A.type!=="other"){if(A.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${A.key}"], [data-type="upload"][data-key^="${A.key}-"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(A.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${A.key}"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(A.type==="variable"){const I=e.current.querySelector(`[data-type="variable"][data-key="${A.key}"]`);I&&i(I.closest(".exclusion-wrapper")||I),e.current.querySelectorAll(`[data-node-type="markdown-module"][data-key="${A.key}"]`).forEach(w=>{const P=w.closest(".exclusion-wrapper")||w.closest(".rte-markdown-module-container")||w;i(P)})}}};for(let N=0;N<c.length;N++)!T||N===y?x(N):S(N);e.current.querySelectorAll('[data-group="separator"]').forEach(N=>{N.closest('[data-rte-force-hidden="1"]')||(T?i(N):N.style.setProperty("display","inline-flex","important"))});return}const u=new Set,o={};for(const c of t)c.exclusionGroup&&c.exclusionGroup!=="separator"&&(u.add(c.exclusionGroup),o[c.exclusionGroup]||(o[c.exclusionGroup]=[]),o[c.exclusionGroup].push({type:c.type,key:c.key,exclusionGroup:c.exclusionGroup}));const l={};for(const c of u){l[c]=!1;for(const p of o[c])if(p.type==="upload"&&p.key){if(n[p.key]!==null&&n[p.key]!==void 0){l[c]=!0;break}const b=t.find(g=>g.type==="upload"&&g.key===p.key);if(b&&typeof b.maxCount=="number")for(let g=0;g<b.maxCount;g++){const T=`${p.key}-${g}`;if(n[T]!==null&&n[T]!==void 0){l[c]=!0;break}}if(l[c])break}else if((p.type==="variable"||p.type==="multi-variable"||p.type==="markdown"||p.type==="markdown-name")&&p.key){if(e.current.querySelector(`[data-node-type="markdown-module"][data-key="${p.key}"]`)){l[c]=!0;break}const g=p.type==="multi-variable"?e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${p.key}"]`):[e.current.querySelector(`[data-type="variable"][data-key="${p.key}"]`)].filter(Boolean);for(const T of g){if(T.dataset.variableRender==="antd-textarea"){const y=T.dataset.value||"";let x=y;try{x=decodeURIComponent(y)}catch{x=y}if(x.trim().length>0){l[c]=!0;break}continue}if(!T.classList.contains("show-placeholder")&&T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){l[c]=!0;break}}if(l[c])break}}const f=Object.keys(l).filter(c=>l[c]).length>0;let E=null;if(f&&s){for(const c of t)if(c.exclusionGroup&&c.exclusionGroup!=="separator"&&l[c.exclusionGroup]){E=c.exclusionGroup;break}}for(const c of u){const p=e.current.querySelectorAll(`[data-group="${c}"]`);s&&f&&E?c===E?p.forEach(a):p.forEach(i):p.forEach(a)}e.current.querySelectorAll('[data-group="separator"]').forEach(c=>{c.closest('[data-rte-force-hidden="1"]')||(f?i(c):c.style.setProperty("display","inline-flex","important"))})}function li(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const p=c.getAttribute("data-node-type")||"";if(p!=="report-module"&&p!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let T=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return g.filter((S,_)=>_!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
36
+ `).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const p=t[c];if((p.type==="variable"||p.type==="report-url"||p.type==="markdown"||p.type==="markdown-name"||p.type==="upload"||p.type==="multi-variable"||p.type==="select"||p.type==="textarea"||p.type==="richtext"||p.type==="report-module"||p.type==="markdown-module"||p.type==="datepicker"||p.type==="number-input")&&p.required&&p.key){s.push({exclusionGroup:p.exclusionGroup||"",key:p.key,type:p.type==="multi-variable"||p.type==="report-url"||p.type==="markdown"||p.type==="markdown-name"?"variable":p.type==="report-module"||p.type==="markdown-module"?"richtext":p.type,isMultiVariable:p.type==="multi-variable",minCount:p.type==="multi-variable"||p.type==="upload"&&typeof p.minCount=="number"?p.minCount:void 0,moduleIndex:p.type==="report-module"||p.type==="markdown-module"?p.moduleIndex:void 0,__index:c});continue}if(p.type==="text"&&p.className?.includes("rte-text-required"))if(p.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===p.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:p.exclusionGroup,key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((p,b)=>{p.exclusionGroup==="separator"&&c.push(b)});for(const p of c){const g=s.filter(x=>typeof x.__index=="number"&&x.__index<p).sort((x,S)=>(S.__index??0)-(x.__index??0))[0],y=s.filter(x=>typeof x.__index=="number"&&x.__index>p).sort((x,S)=>(x.__index??0)-(S.__index??0))[0];g&&y&&o.push([g,y])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const p=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(p.length>0){const b=p[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const p=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const p=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(p.length>0){const b=p[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const p=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const p=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const p=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const p=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(p);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const p=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const p=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(p=>{p.key&&m.add(p.key)})});const f=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const p=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(T.length>0){const y=T[0];return i(y)?!0:y.style.display!=="none"}}return!0});if(p.length===0)continue;let b=!1;for(const g of p)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let T=0;const y=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(y.length===0)continue;for(let x=0;x<y.length;x++){const _=y[x].dataset.key;_&&n[_]!=null&&(T+=1)}if(T>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let y=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(y+=1)}const x=g.minCount&&g.minCount>0?g.minCount:1;if(y>=x){b=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const T=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const T=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,y=e.current.querySelector(T);if(y&&a(y).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of f)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let p=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const y=b[g].dataset.key;y&&n[y]!=null&&(p+=1)}if(p<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const p=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const T of Array.from(p)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const p=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!p){h=!1;break}if(p.classList.contains("show-placeholder")){h=!1;break}if(p.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const p=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!p||(p.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const p=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!p||(p.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const p=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(p);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const p=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!p||(p.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const p=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!p||(p.value||"").trim().length===0){h=!1;break}}r(E&&h)}const pl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s})=>{D.useLayoutEffect(()=>{const u=r.current;if(!u)return;const o=new Map,l=E=>{const h=E.target,c=E.relatedTarget;!h||!r.current||!r.current.contains(h)||c&&r.current.contains(c)||setTimeout(()=>{if(r.current){if(e.length===0){const p=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(p.length>0);return}Dn(r),br(r,t,n),li(r,t,n,a)}},0)};u.addEventListener("blur",l,!0);const m=()=>{if(!r.current)return;o.forEach((c,p)=>{p.removeEventListener("blur",c,!1)}),o.clear();const E=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),h=c=>{c.stopPropagation(),c.stopImmediatePropagation();const p=c.target;if(!p||!r.current||!r.current.contains(p))return;const b=p.closest('[data-type="variable"][data-multi-key]');if(!b||!r.current.contains(b))return;let g=!1;if(o.forEach((I,O)=>{(O===b||O.contains(p))&&(g=!0)}),!g)return;const T=b.dataset.multiKey,y=b.dataset.key,x=b.dataset.index;if(!T||!y||x===void 0)return;const S=c.relatedTarget;if(!(!S||!r.current.contains(S)))return;const N=b.innerText.replace(/[\u200B\n]/g,"").trim(),A=/[、,,\s]+/;if(A.test(N)){const w=N.split(A).map(P=>P.trim()).filter(P=>P.length>0).slice(0,9);if(w.length>1){const P=e.find(H=>H.type==="multi-variable"&&H.key===T);if(P){const H=i[T]||1,v=parseInt(x,10),C=P.maxCount||9,B=[];for(let j=0;j<H;j++){const J=`${T}_${j}`,R=r.current.querySelector(`[data-type="variable"][data-key="${J}"][data-multi-key="${T}"]`);if(R){const te=R.innerText.replace(/[\u200B\n]/g,"").trim();B.push(te)}}B.splice(v,1,...w);const $=B.slice(0,C);$.length>0&&$[$.length-1]!==""&&$.length<C&&$.push("");const U=Math.max($.length,1),V={};$.forEach((j,J)=>{j&&(V[`${T}_${J}`]=j)}),r.current.querySelectorAll('[data-type="variable"]').forEach(j=>{const J=j.dataset.key,R=j.dataset.multiKey;if(J&&R!==T){const te=j.innerText.replace(/[\u200B\n]/g,"").trim();te&&(V[J]=te)}}),r.current.__tempVariableValues=V,s(j=>({...j,[T]:U}))}}}};E.forEach(c=>{c.addEventListener("blur",h,!1),o.set(c,h)})},f=setTimeout(()=>{m()},0);return()=>{clearTimeout(f),u.removeEventListener("blur",l,!0),o.forEach((E,h)=>{h.removeEventListener("blur",E,!1)}),o.clear()}},[e,t,r,n,i,a,s])},hl=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:u,onBeforeFilePickerOpen:o,files:l,setFiles:m,handleRemoveFile:f,setActiveBatchKey:E,setActiveBatchStartIndex:h,setActiveFileKey:c,isDraggingRef:p,richtextPrevScrollTopRef:b})=>{const g=(...y)=>{},T=y=>{try{const x=window.getSelection();if(!x)return g(y,"no selection");const S=x.rangeCount>0?x.getRangeAt(0):null;g(y,{rangeCount:x.rangeCount,isCollapsed:x.isCollapsed,anchorNode:x.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":x.anchorNode?.nodeName,anchorOffset:x.anchorOffset,focusNode:x.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":x.focusNode?.nodeName,focusOffset:x.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 D.useCallback(y=>{if(e)return;t&&n?.(!1);const x=y.target;if(g("click",{tag:x.tagName,cls:x.className}),T("before click"),x.closest('[data-type="datepicker"]'))return;if(x.closest(".tag-close-btn")){y.preventDefault(),y.stopPropagation();return}if(r.length===0)return;const N=(v,C)=>{if(!i.current)return;Array.from(i.current.children).forEach($=>{if($!==v)if(C)$.dataset.prevDisplay===void 0&&($.dataset.prevDisplay=$.style.display||""),$.dataset.rteForceHidden="1",$.style.setProperty("display","none","important");else{if($.dataset.prevDisplay!==void 0){const U=$.dataset.prevDisplay;U?$.style.display=U:$.style.removeProperty("display"),delete $.dataset.prevDisplay}else $.style.removeProperty("display");delete $.dataset.rteForceHidden}})},A=x.closest(".rte-textarea-toggle");if(A){y.preventDefault(),y.stopPropagation();const v=A.closest(".rte-textarea-wrapper"),C=v?.querySelector('[data-type="textarea"]'),$=!(A.getAttribute("data-expanded")==="true");A.setAttribute("data-expanded",String($)),A.textContent=$?"收起":"展开",v&&v.classList.toggle("rte-textarea-expanded",$);const U=v?.closest(".rte-textarea-required");if(U?U.classList.toggle("rte-textarea-overlay",$):v&&v.classList.toggle("rte-textarea-overlay",$),C)if($)C.classList.add("rte-textarea-expanded"),C.style.maxHeight="none",C.style.height="100%";else{C.classList.remove("rte-textarea-expanded");const V=C.dataset.maxHeight||"252";C.style.maxHeight=`${V}px`,C.style.height="auto"}i.current&&($?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const I=x.closest(".rte-richtext-toggle");if(I){y.preventDefault(),y.stopPropagation();const v=I.closest(".rte-richtext-wrapper"),C=v?.querySelector('[data-type="richtext"]'),$=!(I.getAttribute("data-expanded")==="true");((j,J)=>{j.setAttribute("data-expanded",String(J)),j.innerHTML=J?'<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>'})(I,$);const V=v?.closest(".rte-richtext-required");V?V.classList.toggle("rte-richtext-expanded",$):v&&v.classList.toggle("rte-richtext-expanded",$);const k=v?.closest(".exclusion-wrapper")||v?.parentElement;if(C&&($?(C.style.height="100%",C.style.overflow="auto"):(C.style.height="",C.style.overflow="")),k&&(k.classList.toggle("rte-richtext-host-expanded",$),N(k,$)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",$),s.current?.classList.toggle("rte-richtext-container-expanded",$),s.current)if($){const j=Math.ceil(s.current.getBoundingClientRect().height||0);j>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${j}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if($)b.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const j=b.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=j)},0)}}return}if(x.closest('[data-type="text"]')){y.preventDefault(),y.stopPropagation();const v=window.getSelection();v&&v.removeAllRanges();return}if(a&&x.closest(".tag-node")){y.preventDefault(),y.stopPropagation();const C=window.getSelection();C&&C.removeAllRanges();return}const w=x.closest('[data-type="variable"]');if(w){if(p.current)return;if(w.dataset.variableRender!=="antd-textarea"){const v=!!x.closest(".variable-info-icon"),C=w.classList.contains("show-placeholder")||(w.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(g("v1 variable click",{key:w.dataset.key,isPlaceholder:C,isOnIcon:v,classes:w.className,innerText:w.innerText}),C&&!v){y.preventDefault();const B=()=>{try{w.focus();const $=window.getSelection();if(!$)return;const U=document.createTreeWalker(w,NodeFilter.SHOW_TEXT),V=U.nextNode()?U.currentNode:null,k=document.createRange();V?(k.setStart(V,0),k.collapse(!0)):(k.selectNodeContents(w),k.collapse(!0)),$.removeAllRanges(),$.addRange(k),T("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(B),window.requestAnimationFrame(()=>T("post-raf (click)"))},0)}}setTimeout(()=>{const v=window.getSelection();v&&!v.isCollapsed||Dn(i)},10);return}const P=x.closest(".file-remove-btn");if(P){y.preventDefault(),y.stopPropagation();const v=P.closest('[data-type="upload"]'),C=v?.dataset.key,B=v?.dataset.batchKey;if(C)if(B){const $=r.find(U=>U.type==="upload"&&U.key===B);if($&&typeof $.maxCount=="number"&&typeof $.minCount=="number"){const U=$.maxCount;m(V=>{const k={...V},j=[];for(let J=0;J<U;J++){const R=`${B}-${J}`,te=k[R];te!=null&&R!==C&&j.push(te)}for(let J=0;J<U;J++)delete k[`${B}-${J}`];return j.forEach((J,R)=>{k[`${B}-${R}`]=J}),k})}else f(C)}else f(C);return}const H=x.closest('[data-type="upload"]');if(H){const v=H.dataset.key,C=H.dataset.batchKey,B=H.dataset.batchIndex;if(v){const $=C||v,U=r.find(V=>V.type==="upload"&&V.key===$);if(u.current&&(U?.accept?u.current.accept=U.accept:U?.acceptType==="image"?u.current.accept="image/*":U?.acceptType==="file"?u.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":u.current.accept=""),C){const V=r.find(k=>k.type==="upload"&&k.key===C);if(V&&typeof V.maxCount=="number"&&typeof V.minCount=="number"){const k=V.maxCount,j=l[v]!=null,J=B!=null?Number.parseInt(B,10):NaN;if(j){u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click();return}let R=0;for(let te=0;te<k;te++)l[`${C}-${te}`]!=null&&(R+=1);R<k&&u.current?(u.current.multiple=!0,E(C),h(Number.isFinite(J)?J:null),c(null),o?.(),u.current.click()):(u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click())}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}return}},[t,r,s,e,i,u,o,l,f,p,a,n,b,E,h,c,m])},ml=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:u,measureExpandedContentHeight:o,effectiveConfig:l,files:m,multiVariableCounts:f,setMultiVariableCounts:E,savedCursorRef:h})=>D.useCallback(()=>{if(e.length===0){if(t.current){const b=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(b),r(!b)}return}if(Dn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||a(y=>{const x=y[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?y:{...y,[g]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||i(y=>{const x=y[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||s(y=>{const x=y[g];return!x||x.status==="idle"&&(!x.modules||x.modules.length===0)?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||(i(y=>{const x=y[g];return!x||x.status==="idle"?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(y=>{const x=y[g];return!x||x.status==="idle"?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(b=>{if(b.dataset.variableRender==="antd-textarea")return;const g=b.innerText||"",T=!!b.querySelector("br")||g.includes(`
37
+ `),y=b.offsetHeight>32,S=g.replace(/\u200B/g,"").trim().length>0&&(T||y);b.classList.toggle("rte-variable-multiline",S),b.classList.toggle("rte-variable-force-block",S);const _=b.closest(".rte-inline-group");_&&_.classList.toggle("rte-inline-group-force-block",S);const N=b.closest(".required-upload-group, .required-multi-first");N&&N.classList.toggle("rte-required-group-force-block",S);const A=b.querySelector(".variable-info-icon");if(A){let I=!1;const O=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:w=>A.contains(w)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;O.nextNode();)if(O.currentNode.textContent?.replace(/[\u200B\n]/g,"").trim()){I=!0;break}I?A.classList.add("hidden"):A.classList.remove("hidden"),b.classList.toggle("rte-variable-with-icon",!A.classList.contains("hidden"))}}),u||window.requestAnimationFrame(()=>{o()}),br(t,l,m),li(t,l,m,r),!t.current)return;e.filter(p=>p.type==="multi-variable"&&p.key).forEach(p=>{if(!p.key)return;const b=p.maxCount||9,g=f[p.key]||1,T=[];for(let N=0;N<g;N++){const A=`${p.key}_${N}`,I=t.current.querySelector(`[data-type="variable"][data-key="${A}"][data-multi-key="${p.key}"]`);if(I){const O=(I.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
38
+ `).trim();T.push(O)}}const x=(T[T.length-1]||"")==="";let S=!1,_=-1;for(let N=0;N<T.length-1;N++)if(T[N]===""){S=!0,_=N;break}if(S&&_>=0){const N=window.getSelection();if(N&&N.rangeCount>0){const P=N.getRangeAt(0),H=P.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const C=v.dataset.key;if(C){const B=document.createRange();B.setStartBefore(v),B.setEnd(P.startContainer,P.startOffset);const $=B.toString().length;h.current={key:C,offset:$}}}}const A=[...T];for(let P=_;P<A.length-1;P++)A[P]=A[P+1];A.pop();const I={};A.forEach((P,H)=>{P&&(I[`${p.key}_${H}`]=P)});const O=Math.max(x?A.length:A.length+1,1);t.current.querySelectorAll('[data-type="variable"]').forEach(P=>{const H=P.dataset.key,v=P.dataset.multiKey;if(H&&v!==p.key){const C=(P.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
39
+ `).trim();C&&(I[H]=C)}}),t.current.__tempVariableValues=I,E(P=>({...P,[p.key]:O}));return}if(!x){const N=g-1,A=`${p.key}_${N}`,I=t.current.querySelector(`[data-type="variable"][data-key="${A}"][data-multi-key="${p.key}"]`);if(I&&(I.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
40
+ `).trim().length>0&&g<b){const w=window.getSelection();if(w&&w.rangeCount>0){const P=w.getRangeAt(0),H=P.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const C=v.dataset.key;if(C){const B=document.createRange();B.setStartBefore(v),B.setEnd(P.startContainer,P.startOffset);const $=B.toString().length;h.current={key:C,offset:$}}}}E(P=>({...P,[p.key]:g+1}))}}})},[u,e,t,l,m,o,f,h,n,r,i,s,E,a]),gl=({disabled:e,lockStructure:t,config:n,editorRef:r,handleInput:a})=>D.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 o=i.target,l=o?.closest?.('[data-type="variable"]'),m=!!o?.closest?.('[data-type="richtext"]'),f=o?.tagName==="TEXTAREA"||!!o?.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 p=l.dataset.multiKey;if(p)return n.find(y=>y.type==="multi-variable"&&y.key===p)?.allowNewline!==!1;const b=l.dataset.key;return n.find(T=>T.type==="variable"&&T.key===b)?.allowNewline!==!1})()){i.preventDefault();return}i.preventDefault();const c=window.getSelection();if(c&&c.rangeCount>0){const p=c.getRangeAt(0);p.deleteContents();const b=document.createElement("br");p.insertNode(b);const g=document.createTextNode("​");b.parentNode?.insertBefore(g,b.nextSibling),p.setStart(g,0),p.collapse(!0),c.removeAllRanges(),c.addRange(p)}a();return}if(!m&&!f){i.preventDefault();return}}const u=window.getSelection();if(u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest('[data-type="text"]'):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest('[data-type="text"]'))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(t&&u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest(".tag-node"):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest(".tag-node"))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(i.key==="Escape"&&r.current){if(t){i.preventDefault();return}r.current.innerHTML="",r.current.focus()}if(i.key==="Backspace"){const o=window.getSelection();if(o&&o.rangeCount>0){const l=o.getRangeAt(0),m=o.anchorNode;if(t){let E=null,h=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?(E=m.closest(".tag-node"),h=m.closest('[data-type="text"]')):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(E=m.parentElement.closest(".tag-node"),h=m.parentElement.closest('[data-type="text"]'))),(E||h)&&l.collapsed&&l.startOffset===0){i.preventDefault();return}}let f=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?f=m.closest('[data-type="variable"]'):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(f=m.parentElement.closest('[data-type="variable"]'))),f){if(!l.collapsed)return;const E=f.innerText;if(E==="​"||E===""){i.preventDefault();return}if((()=>{try{const p=document.createRange();p.selectNodeContents(f),p.setEnd(l.startContainer,l.startOffset);const b=p.cloneContents(),g=document.createTreeWalker(b,NodeFilter.SHOW_ALL);for(;g.nextNode();){const T=g.currentNode;if(T.nodeType===Node.ELEMENT_NODE){if(T.tagName==="BR")return!1}else if(T.nodeType===Node.TEXT_NODE&&(T.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]),El=({lockStructure:e,onAgentExit:t,editorRef:n,setPopoverVisible:r,isDraggingRef:a,mouseDownPosRef:i})=>{const s=(...E)=>{},u=E=>{try{const h=window.getSelection();if(!h)return s(E,"no selection");const c=h.rangeCount>0?h.getRangeAt(0):null;s(E,{rangeCount:h.rangeCount,isCollapsed:h.isCollapsed,anchorNode:h.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":h.anchorNode?.nodeName,anchorOffset:h.anchorOffset,focusNode:h.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":h.focusNode?.nodeName,focusOffset:h.focusOffset,range:c?{startContainer:c.startContainer.nodeType===Node.TEXT_NODE?"TEXT":c.startContainer.nodeName,startOffset:c.startOffset,endContainer:c.endContainer.nodeType===Node.TEXT_NODE?"TEXT":c.endContainer.nodeName,endOffset:c.endOffset}:null})}catch{}},o=D.useCallback(E=>{const h=E.target;if(s("mousedown",{tag:h.tagName,cls:h.className}),u("before mousedown"),h.closest(".rte-datepicker-wrapper")||h.closest(".rte-datepicker-host")||h.closest(".rte-select-wrapper")||h.closest(".rte-select-host")||h.closest(".ant-select-dropdown"))return;if(h.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 b=h.closest(".tag-node"),g=h.closest('[data-type="text"]');if(b||g){E.preventDefault(),E.stopPropagation();const T=window.getSelection();T&&T.removeAllRanges();return}}const p=h.closest('[data-type="variable"]');if(p){if(s("mousedown on variable",{key:p.dataset.key,multiKey:p.dataset.multiKey,nodeType:p.getAttribute("data-node-type")||"",render:p.dataset.variableRender||"v1",classes:p.className}),p.dataset.variableRender==="antd-textarea")return;const b=!!h.closest(".variable-info-icon"),g=p.classList.contains("show-placeholder")||(p.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(s("v1 variable mousedown",{isPlaceholder:g,isOnIcon:b,innerText:p.innerText}),g&&!b){E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mousedown)");const T=window.getSelection();if(!T)return;const y=p;y.focus();const x=document.createTreeWalker(y,NodeFilter.SHOW_TEXT),S=x.nextNode()?x.currentNode:null,_=document.createRange();S?(_.setStart(S,0),_.collapse(!0)):(_.selectNodeContents(y),_.collapse(!0)),T.removeAllRanges(),T.addRange(_),u("raf after setRange (mousedown)")});return}return}i.current={x:E.clientX,y:E.clientY},a.current=!1,h.closest(".file-remove-btn")&&(E.preventDefault(),E.stopPropagation())},[n,a,e,i,t,r]),l=D.useCallback(E=>{if(!E.target.closest('[data-type="variable"]')&&i.current){const p=Math.abs(E.clientX-i.current.x),b=Math.abs(E.clientY-i.current.y);(p>3||b>3)&&(a.current=!0)}},[a,i]),m=D.useCallback(E=>{const h=E.target;s("mouseup",{tag:h.tagName,cls:h.className}),u("before mouseup");const c=h.closest('[data-type="variable"]');if(c){if(c.dataset.variableRender!=="antd-textarea"){const p=!!h.closest(".variable-info-icon"),b=c.classList.contains("show-placeholder")||(c.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;s("v1 variable mouseup",{key:c.dataset.key,isPlaceholder:b,isOnIcon:p,classes:c.className}),b&&!p&&(E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mouseup)");const g=window.getSelection();if(!g)return;const T=c;T.focus();const y=document.createTreeWalker(T,NodeFilter.SHOW_TEXT),x=y.nextNode()?y.currentNode:null,S=document.createRange();x?(S.setStart(x,0),S.collapse(!0)):(S.selectNodeContents(T),S.collapse(!0)),g.removeAllRanges(),g.addRange(S),u("raf after setRange (mouseup)")}))}i.current=null,a.current=!1;return}i.current=null,a.current=!1},[a,i]),f=D.useCallback(E=>{const c=E.target.closest('[data-type="variable"]');if(c){const p=window.getSelection();if(p){const b=document.createRange(),g=c.textContent||"";if(g.replace(/\u200B/g,"")){let y=0,x=g.length;g.startsWith("​")&&(y=1),g.endsWith("​")&&g.length>1&&(x=g.length-1);const S=c.firstChild;S&&S.nodeType===Node.TEXT_NODE?(b.setStart(S,y),b.setEnd(S,x)):b.selectNodeContents(c)}else b.selectNodeContents(c),b.collapse(!0);p.removeAllRanges(),p.addRange(b)}}},[]);return{handleMouseDown:o,handleMouseMove:l,handleMouseUp:m,handleDoubleClick:f}},bl=({disabled:e,config:t,multiVariableCounts:n,setMultiVariableCounts:r,editorRef:a,handleInput:i,markdownAnalyzeRef:s,reportAnalyzeRef:u,markdownNameAnalyzeRef:o,markdownAnalyzeStateRef:l,markdownRawTextRef:m,setMarkdownAnalyzeState:f})=>D.useCallback(E=>{const h=E.target;if(h&&(h.tagName==="TEXTAREA"||h.tagName==="INPUT")&&h.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){E.preventDefault();return}E.preventDefault();const p=(E.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
41
+ `).replace(/\n+$/g,""),b=window.getSelection();if(b&&b.rangeCount>0){const x=b.anchorNode;if(x){let S=null;if(x.nodeType===Node.ELEMENT_NODE?S=x.closest('[data-type="variable"]'):x.nodeType===Node.TEXT_NODE&&x.parentElement&&(S=x.parentElement.closest('[data-type="variable"]')),S){const _=S.dataset.multiKey;if(_){const I=/[、,,\s\n\r\t]+/,O=p.split(I).map(w=>w.trim()).filter(w=>w.length>0);if(O.length>1){const w=parseInt(S.dataset.index||"0",10),P=t.find(j=>j.type==="multi-variable"&&j.key===_)?.maxCount||9,H=n[_]||1,v=Math.min(w+O.length,P);v>H&&r(k=>({...k,[_]:v}));const C=[];for(let k=0;k<H;k++){const j=`${_}_${k}`,J=a.current.querySelector(`[data-type="variable"][data-key="${j}"][data-multi-key="${_}"]`);if(J){const R=J.innerText.replace(/[\u200B\n]/g,"").trim();C.push(R)}}C.splice(w,1,...O.slice(0,P-w));const B=C.slice(0,P);B.length>0&&B[B.length-1]!==""&&B.length<P&&B.push("");const $=Math.max(B.length,1),U={};B.forEach((k,j)=>{k&&(U[`${_}_${j}`]=k)}),a.current.querySelectorAll('[data-type="variable"]').forEach(k=>{const j=k.dataset.key,J=k.dataset.multiKey;if(j&&J!==_){const R=k.innerText.replace(/[\u200B\n]/g,"").trim();R&&(U[j]=R)}}),a.current.__tempVariableValues=U,r(k=>({...k,[_]:$}));return}}const N=S.getAttribute("data-node-type")||"";if(!(N==="markdown"||N==="report-url"||N==="markdown-name")){const I=(()=>{const w=S.getAttribute("data-node-type")||"";if(w==="report-url"||w==="markdown"||w==="markdown-name")return!1;const P=S.dataset.multiKey;if(P)return t.find(B=>B.type==="multi-variable"&&B.key===P)?.allowNewline!==!1;const H=S.dataset.key;return t.find(C=>C.type==="variable"&&C.key===H)?.allowNewline!==!1})(),O=window.getSelection();if(O&&O.rangeCount>0){const w=O.getRangeAt(0);w.deleteContents();const P=document.createDocumentFragment(),v=(I?p:p.replace(/\n+/g," ")).split(`
42
+ `);for(let B=0;B<v.length;B++)P.appendChild(document.createTextNode(v[B])),I&&B<v.length-1&&P.appendChild(document.createElement("br"));w.insertNode(P),O.removeAllRanges();const C=document.createRange();C.selectNodeContents(S),C.collapse(!1),O.addRange(C)}i();return}}}}let g=!1,T="";const y=window.getSelection();if(y&&y.rangeCount>0){const x=y.anchorNode;if(x){let S=null;if(x.nodeType===Node.ELEMENT_NODE?S=x.closest('[data-type="variable"]'):x.nodeType===Node.TEXT_NODE&&x.parentElement&&(S=x.parentElement.closest('[data-type="variable"]')),S){const _=S.getAttribute("data-node-type")||"",N=S.dataset.key;if(_==="markdown"&&N&&/20\d{2}-\d{2}-\d{2}/.test(p))g=!0,T=N,m.current[N]=p,f(A=>({...A,[N]:{...A[N],status:"loading",error:void 0}}));else if(_==="report-url"&&N){document.execCommand("insertText",!1,p),i(),setTimeout(()=>{const A=S.innerText.replace(/[\u200B\n]/g,"").trim();u.current(N,A)},0);return}else if(_==="markdown-name"&&N){document.execCommand("insertText",!1,p),i(),setTimeout(()=>{const A=S.innerText.replace(/[\u200B\n]/g,"").trim();o.current(N,A)},0);return}}}}if(g&&T){setTimeout(()=>{s.current(T,p)},0);return}document.execCommand("insertText",!1,p),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(p)&&l.current.tableData?.status==="success"&&(f(S=>({...S,tableData:{status:"loading",modules:[],lastParsedText:p,error:void 0}})),setTimeout(()=>{m.current.tableData=p,s.current("tableData",p)},0))},0)},[t,e,a,i,s,l,m,n,u,f,r]),Tl=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:u,markdownAnalyzeState:o,markdownNameAnalyzeState:l})=>D.useCallback(()=>{if(r||a||i||!s||!u.current)return;if(e.length===0){const p=u.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!p)return;if(n(p,p),u.current){u.current.textContent="";const b=new Event("input",{bubbles:!0});u.current.dispatchEvent(b)}return}const m=u.current;let f="";const E={},h=p=>{if(!(p.nodeType===Node.ELEMENT_NODE&&p.style.display==="none")){if(p.nodeType===Node.TEXT_NODE)f+=(p.textContent||"").replace(/\u200B/g,"");else if(p.nodeType===Node.ELEMENT_NODE){const b=p,g=b.dataset.type,T=b.dataset.key;if(g==="variable"&&T){let y="";const x=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:_=>{const N=b.querySelector(".variable-info-icon");return N&&N.contains(_)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;x.nextNode();)y+=x.currentNode.textContent||"";const S=y.replace(/[\u200B\n]/g,"").trim();if(S){const _=b.dataset.multiKey;if(_){(!E[_]||!Array.isArray(E[_]))&&(E[_]=[]);const N=E[_];N.push(S),N.length>1&&(f+=" "),f+=S}else E[T]=S,f+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const N=E.url;Array.isArray(N)?N.push(S):E.url=[String(N),S]}if(b.dataset.nodeType==="markdown-name"){const N=`${T}__sourceText`;E[N]===void 0&&(E[N]=S)}if(b.dataset.nodeType==="markdown"){const N=b.dataset.sourceTextKey||`${T}__sourceText`;if(E[N]===void 0)E[N]=S;else{const I=E[N];Array.isArray(I)?I.push(S):E[N]=[String(I),S]}const A=`${T}__markdown`;E[A]===void 0&&(E[A]=[oi(S)])}}}else if(g==="select"&&T){const y=(b.getAttribute("data-value")||"").trim();y&&(E[T]=y,f+=y)}else if(g==="textarea"&&T){const x=(b.value||"").replace(/\u200B/g,"").trim();x&&(E[T]=x,f+=x)}else if(g==="richtext"&&T){const y=b,x=y.dataset.nodeType,S=(y.textContent||"").replace(/\u200B/g,"").trim();if(S)if(x==="report-module"||x==="markdown-module"){(!E[T]||!Array.isArray(E[T]))&&(E[T]=[]);const _=E[T];_.push(S),_.length>1&&(f+=" "),f+=S}else E[T]=S,f+=S}else if(g==="datepicker"&&T){const x=(b.getAttribute("data-value")||"").trim();if(x)if(x.includes(",")){const S=x.split(",");S.length===2?(E[T]=S,f+=`[${S[0]}, ${S[1]}]`):(E[T]=x,f+=x)}else E[T]=x,f+=x}else if(g==="number-input"&&T){const x=(b.value||"").trim();x&&(E[T]=x,f+=x)}else if(g==="upload"&&T){const y=b.dataset.batchKey;if(y){const x=e.find(S=>S.type==="upload"&&S.key===y);if(x&&typeof x.maxCount=="number"&&typeof x.minCount=="number"){const S=[];for(let _=0;_<x.maxCount;_++){const N=`${y}-${_}`,A=t[N];A&&S.push(A)}E[y]||(E[y]=S.length>0?S:null,S.length>0&&(f+=` [附带${S.length}个文件: ${S.map(_=>typeof _=="string"?_.split("/").pop()||"file":_.name).join(", ")}] `))}else if(E[T]=t[T]??null,t[T]){const S=t[T];f+=` [附带文件: ${typeof S=="string"?S.split("/").pop()||"file":S.name}] `}}else if(E[T]=t[T]??null,t[T]){const x=t[T];f+=` [附带文件: ${typeof x=="string"?x.split("/").pop()||"file":x.name}] `}}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!g&&b.classList.contains("tag-node")?f+=b.innerText:b.childNodes.forEach(h)}}}};if(m.childNodes.forEach(h),f=f.trim(),!f)return;Object.keys(o).forEach(p=>{const b=o[p];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);g.length!==0&&(E[`${p}__markdown`]=g)}),Object.keys(l).forEach(p=>{const b=l[p];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);g.length!==0&&(E[`${p}__markdown`]=g)});const c=new FormData;c.append("fullPrompt",f),Object.keys(E).forEach(p=>{const b=E[p];if(b!=null)if(b instanceof File)c.append(p,b);else if(Array.isArray(b)){const g=e.some(S=>S.type==="multi-variable"&&S.key===p),T=e.some(S=>S.type==="report-url"&&S.key===p),y=p.endsWith("__markdown");g||T||y||p==="url"?b.forEach(S=>{S!=null&&S!==""&&c.append(p,String(S))}):b.forEach((S,_)=>{S!=null&&(S instanceof File?c.append(`${p}[${_}]`,S):typeof S=="string"?c.append(`${p}[${_}]`,S):c.append(`${p}[${_}]`,String(S)))})}else typeof b=="string"?c.append(p,b):c.append(p,String(b))}),n(c,f)},[e,t,n,r,a,i,s,u,o,l]);function ci(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Tr(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]:ci(t[r])&&ci(e[r])&&Object.keys(t[r]).length>0&&Tr(e[r],t[r])})}const di={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 yt(){const e=typeof document<"u"?document:{};return Tr(e,di),e}const yl={document:di,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 De(){const e=typeof window<"u"?window:{};return Tr(e,yl),e}function xl(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function Cl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function fi(e,t=0){return setTimeout(e,t)}function Pn(){return Date.now()}function Sl(e){const t=De();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function Al(e,t="x"){const n=De();let r,a,i;const s=Sl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(u=>u.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 Mn(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function _l(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function $e(...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&&!_l(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,u=i.length;s<u;s+=1){const o=i[s],l=Object.getOwnPropertyDescriptor(a,o);l!==void 0&&l.enumerable&&(Mn(t[o])&&Mn(a[o])?a[o].__swiper__?t[o]=a[o]:$e(t[o],a[o]):!Mn(t[o])&&Mn(a[o])?(t[o]={},a[o].__swiper__?t[o]=a[o]:$e(t[o],a[o])):t[o]=a[o])}}}return t}function It(e,t,n){e.style.setProperty(t,n)}function pi({swiper:e,targetPosition:t,side:n}){const r=De(),a=-e.translate;let i=null,s;const u=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const o=t>a?"next":"prev",l=(f,E)=>o==="next"&&f>=E||o==="prev"&&f<=E,m=()=>{s=new Date().getTime(),i===null&&(i=s);const f=Math.max(Math.min((s-i)/u,1),0),E=.5-Math.cos(f*Math.PI)/2;let h=a+E*(t-a);if(l(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),l(h,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(m)};m()}function Ke(e,t=""){const n=De(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function kl(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 vl(e,t){const n=De();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=kl(e,t))),r}function Bn(e){try{console.warn(e);return}catch{}}function Rn(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:xl(t)),n}function Nl(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 wl(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 ct(e,t){return De().getComputedStyle(e,null).getPropertyValue(t)}function Fn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function hi(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 yr(e,t,n){const r=De();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 ke(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function Wt(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let xr;function Il(){const e=De(),t=yt();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function mi(){return xr||(xr=Il()),xr}let Cr;function Ll({userAgent:e}={}){const t=mi(),n=De(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,u=n.screen.height,o=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const m=a.match(/(iPod)(.*OS\s([\d_]+))?/),f=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),E=r==="Win32";let h=r==="MacIntel";const c=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&h&&t.touch&&c.indexOf(`${s}x${u}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),h=!1),o&&!E&&(i.os="android",i.android=!0),(l||f||m)&&(i.os="ios",i.ios=!0),i}function gi(e={}){return Cr||(Cr=Ll(e)),Cr}let Sr;function Ol(){const e=De(),t=gi();let n=!1;function r(){const u=e.navigator.userAgent.toLowerCase();return u.indexOf("safari")>=0&&u.indexOf("chrome")<0&&u.indexOf("android")<0}if(r()){const u=String(e.navigator.userAgent);if(u.includes("Version/")){const[o,l]=u.split("Version/")[1].split(" ")[0].split(".").map(m=>Number(m));n=o<16||o===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 Ei(){return Sr||(Sr=Ol()),Sr}function Dl({swiper:e,on:t,emit:n}){const r=De();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},u=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(m=>{i=r.requestAnimationFrame(()=>{const{width:f,height:E}=e;let h=f,c=E;m.forEach(({contentBoxSize:p,contentRect:b,target:g})=>{g&&g!==e.el||(h=b?b.width:(p[0]||p).inlineSize,c=b?b.height:(p[0]||p).blockSize)}),(h!==f||c!==E)&&s()})}),a.observe(e.el))},o=()=>{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"){u();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{o(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function Pl({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=De(),s=(l,m={})=>{const f=i.MutationObserver||i.WebkitMutationObserver,E=new f(h=>{if(e.__preventObserver__)return;if(h.length===1){r("observerUpdate",h[0]);return}const c=function(){r("observerUpdate",h[0])};i.requestAnimationFrame?i.requestAnimationFrame(c):i.setTimeout(c,0)});E.observe(l,{attributes:typeof m.attributes>"u"?!0:m.attributes,childList:e.isElement||(typeof m.childList>"u"?!0:m).childList,characterData:typeof m.characterData>"u"?!0:m.characterData}),a.push(E)},u=()=>{if(e.params.observer){if(e.params.observeParents){const l=hi(e.hostEl);for(let m=0;m<l.length;m+=1)s(l[m])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},o=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",u),n("destroy",o)}var Ml={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(u=>{u.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(u=>{u.apply(a,r)})}),t}};function Bl(){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(ct(r,"padding-left")||0,10)-parseInt(ct(r,"padding-right")||0,10),n=n-parseInt(ct(r,"padding-top")||0,10)-parseInt(ct(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 Rl(){const e=this;function t(O,w){return parseFloat(O.getPropertyValue(e.getDirectionLabel(w))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,u=e.virtual&&n.virtual.enabled,o=u?e.virtual.slides.length:e.slides.length,l=Ke(a,`.${e.params.slideClass}, swiper-slide`),m=u?e.virtual.slides.length:l.length;let f=[];const E=[],h=[];let c=n.slidesOffsetBefore;typeof c=="function"&&(c=n.slidesOffsetBefore.call(e));let p=n.slidesOffsetAfter;typeof p=="function"&&(p=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,g=e.slidesGrid.length,T=e.size-c-p;let y=n.spaceBetween,x=-c,S=0,_=0;if(typeof T>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*T:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y-c-p,l.forEach(O=>{i?O.style.marginLeft="":O.style.marginRight="",O.style.marginBottom="",O.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(It(r,"--swiper-centered-offset-before",""),It(r,"--swiper-centered-offset-after","")),n.cssMode&&(It(r,"--swiper-slides-offset-before",`${c}px`),It(r,"--swiper-slides-offset-after",`${p}px`));const N=n.grid&&n.grid.rows>1&&e.grid;N?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let A;const I=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(O=>typeof n.breakpoints[O].slidesPerView<"u").length>0;for(let O=0;O<m;O+=1){A=0;const w=l[O];if(!(w&&(N&&e.grid.updateSlide(O,w,l),ct(w,"display")==="none"))){if(u&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(A=n.virtual.slidesPerViewAutoSlideSize),A&&w&&(n.roundLengths&&(A=Math.floor(A)),w.style[e.getDirectionLabel("width")]=`${A}px`);else if(n.slidesPerView==="auto"){I&&(w.style[e.getDirectionLabel("width")]="");const P=getComputedStyle(w),H=w.style.transform,v=w.style.webkitTransform;if(H&&(w.style.transform="none"),v&&(w.style.webkitTransform="none"),n.roundLengths)A=e.isHorizontal()?yr(w,"width"):yr(w,"height");else{const C=t(P,"width"),B=t(P,"padding-left"),$=t(P,"padding-right"),U=t(P,"margin-left"),V=t(P,"margin-right"),k=P.getPropertyValue("box-sizing");if(k&&k==="border-box")A=C+U+V;else{const{clientWidth:j,offsetWidth:J}=w;A=C+B+$+U+V+(J-j)}}H&&(w.style.transform=H),v&&(w.style.webkitTransform=v),n.roundLengths&&(A=Math.floor(A))}else A=(T-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(A=Math.floor(A)),w&&(w.style[e.getDirectionLabel("width")]=`${A}px`);w&&(w.swiperSlideSize=A),h.push(A),n.centeredSlides?(x=x+A/2+S/2+y,S===0&&O!==0&&(x=x-T/2-y),O===0&&(x=x-T/2-y),Math.abs(x)<1/1e3&&(x=0),n.roundLengths&&(x=Math.floor(x)),_%n.slidesPerGroup===0&&f.push(x),E.push(x)):(n.roundLengths&&(x=Math.floor(x)),(_-Math.min(e.params.slidesPerGroupSkip,_))%e.params.slidesPerGroup===0&&f.push(x),E.push(x),x=x+A+y),e.virtualSize+=A+y,S=A,_+=1}}if(e.virtualSize=Math.max(e.virtualSize,T)+p,i&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),N&&e.grid.updateWrapperSize(A,f),!n.centeredSlides){const O=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,w=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||O);let P=f.length;if(w){let v;if(n.slidesPerView==="auto"){v=1;let C=0;for(let B=h.length-1;B>=0&&(C+=h[B]+(B<h.length-1?y:0),C<=T);B-=1)v=h.length-B}else v=Math.floor(n.slidesPerView);P=Math.max(m-v,0)}const H=[];for(let v=0;v<f.length;v+=1){let C=f[v];n.roundLengths&&(C=Math.floor(C)),w?v<=P&&H.push(C):f[v]<=e.virtualSize-T&&H.push(C)}f=H,Math.floor(e.virtualSize-T)-Math.floor(f[f.length-1])>1&&(w||f.push(e.virtualSize-T))}if(u&&n.loop){const O=h[0]+y;if(n.slidesPerGroup>1){const w=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),P=O*n.slidesPerGroup;for(let H=0;H<w;H+=1)f.push(f[f.length-1]+P)}for(let w=0;w<e.virtual.slidesBefore+e.virtual.slidesAfter;w+=1)n.slidesPerGroup===1&&f.push(f[f.length-1]+O),E.push(E[E.length-1]+O),e.virtualSize+=O}if(f.length===0&&(f=[0]),y!==0){const O=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((w,P)=>!n.cssMode||n.loop?!0:P!==l.length-1).forEach(w=>{w.style[O]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let O=0;h.forEach(P=>{O+=P+(y||0)}),O-=y;const w=O>T?O-T:0;f=f.map(P=>P<=0?-c:P>w?w+p:P)}if(n.centerInsufficientSlides){let O=0;h.forEach(P=>{O+=P+(y||0)}),O-=y;const w=(c||0)+(p||0);if(O+w<T){const P=(T-O-w)/2;f.forEach((H,v)=>{f[v]=H-P}),E.forEach((H,v)=>{E[v]=H+P})}}if(Object.assign(e,{slides:l,snapGrid:f,slidesGrid:E,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){It(r,"--swiper-centered-offset-before",`${-f[0]}px`),It(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const O=-e.snapGrid[0],w=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(P=>P+O),e.slidesGrid=e.slidesGrid.map(P=>P+w)}if(m!==o&&e.emit("slidesLengthChange"),f.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),E.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!u&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const O=`${n.containerModifierClass}backface-hidden`,w=e.el.classList.contains(O);m<=n.maxBackfaceHiddenSlides?w||e.el.classList.add(O):w&&e.el.classList.remove(O)}}function Fl(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=u=>r?t.slides[t.getSlideIndexByData(u)]:t.slides[u];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(u=>{n.push(u)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const u=t.activeIndex+i;if(u>t.slides.length&&!r)break;n.push(s(u))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const u=n[i].offsetHeight;a=u>a?u:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function Hl(){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 bi=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function $l(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 u=n.spaceBetween;typeof u=="string"&&u.indexOf("%")>=0?u=parseFloat(u.replace("%",""))/100*t.size:typeof u=="string"&&(u=parseFloat(u));for(let o=0;o<r.length;o+=1){const l=r[o];let m=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(m-=r[0].swiperSlideOffset);const f=(s+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),E=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),h=-(s-m),c=h+t.slidesSizesGrid[o],p=h>=0&&h<=t.size-t.slidesSizesGrid[o],b=h>=0&&h<t.size-1||c>1&&c<=t.size||h<=0&&c>=t.size;b&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(o)),bi(l,b,n.slideVisibleClass),bi(l,p,n.slideFullyVisibleClass),l.progress=a?-f:f,l.originalProgress=a?-E:E}}function Ul(e){const t=this;if(typeof e>"u"){const m=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*m||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:u}=t;const o=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const m=Math.abs(e-t.minTranslate())<1,f=Math.abs(e-t.maxTranslate())<1;i=m||a<=0,s=f||a>=1,m&&(a=0),f&&(a=1)}if(n.loop){const m=t.getSlideIndexByData(0),f=t.getSlideIndexByData(t.slides.length-1),E=t.slidesGrid[m],h=t.slidesGrid[f],c=t.slidesGrid[t.slidesGrid.length-1],p=Math.abs(e);p>=E?u=(p-E)/c:u=(p+c-h)/c,u>1&&(u-=1)}Object.assign(t,{progress:a,progressLoop:u,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!o&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(o&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Ar=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function ql(){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,u=f=>Ke(r,`.${n.slideClass}${f}, swiper-slide${f}`)[0];let o,l,m;if(i)if(n.loop){let f=a-e.virtual.slidesBefore;f<0&&(f=e.virtual.slides.length+f),f>=e.virtual.slides.length&&(f-=e.virtual.slides.length),o=u(`[data-swiper-slide-index="${f}"]`)}else o=u(`[data-swiper-slide-index="${a}"]`);else s?(o=t.find(f=>f.column===a),m=t.find(f=>f.column===a+1),l=t.find(f=>f.column===a-1)):o=t[a];o&&(s||(m=wl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!m&&(m=t[0]),l=Nl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(f=>{Ar(f,f===o,n.slideActiveClass),Ar(f,f===m,n.slideNextClass),Ar(f,f===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Hn=(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()}},_r=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},kr=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,u=[s-t];u.push(...Array.from({length:t}).map((o,l)=>s+r+l)),e.slides.forEach((o,l)=>{u.includes(o.column)&&_r(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 u=(s%n+n)%n;(u<a||u>i)&&_r(e,u)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&_r(e,s)};function zl(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 Vl(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:u}=t;let o=e,l;const m=h=>{let c=h-t.virtual.slidesBefore;return c<0&&(c=t.virtual.slides.length+c),c>=t.virtual.slides.length&&(c-=t.virtual.slides.length),c};if(typeof o>"u"&&(o=zl(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const h=Math.min(a.slidesPerGroupSkip,o);l=h+Math.floor((o-h)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),o===i&&!t.params.loop){l!==u&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(o===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=m(o);return}const f=t.grid&&a.grid&&a.grid.rows>1;let E;if(t.virtual&&a.virtual.enabled)a.loop?E=m(o):E=o;else if(f){const h=t.slides.find(p=>p.column===o);let c=parseInt(h.getAttribute("data-swiper-slide-index"),10);Number.isNaN(c)&&(c=Math.max(t.slides.indexOf(h),0)),E=Math.floor(c/a.grid.rows)}else if(t.slides[o]){const h=t.slides[o].getAttribute("data-swiper-slide-index");h?E=parseInt(h,10):E=o}else E=o;Object.assign(t,{previousSnapIndex:u,snapIndex:l,previousRealIndex:s,realIndex:E,previousIndex:i,activeIndex:o}),t.initialized&&kr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==E&&t.emit("realIndexChange"),t.emit("slideChange"))}function Gl(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(u=>{!a&&u.matches&&u.matches(`.${r.slideClass}, swiper-slide`)&&(a=u)});let i=!1,s;if(a){for(let u=0;u<n.slides.length;u+=1)if(n.slides[u]===a){i=!0,s=u;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 Yl={updateSize:Bl,updateSlides:Rl,updateAutoHeight:Fl,updateSlidesOffset:Hl,updateSlidesProgress:$l,updateProgress:Ul,updateSlidesClasses:ql,updateActiveIndex:Vl,updateClickedSlide:Gl};function Wl(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=Al(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function jl(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let u=0,o=0;const l=0;n.isHorizontal()?u=r?-e:e:o=e,a.roundLengths&&(u=Math.floor(u),o=Math.floor(o)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?u:o,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-u:-o:a.virtualTranslate||(n.isHorizontal()?u-=n.cssOverflowAdjustment():o-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${u}px, ${o}px, ${l}px)`);let m;const f=n.maxTranslate()-n.minTranslate();f===0?m=0:m=(e-n.minTranslate())/f,m!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function Xl(){return-this.snapGrid[0]}function Kl(){return-this.snapGrid[this.snapGrid.length-1]}function Ql(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:u}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const o=i.minTranslate(),l=i.maxTranslate();let m;if(r&&e>o?m=o:r&&e<l?m=l:m=e,i.updateProgress(m),s.cssMode){const f=i.isHorizontal();if(t===0)u[f?"scrollLeft":"scrollTop"]=-m;else{if(!i.support.smoothScroll)return pi({swiper:i,targetPosition:-m,side:f?"left":"top"}),!0;u.scrollTo({[f?"left":"top"]:-m,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(m),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 Jl={getTranslate:Wl,setTranslate:jl,minTranslate:Xl,maxTranslate:Kl,translateTo:Ql};function Zl(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 Ti({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 ec(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),Ti({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function tc(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),Ti({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var nc={setTransition:Zl,transitionStart:ec,transitionEnd:tc};function rc(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:u,snapGrid:o,slidesGrid:l,previousIndex:m,activeIndex:f,rtlTranslate:E,wrapperEl:h,enabled:c}=i;if(!c&&!r&&!a||i.destroyed||i.animating&&u.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const p=Math.min(i.params.slidesPerGroupSkip,s);let b=p+Math.floor((s-p)/i.params.slidesPerGroup);b>=o.length&&(b=o.length-1);const g=-o[b];if(u.normalizeSlideIndex)for(let N=0;N<l.length;N+=1){const A=-Math.floor(g*100),I=Math.floor(l[N]*100),O=Math.floor(l[N+1]*100);typeof l[N+1]<"u"?A>=I&&A<O-(O-I)/2?s=N:A>=I&&A<O&&(s=N+1):A>=I&&(s=N)}if(i.initialized&&s!==f&&(!i.allowSlideNext&&(E?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate())||!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(f||0)!==s))return!1;s!==(m||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g);let T;s>f?T="next":s<f?T="prev":T="reset";const y=i.virtual&&i.params.virtual.enabled;if(!(y&&a)&&(E&&-g===i.translate||!E&&g===i.translate))return i.updateActiveIndex(s),u.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),u.effect!=="slide"&&i.setTranslate(g),T!=="reset"&&(i.transitionStart(n,T),i.transitionEnd(n,T)),!1;if(u.cssMode){const N=i.isHorizontal(),A=E?g:-g;if(t===0)y&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),y&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{h[N?"scrollLeft":"scrollTop"]=A})):h[N?"scrollLeft":"scrollTop"]=A,y&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return pi({swiper:i,targetPosition:A,side:N?"left":"top"}),!0;h.scrollTo({[N?"left":"top"]:A,behavior:"smooth"})}return!0}const _=Ei().isSafari;return y&&!a&&_&&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,T),t===0?i.transitionEnd(n,T):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,T))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function ac(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 u;if(i){const p=s*a.params.grid.rows;u=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===p).column}else u=a.getSlideIndexByData(s);const o=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:m,slidesOffsetAfter:f}=a.params,E=l||!!m||!!f;let h=a.params.slidesPerView;h==="auto"?h=a.slidesPerViewDynamic():(h=Math.ceil(parseFloat(a.params.slidesPerView,10)),E&&h%2===0&&(h=h+1));let c=o-u<h;if(E&&(c=c||u<Math.ceil(h/2)),r&&E&&a.params.slidesPerView!=="auto"&&!i&&(c=!1),c){const p=E?u<a.activeIndex?"prev":"next":u-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:p,slideTo:!0,activeSlideIndex:p==="next"?u+1:u-o+1,slideRealIndex:p==="next"?a.realIndex:void 0})}if(i){const p=s*a.params.grid.rows;s=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===p).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function ic(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 u=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(u=Math.max(r.slidesPerViewDynamic("current",!0),1));const o=r.activeIndex<i.slidesPerGroupSkip?1:u,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+o,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+o,e,t,n)}function sc(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:u,enabled:o,animating:l}=r;if(!o||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const m=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!m&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const f=u?r.translate:-r.translate;function E(T){return T<0?-Math.floor(Math.abs(T)):Math.floor(T)}const h=E(f),c=i.map(T=>E(T)),p=a.freeMode&&a.freeMode.enabled;let b=i[c.indexOf(h)-1];if(typeof b>"u"&&(a.cssMode||p)){let T;i.forEach((y,x)=>{h>=y&&(T=x)}),typeof T<"u"&&(b=p?i[T]:i[T>0?T-1:T])}let g=0;if(typeof b<"u"&&(g=s.indexOf(b),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 T=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(T,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 oc(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 uc(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),u=s+Math.floor((i-s)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[u]){const l=a.snapGrid[u],m=a.snapGrid[u+1];o-l>(m-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[u-1],m=a.snapGrid[u];o-l<=(m-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 lc(){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}`,u=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>(u?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(Ke(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),fi(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var cc={slideTo:rc,slideToLoop:ac,slideNext:ic,slidePrev:sc,slideReset:oc,slideToClosest:uc,slideToClickedSlide:lc};function dc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{Ke(a,`.${r.slideClass}, swiper-slide`).forEach((c,p)=>{c.setAttribute("data-swiper-slide-index",p)})},s=()=>{const h=Ke(a,`.${r.slideBlankClass}`);h.forEach(c=>{c.remove()}),h.length>0&&(n.recalcSlides(),n.updateSlides())},u=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||u)&&s();const o=r.slidesPerGroup*(u?r.grid.rows:1),l=n.slides.length%o!==0,m=u&&n.slides.length%r.grid.rows!==0,f=h=>{for(let c=0;c<h;c+=1){const p=n.isElement?Rn("swiper-slide",[r.slideBlankClass]):Rn("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(p)}};if(l){if(r.loopAddBlankSlides){const h=o-n.slides.length%o;f(h),n.recalcSlides(),n.updateSlides()}else Bn("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(m){if(r.loopAddBlankSlides){const h=r.grid.rows-n.slides.length%r.grid.rows;f(h),n.recalcSlides(),n.updateSlides()}else Bn("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 fc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:u}={}){const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:l,allowSlidePrev:m,allowSlideNext:f,slidesEl:E,params:h}=o,{centeredSlides:c,slidesOffsetBefore:p,slidesOffsetAfter:b,initialSlide:g}=h,T=c||!!p||!!b;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&&h.virtual.enabled){t&&(!T&&o.snapIndex===0?o.slideTo(o.virtual.slides.length,0,!1,!0):T&&o.snapIndex<h.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&&o.slideTo(o.virtual.slidesBefore,0,!1,!0)),o.allowSlidePrev=m,o.allowSlideNext=f,o.emit("loopFix");return}let y=h.slidesPerView;y==="auto"?y=o.slidesPerViewDynamic():(y=Math.ceil(parseFloat(h.slidesPerView,10)),T&&y%2===0&&(y=y+1));const x=h.slidesPerGroupAuto?y:h.slidesPerGroup;let S=T?Math.max(x,Math.ceil(y/2)):x;S%x!==0&&(S+=x-S%x),S+=h.loopAdditionalSlides,o.loopedSlides=S;const _=o.grid&&h.grid&&h.grid.rows>1;l.length<y+S||o.params.effect==="cards"&&l.length<y+S*2?Bn("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"):_&&h.grid.fill==="row"&&Bn("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const N=[],A=[],I=_?Math.ceil(l.length/h.grid.rows):l.length,O=i&&I-g<y&&!T;let w=O?g:o.activeIndex;typeof a>"u"?a=o.getSlideIndex(l.find(U=>U.classList.contains(h.slideActiveClass))):w=a;const P=n==="next"||!n,H=n==="prev"||!n;let v=0,C=0;const $=(_?l[a].column:a)+(T&&typeof r>"u"?-y/2+.5:0);if($<S){v=Math.max(S-$,x);for(let U=0;U<S-$;U+=1){const V=U-Math.floor(U/I)*I;if(_){const k=I-V-1;for(let j=l.length-1;j>=0;j-=1)l[j].column===k&&N.push(j)}else N.push(I-V-1)}}else if($+y>I-S){C=Math.max($-(I-S*2),x),O&&(C=Math.max(C,y-I+g+1));for(let U=0;U<C;U+=1){const V=U-Math.floor(U/I)*I;_?l.forEach((k,j)=>{k.column===V&&A.push(j)}):A.push(V)}}if(o.__preventObserver__=!0,requestAnimationFrame(()=>{o.__preventObserver__=!1}),o.params.effect==="cards"&&l.length<y+S*2&&(A.includes(a)&&A.splice(A.indexOf(a),1),N.includes(a)&&N.splice(N.indexOf(a),1)),H&&N.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.prepend(l[U]),l[U].swiperLoopMoveDOM=!1}),P&&A.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.append(l[U]),l[U].swiperLoopMoveDOM=!1}),o.recalcSlides(),h.slidesPerView==="auto"?o.updateSlides():_&&(N.length>0&&H||A.length>0&&P)&&o.slides.forEach((U,V)=>{o.grid.updateSlide(V,U,o.slides)}),h.watchSlidesProgress&&o.updateSlidesOffset(),t){if(N.length>0&&H){if(typeof e>"u"){const U=o.slidesGrid[w],k=o.slidesGrid[w+v]-U;u?o.setTranslate(o.translate-k):(o.slideTo(w+Math.ceil(v),0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else if(r){const U=_?N.length/h.grid.rows:N.length;o.slideTo(o.activeIndex+U,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(A.length>0&&P)if(typeof e>"u"){const U=o.slidesGrid[w],k=o.slidesGrid[w-C]-U;u?o.setTranslate(o.translate-k):(o.slideTo(w-C,0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else{const U=_?A.length/h.grid.rows:A.length;o.slideTo(o.activeIndex-U,0,!1,!0)}}if(o.allowSlidePrev=m,o.allowSlideNext=f,o.controller&&o.controller.control&&!s){const U={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...U,slideTo:V.params.slidesPerView===h.slidesPerView?t:!1})}):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...U,slideTo:o.controller.control.params.slidesPerView===h.slidesPerView?t:!1})}o.emit("loopFix")}function pc(){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 hc={loopCreate:dc,loopFix:fc,loopDestroy:pc};function mc(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 gc(){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 Ec={setGrabCursor:mc,unsetGrabCursor:gc};function bc(e,t=this){function n(r){if(!r||r===yt()||r===De())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 yi(e,t,n){const r=De(),{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 Tc(e){const t=this,n=yt();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"){yi(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:u}=t;if(!u||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let o=r.target;if(i.touchEventsTarget==="wrapper"&&!vl(o,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!=="",m=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&m&&(o=m[0]);const f=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,E=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(E?bc(f,o):o.closest(f))){t.allowClick=!0;return}if(i.swipeHandler&&!o.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const h=s.currentX,c=s.currentY;if(!yi(t,r,h))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=c,a.touchStartTime=Pn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let p=!0;o.matches(a.focusableElements)&&(p=!1,o.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==o&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!o.matches(a.focusableElements))&&n.activeElement.blur();const b=p&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||b)&&!o.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function yc(e){const t=yt(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:u}=n;if(!u||!a.simulateTouch&&e.pointerType==="mouse")return;let o=e;if(o.originalEvent&&(o=o.originalEvent),o.type==="pointermove"&&(r.touchId!==null||o.pointerId!==r.pointerId))return;let l;if(o.type==="touchmove"){if(l=[...o.changedTouches].find(S=>S.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=o;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",o);return}const m=l.pageX,f=l.pageY;if(o.preventedByNestedSwiper){i.startX=m,i.startY=f;return}if(!n.allowTouchMove){o.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:m,startY:f,currentX:m,currentY:f}),r.touchStartTime=Pn());return}if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(f<i.startY&&n.translate<=n.maxTranslate()||f>i.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(m>i.startX&&-n.translate<=n.maxTranslate()||m<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(m<i.startX&&n.translate<=n.maxTranslate()||m>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==o.target&&o.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&o.target===t.activeElement&&o.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",o),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=m,i.currentY=f;const E=i.currentX-i.startX,h=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(E**2+h**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let S;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:E*E+h*h>=25&&(S=Math.atan2(Math.abs(h),Math.abs(E))*180/Math.PI,r.isScrolling=n.isHorizontal()?S>a.touchAngle:90-S>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",o),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||o.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&o.cancelable&&o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.stopPropagation();let c=n.isHorizontal()?E:h,p=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(c=Math.abs(c)*(s?1:-1),p=Math.abs(p)*(s?1:-1)),i.diff=c,c*=a.touchRatio,s&&(c=-c,p=-p);const b=n.touchesDirection;n.swipeDirection=c>0?"prev":"next",n.touchesDirection=p>0?"prev":"next";const g=n.params.loop&&!a.cssMode,T=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(g&&T&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const S=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(S)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",o)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&b!==n.touchesDirection&&g&&T&&Math.abs(c)>=1){Object.assign(i,{startX:m,startY:f,currentX:m,currentY:f,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",o),r.isMoved=!0,r.currentTranslate=c+r.startTranslate;let y=!0,x=a.resistanceRatio;if(a.touchReleaseOnEdges&&(x=0),c>0?(g&&T&&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()&&(y=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+c)**x))):c<0&&(g&&T&&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()&&(y=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-c)**x))),y&&(o.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(c)>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 xc(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(S=>S.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:u,rtlTranslate:o,slidesGrid:l,enabled:m}=t;if(!m||!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 f=Pn(),E=f-n.touchStartTime;if(t.allowClick){const S=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(S&&S[0]||r.target,S),t.emit("tap click",r),E<300&&f-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Pn(),fi(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||u.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 h;if(s.followFinger?h=o?t.translate:-t.translate:h=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:h});return}const c=h>=-t.maxTranslate()&&!t.params.loop;let p=0,b=t.slidesSizesGrid[0];for(let S=0;S<l.length;S+=S<s.slidesPerGroupSkip?1:s.slidesPerGroup){const _=S<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[S+_]<"u"?(c||h>=l[S]&&h<l[S+_])&&(p=S,b=l[S+_]-l[S]):(c||h>=l[S])&&(p=S,b=l[l.length-1]-l[l.length-2])}let g=null,T=null;s.rewind&&(t.isBeginning?T=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const y=(h-l[p])/b,x=p<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(E>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:p+x):t.slideTo(p)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(p+x):T!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(T):t.slideTo(p))}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(p+x):t.slideTo(p):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:p+x),t.swipeDirection==="prev"&&t.slideTo(T!==null?T:p))}}function xi(){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 u=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!u?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 Cc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Sc(){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 Ac(e){const t=this;Hn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function _c(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Ci=(e,t)=>{const n=yt(),{params:r,el:a,wrapperEl:i,device:s}=e,u=!!r.nested,o=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:u}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),n[o]("touchmove",e.onTouchMove,{passive:!1,capture:u}),n[o]("pointermove",e.onTouchMove,{passive:!1,capture:u}),n[o]("touchend",e.onTouchEnd,{passive:!0}),n[o]("pointerup",e.onTouchEnd,{passive:!0}),n[o]("pointercancel",e.onTouchEnd,{passive:!0}),n[o]("touchcancel",e.onTouchEnd,{passive:!0}),n[o]("pointerout",e.onTouchEnd,{passive:!0}),n[o]("pointerleave",e.onTouchEnd,{passive:!0}),n[o]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[o]("click",e.onClick,!0),r.cssMode&&i[o]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",xi,!0):e[l]("observerUpdate",xi,!0),a[o]("load",e.onLoad,{capture:!0}))};function kc(){const e=this,{params:t}=e;e.onTouchStart=Tc.bind(e),e.onTouchMove=yc.bind(e),e.onTouchEnd=xc.bind(e),e.onDocumentTouchStart=_c.bind(e),t.cssMode&&(e.onScroll=Sc.bind(e)),e.onClick=Cc.bind(e),e.onLoad=Ac.bind(e),Ci(e,"on")}function vc(){Ci(this,"off")}var Nc={attachEvents:kc,detachEvents:vc};const Si=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function wc(){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=yt(),u=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",o=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,u,o);if(!l||e.currentBreakpoint===l)return;const f=(l in i?i[l]:void 0)||e.originalParams,E=Si(e,r),h=Si(e,f),c=e.params.grabCursor,p=f.grabCursor,b=r.enabled;E&&!h?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!E&&h&&(a.classList.add(`${r.containerModifierClass}grid`),(f.grid.fill&&f.grid.fill==="column"||!f.grid.fill&&r.grid.fill==="column")&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),c&&!p?e.unsetGrabCursor():!c&&p&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(_=>{if(typeof f[_]>"u")return;const N=r[_]&&r[_].enabled,A=f[_]&&f[_].enabled;N&&!A&&e[_].disable(),!N&&A&&e[_].enable()});const g=f.direction&&f.direction!==r.direction,T=r.loop&&(f.slidesPerView!==r.slidesPerView||g),y=r.loop;g&&n&&e.changeDirection(),$e(e.params,f);const x=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),b&&!x?e.disable():!b&&x&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",f),n&&(T?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&S?(e.loopCreate(t),e.updateSlides()):y&&!S&&e.loopDestroy()),e.emit("breakpoint",f)}function Ic(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=De(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(u=>{if(typeof u=="string"&&u.indexOf("@")===0){const o=parseFloat(u.substr(1));return{value:i*o,point:u}}return{value:u,point:u}});s.sort((u,o)=>parseInt(u.value,10)-parseInt(o.value,10));for(let u=0;u<s.length;u+=1){const{point:o,value:l}=s[u];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=o):l<=n.clientWidth&&(r=o)}return r||"max"}var Lc={setBreakpoint:wc,getBreakpoint:Ic};function Oc(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 Dc(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=Oc(["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 Pc(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var Mc={addClasses:Dc,removeClasses:Pc};function Bc(){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 Rc={checkOverflow:Bc},vr={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 Fc(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){$e(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)){$e(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),$e(t,r)}}const Nr={eventsEmitter:Ml,update:Yl,translate:Jl,transition:nc,slide:cc,loop:hc,grabCursor:Ec,events:Nc,breakpoints:Lc,checkOverflow:Rc,classes:Mc},wr={};let Ir=class ut{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=$e({},r),n&&!r.el&&(r.el=n);const a=yt();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const o=[];return a.querySelectorAll(r.el).forEach(l=>{const m=$e({},r,{el:l});o.push(new ut(m))}),o}const i=this;i.__swiper__=!0,i.support=mi(),i.device=gi({userAgent:r.userAgent}),i.browser=Ei(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(o=>{o({params:r,swiper:i,extendParams:Fc(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const u=$e({},vr,s);return i.params=$e({},u,wr,r),i.originalParams=$e({},i.params),i.passedParams=$e({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(o=>{i.on(o,i.params.on[o])}),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=Ke(n,`.${r.slideClass}, swiper-slide`),i=Fn(a[0]);return Fn(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=Ke(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:u,size:o,activeIndex:l}=r;let m=1;if(typeof a.slidesPerView=="number")return a.slidesPerView;if(a.centeredSlides){let f=i[l]?Math.ceil(i[l].swiperSlideSize):0,E;for(let h=l+1;h<i.length;h+=1)i[h]&&!E&&(f+=Math.ceil(i[h].swiperSlideSize),m+=1,f>o&&(E=!0));for(let h=l-1;h>=0;h-=1)i[h]&&!E&&(f+=i[h].swiperSlideSize,m+=1,f>o&&(E=!0))}else if(t==="current")for(let f=l+1;f<i.length;f+=1)(n?s[f]+u[f]-s[l]<o:s[f]-s[l]<o)&&(m+=1);else for(let f=l-1;f>=0;f-=1)s[l]-s[f]<o&&(m+=1);return m}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&&Hn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,u=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(u),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()):Ke(r,a())[0];return!s&&n.params.createElements&&(s=Rn("div",n.params.wrapperClass),r.append(s),Ke(r,`.${n.params.slideClass}`).forEach(u=>{s.append(u)})),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"||ct(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ct(r,"direction")==="rtl"),wrongRTL:ct(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?Hn(n,i):i.addEventListener("load",s=>{Hn(n,s.target)})}),kr(n),n.initialized=!0,kr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:u}=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"),u&&u.length&&u.forEach(o=>{o.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),o.removeAttribute("style"),o.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(o=>{r.off(o)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),Cl(r)),r.destroyed=!0),null}static extendDefaults(t){$e(wr,t)}static get extendedDefaults(){return wr}static get defaults(){return vr}static installModule(t){ut.prototype.__modules__||(ut.prototype.__modules__=[]);const n=ut.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>ut.installModule(n)),ut):(ut.installModule(t),ut)}};Object.keys(Nr).forEach(e=>{Object.keys(Nr[e]).forEach(t=>{Ir.prototype[t]=Nr[e][t]})}),Ir.use([Dl,Pl]);const Ai=["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 xt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Lt(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]:xt(t[r])&&xt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Lt(e[r],t[r]):e[r]=t[r]})}function _i(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function ki(e={}){return e.pagination&&typeof e.pagination.el>"u"}function vi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function Ni(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 Hc(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function $c({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:u}){const o=r.filter(A=>A!=="children"&&A!=="direction"&&A!=="wrapperClass"),{params:l,pagination:m,navigation:f,scrollbar:E,virtual:h,thumbs:c}=e;let p,b,g,T,y,x,S,_;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(p=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(b=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||u)&&(l.pagination||l.pagination===!1)&&m&&!m.el&&(g=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&E&&!E.el&&(T=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||a)&&(l.navigation||l.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(y=!0);const N=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?x=!0:!l.loop&&n.loop?S=!0:_=!0),o.forEach(A=>{if(xt(l[A])&&xt(n[A]))Object.assign(l[A],n[A]),(A==="navigation"||A==="pagination"||A==="scrollbar")&&"enabled"in n[A]&&!n[A].enabled&&N(A);else{const I=n[A];(I===!0||I===!1)&&(A==="navigation"||A==="pagination"||A==="scrollbar")?I===!1&&N(A):l[A]=n[A]}}),o.includes("controller")&&!b&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&h&&l.virtual.enabled?(h.slides=t,h.update(!0)):r.includes("virtual")&&h&&l.virtual.enabled&&(t&&(h.slides=t),h.update(!0)),r.includes("children")&&t&&l.loop&&(_=!0),p&&c.init()&&c.update(!0),b&&(e.controller.control=l.controller.control),g&&(e.isElement&&(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-pagination"),u.part.add("pagination"),e.el.appendChild(u)),u&&(l.pagination.el=u),m.init(),m.render(),m.update()),T&&(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()),y&&(e.isElement&&((!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-next"),Wt(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"),Wt(i,e.navigation.arrowSvg),i.part.add("button-prev"),e.el.appendChild(i))),a&&(l.navigation.nextEl=a),i&&(l.navigation.prevEl=i),f.init(),f.update()),r.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&e.changeDirection(n.direction,!1),(x||_)&&e.loopDestroy(),(S||_)&&e.loopCreate(),e.update()}function Uc(e={},t=!0){const n={on:{}},r={},a={};Lt(n,vr),n._emitClasses=!0,n.init=!1;const i={},s=Ai.map(o=>o.replace(/_/,"")),u=Object.assign({},e);return Object.keys(u).forEach(o=>{typeof e[o]>"u"||(s.indexOf(o)>=0?xt(e[o])?(n[o]={},a[o]={},Lt(n[o],e[o]),Lt(a[o],e[o])):(n[o]=e[o],a[o]=e[o]):o.search(/on[A-Z]/)===0&&typeof e[o]=="function"?t?r[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:n.on[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:i[o]=e[o])}),["navigation","pagination","scrollbar"].forEach(o=>{n[o]===!0&&(n[o]={}),n[o]===!1&&delete n[o]}),{params:n,passedParams:a,rest:i,events:r}}function qc({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){_i(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),ki(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),vi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function zc(e,t,n,r,a){const i=[];if(!t)return i;const s=o=>{i.indexOf(o)<0&&i.push(o)};if(n&&r){const o=r.map(a),l=n.map(a);o.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return Ai.filter(o=>o[0]==="_").map(o=>o.replace(/_/,"")).forEach(o=>{if(o in e&&o in t)if(xt(e[o])&&xt(t[o])){const l=Object.keys(e[o]),m=Object.keys(t[o]);l.length!==m.length?s(o):(l.forEach(f=>{e[o][f]!==t[o][f]&&s(o)}),m.forEach(f=>{e[o][f]!==t[o][f]&&s(o)}))}else e[o]!==t[o]&&s(o)}),i}const Vc=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 $n(){return $n=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},$n.apply(this,arguments)}function wi(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Ii(e){const t=[];return D.Children.toArray(e).forEach(n=>{wi(n)?t.push(n):n.props&&n.props.children&&Ii(n.props.children).forEach(r=>t.push(r))}),t}function Gc(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return D.Children.toArray(e).forEach(r=>{if(wi(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=Ii(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 Yc(e,t,n){if(!n)return null;const r=m=>{let f=m;return m<0?f=t.length+m:f>=t.length&&(f=f-t.length),f},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:i,to:s}=n,u=e.params.loop?-t.length:0,o=e.params.loop?t.length*2:t.length,l=[];for(let m=u;m<o;m+=1)m>=i&&m<=s&&l.push(t[r(m)]);return l.map((m,f)=>D.cloneElement(m,{swiper:e,style:a,key:m.props.virtualIndex||m.key||`slide-${f}`}))}function jt(e,t){return typeof window>"u"?D.useEffect(e,t):D.useLayoutEffect(e,t)}const Li=D.createContext(null),Wc=D.createContext(null),Oi=D.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let u=!1;const[o,l]=D.useState("swiper"),[m,f]=D.useState(null),[E,h]=D.useState(!1),c=D.useRef(!1),p=D.useRef(null),b=D.useRef(null),g=D.useRef(null),T=D.useRef(null),y=D.useRef(null),x=D.useRef(null),S=D.useRef(null),_=D.useRef(null),{params:N,passedParams:A,rest:I,events:O}=Uc(i),{slides:w,slots:P}=Gc(r),H=()=>{h(!E)};Object.assign(N.on,{_containerClasses(U,V){l(V)}});const v=()=>{Object.assign(N.on,O),u=!0;const U={...N};if(delete U.wrapperClass,b.current=new Ir(U),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=w;const V={cache:!1,slides:w,renderExternal:f,renderExternalUpdate:!1};Lt(b.current.params.virtual,V),Lt(b.current.originalParams.virtual,V)}};p.current||v(),b.current&&b.current.on("_beforeBreakpoint",H);const C=()=>{u||!O||!b.current||Object.keys(O).forEach(U=>{b.current.on(U,O[U])})},B=()=>{!O||!b.current||Object.keys(O).forEach(U=>{b.current.off(U,O[U])})};D.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",H)}),D.useEffect(()=>{!c.current&&b.current&&(b.current.emitSlidesClasses(),c.current=!0)}),jt(()=>{if(s&&(s.current=p.current),!!p.current)return b.current.destroyed&&v(),qc({el:p.current,nextEl:y.current,prevEl:x.current,paginationEl:S.current,scrollbarEl:_.current,swiper:b.current},N),a&&!b.current.destroyed&&a(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),jt(()=>{C();const U=zc(A,g.current,w,T.current,V=>V.key);return g.current=A,T.current=w,U.length&&b.current&&!b.current.destroyed&&$c({swiper:b.current,slides:w,passedParams:A,changedParams:U,nextEl:y.current,prevEl:x.current,scrollbarEl:_.current,paginationEl:S.current}),()=>{B()}}),jt(()=>{Vc(b.current)},[m]);function $(){return N.virtual?Yc(b.current,w,m):w.map((U,V)=>D.cloneElement(U,{swiper:b.current,swiperSlideIndex:V}))}return D.createElement(t,$n({ref:p,className:Ni(`${o}${e?` ${e}`:""}`)},I),D.createElement(Wc.Provider,{value:b.current},P["container-start"],D.createElement(n,{className:Hc(N.wrapperClass)},P["wrapper-start"],$(),P["wrapper-end"]),_i(N)&&D.createElement(D.Fragment,null,D.createElement("div",{ref:x,className:"swiper-button-prev"}),D.createElement("div",{ref:y,className:"swiper-button-next"})),vi(N)&&D.createElement("div",{ref:_,className:"swiper-scrollbar"}),ki(N)&&D.createElement("div",{ref:S,className:"swiper-pagination"}),P["container-end"]))});Oi.displayName="Swiper";const Di=D.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:u,...o}={},l)=>{const m=D.useRef(null),[f,E]=D.useState("swiper-slide"),[h,c]=D.useState(!1);function p(y,x,S){x===m.current&&E(S)}jt(()=>{if(typeof u<"u"&&(m.current.swiperSlideIndex=u),l&&(l.current=m.current),!(!m.current||!r)){if(r.destroyed){f!=="swiper-slide"&&E("swiper-slide");return}return r.on("_slideClass",p),()=>{r&&r.off("_slideClass",p)}}}),jt(()=>{r&&m.current&&!r.destroyed&&E(r.getSlideClasses(m.current))},[r]);const b={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},g=()=>typeof t=="function"?t(b):t,T=()=>{c(!0)};return D.createElement(e,$n({ref:m,className:Ni(`${f}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:T},o),a&&D.createElement(Li.Provider,{value:b},D.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}}))),!a&&D.createElement(Li.Provider,{value:b},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}})))});Di.displayName="SwiperSlide";function Pi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=Ke(e.el,`.${r[a]}`)[0];i||(i=Rn("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const Mi='<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 jc({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:Mi};function a(h){let c;return h&&typeof h=="string"&&e.isElement&&(c=e.el.querySelector(h)||e.hostEl.querySelector(h),c)?c:(h&&(typeof h=="string"&&(c=[...document.querySelectorAll(h)]),e.params.uniqueNavElements&&typeof h=="string"&&c&&c.length>1&&e.el.querySelectorAll(h).length===1?c=e.el.querySelector(h):c&&c.length===1&&(c=c[0])),h&&!c?h:c)}function i(h,c){const p=e.params.navigation;h=ke(h),h.forEach(b=>{b&&(b.classList[c?"add":"remove"](...p.disabledClass.split(" ")),b.tagName==="BUTTON"&&(b.disabled=c),e.params.watchOverflow&&e.enabled&&b.classList[e.isLocked?"add":"remove"](p.lockClass))})}function s(){const{nextEl:h,prevEl:c}=e.navigation;if(e.params.loop){i(c,!1),i(h,!1);return}i(c,e.isBeginning&&!e.params.rewind),i(h,e.isEnd&&!e.params.rewind)}function u(h){h.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function o(h){h.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const h=e.params.navigation;if(e.params.navigation=Pi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(h.nextEl||h.prevEl))return;let c=a(h.nextEl),p=a(h.prevEl);Object.assign(e.navigation,{nextEl:c,prevEl:p}),c=ke(c),p=ke(p);const b=(g,T)=>{if(g){if(h.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const y=document.createElement("div");Wt(y,Mi),g.appendChild(y.querySelector("svg")),y.remove()}g.addEventListener("click",T==="next"?o:u)}!e.enabled&&g&&g.classList.add(...h.lockClass.split(" "))};c.forEach(g=>b(g,"next")),p.forEach(g=>b(g,"prev"))}function m(){let{nextEl:h,prevEl:c}=e.navigation;h=ke(h),c=ke(c);const p=(b,g)=>{b.removeEventListener("click",g==="next"?o:u),b.classList.remove(...e.params.navigation.disabledClass.split(" "))};h.forEach(b=>p(b,"next")),c.forEach(b=>p(b,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?E():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{m()}),n("enable disable",()=>{let{nextEl:h,prevEl:c}=e.navigation;if(h=ke(h),c=ke(c),e.enabled){s();return}[...h,...c].filter(p=>!!p).forEach(p=>p.classList.add(e.params.navigation.lockClass))}),n("click",(h,c)=>{let{nextEl:p,prevEl:b}=e.navigation;p=ke(p),b=ke(b);const g=c.target;let T=b.includes(g)||p.includes(g);if(e.isElement&&!T){const y=c.path||c.composedPath&&c.composedPath();y&&(T=y.find(x=>p.includes(x)||b.includes(x)))}if(e.params.navigation.hideOnClick&&!T){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let y;p.length?y=p[0].classList.contains(e.params.navigation.hiddenClass):b.length&&(y=b[0].classList.contains(e.params.navigation.hiddenClass)),r(y===!0?"navigationShow":"navigationHide"),[...p,...b].filter(x=>!!x).forEach(x=>x.classList.toggle(e.params.navigation.hiddenClass))}});const f=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),l(),s()},E=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(e.navigation,{enable:f,disable:E,update:s,init:l,destroy:m})}function Xt(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Xc({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 u(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function o(g,T){const{bulletActiveClass:y}=e.params.pagination;g&&(g=g[`${T==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${y}-${T}`),g=g[`${T==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${y}-${T}-${T}`)))}function l(g,T,y){if(g=g%y,T=T%y,T===g+1)return"next";if(T===g-1)return"previous"}function m(g){const T=g.target.closest(Xt(e.params.pagination.bulletClass));if(!T)return;g.preventDefault();const y=Fn(T)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;const x=l(e.realIndex,y,e.slides.length);x==="next"?e.slideNext():x==="previous"?e.slidePrev():e.slideToLoop(y)}else e.slideTo(y)}function f(){const g=e.rtl,T=e.params.pagination;if(u())return;let y=e.pagination.el;y=ke(y);let x,S;const _=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,N=e.params.loop?Math.ceil(_/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(S=e.previousRealIndex||0,x=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(x=e.snapIndex,S=e.previousSnapIndex):(S=e.previousIndex||0,x=e.activeIndex||0),T.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const A=e.pagination.bullets;let I,O,w;if(T.dynamicBullets&&(i=yr(A[0],e.isHorizontal()?"width":"height"),y.forEach(P=>{P.style[e.isHorizontal()?"width":"height"]=`${i*(T.dynamicMainBullets+4)}px`}),T.dynamicMainBullets>1&&S!==void 0&&(s+=x-(S||0),s>T.dynamicMainBullets-1?s=T.dynamicMainBullets-1:s<0&&(s=0)),I=Math.max(x-s,0),O=I+(Math.min(A.length,T.dynamicMainBullets)-1),w=(O+I)/2),A.forEach(P=>{const H=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(v=>`${T.bulletActiveClass}${v}`)].map(v=>typeof v=="string"&&v.includes(" ")?v.split(" "):v).flat();P.classList.remove(...H)}),y.length>1)A.forEach(P=>{const H=Fn(P);H===x?P.classList.add(...T.bulletActiveClass.split(" ")):e.isElement&&P.setAttribute("part","bullet"),T.dynamicBullets&&(H>=I&&H<=O&&P.classList.add(...`${T.bulletActiveClass}-main`.split(" ")),H===I&&o(P,"prev"),H===O&&o(P,"next"))});else{const P=A[x];if(P&&P.classList.add(...T.bulletActiveClass.split(" ")),e.isElement&&A.forEach((H,v)=>{H.setAttribute("part",v===x?"bullet-active":"bullet")}),T.dynamicBullets){const H=A[I],v=A[O];for(let C=I;C<=O;C+=1)A[C]&&A[C].classList.add(...`${T.bulletActiveClass}-main`.split(" "));o(H,"prev"),o(v,"next")}}if(T.dynamicBullets){const P=Math.min(A.length,T.dynamicMainBullets+4),H=(i*P-i)/2-w*i,v=g?"right":"left";A.forEach(C=>{C.style[e.isHorizontal()?v:"top"]=`${H}px`})}}y.forEach((A,I)=>{if(T.type==="fraction"&&(A.querySelectorAll(Xt(T.currentClass)).forEach(O=>{O.textContent=T.formatFractionCurrent(x+1)}),A.querySelectorAll(Xt(T.totalClass)).forEach(O=>{O.textContent=T.formatFractionTotal(N)})),T.type==="progressbar"){let O;T.progressbarOpposite?O=e.isHorizontal()?"vertical":"horizontal":O=e.isHorizontal()?"horizontal":"vertical";const w=(x+1)/N;let P=1,H=1;O==="horizontal"?P=w:H=w,A.querySelectorAll(Xt(T.progressbarFillClass)).forEach(v=>{v.style.transform=`translate3d(0,0,0) scaleX(${P}) scaleY(${H})`,v.style.transitionDuration=`${e.params.speed}ms`})}T.type==="custom"&&T.renderCustom?(Wt(A,T.renderCustom(e,x+1,N)),I===0&&r("paginationRender",A)):(I===0&&r("paginationRender",A),r("paginationUpdate",A)),e.params.watchOverflow&&e.enabled&&A.classList[e.isLocked?"add":"remove"](T.lockClass)})}function E(){const g=e.params.pagination;if(u())return;const T=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 y=e.pagination.el;y=ke(y);let x="";if(g.type==="bullets"){let S=e.params.loop?Math.ceil(T/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&S>T&&(S=T);for(let _=0;_<S;_+=1)g.renderBullet?x+=g.renderBullet.call(e,_,g.bulletClass):x+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?x=g.renderFraction.call(e,g.currentClass,g.totalClass):x=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?x=g.renderProgressbar.call(e,g.progressbarFillClass):x=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(S=>{g.type!=="custom"&&Wt(S,x||""),g.type==="bullets"&&e.pagination.bullets.push(...S.querySelectorAll(Xt(g.bulletClass)))}),g.type!=="custom"&&r("paginationRender",y[0])}function h(){e.params.pagination=Pi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let T;typeof g.el=="string"&&e.isElement&&(T=e.el.querySelector(g.el)),!T&&typeof g.el=="string"&&(T=[...document.querySelectorAll(g.el)]),T||(T=g.el),!(!T||T.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(T)&&T.length>1&&(T=[...e.el.querySelectorAll(g.el)],T.length>1&&(T=T.find(y=>hi(y,".swiper")[0]===e.el))),Array.isArray(T)&&T.length===1&&(T=T[0]),Object.assign(e.pagination,{el:T}),T=ke(T),T.forEach(y=>{g.type==="bullets"&&g.clickable&&y.classList.add(...(g.clickableClass||"").split(" ")),y.classList.add(g.modifierClass+g.type),y.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.type==="bullets"&&g.dynamicBullets&&(y.classList.add(`${g.modifierClass}${g.type}-dynamic`),s=0,g.dynamicMainBullets<1&&(g.dynamicMainBullets=1)),g.type==="progressbar"&&g.progressbarOpposite&&y.classList.add(g.progressbarOppositeClass),g.clickable&&y.addEventListener("click",m),e.enabled||y.classList.add(g.lockClass)}))}function c(){const g=e.params.pagination;if(u())return;let T=e.pagination.el;T&&(T=ke(T),T.forEach(y=>{y.classList.remove(g.hiddenClass),y.classList.remove(g.modifierClass+g.type),y.classList.remove(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.clickable&&(y.classList.remove(...(g.clickableClass||"").split(" ")),y.removeEventListener("click",m))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(...g.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const g=e.params.pagination;let{el:T}=e.pagination;T=ke(T),T.forEach(y=>{y.classList.remove(g.horizontalClass,g.verticalClass),y.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?b():(h(),E(),f())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&f()}),n("snapIndexChange",()=>{f()}),n("snapGridLengthChange",()=>{E(),f()}),n("destroy",()=>{c()}),n("enable disable",()=>{let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(T=>T.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{f()}),n("click",(g,T)=>{const y=T.target,x=ke(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&x&&x.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const S=x[0].classList.contains(e.params.pagination.hiddenClass);r(S===!0?"paginationShow":"paginationHide"),x.forEach(_=>_.classList.toggle(e.params.pagination.hiddenClass))}});const p=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(T=>T.classList.remove(e.params.pagination.paginationDisabledClass))),h(),E(),f()},b=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=ke(g),g.forEach(T=>T.classList.add(e.params.pagination.paginationDisabledClass))),c()};Object.assign(e.pagination,{enable:p,disable:b,render:E,update:f,init:h,destroy:c})}function Pb(){}function Mb(){}function Bi(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 Ri(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Kc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jc={};function Fi(e,t){return(Jc.jsx?Qc:Kc).test(e)}const Zc=/[ \t\n\f\r]/g;function ed(e){return typeof e=="object"?e.type==="text"?Hi(e.value):!1:Hi(e)}function Hi(e){return e.replace(Zc,"")===""}class Kt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Kt.prototype.normal={},Kt.prototype.property={},Kt.prototype.space=void 0;function $i(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Kt(n,r,t)}function Qt(e){return e.toLowerCase()}class Me{constructor(t,n){this.attribute=n,this.property=t}}Me.prototype.attribute="",Me.prototype.booleanish=!1,Me.prototype.boolean=!1,Me.prototype.commaOrSpaceSeparated=!1,Me.prototype.commaSeparated=!1,Me.prototype.defined=!1,Me.prototype.mustUseProperty=!1,Me.prototype.number=!1,Me.prototype.overloadedBoolean=!1,Me.prototype.property="",Me.prototype.spaceSeparated=!1,Me.prototype.space=void 0;let td=0;const ae=Ct(),Ae=Ct(),Lr=Ct(),K=Ct(),be=Ct(),Ot=Ct(),Ue=Ct();function Ct(){return 2**++td}const Or=Object.freeze(Object.defineProperty({__proto__:null,boolean:ae,booleanish:Ae,commaOrSpaceSeparated:Ue,commaSeparated:Ot,number:K,overloadedBoolean:Lr,spaceSeparated:be},Symbol.toStringTag,{value:"Module"})),Dr=Object.keys(Or);class Pr extends Me{constructor(t,n,r,a){let i=-1;if(super(t,n),Ui(this,"space",a),typeof r=="number")for(;++i<Dr.length;){const s=Dr[i];Ui(this,Dr[i],(r&Or[s])===Or[s])}}}Pr.prototype.defined=!0;function Ui(e,t,n){n&&(e[t]=n)}function Dt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Pr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Qt(r)]=r,n[Qt(i.attribute)]=r}return new Kt(t,n,e.space)}const qi=Dt({properties:{ariaActiveDescendant:null,ariaAtomic:Ae,ariaAutoComplete:null,ariaBusy:Ae,ariaChecked:Ae,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:be,ariaCurrent:null,ariaDescribedBy:be,ariaDetails:null,ariaDisabled:Ae,ariaDropEffect:be,ariaErrorMessage:null,ariaExpanded:Ae,ariaFlowTo:be,ariaGrabbed:Ae,ariaHasPopup:null,ariaHidden:Ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:be,ariaLevel:K,ariaLive:null,ariaModal:Ae,ariaMultiLine:Ae,ariaMultiSelectable:Ae,ariaOrientation:null,ariaOwns:be,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:Ae,ariaReadOnly:Ae,ariaRelevant:null,ariaRequired:Ae,ariaRoleDescription:be,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:Ae,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 zi(e,t){return t in e?e[t]:t}function Vi(e,t){return zi(e,t.toLowerCase())}const nd=Dt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ot,acceptCharset:be,accessKey:be,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:be,autoFocus:ae,autoPlay:ae,blocking:be,capture:null,charSet:null,checked:ae,cite:null,className:be,cols:K,colSpan:null,content:null,contentEditable:Ae,controls:ae,controlsList:be,coords:K|Ot,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:Lr,draggable:Ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:be,height:K,hidden:Lr,high:K,href:null,hrefLang:null,htmlFor:be,httpEquiv:be,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:be,itemRef:be,itemScope:ae,itemType:be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:K,pattern:null,ping:be,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:be,required:ae,reversed:ae,rows:K,rowSpan:K,sandbox:be,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:Ae,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:ae,useMap:null,value:Ae,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:be,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:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:Ae,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:ae,disableRemotePlayback:ae,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:Vi}),rd=Dt({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:Ue,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:be,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:ae,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:Ot,g2:Ot,glyphName:Ot,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:Ue,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:be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ue,rev:Ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ue,requiredFeatures:Ue,requiredFonts:Ue,requiredFormats:Ue,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:Ue,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:Ue,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:Ue,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:zi}),Gi=Dt({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()}}),Yi=Dt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vi}),Wi=Dt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ad={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"},id=/[A-Z]/g,ji=/-[a-z]/g,sd=/^data[-\w.:]+$/i;function Un(e,t){const n=Qt(t);let r=t,a=Me;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ji,ud);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ji.test(i)){let s=i.replace(id,od);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Pr}return new a(r,t)}function od(e){return"-"+e.toLowerCase()}function ud(e){return e.charAt(1).toUpperCase()}const Jt=$i([qi,nd,Gi,Yi,Wi],"html"),dt=$i([qi,rd,Gi,Yi,Wi],"svg");function Xi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ki(e){return e.join(" ").trim()}function Mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pt={},Br,Qi;function ld(){if(Qi)return Br;Qi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
43
+ `,l="/",m="*",f="",E="comment",h="declaration";function c(b,g){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];g=g||{};var T=1,y=1;function x(v){var C=v.match(t);C&&(T+=C.length);var B=v.lastIndexOf(o);y=~B?v.length-B:y+v.length}function S(){var v={line:T,column:y};return function(C){return C.position=new _(v),I(),C}}function _(v){this.start=v,this.end={line:T,column:y},this.source=g.source}_.prototype.content=b;function N(v){var C=new Error(g.source+":"+T+":"+y+": "+v);if(C.reason=v,C.filename=g.source,C.line=T,C.column=y,C.source=b,!g.silent)throw C}function A(v){var C=v.exec(b);if(C){var B=C[0];return x(B),b=b.slice(B.length),C}}function I(){A(n)}function O(v){var C;for(v=v||[];C=w();)C!==!1&&v.push(C);return v}function w(){var v=S();if(!(l!=b.charAt(0)||m!=b.charAt(1))){for(var C=2;f!=b.charAt(C)&&(m!=b.charAt(C)||l!=b.charAt(C+1));)++C;if(C+=2,f===b.charAt(C-1))return N("End of comment missing");var B=b.slice(2,C-2);return y+=2,x(B),b=b.slice(C),y+=2,v({type:E,comment:B})}}function P(){var v=S(),C=A(r);if(C){if(w(),!A(a))return N("property missing ':'");var B=A(i),$=v({type:h,property:p(C[0].replace(e,f)),value:B?p(B[0].replace(e,f)):f});return A(s),$}}function H(){var v=[];O(v);for(var C;C=P();)C!==!1&&(v.push(C),O(v));return v}return I(),H()}function p(b){return b?b.replace(u,f):f}return Br=c,Br}var Ji;function cd(){if(Ji)return Pt;Ji=1;var e=Pt&&Pt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.default=n;const t=e(ld());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),u=typeof a=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:m}=o;u?a(l,m,o):m&&(i=i||{},i[l]=m)}),i}return Pt}var Zt={},Zi;function dd(){if(Zi)return Zt;Zi=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.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,m){return m.toUpperCase()},u=function(l,m){return"".concat(m,"-")},o=function(l,m){return m===void 0&&(m={}),i(l)?l:(l=l.toLowerCase(),m.reactCompat?l=l.replace(a,u):l=l.replace(r,u),l.replace(t,s))};return Zt.camelCase=o,Zt}var en,es;function fd(){if(es)return en;es=1;var e=en&&en.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(cd()),n=dd();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(u,o){u&&o&&(s[(0,n.camelCase)(u,i)]=o)}),s}return r.default=r,en=r,en}var pd=fd();const hd=Mr(pd),qn=ts("end"),Qe=ts("start");function ts(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 ns(e){const t=Qe(e),n=qn(e);if(t&&n)return{start:t,end:n}}function tn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rs(e.position):"start"in e||"end"in e?rs(e):"line"in e||"column"in e?Rr(e):""}function Rr(e){return as(e&&e.line)+":"+as(e&&e.column)}function rs(e){return Rr(e&&e.start)+"-"+Rr(e&&e.end)}function as(e){return e&&typeof e=="number"?e:1}class we 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 o=r.indexOf(":");o===-1?i.ruleId=r:(i.source=r.slice(0,o),i.ruleId=r.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=tn(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}}we.prototype.file="",we.prototype.name="",we.prototype.reason="",we.prototype.message="",we.prototype.stack="",we.prototype.column=void 0,we.prototype.line=void 0,we.prototype.ancestors=void 0,we.prototype.cause=void 0,we.prototype.fatal=void 0,we.prototype.place=void 0,we.prototype.ruleId=void 0,we.prototype.source=void 0;const Fr={}.hasOwnProperty,md=new Map,gd=/[A-Z]/g,Ed=new Set(["table","tbody","thead","tfoot","tr"]),bd=new Set(["td","th"]),is="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Td(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=vd(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=kd(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"?dt:Jt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=ss(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function ss(e,t,n){if(t.type==="element")return yd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Sd(e,t,n);if(t.type==="mdxjsEsm")return Cd(e,t);if(t.type==="root")return Ad(e,t,n);if(t.type==="text")return _d(e,t)}function yd(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=dt,e.schema=a),e.ancestors.push(t);const i=us(e,t.tagName,!1),s=Nd(e,t);let u=$r(e,t);return Ed.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!ed(o):!0})),os(e,s,i,t),Hr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function xd(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)}nn(e,t.position)}function Cd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nn(e,t.position)}function Sd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=dt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:us(e,t.name,!0),s=wd(e,t),u=$r(e,t);return os(e,s,i,t),Hr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Ad(e,t,n){const r={};return Hr(r,$r(e,t)),e.create(t,e.Fragment,r,n)}function _d(e,t){return t.value}function os(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Hr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function kd(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function vd(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),o=Qe(r);return t(a,i,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Nd(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Fr.call(t.properties,a)){const i=Id(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&bd.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function wd(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else nn(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 u=r.value.data.estree.body[0];u.type,i=e.evaluater.evaluateExpression(u.expression)}else nn(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function $r(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:md;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){const l=a.get(o)||0;s=o+"-"+l,a.set(o,l+1)}}const u=ss(e,i,s);u!==void 0&&n.push(u)}return n}function Id(e,t,n){const r=Un(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ri(n):Ki(n)),r.property==="style"){let a=typeof n=="object"?n:Ld(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Od(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?ad[r.property]||r.property:r.attribute,n]}}function Ld(e,t){try{return hd(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new we("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=is+"#cannot-parse-style-attribute",a}}function us(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 u=Fi(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}r=s}else r=Fi(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Fr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);nn(e)}function nn(e,t){const n=new we("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=is+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Od(e){const t={};let n;for(n in e)Fr.call(e,n)&&(t[Dd(n)]=e[n]);return t}function Dd(e){let t=e.replace(gd,Pd);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Pd(e){return"-"+e.toLowerCase()}const Ur={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"]},Md={};function Bd(e,t){const n=Md,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ls(e,r,a)}function ls(e,t,n){if(Rd(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 cs(e.children,t,n)}return Array.isArray(e)?cs(e,t,n):""}function cs(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ls(e[a],t,n);return r.join("")}function Rd(e){return!!(e&&typeof e=="object")}const ds=document.createElement("i");function rn(e){const t="&"+e+";";ds.innerHTML=t;const n=ds.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Je(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 Ve(e,t){return e.length>0?(Je(e,e.length,0,t),e):t}const fs={}.hasOwnProperty;function Fd(e){const t={};let n=-1;for(;++n<e.length;)Hd(t,e[n]);return t}function Hd(e,t){let n;for(n in t){const a=(fs.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){fs.call(a,s)||(a[s]=[]);const u=i[s];$d(a[s],Array.isArray(u)?u:u?[u]:[])}}}function $d(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Je(e,0,0,r)}function ps(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 Mt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ze=ft(/[A-Za-z]/),qe=ft(/[\dA-Za-z]/),Ud=ft(/[#-'*+\--9=?A-Z^-~]/);function qr(e){return e!==null&&(e<32||e===127)}const zr=ft(/\d/),qd=ft(/[\dA-Fa-f]/),zd=ft(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const an=ft(new RegExp("\\p{P}|\\p{S}","u")),sn=ft(/\s/);function ft(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bt(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&qe(e.charCodeAt(n+1))&&qe(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 u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),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 fe(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(o){return de(o)?(e.enter(n),u(o)):t(o)}function u(o){return de(o)&&i++<a?(e.consume(o),u):(e.exit(n),t(o))}}const Vd={tokenize:Gd};function Gd(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),fe(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),i(u)}function i(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Z(u)?(e.consume(u),e.exit("chunkText"),i):(e.consume(u),s)}}const Yd={tokenize:Wd},hs={tokenize:jd};function Wd(e){const t=this,n=[];let r=0,a,i,s;return u;function u(y){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,o,l)(y)}return l(y)}function o(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&T();const x=t.events.length;let S=x,_;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){_=t.events[S][1].end;break}g(r);let N=x;for(;N<t.events.length;)t.events[N][1].end={..._},N++;return Je(t.events,S+1,0,t.events.slice(x)),t.events.length=N,l(y)}return u(y)}function l(y){if(r===n.length){if(!a)return E(y);if(a.currentConstruct&&a.currentConstruct.concrete)return c(y);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(hs,m,f)(y)}function m(y){return a&&T(),g(r),E(y)}function f(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,c(y)}function E(y){return t.containerState={},e.attempt(hs,h,c)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),E(y)}function c(y){if(y===null){a&&T(),g(0),e.consume(y);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),p(y)}function p(y){if(y===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return Z(y)?(e.consume(y),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(y),p)}function b(y,x){const S=t.sliceStream(y);if(x&&S.push(null),y.previous=i,i&&(i.next=y),i=y,a.defineSkip(y.start),a.write(S),t.parser.lazy[y.start.line]){let _=a.events.length;for(;_--;)if(a.events[_][1].start.offset<s&&(!a.events[_][1].end||a.events[_][1].end.offset>s))return;const N=t.events.length;let A=N,I,O;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(I){O=t.events[A][1].end;break}I=!0}for(g(r),_=N;_<t.events.length;)t.events[_][1].end={...O},_++;Je(t.events,A+1,0,t.events.slice(N)),t.events.length=_}}function g(y){let x=n.length;for(;x-- >y;){const S=n[x];t.containerState=S[1],S[0].exit.call(t,e)}n.length=y}function T(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function jd(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ms(e){if(e===null||xe(e)||sn(e))return 1;if(an(e))return 2}function Vr(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 Gr={name:"attention",resolveAll:Xd,tokenize:Kd};function Xd(e,t){let n=-1,r,a,i,s,u,o,l,m;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;o=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 f={...e[r][1].end},E={...e[n][1].start};gs(f,-o),gs(E,o),s={type:o>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},i={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ve(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ve(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Ve(l,Vr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ve(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,l=Ve(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Je(e,r-1,n-r+3,l),n=r+l.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Kd(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=ms(r);let i;return s;function s(o){return i=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===i)return e.consume(o),u;const l=e.exit("attentionSequence"),m=ms(o),f=!m||m===2&&a||n.includes(o),E=!a||a===2&&m||n.includes(r);return l._open=!!(i===42?f:f&&(a||!E)),l._close=!!(i===42?E:E&&(m||!f)),t(o)}}function gs(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Qd={name:"autolink",tokenize:Jd};function Jd(e,t,n){let r=0;return a;function a(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Ze(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||qe(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||qe(h))&&r++<32?(e.consume(h),u):(r=0,l(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||qr(h)?n(h):(e.consume(h),o)}function l(h){return h===64?(e.consume(h),m):Ud(h)?(e.consume(h),l):n(h)}function m(h){return qe(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,m):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):E(h)}function E(h){if((h===45||qe(h))&&r++<63){const c=h===45?E:f;return e.consume(h),c}return n(h)}}const zn={partial:!0,tokenize:Zd};function Zd(e,t,n){return r;function r(i){return de(i)?fe(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Z(i)?t(i):n(i)}}const Es={continuation:{tokenize:tf},exit:nf,name:"blockQuote",tokenize:ef};function ef(e,t,n){const r=this;return a;function a(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function tf(e,t,n){const r=this;return a;function a(s){return de(s)?fe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Es,t,n)(s)}}function nf(e){e.exit("blockQuote")}const bs={name:"characterEscape",tokenize:rf};function rf(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 zd(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Ts={name:"characterReference",tokenize:af};function af(e,t,n){const r=this;let a=0,i,s;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),o}function o(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=qe,m(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=qd,m):(e.enter("characterReferenceValue"),i=7,s=zr,m(f))}function m(f){if(f===59&&a){const E=e.exit("characterReferenceValue");return s===qe&&!rn(r.sliceSerialize(E))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&a++<i?(e.consume(f),m):n(f)}}const ys={partial:!0,tokenize:of},xs={concrete:!0,name:"codeFenced",tokenize:sf};function sf(e,t,n){const r=this,a={partial:!0,tokenize:S};let i=0,s=0,u;return o;function o(_){return l(_)}function l(_){const N=r.events[r.events.length-1];return i=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,u=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(_)}function m(_){return _===u?(s++,e.consume(_),m):s<3?n(_):(e.exit("codeFencedFenceSequence"),de(_)?fe(e,f,"whitespace")(_):f(_))}function f(_){return _===null||Z(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(ys,p,x)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(_))}function E(_){return _===null||Z(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):de(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,h,"whitespace")(_)):_===96&&_===u?n(_):(e.consume(_),E)}function h(_){return _===null||Z(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(_))}function c(_){return _===null||Z(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===u?n(_):(e.consume(_),c)}function p(_){return e.attempt(a,x,b)(_)}function b(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),g}function g(_){return i>0&&de(_)?fe(e,T,"linePrefix",i+1)(_):T(_)}function T(_){return _===null||Z(_)?e.check(ys,p,x)(_):(e.enter("codeFlowValue"),y(_))}function y(_){return _===null||Z(_)?(e.exit("codeFlowValue"),T(_)):(e.consume(_),y)}function x(_){return e.exit("codeFenced"),t(_)}function S(_,N,A){let I=0;return O;function O(C){return _.enter("lineEnding"),_.consume(C),_.exit("lineEnding"),w}function w(C){return _.enter("codeFencedFence"),de(C)?fe(_,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):P(C)}function P(C){return C===u?(_.enter("codeFencedFenceSequence"),H(C)):A(C)}function H(C){return C===u?(I++,_.consume(C),H):I>=s?(_.exit("codeFencedFenceSequence"),de(C)?fe(_,v,"whitespace")(C):v(C)):A(C)}function v(C){return C===null||Z(C)?(_.exit("codeFencedFence"),N(C)):A(C)}}}function of(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 Yr={name:"codeIndented",tokenize:lf},uf={partial:!0,tokenize:cf};function lf(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),fe(e,i,"linePrefix",5)(l)}function i(l){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):Z(l)?e.attempt(uf,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||Z(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function cf(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):fe(e,i,"linePrefix",5)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Z(s)?a(s):n(s)}}const df={name:"codeText",previous:pf,resolve:ff,tokenize:hf};function ff(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 pf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hf(e,t,n){let r=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),o(f))}function o(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),o):f===96?(i=e.enter("codeTextSequence"),a=0,m(f)):Z(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||Z(f)?(e.exit("codeTextData"),o(f)):(e.consume(f),l)}function m(f){return f===96?(e.consume(f),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",l(f))}}class mf{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&&on(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),on(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),on(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);on(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);on(this.left,n.reverse())}}}function on(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 Cs(e){const t={};let n=-1,r,a,i,s,u,o,l;const m=new mf(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,gf(m,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=m.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(m.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={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return Je(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!l}function gf(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 u=s.events,o=[],l={};let m,f,E=-1,h=n,c=0,p=0;const b=[p];for(;h;){for(;e.get(++a)[1]!==h;);i.push(a),h._tokenizer||(m=r.sliceStream(h),h.next||m.push(null),f&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(m),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++E<u.length;)u[E][0]==="exit"&&u[E-1][0]==="enter"&&u[E][1].type===u[E-1][1].type&&u[E][1].start.line!==u[E][1].end.line&&(p=E+1,b.push(p),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),E=b.length;E--;){const g=u.slice(b[E],b[E+1]),T=i.pop();o.push([T,T+g.length-1]),e.splice(T,2,g)}for(o.reverse(),E=-1;++E<o.length;)l[c+o[E][0]]=c+o[E][1],c+=o[E][1]-o[E][0]-1;return l}const Ef={resolve:Tf,tokenize:yf},bf={partial:!0,tokenize:xf};function Tf(e){return Cs(e),e}function yf(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?i(u):Z(u)?e.check(bf,s,i)(u):(e.consume(u),a)}function i(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function xf(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),fe(e,i,"linePrefix")}function i(s){if(s===null||Z(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ss(e,t,n,r,a,i,s,u,o){const l=o||Number.POSITIVE_INFINITY;let m=0;return f;function f(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||qr(g)?n(g):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),p(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(u),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(u),E(g)):g===null||g===60||Z(g)?n(g):(e.consume(g),g===92?c:h)}function c(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function p(g){return!m&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(g)):m<l&&g===40?(e.consume(g),m++,p):g===41?(e.consume(g),m--,p):g===null||g===32||g===40||qr(g)?n(g):(e.consume(g),g===92?b:p)}function b(g){return g===40||g===41||g===92?(e.consume(g),p):p(g)}}function As(e,t,n,r,a,i){const s=this;let u=0,o;return l;function l(h){return e.enter(r),e.enter(a),e.consume(h),e.exit(a),e.enter(i),m}function m(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(i),e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||Z(h)||u++>999?(e.exit("chunkString"),m(h)):(e.consume(h),o||(o=!de(h)),h===92?E:f)}function E(h){return h===91||h===92||h===93?(e.consume(h),u++,f):f(h)}}function _s(e,t,n,r,a,i){let s;return u;function u(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,o):n(E)}function o(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),o(s)):E===null?n(E):Z(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),fe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===s||E===null||Z(E)?(e.exit("chunkString"),l(E)):(e.consume(E),E===92?f:m)}function f(E){return E===s||E===92?(e.consume(E),m):m(E)}}function at(e,t){let n;return r;function r(a){return Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):de(a)?fe(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const Cf={name:"definition",tokenize:Af},Sf={partial:!0,tokenize:_f};function Af(e,t,n){const r=this;let a;return i;function i(h){return e.enter("definition"),s(h)}function s(h){return As.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return a=Mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return xe(h)?at(e,l)(h):l(h)}function l(h){return Ss(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function m(h){return e.attempt(Sf,f,f)(h)}function f(h){return de(h)?fe(e,E,"whitespace")(h):E(h)}function E(h){return h===null||Z(h)?(e.exit("definition"),r.parser.defined.push(a),t(h)):n(h)}}function _f(e,t,n){return r;function r(u){return xe(u)?at(e,a)(u):n(u)}function a(u){return _s(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function i(u){return de(u)?fe(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Z(u)?t(u):n(u)}}const kf={name:"hardBreakEscape",tokenize:vf};function vf(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Z(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Nf={name:"headingAtx",resolve:wf,tokenize:If};function wf(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"},Je(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function If(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),i(m)}function i(m){return e.enter("atxHeadingSequence"),s(m)}function s(m){return m===35&&r++<6?(e.consume(m),s):m===null||xe(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||Z(m)?(e.exit("atxHeading"),t(m)):de(m)?fe(e,u,"whitespace")(m):(e.enter("atxHeadingText"),l(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),u(m))}function l(m){return m===null||m===35||xe(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),l)}}const Lf=["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"],ks=["pre","script","style","textarea"],Of={concrete:!0,name:"htmlFlow",resolveTo:Mf,tokenize:Bf},Df={partial:!0,tokenize:Ff},Pf={partial:!0,tokenize:Rf};function Mf(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 Bf(e,t,n){const r=this;let a,i,s,u,o;return l;function l(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),E):R===47?(e.consume(R),i=!0,p):R===63?(e.consume(R),a=3,r.interrupt?t:k):Ze(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function E(R){return R===45?(e.consume(R),a=2,h):R===91?(e.consume(R),a=5,u=0,c):Ze(R)?(e.consume(R),a=4,r.interrupt?t:k):n(R)}function h(R){return R===45?(e.consume(R),r.interrupt?t:k):n(R)}function c(R){const te="CDATA[";return R===te.charCodeAt(u++)?(e.consume(R),u===te.length?r.interrupt?t:P:c):n(R)}function p(R){return Ze(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function b(R){if(R===null||R===47||R===62||xe(R)){const te=R===47,ce=s.toLowerCase();return!te&&!i&&ks.includes(ce)?(a=1,r.interrupt?t(R):P(R)):Lf.includes(s.toLowerCase())?(a=6,te?(e.consume(R),g):r.interrupt?t(R):P(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):i?T(R):y(R))}return R===45||qe(R)?(e.consume(R),s+=String.fromCharCode(R),b):n(R)}function g(R){return R===62?(e.consume(R),r.interrupt?t:P):n(R)}function T(R){return de(R)?(e.consume(R),T):O(R)}function y(R){return R===47?(e.consume(R),O):R===58||R===95||Ze(R)?(e.consume(R),x):de(R)?(e.consume(R),y):O(R)}function x(R){return R===45||R===46||R===58||R===95||qe(R)?(e.consume(R),x):S(R)}function S(R){return R===61?(e.consume(R),_):de(R)?(e.consume(R),S):y(R)}function _(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,N):de(R)?(e.consume(R),_):A(R)}function N(R){return R===o?(e.consume(R),o=null,I):R===null||Z(R)?n(R):(e.consume(R),N)}function A(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||xe(R)?S(R):(e.consume(R),A)}function I(R){return R===47||R===62||de(R)?y(R):n(R)}function O(R){return R===62?(e.consume(R),w):n(R)}function w(R){return R===null||Z(R)?P(R):de(R)?(e.consume(R),w):n(R)}function P(R){return R===45&&a===2?(e.consume(R),B):R===60&&a===1?(e.consume(R),$):R===62&&a===4?(e.consume(R),j):R===63&&a===3?(e.consume(R),k):R===93&&a===5?(e.consume(R),V):Z(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Df,J,H)(R)):R===null||Z(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),P)}function H(R){return e.check(Pf,v,J)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),C}function C(R){return R===null||Z(R)?H(R):(e.enter("htmlFlowData"),P(R))}function B(R){return R===45?(e.consume(R),k):P(R)}function $(R){return R===47?(e.consume(R),s="",U):P(R)}function U(R){if(R===62){const te=s.toLowerCase();return ks.includes(te)?(e.consume(R),j):P(R)}return Ze(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),U):P(R)}function V(R){return R===93?(e.consume(R),k):P(R)}function k(R){return R===62?(e.consume(R),j):R===45&&a===2?(e.consume(R),k):P(R)}function j(R){return R===null||Z(R)?(e.exit("htmlFlowData"),J(R)):(e.consume(R),j)}function J(R){return e.exit("htmlFlow"),t(R)}}function Rf(e,t,n){const r=this;return a;function a(s){return Z(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 Ff(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(zn,t,n)}}const Hf={name:"htmlText",tokenize:$f};function $f(e,t,n){const r=this;let a,i,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),S):k===63?(e.consume(k),y):Ze(k)?(e.consume(k),A):n(k)}function l(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),i=0,c):Ze(k)?(e.consume(k),T):n(k)}function m(k){return k===45?(e.consume(k),h):n(k)}function f(k){return k===null?n(k):k===45?(e.consume(k),E):Z(k)?(s=f,$(k)):(e.consume(k),f)}function E(k){return k===45?(e.consume(k),h):f(k)}function h(k){return k===62?B(k):k===45?E(k):f(k)}function c(k){const j="CDATA[";return k===j.charCodeAt(i++)?(e.consume(k),i===j.length?p:c):n(k)}function p(k){return k===null?n(k):k===93?(e.consume(k),b):Z(k)?(s=p,$(k)):(e.consume(k),p)}function b(k){return k===93?(e.consume(k),g):p(k)}function g(k){return k===62?B(k):k===93?(e.consume(k),g):p(k)}function T(k){return k===null||k===62?B(k):Z(k)?(s=T,$(k)):(e.consume(k),T)}function y(k){return k===null?n(k):k===63?(e.consume(k),x):Z(k)?(s=y,$(k)):(e.consume(k),y)}function x(k){return k===62?B(k):y(k)}function S(k){return Ze(k)?(e.consume(k),_):n(k)}function _(k){return k===45||qe(k)?(e.consume(k),_):N(k)}function N(k){return Z(k)?(s=N,$(k)):de(k)?(e.consume(k),N):B(k)}function A(k){return k===45||qe(k)?(e.consume(k),A):k===47||k===62||xe(k)?I(k):n(k)}function I(k){return k===47?(e.consume(k),B):k===58||k===95||Ze(k)?(e.consume(k),O):Z(k)?(s=I,$(k)):de(k)?(e.consume(k),I):B(k)}function O(k){return k===45||k===46||k===58||k===95||qe(k)?(e.consume(k),O):w(k)}function w(k){return k===61?(e.consume(k),P):Z(k)?(s=w,$(k)):de(k)?(e.consume(k),w):I(k)}function P(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,H):Z(k)?(s=P,$(k)):de(k)?(e.consume(k),P):(e.consume(k),v)}function H(k){return k===a?(e.consume(k),a=void 0,C):k===null?n(k):Z(k)?(s=H,$(k)):(e.consume(k),H)}function v(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||xe(k)?I(k):(e.consume(k),v)}function C(k){return k===47||k===62||xe(k)?I(k):n(k)}function B(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function $(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return de(k)?fe(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):V(k)}function V(k){return e.enter("htmlTextData"),s(k)}}const Wr={name:"labelEnd",resolveAll:Vf,resolveTo:Gf,tokenize:Yf},Uf={tokenize:Wf},qf={tokenize:jf},zf={tokenize:Xf};function Vf(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&&Je(e,0,e.length,n),e}function Gf(e,t){let n=e.length,r=0,a,i,s,u;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 o={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}},m={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ve(u,e.slice(i+1,i+r+3)),u=Ve(u,[["enter",m,t]]),u=Ve(u,Vr(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=Ve(u,[["exit",m,t],e[s-2],e[s-1],["exit",l,t]]),u=Ve(u,e.slice(s+1)),u=Ve(u,[["exit",o,t]]),Je(e,i,e.length,u),e}function Yf(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 u;function u(E){return i?i._inactive?f(E):(s=r.parser.defined.includes(Mt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),o):n(E)}function o(E){return E===40?e.attempt(Uf,m,s?m:f)(E):E===91?e.attempt(qf,m,s?l:f)(E):s?m(E):f(E)}function l(E){return e.attempt(zf,m,f)(E)}function m(E){return t(E)}function f(E){return i._balanced=!0,n(E)}}function Wf(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return xe(f)?at(e,i)(f):i(f)}function i(f){return f===41?m(f):Ss(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return xe(f)?at(e,o)(f):m(f)}function u(f){return n(f)}function o(f){return f===34||f===39||f===40?_s(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):m(f)}function l(f){return xe(f)?at(e,m)(f):m(f)}function m(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function jf(e,t,n){const r=this;return a;function a(u){return As.call(r,e,i,s,"reference","referenceMarker","referenceString")(u)}function i(u){return r.parser.defined.includes(Mt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Xf(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 Kf={name:"labelStartImage",resolveAll:Wr.resolveAll,tokenize:Qf};function Qf(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),i}function i(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Jf={name:"labelStartLink",resolveAll:Wr.resolveAll,tokenize:Zf};function Zf(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 jr={name:"lineEnding",tokenize:ep};function ep(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const Vn={name:"thematicBreak",tokenize:tp};function tp(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,u(l)}function u(l){return l===a?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Z(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===a?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?fe(e,u,"whitespace")(l):u(l))}}const Be={continuation:{tokenize:ip},exit:op,name:"list",tokenize:ap},np={partial:!0,tokenize:up},rp={partial:!0,tokenize:sp};function ap(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 u;function u(h){const c=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(c==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:zr(h)){if(r.containerState.type||(r.containerState.type=c,e.enter(c,{_container:!0})),c==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Vn,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return zr(h)&&++s<10?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(zn,r.interrupt?n:m,e.attempt(np,E,f))}function m(h){return r.containerState.initialBlankLine=!0,i++,E(h)}function f(h){return de(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),E):n(h)}function E(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ip(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zn,a,i);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(u)}function i(u){return r.containerState.furtherBlankLines||!de(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(rp,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(Be,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function sp(e,t,n){const r=this;return fe(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 op(e){e.exit(this.containerState.type)}function up(e,t,n){const r=this;return fe(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!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const vs={name:"setextUnderline",resolveTo:lp,tokenize:cp};function lp(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 cp(e,t,n){const r=this;let a;return i;function i(l){let m=r.events.length,f;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){f=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),a=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),de(l)?fe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Z(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const dp={tokenize:fp};function fp(e){const t=this,n=e.attempt(zn,r,e.attempt(this.parser.constructs.flowInitial,a,fe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Ef,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 pp={resolveAll:ws()},hp=Ns("string"),mp=Ns("text");function Ns(e){return{resolveAll:ws(e==="text"?gp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(m){return l(m)?i(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),o}function o(m){return l(m)?(n.exit("data"),i(m)):(n.consume(m),o)}function l(m){if(m===null)return!0;const f=a[m];let E=-1;if(f)for(;++E<f.length;){const h=f[E];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function ws(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 gp(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,u=0,o;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},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 Ep=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Cf},disable:{null:[]},document:{42:Be,43:Be,45:Be,48:Be,49:Be,50:Be,51:Be,52:Be,53:Be,54:Be,55:Be,56:Be,57:Be,62:Es},flow:{35:Nf,42:Vn,45:[vs,Vn],60:Of,61:vs,95:Vn,96:xs,126:xs},flowInitial:{[-2]:Yr,[-1]:Yr,32:Yr},insideSpan:{null:[Gr,pp]},string:{38:Ts,92:bs},text:{[-5]:jr,[-4]:jr,[-3]:jr,33:Kf,38:Ts,42:Gr,60:[Qd,Hf],91:Jf,92:[kf,bs],93:Wr,95:Gr,96:df}},Symbol.toStringTag,{value:"Module"}));function bp(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=[],u=[];const o={attempt:N(S),check:N(_),consume:T,enter:y,exit:x,interrupt:N(_,{interrupt:!0})},l={code:null,containerState:{},defineSkip:p,events:[],now:c,parser:e,previous:null,sliceSerialize:E,sliceStream:h,write:f};let m=t.tokenize.call(l,o);return t.resolveAll&&i.push(t),l;function f(w){return s=Ve(s,w),b(),s[s.length-1]!==null?[]:(A(t,0),l.events=Vr(i,l.events,l),l.events)}function E(w,P){return yp(h(w),P)}function h(w){return Tp(s,w)}function c(){const{_bufferIndex:w,_index:P,line:H,column:v,offset:C}=r;return{_bufferIndex:w,_index:P,line:H,column:v,offset:C}}function p(w){a[w.line]=w.column,O()}function b(){let w;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(w=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===w&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(w){m=m(w)}function T(w){Z(w)?(r.line++,r.column=1,r.offset+=w===-3?2:1,O()):w!==-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=w}function y(w,P){const H=P||{};return H.type=w,H.start=c(),l.events.push(["enter",H,l]),u.push(H),H}function x(w){const P=u.pop();return P.end=c(),l.events.push(["exit",P,l]),P}function S(w,P){A(w,P.from)}function _(w,P){P.restore()}function N(w,P){return H;function H(v,C,B){let $,U,V,k;return Array.isArray(v)?J(v):"tokenize"in v?J([v]):j(v);function j(ne){return ee;function ee(pe){const ye=pe!==null&&ne[pe],ge=pe!==null&&ne.null,Pe=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return J(Pe)(pe)}}function J(ne){return $=ne,U=0,ne.length===0?B:R(ne[U])}function R(ne){return ee;function ee(pe){return k=I(),V=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?ce():ne.tokenize.call(P?Object.assign(Object.create(l),P):l,o,te,ce)(pe)}}function te(ne){return w(V,k),C}function ce(ne){return k.restore(),++U<$.length?R($[U]):B}}}function A(w,P){w.resolveAll&&!i.includes(w)&&i.push(w),w.resolve&&Je(l.events,P,l.events.length-P,w.resolve(l.events.slice(P),l)),w.resolveTo&&(l.events=w.resolveTo(l.events,l))}function I(){const w=c(),P=l.previous,H=l.currentConstruct,v=l.events.length,C=Array.from(u);return{from:v,restore:B};function B(){r=w,l.previous=P,l.currentConstruct=H,l.events.length=v,u=C,O()}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Tp(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function yp(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 xp(e){const r={constructs:Fd([Ep,...(e||{}).extensions||[]]),content:a(Vd),defined:[],document:a(Yd),flow:a(dp),lazy:{},string:a(hp),text:a(mp)};return r;function a(i){return s;function s(u){return bp(r,i,u)}}}function Cp(e){for(;!Cs(e););return e}const Is=/[\0\t\n\r]/g;function Sp(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const o=[];let l,m,p,E,h;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(Is.lastIndex=p,l=Is.exec(i),E=l&&l.index!==void 0?l.index:i.length,h=i.charCodeAt(E),!l){t=i.slice(p);break}if(h===10&&p===E&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),p<E&&(o.push(i.slice(p,E)),e+=E-p),h){case 0:{o.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,o.push(-2);e++<m;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}p=E+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Ap=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _p(e){return e.replace(Ap,kp)}function kp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return ps(n.slice(i?2:1),i?16:10)}return rn(n)||e}const Ls={}.hasOwnProperty;function vp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Np(n)(Cp(xp(n).document().write(Sp()(e,t,!0))))}function Np(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(mr),autolinkProtocol:w,autolinkEmail:w,atxHeading:i(Nt),blockQuote:i(ge),characterEscape:w,characterReference:w,codeFenced:i(Pe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Pe,s),codeText:i(st,s),codeTextData:w,data:w,codeFlowValue:w,definition:i(bt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(fr),hardBreakEscape:i(kn),hardBreakTrailing:i(kn),htmlFlow:i(pr,s),htmlFlowData:w,htmlText:i(pr,s),htmlTextData:w,image:i(hr),label:s,link:i(mr),listItem:i(Ga),listItemValue:E,listOrdered:i(vn,p),listUnordered:i(vn),paragraph:i(Ya),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Nt),strong:i(Wa),thematicBreak:i(Xa)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:Te,autolinkProtocol:pe,blockQuote:o(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ne,characterReference:ee,codeFenced:o(b),codeFencedFence:f,codeFencedFenceInfo:h,codeFencedFenceMeta:c,codeFlowValue:O,codeIndented:o(g),codeText:o(C),codeTextData:O,data:O,definition:o(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:T,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o(H),htmlFlowData:O,htmlText:o(v),htmlTextData:O,image:o($),label:V,labelText:U,lineEnding:I,link:o(B),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:te,resourceDestinationString:k,resourceTitleString:j,resource:J,setextHeading:o(_),setextHeadingLineSequence:N,setextHeadingText:A,strong:o(),thematicBreak:o()}};Os(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let Q={type:"root",children:[]};const re={stack:[Q],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:m,data:n},ie=[];let ue=-1;for(;++ue<Y.length;)if(Y[ue][1].type==="listOrdered"||Y[ue][1].type==="listUnordered")if(Y[ue][0]==="enter")ie.push(ue);else{const Fe=ie.pop();ue=a(Y,Fe,ue)}for(ue=-1;++ue<Y.length;){const Fe=t[Y[ue][0]];Ls.call(Fe,Y[ue][1].type)&&Fe[Y[ue][1].type].call(Object.assign({sliceSerialize:Y[ue][2].sliceSerialize},re),Y[ue][1])}if(re.tokenStack.length>0){const Fe=re.tokenStack[re.tokenStack.length-1];(Fe[1]||Ds).call(re,void 0,Fe[0])}for(Q.position={start:pt(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:pt(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)Q=t.transforms[ue](Q)||Q;return Q}function a(Y,Q,re){let ie=Q-1,ue=-1,Fe=!1,nt,Ye,We,ot;for(;++ie<=re;){const Le=Y[ie];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?ue++:ue--,ot=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(nt&&!ot&&!ue&&!We&&(We=ie),ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ot=void 0}if(!ue&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||ue===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(nt){let yt=ie;for(Ye=void 0;yt--;){const ze=Y[yt];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;Ye&&(Y[Ye][1].type="lineEndingBlank",Fe=!0),ze[1].type="lineEnding",Ye=yt}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}We&&(!Ye||We<Ye)&&(nt._spread=!0),nt.end=Object.assign({},Ye?Y[Ye][1].start:Le[1].end),Y.splice(Ye||ie,0,["exit",nt,Le[2]]),ie++,re++}if(Le[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};nt=yt,Y.splice(ie,0,["enter",yt,Le[2]]),ie++,re++,We=void 0,ot=!0}}}return Y[Q][1]._spread=Fe,re}function i(Y,Q){return re;function re(ie){u.call(this,Y(ie),ie),Q&&Q.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(Y,Q,re){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([Q,re||void 0]),Y.position={start:pt(Q.start),end:void 0}}function o(Y){return Q;function Q(re){Y&&Y.call(this,re),l.call(this,re)}}function l(Y,Q){const re=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==Y.type&&(Q?Q.call(this,Y,ie[0]):(ie[1]||Ds).call(this,Y,ie[0]));else throw new Error("Cannot close `"+Y.type+"` ("+tn({start:Y.start,end:Y.end})+"): it’s not open");re.position.end=pt(Y.end)}function m(){return Bd(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function E(Y){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=Y}function c(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=Y}function f(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/(\r?\n|\r)$/g,"")}function y(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Mt(this.sliceSerialize(Y)).toLowerCase()}function T(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function x(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function S(Y){const Q=this.stack[this.stack.length-1];if(!Q.depth){const re=this.sliceSerialize(Y).length;Q.depth=re}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(Y){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function w(Y){const re=this.stack[this.stack.length-1].children;let ie=re[re.length-1];(!ie||ie.type!=="text")&&(ie=ja(),ie.position={start:pt(Y.start),end:void 0},re.push(ie)),this.stack.push(ie)}function O(Y){const Q=this.stack.pop();Q.value+=this.sliceSerialize(Y),Q.position.end=pt(Y.end)}function I(Y){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=Q.children[Q.children.length-1];re.position.end=pt(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(w.call(this,Y),O.call(this,Y))}function P(){this.data.atHardBreak=!0}function H(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function v(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function C(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function B(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function $(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function U(Y){const Q=this.sliceSerialize(Y),re=this.stack[this.stack.length-2];re.label=_p(Q),re.identifier=Mt(Q).toLowerCase()}function V(){const Y=this.stack[this.stack.length-1],Q=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const ie=Y.children;re.children=ie}else re.alt=Q}function k(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function j(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function J(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function te(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Mt(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function ce(Y){this.data.characterReferenceType=Y.type}function ne(Y){const Q=this.sliceSerialize(Y),re=this.data.characterReferenceType;let ie;re?(ie=ps(Q,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=rn(Q);const ue=this.stack[this.stack.length-1];ue.value+=ie}function ee(Y){const Q=this.stack.pop();Q.position.end=pt(Y.end)}function pe(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(Y)}function Te(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(Y)}function ge(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fr(){return{type:"emphasis",children:[]}}function Nt(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function pr(){return{type:"html",value:""}}function hr(){return{type:"image",title:null,url:"",alt:null}}function mr(){return{type:"link",title:null,url:"",children:[]}}function vn(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Ga(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function Ya(){return{type:"paragraph",children:[]}}function Wa(){return{type:"strong",children:[]}}function ja(){return{type:"text",value:""}}function Xa(){return{type:"thematicBreak"}}}function pt(e){return{line:e.line,column:e.column,offset:e.offset}}function Os(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Os(e,r):wp(e,r)}}function wp(e,t){let n;for(n in t)if(Ls.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 Ds(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is still open")}function Ip(e){const t=this;t.parser=n;function n(r){return vp(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Lp(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 Op(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 xp(e){const r={constructs:Fd([Ep,...(e||{}).extensions||[]]),content:a(Vd),defined:[],document:a(Yd),flow:a(dp),lazy:{},string:a(hp),text:a(mp)};return r;function a(i){return s;function s(u){return bp(r,i,u)}}}function Cp(e){for(;!Cs(e););return e}const Is=/[\0\t\n\r]/g;function Sp(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const o=[];let l,m,f,E,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Is.lastIndex=f,l=Is.exec(i),E=l&&l.index!==void 0?l.index:i.length,h=i.charCodeAt(E),!l){t=i.slice(f);break}if(h===10&&f===E&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),f<E&&(o.push(i.slice(f,E)),e+=E-f),h){case 0:{o.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,o.push(-2);e++<m;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}f=E+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Ap=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _p(e){return e.replace(Ap,kp)}function kp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return ps(n.slice(i?2:1),i?16:10)}return rn(n)||e}const Ls={}.hasOwnProperty;function vp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Np(n)(Cp(xp(n).document().write(Sp()(e,t,!0))))}function Np(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(mr),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(Nt),blockQuote:i(ge),characterEscape:I,characterReference:I,codeFenced:i(Pe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Pe,s),codeText:i(st,s),codeTextData:I,data:I,codeFlowValue:I,definition:i(bt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(fr),hardBreakEscape:i(kn),hardBreakTrailing:i(kn),htmlFlow:i(pr,s),htmlFlowData:I,htmlText:i(pr,s),htmlTextData:I,image:i(hr),label:s,link:i(mr),listItem:i(Ga),listItemValue:E,listOrdered:i(vn,f),listUnordered:i(vn),paragraph:i(Ya),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Nt),strong:i(Wa),thematicBreak:i(Xa)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:ye,autolinkProtocol:pe,blockQuote:o(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ne,characterReference:ee,codeFenced:o(b),codeFencedFence:p,codeFencedFenceInfo:h,codeFencedFenceMeta:c,codeFlowValue:O,codeIndented:o(g),codeText:o(C),codeTextData:O,data:O,definition:o(),definitionDestinationString:x,definitionLabelString:T,definitionTitleString:y,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o(H),htmlFlowData:O,htmlText:o(v),htmlTextData:O,image:o($),label:V,labelText:U,lineEnding:w,link:o(B),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:te,resourceDestinationString:k,resourceTitleString:j,resource:J,setextHeading:o(A),setextHeadingLineSequence:N,setextHeadingText:_,strong:o(),thematicBreak:o()}};Os(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let Q={type:"root",children:[]};const re={stack:[Q],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:m,data:n},ie=[];let ue=-1;for(;++ue<Y.length;)if(Y[ue][1].type==="listOrdered"||Y[ue][1].type==="listUnordered")if(Y[ue][0]==="enter")ie.push(ue);else{const Fe=ie.pop();ue=a(Y,Fe,ue)}for(ue=-1;++ue<Y.length;){const Fe=t[Y[ue][0]];Ls.call(Fe,Y[ue][1].type)&&Fe[Y[ue][1].type].call(Object.assign({sliceSerialize:Y[ue][2].sliceSerialize},re),Y[ue][1])}if(re.tokenStack.length>0){const Fe=re.tokenStack[re.tokenStack.length-1];(Fe[1]||Ds).call(re,void 0,Fe[0])}for(Q.position={start:pt(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:pt(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)Q=t.transforms[ue](Q)||Q;return Q}function a(Y,Q,re){let ie=Q-1,ue=-1,Fe=!1,nt,Ye,We,ot;for(;++ie<=re;){const Le=Y[ie];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?ue++:ue--,ot=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(nt&&!ot&&!ue&&!We&&(We=ie),ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ot=void 0}if(!ue&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||ue===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(nt){let Tt=ie;for(Ye=void 0;Tt--;){const ze=Y[Tt];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;Ye&&(Y[Ye][1].type="lineEndingBlank",Fe=!0),ze[1].type="lineEnding",Ye=Tt}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}We&&(!Ye||We<Ye)&&(nt._spread=!0),nt.end=Object.assign({},Ye?Y[Ye][1].start:Le[1].end),Y.splice(Ye||ie,0,["exit",nt,Le[2]]),ie++,re++}if(Le[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};nt=Tt,Y.splice(ie,0,["enter",Tt,Le[2]]),ie++,re++,We=void 0,ot=!0}}}return Y[Q][1]._spread=Fe,re}function i(Y,Q){return re;function re(ie){u.call(this,Y(ie),ie),Q&&Q.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(Y,Q,re){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([Q,re||void 0]),Y.position={start:pt(Q.start),end:void 0}}function o(Y){return Q;function Q(re){Y&&Y.call(this,re),l.call(this,re)}}function l(Y,Q){const re=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==Y.type&&(Q?Q.call(this,Y,ie[0]):(ie[1]||Ds).call(this,Y,ie[0]));else throw new Error("Cannot close `"+Y.type+"` ("+tn({start:Y.start,end:Y.end})+"): it’s not open");re.position.end=pt(Y.end)}function m(){return Bd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function E(Y){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=Y}function c(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=Y}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/(\r?\n|\r)$/g,"")}function T(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Mt(this.sliceSerialize(Y)).toLowerCase()}function y(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function x(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function S(Y){const Q=this.stack[this.stack.length-1];if(!Q.depth){const re=this.sliceSerialize(Y).length;Q.depth=re}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function N(Y){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function I(Y){const re=this.stack[this.stack.length-1].children;let ie=re[re.length-1];(!ie||ie.type!=="text")&&(ie=ja(),ie.position={start:pt(Y.start),end:void 0},re.push(ie)),this.stack.push(ie)}function O(Y){const Q=this.stack.pop();Q.value+=this.sliceSerialize(Y),Q.position.end=pt(Y.end)}function w(Y){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=Q.children[Q.children.length-1];re.position.end=pt(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(I.call(this,Y),O.call(this,Y))}function P(){this.data.atHardBreak=!0}function H(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function v(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function C(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function B(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function $(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function U(Y){const Q=this.sliceSerialize(Y),re=this.stack[this.stack.length-2];re.label=_p(Q),re.identifier=Mt(Q).toLowerCase()}function V(){const Y=this.stack[this.stack.length-1],Q=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const ie=Y.children;re.children=ie}else re.alt=Q}function k(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function j(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function J(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function te(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Mt(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function ce(Y){this.data.characterReferenceType=Y.type}function ne(Y){const Q=this.sliceSerialize(Y),re=this.data.characterReferenceType;let ie;re?(ie=ps(Q,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=rn(Q);const ue=this.stack[this.stack.length-1];ue.value+=ie}function ee(Y){const Q=this.stack.pop();Q.position.end=pt(Y.end)}function pe(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(Y)}function ye(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(Y)}function ge(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fr(){return{type:"emphasis",children:[]}}function Nt(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function pr(){return{type:"html",value:""}}function hr(){return{type:"image",title:null,url:"",alt:null}}function mr(){return{type:"link",title:null,url:"",children:[]}}function vn(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Ga(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function Ya(){return{type:"paragraph",children:[]}}function Wa(){return{type:"strong",children:[]}}function ja(){return{type:"text",value:""}}function Xa(){return{type:"thematicBreak"}}}function pt(e){return{line:e.line,column:e.column,offset:e.offset}}function Os(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Os(e,r):wp(e,r)}}function wp(e,t){let n;for(n in t)if(Ls.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 Ds(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tn({start:t.start,end:t.end})+") is still open")}function Ip(e){const t=this;t.parser=n;function n(r){return vp(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Lp(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 Op(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 Dp(e,t){const n=t.value?t.value+`
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 Pp(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mp(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bp(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Bt(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function Rp(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 Fp(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ps(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 Hp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ps(e,t);const a={src:Bt(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 $p(e,t){const n={src:Bt(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 Up(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 qp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ps(e,t);const a={href:Bt(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 zp(e,t){const n={href:Bt(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 Vp(e,t,n){const r=e.all(t),a=n?Gp(n):Ms(t),i={},s=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(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 u=-1;for(;++u<r.length;){const m=r[u];(a||u!==0||m.type!=="element"||m.tagName!=="p")&&s.push({type:"text",value:`
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 Pp(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mp(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bp(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Bt(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function Rp(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 Fp(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ps(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 Hp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ps(e,t);const a={src:Bt(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 $p(e,t){const n={src:Bt(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 Up(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 qp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ps(e,t);const a={href:Bt(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 zp(e,t){const n={href:Bt(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 Vp(e,t,n){const r=e.all(t),a=n?Gp(n):Ms(t),i={},s=[];if(typeof t.checked=="boolean"){const m=r[0];let f;m&&m.type==="element"&&m.tagName==="p"?f=m:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(a||u!==0||m.type!=="element"||m.tagName!=="p")&&s.push({type:"text",value:`
48
48
  `}),m.type==="element"&&m.tagName==="p"&&!a?s.push(...m.children):s.push(m)}const o=r[r.length-1];o&&(a||o.type!=="element"||o.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 Gp(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=Ms(n[r])}return t}function Ms(e){const t=e.spread;return t??e.children.length>1}function Yp(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 Wp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kp(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)},u=Qe(t.children[1]),o=qn(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),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 Qp(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,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const p=t.children[o],E={},h=s?s[o]:void 0;h&&(E.align=h);let c={type:"element",tagName:i,properties:E,children:[]};p&&(c.children=e.all(p),e.patch(p,c),c=e.applyData(p,c)),l.push(c)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,m),e.applyData(t,m)}function Jp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Bs=9,Rs=32;function Zp(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Fs(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Fs(t.slice(a),a>0,!1)),i.join("")}function Fs(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===Bs||i===Rs;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===Bs||i===Rs;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function eh(e,t){const n={type:"text",value:Zp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function th(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nh={blockquote:Lp,break:Op,code:Dp,delete:Pp,emphasis:Mp,footnoteReference:Bp,heading:Rp,html:Fp,imageReference:Hp,image:$p,inlineCode:Up,linkReference:qp,link:zp,listItem:Vp,list:Yp,paragraph:Wp,root:jp,strong:Xp,table:Kp,tableCell:Jp,tableRow:Qp,text:eh,thematicBreak:th,toml:Gn,yaml:Gn,definition:Gn,footnoteDefinition:Gn};function Gn(){}const Hs=-1,Yn=0,un=1,Wn=2,Xr=3,Kr=4,Qr=5,Jr=6,$s=7,Us=8,qs=typeof self=="object"?self:globalThis,rh=(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 Yn:case Hs:return n(s,a);case un:{const u=n([],a);for(const o of s)u.push(r(o));return u}case Wn:{const u=n({},a);for(const[o,l]of s)u[r(o)]=r(l);return u}case Xr:return n(new Date(s),a);case Kr:{const{source:u,flags:o}=s;return n(new RegExp(u,o),a)}case Qr:{const u=n(new Map,a);for(const[o,l]of s)u.set(r(o),r(l));return u}case Jr:{const u=n(new Set,a);for(const o of s)u.add(r(o));return u}case $s:{const{name:u,message:o}=s;return n(new qs[u](o),a)}case Us: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:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new qs[i](s),a)};return r},zs=e=>rh(new Map,e)(0),Rt="",{toString:ah}={},{keys:ih}=Object,ln=e=>{const t=typeof e;if(t!=="object"||!e)return[Yn,t];const n=ah.call(e).slice(8,-1);switch(n){case"Array":return[un,Rt];case"Object":return[Wn,Rt];case"Date":return[Xr,Rt];case"RegExp":return[Kr,Rt];case"Map":return[Qr,Rt];case"Set":return[Jr,Rt];case"DataView":return[un,n]}return n.includes("Array")?[un,n]:n.includes("Error")?[$s,n]:[Wn,n]},jn=([e,t])=>e===Yn&&(t==="function"||t==="symbol"),sh=(e,t,n,r)=>{const a=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},i=s=>{if(n.has(s))return n.get(s);let[u,o]=ln(s);switch(u){case Yn:{let m=s;switch(o){case"bigint":u=Us,m=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return a([Hs],s)}return a([u,m],s)}case un:{if(o){let E=s;return o==="DataView"?E=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(E=new Uint8Array(s)),a([o,[...E]],s)}const m=[],p=a([u,m],s);for(const E of s)m.push(i(E));return p}case Wn:{if(o)switch(o){case"BigInt":return a([o,s.toString()],s);case"Boolean":case"Number":case"String":return a([o,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const m=[],p=a([u,m],s);for(const E of ih(s))(e||!jn(ln(s[E])))&&m.push([i(E),i(s[E])]);return p}case Xr:return a([u,s.toISOString()],s);case Kr:{const{source:m,flags:p}=s;return a([u,{source:m,flags:p}],s)}case Qr:{const m=[],p=a([u,m],s);for(const[E,h]of s)(e||!(jn(ln(E))||jn(ln(h))))&&m.push([i(E),i(h)]);return p}case Jr:{const m=[],p=a([u,m],s);for(const E of s)(e||!jn(ln(E)))&&m.push(i(E));return p}}const{message:l}=s;return a([u,{name:o,message:l}],s)};return i},Vs=(e,{json:t,lossy:n}={})=>{const r=[];return sh(!(t||n),!!t,new Map,r)(e),r},St=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zs(Vs(e,t)):structuredClone(e):(e,t)=>zs(Vs(e,t));function oh(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 uh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function lh(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||oh,r=e.options.footnoteBackLabel||uh,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[o]);if(!l)continue;const m=e.all(l),p=String(l.identifier).toUpperCase(),E=Bt(p.toLowerCase());let h=0;const c=[],f=e.footnoteCounts.get(p);for(;f!==void 0&&++h<=f;){c.length>0&&c.push({type:"text",value:" "});let y=typeof n=="string"?n:n(o,h);typeof y=="string"&&(y={type:"text",value:y}),c.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const b=m[m.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const y=b.children[b.children.length-1];y&&y.type==="text"?y.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...c)}else m.push(...c);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(m,!0)};e.patch(l,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...St(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 Gp(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=Ms(n[r])}return t}function Ms(e){const t=e.spread;return t??e.children.length>1}function Yp(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 Wp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kp(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)},u=Qe(t.children[1]),o=qn(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),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 Qp(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,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const f=t.children[o],E={},h=s?s[o]:void 0;h&&(E.align=h);let c={type:"element",tagName:i,properties:E,children:[]};f&&(c.children=e.all(f),e.patch(f,c),c=e.applyData(f,c)),l.push(c)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,m),e.applyData(t,m)}function Jp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Bs=9,Rs=32;function Zp(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Fs(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Fs(t.slice(a),a>0,!1)),i.join("")}function Fs(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===Bs||i===Rs;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===Bs||i===Rs;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function eh(e,t){const n={type:"text",value:Zp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function th(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nh={blockquote:Lp,break:Op,code:Dp,delete:Pp,emphasis:Mp,footnoteReference:Bp,heading:Rp,html:Fp,imageReference:Hp,image:$p,inlineCode:Up,linkReference:qp,link:zp,listItem:Vp,list:Yp,paragraph:Wp,root:jp,strong:Xp,table:Kp,tableCell:Jp,tableRow:Qp,text:eh,thematicBreak:th,toml:Gn,yaml:Gn,definition:Gn,footnoteDefinition:Gn};function Gn(){}const Hs=-1,Yn=0,un=1,Wn=2,Xr=3,Kr=4,Qr=5,Jr=6,$s=7,Us=8,qs=typeof self=="object"?self:globalThis,rh=(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 Yn:case Hs:return n(s,a);case un:{const u=n([],a);for(const o of s)u.push(r(o));return u}case Wn:{const u=n({},a);for(const[o,l]of s)u[r(o)]=r(l);return u}case Xr:return n(new Date(s),a);case Kr:{const{source:u,flags:o}=s;return n(new RegExp(u,o),a)}case Qr:{const u=n(new Map,a);for(const[o,l]of s)u.set(r(o),r(l));return u}case Jr:{const u=n(new Set,a);for(const o of s)u.add(r(o));return u}case $s:{const{name:u,message:o}=s;return n(new qs[u](o),a)}case Us: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:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new qs[i](s),a)};return r},zs=e=>rh(new Map,e)(0),Rt="",{toString:ah}={},{keys:ih}=Object,ln=e=>{const t=typeof e;if(t!=="object"||!e)return[Yn,t];const n=ah.call(e).slice(8,-1);switch(n){case"Array":return[un,Rt];case"Object":return[Wn,Rt];case"Date":return[Xr,Rt];case"RegExp":return[Kr,Rt];case"Map":return[Qr,Rt];case"Set":return[Jr,Rt];case"DataView":return[un,n]}return n.includes("Array")?[un,n]:n.includes("Error")?[$s,n]:[Wn,n]},jn=([e,t])=>e===Yn&&(t==="function"||t==="symbol"),sh=(e,t,n,r)=>{const a=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},i=s=>{if(n.has(s))return n.get(s);let[u,o]=ln(s);switch(u){case Yn:{let m=s;switch(o){case"bigint":u=Us,m=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return a([Hs],s)}return a([u,m],s)}case un:{if(o){let E=s;return o==="DataView"?E=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(E=new Uint8Array(s)),a([o,[...E]],s)}const m=[],f=a([u,m],s);for(const E of s)m.push(i(E));return f}case Wn:{if(o)switch(o){case"BigInt":return a([o,s.toString()],s);case"Boolean":case"Number":case"String":return a([o,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const m=[],f=a([u,m],s);for(const E of ih(s))(e||!jn(ln(s[E])))&&m.push([i(E),i(s[E])]);return f}case Xr:return a([u,s.toISOString()],s);case Kr:{const{source:m,flags:f}=s;return a([u,{source:m,flags:f}],s)}case Qr:{const m=[],f=a([u,m],s);for(const[E,h]of s)(e||!(jn(ln(E))||jn(ln(h))))&&m.push([i(E),i(h)]);return f}case Jr:{const m=[],f=a([u,m],s);for(const E of s)(e||!jn(ln(E)))&&m.push(i(E));return f}}const{message:l}=s;return a([u,{name:o,message:l}],s)};return i},Vs=(e,{json:t,lossy:n}={})=>{const r=[];return sh(!(t||n),!!t,new Map,r)(e),r},St=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zs(Vs(e,t)):structuredClone(e):(e,t)=>zs(Vs(e,t));function oh(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 uh(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function lh(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||oh,r=e.options.footnoteBackLabel||uh,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[o]);if(!l)continue;const m=e.all(l),f=String(l.identifier).toUpperCase(),E=Bt(f.toLowerCase());let h=0;const c=[],p=e.footnoteCounts.get(f);for(;p!==void 0&&++h<=p;){c.length>0&&c.push({type:"text",value:" "});let T=typeof n=="string"?n:n(o,h);typeof T=="string"&&(T={type:"text",value:T}),c.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const b=m[m.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const T=b.children[b.children.length-1];T&&T.type==="text"?T.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...c)}else m.push(...c);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(m,!0)};e.patch(l,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...St(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
50
50
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
51
- `}]}}const Gs=function(e){if(e==null)return ph;if(typeof e=="function")return Xn(e);if(typeof e=="object")return Array.isArray(e)?ch(e):dh(e);if(typeof e=="string")return fh(e);throw new Error("Expected function, string, or object as test")};function ch(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gs(e[n]);return Xn(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function dh(e){const t=e;return Xn(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function fh(e){return Xn(t);function t(n){return n&&n.type===e}}function Xn(e){return t;function t(n,r,a){return!!(hh(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function ph(){return!0}function hh(e){return e!==null&&typeof e=="object"&&"type"in e}function Gb(e){return e}const Ys=[],mh=!0,Ws=!1,gh="skip";function js(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Gs(a),s=r?-1:1;u(e,void 0,[])();function u(o,l,m){const p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return E;function E(){let h=Ys,c,f,b;if((!t||i(o,l,m[m.length-1]||void 0))&&(h=Eh(n(o,m)),h[0]===Ws))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==gh)for(f=(r?g.children.length:-1)+s,b=m.concat(g);f>-1&&f<g.children.length;){const y=g.children[f];if(c=u(y,f,b)(),c[0]===Ws)return c;f=typeof c[1]=="number"?c[1]:f+s}}return h}}}function Eh(e){return Array.isArray(e)?e:typeof e=="number"?[mh,e]:e==null?Ys:[e]}function Kn(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),js(e,i,u,a);function u(o,l){const m=l[l.length-1],p=m?m.children.indexOf(o):void 0;return s(o,p,m)}}const Zr={}.hasOwnProperty,bh={};function yh(e,t){const n=t||bh,r=new Map,a=new Map,i=new Map,s={...nh,...n.handlers},u={all:l,applyData:xh,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:o,options:n,patch:Th,wrap:Sh};return Kn(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:a,E=String(m.identifier).toUpperCase();p.has(E)||p.set(E,m)}}),u;function o(m,p){const E=m.type,h=u.handlers[E];if(Zr.call(u.handlers,E)&&h)return h(u,m,p);if(u.options.passThrough&&u.options.passThrough.includes(E)){if("children"in m){const{children:f,...b}=m,g=St(b);return g.children=u.all(m),g}return St(m)}return(u.options.unknownHandler||Ch)(u,m,p)}function l(m){const p=[];if("children"in m){const E=m.children;let h=-1;for(;++h<E.length;){const c=u.one(E[h],m);if(c){if(h&&E[h-1].type==="break"&&(!Array.isArray(c)&&c.type==="text"&&(c.value=Xs(c.value)),!Array.isArray(c)&&c.type==="element")){const f=c.children[0];f&&f.type==="text"&&(f.value=Xs(f.value))}Array.isArray(c)?p.push(...c):p.push(c)}}}return p}}function Th(e,t){e.position&&(t.position=ns(e))}function xh(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,St(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Ch(e,t){const n=t.data||{},r="value"in t&&!(Zr.call(n,"hProperties")||Zr.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 Sh(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
51
+ `}]}}const Gs=function(e){if(e==null)return ph;if(typeof e=="function")return Xn(e);if(typeof e=="object")return Array.isArray(e)?ch(e):dh(e);if(typeof e=="string")return fh(e);throw new Error("Expected function, string, or object as test")};function ch(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gs(e[n]);return Xn(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function dh(e){const t=e;return Xn(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function fh(e){return Xn(t);function t(n){return n&&n.type===e}}function Xn(e){return t;function t(n,r,a){return!!(hh(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function ph(){return!0}function hh(e){return e!==null&&typeof e=="object"&&"type"in e}function Gb(e){return e}const Ys=[],mh=!0,Ws=!1,gh="skip";function js(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Gs(a),s=r?-1:1;u(e,void 0,[])();function u(o,l,m){const f=o&&typeof o=="object"?o:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return E;function E(){let h=Ys,c,p,b;if((!t||i(o,l,m[m.length-1]||void 0))&&(h=Eh(n(o,m)),h[0]===Ws))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==gh)for(p=(r?g.children.length:-1)+s,b=m.concat(g);p>-1&&p<g.children.length;){const T=g.children[p];if(c=u(T,p,b)(),c[0]===Ws)return c;p=typeof c[1]=="number"?c[1]:p+s}}return h}}}function Eh(e){return Array.isArray(e)?e:typeof e=="number"?[mh,e]:e==null?Ys:[e]}function Kn(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),js(e,i,u,a);function u(o,l){const m=l[l.length-1],f=m?m.children.indexOf(o):void 0;return s(o,f,m)}}const Zr={}.hasOwnProperty,bh={};function Th(e,t){const n=t||bh,r=new Map,a=new Map,i=new Map,s={...nh,...n.handlers},u={all:l,applyData:xh,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:o,options:n,patch:yh,wrap:Sh};return Kn(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const f=m.type==="definition"?r:a,E=String(m.identifier).toUpperCase();f.has(E)||f.set(E,m)}}),u;function o(m,f){const E=m.type,h=u.handlers[E];if(Zr.call(u.handlers,E)&&h)return h(u,m,f);if(u.options.passThrough&&u.options.passThrough.includes(E)){if("children"in m){const{children:p,...b}=m,g=St(b);return g.children=u.all(m),g}return St(m)}return(u.options.unknownHandler||Ch)(u,m,f)}function l(m){const f=[];if("children"in m){const E=m.children;let h=-1;for(;++h<E.length;){const c=u.one(E[h],m);if(c){if(h&&E[h-1].type==="break"&&(!Array.isArray(c)&&c.type==="text"&&(c.value=Xs(c.value)),!Array.isArray(c)&&c.type==="element")){const p=c.children[0];p&&p.type==="text"&&(p.value=Xs(p.value))}Array.isArray(c)?f.push(...c):f.push(c)}}}return f}}function yh(e,t){e.position&&(t.position=ns(e))}function xh(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,St(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Ch(e,t){const n=t.data||{},r="value"in t&&!(Zr.call(n,"hProperties")||Zr.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 Sh(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
- `}),n}function Xs(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ks(e,t){const n=yh(e,t),r=n.one(e,void 0),a=lh(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 Ah(e,t){return e&&"run"in e?async function(n,r){const a=Ks(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Ks(n,{file:r,...e||t})}}function Qs(e){if(e)throw e}var ea,Js;function _h(){if(Js)return ea;Js=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 m=e.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!m&&!p)return!1;var E;for(E in l);return typeof E>"u"||e.call(l,E)},s=function(l,m){n&&m.name==="__proto__"?n(l,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):l[m.name]=m.newValue},u=function(l,m){if(m==="__proto__")if(e.call(l,m)){if(r)return r(l,m).value}else return;return l[m]};return ea=function o(){var l,m,p,E,h,c,f=arguments[0],b=1,g=arguments.length,y=!1;for(typeof f=="boolean"&&(y=f,f=arguments[1]||{},b=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});b<g;++b)if(l=arguments[b],l!=null)for(m in l)p=u(f,m),E=u(l,m),f!==E&&(y&&E&&(i(E)||(h=a(E)))?(h?(h=!1,c=p&&a(p)?p:[]):c=p&&i(p)?p:{},s(f,{name:m,newValue:o(y,c,E)})):typeof E<"u"&&s(f,{name:m,newValue:E}));return f},ea}var kh=_h();const ta=Mr(kh);function na(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 vh(){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);u(null,...a);function u(o,...l){const m=e[++i];let p=-1;if(o){s(o);return}for(;++p<a.length;)(l[p]===null||l[p]===void 0)&&(l[p]=a[p]);a=l,m?Nh(m,u)(...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 Nh(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(a);try{o=e.apply(this,s)}catch(l){const m=l;if(u&&n)throw m;return a(m)}u||(o&&o.then&&typeof o.then=="function"?o.then(i,a):o instanceof Error?a(o):i(o))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const et={basename:wh,dirname:Ih,extname:Lh,join:Oh,sep:"/"};function wh(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cn(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,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Ih(e){if(cn(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 Lh(e){cn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 Oh(...e){let t=-1,n;for(;++t<e.length;)cn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Dh(n)}function Dh(e){cn(e);const t=e.codePointAt(0)===47;let n=Ph(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ph(e,t){let n="",r=0,a=-1,i=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),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 u===46&&i>-1?i++:i=-1}return n}function cn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mh={cwd:Bh};function Bh(){return"/"}function ra(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Rh(e){if(typeof e=="string")e=new URL(e);else if(!ra(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 Fh(e)}function Fh(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 aa=["history","path","basename","stem","extname","dirname"];class Zs{constructor(t){let n;t?ra(t)?n={path:t}:typeof t=="string"||Hh(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<aa.length;){const i=aa[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)aa.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?et.basename(this.path):void 0}set basename(t){sa(t,"basename"),ia(t,"basename"),this.path=et.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?et.dirname(this.path):void 0}set dirname(t){eo(this.basename,"dirname"),this.path=et.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?et.extname(this.path):void 0}set extname(t){if(ia(t,"extname"),eo(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=et.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ra(t)&&(t=Rh(t)),sa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?et.basename(this.path,this.extname):void 0}set stem(t){sa(t,"stem"),ia(t,"stem"),this.path=et.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 we(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 ia(e,t){if(e&&e.includes(et.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+et.sep+"`")}function sa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $h=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},Uh={}.hasOwnProperty;class oa extends $h{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=vh()}copy(){const t=new oa;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ta(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ca("data",this.frozen),this.namespace[t]=n,this):Uh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ca("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=Qn(t),r=this.parser||this.Parser;return ua("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ua("process",this.parser||this.Parser),la("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Qn(t),o=r.parse(u);r.run(o,u,function(m,p,E){if(m||!p||!E)return l(m);const h=p,c=r.stringify(h,E);Vh(c)?E.value=c:E.result=c,l(m,E)});function l(m,p){m||!p?s(m):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ua("processSync",this.parser||this.Parser),la("processSync",this.compiler||this.Compiler),this.process(t,a),no("processSync","process",n),r;function a(i,s){n=!0,Qs(i),r=s}}run(t,n,r){to(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,u){const o=Qn(n);a.run(t,o,l);function l(m,p,E){const h=p||t;m?u(m):s?s(h):r(void 0,h,E)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),no("runSync","run",r),a;function i(s,u){Qs(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Qn(n),a=this.compiler||this.Compiler;return la("stringify",a),to(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(ca("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[m,...p]=l;o(m,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");u(l.plugins),l.settings&&(a.settings=ta(!0,a.settings,l.settings))}function u(l){let m=-1;if(l!=null)if(Array.isArray(l))for(;++m<l.length;){const p=l[m];i(p)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,m){let p=-1,E=-1;for(;++p<r.length;)if(r[p][0]===l){E=p;break}if(E===-1)r.push([l,...m]);else if(m.length>0){let[h,...c]=m;const f=r[E][1];na(f)&&na(h)&&(h=ta(!0,f,h)),r[E]=[l,h,...c]}}}}const qh=new oa().freeze();function ua(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function la(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ca(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 to(e){if(!na(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function no(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qn(e){return zh(e)?e:new Zs(e)}function zh(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vh(e){return typeof e=="string"||Gh(e)}function Gh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ro=[],ao={allowDangerousHtml:!0},Wh=/^(https?|ircs?|mailto|xmpp)$/i,jh=[{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 da(e){const t=Xh(e),n=Kh(e);return Qh(t.runSync(t.parse(n),n),e)}function Xh(e){const t=e.rehypePlugins||ro,n=e.remarkPlugins||ro,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ao}:ao;return qh().use(Ip).use(n).use(Ah,r).use(t)}function Kh(e){const t=e.children||"",n=new Zs;return typeof t=="string"&&(n.value=t),n}function Qh(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||Jh;for(const m of jh)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Yh+m.id,void 0);return Kn(e,l),yd(e,{Fragment:z.Fragment,components:a,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function l(m,p,E){if(m.type==="raw"&&E&&typeof p=="number")return s?E.children.splice(p,1):E.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let h;for(h in Ur)if(Object.hasOwn(Ur,h)&&Object.hasOwn(m.properties,h)){const c=m.properties[h],f=Ur[h];(f===null||f.includes(m.tagName))&&(m.properties[h]=o(String(c||""),h,m))}}if(m.type==="element"){let h=n?!n.includes(m.tagName):i?i.includes(m.tagName):!1;if(!h&&r&&typeof p=="number"&&(h=!r(m,p,E)),h&&E&&typeof p=="number")return u&&m.children?E.children.splice(p,1,...m.children):E.children.splice(p,1),p}}}function Jh(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||Wh.test(e.slice(0,t))?e:""}const io=/[#.]/g;function Zh(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){io.lastIndex=a;const u=io.exec(n),o=n.slice(a,u?u.index:n.length);o&&(i?i==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,a+=o.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function so(e,t,n){const r=n?r0(n):void 0;function a(i,s,...u){let o;if(i==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=Zh(i,t);const l=o.tagName.toLowerCase(),m=r?r.get(l):void 0;if(o.tagName=m||l,e0(s))u.unshift(s);else for(const[p,E]of Object.entries(s))t0(e,o.properties,p,E)}for(const l of u)fa(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return a}function e0(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 t0(e,t,n,r){const a=Un(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=Xi(r):a.commaSeparated?i=Bi(r):a.commaOrSpaceSeparated?i=Xi(Bi(r).join(" ")):i=oo(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?n0(r):String(r);if(Array.isArray(i)){const s=[];for(const u of i)s.push(oo(a,a.property,u));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function fa(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)fa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qt(n)===Qt(t)))return!0}return n}function n0(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function r0(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const a0=["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"],i0=so(Jt,"div"),s0=so(dt,"g",a0);function o0(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 u=n[s];if(u===void 0){const o=uo(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>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 u=n[n.length-1],o=uo(t,u),l=o===-1?t.length+1:o+1;if(u===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 uo(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 At={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/"},lo={}.hasOwnProperty,u0=Object.prototype;function l0(e,t){const n=t||{};return pa({file:n.file||void 0,location:!1,schema:n.space==="svg"?dt:Jt,verbose:n.verbose||!1},e)}function pa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Jn(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:co(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=o0(i),u=s.toPoint(0),o=s.toPoint(i.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Jn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Jn(e,r,n),n}default:return n=c0(e,t),n}}function co(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=pa(e,t[n]);r.push(a)}return r}function c0(e,t){const n=e.schema;e.schema=t.namespaceURI===At.svg?dt:Jt;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;lo.call(u0,o)||(a[o]=u.value)}const s=(e.schema.space==="svg"?s0:i0)(t.tagName,a,co(e,t.childNodes));if(Jn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&Ft(o.startTag),m=o&&o.endTag&&Ft(o.endTag),p=pa(e,u.content);l&&m&&e.file&&(p.position={start:l.end,end:m.start}),s.content=p}return e.schema=n,s}function Jn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=d0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function d0(e,t,n){const r=Ft(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)lo.call(n.attrs,s)&&(i[Un(e.schema,s).property]=Ft(n.attrs[s]));n.startTag;const u=Ft(n.startTag),o=n.endTag?Ft(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=i,t.data={position:l}}}return r}function Ft(e){const t=fo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=fo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function fo(e){return e.line&&e.column?e:void 0}const po={}.hasOwnProperty;function ho(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&po.call(a,e)){const o=String(a[e]);s=po.call(u,o)?u[o]: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 f0={},p0={}.hasOwnProperty,mo=ho("type",{handlers:{root:m0,element:T0,text:b0,comment:y0,doctype:E0}});function h0(e,t){const r=(t||f0).space;return mo(e,r==="svg"?dt:Jt)}function m0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ha(e.children,n,t),Ht(e,n),n}function g0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ha(e.children,n,t),Ht(e,n),n}function E0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function b0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function y0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function T0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=dt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&p0.call(e.properties,i)){const o=x0(r,i,e.properties[i]);o&&a.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:At[s],childNodes:[],parentNode:null};return u.childNodes=ha(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=g0(e.content,r)),u}function x0(e,t,n){const r=Un(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?Ri(n):Ki(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=At[r.space]}return a}function ha(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=mo(e[r],n);i.parentNode=t,a.push(i)}return a}function Ht(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 C0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],S0=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]),ye="�";var L;(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"})(L||(L={}));const Re={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function go(e){return e>=55296&&e<=57343}function A0(e){return e>=56320&&e<=57343}function _0(e,t){return(e-55296)*1024+9216+t}function Eo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function bo(e){return e>=64976&&e<=65007||S0.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 k0=65536;class v0{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=k0,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,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(A0(n))return this.pos++,this._addGap(),_0(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.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,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.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,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,go(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Eo(t)?this._err(G.controlCharacterInInputStream):bo(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 oe;(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"})(oe||(oe={}));function yo(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 N0=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))),w0=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 I0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=w0.get(e))!==null&&t!==void 0?t:e}var ve;(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"})(ve||(ve={}));const L0=32;var ht;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ht||(ht={}));function ma(e){return e>=ve.ZERO&&e<=ve.NINE}function O0(e){return e>=ve.UPPER_A&&e<=ve.UPPER_F||e>=ve.LOWER_A&&e<=ve.LOWER_F}function D0(e){return e>=ve.UPPER_A&&e<=ve.UPPER_Z||e>=ve.LOWER_A&&e<=ve.LOWER_Z||ma(e)}function P0(e){return e===ve.EQUALS||D0(e)}var Ne;(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"})(Ne||(Ne={}));var it;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(it||(it={}));class M0{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ne.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=it.Strict}startEntity(t){this.decodeMode=t,this.state=Ne.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ne.EntityStart:return t.charCodeAt(n)===ve.NUM?(this.state=Ne.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ne.NamedEntity,this.stateNamedEntity(t,n));case Ne.NumericStart:return this.stateNumericStart(t,n);case Ne.NumericDecimal:return this.stateNumericDecimal(t,n);case Ne.NumericHex:return this.stateNumericHex(t,n);case Ne.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|L0)===ve.LOWER_X?(this.state=Ne.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ne.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(ma(a)||O0(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(ma(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===ve.SEMI)this.consumed+=1;else if(this.decodeMode===it.Strict)return 0;return this.emitCodePoint(I0(this.result),this.consumed),this.errors&&(t!==ve.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&ht.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=B0(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===it.Attribute&&(i===0||P0(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&ht.VALUE_LENGTH)>>14,i!==0){if(s===ve.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==it.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]&ht.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]&~ht.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Ne.NamedEntity:return this.result!==0&&(this.decodeMode!==it.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ne.NumericDecimal:return this.emitNumericEntity(0,2);case Ne.NumericHex:return this.emitNumericEntity(0,3);case Ne.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ne.EntityStart:return 0}}}function B0(e,t,n,r){const a=(t&ht.BRANCH_LENGTH)>>7,i=t&ht.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const o=r-i;return o<0||o>=a?-1:e[n+o]-1}let s=n,u=s+a-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return e[o+a]}return-1}var W;(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/"})(W||(W={}));var _t;(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"})(_t||(_t={}));var Ge;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ge||(Ge={}));var q;(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"})(q||(q={}));var d;(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"})(d||(d={}));const R0=new Map([[q.A,d.A],[q.ADDRESS,d.ADDRESS],[q.ANNOTATION_XML,d.ANNOTATION_XML],[q.APPLET,d.APPLET],[q.AREA,d.AREA],[q.ARTICLE,d.ARTICLE],[q.ASIDE,d.ASIDE],[q.B,d.B],[q.BASE,d.BASE],[q.BASEFONT,d.BASEFONT],[q.BGSOUND,d.BGSOUND],[q.BIG,d.BIG],[q.BLOCKQUOTE,d.BLOCKQUOTE],[q.BODY,d.BODY],[q.BR,d.BR],[q.BUTTON,d.BUTTON],[q.CAPTION,d.CAPTION],[q.CENTER,d.CENTER],[q.CODE,d.CODE],[q.COL,d.COL],[q.COLGROUP,d.COLGROUP],[q.DD,d.DD],[q.DESC,d.DESC],[q.DETAILS,d.DETAILS],[q.DIALOG,d.DIALOG],[q.DIR,d.DIR],[q.DIV,d.DIV],[q.DL,d.DL],[q.DT,d.DT],[q.EM,d.EM],[q.EMBED,d.EMBED],[q.FIELDSET,d.FIELDSET],[q.FIGCAPTION,d.FIGCAPTION],[q.FIGURE,d.FIGURE],[q.FONT,d.FONT],[q.FOOTER,d.FOOTER],[q.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[q.FORM,d.FORM],[q.FRAME,d.FRAME],[q.FRAMESET,d.FRAMESET],[q.H1,d.H1],[q.H2,d.H2],[q.H3,d.H3],[q.H4,d.H4],[q.H5,d.H5],[q.H6,d.H6],[q.HEAD,d.HEAD],[q.HEADER,d.HEADER],[q.HGROUP,d.HGROUP],[q.HR,d.HR],[q.HTML,d.HTML],[q.I,d.I],[q.IMG,d.IMG],[q.IMAGE,d.IMAGE],[q.INPUT,d.INPUT],[q.IFRAME,d.IFRAME],[q.KEYGEN,d.KEYGEN],[q.LABEL,d.LABEL],[q.LI,d.LI],[q.LINK,d.LINK],[q.LISTING,d.LISTING],[q.MAIN,d.MAIN],[q.MALIGNMARK,d.MALIGNMARK],[q.MARQUEE,d.MARQUEE],[q.MATH,d.MATH],[q.MENU,d.MENU],[q.META,d.META],[q.MGLYPH,d.MGLYPH],[q.MI,d.MI],[q.MO,d.MO],[q.MN,d.MN],[q.MS,d.MS],[q.MTEXT,d.MTEXT],[q.NAV,d.NAV],[q.NOBR,d.NOBR],[q.NOFRAMES,d.NOFRAMES],[q.NOEMBED,d.NOEMBED],[q.NOSCRIPT,d.NOSCRIPT],[q.OBJECT,d.OBJECT],[q.OL,d.OL],[q.OPTGROUP,d.OPTGROUP],[q.OPTION,d.OPTION],[q.P,d.P],[q.PARAM,d.PARAM],[q.PLAINTEXT,d.PLAINTEXT],[q.PRE,d.PRE],[q.RB,d.RB],[q.RP,d.RP],[q.RT,d.RT],[q.RTC,d.RTC],[q.RUBY,d.RUBY],[q.S,d.S],[q.SCRIPT,d.SCRIPT],[q.SEARCH,d.SEARCH],[q.SECTION,d.SECTION],[q.SELECT,d.SELECT],[q.SOURCE,d.SOURCE],[q.SMALL,d.SMALL],[q.SPAN,d.SPAN],[q.STRIKE,d.STRIKE],[q.STRONG,d.STRONG],[q.STYLE,d.STYLE],[q.SUB,d.SUB],[q.SUMMARY,d.SUMMARY],[q.SUP,d.SUP],[q.TABLE,d.TABLE],[q.TBODY,d.TBODY],[q.TEMPLATE,d.TEMPLATE],[q.TEXTAREA,d.TEXTAREA],[q.TFOOT,d.TFOOT],[q.TD,d.TD],[q.TH,d.TH],[q.THEAD,d.THEAD],[q.TITLE,d.TITLE],[q.TR,d.TR],[q.TRACK,d.TRACK],[q.TT,d.TT],[q.U,d.U],[q.UL,d.UL],[q.SVG,d.SVG],[q.VAR,d.VAR],[q.WBR,d.WBR],[q.XMP,d.XMP]]);function $t(e){var t;return(t=R0.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const X=d,F0={[W.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]),[W.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[W.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},ga=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var M;(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"})(M||(M={}));const Ce={DATA:M.DATA,RCDATA:M.RCDATA,RAWTEXT:M.RAWTEXT,SCRIPT_DATA:M.SCRIPT_DATA,PLAINTEXT:M.PLAINTEXT,CDATA_SECTION:M.CDATA_SECTION};function H0(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function dn(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function $0(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function mt(e){return $0(e)||dn(e)}function To(e){return mt(e)||H0(e)}function Zn(e){return e+32}function xo(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function Co(e){return xo(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function U0(e){return e===L.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:go(e)?G.surrogateCharacterReference:bo(e)?G.noncharacterCharacterReference:Eo(e)||e===L.CARRIAGE_RETURN?G.controlCharacterReference:null}class q0{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=M.DATA,this.returnState=M.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new v0(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new M0(N0,(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=U0(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:oe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oe.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(yo(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=$t(t.tagName),t.type===oe.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 oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oe.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:oe.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=xo(t)?oe.WHITESPACE_CHARACTER:t===L.NULL?oe.NULL_CHARACTER:oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=M.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?it.Attribute:it.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===M.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case M.DATA:{this._stateData(t);break}case M.RCDATA:{this._stateRcdata(t);break}case M.RAWTEXT:{this._stateRawtext(t);break}case M.SCRIPT_DATA:{this._stateScriptData(t);break}case M.PLAINTEXT:{this._statePlaintext(t);break}case M.TAG_OPEN:{this._stateTagOpen(t);break}case M.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case M.TAG_NAME:{this._stateTagName(t);break}case M.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case M.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case M.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case M.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case M.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case M.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case M.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case M.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case M.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case M.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case M.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case M.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case M.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case M.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case M.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case M.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case M.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case M.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case M.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case M.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case M.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case M.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case M.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case M.BOGUS_COMMENT:{this._stateBogusComment(t);break}case M.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case M.COMMENT_START:{this._stateCommentStart(t);break}case M.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case M.COMMENT:{this._stateComment(t);break}case M.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case M.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case M.COMMENT_END:{this._stateCommentEnd(t);break}case M.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case M.DOCTYPE:{this._stateDoctype(t);break}case M.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case M.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case M.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case M.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case M.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case M.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case M.CDATA_SECTION:{this._stateCdataSection(t);break}case M.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case M.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case M.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case M.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=M.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mt(t))this._createStartTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=M.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=M.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(G.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=M.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mt(t))this._createEndTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(G.missingEndTagName),this.state=M.DATA;break}case L.EOF:{this._err(G.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.tagName+=ye;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=M.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mt(t)?(this.state=M.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=M.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=M.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=M.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=M.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=M.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mt(t)?(this.state=M.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=M.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=M.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=M.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mt(t)?(this.state=M.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mt(t)?(this._emitChars("<"),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mt(t)?(this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Re.SCRIPT,!1)&&Co(this.preprocessor.peek(Re.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Re.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Re.SCRIPT,!1)&&Co(this.preprocessor.peek(Re.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Re.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=M.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.name+=ye;break}default:this.currentAttr.name+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=M.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=M.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingAttributeValue),this.state=M.DATA,this.emitCurrentTagToken();break}default:this.state=M.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=M.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBetweenAttributes),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.unexpectedSolidusInTag),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.data+=ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Re.DASH_DASH,!0)?(this._createCommentToken(Re.DASH_DASH.length+1),this.state=M.COMMENT_START):this._consumeSequenceIfMatch(Re.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Re.DOCTYPE.length+1),this.state=M.DOCTYPE):this._consumeSequenceIfMatch(Re.CDATA_START,!0)?this.inForeignNode?this.state=M.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(Re.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=M.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=M.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=M.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.data+=ye;break}case L.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 L.EXCLAMATION_MARK:{n.data+="!",this.state=M.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=M.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=M.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(G.nestedComment),this.state=M.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=M.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=M.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(G.incorrectlyClosedComment),this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=M.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.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=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(dn(t))this._createDoctypeToken(String.fromCharCode(Zn(t))),this.state=M.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(G.unexpectedNullCharacter),this._createDoctypeToken(ye),this.state=M.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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=M.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.name+=ye;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Re.PUBLIC,!1)?this.state=M.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Re.SYSTEM,!1)?this.state=M.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=ye;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=ye;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=ye;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=ye;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.NULL:{this._err(G.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=M.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(G.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=M.CDATA_SECTION_END:(this._emitChars("]"),this.state=M.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=M.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(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&To(this.preprocessor.peek(1))?M.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){To(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const So=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Ao=new Set([...So,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),er=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),z0=new Set([...er,d.OL,d.UL]),V0=new Set([...er,d.BUTTON]),_o=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),ko=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),G0=new Set([d.TR,d.TEMPLATE,d.HTML]),Y0=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),W0=new Set([d.TABLE,d.TEMPLATE,d.HTML]),j0=new Set([d.TD,d.TH]);class X0{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=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.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])!==W.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(ga,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(j0,W.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(W0,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Y0,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(G0,W.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]===d.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]===d.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 W.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case W.SVG:{if(ko.has(a))return!1;break}case W.MATHML:{if(_o.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,er)}hasInListItemScope(t){return this.hasInDynamicScope(t,z0)}hasInButtonScope(t){return this.hasInDynamicScope(t,V0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(ga.has(n))return!0;if(er.has(n))return!1;break}case W.SVG:{if(ko.has(n))return!1;break}case W.MATHML:{if(_o.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&So.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ao.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ao.has(this.currentTagId);)this.pop()}}const Ea=3;var tt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(tt||(tt={}));const vo={type:tt.Marker};class K0{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 u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===tt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const m=this.treeAdapter.getAttrList(l);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ea)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ea)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>a.get(o.name)===o.value)&&(i+=1,i>=Ea&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(vo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:tt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:tt.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(vo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===tt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===tt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===tt.Element&&n.element===t)}}const gt={createDocument(){return{nodeName:"#document",mode:Ge.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};gt.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(gt.isTextNode(n)){n.value+=t;return}}gt.appendChild(e,gt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gt.isTextNode(r)?r.value+=t:gt.insertBefore(e,gt.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}}},No="html",Q0="about:legacy-compat",J0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",wo=["+//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//"],Z0=[...wo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],em=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Io=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],tm=[...Io,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Lo(e,t){return t.some(n=>e.startsWith(n))}function nm(e){return e.name===No&&e.publicId===null&&(e.systemId===null||e.systemId===Q0)}function rm(e){if(e.name!==No)return Ge.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===J0)return Ge.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),em.has(n))return Ge.QUIRKS;let r=t===null?Z0:wo;if(Lo(n,r))return Ge.QUIRKS;if(r=t===null?Io:tm,Lo(n,r))return Ge.LIMITED_QUIRKS}return Ge.NO_QUIRKS}const Oo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},am="definitionurl",im="definitionURL",sm=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])),om=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),um=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])),lm=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function cm(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===_t.COLOR||r===_t.SIZE||r===_t.FACE)||lm.has(t)}function Do(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===am){e.attrs[t].name=im;break}}function Po(e){for(let t=0;t<e.attrs.length;t++){const n=sm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ba(e){for(let t=0;t<e.attrs.length;t++){const n=om.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 dm(e){const t=um.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=$t(e.tagName))}function fm(e,t){return t===W.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function pm(e,t,n){if(t===W.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===_t.ENCODING){const a=n[r].value.toLowerCase();return a===Oo.TEXT_HTML||a===Oo.APPLICATION_XML}}return t===W.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function hm(e,t,n,r){return(!r||r===W.HTML)&&pm(e,t,n)||(!r||r===W.MATHML)&&fm(e,t)}const mm="hidden",gm=8,Em=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 bm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Mo=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),Bo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gt,onParseError:null};class Ro{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={...Bo,...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 q0(this.options,this),this.activeFormattingElements=new K0(this.treeAdapter),this.fragmentContextID=r?$t(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new X0(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={...Bo,...n};t??(t=r.treeAdapter.createElement(q.TEMPLATE,W.HTML,[]));const a=r.treeAdapter.createElement("documentmock",W.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===d.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:bm,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)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.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=Ce.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)===q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ce.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.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(q.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.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:o,endCol:l,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:m})}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===oe.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===d.SVG&&this.treeAdapter.getTagName(n)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case oe.CHARACTER:{this.onCharacter(t);break}case oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case oe.COMMENT:{this.onComment(t);break}case oe.DOCTYPE:{this.onDoctype(t);break}case oe.START_TAG:{this._processStartTag(t);break}case oe.END_TAG:{this.onEndTag(t);break}case oe.EOF:{this.onEof(t);break}case oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return hm(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===tt.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(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=F.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=F.IN_TABLE;return}case d.BODY:{this.insertionMode=F.IN_BODY;return}case d.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case d.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===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return Mo.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 d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.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 F0[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){jg(this,t);return}switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{Ho(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:{Ca(this,t);break}case F.IN_TABLE_TEXT:{Wo(this,t);break}case F.IN_COLUMN_GROUP:{rr(this,t);break}case F.AFTER_BODY:{sr(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Wg(this,t);return}switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ca(this,t);break}case F.IN_COLUMN_GROUP:{rr(this,t);break}case F.AFTER_BODY:{sr(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ta(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:{Ta(this,t);break}case F.IN_TABLE_TEXT:{Tn(this,t);break}case F.AFTER_BODY:{_m(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{km(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{vm(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:{Tn(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)?Xg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{Nm(this,t);break}case F.BEFORE_HEAD:{Im(this,t);break}case F.IN_HEAD:{je(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Dm(this,t);break}case F.AFTER_HEAD:{Mm(this,t);break}case F.IN_BODY:{Ie(this,t);break}case F.IN_TABLE:{Ut(this,t);break}case F.IN_TABLE_TEXT:{Tn(this,t);break}case F.IN_CAPTION:{Lg(this,t);break}case F.IN_COLUMN_GROUP:{Sa(this,t);break}case F.IN_TABLE_BODY:{ar(this,t);break}case F.IN_ROW:{ir(this,t);break}case F.IN_CELL:{Pg(this,t);break}case F.IN_SELECT:{Ko(this,t);break}case F.IN_SELECT_IN_TABLE:{Bg(this,t);break}case F.IN_TEMPLATE:{Fg(this,t);break}case F.AFTER_BODY:{$g(this,t);break}case F.IN_FRAMESET:{Ug(this,t);break}case F.AFTER_FRAMESET:{zg(this,t);break}case F.AFTER_AFTER_BODY:{Gg(this,t);break}case F.AFTER_AFTER_FRAMESET:{Yg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Kg(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{wm(this,t);break}case F.BEFORE_HEAD:{Lm(this,t);break}case F.IN_HEAD:{Om(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Pm(this,t);break}case F.AFTER_HEAD:{Bm(this,t);break}case F.IN_BODY:{nr(this,t);break}case F.TEXT:{xg(this,t);break}case F.IN_TABLE:{bn(this,t);break}case F.IN_TABLE_TEXT:{Tn(this,t);break}case F.IN_CAPTION:{Og(this,t);break}case F.IN_COLUMN_GROUP:{Dg(this,t);break}case F.IN_TABLE_BODY:{Aa(this,t);break}case F.IN_ROW:{Xo(this,t);break}case F.IN_CELL:{Mg(this,t);break}case F.IN_SELECT:{Qo(this,t);break}case F.IN_SELECT_IN_TABLE:{Rg(this,t);break}case F.IN_TEMPLATE:{Hg(this,t);break}case F.AFTER_BODY:{Zo(this,t);break}case F.IN_FRAMESET:{qg(this,t);break}case F.AFTER_FRAMESET:{Vg(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(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:{Go(this,t);break}case F.TEXT:{Cg(this,t);break}case F.IN_TABLE_TEXT:{Tn(this,t);break}case F.IN_TEMPLATE:{Jo(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:{xa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.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:{Fo(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ca(this,t);break}case F.IN_TABLE_TEXT:{Yo(this,t);break}}}}function ym(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):Vo(e,t),n}function Tm(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 xm(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 u=e.activeFormattingElements.getElementEntry(s),o=u&&i>=Em;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Cm(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Cm(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 Sm(e,t,n){const r=e.treeAdapter.getTagName(t),a=$t(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===d.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Am(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 ya(e,t){for(let n=0;n<gm;n++){const r=ym(e,t);if(!r)break;const a=Tm(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=xm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&Sm(e,s,i),Am(e,a,r)}}function Ta(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _m(e,t){e._appendCommentNode(t,e.openElements.items[0])}function km(e,t){e._appendCommentNode(t,e.document)}function xa(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 vm(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ge.QUIRKS:rm(t);nm(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function fn(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ge.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function Nm(e,t){t.tagID===d.HTML?(e._insertElement(t,W.HTML),e.insertionMode=F.BEFORE_HEAD):pn(e,t)}function wm(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&pn(e,t)}function pn(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function Im(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:hn(e,t)}}function Lm(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?hn(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function hn(e,t){e._insertFakeElement(q.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function je(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ce.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ce.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ce.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ce.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case d.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:mn(e,t)}}function Om(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{mn(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function kt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function mn(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function Dm(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{je(e,t);break}case d.NOSCRIPT:{e._err(t,G.nestedNoscriptInHead);break}default:gn(e,t)}}function Pm(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case d.BR:{gn(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function gn(e,t){const n=t.type===oe.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function Mm(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),je(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:En(e,t)}}function Bm(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{En(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function En(e,t){e._insertFakeElement(q.BODY,d.BODY),e.insertionMode=F.IN_BODY,tr(e,t)}function tr(e,t){switch(t.type){case oe.CHARACTER:{Ho(e,t);break}case oe.WHITESPACE_CHARACTER:{Fo(e,t);break}case oe.COMMENT:{Ta(e,t);break}case oe.START_TAG:{Ie(e,t);break}case oe.END_TAG:{nr(e,t);break}case oe.EOF:{Go(e,t);break}}}function Fo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ho(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Rm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Fm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Hm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET)}function $m(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Um(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ga.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function qm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function Vm(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===d.LI&&a===d.LI||(n===d.DD||n===d.DT)&&(a===d.DD||a===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==d.ADDRESS&&a!==d.DIV&&a!==d.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Gm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ce.PLAINTEXT}function Ym(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function Wm(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(ya(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Xm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(ya(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Km(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qm(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ge.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function $o(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Uo(e){const t=yo(e,_t.TYPE);return t!=null&&t.toLowerCase()===mm}function Jm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Uo(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Zm(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function eg(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tg(e,t){t.tagName=q.IMG,t.tagID=d.IMG,$o(e,t)}function ng(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ce.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function rg(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function ag(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function qo(e,t){e._switchToTextParsing(t,Ce.RAWTEXT)}function ig(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.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 sg(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function og(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function ug(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,W.HTML)}function lg(e,t){e._reconstructActiveFormattingElements(),Do(t),ba(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function cg(e,t){e._reconstructActiveFormattingElements(),Po(t),ba(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function zo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Ie(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{jm(e,t);break}case d.A:{Wm(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{Um(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{$m(e,t);break}case d.LI:case d.DD:case d.DT:{Vm(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{$o(e,t);break}case d.HR:{eg(e,t);break}case d.RB:case d.RTC:{og(e,t);break}case d.RT:case d.RP:{ug(e,t);break}case d.PRE:case d.LISTING:{qm(e,t);break}case d.XMP:{rg(e,t);break}case d.SVG:{cg(e,t);break}case d.HTML:{Rm(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{je(e,t);break}case d.BODY:{Fm(e,t);break}case d.FORM:{zm(e,t);break}case d.NOBR:{Xm(e,t);break}case d.MATH:{lg(e,t);break}case d.TABLE:{Qm(e,t);break}case d.INPUT:{Jm(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{Zm(e,t);break}case d.IMAGE:{tg(e,t);break}case d.BUTTON:{Ym(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{Km(e,t);break}case d.IFRAME:{ag(e,t);break}case d.SELECT:{ig(e,t);break}case d.OPTION:case d.OPTGROUP:{sg(e,t);break}case d.NOEMBED:case d.NOFRAMES:{qo(e,t);break}case d.FRAMESET:{Hm(e,t);break}case d.TEXTAREA:{ng(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?qo(e,t):zo(e,t);break}case d.PLAINTEXT:{Gm(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:zo(e,t)}}function dg(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fg(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,Zo(e,t))}function pg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function hg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function mg(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(q.P,d.P),e._closePElement()}function gg(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function Eg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function bg(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function yg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Tg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Vo(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!==d.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 nr(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{ya(e,t);break}case d.P:{mg(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{pg(e,t);break}case d.LI:{gg(e);break}case d.DD:case d.DT:{Eg(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{bg(e);break}case d.BR:{Tg(e);break}case d.BODY:{dg(e,t);break}case d.HTML:{fg(e,t);break}case d.FORM:{hg(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{yg(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:Vo(e,t)}}function Go(e,t){e.tmplInsertionModeStack.length>0?Jo(e,t):xa(e,t)}function xg(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Cg(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ca(e,t){if(e.openElements.currentTagId!==void 0&&Mo.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 oe.CHARACTER:{Wo(e,t);break}case oe.WHITESPACE_CHARACTER:{Yo(e,t);break}}else yn(e,t)}function Sg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CAPTION}function Ag(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function _g(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,d.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,Sa(e,t)}function kg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_TABLE_BODY}function vg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,d.TBODY),e.insertionMode=F.IN_TABLE_BODY,ar(e,t)}function Ng(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wg(e,t){Uo(t)?e._appendElement(t,W.HTML):yn(e,t),t.ackSelfClosing=!0}function Ig(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ut(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{vg(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{je(e,t);break}case d.COL:{_g(e,t);break}case d.FORM:{Ig(e,t);break}case d.TABLE:{Ng(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{kg(e,t);break}case d.INPUT:{wg(e,t);break}case d.CAPTION:{Sg(e,t);break}case d.COLGROUP:{Ag(e,t);break}default:yn(e,t)}}function bn(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{kt(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:yn(e,t)}}function yn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,tr(e,t),e.fosterParentingEnabled=n}function Yo(e,t){e.pendingCharacterTokens.push(t)}function Wo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)yn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const jo=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function Lg(e,t){const n=t.tagID;jo.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Ut(e,t)):Ie(e,t)}function Og(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===d.TABLE&&bn(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:nr(e,t)}}function Sa(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{je(e,t);break}default:rr(e,t)}}function Dg(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TEMPLATE:{kt(e,t);break}case d.COL:break;default:rr(e,t)}}function rr(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function ar(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,d.TR),e.insertionMode=F.IN_ROW,ir(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Ut(e,t));break}default:Ut(e,t)}}function Aa(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,bn(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:bn(e,t)}}function ir(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,ar(e,t));break}default:Ut(e,t)}}function Xo(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Aa(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Aa(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:bn(e,t)}}function Pg(e,t){const n=t.tagID;jo.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),ir(e,t)):Ie(e,t)}function Mg(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xo(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:nr(e,t)}}function Ko(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{je(e,t);break}}}function Qo(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{kt(e,t);break}}}function Bg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ko(e,t)}function Rg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Qo(e,t)}function Fg(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{je(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Ut(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,Sa(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,ar(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,ir(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Ie(e,t)}}function Hg(e,t){t.tagID===d.TEMPLATE&&kt(e,t)}function Jo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xa(e,t)}function $g(e,t){t.tagID===d.HTML?Ie(e,t):sr(e,t)}function Zo(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.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 sr(e,t)}function sr(e,t){e.insertionMode=F.IN_BODY,tr(e,t)}function Ug(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.FRAMESET:{e._insertElement(t,W.HTML);break}case d.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{je(e,t);break}}}function qg(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function zg(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.NOFRAMES:{je(e,t);break}}}function Vg(e,t){t.tagID===d.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function Gg(e,t){t.tagID===d.HTML?Ie(e,t):or(e,t)}function or(e,t){e.insertionMode=F.IN_BODY,tr(e,t)}function Yg(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.NOFRAMES:{je(e,t);break}}}function Wg(e,t){t.chars=ye,e._insertCharacters(t)}function jg(e,t){e._insertCharacters(t),e.framesetOk=!1}function eu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Xg(e,t){if(cm(t))eu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?Do(t):r===W.SVG&&(dm(t),Po(t)),ba(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Kg(e,t){if(t.tagID===d.P||t.tagID===d.BR){eu(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)===W.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const Qg=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Jg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function nu(e,t){const n=uE(e),r=ho("type",{handlers:{root:Zg,element:eE,text:tE,comment:au,doctype:nE,raw:aE},unknown:iE}),a={parser:n?new Ro(tu):Ro.getFragmentParser(void 0,tu),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),qt(a,Qe());const i=n?a.parser.document:a.parser.getFragment(),s=l0(i,{file:a.options.file});return a.stitches&&Kn(s,"comment",function(u,o,l){const m=u;if(m.value.stitch&&l&&o!==void 0){const p=l.children;return p[o]=m.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function ru(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Zg(e,t){ru(e.children,t)}function eE(e,t){sE(e,t),ru(e.children,t),oE(e,t)}function tE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:oe.CHARACTER,chars:e.value,location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function nE(e,t){const n={type:oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function rE(e,t){t.stitches=!0;const n=lE(e);if("children"in e&&"children"in n){const r=nu({type:"root",children:e.children},t.options);n.children=r.children}au({type:"comment",value:{stitch:n}},t)}function au(e,t){const n=e.value,r={type:oe.COMMENT,data:n,location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function aE(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,iu(t,Qe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qg,"&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 iE(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))rE(n,t);else{let r="";throw Jg.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 qt(e,t){iu(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=Ce.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 iu(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 sE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ce.PLAINTEXT)return;qt(t,Qe(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:At.html;a===At.html&&n==="svg"&&(a=At.svg);const i=h0({...e,children:[]},{space:a===At.svg?"svg":"html"}),s={type:oe.START_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:xn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function oE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&C0.includes(n)||t.parser.tokenizer.state===Ce.PLAINTEXT)return;qt(t,qn(e));const r={type:oe.END_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ce.RCDATA||t.parser.tokenizer.state===Ce.RAWTEXT||t.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ce.DATA)}function uE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xn(e){const t=Qe(e)||{line:void 0,column:void 0,offset:void 0},n=qn(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 lE(e){return"children"in e?St({...e,children:[]}):St(e)}function _a(e){return function(t,n){return nu(t,{...e,file:n})}}const vt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vt],h2:[["className","sr-only"]],img:[...vt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vt],table:[...vt],ul:[...vt,["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"]},Et={}.hasOwnProperty;function cE(e,t){let n={type:"root",children:[]};const r={schema:t?{...zt,...t}:zt,stack:[]},a=su(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function su(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return dE(e,n);case"doctype":return fE(e,n);case"element":return pE(e,n);case"root":return hE(e,n);case"text":return mE(e,n)}}}function dE(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 Cn(i,t),i}}function fE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function pE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ou(e,t.children),a=gE(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&&Et.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(i=!1;++o<u.length;)e.stack.includes(u[o])&&(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 Cn(s,t),s}function hE(e,t){const r={type:"root",children:ou(e,t.children)};return Cn(r,t),r}function mE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(r,t),r}function ou(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=su(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function gE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&Et.call(r,n)?r[n]:void 0,s=r&&Et.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let l;for(l in u)if(Et.call(u,l)){const m=u[l];let p=uu(e,cu(i,l),l,m);p==null&&(p=uu(e,cu(s,l),l,m)),p!=null&&(o[l]=p)}if(a&&Et.call(a,n)){const m=a[n];for(l in m)Et.call(m,l)&&!Et.call(o,l)&&(o[l]=m[l])}return o}function uu(e,t,n,r){return t?Array.isArray(r)?EE(e,t,n,r):lu(e,t,n,r):void 0}function EE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=lu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function lu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&bE(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 bE(e,t,n){const r=e.schema.protocols&&Et.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("?"),u=a.indexOf("#"),o=a.indexOf("/");if(i<0||o>-1&&i>o||s>-1&&i>s||u>-1&&i>u)return!0;let l=-1;for(;++l<r.length;){const m=r[l];if(i===m.length&&a.slice(0,m.length)===m)return!0}return!1}function Cn(e,t){const n=ns(t);t.data&&(e.data=St(t.data)),n&&(e.position=n)}function cu(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 ka(e){return function(t){return cE(t,e)}}function du(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 yE=["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"],fu={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 pu(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function TE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function xE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function hu(e){return xE(e)||pu(e)}const CE=["","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 va(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,u="",o,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,o=n.position.start):o=n.position);let m=(o?o.line:0)||1,p=(o?o.column:0)||1,E=c(),h;for(i--;++i<=e.length;)if(h===10&&(p=(l?l[s]:0)||1),h=e.charCodeAt(i),h===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){u+=String.fromCharCode(h),p++;continue}const y=i+1;let T=y,x=y,S;if(g===35){x=++T;const H=e.charCodeAt(x);H===88||H===120?(S="hexadecimal",x=++T):S="decimal"}else S="named";let A="",N="",_="";const w=S==="named"?hu:S==="decimal"?pu:TE;for(x--;++x<=e.length;){const H=e.charCodeAt(x);if(!w(H))break;_+=String.fromCharCode(H),S==="named"&&yE.includes(_)&&(A=_,N=rn(_))}let O=e.charCodeAt(x)===59;if(O){x++;const H=S==="named"?rn(_):!1;H&&(A=_,N=H)}let I=1+x-y,P="";if(!(!O&&n.nonTerminated===!1))if(!_)S!=="named"&&f(4,I);else if(S==="named"){if(O&&!N)f(5,1);else if(A!==_&&(x=T+A.length,I=1+x-T,O=!1),!O){const H=A?1:3;if(n.attribute){const v=e.charCodeAt(x);v===61?(f(H,I),N=""):hu(v)?N="":f(H,I)}else f(H,I)}P=N}else{O||f(2,I);let H=Number.parseInt(_,S==="hexadecimal"?16:10);if(SE(H))f(7,I),P="�";else if(H in fu)f(6,I),P=fu[H];else{let v="";AE(H)&&f(6,I),H>65535&&(H-=65536,v+=String.fromCharCode(H>>>10|55296),H=56320|H&1023),P=v+String.fromCharCode(H)}}if(P){b(),E=c(),i=x-1,p+=x-y+1,a.push(P);const H=c();H.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,P,{start:E,end:H},e.slice(y-1,x)),E=H}else _=e.slice(y-1,x),u+=_,p+=_.length,i=x-1}else h===10&&(m++,s++,p=0),Number.isNaN(h)?b():(u+=String.fromCharCode(h),p++);return a.join("");function c(){return{line:m,column:p,offset:i+((o?o.offset:0)||0)}}function f(g,y){let T;n.warning&&(T=c(),T.column+=y,T.offset+=y,n.warning.call(n.warningContext||void 0,CE[g],T,g))}function b(){u&&(a.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:E,end:c()}),u="")}}function SE(e){return e>=55296&&e<=57343||e>1114111}function AE(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 _E=/["&'<>`]/g,kE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,NE=/[|\\{}()[\]^$+*?.]/g,mu=new WeakMap;function wE(e,t){if(e=e.replace(t.subset?IE(t.subset):_E,r),t.subset||t.escapeOnly)return e;return e.replace(kE,n).replace(vE,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 IE(e){let t=mu.get(e);return t||(t=LE(e),mu.set(e,t)),t}function LE(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(NE,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function OE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function DE(e,t){return wE(e,Object.assign({format:OE},t))}const PE={}.hasOwnProperty,ME={},gu=/^[^\t\n\r "#'.<=>`}]+$/,BE=/^[^\t\n\r "'<=>`}]+$/;function RE(){return{canContainEols:["textDirective"],enter:{directiveContainer:HE,directiveContainerAttributes:Ia,directiveContainerLabel:qE,directiveLeaf:$E,directiveLeafAttributes:Ia,directiveText:UE,directiveTextAttributes:Ia},exit:{directiveContainer:Ba,directiveContainerAttributeClassValue:Oa,directiveContainerAttributeIdValue:La,directiveContainerAttributeName:Pa,directiveContainerAttributeValue:Da,directiveContainerAttributes:Ma,directiveContainerLabel:zE,directiveContainerName:wa,directiveLeaf:Ba,directiveLeafAttributeClassValue:Oa,directiveLeafAttributeIdValue:La,directiveLeafAttributeName:Pa,directiveLeafAttributeValue:Da,directiveLeafAttributes:Ma,directiveLeafName:wa,directiveText:Ba,directiveTextAttributeClassValue:Oa,directiveTextAttributeIdValue:La,directiveTextAttributeName:Pa,directiveTextAttributeValue:Da,directiveTextAttributes:Ma,directiveTextName:wa}}}function FE(e){const t=ME;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=VE,{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,u,o){const l=u.createTracker(o),m=GE(i),p=u.enter(i.type);let E=l.move(m+(i.name||"")),h;if(i.type==="containerDirective"){const c=(i.children||[])[0];h=Eu(c)?c:void 0}else h=i;if(h&&h.children&&h.children.length>0){const c=u.enter("label"),f=`${i.type}Label`,b=u.enter(f);E+=l.move("["),E+=l.move(u.containerPhrasing(h,{...l.current(),before:E,after:"]"})),E+=l.move("]"),b(),c()}if(E+=l.move(r(i,u)),i.type==="containerDirective"){const c=(i.children||[])[0];let f=i;Eu(c)&&(f=Object.assign({},i,{children:i.children.slice(1)})),f&&f.children&&f.children.length>0&&(E+=l.move(`
58
- `),E+=l.move(u.containerFlow(f,l.current()))),E+=l.move(`
59
- `+m)}return p(),E}function r(i,s){const u=i.attributes||{},o=[];let l,m,p,E;for(E in u)if(PE.call(u,E)&&u[E]!==void 0&&u[E]!==null){const h=String(u[E]);if(E==="id")p=t.preferShortcut!==!1&&gu.test(h)?"#"+h:a("id",h,i,s);else if(E==="class"){const c=h.split(/[\t\n\r ]+/g),f=[],b=[];let g=-1;for(;++g<c.length;)(t.preferShortcut!==!1&&gu.test(c[g])?b:f).push(c[g]);l=f.length>0?a("class",f.join(" "),i,s):"",m=b.length>0?"."+b.join("."):""}else o.push(a(E,h,i,s))}return l&&o.unshift(l),m&&o.unshift(m),p&&o.unshift(p),o.length>0?"{"+o.join(" ")+"}":""}function a(i,s,u,o){if(t.collapseEmptyAttributes!==!1&&!s)return i;if(t.preferUnquoted&&BE.test(s))return i+"="+s;const l=t.quote||o.options.quote||'"',m=l==='"'?"'":'"',p=t.quoteSmart&&du(s,l)>du(s,m)?m:l,E=u.type==="textDirective"?[p]:[p,`
60
- `,"\r"];return i+"="+p+DE(s,{subset:E})+p}}function HE(e){Na.call(this,"containerDirective",e)}function $E(e){Na.call(this,"leafDirective",e)}function UE(e){Na.call(this,"textDirective",e)}function Na(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function wa(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function qE(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function zE(e){this.exit(e)}function Ia(){this.data.directiveAttributes=[],this.buffer()}function La(e){this.data.directiveAttributes.push(["id",va(this.sliceSerialize(e),{attribute:!0})])}function Oa(e){this.data.directiveAttributes.push(["class",va(this.sliceSerialize(e),{attribute:!0})])}function Da(e){const t=this.data.directiveAttributes;t[t.length-1][1]=va(this.sliceSerialize(e),{attribute:!0})}function Pa(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ma(){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 Ba(e){this.exit(e)}function VE(){return":"}function Eu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function GE(e){let t=0;return e.type==="containerDirective"?(js(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 Ra(e,t,n,r,a,i,s,u,o,l,m,p,E,h,c){let f,b;return g;function g(C){return e.enter(r),e.enter(a),e.consume(C),e.exit(a),y}function y(C){return C===35?(f=s,T(C)):C===46?(f=u,T(C)):c&&de(C)?fe(e,y,"whitespace")(C):!c&&xe(C)?at(e,y)(C):C===null||Z(C)||sn(C)||an(C)&&C!==45&&C!==95?v(C):(e.enter(i),e.enter(o),e.consume(C),A)}function T(C){const B=f+"Marker";return e.enter(i),e.enter(f),e.enter(B),e.consume(C),e.exit(B),x}function x(C){if(C===null||C===34||C===35||C===39||C===46||C===60||C===61||C===62||C===96||C===125||xe(C))return n(C);const B=f+"Value";return e.enter(B),e.consume(C),S}function S(C){if(C===null||C===34||C===39||C===60||C===61||C===62||C===96)return n(C);if(C===35||C===46||C===125||xe(C)){const B=f+"Value";return e.exit(B),e.exit(f),e.exit(i),y(C)}return e.consume(C),S}function A(C){return C===null||Z(C)||sn(C)||an(C)&&C!==45&&C!==46&&C!==58&&C!==95?(e.exit(o),c&&de(C)?fe(e,N,"whitespace")(C):!c&&xe(C)?at(e,N)(C):N(C)):(e.consume(C),A)}function N(C){return C===61?(e.enter(l),e.consume(C),e.exit(l),_):(e.exit(i),y(C))}function _(C){return C===null||C===60||C===61||C===62||C===96||C===125||c&&Z(C)?n(C):C===34||C===39?(e.enter(m),e.enter(E),e.consume(C),e.exit(E),b=C,O):c&&de(C)?fe(e,_,"whitespace")(C):!c&&xe(C)?at(e,_)(C):(e.enter(p),e.enter(h),e.consume(C),b=void 0,w)}function w(C){return C===null||C===34||C===39||C===60||C===61||C===62||C===96?n(C):C===125||xe(C)?(e.exit(h),e.exit(p),e.exit(i),y(C)):(e.consume(C),w)}function O(C){return C===b?(e.enter(E),e.consume(C),e.exit(E),e.exit(m),e.exit(i),H):(e.enter(p),I(C))}function I(C){return C===b?(e.exit(p),O(C)):C===null?n(C):Z(C)?c?n(C):at(e,I)(C):(e.enter(h),e.consume(C),P)}function P(C){return C===b||C===null||Z(C)?(e.exit(h),I(C)):(e.consume(C),P)}function H(C){return C===125||xe(C)?y(C):v(C)}function v(C){return C===125?(e.enter(a),e.consume(C),e.exit(a),e.exit(r),t):n(C)}}function Fa(e,t,n,r,a,i,s){let u=0,o=0,l;return m;function m(b){return e.enter(r),e.enter(a),e.consume(b),e.exit(a),p}function p(b){return b===93?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(i),E(b))}function E(b){if(b===93&&!o)return f(b);const g=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=g),l=g,h(b)}function h(b){return b===null||u>999||b===91&&++o>32?n(b):b===93&&!o--?(e.exit("chunkText"),f(b)):Z(b)?s?n(b):(e.consume(b),e.exit("chunkText"),E):(e.consume(b),b===92?c:h)}function c(b){return b===91||b===92||b===93?(e.consume(b),u++,h):h(b)}function f(b){return e.exit(i),e.enter(a),e.consume(b),e.exit(a),e.exit(r),t}}function Ha(e,t,n,r){const a=this;return i;function i(u){return u===null||Z(u)||an(u)||sn(u)?n(u):(e.enter(r),e.consume(u),s)}function s(u){return u===null||Z(u)||sn(u)||an(u)&&u!==45&&u!==95?(e.exit(r),a.previous===45||a.previous===95?n(u):t(u)):(e.consume(u),s)}}const YE={tokenize:XE,concrete:!0},WE={tokenize:KE,partial:!0},jE={tokenize:QE,partial:!0},ur={tokenize:JE,partial:!0};function XE(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,u;return o;function o(w){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(w)}function l(w){return w===58?(e.consume(w),s++,l):s<3?n(w):(e.exit("directiveContainerSequence"),Ha.call(r,e,m,n,"directiveContainerName")(w))}function m(w){return w===91?e.attempt(WE,p,p)(w):p(w)}function p(w){return w===123?e.attempt(jE,E,E)(w):E(w)}function E(w){return fe(e,h,"whitespace")(w)}function h(w){return e.exit("directiveContainerFence"),w===null?N(w):Z(w)?r.interrupt?t(w):e.attempt(ur,c,N)(w):n(w)}function c(w){return w===null?N(w):Z(w)?e.check(ur,T,N)(w):(e.enter("directiveContainerContent"),f(w))}function f(w){return e.attempt({tokenize:_,partial:!0},A,i?fe(e,b,"linePrefix",i+1):b)(w)}function b(w){return w===null?A(w):Z(w)?e.check(ur,y,A)(w):y(w)}function g(w){if(w===null){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(w)}return Z(w)?e.check(ur,x,S)(w):(e.consume(w),g)}function y(w){const O=e.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=O),u=O,g(w)}function T(w){return e.enter("directiveContainerContent"),f(w)}function x(w){e.consume(w);const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,f}function S(w){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(w)}function A(w){return e.exit("directiveContainerContent"),N(w)}function N(w){return e.exit("directiveContainer"),t(w)}function _(w,O,I){let P=0;return fe(w,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function H(B){return w.enter("directiveContainerFence"),w.enter("directiveContainerSequence"),v(B)}function v(B){return B===58?(w.consume(B),P++,v):P<s?I(B):(w.exit("directiveContainerSequence"),fe(w,C,"whitespace")(B))}function C(B){return B===null||Z(B)?(w.exit("directiveContainerFence"),O(B)):I(B)}}}function KE(e,t,n){return Fa(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function QE(e,t,n){return Ra(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function JE(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 ZE={tokenize:n1},e1={tokenize:r1,partial:!0},t1={tokenize:a1,partial:!0};function n1(e,t,n){const r=this;return a;function a(m){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(m),i}function i(m){return m===58?(e.consume(m),e.exit("directiveLeafSequence"),Ha.call(r,e,s,n,"directiveLeafName")):n(m)}function s(m){return m===91?e.attempt(e1,u,u)(m):u(m)}function u(m){return m===123?e.attempt(t1,o,o)(m):o(m)}function o(m){return fe(e,l,"whitespace")(m)}function l(m){return m===null||Z(m)?(e.exit("directiveLeaf"),t(m)):n(m)}}function r1(e,t,n){return Fa(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function a1(e,t,n){return Ra(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const i1={tokenize:l1,previous:u1},s1={tokenize:c1,partial:!0},o1={tokenize:d1,partial:!0};function u1(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function l1(e,t,n){const r=this;return a;function a(o){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(o),e.exit("directiveTextMarker"),Ha.call(r,e,i,n,"directiveTextName")}function i(o){return o===58?n(o):o===91?e.attempt(s1,s,s)(o):s(o)}function s(o){return o===123?e.attempt(o1,u,u)(o):u(o)}function u(o){return e.exit("directiveText"),t(o)}}function c1(e,t,n){return Fa(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function d1(e,t,n){return Ra(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function f1(){return{text:{58:i1},flow:{58:[YE,ZE]}}}function $a(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(f1()),r.push(RE()),a.push(FE())}const Ua={...zt,attributes:{...zt.attributes||{},span:[...(zt.attributes||{}).span||[],"style"],font:[...(zt.attributes||{}).font||[],"color"]}},qa=()=>e=>{Kn(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",u=r.bold,l=`${u===!0||u==="true"||u===1||u==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},p1=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}}},h1=({config:e,files:t,debugTooltipSticky:n=!1})=>{const[r,a]=D.useState(null),[i,s]=D.useState(!1),u=D.useRef(null),o=D.useRef(null),l=D.useRef(null),m=200,p=200,E=D.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),o.current&&(window.clearTimeout(o.current),o.current=null),l.current!==null&&(window.cancelAnimationFrame(l.current),l.current=null)},[]),h=D.useCallback(()=>{E(),s(!0)},[E]),c=D.useCallback(O=>{if(E(),O){a(O),s(!1),l.current=window.requestAnimationFrame(()=>{l.current=null,s(!0)});return}u.current=window.setTimeout(()=>{u.current=null,s(!1),o.current=window.setTimeout(()=>{a(null),o.current=null},p)},m)},[E]);D.useEffect(()=>()=>{E()},[E]);const[f,b]=D.useState(0),g=D.useRef(null),[y,T]=D.useState(!1),x=D.useRef(new Map),[S,A]=D.useState(357),[N,_]=D.useState("bottom");return D.useEffect(()=>{b(0),T(!1),_("bottom")},[r?.key,r?.type]),D.useEffect(()=>{const O=x.current,I=new Set,P=H=>{if(!H||I.has(H)||O.has(H))return;I.add(H);const v=new window.Image;v.decoding="async",v.onload=()=>{const C=v.naturalWidth||v.width||0,B=v.naturalHeight||v.height||0;C>0&&B>0&&O.set(H,`${C} / ${B}`)},v.src=H};e.forEach(H=>{const v=H.tooltip;if(!v)return;const B=typeof v=="string"?(()=>{try{return JSON.parse(v)}catch{return null}})():v;if(!B||B.type!=="steps")return;const $=B.images;Array.isArray($)&&$.forEach(U=>{typeof U=="string"&&P(U)})})},[e]),D.useLayoutEffect(()=>{if(!i)return;if(r?.type!=="upload"&&r?.type!=="tag"&&r?.type!=="variable"){A(null);return}const O=requestAnimationFrame(()=>{const I=document.querySelector(".rte-steps-tooltip"),P=document.querySelector(".rte-steps-tooltip-title"),H=document.querySelector(".rte-steps-tooltip-step-badge");if(!I||!P||!H)return;const v=window.getComputedStyle(I),C=Number.parseFloat(v.paddingLeft)||0,B=Number.parseFloat(v.paddingRight)||0,$=Math.ceil(P.getBoundingClientRect().width||0),U=Math.ceil(H.getBoundingClientRect().width||0),k=$+16+U+Math.ceil(C+B),j=357,J=Math.max(240,Math.floor(window.innerWidth-32));A(Math.min(Math.max(k,j),J));const R=r?.anchorEl;if(R){const te=R.getBoundingClientRect(),ce=I.getBoundingClientRect(),ne=Math.ceil(ce.height||0),ee=Math.max(0,Math.floor(window.innerHeight-te.bottom)),pe=Math.max(0,Math.floor(te.top)),ge=ee<ne+12&&pe>ee;_(ge?"top":"bottom")}});return()=>cancelAnimationFrame(O)},[i,r?.key,r?.type,f,r?.anchorEl]),D.useEffect(()=>{if(!n)return;const O=I=>{I.key==="Escape"&&c(null)};return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[n,c]),{tooltipPortal:r?.anchorEl?(()=>{if(!document.body.contains(r.anchorEl))return null;let O="",I={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},P=!1;const H=B=>{const $=p1(B);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const U=$.data,V=Math.max(0,U.images?.length||0);if(V<=0)return{node:U.title,steps:!1};const k=Math.min(Math.max(f,0),V-1),j=Array.isArray(U.stepDescriptions)&&U.stepDescriptions[k]||"",J=(U.disclaimer||"").trim(),R=Array.isArray(U.images)?U.images[k]:void 0,te=typeof R=="string"?x.current.get(R):void 0;return{node:z.jsxs("div",{className:"rte-steps-tooltip",style:S?{width:`${S}px`}:void 0,onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:ne=>{ne.preventDefault(),ne.stopPropagation()},children:[z.jsxs("div",{className:"rte-steps-tooltip-header",children:[z.jsx("div",{className:"rte-steps-tooltip-title",children:U.title}),z.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",k+1,"/",V]})]}),U.description?z.jsx("div",{className:"rte-steps-tooltip-desc",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:U.description})}):null,z.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:z.jsx(se.Image.PreviewGroup,{preview:{visible:y,current:k,onVisibleChange:ne=>T(ne),onChange:ne=>{const ee=Math.min(Math.max(ne,0),V-1);b(ee),g.current?.slideTo(ee)}},children:z.jsx(Oi,{className:"rte-steps-tooltip-swiper",modules:[jc,Xc],navigation:!0,pagination:{clickable:!0},initialSlide:k,onSwiper:ne=>{g.current=ne},onSlideChange:ne=>b(ne.activeIndex),children:U.images.map((ne,ee)=>z.jsx(Di,{children:z.jsx(se.Image,{className:"rte-steps-tooltip-img",src:ne,alt:`step-${ee+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{b(ee),g.current?.slideTo(ee),T(!0)}})},`${ne}-${ee}`))},`${r.key}-${r.type}`)})}),z.jsx("div",{className:"rte-steps-tooltip-footer",children:z.jsx("div",{className:"rte-steps-tooltip-step-text",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:j})})}),J?z.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[z.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),z.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:J})})]}):null]}),steps:!0}};if(r.type==="upload"){const B=r.anchorEl.dataset.tooltip,$=H(B);if($)O=$.node,P=$.steps;else{const U=e.find(k=>k.type==="upload"&&k.key===r.key),V=H(typeof U?.tooltip=="string"?U?.tooltip:U?.tooltip?JSON.stringify(U.tooltip):"");O=V?.node||"",P=V?.steps||!1}}else if(r.type==="tag"){const B=r.anchorEl.dataset.tooltip,$=H(B);O=$?.node||"",P=$?.steps||!1}else if(r.type==="upload-label")O=r.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||r.anchorEl.dataset.fileName||"";else if(r.type==="variable"){const B=r.anchorEl.dataset.tooltip,$=H(B);O=$?.node||"",P=$?.steps||!1}else if(r.type==="upload-preview"){const B=t[r.key];let $=null,U=!1;typeof B=="string"?$=B:B instanceof File&&(B.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(B.name||""))&&($=URL.createObjectURL(B),U=!0),$?(O=z.jsx("div",{className:"rte-upload-preview",children:z.jsx("img",{className:"rte-upload-preview-img",src:$,alt:"preview"})}),I={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},U&&setTimeout(()=>URL.revokeObjectURL($),1e3)):O=""}if(!O)return null;P&&(I={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const v="#0A0A0A",C=N;return Ln.createPortal(z.jsx(se.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!P,align:P?{points:C==="top"?["bc","tc"]:["tc","bc"],offset:C==="top"?[0,-4]:[0,4]}:void 0,title:r.type==="upload-preview"?z.jsx("div",{onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:B=>{B.preventDefault(),B.stopPropagation()},children:O}):P?O:z.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:v},onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:B=>{B.preventDefault(),B.stopPropagation()},children:O}),open:i,placement:P?C==="top"?"top":"bottom":r.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:I,overlayClassName:"rte-tooltip-overlay",children:z.jsx("div",{style:{position:"fixed",left:`${r.anchorEl.getBoundingClientRect().left}px`,top:`${r.anchorEl.getBoundingClientRect().top-(r.type==="upload-label"?4:0)}px`,width:`${r.anchorEl.offsetWidth}px`,height:`${r.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:c}},m1=(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=Xe(e.tooltip),s=i?` data-tooltip="${le(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>`},g1=(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>`},E1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,bu=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Xe(e.tooltip),s=i?` data-tooltip="${le(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const E=r?encodeURIComponent(r):"",h=le(e.placeholder||""),c=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',f=On(r||e.placeholder||""),b=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="${h}" data-estimated-width="${Math.min(600,f+b)}"${c}${a}${s} class="rte-variable-host-v2"></span>`}const u=!r,o=u?"​":le(r).replace(/\n/g,"<br/>"),l=u?"show-placeholder":"",m=i&&u?"rte-variable-with-icon":"",p=i&&u?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${m?` ${m}`:""}">${o}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}</span>`},b1=(e,t)=>{const n=bu(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${E1}${n}</span>`:n},yu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,y1=e=>/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(e);function za(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=y1(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=nl(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 T1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Xe(e.tooltip),a=r?` data-tooltip="${le(r)}"`:"",{hasFile:i,fileName:s,uploadIcon:u}=za(t[e.key],e.text),o=i?"":"hidden",l=r&&!i?"":"hidden",m=i?"has-file":"",p=i&&s?` data-file-name="${s.replace(/"/g,"&quot;")}"`:"",E=(e.text||"").trim(),c=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 ${m}"><span class="upload-icon">${u}</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="${le(r)}" ></i>`:""}<span class="file-remove-btn ${o}" title="移除文件">×</span></span></span>`,hintHtml:c}},x1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const y=Xe(e.tooltip),T=y?` data-tooltip="${le(y)}"`:"",x=e.minCount||1,S=e.maxCount||3;let A=0;for(let O=0;O<S;O++){const I=`${e.key}-${O}`;t[I]!=null&&(A+=1)}const N=Math.min(S,Math.max(x,A+(A<S?1:0)));let _="";for(let O=0;O<N;O++){const I=`${e.key}-${O}`,{hasFile:P,fileName:H,uploadIcon:v}=za(t[I],e.text),C=P?"":"hidden",B=y&&!P?"":"hidden",$=P?"has-file":"",U=P&&H?` data-file-name="${H.replace(/"/g,"&quot;")}"`:"",V=` data-batch-key="${e.key}"`,k=` data-batch-index="${O}"`,j=`<span contenteditable="false" data-type="upload" data-key="${I}"${V}${k}${T} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${$}"><span class="upload-icon">${v}</span><span class="upload-label"${U}>${H||e.text}</span>${y?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${I}" data-tooltip="${le(y)}" ></i>`:""}<span class="file-remove-btn ${C}" title="移除文件">×</span></span></span>`;_+=j}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${yu}<span class="rte-upload-batch-chips">${_}${n}</span></span>`:`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-upload-batch-chips">${_}${n}</span>`}const i=Xe(e.tooltip),s=i?` data-tooltip="${le(i)}"`:"",{hasFile:u,fileName:o,uploadIcon:l}=za(t[e.key],e.text),m=u?"":"hidden",p=i&&!u?"":"hidden",E=u?"has-file":"",h=u&&o?` data-file-name="${o.replace(/"/g,"&quot;")}"`:"",c=(e.text||"").trim(),b=u&&e.showHint===!0&&c.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</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"${h}>${o||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="${le(i)}" ></i>`:""}<span class="file-remove-btn ${m}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${yu}${g}${n}</span>${b}`:g+n+b},C1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,S1=(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"':"",u=`<div data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${C1}${u}</span>`:u},A1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,_1=(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>`,u=`<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">${A1}${u}</span>`:u},k1=(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),u=e.placeholder?` data-placeholder="${e.placeholder}"`:"",o=e.expandable!==!1,l=r,m=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${u} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,p=o?`<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${o?" rte-richtext-toggleable":""}" data-key="${e.key}">${m}${p}</div>`,h=`<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">${h}</div>`:h},v1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,N1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Xe(e.tooltip),E=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",h=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-report-url ${l}${h?` ${h}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${v1}${f}</span>`:f},w1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,I1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Xe(e.tooltip),E=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",h=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-markdown-name ${l}${h?` ${h}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${w1}${f}</span>`:f},L1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,O1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=e.sourceTextKey?` data-source-text-key="${le(e.sourceTextKey)}"`:"",E=Xe(e.tooltip),h=E?` data-tooltip="${le(E)}" data-variable-key="${e.key||""}"`:"",c=E&&u?"rte-variable-with-icon":"",f=E&&u?"":"hidden",b=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${le(e.placeholder||"")}"${m}${p}${h} class="variable-chip rte-markdown-input ${l}${c?` ${c}`:""}">${o}${E?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${f}" data-variable-key="${e.key}" data-tooltip="${le(E)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${L1}${b}</span>`:b},D1=(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,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=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:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`,h=`<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">${h}</div>`:h},P1=(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,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,p=`<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} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${p}</div>`,h=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},M1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,B1=(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">${M1}${s}</span>`:s},R1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,F1=(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?le(e.placeholder):"",s=i?` placeholder="${i}"`:"",u=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",o=n||e.placeholder||"",l=On(o),m=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${le(n)}" style="width: ${l}px;"${r}${a}${s}${u} />`,E=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${m}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${R1}${E}</span>`:E},H1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,$1=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const o=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Xe(e.tooltip);let m="";for(let p=0;p<i;p++){const E=`${e.key}_${p}`,h=t[E]||"",c=!h,f=c?"​":le(h).replace(/\n/g,"<br/>"),b=c?"show-placeholder":"",g=l&&c?"rte-variable-with-icon":"",y=l?` data-tooltip="${le(l)}" data-variable-key="${e.key||""}"`:"",T=l&&c?"":"hidden",x=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",S=`<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder||""}"${x}${y} class="variable-chip ${b}${g?` ${g}`:""}">${f}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${T}" data-variable-key="${e.key}" data-tooltip="${le(l)}" ></i>`:""}</span>`;p===0?m+=`<span ${o} class="exclusion-wrapper required-upload-group required-multi-first">${H1}${S}</span>`:m+=S}return m}const s=Xe(e.tooltip);let u="";for(let o=0;o<i;o++){const l=`${e.key}_${o}`,m=t[l]||"",p=!m,E=p?"​":le(m).replace(/\n/g,"<br/>"),h=p?"show-placeholder":"",c=s&&p?"rte-variable-with-icon":"",f=s?` data-tooltip="${le(s)}" data-variable-key="${e.key||""}"`:"",b=s&&p?"":"hidden",g=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",y=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${o}" data-placeholder="${e.placeholder||""}"${g}${f} class="variable-chip ${h}${c?` ${c}`:""}">${E}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${b}" data-variable-key="${e.key}" data-tooltip="${le(s)}" ></i>`:""}</span>`;u+=y}return u};function U1(e,t,n,r,a,i={},s,u){if(!e.current)return;const o=/[;;,,。.!!??::、]/,l=c=>{const f=(c??"").trim();return f.length===1&&o.test(f)},m=c=>{const f=c??"",b=f.match(new RegExp(`^\\s*(${o.source})`));if(!b)return null;const g=b[1],y=f.replace(new RegExp(`^\\s*${o.source}`),"");return{punct:g,rest:y}},p=c=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${c}</span>`,E=[];let h=0;for(;h<t.length;){const c=t[h],f=h+1<t.length?t[h+1]:null;let b=!1;if(c.type==="text"&&(c.text?.includes("icon-bitian")||c.className==="rte-text-required")&&f){const N=f.type==="upload"&&f.exclusionGroup==="fileInput"&&c.exclusionGroup==="fileInput"&&c.exclusionGroup===f.exclusionGroup,_=f.type==="variable"&&f.exclusionGroup==="textInput"&&c.exclusionGroup==="textInput"&&c.exclusionGroup===f.exclusionGroup;if(N){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,I="</span>";let P="";c.className?P=`<span class="${c.className}">${c.text??""}</span>`:P=c.text??"";const H=f,{uploadHtml:v,hintHtml:C}=T1(H,n);E.push(O+P+v+I+C),h+=2;continue}if(_){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,I="</span>";let P="";c.className?P=`<span class="${c.className}">${c.text??""}</span>`:P=c.text??"";const v=bu(f,a);E.push(O+P+v+I),h+=2;continue}}const y=c.exclusionGroup?`data-group="${c.exclusionGroup}"`:"",T=c.exclusionGroup?`<span ${y} class="exclusion-wrapper">`:"",x=c.exclusionGroup?"</span>":"";let S="";if(c.type==="tag")S=m1(c,{lockStructure:r,hideButtons:s});else if(c.type==="text")S=g1(c,r);else if(c.type==="variable"&&c.key)S=b1(c,a);else if(c.type==="report-url"&&c.key)S=N1(c,a);else if(c.type==="markdown-name"&&c.key)S=I1(c,a);else if(c.type==="markdown"&&c.key)S=O1(c,a);else if(c.type==="upload"&&c.key){const N=!!f&&f.type==="text"&&!f.className&&!f.exclusionGroup&&l(f.text),_=N?(f.text??"").trim():"",w=_?p(_):"";N&&(b=!0),S=x1(c,n,w)}else c.type==="select"&&c.key?S=S1(c,a):c.type==="textarea"&&c.key?S=_1(c,a):c.type==="richtext"&&c.key?S=k1(c,a):c.type==="report-module"&&c.key?S=D1(c,a):c.type==="markdown-module"&&c.key?S=P1(c,a):c.type==="datepicker"&&c.key?S=B1(c,a):c.type==="number-input"&&c.key?S=F1(c,a):c.type==="multi-variable"&&c.key&&(S=$1(c,a,i));const A=T+S+x;if(c.type==="text"&&!c.className&&!c.exclusionGroup){if(l(c.text)&&E.length>0){const _=E[E.length-1],w=(c.text??"").trim();E[E.length-1]=`<span class="rte-inline-group">${_}${p(w)}</span>`,h++;continue}const N=m(c.text);if(N&&E.length>0){const _=E[E.length-1];E[E.length-1]=`<span class="rte-inline-group">${_}${p(N.punct)}</span>`;const w=N.rest;if(w){const O=w.replace(/\n/g,"<br/>");E.push(`<span data-type="text" contenteditable="false">${O}</span>`)}h++;continue}}E.push(A),h+=b?2:1}e.current&&(e.current.innerHTML=E.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(f=>{if(f.dataset.variableRender==="antd-textarea")return;if(f.innerText.replace(/\n/g,"").replace(/\u200B/g,""))f.classList.remove("show-placeholder");else{const y=Array.from(f.childNodes),T=f.querySelector(".variable-info-icon");y.forEach(S=>{if(S.nodeType===Node.TEXT_NODE){f.removeChild(S);return}S.nodeType===Node.ELEMENT_NODE&&S.tagName==="BR"&&f.removeChild(S)});const x=document.createTextNode("​");T&&T.parentNode===f?f.insertBefore(x,T):f.firstChild?f.insertBefore(x,f.firstChild):f.appendChild(x),f.classList.add("show-placeholder")}})},0))}function q1(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const f=c.getAttribute("data-node-type")||"";if(f!=="report-module"&&f!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let y=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){y=S;break}return g.filter((S,A)=>A!==y).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
61
- `).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const f=t[c];if((f.type==="variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"||f.type==="upload"||f.type==="multi-variable"||f.type==="select"||f.type==="textarea"||f.type==="richtext"||f.type==="report-module"||f.type==="markdown-module"||f.type==="datepicker"||f.type==="number-input")&&f.required&&f.key){s.push({exclusionGroup:f.exclusionGroup||"",key:f.key,type:f.type==="multi-variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"?"variable":f.type==="report-module"||f.type==="markdown-module"?"richtext":f.type,isMultiVariable:f.type==="multi-variable",minCount:f.type==="multi-variable"||f.type==="upload"&&typeof f.minCount=="number"?f.minCount:void 0,moduleIndex:f.type==="report-module"||f.type==="markdown-module"?f.moduleIndex:void 0,__index:c});continue}if(f.type==="text"&&f.className?.includes("rte-text-required"))if(f.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===f.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:f.exclusionGroup,key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((f,b)=>{f.exclusionGroup==="separator"&&c.push(b)});for(const f of c){const g=s.filter(x=>typeof x.__index=="number"&&x.__index<f).sort((x,S)=>(S.__index??0)-(x.__index??0))[0],T=s.filter(x=>typeof x.__index=="number"&&x.__index>f).sort((x,S)=>(x.__index??0)-(S.__index??0))[0];g&&T&&o.push([g,T])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const f=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(f.length>0){const b=f[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const f=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(f.length>0){const b=f[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(f=>{f.key&&m.add(f.key)})});const p=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const f=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const y=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(y.length>0){const T=y[0];return i(T)?!0:T.style.display!=="none"}}return!0});if(f.length===0)continue;let b=!1;for(const g of f)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let y=0;const T=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(T.length===0)continue;for(let x=0;x<T.length;x++){const A=T[x].dataset.key;A&&n[A]!=null&&(y+=1)}if(y>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const y=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let T=0;for(const S of Array.from(y)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(T+=1)}const x=g.minCount&&g.minCount>0?g.minCount:1;if(T>=x){b=!0;break}}else{const y=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(y){if(y.classList.contains("show-placeholder"))continue;if(y.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const y=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(y&&(y.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const y=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(y&&(y.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const y=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,T=e.current.querySelector(y);if(T&&a(T).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const y=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(y&&(y.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const y=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(y&&(y.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of p)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let f=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const T=b[g].dataset.key;T&&n[T]!=null&&(f+=1)}if(f<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const y of Array.from(f)){if(y.classList.contains("show-placeholder"))continue;y.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!f){h=!1;break}if(f.classList.contains("show-placeholder")){h=!1;break}if(f.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}r(E&&h)}function z1(e,t,n,r,a={},i,s,u,o,l){const m=D.useRef(new Set),p=D.useRef(t),E=D.useCallback(()=>{if(!e.current)return;if(t.length===0){e.current.innerHTML="";return}p.current!==t&&(m.current=new Set,p.current=t);let h={};const c=new Set;e.current&&e.current.querySelectorAll('[data-type="variable"]').forEach(y=>{const T=y.dataset.key;if(!T)return;let x="";if(y.dataset.variableRender==="antd-textarea"){const S=(y.getAttribute("data-value")||"").trim();try{x=S?decodeURIComponent(S).replace(/\r\n/g,`
62
- `).trim():""}catch{x=S.trim()}}else{const S=(y.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
63
- `);x=S.replace(/\n/g,"").trim().length>0?S:""}if(x)m.current.add(T);else if(m.current.has(T)){c.add(T);const S=y.getAttribute("data-node-type");S==="report-url"?c.add(`${T}__url`):S==="markdown-name"&&c.add(`${T}__name`)}});const b=e.current.__tempVariableValues;if(b?(h=b,setTimeout(()=>{if(e.current){const g=e.current;g.__tempVariableValues===b&&delete g.__tempVariableValues}},100)):(e.current.querySelectorAll('[data-type="variable"]').forEach(N=>{const _=N.dataset.key;if(_){const O=(()=>{if(N.dataset.variableRender==="antd-textarea"){const H=(N.getAttribute("data-value")||"").trim();if(!H)return"";try{return decodeURIComponent(H).replace(/\r\n/g,`
64
- `).trim()}catch{return H.trim()}}const I=(N.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
65
- `);return I.replace(/\n/g,"").trim().length>0?I:""})();O&&(N.getAttribute("data-node-type")==="report-url"?h[`${_}__url`]=O:N.getAttribute("data-node-type")==="markdown-name"?h[`${_}__name`]=O:h[_]=O)}}),e.current.querySelectorAll('[data-type="select"]').forEach(N=>{const _=N.dataset.key;if(_){const w=(N.getAttribute("data-value")||"").trim();w&&(h[_]=w)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(N=>{const _=N.dataset.key;if(_){const w=N.value.replace(/[\u200B]/g,"").trim();w&&(h[_]=w)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(N=>{const _=N.dataset.key;if(_){const w=N.getAttribute("data-node-type")||"",O=w==="report-module"||w==="markdown-module",I=O?(N.innerHTML||"").replace(/[\u200B]/g,"").trim():(N.textContent||"").replace(/[\u200B]/g,"").trim();if(O){const P=Number.parseInt(N.getAttribute("data-module-index")||"0",10);h[`${_}__module_${Number.isFinite(P)?P:0}`]=I}else I&&(h[_]=I)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(N=>{const _=N.dataset.key;if(_){const w=(N.getAttribute("data-value")||"").trim();w&&(h[_]=w)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(N=>{const _=N.dataset.key;if(_){const w=(N.value||"").trim();w&&(h[_]=w)}})),l&&Object.keys(l).length>0){const g=new Set(t.filter(T=>T.type==="upload"&&T.key).map(T=>T.key)),y={};Object.entries(l).forEach(([T,x])=>{g.has(T)||(Array.isArray(x)?x.forEach((S,A)=>{S!=null&&String(S).trim()!==""&&(y[`${T}_${A}`]=String(S))}):x!=null&&String(x).trim()!==""&&(t.find(A=>A.key===T&&A.type==="report-url")?y[`${T}__url`]=String(x):y[T]=String(x)))}),Object.entries(y).forEach(([T,x])=>{!(T in h)&&!c.has(T)&&(h[T]=x)})}if(U1(e,t,n,r,h,a,u),setTimeout(()=>{Dn(e)},0),i?.current){const{key:g,offset:y}=i.current;setTimeout(()=>{if(!e.current)return;const T=e.current.querySelector(`[data-type="variable"][data-key="${g}"]`);if(T){if(T.dataset.variableRender==="antd-textarea"){const x=T.querySelector("textarea");if(x){x.focus();try{const S=x.value?.length??0;x.setSelectionRange(Math.min(y,S),Math.min(y,S))}catch{}i.current=null;return}}try{const x=document.createRange(),S=document.createTreeWalker(T,NodeFilter.SHOW_TEXT,null);let A=0,N=null,_=0;for(;S.nextNode();){const w=S.currentNode,O=w.textContent?.length||0;if(A+O>=y){N=w,_=y-A;break}A+=O}if(N){x.setStart(N,Math.min(_,N.textContent?.length||0)),x.collapse(!0);const w=window.getSelection();w&&(w.removeAllRanges(),w.addRange(x),T.focus())}else{x.selectNodeContents(T),x.collapse(!1);const w=window.getSelection();w&&(w.removeAllRanges(),w.addRange(x),T.focus())}}catch{const x=document.createRange();x.selectNodeContents(T),x.collapse(!1);const S=window.getSelection();S&&(S.removeAllRanges(),S.addRange(x),T.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,u,o,l]);D.useEffect(()=>{E()},[E])}function V1(e,t,n,r,a){D.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||""),u=l=>{const m=l.target?.closest(".upload-info-icon");if(m&&m.classList.contains("upload-info-icon")){const E=m.dataset.uploadKey;if(E){const h=m.dataset.tooltip||"";let c=!1;try{const b=JSON.parse(h);b&&b.type==="steps"&&Array.isArray(b.images)&&(c=!0)}catch{}if(c){const f=m.closest('[data-type="upload"]');r({key:E,anchorEl:f||m,type:"upload"})}else{const f=m.closest('[data-type="upload"]');r({key:E,anchorEl:f||m,type:"upload"})}}return}const p=l.target?.closest('[data-type="upload"]');if(p){const E=p.dataset.key;if(E){const h=n[E];h&&s(h)&&r({key:E,anchorEl:p,type:"upload-preview"})}}},o=l=>{if(a)return;const m=l.target?.closest(".upload-info-icon"),p=l.relatedTarget;if(p?.closest?.(".rte-tooltip-overlay"))return;if(m&&m.classList.contains("upload-info-icon")){const h=m.closest('[data-type="upload"]');if(p&&h&&h.contains(p))return;if(!p||!i.contains(p))r(null);else{const c=p.closest('[data-type="upload"]');(!c||c!==h)&&r(null)}return}const E=l.target?.closest('[data-type="upload"]');if(E){const h=p;if(h?.closest?.(".rte-tooltip-overlay")||h&&E.contains(h))return;r(null)}};return i.addEventListener("mouseover",u,!0),i.addEventListener("mouseout",o,!0),()=>{i.removeEventListener("mouseover",u,!0),i.removeEventListener("mouseout",o,!0)}},[t,n,e,r,a])}function G1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=m=>{if(r==="hideTagClose")return;const p=m.currentTarget,E=p.dataset.tooltip,h=p.dataset.tagKey||"";E&&n({key:h,anchorEl:p,type:"tag"})},u=m=>{a||m.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let o;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.addEventListener("mouseenter",s),p.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(o),i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.removeEventListener("mouseenter",s),p.removeEventListener("mouseleave",u)})}},[t,e,n,r,a])}function Y1(e,t,n,r){D.useEffect(()=>{const a=e.current;if(!a)return;const i=u=>{const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const m=o.dataset.variableKey;m&&n({key:m,anchorEl:o,type:"variable"});return}const l=u.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const m=l.dataset.key;m&&n({key:m,anchorEl:l,type:"variable"})}},s=u=>{if(r)return;const o=u.target,l=u.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const m=o?.closest?.(".variable-info-icon"),p=o?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(m||p){if(!l||!a.contains(l)){n(null);return}const E=!!l.closest?.(".variable-info-icon"),h=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!E&&!h&&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 W1(e,t,n,r,a){D.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||""),u=p=>{const E=p.currentTarget,h=E.dataset.fileName,c=E.closest('[data-type="upload"]'),f=c?.dataset.key||"",b=f?n[f]:null;if(b&&s(b)){r({key:f,anchorEl:c||E,type:"upload-preview"});return}h&&r({key:f,anchorEl:c||E,type:"upload-label"})},o=p=>{a||p.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const m=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.addEventListener("mouseenter",u),E.addEventListener("mouseleave",o)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(m)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.removeEventListener("mouseenter",u),E.removeEventListener("mouseleave",o)})}},[t,n,e,r,a])}function j1(e,t,n,r){D.useEffect(()=>{const a=setTimeout(()=>{br(e,t,n),q1(e,t,n,r)},0);return()=>clearTimeout(a)},[n,t,e,r])}function X1(e,t){const n=D.useRef(0),r=D.useRef(0);D.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=y=>y instanceof HTMLElement?!!(y.closest(".rte-datepicker-wrapper")||y.closest(".rte-datepicker-host")||y.closest(".ant-picker")||y.closest(".ant-picker-dropdown")):!1,u=y=>y instanceof HTMLElement?!!(y.closest(".rte-select-wrapper")||y.closest(".rte-select-host")||y.closest(".ant-select")||y.closest(".ant-select-dropdown")):!1,o=y=>{a=!0,s(y.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] mousedown on datepicker target")),u(y.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] mousedown on select target"))},l=()=>{a=!1,i=Date.now()};let m=!1,p=0;const E=()=>{m=!0},h=()=>{m=!1,p=Date.now()},c=()=>{p=Date.now()},f=y=>{s(y.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] focusin datepicker target")),u(y.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] focusin select target"))},b=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800){console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");return}const y=document.activeElement;if(y&&(y.closest(".rte-datepicker-wrapper")||y.closest(".rte-datepicker-host")||y.closest(".ant-picker-dropdown")||y.tagName==="INPUT"&&y.closest(".ant-picker")||y.closest(".rte-select-wrapper")||y.closest(".rte-select-host")||y.closest(".ant-select")||y.closest(".ant-select-dropdown"))){console.log("[SelectionCtrl] activeElement is picker/select; skip");return}if(!e.current)return;const T=window.getSelection();if(!T||T.rangeCount===0||t.current||a||m||Date.now()-p<500)return;const x=T.getRangeAt(0);if(!x.collapsed)return e.current.contains(x.commonAncestorContainer),void 0;const S=T.anchorNode;if(!S||!e.current.contains(S))return;let A=!1,N=!1;if(S.nodeType===Node.ELEMENT_NODE){const w=S;(w.closest('[data-type="datepicker"]')||w.closest(".rte-datepicker-wrapper")||w.closest(".rte-datepicker-host"))&&(A=!0),(w.closest('[data-type="select"]')||w.closest(".rte-select-wrapper")||w.closest(".rte-select-host"))&&(N=!0)}else if(S.parentElement){const w=S.parentElement;(w.closest('[data-type="datepicker"]')||w.closest(".rte-datepicker-wrapper")||w.closest(".rte-datepicker-host"))&&(A=!0),(w.closest('[data-type="select"]')||w.closest(".rte-select-wrapper")||w.closest(".rte-select-host"))&&(N=!0)}if(A||N)return;let _=null;if(S.nodeType===Node.ELEMENT_NODE?_=S.closest('[data-type="variable"]'):S.nodeType===Node.TEXT_NODE&&S.parentElement&&(_=S.parentElement.closest('[data-type="variable"]')),!_){if(Date.now()-i>500)return;const w=e.current.querySelectorAll('[data-type="variable"]');if(w.length>0){let O=null;for(const I of Array.from(w))if(I.style.display!=="none"){O=I;break}if(!O&&w.length>0&&(O=w[0]),O){const I=document.createRange();I.selectNodeContents(O),I.collapse(!1),T.removeAllRanges(),T.addRange(I),O.focus()}else T.removeAllRanges()}else T.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",E),g.addEventListener("compositionend",h),g.addEventListener("input",c)),document.addEventListener("mousedown",o),document.addEventListener("mouseup",l),document.addEventListener("focusin",f),document.addEventListener("selectionchange",b),()=>{g&&(g.removeEventListener("compositionstart",E),g.removeEventListener("compositionend",h),g.removeEventListener("input",c)),document.removeEventListener("mousedown",o),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",f),document.removeEventListener("selectionchange",b)}},[e,t])}var lr={exports:{}},K1=lr.exports,Tu;function xu(){return Tu||(Tu=1,function(e,t){(function(n,r){e.exports=r()})(K1,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",p="month",E="quarter",h="year",c="date",f="Invalid Date",b=/^(\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,y={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(v){var C=["th","st","nd","rd"],B=v%100;return"["+v+(C[(B-20)%10]||C[B]||C[0])+"]"}},T=function(v,C,B){var $=String(v);return!$||$.length>=C?v:""+Array(C+1-$.length).join(B)+v},x={s:T,z:function(v){var C=-v.utcOffset(),B=Math.abs(C),$=Math.floor(B/60),U=B%60;return(C<=0?"+":"-")+T($,2,"0")+":"+T(U,2,"0")},m:function v(C,B){if(C.date()<B.date())return-v(B,C);var $=12*(B.year()-C.year())+(B.month()-C.month()),U=C.clone().add($,p),V=B-U<0,k=C.clone().add($+(V?-1:1),p);return+(-($+(B-U)/(V?U-k:k-U))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:p,y:h,w:m,d:l,D:c,h:o,m:u,s,ms:i,Q:E}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},S="en",A={};A[S]=y;var N="$isDayjsObject",_=function(v){return v instanceof P||!(!v||!v[N])},w=function v(C,B,$){var U;if(!C)return S;if(typeof C=="string"){var V=C.toLowerCase();A[V]&&(U=V),B&&(A[V]=B,U=V);var k=C.split("-");if(!U&&k.length>1)return v(k[0])}else{var j=C.name;A[j]=C,U=j}return!$&&U&&(S=U),U||!$&&S},O=function(v,C){if(_(v))return v.clone();var B=typeof C=="object"?C:{};return B.date=v,B.args=arguments,new P(B)},I=x;I.l=w,I.i=_,I.w=function(v,C){return O(v,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var P=function(){function v(B){this.$L=w(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[N]=!0}var C=v.prototype;return C.parse=function(B){this.$d=function($){var U=$.date,V=$.utc;if(U===null)return new Date(NaN);if(I.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var k=U.match(b);if(k){var j=k[2]-1||0,J=(k[7]||"0").substring(0,3);return V?new Date(Date.UTC(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)):new Date(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)}}return new Date(U)}(B),this.init()},C.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},C.$utils=function(){return I},C.isValid=function(){return this.$d.toString()!==f},C.isSame=function(B,$){var U=O(B);return this.startOf($)<=U&&U<=this.endOf($)},C.isAfter=function(B,$){return O(B)<this.startOf($)},C.isBefore=function(B,$){return this.endOf($)<O(B)},C.$g=function(B,$,U){return I.u(B)?this[$]:this.set(U,B)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(B,$){var U=this,V=!!I.u($)||$,k=I.p(B),j=function(Te,ge){var Pe=I.w(U.$u?Date.UTC(U.$y,ge,Te):new Date(U.$y,ge,Te),U);return V?Pe:Pe.endOf(l)},J=function(Te,ge){return I.w(U.toDate()[Te].apply(U.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ge)),U)},R=this.$W,te=this.$M,ce=this.$D,ne="set"+(this.$u?"UTC":"");switch(k){case h:return V?j(1,0):j(31,11);case p:return V?j(1,te):j(0,te+1);case m:var ee=this.$locale().weekStart||0,pe=(R<ee?R+7:R)-ee;return j(V?ce-pe:ce+(6-pe),te);case l:case c:return J(ne+"Hours",0);case o:return J(ne+"Minutes",1);case u:return J(ne+"Seconds",2);case s:return J(ne+"Milliseconds",3);default:return this.clone()}},C.endOf=function(B){return this.startOf(B,!1)},C.$set=function(B,$){var U,V=I.p(B),k="set"+(this.$u?"UTC":""),j=(U={},U[l]=k+"Date",U[c]=k+"Date",U[p]=k+"Month",U[h]=k+"FullYear",U[o]=k+"Hours",U[u]=k+"Minutes",U[s]=k+"Seconds",U[i]=k+"Milliseconds",U)[V],J=V===l?this.$D+($-this.$W):$;if(V===p||V===h){var R=this.clone().set(c,1);R.$d[j](J),R.init(),this.$d=R.set(c,Math.min(this.$D,R.daysInMonth())).$d}else j&&this.$d[j](J);return this.init(),this},C.set=function(B,$){return this.clone().$set(B,$)},C.get=function(B){return this[I.p(B)]()},C.add=function(B,$){var U,V=this;B=Number(B);var k=I.p($),j=function(te){var ce=O(V);return I.w(ce.date(ce.date()+Math.round(te*B)),V)};if(k===p)return this.set(p,this.$M+B);if(k===h)return this.set(h,this.$y+B);if(k===l)return j(1);if(k===m)return j(7);var J=(U={},U[u]=r,U[o]=a,U[s]=n,U)[k]||1,R=this.$d.getTime()+B*J;return I.w(R,this)},C.subtract=function(B,$){return this.add(-1*B,$)},C.format=function(B){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||f;var V=B||"YYYY-MM-DDTHH:mm:ssZ",k=I.z(this),j=this.$H,J=this.$m,R=this.$M,te=U.weekdays,ce=U.months,ne=U.meridiem,ee=function(ge,Pe,st,bt){return ge&&(ge[Pe]||ge($,V))||st[Pe].slice(0,bt)},pe=function(ge){return I.s(j%12||12,ge,"0")},Te=ne||function(ge,Pe,st){var bt=ge<12?"AM":"PM";return st?bt.toLowerCase():bt};return V.replace(g,function(ge,Pe){return Pe||function(st){switch(st){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return R+1;case"MM":return I.s(R+1,2,"0");case"MMM":return ee(U.monthsShort,R,ce,3);case"MMMM":return ee(ce,R);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ee(U.weekdaysMin,$.$W,te,2);case"ddd":return ee(U.weekdaysShort,$.$W,te,3);case"dddd":return te[$.$W];case"H":return String(j);case"HH":return I.s(j,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return Te(j,J,!0);case"A":return Te(j,J,!1);case"m":return String(J);case"mm":return I.s(J,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return k}return null}(ge)||k.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(B,$,U){var V,k=this,j=I.p($),J=O(B),R=(J.utcOffset()-this.utcOffset())*r,te=this-J,ce=function(){return I.m(k,J)};switch(j){case h:V=ce()/12;break;case p:V=ce();break;case E:V=ce()/3;break;case m:V=(te-R)/6048e5;break;case l:V=(te-R)/864e5;break;case o:V=te/a;break;case u:V=te/r;break;case s:V=te/n;break;default:V=te}return U?V:I.a(V)},C.daysInMonth=function(){return this.endOf(p).$D},C.$locale=function(){return A[this.$L]},C.locale=function(B,$){if(!B)return this.$L;var U=this.clone(),V=w(B,$,!0);return V&&(U.$L=V),U},C.clone=function(){return I.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},v}(),H=P.prototype;return O.prototype=H,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",p],["$y",h],["$D",c]].forEach(function(v){H[v[1]]=function(C){return this.$g(C,v[0],v[1])}}),O.extend=function(v,C){return v.$i||(v(C,P,O),v.$i=!0),O},O.locale=w,O.isDayjs=_,O.unix=function(v){return O(1e3*v)},O.en=A[S],O.Ls=A,O.p={},O})}(lr)),lr.exports}var Q1=xu();const cr=Mr(Q1);var dr={exports:{}},J1=dr.exports,Cu;function Z1(){return Cu||(Cu=1,function(e,t){(function(n,r){e.exports=r(xu())})(J1,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,u){return u==="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,u){var o=100*s+u;return o<600?"凌晨":o<900?"早上":o<1100?"上午":o<1300?"中午":o<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(dr)),dr.exports}Z1();function Sn(e){"@babel/helpers - typeof";return Sn=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},Sn(e)}function eb(e,t){if(Sn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tb(e){var t=eb(e,"string");return Sn(t)=="symbol"?t:t+""}function nb(e,t,n){return(t=tb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Su(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 Au(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Su(Object(n),!0).forEach(function(r){nb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Su(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var rb={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},ab=Au(Au({},rb),{},{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 ib={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},_u={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},ab),timePickerLocale:Object.assign({},ib)};_u.lang.ok="确定",cr.locale("zh-cn");const{RangePicker:sb}=se.DatePicker,ob=({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",[u,o]=D.useState(()=>{if(!r)return null;const f=r.split(",");return f.length===2&&f[0]&&f[1]?[cr(f[0]),cr(f[1])]:null}),[l,m]=D.useState(null),p=f=>f?s&&f.isAfter(cr(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(f.diff(l[0],"days"))>i:!1,E=f=>{m(f)},h=f=>{if(o(f),m(null),f&&f[0]&&f[1]){const b=`${f[0].format("YYYY-MM-DD")},${f[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",b),t(n,b)}else e.setAttribute("data-value",""),t(n,"")},c=f=>{m(f?u:null)};return Ln.createPortal(z.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:z.jsx(sb,{value:u,disabledDate:p,onCalendarChange:E,onChange:h,onOpenChange:c,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:_u,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},ub=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(ob,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`datepicker-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},ku=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:u,onAgentExit:o,loading:l=!1,placeholder:m,border:p,background:E="transparent",hideButtons:h,maxHeight:c,minHeight:f,collapsed:b=!1,reportAnalyze:g,markdownAnalyze:y,markdownNameAnalyze:T,onCollapsedChange:x,collapseTransitionMs:S=260,debugTooltipSticky:A=!1,nodeValues:N})=>{const[_,w]=se.message.useMessage(),O=D.useRef(null),I=D.useRef(null),P=D.useRef(null),H=D.useRef(null),v=D.useRef(null),C=D.useRef("");if(!C.current){const me=Math.random().toString(36).slice(2,8);C.current=`rte_${me}`}const[B,$]=D.useState({}),[U,V]=D.useState(null),[k,j]=D.useState(null),[J,R]=D.useState(null),{tooltipPortal:te,setPopoverVisible:ce}=h1({config:e,files:B,debugTooltipSticky:A}),{handleFileChange:ne,handleRemoveFile:ee}=rl({config:e,messageApi:_,activeBatchKey:k,activeFileKey:U,activeBatchStartIndex:J,setActiveFileKey:V,setActiveBatchKey:j,setActiveBatchStartIndex:R,setFiles:$}),pe=D.useRef(!1),Te=D.useRef(null),{handleMouseDown:ge,handleMouseMove:Pe,handleMouseUp:st,handleDoubleClick:bt}=El({lockStructure:i,onAgentExit:o,editorRef:H,setPopoverVisible:ce,isDraggingRef:pe,mouseDownPosRef:Te}),[fr,Nt]=D.useState(!1),kn=D.useRef(null),[pr,hr]=D.useState(!0),mr=D.useRef(0),[vn,Ga]=D.useState(58),[Ya,Wa]=D.useState(58),[ja,Xa]=D.useState(!1),[Y,Q]=D.useState(null),re=D.useRef(!1),ie=D.useRef(!1),ue=D.useRef(null),[Fe,nt]=D.useState({}),Ye=D.useRef(()=>{}),[We,ot]=D.useState({}),Le=D.useRef(()=>{}),yt=D.useRef({}),ze=D.useRef(We);D.useEffect(()=>{ze.current=We},[We]);const[Gt,Mu]=D.useState({}),Bu=D.useRef(()=>{}),Ru=D.useRef(Gt);D.useEffect(()=>{Ru.current=Gt},[Gt]);const[Yt,Nn]=D.useState(()=>{const me={};return e.forEach(Ee=>{Ee.type==="multi-variable"&&Ee.key&&(me[Ee.key]=1)}),me});sl({config:e,editorRef:H,files:B,setFiles:$,multiVariableCounts:Yt,setMultiVariableCounts:Nn}),D.useEffect(()=>{if(!N)return;const me={};e.forEach(Ee=>{if(Ee.type==="multi-variable"&&Ee.key){const He=N[Ee.key];if(Array.isArray(He)&&He.length>0){const _e=Ee.maxCount??9;me[Ee.key]=Math.min(He.length,_e)}}}),Object.keys(me).length>0&&Nn(Ee=>({...Ee,...me}))},[N,e]);const Se=dl({config:e,reportAnalyzeState:Fe,markdownAnalyzeState:We,markdownNameAnalyzeState:Gt}),{handleReportUrlBlur:Cb,handleMarkdownBlur:Sb,handleMarkdownNameBlur:Ab}=ul({reportAnalyze:g,markdownAnalyze:y,markdownNameAnalyze:T,reportAnalyzeState:Fe,setReportAnalyzeState:nt,markdownAnalyzeState:We,setMarkdownAnalyzeState:ot,markdownNameAnalyzeState:Gt,setMarkdownNameAnalyzeState:Mu,editorRef:H,reportAnalyzeRef:Ye,markdownAnalyzeRef:Le,markdownNameAnalyzeRef:Bu,markdownAnalyzeStateRef:ze,markdownNameAnalyzeStateRef:Ru});Zu(H,Cb,[Se]),el(H,Ab,[Se]),tl(H,Sb,[Se]),Ju(H,[Se]),z1(H,Se,B,i,Yt,kn,void 0,h,void 0,N);const Ka=D.useRef(new Set),Fu=D.useRef(Se);Fu.current!==Se&&(Fu.current=Se,Ka.current=new Set),D.useEffect(()=>{if(!N||!Se||Se.length===0)return;const me=Se.filter(_e=>_e.type==="upload"&&_e.key);if(me.length===0)return;const Ee={},He=(_e,Oe)=>{Oe&&(Oe instanceof File?Ee[_e]=Oe:typeof Oe=="string"&&Oe.trim()&&(Ee[_e]=Oe.trim()))};for(const _e of me){const Oe=_e.key;if(Ka.current.has(Oe))continue;const rt=N[Oe],In=typeof _e.maxCount=="number"&&_e.maxCount>1;if(Array.isArray(rt)&&rt.length>0){In?rt.forEach((wt,gr)=>He(`${Oe}-${gr}`,wt)):He(Oe,rt[0]);continue}if(rt&&!Array.isArray(rt)){He(Oe,rt);continue}if(In)for(let wt=0;wt<_e.maxCount;wt++){const gr=`${Oe}-${wt}`,qu=N[gr];if(!qu)break;He(gr,qu)}}if(Object.keys(Ee).length!==0){for(const _e of me)N[_e.key]!==void 0&&Ka.current.add(_e.key);$(_e=>{const Oe={..._e};let rt=!1;for(const[In,wt]of Object.entries(Ee))_e[In]||(Oe[In]=wt,rt=!0);return rt?Oe:_e})}},[N,Se]),V1(H,Se,B,ce,A),G1(H,Se,ce,h,A),W1(H,Se,B,ce,A),Y1(H,Se,ce,A),j1(H,Se,B,Nt),X1(H,pe);const Hu=Yu(H),$u=Qu(H);D.useEffect(()=>{if(!H.current)return;H.current.querySelectorAll(".rte-richtext-toggle").forEach(Ee=>{const He=Ee.getAttribute("data-expanded")==="true";Ee.innerHTML=He?'<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>'})},[Se,H]);const Uu=ub(H),{measureExpandedContentHeight:wn}=ll({collapsed:b,collapseTransitionMs:S,contentRef:I,contentBodyRef:P,editorRef:H,debugIdRef:C,setCollapsedContentMaxHeightPx:Ga,setExpandedContentMaxHeightPx:Wa,setIsCollapseAnimating:Xa,effectiveConfig:Se,files:B,multiVariableCounts:Yt,selectPortalsLength:Hu.length,datePickerPortalsLength:Uu.length,variablePortalsLength:$u.length}),_b=()=>{if(b)return;const me=P.current;if(!me)return;const Ee=Math.ceil(me.getBoundingClientRect().height||0);Ee>0&&Q(Ee),re.current=!0,ie.current=!1,ue.current&&(window.clearTimeout(ue.current),ue.current=null)};D.useEffect(()=>{const me=()=>{re.current&&(ie.current=!0,ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{ue.current=null,re.current=!1,ie.current=!1,Q(null),window.requestAnimationFrame(()=>wn())},450))};return window.addEventListener("focus",me),()=>window.removeEventListener("focus",me)},[wn]),D.useEffect(()=>{!re.current||!ie.current||(ue.current&&(window.clearTimeout(ue.current),ue.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{Q(null),wn(),re.current=!1,ie.current=!1})}))},[B,wn]),cl({config:e,editorRef:H,setIsEmpty:hr,setIsFormValid:Nt});const kb=hl({disabled:r,collapsed:b,onCollapsedChange:x,config:e,lockStructure:i,editorRef:H,containerRef:O,fileInputRef:v,onBeforeFilePickerOpen:_b,files:B,setFiles:$,handleRemoveFile:ee,setActiveBatchKey:j,setActiveBatchStartIndex:R,setActiveFileKey:V,isDraggingRef:pe,richtextPrevScrollTopRef:mr}),Qa=ml({config:e,editorRef:H,setIsEmpty:hr,setIsFormValid:Nt,setReportAnalyzeState:nt,setMarkdownAnalyzeState:ot,setMarkdownNameAnalyzeState:Mu,collapsed:b,measureExpandedContentHeight:wn,effectiveConfig:Se,files:B,multiVariableCounts:Yt,setMultiVariableCounts:Nn,savedCursorRef:kn}),vb=bl({disabled:r,config:e,multiVariableCounts:Yt,setMultiVariableCounts:Nn,editorRef:H,handleInput:Qa,markdownAnalyzeRef:Le,reportAnalyzeRef:Ye,markdownNameAnalyzeRef:Bu,markdownAnalyzeStateRef:ze,markdownRawTextRef:yt,setMarkdownAnalyzeState:ot});pl({config:e,effectiveConfig:Se,files:B,editorRef:H,setIsFormValid:Nt,multiVariableCounts:Yt,setMultiVariableCounts:Nn});const Nb=gl({disabled:r,lockStructure:i,config:e,editorRef:H,handleInput:Qa}),wb=yl({config:e,files:B,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:fr,editorRef:H,markdownAnalyzeState:We,markdownNameAnalyzeState:Gt}),Ib={...a?{width:typeof a=="number"?`${a}px`:a}:{},...p?{border:p}:{},...E?{background:E}:{},...c?{maxHeight:typeof c=="number"?`${c}px`:c}:{},...f?{minHeight:typeof f=="number"?`${f}px`:f}:{},...c?{"--rte-richtext-fullscreen-height":typeof c=="number"?`${c}px`:c}:{}},Lb=typeof S=="number"&&Number.isFinite(S)&&S>=0?S:260,Ob={overflow:"hidden"},Db={maxHeight:Y!=null?`${Y}px`:b?`${vn}px`:`${Math.max(Ya,vn)}px`,overflow:Y!=null||b||ja?"hidden":"auto",transition:Y!=null?"none":`max-height ${Lb}ms cubic-bezier(0.4, 0, 0.2, 1)`,willChange:"max-height"};return z.jsxs("div",{className:"rich-text-editor",style:Ib,"data-disabled":r,ref:O,children:[w,z.jsx("div",{className:"rich-text-editor-content",ref:I,style:Ob,children:z.jsxs("div",{ref:P,className:"rich-text-editor-content-body",style:Db,children:[z.jsx("div",{ref:H,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${pr&&m?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":m,onMouseDown:ge,onMouseMove:Pe,onMouseUp:st,onClick:kb,onDoubleClick:bt,onInput:Qa,onKeyDown:Nb,onPaste:vb}),z.jsx("input",{type:"file",ref:v,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:ne})]})}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsx("div",{className:"rich-text-editor-footer-left",children:z.jsxs("div",{className:"rich-text-editor-brand",children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""}),z.jsx("span",{className:"rte-brand-text",children:"SealSeek 1.0"})]}),h!=="hideAgent"&&z.jsx(se.Dropdown,{placement:"topLeft",menu:{items:s.filter(me=>me.isShowNew!==1).map(me=>({key:me.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[me.icon&&z.jsx("i",{className:me.icon}),z.jsx("span",{children:me.label})]}),onClick:()=>{u?.(me)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})]})}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(()=>{const me=e.find(He=>He.type==="tag");if(!me||!me.text)return null;const Ee=s.find(He=>He.label===me.text);return!Ee||Ee.points===void 0||Ee.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(Ee.points)]}),Ee.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:wb,disabled:n||r||l||!fr,className:"rich-text-editor-send-button",children:n||l?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),te,Uu,Hu,$u]})};ku.__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 vu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",lb=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],cb=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:u})=>e&&n?z.jsxs("div",{className:"auto_load_progress",children:[r||z.jsx("img",{src:vu,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),z.jsx(se.Progress,{percent:n.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||z.jsx("img",{src:vu,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(se.Select,{value:t,onChange:a,options:lb,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),db=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:u,onChange:o,onLoadNextPage:l,onStartAutoLoad:m,onStopLoading:p})=>{const[E,h]=D.useState(5),c=Math.ceil(r/n),f=D.useMemo(()=>a.length>=c,[a,c]),b=()=>Array.from({length:c},(T,x)=>x+1).filter(T=>!a.includes(T)).slice(0,E),g=(y,T,x)=>{const S=a.includes(y);return T==="prev"||T==="next"||T==="jump-prev"||T==="jump-next"?z.jsx("div",{className:"pageBox",children:x}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===y?"#2563EB":"#f5f5f5",color:e===y?"#fff":S?"#171717":"#a3a3a3"},children:[y,!S&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(lt.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!f&&z.jsx(cb,{loadIcon:t||void 0,autoLoading:s,batchSize:E,loadingProgress:u,disabled:!l||!m,onBatchSizeChange:h,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const y=b();m?.(y)},onStopLoad:()=>p?.()})]}),z.jsx(se.Pagination,{current:e,pageSize:n,total:r,onChange:y=>o(y),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Nu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:u,pageSize:o,cachedPages:l,onChangePage:m,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:h,...c}=e,f=D.useRef(null),b=D.useCallback(g=>{m(g),l.includes(g)&&f.current?.scrollTo({key:`${(g-1)*o+1}`})},[l,m,o]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(se.Table,{ref:f,...c,columns:a,dataSource:i,pagination:!1,virtual:!0}),z.jsx(db,{loading:t,autoLoading:n,loadingProgress:r,current:u,pageSize:o,total:s,loadedCount:i.length,cachedPages:l,onChange:b,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:h})]})};Nu.__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 wu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[u,o]=D.useState(""),[l,m]=D.useState(0),[p,E]=D.useState(!1),[h,c]=D.useState(!1),[f,b]=D.useState(!1),g=D.useRef(void 0),y=D.useRef(void 0),T=D.useRef(e),x=D.useRef(l),S=D.useRef(h),A=D.useRef(u);D.useEffect(()=>{T.current=e,x.current=l,S.current=h,A.current=u});const N=D.useCallback((v,C)=>{let B=0;b(!0);const $=()=>{B<v.length?(o(v.slice(0,B+1)),B++,y.current=window.setTimeout($,n)):(b(!1),C?.())};$()},[n]),_=D.useCallback(v=>{let C=A.current.length;const B=()=>{C>0?(o(A.current.slice(0,C-1)),C--,y.current=window.setTimeout(B,n/2)):v?.()};B()},[n]),w=D.useCallback(()=>{if(T.current.length===0||S.current)return;E(!0);const v=T.current[x.current];A.current?_(()=>{N(v,()=>{g.current=window.setTimeout(()=>{m(C=>(C+1)%T.current.length),E(!1)},2e3)})}):N(v,()=>{g.current=window.setTimeout(()=>{m(C=>(C+1)%T.current.length),E(!1)},2e3)})},[_,N]);D.useEffect(()=>(r&&e.length>0&&!h&&w(),()=>{g.current&&window.clearTimeout(g.current),y.current&&window.clearTimeout(y.current)}),[l,h,r,e.length,w]),D.useEffect(()=>{!p&&r&&e.length>0&&!h&&w()},[l,p,r,e.length,h,w]);const O=v=>{c(!0),g.current&&window.clearTimeout(g.current),y.current&&window.clearTimeout(y.current),E(!1),b(!1),s.onFocus?.(v)},I=v=>{c(!1),!a&&e.length>0&&(o(""),m(0)),s.onBlur?.(v)},P=v=>{i?.(v.target.value),s.onChange?.(v)},H=()=>h||a?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(se.Input,{...s,value:a,onChange:P,onFocus:O,onBlur:I,placeholder:H(),style:{...s.style,position:"relative",zIndex:1}}),!h&&!a&&u&&z.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:[z.jsx("span",{children:u}),f&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
54
+ `}),n}function Xs(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ks(e,t){const n=Th(e,t),r=n.one(e,void 0),a=lh(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 Ah(e,t){return e&&"run"in e?async function(n,r){const a=Ks(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Ks(n,{file:r,...e||t})}}function Qs(e){if(e)throw e}var ea,Js;function _h(){if(Js)return ea;Js=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 m=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!m&&!f)return!1;var E;for(E in l);return typeof E>"u"||e.call(l,E)},s=function(l,m){n&&m.name==="__proto__"?n(l,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):l[m.name]=m.newValue},u=function(l,m){if(m==="__proto__")if(e.call(l,m)){if(r)return r(l,m).value}else return;return l[m]};return ea=function o(){var l,m,f,E,h,c,p=arguments[0],b=1,g=arguments.length,T=!1;for(typeof p=="boolean"&&(T=p,p=arguments[1]||{},b=2),(p==null||typeof p!="object"&&typeof p!="function")&&(p={});b<g;++b)if(l=arguments[b],l!=null)for(m in l)f=u(p,m),E=u(l,m),p!==E&&(T&&E&&(i(E)||(h=a(E)))?(h?(h=!1,c=f&&a(f)?f:[]):c=f&&i(f)?f:{},s(p,{name:m,newValue:o(T,c,E)})):typeof E<"u"&&s(p,{name:m,newValue:E}));return p},ea}var kh=_h();const ta=Mr(kh);function na(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 vh(){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);u(null,...a);function u(o,...l){const m=e[++i];let f=-1;if(o){s(o);return}for(;++f<a.length;)(l[f]===null||l[f]===void 0)&&(l[f]=a[f]);a=l,m?Nh(m,u)(...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 Nh(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(a);try{o=e.apply(this,s)}catch(l){const m=l;if(u&&n)throw m;return a(m)}u||(o&&o.then&&typeof o.then=="function"?o.then(i,a):o instanceof Error?a(o):i(o))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const et={basename:wh,dirname:Ih,extname:Lh,join:Oh,sep:"/"};function wh(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');cn(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,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Ih(e){if(cn(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 Lh(e){cn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 Oh(...e){let t=-1,n;for(;++t<e.length;)cn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Dh(n)}function Dh(e){cn(e);const t=e.codePointAt(0)===47;let n=Ph(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ph(e,t){let n="",r=0,a=-1,i=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),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 u===46&&i>-1?i++:i=-1}return n}function cn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mh={cwd:Bh};function Bh(){return"/"}function ra(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Rh(e){if(typeof e=="string")e=new URL(e);else if(!ra(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 Fh(e)}function Fh(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 aa=["history","path","basename","stem","extname","dirname"];class Zs{constructor(t){let n;t?ra(t)?n={path:t}:typeof t=="string"||Hh(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Mh.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<aa.length;){const i=aa[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)aa.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?et.basename(this.path):void 0}set basename(t){sa(t,"basename"),ia(t,"basename"),this.path=et.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?et.dirname(this.path):void 0}set dirname(t){eo(this.basename,"dirname"),this.path=et.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?et.extname(this.path):void 0}set extname(t){if(ia(t,"extname"),eo(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=et.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ra(t)&&(t=Rh(t)),sa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?et.basename(this.path,this.extname):void 0}set stem(t){sa(t,"stem"),ia(t,"stem"),this.path=et.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 we(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 ia(e,t){if(e&&e.includes(et.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+et.sep+"`")}function sa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eo(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $h=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},Uh={}.hasOwnProperty;class oa extends $h{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=vh()}copy(){const t=new oa;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ta(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ca("data",this.frozen),this.namespace[t]=n,this):Uh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ca("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=Qn(t),r=this.parser||this.Parser;return ua("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ua("process",this.parser||this.Parser),la("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Qn(t),o=r.parse(u);r.run(o,u,function(m,f,E){if(m||!f||!E)return l(m);const h=f,c=r.stringify(h,E);Vh(c)?E.value=c:E.result=c,l(m,E)});function l(m,f){m||!f?s(m):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ua("processSync",this.parser||this.Parser),la("processSync",this.compiler||this.Compiler),this.process(t,a),no("processSync","process",n),r;function a(i,s){n=!0,Qs(i),r=s}}run(t,n,r){to(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,u){const o=Qn(n);a.run(t,o,l);function l(m,f,E){const h=f||t;m?u(m):s?s(h):r(void 0,h,E)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),no("runSync","run",r),a;function i(s,u){Qs(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Qn(n),a=this.compiler||this.Compiler;return la("stringify",a),to(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(ca("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[m,...f]=l;o(m,f)}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");u(l.plugins),l.settings&&(a.settings=ta(!0,a.settings,l.settings))}function u(l){let m=-1;if(l!=null)if(Array.isArray(l))for(;++m<l.length;){const f=l[m];i(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,m){let f=-1,E=-1;for(;++f<r.length;)if(r[f][0]===l){E=f;break}if(E===-1)r.push([l,...m]);else if(m.length>0){let[h,...c]=m;const p=r[E][1];na(p)&&na(h)&&(h=ta(!0,p,h)),r[E]=[l,h,...c]}}}}const qh=new oa().freeze();function ua(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function la(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ca(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 to(e){if(!na(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function no(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qn(e){return zh(e)?e:new Zs(e)}function zh(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vh(e){return typeof e=="string"||Gh(e)}function Gh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ro=[],ao={allowDangerousHtml:!0},Wh=/^(https?|ircs?|mailto|xmpp)$/i,jh=[{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 da(e){const t=Xh(e),n=Kh(e);return Qh(t.runSync(t.parse(n),n),e)}function Xh(e){const t=e.rehypePlugins||ro,n=e.remarkPlugins||ro,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ao}:ao;return qh().use(Ip).use(n).use(Ah,r).use(t)}function Kh(e){const t=e.children||"",n=new Zs;return typeof t=="string"&&(n.value=t),n}function Qh(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||Jh;for(const m of jh)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Yh+m.id,void 0);return Kn(e,l),Td(e,{Fragment:z.Fragment,components:a,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function l(m,f,E){if(m.type==="raw"&&E&&typeof f=="number")return s?E.children.splice(f,1):E.children[f]={type:"text",value:m.value},f;if(m.type==="element"){let h;for(h in Ur)if(Object.hasOwn(Ur,h)&&Object.hasOwn(m.properties,h)){const c=m.properties[h],p=Ur[h];(p===null||p.includes(m.tagName))&&(m.properties[h]=o(String(c||""),h,m))}}if(m.type==="element"){let h=n?!n.includes(m.tagName):i?i.includes(m.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(m,f,E)),h&&E&&typeof f=="number")return u&&m.children?E.children.splice(f,1,...m.children):E.children.splice(f,1),f}}}function Jh(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||Wh.test(e.slice(0,t))?e:""}const io=/[#.]/g;function Zh(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){io.lastIndex=a;const u=io.exec(n),o=n.slice(a,u?u.index:n.length);o&&(i?i==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,a+=o.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function so(e,t,n){const r=n?r0(n):void 0;function a(i,s,...u){let o;if(i==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=Zh(i,t);const l=o.tagName.toLowerCase(),m=r?r.get(l):void 0;if(o.tagName=m||l,e0(s))u.unshift(s);else for(const[f,E]of Object.entries(s))t0(e,o.properties,f,E)}for(const l of u)fa(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return a}function e0(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 t0(e,t,n,r){const a=Un(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=Xi(r):a.commaSeparated?i=Bi(r):a.commaOrSpaceSeparated?i=Xi(Bi(r).join(" ")):i=oo(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?n0(r):String(r);if(Array.isArray(i)){const s=[];for(const u of i)s.push(oo(a,a.property,u));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function fa(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)fa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?fa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function oo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Qt(n)===Qt(t)))return!0}return n}function n0(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function r0(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const a0=["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"],i0=so(Jt,"div"),s0=so(dt,"g",a0);function o0(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 u=n[s];if(u===void 0){const o=uo(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>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 u=n[n.length-1],o=uo(t,u),l=o===-1?t.length+1:o+1;if(u===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 uo(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 At={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/"},lo={}.hasOwnProperty,u0=Object.prototype;function l0(e,t){const n=t||{};return pa({file:n.file||void 0,location:!1,schema:n.space==="svg"?dt:Jt,verbose:n.verbose||!1},e)}function pa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Jn(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:co(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=o0(i),u=s.toPoint(0),o=s.toPoint(i.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Jn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Jn(e,r,n),n}default:return n=c0(e,t),n}}function co(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=pa(e,t[n]);r.push(a)}return r}function c0(e,t){const n=e.schema;e.schema=t.namespaceURI===At.svg?dt:Jt;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;lo.call(u0,o)||(a[o]=u.value)}const s=(e.schema.space==="svg"?s0:i0)(t.tagName,a,co(e,t.childNodes));if(Jn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&Ft(o.startTag),m=o&&o.endTag&&Ft(o.endTag),f=pa(e,u.content);l&&m&&e.file&&(f.position={start:l.end,end:m.start}),s.content=f}return e.schema=n,s}function Jn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=d0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function d0(e,t,n){const r=Ft(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)lo.call(n.attrs,s)&&(i[Un(e.schema,s).property]=Ft(n.attrs[s]));n.startTag;const u=Ft(n.startTag),o=n.endTag?Ft(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=i,t.data={position:l}}}return r}function Ft(e){const t=fo({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=fo({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function fo(e){return e.line&&e.column?e:void 0}const po={}.hasOwnProperty;function ho(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&po.call(a,e)){const o=String(a[e]);s=po.call(u,o)?u[o]: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 f0={},p0={}.hasOwnProperty,mo=ho("type",{handlers:{root:m0,element:y0,text:b0,comment:T0,doctype:E0}});function h0(e,t){const r=(t||f0).space;return mo(e,r==="svg"?dt:Jt)}function m0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ha(e.children,n,t),Ht(e,n),n}function g0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ha(e.children,n,t),Ht(e,n),n}function E0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ht(e,t),t}function b0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ht(e,t),t}function T0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ht(e,t),t}function y0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=dt);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&p0.call(e.properties,i)){const o=x0(r,i,e.properties[i]);o&&a.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:At[s],childNodes:[],parentNode:null};return u.childNodes=ha(e.children,u,r),Ht(e,u),e.tagName==="template"&&e.content&&(u.content=g0(e.content,r)),u}function x0(e,t,n){const r=Un(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?Ri(n):Ki(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=At[r.space]}return a}function ha(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=mo(e[r],n);i.parentNode=t,a.push(i)}return a}function Ht(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 C0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],S0=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]),Te="�";var L;(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"})(L||(L={}));const Re={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function go(e){return e>=55296&&e<=57343}function A0(e){return e>=56320&&e<=57343}function _0(e,t){return(e-55296)*1024+9216+t}function Eo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function bo(e){return e>=64976&&e<=65007||S0.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 k0=65536;class v0{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=k0,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,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(A0(n))return this.pos++,this._addGap(),_0(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.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,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.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,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,go(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Eo(t)?this._err(G.controlCharacterInInputStream):bo(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 oe;(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"})(oe||(oe={}));function To(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 N0=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))),w0=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 I0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=w0.get(e))!==null&&t!==void 0?t:e}var ve;(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"})(ve||(ve={}));const L0=32;var ht;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ht||(ht={}));function ma(e){return e>=ve.ZERO&&e<=ve.NINE}function O0(e){return e>=ve.UPPER_A&&e<=ve.UPPER_F||e>=ve.LOWER_A&&e<=ve.LOWER_F}function D0(e){return e>=ve.UPPER_A&&e<=ve.UPPER_Z||e>=ve.LOWER_A&&e<=ve.LOWER_Z||ma(e)}function P0(e){return e===ve.EQUALS||D0(e)}var Ne;(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"})(Ne||(Ne={}));var it;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(it||(it={}));class M0{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ne.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=it.Strict}startEntity(t){this.decodeMode=t,this.state=Ne.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ne.EntityStart:return t.charCodeAt(n)===ve.NUM?(this.state=Ne.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ne.NamedEntity,this.stateNamedEntity(t,n));case Ne.NumericStart:return this.stateNumericStart(t,n);case Ne.NumericDecimal:return this.stateNumericDecimal(t,n);case Ne.NumericHex:return this.stateNumericHex(t,n);case Ne.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|L0)===ve.LOWER_X?(this.state=Ne.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ne.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(ma(a)||O0(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(ma(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===ve.SEMI)this.consumed+=1;else if(this.decodeMode===it.Strict)return 0;return this.emitCodePoint(I0(this.result),this.consumed),this.errors&&(t!==ve.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&ht.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=B0(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===it.Attribute&&(i===0||P0(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&ht.VALUE_LENGTH)>>14,i!==0){if(s===ve.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==it.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]&ht.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]&~ht.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case Ne.NamedEntity:return this.result!==0&&(this.decodeMode!==it.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ne.NumericDecimal:return this.emitNumericEntity(0,2);case Ne.NumericHex:return this.emitNumericEntity(0,3);case Ne.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ne.EntityStart:return 0}}}function B0(e,t,n,r){const a=(t&ht.BRANCH_LENGTH)>>7,i=t&ht.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const o=r-i;return o<0||o>=a?-1:e[n+o]-1}let s=n,u=s+a-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return e[o+a]}return-1}var W;(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/"})(W||(W={}));var _t;(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"})(_t||(_t={}));var Ge;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ge||(Ge={}));var q;(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"})(q||(q={}));var d;(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"})(d||(d={}));const R0=new Map([[q.A,d.A],[q.ADDRESS,d.ADDRESS],[q.ANNOTATION_XML,d.ANNOTATION_XML],[q.APPLET,d.APPLET],[q.AREA,d.AREA],[q.ARTICLE,d.ARTICLE],[q.ASIDE,d.ASIDE],[q.B,d.B],[q.BASE,d.BASE],[q.BASEFONT,d.BASEFONT],[q.BGSOUND,d.BGSOUND],[q.BIG,d.BIG],[q.BLOCKQUOTE,d.BLOCKQUOTE],[q.BODY,d.BODY],[q.BR,d.BR],[q.BUTTON,d.BUTTON],[q.CAPTION,d.CAPTION],[q.CENTER,d.CENTER],[q.CODE,d.CODE],[q.COL,d.COL],[q.COLGROUP,d.COLGROUP],[q.DD,d.DD],[q.DESC,d.DESC],[q.DETAILS,d.DETAILS],[q.DIALOG,d.DIALOG],[q.DIR,d.DIR],[q.DIV,d.DIV],[q.DL,d.DL],[q.DT,d.DT],[q.EM,d.EM],[q.EMBED,d.EMBED],[q.FIELDSET,d.FIELDSET],[q.FIGCAPTION,d.FIGCAPTION],[q.FIGURE,d.FIGURE],[q.FONT,d.FONT],[q.FOOTER,d.FOOTER],[q.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[q.FORM,d.FORM],[q.FRAME,d.FRAME],[q.FRAMESET,d.FRAMESET],[q.H1,d.H1],[q.H2,d.H2],[q.H3,d.H3],[q.H4,d.H4],[q.H5,d.H5],[q.H6,d.H6],[q.HEAD,d.HEAD],[q.HEADER,d.HEADER],[q.HGROUP,d.HGROUP],[q.HR,d.HR],[q.HTML,d.HTML],[q.I,d.I],[q.IMG,d.IMG],[q.IMAGE,d.IMAGE],[q.INPUT,d.INPUT],[q.IFRAME,d.IFRAME],[q.KEYGEN,d.KEYGEN],[q.LABEL,d.LABEL],[q.LI,d.LI],[q.LINK,d.LINK],[q.LISTING,d.LISTING],[q.MAIN,d.MAIN],[q.MALIGNMARK,d.MALIGNMARK],[q.MARQUEE,d.MARQUEE],[q.MATH,d.MATH],[q.MENU,d.MENU],[q.META,d.META],[q.MGLYPH,d.MGLYPH],[q.MI,d.MI],[q.MO,d.MO],[q.MN,d.MN],[q.MS,d.MS],[q.MTEXT,d.MTEXT],[q.NAV,d.NAV],[q.NOBR,d.NOBR],[q.NOFRAMES,d.NOFRAMES],[q.NOEMBED,d.NOEMBED],[q.NOSCRIPT,d.NOSCRIPT],[q.OBJECT,d.OBJECT],[q.OL,d.OL],[q.OPTGROUP,d.OPTGROUP],[q.OPTION,d.OPTION],[q.P,d.P],[q.PARAM,d.PARAM],[q.PLAINTEXT,d.PLAINTEXT],[q.PRE,d.PRE],[q.RB,d.RB],[q.RP,d.RP],[q.RT,d.RT],[q.RTC,d.RTC],[q.RUBY,d.RUBY],[q.S,d.S],[q.SCRIPT,d.SCRIPT],[q.SEARCH,d.SEARCH],[q.SECTION,d.SECTION],[q.SELECT,d.SELECT],[q.SOURCE,d.SOURCE],[q.SMALL,d.SMALL],[q.SPAN,d.SPAN],[q.STRIKE,d.STRIKE],[q.STRONG,d.STRONG],[q.STYLE,d.STYLE],[q.SUB,d.SUB],[q.SUMMARY,d.SUMMARY],[q.SUP,d.SUP],[q.TABLE,d.TABLE],[q.TBODY,d.TBODY],[q.TEMPLATE,d.TEMPLATE],[q.TEXTAREA,d.TEXTAREA],[q.TFOOT,d.TFOOT],[q.TD,d.TD],[q.TH,d.TH],[q.THEAD,d.THEAD],[q.TITLE,d.TITLE],[q.TR,d.TR],[q.TRACK,d.TRACK],[q.TT,d.TT],[q.U,d.U],[q.UL,d.UL],[q.SVG,d.SVG],[q.VAR,d.VAR],[q.WBR,d.WBR],[q.XMP,d.XMP]]);function $t(e){var t;return(t=R0.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const X=d,F0={[W.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]),[W.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[W.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},ga=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var M;(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"})(M||(M={}));const Ce={DATA:M.DATA,RCDATA:M.RCDATA,RAWTEXT:M.RAWTEXT,SCRIPT_DATA:M.SCRIPT_DATA,PLAINTEXT:M.PLAINTEXT,CDATA_SECTION:M.CDATA_SECTION};function H0(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function dn(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function $0(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function mt(e){return $0(e)||dn(e)}function yo(e){return mt(e)||H0(e)}function Zn(e){return e+32}function xo(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function Co(e){return xo(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function U0(e){return e===L.NULL?G.nullCharacterReference:e>1114111?G.characterReferenceOutsideUnicodeRange:go(e)?G.surrogateCharacterReference:bo(e)?G.noncharacterCharacterReference:Eo(e)||e===L.CARRIAGE_RETURN?G.controlCharacterReference:null}class q0{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=M.DATA,this.returnState=M.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new v0(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new M0(N0,(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=U0(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:oe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oe.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(To(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=$t(t.tagName),t.type===oe.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 oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oe.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:oe.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=xo(t)?oe.WHITESPACE_CHARACTER:t===L.NULL?oe.NULL_CHARACTER:oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=M.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?it.Attribute:it.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===M.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===M.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case M.DATA:{this._stateData(t);break}case M.RCDATA:{this._stateRcdata(t);break}case M.RAWTEXT:{this._stateRawtext(t);break}case M.SCRIPT_DATA:{this._stateScriptData(t);break}case M.PLAINTEXT:{this._statePlaintext(t);break}case M.TAG_OPEN:{this._stateTagOpen(t);break}case M.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case M.TAG_NAME:{this._stateTagName(t);break}case M.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case M.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case M.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case M.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case M.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case M.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case M.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case M.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case M.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case M.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case M.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case M.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case M.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case M.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case M.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case M.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case M.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case M.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case M.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case M.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case M.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case M.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case M.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case M.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case M.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case M.BOGUS_COMMENT:{this._stateBogusComment(t);break}case M.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case M.COMMENT_START:{this._stateCommentStart(t);break}case M.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case M.COMMENT:{this._stateComment(t);break}case M.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case M.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case M.COMMENT_END:{this._stateCommentEnd(t);break}case M.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case M.DOCTYPE:{this._stateDoctype(t);break}case M.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case M.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case M.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case M.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case M.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case M.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case M.CDATA_SECTION:{this._stateCdataSection(t);break}case M.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case M.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case M.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case M.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=M.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mt(t))this._createStartTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=M.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=M.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(G.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(G.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=M.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mt(t))this._createEndTagToken(),this.state=M.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(G.missingEndTagName),this.state=M.DATA;break}case L.EOF:{this._err(G.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(G.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.tagName+=Te;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=M.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mt(t)?(this.state=M.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=M.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=M.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=M.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=M.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=M.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mt(t)?(this.state=M.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=M.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=M.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=M.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mt(t)?(this.state=M.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=M.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_ESCAPED,this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mt(t)?(this._emitChars("<"),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mt(t)?(this.state=M.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Re.SCRIPT,!1)&&Co(this.preprocessor.peek(Re.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Re.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=M.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Te);break}case L.EOF:{this._err(G.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Re.SCRIPT,!1)&&Co(this.preprocessor.peek(Re.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Re.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=M.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=M.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(G.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=M.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=M.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(G.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.name+=Te;break}default:this.currentAttr.name+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=M.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=M.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=M.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=M.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=M.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingAttributeValue),this.state=M.DATA,this.emitCurrentTagToken();break}default:this.state=M.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=M.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),this.currentAttr.value+=Te;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(G.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=M.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=M.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.missingWhitespaceBetweenAttributes),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=M.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(G.eofInTag),this._emitEOFToken();break}default:this._err(G.unexpectedSolidusInTag),this.state=M.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Te;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Re.DASH_DASH,!0)?(this._createCommentToken(Re.DASH_DASH.length+1),this.state=M.COMMENT_START):this._consumeSequenceIfMatch(Re.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Re.DOCTYPE.length+1),this.state=M.DOCTYPE):this._consumeSequenceIfMatch(Re.CDATA_START,!0)?this.inForeignNode?this.state=M.CDATA_SECTION:(this._err(G.cdataInHtmlContent),this._createCommentToken(Re.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=M.BOGUS_COMMENT):this._ensureHibernation()||(this._err(G.incorrectlyOpenedComment),this._createCommentToken(2),this.state=M.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=M.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptClosingOfEmptyComment),this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=M.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.data+=Te;break}case L.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 L.EXCLAMATION_MARK:{n.data+="!",this.state=M.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=M.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=M.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=M.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=M.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(G.nestedComment),this.state=M.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=M.COMMENT_END;break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=M.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=M.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=M.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(G.incorrectlyClosedComment),this.state=M.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(G.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=M.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.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=M.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(dn(t))this._createDoctypeToken(String.fromCharCode(Zn(t))),this.state=M.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(G.unexpectedNullCharacter),this._createDoctypeToken(Te),this.state=M.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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=M.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.name+=Te;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(dn(t)?Zn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Re.PUBLIC,!1)?this.state=M.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Re.SYSTEM,!1)?this.state=M.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(G.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=M.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Te;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.publicId+=Te;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=M.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(G.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=M.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(G.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Te;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.APOSTROPHE:{this.state=M.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(G.unexpectedNullCharacter),n.systemId+=Te;break}case L.GREATER_THAN_SIGN:{this._err(G.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.EOF:{this._err(G.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(G.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=M.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=M.DATA;break}case L.NULL:{this._err(G.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=M.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(G.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=M.CDATA_SECTION_END:(this._emitChars("]"),this.state=M.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=M.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=M.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(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&yo(this.preprocessor.peek(1))?M.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){yo(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(G.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const So=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Ao=new Set([...So,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),er=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),z0=new Set([...er,d.OL,d.UL]),V0=new Set([...er,d.BUTTON]),_o=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),ko=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),G0=new Set([d.TR,d.TEMPLATE,d.HTML]),Y0=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),W0=new Set([d.TABLE,d.TEMPLATE,d.HTML]),j0=new Set([d.TD,d.TH]);class X0{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=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.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])!==W.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(ga,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(j0,W.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(W0,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Y0,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(G0,W.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]===d.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]===d.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 W.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case W.SVG:{if(ko.has(a))return!1;break}case W.MATHML:{if(_o.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,er)}hasInListItemScope(t){return this.hasInDynamicScope(t,z0)}hasInButtonScope(t){return this.hasInDynamicScope(t,V0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(ga.has(n))return!0;if(er.has(n))return!1;break}case W.SVG:{if(ko.has(n))return!1;break}case W.MATHML:{if(_o.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&So.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ao.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ao.has(this.currentTagId);)this.pop()}}const Ea=3;var tt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(tt||(tt={}));const vo={type:tt.Marker};class K0{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 u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===tt.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const m=this.treeAdapter.getAttrList(l);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ea)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ea)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>a.get(o.name)===o.value)&&(i+=1,i>=Ea&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(vo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:tt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:tt.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(vo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===tt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===tt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===tt.Element&&n.element===t)}}const gt={createDocument(){return{nodeName:"#document",mode:Ge.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};gt.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(gt.isTextNode(n)){n.value+=t;return}}gt.appendChild(e,gt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&gt.isTextNode(r)?r.value+=t:gt.insertBefore(e,gt.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}}},No="html",Q0="about:legacy-compat",J0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",wo=["+//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//"],Z0=[...wo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],em=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Io=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],tm=[...Io,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Lo(e,t){return t.some(n=>e.startsWith(n))}function nm(e){return e.name===No&&e.publicId===null&&(e.systemId===null||e.systemId===Q0)}function rm(e){if(e.name!==No)return Ge.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===J0)return Ge.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),em.has(n))return Ge.QUIRKS;let r=t===null?Z0:wo;if(Lo(n,r))return Ge.QUIRKS;if(r=t===null?Io:tm,Lo(n,r))return Ge.LIMITED_QUIRKS}return Ge.NO_QUIRKS}const Oo={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},am="definitionurl",im="definitionURL",sm=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])),om=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),um=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])),lm=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function cm(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===_t.COLOR||r===_t.SIZE||r===_t.FACE)||lm.has(t)}function Do(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===am){e.attrs[t].name=im;break}}function Po(e){for(let t=0;t<e.attrs.length;t++){const n=sm.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ba(e){for(let t=0;t<e.attrs.length;t++){const n=om.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 dm(e){const t=um.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=$t(e.tagName))}function fm(e,t){return t===W.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function pm(e,t,n){if(t===W.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===_t.ENCODING){const a=n[r].value.toLowerCase();return a===Oo.TEXT_HTML||a===Oo.APPLICATION_XML}}return t===W.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function hm(e,t,n,r){return(!r||r===W.HTML)&&pm(e,t,n)||(!r||r===W.MATHML)&&fm(e,t)}const mm="hidden",gm=8,Em=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 bm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Mo=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),Bo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gt,onParseError:null};class Ro{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={...Bo,...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 q0(this.options,this),this.activeFormattingElements=new K0(this.treeAdapter),this.fragmentContextID=r?$t(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new X0(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={...Bo,...n};t??(t=r.treeAdapter.createElement(q.TEMPLATE,W.HTML,[]));const a=r.treeAdapter.createElement("documentmock",W.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===d.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:bm,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)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.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=Ce.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)===q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ce.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.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(q.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.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:o,endCol:l,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:m})}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===oe.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===d.SVG&&this.treeAdapter.getTagName(n)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case oe.CHARACTER:{this.onCharacter(t);break}case oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case oe.COMMENT:{this.onComment(t);break}case oe.DOCTYPE:{this.onDoctype(t);break}case oe.START_TAG:{this._processStartTag(t);break}case oe.END_TAG:{this.onEndTag(t);break}case oe.EOF:{this.onEof(t);break}case oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return hm(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===tt.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(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=F.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=F.IN_TABLE;return}case d.BODY:{this.insertionMode=F.IN_BODY;return}case d.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case d.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===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return Mo.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 d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.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 F0[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){jg(this,t);return}switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{Ho(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:{Ca(this,t);break}case F.IN_TABLE_TEXT:{Wo(this,t);break}case F.IN_COLUMN_GROUP:{rr(this,t);break}case F.AFTER_BODY:{sr(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Wg(this,t);return}switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ca(this,t);break}case F.IN_COLUMN_GROUP:{rr(this,t);break}case F.AFTER_BODY:{sr(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ya(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:{ya(this,t);break}case F.IN_TABLE_TEXT:{yn(this,t);break}case F.AFTER_BODY:{_m(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{km(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{vm(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:{yn(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)?Xg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{Nm(this,t);break}case F.BEFORE_HEAD:{Im(this,t);break}case F.IN_HEAD:{je(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Dm(this,t);break}case F.AFTER_HEAD:{Mm(this,t);break}case F.IN_BODY:{Ie(this,t);break}case F.IN_TABLE:{Ut(this,t);break}case F.IN_TABLE_TEXT:{yn(this,t);break}case F.IN_CAPTION:{Lg(this,t);break}case F.IN_COLUMN_GROUP:{Sa(this,t);break}case F.IN_TABLE_BODY:{ar(this,t);break}case F.IN_ROW:{ir(this,t);break}case F.IN_CELL:{Pg(this,t);break}case F.IN_SELECT:{Ko(this,t);break}case F.IN_SELECT_IN_TABLE:{Bg(this,t);break}case F.IN_TEMPLATE:{Fg(this,t);break}case F.AFTER_BODY:{$g(this,t);break}case F.IN_FRAMESET:{Ug(this,t);break}case F.AFTER_FRAMESET:{zg(this,t);break}case F.AFTER_AFTER_BODY:{Gg(this,t);break}case F.AFTER_AFTER_FRAMESET:{Yg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Kg(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{wm(this,t);break}case F.BEFORE_HEAD:{Lm(this,t);break}case F.IN_HEAD:{Om(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Pm(this,t);break}case F.AFTER_HEAD:{Bm(this,t);break}case F.IN_BODY:{nr(this,t);break}case F.TEXT:{xg(this,t);break}case F.IN_TABLE:{bn(this,t);break}case F.IN_TABLE_TEXT:{yn(this,t);break}case F.IN_CAPTION:{Og(this,t);break}case F.IN_COLUMN_GROUP:{Dg(this,t);break}case F.IN_TABLE_BODY:{Aa(this,t);break}case F.IN_ROW:{Xo(this,t);break}case F.IN_CELL:{Mg(this,t);break}case F.IN_SELECT:{Qo(this,t);break}case F.IN_SELECT_IN_TABLE:{Rg(this,t);break}case F.IN_TEMPLATE:{Hg(this,t);break}case F.AFTER_BODY:{Zo(this,t);break}case F.IN_FRAMESET:{qg(this,t);break}case F.AFTER_FRAMESET:{Vg(this,t);break}case F.AFTER_AFTER_BODY:{or(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{fn(this,t);break}case F.BEFORE_HTML:{pn(this,t);break}case F.BEFORE_HEAD:{hn(this,t);break}case F.IN_HEAD:{mn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{gn(this,t);break}case F.AFTER_HEAD:{En(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:{Go(this,t);break}case F.TEXT:{Cg(this,t);break}case F.IN_TABLE_TEXT:{yn(this,t);break}case F.IN_TEMPLATE:{Jo(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:{xa(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.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:{Fo(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ca(this,t);break}case F.IN_TABLE_TEXT:{Yo(this,t);break}}}}function Tm(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):Vo(e,t),n}function ym(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 xm(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 u=e.activeFormattingElements.getElementEntry(s),o=u&&i>=Em;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=Cm(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function Cm(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 Sm(e,t,n){const r=e.treeAdapter.getTagName(t),a=$t(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===d.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Am(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 Ta(e,t){for(let n=0;n<gm;n++){const r=Tm(e,t);if(!r)break;const a=ym(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=xm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&Sm(e,s,i),Am(e,a,r)}}function ya(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _m(e,t){e._appendCommentNode(t,e.openElements.items[0])}function km(e,t){e._appendCommentNode(t,e.document)}function xa(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 vm(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ge.QUIRKS:rm(t);nm(t)||e._err(t,G.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function fn(e,t){e._err(t,G.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ge.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function Nm(e,t){t.tagID===d.HTML?(e._insertElement(t,W.HTML),e.insertionMode=F.BEFORE_HEAD):pn(e,t)}function wm(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&pn(e,t)}function pn(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function Im(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:hn(e,t)}}function Lm(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?hn(e,t):e._err(t,G.endTagWithoutMatchingOpenElement)}function hn(e,t){e._insertFakeElement(q.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function je(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ce.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ce.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ce.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ce.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case d.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:mn(e,t)}}function Om(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{mn(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function kt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,G.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,G.endTagWithoutMatchingOpenElement)}function mn(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function Dm(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{je(e,t);break}case d.NOSCRIPT:{e._err(t,G.nestedNoscriptInHead);break}default:gn(e,t)}}function Pm(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case d.BR:{gn(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function gn(e,t){const n=t.type===oe.EOF?G.openElementsLeftAfterEof:G.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function Mm(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,G.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),je(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,G.misplacedStartTagForHeadElement);break}default:En(e,t)}}function Bm(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{En(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:e._err(t,G.endTagWithoutMatchingOpenElement)}}function En(e,t){e._insertFakeElement(q.BODY,d.BODY),e.insertionMode=F.IN_BODY,tr(e,t)}function tr(e,t){switch(t.type){case oe.CHARACTER:{Ho(e,t);break}case oe.WHITESPACE_CHARACTER:{Fo(e,t);break}case oe.COMMENT:{ya(e,t);break}case oe.START_TAG:{Ie(e,t);break}case oe.END_TAG:{nr(e,t);break}case oe.EOF:{Go(e,t);break}}}function Fo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ho(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Rm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Fm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Hm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET)}function $m(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Um(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ga.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function qm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function zm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function Vm(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===d.LI&&a===d.LI||(n===d.DD||n===d.DT)&&(a===d.DD||a===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==d.ADDRESS&&a!==d.DIV&&a!==d.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Gm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ce.PLAINTEXT}function Ym(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function Wm(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(Ta(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Xm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(Ta(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Km(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qm(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ge.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function $o(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Uo(e){const t=To(e,_t.TYPE);return t!=null&&t.toLowerCase()===mm}function Jm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Uo(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Zm(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function eg(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tg(e,t){t.tagName=q.IMG,t.tagID=d.IMG,$o(e,t)}function ng(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ce.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function rg(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function ag(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function qo(e,t){e._switchToTextParsing(t,Ce.RAWTEXT)}function ig(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.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 sg(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function og(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function ug(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,W.HTML)}function lg(e,t){e._reconstructActiveFormattingElements(),Do(t),ba(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function cg(e,t){e._reconstructActiveFormattingElements(),Po(t),ba(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function zo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Ie(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{jm(e,t);break}case d.A:{Wm(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{Um(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{$m(e,t);break}case d.LI:case d.DD:case d.DT:{Vm(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{$o(e,t);break}case d.HR:{eg(e,t);break}case d.RB:case d.RTC:{og(e,t);break}case d.RT:case d.RP:{ug(e,t);break}case d.PRE:case d.LISTING:{qm(e,t);break}case d.XMP:{rg(e,t);break}case d.SVG:{cg(e,t);break}case d.HTML:{Rm(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{je(e,t);break}case d.BODY:{Fm(e,t);break}case d.FORM:{zm(e,t);break}case d.NOBR:{Xm(e,t);break}case d.MATH:{lg(e,t);break}case d.TABLE:{Qm(e,t);break}case d.INPUT:{Jm(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{Zm(e,t);break}case d.IMAGE:{tg(e,t);break}case d.BUTTON:{Ym(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{Km(e,t);break}case d.IFRAME:{ag(e,t);break}case d.SELECT:{ig(e,t);break}case d.OPTION:case d.OPTGROUP:{sg(e,t);break}case d.NOEMBED:case d.NOFRAMES:{qo(e,t);break}case d.FRAMESET:{Hm(e,t);break}case d.TEXTAREA:{ng(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?qo(e,t):zo(e,t);break}case d.PLAINTEXT:{Gm(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:zo(e,t)}}function dg(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function fg(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,Zo(e,t))}function pg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function hg(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function mg(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(q.P,d.P),e._closePElement()}function gg(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function Eg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function bg(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Tg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function yg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Vo(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!==d.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 nr(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{Ta(e,t);break}case d.P:{mg(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{pg(e,t);break}case d.LI:{gg(e);break}case d.DD:case d.DT:{Eg(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{bg(e);break}case d.BR:{yg(e);break}case d.BODY:{dg(e,t);break}case d.HTML:{fg(e,t);break}case d.FORM:{hg(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{Tg(e,t);break}case d.TEMPLATE:{kt(e,t);break}default:Vo(e,t)}}function Go(e,t){e.tmplInsertionModeStack.length>0?Jo(e,t):xa(e,t)}function xg(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Cg(e,t){e._err(t,G.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ca(e,t){if(e.openElements.currentTagId!==void 0&&Mo.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 oe.CHARACTER:{Wo(e,t);break}case oe.WHITESPACE_CHARACTER:{Yo(e,t);break}}else Tn(e,t)}function Sg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CAPTION}function Ag(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function _g(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,d.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,Sa(e,t)}function kg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_TABLE_BODY}function vg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,d.TBODY),e.insertionMode=F.IN_TABLE_BODY,ar(e,t)}function Ng(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wg(e,t){Uo(t)?e._appendElement(t,W.HTML):Tn(e,t),t.ackSelfClosing=!0}function Ig(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ut(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{vg(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{je(e,t);break}case d.COL:{_g(e,t);break}case d.FORM:{Ig(e,t);break}case d.TABLE:{Ng(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{kg(e,t);break}case d.INPUT:{wg(e,t);break}case d.CAPTION:{Sg(e,t);break}case d.COLGROUP:{Ag(e,t);break}default:Tn(e,t)}}function bn(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{kt(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Tn(e,t)}}function Tn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,tr(e,t),e.fosterParentingEnabled=n}function Yo(e,t){e.pendingCharacterTokens.push(t)}function Wo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function yn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Tn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const jo=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function Lg(e,t){const n=t.tagID;jo.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Ut(e,t)):Ie(e,t)}function Og(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===d.TABLE&&bn(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:nr(e,t)}}function Sa(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{je(e,t);break}default:rr(e,t)}}function Dg(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TEMPLATE:{kt(e,t);break}case d.COL:break;default:rr(e,t)}}function rr(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function ar(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,d.TR),e.insertionMode=F.IN_ROW,ir(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Ut(e,t));break}default:Ut(e,t)}}function Aa(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,bn(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:bn(e,t)}}function ir(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,ar(e,t));break}default:Ut(e,t)}}function Xo(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Aa(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Aa(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:bn(e,t)}}function Pg(e,t){const n=t.tagID;jo.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),ir(e,t)):Ie(e,t)}function Mg(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Xo(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:nr(e,t)}}function Ko(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{je(e,t);break}}}function Qo(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{kt(e,t);break}}}function Bg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ko(e,t)}function Rg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Qo(e,t)}function Fg(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{je(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Ut(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,Sa(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,ar(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,ir(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Ie(e,t)}}function Hg(e,t){t.tagID===d.TEMPLATE&&kt(e,t)}function Jo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xa(e,t)}function $g(e,t){t.tagID===d.HTML?Ie(e,t):sr(e,t)}function Zo(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.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 sr(e,t)}function sr(e,t){e.insertionMode=F.IN_BODY,tr(e,t)}function Ug(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.FRAMESET:{e._insertElement(t,W.HTML);break}case d.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{je(e,t);break}}}function qg(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function zg(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.NOFRAMES:{je(e,t);break}}}function Vg(e,t){t.tagID===d.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function Gg(e,t){t.tagID===d.HTML?Ie(e,t):or(e,t)}function or(e,t){e.insertionMode=F.IN_BODY,tr(e,t)}function Yg(e,t){switch(t.tagID){case d.HTML:{Ie(e,t);break}case d.NOFRAMES:{je(e,t);break}}}function Wg(e,t){t.chars=Te,e._insertCharacters(t)}function jg(e,t){e._insertCharacters(t),e.framesetOk=!1}function eu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Xg(e,t){if(cm(t))eu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?Do(t):r===W.SVG&&(dm(t),Po(t)),ba(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Kg(e,t){if(t.tagID===d.P||t.tagID===d.BR){eu(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)===W.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const Qg=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Jg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),tu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function nu(e,t){const n=uE(e),r=ho("type",{handlers:{root:Zg,element:eE,text:tE,comment:au,doctype:nE,raw:aE},unknown:iE}),a={parser:n?new Ro(tu):Ro.getFragmentParser(void 0,tu),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),qt(a,Qe());const i=n?a.parser.document:a.parser.getFragment(),s=l0(i,{file:a.options.file});return a.stitches&&Kn(s,"comment",function(u,o,l){const m=u;if(m.value.stitch&&l&&o!==void 0){const f=l.children;return f[o]=m.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function ru(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Zg(e,t){ru(e.children,t)}function eE(e,t){sE(e,t),ru(e.children,t),oE(e,t)}function tE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:oe.CHARACTER,chars:e.value,location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function nE(e,t){const n={type:oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function rE(e,t){t.stitches=!0;const n=lE(e);if("children"in e&&"children"in n){const r=nu({type:"root",children:e.children},t.options);n.children=r.children}au({type:"comment",value:{stitch:n}},t)}function au(e,t){const n=e.value,r={type:oe.COMMENT,data:n,location:xn(e)};qt(t,Qe(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function aE(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,iu(t,Qe(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qg,"&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 iE(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))rE(n,t);else{let r="";throw Jg.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 qt(e,t){iu(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=Ce.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 iu(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 sE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ce.PLAINTEXT)return;qt(t,Qe(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:At.html;a===At.html&&n==="svg"&&(a=At.svg);const i=h0({...e,children:[]},{space:a===At.svg?"svg":"html"}),s={type:oe.START_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:xn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function oE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&C0.includes(n)||t.parser.tokenizer.state===Ce.PLAINTEXT)return;qt(t,qn(e));const r={type:oe.END_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ce.RCDATA||t.parser.tokenizer.state===Ce.RAWTEXT||t.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ce.DATA)}function uE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xn(e){const t=Qe(e)||{line:void 0,column:void 0,offset:void 0},n=qn(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 lE(e){return"children"in e?St({...e,children:[]}):St(e)}function _a(e){return function(t,n){return nu(t,{...e,file:n})}}const vt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...vt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...vt],h2:[["className","sr-only"]],img:[...vt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...vt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...vt],table:[...vt],ul:[...vt,["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"]},Et={}.hasOwnProperty;function cE(e,t){let n={type:"root",children:[]};const r={schema:t?{...zt,...t}:zt,stack:[]},a=su(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function su(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return dE(e,n);case"doctype":return fE(e,n);case"element":return pE(e,n);case"root":return hE(e,n);case"text":return mE(e,n)}}}function dE(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 Cn(i,t),i}}function fE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Cn(n,t),n}}function pE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ou(e,t.children),a=gE(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&&Et.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(i=!1;++o<u.length;)e.stack.includes(u[o])&&(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 Cn(s,t),s}function hE(e,t){const r={type:"root",children:ou(e,t.children)};return Cn(r,t),r}function mE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Cn(r,t),r}function ou(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=su(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function gE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&Et.call(r,n)?r[n]:void 0,s=r&&Et.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let l;for(l in u)if(Et.call(u,l)){const m=u[l];let f=uu(e,cu(i,l),l,m);f==null&&(f=uu(e,cu(s,l),l,m)),f!=null&&(o[l]=f)}if(a&&Et.call(a,n)){const m=a[n];for(l in m)Et.call(m,l)&&!Et.call(o,l)&&(o[l]=m[l])}return o}function uu(e,t,n,r){return t?Array.isArray(r)?EE(e,t,n,r):lu(e,t,n,r):void 0}function EE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=lu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function lu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&bE(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 bE(e,t,n){const r=e.schema.protocols&&Et.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("?"),u=a.indexOf("#"),o=a.indexOf("/");if(i<0||o>-1&&i>o||s>-1&&i>s||u>-1&&i>u)return!0;let l=-1;for(;++l<r.length;){const m=r[l];if(i===m.length&&a.slice(0,m.length)===m)return!0}return!1}function Cn(e,t){const n=ns(t);t.data&&(e.data=St(t.data)),n&&(e.position=n)}function cu(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 ka(e){return function(t){return cE(t,e)}}function du(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 TE=["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"],fu={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 pu(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function yE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function xE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function hu(e){return xE(e)||pu(e)}const CE=["","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 va(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,u="",o,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,o=n.position.start):o=n.position);let m=(o?o.line:0)||1,f=(o?o.column:0)||1,E=c(),h;for(i--;++i<=e.length;)if(h===10&&(f=(l?l[s]:0)||1),h=e.charCodeAt(i),h===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){u+=String.fromCharCode(h),f++;continue}const T=i+1;let y=T,x=T,S;if(g===35){x=++y;const H=e.charCodeAt(x);H===88||H===120?(S="hexadecimal",x=++y):S="decimal"}else S="named";let _="",N="",A="";const I=S==="named"?hu:S==="decimal"?pu:yE;for(x--;++x<=e.length;){const H=e.charCodeAt(x);if(!I(H))break;A+=String.fromCharCode(H),S==="named"&&TE.includes(A)&&(_=A,N=rn(A))}let O=e.charCodeAt(x)===59;if(O){x++;const H=S==="named"?rn(A):!1;H&&(_=A,N=H)}let w=1+x-T,P="";if(!(!O&&n.nonTerminated===!1))if(!A)S!=="named"&&p(4,w);else if(S==="named"){if(O&&!N)p(5,1);else if(_!==A&&(x=y+_.length,w=1+x-y,O=!1),!O){const H=_?1:3;if(n.attribute){const v=e.charCodeAt(x);v===61?(p(H,w),N=""):hu(v)?N="":p(H,w)}else p(H,w)}P=N}else{O||p(2,w);let H=Number.parseInt(A,S==="hexadecimal"?16:10);if(SE(H))p(7,w),P="�";else if(H in fu)p(6,w),P=fu[H];else{let v="";AE(H)&&p(6,w),H>65535&&(H-=65536,v+=String.fromCharCode(H>>>10|55296),H=56320|H&1023),P=v+String.fromCharCode(H)}}if(P){b(),E=c(),i=x-1,f+=x-T+1,a.push(P);const H=c();H.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,P,{start:E,end:H},e.slice(T-1,x)),E=H}else A=e.slice(T-1,x),u+=A,f+=A.length,i=x-1}else h===10&&(m++,s++,f=0),Number.isNaN(h)?b():(u+=String.fromCharCode(h),f++);return a.join("");function c(){return{line:m,column:f,offset:i+((o?o.offset:0)||0)}}function p(g,T){let y;n.warning&&(y=c(),y.column+=T,y.offset+=T,n.warning.call(n.warningContext||void 0,CE[g],y,g))}function b(){u&&(a.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:E,end:c()}),u="")}}function SE(e){return e>=55296&&e<=57343||e>1114111}function AE(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 _E=/["&'<>`]/g,kE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,NE=/[|\\{}()[\]^$+*?.]/g,mu=new WeakMap;function wE(e,t){if(e=e.replace(t.subset?IE(t.subset):_E,r),t.subset||t.escapeOnly)return e;return e.replace(kE,n).replace(vE,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 IE(e){let t=mu.get(e);return t||(t=LE(e),mu.set(e,t)),t}function LE(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(NE,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function OE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function DE(e,t){return wE(e,Object.assign({format:OE},t))}const PE={}.hasOwnProperty,ME={},gu=/^[^\t\n\r "#'.<=>`}]+$/,BE=/^[^\t\n\r "'<=>`}]+$/;function RE(){return{canContainEols:["textDirective"],enter:{directiveContainer:HE,directiveContainerAttributes:Ia,directiveContainerLabel:qE,directiveLeaf:$E,directiveLeafAttributes:Ia,directiveText:UE,directiveTextAttributes:Ia},exit:{directiveContainer:Ba,directiveContainerAttributeClassValue:Oa,directiveContainerAttributeIdValue:La,directiveContainerAttributeName:Pa,directiveContainerAttributeValue:Da,directiveContainerAttributes:Ma,directiveContainerLabel:zE,directiveContainerName:wa,directiveLeaf:Ba,directiveLeafAttributeClassValue:Oa,directiveLeafAttributeIdValue:La,directiveLeafAttributeName:Pa,directiveLeafAttributeValue:Da,directiveLeafAttributes:Ma,directiveLeafName:wa,directiveText:Ba,directiveTextAttributeClassValue:Oa,directiveTextAttributeIdValue:La,directiveTextAttributeName:Pa,directiveTextAttributeValue:Da,directiveTextAttributes:Ma,directiveTextName:wa}}}function FE(e){const t=ME;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=VE,{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,u,o){const l=u.createTracker(o),m=GE(i),f=u.enter(i.type);let E=l.move(m+(i.name||"")),h;if(i.type==="containerDirective"){const c=(i.children||[])[0];h=Eu(c)?c:void 0}else h=i;if(h&&h.children&&h.children.length>0){const c=u.enter("label"),p=`${i.type}Label`,b=u.enter(p);E+=l.move("["),E+=l.move(u.containerPhrasing(h,{...l.current(),before:E,after:"]"})),E+=l.move("]"),b(),c()}if(E+=l.move(r(i,u)),i.type==="containerDirective"){const c=(i.children||[])[0];let p=i;Eu(c)&&(p=Object.assign({},i,{children:i.children.slice(1)})),p&&p.children&&p.children.length>0&&(E+=l.move(`
58
+ `),E+=l.move(u.containerFlow(p,l.current()))),E+=l.move(`
59
+ `+m)}return f(),E}function r(i,s){const u=i.attributes||{},o=[];let l,m,f,E;for(E in u)if(PE.call(u,E)&&u[E]!==void 0&&u[E]!==null){const h=String(u[E]);if(E==="id")f=t.preferShortcut!==!1&&gu.test(h)?"#"+h:a("id",h,i,s);else if(E==="class"){const c=h.split(/[\t\n\r ]+/g),p=[],b=[];let g=-1;for(;++g<c.length;)(t.preferShortcut!==!1&&gu.test(c[g])?b:p).push(c[g]);l=p.length>0?a("class",p.join(" "),i,s):"",m=b.length>0?"."+b.join("."):""}else o.push(a(E,h,i,s))}return l&&o.unshift(l),m&&o.unshift(m),f&&o.unshift(f),o.length>0?"{"+o.join(" ")+"}":""}function a(i,s,u,o){if(t.collapseEmptyAttributes!==!1&&!s)return i;if(t.preferUnquoted&&BE.test(s))return i+"="+s;const l=t.quote||o.options.quote||'"',m=l==='"'?"'":'"',f=t.quoteSmart&&du(s,l)>du(s,m)?m:l,E=u.type==="textDirective"?[f]:[f,`
60
+ `,"\r"];return i+"="+f+DE(s,{subset:E})+f}}function HE(e){Na.call(this,"containerDirective",e)}function $E(e){Na.call(this,"leafDirective",e)}function UE(e){Na.call(this,"textDirective",e)}function Na(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function wa(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function qE(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function zE(e){this.exit(e)}function Ia(){this.data.directiveAttributes=[],this.buffer()}function La(e){this.data.directiveAttributes.push(["id",va(this.sliceSerialize(e),{attribute:!0})])}function Oa(e){this.data.directiveAttributes.push(["class",va(this.sliceSerialize(e),{attribute:!0})])}function Da(e){const t=this.data.directiveAttributes;t[t.length-1][1]=va(this.sliceSerialize(e),{attribute:!0})}function Pa(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ma(){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 Ba(e){this.exit(e)}function VE(){return":"}function Eu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function GE(e){let t=0;return e.type==="containerDirective"?(js(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 Ra(e,t,n,r,a,i,s,u,o,l,m,f,E,h,c){let p,b;return g;function g(C){return e.enter(r),e.enter(a),e.consume(C),e.exit(a),T}function T(C){return C===35?(p=s,y(C)):C===46?(p=u,y(C)):c&&de(C)?fe(e,T,"whitespace")(C):!c&&xe(C)?at(e,T)(C):C===null||Z(C)||sn(C)||an(C)&&C!==45&&C!==95?v(C):(e.enter(i),e.enter(o),e.consume(C),_)}function y(C){const B=p+"Marker";return e.enter(i),e.enter(p),e.enter(B),e.consume(C),e.exit(B),x}function x(C){if(C===null||C===34||C===35||C===39||C===46||C===60||C===61||C===62||C===96||C===125||xe(C))return n(C);const B=p+"Value";return e.enter(B),e.consume(C),S}function S(C){if(C===null||C===34||C===39||C===60||C===61||C===62||C===96)return n(C);if(C===35||C===46||C===125||xe(C)){const B=p+"Value";return e.exit(B),e.exit(p),e.exit(i),T(C)}return e.consume(C),S}function _(C){return C===null||Z(C)||sn(C)||an(C)&&C!==45&&C!==46&&C!==58&&C!==95?(e.exit(o),c&&de(C)?fe(e,N,"whitespace")(C):!c&&xe(C)?at(e,N)(C):N(C)):(e.consume(C),_)}function N(C){return C===61?(e.enter(l),e.consume(C),e.exit(l),A):(e.exit(i),T(C))}function A(C){return C===null||C===60||C===61||C===62||C===96||C===125||c&&Z(C)?n(C):C===34||C===39?(e.enter(m),e.enter(E),e.consume(C),e.exit(E),b=C,O):c&&de(C)?fe(e,A,"whitespace")(C):!c&&xe(C)?at(e,A)(C):(e.enter(f),e.enter(h),e.consume(C),b=void 0,I)}function I(C){return C===null||C===34||C===39||C===60||C===61||C===62||C===96?n(C):C===125||xe(C)?(e.exit(h),e.exit(f),e.exit(i),T(C)):(e.consume(C),I)}function O(C){return C===b?(e.enter(E),e.consume(C),e.exit(E),e.exit(m),e.exit(i),H):(e.enter(f),w(C))}function w(C){return C===b?(e.exit(f),O(C)):C===null?n(C):Z(C)?c?n(C):at(e,w)(C):(e.enter(h),e.consume(C),P)}function P(C){return C===b||C===null||Z(C)?(e.exit(h),w(C)):(e.consume(C),P)}function H(C){return C===125||xe(C)?T(C):v(C)}function v(C){return C===125?(e.enter(a),e.consume(C),e.exit(a),e.exit(r),t):n(C)}}function Fa(e,t,n,r,a,i,s){let u=0,o=0,l;return m;function m(b){return e.enter(r),e.enter(a),e.consume(b),e.exit(a),f}function f(b){return b===93?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(i),E(b))}function E(b){if(b===93&&!o)return p(b);const g=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=g),l=g,h(b)}function h(b){return b===null||u>999||b===91&&++o>32?n(b):b===93&&!o--?(e.exit("chunkText"),p(b)):Z(b)?s?n(b):(e.consume(b),e.exit("chunkText"),E):(e.consume(b),b===92?c:h)}function c(b){return b===91||b===92||b===93?(e.consume(b),u++,h):h(b)}function p(b){return e.exit(i),e.enter(a),e.consume(b),e.exit(a),e.exit(r),t}}function Ha(e,t,n,r){const a=this;return i;function i(u){return u===null||Z(u)||an(u)||sn(u)?n(u):(e.enter(r),e.consume(u),s)}function s(u){return u===null||Z(u)||sn(u)||an(u)&&u!==45&&u!==95?(e.exit(r),a.previous===45||a.previous===95?n(u):t(u)):(e.consume(u),s)}}const YE={tokenize:XE,concrete:!0},WE={tokenize:KE,partial:!0},jE={tokenize:QE,partial:!0},ur={tokenize:JE,partial:!0};function XE(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,u;return o;function o(I){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(I)}function l(I){return I===58?(e.consume(I),s++,l):s<3?n(I):(e.exit("directiveContainerSequence"),Ha.call(r,e,m,n,"directiveContainerName")(I))}function m(I){return I===91?e.attempt(WE,f,f)(I):f(I)}function f(I){return I===123?e.attempt(jE,E,E)(I):E(I)}function E(I){return fe(e,h,"whitespace")(I)}function h(I){return e.exit("directiveContainerFence"),I===null?N(I):Z(I)?r.interrupt?t(I):e.attempt(ur,c,N)(I):n(I)}function c(I){return I===null?N(I):Z(I)?e.check(ur,y,N)(I):(e.enter("directiveContainerContent"),p(I))}function p(I){return e.attempt({tokenize:A,partial:!0},_,i?fe(e,b,"linePrefix",i+1):b)(I)}function b(I){return I===null?_(I):Z(I)?e.check(ur,T,_)(I):T(I)}function g(I){if(I===null){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,_(I)}return Z(I)?e.check(ur,x,S)(I):(e.consume(I),g)}function T(I){const O=e.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=O),u=O,g(I)}function y(I){return e.enter("directiveContainerContent"),p(I)}function x(I){e.consume(I);const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,p}function S(I){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,_(I)}function _(I){return e.exit("directiveContainerContent"),N(I)}function N(I){return e.exit("directiveContainer"),t(I)}function A(I,O,w){let P=0;return fe(I,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function H(B){return I.enter("directiveContainerFence"),I.enter("directiveContainerSequence"),v(B)}function v(B){return B===58?(I.consume(B),P++,v):P<s?w(B):(I.exit("directiveContainerSequence"),fe(I,C,"whitespace")(B))}function C(B){return B===null||Z(B)?(I.exit("directiveContainerFence"),O(B)):w(B)}}}function KE(e,t,n){return Fa(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function QE(e,t,n){return Ra(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function JE(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 ZE={tokenize:n1},e1={tokenize:r1,partial:!0},t1={tokenize:a1,partial:!0};function n1(e,t,n){const r=this;return a;function a(m){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(m),i}function i(m){return m===58?(e.consume(m),e.exit("directiveLeafSequence"),Ha.call(r,e,s,n,"directiveLeafName")):n(m)}function s(m){return m===91?e.attempt(e1,u,u)(m):u(m)}function u(m){return m===123?e.attempt(t1,o,o)(m):o(m)}function o(m){return fe(e,l,"whitespace")(m)}function l(m){return m===null||Z(m)?(e.exit("directiveLeaf"),t(m)):n(m)}}function r1(e,t,n){return Fa(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function a1(e,t,n){return Ra(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const i1={tokenize:l1,previous:u1},s1={tokenize:c1,partial:!0},o1={tokenize:d1,partial:!0};function u1(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function l1(e,t,n){const r=this;return a;function a(o){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(o),e.exit("directiveTextMarker"),Ha.call(r,e,i,n,"directiveTextName")}function i(o){return o===58?n(o):o===91?e.attempt(s1,s,s)(o):s(o)}function s(o){return o===123?e.attempt(o1,u,u)(o):u(o)}function u(o){return e.exit("directiveText"),t(o)}}function c1(e,t,n){return Fa(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function d1(e,t,n){return Ra(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function f1(){return{text:{58:i1},flow:{58:[YE,ZE]}}}function $a(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(f1()),r.push(RE()),a.push(FE())}const Ua={...zt,attributes:{...zt.attributes||{},span:[...(zt.attributes||{}).span||[],"style"],font:[...(zt.attributes||{}).font||[],"color"]}},qa=()=>e=>{Kn(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",u=r.bold,l=`${u===!0||u==="true"||u===1||u==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},p1=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}}},h1=({config:e,files:t,debugTooltipSticky:n=!1})=>{const[r,a]=D.useState(null),[i,s]=D.useState(!1),u=D.useRef(null),o=D.useRef(null),l=D.useRef(null),m=200,f=200,E=D.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),o.current&&(window.clearTimeout(o.current),o.current=null),l.current!==null&&(window.cancelAnimationFrame(l.current),l.current=null)},[]),h=D.useCallback(()=>{E(),s(!0)},[E]),c=D.useCallback(O=>{if(E(),O){a(O),s(!1),l.current=window.requestAnimationFrame(()=>{l.current=null,s(!0)});return}u.current=window.setTimeout(()=>{u.current=null,s(!1),o.current=window.setTimeout(()=>{a(null),o.current=null},f)},m)},[E]);D.useEffect(()=>()=>{E()},[E]);const[p,b]=D.useState(0),g=D.useRef(null),[T,y]=D.useState(!1),x=D.useRef(new Map),[S,_]=D.useState(357),[N,A]=D.useState("bottom");return D.useEffect(()=>{b(0),y(!1),A("bottom")},[r?.key,r?.type]),D.useEffect(()=>{const O=x.current,w=new Set,P=H=>{if(!H||w.has(H)||O.has(H))return;w.add(H);const v=new window.Image;v.decoding="async",v.onload=()=>{const C=v.naturalWidth||v.width||0,B=v.naturalHeight||v.height||0;C>0&&B>0&&O.set(H,`${C} / ${B}`)},v.src=H};e.forEach(H=>{const v=H.tooltip;if(!v)return;const B=typeof v=="string"?(()=>{try{return JSON.parse(v)}catch{return null}})():v;if(!B||B.type!=="steps")return;const $=B.images;Array.isArray($)&&$.forEach(U=>{typeof U=="string"&&P(U)})})},[e]),D.useLayoutEffect(()=>{if(!i)return;if(r?.type!=="upload"&&r?.type!=="tag"&&r?.type!=="variable"){_(null);return}const O=requestAnimationFrame(()=>{const w=document.querySelector(".rte-steps-tooltip"),P=document.querySelector(".rte-steps-tooltip-title"),H=document.querySelector(".rte-steps-tooltip-step-badge");if(!w||!P||!H)return;const v=window.getComputedStyle(w),C=Number.parseFloat(v.paddingLeft)||0,B=Number.parseFloat(v.paddingRight)||0,$=Math.ceil(P.getBoundingClientRect().width||0),U=Math.ceil(H.getBoundingClientRect().width||0),k=$+16+U+Math.ceil(C+B),j=357,J=Math.max(240,Math.floor(window.innerWidth-32));_(Math.min(Math.max(k,j),J));const R=r?.anchorEl;if(R){const te=R.getBoundingClientRect(),ce=w.getBoundingClientRect(),ne=Math.ceil(ce.height||0),ee=Math.max(0,Math.floor(window.innerHeight-te.bottom)),pe=Math.max(0,Math.floor(te.top)),ge=ee<ne+12&&pe>ee;A(ge?"top":"bottom")}});return()=>cancelAnimationFrame(O)},[i,r?.key,r?.type,p,r?.anchorEl]),D.useEffect(()=>{if(!n)return;const O=w=>{w.key==="Escape"&&c(null)};return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[n,c]),{tooltipPortal:r?.anchorEl?(()=>{if(!document.body.contains(r.anchorEl))return null;let O="",w={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},P=!1;const H=B=>{const $=p1(B);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const U=$.data,V=Math.max(0,U.images?.length||0);if(V<=0)return{node:U.title,steps:!1};const k=Math.min(Math.max(p,0),V-1),j=Array.isArray(U.stepDescriptions)&&U.stepDescriptions[k]||"",J=(U.disclaimer||"").trim(),R=Array.isArray(U.images)?U.images[k]:void 0,te=typeof R=="string"?x.current.get(R):void 0;return{node:z.jsxs("div",{className:"rte-steps-tooltip",style:S?{width:`${S}px`}:void 0,onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:ne=>{ne.preventDefault(),ne.stopPropagation()},children:[z.jsxs("div",{className:"rte-steps-tooltip-header",children:[z.jsx("div",{className:"rte-steps-tooltip-title",children:U.title}),z.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",k+1,"/",V]})]}),U.description?z.jsx("div",{className:"rte-steps-tooltip-desc",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:U.description})}):null,z.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:z.jsx(se.Image.PreviewGroup,{preview:{visible:T,current:k,onVisibleChange:ne=>y(ne),onChange:ne=>{const ee=Math.min(Math.max(ne,0),V-1);b(ee),g.current?.slideTo(ee)}},children:z.jsx(Oi,{className:"rte-steps-tooltip-swiper",modules:[jc,Xc],navigation:!0,pagination:{clickable:!0},initialSlide:k,onSwiper:ne=>{g.current=ne},onSlideChange:ne=>b(ne.activeIndex),children:U.images.map((ne,ee)=>z.jsx(Di,{children:z.jsx(se.Image,{className:"rte-steps-tooltip-img",src:ne,alt:`step-${ee+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{b(ee),g.current?.slideTo(ee),y(!0)}})},`${ne}-${ee}`))},`${r.key}-${r.type}`)})}),z.jsx("div",{className:"rte-steps-tooltip-footer",children:z.jsx("div",{className:"rte-steps-tooltip-step-text",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:j})})}),J?z.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[z.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),z.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:z.jsx(da,{remarkPlugins:[$a,qa],rehypePlugins:[_a,[ka,Ua]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:J})})]}):null]}),steps:!0}};if(r.type==="upload"){const B=r.anchorEl.dataset.tooltip,$=H(B);if($)O=$.node,P=$.steps;else{const U=e.find(k=>k.type==="upload"&&k.key===r.key),V=H(typeof U?.tooltip=="string"?U?.tooltip:U?.tooltip?JSON.stringify(U.tooltip):"");O=V?.node||"",P=V?.steps||!1}}else if(r.type==="tag"){const B=r.anchorEl.dataset.tooltip,$=H(B);O=$?.node||"",P=$?.steps||!1}else if(r.type==="upload-label")O=r.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||r.anchorEl.dataset.fileName||"";else if(r.type==="variable"){const B=r.anchorEl.dataset.tooltip,$=H(B);O=$?.node||"",P=$?.steps||!1}else if(r.type==="upload-preview"){const B=t[r.key];let $=null,U=!1;typeof B=="string"?$=B:B instanceof File&&(B.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(B.name||""))&&($=URL.createObjectURL(B),U=!0),$?(O=z.jsx("div",{className:"rte-upload-preview",children:z.jsx("img",{className:"rte-upload-preview-img",src:$,alt:"preview"})}),w={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},U&&setTimeout(()=>URL.revokeObjectURL($),1e3)):O=""}if(!O)return null;P&&(w={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const v="#0A0A0A",C=N;return Ln.createPortal(z.jsx(se.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!P,align:P?{points:C==="top"?["bc","tc"]:["tc","bc"],offset:C==="top"?[0,-4]:[0,4]}:void 0,title:r.type==="upload-preview"?z.jsx("div",{onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:B=>{B.preventDefault(),B.stopPropagation()},children:O}):P?O:z.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:v},onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:B=>{B.preventDefault(),B.stopPropagation()},children:O}),open:i,placement:P?C==="top"?"top":"bottom":r.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:w,overlayClassName:"rte-tooltip-overlay",children:z.jsx("div",{style:{position:"fixed",left:`${r.anchorEl.getBoundingClientRect().left}px`,top:`${r.anchorEl.getBoundingClientRect().top-(r.type==="upload-label"?4:0)}px`,width:`${r.anchorEl.offsetWidth}px`,height:`${r.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:c}},m1=(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=Xe(e.tooltip),s=i?` data-tooltip="${le(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>`},g1=(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>`},E1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,bu=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Xe(e.tooltip),s=i?` data-tooltip="${le(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const E=r?encodeURIComponent(r):"",h=le(e.placeholder||""),c=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',p=On(r||e.placeholder||""),b=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="${h}" data-estimated-width="${Math.min(600,p+b)}"${c}${a}${s} class="rte-variable-host-v2"></span>`}const u=!r,o=u?"​":le(r).replace(/\n/g,"<br/>"),l=u?"show-placeholder":"",m=i&&u?"rte-variable-with-icon":"",f=i&&u?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${m?` ${m}`:""}">${o}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${f}" data-variable-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}</span>`},b1=(e,t)=>{const n=bu(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${E1}${n}</span>`:n},Tu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,T1=e=>/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(e);function za(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=T1(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=nl(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 y1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Xe(e.tooltip),a=r?` data-tooltip="${le(r)}"`:"",{hasFile:i,fileName:s,uploadIcon:u}=za(t[e.key],e.text),o=i?"":"hidden",l=r&&!i?"":"hidden",m=i?"has-file":"",f=i&&s?` data-file-name="${s.replace(/"/g,"&quot;")}"`:"",E=(e.text||"").trim(),c=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 ${m}"><span class="upload-icon">${u}</span><span class="upload-label"${f}>${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="${le(r)}" ></i>`:""}<span class="file-remove-btn ${o}" title="移除文件">×</span></span></span>`,hintHtml:c}},x1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const T=Xe(e.tooltip),y=T?` data-tooltip="${le(T)}"`:"",x=e.minCount||1,S=e.maxCount||3;let _=0;for(let O=0;O<S;O++){const w=`${e.key}-${O}`;t[w]!=null&&(_+=1)}const N=Math.min(S,Math.max(x,_+(_<S?1:0)));let A="";for(let O=0;O<N;O++){const w=`${e.key}-${O}`,{hasFile:P,fileName:H,uploadIcon:v}=za(t[w],e.text),C=P?"":"hidden",B=T&&!P?"":"hidden",$=P?"has-file":"",U=P&&H?` data-file-name="${H.replace(/"/g,"&quot;")}"`:"",V=` data-batch-key="${e.key}"`,k=` data-batch-index="${O}"`,j=`<span contenteditable="false" data-type="upload" data-key="${w}"${V}${k}${y} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${$}"><span class="upload-icon">${v}</span><span class="upload-label"${U}>${H||e.text}</span>${T?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${w}" data-tooltip="${le(T)}" ></i>`:""}<span class="file-remove-btn ${C}" title="移除文件">×</span></span></span>`;A+=j}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${Tu}<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=Xe(e.tooltip),s=i?` data-tooltip="${le(i)}"`:"",{hasFile:u,fileName:o,uploadIcon:l}=za(t[e.key],e.text),m=u?"":"hidden",f=i&&!u?"":"hidden",E=u?"has-file":"",h=u&&o?` data-file-name="${o.replace(/"/g,"&quot;")}"`:"",c=(e.text||"").trim(),b=u&&e.showHint===!0&&c.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</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"${h}>${o||e.text}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${f}" data-upload-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}<span class="file-remove-btn ${m}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${Tu}${g}${n}</span>${b}`:g+n+b},C1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,S1=(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"':"",u=`<div data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${C1}${u}</span>`:u},A1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,_1=(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>`,u=`<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">${A1}${u}</span>`:u},k1=(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),u=e.placeholder?` data-placeholder="${e.placeholder}"`:"",o=e.expandable!==!1,l=r,m=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${u} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,f=o?`<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${o?" rte-richtext-toggleable":""}" data-key="${e.key}">${m}${f}</div>`,h=`<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">${h}</div>`:h},v1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,N1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",f=Xe(e.tooltip),E=f?` data-tooltip="${le(f)}" data-variable-key="${e.key||""}"`:"",h=f&&u?"rte-variable-with-icon":"",c=f&&u?"":"hidden",p=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-report-url ${l}${h?` ${h}`:""}">${o}${f?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(f)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${v1}${p}</span>`:p},w1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,I1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",f=Xe(e.tooltip),E=f?` data-tooltip="${le(f)}" data-variable-key="${e.key||""}"`:"",h=f&&u?"rte-variable-with-icon":"",c=f&&u?"":"hidden",p=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-markdown-name ${l}${h?` ${h}`:""}">${o}${f?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(f)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${w1}${p}</span>`:p},L1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,O1=(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??"",u=!s,o=u?"​":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",f=e.sourceTextKey?` data-source-text-key="${le(e.sourceTextKey)}"`:"",E=Xe(e.tooltip),h=E?` data-tooltip="${le(E)}" data-variable-key="${e.key||""}"`:"",c=E&&u?"rte-variable-with-icon":"",p=E&&u?"":"hidden",b=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${le(e.placeholder||"")}"${m}${f}${h} class="variable-chip rte-markdown-input ${l}${c?` ${c}`:""}">${o}${E?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${le(E)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${L1}${b}</span>`:b},D1=(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,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,f=`<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:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${f}</div>`,h=`<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">${h}</div>`:h},P1=(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,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,f=`<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} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${f}</div>`,h=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},M1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,B1=(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">${M1}${s}</span>`:s},R1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,F1=(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?le(e.placeholder):"",s=i?` placeholder="${i}"`:"",u=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",o=n||e.placeholder||"",l=On(o),m=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${le(n)}" style="width: ${l}px;"${r}${a}${s}${u} />`,E=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${m}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${R1}${E}</span>`:E},H1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,$1=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const o=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Xe(e.tooltip);let m="";for(let f=0;f<i;f++){const E=`${e.key}_${f}`,h=t[E]||"",c=!h,p=c?"​":le(h).replace(/\n/g,"<br/>"),b=c?"show-placeholder":"",g=l&&c?"rte-variable-with-icon":"",T=l?` data-tooltip="${le(l)}" data-variable-key="${e.key||""}"`:"",y=l&&c?"":"hidden",x=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",S=`<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${f}" data-placeholder="${e.placeholder||""}"${x}${T} class="variable-chip ${b}${g?` ${g}`:""}">${p}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${le(l)}" ></i>`:""}</span>`;f===0?m+=`<span ${o} class="exclusion-wrapper required-upload-group required-multi-first">${H1}${S}</span>`:m+=S}return m}const s=Xe(e.tooltip);let u="";for(let o=0;o<i;o++){const l=`${e.key}_${o}`,m=t[l]||"",f=!m,E=f?"​":le(m).replace(/\n/g,"<br/>"),h=f?"show-placeholder":"",c=s&&f?"rte-variable-with-icon":"",p=s?` data-tooltip="${le(s)}" data-variable-key="${e.key||""}"`:"",b=s&&f?"":"hidden",g=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",T=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${o}" data-placeholder="${e.placeholder||""}"${g}${p} class="variable-chip ${h}${c?` ${c}`:""}">${E}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${b}" data-variable-key="${e.key}" data-tooltip="${le(s)}" ></i>`:""}</span>`;u+=T}return u};function U1(e,t,n,r,a,i={},s,u){if(!e.current)return;const o=/[;;,,。.!!??::、]/,l=c=>{const p=(c??"").trim();return p.length===1&&o.test(p)},m=c=>{const p=c??"",b=p.match(new RegExp(`^\\s*(${o.source})`));if(!b)return null;const g=b[1],T=p.replace(new RegExp(`^\\s*${o.source}`),"");return{punct:g,rest:T}},f=c=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${c}</span>`,E=[];let h=0;for(;h<t.length;){const c=t[h],p=h+1<t.length?t[h+1]:null;let b=!1;if(c.type==="text"&&(c.text?.includes("icon-bitian")||c.className==="rte-text-required")&&p){const N=p.type==="upload"&&p.exclusionGroup==="fileInput"&&c.exclusionGroup==="fileInput"&&c.exclusionGroup===p.exclusionGroup,A=p.type==="variable"&&p.exclusionGroup==="textInput"&&c.exclusionGroup==="textInput"&&c.exclusionGroup===p.exclusionGroup;if(N){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,w="</span>";let P="";c.className?P=`<span class="${c.className}">${c.text??""}</span>`:P=c.text??"";const H=p,{uploadHtml:v,hintHtml:C}=y1(H,n);E.push(O+P+v+w+C),h+=2;continue}if(A){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,w="</span>";let P="";c.className?P=`<span class="${c.className}">${c.text??""}</span>`:P=c.text??"";const v=bu(p,a);E.push(O+P+v+w),h+=2;continue}}const T=c.exclusionGroup?`data-group="${c.exclusionGroup}"`:"",y=c.exclusionGroup?`<span ${T} class="exclusion-wrapper">`:"",x=c.exclusionGroup?"</span>":"";let S="";if(c.type==="tag")S=m1(c,{lockStructure:r,hideButtons:s});else if(c.type==="text")S=g1(c,r);else if(c.type==="variable"&&c.key)S=b1(c,a);else if(c.type==="report-url"&&c.key)S=N1(c,a);else if(c.type==="markdown-name"&&c.key)S=I1(c,a);else if(c.type==="markdown"&&c.key)S=O1(c,a);else if(c.type==="upload"&&c.key){const N=!!p&&p.type==="text"&&!p.className&&!p.exclusionGroup&&l(p.text),A=N?(p.text??"").trim():"",I=A?f(A):"";N&&(b=!0),S=x1(c,n,I)}else c.type==="select"&&c.key?S=S1(c,a):c.type==="textarea"&&c.key?S=_1(c,a):c.type==="richtext"&&c.key?S=k1(c,a):c.type==="report-module"&&c.key?S=D1(c,a):c.type==="markdown-module"&&c.key?S=P1(c,a):c.type==="datepicker"&&c.key?S=B1(c,a):c.type==="number-input"&&c.key?S=F1(c,a):c.type==="multi-variable"&&c.key&&(S=$1(c,a,i));const _=y+S+x;if(c.type==="text"&&!c.className&&!c.exclusionGroup){if(l(c.text)&&E.length>0){const A=E[E.length-1],I=(c.text??"").trim();E[E.length-1]=`<span class="rte-inline-group">${A}${f(I)}</span>`,h++;continue}const N=m(c.text);if(N&&E.length>0){const A=E[E.length-1];E[E.length-1]=`<span class="rte-inline-group">${A}${f(N.punct)}</span>`;const I=N.rest;if(I){const O=I.replace(/\n/g,"<br/>");E.push(`<span data-type="text" contenteditable="false">${O}</span>`)}h++;continue}}E.push(_),h+=b?2:1}e.current&&(e.current.innerHTML=E.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(p=>{if(p.dataset.variableRender==="antd-textarea")return;if(p.innerText.replace(/\n/g,"").replace(/\u200B/g,""))p.classList.remove("show-placeholder");else{const T=Array.from(p.childNodes),y=p.querySelector(".variable-info-icon");T.forEach(S=>{if(S.nodeType===Node.TEXT_NODE){p.removeChild(S);return}S.nodeType===Node.ELEMENT_NODE&&S.tagName==="BR"&&p.removeChild(S)});const x=document.createTextNode("​");y&&y.parentNode===p?p.insertBefore(x,y):p.firstChild?p.insertBefore(x,p.firstChild):p.appendChild(x),p.classList.add("show-placeholder")}})},0))}function q1(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const p=c.getAttribute("data-node-type")||"";if(p!=="report-module"&&p!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let T=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return g.filter((S,_)=>_!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
61
+ `).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const p=t[c];if((p.type==="variable"||p.type==="report-url"||p.type==="markdown"||p.type==="markdown-name"||p.type==="upload"||p.type==="multi-variable"||p.type==="select"||p.type==="textarea"||p.type==="richtext"||p.type==="report-module"||p.type==="markdown-module"||p.type==="datepicker"||p.type==="number-input")&&p.required&&p.key){s.push({exclusionGroup:p.exclusionGroup||"",key:p.key,type:p.type==="multi-variable"||p.type==="report-url"||p.type==="markdown"||p.type==="markdown-name"?"variable":p.type==="report-module"||p.type==="markdown-module"?"richtext":p.type,isMultiVariable:p.type==="multi-variable",minCount:p.type==="multi-variable"||p.type==="upload"&&typeof p.minCount=="number"?p.minCount:void 0,moduleIndex:p.type==="report-module"||p.type==="markdown-module"?p.moduleIndex:void 0,__index:c});continue}if(p.type==="text"&&p.className?.includes("rte-text-required"))if(p.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===p.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:p.exclusionGroup,key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((p,b)=>{p.exclusionGroup==="separator"&&c.push(b)});for(const p of c){const g=s.filter(x=>typeof x.__index=="number"&&x.__index<p).sort((x,S)=>(S.__index??0)-(x.__index??0))[0],y=s.filter(x=>typeof x.__index=="number"&&x.__index>p).sort((x,S)=>(x.__index??0)-(S.__index??0))[0];g&&y&&o.push([g,y])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const p=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(p.length>0){const b=p[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const p=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const p=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(p.length>0){const b=p[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const p=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const p=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const p=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const p=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(p);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const p=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const p=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(p){const b=p.closest("[data-group]")||p.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(p=>{p.key&&m.add(p.key)})});const f=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const p=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(T.length>0){const y=T[0];return i(y)?!0:y.style.display!=="none"}}return!0});if(p.length===0)continue;let b=!1;for(const g of p)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let T=0;const y=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(y.length===0)continue;for(let x=0;x<y.length;x++){const _=y[x].dataset.key;_&&n[_]!=null&&(T+=1)}if(T>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let y=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(y+=1)}const x=g.minCount&&g.minCount>0?g.minCount:1;if(y>=x){b=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const T=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const T=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,y=e.current.querySelector(T);if(y&&a(y).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of f)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let p=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const y=b[g].dataset.key;y&&n[y]!=null&&(p+=1)}if(p<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const p=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const T of Array.from(p)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const p=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!p){h=!1;break}if(p.classList.contains("show-placeholder")){h=!1;break}if(p.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const p=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!p||(p.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const p=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!p||(p.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const p=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(p);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const p=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!p||(p.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const p=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!p||(p.value||"").trim().length===0){h=!1;break}}r(E&&h)}function z1(e,t,n,r,a={},i,s,u,o,l){const m=D.useRef(new Set),f=D.useRef(t),E=D.useCallback(()=>{if(!e.current)return;if(t.length===0){e.current.innerHTML="";return}f.current!==t&&(m.current=new Set,f.current=t);let h={};const c=new Set;e.current&&e.current.querySelectorAll('[data-type="variable"]').forEach(T=>{const y=T.dataset.key;if(!y)return;let x="";if(T.dataset.variableRender==="antd-textarea"){const S=(T.getAttribute("data-value")||"").trim();try{x=S?decodeURIComponent(S).replace(/\r\n/g,`
62
+ `).trim():""}catch{x=S.trim()}}else{const S=(T.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
63
+ `);x=S.replace(/\n/g,"").trim().length>0?S:""}if(x)m.current.add(y);else if(m.current.has(y)){c.add(y);const S=T.getAttribute("data-node-type");S==="report-url"?c.add(`${y}__url`):S==="markdown-name"&&c.add(`${y}__name`)}});const b=e.current.__tempVariableValues;if(b?(h=b,setTimeout(()=>{if(e.current){const g=e.current;g.__tempVariableValues===b&&delete g.__tempVariableValues}},100)):(e.current.querySelectorAll('[data-type="variable"]').forEach(N=>{const A=N.dataset.key;if(A){const O=(()=>{if(N.dataset.variableRender==="antd-textarea"){const H=(N.getAttribute("data-value")||"").trim();if(!H)return"";try{return decodeURIComponent(H).replace(/\r\n/g,`
64
+ `).trim()}catch{return H.trim()}}const w=(N.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
65
+ `);return w.replace(/\n/g,"").trim().length>0?w:""})();O&&(N.getAttribute("data-node-type")==="report-url"?h[`${A}__url`]=O:N.getAttribute("data-node-type")==="markdown-name"?h[`${A}__name`]=O:h[A]=O)}}),e.current.querySelectorAll('[data-type="select"]').forEach(N=>{const A=N.dataset.key;if(A){const I=(N.getAttribute("data-value")||"").trim();I&&(h[A]=I)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(N=>{const A=N.dataset.key;if(A){const I=N.value.replace(/[\u200B]/g,"").trim();I&&(h[A]=I)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(N=>{const A=N.dataset.key;if(A){const I=N.getAttribute("data-node-type")||"",O=I==="report-module"||I==="markdown-module",w=O?(N.innerHTML||"").replace(/[\u200B]/g,"").trim():(N.textContent||"").replace(/[\u200B]/g,"").trim();if(O){const P=Number.parseInt(N.getAttribute("data-module-index")||"0",10);h[`${A}__module_${Number.isFinite(P)?P:0}`]=w}else w&&(h[A]=w)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(N=>{const A=N.dataset.key;if(A){const I=(N.getAttribute("data-value")||"").trim();I&&(h[A]=I)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(N=>{const A=N.dataset.key;if(A){const I=(N.value||"").trim();I&&(h[A]=I)}})),l&&Object.keys(l).length>0){const g=new Set(t.filter(y=>y.type==="upload"&&y.key).map(y=>y.key)),T={};Object.entries(l).forEach(([y,x])=>{g.has(y)||(Array.isArray(x)?x.forEach((S,_)=>{S!=null&&String(S).trim()!==""&&(T[`${y}_${_}`]=String(S))}):x!=null&&String(x).trim()!==""&&(t.find(_=>_.key===y&&_.type==="report-url")?T[`${y}__url`]=String(x):T[y]=String(x)))}),Object.entries(T).forEach(([y,x])=>{!(y in h)&&!c.has(y)&&(h[y]=x)})}if(U1(e,t,n,r,h,a,u),setTimeout(()=>{Dn(e)},0),i?.current){const{key:g,offset:T}=i.current;setTimeout(()=>{if(!e.current)return;const y=e.current.querySelector(`[data-type="variable"][data-key="${g}"]`);if(y){if(y.dataset.variableRender==="antd-textarea"){const x=y.querySelector("textarea");if(x){x.focus();try{const S=x.value?.length??0;x.setSelectionRange(Math.min(T,S),Math.min(T,S))}catch{}i.current=null;return}}try{const x=document.createRange(),S=document.createTreeWalker(y,NodeFilter.SHOW_TEXT,null);let _=0,N=null,A=0;for(;S.nextNode();){const I=S.currentNode,O=I.textContent?.length||0;if(_+O>=T){N=I,A=T-_;break}_+=O}if(N){x.setStart(N,Math.min(A,N.textContent?.length||0)),x.collapse(!0);const I=window.getSelection();I&&(I.removeAllRanges(),I.addRange(x),y.focus())}else{x.selectNodeContents(y),x.collapse(!1);const I=window.getSelection();I&&(I.removeAllRanges(),I.addRange(x),y.focus())}}catch{const x=document.createRange();x.selectNodeContents(y),x.collapse(!1);const S=window.getSelection();S&&(S.removeAllRanges(),S.addRange(x),y.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,u,o,l]);D.useEffect(()=>{E()},[E])}function V1(e,t,n,r,a){D.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||""),u=l=>{const m=l.target?.closest(".upload-info-icon");if(m&&m.classList.contains("upload-info-icon")){const E=m.dataset.uploadKey;if(E){const h=m.dataset.tooltip||"";let c=!1;try{const b=JSON.parse(h);b&&b.type==="steps"&&Array.isArray(b.images)&&(c=!0)}catch{}if(c){const p=m.closest('[data-type="upload"]');r({key:E,anchorEl:p||m,type:"upload"})}else{const p=m.closest('[data-type="upload"]');r({key:E,anchorEl:p||m,type:"upload"})}}return}const f=l.target?.closest('[data-type="upload"]');if(f){const E=f.dataset.key;if(E){const h=n[E];h&&s(h)&&r({key:E,anchorEl:f,type:"upload-preview"})}}},o=l=>{if(a)return;const m=l.target?.closest(".upload-info-icon"),f=l.relatedTarget;if(f?.closest?.(".rte-tooltip-overlay"))return;if(m&&m.classList.contains("upload-info-icon")){const h=m.closest('[data-type="upload"]');if(f&&h&&h.contains(f))return;if(!f||!i.contains(f))r(null);else{const c=f.closest('[data-type="upload"]');(!c||c!==h)&&r(null)}return}const E=l.target?.closest('[data-type="upload"]');if(E){const h=f;if(h?.closest?.(".rte-tooltip-overlay")||h&&E.contains(h))return;r(null)}};return i.addEventListener("mouseover",u,!0),i.addEventListener("mouseout",o,!0),()=>{i.removeEventListener("mouseover",u,!0),i.removeEventListener("mouseout",o,!0)}},[t,n,e,r,a])}function G1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=m=>{if(r==="hideTagClose")return;const f=m.currentTarget,E=f.dataset.tooltip,h=f.dataset.tagKey||"";E&&n({key:h,anchorEl:f,type:"tag"})},u=m=>{a||m.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let o;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(f=>{f.addEventListener("mouseenter",s),f.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(o),i.querySelectorAll(".tag-node[data-tooltip]").forEach(f=>{f.removeEventListener("mouseenter",s),f.removeEventListener("mouseleave",u)})}},[t,e,n,r,a])}function Y1(e,t,n,r){D.useEffect(()=>{const a=e.current;if(!a)return;const i=u=>{const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const m=o.dataset.variableKey;m&&n({key:m,anchorEl:o,type:"variable"});return}const l=u.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const m=l.dataset.key;m&&n({key:m,anchorEl:l,type:"variable"})}},s=u=>{if(r)return;const o=u.target,l=u.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const m=o?.closest?.(".variable-info-icon"),f=o?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(m||f){if(!l||!a.contains(l)){n(null);return}const E=!!l.closest?.(".variable-info-icon"),h=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!E&&!h&&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 W1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=f=>typeof f=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(f):f.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(f.name||""),u=f=>{const E=f.currentTarget,h=E.dataset.fileName,c=E.closest('[data-type="upload"]'),p=c?.dataset.key||"",b=p?n[p]:null;if(b&&s(b)){r({key:p,anchorEl:c||E,type:"upload-preview"});return}h&&r({key:p,anchorEl:c||E,type:"upload-label"})},o=f=>{a||f.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const m=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.addEventListener("mouseenter",u),E.addEventListener("mouseleave",o)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(m)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.removeEventListener("mouseenter",u),E.removeEventListener("mouseleave",o)})}},[t,n,e,r,a])}function j1(e,t,n,r){D.useEffect(()=>{const a=setTimeout(()=>{br(e,t,n),q1(e,t,n,r)},0);return()=>clearTimeout(a)},[n,t,e,r])}function X1(e,t){const n=D.useRef(0),r=D.useRef(0);D.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=T=>T instanceof HTMLElement?!!(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker")||T.closest(".ant-picker-dropdown")):!1,u=T=>T instanceof HTMLElement?!!(T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown")):!1,o=T=>{a=!0,s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] mousedown on datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] mousedown on select target"))},l=()=>{a=!1,i=Date.now()};let m=!1,f=0;const E=()=>{m=!0},h=()=>{m=!1,f=Date.now()},c=()=>{f=Date.now()},p=T=>{s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] focusin datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] focusin select target"))},b=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800){console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");return}const T=document.activeElement;if(T&&(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker-dropdown")||T.tagName==="INPUT"&&T.closest(".ant-picker")||T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown"))){console.log("[SelectionCtrl] activeElement is picker/select; skip");return}if(!e.current)return;const y=window.getSelection();if(!y||y.rangeCount===0||t.current||a||m||Date.now()-f<500)return;const x=y.getRangeAt(0);if(!x.collapsed)return e.current.contains(x.commonAncestorContainer),void 0;const S=y.anchorNode;if(!S||!e.current.contains(S))return;let _=!1,N=!1;if(S.nodeType===Node.ELEMENT_NODE){const I=S;(I.closest('[data-type="datepicker"]')||I.closest(".rte-datepicker-wrapper")||I.closest(".rte-datepicker-host"))&&(_=!0),(I.closest('[data-type="select"]')||I.closest(".rte-select-wrapper")||I.closest(".rte-select-host"))&&(N=!0)}else if(S.parentElement){const I=S.parentElement;(I.closest('[data-type="datepicker"]')||I.closest(".rte-datepicker-wrapper")||I.closest(".rte-datepicker-host"))&&(_=!0),(I.closest('[data-type="select"]')||I.closest(".rte-select-wrapper")||I.closest(".rte-select-host"))&&(N=!0)}if(_||N)return;let A=null;if(S.nodeType===Node.ELEMENT_NODE?A=S.closest('[data-type="variable"]'):S.nodeType===Node.TEXT_NODE&&S.parentElement&&(A=S.parentElement.closest('[data-type="variable"]')),!A){if(Date.now()-i>500)return;const I=e.current.querySelectorAll('[data-type="variable"]');if(I.length>0){let O=null;for(const w of Array.from(I))if(w.style.display!=="none"){O=w;break}if(!O&&I.length>0&&(O=I[0]),O){const w=document.createRange();w.selectNodeContents(O),w.collapse(!1),y.removeAllRanges(),y.addRange(w),O.focus()}else y.removeAllRanges()}else y.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",E),g.addEventListener("compositionend",h),g.addEventListener("input",c)),document.addEventListener("mousedown",o),document.addEventListener("mouseup",l),document.addEventListener("focusin",p),document.addEventListener("selectionchange",b),()=>{g&&(g.removeEventListener("compositionstart",E),g.removeEventListener("compositionend",h),g.removeEventListener("input",c)),document.removeEventListener("mousedown",o),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",p),document.removeEventListener("selectionchange",b)}},[e,t])}var lr={exports:{}},K1=lr.exports,yu;function xu(){return yu||(yu=1,function(e,t){(function(n,r){e.exports=r()})(K1,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",f="month",E="quarter",h="year",c="date",p="Invalid Date",b=/^(\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,T={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(v){var C=["th","st","nd","rd"],B=v%100;return"["+v+(C[(B-20)%10]||C[B]||C[0])+"]"}},y=function(v,C,B){var $=String(v);return!$||$.length>=C?v:""+Array(C+1-$.length).join(B)+v},x={s:y,z:function(v){var C=-v.utcOffset(),B=Math.abs(C),$=Math.floor(B/60),U=B%60;return(C<=0?"+":"-")+y($,2,"0")+":"+y(U,2,"0")},m:function v(C,B){if(C.date()<B.date())return-v(B,C);var $=12*(B.year()-C.year())+(B.month()-C.month()),U=C.clone().add($,f),V=B-U<0,k=C.clone().add($+(V?-1:1),f);return+(-($+(B-U)/(V?U-k:k-U))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:h,w:m,d:l,D:c,h:o,m:u,s,ms:i,Q:E}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},S="en",_={};_[S]=T;var N="$isDayjsObject",A=function(v){return v instanceof P||!(!v||!v[N])},I=function v(C,B,$){var U;if(!C)return S;if(typeof C=="string"){var V=C.toLowerCase();_[V]&&(U=V),B&&(_[V]=B,U=V);var k=C.split("-");if(!U&&k.length>1)return v(k[0])}else{var j=C.name;_[j]=C,U=j}return!$&&U&&(S=U),U||!$&&S},O=function(v,C){if(A(v))return v.clone();var B=typeof C=="object"?C:{};return B.date=v,B.args=arguments,new P(B)},w=x;w.l=I,w.i=A,w.w=function(v,C){return O(v,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var P=function(){function v(B){this.$L=I(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[N]=!0}var C=v.prototype;return C.parse=function(B){this.$d=function($){var U=$.date,V=$.utc;if(U===null)return new Date(NaN);if(w.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var k=U.match(b);if(k){var j=k[2]-1||0,J=(k[7]||"0").substring(0,3);return V?new Date(Date.UTC(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)):new Date(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)}}return new Date(U)}(B),this.init()},C.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},C.$utils=function(){return w},C.isValid=function(){return this.$d.toString()!==p},C.isSame=function(B,$){var U=O(B);return this.startOf($)<=U&&U<=this.endOf($)},C.isAfter=function(B,$){return O(B)<this.startOf($)},C.isBefore=function(B,$){return this.endOf($)<O(B)},C.$g=function(B,$,U){return w.u(B)?this[$]:this.set(U,B)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(B,$){var U=this,V=!!w.u($)||$,k=w.p(B),j=function(ye,ge){var Pe=w.w(U.$u?Date.UTC(U.$y,ge,ye):new Date(U.$y,ge,ye),U);return V?Pe:Pe.endOf(l)},J=function(ye,ge){return w.w(U.toDate()[ye].apply(U.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ge)),U)},R=this.$W,te=this.$M,ce=this.$D,ne="set"+(this.$u?"UTC":"");switch(k){case h:return V?j(1,0):j(31,11);case f:return V?j(1,te):j(0,te+1);case m:var ee=this.$locale().weekStart||0,pe=(R<ee?R+7:R)-ee;return j(V?ce-pe:ce+(6-pe),te);case l:case c:return J(ne+"Hours",0);case o:return J(ne+"Minutes",1);case u:return J(ne+"Seconds",2);case s:return J(ne+"Milliseconds",3);default:return this.clone()}},C.endOf=function(B){return this.startOf(B,!1)},C.$set=function(B,$){var U,V=w.p(B),k="set"+(this.$u?"UTC":""),j=(U={},U[l]=k+"Date",U[c]=k+"Date",U[f]=k+"Month",U[h]=k+"FullYear",U[o]=k+"Hours",U[u]=k+"Minutes",U[s]=k+"Seconds",U[i]=k+"Milliseconds",U)[V],J=V===l?this.$D+($-this.$W):$;if(V===f||V===h){var R=this.clone().set(c,1);R.$d[j](J),R.init(),this.$d=R.set(c,Math.min(this.$D,R.daysInMonth())).$d}else j&&this.$d[j](J);return this.init(),this},C.set=function(B,$){return this.clone().$set(B,$)},C.get=function(B){return this[w.p(B)]()},C.add=function(B,$){var U,V=this;B=Number(B);var k=w.p($),j=function(te){var ce=O(V);return w.w(ce.date(ce.date()+Math.round(te*B)),V)};if(k===f)return this.set(f,this.$M+B);if(k===h)return this.set(h,this.$y+B);if(k===l)return j(1);if(k===m)return j(7);var J=(U={},U[u]=r,U[o]=a,U[s]=n,U)[k]||1,R=this.$d.getTime()+B*J;return w.w(R,this)},C.subtract=function(B,$){return this.add(-1*B,$)},C.format=function(B){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||p;var V=B||"YYYY-MM-DDTHH:mm:ssZ",k=w.z(this),j=this.$H,J=this.$m,R=this.$M,te=U.weekdays,ce=U.months,ne=U.meridiem,ee=function(ge,Pe,st,bt){return ge&&(ge[Pe]||ge($,V))||st[Pe].slice(0,bt)},pe=function(ge){return w.s(j%12||12,ge,"0")},ye=ne||function(ge,Pe,st){var bt=ge<12?"AM":"PM";return st?bt.toLowerCase():bt};return V.replace(g,function(ge,Pe){return Pe||function(st){switch(st){case"YY":return String($.$y).slice(-2);case"YYYY":return w.s($.$y,4,"0");case"M":return R+1;case"MM":return w.s(R+1,2,"0");case"MMM":return ee(U.monthsShort,R,ce,3);case"MMMM":return ee(ce,R);case"D":return $.$D;case"DD":return w.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ee(U.weekdaysMin,$.$W,te,2);case"ddd":return ee(U.weekdaysShort,$.$W,te,3);case"dddd":return te[$.$W];case"H":return String(j);case"HH":return w.s(j,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return ye(j,J,!0);case"A":return ye(j,J,!1);case"m":return String(J);case"mm":return w.s(J,2,"0");case"s":return String($.$s);case"ss":return w.s($.$s,2,"0");case"SSS":return w.s($.$ms,3,"0");case"Z":return k}return null}(ge)||k.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(B,$,U){var V,k=this,j=w.p($),J=O(B),R=(J.utcOffset()-this.utcOffset())*r,te=this-J,ce=function(){return w.m(k,J)};switch(j){case h:V=ce()/12;break;case f:V=ce();break;case E:V=ce()/3;break;case m:V=(te-R)/6048e5;break;case l:V=(te-R)/864e5;break;case o:V=te/a;break;case u:V=te/r;break;case s:V=te/n;break;default:V=te}return U?V:w.a(V)},C.daysInMonth=function(){return this.endOf(f).$D},C.$locale=function(){return _[this.$L]},C.locale=function(B,$){if(!B)return this.$L;var U=this.clone(),V=I(B,$,!0);return V&&(U.$L=V),U},C.clone=function(){return w.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},v}(),H=P.prototype;return O.prototype=H,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",f],["$y",h],["$D",c]].forEach(function(v){H[v[1]]=function(C){return this.$g(C,v[0],v[1])}}),O.extend=function(v,C){return v.$i||(v(C,P,O),v.$i=!0),O},O.locale=I,O.isDayjs=A,O.unix=function(v){return O(1e3*v)},O.en=_[S],O.Ls=_,O.p={},O})}(lr)),lr.exports}var Q1=xu();const cr=Mr(Q1);var dr={exports:{}},J1=dr.exports,Cu;function Z1(){return Cu||(Cu=1,function(e,t){(function(n,r){e.exports=r(xu())})(J1,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,u){return u==="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,u){var o=100*s+u;return o<600?"凌晨":o<900?"早上":o<1100?"上午":o<1300?"中午":o<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(dr)),dr.exports}Z1();function Sn(e){"@babel/helpers - typeof";return Sn=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},Sn(e)}function eb(e,t){if(Sn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tb(e){var t=eb(e,"string");return Sn(t)=="symbol"?t:t+""}function nb(e,t,n){return(t=tb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Su(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 Au(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Su(Object(n),!0).forEach(function(r){nb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Su(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var rb={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},ab=Au(Au({},rb),{},{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 ib={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},_u={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},ab),timePickerLocale:Object.assign({},ib)};_u.lang.ok="确定",cr.locale("zh-cn");const{RangePicker:sb}=se.DatePicker,ob=({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",[u,o]=D.useState(()=>{if(!r)return null;const p=r.split(",");return p.length===2&&p[0]&&p[1]?[cr(p[0]),cr(p[1])]:null}),[l,m]=D.useState(null),f=p=>p?s&&p.isAfter(cr(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(p.diff(l[0],"days"))>i:!1,E=p=>{m(p)},h=p=>{if(o(p),m(null),p&&p[0]&&p[1]){const b=`${p[0].format("YYYY-MM-DD")},${p[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",b),t(n,b)}else e.setAttribute("data-value",""),t(n,"")},c=p=>{m(p?u:null)};return Ln.createPortal(z.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:z.jsx(sb,{value:u,disabledDate:f,onCalendarChange:E,onChange:h,onOpenChange:c,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:_u,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},ub=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(ob,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`datepicker-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const f=m;(f.classList?.contains("rte-datepicker-host")||f.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const f=m;(f.classList?.contains("rte-datepicker-host")||f.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},ku=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:u,onAgentExit:o,loading:l=!1,placeholder:m,border:f,background:E="transparent",hideButtons:h,maxHeight:c,minHeight:p,collapsed:b=!1,reportAnalyze:g,markdownAnalyze:T,markdownNameAnalyze:y,onCollapsedChange:x,collapseTransitionMs:S=260,debugTooltipSticky:_=!1,nodeValues:N})=>{const[A,I]=se.message.useMessage(),O=D.useRef(null),w=D.useRef(null),P=D.useRef(null),H=D.useRef(null),v=D.useRef(null),C=D.useRef("");if(!C.current){const me=Math.random().toString(36).slice(2,8);C.current=`rte_${me}`}const[B,$]=D.useState({}),[U,V]=D.useState(null),[k,j]=D.useState(null),[J,R]=D.useState(null),{tooltipPortal:te,setPopoverVisible:ce}=h1({config:e,files:B,debugTooltipSticky:_}),{handleFileChange:ne,handleRemoveFile:ee}=rl({config:e,messageApi:A,activeBatchKey:k,activeFileKey:U,activeBatchStartIndex:J,setActiveFileKey:V,setActiveBatchKey:j,setActiveBatchStartIndex:R,setFiles:$}),pe=D.useRef(!1),ye=D.useRef(null),{handleMouseDown:ge,handleMouseMove:Pe,handleMouseUp:st,handleDoubleClick:bt}=El({lockStructure:i,onAgentExit:o,editorRef:H,setPopoverVisible:ce,isDraggingRef:pe,mouseDownPosRef:ye}),[fr,Nt]=D.useState(!1),kn=D.useRef(null),[pr,hr]=D.useState(!0),mr=D.useRef(0),[vn,Ga]=D.useState(58),[Ya,Wa]=D.useState(58),[ja,Xa]=D.useState(!1),[Y,Q]=D.useState(null),re=D.useRef(!1),ie=D.useRef(!1),ue=D.useRef(null),[Fe,nt]=D.useState({}),Ye=D.useRef(()=>{}),[We,ot]=D.useState({}),Le=D.useRef(()=>{}),Tt=D.useRef({}),ze=D.useRef(We);D.useEffect(()=>{ze.current=We},[We]);const[Gt,Mu]=D.useState({}),Bu=D.useRef(()=>{}),Ru=D.useRef(Gt);D.useEffect(()=>{Ru.current=Gt},[Gt]);const[Yt,Nn]=D.useState(()=>{const me={};return e.forEach(Ee=>{Ee.type==="multi-variable"&&Ee.key&&(me[Ee.key]=1)}),me});sl({config:e,editorRef:H,files:B,setFiles:$,multiVariableCounts:Yt,setMultiVariableCounts:Nn}),D.useEffect(()=>{if(!N)return;const me={};e.forEach(Ee=>{if(Ee.type==="multi-variable"&&Ee.key){const He=N[Ee.key];if(Array.isArray(He)&&He.length>0){const _e=Ee.maxCount??9;me[Ee.key]=Math.min(He.length,_e)}}}),Object.keys(me).length>0&&Nn(Ee=>({...Ee,...me}))},[N,e]);const Se=dl({config:e,reportAnalyzeState:Fe,markdownAnalyzeState:We,markdownNameAnalyzeState:Gt}),{handleReportUrlBlur:Cb,handleMarkdownBlur:Sb,handleMarkdownNameBlur:Ab}=ul({reportAnalyze:g,markdownAnalyze:T,markdownNameAnalyze:y,reportAnalyzeState:Fe,setReportAnalyzeState:nt,markdownAnalyzeState:We,setMarkdownAnalyzeState:ot,markdownNameAnalyzeState:Gt,setMarkdownNameAnalyzeState:Mu,editorRef:H,reportAnalyzeRef:Ye,markdownAnalyzeRef:Le,markdownNameAnalyzeRef:Bu,markdownAnalyzeStateRef:ze,markdownNameAnalyzeStateRef:Ru});Zu(H,Cb,[Se]),el(H,Ab,[Se]),tl(H,Sb,[Se]),Ju(H,[Se]),z1(H,Se,B,i,Yt,kn,void 0,h,void 0,N);const Ka=D.useRef(new Set),Fu=D.useRef(Se);Fu.current!==Se&&(Fu.current=Se,Ka.current=new Set),D.useEffect(()=>{if(!N||!Se||Se.length===0)return;const me=Se.filter(_e=>_e.type==="upload"&&_e.key);if(me.length===0)return;const Ee={},He=(_e,Oe)=>{Oe&&(Oe instanceof File?Ee[_e]=Oe:typeof Oe=="string"&&Oe.trim()&&(Ee[_e]=Oe.trim()))};for(const _e of me){const Oe=_e.key;if(Ka.current.has(Oe))continue;const rt=N[Oe],In=typeof _e.maxCount=="number"&&_e.maxCount>1;if(Array.isArray(rt)&&rt.length>0){In?rt.forEach((wt,gr)=>He(`${Oe}-${gr}`,wt)):He(Oe,rt[0]);continue}if(rt&&!Array.isArray(rt)){He(Oe,rt);continue}if(In)for(let wt=0;wt<_e.maxCount;wt++){const gr=`${Oe}-${wt}`,qu=N[gr];if(!qu)break;He(gr,qu)}}if(Object.keys(Ee).length!==0){for(const _e of me)N[_e.key]!==void 0&&Ka.current.add(_e.key);$(_e=>{const Oe={..._e};let rt=!1;for(const[In,wt]of Object.entries(Ee))_e[In]||(Oe[In]=wt,rt=!0);return rt?Oe:_e})}},[N,Se]),V1(H,Se,B,ce,_),G1(H,Se,ce,h,_),W1(H,Se,B,ce,_),Y1(H,Se,ce,_),j1(H,Se,B,Nt),X1(H,pe);const Hu=Yu(H),$u=Qu(H);D.useEffect(()=>{if(!H.current)return;H.current.querySelectorAll(".rte-richtext-toggle").forEach(Ee=>{const He=Ee.getAttribute("data-expanded")==="true";Ee.innerHTML=He?'<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>'})},[Se,H]);const Uu=ub(H),{measureExpandedContentHeight:wn}=ll({collapsed:b,collapseTransitionMs:S,contentRef:w,contentBodyRef:P,editorRef:H,debugIdRef:C,setCollapsedContentMaxHeightPx:Ga,setExpandedContentMaxHeightPx:Wa,setIsCollapseAnimating:Xa,effectiveConfig:Se,files:B,multiVariableCounts:Yt,selectPortalsLength:Hu.length,datePickerPortalsLength:Uu.length,variablePortalsLength:$u.length}),_b=()=>{if(b)return;const me=P.current;if(!me)return;const Ee=Math.ceil(me.getBoundingClientRect().height||0);Ee>0&&Q(Ee),re.current=!0,ie.current=!1,ue.current&&(window.clearTimeout(ue.current),ue.current=null)};D.useEffect(()=>{const me=()=>{re.current&&(ie.current=!0,ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{ue.current=null,re.current=!1,ie.current=!1,Q(null),window.requestAnimationFrame(()=>wn())},450))};return window.addEventListener("focus",me),()=>window.removeEventListener("focus",me)},[wn]),D.useEffect(()=>{!re.current||!ie.current||(ue.current&&(window.clearTimeout(ue.current),ue.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{Q(null),wn(),re.current=!1,ie.current=!1})}))},[B,wn]),cl({config:e,editorRef:H,setIsEmpty:hr,setIsFormValid:Nt});const kb=hl({disabled:r,collapsed:b,onCollapsedChange:x,config:e,lockStructure:i,editorRef:H,containerRef:O,fileInputRef:v,onBeforeFilePickerOpen:_b,files:B,setFiles:$,handleRemoveFile:ee,setActiveBatchKey:j,setActiveBatchStartIndex:R,setActiveFileKey:V,isDraggingRef:pe,richtextPrevScrollTopRef:mr}),Qa=ml({config:e,editorRef:H,setIsEmpty:hr,setIsFormValid:Nt,setReportAnalyzeState:nt,setMarkdownAnalyzeState:ot,setMarkdownNameAnalyzeState:Mu,collapsed:b,measureExpandedContentHeight:wn,effectiveConfig:Se,files:B,multiVariableCounts:Yt,setMultiVariableCounts:Nn,savedCursorRef:kn}),vb=bl({disabled:r,config:e,multiVariableCounts:Yt,setMultiVariableCounts:Nn,editorRef:H,handleInput:Qa,markdownAnalyzeRef:Le,reportAnalyzeRef:Ye,markdownNameAnalyzeRef:Bu,markdownAnalyzeStateRef:ze,markdownRawTextRef:Tt,setMarkdownAnalyzeState:ot});pl({config:e,effectiveConfig:Se,files:B,editorRef:H,setIsFormValid:Nt,multiVariableCounts:Yt,setMultiVariableCounts:Nn});const Nb=gl({disabled:r,lockStructure:i,config:e,editorRef:H,handleInput:Qa}),wb=Tl({config:e,files:B,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:fr,editorRef:H,markdownAnalyzeState:We,markdownNameAnalyzeState:Gt}),Ib={...a?{width:typeof a=="number"?`${a}px`:a}:{},...f?{border:f}:{},...E?{background:E}:{},...c?{maxHeight:typeof c=="number"?`${c}px`:c}:{},...p?{minHeight:typeof p=="number"?`${p}px`:p}:{},...c?{"--rte-richtext-fullscreen-height":typeof c=="number"?`${c}px`:c}:{}},Lb=typeof S=="number"&&Number.isFinite(S)&&S>=0?S:260,Ob={overflow:"hidden"},Db={maxHeight:Y!=null?`${Y}px`:b?`${vn}px`:`${Math.max(Ya,vn)}px`,overflow:Y!=null||b||ja?"hidden":"auto",transition:Y!=null?"none":`max-height ${Lb}ms cubic-bezier(0.4, 0, 0.2, 1)`,willChange:"max-height"};return z.jsxs("div",{className:"rich-text-editor",style:Ib,"data-disabled":r,ref:O,children:[I,z.jsx("div",{className:"rich-text-editor-content",ref:w,style:Ob,children:z.jsxs("div",{ref:P,className:"rich-text-editor-content-body",style:Db,children:[z.jsx("div",{ref:H,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${pr&&m?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":m,onMouseDown:ge,onMouseMove:Pe,onMouseUp:st,onClick:kb,onDoubleClick:bt,onInput:Qa,onKeyDown:Nb,onPaste:vb}),z.jsx("input",{type:"file",ref:v,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:ne})]})}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsx("div",{className:"rich-text-editor-footer-left",children:z.jsxs("div",{className:"rich-text-editor-brand",children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""}),z.jsx("span",{className:"rte-brand-text",children:"SealSeek 1.0"})]}),h!=="hideAgent"&&z.jsx(se.Dropdown,{placement:"topLeft",menu:{items:s.filter(me=>me.isShowNew!==1).map(me=>({key:me.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[me.icon&&z.jsx("i",{className:me.icon}),z.jsx("span",{children:me.label})]}),onClick:()=>{u?.(me)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})]})}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(()=>{const me=e.find(He=>He.type==="tag");if(!me||!me.text)return null;const Ee=s.find(He=>He.label===me.text);return!Ee||Ee.points===void 0||Ee.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(Ee.points)]}),Ee.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:wb,disabled:n||r||l||!fr,className:"rich-text-editor-send-button",children:n||l?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),te,Uu,Hu,$u]})};ku.__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 vu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",lb=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],cb=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:u})=>e&&n?z.jsxs("div",{className:"auto_load_progress",children:[r||z.jsx("img",{src:vu,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),z.jsx(se.Progress,{percent:n.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||z.jsx("img",{src:vu,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(se.Select,{value:t,onChange:a,options:lb,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),db=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:u,onChange:o,onLoadNextPage:l,onStartAutoLoad:m,onStopLoading:f})=>{const[E,h]=D.useState(5),c=Math.ceil(r/n),p=D.useMemo(()=>a.length>=c,[a,c]),b=()=>Array.from({length:c},(y,x)=>x+1).filter(y=>!a.includes(y)).slice(0,E),g=(T,y,x)=>{const S=a.includes(T);return y==="prev"||y==="next"||y==="jump-prev"||y==="jump-next"?z.jsx("div",{className:"pageBox",children:x}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===T?"#2563EB":"#f5f5f5",color:e===T?"#fff":S?"#171717":"#a3a3a3"},children:[T,!S&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(lt.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!p&&z.jsx(cb,{loadIcon:t||void 0,autoLoading:s,batchSize:E,loadingProgress:u,disabled:!l||!m,onBatchSizeChange:h,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const T=b();m?.(T)},onStopLoad:()=>f?.()})]}),z.jsx(se.Pagination,{current:e,pageSize:n,total:r,onChange:T=>o(T),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},Nu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:u,pageSize:o,cachedPages:l,onChangePage:m,onLoadNextPage:f,onStartAutoLoad:E,onStopLoading:h,...c}=e,p=D.useRef(null),b=D.useCallback(g=>{m(g),l.includes(g)&&p.current?.scrollTo({key:`${(g-1)*o+1}`})},[l,m,o]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(se.Table,{ref:p,...c,columns:a,dataSource:i,pagination:!1,virtual:!0}),z.jsx(db,{loading:t,autoLoading:n,loadingProgress:r,current:u,pageSize:o,total:s,loadedCount:i.length,cachedPages:l,onChange:b,onLoadNextPage:f,onStartAutoLoad:E,onStopLoading:h})]})};Nu.__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 wu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[u,o]=D.useState(""),[l,m]=D.useState(0),[f,E]=D.useState(!1),[h,c]=D.useState(!1),[p,b]=D.useState(!1),g=D.useRef(void 0),T=D.useRef(void 0),y=D.useRef(e),x=D.useRef(l),S=D.useRef(h),_=D.useRef(u);D.useEffect(()=>{y.current=e,x.current=l,S.current=h,_.current=u});const N=D.useCallback((v,C)=>{let B=0;b(!0);const $=()=>{B<v.length?(o(v.slice(0,B+1)),B++,T.current=window.setTimeout($,n)):(b(!1),C?.())};$()},[n]),A=D.useCallback(v=>{let C=_.current.length;const B=()=>{C>0?(o(_.current.slice(0,C-1)),C--,T.current=window.setTimeout(B,n/2)):v?.()};B()},[n]),I=D.useCallback(()=>{if(y.current.length===0||S.current)return;E(!0);const v=y.current[x.current];_.current?A(()=>{N(v,()=>{g.current=window.setTimeout(()=>{m(C=>(C+1)%y.current.length),E(!1)},2e3)})}):N(v,()=>{g.current=window.setTimeout(()=>{m(C=>(C+1)%y.current.length),E(!1)},2e3)})},[A,N]);D.useEffect(()=>(r&&e.length>0&&!h&&I(),()=>{g.current&&window.clearTimeout(g.current),T.current&&window.clearTimeout(T.current)}),[l,h,r,e.length,I]),D.useEffect(()=>{!f&&r&&e.length>0&&!h&&I()},[l,f,r,e.length,h,I]);const O=v=>{c(!0),g.current&&window.clearTimeout(g.current),T.current&&window.clearTimeout(T.current),E(!1),b(!1),s.onFocus?.(v)},w=v=>{c(!1),!a&&e.length>0&&(o(""),m(0)),s.onBlur?.(v)},P=v=>{i?.(v.target.value),s.onChange?.(v)},H=()=>h||a?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(se.Input,{...s,value:a,onChange:P,onFocus:O,onBlur:w,placeholder:H(),style:{...s.style,position:"relative",zIndex:1}}),!h&&!a&&u&&z.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:[z.jsx("span",{children:u}),p&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
66
66
  @keyframes blink {
67
67
  0%, 50% { opacity: 1; }
68
68
  51%, 100% { opacity: 0; }
69
69
  }
70
- `})]})};wu.__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 Iu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:u=500,showCount:o=!0,submitText:l="发送",disabled:m=!1,rows:p=4,style:E,...h})=>{const[c,f]=D.useState(""),[b,g]=D.useState(0),[y,T]=D.useState(!1),[x,S]=D.useState(!1),[A,N]=D.useState(!1),[_,w]=D.useState(a||""),O=D.useRef(void 0),I=D.useRef(void 0),P=D.useRef(e),H=D.useRef(b),v=D.useRef(x),C=D.useRef(c),B=D.useRef(null);D.useEffect(()=>{P.current=e,H.current=b,v.current=x,C.current=c});const $=D.useCallback((ee,pe)=>{let Te=0;N(!0);const ge=()=>{Te<ee.length?(f(ee.slice(0,Te+1)),Te++,I.current=window.setTimeout(ge,n)):(N(!1),pe?.())};ge()},[n]),U=D.useCallback(ee=>{let pe=C.current.length;const Te=()=>{pe>0?(f(C.current.slice(0,pe-1)),pe--,I.current=window.setTimeout(Te,n/2)):ee?.()};Te()},[n]),V=D.useCallback(()=>{if(P.current.length===0||v.current)return;T(!0);const ee=P.current[H.current];C.current?U(()=>{$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%P.current.length),T(!1)},2e3)})}):$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%P.current.length),T(!1)},2e3)})},[U,$]);D.useEffect(()=>(r&&e.length>0&&!x&&V(),()=>{O.current&&window.clearTimeout(O.current),I.current&&window.clearTimeout(I.current)}),[b,x,r,e.length,V]),D.useEffect(()=>{!y&&r&&e.length>0&&!x&&V()},[b,y,r,e.length,x,V]);const k=ee=>{S(!0),O.current&&window.clearTimeout(O.current),I.current&&window.clearTimeout(I.current),T(!1),N(!1),h.onFocus?.(ee)},j=ee=>{S(!1),!a&&e.length>0&&(f(""),g(0)),h.onBlur?.(ee)},J=ee=>{const pe=ee.target.value;u&&pe.length>u||(i?i(pe):w(pe),h.onChange?.(ee))},R=()=>{const ee=i?a:_;ee.trim()&&!m&&(s?.(ee),i||w(""))},te=ee=>{(ee.ctrlKey||ee.metaKey)&&ee.key==="Enter"&&(ee.preventDefault(),R()),h.onKeyDown?.(ee)},ce=i?a:_,ne=m||!ce.trim()||(u?ce.length>u:!1);return z.jsxs("div",{style:{position:"relative",...E},children:[z.jsxs("div",{style:{position:"relative"},children:[z.jsx("textarea",{ref:B,value:i?a:_,onChange:J,onFocus:ee=>{ee.target.style.borderColor="#1890ff",ee.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.2)",k(ee)},onBlur:ee=>{ee.target.style.borderColor="#d9d9d9",ee.target.style.boxShadow="none",j(ee)},onKeyDown:te,placeholder:x||ce?t:"",maxLength:u,rows:p,disabled:m,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",...h.style},...h}),!x&&!ce&&c&&z.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:[z.jsx("span",{children:c}),A&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("div",{style:{position:"absolute",bottom:8,right:8,zIndex:3},children:z.jsx(se.Button,{type:"primary",size:"small",icon:z.jsx(lt.SendOutlined,{}),onClick:R,disabled:ne,style:{borderRadius:6,minWidth:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:l})})]}),o&&z.jsxs("div",{style:{marginTop:4,textAlign:"right",fontSize:"12px",color:"#999"},children:[ce.length,"/",u]}),z.jsx("style",{children:`
70
+ `})]})};wu.__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 Iu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:u=500,showCount:o=!0,submitText:l="发送",disabled:m=!1,rows:f=4,style:E,...h})=>{const[c,p]=D.useState(""),[b,g]=D.useState(0),[T,y]=D.useState(!1),[x,S]=D.useState(!1),[_,N]=D.useState(!1),[A,I]=D.useState(a||""),O=D.useRef(void 0),w=D.useRef(void 0),P=D.useRef(e),H=D.useRef(b),v=D.useRef(x),C=D.useRef(c),B=D.useRef(null);D.useEffect(()=>{P.current=e,H.current=b,v.current=x,C.current=c});const $=D.useCallback((ee,pe)=>{let ye=0;N(!0);const ge=()=>{ye<ee.length?(p(ee.slice(0,ye+1)),ye++,w.current=window.setTimeout(ge,n)):(N(!1),pe?.())};ge()},[n]),U=D.useCallback(ee=>{let pe=C.current.length;const ye=()=>{pe>0?(p(C.current.slice(0,pe-1)),pe--,w.current=window.setTimeout(ye,n/2)):ee?.()};ye()},[n]),V=D.useCallback(()=>{if(P.current.length===0||v.current)return;y(!0);const ee=P.current[H.current];C.current?U(()=>{$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%P.current.length),y(!1)},2e3)})}):$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%P.current.length),y(!1)},2e3)})},[U,$]);D.useEffect(()=>(r&&e.length>0&&!x&&V(),()=>{O.current&&window.clearTimeout(O.current),w.current&&window.clearTimeout(w.current)}),[b,x,r,e.length,V]),D.useEffect(()=>{!T&&r&&e.length>0&&!x&&V()},[b,T,r,e.length,x,V]);const k=ee=>{S(!0),O.current&&window.clearTimeout(O.current),w.current&&window.clearTimeout(w.current),y(!1),N(!1),h.onFocus?.(ee)},j=ee=>{S(!1),!a&&e.length>0&&(p(""),g(0)),h.onBlur?.(ee)},J=ee=>{const pe=ee.target.value;u&&pe.length>u||(i?i(pe):I(pe),h.onChange?.(ee))},R=()=>{const ee=i?a:A;ee.trim()&&!m&&(s?.(ee),i||I(""))},te=ee=>{(ee.ctrlKey||ee.metaKey)&&ee.key==="Enter"&&(ee.preventDefault(),R()),h.onKeyDown?.(ee)},ce=i?a:A,ne=m||!ce.trim()||(u?ce.length>u:!1);return z.jsxs("div",{style:{position:"relative",...E},children:[z.jsxs("div",{style:{position:"relative"},children:[z.jsx("textarea",{ref:B,value:i?a:A,onChange:J,onFocus:ee=>{ee.target.style.borderColor="#1890ff",ee.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.2)",k(ee)},onBlur:ee=>{ee.target.style.borderColor="#d9d9d9",ee.target.style.boxShadow="none",j(ee)},onKeyDown:te,placeholder:x||ce?t:"",maxLength:u,rows:f,disabled:m,style:{width:"100%",minHeight:`${f*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",...h.style},...h}),!x&&!ce&&c&&z.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:[z.jsx("span",{children:c}),_&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("div",{style:{position:"absolute",bottom:8,right:8,zIndex:3},children:z.jsx(se.Button,{type:"primary",size:"small",icon:z.jsx(lt.SendOutlined,{}),onClick:R,disabled:ne,style:{borderRadius:6,minWidth:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:l})})]}),o&&z.jsxs("div",{style:{marginTop:4,textAlign:"right",fontSize:"12px",color:"#999"},children:[ce.length,"/",u]}),z.jsx("style",{children:`
71
71
  @keyframes blink {
72
72
  0%, 50% { opacity: 1; }
73
73
  51%, 100% { opacity: 0; }
74
74
  }
75
- `})]})};Iu.__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 Va=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:u=!0,onClick:o,onVideoLoaded:l,onVideoPlay:m,onVideoPause:p,onVideoEnded:E,className:h,style:c,...f})=>{const b=D.useRef(null),[g,y]=D.useState(!1),[T,x]=D.useState(!1),[S,A]=D.useState(!1),N=D.useCallback(()=>{b.current&&(b.current.play(),y(!0),m?.())},[m]),_=D.useCallback(()=>{b.current&&(b.current.pause(),y(!1),p?.())},[p]),w=D.useCallback($=>{$.stopPropagation(),g?_():N()},[g,N,_]),O=D.useCallback(()=>{x(!0),u&&!g&&N()},[u,g,N]),I=D.useCallback(()=>{x(!1),u&&g&&_()},[u,g,_]),P=D.useCallback(()=>{A(!0),l?.()},[l]),H=D.useCallback(()=>{y(!0),m?.()},[m]),v=D.useCallback(()=>{y(!1),p?.()},[p]),C=D.useCallback(()=>{y(!1),E?.()},[E]),B=D.useCallback($=>{o?.($)},[o]);return z.jsx(se.Card,{...f,className:`video-card ${h||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:o?"pointer":"default",border:"none",borderRadius:0,...c},bordered:!1,onMouseEnter:O,onMouseLeave:I,onClick:B,children:z.jsxs("div",{className:"video-card-container",children:[z.jsx("video",{ref:b,src:e,poster:t,preload:"metadata",onLoadedData:P,onPlay:H,onPause:v,onEnded:C,muted:!0,loop:!0}),s&&z.jsx("div",{className:`video-play-button ${T?"hovered":""}`,onClick:w,children:g?z.jsx(lt.PauseCircleOutlined,{className:"play-icon"}):z.jsx(lt.PlayCircleOutlined,{className:"play-icon"})}),!S&&z.jsx("div",{className:"video-loading-mask",children:z.jsx("div",{className:"loading-spinner"})})]})})};Va.__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 fb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),pb=e=>e.type?e.type:fb(e.url)?"video":"image",Lu=({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:u})=>{const o=D.useRef(null),[l,m]=D.useState(t||a.md||3),p=D.useRef(new Map),E=D.useCallback(()=>{if(!r||t)return t||a.md||3;const b=window.innerWidth;return b<576?a.xs||1:b<768?a.sm||2:b<992?a.md||3:b<1200?a.lg||4:b<1600?a.xl||5:a.xxl||6},[r,t,a]),h=D.useCallback(()=>{if(!o.current)return;const b=l,g=o.current,T=(g.offsetWidth-n*(b-1))/b,x=new Array(b).fill(0);e.forEach((A,N)=>{const _=A.id||N,w=p.current.get(_);if(!w)return;const O=Math.min(...x),I=x.indexOf(O),P=I*(T+n),H=x[I];w.style.position="absolute",w.style.left=`${P}px`,w.style.top=`${H}px`,w.style.width=`${T}px`,x[I]+=w.offsetHeight+n});const S=Math.max(...x);g.style.height=`${S}px`},[e,l,n]);D.useEffect(()=>{const b=()=>{const g=E();g!==l&&m(g)};if(r)return window.addEventListener("resize",b),b(),()=>window.removeEventListener("resize",b)},[r,E,l]),D.useEffect(()=>{const b=setTimeout(()=>{h()},100);return()=>clearTimeout(b)},[e,l,h]);const c=D.useCallback(()=>{h()},[h]),f=D.useCallback(b=>{u&&u(b),b.onClick?.(b)},[u]);return z.jsx("div",{ref:o,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((b,g)=>{const y=b.id||g,T=pb(b);return z.jsx("div",{ref:x=>{x?p.current.set(y,x):p.current.delete(y)},className:"waterfall-item",children:T==="video"?z.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:u||b.onClick?"pointer":"default"},children:z.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:z.jsx(Va,{src:b.url,poster:b.poster,width:"100%",height:"100%",onClick:()=>f(b),onVideoLoaded:c,autoPlayOnHover:!0,showPlayButton:!1})})}):z.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>f(b),style:{cursor:u||b.onClick?"pointer":"default"},children:z.jsx("img",{src:b.url,alt:`瀑布流图片 ${g+1}`,className:"waterfall-image",onLoad:c,onError:c,style:{display:"block",width:"100%",height:"auto"}})})},y)})})};Lu.__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 An=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Vt={日期:"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"},hb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],_n=e=>Vt[e]??e,mb=e=>e?!!(Vt[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,gb=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(o=>o.trim()).filter(Boolean),u=s.some(o=>Vt[o]!==void 0);if(s.length>=2&&u)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(o=>o.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const u=s.some(o=>Vt[o]!==void 0);return s.length>=2&&u?s:[]}const a=n.filter(mb);return a.some(s=>Vt[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},Eb=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},bb=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!==""),Ou=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?gb(a[0]):[],s=i.length>=2,u=s?i:hb,o=s||a.length>0&&a[0].includes("展现量")?1:0,l=u.filter(g=>g!=="日期"),m=l.length,p=[];r.forEach((g,y)=>{const T=y+o;if(T>=a.length)return;const x=a[T];let S=x.split(/[\r\n]+/).map(_=>_.trim()).filter(_=>_!=="");S.length<m&&(S=bb(x));const A=_=>S.length===m*2?S[_*2]??"":S[_]??"",N={};N[_n("日期")]=g,l.forEach((_,w)=>{const O=A(w),I=Eb(O),P=_n(_);N[P]=I}),p.push(N)});const E=u.filter(g=>{const y=_n(g);return p.some(T=>{const x=T[y];return x!==void 0&&String(x).trim()!==""})}),h=`| ${E.join(" | ")} |`,c=`| ${E.map(()=>"---").join(" | ")} |`,f=p.map(g=>`| ${E.map(T=>{const x=_n(T);return g[x]??"-"}).join(" | ")} |`);return{markdown:[h,c,...f].join(`
76
- `),jsonData:p}},Du=e=>{if(!e)return"";const t=e.trim().split(`
77
- `);if(t.length<2)return An(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return An(e);const s=t[0].split("|").map(p=>p.trim()).filter(p=>p!==""),u=t.slice(2).map(p=>p.split("|").map(E=>E.trim()).filter((E,h,c)=>h>0&&h<c.length)),o="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 m='<div style="overflow-x:auto;max-width:100%;">';return m+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',m+="<thead><tr>",s.forEach(p=>{m+=`<th style="${o}">${An(p)}</th>`}),m+="</tr></thead>",m+="<tbody>",u.forEach(p=>{m+="<tr>",s.forEach((E,h)=>{const c=p[h]||"-";m+=`<td style="${l}">${An(c)}</td>`}),m+="</tr>"}),m+="</tbody></table></div>",m},Pu=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((o,l)=>{const m=r[l];if(m==null)return;const p=_n(m),E=o.textContent?.trim()||"";s[p]=E==="-"?"":E}),Object.keys(s).length>0&&t.push(s)}),t},yb=e=>async t=>{const n=Ou(t.text);return e&&e(n.jsonData),{modules:[{title:"推广分析表格",content:Du(n.markdown),markdown:n.markdown}]}},Tb=(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=Pu(t);s.length>0&&(i=s)}return i.length===0&&n&&n.length>0&&(i=n),{grossProfitMargin:r,refundRate:a,tableData:i}},xb={algorithm:se.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"}}};he.AdvancedTable=si,he.AppModal=ei,he.BackButton=ai,he.Button=Ja,he.Card=Za,he.DynamicInput=wu,he.DynamicTextArea=Iu,he.EmptyAndSpin=ri,he.HEADER_TO_FIELD=Vt,he.LinkButton=ii,he.PageTable=ti,he.RichTextEditor=ku,he.VideoCard=Va,he.VirtualTable=Nu,he.Waterfall=Lu,he.XcIcon=ni,he.buildPromotionSendPayload=Tb,he.createMarkdownAnalyze=yb,he.escapeHtml=An,he.extractTableDataFromHtml=Pu,he.lightTheme=xb,he.parsePromotionTableMarkdown=Ou,he.renderMarkdownToHtml=Du,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
75
+ `})]})};Iu.__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 Va=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:u=!0,onClick:o,onVideoLoaded:l,onVideoPlay:m,onVideoPause:f,onVideoEnded:E,className:h,style:c,...p})=>{const b=D.useRef(null),[g,T]=D.useState(!1),[y,x]=D.useState(!1),[S,_]=D.useState(!1),N=D.useCallback(()=>{b.current&&(b.current.play(),T(!0),m?.())},[m]),A=D.useCallback(()=>{b.current&&(b.current.pause(),T(!1),f?.())},[f]),I=D.useCallback($=>{$.stopPropagation(),g?A():N()},[g,N,A]),O=D.useCallback(()=>{x(!0),u&&!g&&N()},[u,g,N]),w=D.useCallback(()=>{x(!1),u&&g&&A()},[u,g,A]),P=D.useCallback(()=>{_(!0),l?.()},[l]),H=D.useCallback(()=>{T(!0),m?.()},[m]),v=D.useCallback(()=>{T(!1),f?.()},[f]),C=D.useCallback(()=>{T(!1),E?.()},[E]),B=D.useCallback($=>{o?.($)},[o]);return z.jsx(se.Card,{...p,className:`video-card ${h||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:o?"pointer":"default",border:"none",borderRadius:0,...c},bordered:!1,onMouseEnter:O,onMouseLeave:w,onClick:B,children:z.jsxs("div",{className:"video-card-container",children:[z.jsx("video",{ref:b,src:e,poster:t,preload:"metadata",onLoadedData:P,onPlay:H,onPause:v,onEnded:C,muted:!0,loop:!0}),s&&z.jsx("div",{className:`video-play-button ${y?"hovered":""}`,onClick:I,children:g?z.jsx(lt.PauseCircleOutlined,{className:"play-icon"}):z.jsx(lt.PlayCircleOutlined,{className:"play-icon"})}),!S&&z.jsx("div",{className:"video-loading-mask",children:z.jsx("div",{className:"loading-spinner"})})]})})};Va.__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 fb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),pb=e=>e.type?e.type:fb(e.url)?"video":"image",Lu=({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:u})=>{const o=D.useRef(null),[l,m]=D.useState(t||a.md||3),f=D.useRef(new Map),E=D.useCallback(()=>{if(!r||t)return t||a.md||3;const b=window.innerWidth;return b<576?a.xs||1:b<768?a.sm||2:b<992?a.md||3:b<1200?a.lg||4:b<1600?a.xl||5:a.xxl||6},[r,t,a]),h=D.useCallback(()=>{if(!o.current)return;const b=l,g=o.current,y=(g.offsetWidth-n*(b-1))/b,x=new Array(b).fill(0);e.forEach((_,N)=>{const A=_.id||N,I=f.current.get(A);if(!I)return;const O=Math.min(...x),w=x.indexOf(O),P=w*(y+n),H=x[w];I.style.position="absolute",I.style.left=`${P}px`,I.style.top=`${H}px`,I.style.width=`${y}px`,x[w]+=I.offsetHeight+n});const S=Math.max(...x);g.style.height=`${S}px`},[e,l,n]);D.useEffect(()=>{const b=()=>{const g=E();g!==l&&m(g)};if(r)return window.addEventListener("resize",b),b(),()=>window.removeEventListener("resize",b)},[r,E,l]),D.useEffect(()=>{const b=setTimeout(()=>{h()},100);return()=>clearTimeout(b)},[e,l,h]);const c=D.useCallback(()=>{h()},[h]),p=D.useCallback(b=>{u&&u(b),b.onClick?.(b)},[u]);return z.jsx("div",{ref:o,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((b,g)=>{const T=b.id||g,y=pb(b);return z.jsx("div",{ref:x=>{x?f.current.set(T,x):f.current.delete(T)},className:"waterfall-item",children:y==="video"?z.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:u||b.onClick?"pointer":"default"},children:z.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:z.jsx(Va,{src:b.url,poster:b.poster,width:"100%",height:"100%",onClick:()=>p(b),onVideoLoaded:c,autoPlayOnHover:!0,showPlayButton:!1})})}):z.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>p(b),style:{cursor:u||b.onClick?"pointer":"default"},children:z.jsx("img",{src:b.url,alt:`瀑布流图片 ${g+1}`,className:"waterfall-image",onLoad:c,onError:c,style:{display:"block",width:"100%",height:"auto"}})})},T)})})};Lu.__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 An=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Vt={日期:"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"},hb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],_n=e=>Vt[e]??e,mb=e=>e?!!(Vt[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,gb=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(o=>o.trim()).filter(Boolean),u=s.some(o=>Vt[o]!==void 0);if(s.length>=2&&u)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(o=>o.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const u=s.some(o=>Vt[o]!==void 0);return s.length>=2&&u?s:[]}const a=n.filter(mb);return a.some(s=>Vt[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},Eb=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},bb=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!==""),Ou=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?gb(a[0]):[],s=i.length>=2,u=s?i:hb,o=s||a.length>0&&a[0].includes("展现量")?1:0,l=u.filter(g=>g!=="日期"),m=l.length,f=[];r.forEach((g,T)=>{const y=T+o;if(y>=a.length)return;const x=a[y];let S=x.split(/[\r\n]+/).map(A=>A.trim()).filter(A=>A!=="");S.length<m&&(S=bb(x));const _=A=>S.length===m*2?S[A*2]??"":S[A]??"",N={};N[_n("日期")]=g,l.forEach((A,I)=>{const O=_(I),w=Eb(O),P=_n(A);N[P]=w}),f.push(N)});const E=u.filter(g=>{const T=_n(g);return f.some(y=>{const x=y[T];return x!==void 0&&String(x).trim()!==""})}),h=`| ${E.join(" | ")} |`,c=`| ${E.map(()=>"---").join(" | ")} |`,p=f.map(g=>`| ${E.map(y=>{const x=_n(y);return g[x]??"-"}).join(" | ")} |`);return{markdown:[h,c,...p].join(`
76
+ `),jsonData:f}},Du=e=>{if(!e)return"";const t=e.trim().split(`
77
+ `);if(t.length<2)return An(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return An(e);const s=t[0].split("|").map(f=>f.trim()).filter(f=>f!==""),u=t.slice(2).map(f=>f.split("|").map(E=>E.trim()).filter((E,h,c)=>h>0&&h<c.length)),o="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 m='<div style="overflow-x:auto;max-width:100%;">';return m+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',m+="<thead><tr>",s.forEach(f=>{m+=`<th style="${o}">${An(f)}</th>`}),m+="</tr></thead>",m+="<tbody>",u.forEach(f=>{m+="<tr>",s.forEach((E,h)=>{const c=f[h]||"-";m+=`<td style="${l}">${An(c)}</td>`}),m+="</tr>"}),m+="</tbody></table></div>",m},Pu=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((o,l)=>{const m=r[l];if(m==null)return;const f=_n(m),E=o.textContent?.trim()||"";s[f]=E==="-"?"":E}),Object.keys(s).length>0&&t.push(s)}),t},Tb=e=>async t=>{const n=Ou(t.text);return e&&e(n.jsonData),{modules:[{title:"推广分析表格",content:Du(n.markdown),markdown:n.markdown}]}},yb=(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=Pu(t);s.length>0&&(i=s)}return i.length===0&&n&&n.length>0&&(i=n),{grossProfitMargin:r,refundRate:a,tableData:i}},xb={algorithm:se.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"}}};he.AdvancedTable=si,he.AppModal=ei,he.BackButton=ai,he.Button=Ja,he.Card=Za,he.DynamicInput=wu,he.DynamicTextArea=Iu,he.EmptyAndSpin=ri,he.HEADER_TO_FIELD=Vt,he.LinkButton=ii,he.PageTable=ti,he.RichTextEditor=ku,he.VideoCard=Va,he.VirtualTable=Nu,he.Waterfall=Lu,he.XcIcon=ni,he.buildPromotionSendPayload=yb,he.createMarkdownAnalyze=Tb,he.escapeHtml=An,he.extractTableDataFromHtml=Pu,he.lightTheme=xb,he.parsePromotionTableMarkdown=Ou,he.renderMarkdownToHtml=Du,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
78
78
  //# sourceMappingURL=index.umd.js.map