@farris/x-ui 0.1.0 → 0.1.1

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.
@@ -1,103 +1,103 @@
1
- (function(N,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(N=typeof globalThis<"u"?globalThis:N||self,o(N.FarrisX={},N.vue))})(this,function(N,o){"use strict";var Vm=Object.defineProperty;var zl=N=>{throw TypeError(N)};var Mm=(N,o,be)=>o in N?Vm(N,o,{enumerable:!0,configurable:!0,writable:!0,value:be}):N[o]=be;var fe=(N,o,be)=>Mm(N,typeof o!="symbol"?o+"":o,be),uo=(N,o,be)=>o.has(N)||zl("Cannot "+be);var A=(N,o,be)=>(uo(N,o,"read from private field"),be?be.call(N):o.get(N)),oe=(N,o,be)=>o.has(N)?zl("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(N):o.set(N,be),ee=(N,o,be,at)=>(uo(N,o,"write to private field"),at?at.call(N,be):o.set(N,be),be),q=(N,o,be)=>(uo(N,o,"access private method"),be);var Pu=(N,o,be,at)=>({set _(Fr){ee(N,o,Fr,be)},get _(){return A(N,o,at)}});var wl,Ft,En,vl,Al,ot,Je,ct,rn,dt,_n,Sn,ft,ke,ht,we,he,ne,$e,et,Ve,Se,mt,Fe,pt,gt,tt,nt,bt,Gt,Ue,Fn,G,io,un,Nt,kr,rt,jl,on,Dn,Cr,qt,Zt,oo,Ru,Vu,me,ao,Sr,Yt,so,Tn;const be={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},at=o.defineComponent({name:"AppPreviewMessage",props:be,setup(e){const t=o.ref(!1);function n(){var m;const a=(m=e.content)==null?void 0:m.appConfig;if(!a)return"";const s=a.ws??"",l=a.appPath??"",d=a.appObjectId??"";return`${a.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${l}&boId=${d}&ws=${s}&version=2.0#/home`}function u(){var s,l;const a=(s=e.content)==null?void 0:s.previewConfig;a&&e.onOpen&&e.onOpen({...a,title:a.title??((l=e.content)==null?void 0:l.appName)})}function i(a){const s=a.target;s!=null&&s.closest(".f-chat-app-preview-open-btn")||a.preventDefault()}function r(a){a.stopPropagation();const s=n();s&&window.open(s,"_blank")}return()=>{const a=e.content;if(!a)return null;const{message:s,appName:l,createdDatetime:d}=a;return o.createVNode("div",{class:"f-chat-message-app-preview"},[o.createVNode("div",{class:"f-chat-app-preview-message"},[s]),o.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:i,onClick:u,role:"button",tabindex:0,onKeydown:f=>f.key==="Enter"&&u()},[o.createVNode("div",{class:"f-chat-app-preview-card-left"},[o.createVNode("span",{class:"f-chat-app-preview-icon"},[o.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),o.createVNode("div",{class:"f-chat-app-preview-card-middle"},[o.createVNode("div",{class:"f-chat-app-preview-app-name"},[l]),o.createVNode("div",{class:"f-chat-app-preview-datetime"},[d])]),o.createVNode("div",{class:"f-chat-app-preview-card-right"},[o.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&o.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:r,title:"在新页签中打开","aria-label":"在新页签中打开"},[o.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});at.install=e=>{e.component(at.name,at)};const Fr={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0}},Mu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hl="/api/runtime/attachment";function $l(){try{const e=Mu==null?void 0:Mu.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function Ul(e){var n;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((n=window.location)!=null&&n.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function Wl(e){return`${Hl}/${encodeURIComponent(e)}/download`}function Bu(e){const t=String(e??"").trim();if(!t)return"";const n=Wl(t),u=$l();return u?`${u}${n}`:n}function lo(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function sn(e){const t=String(e.fileId??"").trim();if(t)return Bu(t);const n=String(e.url??"").trim();if(!n)return;const u=lo(n);if(u)return Bu(u);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Dr(e,t){const n=String(t??"").replace(/[/\\]/g,"_").trim()||"download",u=Ul(e);try{const i=await fetch(u,{credentials:"include",mode:"cors"});if(!i.ok)throw new Error(`download_http_${i.status}`);const r=await i.blob(),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=n,s.rel="noopener noreferrer",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)}catch{const i=document.createElement("a");i.href=u,i.target="_blank",i.rel="noopener noreferrer",document.body.appendChild(i),i.click(),document.body.removeChild(i)}}function ye(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(u=>{e[u]=!0}):Array.isArray(t)?t.forEach(n=>{n&&(e[n]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u&&(e[n]=!0)})),e}function Ae(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(u=>{var r,a;const i=u.split(":");if(i.length>=2&&((r=i[0])!=null&&r.trim())&&((a=i[1])!=null&&a.trim())){const s=i[0].trim(),l=i.slice(1).join(":").trim();e[s]=l}}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u!==void 0&&u!==null&&(e[n]=u)})),e}function Rn(e){return e||null}function co(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Tr(e){return e?typeof e!="string"?e:co(e)?o.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const n=t.target;n.style.display="none",n.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?o.h("i",{class:e}):e:null}function fo(e,t,n,u={}){const{charInterval:i=30}=u,r=o.ref({});let a=[],s=new Set;const l=()=>typeof t=="function"?t():t.value,d=()=>typeof n=="function"?n():n.value,f=()=>{a.forEach(p=>clearInterval(p)),a=[]},c=()=>{f(),r.value={},s.clear()},m=()=>{f(),r.value={},s.clear()},g=()=>{const p=e();if(!p||Object.keys(p).length===0){r.value={};return}if(!d()){r.value={...p},s=new Set(Object.keys(p));return}const v=Object.keys(p);v.forEach(h=>{r.value.hasOwnProperty(h)||(r.value[h]="")});const x=v.filter(h=>!s.has(h));if(x.length===0)return;let k=0;const y=()=>{var E;if(k>=x.length)return;const h=x[k],b=p[h];if(!b){s.add(h),k++,y();return}let w=((E=r.value[h])==null?void 0:E.length)||0;const C=setInterval(()=>{w<b.length?(r.value={...r.value,[h]:b.slice(0,w+1)},w++):(clearInterval(C),a=a.filter(_=>_!==C),s.add(h),k++,y())},i);a.push(C)};y()};return o.watch(()=>e(),()=>{l()&&g()},{immediate:!0}),o.watch(n,()=>{m(),l()&&g()}),o.watch(t,p=>{p?g():c()}),o.onMounted(()=>{l()&&g()}),{displayContent:r}}function Nr(){const e=o.reactive({}),t=[],n=o.ref(null);let u=null;const i=30,r=p=>{const v=e[p];return!v||v.displayedLength>=v.rawValue.length},a=o.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(p=>r(p))),s=()=>{for(const p of t)if(!r(p))return p;return null},l=()=>{if(!n.value&&(n.value=s(),!n.value)){d();return}const p=e[n.value];p&&(p.displayedLength<p.rawValue.length?(p.displayedLength++,p.displayedValue=p.rawValue.slice(0,p.displayedLength),p.isStreaming=!0):(p.isStreaming=!1,p.displayedValue=p.rawValue,n.value=s(),n.value||d()))},d=()=>{u&&(clearInterval(u),u=null)},f=()=>{u||(u=setInterval(l,i))},c=()=>{d(),Object.keys(e).forEach(p=>{delete e[p]}),t.length=0,n.value=null},m=(p,v)=>{if(e[p]){g(p,v);return}t.push(p),e[p]={rawValue:v??"",displayedLength:0,isStreaming:!1,displayedValue:""},u||(!n.value||n.value===p)&&f()},g=(p,v)=>{const x=e[p];if(!x){m(p,v);return}x.rawValue=v??"",!u&&!r(p)&&(!n.value||n.value===p)&&f()};return o.onUnmounted(()=>{d()}),{propertyStates:e,currentProperty:n,get isAnyStreaming(){return Object.values(e).some(p=>p.isStreaming)},isAllDone:a,startStreaming:f,reset:c,registerProperty:m,updatePropertyValue:g}}function zu(){const e=o.ref(null),t=o.ref(0),n=o.ref(!1);let u=null;const i=()=>{e.value=Date.now(),n.value=!0,u=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},r=()=>{u&&(clearInterval(u),u=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:n,start:i,stop:r,reset:()=>{r(),e.value=null,t.value=0,n.value=!1}}}function Gl(e,t){const n=o.computed(()=>{var i;return Ae({},(i=e.styles)==null?void 0:i.header)});function u(){return t.slots.header&&o.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[t.slots.header()])}return{renderHeader:u}}function Xl(e,t){var r;const n=o.ref(((r=e.content)==null?void 0:r.sender)??"发送人"),u=o.computed(()=>{var a;return Ae({},(a=e.styles)==null?void 0:a.header)});function i(){return o.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:u.value},[n.value])}return{renderHeader:i}}const ql={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},Zl={attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function Yl(){return{getFileIcon:u=>({pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",zip:"file-type-zip",rar:"file-type-zip",image:"file-type-img",img:"file-type-img",md:"file-type-md",video:"file-type-any",audio:"file-type-any"})[u.toLowerCase()]||"file-type-any",formatFileName:u=>(u==null?void 0:u.replace(/\.[^.]+$/,""))??"",formatFileSize:u=>u<1024?u+" B":u<1048576?(u/1024).toFixed(1)+" KB":(u/1048576).toFixed(1)+" MB"}}const ho=o.defineComponent({name:"FXBubbleAttachment",props:Zl,emits:["preview","batchPreview"],setup(e,t){const n=o.computed(()=>e.attachments??[]),u=o.computed(()=>{var m;return((m=n.value)==null?void 0:m.length)>0}),{formatFileName:i,formatFileSize:r}=Yl(),a=o.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),s=o.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth})),l=o.computed(()=>e.enableFixedWidth?{width:"200px"}:{flex:"0 0 calc(50% - 4px)"});function d(m,g){t.emit("preview",g)}async function f(m,g){m.stopPropagation(),m.preventDefault();const p=sn(g);p&&await Dr(p,g.name)}function c(m){t.emit("batchPreview",n.value)}return()=>u.value?o.createVNode("div",{class:"f-chat-bubble-attachments"},[n.value.map((m,g)=>{const p=sn(m);return o.createVNode("div",{class:"f-chat-bubble-attachment-item",style:l.value,key:g},[o.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation",onClick:v=>d(v,m)},[o.createVNode("div",{class:a.value},[o.createVNode("span",{class:s.value,title:m.name},[i(m.name)]),m.size?o.createVNode("span",{class:"f-chat-bubble-attachment-size"},[r(m.size)]):null])]),e.showDownloadButton!==!1&&p?o.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:v=>f(v,m)},[o.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}),e.enableBatchPreview&&o.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:c},[o.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[o.createTextVNode("查看全部文件")]),o.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),Kl=o.defineComponent({name:"FXBubbleFileContentFooter",props:ql,setup(e,t){const n=o.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return Ae({},e.customStyle),()=>o.createVNode(ho,{attachments:n.value,onPreview:u=>{var i;return(i=e.onPreviewFile)==null?void 0:i.call(e,u)},onBatchPreview:u=>{var i;return(i=e.onBatchPreviewFile)==null?void 0:i.call(e,u)}},null)}}),Ql={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},Jl=o.defineComponent({name:"FXBubblePageContentFooter",props:Ql,setup(e,t){const n=o.ref(),u=o.computed(()=>{var a,s;const r={width:"100%",height:"100%",border:"none"};return(a=e.customStyle)!=null&&a.width&&(r.width=e.customStyle.width),(s=e.customStyle)!=null&&s.height&&(r.height=`${e.customStyle.height}px`),r}),i=r=>{var a,s;((a=r.data)==null?void 0:a.type)==="navigation"&&((s=r.data)!=null&&s.url)&&e.onNavigate&&e.onNavigate(r.data.url)};return o.onMounted(()=>{window.addEventListener("message",i)}),o.onUnmounted(()=>{window.removeEventListener("message",i)}),()=>o.createVNode("iframe",{ref:n,src:e.pageUrl,style:u.value,scrolling:"auto"},null)}});function mo(){function e(i,r){const{fileContent:a,height:s,width:l}=i;return{file:a,customStyle:{width:l||"100%",height:s||"100%"},onPreviewFile:r==null?void 0:r.onPreviewFile,onBatchPreviewFile:r==null?void 0:r.onBatchPreviewFile}}function t(i,r){const{pageUrl:a,height:s,width:l}=i;return{pageUrl:a,customStyle:{width:l||"100%",height:s||"100%"},onNavigate:r==null?void 0:r.onNavigate}}function n(i,r){const a=e(i,r);return o.h(Kl,a)}function u(i,r){const a=t(i,r);return o.h(Jl,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:u}}const ec={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}};function tc(e){return e.replace(/```\s*\n+\s*assistant-widget/g,"``` assistant-widget")}function nc(e){if(!e)return!1;const t=/^```\s*assistant-widget[\s\S]*?```$/,n=/^```\s*assistant-widget/;return t.test(e)||n.test(e)}function rc(e){if(!e)return[];const t=/(```[\s]*assistant-widget[\s\S]*?```)/g,n=[];let u=0,i;for(;(i=t.exec(e))!==null;){if(i.index>u){const r=e.slice(u,i.index),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const l=r.indexOf(s[0]);l>0&&n.push(r.slice(0,l)),n.push(r.slice(l));const d=r.slice(l+s[0].length);d.trim().length>0&&n.push(d)}else n.push(r)}n.push(tc(i[0])),u=i.index+i[0].length}if(u<e.length){const r=e.slice(u),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const l=r.indexOf(s[0]);l>0&&n.push(r.slice(0,l)),n.push(r.slice(l))}else n.push(r)}return n.filter(r=>r.trim().length>0)}function po(e){const t=e.replace("``` assistant-widget","").replace("```","").trim();try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function uc(e){var n;const t=po(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const ic=/^```\s*dynamic-component[\s\S]*?```$/,oc=/^```\s*dynamic-component/;function ac(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function sc(e){return e?ic.test(e)||oc.test(e):!1}function lc(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object"||Array.isArray(n))return null;const u=n;return typeof u.instanceId!="string"?null:{...u,instanceId:u.instanceId,name:typeof u.name=="string"?u.name:void 0,componentId:typeof u.componentId=="string"?u.componentId:void 0,jsUrl:typeof u.jsUrl=="string"?u.jsUrl:"",url:typeof u.url=="string"?u.url:"",title:typeof u.title=="string"?u.title:"预览",position:u.position==="inline"?"inline":"right",width:typeof u.width=="string"?u.width:void 0,isFullscreen:typeof u.isFullscreen=="boolean"?u.isFullscreen:!1,autoOpen:typeof u.autoOpen=="boolean"?u.autoOpen:!1,fileRe:typeof u.fileRe=="string"?u.fileRe:void 0,target:u.target==="preview"||u.target==="previewExtra"?u.target:void 0}}function cc(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;const n=t.match(/"position"\s*:\s*"(inline|right)"/);return n?{position:n[1]}:null}function dc(e){if(!e)return[];const t="``` dynamic-component",n="```",u=[];let i=0;for(;i<e.length;){const r=e.indexOf(t,i);if(r===-1){const g=e.slice(i);g&&u.push(g);break}let a=r+t.length;const s=e.lastIndexOf("```",r),l=s>=0&&s<r+3?s:r,d=e.slice(i,l);d&&u.push(d);const f=e.indexOf(n,a);if(f===-1){u.push(e.slice(l));break}const c=f+n.length,m=e.slice(l,c);u.push(ac(m)),i=c}return u.filter(r=>r.length>0)}var Oe=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(Oe||{});function fc(e){var i;if(!e)return[];const t=[],n=new Set,u=rc(e);for(const r of u)if(nc(r))if(r.endsWith("```")){const a=po(r);t.push({type:Oe.AssistantWidgetComplete,raw:r,widgetData:a,widgetUrl:(i=a==null?void 0:a.renderer)==null?void 0:i.url,widgetImplOptions:uc(r)})}else t.push({type:Oe.AssistantWidgetPending,raw:r});else{const a=dc(r);for(const s of a)if(sc(s))if(s.endsWith("```")){const l=lc(s);if(l!=null&&l.instanceId){if(n.has(l.instanceId))continue;n.add(l.instanceId),t.push({type:Oe.DynamicComponentComplete,raw:s,config:l})}}else{const l=cc(s);t.push({type:Oe.DynamicComponentPending,raw:s,position:(l==null?void 0:l.position)??null})}else s.trim()&&t.push({type:Oe.Text,raw:s})}return t}const go={};function hc(e){let t=go[e];if(t)return t;t=go[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);t.push(u)}for(let n=0;n<e.length;n++){const u=e.charCodeAt(n);t[u]="%"+("0"+u.toString(16).toUpperCase()).slice(-2)}return t}function ln(e,t){typeof t!="string"&&(t=ln.defaultChars);const n=hc(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(u){let i="";for(let r=0,a=u.length;r<a;r+=3){const s=parseInt(u.slice(r+1,r+3),16);if(s<128){i+=n[s];continue}if((s&224)===192&&r+3<a){const l=parseInt(u.slice(r+4,r+6),16);if((l&192)===128){const d=s<<6&1984|l&63;d<128?i+="��":i+=String.fromCharCode(d),r+=3;continue}}if((s&240)===224&&r+6<a){const l=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16);if((l&192)===128&&(d&192)===128){const f=s<<12&61440|l<<6&4032|d&63;f<2048||f>=55296&&f<=57343?i+="���":i+=String.fromCharCode(f),r+=6;continue}}if((s&248)===240&&r+9<a){const l=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16),f=parseInt(u.slice(r+10,r+12),16);if((l&192)===128&&(d&192)===128&&(f&192)===128){let c=s<<18&1835008|l<<12&258048|d<<6&4032|f&63;c<65536||c>1114111?i+="����":(c-=65536,i+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),r+=9;continue}}i+="�"}return i})}ln.defaultChars=";/?:@&=+$,#",ln.componentChars="";const bo={};function mc(e){let t=bo[e];if(t)return t;t=bo[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);/^[0-9a-z]$/i.test(u)?t.push(u):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Vn(e,t,n){typeof t!="string"&&(n=t,t=Vn.defaultChars),typeof n>"u"&&(n=!0);const u=mc(t);let i="";for(let r=0,a=e.length;r<a;r++){const s=e.charCodeAt(r);if(n&&s===37&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){i+=e.slice(r,r+3),r+=2;continue}if(s<128){i+=u[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&r+1<a){const l=e.charCodeAt(r+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[r]+e[r+1]),r++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[r])}return i}Vn.defaultChars=";/?:@&=+$,-_.!~*'()#",Vn.componentChars="-_.!~*'()";function ju(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Lr(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const pc=/^([a-z0-9.+-]+:)/i,gc=/:[0-9]*$/,bc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,yc=["<",">",'"',"`"," ","\r",`
2
- `," "],xc=["{","}","|","\\","^","`"].concat(yc),wc=["'"].concat(xc),yo=["%","/","?",";","#"].concat(wc),xo=["/","?","#"],vc=255,wo=/^[+a-z0-9A-Z_-]{0,63}$/,Ac=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,vo={javascript:!0,"javascript:":!0},Ao={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Hu(e,t){if(e&&e instanceof Lr)return e;const n=new Lr;return n.parse(e,t),n}Lr.prototype.parse=function(e,t){let n,u,i,r=e;if(r=r.trim(),!t&&e.split("#").length===1){const d=bc.exec(r);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=pc.exec(r);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,r=r.substr(a.length)),(t||a||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=r.substr(0,2)==="//",i&&!(a&&vo[a])&&(r=r.substr(2),this.slashes=!0)),!vo[a]&&(i||a&&!Ao[a])){let d=-1;for(let p=0;p<xo.length;p++)u=r.indexOf(xo[p]),u!==-1&&(d===-1||u<d)&&(d=u);let f,c;d===-1?c=r.lastIndexOf("@"):c=r.lastIndexOf("@",d),c!==-1&&(f=r.slice(0,c),r=r.slice(c+1),this.auth=f),d=-1;for(let p=0;p<yo.length;p++)u=r.indexOf(yo[p]),u!==-1&&(d===-1||u<d)&&(d=u);d===-1&&(d=r.length),r[d-1]===":"&&d--;const m=r.slice(0,d);r=r.slice(d),this.parseHost(m),this.hostname=this.hostname||"";const g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){const p=this.hostname.split(/\./);for(let v=0,x=p.length;v<x;v++){const k=p[v];if(k&&!k.match(wo)){let y="";for(let h=0,b=k.length;h<b;h++)k.charCodeAt(h)>127?y+="x":y+=k[h];if(!y.match(wo)){const h=p.slice(0,v),b=p.slice(v+1),w=k.match(Ac);w&&(h.push(w[1]),b.unshift(w[2])),b.length&&(r=b.join(".")+r),this.hostname=h.join(".");break}}}}this.hostname.length>vc&&(this.hostname=""),g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=r.indexOf("#");s!==-1&&(this.hash=r.substr(s),r=r.slice(0,s));const l=r.indexOf("?");return l!==-1&&(this.search=r.substr(l),r=r.slice(0,l)),r&&(this.pathname=r),Ao[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Lr.prototype.parseHost=function(e){let t=gc.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const kc=Object.freeze(Object.defineProperty({__proto__:null,decode:ln,encode:Vn,format:ju,parse:Hu},Symbol.toStringTag,{value:"Module"})),ko=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Co=/[\0-\x1F\x7F-\x9F]/,Cc=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,$u=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Eo=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,_o=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ec=Object.freeze(Object.defineProperty({__proto__:null,Any:ko,Cc:Co,Cf:Cc,P:$u,S:Eo,Z:_o},Symbol.toStringTag,{value:"Module"})),_c=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))),Sc=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Uu;const Fc=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]]),Dc=(Uu=String.fromCodePoint)!==null&&Uu!==void 0?Uu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Tc(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fc.get(e))!==null&&t!==void 0?t:e}var Ee;(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"})(Ee||(Ee={}));const Nc=32;var Rt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Rt||(Rt={}));function Wu(e){return e>=Ee.ZERO&&e<=Ee.NINE}function Lc(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function Ic(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Wu(e)}function Oc(e){return e===Ee.EQUALS||Ic(e)}var _e;(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"})(_e||(_e={}));var Vt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Vt||(Vt={}));class Pc{constructor(t,n,u){this.decodeTree=t,this.emitCodePoint=n,this.errors=u,this.state=_e.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vt.Strict}startEntity(t){this.decodeMode=t,this.state=_e.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case _e.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=_e.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=_e.NamedEntity,this.stateNamedEntity(t,n));case _e.NumericStart:return this.stateNumericStart(t,n);case _e.NumericDecimal:return this.stateNumericDecimal(t,n);case _e.NumericHex:return this.stateNumericHex(t,n);case _e.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Nc)===Ee.LOWER_X?(this.state=_e.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=_e.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,u,i){if(n!==u){const r=u-n;this.result=this.result*Math.pow(i,r)+parseInt(t.substr(n,r),i),this.consumed+=r}}stateNumericHex(t,n){const u=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Wu(i)||Lc(i))n+=1;else return this.addToNumericResult(t,u,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,u,n,16),-1}stateNumericDecimal(t,n){const u=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Wu(i))n+=1;else return this.addToNumericResult(t,u,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,u,n,10),-1}emitNumericEntity(t,n){var u;if(this.consumed<=n)return(u=this.errors)===null||u===void 0||u.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Vt.Strict)return 0;return this.emitCodePoint(Tc(this.result),this.consumed),this.errors&&(t!==Ee.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:u}=this;let i=u[this.treeIndex],r=(i&Rt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Rc(u,i,this.treeIndex+Math.max(1,r),a),this.treeIndex<0)return this.result===0||this.decodeMode===Vt.Attribute&&(r===0||Oc(a))?0:this.emitNotTerminatedNamedEntity();if(i=u[this.treeIndex],r=(i&Rt.VALUE_LENGTH)>>14,r!==0){if(a===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Vt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:u}=this,i=(u[n]&Rt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,u){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Rt.VALUE_LENGTH:i[t+1],u),n===3&&this.emitCodePoint(i[t+2],u),u}end(){var t;switch(this.state){case _e.NamedEntity:return this.result!==0&&(this.decodeMode!==Vt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case _e.NumericDecimal:return this.emitNumericEntity(0,2);case _e.NumericHex:return this.emitNumericEntity(0,3);case _e.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case _e.EntityStart:return 0}}}function So(e){let t="";const n=new Pc(e,u=>t+=Dc(u));return function(i,r){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(r);const d=n.write(i,s+1);if(d<0){a=s+n.end();break}a=s+d,s=d===0?a+1:a}const l=t+i.slice(a);return t="",l}}function Rc(e,t,n,u){const i=(t&Rt.BRANCH_LENGTH)>>7,r=t&Rt.JUMP_TABLE;if(i===0)return r!==0&&u===r?n:-1;if(r){const l=u-r;return l<0||l>=i?-1:e[n+l]-1}let a=n,s=a+i-1;for(;a<=s;){const l=a+s>>>1,d=e[l];if(d<u)a=l+1;else if(d>u)s=l-1;else return e[l+i]}return-1}const Vc=So(_c);So(Sc);function Fo(e,t=Vt.Legacy){return Vc(e,t)}function Mc(e){return Object.prototype.toString.call(e)}function Gu(e){return Mc(e)==="[object String]"}const Bc=Object.prototype.hasOwnProperty;function zc(e,t){return Bc.call(e,t)}function Ir(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(u){e[u]=n[u]})}}),e}function Do(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function Xu(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Or(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const To=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,jc=/&([a-z#][a-z0-9]{1,31});/gi,Hc=new RegExp(To.source+"|"+jc.source,"gi"),$c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Uc(e,t){if(t.charCodeAt(0)===35&&$c.test(t)){const u=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Xu(u)?Or(u):e}const n=Fo(e);return n!==e?n:e}function Wc(e){return e.indexOf("\\")<0?e:e.replace(To,"$1")}function cn(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Hc,function(t,n,u){return n||Uc(t,u)})}const Gc=/[&<>"]/,Xc=/[&<>"]/g,qc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Zc(e){return qc[e]}function Mt(e){return Gc.test(e)?e.replace(Xc,Zc):e}const Yc=/[.?*+^$[\]\\(){}|-]/g;function Kc(e){return e.replace(Yc,"\\$&")}function ce(e){switch(e){case 9:case 32:return!0}return!1}function Mn(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Bn(e){return $u.test(e)||Eo.test(e)}function zn(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Pr(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const Qc=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Do,assign:Ir,escapeHtml:Mt,escapeRE:Kc,fromCodePoint:Or,has:zc,isMdAsciiPunct:zn,isPunctChar:Bn,isSpace:ce,isString:Gu,isValidEntityCode:Xu,isWhiteSpace:Mn,lib:{mdurl:kc,ucmicro:Ec},normalizeReference:Pr,unescapeAll:cn,unescapeMd:Wc},Symbol.toStringTag,{value:"Module"}));function Jc(e,t,n){let u,i,r,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,u=1;e.pos<s;){if(r=e.src.charCodeAt(e.pos),r===93&&(u--,u===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),r===91){if(a===e.pos-1)u++;else if(n)return e.pos=l,-1}}let d=-1;return i&&(d=e.pos),e.pos=l,d}function e0(e,t,n){let u,i=t;const r={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<n;){if(u=e.charCodeAt(i),u===10||u===60)return r;if(u===62)return r.pos=i+1,r.str=cn(e.slice(t+1,i)),r.ok=!0,r;if(u===92&&i+1<n){i+=2;continue}i++}return r}let a=0;for(;i<n&&(u=e.charCodeAt(i),!(u===32||u<32||u===127));){if(u===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(u===40&&(a++,a>32))return r;if(u===41){if(a===0)break;a--}i++}return t===i||a!==0||(r.str=cn(e.slice(t,i)),r.pos=i,r.ok=!0),r}function t0(e,t,n,u){let i,r=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(u)a.str=u.str,a.marker=u.marker;else{if(r>=n)return a;let s=e.charCodeAt(r);if(s!==34&&s!==39&&s!==40)return a;t++,r++,s===40&&(s=41),a.marker=s}for(;r<n;){if(i=e.charCodeAt(r),i===a.marker)return a.pos=r+1,a.str+=cn(e.slice(t,r)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&r+1<n&&r++,r++}return a.can_continue=!0,a.str+=cn(e.slice(t,r)),a}const n0=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:e0,parseLinkLabel:Jc,parseLinkTitle:t0},Symbol.toStringTag,{value:"Module"})),xt={};xt.code_inline=function(e,t,n,u,i){const r=e[t];return"<code"+i.renderAttrs(r)+">"+Mt(r.content)+"</code>"},xt.code_block=function(e,t,n,u,i){const r=e[t];return"<pre"+i.renderAttrs(r)+"><code>"+Mt(e[t].content)+`</code></pre>
3
- `},xt.fence=function(e,t,n,u,i){const r=e[t],a=r.info?cn(r.info).trim():"";let s="",l="";if(a){const f=a.split(/(\s+)/g);s=f[0],l=f.slice(2).join("")}let d;if(n.highlight?d=n.highlight(r.content,s,l)||Mt(r.content):d=Mt(r.content),d.indexOf("<pre")===0)return d+`
4
- `;if(a){const f=r.attrIndex("class"),c=r.attrs?r.attrs.slice():[];f<0?c.push(["class",n.langPrefix+s]):(c[f]=c[f].slice(),c[f][1]+=" "+n.langPrefix+s);const m={attrs:c};return`<pre><code${i.renderAttrs(m)}>${d}</code></pre>
5
- `}return`<pre><code${i.renderAttrs(r)}>${d}</code></pre>
6
- `},xt.image=function(e,t,n,u,i){const r=e[t];return r.attrs[r.attrIndex("alt")][1]=i.renderInlineAsText(r.children,n,u),i.renderToken(e,t,n)},xt.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
1
+ (function(O,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(O=typeof globalThis<"u"?globalThis:O||self,i(O.FarrisX={},O.vue))})(this,function(O,i){"use strict";var Bp=Object.defineProperty;var zc=O=>{throw TypeError(O)};var zp=(O,i,be)=>i in O?Bp(O,i,{enumerable:!0,configurable:!0,writable:!0,value:be}):O[i]=be;var fe=(O,i,be)=>zp(O,typeof i!="symbol"?i+"":i,be),oi=(O,i,be)=>i.has(O)||zc("Cannot "+be);var v=(O,i,be)=>(oi(O,i,"read from private field"),be?be.call(O):i.get(O)),ie=(O,i,be)=>i.has(O)?zc("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(O):i.set(O,be),ee=(O,i,be,at)=>(oi(O,i,"write to private field"),at?at.call(O,be):i.set(O,be),be),X=(O,i,be)=>(oi(O,i,"access private method"),be);var Pu=(O,i,be,at)=>({set _(Fr){ee(O,i,Fr,be)},get _(){return v(O,i,at)}});var wc,Ft,_n,vc,Ac,it,Je,lt,rn,dt,En,Sn,ft,ke,ht,we,he,ne,$e,et,Ve,Se,pt,Fe,mt,gt,tt,nt,bt,Gt,Ue,Fn,G,ii,un,Lt,kr,rt,jc,on,Dn,Cr,Xt,Zt,ai,Ru,Vu,pe,si,Sr,Yt,ci,Tn;const be={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},at=i.defineComponent({name:"AppPreviewMessage",props:be,setup(e){const t=i.ref(!1);function n(){var h;const a=(h=e.content)==null?void 0:h.appConfig;if(!a)return"";const s=a.ws??"",c=a.appPath??"",d=a.appObjectId??"";return`${a.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${c}&boId=${d}&ws=${s}&version=2.0#/home`}function u(){var s,c;const a=(s=e.content)==null?void 0:s.previewConfig;a&&e.onOpen&&e.onOpen({...a,title:a.title??((c=e.content)==null?void 0:c.appName)})}function o(a){const s=a.target;s!=null&&s.closest(".f-chat-app-preview-open-btn")||a.preventDefault()}function r(a){a.stopPropagation();const s=n();s&&window.open(s,"_blank")}return()=>{const a=e.content;if(!a)return null;const{message:s,appName:c,createdDatetime:d}=a;return i.createVNode("div",{class:"f-chat-message-app-preview"},[i.createVNode("div",{class:"f-chat-app-preview-message"},[s]),i.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:o,onClick:u,role:"button",tabindex:0,onKeydown:f=>f.key==="Enter"&&u()},[i.createVNode("div",{class:"f-chat-app-preview-card-left"},[i.createVNode("span",{class:"f-chat-app-preview-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),i.createVNode("div",{class:"f-chat-app-preview-card-middle"},[i.createVNode("div",{class:"f-chat-app-preview-app-name"},[c]),i.createVNode("div",{class:"f-chat-app-preview-datetime"},[d])]),i.createVNode("div",{class:"f-chat-app-preview-card-right"},[i.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&i.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:r,title:"在新页签中打开","aria-label":"在新页签中打开"},[i.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});at.install=e=>{e.component(at.name,at)};const Fr={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0}},Mu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hc="/api/runtime/attachment";function $c(){try{const e=Mu==null?void 0:Mu.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function Uc(e){var n;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((n=window.location)!=null&&n.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function Wc(e){return`${Hc}/${encodeURIComponent(e)}/download`}function Bu(e){const t=String(e??"").trim();if(!t)return"";const n=Wc(t),u=$c();return u?`${u}${n}`:n}function li(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function sn(e){const t=String(e.fileId??"").trim();if(t)return Bu(t);const n=String(e.url??"").trim();if(!n)return;const u=li(n);if(u)return Bu(u);if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/"))return n}async function Dr(e,t){const n=String(t??"").replace(/[/\\]/g,"_").trim()||"download",u=Uc(e);try{const o=await fetch(u,{credentials:"include",mode:"cors"});if(!o.ok)throw new Error(`download_http_${o.status}`);const r=await o.blob(),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=n,s.rel="noopener noreferrer",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)}catch{const o=document.createElement("a");o.href=u,o.target="_blank",o.rel="noopener noreferrer",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}function ye(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(u=>{e[u]=!0}):Array.isArray(t)?t.forEach(n=>{n&&(e[n]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u&&(e[n]=!0)})),e}function Ae(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(u=>{var r,a;const o=u.split(":");if(o.length>=2&&((r=o[0])!=null&&r.trim())&&((a=o[1])!=null&&a.trim())){const s=o[0].trim(),c=o.slice(1).join(":").trim();e[s]=c}}):typeof t=="object"&&Object.entries(t).forEach(([n,u])=>{n&&u!==void 0&&u!==null&&(e[n]=u)})),e}function Rn(e){return e||null}function di(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Tr(e){return e?typeof e!="string"?e:di(e)?i.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const n=t.target;n.style.display="none",n.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?i.h("i",{class:e}):e:null}function fi(e,t,n,u={}){const{charInterval:o=30}=u,r=i.ref({});let a=[],s=new Set;const c=()=>typeof t=="function"?t():t.value,d=()=>typeof n=="function"?n():n.value,f=()=>{a.forEach(p=>clearInterval(p)),a=[]},l=()=>{f(),r.value={},s.clear()},h=()=>{f(),r.value={},s.clear()},m=()=>{const p=e();if(!p||Object.keys(p).length===0){r.value={};return}if(!d()){r.value={...p},s=new Set(Object.keys(p));return}const w=Object.keys(p);w.forEach(g=>{r.value.hasOwnProperty(g)||(r.value[g]="")});const x=w.filter(g=>!s.has(g));if(x.length===0)return;let A=0;const b=()=>{var D;if(A>=x.length)return;const g=x[A],y=p[g];if(!y){s.add(g),A++,b();return}let k=((D=r.value[g])==null?void 0:D.length)||0;const T=setInterval(()=>{k<y.length?(r.value={...r.value,[g]:y.slice(0,k+1)},k++):(clearInterval(T),a=a.filter(F=>F!==T),s.add(g),A++,b())},o);a.push(T)};b()};return i.watch(()=>e(),()=>{c()&&m()},{immediate:!0}),i.watch(n,()=>{h(),c()&&m()}),i.watch(t,p=>{p?m():l()}),i.onMounted(()=>{c()&&m()}),{displayContent:r}}function Nr(){const e=i.reactive({}),t=[],n=i.ref(null);let u=null;const o=30,r=p=>{const w=e[p];return!w||w.displayedLength>=w.rawValue.length},a=i.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(p=>r(p))),s=()=>{for(const p of t)if(!r(p))return p;return null},c=()=>{if(!n.value&&(n.value=s(),!n.value)){d();return}const p=e[n.value];p&&(p.displayedLength<p.rawValue.length?(p.displayedLength++,p.displayedValue=p.rawValue.slice(0,p.displayedLength),p.isStreaming=!0):(p.isStreaming=!1,p.displayedValue=p.rawValue,n.value=s(),n.value||d()))},d=()=>{u&&(clearInterval(u),u=null)},f=()=>{u||(u=setInterval(c,o))},l=()=>{d(),Object.keys(e).forEach(p=>{delete e[p]}),t.length=0,n.value=null},h=(p,w)=>{if(e[p]){m(p,w);return}t.push(p),e[p]={rawValue:w??"",displayedLength:0,isStreaming:!1,displayedValue:""},u||(!n.value||n.value===p)&&f()},m=(p,w)=>{const x=e[p];if(!x){h(p,w);return}x.rawValue=w??"",!u&&!r(p)&&(!n.value||n.value===p)&&f()};return i.onUnmounted(()=>{d()}),{propertyStates:e,currentProperty:n,get isAnyStreaming(){return Object.values(e).some(p=>p.isStreaming)},isAllDone:a,startStreaming:f,reset:l,registerProperty:h,updatePropertyValue:m}}function zu(){const e=i.ref(null),t=i.ref(0),n=i.ref(!1);let u=null;const o=()=>{e.value=Date.now(),n.value=!0,u=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},r=()=>{u&&(clearInterval(u),u=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:n,start:o,stop:r,reset:()=>{r(),e.value=null,t.value=0,n.value=!1}}}function Gc(e,t){const n=i.computed(()=>{var o;return Ae({},(o=e.styles)==null?void 0:o.header)});function u(){return t.slots.header&&i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[t.slots.header()])}return{renderHeader:u}}function qc(e,t){var r;const n=i.ref(((r=e.content)==null?void 0:r.sender)??"发送人"),u=i.computed(()=>{var a;return Ae({},(a=e.styles)==null?void 0:a.header)});function o(){return i.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:u.value},[n.value])}return{renderHeader:o}}const Xc={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},Zc={attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function Yc(){return{getFileIcon:u=>({pdf:"file-type-pdf",doc:"file-type-doc",docx:"file-type-doc",xls:"file-type-xls",xlsx:"file-type-xls",ppt:"file-type-ppt",pptx:"file-type-ppt",txt:"file-type-txt",zip:"file-type-zip",rar:"file-type-zip",image:"file-type-img",img:"file-type-img",md:"file-type-md",video:"file-type-any",audio:"file-type-any"})[u.toLowerCase()]||"file-type-any",formatFileName:u=>(u==null?void 0:u.replace(/\.[^.]+$/,""))??"",formatFileSize:u=>u<1024?u+" B":u<1048576?(u/1024).toFixed(1)+" KB":(u/1048576).toFixed(1)+" MB"}}const hi=i.defineComponent({name:"FXBubbleAttachment",props:Zc,emits:["preview","batchPreview"],setup(e,t){const n=i.computed(()=>e.attachments??[]),u=i.computed(()=>{var h;return((h=n.value)==null?void 0:h.length)>0}),{formatFileName:o,formatFileSize:r}=Yc(),a=i.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),s=i.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth})),c=i.computed(()=>e.enableFixedWidth?{width:"200px"}:{flex:"0 0 calc(50% - 4px)"});function d(h,m){t.emit("preview",m)}async function f(h,m){h.stopPropagation(),h.preventDefault();const p=sn(m);p&&await Dr(p,m.name)}function l(h){t.emit("batchPreview",n.value)}return()=>u.value?i.createVNode("div",{class:"f-chat-bubble-attachments"},[n.value.map((h,m)=>{const p=sn(h);return i.createVNode("div",{class:"f-chat-bubble-attachment-item",style:c.value,key:m},[i.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation",onClick:w=>d(w,h)},[i.createVNode("div",{class:a.value},[i.createVNode("span",{class:s.value,title:h.name},[o(h.name)]),h.size?i.createVNode("span",{class:"f-chat-bubble-attachment-size"},[r(h.size)]):null])]),e.showDownloadButton!==!1&&p?i.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:w=>f(w,h)},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}),e.enableBatchPreview&&i.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:l},[i.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[i.createTextVNode("查看全部文件")]),i.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),Kc=i.defineComponent({name:"FXBubbleFileContentFooter",props:Xc,setup(e,t){const n=i.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return Ae({},e.customStyle),()=>i.createVNode(hi,{attachments:n.value,onPreview:u=>{var o;return(o=e.onPreviewFile)==null?void 0:o.call(e,u)},onBatchPreview:u=>{var o;return(o=e.onBatchPreviewFile)==null?void 0:o.call(e,u)}},null)}}),Qc={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},Jc=i.defineComponent({name:"FXBubblePageContentFooter",props:Qc,setup(e,t){const n=i.ref(),u=i.computed(()=>{var a,s;const r={width:"100%",height:"100%",border:"none"};return(a=e.customStyle)!=null&&a.width&&(r.width=e.customStyle.width),(s=e.customStyle)!=null&&s.height&&(r.height=`${e.customStyle.height}px`),r}),o=r=>{var a,s;((a=r.data)==null?void 0:a.type)==="navigation"&&((s=r.data)!=null&&s.url)&&e.onNavigate&&e.onNavigate(r.data.url)};return i.onMounted(()=>{window.addEventListener("message",o)}),i.onUnmounted(()=>{window.removeEventListener("message",o)}),()=>i.createVNode("iframe",{ref:n,src:e.pageUrl,style:u.value,scrolling:"auto"},null)}});function pi(){function e(o,r){const{fileContent:a,height:s,width:c}=o;return{file:a,customStyle:{width:c||"100%",height:s||"100%"},onPreviewFile:r==null?void 0:r.onPreviewFile,onBatchPreviewFile:r==null?void 0:r.onBatchPreviewFile}}function t(o,r){const{pageUrl:a,height:s,width:c}=o;return{pageUrl:a,customStyle:{width:c||"100%",height:s||"100%"},onNavigate:r==null?void 0:r.onNavigate}}function n(o,r){const a=e(o,r);return i.h(Kc,a)}function u(o,r){const a=t(o,r);return i.h(Jc,a)}return{renderFileEmbeddedContent:n,renderPageEmbeddedContent:u}}const el={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}};function tl(e){return e.replace(/```\s*\n+\s*assistant-widget/g,"``` assistant-widget")}function nl(e){if(!e)return!1;const t=/^```\s*assistant-widget[\s\S]*?```$/,n=/^```\s*assistant-widget/;return t.test(e)||n.test(e)}function rl(e){if(!e)return[];const t=/(```[\s]*assistant-widget[\s\S]*?```)/g,n=[];let u=0,o;for(;(o=t.exec(e))!==null;){if(o.index>u){const r=e.slice(u,o.index),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const c=r.indexOf(s[0]);c>0&&n.push(r.slice(0,c)),n.push(r.slice(c));const d=r.slice(c+s[0].length);d.trim().length>0&&n.push(d)}else n.push(r)}n.push(tl(o[0])),u=o.index+o[0].length}if(u<e.length){const r=e.slice(u),a=/(```[\s]*assistant-widget)/,s=r.match(a);if(s){const c=r.indexOf(s[0]);c>0&&n.push(r.slice(0,c)),n.push(r.slice(c))}else n.push(r)}return n.filter(r=>r.trim().length>0)}function mi(e){const t=e.replace("``` assistant-widget","").replace("```","").trim();try{return JSON.parse(t)}catch(n){return console.error("Failed to parse JSON:",n),null}}function ul(e){var n;const t=mi(e);return((n=t==null?void 0:t.renderer)==null?void 0:n.widgetImplOptions)||{}}const ol=/^```\s*dynamic-component[\s\S]*?```$/,il=/^```\s*dynamic-component/;function al(e){return e.replace(/```\s*\n*\s*dynamic-component/g,"``` dynamic-component")}function sl(e){return e?ol.test(e)||il.test(e):!1}function cl(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object"||Array.isArray(n))return null;const u=n;return typeof u.instanceId!="string"?null:{...u,instanceId:u.instanceId,name:typeof u.name=="string"?u.name:void 0,componentId:typeof u.componentId=="string"?u.componentId:void 0,jsUrl:typeof u.jsUrl=="string"?u.jsUrl:"",url:typeof u.url=="string"?u.url:"",title:typeof u.title=="string"?u.title:"预览",position:u.position==="inline"?"inline":"right",width:typeof u.width=="string"?u.width:void 0,isFullscreen:typeof u.isFullscreen=="boolean"?u.isFullscreen:!1,autoOpen:typeof u.autoOpen=="boolean"?u.autoOpen:!1,fileRe:typeof u.fileRe=="string"?u.fileRe:void 0,target:u.target==="preview"||u.target==="previewExtra"?u.target:void 0}}function ll(e){const t=e.replace(/```\s*dynamic-component\s*\n?/,"").replace(/\n?\s*```/,"").trim();if(!t)return null;const n=t.match(/"position"\s*:\s*"(inline|right)"/);return n?{position:n[1]}:null}function dl(e){if(!e)return[];const t="``` dynamic-component",n="```",u=[];let o=0;for(;o<e.length;){const r=e.indexOf(t,o);if(r===-1){const m=e.slice(o);m&&u.push(m);break}let a=r+t.length;const s=e.lastIndexOf("```",r),c=s>=0&&s<r+3?s:r,d=e.slice(o,c);d&&u.push(d);const f=e.indexOf(n,a);if(f===-1){u.push(e.slice(c));break}const l=f+n.length,h=e.slice(c,l);u.push(al(h)),o=l}return u.filter(r=>r.length>0)}var Oe=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(Oe||{});function fl(e){var o;if(!e)return[];const t=[],n=new Set,u=rl(e);for(const r of u)if(nl(r))if(r.endsWith("```")){const a=mi(r);t.push({type:Oe.AssistantWidgetComplete,raw:r,widgetData:a,widgetUrl:(o=a==null?void 0:a.renderer)==null?void 0:o.url,widgetImplOptions:ul(r)})}else t.push({type:Oe.AssistantWidgetPending,raw:r});else{const a=dl(r);for(const s of a)if(sl(s))if(s.endsWith("```")){const c=cl(s);if(c!=null&&c.instanceId){if(n.has(c.instanceId))continue;n.add(c.instanceId),t.push({type:Oe.DynamicComponentComplete,raw:s,config:c})}}else{const c=ll(s);t.push({type:Oe.DynamicComponentPending,raw:s,position:(c==null?void 0:c.position)??null})}else s.trim()&&t.push({type:Oe.Text,raw:s})}return t}const gi={};function hl(e){let t=gi[e];if(t)return t;t=gi[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);t.push(u)}for(let n=0;n<e.length;n++){const u=e.charCodeAt(n);t[u]="%"+("0"+u.toString(16).toUpperCase()).slice(-2)}return t}function cn(e,t){typeof t!="string"&&(t=cn.defaultChars);const n=hl(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(u){let o="";for(let r=0,a=u.length;r<a;r+=3){const s=parseInt(u.slice(r+1,r+3),16);if(s<128){o+=n[s];continue}if((s&224)===192&&r+3<a){const c=parseInt(u.slice(r+4,r+6),16);if((c&192)===128){const d=s<<6&1984|c&63;d<128?o+="��":o+=String.fromCharCode(d),r+=3;continue}}if((s&240)===224&&r+6<a){const c=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16);if((c&192)===128&&(d&192)===128){const f=s<<12&61440|c<<6&4032|d&63;f<2048||f>=55296&&f<=57343?o+="���":o+=String.fromCharCode(f),r+=6;continue}}if((s&248)===240&&r+9<a){const c=parseInt(u.slice(r+4,r+6),16),d=parseInt(u.slice(r+7,r+9),16),f=parseInt(u.slice(r+10,r+12),16);if((c&192)===128&&(d&192)===128&&(f&192)===128){let l=s<<18&1835008|c<<12&258048|d<<6&4032|f&63;l<65536||l>1114111?o+="����":(l-=65536,o+=String.fromCharCode(55296+(l>>10),56320+(l&1023))),r+=9;continue}}o+="�"}return o})}cn.defaultChars=";/?:@&=+$,#",cn.componentChars="";const bi={};function pl(e){let t=bi[e];if(t)return t;t=bi[e]=[];for(let n=0;n<128;n++){const u=String.fromCharCode(n);/^[0-9a-z]$/i.test(u)?t.push(u):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Vn(e,t,n){typeof t!="string"&&(n=t,t=Vn.defaultChars),typeof n>"u"&&(n=!0);const u=pl(t);let o="";for(let r=0,a=e.length;r<a;r++){const s=e.charCodeAt(r);if(n&&s===37&&r+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){o+=e.slice(r,r+3),r+=2;continue}if(s<128){o+=u[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&r+1<a){const c=e.charCodeAt(r+1);if(c>=56320&&c<=57343){o+=encodeURIComponent(e[r]+e[r+1]),r++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[r])}return o}Vn.defaultChars=";/?:@&=+$,-_.!~*'()#",Vn.componentChars="-_.!~*'()";function ju(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Lr(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ml=/^([a-z0-9.+-]+:)/i,gl=/:[0-9]*$/,bl=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,yl=["<",">",'"',"`"," ","\r",`
2
+ `," "],xl=["{","}","|","\\","^","`"].concat(yl),wl=["'"].concat(xl),yi=["%","/","?",";","#"].concat(wl),xi=["/","?","#"],vl=255,wi=/^[+a-z0-9A-Z_-]{0,63}$/,Al=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,vi={javascript:!0,"javascript:":!0},Ai={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Hu(e,t){if(e&&e instanceof Lr)return e;const n=new Lr;return n.parse(e,t),n}Lr.prototype.parse=function(e,t){let n,u,o,r=e;if(r=r.trim(),!t&&e.split("#").length===1){const d=bl.exec(r);if(d)return this.pathname=d[1],d[2]&&(this.search=d[2]),this}let a=ml.exec(r);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,r=r.substr(a.length)),(t||a||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=r.substr(0,2)==="//",o&&!(a&&vi[a])&&(r=r.substr(2),this.slashes=!0)),!vi[a]&&(o||a&&!Ai[a])){let d=-1;for(let p=0;p<xi.length;p++)u=r.indexOf(xi[p]),u!==-1&&(d===-1||u<d)&&(d=u);let f,l;d===-1?l=r.lastIndexOf("@"):l=r.lastIndexOf("@",d),l!==-1&&(f=r.slice(0,l),r=r.slice(l+1),this.auth=f),d=-1;for(let p=0;p<yi.length;p++)u=r.indexOf(yi[p]),u!==-1&&(d===-1||u<d)&&(d=u);d===-1&&(d=r.length),r[d-1]===":"&&d--;const h=r.slice(0,d);r=r.slice(d),this.parseHost(h),this.hostname=this.hostname||"";const m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){const p=this.hostname.split(/\./);for(let w=0,x=p.length;w<x;w++){const A=p[w];if(A&&!A.match(wi)){let b="";for(let g=0,y=A.length;g<y;g++)A.charCodeAt(g)>127?b+="x":b+=A[g];if(!b.match(wi)){const g=p.slice(0,w),y=p.slice(w+1),k=A.match(Al);k&&(g.push(k[1]),y.unshift(k[2])),y.length&&(r=y.join(".")+r),this.hostname=g.join(".");break}}}}this.hostname.length>vl&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=r.indexOf("#");s!==-1&&(this.hash=r.substr(s),r=r.slice(0,s));const c=r.indexOf("?");return c!==-1&&(this.search=r.substr(c),r=r.slice(0,c)),r&&(this.pathname=r),Ai[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Lr.prototype.parseHost=function(e){let t=gl.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const kl=Object.freeze(Object.defineProperty({__proto__:null,decode:cn,encode:Vn,format:ju,parse:Hu},Symbol.toStringTag,{value:"Module"})),ki=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ci=/[\0-\x1F\x7F-\x9F]/,Cl=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,$u=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,_i=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Ei=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,_l=Object.freeze(Object.defineProperty({__proto__:null,Any:ki,Cc:Ci,Cf:Cl,P:$u,S:_i,Z:Ei},Symbol.toStringTag,{value:"Module"})),El=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))),Sl=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var Uu;const Fl=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]]),Dl=(Uu=String.fromCodePoint)!==null&&Uu!==void 0?Uu:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Tl(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Fl.get(e))!==null&&t!==void 0?t:e}var _e;(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"})(_e||(_e={}));const Nl=32;var Vt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Vt||(Vt={}));function Wu(e){return e>=_e.ZERO&&e<=_e.NINE}function Ll(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function Il(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||Wu(e)}function Ol(e){return e===_e.EQUALS||Il(e)}var Ee;(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"})(Ee||(Ee={}));var Mt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Mt||(Mt={}));class Pl{constructor(t,n,u){this.decodeTree=t,this.emitCodePoint=n,this.errors=u,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Mt.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===_e.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Nl)===_e.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,u,o){if(n!==u){const r=u-n;this.result=this.result*Math.pow(o,r)+parseInt(t.substr(n,r),o),this.consumed+=r}}stateNumericHex(t,n){const u=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Wu(o)||Ll(o))n+=1;else return this.addToNumericResult(t,u,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,u,n,16),-1}stateNumericDecimal(t,n){const u=n;for(;n<t.length;){const o=t.charCodeAt(n);if(Wu(o))n+=1;else return this.addToNumericResult(t,u,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,u,n,10),-1}emitNumericEntity(t,n){var u;if(this.consumed<=n)return(u=this.errors)===null||u===void 0||u.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_e.SEMI)this.consumed+=1;else if(this.decodeMode===Mt.Strict)return 0;return this.emitCodePoint(Tl(this.result),this.consumed),this.errors&&(t!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:u}=this;let o=u[this.treeIndex],r=(o&Vt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Rl(u,o,this.treeIndex+Math.max(1,r),a),this.treeIndex<0)return this.result===0||this.decodeMode===Mt.Attribute&&(r===0||Ol(a))?0:this.emitNotTerminatedNamedEntity();if(o=u[this.treeIndex],r=(o&Vt.VALUE_LENGTH)>>14,r!==0){if(a===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==Mt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:u}=this,o=(u[n]&Vt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,u){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Vt.VALUE_LENGTH:o[t+1],u),n===3&&this.emitCodePoint(o[t+2],u),u}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Mt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Si(e){let t="";const n=new Pl(e,u=>t+=Dl(u));return function(o,r){let a=0,s=0;for(;(s=o.indexOf("&",s))>=0;){t+=o.slice(a,s),n.startEntity(r);const d=n.write(o,s+1);if(d<0){a=s+n.end();break}a=s+d,s=d===0?a+1:a}const c=t+o.slice(a);return t="",c}}function Rl(e,t,n,u){const o=(t&Vt.BRANCH_LENGTH)>>7,r=t&Vt.JUMP_TABLE;if(o===0)return r!==0&&u===r?n:-1;if(r){const c=u-r;return c<0||c>=o?-1:e[n+c]-1}let a=n,s=a+o-1;for(;a<=s;){const c=a+s>>>1,d=e[c];if(d<u)a=c+1;else if(d>u)s=c-1;else return e[c+o]}return-1}const Vl=Si(El);Si(Sl);function Fi(e,t=Mt.Legacy){return Vl(e,t)}function Ml(e){return Object.prototype.toString.call(e)}function Gu(e){return Ml(e)==="[object String]"}const Bl=Object.prototype.hasOwnProperty;function zl(e,t){return Bl.call(e,t)}function Ir(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(u){e[u]=n[u]})}}),e}function Di(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function qu(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Or(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const Ti=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,jl=/&([a-z#][a-z0-9]{1,31});/gi,Hl=new RegExp(Ti.source+"|"+jl.source,"gi"),$l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Ul(e,t){if(t.charCodeAt(0)===35&&$l.test(t)){const u=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return qu(u)?Or(u):e}const n=Fi(e);return n!==e?n:e}function Wl(e){return e.indexOf("\\")<0?e:e.replace(Ti,"$1")}function ln(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Hl,function(t,n,u){return n||Ul(t,u)})}const Gl=/[&<>"]/,ql=/[&<>"]/g,Xl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Zl(e){return Xl[e]}function Bt(e){return Gl.test(e)?e.replace(ql,Zl):e}const Yl=/[.?*+^$[\]\\(){}|-]/g;function Kl(e){return e.replace(Yl,"\\$&")}function le(e){switch(e){case 9:case 32:return!0}return!1}function Mn(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Bn(e){return $u.test(e)||_i.test(e)}function zn(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Pr(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const Ql=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:Di,assign:Ir,escapeHtml:Bt,escapeRE:Kl,fromCodePoint:Or,has:zl,isMdAsciiPunct:zn,isPunctChar:Bn,isSpace:le,isString:Gu,isValidEntityCode:qu,isWhiteSpace:Mn,lib:{mdurl:kl,ucmicro:_l},normalizeReference:Pr,unescapeAll:ln,unescapeMd:Wl},Symbol.toStringTag,{value:"Module"}));function Jl(e,t,n){let u,o,r,a;const s=e.posMax,c=e.pos;for(e.pos=t+1,u=1;e.pos<s;){if(r=e.src.charCodeAt(e.pos),r===93&&(u--,u===0)){o=!0;break}if(a=e.pos,e.md.inline.skipToken(e),r===91){if(a===e.pos-1)u++;else if(n)return e.pos=c,-1}}let d=-1;return o&&(d=e.pos),e.pos=c,d}function e0(e,t,n){let u,o=t;const r={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(u=e.charCodeAt(o),u===10||u===60)return r;if(u===62)return r.pos=o+1,r.str=ln(e.slice(t+1,o)),r.ok=!0,r;if(u===92&&o+1<n){o+=2;continue}o++}return r}let a=0;for(;o<n&&(u=e.charCodeAt(o),!(u===32||u<32||u===127));){if(u===92&&o+1<n){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(u===40&&(a++,a>32))return r;if(u===41){if(a===0)break;a--}o++}return t===o||a!==0||(r.str=ln(e.slice(t,o)),r.pos=o,r.ok=!0),r}function t0(e,t,n,u){let o,r=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(u)a.str=u.str,a.marker=u.marker;else{if(r>=n)return a;let s=e.charCodeAt(r);if(s!==34&&s!==39&&s!==40)return a;t++,r++,s===40&&(s=41),a.marker=s}for(;r<n;){if(o=e.charCodeAt(r),o===a.marker)return a.pos=r+1,a.str+=ln(e.slice(t,r)),a.ok=!0,a;if(o===40&&a.marker===41)return a;o===92&&r+1<n&&r++,r++}return a.can_continue=!0,a.str+=ln(e.slice(t,r)),a}const n0=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:e0,parseLinkLabel:Jl,parseLinkTitle:t0},Symbol.toStringTag,{value:"Module"})),xt={};xt.code_inline=function(e,t,n,u,o){const r=e[t];return"<code"+o.renderAttrs(r)+">"+Bt(r.content)+"</code>"},xt.code_block=function(e,t,n,u,o){const r=e[t];return"<pre"+o.renderAttrs(r)+"><code>"+Bt(e[t].content)+`</code></pre>
3
+ `},xt.fence=function(e,t,n,u,o){const r=e[t],a=r.info?ln(r.info).trim():"";let s="",c="";if(a){const f=a.split(/(\s+)/g);s=f[0],c=f.slice(2).join("")}let d;if(n.highlight?d=n.highlight(r.content,s,c)||Bt(r.content):d=Bt(r.content),d.indexOf("<pre")===0)return d+`
4
+ `;if(a){const f=r.attrIndex("class"),l=r.attrs?r.attrs.slice():[];f<0?l.push(["class",n.langPrefix+s]):(l[f]=l[f].slice(),l[f][1]+=" "+n.langPrefix+s);const h={attrs:l};return`<pre><code${o.renderAttrs(h)}>${d}</code></pre>
5
+ `}return`<pre><code${o.renderAttrs(r)}>${d}</code></pre>
6
+ `},xt.image=function(e,t,n,u,o){const r=e[t];return r.attrs[r.attrIndex("alt")][1]=o.renderInlineAsText(r.children,n,u),o.renderToken(e,t,n)},xt.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
7
7
  `:`<br>
8
8
  `},xt.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
9
9
  `:`<br>
10
10
  `:`
11
- `},xt.text=function(e,t){return Mt(e[t].content)},xt.html_block=function(e,t){return e[t].content},xt.html_inline=function(e,t){return e[t].content};function dn(){this.rules=Ir({},xt)}dn.prototype.renderAttrs=function(t){let n,u,i;if(!t.attrs)return"";for(i="",n=0,u=t.attrs.length;n<u;n++)i+=" "+Mt(t.attrs[n][0])+'="'+Mt(t.attrs[n][1])+'"';return i},dn.prototype.renderToken=function(t,n,u){const i=t[n];let r="";if(i.hidden)return"";i.block&&i.nesting!==-1&&n&&t[n-1].hidden&&(r+=`
12
- `),r+=(i.nesting===-1?"</":"<")+i.tag,r+=this.renderAttrs(i),i.nesting===0&&u.xhtmlOut&&(r+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&n+1<t.length)){const s=t[n+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return r+=a?`>
13
- `:">",r},dn.prototype.renderInline=function(e,t,n){let u="";const i=this.rules;for(let r=0,a=e.length;r<a;r++){const s=e[r].type;typeof i[s]<"u"?u+=i[s](e,r,t,n,this):u+=this.renderToken(e,r,t)}return u},dn.prototype.renderInlineAsText=function(e,t,n){let u="";for(let i=0,r=e.length;i<r;i++)switch(e[i].type){case"text":u+=e[i].content;break;case"image":u+=this.renderInlineAsText(e[i].children,t,n);break;case"html_inline":case"html_block":u+=e[i].content;break;case"softbreak":case"hardbreak":u+=`
14
- `;break}return u},dn.prototype.render=function(e,t,n){let u="";const i=this.rules;for(let r=0,a=e.length;r<a;r++){const s=e[r].type;s==="inline"?u+=this.renderInline(e[r].children,t,n):typeof i[s]<"u"?u+=i[s](e,r,t,n,this):u+=this.renderToken(e,r,t,n)}return u};function We(){this.__rules__=[],this.__cache__=null}We.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},We.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(u){t.indexOf(u)<0&&t.push(u)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(u){u.enabled&&(n&&u.alt.indexOf(n)<0||e.__cache__[n].push(u.fn))})})},We.prototype.at=function(e,t,n){const u=this.__find__(e),i=n||{};if(u===-1)throw new Error("Parser rule not found: "+e);this.__rules__[u].fn=t,this.__rules__[u].alt=i.alt||[],this.__cache__=null},We.prototype.before=function(e,t,n,u){const i=this.__find__(e),r=u||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null},We.prototype.after=function(e,t,n,u){const i=this.__find__(e),r=u||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null},We.prototype.push=function(e,t,n){const u=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:u.alt||[]}),this.__cache__=null},We.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const i=this.__find__(u);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[i].enabled=!0,n.push(u)},this),this.__cache__=null,n},We.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},We.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const i=this.__find__(u);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[i].enabled=!1,n.push(u)},this),this.__cache__=null,n},We.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function st(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}st.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let u=0,i=n.length;u<i;u++)if(n[u][0]===t)return u;return-1},st.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},st.prototype.attrSet=function(t,n){const u=this.attrIndex(t),i=[t,n];u<0?this.attrPush(i):this.attrs[u]=i},st.prototype.attrGet=function(t){const n=this.attrIndex(t);let u=null;return n>=0&&(u=this.attrs[n][1]),u},st.prototype.attrJoin=function(t,n){const u=this.attrIndex(t);u<0?this.attrPush([t,n]):this.attrs[u][1]=this.attrs[u][1]+" "+n};function No(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}No.prototype.Token=st;const r0=/\r\n?|\n/g,u0=/\0/g;function i0(e){let t;t=e.src.replace(r0,`
15
- `),t=t.replace(u0,"�"),e.src=t}function o0(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function a0(e){const t=e.tokens;for(let n=0,u=t.length;n<u;n++){const i=t[n];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function s0(e){return/^<a[>\s]/i.test(e)}function l0(e){return/^<\/a\s*>/i.test(e)}function c0(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,u=t.length;n<u;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let i=t[n].children,r=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(s0(s.content)&&r>0&&r--,l0(s.content)&&r++),!(r>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let d=e.md.linkify.match(l);const f=[];let c=s.level,m=0;d.length>0&&d[0].index===0&&a>0&&i[a-1].type==="text_special"&&(d=d.slice(1));for(let g=0;g<d.length;g++){const p=d[g].url,v=e.md.normalizeLink(p);if(!e.md.validateLink(v))continue;let x=d[g].text;d[g].schema?d[g].schema==="mailto:"&&!/^mailto:/i.test(x)?x=e.md.normalizeLinkText("mailto:"+x).replace(/^mailto:/,""):x=e.md.normalizeLinkText(x):x=e.md.normalizeLinkText("http://"+x).replace(/^http:\/\//,"");const k=d[g].index;if(k>m){const w=new e.Token("text","",0);w.content=l.slice(m,k),w.level=c,f.push(w)}const y=new e.Token("link_open","a",1);y.attrs=[["href",v]],y.level=c++,y.markup="linkify",y.info="auto",f.push(y);const h=new e.Token("text","",0);h.content=x,h.level=c,f.push(h);const b=new e.Token("link_close","a",-1);b.level=--c,b.markup="linkify",b.info="auto",f.push(b),m=d[g].lastIndex}if(m<l.length){const g=new e.Token("text","",0);g.content=l.slice(m),g.level=c,f.push(g)}t[n].children=i=Do(i,a,f)}}}}const Lo=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,d0=/\((c|tm|r)\)/i,f0=/\((c|tm|r)\)/ig,h0={c:"©",r:"®",tm:"™"};function m0(e,t){return h0[t.toLowerCase()]}function p0(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&(u.content=u.content.replace(f0,m0)),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function g0(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&Lo.test(u.content)&&(u.content=u.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function b0(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(d0.test(e.tokens[t].content)&&p0(e.tokens[t].children),Lo.test(e.tokens[t].content)&&g0(e.tokens[t].children))}const y0=/['"]/,Io=/['"]/g,Oo="’";function Rr(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function x0(e,t){let n;const u=[];for(let i=0;i<e.length;i++){const r=e[i],a=e[i].level;for(n=u.length-1;n>=0&&!(u[n].level<=a);n--);if(u.length=n+1,r.type!=="text")continue;let s=r.content,l=0,d=s.length;e:for(;l<d;){Io.lastIndex=l;const f=Io.exec(s);if(!f)break;let c=!0,m=!0;l=f.index+1;const g=f[0]==="'";let p=32;if(f.index-1>=0)p=s.charCodeAt(f.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(l<d)v=s.charCodeAt(l);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){v=e[n].content.charCodeAt(0);break}const x=zn(p)||Bn(String.fromCharCode(p)),k=zn(v)||Bn(String.fromCharCode(v)),y=Mn(p),h=Mn(v);if(h?c=!1:k&&(y||x||(c=!1)),y?m=!1:x&&(h||k||(m=!1)),v===34&&f[0]==='"'&&p>=48&&p<=57&&(m=c=!1),c&&m&&(c=x,m=k),!c&&!m){g&&(r.content=Rr(r.content,f.index,Oo));continue}if(m)for(n=u.length-1;n>=0;n--){let b=u[n];if(u[n].level<a)break;if(b.single===g&&u[n].level===a){b=u[n];let w,C;g?(w=t.md.options.quotes[2],C=t.md.options.quotes[3]):(w=t.md.options.quotes[0],C=t.md.options.quotes[1]),r.content=Rr(r.content,f.index,C),e[b.token].content=Rr(e[b.token].content,b.pos,w),l+=C.length-1,b.token===i&&(l+=w.length-1),s=r.content,d=s.length,u.length=n;continue e}}c?u.push({token:i,pos:f.index,single:g,level:a}):m&&g&&(r.content=Rr(r.content,f.index,Oo))}}}function w0(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!y0.test(e.tokens[t].content)||x0(e.tokens[t].children,e)}function v0(e){let t,n;const u=e.tokens,i=u.length;for(let r=0;r<i;r++){if(u[r].type!=="inline")continue;const a=u[r].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const qu=[["normalize",i0],["block",o0],["inline",a0],["linkify",c0],["replacements",b0],["smartquotes",w0],["text_join",v0]];function Zu(){this.ruler=new We;for(let e=0;e<qu.length;e++)this.ruler.push(qu[e][0],qu[e][1])}Zu.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,u=t.length;n<u;n++)t[n](e)},Zu.prototype.State=No;function wt(e,t,n,u){this.src=e,this.md=t,this.env=n,this.tokens=u,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let r=0,a=0,s=0,l=0,d=i.length,f=!1;a<d;a++){const c=i.charCodeAt(a);if(!f)if(ce(c)){s++,c===9?l+=4-l%4:l++;continue}else f=!0;(c===10||a===d-1)&&(c!==10&&a++,this.bMarks.push(r),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),f=!1,s=0,l=0,r=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}wt.prototype.push=function(e,t,n){const u=new st(e,t,n);return u.block=!0,n<0&&this.level--,u.level=this.level,n>0&&this.level++,this.tokens.push(u),u},wt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},wt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},wt.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const u=this.src.charCodeAt(t);if(!ce(u))break}return t},wt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!ce(this.src.charCodeAt(--t)))return t+1;return t},wt.prototype.skipChars=function(t,n){for(let u=this.src.length;t<u&&this.src.charCodeAt(t)===n;t++);return t},wt.prototype.skipCharsBack=function(t,n,u){if(t<=u)return t;for(;t>u;)if(n!==this.src.charCodeAt(--t))return t+1;return t},wt.prototype.getLines=function(t,n,u,i){if(t>=n)return"";const r=new Array(n-t);for(let a=0,s=t;s<n;s++,a++){let l=0;const d=this.bMarks[s];let f=d,c;for(s+1<n||i?c=this.eMarks[s]+1:c=this.eMarks[s];f<c&&l<u;){const m=this.src.charCodeAt(f);if(ce(m))m===9?l+=4-(l+this.bsCount[s])%4:l++;else if(f-d<this.tShift[s])l++;else break;f++}l>u?r[a]=new Array(l-u+1).join(" ")+this.src.slice(f,c):r[a]=this.src.slice(f,c)}return r.join("")},wt.prototype.Token=st;const A0=65536;function Yu(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];return e.src.slice(n,u)}function Po(e){const t=[],n=e.length;let u=0,i=e.charCodeAt(u),r=!1,a=0,s="";for(;u<n;)i===124&&(r?(s+=e.substring(a,u-1),a=u):(t.push(s+e.substring(a,u)),s="",a=u+1)),r=i===92,u++,i=e.charCodeAt(u);return t.push(s+e.substring(a)),t}function k0(e,t,n,u){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let r=e.bMarks[i]+e.tShift[i];if(r>=e.eMarks[i])return!1;const a=e.src.charCodeAt(r++);if(a!==124&&a!==45&&a!==58||r>=e.eMarks[i])return!1;const s=e.src.charCodeAt(r++);if(s!==124&&s!==45&&s!==58&&!ce(s)||a===45&&ce(s))return!1;for(;r<e.eMarks[i];){const b=e.src.charCodeAt(r);if(b!==124&&b!==45&&b!==58&&!ce(b))return!1;r++}let l=Yu(e,t+1),d=l.split("|");const f=[];for(let b=0;b<d.length;b++){const w=d[b].trim();if(!w){if(b===0||b===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?f.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?f.push("left"):f.push("")}if(l=Yu(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;d=Po(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();const c=d.length;if(c===0||c!==f.length)return!1;if(u)return!0;const m=e.parentType;e.parentType="table";const g=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),v=[t,0];p.map=v;const x=e.push("thead_open","thead",1);x.map=[t,t+1];const k=e.push("tr_open","tr",1);k.map=[t,t+1];for(let b=0;b<d.length;b++){const w=e.push("th_open","th",1);f[b]&&(w.attrs=[["style","text-align:"+f[b]]]);const C=e.push("inline","",0);C.content=d[b].trim(),C.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,h=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let b=!1;for(let C=0,E=g.length;C<E;C++)if(g[C](e,i,n,!0)){b=!0;break}if(b||(l=Yu(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(d=Po(l),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),h+=c-d.length,h>A0))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=y=[t+2,0]}const w=e.push("tr_open","tr",1);w.map=[i,i+1];for(let C=0;C<c;C++){const E=e.push("td_open","td",1);f[C]&&(E.attrs=[["style","text-align:"+f[C]]]);const _=e.push("inline","",0);_.content=d[C]?d[C].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=i),e.push("table_close","table",-1),v[1]=i,e.parentType=m,e.line=i,!0}function C0(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let u=t+1,i=u;for(;u<n;){if(e.isEmpty(u)){u++;continue}if(e.sCount[u]-e.blkIndent>=4){u++,i=u;continue}break}e.line=i;const r=e.push("code_block","code",0);return r.content=e.getLines(t,i,4+e.blkIndent,!1)+`
16
- `,r.map=[t,e.line],!0}function E0(e,t,n,u){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>r)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const d=e.src.slice(s,i),f=e.src.slice(i,r);if(a===96&&f.indexOf(String.fromCharCode(a))>=0)return!1;if(u)return!0;let c=t,m=!1;for(;c++,!(c>=n||(i=s=e.bMarks[c]+e.tShift[c],r=e.eMarks[c],i<r&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<r)))){m=!0;break}l=e.sCount[t],e.line=c+(m?1:0);const g=e.push("fence","code",0);return g.info=f,g.content=e.getLines(t+1,c,l,!0),g.markup=d,g.map=[t,e.line],!0}function _0(e,t,n,u){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(u)return!0;const s=[],l=[],d=[],f=[],c=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let g=!1,p;for(p=t;p<n;p++){const h=e.sCount[p]<e.blkIndent;if(i=e.bMarks[p]+e.tShift[p],r=e.eMarks[p],i>=r)break;if(e.src.charCodeAt(i++)===62&&!h){let w=e.sCount[p]+1,C,E;e.src.charCodeAt(i)===32?(i++,w++,E=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[p]+w)%4===3?(i++,w++,E=!1):E=!0):C=!1;let _=w;for(s.push(e.bMarks[p]),e.bMarks[p]=i;i<r;){const z=e.src.charCodeAt(i);if(ce(z))z===9?_+=4-(_+e.bsCount[p]+(E?1:0))%4:_++;else break;i++}g=i>=r,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(C?1:0),d.push(e.sCount[p]),e.sCount[p]=_-w,f.push(e.tShift[p]),e.tShift[p]=i-e.bMarks[p];continue}if(g)break;let b=!1;for(let w=0,C=c.length;w<C;w++)if(c[w](e,p,n,!0)){b=!0;break}if(b){e.lineMax=p,e.blkIndent!==0&&(s.push(e.bMarks[p]),l.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),l.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]=-1}const v=e.blkIndent;e.blkIndent=0;const x=e.push("blockquote_open","blockquote",1);x.markup=">";const k=[t,0];x.map=k,e.md.block.tokenize(e,t,p);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=a,e.parentType=m,k[1]=e.line;for(let h=0;h<f.length;h++)e.bMarks[h+t]=s[h],e.tShift[h+t]=f[h],e.sCount[h+t]=d[h],e.bsCount[h+t]=l[h];return e.blkIndent=v,!0}function S0(e,t,n,u){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(r++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;r<i;){const d=e.src.charCodeAt(r++);if(d!==a&&!ce(d))return!1;d===a&&s++}if(s<3)return!1;if(u)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function Ro(e,t){const n=e.eMarks[t];let u=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(u++);if(i!==42&&i!==45&&i!==43)return-1;if(u<n){const r=e.src.charCodeAt(u);if(!ce(r))return-1}return u}function Vo(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];let i=n;if(i+1>=u)return-1;let r=e.src.charCodeAt(i++);if(r<48||r>57)return-1;for(;;){if(i>=u)return-1;if(r=e.src.charCodeAt(i++),r>=48&&r<=57){if(i-n>=10)return-1;continue}if(r===41||r===46)break;return-1}return i<u&&(r=e.src.charCodeAt(i),!ce(r))?-1:i}function F0(e,t){const n=e.level+2;for(let u=t+2,i=e.tokens.length-2;u<i;u++)e.tokens[u].level===n&&e.tokens[u].type==="paragraph_open"&&(e.tokens[u+2].hidden=!0,e.tokens[u].hidden=!0,u+=2)}function D0(e,t,n,u){let i,r,a,s,l=t,d=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let f=!1;u&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(f=!0);let c,m,g;if((g=Vo(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],m=Number(e.src.slice(a,g-1)),f&&m!==1)return!1}else if((g=Ro(e,l))>=0)c=!1;else return!1;if(f&&e.skipSpaces(g)>=e.eMarks[l])return!1;if(u)return!0;const p=e.src.charCodeAt(g-1),v=e.tokens.length;c?(s=e.push("ordered_list_open","ol",1),m!==1&&(s.attrs=[["start",m]])):s=e.push("bullet_list_open","ul",1);const x=[l,0];s.map=x,s.markup=String.fromCharCode(p);let k=!1;const y=e.md.block.ruler.getRules("list"),h=e.parentType;for(e.parentType="list";l<n;){r=g,i=e.eMarks[l];const b=e.sCount[l]+g-(e.bMarks[l]+e.tShift[l]);let w=b;for(;r<i;){const $=e.src.charCodeAt(r);if($===9)w+=4-(w+e.bsCount[l])%4;else if($===32)w++;else break;r++}const C=r;let E;C>=i?E=1:E=w-b,E>4&&(E=1);const _=b+E;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const z=[l,0];s.map=z,c&&(s.info=e.src.slice(a,g-1));const M=e.tight,I=e.tShift[l],B=e.sCount[l],D=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=_,e.tight=!0,e.tShift[l]=C-e.bMarks[l],e.sCount[l]=w,C>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||k)&&(d=!1),k=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=D,e.tShift[l]=I,e.sCount[l]=B,e.tight=M,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),l=e.line,z[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let H=!1;for(let $=0,F=y.length;$<F;$++)if(y[$](e,l,n,!0)){H=!0;break}if(H)break;if(c){if(g=Vo(e,l),g<0)break;a=e.bMarks[l]+e.tShift[l]}else if(g=Ro(e,l),g<0)break;if(p!==e.src.charCodeAt(g-1))break}return c?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(p),x[1]=l,e.line=l,e.parentType=h,d&&F0(e,v),!0}function T0(e,t,n,u){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(y){const h=e.lineMax;if(y>=h||e.isEmpty(y))return null;let b=!1;if(e.sCount[y]-e.blkIndent>3&&(b=!0),e.sCount[y]<0&&(b=!0),!b){const E=e.md.block.ruler.getRules("reference"),_=e.parentType;e.parentType="reference";let z=!1;for(let M=0,I=E.length;M<I;M++)if(E[M](e,y,h,!0)){z=!0;break}if(e.parentType=_,z)return null}const w=e.bMarks[y]+e.tShift[y],C=e.eMarks[y];return e.src.slice(w,C+1)}let l=e.src.slice(i,r+1);r=l.length;let d=-1;for(i=1;i<r;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){d=i;break}else if(y===10){const h=s(a);h!==null&&(l+=h,r=l.length,a++)}else if(y===92&&(i++,i<r&&l.charCodeAt(i)===10)){const h=s(a);h!==null&&(l+=h,r=l.length,a++)}}if(d<0||l.charCodeAt(d+1)!==58)return!1;for(i=d+2;i<r;i++){const y=l.charCodeAt(i);if(y===10){const h=s(a);h!==null&&(l+=h,r=l.length,a++)}else if(!ce(y))break}const f=e.md.helpers.parseLinkDestination(l,i,r);if(!f.ok)return!1;const c=e.md.normalizeLink(f.str);if(!e.md.validateLink(c))return!1;i=f.pos;const m=i,g=a,p=i;for(;i<r;i++){const y=l.charCodeAt(i);if(y===10){const h=s(a);h!==null&&(l+=h,r=l.length,a++)}else if(!ce(y))break}let v=e.md.helpers.parseLinkTitle(l,i,r);for(;v.can_continue;){const y=s(a);if(y===null)break;l+=y,i=r,r=l.length,a++,v=e.md.helpers.parseLinkTitle(l,i,r,v)}let x;for(i<r&&p!==i&&v.ok?(x=v.str,i=v.pos):(x="",i=m,a=g);i<r;){const y=l.charCodeAt(i);if(!ce(y))break;i++}if(i<r&&l.charCodeAt(i)!==10&&x)for(x="",i=m,a=g;i<r;){const y=l.charCodeAt(i);if(!ce(y))break;i++}if(i<r&&l.charCodeAt(i)!==10)return!1;const k=Pr(l.slice(1,d));return k?(u||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[k]>"u"&&(e.env.references[k]={title:x,href:c}),e.line=a),!0):!1}const N0=["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"],L0="[a-zA-Z_:][a-zA-Z0-9:._-]*",I0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Mo="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+L0+"(?:\\s*=\\s*"+I0+")?)")+"*\\s*\\/?>",Bo="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",O0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",P0="<[?][\\s\\S]*?[?]>",R0="<![A-Za-z][^>]*>",V0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",M0=new RegExp("^(?:"+Mo+"|"+Bo+"|"+O0+"|"+P0+"|"+R0+"|"+V0+")"),B0=new RegExp("^(?:"+Mo+"|"+Bo+")"),fn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+N0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(B0.source+"\\s*$"),/^$/,!1]];function z0(e,t,n,u){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,r),s=0;for(;s<fn.length&&!fn[s][0].test(a);s++);if(s===fn.length)return!1;if(u)return fn[s][2];let l=t+1;if(!fn[s][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(i=e.bMarks[l]+e.tShift[l],r=e.eMarks[l],a=e.src.slice(i,r),fn[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function j0(e,t,n,u){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=r)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<r&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<r&&!ce(a))return!1;if(u)return!0;r=e.skipSpacesBack(r,i);const l=e.skipCharsBack(r,35,i);l>i&&ce(e.src.charCodeAt(l-1))&&(r=l),e.line=t+1;const d=e.push("heading_open","h"+String(s),1);d.markup="########".slice(0,s),d.map=[t,e.line];const f=e.push("inline","",0);f.content=e.src.slice(i,r).trim(),f.map=[t,e.line],f.children=[];const c=e.push("heading_close","h"+String(s),-1);return c.markup="########".slice(0,s),!0}function H0(e,t,n){const u=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let r=0,a,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let g=e.bMarks[s]+e.tShift[s];const p=e.eMarks[s];if(g<p&&(a=e.src.charCodeAt(g),(a===45||a===61)&&(g=e.skipChars(g,a),g=e.skipSpaces(g),g>=p))){r=a===61?1:2;break}}if(e.sCount[s]<0)continue;let m=!1;for(let g=0,p=u.length;g<p;g++)if(u[g](e,s,n,!0)){m=!0;break}if(m)break}if(!r)return!1;const l=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const d=e.push("heading_open","h"+String(r),1);d.markup=String.fromCharCode(a),d.map=[t,e.line];const f=e.push("inline","",0);f.content=l,f.map=[t,e.line-1],f.children=[];const c=e.push("heading_close","h"+String(r),-1);return c.markup=String.fromCharCode(a),e.parentType=i,!0}function $0(e,t,n){const u=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let r=t+1;for(e.parentType="paragraph";r<n&&!e.isEmpty(r);r++){if(e.sCount[r]-e.blkIndent>3||e.sCount[r]<0)continue;let d=!1;for(let f=0,c=u.length;f<c;f++)if(u[f](e,r,n,!0)){d=!0;break}if(d)break}const a=e.getLines(t,r,e.blkIndent,!1).trim();e.line=r;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Vr=[["table",k0,["paragraph","reference"]],["code",C0],["fence",E0,["paragraph","reference","blockquote","list"]],["blockquote",_0,["paragraph","reference","blockquote","list"]],["hr",S0,["paragraph","reference","blockquote","list"]],["list",D0,["paragraph","reference","blockquote"]],["reference",T0],["html_block",z0,["paragraph","reference","blockquote"]],["heading",j0,["paragraph","reference","blockquote"]],["lheading",H0],["paragraph",$0]];function Mr(){this.ruler=new We;for(let e=0;e<Vr.length;e++)this.ruler.push(Vr[e][0],Vr[e][1],{alt:(Vr[e][2]||[]).slice()})}Mr.prototype.tokenize=function(e,t,n){const u=this.ruler.getRules(""),i=u.length,r=e.md.options.maxNesting;let a=t,s=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=r){e.line=n;break}const l=e.line;let d=!1;for(let f=0;f<i;f++)if(d=u[f](e,a,n,!1),d){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},Mr.prototype.parse=function(e,t,n,u){if(!e)return;const i=new this.State(e,t,n,u);this.tokenize(i,i.line,i.lineMax)},Mr.prototype.State=wt;function jn(e,t,n,u){this.src=e,this.env=n,this.md=t,this.tokens=u,this.tokens_meta=Array(u.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}jn.prototype.pushPending=function(){const e=new st("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},jn.prototype.push=function(e,t,n){this.pending&&this.pushPending();const u=new st(e,t,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(i),u},jn.prototype.scanDelims=function(e,t){const n=this.posMax,u=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let r=e;for(;r<n&&this.src.charCodeAt(r)===u;)r++;const a=r-e,s=r<n?this.src.charCodeAt(r):32,l=zn(i)||Bn(String.fromCharCode(i)),d=zn(s)||Bn(String.fromCharCode(s)),f=Mn(i),c=Mn(s),m=!c&&(!d||f||l),g=!f&&(!l||c||d);return{can_open:m&&(t||!g||l),can_close:g&&(t||!m||d),length:a}},jn.prototype.Token=st;function U0(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function W0(e,t){let n=e.pos;for(;n<e.posMax&&!U0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const G0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function X0(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,u=e.posMax;if(n+3>u||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(G0);if(!i)return!1;const r=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-r.length));if(!a)return!1;let s=a.url;if(s.length<=r.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const d=e.md.normalizeLink(s);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-r.length);const f=e.push("link_open","a",1);f.attrs=[["href",d]],f.markup="linkify",f.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const m=e.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return e.pos+=s.length-r.length,!0}function q0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const u=e.pending.length-1,i=e.posMax;if(!t)if(u>=0&&e.pending.charCodeAt(u)===32)if(u>=1&&e.pending.charCodeAt(u-1)===32){let r=u-1;for(;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&ce(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Ku=[];for(let e=0;e<256;e++)Ku.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ku[e.charCodeAt(0)]=1});function Z0(e,t){let n=e.pos;const u=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=u))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n<u&&(i=e.src.charCodeAt(n),!!ce(i));)n++;return e.pos=n,!0}let r=e.src[n];if(i>=55296&&i<=56319&&n+1<u){const s=e.src.charCodeAt(n+1);s>=56320&&s<=57343&&(r+=e.src[n+1],n++)}const a="\\"+r;if(!t){const s=e.push("text_special","",0);i<256&&Ku[i]!==0?s.content=r:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Y0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const r=e.posMax;for(;n<r&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(i,n),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=n,d;for(;(d=e.src.indexOf("`",l))!==-1;){for(l=d+1;l<r&&e.src.charCodeAt(l)===96;)l++;const f=l-d;if(f===s){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[f]=d}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function K0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==126)return!1;const i=e.scanDelims(e.pos,!0);let r=i.length;const a=String.fromCharCode(u);if(r<2)return!1;let s;r%2&&(s=e.push("text","",0),s.content=a,r--);for(let l=0;l<r;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:u,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function zo(e,t){let n;const u=[],i=t.length;for(let r=0;r<i;r++){const a=t[r];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&u.push(s.token-1)}for(;u.length;){const r=u.pop();let a=r+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,r!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[r],e.tokens[r]=n)}}function Q0(e){const t=e.tokens_meta,n=e.tokens_meta.length;zo(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&zo(e,t[u].delimiters)}const jo={tokenize:K0,postProcess:Q0};function J0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==95&&u!==42)return!1;const i=e.scanDelims(e.pos,u===42);for(let r=0;r<i.length;r++){const a=e.push("text","",0);a.content=String.fromCharCode(u),e.delimiters.push({marker:u,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function Ho(e,t){const n=t.length;for(let u=n-1;u>=0;u--){const i=t[u];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const r=t[i.end],a=u>0&&t[u-1].end===i.end+1&&t[u-1].marker===i.marker&&t[u-1].token===i.token-1&&t[i.end+1].token===r.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const d=e.tokens[r.token];d.type=a?"strong_close":"em_close",d.tag=a?"strong":"em",d.nesting=-1,d.markup=a?s+s:s,d.content="",a&&(e.tokens[t[u-1].token].content="",e.tokens[t[i.end+1].token].content="",u--)}}function ed(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ho(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Ho(e,t[u].delimiters)}const $o={tokenize:J0,postProcess:ed};function td(e,t){let n,u,i,r,a="",s="",l=e.pos,d=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,c=e.posMax,m=e.pos+1,g=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(g<0)return!1;let p=g+1;if(p<c&&e.src.charCodeAt(p)===40){for(d=!1,p++;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);if(p>=c)return!1;if(l=p,i=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?p=i.pos:a="",l=p;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);if(i=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&l!==p&&i.ok)for(s=i.str,p=i.pos;p<c&&(n=e.src.charCodeAt(p),!(!ce(n)&&n!==10));p++);}(p>=c||e.src.charCodeAt(p)!==41)&&(d=!0),p++}if(d){if(typeof e.env.references>"u")return!1;if(p<c&&e.src.charCodeAt(p)===91?(l=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?u=e.src.slice(l,p++):p=g+1):p=g+1,u||(u=e.src.slice(m,g)),r=e.env.references[Pr(u)],!r)return e.pos=f,!1;a=r.href,s=r.title}if(!t){e.pos=m,e.posMax=g;const v=e.push("link_open","a",1),x=[["href",a]];v.attrs=x,s&&x.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}function nd(e,t){let n,u,i,r,a,s,l,d,f="";const c=e.pos,m=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const g=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(r=p+1,r<m&&e.src.charCodeAt(r)===40){for(r++;r<m&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);if(r>=m)return!1;for(d=r,s=e.md.helpers.parseLinkDestination(e.src,r,e.posMax),s.ok&&(f=e.md.normalizeLink(s.str),e.md.validateLink(f)?r=s.pos:f=""),d=r;r<m&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);if(s=e.md.helpers.parseLinkTitle(e.src,r,e.posMax),r<m&&d!==r&&s.ok)for(l=s.str,r=s.pos;r<m&&(n=e.src.charCodeAt(r),!(!ce(n)&&n!==10));r++);else l="";if(r>=m||e.src.charCodeAt(r)!==41)return e.pos=c,!1;r++}else{if(typeof e.env.references>"u")return!1;if(r<m&&e.src.charCodeAt(r)===91?(d=r+1,r=e.md.helpers.parseLinkLabel(e,r),r>=0?i=e.src.slice(d,r++):r=p+1):r=p+1,i||(i=e.src.slice(g,p)),a=e.env.references[Pr(i)],!a)return e.pos=c,!1;f=a.href,l=a.title}if(!t){u=e.src.slice(g,p);const v=[];e.md.inline.parse(u,e.md,e.env,v);const x=e.push("image","img",0),k=[["src",f],["alt",""]];x.attrs=k,x.children=v,x.content=u,l&&k.push(["title",l])}return e.pos=r,e.posMax=m,!0}const rd=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ud=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function id(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const u=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const r=e.src.slice(u+1,n);if(ud.test(r)){const a=e.md.normalizeLink(r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}if(rd.test(r)){const a=e.md.normalizeLink("mailto:"+r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}return!1}function od(e){return/^<a[>\s]/i.test(e)}function ad(e){return/^<\/a\s*>/i.test(e)}function sd(e){const t=e|32;return t>=97&&t<=122}function ld(e,t){if(!e.md.options.html)return!1;const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==60||u+2>=n)return!1;const i=e.src.charCodeAt(u+1);if(i!==33&&i!==63&&i!==47&&!sd(i))return!1;const r=e.src.slice(u).match(M0);if(!r)return!1;if(!t){const a=e.push("html_inline","",0);a.content=r[0],od(a.content)&&e.linkLevel++,ad(a.content)&&e.linkLevel--}return e.pos+=r[0].length,!0}const cd=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,dd=/^&([a-z][a-z0-9]{1,31});/i;function fd(e,t){const n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=u)return!1;if(e.src.charCodeAt(n+1)===35){const r=e.src.slice(n).match(cd);if(r){if(!t){const a=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),s=e.push("text_special","",0);s.content=Xu(a)?Or(a):Or(65533),s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(dd);if(r){const a=Fo(r[0]);if(a!==r[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function Uo(e){const t={},n=e.length;if(!n)return;let u=0,i=-2;const r=[];for(let a=0;a<n;a++){const s=e[a];if(r.push(0),(e[u].marker!==s.marker||i!==s.token-1)&&(u=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let d=u-r[u]-1,f=d;for(;d>l;d-=r[d]+1){const c=e[d];if(c.marker===s.marker&&c.open&&c.end<0){let m=!1;if((c.close||s.open)&&(c.length+s.length)%3===0&&(c.length%3!==0||s.length%3!==0)&&(m=!0),!m){const g=d>0&&!e[d-1].open?r[d-1]+1:0;r[a]=a-d+g,r[d]=g,s.open=!1,c.end=a,c.close=!1,f=-1,i=-2;break}}}f!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=f)}}function hd(e){const t=e.tokens_meta,n=e.tokens_meta.length;Uo(e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Uo(t[u].delimiters)}function md(e){let t,n,u=0;const i=e.tokens,r=e.tokens.length;for(t=n=0;t<r;t++)i[t].nesting<0&&u--,i[t].level=u,i[t].nesting>0&&u++,i[t].type==="text"&&t+1<r&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}const Qu=[["text",W0],["linkify",X0],["newline",q0],["escape",Z0],["backticks",Y0],["strikethrough",jo.tokenize],["emphasis",$o.tokenize],["link",td],["image",nd],["autolink",id],["html_inline",ld],["entity",fd]],Ju=[["balance_pairs",hd],["strikethrough",jo.postProcess],["emphasis",$o.postProcess],["fragments_join",md]];function Hn(){this.ruler=new We;for(let e=0;e<Qu.length;e++)this.ruler.push(Qu[e][0],Qu[e][1]);this.ruler2=new We;for(let e=0;e<Ju.length;e++)this.ruler2.push(Ju[e][0],Ju[e][1])}Hn.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),u=n.length,i=e.md.options.maxNesting,r=e.cache;if(typeof r[t]<"u"){e.pos=r[t];return}let a=!1;if(e.level<i){for(let s=0;s<u;s++)if(e.level++,a=n[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,r[t]=e.pos},Hn.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,u=e.posMax,i=e.md.options.maxNesting;for(;e.pos<u;){const r=e.pos;let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(a=t[s](e,!1),a){if(r>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=u)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Hn.prototype.parse=function(e,t,n,u){const i=new this.State(e,t,n,u);this.tokenize(i);const r=this.ruler2.getRules(""),a=r.length;for(let s=0;s<a;s++)r[s](i)},Hn.prototype.State=jn;function pd(e){const t={};e=e||{},t.src_Any=ko.source,t.src_Cc=Co.source,t.src_Z=_o.source,t.src_P=$u.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function ei(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(u){e[u]=n[u]})}),e}function Br(e){return Object.prototype.toString.call(e)}function gd(e){return Br(e)==="[object String]"}function bd(e){return Br(e)==="[object Object]"}function yd(e){return Br(e)==="[object RegExp]"}function Wo(e){return Br(e)==="[object Function]"}function xd(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Go={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function wd(e){return Object.keys(e||{}).reduce(function(t,n){return t||Go.hasOwnProperty(n)},!1)}const vd={"http:":{validate:function(e,t,n){const u=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(u)?u.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const u=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(u)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:u.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const u=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(u)?u.match(n.re.mailto)[0].length:0}}},Ad="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",kd="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Cd(e){e.__index__=-1,e.__text_cache__=""}function Ed(e){return function(t,n){const u=t.slice(n);return e.test(u)?u.match(e)[0].length:0}}function Xo(){return function(e,t){t.normalize(e)}}function zr(e){const t=e.re=pd(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Ad),n.push(t.src_xn),t.src_tlds=n.join("|");function u(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(u(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(u(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(u(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(u(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function r(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const d={validate:null,link:null};if(e.__compiled__[s]=d,bd(l)){yd(l.validate)?d.validate=Ed(l.validate):Wo(l.validate)?d.validate=l.validate:r(s,l),Wo(l.normalize)?d.normalize=l.normalize:l.normalize?r(s,l):d.normalize=Xo();return}if(gd(l)){i.push(s);return}r(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:Xo()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(xd).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Cd(e)}function _d(e,t){const n=e.__index__,u=e.__last_index__,i=e.__text_cache__.slice(n,u);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=u+t,this.raw=i,this.text=i,this.url=i}function ti(e,t){const n=new _d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function qe(e,t){if(!(this instanceof qe))return new qe(e,t);t||wd(e)&&(t=e,e={}),this.__opts__=ei({},Go,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ei({},vd,e),this.__compiled__={},this.__tlds__=kd,this.__tlds_replaced__=!1,this.re={},zr(this)}qe.prototype.add=function(t,n){return this.__schemas__[t]=n,zr(this),this},qe.prototype.set=function(t){return this.__opts__=ei(this.__opts__,t),this},qe.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,u,i,r,a,s,l,d,f;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(r=this.testSchemaAt(t,n[2],l.lastIndex),r){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=t.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d<this.__index__)&&(u=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=u.index+u[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=u.index+u[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},qe.prototype.pretest=function(t){return this.re.pretest.test(t)},qe.prototype.testSchemaAt=function(t,n,u){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,u,this):0},qe.prototype.match=function(t){const n=[];let u=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(ti(this,u)),u=this.__last_index__);let i=u?t.slice(u):t;for(;this.test(i);)n.push(ti(this,u)),i=i.slice(this.__last_index__),u+=this.__last_index__;return n.length?n:null},qe.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const u=this.testSchemaAt(t,n[2],n[0].length);return u?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+u,ti(this,0)):null},qe.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(u,i,r){return u!==r[i-1]}).reverse(),zr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,zr(this),this)},qe.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},qe.prototype.onCompile=function(){};const hn=2147483647,vt=36,ni=1,$n=26,Sd=38,Fd=700,qo=72,Zo=128,Yo="-",Dd=/^xn--/,Td=/[^\0-\x7F]/,Nd=/[\x2E\u3002\uFF0E\uFF61]/g,Ld={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ri=vt-ni,At=Math.floor,ui=String.fromCharCode;function Bt(e){throw new RangeError(Ld[e])}function Id(e,t){const n=[];let u=e.length;for(;u--;)n[u]=t(e[u]);return n}function Ko(e,t){const n=e.split("@");let u="";n.length>1&&(u=n[0]+"@",e=n[1]),e=e.replace(Nd,".");const i=e.split("."),r=Id(i,t).join(".");return u+r}function Qo(e){const t=[];let n=0;const u=e.length;for(;n<u;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<u){const r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const Od=e=>String.fromCodePoint(...e),Pd=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:vt},Jo=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ea=function(e,t,n){let u=0;for(e=n?At(e/Fd):e>>1,e+=At(e/t);e>ri*$n>>1;u+=vt)e=At(e/ri);return At(u+(ri+1)*e/(e+Sd))},ta=function(e){const t=[],n=e.length;let u=0,i=Zo,r=qo,a=e.lastIndexOf(Yo);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&Bt("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const l=u;for(let f=1,c=vt;;c+=vt){s>=n&&Bt("invalid-input");const m=Pd(e.charCodeAt(s++));m>=vt&&Bt("invalid-input"),m>At((hn-u)/f)&&Bt("overflow"),u+=m*f;const g=c<=r?ni:c>=r+$n?$n:c-r;if(m<g)break;const p=vt-g;f>At(hn/p)&&Bt("overflow"),f*=p}const d=t.length+1;r=ea(u-l,d,l==0),At(u/d)>hn-i&&Bt("overflow"),i+=At(u/d),u%=d,t.splice(u++,0,i)}return String.fromCodePoint(...t)},na=function(e){const t=[];e=Qo(e);const n=e.length;let u=Zo,i=0,r=qo;for(const l of e)l<128&&t.push(ui(l));const a=t.length;let s=a;for(a&&t.push(Yo);s<n;){let l=hn;for(const f of e)f>=u&&f<l&&(l=f);const d=s+1;l-u>At((hn-i)/d)&&Bt("overflow"),i+=(l-u)*d,u=l;for(const f of e)if(f<u&&++i>hn&&Bt("overflow"),f===u){let c=i;for(let m=vt;;m+=vt){const g=m<=r?ni:m>=r+$n?$n:m-r;if(c<g)break;const p=c-g,v=vt-g;t.push(ui(Jo(g+p%v,0))),c=At(p/v)}t.push(ui(Jo(c,0))),r=ea(i,d,s===a),i=0,++s}++i,++u}return t.join("")},ra={version:"2.3.1",ucs2:{decode:Qo,encode:Od},decode:ta,encode:na,toASCII:function(e){return Ko(e,function(t){return Td.test(t)?"xn--"+na(t):t})},toUnicode:function(e){return Ko(e,function(t){return Dd.test(t)?ta(t.slice(4).toLowerCase()):t})}},Rd={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Vd=/^(vbscript|javascript|file|data):/,Md=/^data:image\/(gif|png|jpeg|webp);/;function Bd(e){const t=e.trim().toLowerCase();return Vd.test(t)?Md.test(t):!0}const ua=["http:","https:","mailto:"];function zd(e){const t=Hu(e,!0);if(t.hostname&&(!t.protocol||ua.indexOf(t.protocol)>=0))try{t.hostname=ra.toASCII(t.hostname)}catch{}return Vn(ju(t))}function jd(e){const t=Hu(e,!0);if(t.hostname&&(!t.protocol||ua.indexOf(t.protocol)>=0))try{t.hostname=ra.toUnicode(t.hostname)}catch{}return ln(ju(t),ln.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||Gu(e)||(t=e||{},e="default"),this.inline=new Hn,this.block=new Mr,this.core=new Zu,this.renderer=new dn,this.linkify=new qe,this.validateLink=Bd,this.normalizeLink=zd,this.normalizeLinkText=jd,this.utils=Qc,this.helpers=Ir({},n0),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return Ir(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(Gu(e)){const n=e;if(e=Rd[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Ze.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const u=e.filter(function(i){return n.indexOf(i)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+u);return this},Ze.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const u=e.filter(function(i){return n.indexOf(i)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+u);return this},Ze.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Ze.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Ze.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Ze.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Ze.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:ia,setPrototypeOf:oa,isFrozen:Hd,getPrototypeOf:$d,getOwnPropertyDescriptor:Ud}=Object;let{freeze:ze,seal:ut,create:jr}=Object,{apply:ii,construct:oi}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),ii||(ii=function(t,n){for(var u=arguments.length,i=new Array(u>2?u-2:0),r=2;r<u;r++)i[r-2]=arguments[r];return t.apply(n,i)}),oi||(oi=function(t){for(var n=arguments.length,u=new Array(n>1?n-1:0),i=1;i<n;i++)u[i-1]=arguments[i];return new t(...u)});const Hr=He(Array.prototype.forEach),Wd=He(Array.prototype.lastIndexOf),aa=He(Array.prototype.pop),Un=He(Array.prototype.push),Gd=He(Array.prototype.splice),$r=He(String.prototype.toLowerCase),ai=He(String.prototype.toString),si=He(String.prototype.match),Wn=He(String.prototype.replace),Xd=He(String.prototype.indexOf),qd=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),Gn=Zd(TypeError);function He(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,u=new Array(n>1?n-1:0),i=1;i<n;i++)u[i-1]=arguments[i];return ii(e,t,u)}}function Zd(e){return function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];return oi(e,n)}}function ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$r;oa&&oa(e,null);let u=t.length;for(;u--;){let i=t[u];if(typeof i=="string"){const r=n(i);r!==i&&(Hd(t)||(t[u]=r),i=r)}e[i]=!0}return e}function Yd(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function kt(e){const t=jr(null);for(const[n,u]of ia(e))Ye(e,n)&&(Array.isArray(u)?t[n]=Yd(u):u&&typeof u=="object"&&u.constructor===Object?t[n]=kt(u):t[n]=u);return t}function Xn(e,t){for(;e!==null;){const u=Ud(e,t);if(u){if(u.get)return He(u.get);if(typeof u.value=="function")return He(u.value)}e=$d(e)}function n(){return null}return n}const sa=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),li=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ci=ze(["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"]),Kd=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),di=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qd=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),la=ze(["#text"]),ca=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),fi=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),da=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ur=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Jd=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ef=ut(/<%[\w\W]*|[\w\W]*%>/gm),tf=ut(/\$\{[\w\W]*/gm),nf=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),rf=ut(/^aria-[\-\w]+$/),fa=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uf=ut(/^(?:\w+script|data):/i),of=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ha=ut(/^html$/i),af=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var ma=Object.freeze({__proto__:null,ARIA_ATTR:rf,ATTR_WHITESPACE:of,CUSTOM_ELEMENT:af,DATA_ATTR:nf,DOCTYPE_NAME:ha,ERB_EXPR:ef,IS_ALLOWED_URI:fa,IS_SCRIPT_OR_DATA:uf,MUSTACHE_EXPR:Jd,TMPLIT_EXPR:tf});const qn={element:1,text:3,progressingInstruction:7,comment:8,document:9},sf=function(){return typeof window>"u"?null:window},lf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let u=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(u=n.getAttribute(i));const r="dompurify"+(u?"#"+u:"");try{return t.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},pa=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ga(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sf();const t=J=>ga(J);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==qn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const u=n,i=u.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:c,DOMParser:m,trustedTypes:g}=e,p=l.prototype,v=Xn(p,"cloneNode"),x=Xn(p,"remove"),k=Xn(p,"nextSibling"),y=Xn(p,"childNodes"),h=Xn(p,"parentNode");if(typeof a=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let b,w="";const{implementation:C,createNodeIterator:E,createDocumentFragment:_,getElementsByTagName:z}=n,{importNode:M}=u;let I=pa();t.isSupported=typeof ia=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:B,ERB_EXPR:D,TMPLIT_EXPR:H,DATA_ATTR:$,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:U}=ma;let{IS_ALLOWED_URI:re}=ma,te=null;const P=ie({},[...sa,...li,...ci,...di,...la]);let V=null;const T=ie({},[...ca,...fi,...da,...Ur]);let L=Object.seal(jr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,K=null;const Z=Object.seal(jr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,ue=!0,le=!1,De=!0,Te=!1,yt=!0,Me=!1,Nn=!1,Xt=!1,Lt=!1,Du=!1,Tu=!1,kl=!0,Cl=!1;const Dm="user-content-";let Yi=!0,Er=!1,Ln={},Dt=null;const Ki=ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let El=null;const _l=ie({},["audio","video","img","source","image","track"]);let Qi=null;const Sl=ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nu="http://www.w3.org/1998/Math/MathML",Lu="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml";let In=It,Ji=!1,eo=null;const Tm=ie({},[Nu,Lu,It],ai);let Iu=ie({},["mi","mo","mn","ms","mtext"]),Ou=ie({},["annotation-xml"]);const Nm=ie({},["title","style","font","a","script"]);let _r=null;const Lm=["application/xhtml+xml","text/html"],Im="text/html";let Ce=null,On=null;const Om=n.createElement("form"),Fl=function(S){return S instanceof RegExp||S instanceof Function},to=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(On&&On===S)){if((!S||typeof S!="object")&&(S={}),S=kt(S),_r=Lm.indexOf(S.PARSER_MEDIA_TYPE)===-1?Im:S.PARSER_MEDIA_TYPE,Ce=_r==="application/xhtml+xml"?ai:$r,te=Ye(S,"ALLOWED_TAGS")?ie({},S.ALLOWED_TAGS,Ce):P,V=Ye(S,"ALLOWED_ATTR")?ie({},S.ALLOWED_ATTR,Ce):T,eo=Ye(S,"ALLOWED_NAMESPACES")?ie({},S.ALLOWED_NAMESPACES,ai):Tm,Qi=Ye(S,"ADD_URI_SAFE_ATTR")?ie(kt(Sl),S.ADD_URI_SAFE_ATTR,Ce):Sl,El=Ye(S,"ADD_DATA_URI_TAGS")?ie(kt(_l),S.ADD_DATA_URI_TAGS,Ce):_l,Dt=Ye(S,"FORBID_CONTENTS")?ie({},S.FORBID_CONTENTS,Ce):Ki,W=Ye(S,"FORBID_TAGS")?ie({},S.FORBID_TAGS,Ce):kt({}),K=Ye(S,"FORBID_ATTR")?ie({},S.FORBID_ATTR,Ce):kt({}),Ln=Ye(S,"USE_PROFILES")?S.USE_PROFILES:!1,Y=S.ALLOW_ARIA_ATTR!==!1,ue=S.ALLOW_DATA_ATTR!==!1,le=S.ALLOW_UNKNOWN_PROTOCOLS||!1,De=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=S.SAFE_FOR_TEMPLATES||!1,yt=S.SAFE_FOR_XML!==!1,Me=S.WHOLE_DOCUMENT||!1,Lt=S.RETURN_DOM||!1,Du=S.RETURN_DOM_FRAGMENT||!1,Tu=S.RETURN_TRUSTED_TYPE||!1,Xt=S.FORCE_BODY||!1,kl=S.SANITIZE_DOM!==!1,Cl=S.SANITIZE_NAMED_PROPS||!1,Yi=S.KEEP_CONTENT!==!1,Er=S.IN_PLACE||!1,re=S.ALLOWED_URI_REGEXP||fa,In=S.NAMESPACE||It,Iu=S.MATHML_TEXT_INTEGRATION_POINTS||Iu,Ou=S.HTML_INTEGRATION_POINTS||Ou,L=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Fl(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(L.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Fl(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(L.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(L.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(ue=!1),Du&&(Lt=!0),Ln&&(te=ie({},la),V=jr(null),Ln.html===!0&&(ie(te,sa),ie(V,ca)),Ln.svg===!0&&(ie(te,li),ie(V,fi),ie(V,Ur)),Ln.svgFilters===!0&&(ie(te,ci),ie(V,fi),ie(V,Ur)),Ln.mathMl===!0&&(ie(te,di),ie(V,da),ie(V,Ur))),Ye(S,"ADD_TAGS")||(Z.tagCheck=null),Ye(S,"ADD_ATTR")||(Z.attributeCheck=null),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?Z.tagCheck=S.ADD_TAGS:(te===P&&(te=kt(te)),ie(te,S.ADD_TAGS,Ce))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?Z.attributeCheck=S.ADD_ATTR:(V===T&&(V=kt(V)),ie(V,S.ADD_ATTR,Ce))),S.ADD_URI_SAFE_ATTR&&ie(Qi,S.ADD_URI_SAFE_ATTR,Ce),S.FORBID_CONTENTS&&(Dt===Ki&&(Dt=kt(Dt)),ie(Dt,S.FORBID_CONTENTS,Ce)),S.ADD_FORBID_CONTENTS&&(Dt===Ki&&(Dt=kt(Dt)),ie(Dt,S.ADD_FORBID_CONTENTS,Ce)),Yi&&(te["#text"]=!0),Me&&ie(te,["html","head","body"]),te.table&&(ie(te,["tbody"]),delete W.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=S.TRUSTED_TYPES_POLICY,w=b.createHTML("")}else b===void 0&&(b=lf(g,i)),b!==null&&typeof w=="string"&&(w=b.createHTML(""));ze&&ze(S),On=S}},Dl=ie({},[...li,...ci,...Kd]),Tl=ie({},[...di,...Qd]),Pm=function(S){let j=h(S);(!j||!j.tagName)&&(j={namespaceURI:In,tagName:"template"});const Q=$r(S.tagName),ge=$r(j.tagName);return eo[S.namespaceURI]?S.namespaceURI===Lu?j.namespaceURI===It?Q==="svg":j.namespaceURI===Nu?Q==="svg"&&(ge==="annotation-xml"||Iu[ge]):!!Dl[Q]:S.namespaceURI===Nu?j.namespaceURI===It?Q==="math":j.namespaceURI===Lu?Q==="math"&&Ou[ge]:!!Tl[Q]:S.namespaceURI===It?j.namespaceURI===Lu&&!Ou[ge]||j.namespaceURI===Nu&&!Iu[ge]?!1:!Tl[Q]&&(Nm[Q]||!Dl[Q]):!!(_r==="application/xhtml+xml"&&eo[S.namespaceURI]):!1},Tt=function(S){Un(t.removed,{element:S});try{h(S).removeChild(S)}catch{x(S)}},an=function(S,j){try{Un(t.removed,{attribute:j.getAttributeNode(S),from:j})}catch{Un(t.removed,{attribute:null,from:j})}if(j.removeAttribute(S),S==="is")if(Lt||Du)try{Tt(j)}catch{}else try{j.setAttribute(S,"")}catch{}},Nl=function(S){let j=null,Q=null;if(Xt)S="<remove></remove>"+S;else{const ve=si(S,/^[\r\n\t ]+/);Q=ve&&ve[0]}_r==="application/xhtml+xml"&&In===It&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const ge=b?b.createHTML(S):S;if(In===It)try{j=new m().parseFromString(ge,_r)}catch{}if(!j||!j.documentElement){j=C.createDocument(In,"template",null);try{j.documentElement.innerHTML=Ji?w:ge}catch{}}const Be=j.body||j.documentElement;return S&&Q&&Be.insertBefore(n.createTextNode(Q),Be.childNodes[0]||null),In===It?z.call(j,Me?"html":"body")[0]:Me?j.documentElement:Be},Ll=function(S){return E.call(S.ownerDocument||S,S,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},no=function(S){return S instanceof c&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof f)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Il=function(S){return typeof s=="function"&&S instanceof s};function Ot(J,S,j){Hr(J,Q=>{Q.call(t,S,j,On)})}const Ol=function(S){let j=null;if(Ot(I.beforeSanitizeElements,S,null),no(S))return Tt(S),!0;const Q=Ce(S.nodeName);if(Ot(I.uponSanitizeElement,S,{tagName:Q,allowedTags:te}),yt&&S.hasChildNodes()&&!Il(S.firstElementChild)&&je(/<[/\w!]/g,S.innerHTML)&&je(/<[/\w!]/g,S.textContent)||S.nodeType===qn.progressingInstruction||yt&&S.nodeType===qn.comment&&je(/<[/\w]/g,S.data))return Tt(S),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(Q))&&(!te[Q]||W[Q])){if(!W[Q]&&Rl(Q)&&(L.tagNameCheck instanceof RegExp&&je(L.tagNameCheck,Q)||L.tagNameCheck instanceof Function&&L.tagNameCheck(Q)))return!1;if(Yi&&!Dt[Q]){const ge=h(S)||S.parentNode,Be=y(S)||S.childNodes;if(Be&&ge){const ve=Be.length;for(let Xe=ve-1;Xe>=0;--Xe){const Pt=v(Be[Xe],!0);Pt.__removalCount=(S.__removalCount||0)+1,ge.insertBefore(Pt,k(S))}}}return Tt(S),!0}return S instanceof l&&!Pm(S)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&je(/<\/no(script|embed|frames)/i,S.innerHTML)?(Tt(S),!0):(Te&&S.nodeType===qn.text&&(j=S.textContent,Hr([B,D,H],ge=>{j=Wn(j,ge," ")}),S.textContent!==j&&(Un(t.removed,{element:S.cloneNode()}),S.textContent=j)),Ot(I.afterSanitizeElements,S,null),!1)},Pl=function(S,j,Q){if(K[j]||kl&&(j==="id"||j==="name")&&(Q in n||Q in Om))return!1;if(!(ue&&!K[j]&&je($,j))){if(!(Y&&je(F,j))){if(!(Z.attributeCheck instanceof Function&&Z.attributeCheck(j,S))){if(!V[j]||K[j]){if(!(Rl(S)&&(L.tagNameCheck instanceof RegExp&&je(L.tagNameCheck,S)||L.tagNameCheck instanceof Function&&L.tagNameCheck(S))&&(L.attributeNameCheck instanceof RegExp&&je(L.attributeNameCheck,j)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(j,S))||j==="is"&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&je(L.tagNameCheck,Q)||L.tagNameCheck instanceof Function&&L.tagNameCheck(Q))))return!1}else if(!Qi[j]){if(!je(re,Wn(Q,O,""))){if(!((j==="src"||j==="xlink:href"||j==="href")&&S!=="script"&&Xd(Q,"data:")===0&&El[S])){if(!(le&&!je(R,Wn(Q,O,"")))){if(Q)return!1}}}}}}}return!0},Rl=function(S){return S!=="annotation-xml"&&si(S,U)},Vl=function(S){Ot(I.beforeSanitizeAttributes,S,null);const{attributes:j}=S;if(!j||no(S))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let ge=j.length;for(;ge--;){const Be=j[ge],{name:ve,namespaceURI:Xe,value:Pt}=Be,Pn=Ce(ve),ro=Pt;let Ie=ve==="value"?ro:qd(ro);if(Q.attrName=Pn,Q.attrValue=Ie,Q.keepAttr=!0,Q.forceKeepAttr=void 0,Ot(I.uponSanitizeAttribute,S,Q),Ie=Q.attrValue,Cl&&(Pn==="id"||Pn==="name")&&(an(ve,S),Ie=Dm+Ie),yt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ie)){an(ve,S);continue}if(Pn==="attributename"&&si(Ie,"href")){an(ve,S);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){an(ve,S);continue}if(!De&&je(/\/>/i,Ie)){an(ve,S);continue}Te&&Hr([B,D,H],Bl=>{Ie=Wn(Ie,Bl," ")});const Ml=Ce(S.nodeName);if(!Pl(Ml,Pn,Ie)){an(ve,S);continue}if(b&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Xe)switch(g.getAttributeType(Ml,Pn)){case"TrustedHTML":{Ie=b.createHTML(Ie);break}case"TrustedScriptURL":{Ie=b.createScriptURL(Ie);break}}if(Ie!==ro)try{Xe?S.setAttributeNS(Xe,ve,Ie):S.setAttribute(ve,Ie),no(S)?Tt(S):aa(t.removed)}catch{an(ve,S)}}Ot(I.afterSanitizeAttributes,S,null)},Rm=function J(S){let j=null;const Q=Ll(S);for(Ot(I.beforeSanitizeShadowDOM,S,null);j=Q.nextNode();)Ot(I.uponSanitizeShadowNode,j,null),Ol(j),Vl(j),j.content instanceof r&&J(j.content);Ot(I.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(J){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=null,Q=null,ge=null,Be=null;if(Ji=!J,Ji&&(J="<!-->"),typeof J!="string"&&!Il(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw Gn("dirty is not a string, aborting")}else throw Gn("toString is not a function");if(!t.isSupported)return J;if(Nn||to(S),t.removed=[],typeof J=="string"&&(Er=!1),Er){if(J.nodeName){const Pt=Ce(J.nodeName);if(!te[Pt]||W[Pt])throw Gn("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof s)j=Nl("<!---->"),Q=j.ownerDocument.importNode(J,!0),Q.nodeType===qn.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?j=Q:j.appendChild(Q);else{if(!Lt&&!Te&&!Me&&J.indexOf("<")===-1)return b&&Tu?b.createHTML(J):J;if(j=Nl(J),!j)return Lt?null:Tu?w:""}j&&Xt&&Tt(j.firstChild);const ve=Ll(Er?J:j);for(;ge=ve.nextNode();)Ol(ge),Vl(ge),ge.content instanceof r&&Rm(ge.content);if(Er)return J;if(Lt){if(Du)for(Be=_.call(j.ownerDocument);j.firstChild;)Be.appendChild(j.firstChild);else Be=j;return(V.shadowroot||V.shadowrootmode)&&(Be=M.call(u,Be,!0)),Be}let Xe=Me?j.outerHTML:j.innerHTML;return Me&&te["!doctype"]&&j.ownerDocument&&j.ownerDocument.doctype&&j.ownerDocument.doctype.name&&je(ha,j.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+j.ownerDocument.doctype.name+`>
17
- `+Xe),Te&&Hr([B,D,H],Pt=>{Xe=Wn(Xe,Pt," ")}),b&&Tu?b.createHTML(Xe):Xe},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};to(J),Nn=!0},t.clearConfig=function(){On=null,Nn=!1},t.isValidAttribute=function(J,S,j){On||to({});const Q=Ce(J),ge=Ce(S);return Pl(Q,ge,j)},t.addHook=function(J,S){typeof S=="function"&&Un(I[J],S)},t.removeHook=function(J,S){if(S!==void 0){const j=Wd(I[J],S);return j===-1?void 0:Gd(I[J],j,1)[0]}return aa(I[J])},t.removeHooks=function(J){I[J]=[]},t.removeAllHooks=function(){I=pa()},t}var cf=ga();const ba={content:{type:Object,required:!0}},df=new Ze({html:!0,linkify:!0});function ff(e){let t=e;return t=t.replace(/([\u2026\u3001\u3002\uff0c\uff1a\uff1b\uff1f\uff01)】」』]|[;:,.!?(\[\]])[\t ]*(#{2,6}\s+)/g,`$1
11
+ `},xt.text=function(e,t){return Bt(e[t].content)},xt.html_block=function(e,t){return e[t].content},xt.html_inline=function(e,t){return e[t].content};function dn(){this.rules=Ir({},xt)}dn.prototype.renderAttrs=function(t){let n,u,o;if(!t.attrs)return"";for(o="",n=0,u=t.attrs.length;n<u;n++)o+=" "+Bt(t.attrs[n][0])+'="'+Bt(t.attrs[n][1])+'"';return o},dn.prototype.renderToken=function(t,n,u){const o=t[n];let r="";if(o.hidden)return"";o.block&&o.nesting!==-1&&n&&t[n-1].hidden&&(r+=`
12
+ `),r+=(o.nesting===-1?"</":"<")+o.tag,r+=this.renderAttrs(o),o.nesting===0&&u.xhtmlOut&&(r+=" /");let a=!1;if(o.block&&(a=!0,o.nesting===1&&n+1<t.length)){const s=t[n+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===o.tag)&&(a=!1)}return r+=a?`>
13
+ `:">",r},dn.prototype.renderInline=function(e,t,n){let u="";const o=this.rules;for(let r=0,a=e.length;r<a;r++){const s=e[r].type;typeof o[s]<"u"?u+=o[s](e,r,t,n,this):u+=this.renderToken(e,r,t)}return u},dn.prototype.renderInlineAsText=function(e,t,n){let u="";for(let o=0,r=e.length;o<r;o++)switch(e[o].type){case"text":u+=e[o].content;break;case"image":u+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":u+=e[o].content;break;case"softbreak":case"hardbreak":u+=`
14
+ `;break}return u},dn.prototype.render=function(e,t,n){let u="";const o=this.rules;for(let r=0,a=e.length;r<a;r++){const s=e[r].type;s==="inline"?u+=this.renderInline(e[r].children,t,n):typeof o[s]<"u"?u+=o[s](e,r,t,n,this):u+=this.renderToken(e,r,t,n)}return u};function We(){this.__rules__=[],this.__cache__=null}We.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},We.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(u){t.indexOf(u)<0&&t.push(u)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(u){u.enabled&&(n&&u.alt.indexOf(n)<0||e.__cache__[n].push(u.fn))})})},We.prototype.at=function(e,t,n){const u=this.__find__(e),o=n||{};if(u===-1)throw new Error("Parser rule not found: "+e);this.__rules__[u].fn=t,this.__rules__[u].alt=o.alt||[],this.__cache__=null},We.prototype.before=function(e,t,n,u){const o=this.__find__(e),r=u||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null},We.prototype.after=function(e,t,n,u){const o=this.__find__(e),r=u||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:r.alt||[]}),this.__cache__=null},We.prototype.push=function(e,t,n){const u=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:u.alt||[]}),this.__cache__=null},We.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const o=this.__find__(u);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[o].enabled=!0,n.push(u)},this),this.__cache__=null,n},We.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},We.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(u){const o=this.__find__(u);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[o].enabled=!1,n.push(u)},this),this.__cache__=null,n},We.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function st(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}st.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let u=0,o=n.length;u<o;u++)if(n[u][0]===t)return u;return-1},st.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},st.prototype.attrSet=function(t,n){const u=this.attrIndex(t),o=[t,n];u<0?this.attrPush(o):this.attrs[u]=o},st.prototype.attrGet=function(t){const n=this.attrIndex(t);let u=null;return n>=0&&(u=this.attrs[n][1]),u},st.prototype.attrJoin=function(t,n){const u=this.attrIndex(t);u<0?this.attrPush([t,n]):this.attrs[u][1]=this.attrs[u][1]+" "+n};function Ni(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Ni.prototype.Token=st;const r0=/\r\n?|\n/g,u0=/\0/g;function o0(e){let t;t=e.src.replace(r0,`
15
+ `),t=t.replace(u0,"�"),e.src=t}function i0(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function a0(e){const t=e.tokens;for(let n=0,u=t.length;n<u;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function s0(e){return/^<a[>\s]/i.test(e)}function c0(e){return/^<\/a\s*>/i.test(e)}function l0(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,u=t.length;n<u;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let o=t[n].children,r=0;for(let a=o.length-1;a>=0;a--){const s=o[a];if(s.type==="link_close"){for(a--;o[a].level!==s.level&&o[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(s0(s.content)&&r>0&&r--,c0(s.content)&&r++),!(r>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const c=s.content;let d=e.md.linkify.match(c);const f=[];let l=s.level,h=0;d.length>0&&d[0].index===0&&a>0&&o[a-1].type==="text_special"&&(d=d.slice(1));for(let m=0;m<d.length;m++){const p=d[m].url,w=e.md.normalizeLink(p);if(!e.md.validateLink(w))continue;let x=d[m].text;d[m].schema?d[m].schema==="mailto:"&&!/^mailto:/i.test(x)?x=e.md.normalizeLinkText("mailto:"+x).replace(/^mailto:/,""):x=e.md.normalizeLinkText(x):x=e.md.normalizeLinkText("http://"+x).replace(/^http:\/\//,"");const A=d[m].index;if(A>h){const k=new e.Token("text","",0);k.content=c.slice(h,A),k.level=l,f.push(k)}const b=new e.Token("link_open","a",1);b.attrs=[["href",w]],b.level=l++,b.markup="linkify",b.info="auto",f.push(b);const g=new e.Token("text","",0);g.content=x,g.level=l,f.push(g);const y=new e.Token("link_close","a",-1);y.level=--l,y.markup="linkify",y.info="auto",f.push(y),h=d[m].lastIndex}if(h<c.length){const m=new e.Token("text","",0);m.content=c.slice(h),m.level=l,f.push(m)}t[n].children=o=Di(o,a,f)}}}}const Li=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,d0=/\((c|tm|r)\)/i,f0=/\((c|tm|r)\)/ig,h0={c:"©",r:"®",tm:"™"};function p0(e,t){return h0[t.toLowerCase()]}function m0(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&(u.content=u.content.replace(f0,p0)),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function g0(e){let t=0;for(let n=e.length-1;n>=0;n--){const u=e[n];u.type==="text"&&!t&&Li.test(u.content)&&(u.content=u.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),u.type==="link_open"&&u.info==="auto"&&t--,u.type==="link_close"&&u.info==="auto"&&t++}}function b0(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(d0.test(e.tokens[t].content)&&m0(e.tokens[t].children),Li.test(e.tokens[t].content)&&g0(e.tokens[t].children))}const y0=/['"]/,Ii=/['"]/g,Oi="’";function Rr(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function x0(e,t){let n;const u=[];for(let o=0;o<e.length;o++){const r=e[o],a=e[o].level;for(n=u.length-1;n>=0&&!(u[n].level<=a);n--);if(u.length=n+1,r.type!=="text")continue;let s=r.content,c=0,d=s.length;e:for(;c<d;){Ii.lastIndex=c;const f=Ii.exec(s);if(!f)break;let l=!0,h=!0;c=f.index+1;const m=f[0]==="'";let p=32;if(f.index-1>=0)p=s.charCodeAt(f.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let w=32;if(c<d)w=s.charCodeAt(c);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){w=e[n].content.charCodeAt(0);break}const x=zn(p)||Bn(String.fromCharCode(p)),A=zn(w)||Bn(String.fromCharCode(w)),b=Mn(p),g=Mn(w);if(g?l=!1:A&&(b||x||(l=!1)),b?h=!1:x&&(g||A||(h=!1)),w===34&&f[0]==='"'&&p>=48&&p<=57&&(h=l=!1),l&&h&&(l=x,h=A),!l&&!h){m&&(r.content=Rr(r.content,f.index,Oi));continue}if(h)for(n=u.length-1;n>=0;n--){let y=u[n];if(u[n].level<a)break;if(y.single===m&&u[n].level===a){y=u[n];let k,T;m?(k=t.md.options.quotes[2],T=t.md.options.quotes[3]):(k=t.md.options.quotes[0],T=t.md.options.quotes[1]),r.content=Rr(r.content,f.index,T),e[y.token].content=Rr(e[y.token].content,y.pos,k),c+=T.length-1,y.token===o&&(c+=k.length-1),s=r.content,d=s.length,u.length=n;continue e}}l?u.push({token:o,pos:f.index,single:m,level:a}):h&&m&&(r.content=Rr(r.content,f.index,Oi))}}}function w0(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!y0.test(e.tokens[t].content)||x0(e.tokens[t].children,e)}function v0(e){let t,n;const u=e.tokens,o=u.length;for(let r=0;r<o;r++){if(u[r].type!=="inline")continue;const a=u[r].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const Xu=[["normalize",o0],["block",i0],["inline",a0],["linkify",l0],["replacements",b0],["smartquotes",w0],["text_join",v0]];function Zu(){this.ruler=new We;for(let e=0;e<Xu.length;e++)this.ruler.push(Xu[e][0],Xu[e][1])}Zu.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,u=t.length;n<u;n++)t[n](e)},Zu.prototype.State=Ni;function wt(e,t,n,u){this.src=e,this.md=t,this.env=n,this.tokens=u,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const o=this.src;for(let r=0,a=0,s=0,c=0,d=o.length,f=!1;a<d;a++){const l=o.charCodeAt(a);if(!f)if(le(l)){s++,l===9?c+=4-c%4:c++;continue}else f=!0;(l===10||a===d-1)&&(l!==10&&a++,this.bMarks.push(r),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(c),this.bsCount.push(0),f=!1,s=0,c=0,r=a+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}wt.prototype.push=function(e,t,n){const u=new st(e,t,n);return u.block=!0,n<0&&this.level--,u.level=this.level,n>0&&this.level++,this.tokens.push(u),u},wt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},wt.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},wt.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const u=this.src.charCodeAt(t);if(!le(u))break}return t},wt.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!le(this.src.charCodeAt(--t)))return t+1;return t},wt.prototype.skipChars=function(t,n){for(let u=this.src.length;t<u&&this.src.charCodeAt(t)===n;t++);return t},wt.prototype.skipCharsBack=function(t,n,u){if(t<=u)return t;for(;t>u;)if(n!==this.src.charCodeAt(--t))return t+1;return t},wt.prototype.getLines=function(t,n,u,o){if(t>=n)return"";const r=new Array(n-t);for(let a=0,s=t;s<n;s++,a++){let c=0;const d=this.bMarks[s];let f=d,l;for(s+1<n||o?l=this.eMarks[s]+1:l=this.eMarks[s];f<l&&c<u;){const h=this.src.charCodeAt(f);if(le(h))h===9?c+=4-(c+this.bsCount[s])%4:c++;else if(f-d<this.tShift[s])c++;else break;f++}c>u?r[a]=new Array(c-u+1).join(" ")+this.src.slice(f,l):r[a]=this.src.slice(f,l)}return r.join("")},wt.prototype.Token=st;const A0=65536;function Yu(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];return e.src.slice(n,u)}function Pi(e){const t=[],n=e.length;let u=0,o=e.charCodeAt(u),r=!1,a=0,s="";for(;u<n;)o===124&&(r?(s+=e.substring(a,u-1),a=u):(t.push(s+e.substring(a,u)),s="",a=u+1)),r=o===92,u++,o=e.charCodeAt(u);return t.push(s+e.substring(a)),t}function k0(e,t,n,u){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let r=e.bMarks[o]+e.tShift[o];if(r>=e.eMarks[o])return!1;const a=e.src.charCodeAt(r++);if(a!==124&&a!==45&&a!==58||r>=e.eMarks[o])return!1;const s=e.src.charCodeAt(r++);if(s!==124&&s!==45&&s!==58&&!le(s)||a===45&&le(s))return!1;for(;r<e.eMarks[o];){const y=e.src.charCodeAt(r);if(y!==124&&y!==45&&y!==58&&!le(y))return!1;r++}let c=Yu(e,t+1),d=c.split("|");const f=[];for(let y=0;y<d.length;y++){const k=d[y].trim();if(!k){if(y===0||y===d.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?f.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?f.push("left"):f.push("")}if(c=Yu(e,t).trim(),c.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;d=Pi(c),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop();const l=d.length;if(l===0||l!==f.length)return!1;if(u)return!0;const h=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),w=[t,0];p.map=w;const x=e.push("thead_open","thead",1);x.map=[t,t+1];const A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let y=0;y<d.length;y++){const k=e.push("th_open","th",1);f[y]&&(k.attrs=[["style","text-align:"+f[y]]]);const T=e.push("inline","",0);T.content=d[y].trim(),T.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,g=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let y=!1;for(let T=0,D=m.length;T<D;T++)if(m[T](e,o,n,!0)){y=!0;break}if(y||(c=Yu(e,o).trim(),!c)||e.sCount[o]-e.blkIndent>=4||(d=Pi(c),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),g+=l-d.length,g>A0))break;if(o===t+2){const T=e.push("tbody_open","tbody",1);T.map=b=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[o,o+1];for(let T=0;T<l;T++){const D=e.push("td_open","td",1);f[T]&&(D.attrs=[["style","text-align:"+f[T]]]);const F=e.push("inline","",0);F.content=d[T]?d[T].trim():"",F.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=o),e.push("table_close","table",-1),w[1]=o,e.parentType=h,e.line=o,!0}function C0(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let u=t+1,o=u;for(;u<n;){if(e.isEmpty(u)){u++;continue}if(e.sCount[u]-e.blkIndent>=4){u++,o=u;continue}break}e.line=o;const r=e.push("code_block","code",0);return r.content=e.getLines(t,o,4+e.blkIndent,!1)+`
16
+ `,r.map=[t,e.line],!0}function _0(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>r)return!1;const a=e.src.charCodeAt(o);if(a!==126&&a!==96)return!1;let s=o;o=e.skipChars(o,a);let c=o-s;if(c<3)return!1;const d=e.src.slice(s,o),f=e.src.slice(o,r);if(a===96&&f.indexOf(String.fromCharCode(a))>=0)return!1;if(u)return!0;let l=t,h=!1;for(;l++,!(l>=n||(o=s=e.bMarks[l]+e.tShift[l],r=e.eMarks[l],o<r&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(o)===a&&!(e.sCount[l]-e.blkIndent>=4)&&(o=e.skipChars(o,a),!(o-s<c)&&(o=e.skipSpaces(o),!(o<r)))){h=!0;break}c=e.sCount[t],e.line=l+(h?1:0);const m=e.push("fence","code",0);return m.info=f,m.content=e.getLines(t+1,l,c,!0),m.markup=d,m.map=[t,e.line],!0}function E0(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(u)return!0;const s=[],c=[],d=[],f=[],l=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m=!1,p;for(p=t;p<n;p++){const g=e.sCount[p]<e.blkIndent;if(o=e.bMarks[p]+e.tShift[p],r=e.eMarks[p],o>=r)break;if(e.src.charCodeAt(o++)===62&&!g){let k=e.sCount[p]+1,T,D;e.src.charCodeAt(o)===32?(o++,k++,D=!1,T=!0):e.src.charCodeAt(o)===9?(T=!0,(e.bsCount[p]+k)%4===3?(o++,k++,D=!1):D=!0):T=!1;let F=k;for(s.push(e.bMarks[p]),e.bMarks[p]=o;o<r;){const U=e.src.charCodeAt(o);if(le(U))U===9?F+=4-(F+e.bsCount[p]+(D?1:0))%4:F++;else break;o++}m=o>=r,c.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(T?1:0),d.push(e.sCount[p]),e.sCount[p]=F-k,f.push(e.tShift[p]),e.tShift[p]=o-e.bMarks[p];continue}if(m)break;let y=!1;for(let k=0,T=l.length;k<T;k++)if(l[k](e,p,n,!0)){y=!0;break}if(y){e.lineMax=p,e.blkIndent!==0&&(s.push(e.bMarks[p]),c.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}s.push(e.bMarks[p]),c.push(e.bsCount[p]),f.push(e.tShift[p]),d.push(e.sCount[p]),e.sCount[p]=-1}const w=e.blkIndent;e.blkIndent=0;const x=e.push("blockquote_open","blockquote",1);x.markup=">";const A=[t,0];x.map=A,e.md.block.tokenize(e,t,p);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=a,e.parentType=h,A[1]=e.line;for(let g=0;g<f.length;g++)e.bMarks[g+t]=s[g],e.tShift[g+t]=f[g],e.sCount[g+t]=d[g],e.bsCount[g+t]=c[g];return e.blkIndent=w,!0}function S0(e,t,n,u){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(r++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;r<o;){const d=e.src.charCodeAt(r++);if(d!==a&&!le(d))return!1;d===a&&s++}if(s<3)return!1;if(u)return!0;e.line=t+1;const c=e.push("hr","hr",0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(a)),!0}function Ri(e,t){const n=e.eMarks[t];let u=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(u++);if(o!==42&&o!==45&&o!==43)return-1;if(u<n){const r=e.src.charCodeAt(u);if(!le(r))return-1}return u}function Vi(e,t){const n=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];let o=n;if(o+1>=u)return-1;let r=e.src.charCodeAt(o++);if(r<48||r>57)return-1;for(;;){if(o>=u)return-1;if(r=e.src.charCodeAt(o++),r>=48&&r<=57){if(o-n>=10)return-1;continue}if(r===41||r===46)break;return-1}return o<u&&(r=e.src.charCodeAt(o),!le(r))?-1:o}function F0(e,t){const n=e.level+2;for(let u=t+2,o=e.tokens.length-2;u<o;u++)e.tokens[u].level===n&&e.tokens[u].type==="paragraph_open"&&(e.tokens[u+2].hidden=!0,e.tokens[u].hidden=!0,u+=2)}function D0(e,t,n,u){let o,r,a,s,c=t,d=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let f=!1;u&&e.parentType==="paragraph"&&e.sCount[c]>=e.blkIndent&&(f=!0);let l,h,m;if((m=Vi(e,c))>=0){if(l=!0,a=e.bMarks[c]+e.tShift[c],h=Number(e.src.slice(a,m-1)),f&&h!==1)return!1}else if((m=Ri(e,c))>=0)l=!1;else return!1;if(f&&e.skipSpaces(m)>=e.eMarks[c])return!1;if(u)return!0;const p=e.src.charCodeAt(m-1),w=e.tokens.length;l?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const x=[c,0];s.map=x,s.markup=String.fromCharCode(p);let A=!1;const b=e.md.block.ruler.getRules("list"),g=e.parentType;for(e.parentType="list";c<n;){r=m,o=e.eMarks[c];const y=e.sCount[c]+m-(e.bMarks[c]+e.tShift[c]);let k=y;for(;r<o;){const R=e.src.charCodeAt(r);if(R===9)k+=4-(k+e.bsCount[c])%4;else if(R===32)k++;else break;r++}const T=r;let D;T>=o?D=1:D=k-y,D>4&&(D=1);const F=y+D;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(p);const U=[c,0];s.map=U,l&&(s.info=e.src.slice(a,m-1));const _=e.tight,N=e.tShift[c],L=e.sCount[c],C=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=F,e.tight=!0,e.tShift[c]=T-e.bMarks[c],e.sCount[c]=k,T>=o&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||A)&&(d=!1),A=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=C,e.tShift[c]=N,e.sCount[c]=L,e.tight=_,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(p),c=e.line,U[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let P=!1;for(let R=0,E=b.length;R<E;R++)if(b[R](e,c,n,!0)){P=!0;break}if(P)break;if(l){if(m=Vi(e,c),m<0)break;a=e.bMarks[c]+e.tShift[c]}else if(m=Ri(e,c),m<0)break;if(p!==e.src.charCodeAt(m-1))break}return l?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(p),x[1]=c,e.line=c,e.parentType=g,d&&F0(e,w),!0}function T0(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function s(b){const g=e.lineMax;if(b>=g||e.isEmpty(b))return null;let y=!1;if(e.sCount[b]-e.blkIndent>3&&(y=!0),e.sCount[b]<0&&(y=!0),!y){const D=e.md.block.ruler.getRules("reference"),F=e.parentType;e.parentType="reference";let U=!1;for(let _=0,N=D.length;_<N;_++)if(D[_](e,b,g,!0)){U=!0;break}if(e.parentType=F,U)return null}const k=e.bMarks[b]+e.tShift[b],T=e.eMarks[b];return e.src.slice(k,T+1)}let c=e.src.slice(o,r+1);r=c.length;let d=-1;for(o=1;o<r;o++){const b=c.charCodeAt(o);if(b===91)return!1;if(b===93){d=o;break}else if(b===10){const g=s(a);g!==null&&(c+=g,r=c.length,a++)}else if(b===92&&(o++,o<r&&c.charCodeAt(o)===10)){const g=s(a);g!==null&&(c+=g,r=c.length,a++)}}if(d<0||c.charCodeAt(d+1)!==58)return!1;for(o=d+2;o<r;o++){const b=c.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(c+=g,r=c.length,a++)}else if(!le(b))break}const f=e.md.helpers.parseLinkDestination(c,o,r);if(!f.ok)return!1;const l=e.md.normalizeLink(f.str);if(!e.md.validateLink(l))return!1;o=f.pos;const h=o,m=a,p=o;for(;o<r;o++){const b=c.charCodeAt(o);if(b===10){const g=s(a);g!==null&&(c+=g,r=c.length,a++)}else if(!le(b))break}let w=e.md.helpers.parseLinkTitle(c,o,r);for(;w.can_continue;){const b=s(a);if(b===null)break;c+=b,o=r,r=c.length,a++,w=e.md.helpers.parseLinkTitle(c,o,r,w)}let x;for(o<r&&p!==o&&w.ok?(x=w.str,o=w.pos):(x="",o=h,a=m);o<r;){const b=c.charCodeAt(o);if(!le(b))break;o++}if(o<r&&c.charCodeAt(o)!==10&&x)for(x="",o=h,a=m;o<r;){const b=c.charCodeAt(o);if(!le(b))break;o++}if(o<r&&c.charCodeAt(o)!==10)return!1;const A=Pr(c.slice(1,d));return A?(u||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[A]>"u"&&(e.env.references[A]={title:x,href:l}),e.line=a),!0):!1}const N0=["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"],L0="[a-zA-Z_:][a-zA-Z0-9:._-]*",I0="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Mi="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+L0+"(?:\\s*=\\s*"+I0+")?)")+"*\\s*\\/?>",Bi="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",O0="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",P0="<[?][\\s\\S]*?[?]>",R0="<![A-Za-z][^>]*>",V0="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",M0=new RegExp("^(?:"+Mi+"|"+Bi+"|"+O0+"|"+P0+"|"+R0+"|"+V0+")"),B0=new RegExp("^(?:"+Mi+"|"+Bi+")"),fn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+N0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(B0.source+"\\s*$"),/^$/,!1]];function z0(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let a=e.src.slice(o,r),s=0;for(;s<fn.length&&!fn[s][0].test(a);s++);if(s===fn.length)return!1;if(u)return fn[s][2];let c=t+1;if(!fn[s][1].test(a)){for(;c<n&&!(e.sCount[c]<e.blkIndent);c++)if(o=e.bMarks[c]+e.tShift[c],r=e.eMarks[c],a=e.src.slice(o,r),fn[s][1].test(a)){a.length!==0&&c++;break}}e.line=c;const d=e.push("html_block","",0);return d.map=[t,c],d.content=e.getLines(t,c,e.blkIndent,!0),!0}function j0(e,t,n,u){let o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(o);if(a!==35||o>=r)return!1;let s=1;for(a=e.src.charCodeAt(++o);a===35&&o<r&&s<=6;)s++,a=e.src.charCodeAt(++o);if(s>6||o<r&&!le(a))return!1;if(u)return!0;r=e.skipSpacesBack(r,o);const c=e.skipCharsBack(r,35,o);c>o&&le(e.src.charCodeAt(c-1))&&(r=c),e.line=t+1;const d=e.push("heading_open","h"+String(s),1);d.markup="########".slice(0,s),d.map=[t,e.line];const f=e.push("inline","",0);f.content=e.src.slice(o,r).trim(),f.map=[t,e.line],f.children=[];const l=e.push("heading_close","h"+String(s),-1);return l.markup="########".slice(0,s),!0}function H0(e,t,n){const u=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let r=0,a,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let m=e.bMarks[s]+e.tShift[s];const p=e.eMarks[s];if(m<p&&(a=e.src.charCodeAt(m),(a===45||a===61)&&(m=e.skipChars(m,a),m=e.skipSpaces(m),m>=p))){r=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let m=0,p=u.length;m<p;m++)if(u[m](e,s,n,!0)){h=!0;break}if(h)break}if(!r)return!1;const c=e.getLines(t,s,e.blkIndent,!1).trim();e.line=s+1;const d=e.push("heading_open","h"+String(r),1);d.markup=String.fromCharCode(a),d.map=[t,e.line];const f=e.push("inline","",0);f.content=c,f.map=[t,e.line-1],f.children=[];const l=e.push("heading_close","h"+String(r),-1);return l.markup=String.fromCharCode(a),e.parentType=o,!0}function $0(e,t,n){const u=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let r=t+1;for(e.parentType="paragraph";r<n&&!e.isEmpty(r);r++){if(e.sCount[r]-e.blkIndent>3||e.sCount[r]<0)continue;let d=!1;for(let f=0,l=u.length;f<l;f++)if(u[f](e,r,n,!0)){d=!0;break}if(d)break}const a=e.getLines(t,r,e.blkIndent,!1).trim();e.line=r;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const c=e.push("inline","",0);return c.content=a,c.map=[t,e.line],c.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}const Vr=[["table",k0,["paragraph","reference"]],["code",C0],["fence",_0,["paragraph","reference","blockquote","list"]],["blockquote",E0,["paragraph","reference","blockquote","list"]],["hr",S0,["paragraph","reference","blockquote","list"]],["list",D0,["paragraph","reference","blockquote"]],["reference",T0],["html_block",z0,["paragraph","reference","blockquote"]],["heading",j0,["paragraph","reference","blockquote"]],["lheading",H0],["paragraph",$0]];function Mr(){this.ruler=new We;for(let e=0;e<Vr.length;e++)this.ruler.push(Vr[e][0],Vr[e][1],{alt:(Vr[e][2]||[]).slice()})}Mr.prototype.tokenize=function(e,t,n){const u=this.ruler.getRules(""),o=u.length,r=e.md.options.maxNesting;let a=t,s=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=r){e.line=n;break}const c=e.line;let d=!1;for(let f=0;f<o;f++)if(d=u[f](e,a,n,!1),d){if(c>=e.line)throw new Error("block rule didn't increment state.line");break}if(!d)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},Mr.prototype.parse=function(e,t,n,u){if(!e)return;const o=new this.State(e,t,n,u);this.tokenize(o,o.line,o.lineMax)},Mr.prototype.State=wt;function jn(e,t,n,u){this.src=e,this.env=n,this.md=t,this.tokens=u,this.tokens_meta=Array(u.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}jn.prototype.pushPending=function(){const e=new st("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},jn.prototype.push=function(e,t,n){this.pending&&this.pushPending();const u=new st(e,t,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(o),u},jn.prototype.scanDelims=function(e,t){const n=this.posMax,u=this.src.charCodeAt(e),o=e>0?this.src.charCodeAt(e-1):32;let r=e;for(;r<n&&this.src.charCodeAt(r)===u;)r++;const a=r-e,s=r<n?this.src.charCodeAt(r):32,c=zn(o)||Bn(String.fromCharCode(o)),d=zn(s)||Bn(String.fromCharCode(s)),f=Mn(o),l=Mn(s),h=!l&&(!d||f||c),m=!f&&(!c||l||d);return{can_open:h&&(t||!m||c),can_close:m&&(t||!h||d),length:a}},jn.prototype.Token=st;function U0(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function W0(e,t){let n=e.pos;for(;n<e.posMax&&!U0(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const G0=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function q0(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,u=e.posMax;if(n+3>u||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(G0);if(!o)return!1;const r=o[1],a=e.md.linkify.matchAtStart(e.src.slice(n-r.length));if(!a)return!1;let s=a.url;if(s.length<=r.length)return!1;let c=s.length;for(;c>0&&s.charCodeAt(c-1)===42;)c--;c!==s.length&&(s=s.slice(0,c));const d=e.md.normalizeLink(s);if(!e.md.validateLink(d))return!1;if(!t){e.pending=e.pending.slice(0,-r.length);const f=e.push("link_open","a",1);f.attrs=[["href",d]],f.markup="linkify",f.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-r.length,!0}function X0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const u=e.pending.length-1,o=e.posMax;if(!t)if(u>=0&&e.pending.charCodeAt(u)===32)if(u>=1&&e.pending.charCodeAt(u-1)===32){let r=u-1;for(;r>=1&&e.pending.charCodeAt(r-1)===32;)r--;e.pending=e.pending.slice(0,r),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&le(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Ku=[];for(let e=0;e<256;e++)Ku.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Ku[e.charCodeAt(0)]=1});function Z0(e,t){let n=e.pos;const u=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=u))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<u&&(o=e.src.charCodeAt(n),!!le(o));)n++;return e.pos=n,!0}let r=e.src[n];if(o>=55296&&o<=56319&&n+1<u){const s=e.src.charCodeAt(n+1);s>=56320&&s<=57343&&(r+=e.src[n+1],n++)}const a="\\"+r;if(!t){const s=e.push("text_special","",0);o<256&&Ku[o]!==0?s.content=r:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Y0(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const o=n;n++;const r=e.posMax;for(;n<r&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(o,n),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=o)return t||(e.pending+=a),e.pos+=s,!0;let c=n,d;for(;(d=e.src.indexOf("`",c))!==-1;){for(c=d+1;c<r&&e.src.charCodeAt(c)===96;)c++;const f=c-d;if(f===s){if(!t){const l=e.push("code_inline","code",0);l.markup=a,l.content=e.src.slice(n,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=c,!0}e.backticks[f]=d}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function K0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==126)return!1;const o=e.scanDelims(e.pos,!0);let r=o.length;const a=String.fromCharCode(u);if(r<2)return!1;let s;r%2&&(s=e.push("text","",0),s.content=a,r--);for(let c=0;c<r;c+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:u,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function zi(e,t){let n;const u=[],o=t.length;for(let r=0;r<o;r++){const a=t[r];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&u.push(s.token-1)}for(;u.length;){const r=u.pop();let a=r+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,r!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[r],e.tokens[r]=n)}}function Q0(e){const t=e.tokens_meta,n=e.tokens_meta.length;zi(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&zi(e,t[u].delimiters)}const ji={tokenize:K0,postProcess:Q0};function J0(e,t){const n=e.pos,u=e.src.charCodeAt(n);if(t||u!==95&&u!==42)return!1;const o=e.scanDelims(e.pos,u===42);for(let r=0;r<o.length;r++){const a=e.push("text","",0);a.content=String.fromCharCode(u),e.delimiters.push({marker:u,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Hi(e,t){const n=t.length;for(let u=n-1;u>=0;u--){const o=t[u];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const r=t[o.end],a=u>0&&t[u-1].end===o.end+1&&t[u-1].marker===o.marker&&t[u-1].token===o.token-1&&t[o.end+1].token===r.token+1,s=String.fromCharCode(o.marker),c=e.tokens[o.token];c.type=a?"strong_open":"em_open",c.tag=a?"strong":"em",c.nesting=1,c.markup=a?s+s:s,c.content="";const d=e.tokens[r.token];d.type=a?"strong_close":"em_close",d.tag=a?"strong":"em",d.nesting=-1,d.markup=a?s+s:s,d.content="",a&&(e.tokens[t[u-1].token].content="",e.tokens[t[o.end+1].token].content="",u--)}}function ed(e){const t=e.tokens_meta,n=e.tokens_meta.length;Hi(e,e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Hi(e,t[u].delimiters)}const $i={tokenize:J0,postProcess:ed};function td(e,t){let n,u,o,r,a="",s="",c=e.pos,d=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,l=e.posMax,h=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let p=m+1;if(p<l&&e.src.charCodeAt(p)===40){for(d=!1,p++;p<l&&(n=e.src.charCodeAt(p),!(!le(n)&&n!==10));p++);if(p>=l)return!1;if(c=p,o=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),o.ok){for(a=e.md.normalizeLink(o.str),e.md.validateLink(a)?p=o.pos:a="",c=p;p<l&&(n=e.src.charCodeAt(p),!(!le(n)&&n!==10));p++);if(o=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<l&&c!==p&&o.ok)for(s=o.str,p=o.pos;p<l&&(n=e.src.charCodeAt(p),!(!le(n)&&n!==10));p++);}(p>=l||e.src.charCodeAt(p)!==41)&&(d=!0),p++}if(d){if(typeof e.env.references>"u")return!1;if(p<l&&e.src.charCodeAt(p)===91?(c=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?u=e.src.slice(c,p++):p=m+1):p=m+1,u||(u=e.src.slice(h,m)),r=e.env.references[Pr(u)],!r)return e.pos=f,!1;a=r.href,s=r.title}if(!t){e.pos=h,e.posMax=m;const w=e.push("link_open","a",1),x=[["href",a]];w.attrs=x,s&&x.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=l,!0}function nd(e,t){let n,u,o,r,a,s,c,d,f="";const l=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(r=p+1,r<h&&e.src.charCodeAt(r)===40){for(r++;r<h&&(n=e.src.charCodeAt(r),!(!le(n)&&n!==10));r++);if(r>=h)return!1;for(d=r,s=e.md.helpers.parseLinkDestination(e.src,r,e.posMax),s.ok&&(f=e.md.normalizeLink(s.str),e.md.validateLink(f)?r=s.pos:f=""),d=r;r<h&&(n=e.src.charCodeAt(r),!(!le(n)&&n!==10));r++);if(s=e.md.helpers.parseLinkTitle(e.src,r,e.posMax),r<h&&d!==r&&s.ok)for(c=s.str,r=s.pos;r<h&&(n=e.src.charCodeAt(r),!(!le(n)&&n!==10));r++);else c="";if(r>=h||e.src.charCodeAt(r)!==41)return e.pos=l,!1;r++}else{if(typeof e.env.references>"u")return!1;if(r<h&&e.src.charCodeAt(r)===91?(d=r+1,r=e.md.helpers.parseLinkLabel(e,r),r>=0?o=e.src.slice(d,r++):r=p+1):r=p+1,o||(o=e.src.slice(m,p)),a=e.env.references[Pr(o)],!a)return e.pos=l,!1;f=a.href,c=a.title}if(!t){u=e.src.slice(m,p);const w=[];e.md.inline.parse(u,e.md,e.env,w);const x=e.push("image","img",0),A=[["src",f],["alt",""]];x.attrs=A,x.children=w,x.content=u,c&&A.push(["title",c])}return e.pos=r,e.posMax=h,!0}const rd=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ud=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function od(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const u=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const r=e.src.slice(u+1,n);if(ud.test(r)){const a=e.md.normalizeLink(r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}if(rd.test(r)){const a=e.md.normalizeLink("mailto:"+r);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(r);const d=e.push("link_close","a",-1);d.markup="autolink",d.info="auto"}return e.pos+=r.length+2,!0}return!1}function id(e){return/^<a[>\s]/i.test(e)}function ad(e){return/^<\/a\s*>/i.test(e)}function sd(e){const t=e|32;return t>=97&&t<=122}function cd(e,t){if(!e.md.options.html)return!1;const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==60||u+2>=n)return!1;const o=e.src.charCodeAt(u+1);if(o!==33&&o!==63&&o!==47&&!sd(o))return!1;const r=e.src.slice(u).match(M0);if(!r)return!1;if(!t){const a=e.push("html_inline","",0);a.content=r[0],id(a.content)&&e.linkLevel++,ad(a.content)&&e.linkLevel--}return e.pos+=r[0].length,!0}const ld=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,dd=/^&([a-z][a-z0-9]{1,31});/i;function fd(e,t){const n=e.pos,u=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=u)return!1;if(e.src.charCodeAt(n+1)===35){const r=e.src.slice(n).match(ld);if(r){if(!t){const a=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),s=e.push("text_special","",0);s.content=qu(a)?Or(a):Or(65533),s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(dd);if(r){const a=Fi(r[0]);if(a!==r[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=r[0],s.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function Ui(e){const t={},n=e.length;if(!n)return;let u=0,o=-2;const r=[];for(let a=0;a<n;a++){const s=e[a];if(r.push(0),(e[u].marker!==s.marker||o!==s.token-1)&&(u=a),o=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const c=t[s.marker][(s.open?3:0)+s.length%3];let d=u-r[u]-1,f=d;for(;d>c;d-=r[d]+1){const l=e[d];if(l.marker===s.marker&&l.open&&l.end<0){let h=!1;if((l.close||s.open)&&(l.length+s.length)%3===0&&(l.length%3!==0||s.length%3!==0)&&(h=!0),!h){const m=d>0&&!e[d-1].open?r[d-1]+1:0;r[a]=a-d+m,r[d]=m,s.open=!1,l.end=a,l.close=!1,f=-1,o=-2;break}}}f!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=f)}}function hd(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ui(e.delimiters);for(let u=0;u<n;u++)t[u]&&t[u].delimiters&&Ui(t[u].delimiters)}function pd(e){let t,n,u=0;const o=e.tokens,r=e.tokens.length;for(t=n=0;t<r;t++)o[t].nesting<0&&u--,o[t].level=u,o[t].nesting>0&&u++,o[t].type==="text"&&t+1<r&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}const Qu=[["text",W0],["linkify",q0],["newline",X0],["escape",Z0],["backticks",Y0],["strikethrough",ji.tokenize],["emphasis",$i.tokenize],["link",td],["image",nd],["autolink",od],["html_inline",cd],["entity",fd]],Ju=[["balance_pairs",hd],["strikethrough",ji.postProcess],["emphasis",$i.postProcess],["fragments_join",pd]];function Hn(){this.ruler=new We;for(let e=0;e<Qu.length;e++)this.ruler.push(Qu[e][0],Qu[e][1]);this.ruler2=new We;for(let e=0;e<Ju.length;e++)this.ruler2.push(Ju[e][0],Ju[e][1])}Hn.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),u=n.length,o=e.md.options.maxNesting,r=e.cache;if(typeof r[t]<"u"){e.pos=r[t];return}let a=!1;if(e.level<o){for(let s=0;s<u;s++)if(e.level++,a=n[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,r[t]=e.pos},Hn.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,u=e.posMax,o=e.md.options.maxNesting;for(;e.pos<u;){const r=e.pos;let a=!1;if(e.level<o){for(let s=0;s<n;s++)if(a=t[s](e,!1),a){if(r>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=u)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Hn.prototype.parse=function(e,t,n,u){const o=new this.State(e,t,n,u);this.tokenize(o);const r=this.ruler2.getRules(""),a=r.length;for(let s=0;s<a;s++)r[s](o)},Hn.prototype.State=jn;function md(e){const t={};e=e||{},t.src_Any=ki.source,t.src_Cc=Ci.source,t.src_Z=Ei.source,t.src_P=$u.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function eo(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(u){e[u]=n[u]})}),e}function Br(e){return Object.prototype.toString.call(e)}function gd(e){return Br(e)==="[object String]"}function bd(e){return Br(e)==="[object Object]"}function yd(e){return Br(e)==="[object RegExp]"}function Wi(e){return Br(e)==="[object Function]"}function xd(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Gi={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function wd(e){return Object.keys(e||{}).reduce(function(t,n){return t||Gi.hasOwnProperty(n)},!1)}const vd={"http:":{validate:function(e,t,n){const u=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(u)?u.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const u=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(u)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:u.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const u=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(u)?u.match(n.re.mailto)[0].length:0}}},Ad="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",kd="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Cd(e){e.__index__=-1,e.__text_cache__=""}function _d(e){return function(t,n){const u=t.slice(n);return e.test(u)?u.match(e)[0].length:0}}function qi(){return function(e,t){t.normalize(e)}}function zr(e){const t=e.re=md(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Ad),n.push(t.src_xn),t.src_tlds=n.join("|");function u(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(u(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(u(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(u(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(u(t.tpl_host_fuzzy_test),"i");const o=[];e.__compiled__={};function r(s,c){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+c)}Object.keys(e.__schemas__).forEach(function(s){const c=e.__schemas__[s];if(c===null)return;const d={validate:null,link:null};if(e.__compiled__[s]=d,bd(c)){yd(c.validate)?d.validate=_d(c.validate):Wi(c.validate)?d.validate=c.validate:r(s,c),Wi(c.normalize)?d.normalize=c.normalize:c.normalize?r(s,c):d.normalize=qi();return}if(gd(c)){o.push(s);return}r(s,c)}),o.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:qi()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(xd).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Cd(e)}function Ed(e,t){const n=e.__index__,u=e.__last_index__,o=e.__text_cache__.slice(n,u);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=u+t,this.raw=o,this.text=o,this.url=o}function to(e,t){const n=new Ed(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Xe(e,t){if(!(this instanceof Xe))return new Xe(e,t);t||wd(e)&&(t=e,e={}),this.__opts__=eo({},Gi,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=eo({},vd,e),this.__compiled__={},this.__tlds__=kd,this.__tlds_replaced__=!1,this.re={},zr(this)}Xe.prototype.add=function(t,n){return this.__schemas__[t]=n,zr(this),this},Xe.prototype.set=function(t){return this.__opts__=eo(this.__opts__,t),this},Xe.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,u,o,r,a,s,c,d,f;if(this.re.schema_test.test(t)){for(c=this.re.schema_search,c.lastIndex=0;(n=c.exec(t))!==null;)if(r=this.testSchemaAt(t,n[2],c.lastIndex),r){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(d=t.search(this.re.host_fuzzy_test),d>=0&&(this.__index__<0||d<this.__index__)&&(u=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=u.index+u[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=u.index+u[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(f=t.indexOf("@"),f>=0&&(o=t.match(this.re.email_fuzzy))!==null&&(a=o.index+o[1].length,s=o.index+o[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0},Xe.prototype.pretest=function(t){return this.re.pretest.test(t)},Xe.prototype.testSchemaAt=function(t,n,u){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,u,this):0},Xe.prototype.match=function(t){const n=[];let u=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(to(this,u)),u=this.__last_index__);let o=u?t.slice(u):t;for(;this.test(o);)n.push(to(this,u)),o=o.slice(this.__last_index__),u+=this.__last_index__;return n.length?n:null},Xe.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const u=this.testSchemaAt(t,n[2],n[0].length);return u?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+u,to(this,0)):null},Xe.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(u,o,r){return u!==r[o-1]}).reverse(),zr(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,zr(this),this)},Xe.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},Xe.prototype.onCompile=function(){};const hn=2147483647,vt=36,no=1,$n=26,Sd=38,Fd=700,Xi=72,Zi=128,Yi="-",Dd=/^xn--/,Td=/[^\0-\x7F]/,Nd=/[\x2E\u3002\uFF0E\uFF61]/g,Ld={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ro=vt-no,At=Math.floor,uo=String.fromCharCode;function zt(e){throw new RangeError(Ld[e])}function Id(e,t){const n=[];let u=e.length;for(;u--;)n[u]=t(e[u]);return n}function Ki(e,t){const n=e.split("@");let u="";n.length>1&&(u=n[0]+"@",e=n[1]),e=e.replace(Nd,".");const o=e.split("."),r=Id(o,t).join(".");return u+r}function Qi(e){const t=[];let n=0;const u=e.length;for(;n<u;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<u){const r=e.charCodeAt(n++);(r&64512)==56320?t.push(((o&1023)<<10)+(r&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const Od=e=>String.fromCodePoint(...e),Pd=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:vt},Ji=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ea=function(e,t,n){let u=0;for(e=n?At(e/Fd):e>>1,e+=At(e/t);e>ro*$n>>1;u+=vt)e=At(e/ro);return At(u+(ro+1)*e/(e+Sd))},ta=function(e){const t=[],n=e.length;let u=0,o=Zi,r=Xi,a=e.lastIndexOf(Yi);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&zt("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<n;){const c=u;for(let f=1,l=vt;;l+=vt){s>=n&&zt("invalid-input");const h=Pd(e.charCodeAt(s++));h>=vt&&zt("invalid-input"),h>At((hn-u)/f)&&zt("overflow"),u+=h*f;const m=l<=r?no:l>=r+$n?$n:l-r;if(h<m)break;const p=vt-m;f>At(hn/p)&&zt("overflow"),f*=p}const d=t.length+1;r=ea(u-c,d,c==0),At(u/d)>hn-o&&zt("overflow"),o+=At(u/d),u%=d,t.splice(u++,0,o)}return String.fromCodePoint(...t)},na=function(e){const t=[];e=Qi(e);const n=e.length;let u=Zi,o=0,r=Xi;for(const c of e)c<128&&t.push(uo(c));const a=t.length;let s=a;for(a&&t.push(Yi);s<n;){let c=hn;for(const f of e)f>=u&&f<c&&(c=f);const d=s+1;c-u>At((hn-o)/d)&&zt("overflow"),o+=(c-u)*d,u=c;for(const f of e)if(f<u&&++o>hn&&zt("overflow"),f===u){let l=o;for(let h=vt;;h+=vt){const m=h<=r?no:h>=r+$n?$n:h-r;if(l<m)break;const p=l-m,w=vt-m;t.push(uo(Ji(m+p%w,0))),l=At(p/w)}t.push(uo(Ji(l,0))),r=ea(o,d,s===a),o=0,++s}++o,++u}return t.join("")},ra={version:"2.3.1",ucs2:{decode:Qi,encode:Od},decode:ta,encode:na,toASCII:function(e){return Ki(e,function(t){return Td.test(t)?"xn--"+na(t):t})},toUnicode:function(e){return Ki(e,function(t){return Dd.test(t)?ta(t.slice(4).toLowerCase()):t})}},Rd={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Vd=/^(vbscript|javascript|file|data):/,Md=/^data:image\/(gif|png|jpeg|webp);/;function Bd(e){const t=e.trim().toLowerCase();return Vd.test(t)?Md.test(t):!0}const ua=["http:","https:","mailto:"];function zd(e){const t=Hu(e,!0);if(t.hostname&&(!t.protocol||ua.indexOf(t.protocol)>=0))try{t.hostname=ra.toASCII(t.hostname)}catch{}return Vn(ju(t))}function jd(e){const t=Hu(e,!0);if(t.hostname&&(!t.protocol||ua.indexOf(t.protocol)>=0))try{t.hostname=ra.toUnicode(t.hostname)}catch{}return cn(ju(t),cn.defaultChars+"%")}function Ze(e,t){if(!(this instanceof Ze))return new Ze(e,t);t||Gu(e)||(t=e||{},e="default"),this.inline=new Hn,this.block=new Mr,this.core=new Zu,this.renderer=new dn,this.linkify=new Xe,this.validateLink=Bd,this.normalizeLink=zd,this.normalizeLinkText=jd,this.utils=Ql,this.helpers=Ir({},n0),this.options={},this.configure(e),t&&this.set(t)}Ze.prototype.set=function(e){return Ir(this.options,e),this},Ze.prototype.configure=function(e){const t=this;if(Gu(e)){const n=e;if(e=Rd[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Ze.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const u=e.filter(function(o){return n.indexOf(o)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+u);return this},Ze.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const u=e.filter(function(o){return n.indexOf(o)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+u);return this},Ze.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Ze.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Ze.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Ze.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Ze.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:oa,setPrototypeOf:ia,isFrozen:Hd,getPrototypeOf:$d,getOwnPropertyDescriptor:Ud}=Object;let{freeze:ze,seal:ut,create:jr}=Object,{apply:oo,construct:io}=typeof Reflect<"u"&&Reflect;ze||(ze=function(t){return t}),ut||(ut=function(t){return t}),oo||(oo=function(t,n){for(var u=arguments.length,o=new Array(u>2?u-2:0),r=2;r<u;r++)o[r-2]=arguments[r];return t.apply(n,o)}),io||(io=function(t){for(var n=arguments.length,u=new Array(n>1?n-1:0),o=1;o<n;o++)u[o-1]=arguments[o];return new t(...u)});const Hr=He(Array.prototype.forEach),Wd=He(Array.prototype.lastIndexOf),aa=He(Array.prototype.pop),Un=He(Array.prototype.push),Gd=He(Array.prototype.splice),$r=He(String.prototype.toLowerCase),ao=He(String.prototype.toString),so=He(String.prototype.match),Wn=He(String.prototype.replace),qd=He(String.prototype.indexOf),Xd=He(String.prototype.trim),Ye=He(Object.prototype.hasOwnProperty),je=He(RegExp.prototype.test),Gn=Zd(TypeError);function He(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,u=new Array(n>1?n-1:0),o=1;o<n;o++)u[o-1]=arguments[o];return oo(e,t,u)}}function Zd(e){return function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];return io(e,n)}}function oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$r;ia&&ia(e,null);let u=t.length;for(;u--;){let o=t[u];if(typeof o=="string"){const r=n(o);r!==o&&(Hd(t)||(t[u]=r),o=r)}e[o]=!0}return e}function Yd(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function kt(e){const t=jr(null);for(const[n,u]of oa(e))Ye(e,n)&&(Array.isArray(u)?t[n]=Yd(u):u&&typeof u=="object"&&u.constructor===Object?t[n]=kt(u):t[n]=u);return t}function qn(e,t){for(;e!==null;){const u=Ud(e,t);if(u){if(u.get)return He(u.get);if(typeof u.value=="function")return He(u.value)}e=$d(e)}function n(){return null}return n}const sa=ze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),co=ze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),lo=ze(["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"]),Kd=ze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fo=ze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Qd=ze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ca=ze(["#text"]),la=ze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ho=ze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),da=ze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ur=ze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Jd=ut(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ef=ut(/<%[\w\W]*|[\w\W]*%>/gm),tf=ut(/\$\{[\w\W]*/gm),nf=ut(/^data-[\-\w.\u00B7-\uFFFF]+$/),rf=ut(/^aria-[\-\w]+$/),fa=ut(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),uf=ut(/^(?:\w+script|data):/i),of=ut(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ha=ut(/^html$/i),af=ut(/^[a-z][.\w]*(-[.\w]+)+$/i);var pa=Object.freeze({__proto__:null,ARIA_ATTR:rf,ATTR_WHITESPACE:of,CUSTOM_ELEMENT:af,DATA_ATTR:nf,DOCTYPE_NAME:ha,ERB_EXPR:ef,IS_ALLOWED_URI:fa,IS_SCRIPT_OR_DATA:uf,MUSTACHE_EXPR:Jd,TMPLIT_EXPR:tf});const Xn={element:1,text:3,progressingInstruction:7,comment:8,document:9},sf=function(){return typeof window>"u"?null:window},cf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let u=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(u=n.getAttribute(o));const r="dompurify"+(u?"#"+u:"");try{return t.createPolicy(r,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},ma=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ga(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sf();const t=J=>ga(J);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Xn.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const u=n,o=u.currentScript,{DocumentFragment:r,HTMLTemplateElement:a,Node:s,Element:c,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:l,DOMParser:h,trustedTypes:m}=e,p=c.prototype,w=qn(p,"cloneNode"),x=qn(p,"remove"),A=qn(p,"nextSibling"),b=qn(p,"childNodes"),g=qn(p,"parentNode");if(typeof a=="function"){const J=n.createElement("template");J.content&&J.content.ownerDocument&&(n=J.content.ownerDocument)}let y,k="";const{implementation:T,createNodeIterator:D,createDocumentFragment:F,getElementsByTagName:U}=n,{importNode:_}=u;let N=ma();t.isSupported=typeof oa=="function"&&typeof g=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:C,TMPLIT_EXPR:P,DATA_ATTR:R,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:$}=pa;let{IS_ALLOWED_URI:re}=pa,te=null;const z=oe({},[...sa,...co,...lo,...fo,...ca]);let j=null;const I=oe({},[...la,...ho,...da,...Ur]);let B=Object.seal(jr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,K=null;const Z=Object.seal(jr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,ue=!0,ce=!1,De=!0,Te=!1,yt=!0,Me=!1,Nn=!1,qt=!1,It=!1,Du=!1,Tu=!1,kc=!0,Cc=!1;const Np="user-content-";let Ko=!0,_r=!1,Ln={},Dt=null;const Qo=oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let _c=null;const Ec=oe({},["audio","video","img","source","image","track"]);let Jo=null;const Sc=oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nu="http://www.w3.org/1998/Math/MathML",Lu="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml";let In=Ot,ei=!1,ti=null;const Lp=oe({},[Nu,Lu,Ot],ao);let Iu=oe({},["mi","mo","mn","ms","mtext"]),Ou=oe({},["annotation-xml"]);const Ip=oe({},["title","style","font","a","script"]);let Er=null;const Op=["application/xhtml+xml","text/html"],Pp="text/html";let Ce=null,On=null;const Rp=n.createElement("form"),Fc=function(S){return S instanceof RegExp||S instanceof Function},ni=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(On&&On===S)){if((!S||typeof S!="object")&&(S={}),S=kt(S),Er=Op.indexOf(S.PARSER_MEDIA_TYPE)===-1?Pp:S.PARSER_MEDIA_TYPE,Ce=Er==="application/xhtml+xml"?ao:$r,te=Ye(S,"ALLOWED_TAGS")?oe({},S.ALLOWED_TAGS,Ce):z,j=Ye(S,"ALLOWED_ATTR")?oe({},S.ALLOWED_ATTR,Ce):I,ti=Ye(S,"ALLOWED_NAMESPACES")?oe({},S.ALLOWED_NAMESPACES,ao):Lp,Jo=Ye(S,"ADD_URI_SAFE_ATTR")?oe(kt(Sc),S.ADD_URI_SAFE_ATTR,Ce):Sc,_c=Ye(S,"ADD_DATA_URI_TAGS")?oe(kt(Ec),S.ADD_DATA_URI_TAGS,Ce):Ec,Dt=Ye(S,"FORBID_CONTENTS")?oe({},S.FORBID_CONTENTS,Ce):Qo,W=Ye(S,"FORBID_TAGS")?oe({},S.FORBID_TAGS,Ce):kt({}),K=Ye(S,"FORBID_ATTR")?oe({},S.FORBID_ATTR,Ce):kt({}),Ln=Ye(S,"USE_PROFILES")?S.USE_PROFILES:!1,Y=S.ALLOW_ARIA_ATTR!==!1,ue=S.ALLOW_DATA_ATTR!==!1,ce=S.ALLOW_UNKNOWN_PROTOCOLS||!1,De=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=S.SAFE_FOR_TEMPLATES||!1,yt=S.SAFE_FOR_XML!==!1,Me=S.WHOLE_DOCUMENT||!1,It=S.RETURN_DOM||!1,Du=S.RETURN_DOM_FRAGMENT||!1,Tu=S.RETURN_TRUSTED_TYPE||!1,qt=S.FORCE_BODY||!1,kc=S.SANITIZE_DOM!==!1,Cc=S.SANITIZE_NAMED_PROPS||!1,Ko=S.KEEP_CONTENT!==!1,_r=S.IN_PLACE||!1,re=S.ALLOWED_URI_REGEXP||fa,In=S.NAMESPACE||Ot,Iu=S.MATHML_TEXT_INTEGRATION_POINTS||Iu,Ou=S.HTML_INTEGRATION_POINTS||Ou,B=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&Fc(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&Fc(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&(ue=!1),Du&&(It=!0),Ln&&(te=oe({},ca),j=jr(null),Ln.html===!0&&(oe(te,sa),oe(j,la)),Ln.svg===!0&&(oe(te,co),oe(j,ho),oe(j,Ur)),Ln.svgFilters===!0&&(oe(te,lo),oe(j,ho),oe(j,Ur)),Ln.mathMl===!0&&(oe(te,fo),oe(j,da),oe(j,Ur))),Ye(S,"ADD_TAGS")||(Z.tagCheck=null),Ye(S,"ADD_ATTR")||(Z.attributeCheck=null),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?Z.tagCheck=S.ADD_TAGS:(te===z&&(te=kt(te)),oe(te,S.ADD_TAGS,Ce))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?Z.attributeCheck=S.ADD_ATTR:(j===I&&(j=kt(j)),oe(j,S.ADD_ATTR,Ce))),S.ADD_URI_SAFE_ATTR&&oe(Jo,S.ADD_URI_SAFE_ATTR,Ce),S.FORBID_CONTENTS&&(Dt===Qo&&(Dt=kt(Dt)),oe(Dt,S.FORBID_CONTENTS,Ce)),S.ADD_FORBID_CONTENTS&&(Dt===Qo&&(Dt=kt(Dt)),oe(Dt,S.ADD_FORBID_CONTENTS,Ce)),Ko&&(te["#text"]=!0),Me&&oe(te,["html","head","body"]),te.table&&(oe(te,["tbody"]),delete W.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=S.TRUSTED_TYPES_POLICY,k=y.createHTML("")}else y===void 0&&(y=cf(m,o)),y!==null&&typeof k=="string"&&(k=y.createHTML(""));ze&&ze(S),On=S}},Dc=oe({},[...co,...lo,...Kd]),Tc=oe({},[...fo,...Qd]),Vp=function(S){let H=g(S);(!H||!H.tagName)&&(H={namespaceURI:In,tagName:"template"});const Q=$r(S.tagName),ge=$r(H.tagName);return ti[S.namespaceURI]?S.namespaceURI===Lu?H.namespaceURI===Ot?Q==="svg":H.namespaceURI===Nu?Q==="svg"&&(ge==="annotation-xml"||Iu[ge]):!!Dc[Q]:S.namespaceURI===Nu?H.namespaceURI===Ot?Q==="math":H.namespaceURI===Lu?Q==="math"&&Ou[ge]:!!Tc[Q]:S.namespaceURI===Ot?H.namespaceURI===Lu&&!Ou[ge]||H.namespaceURI===Nu&&!Iu[ge]?!1:!Tc[Q]&&(Ip[Q]||!Dc[Q]):!!(Er==="application/xhtml+xml"&&ti[S.namespaceURI]):!1},Tt=function(S){Un(t.removed,{element:S});try{g(S).removeChild(S)}catch{x(S)}},an=function(S,H){try{Un(t.removed,{attribute:H.getAttributeNode(S),from:H})}catch{Un(t.removed,{attribute:null,from:H})}if(H.removeAttribute(S),S==="is")if(It||Du)try{Tt(H)}catch{}else try{H.setAttribute(S,"")}catch{}},Nc=function(S){let H=null,Q=null;if(qt)S="<remove></remove>"+S;else{const ve=so(S,/^[\r\n\t ]+/);Q=ve&&ve[0]}Er==="application/xhtml+xml"&&In===Ot&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const ge=y?y.createHTML(S):S;if(In===Ot)try{H=new h().parseFromString(ge,Er)}catch{}if(!H||!H.documentElement){H=T.createDocument(In,"template",null);try{H.documentElement.innerHTML=ei?k:ge}catch{}}const Be=H.body||H.documentElement;return S&&Q&&Be.insertBefore(n.createTextNode(Q),Be.childNodes[0]||null),In===Ot?U.call(H,Me?"html":"body")[0]:Me?H.documentElement:Be},Lc=function(S){return D.call(S.ownerDocument||S,S,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},ri=function(S){return S instanceof l&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof f)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},Ic=function(S){return typeof s=="function"&&S instanceof s};function Pt(J,S,H){Hr(J,Q=>{Q.call(t,S,H,On)})}const Oc=function(S){let H=null;if(Pt(N.beforeSanitizeElements,S,null),ri(S))return Tt(S),!0;const Q=Ce(S.nodeName);if(Pt(N.uponSanitizeElement,S,{tagName:Q,allowedTags:te}),yt&&S.hasChildNodes()&&!Ic(S.firstElementChild)&&je(/<[/\w!]/g,S.innerHTML)&&je(/<[/\w!]/g,S.textContent)||S.nodeType===Xn.progressingInstruction||yt&&S.nodeType===Xn.comment&&je(/<[/\w]/g,S.data))return Tt(S),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(Q))&&(!te[Q]||W[Q])){if(!W[Q]&&Rc(Q)&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,Q)||B.tagNameCheck instanceof Function&&B.tagNameCheck(Q)))return!1;if(Ko&&!Dt[Q]){const ge=g(S)||S.parentNode,Be=b(S)||S.childNodes;if(Be&&ge){const ve=Be.length;for(let qe=ve-1;qe>=0;--qe){const Rt=w(Be[qe],!0);Rt.__removalCount=(S.__removalCount||0)+1,ge.insertBefore(Rt,A(S))}}}return Tt(S),!0}return S instanceof c&&!Vp(S)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&je(/<\/no(script|embed|frames)/i,S.innerHTML)?(Tt(S),!0):(Te&&S.nodeType===Xn.text&&(H=S.textContent,Hr([L,C,P],ge=>{H=Wn(H,ge," ")}),S.textContent!==H&&(Un(t.removed,{element:S.cloneNode()}),S.textContent=H)),Pt(N.afterSanitizeElements,S,null),!1)},Pc=function(S,H,Q){if(K[H]||kc&&(H==="id"||H==="name")&&(Q in n||Q in Rp))return!1;if(!(ue&&!K[H]&&je(R,H))){if(!(Y&&je(E,H))){if(!(Z.attributeCheck instanceof Function&&Z.attributeCheck(H,S))){if(!j[H]||K[H]){if(!(Rc(S)&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,S)||B.tagNameCheck instanceof Function&&B.tagNameCheck(S))&&(B.attributeNameCheck instanceof RegExp&&je(B.attributeNameCheck,H)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(H,S))||H==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&je(B.tagNameCheck,Q)||B.tagNameCheck instanceof Function&&B.tagNameCheck(Q))))return!1}else if(!Jo[H]){if(!je(re,Wn(Q,V,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&S!=="script"&&qd(Q,"data:")===0&&_c[S])){if(!(ce&&!je(M,Wn(Q,V,"")))){if(Q)return!1}}}}}}}return!0},Rc=function(S){return S!=="annotation-xml"&&so(S,$)},Vc=function(S){Pt(N.beforeSanitizeAttributes,S,null);const{attributes:H}=S;if(!H||ri(S))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let ge=H.length;for(;ge--;){const Be=H[ge],{name:ve,namespaceURI:qe,value:Rt}=Be,Pn=Ce(ve),ui=Rt;let Ie=ve==="value"?ui:Xd(ui);if(Q.attrName=Pn,Q.attrValue=Ie,Q.keepAttr=!0,Q.forceKeepAttr=void 0,Pt(N.uponSanitizeAttribute,S,Q),Ie=Q.attrValue,Cc&&(Pn==="id"||Pn==="name")&&(an(ve,S),Ie=Np+Ie),yt&&je(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ie)){an(ve,S);continue}if(Pn==="attributename"&&so(Ie,"href")){an(ve,S);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){an(ve,S);continue}if(!De&&je(/\/>/i,Ie)){an(ve,S);continue}Te&&Hr([L,C,P],Bc=>{Ie=Wn(Ie,Bc," ")});const Mc=Ce(S.nodeName);if(!Pc(Mc,Pn,Ie)){an(ve,S);continue}if(y&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!qe)switch(m.getAttributeType(Mc,Pn)){case"TrustedHTML":{Ie=y.createHTML(Ie);break}case"TrustedScriptURL":{Ie=y.createScriptURL(Ie);break}}if(Ie!==ui)try{qe?S.setAttributeNS(qe,ve,Ie):S.setAttribute(ve,Ie),ri(S)?Tt(S):aa(t.removed)}catch{an(ve,S)}}Pt(N.afterSanitizeAttributes,S,null)},Mp=function J(S){let H=null;const Q=Lc(S);for(Pt(N.beforeSanitizeShadowDOM,S,null);H=Q.nextNode();)Pt(N.uponSanitizeShadowNode,H,null),Oc(H),Vc(H),H.content instanceof r&&J(H.content);Pt(N.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(J){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Q=null,ge=null,Be=null;if(ei=!J,ei&&(J="<!-->"),typeof J!="string"&&!Ic(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw Gn("dirty is not a string, aborting")}else throw Gn("toString is not a function");if(!t.isSupported)return J;if(Nn||ni(S),t.removed=[],typeof J=="string"&&(_r=!1),_r){if(J.nodeName){const Rt=Ce(J.nodeName);if(!te[Rt]||W[Rt])throw Gn("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof s)H=Nc("<!---->"),Q=H.ownerDocument.importNode(J,!0),Q.nodeType===Xn.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?H=Q:H.appendChild(Q);else{if(!It&&!Te&&!Me&&J.indexOf("<")===-1)return y&&Tu?y.createHTML(J):J;if(H=Nc(J),!H)return It?null:Tu?k:""}H&&qt&&Tt(H.firstChild);const ve=Lc(_r?J:H);for(;ge=ve.nextNode();)Oc(ge),Vc(ge),ge.content instanceof r&&Mp(ge.content);if(_r)return J;if(It){if(Du)for(Be=F.call(H.ownerDocument);H.firstChild;)Be.appendChild(H.firstChild);else Be=H;return(j.shadowroot||j.shadowrootmode)&&(Be=_.call(u,Be,!0)),Be}let qe=Me?H.outerHTML:H.innerHTML;return Me&&te["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&je(ha,H.ownerDocument.doctype.name)&&(qe="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
17
+ `+qe),Te&&Hr([L,C,P],Rt=>{qe=Wn(qe,Rt," ")}),y&&Tu?y.createHTML(qe):qe},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ni(J),Nn=!0},t.clearConfig=function(){On=null,Nn=!1},t.isValidAttribute=function(J,S,H){On||ni({});const Q=Ce(J),ge=Ce(S);return Pc(Q,ge,H)},t.addHook=function(J,S){typeof S=="function"&&Un(N[J],S)},t.removeHook=function(J,S){if(S!==void 0){const H=Wd(N[J],S);return H===-1?void 0:Gd(N[J],H,1)[0]}return aa(N[J])},t.removeHooks=function(J){N[J]=[]},t.removeAllHooks=function(){N=ma()},t}var lf=ga();const ba={content:{type:Object,required:!0}},df=new Ze({html:!0,linkify:!0});function ff(e){let t=e;return t=t.replace(/([\u2026\u3001\u3002\uff0c\uff1a\uff1b\uff1f\uff01)】」』]|[;:,.!?(\[\]])[\t ]*(#{2,6}\s+)/g,`$1
18
18
 
19
19
  $2`),t=t.replace(/(\*\*)(\s*)(#{2,6}\s+)/g,`$1
20
20
 
21
21
  $3`),t}function hf(e){const t=e.split(`
22
- `),n=t.filter(i=>i.trim().length>0);if(n.length===0)return e.trim();const u=Math.min(...n.map(i=>{var r;return(((r=i.match(/^\s*/))==null?void 0:r[0])??"").length}));return t.map(i=>i.slice(u)).join(`
23
- `).trim()}const mn=o.defineComponent({name:"FXMarkdownMessage",props:ba,setup(e){const t=o.computed(()=>{var a;const n=(((a=e.content)==null?void 0:a.content)??"").replace(/\\n/g,`
24
- `),u=ff(n),i=hf(u);if(!i)return"";const r=df.render(i);return cf.sanitize(r,{ADD_TAGS:["style"],ADD_ATTR:["style","align","valign","colspan","rowspan","scope","title"]})});return()=>{var u;const n=(u=e.content)==null?void 0:u.message;return o.createVNode("div",{class:"f-chat-message-markdown"},[n&&o.createVNode("div",{class:"f-chat-markdown-message"},[n]),o.createVNode("div",{class:"f-chat-markdown-content",innerHTML:t.value},null)])}}});mn.install=e=>{e.component(mn.name,mn)};const mf=(e,t,n)=>{if(e.type!==Oe.Text)return null;const i=e.raw;return i?typeof i!="string"?i:i.trim()?n.shouldShowMarkdown.value?o.createVNode(mn,{style:{border:"0px none rgb(51, 51, 51)",borderRadius:0,boxShadow:"none",padding:0},content:{type:"markdown",message:"",content:i}},null):o.createVNode("div",{class:"f-chat-bubble-content-text",key:`bubble-text-${t}`},[i]):null:null};function pf(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function gf(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var bf=function(){function e(n){var u=this;this._insertTag=function(i){var r;u.tags.length===0?u.insertionPoint?r=u.insertionPoint.nextSibling:u.prepend?r=u.container.firstChild:r=u.before:r=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(i,r),u.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(u){u.forEach(this._insertTag)},t.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(gf(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var r=pf(i);try{r.insertRule(u,r.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(u));this.ctr++},t.flush=function(){this.tags.forEach(function(u){var i;return(i=u.parentNode)==null?void 0:i.removeChild(u)}),this.tags=[],this.ctr=0},e}(),Pe="-ms-",Wr="-moz-",ae="-webkit-",ya="comm",hi="rule",mi="decl",yf="@import",xa="@keyframes",xf="@layer",wf=Math.abs,Gr=String.fromCharCode,vf=Object.assign;function Af(e,t){return Ne(e,0)^45?(((t<<2^Ne(e,0))<<2^Ne(e,1))<<2^Ne(e,2))<<2^Ne(e,3):0}function wa(e){return e.trim()}function kf(e,t){return(e=t.exec(e))?e[0]:e}function se(e,t,n){return e.replace(t,n)}function pi(e,t){return e.indexOf(t)}function Ne(e,t){return e.charCodeAt(t)|0}function Zn(e,t,n){return e.slice(t,n)}function Ct(e){return e.length}function gi(e){return e.length}function Xr(e,t){return t.push(e),e}function Cf(e,t){return e.map(t).join("")}var qr=1,pn=1,va=0,Ge=0,xe=0,gn="";function Zr(e,t,n,u,i,r,a){return{value:e,root:t,parent:n,type:u,props:i,children:r,line:qr,column:pn,length:a,return:""}}function Yn(e,t){return vf(Zr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ef(){return xe}function _f(){return xe=Ge>0?Ne(gn,--Ge):0,pn--,xe===10&&(pn=1,qr--),xe}function Ke(){return xe=Ge<va?Ne(gn,Ge++):0,pn++,xe===10&&(pn=1,qr++),xe}function Et(){return Ne(gn,Ge)}function Yr(){return Ge}function Kn(e,t){return Zn(gn,e,t)}function Qn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Aa(e){return qr=pn=1,va=Ct(gn=e),Ge=0,[]}function ka(e){return gn="",e}function Kr(e){return wa(Kn(Ge-1,bi(e===91?e+2:e===40?e+1:e)))}function Sf(e){for(;(xe=Et())&&xe<33;)Ke();return Qn(e)>2||Qn(xe)>3?"":" "}function Ff(e,t){for(;--t&&Ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Kn(e,Yr()+(t<6&&Et()==32&&Ke()==32))}function bi(e){for(;Ke();)switch(xe){case e:return Ge;case 34:case 39:e!==34&&e!==39&&bi(xe);break;case 40:e===41&&bi(e);break;case 92:Ke();break}return Ge}function Df(e,t){for(;Ke()&&e+xe!==57;)if(e+xe===84&&Et()===47)break;return"/*"+Kn(t,Ge-1)+"*"+Gr(e===47?e:Ke())}function Tf(e){for(;!Qn(Et());)Ke();return Kn(e,Ge)}function Nf(e){return ka(Qr("",null,null,null,[""],e=Aa(e),0,[0],e))}function Qr(e,t,n,u,i,r,a,s,l){for(var d=0,f=0,c=a,m=0,g=0,p=0,v=1,x=1,k=1,y=0,h="",b=i,w=r,C=u,E=h;x;)switch(p=y,y=Ke()){case 40:if(p!=108&&Ne(E,c-1)==58){pi(E+=se(Kr(y),"&","&\f"),"&\f")!=-1&&(k=-1);break}case 34:case 39:case 91:E+=Kr(y);break;case 9:case 10:case 13:case 32:E+=Sf(p);break;case 92:E+=Ff(Yr()-1,7);continue;case 47:switch(Et()){case 42:case 47:Xr(Lf(Df(Ke(),Yr()),t,n),l);break;default:E+="/"}break;case 123*v:s[d++]=Ct(E)*k;case 125*v:case 59:case 0:switch(y){case 0:case 125:x=0;case 59+f:k==-1&&(E=se(E,/\f/g,"")),g>0&&Ct(E)-c&&Xr(g>32?Ea(E+";",u,n,c-1):Ea(se(E," ","")+";",u,n,c-2),l);break;case 59:E+=";";default:if(Xr(C=Ca(E,t,n,d,f,i,s,h,b=[],w=[],c),r),y===123)if(f===0)Qr(E,t,C,C,b,r,c,s,w);else switch(m===99&&Ne(E,3)===110?100:m){case 100:case 108:case 109:case 115:Qr(e,C,C,u&&Xr(Ca(e,C,C,0,0,i,s,h,i,b=[],c),w),i,w,c,s,u?b:w);break;default:Qr(E,C,C,C,[""],w,0,s,w)}}d=f=g=0,v=k=1,h=E="",c=a;break;case 58:c=1+Ct(E),g=p;default:if(v<1){if(y==123)--v;else if(y==125&&v++==0&&_f()==125)continue}switch(E+=Gr(y),y*v){case 38:k=f>0?1:(E+="\f",-1);break;case 44:s[d++]=(Ct(E)-1)*k,k=1;break;case 64:Et()===45&&(E+=Kr(Ke())),m=Et(),f=c=Ct(h=E+=Tf(Yr())),y++;break;case 45:p===45&&Ct(E)==2&&(v=0)}}return r}function Ca(e,t,n,u,i,r,a,s,l,d,f){for(var c=i-1,m=i===0?r:[""],g=gi(m),p=0,v=0,x=0;p<u;++p)for(var k=0,y=Zn(e,c+1,c=wf(v=a[p])),h=e;k<g;++k)(h=wa(v>0?m[k]+" "+y:se(y,/&\f/g,m[k])))&&(l[x++]=h);return Zr(e,t,n,i===0?hi:s,l,d,f)}function Lf(e,t,n){return Zr(e,t,n,ya,Gr(Ef()),Zn(e,2,-2),0)}function Ea(e,t,n,u){return Zr(e,t,n,mi,Zn(e,0,u),Zn(e,u+1,-1),u)}function bn(e,t){for(var n="",u=gi(e),i=0;i<u;i++)n+=t(e[i],i,e,t)||"";return n}function If(e,t,n,u){switch(e.type){case xf:if(e.children.length)break;case yf:case mi:return e.return=e.return||e.value;case ya:return"";case xa:return e.return=e.value+"{"+bn(e.children,u)+"}";case hi:e.value=e.props.join(",")}return Ct(n=bn(e.children,u))?e.return=e.value+"{"+n+"}":""}function Of(e){var t=gi(e);return function(n,u,i,r){for(var a="",s=0;s<t;s++)a+=e[s](n,u,i,r)||"";return a}}function Pf(e){return function(t){t.root||(t=t.return)&&e(t)}}function Rf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Vf=function(t,n,u){for(var i=0,r=0;i=r,r=Et(),i===38&&r===12&&(n[u]=1),!Qn(r);)Ke();return Kn(t,Ge)},Mf=function(t,n){var u=-1,i=44;do switch(Qn(i)){case 0:i===38&&Et()===12&&(n[u]=1),t[u]+=Vf(Ge-1,n,u);break;case 2:t[u]+=Kr(i);break;case 4:if(i===44){t[++u]=Et()===58?"&\f":"",n[u]=t[u].length;break}default:t[u]+=Gr(i)}while(i=Ke());return t},Bf=function(t,n){return ka(Mf(Aa(t),n))},_a=new WeakMap,zf=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,u=t.parent,i=t.column===u.column&&t.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_a.get(u))&&!i){_a.set(t,!0);for(var r=[],a=Bf(n,r),s=u.props,l=0,d=0;l<a.length;l++)for(var f=0;f<s.length;f++,d++)t.props[d]=r[l]?a[l].replace(/&\f/g,s[f]):s[f]+" "+a[l]}}},jf=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Sa(e,t){switch(Af(e,t)){case 5103:return ae+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+e+Wr+e+Pe+e+e;case 6828:case 4268:return ae+e+Pe+e+e;case 6165:return ae+e+Pe+"flex-"+e+e;case 5187:return ae+e+se(e,/(\w+).+(:[^]+)/,ae+"box-$1$2"+Pe+"flex-$1$2")+e;case 5443:return ae+e+Pe+"flex-item-"+se(e,/flex-|-self/,"")+e;case 4675:return ae+e+Pe+"flex-line-pack"+se(e,/align-content|flex-|-self/,"")+e;case 5548:return ae+e+Pe+se(e,"shrink","negative")+e;case 5292:return ae+e+Pe+se(e,"basis","preferred-size")+e;case 6060:return ae+"box-"+se(e,"-grow","")+ae+e+Pe+se(e,"grow","positive")+e;case 4554:return ae+se(e,/([^-])(transform)/g,"$1"+ae+"$2")+e;case 6187:return se(se(se(e,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),e,"")+e;case 5495:case 3959:return se(e,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return se(se(e,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+Pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+e+e;case 4095:case 3583:case 4068:case 2532:return se(e,/(.+)-inline(.+)/,ae+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(e)-1-t>6)switch(Ne(e,t+1)){case 109:if(Ne(e,t+4)!==45)break;case 102:return se(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Wr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~pi(e,"stretch")?Sa(se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ne(e,t+1)!==115)break;case 6444:switch(Ne(e,Ct(e)-3-(~pi(e,"!important")&&10))){case 107:return se(e,":",":"+ae)+e;case 101:return se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Ne(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+Pe+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ae+e+Pe+e+e}return e}var Hf=function(t,n,u,i){if(t.length>-1&&!t.return)switch(t.type){case mi:t.return=Sa(t.value,t.length);break;case xa:return bn([Yn(t,{value:se(t.value,"@","@"+ae)})],i);case hi:if(t.length)return Cf(t.props,function(r){switch(kf(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bn([Yn(t,{props:[se(r,/:(read-\w+)/,":"+Wr+"$1")]})],i);case"::placeholder":return bn([Yn(t,{props:[se(r,/:(plac\w+)/,":"+ae+"input-$1")]}),Yn(t,{props:[se(r,/:(plac\w+)/,":"+Wr+"$1")]}),Yn(t,{props:[se(r,/:(plac\w+)/,Pe+"input-$1")]})],i)}return""})}},$f=[Hf],Uf=function(t){var n=t.key;if(n==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(v){var x=v.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||$f,r={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var x=v.getAttribute("data-emotion").split(" "),k=1;k<x.length;k++)r[x[k]]=!0;s.push(v)});var l,d=[zf,jf];{var f,c=[If,Pf(function(v){f.insert(v)})],m=Of(d.concat(i,c)),g=function(x){return bn(Nf(x),m)};l=function(x,k,y,h){f=y,g(x?x+"{"+k.styles+"}":k.styles),h&&(p.inserted[k.name]=!0)}}var p={key:n,sheet:new bf({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:r,registered:{},insert:l};return p.sheet.hydrate(s),p};function Wf(e){for(var t=0,n,u=0,i=e.length;i>=4;++u,i-=4)n=e.charCodeAt(u)&255|(e.charCodeAt(++u)&255)<<8|(e.charCodeAt(++u)&255)<<16|(e.charCodeAt(++u)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(u+2)&255)<<16;case 2:t^=(e.charCodeAt(u+1)&255)<<8;case 1:t^=e.charCodeAt(u)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Gf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xf=/[A-Z]|^ms/g,qf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fa=function(t){return t.charCodeAt(1)===45},Da=function(t){return t!=null&&typeof t!="boolean"},yi=Rf(function(e){return Fa(e)?e:e.replace(Xf,"-$&").toLowerCase()}),Ta=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(qf,function(u,i,r){return zt={name:i,styles:r,next:zt},i})}return Gf[t]!==1&&!Fa(t)&&typeof n=="number"&&n!==0?n+"px":n};function Jr(e,t,n){if(n==null)return"";var u=n;if(u.__emotion_styles!==void 0)return u;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return zt={name:i.name,styles:i.styles,next:zt},i.name;var r=n;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)zt={name:a.name,styles:a.styles,next:zt},a=a.next;var s=r.styles+";";return s}return Zf(e,t,n)}}var l=n;if(t==null)return l;var d=t[l];return d!==void 0?d:l}function Zf(e,t,n){var u="";if(Array.isArray(n))for(var i=0;i<n.length;i++)u+=Jr(e,t,n[i])+";";else for(var r in n){var a=n[r];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?u+=r+"{"+t[s]+"}":Da(s)&&(u+=yi(r)+":"+Ta(r,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)Da(a[l])&&(u+=yi(r)+":"+Ta(r,a[l])+";");else{var d=Jr(e,t,a);switch(r){case"animation":case"animationName":{u+=yi(r)+":"+d+";";break}default:u+=r+"{"+d+"}"}}}return u}var Na=/label:\s*([^\s;{]+)\s*(;|$)/g,zt;function xi(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var u=!0,i="";zt=void 0;var r=e[0];if(r==null||r.raw===void 0)u=!1,i+=Jr(n,t,r);else{var a=r;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Jr(n,t,e[s]),u){var l=r;i+=l[s]}Na.lastIndex=0;for(var d="",f;(f=Na.exec(i))!==null;)d+="-"+f[1];var c=Wf(i)+d;return{name:c,styles:i,next:zt}}function La(e,t,n){var u="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(u+=i+" ")}),u}var Yf=function(t,n,u){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Kf=function(t,n,u){Yf(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var r=n;do t.insert(n===r?"."+i:"",r,t.sheet,!0),r=r.next;while(r!==void 0)}};function Ia(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Oa(e,t,n){var u=[],i=La(e,u,n);return u.length<2?n:i+t(u)}var Qf=function(t){var n=Uf(t);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var u=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=xi(d,n.registered,void 0);return Kf(n,c),n.key+"-"+c.name},i=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=xi(d,n.registered),m="animation-"+c.name;return Ia(n,{name:c.name,styles:"@keyframes "+m+"{"+c.styles+"}"}),m},r=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var c=xi(d,n.registered);Ia(n,c)},a=function(){for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];return Oa(n.registered,u,Jf(d))};return{css:u,cx:a,injectGlobal:r,keyframes:i,hydrate:function(l){l.forEach(function(d){n.inserted[d]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:La.bind(null,n.registered),merge:Oa.bind(null,n.registered,u)}},Jf=function e(t){for(var n="",u=0;u<t.length;u++){var i=t[u];if(i!=null){var r=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))r=e(i);else{r="";for(var a in i)i[a]&&a&&(r&&(r+=" "),r+=a)}break}default:r=i}r&&(n&&(n+=" "),n+=r)}}return n},eh=Qf({key:"css"}),wi=eh.css,th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pa={exports:{}};/*!
22
+ `),n=t.filter(o=>o.trim().length>0);if(n.length===0)return e.trim();const u=Math.min(...n.map(o=>{var r;return(((r=o.match(/^\s*/))==null?void 0:r[0])??"").length}));return t.map(o=>o.slice(u)).join(`
23
+ `).trim()}const pn=i.defineComponent({name:"FXMarkdownMessage",props:ba,setup(e){const t=i.computed(()=>{var a;const n=(((a=e.content)==null?void 0:a.content)??"").replace(/\\n/g,`
24
+ `),u=ff(n),o=hf(u);if(!o)return"";const r=df.render(o);return lf.sanitize(r,{ADD_TAGS:["style"],ADD_ATTR:["style","align","valign","colspan","rowspan","scope","title"]})});return()=>{var u;const n=(u=e.content)==null?void 0:u.message;return i.createVNode("div",{class:"f-chat-message-markdown"},[n&&i.createVNode("div",{class:"f-chat-markdown-message"},[n]),i.createVNode("div",{class:"f-chat-markdown-content",innerHTML:t.value},null)])}}});pn.install=e=>{e.component(pn.name,pn)};const pf=(e,t,n)=>{if(e.type!==Oe.Text)return null;const o=e.raw;return o?typeof o!="string"?o:o.trim()?n.shouldShowMarkdown.value?i.createVNode(pn,{style:{border:"0px none rgb(51, 51, 51)",borderRadius:0,boxShadow:"none",padding:0},content:{type:"markdown",message:"",content:o}},null):i.createVNode("div",{class:"f-chat-bubble-content-text",key:`bubble-text-${t}`},[o]):null:null};function mf(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function gf(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var bf=function(){function e(n){var u=this;this._insertTag=function(o){var r;u.tags.length===0?u.insertionPoint?r=u.insertionPoint.nextSibling:u.prepend?r=u.container.firstChild:r=u.before:r=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(o,r),u.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(u){u.forEach(this._insertTag)},t.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(gf(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var r=mf(o);try{r.insertRule(u,r.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(u));this.ctr++},t.flush=function(){this.tags.forEach(function(u){var o;return(o=u.parentNode)==null?void 0:o.removeChild(u)}),this.tags=[],this.ctr=0},e}(),Pe="-ms-",Wr="-moz-",ae="-webkit-",ya="comm",po="rule",mo="decl",yf="@import",xa="@keyframes",xf="@layer",wf=Math.abs,Gr=String.fromCharCode,vf=Object.assign;function Af(e,t){return Ne(e,0)^45?(((t<<2^Ne(e,0))<<2^Ne(e,1))<<2^Ne(e,2))<<2^Ne(e,3):0}function wa(e){return e.trim()}function kf(e,t){return(e=t.exec(e))?e[0]:e}function se(e,t,n){return e.replace(t,n)}function go(e,t){return e.indexOf(t)}function Ne(e,t){return e.charCodeAt(t)|0}function Zn(e,t,n){return e.slice(t,n)}function Ct(e){return e.length}function bo(e){return e.length}function qr(e,t){return t.push(e),e}function Cf(e,t){return e.map(t).join("")}var Xr=1,mn=1,va=0,Ge=0,xe=0,gn="";function Zr(e,t,n,u,o,r,a){return{value:e,root:t,parent:n,type:u,props:o,children:r,line:Xr,column:mn,length:a,return:""}}function Yn(e,t){return vf(Zr("",null,null,"",null,null,0),e,{length:-e.length},t)}function _f(){return xe}function Ef(){return xe=Ge>0?Ne(gn,--Ge):0,mn--,xe===10&&(mn=1,Xr--),xe}function Ke(){return xe=Ge<va?Ne(gn,Ge++):0,mn++,xe===10&&(mn=1,Xr++),xe}function _t(){return Ne(gn,Ge)}function Yr(){return Ge}function Kn(e,t){return Zn(gn,e,t)}function Qn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Aa(e){return Xr=mn=1,va=Ct(gn=e),Ge=0,[]}function ka(e){return gn="",e}function Kr(e){return wa(Kn(Ge-1,yo(e===91?e+2:e===40?e+1:e)))}function Sf(e){for(;(xe=_t())&&xe<33;)Ke();return Qn(e)>2||Qn(xe)>3?"":" "}function Ff(e,t){for(;--t&&Ke()&&!(xe<48||xe>102||xe>57&&xe<65||xe>70&&xe<97););return Kn(e,Yr()+(t<6&&_t()==32&&Ke()==32))}function yo(e){for(;Ke();)switch(xe){case e:return Ge;case 34:case 39:e!==34&&e!==39&&yo(xe);break;case 40:e===41&&yo(e);break;case 92:Ke();break}return Ge}function Df(e,t){for(;Ke()&&e+xe!==57;)if(e+xe===84&&_t()===47)break;return"/*"+Kn(t,Ge-1)+"*"+Gr(e===47?e:Ke())}function Tf(e){for(;!Qn(_t());)Ke();return Kn(e,Ge)}function Nf(e){return ka(Qr("",null,null,null,[""],e=Aa(e),0,[0],e))}function Qr(e,t,n,u,o,r,a,s,c){for(var d=0,f=0,l=a,h=0,m=0,p=0,w=1,x=1,A=1,b=0,g="",y=o,k=r,T=u,D=g;x;)switch(p=b,b=Ke()){case 40:if(p!=108&&Ne(D,l-1)==58){go(D+=se(Kr(b),"&","&\f"),"&\f")!=-1&&(A=-1);break}case 34:case 39:case 91:D+=Kr(b);break;case 9:case 10:case 13:case 32:D+=Sf(p);break;case 92:D+=Ff(Yr()-1,7);continue;case 47:switch(_t()){case 42:case 47:qr(Lf(Df(Ke(),Yr()),t,n),c);break;default:D+="/"}break;case 123*w:s[d++]=Ct(D)*A;case 125*w:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+f:A==-1&&(D=se(D,/\f/g,"")),m>0&&Ct(D)-l&&qr(m>32?_a(D+";",u,n,l-1):_a(se(D," ","")+";",u,n,l-2),c);break;case 59:D+=";";default:if(qr(T=Ca(D,t,n,d,f,o,s,g,y=[],k=[],l),r),b===123)if(f===0)Qr(D,t,T,T,y,r,l,s,k);else switch(h===99&&Ne(D,3)===110?100:h){case 100:case 108:case 109:case 115:Qr(e,T,T,u&&qr(Ca(e,T,T,0,0,o,s,g,o,y=[],l),k),o,k,l,s,u?y:k);break;default:Qr(D,T,T,T,[""],k,0,s,k)}}d=f=m=0,w=A=1,g=D="",l=a;break;case 58:l=1+Ct(D),m=p;default:if(w<1){if(b==123)--w;else if(b==125&&w++==0&&Ef()==125)continue}switch(D+=Gr(b),b*w){case 38:A=f>0?1:(D+="\f",-1);break;case 44:s[d++]=(Ct(D)-1)*A,A=1;break;case 64:_t()===45&&(D+=Kr(Ke())),h=_t(),f=l=Ct(g=D+=Tf(Yr())),b++;break;case 45:p===45&&Ct(D)==2&&(w=0)}}return r}function Ca(e,t,n,u,o,r,a,s,c,d,f){for(var l=o-1,h=o===0?r:[""],m=bo(h),p=0,w=0,x=0;p<u;++p)for(var A=0,b=Zn(e,l+1,l=wf(w=a[p])),g=e;A<m;++A)(g=wa(w>0?h[A]+" "+b:se(b,/&\f/g,h[A])))&&(c[x++]=g);return Zr(e,t,n,o===0?po:s,c,d,f)}function Lf(e,t,n){return Zr(e,t,n,ya,Gr(_f()),Zn(e,2,-2),0)}function _a(e,t,n,u){return Zr(e,t,n,mo,Zn(e,0,u),Zn(e,u+1,-1),u)}function bn(e,t){for(var n="",u=bo(e),o=0;o<u;o++)n+=t(e[o],o,e,t)||"";return n}function If(e,t,n,u){switch(e.type){case xf:if(e.children.length)break;case yf:case mo:return e.return=e.return||e.value;case ya:return"";case xa:return e.return=e.value+"{"+bn(e.children,u)+"}";case po:e.value=e.props.join(",")}return Ct(n=bn(e.children,u))?e.return=e.value+"{"+n+"}":""}function Of(e){var t=bo(e);return function(n,u,o,r){for(var a="",s=0;s<t;s++)a+=e[s](n,u,o,r)||"";return a}}function Pf(e){return function(t){t.root||(t=t.return)&&e(t)}}function Rf(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Vf=function(t,n,u){for(var o=0,r=0;o=r,r=_t(),o===38&&r===12&&(n[u]=1),!Qn(r);)Ke();return Kn(t,Ge)},Mf=function(t,n){var u=-1,o=44;do switch(Qn(o)){case 0:o===38&&_t()===12&&(n[u]=1),t[u]+=Vf(Ge-1,n,u);break;case 2:t[u]+=Kr(o);break;case 4:if(o===44){t[++u]=_t()===58?"&\f":"",n[u]=t[u].length;break}default:t[u]+=Gr(o)}while(o=Ke());return t},Bf=function(t,n){return ka(Mf(Aa(t),n))},Ea=new WeakMap,zf=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,u=t.parent,o=t.column===u.column&&t.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ea.get(u))&&!o){Ea.set(t,!0);for(var r=[],a=Bf(n,r),s=u.props,c=0,d=0;c<a.length;c++)for(var f=0;f<s.length;f++,d++)t.props[d]=r[c]?a[c].replace(/&\f/g,s[f]):s[f]+" "+a[c]}}},jf=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Sa(e,t){switch(Af(e,t)){case 5103:return ae+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+e+Wr+e+Pe+e+e;case 6828:case 4268:return ae+e+Pe+e+e;case 6165:return ae+e+Pe+"flex-"+e+e;case 5187:return ae+e+se(e,/(\w+).+(:[^]+)/,ae+"box-$1$2"+Pe+"flex-$1$2")+e;case 5443:return ae+e+Pe+"flex-item-"+se(e,/flex-|-self/,"")+e;case 4675:return ae+e+Pe+"flex-line-pack"+se(e,/align-content|flex-|-self/,"")+e;case 5548:return ae+e+Pe+se(e,"shrink","negative")+e;case 5292:return ae+e+Pe+se(e,"basis","preferred-size")+e;case 6060:return ae+"box-"+se(e,"-grow","")+ae+e+Pe+se(e,"grow","positive")+e;case 4554:return ae+se(e,/([^-])(transform)/g,"$1"+ae+"$2")+e;case 6187:return se(se(se(e,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),e,"")+e;case 5495:case 3959:return se(e,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return se(se(e,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+Pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+e+e;case 4095:case 3583:case 4068:case 2532:return se(e,/(.+)-inline(.+)/,ae+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ct(e)-1-t>6)switch(Ne(e,t+1)){case 109:if(Ne(e,t+4)!==45)break;case 102:return se(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Wr+(Ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~go(e,"stretch")?Sa(se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ne(e,t+1)!==115)break;case 6444:switch(Ne(e,Ct(e)-3-(~go(e,"!important")&&10))){case 107:return se(e,":",":"+ae)+e;case 101:return se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ae+(Ne(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+Pe+"$2box$3")+e}break;case 5936:switch(Ne(e,t+11)){case 114:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+Pe+se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ae+e+Pe+e+e}return e}var Hf=function(t,n,u,o){if(t.length>-1&&!t.return)switch(t.type){case mo:t.return=Sa(t.value,t.length);break;case xa:return bn([Yn(t,{value:se(t.value,"@","@"+ae)})],o);case po:if(t.length)return Cf(t.props,function(r){switch(kf(r,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bn([Yn(t,{props:[se(r,/:(read-\w+)/,":"+Wr+"$1")]})],o);case"::placeholder":return bn([Yn(t,{props:[se(r,/:(plac\w+)/,":"+ae+"input-$1")]}),Yn(t,{props:[se(r,/:(plac\w+)/,":"+Wr+"$1")]}),Yn(t,{props:[se(r,/:(plac\w+)/,Pe+"input-$1")]})],o)}return""})}},$f=[Hf],Uf=function(t){var n=t.key;if(n==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(w){var x=w.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||$f,r={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var x=w.getAttribute("data-emotion").split(" "),A=1;A<x.length;A++)r[x[A]]=!0;s.push(w)});var c,d=[zf,jf];{var f,l=[If,Pf(function(w){f.insert(w)})],h=Of(d.concat(o,l)),m=function(x){return bn(Nf(x),h)};c=function(x,A,b,g){f=b,m(x?x+"{"+A.styles+"}":A.styles),g&&(p.inserted[A.name]=!0)}}var p={key:n,sheet:new bf({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:r,registered:{},insert:c};return p.sheet.hydrate(s),p};function Wf(e){for(var t=0,n,u=0,o=e.length;o>=4;++u,o-=4)n=e.charCodeAt(u)&255|(e.charCodeAt(++u)&255)<<8|(e.charCodeAt(++u)&255)<<16|(e.charCodeAt(++u)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(u+2)&255)<<16;case 2:t^=(e.charCodeAt(u+1)&255)<<8;case 1:t^=e.charCodeAt(u)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Gf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qf=/[A-Z]|^ms/g,Xf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Fa=function(t){return t.charCodeAt(1)===45},Da=function(t){return t!=null&&typeof t!="boolean"},xo=Rf(function(e){return Fa(e)?e:e.replace(qf,"-$&").toLowerCase()}),Ta=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Xf,function(u,o,r){return jt={name:o,styles:r,next:jt},o})}return Gf[t]!==1&&!Fa(t)&&typeof n=="number"&&n!==0?n+"px":n};function Jr(e,t,n){if(n==null)return"";var u=n;if(u.__emotion_styles!==void 0)return u;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return jt={name:o.name,styles:o.styles,next:jt},o.name;var r=n;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)jt={name:a.name,styles:a.styles,next:jt},a=a.next;var s=r.styles+";";return s}return Zf(e,t,n)}}var c=n;if(t==null)return c;var d=t[c];return d!==void 0?d:c}function Zf(e,t,n){var u="";if(Array.isArray(n))for(var o=0;o<n.length;o++)u+=Jr(e,t,n[o])+";";else for(var r in n){var a=n[r];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?u+=r+"{"+t[s]+"}":Da(s)&&(u+=xo(r)+":"+Ta(r,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)Da(a[c])&&(u+=xo(r)+":"+Ta(r,a[c])+";");else{var d=Jr(e,t,a);switch(r){case"animation":case"animationName":{u+=xo(r)+":"+d+";";break}default:u+=r+"{"+d+"}"}}}return u}var Na=/label:\s*([^\s;{]+)\s*(;|$)/g,jt;function wo(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var u=!0,o="";jt=void 0;var r=e[0];if(r==null||r.raw===void 0)u=!1,o+=Jr(n,t,r);else{var a=r;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Jr(n,t,e[s]),u){var c=r;o+=c[s]}Na.lastIndex=0;for(var d="",f;(f=Na.exec(o))!==null;)d+="-"+f[1];var l=Wf(o)+d;return{name:l,styles:o,next:jt}}function La(e,t,n){var u="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(u+=o+" ")}),u}var Yf=function(t,n,u){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},Kf=function(t,n,u){Yf(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var r=n;do t.insert(n===r?"."+o:"",r,t.sheet,!0),r=r.next;while(r!==void 0)}};function Ia(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Oa(e,t,n){var u=[],o=La(e,u,n);return u.length<2?n:o+t(u)}var Qf=function(t){var n=Uf(t);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var u=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];var l=wo(d,n.registered,void 0);return Kf(n,l),n.key+"-"+l.name},o=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];var l=wo(d,n.registered),h="animation-"+l.name;return Ia(n,{name:l.name,styles:"@keyframes "+h+"{"+l.styles+"}"}),h},r=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];var l=wo(d,n.registered);Ia(n,l)},a=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];return Oa(n.registered,u,Jf(d))};return{css:u,cx:a,injectGlobal:r,keyframes:o,hydrate:function(c){c.forEach(function(d){n.inserted[d]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:La.bind(null,n.registered),merge:Oa.bind(null,n.registered,u)}},Jf=function e(t){for(var n="",u=0;u<t.length;u++){var o=t[u];if(o!=null){var r=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))r=e(o);else{r="";for(var a in o)o[a]&&a&&(r&&(r+=" "),r+=a)}break}default:r=o}r&&(n&&(n+=" "),n+=r)}}return n},eh=Qf({key:"css"}),vo=eh.css,th=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pa={exports:{}};/*!
25
25
  Copyright (c) 2018 Jed Watson.
26
26
  Licensed under the MIT License (MIT), see
27
27
  http://jedwatson.github.io/classnames
28
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(r=i(r,u(s)))}return r}function u(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var a="";for(var s in r)t.call(r,s)&&r[s]&&(a=i(a,s));return a}function i(r,a){return a?r?r+" "+a:r+a:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Pa);var rh=Pa.exports;const vi=nh(rh),Ra={className:{type:String,default:""},viewStatus:{type:String,default:"full"},widgetAPIURL:{type:String,default:""},widgetOptions:{type:Object,default:()=>({mode:"embedded",implOptions:{}})},widgetData:{type:Object,default:()=>({})}};class uh{constructor(t){fe(this,"root");if(!t)throw new Error("parentElement is required");this.root=document.createElement("div"),this.root.className="fx-card-container-stage__root",t.appendChild(this.root)}dispose(){this.root.remove()}getElement(){return this.root}}function ih(){function e(t,n){if(t===n)return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null||Array.isArray(t)!==Array.isArray(n))return!1;const u=Object.keys(t),i=Object.keys(n);if(u.length!==i.length)return!1;for(const r of u)if(!i.includes(r)||!e(t[r],n[r]))return!1;return!0}return{deepEqual:e}}var Ai={exports:{}};(function(e,t){(function(n,u){u(t)})(th,function(n){var u=Object.defineProperty,i=Object.defineProperties,r=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,d=(P,V,T)=>V in P?u(P,V,{enumerable:!0,configurable:!0,writable:!0,value:T}):P[V]=T,f=(P,V)=>{for(var T in V||(V={}))s.call(V,T)&&d(P,T,V[T]);if(a)for(var T of a(V))l.call(V,T)&&d(P,T,V[T]);return P},c=(P,V)=>i(P,r(V)),m=(P,V,T)=>new Promise((L,W)=>{var K=ue=>{try{Y(T.next(ue))}catch(le){W(le)}},Z=ue=>{try{Y(T.throw(ue))}catch(le){W(le)}},Y=ue=>ue.done?L(ue.value):Promise.resolve(ue.value).then(K,Z);Y((T=T.apply(P,V)).next())}),g=(P=>(P[P.NONE=0]="NONE",P[P.LOADING=1]="LOADING",P[P.LOADED=2]="LOADED",P[P.ERROR=3]="ERROR",P))(g||{});class p{constructor(V){this.items={},this.factory=V}getOrCreateItemByURL(V){let T=this.items[V];return T||(T=this.items[V]=this.factory(V)),T}tryGetItemByURL(V){var T;return(T=this.items[V])!=null?T:null}removeItemByURL(V){const T=this.items[V];return T&&(this.items[V]=null,T)}}const v="__RUNTIME_IMPORT__";function x(P,V){var T,L;const W=globalThis,K=(T=W[v])!=null?T:W[v]={};return(L=K[P])!=null?L:K[P]=V()}const k=x("cssCache",()=>new p(P=>({url:P,status:g.NONE,el:null,error:null,reject:null})));function y(P,V,T){const L={handleLoad(){P.removeEventListener("load",L.handleLoad),P.removeEventListener("error",L.handleError),V()},handleError(W){P.removeEventListener("load",L.handleLoad),P.removeEventListener("error",L.handleError),T(W)}};P.addEventListener("load",L.handleLoad),P.addEventListener("error",L.handleError)}function h(P){const V=k.getOrCreateItemByURL(P),{status:T,error:L}=V;return T===g.LOADED?Promise.resolve():T===g.ERROR?Promise.reject(L):T===g.LOADING?new Promise((W,K)=>{const{el:Z}=V;y(Z,()=>W(),Y=>K(Y.error))}):(V.status=g.LOADING,new Promise((W,K)=>{const Z=document.createElement("link");Z.rel="stylesheet",Z.href=P,y(Z,()=>{V.status=g.LOADED,W()},Y=>{const ue=Y.error||new Error(`Load css failed. href=${P}`);V.status=g.ERROR,V.error=ue,K(ue)}),V.el=Z,Z.setAttribute("data-runtime-import-type","css"),document.head.appendChild(Z)}))}function b(P){return Promise.all(P.map(V=>h(V))).then(()=>Promise.resolve()).catch(V=>Promise.reject(V))}const w=x("jsCache",()=>new p(P=>({url:P,status:g.NONE,el:null,error:null,reject:null,exportThing:void 0}))),C=globalThis,{define:E}=C,{keys:_}=Object;let z=!1;typeof E<"u"&&!E.runtime_import&&(console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."),z=!0);const M=x("pendingItemMap",()=>({})),I=function(...P){const V=P.pop(),{currentScript:T}=document;if(!T)throw new Error("currentScript is null.");const{src:L}=T,W=M[L];if(!W)throw new Error(`Can NOT find item, src=${L}`);M[L]=null;try{let K=P[0]||[],Z=null;typeof K=="string"&&(Z=K,K=P[1]||[]);const Y=W.exportThing=(()=>{let ue=!1;const le={};let De=V(...K.map(Te=>Te==="exports"?(ue=!0,le):C[Te]));return!De&&ue&&(De=le),De})();Z&&(C[Z]=Y),Y&&_(Y).length===1&&Y.default&&(W.exportThing=Y.default,W.exportThing.default=Y.default)}catch(K){W.status=g.ERROR,K instanceof Error&&(W.error=K),W.reject(K)}},B=()=>{const{currentScript:P}=document;if(P){const{src:V}=P;if(M[V])return!0}return!1};["amd","cmd"].forEach(P=>{Object.defineProperty(I,P,{get:B})}),I.runtime_import=!0;function D(P,V){if(z)throw new Error("runtime-import UMD mode uses window.define, you should NOT have your own window.define.");C.define||(C.define=I),M[P]=V}function H(P){const V=/legao-comp\/(.*)\/[\d.]+\/web.js$/.exec(P),T=window;if(V&&V.length>0){const L=V[1];T.g_config=T.g_config||{},T.g_config.appKey=L}}function $(P,V,T){P.status=g.LOADING,H(V);const{umd:L,crossOrigin:W}=T;return new Promise((K,Z)=>{const Y=document.createElement("script");if(Y.src=V,Y.async=!1,Y.crossOrigin=W,L){Y.setAttribute("data-runtime-import-type","javascript-umd"),P.reject=Z;const ue=Y.src;D(ue,P)}else Y.setAttribute("data-runtime-import-type","javascript");y(Y,()=>{P.status=g.LOADED,P.el=null,K(P.exportThing)},ue=>{const le=ue.error||new Error(`Load javascript failed. src=${V}`);P.status=g.ERROR,P.error=le,P.el=null,Z(le)}),P.el=Y,document.body.appendChild(Y)})}function F(P,V){const T=w.getOrCreateItemByURL(P),{status:L,exportThing:W,error:K}=T;if(L===g.LOADED)return Promise.resolve(W);if(L===g.ERROR)return Promise.reject(K);if(L===g.LOADING){const{el:Z}=T;return new Promise((Y,ue)=>{y(Z,()=>Y(T.exportThing),le=>ue(le.error))})}return $(T,P,V)}function R(P,V){let T=Promise.resolve();const L=P.length-1,{umd:W}=V;return P.forEach((K,Z)=>{const Y=W&&Z===L;T=T.then(()=>F(K,c(f({},V),{umd:Y})))}),T}function O(P){return m(this,null,function*(){const{scripts:V,styles:T}=P;if(T){const{urls:Y}=T;yield b(Y)}const{dependencies:L=[],entry:W,umd:K=!0,crossOrigin:Z="anonymous"}=V;if((W?L.concat([W]):L).length)return yield R(L.concat([W]),{umd:K,crossOrigin:Z})})}function U(P,V){return m(this,null,function*(){const T=V??{};return yield O({scripts:{dependencies:[],entry:P,umd:T.umd,crossOrigin:T.crossOrigin}})})}function re(P){return m(this,null,function*(){return yield O({scripts:{dependencies:[],entry:""},styles:{urls:[P]}})})}const te=O;n.importComponent=O,n.importModule=te,n.importScript=U,n.importStyle=re,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(Ai,Ai.exports);var oh=Ai.exports;function ah(){async function e(t){return await oh.importScript(t)}return{loadWidgetAPI:e}}const yn=o.defineComponent({name:"FXWidgetContainer",props:Ra,setup(e,t){const{loadWidgetAPI:n}=ah(),{deepEqual:u}=ih(),i=o.ref(null),r=o.ref(null),a=o.ref(null),s=o.ref(null),l=o.ref(null),d=o.computed(()=>{const y=wi`width:100%!important`;return vi("caf-assistant-widget-container__root",y,e.className)}),f=wi`
28
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(r=o(r,u(s)))}return r}function u(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var a="";for(var s in r)t.call(r,s)&&r[s]&&(a=o(a,s));return a}function o(r,a){return a?r?r+" "+a:r+a:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Pa);var rh=Pa.exports;const Ao=nh(rh),Ra={className:{type:String,default:""},viewStatus:{type:String,default:"full"},widgetAPIURL:{type:String,default:""},widgetOptions:{type:Object,default:()=>({mode:"embedded",implOptions:{}})},widgetData:{type:Object,default:()=>({})}};class uh{constructor(t){fe(this,"root");if(!t)throw new Error("parentElement is required");this.root=document.createElement("div"),this.root.className="fx-card-container-stage__root",t.appendChild(this.root)}dispose(){this.root.remove()}getElement(){return this.root}}function oh(){function e(t,n){if(t===n)return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null||Array.isArray(t)!==Array.isArray(n))return!1;const u=Object.keys(t),o=Object.keys(n);if(u.length!==o.length)return!1;for(const r of u)if(!o.includes(r)||!e(t[r],n[r]))return!1;return!0}return{deepEqual:e}}var ko={exports:{}};(function(e,t){(function(n,u){u(t)})(th,function(n){var u=Object.defineProperty,o=Object.defineProperties,r=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,d=(z,j,I)=>j in z?u(z,j,{enumerable:!0,configurable:!0,writable:!0,value:I}):z[j]=I,f=(z,j)=>{for(var I in j||(j={}))s.call(j,I)&&d(z,I,j[I]);if(a)for(var I of a(j))c.call(j,I)&&d(z,I,j[I]);return z},l=(z,j)=>o(z,r(j)),h=(z,j,I)=>new Promise((B,W)=>{var K=ue=>{try{Y(I.next(ue))}catch(ce){W(ce)}},Z=ue=>{try{Y(I.throw(ue))}catch(ce){W(ce)}},Y=ue=>ue.done?B(ue.value):Promise.resolve(ue.value).then(K,Z);Y((I=I.apply(z,j)).next())}),m=(z=>(z[z.NONE=0]="NONE",z[z.LOADING=1]="LOADING",z[z.LOADED=2]="LOADED",z[z.ERROR=3]="ERROR",z))(m||{});class p{constructor(j){this.items={},this.factory=j}getOrCreateItemByURL(j){let I=this.items[j];return I||(I=this.items[j]=this.factory(j)),I}tryGetItemByURL(j){var I;return(I=this.items[j])!=null?I:null}removeItemByURL(j){const I=this.items[j];return I&&(this.items[j]=null,I)}}const w="__RUNTIME_IMPORT__";function x(z,j){var I,B;const W=globalThis,K=(I=W[w])!=null?I:W[w]={};return(B=K[z])!=null?B:K[z]=j()}const A=x("cssCache",()=>new p(z=>({url:z,status:m.NONE,el:null,error:null,reject:null})));function b(z,j,I){const B={handleLoad(){z.removeEventListener("load",B.handleLoad),z.removeEventListener("error",B.handleError),j()},handleError(W){z.removeEventListener("load",B.handleLoad),z.removeEventListener("error",B.handleError),I(W)}};z.addEventListener("load",B.handleLoad),z.addEventListener("error",B.handleError)}function g(z){const j=A.getOrCreateItemByURL(z),{status:I,error:B}=j;return I===m.LOADED?Promise.resolve():I===m.ERROR?Promise.reject(B):I===m.LOADING?new Promise((W,K)=>{const{el:Z}=j;b(Z,()=>W(),Y=>K(Y.error))}):(j.status=m.LOADING,new Promise((W,K)=>{const Z=document.createElement("link");Z.rel="stylesheet",Z.href=z,b(Z,()=>{j.status=m.LOADED,W()},Y=>{const ue=Y.error||new Error(`Load css failed. href=${z}`);j.status=m.ERROR,j.error=ue,K(ue)}),j.el=Z,Z.setAttribute("data-runtime-import-type","css"),document.head.appendChild(Z)}))}function y(z){return Promise.all(z.map(j=>g(j))).then(()=>Promise.resolve()).catch(j=>Promise.reject(j))}const k=x("jsCache",()=>new p(z=>({url:z,status:m.NONE,el:null,error:null,reject:null,exportThing:void 0}))),T=globalThis,{define:D}=T,{keys:F}=Object;let U=!1;typeof D<"u"&&!D.runtime_import&&(console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."),U=!0);const _=x("pendingItemMap",()=>({})),N=function(...z){const j=z.pop(),{currentScript:I}=document;if(!I)throw new Error("currentScript is null.");const{src:B}=I,W=_[B];if(!W)throw new Error(`Can NOT find item, src=${B}`);_[B]=null;try{let K=z[0]||[],Z=null;typeof K=="string"&&(Z=K,K=z[1]||[]);const Y=W.exportThing=(()=>{let ue=!1;const ce={};let De=j(...K.map(Te=>Te==="exports"?(ue=!0,ce):T[Te]));return!De&&ue&&(De=ce),De})();Z&&(T[Z]=Y),Y&&F(Y).length===1&&Y.default&&(W.exportThing=Y.default,W.exportThing.default=Y.default)}catch(K){W.status=m.ERROR,K instanceof Error&&(W.error=K),W.reject(K)}},L=()=>{const{currentScript:z}=document;if(z){const{src:j}=z;if(_[j])return!0}return!1};["amd","cmd"].forEach(z=>{Object.defineProperty(N,z,{get:L})}),N.runtime_import=!0;function C(z,j){if(U)throw new Error("runtime-import UMD mode uses window.define, you should NOT have your own window.define.");T.define||(T.define=N),_[z]=j}function P(z){const j=/legao-comp\/(.*)\/[\d.]+\/web.js$/.exec(z),I=window;if(j&&j.length>0){const B=j[1];I.g_config=I.g_config||{},I.g_config.appKey=B}}function R(z,j,I){z.status=m.LOADING,P(j);const{umd:B,crossOrigin:W}=I;return new Promise((K,Z)=>{const Y=document.createElement("script");if(Y.src=j,Y.async=!1,Y.crossOrigin=W,B){Y.setAttribute("data-runtime-import-type","javascript-umd"),z.reject=Z;const ue=Y.src;C(ue,z)}else Y.setAttribute("data-runtime-import-type","javascript");b(Y,()=>{z.status=m.LOADED,z.el=null,K(z.exportThing)},ue=>{const ce=ue.error||new Error(`Load javascript failed. src=${j}`);z.status=m.ERROR,z.error=ce,z.el=null,Z(ce)}),z.el=Y,document.body.appendChild(Y)})}function E(z,j){const I=k.getOrCreateItemByURL(z),{status:B,exportThing:W,error:K}=I;if(B===m.LOADED)return Promise.resolve(W);if(B===m.ERROR)return Promise.reject(K);if(B===m.LOADING){const{el:Z}=I;return new Promise((Y,ue)=>{b(Z,()=>Y(I.exportThing),ce=>ue(ce.error))})}return R(I,z,j)}function M(z,j){let I=Promise.resolve();const B=z.length-1,{umd:W}=j;return z.forEach((K,Z)=>{const Y=W&&Z===B;I=I.then(()=>E(K,l(f({},j),{umd:Y})))}),I}function V(z){return h(this,null,function*(){const{scripts:j,styles:I}=z;if(I){const{urls:Y}=I;yield y(Y)}const{dependencies:B=[],entry:W,umd:K=!0,crossOrigin:Z="anonymous"}=j;if((W?B.concat([W]):B).length)return yield M(B.concat([W]),{umd:K,crossOrigin:Z})})}function $(z,j){return h(this,null,function*(){const I=j??{};return yield V({scripts:{dependencies:[],entry:z,umd:I.umd,crossOrigin:I.crossOrigin}})})}function re(z){return h(this,null,function*(){return yield V({scripts:{dependencies:[],entry:""},styles:{urls:[z]}})})}const te=V;n.importComponent=V,n.importModule=te,n.importScript=$,n.importStyle=re,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(ko,ko.exports);var ih=ko.exports;function ah(){async function e(t){return await ih.importScript(t)}return{loadWidgetAPI:e}}const yn=i.defineComponent({name:"FXWidgetContainer",props:Ra,setup(e,t){const{loadWidgetAPI:n}=ah(),{deepEqual:u}=oh(),o=i.ref(null),r=i.ref(null),a=i.ref(null),s=i.ref(null),c=i.ref(null),d=i.computed(()=>{const b=vo`width:100%!important`;return Ao("caf-assistant-widget-container__root",b,e.className)}),f=vo`
29
29
  overflow: hidden;
30
- `,c=vi("caf-assistant-widget-container__inner",f),m=o.computed(()=>{const y=wi`
31
- display: ${l.value?"block":"none"};
32
- `;return vi("caf-assistant-widget-container__error",y)}),g=()=>{const y=a.value;y&&(s.value=new uh(y))},p=()=>{const y=s.value;y&&(y.dispose(),s.value=null)},v=()=>{const y=r.value,h=i.value;y&&(y.unmount(),y.dispose()),h&&h.cleanup(),r.value=null,i.value=null},x=async()=>{const y=await n(e.widgetAPIURL);if(!y)throw new Error("Failed to load widget API");await y.initialize();const h=y.createWidget();i.value=y,r.value=h},k=y=>{console.error(y),l.value=y};return o.watch(()=>e.widgetAPIURL,async()=>{if(a.value)try{v(),await x();const y=a.value,h=r.value;h==null||h.updateOptions(e.widgetOptions),h==null||h.updateData(e.widgetData),y&&h&&await h.mount(y)}catch(y){k(y)}}),o.watch(()=>e.widgetOptions,(y,h)=>{try{const b=r.value;b&&(!h||!u(h,y))&&b.updateOptions(y)}catch(b){k(b)}}),o.watch(()=>e.widgetData,(y,h)=>{try{const b=r.value;b&&(!h||!u(h,y))&&b.updateData(y)}catch(b){k(b)}}),o.onMounted(async()=>{try{const y=a.value;if(y){g();const h=s.value;if(h){await x();const b=r.value;b&&(b.updateOptions(e.widgetOptions),b.updateData(e.widgetData),b.mount(h.getElement()),o.nextTick(()=>{y.parentElement&&(y.style.width="100%")}))}}}catch(y){k(y)}}),o.onBeforeUnmount(async()=>{try{v(),p()}catch(y){console.error(y)}}),()=>o.createVNode("div",{class:d.value},[o.createVNode("div",{ref:a,class:c},null),o.createVNode("div",{class:m.value},null)])}}),Va=(e,t)=>{var n;if(e.type===Oe.AssistantWidgetComplete){const u=e;return u.widgetUrl?o.createVNode(yn,{key:`widget-${t}`,widgetAPIURL:u.widgetUrl,widgetOptions:{mode:"embedded",implOptions:u.widgetImplOptions},widgetData:((n=u.widgetData)==null?void 0:n.data)||{}},null):null}return e.type===Oe.AssistantWidgetPending?o.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[o.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),o.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[o.createTextVNode("数据生成中......")])]):null},sh=3e4,Ma=8e3,Le=new Map,Qe=new Map,Jn=new Map,_t=[];function Re(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function eu(e){const t=Re(e);if(t)for(let n=_t.length-1;n>=0;n--)_t[n]===t&&_t.splice(n,1)}function lh(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function tu(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function ch(){return _t[_t.length-1]||void 0}function nu(e,t){const n=Re(t);return n?Re(e.instanceId)===n||e.componentId!=null&&Re(String(e.componentId))===n||e.name!=null&&Re(String(e.name))===n:!1}function ki(e){const t=Re(e);if(!t)return null;const n=Le.get(t);if(n)return{canonicalKey:t,entry:n};for(const[i,r]of Le.entries())if(Re(i)===t)return{canonicalKey:i,entry:r};const u=[];for(const[i,r]of Le.entries())nu(r.config,t)&&u.push({key:i,entry:r});if(u.length===1){const{key:i,entry:r}=u[0];return i!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${i}" (alias match)`),{canonicalKey:i,entry:r}}if(u.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${u.length} pending matches); refusing`),null;if(Le.size===1){const[i,r]=[...Le.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${i}"`),{canonicalKey:i,entry:r}}return null}function Ba(e,t){for(const[n,u]of Qe){const i=Re(n),r=e!==""&&i===e,a=String(t??"").trim(),s=e&&nu(u.config,e)||a&&nu(u.config,a);if(r||s)return console.warn(`[DynamicComponent] register skipped: id "${e||a}" already active (canonical "${n}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function Ci(){return{pendingKeys:[...Le.keys()],bootstrapQueue:[..._t],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function dh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...Ci()})}function fh(e){const t=Re(e);if(t){if(Ba(t,e))return{ok:!1,reason:"already_active_duplicate"};const u=ki(t);if(u)return{ok:!0,...u}}else if(Ba("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<_t.length;n++){const u=_t[n],i=ki(u);if(i)return _t.splice(n,1),t&&Re(u)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${u}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...i}}return{ok:!1,reason:"no_pending"}}function za(e){const t=Re(e);if(!t)return null;const n=Qe.get(t);if(n)return n;for(const[r,a]of Qe.entries())if(Re(r)===t)return a;const u=[];for(const r of Qe.values())nu(r.config,t)&&u.push(r);const i=[...new Map(u.map(r=>[r.config.instanceId,r])).values()];if(i.length===1)return i[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${i[0].config.instanceId}" (alias match)`),i[0];if(i.length>1)return console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${i.length} active matches)`),null;if(Qe.size===1){const r=[...Qe.values()][0];return console.warn(`[DynamicComponent] assistant post id "${t}" unmatched; delivering to sole active instance "${r.config.instanceId}"`),r}return null}function hh(e){const t=Re(e);if(!t)return t;const n=za(t);if(n)return n.config.instanceId;const u=ki(t);return u?u.canonicalKey:Le.size===1?[...Le.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Ei(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function ja(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Ei(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function mh(e){const t=`fluens-dynamic-component-${e.instanceId}`;let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.style.width="100%",n.style.height="100%"),n}function Ha(e){const t=Qe.get(e.instanceId);if(t)return Promise.resolve(t.api);const n=Le.get(e.instanceId);if(n)return new Promise((i,r)=>{const a=n.resolve,s=n.reject;n.resolve=l=>{a(l),i(l)},n.reject=l=>{s(l),r(l)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const u=mh(e);return new Promise((i,r)=>{const a={config:e,container:u,resolve:i,reject:r,timeoutId:0},s=setTimeout(()=>{a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},sh);a.timeoutId=s,Le.set(e.instanceId,a),_t.push(e.instanceId),lh(e.instanceId);const l=document.createElement("script");l.src=(e==null?void 0:e.jsUrl)??"",l.dataset.dynamicComponentId=e.instanceId,l.async=!1,l.onload=()=>{a.postLoadRegisterCheckTimerId=window.setTimeout(()=>{a.postLoadRegisterCheckTimerId=void 0,Le.has(e.instanceId)&&(clearTimeout(s),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${Ma}ms after load: ${e.name||e.componentId}`)))},Ma)},l.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(l)})}function $a(e){var i;const t=Qe.get(e);if(t){try{t.api.unmount()}catch{}(i=t.scriptElement)==null||i.remove(),Qe.delete(e)}const n=Le.get(e);n&&(n.postLoadRegisterCheckTimerId!=null&&(clearTimeout(n.postLoadRegisterCheckTimerId),n.postLoadRegisterCheckTimerId=void 0),clearTimeout(n.timeoutId),Le.delete(e)),Jn.delete(e);const u=document.getElementById(`fluens-dynamic-component-${e}`);u&&u.remove()}function ph(e,t){const n=Re(e);if(!n)return!1;const u=za(n);if(u)return ja(u.api,t);const i=hh(n),r=Jn.get(i)??[],a=r.findIndex(s=>s.messageId===t.messageId);return a>=0?r[a]=Ei(t):r.push(Ei(t)),Jn.set(i,r),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=Ci,window.__fluens_dynamic_component_register=function(e,t){const n=Re(e),u=fh(e);if(!u.ok){if(u.reason==="already_active_duplicate")return;dh(n),console.warn(`[DynamicComponent] no pending for register id "${n}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:i,entry:r}=u;eu(i),tu(i),r.postLoadRegisterCheckTimerId!=null&&(clearTimeout(r.postLoadRegisterCheckTimerId),r.postLoadRegisterCheckTimerId=void 0),clearTimeout(r.timeoutId),Le.delete(i);const a={config:r.config,container:r.container,api:t,scriptElement:document.currentScript};Qe.set(i,a),a.container.parentElement;try{t.mount(r.container,r.config)}catch(l){console.error(`Failed to mount dynamic component: ${i}`,l)}const s=[i];n&&n!==i&&s.push(n);for(const l of s){const d=Jn.get(l);d&&d.length>0&&(Jn.delete(l),d.forEach(f=>ja(t,f)))}r.resolve(t)});const xn=o.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=o.ref("loading"),n=o.ref(""),u=o.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),i=o.computed(()=>e.config.position==="inline"),r=o.computed(()=>!e.config.jsUrl&&!!e.config.url),a=o.computed(()=>({...i.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&i.value?{padding:"16px 0"}:{},...t.value==="ready"&&!i.value?{height:"100%",overflow:"hidden"}:{}}));return o.onMounted(()=>{r.value||(t.value="loading",n.value="",Ha(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),o.onUnmounted(()=>{r.value||$a(e.config.instanceId)}),()=>r.value?null:o.createVNode("div",{class:"f-chat-dynamic-component-body",style:a.value},[o.createVNode("div",{id:u.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&o.createVNode("div",{class:"f-chat-dynamic-component-loading"},[o.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),o.createVNode("span",null,[o.createTextVNode("加载中......")])]),t.value==="error"&&o.createVNode("div",{class:"f-chat-dynamic-component-error"},[o.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[o.createTextVNode("!")]),o.createVNode("span",null,[n.value])])])}}),Ua=(e,t,n)=>{if(e.type===Oe.DynamicComponentComplete){const u=e;if(!u.config)return null;if(u.config.position==="inline")return o.createVNode(xn,{key:`dc-${t}`,config:u.config},null);const i={type:"file",fileContent:{type:"md",name:u.config.title}},r={onPreviewFile:a=>{n.emit("showDynamicComponent",u.config)}};return o.nextTick(()=>n.emit("dynamicComponentsDetected",[u.config])),o.createVNode("div",{style:{padding:"16px 0"}},[n.renderFileEmbeddedContent(i,r)])}return e.type===Oe.DynamicComponentPending?o.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[o.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),o.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[o.createTextVNode("组件加载中......")])]):null};function gh(){return{[Oe.Text]:mf,[Oe.AssistantWidgetComplete]:Va,[Oe.AssistantWidgetPending]:Va,[Oe.DynamicComponentComplete]:Ua,[Oe.DynamicComponentPending]:Ua}}const bh=o.defineComponent({name:"FXBubbleTextContent",props:ec,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=mo(),{propertyStates:u,registerProperty:i,updatePropertyValue:r,startStreaming:a}=Nr();i("title",e.title??""),i("subtitle",e.subtitle??""),i("text",e.text??""),o.watch([()=>e.title,()=>e.subtitle,()=>e.text],([p,v,x])=>{r("title",p??""),r("subtitle",v??""),r("text",x??"")});const s=o.computed(()=>e.textFormat==="markdown"),l=o.ref(!1),d=o.computed(()=>{var p,v,x;return l.value?{title:((p=u.title)==null?void 0:p.displayedValue)??"",subtitle:((v=u.subtitle)==null?void 0:v.displayedValue)??"",text:((x=u.text)==null?void 0:x.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=o.computed(()=>fc(d.value.text)),c={shouldShowMarkdown:s,emit:t.emit,renderFileEmbeddedContent:n},m=gh(),g=()=>f.value.length===0?null:o.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((p,v)=>{var x;return(x=m[p.type])==null?void 0:x.call(m,p,v,c)})]);return o.onMounted(()=>{l.value&&a()}),()=>o.createVNode(o.Fragment,null,[d.value.title&&o.createVNode("div",{class:"f-chat-bubble-content-title"},[d.value.title]),d.value.subtitle&&o.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[d.value.subtitle]),g()])}}),yh={content:{type:Object},outputMode:{type:String,default:"full"}};function ru({status:e}){const t=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`;return o.createVNode("span",{class:t,"aria-hidden":!0},null)}const Wa=100,xh=o.defineComponent({name:"FXBubbleThink",props:yh,setup(e,t){var z;const{propertyStates:n,registerProperty:u,updatePropertyValue:i,isAllDone:r}=Nr(),{elapsedSeconds:a,hasEverStarted:s,start:l,stop:d,reset:f}=zu(),c=o.ref(((z=e.content)==null?void 0:z.completed)!==!0),m=o.ref(null),g=o.ref(null),p=o.ref(!1),v=o.ref(!1),x=o.computed(()=>e.outputMode==="streaming"),k=o.computed(()=>{var M;return(M=e.content)==null?void 0:M.completed}),y=o.computed(()=>{var $,F,R;const M=($=h.value)==null?void 0:$.trim(),I=M?M.slice(0,8):"",B=M&&M.length>8?"…":"",D=I?`<span class="f-chat-bubble-thinking-preview">${I}${B}</span>`:"";if(k.value){const O=s.value?`(用时${a.value}秒)`:"";return(((F=e.content)==null?void 0:F.title)??"思考完成"+O)+D}return(((R=e.content)==null?void 0:R.title)??"正在思考......")+D}),h=o.computed(()=>{var M,I;return x.value?((M=n.content)==null?void 0:M.displayedValue)??"":((I=e.content)==null?void 0:I.content)??""}),b=o.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!k.value,"is-completed":k.value})),w=()=>{const M=m.value;if(!M||!p.value){v.value=!1;return}v.value=M.scrollTop>0};o.watch(()=>k.value,M=>{M?d():l()},{immediate:!0}),o.watch(()=>k.value,M=>{M&&(c.value=!1)}),o.watch(()=>e.content,M=>{M&&(n.content?i("content",M.content??""):u("content",M.content??""))},{immediate:!0}),o.watch(h,async()=>{if(c.value){await o.nextTick();const M=g.value;if(!M)return;await o.nextTick(),p.value=M.scrollHeight>Wa;const I=m.value;I&&p.value&&(I.scrollTop=I.scrollHeight,v.value=!0)}},{immediate:!0}),o.watch(c,async M=>{if(M){await o.nextTick();const I=g.value;if(!I)return;await o.nextTick(),p.value=I.scrollHeight>Wa;const B=m.value;B&&p.value&&(B.scrollTop=B.scrollHeight,v.value=!0)}}),o.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(x.value?r.value:!0)&&k.value:!0}}});const C=()=>{c.value=!c.value},E=()=>k.value?null:o.createVNode(ru,{status:"Working"},null),_=()=>!h.value||!c.value?null:o.createVNode("div",{class:"f-chat-bubble-thinking-content"},[o.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:m,onScroll:w},[p.value&&v.value&&o.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),o.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[o.createVNode("div",{ref:g,class:"f-chat-bubble-thinking-content-text",innerHTML:h.value},null)])])]);return()=>o.createVNode("div",{class:b.value},[o.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:C},[E(),o.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:y.value},null),h.value&&o.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:c.value?"rotate(90deg)":"rotate(0deg)",transition:"all 0.3s ease-in-out"}},null)]),_()])}}),wh={content:{type:Object}},Ga={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Object,default:o.ref(0)},offsetY:{type:Object,default:o.ref(0)},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function}};function vh(e){const t=e.host?e.host:"body",n=o.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),u=o.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),i=o.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),r=o.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),a=o.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:i,hostTop:n,hostWidth:r,hostHeight:a,hostBottom:u}}function Ah(e,t,n,u){const i=o.ref(e.offsetX||0),r=o.ref(e.offsetY||0),a=o.ref(-1),s=o.ref(-1),l=o.ref(-1),d=o.ref(-1),f=o.ref(e.placement),c=o.ref(0),m=o.ref(0),g=o.ref(0),p=o.computed(()=>document.documentElement.scrollLeft),v=o.computed(()=>document.documentElement.scrollTop),{hostLeft:x,hostTop:k,hostWidth:y,hostHeight:h,hostBottom:b}=u;o.watch(()=>e.offsetX,T=>{i.value=T});const w=o.computed(()=>{const T={left:`${m.value}px`,top:`${g.value}px`,transform:`translate(${i.value}px, ${r.value}px)`};return e.zIndex!==-1&&(T["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&n.value&&a.value>=n.value.getBoundingClientRect().width&&(T.width=`${a.value}px`):a.value!==-1&&(T.width=`${a.value}px`),e.minWidth!==-1&&(T.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(T,e.customStyles),s.value>0&&(T.maxHeight=s.value+"px"),T}),C=o.computed(()=>({left:`${c.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function E(T){if(T&&e.keepWidthWithReference){const L=T.getBoundingClientRect();a.value=Math.max(e.minWidth,L.width)}}function _(T,L){const W=y.value-T.width-4;return W>0?W:L}function z(T,L){const W=h.value-T.height-12;return W>0?W:L}function M(T,L,W){const K=c.value,Z=L.left-x.value+L.width/2+p.value,Y=L.top-k.value-(T.height+W.height)+v.value;return{popoverLeft:Z,popoverTop:Y,arrowLeft:K}}function I(T,L,W){const K=L.top-k.value+(L.height+W.height)+v.value,Z=z(T,K);return Math.min(K,Z)}function B(T,L){const W=_(L,T),K=T<=W?c.value:T-W;return{popoverLeft:Math.min(T,W),arrowLeft:K,maxHeight:0}}function D(T,L){const W=_(L,T),K=T<=W?c.value:T-W;return{popoverLeft:T,arrowLeft:K,maxHeight:0}}function H(T,L,W){const K=L.left-x.value+p.value,{arrowLeft:Z,popoverLeft:Y}=D(K,T),{popoverTop:ue}=M(T,L,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function $(T,L,W){const K=L.left-x.value+L.width/2-(W.width/2-(T.left-x.value))+p.value,{arrowLeft:Z,popoverLeft:Y}=B(K,T),ue=I(T,L,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function F(T,L,W){const K=L.left-x.value+p.value,{arrowLeft:Z,popoverLeft:Y}=B(K,T),ue=I(T,L,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function R(T,L,W){const K=L.left-x.value;let Z=0,Y=0,ue=0,le=0,De="bottom-left";window.innerWidth-K>T.width?Z=K+p.value:(Z=L.right-T.width+p.value,ue=T.width-W.width-20);let Te=0;if(e.limitContentBySpace){const Xt={topHeight:L.top-k.value-W.height-8,bottomHeight:b.value-L.bottom-W.height-8};Te=Math.max(Xt.topHeight,Xt.bottomHeight),T.height>Te&&(le=Te,n.value.classList.add("popover-limitmax"))}const yt=le?Math.floor(le):T.height,Me=L.top-k.value+(L.height+W.height);return b.value-Me>yt?Y=Me+v.value:(Y=L.top-yt-W.height+v.value,b.value-Me>L.top?(Y=Me+v.value,yt>L.top&&(Y=b.value-yt)):(Y=Y<0?0:Y,De="top")),n.value.classList.add("popover-"+De,"bs-popover-"+De),{popoverLeft:Z<0?5:Z,popoverTop:Y,arrowLeft:ue,maxHeight:le}}function O(T,L,W){const K=L.left+L.width,Z=Math.max(L.top-(T.height/2-L.height/2),k.value);let Y=k.value+h.value-T.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}function U(T,L,W){const K=L.left+L.width,Z=Math.max(L.top-L.height,k.value);let Y=k.value+h.value-T.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}const re=new Map([["top",M],["top-left",H],["bottom",$],["bottom-left",F],["right",O],["right-top",U],["auto",R]]);function te(T){var Y;e.keepWidthWithReference&&E(T);const L=T.getBoundingClientRect();l.value=L.top,d.value=L.left;const W=t.value?t.value.getBoundingClientRect():{height:4,width:4},K=(Y=n.value)==null?void 0:Y.getBoundingClientRect();a.value=K.width;const Z=re.get(f.value);if(Z){const{arrowLeft:ue,popoverLeft:le,popoverTop:De,maxHeight:Te}=Z(K,L,W);c.value=ue,m.value=le,g.value=De,s.value=Te||-1}}function P(T){if(T){const L=T.getBoundingClientRect();(L.left!==d.value||L.top!==l.value)&&te(T)}}function V(){f.value=e.placement,c.value=0,m.value=0,g.value=0,a.value=-1}return{arrowStyle:C,popoverStyle:w,position:f,popoverWidth:a,fitToReference:E,followToReferencePosition:P,locateToReference:te,resetPosition:V}}function kh(e,t,n,u,i,r,a){const s=o.ref(e.visible),l=o.computed(()=>s.value),{fitToReference:d,locateToReference:f,resetPosition:c}=a;let m;async function g(){s.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(s.value=!1,document.body.removeEventListener("click",m),document.body.removeEventListener("mousedown",m),document.body.removeEventListener("wheel",m,!0),document.removeEventListener("scroll",m),c(),t.emit("hidden")))}m=v=>{var y;if(!i.value)return;const x=i.value.contains(v.target);if(v.type==="scroll"||v.type==="wheel"&&x){g();return}if(v.target.closest(".time-picker-panel"))return;const k=(y=v.target)==null?void 0:y.closest(".popover");if(k&&u.value&&k===u.value){v.type!=="scroll"&&v.type!=="wheel"&&v.stopPropagation();return}if(!x&&s.value){const h=i.value.closest(".popover");h&&h.removeEventListener("click",m),g()}};async function p(v){if(u.value&&(e.showArrow===!1||e.showArrow&&n.value)&&v){c(),s.value=!0,i.value=v,r.value&&d(v),await o.nextTick(),f(v),document.body.addEventListener("click",m),document.body.addEventListener("mousedown",m),document.body.addEventListener("wheel",m,!0),document.addEventListener("scroll",m),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",m));const x=v.closest(".popover");x&&x.addEventListener("click",m),t.emit("shown")}}return t.expose({hide:g,popoverRef:u,show:p,shown:l,isShow:s}),{showPopover:s,hidePopverOnClickBodyHandler:m}}function Ch(e,t,n,u,i,r){const{popoverWidth:a,fitToReference:s,followToReferencePosition:l}=i;function d(){var f;if(r.value&&((f=r.value.style)==null?void 0:f.display)!=="none"&&n.value){l(n.value);const c=n.value.getBoundingClientRect();u.value&&c.width!==a.value&&s(n.value)}}return{onResize:d}}function Eh(e,t=500){const n=o.ref(e.value);let u;const i=o.watch(e,a=>{clearTimeout(u),u=setTimeout(()=>{n.value=a},t)}),r=()=>{clearTimeout(u),i()};return o.onUnmounted(r),{delayedValue:n,cleanup:r}}const Kt=o.defineComponent({name:"FXPopover",props:Ga,emits:["shown","hidden"],setup(e,t){const n=o.ref(),u=o.ref(),i=o.ref(e.reference),r=o.ref(e.keepWidthWithReference),a=o.computed(()=>!!e.title),s=vh(e),{host:l}=s,d=Ah(e,n,u,s),{position:f,arrowStyle:c,popoverStyle:m,fitToReference:g,locateToReference:p}=d,{showPopover:v,hidePopverOnClickBodyHandler:x}=kh(e,t,n,u,i,r,d),{onResize:k}=Ch(e,t,i,r,d,u),y=o.computed(()=>{let E=f.value;E==="top-left"&&(E="top");const _=`popover in popover-${E}`,z=`bs-popover-${E}`,M={"popover-fitcontent":e.fitContent,fade:!0};M[_]=!0,M[z]=!0;const I=(e.class||"").split(" ");return e.isSimpleTips&&I.unshift("popover-tips"),I.reduce((B,D)=>(B[D]=!0,B),M),M}),h=o.computed(()=>({"popover-content":!0,"popover-body":!0})),b=o.computed(()=>{const E={};return E.opacity=v.value?1:0,E.visibility=v.value?"visible":"hidden",E.zIndex=1060,E}),w=o.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:C}=Eh(b,50);return o.onMounted(()=>{var E;r.value&&g(i.value),e.reference&&p(i.value),window.addEventListener("resize",k),(E=u.value)==null||E.focus()}),o.onUnmounted(()=>{document.body.removeEventListener("click",x),window.removeEventListener("resize",k),v.value=!1}),()=>o.createVNode(o.Teleport,{to:l},{default:()=>{var E;return[o.withDirectives(o.createVNode("div",{tabindex:"-1",ref:u,class:y.value,style:{...m.value,...C.value},onMousedown:_=>{_.stopPropagation()},onClick:_=>{_.stopPropagation()}},[w.value&&o.createVNode("div",{ref:n,class:"popover-arrow arrow",style:c.value},null),a.value&&o.createVNode("h3",{class:"popover-title popover-header"},[e.title]),o.createVNode("div",{class:h.value},[t.slots.default&&((E=t.slots)==null?void 0:E.default())])]),[[o.vShow,v.value]])]}})}}),uu="FarrisX_PopoverInstancesKey";window[uu]=window[uu]||new WeakMap;function _i(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&!u.value.isShow&&(u.value.show(n),window[uu].set(n,u.value))}function Xa(e,t,n){e.stopPropagation(),t.value.value.hide(),window[uu].delete(n)}function _h(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&(u.value.isShow?Xa(e,t,n):_i(e,t,n))}function qa(e,t,n){t.arg&&t.arg==="toggle"?_h(e,t,n):_i(e,t,n)}const Za={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",u=>_i(u,t,e)),e.addEventListener("mouseleave",u=>Xa(u,t,e))):t.modifiers.click?e.addEventListener("click",u=>qa(u,t,e)):e.addEventListener("click",u=>qa(u,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Kt.install=e=>{e.component(Kt.name,Kt),e.directive("fxpopover",Za)};const Ya={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"}},Ka={items:{type:Array,default:()=>[]}},Qa={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},iu=o.defineComponent({name:"FXTodoListItemView",props:Qa,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:u,updatePropertyValue:i,startStreaming:r}=Nr();u("title",e.title??""),u("task",e.task??""),o.watch([()=>e.title,()=>e.task],([m,g])=>{i("title",m??""),i("task",g??"")});const a=o.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),s=o.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function l(){t("click",e,e.id)}const d=o.computed(()=>e.outputMode==="streaming"),f=o.computed(()=>{var m;return d.value?((m=n.title)==null?void 0:m.displayedValue)??"":e.title??""}),c=o.computed(()=>{var m;return d.value?((m=n.task)==null?void 0:m.displayedValue)??"":e.task??""});return o.computed(()=>{var m;return d.value?((m=n.detail)==null?void 0:m.displayedValue)??"":e.message??""}),o.onMounted(()=>{d.value&&r()}),()=>o.createVNode("li",{key:e.id,class:a.value,onClick:l},[e.todoList&&e.todoList.length>0&&o.createVNode(Qt,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&o.createVNode(o.Fragment,null,[e.showLoading&&o.createVNode(ru,{status:e.status??"Done"},null),f.value?o.createVNode("div",{class:"f-chat-todo-task-wrapper"},[o.createVNode("span",{class:s.value},[f.value]),o.createVNode("div",{class:"f-chat-todo-task-description"},[c.value])]):o.createVNode("div",{class:s.value},[c.value])])])}}),er=o.defineComponent({name:"FXTodoListView",props:Ka,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?o.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((n,u)=>o.createVNode(iu,o.mergeProps({key:u},n),null))]):null}}}),Sh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e编组%207%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M7.55915932,0%20L13.7556941,3.41136535%20L13.7556941,11.284674%20L13.3483936,11.690778%20L7.386,8.406%20L7.38699821,14.9818613%20L6.43606745,14.9818613%20L0.817648054,11.8789694%20L0,10.332184%20L0,3.84230019%20L1.11160458,3.1505903%20L6.167,6.164%20L6.16702601,0.0484363034%20L7.55915932,0%20Z%20M6.22734637,8.44496623%20L1.7439756,11.0288454%20L6.22734637,13.5008368%20L6.22734637,8.44496623%20Z%20M12.540835,4.77769015%20L8.0314841,7.40118228%20L12.540835,9.89639007%20L12.540835,4.77769015%20Z%20M1.21847977,4.6422718%20L1.21847977,9.89639007%20L5.74466316,7.33704011%20L1.21847977,4.6422718%20Z%20M7.38699821,1.29872452%20L7.38699821,6.38587585%20L11.9618229,3.74647178%20L7.38699821,1.29872452%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='输入框'%20transform='translate(-383,%20-2915)'%3e%3cg%20id='编组-3'%20transform='translate(353,%202900)'%3e%3cg%20id='编组-12'%20transform='translate(16,%200)'%3e%3cg%20id='编组-7'%20transform='translate(14,%2015)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.2571,%200.2571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='17.4857143'%20height='17.4857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(1.0286,%200.5143)'%3e%3cpath%20d='M8.37444647,0.834547606%20L14.5709813,4.24591296%20L14.5709813,12.1192216%20L14.1636807,12.5253256%20L8.20128715,9.24054761%20L8.20228536,15.8164089%20L7.25135461,15.8164089%20L1.63293521,12.713517%20L0.815287151,11.1667316%20L0.815287151,4.67684779%20L1.92689173,3.98513791%20L6.98228715,6.99854761%20L6.98231316,0.882983909%20L8.37444647,0.834547606%20Z%20M7.04263352,9.27951383%20L2.55926275,11.8633931%20L7.04263352,14.3353844%20L7.04263352,9.27951383%20Z%20M13.3561221,5.61223775%20L8.84677126,8.23572989%20L13.3561221,10.7309377%20L13.3561221,5.61223775%20Z%20M2.03376692,5.47681941%20L2.03376692,10.7309377%20L6.55995031,8.17158771%20L2.03376692,5.47681941%20Z%20M8.20228536,2.13327213%20L8.20228536,7.22042346%20L12.77711,4.58101939%20L8.20228536,2.13327213%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(0.8153,%200.8345)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='4.25315881%206.97898081%206.77390576%206.97898081%207.02656062%208.27871177%202.85827337%2011.0934106%201.11764364%208.72438079'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='7.02656062%206.72375166%208.13485635%204.53274022%208.34127598%201.90699543%205.4451985%201.76583085%205.65253089%205.06118714%206.77390576%206.72375166'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='10.0650382%207.40118228%207.32091739%207.49951705%207.32091739%208.25868082%208.54200343%2010.0061721%2010.9306691%2010.9000701%2012.5091187%208.51626021'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M8.37444647,0.834547606%20L14.5709813,4.24591296%20L14.5709813,12.1192216%20L14.1636807,12.5253256%20L6.98231316,8.56885311%20L6.98231316,0.882983909%20L8.37444647,0.834547606%20Z%20M8.20228536,2.13327213%20L8.20228536,7.22042346%20L8.49131316,7.05254761%20L8.49185956,7.71336245%20L9.03131316,8.12754761%20L8.84677126,8.23572989%20L13.3561221,10.7309377%20L13.3553132,5.61654761%20L13.6305018,5.15381301%20L12.77711,4.58101939%20L8.20228536,2.13327213%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='6.7778308%208.05322127%207.08945008%209.24101764%202.55926275%2011.8633931%202.19155022%2010.6380421'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M7.62936495,9.94195975%20C8.65711289,9.94195975%209.49026721,9.10880543%209.49026721,8.08105749%20C9.49026721,7.05330955%208.65711289,6.22015523%207.62936495,6.22015523%20C6.60161701,6.22015523%205.7684627,7.05330955%205.7684627,8.08105749%20C5.7684627,9.10880543%206.60161701,9.94195975%207.62936495,9.94195975%20Z%20M13.9785177,6.03107309%20C14.7793603,6.03107309%2015.4285714,5.38186193%2015.4285714,4.58101939%20C15.4285714,3.78017684%2014.7793603,3.13096568%2013.9785177,3.13096568%20C13.1776752,3.13096568%2012.528464,3.78017684%2012.528464,4.58101939%20C12.528464,5.38186193%2013.1776752,6.03107309%2013.9785177,6.03107309%20Z%20M7.62936495,16.4714598%20C8.4302075,16.4714598%209.07941866,15.8222486%209.07941866,15.0214061%20C9.07941866,14.2205635%208.4302075,13.5713524%207.62936495,13.5713524%20C6.8285224,13.5713524%206.17931125,14.2205635%206.17931125,15.0214061%20C6.17931125,15.8222486%206.8285224,16.4714598%207.62936495,16.4714598%20Z%20M1.45005371,13.0387617%20C2.25089625,13.0387617%202.90010741,12.3895505%202.90010741,11.588708%20C2.90010741,10.7878654%202.25089625,10.1386543%201.45005371,10.1386543%20C0.649211158,10.1386543%200,10.7878654%200,11.588708%20C0,12.3895505%200.649211158,13.0387617%201.45005371,13.0387617%20Z%20M7.62936495,2.51342642%20C8.32342849,2.51342642%208.88607816,1.95077675%208.88607816,1.25671321%20C8.88607816,0.56264967%208.32342849,0%207.62936495,0%20C6.93530141,0%206.37265174,0.56264967%206.37265174,1.25671321%20C6.37265174,1.95077675%206.93530141,2.51342642%207.62936495,2.51342642%20Z%20M13.9785177,12.9913309%20C14.6725813,12.9913309%2015.2352309,12.4286812%2015.2352309,11.7346177%20C15.2352309,11.0405541%2014.6725813,10.4779045%2013.9785177,10.4779045%20C13.2844542,10.4779045%2012.7218045,11.0405541%2012.7218045,11.7346177%20C12.7218045,12.4286812%2013.2844542,12.9913309%2013.9785177,12.9913309%20Z%20M1.45005371,5.50262617%20C2.14411725,5.50262617%202.70676692,4.9399765%202.70676692,4.24591296%20C2.70676692,3.55184942%202.14411725,2.98919975%201.45005371,2.98919975%20C0.755990164,2.98919975%200.193340494,3.55184942%200.193340494,4.24591296%20C0.193340494,4.9399765%200.755990164,5.50262617%201.45005371,5.50262617%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Fh=300,Dh={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Qt=o.defineComponent({name:"FXStartedTodo",props:Ya,setup(e){const t=o.ref(null),n=o.ref(null),u=o.ref(null),i=o.ref(null),r=o.computed(()=>e.outputMode==="streaming"),{displayContent:a}=fo(()=>({detail:e.taskDetail??""}),()=>!0,r,{charInterval:30}),s=o.ref(e.initExpanded),l=o.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!s.value}));function d(){e.detailViewMode!=="expand"&&(i.value!=null&&(window.clearTimeout(i.value),i.value=null),u.value=window.setTimeout(()=>{t.value&&n.value&&n.value.show(t.value),u.value=null},Fh))}function f(){e.detailViewMode!=="expand"&&(u.value!=null&&(window.clearTimeout(u.value),u.value=null),i.value=window.setTimeout(()=>{var x,k;(k=(x=n.value)==null?void 0:x.hide)==null||k.call(x),i.value=null},150))}function c(){if(e.detailViewMode==="none")return null;const x=a.value.detail??"";return o.createVNode(o.Fragment,null,[x?o.createVNode("div",{class:"f-chat-started-todo-task-detail"},[x]):null,o.createVNode(er,{items:e.todoList},null)])}function m(){e.detailViewMode==="expand"&&(s.value=!s.value)}function g(){return e.detailViewMode==="expand"?o.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:s.value?"rotate(90deg)":"rotate(0deg)",transition:"all 0.3s ease-in-out"}},null):null}function p(){return e.detailViewMode==="hover"&&o.createVNode(Kt,{ref:n,class:"f-chat-started-todo-popover"},{default:()=>[o.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{i.value!=null&&(window.clearTimeout(i.value),i.value=null)},onMouseleave:f},[c()])]})}function v(){return e.showLoading?e.loading?e.loading:e.status==="Done"?o.createVNode("img",{src:Sh},null):o.createVNode(ru,{status:e.status},null):null}return()=>o.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working"}],onMouseenter:d,onMouseleave:f},[o.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:m},[e.showLabel&&o.createVNode("span",{class:"f-chat-started-todo-label"},[Dh[e.status]]),v(),o.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),g()]),e.detailViewMode==="expand"&&o.createVNode("div",{class:l.value},[c()]),p()])}});Qt.install=e=>{e.component(Qt.name,Qt)};const Th=o.defineComponent({name:"FXBubbleThoughtChain",props:wh,setup(e,t){const{elapsedSeconds:n,hasEverStarted:u,start:i,stop:r,reset:a}=zu(),s=o.computed(()=>{var c;return((c=e.content)==null?void 0:c.status)==="Done"}),l=o.computed(()=>{var c;return((c=e.content)==null?void 0:c.message)??"正在思考......"}),d=o.computed(()=>{var g,p;const c=((g=e.content)==null?void 0:g.doneMessage)??((p=e.content)==null?void 0:p.message)??"思考完成",m=u.value?`(用时${n.value}秒)`:"";return""+c+m}),f=o.computed(()=>s.value?d.value:l.value);return o.watch(()=>{var c;return(c=e.content)==null?void 0:c.status},c=>{c==="Working"?i():c==="Done"?r():a()},{immediate:!0}),o.onUnmounted(()=>{a()}),t.expose({instance:{get loadDone(){return e.content?s.value:!0}}}),()=>{var c,m,g;return e.content?o.createVNode(Qt,{status:((c=e.content)==null?void 0:c.status)??"Working",message:f.value,todoList:(m=e.content)==null?void 0:m.todoList,detailViewMode:((g=e.content)==null?void 0:g.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0},null):null}}}),tr=o.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>o.createVNode("div",{class:"f-ec-auth"},[o.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),o.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>o.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var n;(n=e.onConfirm)==null||n.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),Nh=300,wn=o.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=o.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),n=o.computed(()=>e.content.success===!1),u=o.ref(!1);let i=setTimeout(()=>{u.value=!0},Nh);o.onBeforeUnmount(()=>{i&&clearTimeout(i)});const r=o.computed(()=>t.value),a=o.computed(()=>u.value&&!t.value),s=o.computed(()=>n.value?"执行失败":r.value?"执行完成":"调用中"),l=o.ref(!1),d=o.computed(()=>({"f-chat-tool-use":!0,"is-done":r.value,"is-error":n.value})),f=o.computed(()=>({"f-chat-tool-use-status":!0,"is-done":r.value&&!n.value,"is-run":a.value&&!n.value,"is-error":n.value}));o.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(l.value=!1)},{flush:"post"});const c=()=>t.value?o.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>o.createVNode("div",{class:d.value},[o.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{l.value=!l.value}},[o.createVNode("i",{class:"fx-icon fx-icon-thinking_tool tool-icon"},null),o.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),o.createVNode("div",{class:f.value},[n.value?o.createVNode("i",{class:"fx-icon fx-icon-fail_line f-chat-tool-use-status-icon","aria-hidden":"true"},null):o.createVNode(ru,{status:r.value?"Done":a.value?"Working":"NotStart"},null),o.createVNode("span",{class:"f-chat-tool-use-status-text"},[s.value])]),o.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:l.value?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},null)]),l.value&&o.createVNode("div",{class:"f-chat-tool-use-content"},[c()])])}});wn.install=e=>{e.component(wn.name,wn)};const nr=o.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":tr,"fx-app-preview-inline":at,FXToolUse:wn},props:Fr,setup(e,t){const n=o.shallowRef(),u=o.ref(),i=o.ref(),r=o.computed(()=>!!e.showAvatar),a=o.computed(()=>r.value===!0||e.header==="ContentHeader"),s=o.computed(()=>t.slots.leftFooter||t.slots.rightFooter),l=o.computed(()=>{var D;return Ae({},(D=e.styles)==null?void 0:D.footer)}),d=D=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(D.type==="md"&&D.content){e.onPreview({content:D.content,contentType:"markdown"});return}if(D!=null&&D.url){const H=D!=null&&D.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:D.url,previewMode:H,title:D.name})}}},f=D=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const H=D==null?void 0:D.filter(F=>F.type==="md"&&F.content);if(H.length===0)return;const $=Object.fromEntries(H.map(F=>[F.name,F.content??""]));e.onPreview({contentMap:$,contentType:"markdown"})},{renderFileEmbeddedContent:c,renderPageEmbeddedContent:m}=mo(),g=o.ref(""),p=o.computed(()=>{var H,$;if((H=e.content)!=null&&H.footerContent)return e.content.footerContent;const D=($=e.content)==null?void 0:$.structuredContent;return D&&(D.footerTemplate||D.footerUrl||D.footerFile)?{type:D.footerUrl?"page":D.footerFile?"file":"template",pageUrl:D.footerUrl,fileContent:D.footerFile,template:D.footerTemplate,width:D.footerWidth,height:D.footerHeight}:null});o.watch(()=>{var D;return(D=p.value)==null?void 0:D.width},D=>{if(!D){g.value="";return}if(D.endsWith("%")){const H=parseFloat(D);isNaN(H)||o.nextTick(()=>{var F,R;const $=(R=(F=n.value)==null?void 0:F.parentElement)==null?void 0:R.clientWidth;$&&(g.value=`${$*H/100}px`)})}else g.value=D},{immediate:!0});const v=D=>{if(!D||D.length===0)return"我";const H=D.charAt(0);return/[\u4e00-\u9fa5]/.test(H)?H:H.toUpperCase()};function x(){return e.header==="ContentHeader"?Gl:Xl}const k=x(),{renderHeader:y}=k(e,t),h=()=>{var $,F,R;const D=(($=e.content)==null?void 0:$.sender)??"发送人",H=v(((F=e.content)==null?void 0:F.sender)??"");return o.createVNode("div",{class:"f-chat-bubble-avatar"},[(R=e.content)!=null&&R.avatar?o.createVNode("img",{src:e.content.avatar,alt:D},null):o.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[H])])},b=()=>{var H;const D=(H=e.content)==null?void 0:H.toolUseAboveText;return D!=null&&D.length?o.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[D.map(($,F)=>o.createVNode(wn,{key:$.toolUseId??`tu-${F}`,content:$},null))]):null},w=()=>{var D;return(D=e.content)!=null&&D.thinkingContent?o.createVNode(xh,{ref:u,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},C=()=>{var D;return(D=e.content)!=null&&D.startedTodo?o.createVNode(Th,{ref:i,content:e.content.startedTodo},null):null},E=D=>{if(!(D!=null&&D.type))return null;const{type:H}=D;return H==="page"&&D.pageUrl?m(D,{onNavigate:$=>{var F;(F=e.onPreview)==null||F.call(e,{url:$})}}):H==="file"&&D.fileContent?c(D,{onPreviewFile:d,onBatchPreviewFile:f}):H==="template"&&D.template?D.template():null},_=()=>{var F,R,O;if(!((O=(R=(F=e.content)==null?void 0:F.structuredContent)==null?void 0:R.sections)!=null&&O.length))return null;const{sections:D,showDivider:H}=e.content.structuredContent,$=U=>{const{content:re,label:te}=U;return te||re&&typeof re=="string"?o.createVNode(o.Fragment,null,[o.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),U.label&&o.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[U.label]),o.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[U.content])]):E(U.content)};return o.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":H}]},[D.map((U,re)=>o.createVNode("div",{key:re,class:["f-chat-bubble-structured-section",{"section-divider":U.showDivider}]},[o.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[U.icon&&(U.icon.startsWith("http")||U.icon.startsWith("//")||U.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(U.icon)?o.createVNode("img",{alt:U.title,src:U.icon,class:"f-chat-bubble-structured-section-icon"},null):o.createVNode("i",{class:`fx-icon ${U.icon}`,style:U.iconStyle},null)),o.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[U.title])]),U.items&&U.items.length>0&&o.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[U.items.map((te,P)=>o.createVNode("div",{key:P,class:"f-chat-bubble-structured-section-item"},[$(te)]))])]))])},z=()=>{const D=p.value;if(!D)return null;const H={};return g.value&&(H.width=g.value),D.height&&(H.height=`${D.height}px`),o.createVNode("div",{class:"f-chat-bubble-content-footer",style:H},[E(D)])},M=()=>{const D=e.attachmentRowClickOpensPreview!==!1?d:void 0;return o.createVNode(ho,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:D,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?f:void 0},null)},I=()=>{var H;const D=(H=e.content)==null?void 0:H.compositeInlineBlocks;return D!=null&&D.length?D.map(($,F)=>$.kind==="userAuth"?o.createVNode(o.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${F}`,content:$.content,onConfirm:e.onUserAuthConfirm},null):o.createVNode(o.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${F}`,content:$.content,onOpen:e.onPreview},null)):null},B=()=>{var D,H,$,F,R,O;return o.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&y(),M(),o.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(D=e.content)!=null&&D.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():o.createVNode(o.Fragment,null,[w(),b()]),C(),_(),o.createVNode(bh,{title:((H=e.content)==null?void 0:H.title)??"",subtitle:(($=e.content)==null?void 0:$.subtitle)??"",text:typeof((F=e.content)==null?void 0:F.text)=="string"?e.content.text:"",textFormat:((R=e.content)==null?void 0:R.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),z(),(O=e.compositeTailRender)==null?void 0:O.call(e),I()]),s.value&&o.createVNode("div",{class:"f-chat-bubble-footer",style:l.value},[t.slots.leftFooter&&o.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&o.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>o.createVNode("div",{class:"f-chat-bubble-container",ref:n},[o.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?o.createVNode(o.Fragment,null,[r.value&&h(),B()]):o.createVNode(o.Fragment,null,[B(),r.value&&h()])])])}}),Ja={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},Si=o.defineComponent({name:"FXBubbleAction",props:Ja,setup(e,t){const n=o.computed(()=>Ae({},e.customStyle));return()=>t.slots.default&&o.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});nr.install=e=>{e.component(nr.name,nr),e.component(Si.name,Si)};const es={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},ts={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},ou=o.defineComponent({name:"FXCarouselItem",props:ts,emits:["click"],setup(e,{slots:t,emit:n}){const u=o.computed(()=>{var c;const f={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return ye(f,(c=e.classNames)==null?void 0:c.item)}),i=o.computed(()=>{var c,m;const f=Ae({},(c=e.styles)==null?void 0:c.item);return Ae(f,(m=e.styles)==null?void 0:m.item)}),r=()=>{var f,c,m;return e.item.image?o.createVNode("img",{class:["fx-carousel--item-image",(f=e.classNames)==null?void 0:f.image],style:(c=e.styles)==null?void 0:c.image,src:e.item.image,alt:(m=e.item.title)==null?void 0:m.toString()},null):null},a=()=>{var f,c,m,g;return e.item.content?o.createVNode("div",{class:["fx-carousel--item-content",(f=e.classNames)==null?void 0:f.content],style:(c=e.styles)==null?void 0:c.content},[e.item.content]):t.default?o.createVNode("div",{class:["fx-carousel--item-content",(m=e.classNames)==null?void 0:m.content],style:(g=e.styles)==null?void 0:g.content},[t.default()]):null},s=()=>{var f,c;return e.item.title?o.createVNode("h3",{class:["fx-carousel--item-title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[e.item.title]):null},l=()=>{var f,c;return e.item.description?o.createVNode("p",{class:["fx-carousel--item-description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.item.description]):null},d=f=>{e.item.disabled||n("click",f,e.item,e.index)};return()=>o.createVNode("div",{class:u.value,style:i.value,onClick:d},[r(),a(),e.showInfo&&o.createVNode("div",{class:"fx-carousel--item-info"},[s(),l()])])}});function Lh(e){const{items:t,autoplay:n=!1,interval:u=3e3,loop:i=!0,direction:r="horizontal"}=e,a=o.ref(0),s=o.ref(!1),l=o.ref(null),d=o.computed(()=>t.length),f=o.computed(()=>d.value<=1);o.computed(()=>a.value===0?i?d.value-1:0:a.value-1),o.computed(()=>a.value===d.value-1?i?0:a.value:a.value+1);const c=o.computed(()=>{const h=-a.value*100;return{transform:r==="horizontal"?`translateX(${h}%)`:`translateY(${h}%)`,transition:"transform 0.5s ease"}}),m=h=>{h<0||h>=d.value||(a.value,a.value=h)},g=()=>{f.value||(a.value===d.value-1?m(i?0:a.value):m(a.value+1))},p=()=>{f.value||(a.value===0?m(i?d.value-1:0):m(a.value-1))},v=()=>{!n||f.value||(x(),l.value=window.setInterval(()=>{s.value||g()},u))},x=()=>{l.value&&(clearInterval(l.value),l.value=null)},k=()=>{s.value=!0,n&&x()},y=()=>{s.value=!1,n&&v()};return o.onMounted(()=>{v()}),o.onUnmounted(()=>{x()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:c,goTo:m,next:g,prev:p,handleMouseEnter:k,handleMouseLeave:y}}const rr=o.defineComponent({name:"FXCarousel",props:es,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:n}){const{currentIndex:u,isSingleItem:i,trackStyle:r,goTo:a,next:s,prev:l,handleMouseEnter:d,handleMouseLeave:f}=Lh({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),c=w=>{n("update:modelValue",w),n("change",w,u.value)},m=o.computed(()=>{var C;const w={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":i.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return ye(w,(C=e.classNames)==null?void 0:C.root)}),g=o.computed(()=>{var E;const w={height:typeof e.height=="number"?`${e.height}px`:e.height},C=Ae(w,e.customStyle);return Ae(C,(E=e.styles)==null?void 0:E.root)}),p=o.computed(()=>{var C;const w={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(w,(C=e.classNames)==null?void 0:C.container)}),v=o.computed(()=>{var C;return ye({"fx-carousel--track":!0},(C=e.classNames)==null?void 0:C.track)}),x=o.computed(()=>{var C;const w={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return ye(w,(C=e.classNames)==null?void 0:C.indicator)}),k=w=>{var E,_;const C={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":w==="left","fx-carousel--arrow-right":w==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return C[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(C,w==="left"?(E=e.classNames)==null?void 0:E.arrowLeft:(_=e.classNames)==null?void 0:_.arrowRight)},y=w=>{var _,z;if(i.value)return null;const C=w==="left"?l:s,E=t[w==="left"?"prevArrow":"nextArrow"];return o.createVNode("button",{class:k(w),style:w==="left"?(_=e.styles)==null?void 0:_.arrowLeft:(z=e.styles)==null?void 0:z.arrowRight,onClick:C,"aria-label":`${w} arrow`},[E?E():o.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${w==="left"?"left":"right"}`},null)])},h=()=>{var w;return i.value||!e.showIndicator?null:o.createVNode("div",{class:x.value,style:(w=e.styles)==null?void 0:w.indicator},[e.items.map((C,E)=>{var _,z;return o.createVNode("button",{"aria-label":`indicator ${E}`,key:E,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":E===u.value}],style:E===u.value?(_=e.styles)==null?void 0:_.indicatorItemActive:(z=e.styles)==null?void 0:z.indicatorItem,onClick:()=>{a(E),c(E)}},null)})])},b=()=>o.createVNode("div",{class:v.value,style:r.value},[e.items.map((w,C)=>o.createVNode(ou,{key:w.id||`item_${C}`,item:w,showInfo:e.showInfo,index:C,active:C===u.value,styles:e.styles,classNames:e.classNames,onClick:(E,_,z)=>{n("item-click",E,_,z)}},{default:()=>{var E,_;return[(E=t.item)==null?void 0:E.call(t,{item:w,index:C,active:C===u.value}),(_=t[`item${C}`])==null?void 0:_.call(t,{item:w,index:C,active:C===u.value})]}}))]);return()=>{var w;return o.createVNode("div",{class:m.value,style:g.value,onMouseenter:d,onMouseleave:f},[e.buttonPosition==="outer"&&y("left"),o.createVNode("div",{class:p.value,style:(w=e.styles)==null?void 0:w.container},[e.buttonPosition==="inner"&&y("left"),b(),e.buttonPosition==="inner"&&y("right")]),e.buttonPosition==="outer"&&y("right"),h()])}}});rr.install=e=>{e.component(rr.name,rr),e.component(ou.name,ou)};const ns={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function Ih(e){const t=o.ref(-1),n=o.ref(-1),u=o.ref(0),i=o.ref(0),r=o.ref(!1),a=o.ref(!1),s=o.computed(()=>({display:r.value?"block":"none",left:`${u.value}px`,cursor:"e-resize"})),l=o.computed(()=>({display:a.value?"block":"none",top:`${i.value}px`,cursor:"n-resize"})),d=o.computed(()=>{const x={display:a.value||r.value?"block":"none"};return i.value>0&&(x.cursor="n-resize"),x});function f(x,k,y,h){const b=e.value;if(b){const{left:w,right:C,width:E}=b.getBoundingClientRect();let _=x.clientX-w;h==="right"&&(_=C-x.clientX),_>k&&(_=k),_<y&&(_=y),h==="right"&&(_=E-_),u.value=_}}function c(x,k,y,h){const b=e.value;if(b){const{top:w,bottom:C,height:E}=b.getBoundingClientRect();let _=x.clientY-w;h==="bottom"&&(_=C-x.clientY),_>k&&(_=k),_<y&&(_=y),h==="bottom"&&(_=E-_),i.value=_}}function m(){const x=e.value;if(x){const{width:k,height:y}=x.getBoundingClientRect();return{width:k,height:y}}return null}function g(){const x=e.value;return x?Array.from(x.querySelectorAll("[data-position]")).reduce((k,y)=>{const h=y.getAttribute("data-position");return k=Object.assign(k,{[h]:y}),k},{}):null}function p(x,k){const y=m(),h=g();if(y&&h){const b=h==null?void 0:h.right,w=h==null?void 0:h.left;if(x==="left"&&w)return b?y.width-b.clientWidth-k:y.width-k;if(x==="right"&&b)return w?y.width-w.clientWidth-k:y.width-k}}function v(x,k){const y=m(),h=g();if(y&&h){const b=h==null?void 0:h.bottom,w=h==null?void 0:h.top;if(x==="top"&&w)return b?y.height-b.clientHeight-k:y.height-k;if(x==="bottom"&&b)return w?y.height-w.clientHeight-k:y.height-k}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:l,resizeOverlayStyle:d,showHorizontalResizeHandle:r,showVerticalResizeHandle:a,horizontalResizeBarPosition:t,verticalResizeBarPosition:n,verticalResizeHandleOffset:i,horizontalResizeHandleOffset:u,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:p,getPanelMaxHeight:v}}const vn=o.defineComponent({name:"FXSplitter",props:ns,emits:[],setup(e,t){const n=o.ref(),u=Ih(n),{horizontalResizeHandleStyle:i,verticalResizeHandleStyle:r,resizeOverlayStyle:a}=u;o.provide("splitter",{useResizeHandleComposition:u});const s=o.computed(()=>ye({"f-splitter":!0},e==null?void 0:e.customClass)),l=o.computed(()=>{const d={"flex-direction":e.direction==="row"?"row":"column"};return Ae(d,e==null?void 0:e.customStyle)});return()=>o.createVNode("div",{class:s.value,ref:n,style:l.value},[t.slots.default&&t.slots.default(),o.createVNode("div",{class:"f-splitter-resize-overlay",style:a.value},null),o.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:i.value},null),o.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:r.value},null)])}}),Oh={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function Ph(e,t){const n=o.ref(e.width),u=o.ref(e.height),{horizontalResizeBarPosition:i,horizontalResizeHandleOffset:r,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,verticalResizeBarPosition:l,verticalResizeHandleOffset:d,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:c,getPanelMaxWidth:m,getPanelMaxHeight:g}=t;let p="",v,x,k;const y=()=>e.maxWidth?e.maxWidth:m(p,e.minWidth)||0,h=()=>e.maxHeight?e.maxHeight:g(p,e.minHeight)||0;function b(E){if((p==="left"||p==="right")&&x){const{left:_}=x.getBoundingClientRect(),{width:z}=v.getBoundingClientRect(),M=E.clientX-_;let I=p==="left"?(z||0)+(M-i.value):(z||0)-(M-i.value);I=e.minWidth>0?Math.max(e.minWidth,I):I;const B=y();B!=null&&B>0&&(I=B>I?I:B),n.value=I}if((p==="top"||p==="bottom")&&x){const{top:_}=x.getBoundingClientRect(),{height:z}=v.getBoundingClientRect(),M=E.clientY-_;let I=p==="top"?(z||0)+(M-l.value):(z||0)-(M-l.value);I=e.minHeight>0?Math.max(e.minHeight,I):I;const B=h();B!=null&&B>0&&(I=B>I?I:B),u.value=I}r.value=0,d.value=0,i.value=-1,l.value=-1,a.value=!1,s.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.body.style.userSelect="",p="",v=null,x=null}function w(E,_,z){if(p=_,v=z,a.value=!0,x=E.composedPath().find(I=>I.className.split(" ")[0]==="f-splitter"),x){const{left:I}=x.getBoundingClientRect();r.value=E.clientX-I,i.value=E.clientX-I;const B=y();k=D=>f(D,B,e.minWidth,p),document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.body.style.userSelect="none"}}function C(E,_,z){if(p=_,v=z,s.value=!0,x=E.composedPath().find(I=>I.className.split(" ")[0]==="f-splitter"),x){const{top:I}=x.getBoundingClientRect();d.value=E.clientY-I,l.value=E.clientY-I;const B=h();k=D=>c(D,B,e.minHeight,p),document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:u,onClickSplitterHorizontalResizeBar:w,onClickSplitterVerticalResizeBar:C}}const ur=o.defineComponent({name:"FSplitterPane",props:Oh,emits:[],setup(e,t){const n=o.ref(),u=o.inject("splitter"),{useResizeHandleComposition:i}=u,r=Ph(e,i),{actualHeight:a,actualWidth:s,onClickSplitterHorizontalResizeBar:l,onClickSplitterVerticalResizeBar:d}=r,f=o.ref(e.position),c=o.computed(()=>{const h={"f-splitter-pane":!0,"f-splitter-pane-main":f.value==="center","has-resize-bar":e.resizable};return h["f-splitter-pane-"+f.value]=!0,ye(h,e==null?void 0:e.customClass)}),m=o.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(h=>["e","n","s","w"].find(b=>b===h)):[]),g=o.computed(()=>{const h={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||m.value.find(b=>b==="e")||m.value.find(b=>b==="w"))&&(h.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||m.value.find(b=>b==="s")||m.value.find(b=>b==="n"))&&(h.height=`${a.value}px`),e.visible||(h.display="none"),Ae(h,e==null?void 0:e.customStyle)}),p=o.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function v(h){return{e:"left",w:"right",s:"top",n:"bottom"}[h]||h}function x(h,b){b=v(b),["left","right"].find(w=>w===b)&&l(h,b,n.value),["top","bottom"].find(w=>w===b)&&d(h,b,n.value)}function k(){return m.value.length>0?m.value.map(h=>o.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+h,onMousedown:b=>x(b,h)},null)):o.createVNode("span",{class:p.value,onMousedown:h=>x(h,f.value)},null)}function y(){s.value=e.width,a.value=e.height,g.value}return t.expose({reset:y}),()=>o.createVNode("div",{ref:n,class:c.value,style:g.value,"data-position":f.value},[t.slots.default&&t.slots.default(),e.resizable&&k()])}});vn.install=e=>{e.component(vn.name,vn),e.component(ur.name,ur)};const rs={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},us={content:{type:String,default:null}},Rh=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},Vh=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},ir=(e,t=new WeakMap)=>{if(e===null||Rh(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return Vh(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const u=new Map;return t.set(e,u),e.forEach((i,r)=>{u.set(r,ir(i,t))}),u}if(e instanceof Set){const u=new Set;t.set(e,u);for(const i of e)u.add(ir(i,t));return u}if(Array.isArray(e)){const u=[];return t.set(e,u),e.forEach(i=>{u.push(ir(i,t))}),u}const n={};t.set(e,n);for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=ir(e[u],t));return n},Mh=(e,t=200)=>{let n=0;return(...u)=>new Promise(i=>{n&&(clearTimeout(n),i("cancel")),n=window.setTimeout(()=>{e.apply(void 0,u),n=0,i("done")},t)})},Fi=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,au=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Bh=new Set(["__proto__","constructor","prototype"]),zh=e=>!Bh.has(e),Di=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return Ti(e,t,n);const{excludeKeys:u}=n,i=e,r=t;for(const a of Object.keys(r)){if(!zh(a))continue;const s=r[a],l=i[a];u&&u(a)?i[a]=s:Array.isArray(s)&&Array.isArray(l)?i[a]=Ti(l,s,n):au(s)&&au(l)?i[a]=Di(l,s,n):i[a]=s}return e},Ti=(e,t,n)=>{const u=e.slice();return t.forEach((i,r)=>{const a=u[r];Array.isArray(i)&&Array.isArray(a)?u[r]=Ti(a,i,n):au(i)&&au(a)?u[r]=Di(a,i,n):u[r]=i}),u},X="md-editor",de="https://unpkg.com",jh=`${de}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,is={main:`${de}/prettier@3.8.1/standalone.js`,markdown:`${de}/prettier@3.8.1/plugins/markdown.js`},Hh={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},$h=`${de}/screenfull@5.2.0/dist/screenfull.js`,Uh=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,Wh={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},Ni={a11y:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},Gh=`${de}/echarts@6.0.0/dist/echarts.min.js`,os={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},lt={editorExtensions:{highlight:{js:jh,css:Ni},prettier:{standaloneJs:is.main,parserMarkdownJs:is.markdown},cropper:{...Hh},screenfull:{js:$h},mermaid:{js:Uh,enableZoom:!0},katex:{...Wh},echarts:{js:Gh}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},Xh=({instance:e,ctx:t,props:n={}},u="default")=>{const i=(e==null?void 0:e.$slots[u])||(t==null?void 0:t.slots[u]);return(i?i(e):"")||n[u]},qh="buildFinished",Li="errorCatcher",Ii="catalogChanged",Zh="pushCatalog",as="rerender",Yh="taskStateChanged";class Kh{constructor(){fe(this,"pools",{})}remove(t,n,u){const i=this.pools[t]&&this.pools[t][n];i&&(this.pools[t][n]=i.filter(r=>r!==u))}clear(t){this.pools[t]={}}on(t,n){return this.pools[t]||(this.pools[t]={}),this.pools[t][n.name]||(this.pools[t][n.name]=[]),this.pools[t][n.name].push(n.callback),this.pools[t][n.name].includes(n.callback)}emit(t,n,...u){this.pools[t]||(this.pools[t]={});const i=this.pools[t][n];i&&i.forEach(r=>{try{r(...u)}catch(a){console.error(`${n} monitor event exception!`,a)}})}}const it=new Kh,Qh=(e,t)=>{if(!e)return e;const n=t.split(`
33
- `),u=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{u.push("<span></span>")}),u.push("</span>"),`<span class="${X}-code-block">${e}</span>${u.join("")}`};async function ss(e){if(typeof e=="string"){if(window.isSecureContext&&navigator.clipboard)return await navigator.clipboard.writeText(e);{const t=document.createElement("textarea");let n=!1;if(t.value=e,t.style.position="fixed",t.style.opacity=0,t.style.zIndex="-10000",t.style.top="-10000",document.body.appendChild(t),t.select(),n=document.execCommand("copy"),document.body.removeChild(t),n)return;throw new Error('Failed to copy content via "execCommand"!')}}}const Jh={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${X}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${X}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`,pin:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin ${X}-icon"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>`,"pin-off":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin-off ${X}-icon"><path d="M12 17v5"/><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"/><path d="m2 2 20 20"/><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"/></svg>`,check:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check ${X}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},St=(e,t)=>typeof t[e]=="string"?t[e]:Jh[e],jt=(e,t,n="")=>{var i;const u=document.getElementById(t.id);if(u)n!==""&&(Reflect.get(window,n)?(i=t.onload)==null||i.call(u,new Event("load")):t.onload&&u.addEventListener("load",t.onload));else{const r={...t};r.onload=null;const a=t1(e,r);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},e1=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),jt(e,t)},t1=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(u=>{t[u]!==void 0&&(n[u]=t[u])}),n},n1=(e,t)=>{const n=new Map;return e==null||e.forEach(u=>{let i=u.querySelector(`.${X}-mermaid-action`);i?i.querySelector(`.${X}-mermaid-copy`)||i.insertAdjacentHTML("beforeend",`<span class="${X}-mermaid-copy">${St("copy",t.customIcon)}</span>`):(u.insertAdjacentHTML("beforeend",`<div class="${X}-mermaid-action"><span class="${X}-mermaid-copy">${St("copy",t.customIcon)}</span></div>`),i=u.querySelector(`.${X}-mermaid-action`));const r=i.querySelector(`.${X}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),ss(u.dataset.content||"").then(()=>{r.innerHTML=St("check",t.customIcon)}).catch(()=>{r.innerHTML=St("copy",t.customIcon)}).finally(()=>{a=window.setTimeout(()=>{r.innerHTML=St("copy",t.customIcon)},1500)})};r.addEventListener("click",s),n.set(u,{removeClick:()=>{r.removeEventListener("click",s)}})}),()=>{n.forEach(({removeClick:u})=>{u==null||u()}),n.clear()}},r1=(()=>{const e=t=>{if(!t)return()=>{};const n=t.firstChild;let u=1,i=0,r=0,a=!1,s,l,d,f=1;const c=()=>{n.style.transform=`translate(${i}px, ${r}px) scale(${u})`},m=b=>{b.touches.length===1?(a=!0,s=b.touches[0].clientX-i,l=b.touches[0].clientY-r):b.touches.length===2&&(d=Math.hypot(b.touches[0].clientX-b.touches[1].clientX,b.touches[0].clientY-b.touches[1].clientY),f=u)},g=b=>{if(b.preventDefault(),a&&b.touches.length===1)i=b.touches[0].clientX-s,r=b.touches[0].clientY-l,c();else if(b.touches.length===2){const w=Math.hypot(b.touches[0].clientX-b.touches[1].clientX,b.touches[0].clientY-b.touches[1].clientY)/d,C=u;u=f*(1+(w-1));const E=(b.touches[0].clientX+b.touches[1].clientX)/2,_=(b.touches[0].clientY+b.touches[1].clientY)/2,z=n.getBoundingClientRect(),M=(E-z.left)/C,I=(_-z.top)/C;i-=M*(u-C),r-=I*(u-C),c()}},p=()=>{a=!1},v=b=>{b.preventDefault();const w=.02,C=u;b.deltaY<0?u+=w:u=Math.max(.1,u-w);const E=n.getBoundingClientRect(),_=b.clientX-E.left,z=b.clientY-E.top;i-=_/C*(u-C),r-=z/C*(u-C),c()},x=b=>{a=!0,s=b.clientX-i,l=b.clientY-r},k=b=>{a&&(i=b.clientX-s,r=b.clientY-l,c())},y=()=>{a=!1},h=()=>{a=!1};return t.addEventListener("touchstart",m,{passive:!1}),t.addEventListener("touchmove",g,{passive:!1}),t.addEventListener("touchend",p),t.addEventListener("wheel",v,{passive:!1}),t.addEventListener("mousedown",x),t.addEventListener("mousemove",k),t.addEventListener("mouseup",y),t.addEventListener("mouseleave",h),()=>{t.removeEventListener("touchstart",m),t.removeEventListener("touchmove",g),t.removeEventListener("touchend",p),t.removeEventListener("wheel",v),t.removeEventListener("mousedown",x),t.removeEventListener("mousemove",k),t.removeEventListener("mouseup",y),t.removeEventListener("mouseleave",h)}};return(t,n)=>{const u=new Map;return t==null||t.forEach(i=>{let r=i.querySelector(`.${X}-mermaid-action`);r?r.querySelector(`.${X}-mermaid-zoom`)||r.insertAdjacentHTML("beforeend",`<span class="${X}-mermaid-zoom">${St("pin-off",n.customIcon)}</span>`):(i.insertAdjacentHTML("beforeend",`<div class="${X}-mermaid-action"><span class="${X}-mermaid-zoom">${St("pin-off",n.customIcon)}</span></div>`),r=i.querySelector(`.${X}-mermaid-action`));const a=r.querySelector(`.${X}-mermaid-zoom`),s=()=>{const l=u.get(i);if(l!=null&&l.removeEvent)l.removeEvent(),i.removeAttribute("data-grab"),u.set(i,{removeClick:l.removeClick}),a.innerHTML=St("pin-off",n.customIcon);else{const d=e(i);i.setAttribute("data-grab",""),u.set(i,{removeEvent:d,removeClick:l==null?void 0:l.removeClick}),a.innerHTML=St("pin",n.customIcon)}};a.addEventListener("click",s),u.set(i,{removeClick:()=>a.removeEventListener("click",s)})}),()=>{u.forEach(({removeEvent:i,removeClick:r})=>{i==null||i(),r==null||r()}),u.clear()}}})(),ls=new Set([!0,!1,"alt","title"]);function cs(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function ds(e,t){e&&e.attrs&&(e.attrs=cs(e.attrs,t))}function u1(e,t){if(!ls.has(e))throw new TypeError(`figcaption must be one of: ${[...ls]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([u])=>u==="title");return Array.isArray(n)&&n[1]?(ds(t,"title"),n[1]):void 0}function i1(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let u=1;for(let i=1,r=n.tokens.length;i<r-1;++i){const a=n.tokens[i];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[d,f,c]=a.children;if(d.type!=="link_open"||f.type!=="image"||c.type!=="link_close")continue}if(i!==0&&n.tokens[i-1].type!=="paragraph_open"||i!==r-1&&n.tokens[i+1].type!=="paragraph_close")continue;const s=n.tokens[i-1];let l;if(s.type="figure_open",s.tag="figure",n.tokens[i+1].type="figure_close",n.tokens[i+1].tag="figure",t.dataType&&n.tokens[i-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const d=new n.Token("link_open","a",1);d.attrPush(["href",l.attrGet("src")]),a.children.unshift(d),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const d=u1(t.figcaption,l);if(d){const[f]=e.parseInline(d,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...f.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=cs(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const d=t.copyAttrs===!0?"":t.copyAttrs;s.attrs=l.attrs.filter(([f])=>f.match(d)).map(f=>Array.from(f))}if(t.tabindex&&(n.tokens[i-1].attrPush(["tabindex",u]),u++),t.lazy&&(l.attrs.some(([d])=>d==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([d])=>d==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let d=!1;for(let f=0,c=l.attrs.length;f<c&&!d;f++){const m=l.attrs[f];m[0]==="class"&&(m[1]=`${m[1]} ${t.classes}`,d=!0)}d||l.attrs.push(["class",t.classes])}if(t.removeSrc){const d=l.attrs.find(([f])=>f==="src");l.attrs.push(["data-src",d[1]]),ds(l,"src")}}})}const o1=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function a1(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==126||t||u+2>=n)return!1;e.pos=u+1;let i=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.md.inline.skipToken(e)}if(!i||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sub_open","sub",1);a.markup="~";const s=e.push("text","",0);s.content=r.replace(o1,"$1");const l=e.push("sub_close","sub",-1);return l.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function s1(e){e.inline.ruler.after("emphasis","sub",a1)}const l1=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function c1(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==94||t||u+2>=n)return!1;e.pos=u+1;let i=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.md.inline.skipToken(e)}if(!i||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sup_open","sup",1);a.markup="^";const s=e.push("text","",0);s.content=r.replace(l1,"$1");const l=e.push("sup_close","sup",-1);return l.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function d1(e){e.inline.ruler.after("emphasis","sup",c1)}var f1=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,fs=new Set,Oi=typeof process=="object"&&process?process:{},hs=(e,t,n,u)=>{typeof Oi.emitWarning=="function"?Oi.emitWarning(e,t,n,u):console.error(`[${n}] ${t}: ${e}`)},su=globalThis.AbortController,ms=globalThis.AbortSignal;if(typeof su>"u"){ms=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,u){this._onabort.push(u)}},su=class{constructor(){fe(this,"signal",new ms);t()}abort(n){var u,i;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let r of this.signal._onabort)r(n);(i=(u=this.signal).onabort)==null||i.call(u,n)}}};let e=((wl=Oi.env)==null?void 0:wl.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,hs("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var h1=e=>!fs.has(e),Ht=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),ps=e=>Ht(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?lu:null:null,lu=class extends Array{constructor(t){super(t),this.fill(0)}},m1=(Ft=class{constructor(t,n){fe(this,"heap");fe(this,"length");if(!A(Ft,En))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){let n=ps(t);if(!n)return[];ee(Ft,En,!0);let u=new Ft(t,n);return ee(Ft,En,!1),u}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},En=new WeakMap,oe(Ft,En,!1),Ft),p1=(Tn=class{constructor(t){oe(this,G);oe(this,ot);oe(this,Je);oe(this,ct);oe(this,rn);oe(this,dt);oe(this,_n);oe(this,Sn);oe(this,ft);fe(this,"ttl");fe(this,"ttlResolution");fe(this,"ttlAutopurge");fe(this,"updateAgeOnGet");fe(this,"updateAgeOnHas");fe(this,"allowStale");fe(this,"noDisposeOnSet");fe(this,"noUpdateTTL");fe(this,"maxEntrySize");fe(this,"sizeCalculation");fe(this,"noDeleteOnFetchRejection");fe(this,"noDeleteOnStaleGet");fe(this,"allowStaleOnFetchAbort");fe(this,"allowStaleOnFetchRejection");fe(this,"ignoreFetchAbort");oe(this,ke);oe(this,ht);oe(this,we);oe(this,he);oe(this,ne);oe(this,$e);oe(this,et);oe(this,Ve);oe(this,Se);oe(this,mt);oe(this,Fe);oe(this,pt);oe(this,gt);oe(this,tt);oe(this,nt);oe(this,bt);oe(this,Gt);oe(this,Ue);oe(this,Fn);oe(this,un,()=>{});oe(this,Nt,()=>{});oe(this,kr,()=>{});oe(this,rt,()=>!1);oe(this,on,t=>{});oe(this,Dn,(t,n,u)=>{});oe(this,Cr,(t,n,u,i)=>{if(u||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,vl,"LRUCache");let{max:n=0,ttl:u,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:d,onInsert:f,disposeAfter:c,noDisposeOnSet:m,noUpdateTTL:g,maxSize:p=0,maxEntrySize:v=0,sizeCalculation:x,fetchMethod:k,memoMethod:y,noDeleteOnFetchRejection:h,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:C,ignoreFetchAbort:E,perf:_}=t;if(_!==void 0&&typeof(_==null?void 0:_.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ee(this,ft,_??f1),n!==0&&!Ht(n))throw new TypeError("max option must be a nonnegative integer");let z=n?ps(n):Array;if(!z)throw new Error("invalid max value: "+n);if(ee(this,ot,n),ee(this,Je,p),this.maxEntrySize=v||A(this,Je),this.sizeCalculation=x,this.sizeCalculation){if(!A(this,Je)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(ee(this,Sn,y),k!==void 0&&typeof k!="function")throw new TypeError("fetchMethod must be a function if specified");if(ee(this,_n,k),ee(this,Gt,!!k),ee(this,we,new Map),ee(this,he,new Array(n).fill(void 0)),ee(this,ne,new Array(n).fill(void 0)),ee(this,$e,new z(n)),ee(this,et,new z(n)),ee(this,Ve,0),ee(this,Se,0),ee(this,mt,m1.create(n)),ee(this,ke,0),ee(this,ht,0),typeof d=="function"&&ee(this,ct,d),typeof f=="function"&&ee(this,rn,f),typeof c=="function"?(ee(this,dt,c),ee(this,Fe,[])):(ee(this,dt,void 0),ee(this,Fe,void 0)),ee(this,bt,!!A(this,ct)),ee(this,Fn,!!A(this,rn)),ee(this,Ue,!!A(this,dt)),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!h,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(A(this,Je)!==0&&!Ht(A(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!Ht(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");q(this,G,jl).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=Ht(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=u||0,this.ttl){if(!Ht(this.ttl))throw new TypeError("ttl must be a positive integer if specified");q(this,G,io).call(this)}if(A(this,ot)===0&&this.ttl===0&&A(this,Je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!A(this,ot)&&!A(this,Je)){let M="LRU_CACHE_UNBOUNDED";h1(M)&&(fs.add(M),hs("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,Tn))}}get perf(){return A(this,ft)}static unsafeExposeInternals(t){return{starts:A(t,gt),ttls:A(t,tt),autopurgeTimers:A(t,nt),sizes:A(t,pt),keyMap:A(t,we),keyList:A(t,he),valList:A(t,ne),next:A(t,$e),prev:A(t,et),get head(){return A(t,Ve)},get tail(){return A(t,Se)},free:A(t,mt),isBackgroundFetch:n=>{var u;return q(u=t,G,me).call(u,n)},backgroundFetch:(n,u,i,r)=>{var a;return q(a=t,G,Vu).call(a,n,u,i,r)},moveToTail:n=>{var u;return q(u=t,G,Sr).call(u,n)},indexes:n=>{var u;return q(u=t,G,qt).call(u,n)},rindexes:n=>{var u;return q(u=t,G,Zt).call(u,n)},isStale:n=>{var u;return A(u=t,rt).call(u,n)}}}get max(){return A(this,ot)}get maxSize(){return A(this,Je)}get calculatedSize(){return A(this,ht)}get size(){return A(this,ke)}get fetchMethod(){return A(this,_n)}get memoMethod(){return A(this,Sn)}get dispose(){return A(this,ct)}get onInsert(){return A(this,rn)}get disposeAfter(){return A(this,dt)}getRemainingTTL(t){return A(this,we).has(t)?1/0:0}*entries(){for(let t of q(this,G,qt).call(this))A(this,ne)[t]!==void 0&&A(this,he)[t]!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield[A(this,he)[t],A(this,ne)[t]])}*rentries(){for(let t of q(this,G,Zt).call(this))A(this,ne)[t]!==void 0&&A(this,he)[t]!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield[A(this,he)[t],A(this,ne)[t]])}*keys(){for(let t of q(this,G,qt).call(this)){let n=A(this,he)[t];n!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield n)}}*rkeys(){for(let t of q(this,G,Zt).call(this)){let n=A(this,he)[t];n!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield n)}}*values(){for(let t of q(this,G,qt).call(this))A(this,ne)[t]!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield A(this,ne)[t])}*rvalues(){for(let t of q(this,G,Zt).call(this))A(this,ne)[t]!==void 0&&!q(this,G,me).call(this,A(this,ne)[t])&&(yield A(this,ne)[t])}[(Al=Symbol.iterator,vl=Symbol.toStringTag,Al)](){return this.entries()}find(t,n={}){for(let u of q(this,G,qt).call(this)){let i=A(this,ne)[u],r=q(this,G,me).call(this,i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,A(this,he)[u],this))return this.get(A(this,he)[u],n)}}forEach(t,n=this){for(let u of q(this,G,qt).call(this)){let i=A(this,ne)[u],r=q(this,G,me).call(this,i)?i.__staleWhileFetching:i;r!==void 0&&t.call(n,r,A(this,he)[u],this)}}rforEach(t,n=this){for(let u of q(this,G,Zt).call(this)){let i=A(this,ne)[u],r=q(this,G,me).call(this,i)?i.__staleWhileFetching:i;r!==void 0&&t.call(n,r,A(this,he)[u],this)}}purgeStale(){let t=!1;for(let n of q(this,G,Zt).call(this,{allowStale:!0}))A(this,rt).call(this,n)&&(q(this,G,Yt).call(this,A(this,he)[n],"expire"),t=!0);return t}info(t){let n=A(this,we).get(t);if(n===void 0)return;let u=A(this,ne)[n],i=q(this,G,me).call(this,u)?u.__staleWhileFetching:u;if(i===void 0)return;let r={value:i};if(A(this,tt)&&A(this,gt)){let a=A(this,tt)[n],s=A(this,gt)[n];if(a&&s){let l=a-(A(this,ft).now()-s);r.ttl=l,r.start=Date.now()}}return A(this,pt)&&(r.size=A(this,pt)[n]),r}dump(){let t=[];for(let n of q(this,G,qt).call(this,{allowStale:!0})){let u=A(this,he)[n],i=A(this,ne)[n],r=q(this,G,me).call(this,i)?i.__staleWhileFetching:i;if(r===void 0||u===void 0)continue;let a={value:r};if(A(this,tt)&&A(this,gt)){a.ttl=A(this,tt)[n];let s=A(this,ft).now()-A(this,gt)[n];a.start=Math.floor(Date.now()-s)}A(this,pt)&&(a.size=A(this,pt)[n]),t.unshift([u,a])}return t}load(t){this.clear();for(let[n,u]of t){if(u.start){let i=Date.now()-u.start;u.start=A(this,ft).now()-i}this.set(n,u.value,u)}}set(t,n,u={}){var m,g,p,v,x,k,y;if(n===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=u,{noUpdateTTL:d=this.noUpdateTTL}=u,f=A(this,Cr).call(this,t,n,u.size||0,s);if(this.maxEntrySize&&f>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),q(this,G,Yt).call(this,t,"set"),this;let c=A(this,ke)===0?void 0:A(this,we).get(t);if(c===void 0)c=A(this,ke)===0?A(this,Se):A(this,mt).length!==0?A(this,mt).pop():A(this,ke)===A(this,ot)?q(this,G,Ru).call(this,!1):A(this,ke),A(this,he)[c]=t,A(this,ne)[c]=n,A(this,we).set(t,c),A(this,$e)[A(this,Se)]=c,A(this,et)[c]=A(this,Se),ee(this,Se,c),Pu(this,ke)._++,A(this,Dn).call(this,c,f,l),l&&(l.set="add"),d=!1,A(this,Fn)&&((m=A(this,rn))==null||m.call(this,n,t,"add"));else{q(this,G,Sr).call(this,c);let h=A(this,ne)[c];if(n!==h){if(A(this,Gt)&&q(this,G,me).call(this,h)){h.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:b}=h;b!==void 0&&!a&&(A(this,bt)&&((g=A(this,ct))==null||g.call(this,b,t,"set")),A(this,Ue)&&((p=A(this,Fe))==null||p.push([b,t,"set"])))}else a||(A(this,bt)&&((v=A(this,ct))==null||v.call(this,h,t,"set")),A(this,Ue)&&((x=A(this,Fe))==null||x.push([h,t,"set"])));if(A(this,on).call(this,c),A(this,Dn).call(this,c,f,l),A(this,ne)[c]=n,l){l.set="replace";let b=h&&q(this,G,me).call(this,h)?h.__staleWhileFetching:h;b!==void 0&&(l.oldValue=b)}}else l&&(l.set="update");A(this,Fn)&&((k=this.onInsert)==null||k.call(this,n,t,n===h?"update":"replace"))}if(i!==0&&!A(this,tt)&&q(this,G,io).call(this),A(this,tt)&&(d||A(this,kr).call(this,c,i,r),l&&A(this,Nt).call(this,l,c)),!a&&A(this,Ue)&&A(this,Fe)){let h=A(this,Fe),b;for(;b=h==null?void 0:h.shift();)(y=A(this,dt))==null||y.call(this,...b)}return this}pop(){var t;try{for(;A(this,ke);){let n=A(this,ne)[A(this,Ve)];if(q(this,G,Ru).call(this,!0),q(this,G,me).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(A(this,Ue)&&A(this,Fe)){let n=A(this,Fe),u;for(;u=n==null?void 0:n.shift();)(t=A(this,dt))==null||t.call(this,...u)}}}has(t,n={}){let{updateAgeOnHas:u=this.updateAgeOnHas,status:i}=n,r=A(this,we).get(t);if(r!==void 0){let a=A(this,ne)[r];if(q(this,G,me).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(A(this,rt).call(this,r))i&&(i.has="stale",A(this,Nt).call(this,i,r));else return u&&A(this,un).call(this,r),i&&(i.has="hit",A(this,Nt).call(this,i,r)),!0}else i&&(i.has="miss");return!1}peek(t,n={}){let{allowStale:u=this.allowStale}=n,i=A(this,we).get(t);if(i===void 0||!u&&A(this,rt).call(this,i))return;let r=A(this,ne)[i];return q(this,G,me).call(this,r)?r.__staleWhileFetching:r}async fetch(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:v,forceRefresh:x=!1,status:k,signal:y}=n;if(!A(this,Gt))return k&&(k.fetch="get"),this.get(t,{allowStale:u,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:k});let h={allowStale:u,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:p,ignoreFetchAbort:g,status:k,signal:y},b=A(this,we).get(t);if(b===void 0){k&&(k.fetch="miss");let w=q(this,G,Vu).call(this,t,b,h,v);return w.__returned=w}else{let w=A(this,ne)[b];if(q(this,G,me).call(this,w)){let z=u&&w.__staleWhileFetching!==void 0;return k&&(k.fetch="inflight",z&&(k.returnedStale=!0)),z?w.__staleWhileFetching:w.__returned=w}let C=A(this,rt).call(this,b);if(!x&&!C)return k&&(k.fetch="hit"),q(this,G,Sr).call(this,b),i&&A(this,un).call(this,b),k&&A(this,Nt).call(this,k,b),w;let E=q(this,G,Vu).call(this,t,b,h,v),_=E.__staleWhileFetching!==void 0&&u;return k&&(k.fetch=C?"stale":"refresh",_&&C&&(k.returnedStale=!0)),_?E.__staleWhileFetching:E.__returned=E}}async forceFetch(t,n={}){let u=await this.fetch(t,n);if(u===void 0)throw new Error("fetch() returned undefined");return u}memo(t,n={}){let u=A(this,Sn);if(!u)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...a}=n,s=this.get(t,a);if(!r&&s!==void 0)return s;let l=u(t,s,{options:a,context:i});return this.set(t,l,a),l}get(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=n,s=A(this,we).get(t);if(s!==void 0){let l=A(this,ne)[s],d=q(this,G,me).call(this,l);return a&&A(this,Nt).call(this,a,s),A(this,rt).call(this,s)?(a&&(a.get="stale"),d?(a&&u&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),u?l.__staleWhileFetching:void 0):(r||q(this,G,Yt).call(this,t,"expire"),a&&u&&(a.returnedStale=!0),u?l:void 0)):(a&&(a.get="hit"),d?l.__staleWhileFetching:(q(this,G,Sr).call(this,s),i&&A(this,un).call(this,s),l))}else a&&(a.get="miss")}delete(t){return q(this,G,Yt).call(this,t,"delete")}clear(){return q(this,G,so).call(this,"delete")}},ot=new WeakMap,Je=new WeakMap,ct=new WeakMap,rn=new WeakMap,dt=new WeakMap,_n=new WeakMap,Sn=new WeakMap,ft=new WeakMap,ke=new WeakMap,ht=new WeakMap,we=new WeakMap,he=new WeakMap,ne=new WeakMap,$e=new WeakMap,et=new WeakMap,Ve=new WeakMap,Se=new WeakMap,mt=new WeakMap,Fe=new WeakMap,pt=new WeakMap,gt=new WeakMap,tt=new WeakMap,nt=new WeakMap,bt=new WeakMap,Gt=new WeakMap,Ue=new WeakMap,Fn=new WeakMap,G=new WeakSet,io=function(){let t=new lu(A(this,ot)),n=new lu(A(this,ot));ee(this,tt,t),ee(this,gt,n);let u=this.ttlAutopurge?new Array(A(this,ot)):void 0;ee(this,nt,u),ee(this,kr,(s,l,d=A(this,ft).now())=>{n[s]=l!==0?d:0,t[s]=l,i(s,l)}),ee(this,un,s=>{n[s]=t[s]!==0?A(this,ft).now():0,i(s,t[s])});let i=this.ttlAutopurge?(s,l)=>{if(u!=null&&u[s]&&(clearTimeout(u[s]),u[s]=void 0),l&&l!==0&&u){let d=setTimeout(()=>{A(this,rt).call(this,s)&&q(this,G,Yt).call(this,A(this,he)[s],"expire")},l+1);d.unref&&d.unref(),u[s]=d}}:()=>{};ee(this,Nt,(s,l)=>{if(t[l]){let d=t[l],f=n[l];if(!d||!f)return;s.ttl=d,s.start=f,s.now=r||a();let c=s.now-f;s.remainingTTL=d-c}});let r=0,a=()=>{let s=A(this,ft).now();if(this.ttlResolution>0){r=s;let l=setTimeout(()=>r=0,this.ttlResolution);l.unref&&l.unref()}return s};this.getRemainingTTL=s=>{let l=A(this,we).get(s);if(l===void 0)return 0;let d=t[l],f=n[l];if(!d||!f)return 1/0;let c=(r||a())-f;return d-c},ee(this,rt,s=>{let l=n[s],d=t[s];return!!d&&!!l&&(r||a())-l>d})},un=new WeakMap,Nt=new WeakMap,kr=new WeakMap,rt=new WeakMap,jl=function(){let t=new lu(A(this,ot));ee(this,ht,0),ee(this,pt,t),ee(this,on,n=>{ee(this,ht,A(this,ht)-t[n]),t[n]=0}),ee(this,Cr,(n,u,i,r)=>{if(q(this,G,me).call(this,u))return 0;if(!Ht(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(u,n),!Ht(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ee(this,Dn,(n,u,i)=>{if(t[n]=u,A(this,Je)){let r=A(this,Je)-t[n];for(;A(this,ht)>r;)q(this,G,Ru).call(this,!0)}ee(this,ht,A(this,ht)+t[n]),i&&(i.entrySize=u,i.totalCalculatedSize=A(this,ht))})},on=new WeakMap,Dn=new WeakMap,Cr=new WeakMap,qt=function*({allowStale:t=this.allowStale}={}){if(A(this,ke))for(let n=A(this,Se);!(!q(this,G,oo).call(this,n)||((t||!A(this,rt).call(this,n))&&(yield n),n===A(this,Ve)));)n=A(this,et)[n]},Zt=function*({allowStale:t=this.allowStale}={}){if(A(this,ke))for(let n=A(this,Ve);!(!q(this,G,oo).call(this,n)||((t||!A(this,rt).call(this,n))&&(yield n),n===A(this,Se)));)n=A(this,$e)[n]},oo=function(t){return t!==void 0&&A(this,we).get(A(this,he)[t])===t},Ru=function(t){var r,a,s;let n=A(this,Ve),u=A(this,he)[n],i=A(this,ne)[n];return A(this,Gt)&&q(this,G,me).call(this,i)?i.__abortController.abort(new Error("evicted")):(A(this,bt)||A(this,Ue))&&(A(this,bt)&&((r=A(this,ct))==null||r.call(this,i,u,"evict")),A(this,Ue)&&((a=A(this,Fe))==null||a.push([i,u,"evict"]))),A(this,on).call(this,n),(s=A(this,nt))!=null&&s[n]&&(clearTimeout(A(this,nt)[n]),A(this,nt)[n]=void 0),t&&(A(this,he)[n]=void 0,A(this,ne)[n]=void 0,A(this,mt).push(n)),A(this,ke)===1?(ee(this,Ve,ee(this,Se,0)),A(this,mt).length=0):ee(this,Ve,A(this,$e)[n]),A(this,we).delete(u),Pu(this,ke)._--,n},Vu=function(t,n,u,i){let r=n===void 0?void 0:A(this,ne)[n];if(q(this,G,me).call(this,r))return r;let a=new su,{signal:s}=u;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let l={signal:a.signal,options:u,context:i},d=(v,x=!1)=>{let{aborted:k}=a.signal,y=u.ignoreFetchAbort&&v!==void 0,h=u.ignoreFetchAbort||!!(u.allowStaleOnFetchAbort&&v!==void 0);if(u.status&&(k&&!x?(u.status.fetchAborted=!0,u.status.fetchError=a.signal.reason,y&&(u.status.fetchAbortIgnored=!0)):u.status.fetchResolved=!0),k&&!y&&!x)return c(a.signal.reason,h);let b=g,w=A(this,ne)[n];return(w===g||y&&x&&w===void 0)&&(v===void 0?b.__staleWhileFetching!==void 0?A(this,ne)[n]=b.__staleWhileFetching:q(this,G,Yt).call(this,t,"fetch"):(u.status&&(u.status.fetchUpdated=!0),this.set(t,v,l.options))),v},f=v=>(u.status&&(u.status.fetchRejected=!0,u.status.fetchError=v),c(v,!1)),c=(v,x)=>{let{aborted:k}=a.signal,y=k&&u.allowStaleOnFetchAbort,h=y||u.allowStaleOnFetchRejection,b=h||u.noDeleteOnFetchRejection,w=g;if(A(this,ne)[n]===g&&(!b||!x&&w.__staleWhileFetching===void 0?q(this,G,Yt).call(this,t,"fetch"):y||(A(this,ne)[n]=w.__staleWhileFetching)),h)return u.status&&w.__staleWhileFetching!==void 0&&(u.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw v},m=(v,x)=>{var y;let k=(y=A(this,_n))==null?void 0:y.call(this,t,r,l);k&&k instanceof Promise&&k.then(h=>v(h===void 0?void 0:h),x),a.signal.addEventListener("abort",()=>{(!u.ignoreFetchAbort||u.allowStaleOnFetchAbort)&&(v(void 0),u.allowStaleOnFetchAbort&&(v=h=>d(h,!0)))})};u.status&&(u.status.fetchDispatched=!0);let g=new Promise(m).then(d,f),p=Object.assign(g,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return n===void 0?(this.set(t,p,{...l.options,status:void 0}),n=A(this,we).get(t)):A(this,ne)[n]=p,p},me=function(t){if(!A(this,Gt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof su},ao=function(t,n){A(this,et)[n]=t,A(this,$e)[t]=n},Sr=function(t){t!==A(this,Se)&&(t===A(this,Ve)?ee(this,Ve,A(this,$e)[t]):q(this,G,ao).call(this,A(this,et)[t],A(this,$e)[t]),q(this,G,ao).call(this,A(this,Se),t),ee(this,Se,t))},Yt=function(t,n){var i,r,a,s,l,d;let u=!1;if(A(this,ke)!==0){let f=A(this,we).get(t);if(f!==void 0)if((i=A(this,nt))!=null&&i[f]&&(clearTimeout((r=A(this,nt))==null?void 0:r[f]),A(this,nt)[f]=void 0),u=!0,A(this,ke)===1)q(this,G,so).call(this,n);else{A(this,on).call(this,f);let c=A(this,ne)[f];if(q(this,G,me).call(this,c)?c.__abortController.abort(new Error("deleted")):(A(this,bt)||A(this,Ue))&&(A(this,bt)&&((a=A(this,ct))==null||a.call(this,c,t,n)),A(this,Ue)&&((s=A(this,Fe))==null||s.push([c,t,n]))),A(this,we).delete(t),A(this,he)[f]=void 0,A(this,ne)[f]=void 0,f===A(this,Se))ee(this,Se,A(this,et)[f]);else if(f===A(this,Ve))ee(this,Ve,A(this,$e)[f]);else{let m=A(this,et)[f];A(this,$e)[m]=A(this,$e)[f];let g=A(this,$e)[f];A(this,et)[g]=A(this,et)[f]}Pu(this,ke)._--,A(this,mt).push(f)}}if(A(this,Ue)&&((l=A(this,Fe))!=null&&l.length)){let f=A(this,Fe),c;for(;c=f==null?void 0:f.shift();)(d=A(this,dt))==null||d.call(this,...c)}return u},so=function(t){var n,u,i,r;for(let a of q(this,G,Zt).call(this,{allowStale:!0})){let s=A(this,ne)[a];if(q(this,G,me).call(this,s))s.__abortController.abort(new Error("deleted"));else{let l=A(this,he)[a];A(this,bt)&&((n=A(this,ct))==null||n.call(this,s,l,t)),A(this,Ue)&&((u=A(this,Fe))==null||u.push([s,l,t]))}}if(A(this,we).clear(),A(this,ne).fill(void 0),A(this,he).fill(void 0),A(this,tt)&&A(this,gt)){A(this,tt).fill(0),A(this,gt).fill(0);for(let a of A(this,nt)??[])a!==void 0&&clearTimeout(a);(i=A(this,nt))==null||i.fill(void 0)}if(A(this,pt)&&A(this,pt).fill(0),ee(this,Ve,0),ee(this,Se,0),A(this,mt).length=0,ee(this,ht,0),ee(this,ke,0),A(this,Ue)&&A(this,Fe)){let a=A(this,Fe),s;for(;s=a==null?void 0:a.shift();)(r=A(this,dt))==null||r.call(this,...s)}},Tn);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var Jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u])}return e},cu=function(t){return t.tagName==="IMG"},g1=function(t){return NodeList.prototype.isPrototypeOf(t)},du=function(t){return t&&t.nodeType===1},gs=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},bs=function(t){try{return Array.isArray(t)?t.filter(cu):g1(t)?[].slice.call(t).filter(cu):du(t)?[t].filter(cu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(cu):[]}catch{throw new TypeError(`The provided selector is invalid.
30
+ `,l=Ao("caf-assistant-widget-container__inner",f),h=i.computed(()=>{const b=vo`
31
+ display: ${c.value?"block":"none"};
32
+ `;return Ao("caf-assistant-widget-container__error",b)}),m=()=>{const b=a.value;b&&(s.value=new uh(b))},p=()=>{const b=s.value;b&&(b.dispose(),s.value=null)},w=()=>{const b=r.value,g=o.value;b&&(b.unmount(),b.dispose()),g&&g.cleanup(),r.value=null,o.value=null},x=async()=>{const b=await n(e.widgetAPIURL);if(!b)throw new Error("Failed to load widget API");await b.initialize();const g=b.createWidget();o.value=b,r.value=g},A=b=>{console.error(b),c.value=b};return i.watch(()=>e.widgetAPIURL,async()=>{if(a.value)try{w(),await x();const b=a.value,g=r.value;g==null||g.updateOptions(e.widgetOptions),g==null||g.updateData(e.widgetData),b&&g&&await g.mount(b)}catch(b){A(b)}}),i.watch(()=>e.widgetOptions,(b,g)=>{try{const y=r.value;y&&(!g||!u(g,b))&&y.updateOptions(b)}catch(y){A(y)}}),i.watch(()=>e.widgetData,(b,g)=>{try{const y=r.value;y&&(!g||!u(g,b))&&y.updateData(b)}catch(y){A(y)}}),i.onMounted(async()=>{try{const b=a.value;if(b){m();const g=s.value;if(g){await x();const y=r.value;y&&(y.updateOptions(e.widgetOptions),y.updateData(e.widgetData),y.mount(g.getElement()),i.nextTick(()=>{b.parentElement&&(b.style.width="100%")}))}}}catch(b){A(b)}}),i.onBeforeUnmount(async()=>{try{w(),p()}catch(b){console.error(b)}}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{ref:a,class:l},null),i.createVNode("div",{class:h.value},null)])}}),Va=(e,t)=>{var n;if(e.type===Oe.AssistantWidgetComplete){const u=e;return u.widgetUrl?i.createVNode(yn,{key:`widget-${t}`,widgetAPIURL:u.widgetUrl,widgetOptions:{mode:"embedded",implOptions:u.widgetImplOptions},widgetData:((n=u.widgetData)==null?void 0:n.data)||{}},null):null}return e.type===Oe.AssistantWidgetPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("数据生成中......")])]):null},sh=3e4,Ma=8e3,Le=new Map,Qe=new Map,Jn=new Map,Et=[];function Re(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function eu(e){const t=Re(e);if(t)for(let n=Et.length-1;n>=0;n--)Et[n]===t&&Et.splice(n,1)}function ch(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function tu(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function lh(){return Et[Et.length-1]||void 0}function nu(e,t){const n=Re(t);return n?Re(e.instanceId)===n||e.componentId!=null&&Re(String(e.componentId))===n||e.name!=null&&Re(String(e.name))===n:!1}function Co(e){const t=Re(e);if(!t)return null;const n=Le.get(t);if(n)return{canonicalKey:t,entry:n};for(const[o,r]of Le.entries())if(Re(o)===t)return{canonicalKey:o,entry:r};const u=[];for(const[o,r]of Le.entries())nu(r.config,t)&&u.push({key:o,entry:r});if(u.length===1){const{key:o,entry:r}=u[0];return o!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${o}" (alias match)`),{canonicalKey:o,entry:r}}if(u.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${u.length} pending matches); refusing`),null;if(Le.size===1){const[o,r]=[...Le.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${o}"`),{canonicalKey:o,entry:r}}return null}function Ba(e,t){for(const[n,u]of Qe){const o=Re(n),r=e!==""&&o===e,a=String(t??"").trim(),s=e&&nu(u.config,e)||a&&nu(u.config,a);if(r||s)return console.warn(`[DynamicComponent] register skipped: id "${e||a}" already active (canonical "${n}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function _o(){return{pendingKeys:[...Le.keys()],bootstrapQueue:[...Et],activeKeys:[...Qe.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function dh(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,..._o()})}function fh(e){const t=Re(e);if(t){if(Ba(t,e))return{ok:!1,reason:"already_active_duplicate"};const u=Co(t);if(u)return{ok:!0,...u}}else if(Ba("",e))return{ok:!1,reason:"already_active_duplicate"};for(let n=0;n<Et.length;n++){const u=Et[n],o=Co(u);if(o)return Et.splice(n,1),t&&Re(u)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${u}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...o}}return{ok:!1,reason:"no_pending"}}function za(e){const t=Re(e);if(!t)return null;const n=Qe.get(t);if(n)return n;for(const[r,a]of Qe.entries())if(Re(r)===t)return a;const u=[];for(const r of Qe.values())nu(r.config,t)&&u.push(r);const o=[...new Map(u.map(r=>[r.config.instanceId,r])).values()];if(o.length===1)return o[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${o[0].config.instanceId}" (alias match)`),o[0];if(o.length>1)return console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${o.length} active matches)`),null;if(Qe.size===1){const r=[...Qe.values()][0];return console.warn(`[DynamicComponent] assistant post id "${t}" unmatched; delivering to sole active instance "${r.config.instanceId}"`),r}return null}function hh(e){const t=Re(e);if(!t)return t;const n=za(t);if(n)return n.config.instanceId;const u=Co(t);return u?u.canonicalKey:Le.size===1?[...Le.keys()][0]:Qe.size===1?[...Qe.values()][0].config.instanceId:t}function Eo(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function ja(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(Eo(t)),!0}catch(n){return console.warn("[DynamicComponent] onAssistantMessage failed",n),!1}}function ph(e){const t=`fluens-dynamic-component-${e.instanceId}`;let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.style.width="100%",n.style.height="100%"),n}function Ha(e){const t=Qe.get(e.instanceId);if(t)return Promise.resolve(t.api);const n=Le.get(e.instanceId);if(n)return new Promise((o,r)=>{const a=n.resolve,s=n.reject;n.resolve=c=>{a(c),o(c)},n.reject=c=>{s(c),r(c)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const u=ph(e);return new Promise((o,r)=>{const a={config:e,container:u,resolve:o,reject:r,timeoutId:0},s=setTimeout(()=>{a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},sh);a.timeoutId=s,Le.set(e.instanceId,a),Et.push(e.instanceId),ch(e.instanceId);const c=document.createElement("script");c.src=(e==null?void 0:e.jsUrl)??"",c.dataset.dynamicComponentId=e.instanceId,c.async=!1,c.onload=()=>{a.postLoadRegisterCheckTimerId=window.setTimeout(()=>{a.postLoadRegisterCheckTimerId=void 0,Le.has(e.instanceId)&&(clearTimeout(s),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${Ma}ms after load: ${e.name||e.componentId}`)))},Ma)},c.onerror=()=>{clearTimeout(s),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),Le.delete(e.instanceId),eu(e.instanceId),tu(e.instanceId),r(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(c)})}function $a(e){var o;const t=Qe.get(e);if(t){try{t.api.unmount()}catch{}(o=t.scriptElement)==null||o.remove(),Qe.delete(e)}const n=Le.get(e);n&&(n.postLoadRegisterCheckTimerId!=null&&(clearTimeout(n.postLoadRegisterCheckTimerId),n.postLoadRegisterCheckTimerId=void 0),clearTimeout(n.timeoutId),Le.delete(e)),Jn.delete(e);const u=document.getElementById(`fluens-dynamic-component-${e}`);u&&u.remove()}function mh(e,t){const n=Re(e);if(!n)return!1;const u=za(n);if(u)return ja(u.api,t);const o=hh(n),r=Jn.get(o)??[],a=r.findIndex(s=>s.messageId===t.messageId);return a>=0?r[a]=Eo(t):r.push(Eo(t)),Jn.set(o,r),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=_o,window.__fluens_dynamic_component_register=function(e,t){const n=Re(e),u=fh(e);if(!u.ok){if(u.reason==="already_active_duplicate")return;dh(n),console.warn(`[DynamicComponent] no pending for register id "${n}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:o,entry:r}=u;eu(o),tu(o),r.postLoadRegisterCheckTimerId!=null&&(clearTimeout(r.postLoadRegisterCheckTimerId),r.postLoadRegisterCheckTimerId=void 0),clearTimeout(r.timeoutId),Le.delete(o);const a={config:r.config,container:r.container,api:t,scriptElement:document.currentScript};Qe.set(o,a),a.container.parentElement;try{t.mount(r.container,r.config)}catch(c){console.error(`Failed to mount dynamic component: ${o}`,c)}const s=[o];n&&n!==o&&s.push(n);for(const c of s){const d=Jn.get(c);d&&d.length>0&&(Jn.delete(c),d.forEach(f=>ja(t,f)))}r.resolve(t)});const xn=i.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=i.ref("loading"),n=i.ref(""),u=i.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),o=i.computed(()=>e.config.position==="inline"),r=i.computed(()=>!e.config.jsUrl&&!!e.config.url),a=i.computed(()=>({...o.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&o.value?{padding:"16px 0"}:{},...t.value==="ready"&&!o.value?{height:"100%",overflow:"hidden"}:{}}));return i.onMounted(()=>{r.value||(t.value="loading",n.value="",Ha(e.config).then(()=>{t.value="ready"}).catch(s=>{t.value="error",n.value=s.message||"Unknown error"}))}),i.onUnmounted(()=>{r.value||$a(e.config.instanceId)}),()=>r.value?null:i.createVNode("div",{class:"f-chat-dynamic-component-body",style:a.value},[i.createVNode("div",{id:u.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&i.createVNode("div",{class:"f-chat-dynamic-component-loading"},[i.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),i.createVNode("span",null,[i.createTextVNode("加载中......")])]),t.value==="error"&&i.createVNode("div",{class:"f-chat-dynamic-component-error"},[i.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[i.createTextVNode("!")]),i.createVNode("span",null,[n.value])])])}}),Ua=(e,t,n)=>{if(e.type===Oe.DynamicComponentComplete){const u=e;if(!u.config)return null;if(u.config.position==="inline")return i.createVNode(xn,{key:`dc-${t}`,config:u.config},null);const o={type:"file",fileContent:{type:"md",name:u.config.title}},r={onPreviewFile:a=>{n.emit("showDynamicComponent",u.config)}};return i.nextTick(()=>n.emit("dynamicComponentsDetected",[u.config])),i.createVNode("div",{style:{padding:"16px 0"}},[n.renderFileEmbeddedContent(o,r)])}return e.type===Oe.DynamicComponentPending?i.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[i.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),i.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[i.createTextVNode("组件加载中......")])]):null};function gh(){return{[Oe.Text]:pf,[Oe.AssistantWidgetComplete]:Va,[Oe.AssistantWidgetPending]:Va,[Oe.DynamicComponentComplete]:Ua,[Oe.DynamicComponentPending]:Ua}}const bh=i.defineComponent({name:"FXBubbleTextContent",props:el,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:n}=pi(),{propertyStates:u,registerProperty:o,updatePropertyValue:r,startStreaming:a}=Nr();o("title",e.title??""),o("subtitle",e.subtitle??""),o("text",e.text??""),i.watch([()=>e.title,()=>e.subtitle,()=>e.text],([p,w,x])=>{r("title",p??""),r("subtitle",w??""),r("text",x??"")});const s=i.computed(()=>e.textFormat==="markdown"),c=i.ref(!1),d=i.computed(()=>{var p,w,x;return c.value?{title:((p=u.title)==null?void 0:p.displayedValue)??"",subtitle:((w=u.subtitle)==null?void 0:w.displayedValue)??"",text:((x=u.text)==null?void 0:x.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),f=i.computed(()=>fl(d.value.text)),l={shouldShowMarkdown:s,emit:t.emit,renderFileEmbeddedContent:n},h=gh(),m=()=>f.value.length===0?null:i.createVNode("div",{class:"f-chat-bubble-text-collection"},[f.value.map((p,w)=>{var x;return(x=h[p.type])==null?void 0:x.call(h,p,w,l)})]);return i.onMounted(()=>{c.value&&a()}),()=>i.createVNode(i.Fragment,null,[d.value.title&&i.createVNode("div",{class:"f-chat-bubble-content-title"},[d.value.title]),d.value.subtitle&&i.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[d.value.subtitle]),m()])}}),yh={content:{type:Object},outputMode:{type:String,default:"full"}};function ru({status:e}){const t=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`;return i.createVNode("span",{class:t,"aria-hidden":!0},null)}const Wa=100,xh=i.defineComponent({name:"FXBubbleThink",props:yh,setup(e,t){var U;const{propertyStates:n,registerProperty:u,updatePropertyValue:o,isAllDone:r}=Nr(),{elapsedSeconds:a,hasEverStarted:s,start:c,stop:d,reset:f}=zu(),l=i.ref(((U=e.content)==null?void 0:U.completed)!==!0),h=i.ref(null),m=i.ref(null),p=i.ref(!1),w=i.ref(!1),x=i.computed(()=>e.outputMode==="streaming"),A=i.computed(()=>{var _;return(_=e.content)==null?void 0:_.completed}),b=i.computed(()=>{var R,E,M;const _=(R=g.value)==null?void 0:R.trim(),N=_?_.slice(0,8):"",L=_&&_.length>8?"…":"",C=N?`<span class="f-chat-bubble-thinking-preview">${N}${L}</span>`:"";if(A.value){const V=s.value?`(用时${a.value}秒)`:"";return(((E=e.content)==null?void 0:E.title)??"思考完成"+V)+C}return(((M=e.content)==null?void 0:M.title)??"正在思考......")+C}),g=i.computed(()=>{var _,N;return x.value?((_=n.content)==null?void 0:_.displayedValue)??"":((N=e.content)==null?void 0:N.content)??""}),y=i.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!A.value,"is-completed":A.value})),k=()=>{const _=h.value;if(!_||!p.value){w.value=!1;return}w.value=_.scrollTop>0};i.watch(()=>A.value,_=>{_?d():c()},{immediate:!0}),i.watch(()=>A.value,_=>{_&&(l.value=!1)}),i.watch(()=>e.content,_=>{_&&(n.content?o("content",_.content??""):u("content",_.content??""))},{immediate:!0}),i.watch(g,async()=>{if(l.value){await i.nextTick();const _=m.value;if(!_)return;await i.nextTick(),p.value=_.scrollHeight>Wa;const N=h.value;N&&p.value&&(N.scrollTop=N.scrollHeight,w.value=!0)}},{immediate:!0}),i.watch(l,async _=>{if(_){await i.nextTick();const N=m.value;if(!N)return;await i.nextTick(),p.value=N.scrollHeight>Wa;const L=h.value;L&&p.value&&(L.scrollTop=L.scrollHeight,w.value=!0)}}),i.onUnmounted(()=>{f()}),t.expose({instance:{get loadDone(){return e.content?(x.value?r.value:!0)&&A.value:!0}}});const T=()=>{l.value=!l.value},D=()=>A.value?null:i.createVNode(ru,{status:"Working"},null),F=()=>!g.value||!l.value?null:i.createVNode("div",{class:"f-chat-bubble-thinking-content"},[i.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:h,onScroll:k},[p.value&&w.value&&i.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),i.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[i.createVNode("div",{ref:m,class:"f-chat-bubble-thinking-content-text",innerHTML:g.value},null)])])]);return()=>i.createVNode("div",{class:y.value},[i.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:T},[D(),i.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:b.value},null),g.value&&i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:l.value?"rotate(90deg)":"rotate(0deg)",transition:"all 0.3s ease-in-out"}},null)]),F()])}}),wh={content:{type:Object}},Ga={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Object,default:i.ref(0)},offsetY:{type:Object,default:i.ref(0)},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function}};function vh(e){const t=e.host?e.host:"body",n=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),u=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),o=i.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),r=i.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),a=i.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:o,hostTop:n,hostWidth:r,hostHeight:a,hostBottom:u}}function Ah(e,t,n,u){const o=i.ref(e.offsetX||0),r=i.ref(e.offsetY||0),a=i.ref(-1),s=i.ref(-1),c=i.ref(-1),d=i.ref(-1),f=i.ref(e.placement),l=i.ref(0),h=i.ref(0),m=i.ref(0),p=i.computed(()=>document.documentElement.scrollLeft),w=i.computed(()=>document.documentElement.scrollTop),{hostLeft:x,hostTop:A,hostWidth:b,hostHeight:g,hostBottom:y}=u;i.watch(()=>e.offsetX,I=>{o.value=I});const k=i.computed(()=>{const I={left:`${h.value}px`,top:`${m.value}px`,transform:`translate(${o.value}px, ${r.value}px)`};return e.zIndex!==-1&&(I["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&n.value&&a.value>=n.value.getBoundingClientRect().width&&(I.width=`${a.value}px`):a.value!==-1&&(I.width=`${a.value}px`),e.minWidth!==-1&&(I.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(I,e.customStyles),s.value>0&&(I.maxHeight=s.value+"px"),I}),T=i.computed(()=>({left:`${l.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function D(I){if(I&&e.keepWidthWithReference){const B=I.getBoundingClientRect();a.value=Math.max(e.minWidth,B.width)}}function F(I,B){const W=b.value-I.width-4;return W>0?W:B}function U(I,B){const W=g.value-I.height-12;return W>0?W:B}function _(I,B,W){const K=l.value,Z=B.left-x.value+B.width/2+p.value,Y=B.top-A.value-(I.height+W.height)+w.value;return{popoverLeft:Z,popoverTop:Y,arrowLeft:K}}function N(I,B,W){const K=B.top-A.value+(B.height+W.height)+w.value,Z=U(I,K);return Math.min(K,Z)}function L(I,B){const W=F(B,I),K=I<=W?l.value:I-W;return{popoverLeft:Math.min(I,W),arrowLeft:K,maxHeight:0}}function C(I,B){const W=F(B,I),K=I<=W?l.value:I-W;return{popoverLeft:I,arrowLeft:K,maxHeight:0}}function P(I,B,W){const K=B.left-x.value+p.value,{arrowLeft:Z,popoverLeft:Y}=C(K,I),{popoverTop:ue}=_(I,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function R(I,B,W){const K=B.left-x.value+B.width/2-(W.width/2-(I.left-x.value))+p.value,{arrowLeft:Z,popoverLeft:Y}=L(K,I),ue=N(I,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function E(I,B,W){const K=B.left-x.value+p.value,{arrowLeft:Z,popoverLeft:Y}=L(K,I),ue=N(I,B,W);return{popoverLeft:Y,popoverTop:ue,arrowLeft:Z,maxHeight:0}}function M(I,B,W){const K=B.left-x.value;let Z=0,Y=0,ue=0,ce=0,De="bottom-left";window.innerWidth-K>I.width?Z=K+p.value:(Z=B.right-I.width+p.value,ue=I.width-W.width-20);let Te=0;if(e.limitContentBySpace){const qt={topHeight:B.top-A.value-W.height-8,bottomHeight:y.value-B.bottom-W.height-8};Te=Math.max(qt.topHeight,qt.bottomHeight),I.height>Te&&(ce=Te,n.value.classList.add("popover-limitmax"))}const yt=ce?Math.floor(ce):I.height,Me=B.top-A.value+(B.height+W.height);return y.value-Me>yt?Y=Me+w.value:(Y=B.top-yt-W.height+w.value,y.value-Me>B.top?(Y=Me+w.value,yt>B.top&&(Y=y.value-yt)):(Y=Y<0?0:Y,De="top")),n.value.classList.add("popover-"+De,"bs-popover-"+De),{popoverLeft:Z<0?5:Z,popoverTop:Y,arrowLeft:ue,maxHeight:ce}}function V(I,B,W){const K=B.left+B.width,Z=Math.max(B.top-(I.height/2-B.height/2),A.value);let Y=A.value+g.value-I.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}function $(I,B,W){const K=B.left+B.width,Z=Math.max(B.top-B.height,A.value);let Y=A.value+g.value-I.height;Y<0&&(Y=Z);const ue=Math.min(Z,Y);return{popoverLeft:K,popoverTop:ue,arrowLeft:0,maxHeight:0}}const re=new Map([["top",_],["top-left",P],["bottom",R],["bottom-left",E],["right",V],["right-top",$],["auto",M]]);function te(I){var Y;e.keepWidthWithReference&&D(I);const B=I.getBoundingClientRect();c.value=B.top,d.value=B.left;const W=t.value?t.value.getBoundingClientRect():{height:4,width:4},K=(Y=n.value)==null?void 0:Y.getBoundingClientRect();a.value=K.width;const Z=re.get(f.value);if(Z){const{arrowLeft:ue,popoverLeft:ce,popoverTop:De,maxHeight:Te}=Z(K,B,W);l.value=ue,h.value=ce,m.value=De,s.value=Te||-1}}function z(I){if(I){const B=I.getBoundingClientRect();(B.left!==d.value||B.top!==c.value)&&te(I)}}function j(){f.value=e.placement,l.value=0,h.value=0,m.value=0,a.value=-1}return{arrowStyle:T,popoverStyle:k,position:f,popoverWidth:a,fitToReference:D,followToReferencePosition:z,locateToReference:te,resetPosition:j}}function kh(e,t,n,u,o,r,a){const s=i.ref(e.visible),c=i.computed(()=>s.value),{fitToReference:d,locateToReference:f,resetPosition:l}=a;let h;async function m(){s.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(s.value=!1,document.body.removeEventListener("click",h),document.body.removeEventListener("mousedown",h),document.body.removeEventListener("wheel",h,!0),document.removeEventListener("scroll",h),l(),t.emit("hidden")))}h=w=>{var b;if(!o.value)return;const x=o.value.contains(w.target);if(w.type==="scroll"||w.type==="wheel"&&x){m();return}if(w.target.closest(".time-picker-panel"))return;const A=(b=w.target)==null?void 0:b.closest(".popover");if(A&&u.value&&A===u.value){w.type!=="scroll"&&w.type!=="wheel"&&w.stopPropagation();return}if(!x&&s.value){const g=o.value.closest(".popover");g&&g.removeEventListener("click",h),m()}};async function p(w){if(u.value&&(e.showArrow===!1||e.showArrow&&n.value)&&w){l(),s.value=!0,o.value=w,r.value&&d(w),await i.nextTick(),f(w),document.body.addEventListener("click",h),document.body.addEventListener("mousedown",h),document.body.addEventListener("wheel",h,!0),document.addEventListener("scroll",h),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",h));const x=w.closest(".popover");x&&x.addEventListener("click",h),t.emit("shown")}}return t.expose({hide:m,popoverRef:u,show:p,shown:c,isShow:s}),{showPopover:s,hidePopverOnClickBodyHandler:h}}function Ch(e,t,n,u,o,r){const{popoverWidth:a,fitToReference:s,followToReferencePosition:c}=o;function d(){var f;if(r.value&&((f=r.value.style)==null?void 0:f.display)!=="none"&&n.value){c(n.value);const l=n.value.getBoundingClientRect();u.value&&l.width!==a.value&&s(n.value)}}return{onResize:d}}function _h(e,t=500){const n=i.ref(e.value);let u;const o=i.watch(e,a=>{clearTimeout(u),u=setTimeout(()=>{n.value=a},t)}),r=()=>{clearTimeout(u),o()};return i.onUnmounted(r),{delayedValue:n,cleanup:r}}const Kt=i.defineComponent({name:"FXPopover",props:Ga,emits:["shown","hidden"],setup(e,t){const n=i.ref(),u=i.ref(),o=i.ref(e.reference),r=i.ref(e.keepWidthWithReference),a=i.computed(()=>!!e.title),s=vh(e),{host:c}=s,d=Ah(e,n,u,s),{position:f,arrowStyle:l,popoverStyle:h,fitToReference:m,locateToReference:p}=d,{showPopover:w,hidePopverOnClickBodyHandler:x}=kh(e,t,n,u,o,r,d),{onResize:A}=Ch(e,t,o,r,d,u),b=i.computed(()=>{let D=f.value;D==="top-left"&&(D="top");const F=`popover in popover-${D}`,U=`bs-popover-${D}`,_={"popover-fitcontent":e.fitContent,fade:!0};_[F]=!0,_[U]=!0;const N=(e.class||"").split(" ");return e.isSimpleTips&&N.unshift("popover-tips"),N.reduce((L,C)=>(L[C]=!0,L),_),_}),g=i.computed(()=>({"popover-content":!0,"popover-body":!0})),y=i.computed(()=>{const D={};return D.opacity=w.value?1:0,D.visibility=w.value?"visible":"hidden",D.zIndex=1060,D}),k=i.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:T}=_h(y,50);return i.onMounted(()=>{var D;r.value&&m(o.value),e.reference&&p(o.value),window.addEventListener("resize",A),(D=u.value)==null||D.focus()}),i.onUnmounted(()=>{document.body.removeEventListener("click",x),window.removeEventListener("resize",A),w.value=!1}),()=>i.createVNode(i.Teleport,{to:c},{default:()=>{var D;return[i.withDirectives(i.createVNode("div",{tabindex:"-1",ref:u,class:b.value,style:{...h.value,...T.value},onMousedown:F=>{F.stopPropagation()},onClick:F=>{F.stopPropagation()}},[k.value&&i.createVNode("div",{ref:n,class:"popover-arrow arrow",style:l.value},null),a.value&&i.createVNode("h3",{class:"popover-title popover-header"},[e.title]),i.createVNode("div",{class:g.value},[t.slots.default&&((D=t.slots)==null?void 0:D.default())])]),[[i.vShow,w.value]])]}})}}),uu="FarrisX_PopoverInstancesKey";window[uu]=window[uu]||new WeakMap;function So(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&!u.value.isShow&&(u.value.show(n),window[uu].set(n,u.value))}function qa(e,t,n){e.stopPropagation(),t.value.value.hide(),window[uu].delete(n)}function Eh(e,t,n){e.stopPropagation();const u=t.value;u&&u.value&&(u.value.isShow?qa(e,t,n):So(e,t,n))}function Xa(e,t,n){t.arg&&t.arg==="toggle"?Eh(e,t,n):So(e,t,n)}const Za={mounted:(e,t,n)=>{t.modifiers.hover?(e.addEventListener("mouseenter",u=>So(u,t,e)),e.addEventListener("mouseleave",u=>qa(u,t,e))):t.modifiers.click?e.addEventListener("click",u=>Xa(u,t,e)):e.addEventListener("click",u=>Xa(u,t,e)),e.classList.add("v-popover")},unMounted:(e,t,n)=>{}};Kt.install=e=>{e.component(Kt.name,Kt),e.directive("fxpopover",Za)};const Ya={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"}},Ka={items:{type:Array,default:()=>[]}},Qa={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},ou=i.defineComponent({name:"FXTodoListItemView",props:Qa,emits:["click"],setup(e,{emit:t}){const{propertyStates:n,registerProperty:u,updatePropertyValue:o,startStreaming:r}=Nr();u("title",e.title??""),u("task",e.task??""),i.watch([()=>e.title,()=>e.task],([h,m])=>{o("title",h??""),o("task",m??"")});const a=i.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),s=i.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function c(){t("click",e,e.id)}const d=i.computed(()=>e.outputMode==="streaming"),f=i.computed(()=>{var h;return d.value?((h=n.title)==null?void 0:h.displayedValue)??"":e.title??""}),l=i.computed(()=>{var h;return d.value?((h=n.task)==null?void 0:h.displayedValue)??"":e.task??""});return i.computed(()=>{var h;return d.value?((h=n.detail)==null?void 0:h.displayedValue)??"":e.message??""}),i.onMounted(()=>{d.value&&r()}),()=>i.createVNode("li",{key:e.id,class:a.value,onClick:c},[e.todoList&&e.todoList.length>0&&i.createVNode(Qt,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&i.createVNode(i.Fragment,null,[e.showLoading&&i.createVNode(ru,{status:e.status??"Done"},null),f.value?i.createVNode("div",{class:"f-chat-todo-task-wrapper"},[i.createVNode("span",{class:s.value},[f.value]),i.createVNode("div",{class:"f-chat-todo-task-description"},[l.value])]):i.createVNode("div",{class:s.value},[l.value])])])}}),er=i.defineComponent({name:"FXTodoListView",props:Ka,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?i.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((n,u)=>i.createVNode(ou,i.mergeProps({key:u},n),null))]):null}}}),Sh="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e编组%207%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M7.55915932,0%20L13.7556941,3.41136535%20L13.7556941,11.284674%20L13.3483936,11.690778%20L7.386,8.406%20L7.38699821,14.9818613%20L6.43606745,14.9818613%20L0.817648054,11.8789694%20L0,10.332184%20L0,3.84230019%20L1.11160458,3.1505903%20L6.167,6.164%20L6.16702601,0.0484363034%20L7.55915932,0%20Z%20M6.22734637,8.44496623%20L1.7439756,11.0288454%20L6.22734637,13.5008368%20L6.22734637,8.44496623%20Z%20M12.540835,4.77769015%20L8.0314841,7.40118228%20L12.540835,9.89639007%20L12.540835,4.77769015%20Z%20M1.21847977,4.6422718%20L1.21847977,9.89639007%20L5.74466316,7.33704011%20L1.21847977,4.6422718%20Z%20M7.38699821,1.29872452%20L7.38699821,6.38587585%20L11.9618229,3.74647178%20L7.38699821,1.29872452%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='输入框'%20transform='translate(-383,%20-2915)'%3e%3cg%20id='编组-3'%20transform='translate(353,%202900)'%3e%3cg%20id='编组-12'%20transform='translate(16,%200)'%3e%3cg%20id='编组-7'%20transform='translate(14,%2015)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='18'%20height='18'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.2571,%200.2571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='17.4857143'%20height='17.4857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(1.0286,%200.5143)'%3e%3cpath%20d='M8.37444647,0.834547606%20L14.5709813,4.24591296%20L14.5709813,12.1192216%20L14.1636807,12.5253256%20L8.20128715,9.24054761%20L8.20228536,15.8164089%20L7.25135461,15.8164089%20L1.63293521,12.713517%20L0.815287151,11.1667316%20L0.815287151,4.67684779%20L1.92689173,3.98513791%20L6.98228715,6.99854761%20L6.98231316,0.882983909%20L8.37444647,0.834547606%20Z%20M7.04263352,9.27951383%20L2.55926275,11.8633931%20L7.04263352,14.3353844%20L7.04263352,9.27951383%20Z%20M13.3561221,5.61223775%20L8.84677126,8.23572989%20L13.3561221,10.7309377%20L13.3561221,5.61223775%20Z%20M2.03376692,5.47681941%20L2.03376692,10.7309377%20L6.55995031,8.17158771%20L2.03376692,5.47681941%20Z%20M8.20228536,2.13327213%20L8.20228536,7.22042346%20L12.77711,4.58101939%20L8.20228536,2.13327213%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(0.8153,%200.8345)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='4.25315881%206.97898081%206.77390576%206.97898081%207.02656062%208.27871177%202.85827337%2011.0934106%201.11764364%208.72438079'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='7.02656062%206.72375166%208.13485635%204.53274022%208.34127598%201.90699543%205.4451985%201.76583085%205.65253089%205.06118714%206.77390576%206.72375166'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='10.0650382%207.40118228%207.32091739%207.49951705%207.32091739%208.25868082%208.54200343%2010.0061721%2010.9306691%2010.9000701%2012.5091187%208.51626021'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M8.37444647,0.834547606%20L14.5709813,4.24591296%20L14.5709813,12.1192216%20L14.1636807,12.5253256%20L6.98231316,8.56885311%20L6.98231316,0.882983909%20L8.37444647,0.834547606%20Z%20M8.20228536,2.13327213%20L8.20228536,7.22042346%20L8.49131316,7.05254761%20L8.49185956,7.71336245%20L9.03131316,8.12754761%20L8.84677126,8.23572989%20L13.3561221,10.7309377%20L13.3553132,5.61654761%20L13.6305018,5.15381301%20L12.77711,4.58101939%20L8.20228536,2.13327213%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='6.7778308%208.05322127%207.08945008%209.24101764%202.55926275%2011.8633931%202.19155022%2010.6380421'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M7.62936495,9.94195975%20C8.65711289,9.94195975%209.49026721,9.10880543%209.49026721,8.08105749%20C9.49026721,7.05330955%208.65711289,6.22015523%207.62936495,6.22015523%20C6.60161701,6.22015523%205.7684627,7.05330955%205.7684627,8.08105749%20C5.7684627,9.10880543%206.60161701,9.94195975%207.62936495,9.94195975%20Z%20M13.9785177,6.03107309%20C14.7793603,6.03107309%2015.4285714,5.38186193%2015.4285714,4.58101939%20C15.4285714,3.78017684%2014.7793603,3.13096568%2013.9785177,3.13096568%20C13.1776752,3.13096568%2012.528464,3.78017684%2012.528464,4.58101939%20C12.528464,5.38186193%2013.1776752,6.03107309%2013.9785177,6.03107309%20Z%20M7.62936495,16.4714598%20C8.4302075,16.4714598%209.07941866,15.8222486%209.07941866,15.0214061%20C9.07941866,14.2205635%208.4302075,13.5713524%207.62936495,13.5713524%20C6.8285224,13.5713524%206.17931125,14.2205635%206.17931125,15.0214061%20C6.17931125,15.8222486%206.8285224,16.4714598%207.62936495,16.4714598%20Z%20M1.45005371,13.0387617%20C2.25089625,13.0387617%202.90010741,12.3895505%202.90010741,11.588708%20C2.90010741,10.7878654%202.25089625,10.1386543%201.45005371,10.1386543%20C0.649211158,10.1386543%200,10.7878654%200,11.588708%20C0,12.3895505%200.649211158,13.0387617%201.45005371,13.0387617%20Z%20M7.62936495,2.51342642%20C8.32342849,2.51342642%208.88607816,1.95077675%208.88607816,1.25671321%20C8.88607816,0.56264967%208.32342849,0%207.62936495,0%20C6.93530141,0%206.37265174,0.56264967%206.37265174,1.25671321%20C6.37265174,1.95077675%206.93530141,2.51342642%207.62936495,2.51342642%20Z%20M13.9785177,12.9913309%20C14.6725813,12.9913309%2015.2352309,12.4286812%2015.2352309,11.7346177%20C15.2352309,11.0405541%2014.6725813,10.4779045%2013.9785177,10.4779045%20C13.2844542,10.4779045%2012.7218045,11.0405541%2012.7218045,11.7346177%20C12.7218045,12.4286812%2013.2844542,12.9913309%2013.9785177,12.9913309%20Z%20M1.45005371,5.50262617%20C2.14411725,5.50262617%202.70676692,4.9399765%202.70676692,4.24591296%20C2.70676692,3.55184942%202.14411725,2.98919975%201.45005371,2.98919975%20C0.755990164,2.98919975%200.193340494,3.55184942%200.193340494,4.24591296%20C0.193340494,4.9399765%200.755990164,5.50262617%201.45005371,5.50262617%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Fh=300,Dh={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},Qt=i.defineComponent({name:"FXStartedTodo",props:Ya,setup(e){const t=i.ref(null),n=i.ref(null),u=i.ref(null),o=i.ref(null),r=i.computed(()=>e.outputMode==="streaming"),{displayContent:a}=fi(()=>({detail:e.taskDetail??""}),()=>!0,r,{charInterval:30}),s=i.ref(e.initExpanded),c=i.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!s.value}));function d(){e.detailViewMode!=="expand"&&(o.value!=null&&(window.clearTimeout(o.value),o.value=null),u.value=window.setTimeout(()=>{t.value&&n.value&&n.value.show(t.value),u.value=null},Fh))}function f(){e.detailViewMode!=="expand"&&(u.value!=null&&(window.clearTimeout(u.value),u.value=null),o.value=window.setTimeout(()=>{var x,A;(A=(x=n.value)==null?void 0:x.hide)==null||A.call(x),o.value=null},150))}function l(){if(e.detailViewMode==="none")return null;const x=a.value.detail??"";return i.createVNode(i.Fragment,null,[x?i.createVNode("div",{class:"f-chat-started-todo-task-detail"},[x]):null,i.createVNode(er,{items:e.todoList},null)])}function h(){e.detailViewMode==="expand"&&(s.value=!s.value)}function m(){return e.detailViewMode==="expand"?i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:s.value?"rotate(90deg)":"rotate(0deg)",transition:"all 0.3s ease-in-out"}},null):null}function p(){return e.detailViewMode==="hover"&&i.createVNode(Kt,{ref:n,class:"f-chat-started-todo-popover"},{default:()=>[i.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{o.value!=null&&(window.clearTimeout(o.value),o.value=null)},onMouseleave:f},[l()])]})}function w(){return e.showLoading?e.loading?e.loading:e.status==="Done"?i.createVNode("img",{src:Sh},null):i.createVNode(ru,{status:e.status},null):null}return()=>i.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working"}],onMouseenter:d,onMouseleave:f},[i.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:h},[e.showLabel&&i.createVNode("span",{class:"f-chat-started-todo-label"},[Dh[e.status]]),w(),i.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),m()]),e.detailViewMode==="expand"&&i.createVNode("div",{class:c.value},[l()]),p()])}});Qt.install=e=>{e.component(Qt.name,Qt)};const Th=i.defineComponent({name:"FXBubbleThoughtChain",props:wh,setup(e,t){const{elapsedSeconds:n,hasEverStarted:u,start:o,stop:r,reset:a}=zu(),s=i.computed(()=>{var l;return((l=e.content)==null?void 0:l.status)==="Done"}),c=i.computed(()=>{var l;return((l=e.content)==null?void 0:l.message)??"正在思考......"}),d=i.computed(()=>{var m,p;const l=((m=e.content)==null?void 0:m.doneMessage)??((p=e.content)==null?void 0:p.message)??"思考完成",h=u.value?`(用时${n.value}秒)`:"";return""+l+h}),f=i.computed(()=>s.value?d.value:c.value);return i.watch(()=>{var l;return(l=e.content)==null?void 0:l.status},l=>{l==="Working"?o():l==="Done"?r():a()},{immediate:!0}),i.onUnmounted(()=>{a()}),t.expose({instance:{get loadDone(){return e.content?s.value:!0}}}),()=>{var l,h,m;return e.content?i.createVNode(Qt,{status:((l=e.content)==null?void 0:l.status)??"Working",message:f.value,todoList:(h=e.content)==null?void 0:h.todoList,detailViewMode:((m=e.content)==null?void 0:m.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0},null):null}}}),tr=i.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-auth"},[i.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),i.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>i.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var n;(n=e.onConfirm)==null||n.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),Nh=300,Lh={read_file:"tool_file",write_file:"tool_file",edit_file:"tool_file",glob:"tool_file",grep:"tool_file",bash:"tool_command",web_fetch:"tool_internet",web_search:"tool_internet",todo_create:"tool_task",todo_list:"tool_task",todo_get:"tool_task",todo_update:"tool_task",ask_user:"tool_interaction",core_memory:"tool_memory",add_daily_note:"tool_memory",lint_json:"dateselect",lint_markdown:"dateselect",output_validation:"dateselect",load_skill_through_path:"tool_mcp"};function Ih(e){return e?e.startsWith("mcp:")?"tool_mcp":Lh[e]??"thinking_tool":"thinking_tool"}const wn=i.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),n=i.computed(()=>e.content.success===!1),u=i.ref(!1);let o=setTimeout(()=>{u.value=!0},Nh);i.onBeforeUnmount(()=>{o&&clearTimeout(o)});const r=i.computed(()=>t.value),a=i.computed(()=>u.value&&!t.value),s=i.computed(()=>n.value?"执行失败":r.value?"执行完成":"调用中"),c=i.ref(!1),d=i.computed(()=>({"f-chat-tool-use":!0,"is-done":r.value,"is-error":n.value})),f=i.computed(()=>({"f-chat-tool-use-status":!0,"is-done":r.value&&!n.value,"is-run":a.value&&!n.value,"is-error":n.value}));i.watch(()=>[e.content.result,e.content.toolResultApplied,e.content.success],()=>{t.value&&(c.value=!1)},{flush:"post"});const l=()=>t.value?i.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{c.value=!c.value}},[i.createVNode("i",{class:"fx-icon fx-icon-"+Ih(e.content.toolName)+" tool-icon"},null),i.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),i.createVNode("div",{class:f.value},[n.value?i.createVNode("i",{class:"fx-icon fx-icon-fail_line f-chat-tool-use-status-icon","aria-hidden":"true"},null):i.createVNode(ru,{status:r.value?"Done":a.value?"Working":"NotStart"},null),i.createVNode("span",{class:"f-chat-tool-use-status-text"},[s.value])]),i.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:c.value?"rotate(90deg)":"rotate(0deg)",transition:"transform 0.2s ease"}},null)]),c.value&&i.createVNode("div",{class:"f-chat-tool-use-content"},[l()])])}});wn.install=e=>{e.component(wn.name,wn)};const nr=i.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":tr,"fx-app-preview-inline":at,FXToolUse:wn},props:Fr,setup(e,t){const n=i.shallowRef(),u=i.ref(),o=i.ref(),r=i.computed(()=>!!e.showAvatar),a=i.computed(()=>r.value===!0||e.header==="ContentHeader"),s=i.computed(()=>t.slots.leftFooter||t.slots.rightFooter),c=i.computed(()=>{var C;return Ae({},(C=e.styles)==null?void 0:C.footer)}),d=C=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(C.type==="md"&&C.content){e.onPreview({content:C.content,contentType:"markdown"});return}if(C!=null&&C.url){const P=C!=null&&C.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:C.url,previewMode:P,title:C.name})}}},f=C=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const P=C==null?void 0:C.filter(E=>E.type==="md"&&E.content);if(P.length===0)return;const R=Object.fromEntries(P.map(E=>[E.name,E.content??""]));e.onPreview({contentMap:R,contentType:"markdown"})},{renderFileEmbeddedContent:l,renderPageEmbeddedContent:h}=pi(),m=i.ref(""),p=i.computed(()=>{var P,R;if((P=e.content)!=null&&P.footerContent)return e.content.footerContent;const C=(R=e.content)==null?void 0:R.structuredContent;return C&&(C.footerTemplate||C.footerUrl||C.footerFile)?{type:C.footerUrl?"page":C.footerFile?"file":"template",pageUrl:C.footerUrl,fileContent:C.footerFile,template:C.footerTemplate,width:C.footerWidth,height:C.footerHeight}:null});i.watch(()=>{var C;return(C=p.value)==null?void 0:C.width},C=>{if(!C){m.value="";return}if(C.endsWith("%")){const P=parseFloat(C);isNaN(P)||i.nextTick(()=>{var E,M;const R=(M=(E=n.value)==null?void 0:E.parentElement)==null?void 0:M.clientWidth;R&&(m.value=`${R*P/100}px`)})}else m.value=C},{immediate:!0});const w=C=>{if(!C||C.length===0)return"我";const P=C.charAt(0);return/[\u4e00-\u9fa5]/.test(P)?P:P.toUpperCase()};function x(){return e.header==="ContentHeader"?Gc:qc}const A=x(),{renderHeader:b}=A(e,t),g=()=>{var R,E,M;const C=((R=e.content)==null?void 0:R.sender)??"发送人",P=w(((E=e.content)==null?void 0:E.sender)??"");return i.createVNode("div",{class:"f-chat-bubble-avatar"},[(M=e.content)!=null&&M.avatar?i.createVNode("img",{src:e.content.avatar,alt:C},null):i.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[P])])},y=()=>{var P;const C=(P=e.content)==null?void 0:P.toolUseAboveText;return C!=null&&C.length?i.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[C.map((R,E)=>i.createVNode(wn,{key:R.toolUseId??`tu-${E}`,content:R},null))]):null},k=()=>{var C;return(C=e.content)!=null&&C.thinkingContent?i.createVNode(xh,{ref:u,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},T=()=>{var C;return(C=e.content)!=null&&C.startedTodo?i.createVNode(Th,{ref:o,content:e.content.startedTodo},null):null},D=C=>{if(!(C!=null&&C.type))return null;const{type:P}=C;return P==="page"&&C.pageUrl?h(C,{onNavigate:R=>{var E;(E=e.onPreview)==null||E.call(e,{url:R})}}):P==="file"&&C.fileContent?l(C,{onPreviewFile:d,onBatchPreviewFile:f}):P==="template"&&C.template?C.template():null},F=()=>{var E,M,V;if(!((V=(M=(E=e.content)==null?void 0:E.structuredContent)==null?void 0:M.sections)!=null&&V.length))return null;const{sections:C,showDivider:P}=e.content.structuredContent,R=$=>{const{content:re,label:te}=$;return te||re&&typeof re=="string"?i.createVNode(i.Fragment,null,[i.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),$.label&&i.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[$.label]),i.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[$.content])]):D($.content)};return i.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":P}]},[C.map(($,re)=>i.createVNode("div",{key:re,class:["f-chat-bubble-structured-section",{"section-divider":$.showDivider}]},[i.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[$.icon&&($.icon.startsWith("http")||$.icon.startsWith("//")||$.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test($.icon)?i.createVNode("img",{alt:$.title,src:$.icon,class:"f-chat-bubble-structured-section-icon"},null):i.createVNode("i",{class:`fx-icon ${$.icon}`,style:$.iconStyle},null)),i.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[$.title])]),$.items&&$.items.length>0&&i.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[$.items.map((te,z)=>i.createVNode("div",{key:z,class:"f-chat-bubble-structured-section-item"},[R(te)]))])]))])},U=()=>{const C=p.value;if(!C)return null;const P={};return m.value&&(P.width=m.value),C.height&&(P.height=`${C.height}px`),i.createVNode("div",{class:"f-chat-bubble-content-footer",style:P},[D(C)])},_=()=>{const C=e.attachmentRowClickOpensPreview!==!1?d:void 0;return i.createVNode(hi,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:C,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?f:void 0},null)},N=()=>{var P;const C=(P=e.content)==null?void 0:P.compositeInlineBlocks;return C!=null&&C.length?C.map((R,E)=>R.kind==="userAuth"?i.createVNode(i.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${E}`,content:R.content,onConfirm:e.onUserAuthConfirm},null):i.createVNode(i.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${E}`,content:R.content,onOpen:e.onPreview},null)):null},L=()=>{var C,P,R,E,M,V;return i.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[a.value&&b(),_(),i.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(C=e.content)!=null&&C.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():i.createVNode(i.Fragment,null,[k(),y()]),T(),F(),i.createVNode(bh,{title:((P=e.content)==null?void 0:P.title)??"",subtitle:((R=e.content)==null?void 0:R.subtitle)??"",text:typeof((E=e.content)==null?void 0:E.text)=="string"?e.content.text:"",textFormat:((M=e.content)==null?void 0:M.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),U(),(V=e.compositeTailRender)==null?void 0:V.call(e),N()]),s.value&&i.createVNode("div",{class:"f-chat-bubble-footer",style:c.value},[t.slots.leftFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&i.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>i.createVNode("div",{class:"f-chat-bubble-container",ref:n},[i.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?i.createVNode(i.Fragment,null,[r.value&&g(),L()]):i.createVNode(i.Fragment,null,[L(),r.value&&g()])])])}}),Ja={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},Fo=i.defineComponent({name:"FXBubbleAction",props:Ja,setup(e,t){const n=i.computed(()=>Ae({},e.customStyle));return()=>t.slots.default&&i.createVNode("span",{class:"f-chat-bubble-footer-action",style:n.value},[t.slots.default()])}});nr.install=e=>{e.component(nr.name,nr),e.component(Fo.name,Fo)};const es={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},ts={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},iu=i.defineComponent({name:"FXCarouselItem",props:ts,emits:["click"],setup(e,{slots:t,emit:n}){const u=i.computed(()=>{var l;const f={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return ye(f,(l=e.classNames)==null?void 0:l.item)}),o=i.computed(()=>{var l,h;const f=Ae({},(l=e.styles)==null?void 0:l.item);return Ae(f,(h=e.styles)==null?void 0:h.item)}),r=()=>{var f,l,h;return e.item.image?i.createVNode("img",{class:["fx-carousel--item-image",(f=e.classNames)==null?void 0:f.image],style:(l=e.styles)==null?void 0:l.image,src:e.item.image,alt:(h=e.item.title)==null?void 0:h.toString()},null):null},a=()=>{var f,l,h,m;return e.item.content?i.createVNode("div",{class:["fx-carousel--item-content",(f=e.classNames)==null?void 0:f.content],style:(l=e.styles)==null?void 0:l.content},[e.item.content]):t.default?i.createVNode("div",{class:["fx-carousel--item-content",(h=e.classNames)==null?void 0:h.content],style:(m=e.styles)==null?void 0:m.content},[t.default()]):null},s=()=>{var f,l;return e.item.title?i.createVNode("h3",{class:["fx-carousel--item-title",(f=e.classNames)==null?void 0:f.title],style:(l=e.styles)==null?void 0:l.title},[e.item.title]):null},c=()=>{var f,l;return e.item.description?i.createVNode("p",{class:["fx-carousel--item-description",(f=e.classNames)==null?void 0:f.description],style:(l=e.styles)==null?void 0:l.description},[e.item.description]):null},d=f=>{e.item.disabled||n("click",f,e.item,e.index)};return()=>i.createVNode("div",{class:u.value,style:o.value,onClick:d},[r(),a(),e.showInfo&&i.createVNode("div",{class:"fx-carousel--item-info"},[s(),c()])])}});function Oh(e){const{items:t,autoplay:n=!1,interval:u=3e3,loop:o=!0,direction:r="horizontal"}=e,a=i.ref(0),s=i.ref(!1),c=i.ref(null),d=i.computed(()=>t.length),f=i.computed(()=>d.value<=1);i.computed(()=>a.value===0?o?d.value-1:0:a.value-1),i.computed(()=>a.value===d.value-1?o?0:a.value:a.value+1);const l=i.computed(()=>{const g=-a.value*100;return{transform:r==="horizontal"?`translateX(${g}%)`:`translateY(${g}%)`,transition:"transform 0.5s ease"}}),h=g=>{g<0||g>=d.value||(a.value,a.value=g)},m=()=>{f.value||(a.value===d.value-1?h(o?0:a.value):h(a.value+1))},p=()=>{f.value||(a.value===0?h(o?d.value-1:0):h(a.value-1))},w=()=>{!n||f.value||(x(),c.value=window.setInterval(()=>{s.value||m()},u))},x=()=>{c.value&&(clearInterval(c.value),c.value=null)},A=()=>{s.value=!0,n&&x()},b=()=>{s.value=!1,n&&w()};return i.onMounted(()=>{w()}),i.onUnmounted(()=>{x()}),{currentIndex:a,totalItems:d,isSingleItem:f,trackStyle:l,goTo:h,next:m,prev:p,handleMouseEnter:A,handleMouseLeave:b}}const rr=i.defineComponent({name:"FXCarousel",props:es,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:n}){const{currentIndex:u,isSingleItem:o,trackStyle:r,goTo:a,next:s,prev:c,handleMouseEnter:d,handleMouseLeave:f}=Oh({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),l=k=>{n("update:modelValue",k),n("change",k,u.value)},h=i.computed(()=>{var T;const k={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":o.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return ye(k,(T=e.classNames)==null?void 0:T.root)}),m=i.computed(()=>{var D;const k={height:typeof e.height=="number"?`${e.height}px`:e.height},T=Ae(k,e.customStyle);return Ae(T,(D=e.styles)==null?void 0:D.root)}),p=i.computed(()=>{var T;const k={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return ye(k,(T=e.classNames)==null?void 0:T.container)}),w=i.computed(()=>{var T;return ye({"fx-carousel--track":!0},(T=e.classNames)==null?void 0:T.track)}),x=i.computed(()=>{var T;const k={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return ye(k,(T=e.classNames)==null?void 0:T.indicator)}),A=k=>{var D,F;const T={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":k==="left","fx-carousel--arrow-right":k==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return T[`fx-carousel--arrow-${e.buttonPosition}`]=!0,ye(T,k==="left"?(D=e.classNames)==null?void 0:D.arrowLeft:(F=e.classNames)==null?void 0:F.arrowRight)},b=k=>{var F,U;if(o.value)return null;const T=k==="left"?c:s,D=t[k==="left"?"prevArrow":"nextArrow"];return i.createVNode("button",{class:A(k),style:k==="left"?(F=e.styles)==null?void 0:F.arrowLeft:(U=e.styles)==null?void 0:U.arrowRight,onClick:T,"aria-label":`${k} arrow`},[D?D():i.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${k==="left"?"left":"right"}`},null)])},g=()=>{var k;return o.value||!e.showIndicator?null:i.createVNode("div",{class:x.value,style:(k=e.styles)==null?void 0:k.indicator},[e.items.map((T,D)=>{var F,U;return i.createVNode("button",{"aria-label":`indicator ${D}`,key:D,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":D===u.value}],style:D===u.value?(F=e.styles)==null?void 0:F.indicatorItemActive:(U=e.styles)==null?void 0:U.indicatorItem,onClick:()=>{a(D),l(D)}},null)})])},y=()=>i.createVNode("div",{class:w.value,style:r.value},[e.items.map((k,T)=>i.createVNode(iu,{key:k.id||`item_${T}`,item:k,showInfo:e.showInfo,index:T,active:T===u.value,styles:e.styles,classNames:e.classNames,onClick:(D,F,U)=>{n("item-click",D,F,U)}},{default:()=>{var D,F;return[(D=t.item)==null?void 0:D.call(t,{item:k,index:T,active:T===u.value}),(F=t[`item${T}`])==null?void 0:F.call(t,{item:k,index:T,active:T===u.value})]}}))]);return()=>{var k;return i.createVNode("div",{class:h.value,style:m.value,onMouseenter:d,onMouseleave:f},[e.buttonPosition==="outer"&&b("left"),i.createVNode("div",{class:p.value,style:(k=e.styles)==null?void 0:k.container},[e.buttonPosition==="inner"&&b("left"),y(),e.buttonPosition==="inner"&&b("right")]),e.buttonPosition==="outer"&&b("right"),g()])}}});rr.install=e=>{e.component(rr.name,rr),e.component(iu.name,iu)};const ns={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function Ph(e){const t=i.ref(-1),n=i.ref(-1),u=i.ref(0),o=i.ref(0),r=i.ref(!1),a=i.ref(!1),s=i.computed(()=>({display:r.value?"block":"none",left:`${u.value}px`,cursor:"e-resize"})),c=i.computed(()=>({display:a.value?"block":"none",top:`${o.value}px`,cursor:"n-resize"})),d=i.computed(()=>{const x={display:a.value||r.value?"block":"none"};return o.value>0&&(x.cursor="n-resize"),x});function f(x,A,b,g){const y=e.value;if(y){const{left:k,right:T,width:D}=y.getBoundingClientRect();let F=x.clientX-k;g==="right"&&(F=T-x.clientX),F>A&&(F=A),F<b&&(F=b),g==="right"&&(F=D-F),u.value=F}}function l(x,A,b,g){const y=e.value;if(y){const{top:k,bottom:T,height:D}=y.getBoundingClientRect();let F=x.clientY-k;g==="bottom"&&(F=T-x.clientY),F>A&&(F=A),F<b&&(F=b),g==="bottom"&&(F=D-F),o.value=F}}function h(){const x=e.value;if(x){const{width:A,height:b}=x.getBoundingClientRect();return{width:A,height:b}}return null}function m(){const x=e.value;return x?Array.from(x.querySelectorAll("[data-position]")).reduce((A,b)=>{const g=b.getAttribute("data-position");return A=Object.assign(A,{[g]:b}),A},{}):null}function p(x,A){const b=h(),g=m();if(b&&g){const y=g==null?void 0:g.right,k=g==null?void 0:g.left;if(x==="left"&&k)return y?b.width-y.clientWidth-A:b.width-A;if(x==="right"&&y)return k?b.width-k.clientWidth-A:b.width-A}}function w(x,A){const b=h(),g=m();if(b&&g){const y=g==null?void 0:g.bottom,k=g==null?void 0:g.top;if(x==="top"&&k)return y?b.height-y.clientHeight-A:b.height-A;if(x==="bottom"&&y)return k?b.height-k.clientHeight-A:b.height-A}}return{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:c,resizeOverlayStyle:d,showHorizontalResizeHandle:r,showVerticalResizeHandle:a,horizontalResizeBarPosition:t,verticalResizeBarPosition:n,verticalResizeHandleOffset:o,horizontalResizeHandleOffset:u,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:l,getPanelMaxWidth:p,getPanelMaxHeight:w}}const vn=i.defineComponent({name:"FXSplitter",props:ns,emits:[],setup(e,t){const n=i.ref(),u=Ph(n),{horizontalResizeHandleStyle:o,verticalResizeHandleStyle:r,resizeOverlayStyle:a}=u;i.provide("splitter",{useResizeHandleComposition:u});const s=i.computed(()=>ye({"f-splitter":!0},e==null?void 0:e.customClass)),c=i.computed(()=>{const d={"flex-direction":e.direction==="row"?"row":"column"};return Ae(d,e==null?void 0:e.customStyle)});return()=>i.createVNode("div",{class:s.value,ref:n,style:c.value},[t.slots.default&&t.slots.default(),i.createVNode("div",{class:"f-splitter-resize-overlay",style:a.value},null),i.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:o.value},null),i.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:r.value},null)])}}),Rh={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function Vh(e,t){const n=i.ref(e.width),u=i.ref(e.height),{horizontalResizeBarPosition:o,horizontalResizeHandleOffset:r,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,verticalResizeBarPosition:c,verticalResizeHandleOffset:d,draggingHorizontalResizeHandle:f,draggingVerticalResizeHandle:l,getPanelMaxWidth:h,getPanelMaxHeight:m}=t;let p="",w,x,A;const b=()=>e.maxWidth?e.maxWidth:h(p,e.minWidth)||0,g=()=>e.maxHeight?e.maxHeight:m(p,e.minHeight)||0;function y(D){if((p==="left"||p==="right")&&x){const{left:F}=x.getBoundingClientRect(),{width:U}=w.getBoundingClientRect(),_=D.clientX-F;let N=p==="left"?(U||0)+(_-o.value):(U||0)-(_-o.value);N=e.minWidth>0?Math.max(e.minWidth,N):N;const L=b();L!=null&&L>0&&(N=L>N?N:L),n.value=N}if((p==="top"||p==="bottom")&&x){const{top:F}=x.getBoundingClientRect(),{height:U}=w.getBoundingClientRect(),_=D.clientY-F;let N=p==="top"?(U||0)+(_-c.value):(U||0)-(_-c.value);N=e.minHeight>0?Math.max(e.minHeight,N):N;const L=g();L!=null&&L>0&&(N=L>N?N:L),u.value=N}r.value=0,d.value=0,o.value=-1,c.value=-1,a.value=!1,s.value=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",y),document.body.style.userSelect="",p="",w=null,x=null}function k(D,F,U){if(p=F,w=U,a.value=!0,x=D.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),x){const{left:N}=x.getBoundingClientRect();r.value=D.clientX-N,o.value=D.clientX-N;const L=b();A=C=>f(C,L,e.minWidth,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",y),document.body.style.userSelect="none"}}function T(D,F,U){if(p=F,w=U,s.value=!0,x=D.composedPath().find(N=>N.className.split(" ")[0]==="f-splitter"),x){const{top:N}=x.getBoundingClientRect();d.value=D.clientY-N,c.value=D.clientY-N;const L=g();A=C=>l(C,L,e.minHeight,p),document.addEventListener("mousemove",A),document.addEventListener("mouseup",y),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:u,onClickSplitterHorizontalResizeBar:k,onClickSplitterVerticalResizeBar:T}}const ur=i.defineComponent({name:"FSplitterPane",props:Rh,emits:[],setup(e,t){const n=i.ref(),u=i.inject("splitter"),{useResizeHandleComposition:o}=u,r=Vh(e,o),{actualHeight:a,actualWidth:s,onClickSplitterHorizontalResizeBar:c,onClickSplitterVerticalResizeBar:d}=r,f=i.ref(e.position),l=i.computed(()=>{const g={"f-splitter-pane":!0,"f-splitter-pane-main":f.value==="center","has-resize-bar":e.resizable};return g["f-splitter-pane-"+f.value]=!0,ye(g,e==null?void 0:e.customClass)}),h=i.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(g=>["e","n","s","w"].find(y=>y===g)):[]),m=i.computed(()=>{const g={};return(s.value||s.value===0)&&(f.value==="left"||f.value==="right"||h.value.find(y=>y==="e")||h.value.find(y=>y==="w"))&&(g.width=`${s.value}px`),(a.value||a.value===0)&&(f.value==="bottom"||f.value==="top"||h.value.find(y=>y==="s")||h.value.find(y=>y==="n"))&&(g.height=`${a.value}px`),e.visible||(g.display="none"),Ae(g,e==null?void 0:e.customStyle)}),p=i.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":f.value==="left","f-splitter-resize-bar-n":f.value==="bottom","f-splitter-resize-bar-s":f.value==="top","f-splitter-resize-bar-w":f.value==="right"}));function w(g){return{e:"left",w:"right",s:"top",n:"bottom"}[g]||g}function x(g,y){y=w(y),["left","right"].find(k=>k===y)&&c(g,y,n.value),["top","bottom"].find(k=>k===y)&&d(g,y,n.value)}function A(){return h.value.length>0?h.value.map(g=>i.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+g,onMousedown:y=>x(y,g)},null)):i.createVNode("span",{class:p.value,onMousedown:g=>x(g,f.value)},null)}function b(){s.value=e.width,a.value=e.height,m.value}return t.expose({reset:b}),()=>i.createVNode("div",{ref:n,class:l.value,style:m.value,"data-position":f.value},[t.slots.default&&t.slots.default(),e.resizable&&A()])}});vn.install=e=>{e.component(vn.name,vn),e.component(ur.name,ur)};const rs={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},us={content:{type:String,default:null}},Mh=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},Bh=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},or=(e,t=new WeakMap)=>{if(e===null||Mh(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return Bh(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const u=new Map;return t.set(e,u),e.forEach((o,r)=>{u.set(r,or(o,t))}),u}if(e instanceof Set){const u=new Set;t.set(e,u);for(const o of e)u.add(or(o,t));return u}if(Array.isArray(e)){const u=[];return t.set(e,u),e.forEach(o=>{u.push(or(o,t))}),u}const n={};t.set(e,n);for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(n[u]=or(e[u],t));return n},zh=(e,t=200)=>{let n=0;return(...u)=>new Promise(o=>{n&&(clearTimeout(n),o("cancel")),n=window.setTimeout(()=>{e.apply(void 0,u),n=0,o("done")},t)})},Do=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,au=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),jh=new Set(["__proto__","constructor","prototype"]),Hh=e=>!jh.has(e),To=(e,t,n={})=>{if(Array.isArray(e)&&Array.isArray(t))return No(e,t,n);const{excludeKeys:u}=n,o=e,r=t;for(const a of Object.keys(r)){if(!Hh(a))continue;const s=r[a],c=o[a];u&&u(a)?o[a]=s:Array.isArray(s)&&Array.isArray(c)?o[a]=No(c,s,n):au(s)&&au(c)?o[a]=To(c,s,n):o[a]=s}return e},No=(e,t,n)=>{const u=e.slice();return t.forEach((o,r)=>{const a=u[r];Array.isArray(o)&&Array.isArray(a)?u[r]=No(a,o,n):au(o)&&au(a)?u[r]=To(a,o,n):u[r]=o}),u},q="md-editor",de="https://unpkg.com",$h=`${de}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,os={main:`${de}/prettier@3.8.1/standalone.js`,markdown:`${de}/prettier@3.8.1/plugins/markdown.js`},Uh={css:`${de}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${de}/cropperjs@1.6.2/dist/cropper.min.js`},Wh=`${de}/screenfull@5.2.0/dist/screenfull.js`,Gh=`${de}/mermaid@11.12.3/dist/mermaid.min.js`,qh={js:`${de}/katex@0.16.33/dist/katex.min.js`,css:`${de}/katex@0.16.33/dist/katex.min.css`},Lo={a11y:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${de}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},Xh=`${de}/echarts@6.0.0/dist/echarts.min.js`,is={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},ct={editorExtensions:{highlight:{js:$h,css:Lo},prettier:{standaloneJs:os.main,parserMarkdownJs:os.markdown},cropper:{...Uh},screenfull:{js:Wh},mermaid:{js:Gh,enableZoom:!0},katex:{...qh},echarts:{js:Xh}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},Zh=({instance:e,ctx:t,props:n={}},u="default")=>{const o=(e==null?void 0:e.$slots[u])||(t==null?void 0:t.slots[u]);return(o?o(e):"")||n[u]},Yh="buildFinished",Io="errorCatcher",Oo="catalogChanged",Kh="pushCatalog",as="rerender",Qh="taskStateChanged";class Jh{constructor(){fe(this,"pools",{})}remove(t,n,u){const o=this.pools[t]&&this.pools[t][n];o&&(this.pools[t][n]=o.filter(r=>r!==u))}clear(t){this.pools[t]={}}on(t,n){return this.pools[t]||(this.pools[t]={}),this.pools[t][n.name]||(this.pools[t][n.name]=[]),this.pools[t][n.name].push(n.callback),this.pools[t][n.name].includes(n.callback)}emit(t,n,...u){this.pools[t]||(this.pools[t]={});const o=this.pools[t][n];o&&o.forEach(r=>{try{r(...u)}catch(a){console.error(`${n} monitor event exception!`,a)}})}}const ot=new Jh,e1=(e,t)=>{if(!e)return e;const n=t.split(`
33
+ `),u=['<span rn-wrapper aria-hidden="true">'];return n.forEach(()=>{u.push("<span></span>")}),u.push("</span>"),`<span class="${q}-code-block">${e}</span>${u.join("")}`};async function ss(e){if(typeof e=="string"){if(window.isSecureContext&&navigator.clipboard)return await navigator.clipboard.writeText(e);{const t=document.createElement("textarea");let n=!1;if(t.value=e,t.style.position="fixed",t.style.opacity=0,t.style.zIndex="-10000",t.style.top="-10000",document.body.appendChild(t),t.select(),n=document.execCommand("copy"),document.body.removeChild(t),n)return;throw new Error('Failed to copy content via "execCommand"!')}}}const t1={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${q}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${q}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`,pin:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin ${q}-icon"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>`,"pin-off":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin-off ${q}-icon"><path d="M12 17v5"/><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"/><path d="m2 2 20 20"/><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"/></svg>`,check:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check ${q}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},St=(e,t)=>typeof t[e]=="string"?t[e]:t1[e],Ht=(e,t,n="")=>{var o;const u=document.getElementById(t.id);if(u)n!==""&&(Reflect.get(window,n)?(o=t.onload)==null||o.call(u,new Event("load")):t.onload&&u.addEventListener("load",t.onload));else{const r={...t};r.onload=null;const a=r1(e,r);t.onload&&a.addEventListener("load",t.onload),document.head.appendChild(a)}},n1=(e,t)=>{var n;(n=document.getElementById(t.id))==null||n.remove(),Ht(e,t)},r1=(e,t)=>{const n=document.createElement(e);return Object.keys(t).forEach(u=>{t[u]!==void 0&&(n[u]=t[u])}),n},u1=(e,t)=>{const n=new Map;return e==null||e.forEach(u=>{let o=u.querySelector(`.${q}-mermaid-action`);o?o.querySelector(`.${q}-mermaid-copy`)||o.insertAdjacentHTML("beforeend",`<span class="${q}-mermaid-copy">${St("copy",t.customIcon)}</span>`):(u.insertAdjacentHTML("beforeend",`<div class="${q}-mermaid-action"><span class="${q}-mermaid-copy">${St("copy",t.customIcon)}</span></div>`),o=u.querySelector(`.${q}-mermaid-action`));const r=o.querySelector(`.${q}-mermaid-copy`);let a=-1;const s=()=>{clearTimeout(a),ss(u.dataset.content||"").then(()=>{r.innerHTML=St("check",t.customIcon)}).catch(()=>{r.innerHTML=St("copy",t.customIcon)}).finally(()=>{a=window.setTimeout(()=>{r.innerHTML=St("copy",t.customIcon)},1500)})};r.addEventListener("click",s),n.set(u,{removeClick:()=>{r.removeEventListener("click",s)}})}),()=>{n.forEach(({removeClick:u})=>{u==null||u()}),n.clear()}},o1=(()=>{const e=t=>{if(!t)return()=>{};const n=t.firstChild;let u=1,o=0,r=0,a=!1,s,c,d,f=1;const l=()=>{n.style.transform=`translate(${o}px, ${r}px) scale(${u})`},h=y=>{y.touches.length===1?(a=!0,s=y.touches[0].clientX-o,c=y.touches[0].clientY-r):y.touches.length===2&&(d=Math.hypot(y.touches[0].clientX-y.touches[1].clientX,y.touches[0].clientY-y.touches[1].clientY),f=u)},m=y=>{if(y.preventDefault(),a&&y.touches.length===1)o=y.touches[0].clientX-s,r=y.touches[0].clientY-c,l();else if(y.touches.length===2){const k=Math.hypot(y.touches[0].clientX-y.touches[1].clientX,y.touches[0].clientY-y.touches[1].clientY)/d,T=u;u=f*(1+(k-1));const D=(y.touches[0].clientX+y.touches[1].clientX)/2,F=(y.touches[0].clientY+y.touches[1].clientY)/2,U=n.getBoundingClientRect(),_=(D-U.left)/T,N=(F-U.top)/T;o-=_*(u-T),r-=N*(u-T),l()}},p=()=>{a=!1},w=y=>{y.preventDefault();const k=.02,T=u;y.deltaY<0?u+=k:u=Math.max(.1,u-k);const D=n.getBoundingClientRect(),F=y.clientX-D.left,U=y.clientY-D.top;o-=F/T*(u-T),r-=U/T*(u-T),l()},x=y=>{a=!0,s=y.clientX-o,c=y.clientY-r},A=y=>{a&&(o=y.clientX-s,r=y.clientY-c,l())},b=()=>{a=!1},g=()=>{a=!1};return t.addEventListener("touchstart",h,{passive:!1}),t.addEventListener("touchmove",m,{passive:!1}),t.addEventListener("touchend",p),t.addEventListener("wheel",w,{passive:!1}),t.addEventListener("mousedown",x),t.addEventListener("mousemove",A),t.addEventListener("mouseup",b),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("touchstart",h),t.removeEventListener("touchmove",m),t.removeEventListener("touchend",p),t.removeEventListener("wheel",w),t.removeEventListener("mousedown",x),t.removeEventListener("mousemove",A),t.removeEventListener("mouseup",b),t.removeEventListener("mouseleave",g)}};return(t,n)=>{const u=new Map;return t==null||t.forEach(o=>{let r=o.querySelector(`.${q}-mermaid-action`);r?r.querySelector(`.${q}-mermaid-zoom`)||r.insertAdjacentHTML("beforeend",`<span class="${q}-mermaid-zoom">${St("pin-off",n.customIcon)}</span>`):(o.insertAdjacentHTML("beforeend",`<div class="${q}-mermaid-action"><span class="${q}-mermaid-zoom">${St("pin-off",n.customIcon)}</span></div>`),r=o.querySelector(`.${q}-mermaid-action`));const a=r.querySelector(`.${q}-mermaid-zoom`),s=()=>{const c=u.get(o);if(c!=null&&c.removeEvent)c.removeEvent(),o.removeAttribute("data-grab"),u.set(o,{removeClick:c.removeClick}),a.innerHTML=St("pin-off",n.customIcon);else{const d=e(o);o.setAttribute("data-grab",""),u.set(o,{removeEvent:d,removeClick:c==null?void 0:c.removeClick}),a.innerHTML=St("pin",n.customIcon)}};a.addEventListener("click",s),u.set(o,{removeClick:()=>a.removeEventListener("click",s)})}),()=>{u.forEach(({removeEvent:o,removeClick:r})=>{o==null||o(),r==null||r()}),u.clear()}}})(),cs=new Set([!0,!1,"alt","title"]);function ls(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function ds(e,t){e&&e.attrs&&(e.attrs=ls(e.attrs,t))}function i1(e,t){if(!cs.has(e))throw new TypeError(`figcaption must be one of: ${[...cs]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([u])=>u==="title");return Array.isArray(n)&&n[1]?(ds(t,"title"),n[1]):void 0}function a1(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let u=1;for(let o=1,r=n.tokens.length;o<r-1;++o){const a=n.tokens[o];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[d,f,l]=a.children;if(d.type!=="link_open"||f.type!=="image"||l.type!=="link_close")continue}if(o!==0&&n.tokens[o-1].type!=="paragraph_open"||o!==r-1&&n.tokens[o+1].type!=="paragraph_close")continue;const s=n.tokens[o-1];let c;if(s.type="figure_open",s.tag="figure",n.tokens[o+1].type="figure_close",n.tokens[o+1].tag="figure",t.dataType&&n.tokens[o-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[c]=a.children;const d=new n.Token("link_open","a",1);d.attrPush(["href",c.attrGet("src")]),a.children.unshift(d),a.children.push(new n.Token("link_close","a",-1))}if(c=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const d=i1(t.figcaption,c);if(d){const[f]=e.parseInline(d,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...f.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),c.attrs&&(c.attrs=ls(c.attrs,"title"))}}if(t.copyAttrs&&c.attrs){const d=t.copyAttrs===!0?"":t.copyAttrs;s.attrs=c.attrs.filter(([f])=>f.match(d)).map(f=>Array.from(f))}if(t.tabindex&&(n.tokens[o-1].attrPush(["tabindex",u]),u++),t.lazy&&(c.attrs.some(([d])=>d==="loading")||c.attrs.push(["loading","lazy"])),t.async&&(c.attrs.some(([d])=>d==="decoding")||c.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let d=!1;for(let f=0,l=c.attrs.length;f<l&&!d;f++){const h=c.attrs[f];h[0]==="class"&&(h[1]=`${h[1]} ${t.classes}`,d=!0)}d||c.attrs.push(["class",t.classes])}if(t.removeSrc){const d=c.attrs.find(([f])=>f==="src");c.attrs.push(["data-src",d[1]]),ds(c,"src")}}})}const s1=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function c1(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==126||t||u+2>=n)return!1;e.pos=u+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===126){o=!0;break}e.md.inline.skipToken(e)}if(!o||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sub_open","sub",1);a.markup="~";const s=e.push("text","",0);s.content=r.replace(s1,"$1");const c=e.push("sub_close","sub",-1);return c.markup="~",e.pos=e.posMax+1,e.posMax=n,!0}function l1(e){e.inline.ruler.after("emphasis","sub",c1)}const d1=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function f1(e,t){const n=e.posMax,u=e.pos;if(e.src.charCodeAt(u)!==94||t||u+2>=n)return!1;e.pos=u+1;let o=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){o=!0;break}e.md.inline.skipToken(e)}if(!o||u+1===e.pos)return e.pos=u,!1;const r=e.src.slice(u+1,e.pos);if(r.match(/(^|[^\\])(\\\\)*\s/))return e.pos=u,!1;e.posMax=e.pos,e.pos=u+1;const a=e.push("sup_open","sup",1);a.markup="^";const s=e.push("text","",0);s.content=r.replace(d1,"$1");const c=e.push("sup_close","sup",-1);return c.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function h1(e){e.inline.ruler.after("emphasis","sup",f1)}var p1=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,fs=new Set,Po=typeof process=="object"&&process?process:{},hs=(e,t,n,u)=>{typeof Po.emitWarning=="function"?Po.emitWarning(e,t,n,u):console.error(`[${n}] ${t}: ${e}`)},su=globalThis.AbortController,ps=globalThis.AbortSignal;if(typeof su>"u"){ps=class{constructor(){fe(this,"onabort");fe(this,"_onabort",[]);fe(this,"reason");fe(this,"aborted",!1)}addEventListener(n,u){this._onabort.push(u)}},su=class{constructor(){fe(this,"signal",new ps);t()}abort(n){var u,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let r of this.signal._onabort)r(n);(o=(u=this.signal).onabort)==null||o.call(u,n)}}};let e=((wc=Po.env)==null?void 0:wc.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,hs("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var m1=e=>!fs.has(e),$t=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),ms=e=>$t(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?cu:null:null,cu=class extends Array{constructor(t){super(t),this.fill(0)}},g1=(Ft=class{constructor(t,n){fe(this,"heap");fe(this,"length");if(!v(Ft,_n))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){let n=ms(t);if(!n)return[];ee(Ft,_n,!0);let u=new Ft(t,n);return ee(Ft,_n,!1),u}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},_n=new WeakMap,ie(Ft,_n,!1),Ft),b1=(Tn=class{constructor(t){ie(this,G);ie(this,it);ie(this,Je);ie(this,lt);ie(this,rn);ie(this,dt);ie(this,En);ie(this,Sn);ie(this,ft);fe(this,"ttl");fe(this,"ttlResolution");fe(this,"ttlAutopurge");fe(this,"updateAgeOnGet");fe(this,"updateAgeOnHas");fe(this,"allowStale");fe(this,"noDisposeOnSet");fe(this,"noUpdateTTL");fe(this,"maxEntrySize");fe(this,"sizeCalculation");fe(this,"noDeleteOnFetchRejection");fe(this,"noDeleteOnStaleGet");fe(this,"allowStaleOnFetchAbort");fe(this,"allowStaleOnFetchRejection");fe(this,"ignoreFetchAbort");ie(this,ke);ie(this,ht);ie(this,we);ie(this,he);ie(this,ne);ie(this,$e);ie(this,et);ie(this,Ve);ie(this,Se);ie(this,pt);ie(this,Fe);ie(this,mt);ie(this,gt);ie(this,tt);ie(this,nt);ie(this,bt);ie(this,Gt);ie(this,Ue);ie(this,Fn);ie(this,un,()=>{});ie(this,Lt,()=>{});ie(this,kr,()=>{});ie(this,rt,()=>!1);ie(this,on,t=>{});ie(this,Dn,(t,n,u)=>{});ie(this,Cr,(t,n,u,o)=>{if(u||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});fe(this,vc,"LRUCache");let{max:n=0,ttl:u,ttlResolution:o=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:c,dispose:d,onInsert:f,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:m,maxSize:p=0,maxEntrySize:w=0,sizeCalculation:x,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:g,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:T,ignoreFetchAbort:D,perf:F}=t;if(F!==void 0&&typeof(F==null?void 0:F.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(ee(this,ft,F??p1),n!==0&&!$t(n))throw new TypeError("max option must be a nonnegative integer");let U=n?ms(n):Array;if(!U)throw new Error("invalid max value: "+n);if(ee(this,it,n),ee(this,Je,p),this.maxEntrySize=w||v(this,Je),this.sizeCalculation=x,this.sizeCalculation){if(!v(this,Je)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ee(this,Sn,b),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(ee(this,En,A),ee(this,Gt,!!A),ee(this,we,new Map),ee(this,he,new Array(n).fill(void 0)),ee(this,ne,new Array(n).fill(void 0)),ee(this,$e,new U(n)),ee(this,et,new U(n)),ee(this,Ve,0),ee(this,Se,0),ee(this,pt,g1.create(n)),ee(this,ke,0),ee(this,ht,0),typeof d=="function"&&ee(this,lt,d),typeof f=="function"&&ee(this,rn,f),typeof l=="function"?(ee(this,dt,l),ee(this,Fe,[])):(ee(this,dt,void 0),ee(this,Fe,void 0)),ee(this,bt,!!v(this,lt)),ee(this,Fn,!!v(this,rn)),ee(this,Ue,!!v(this,dt)),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!g,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(v(this,Je)!==0&&!$t(v(this,Je)))throw new TypeError("maxSize must be a positive integer if specified");if(!$t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");X(this,G,jc).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=$t(o)||o===0?o:1,this.ttlAutopurge=!!r,this.ttl=u||0,this.ttl){if(!$t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");X(this,G,ii).call(this)}if(v(this,it)===0&&this.ttl===0&&v(this,Je)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!v(this,it)&&!v(this,Je)){let _="LRU_CACHE_UNBOUNDED";m1(_)&&(fs.add(_),hs("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",_,Tn))}}get perf(){return v(this,ft)}static unsafeExposeInternals(t){return{starts:v(t,gt),ttls:v(t,tt),autopurgeTimers:v(t,nt),sizes:v(t,mt),keyMap:v(t,we),keyList:v(t,he),valList:v(t,ne),next:v(t,$e),prev:v(t,et),get head(){return v(t,Ve)},get tail(){return v(t,Se)},free:v(t,pt),isBackgroundFetch:n=>{var u;return X(u=t,G,pe).call(u,n)},backgroundFetch:(n,u,o,r)=>{var a;return X(a=t,G,Vu).call(a,n,u,o,r)},moveToTail:n=>{var u;return X(u=t,G,Sr).call(u,n)},indexes:n=>{var u;return X(u=t,G,Xt).call(u,n)},rindexes:n=>{var u;return X(u=t,G,Zt).call(u,n)},isStale:n=>{var u;return v(u=t,rt).call(u,n)}}}get max(){return v(this,it)}get maxSize(){return v(this,Je)}get calculatedSize(){return v(this,ht)}get size(){return v(this,ke)}get fetchMethod(){return v(this,En)}get memoMethod(){return v(this,Sn)}get dispose(){return v(this,lt)}get onInsert(){return v(this,rn)}get disposeAfter(){return v(this,dt)}getRemainingTTL(t){return v(this,we).has(t)?1/0:0}*entries(){for(let t of X(this,G,Xt).call(this))v(this,ne)[t]!==void 0&&v(this,he)[t]!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield[v(this,he)[t],v(this,ne)[t]])}*rentries(){for(let t of X(this,G,Zt).call(this))v(this,ne)[t]!==void 0&&v(this,he)[t]!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield[v(this,he)[t],v(this,ne)[t]])}*keys(){for(let t of X(this,G,Xt).call(this)){let n=v(this,he)[t];n!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield n)}}*rkeys(){for(let t of X(this,G,Zt).call(this)){let n=v(this,he)[t];n!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield n)}}*values(){for(let t of X(this,G,Xt).call(this))v(this,ne)[t]!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield v(this,ne)[t])}*rvalues(){for(let t of X(this,G,Zt).call(this))v(this,ne)[t]!==void 0&&!X(this,G,pe).call(this,v(this,ne)[t])&&(yield v(this,ne)[t])}[(Ac=Symbol.iterator,vc=Symbol.toStringTag,Ac)](){return this.entries()}find(t,n={}){for(let u of X(this,G,Xt).call(this)){let o=v(this,ne)[u],r=X(this,G,pe).call(this,o)?o.__staleWhileFetching:o;if(r!==void 0&&t(r,v(this,he)[u],this))return this.get(v(this,he)[u],n)}}forEach(t,n=this){for(let u of X(this,G,Xt).call(this)){let o=v(this,ne)[u],r=X(this,G,pe).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&t.call(n,r,v(this,he)[u],this)}}rforEach(t,n=this){for(let u of X(this,G,Zt).call(this)){let o=v(this,ne)[u],r=X(this,G,pe).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&t.call(n,r,v(this,he)[u],this)}}purgeStale(){let t=!1;for(let n of X(this,G,Zt).call(this,{allowStale:!0}))v(this,rt).call(this,n)&&(X(this,G,Yt).call(this,v(this,he)[n],"expire"),t=!0);return t}info(t){let n=v(this,we).get(t);if(n===void 0)return;let u=v(this,ne)[n],o=X(this,G,pe).call(this,u)?u.__staleWhileFetching:u;if(o===void 0)return;let r={value:o};if(v(this,tt)&&v(this,gt)){let a=v(this,tt)[n],s=v(this,gt)[n];if(a&&s){let c=a-(v(this,ft).now()-s);r.ttl=c,r.start=Date.now()}}return v(this,mt)&&(r.size=v(this,mt)[n]),r}dump(){let t=[];for(let n of X(this,G,Xt).call(this,{allowStale:!0})){let u=v(this,he)[n],o=v(this,ne)[n],r=X(this,G,pe).call(this,o)?o.__staleWhileFetching:o;if(r===void 0||u===void 0)continue;let a={value:r};if(v(this,tt)&&v(this,gt)){a.ttl=v(this,tt)[n];let s=v(this,ft).now()-v(this,gt)[n];a.start=Math.floor(Date.now()-s)}v(this,mt)&&(a.size=v(this,mt)[n]),t.unshift([u,a])}return t}load(t){this.clear();for(let[n,u]of t){if(u.start){let o=Date.now()-u.start;u.start=v(this,ft).now()-o}this.set(n,u.value,u)}}set(t,n,u={}){var h,m,p,w,x,A,b;if(n===void 0)return this.delete(t),this;let{ttl:o=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:c}=u,{noUpdateTTL:d=this.noUpdateTTL}=u,f=v(this,Cr).call(this,t,n,u.size||0,s);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),X(this,G,Yt).call(this,t,"set"),this;let l=v(this,ke)===0?void 0:v(this,we).get(t);if(l===void 0)l=v(this,ke)===0?v(this,Se):v(this,pt).length!==0?v(this,pt).pop():v(this,ke)===v(this,it)?X(this,G,Ru).call(this,!1):v(this,ke),v(this,he)[l]=t,v(this,ne)[l]=n,v(this,we).set(t,l),v(this,$e)[v(this,Se)]=l,v(this,et)[l]=v(this,Se),ee(this,Se,l),Pu(this,ke)._++,v(this,Dn).call(this,l,f,c),c&&(c.set="add"),d=!1,v(this,Fn)&&((h=v(this,rn))==null||h.call(this,n,t,"add"));else{X(this,G,Sr).call(this,l);let g=v(this,ne)[l];if(n!==g){if(v(this,Gt)&&X(this,G,pe).call(this,g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=g;y!==void 0&&!a&&(v(this,bt)&&((m=v(this,lt))==null||m.call(this,y,t,"set")),v(this,Ue)&&((p=v(this,Fe))==null||p.push([y,t,"set"])))}else a||(v(this,bt)&&((w=v(this,lt))==null||w.call(this,g,t,"set")),v(this,Ue)&&((x=v(this,Fe))==null||x.push([g,t,"set"])));if(v(this,on).call(this,l),v(this,Dn).call(this,l,f,c),v(this,ne)[l]=n,c){c.set="replace";let y=g&&X(this,G,pe).call(this,g)?g.__staleWhileFetching:g;y!==void 0&&(c.oldValue=y)}}else c&&(c.set="update");v(this,Fn)&&((A=this.onInsert)==null||A.call(this,n,t,n===g?"update":"replace"))}if(o!==0&&!v(this,tt)&&X(this,G,ii).call(this),v(this,tt)&&(d||v(this,kr).call(this,l,o,r),c&&v(this,Lt).call(this,c,l)),!a&&v(this,Ue)&&v(this,Fe)){let g=v(this,Fe),y;for(;y=g==null?void 0:g.shift();)(b=v(this,dt))==null||b.call(this,...y)}return this}pop(){var t;try{for(;v(this,ke);){let n=v(this,ne)[v(this,Ve)];if(X(this,G,Ru).call(this,!0),X(this,G,pe).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(v(this,Ue)&&v(this,Fe)){let n=v(this,Fe),u;for(;u=n==null?void 0:n.shift();)(t=v(this,dt))==null||t.call(this,...u)}}}has(t,n={}){let{updateAgeOnHas:u=this.updateAgeOnHas,status:o}=n,r=v(this,we).get(t);if(r!==void 0){let a=v(this,ne)[r];if(X(this,G,pe).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(v(this,rt).call(this,r))o&&(o.has="stale",v(this,Lt).call(this,o,r));else return u&&v(this,un).call(this,r),o&&(o.has="hit",v(this,Lt).call(this,o,r)),!0}else o&&(o.has="miss");return!1}peek(t,n={}){let{allowStale:u=this.allowStale}=n,o=v(this,we).get(t);if(o===void 0||!u&&v(this,rt).call(this,o))return;let r=v(this,ne)[o];return X(this,G,pe).call(this,r)?r.__staleWhileFetching:r}async fetch(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:c=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:w,forceRefresh:x=!1,status:A,signal:b}=n;if(!v(this,Gt))return A&&(A.fetch="get"),this.get(t,{allowStale:u,updateAgeOnGet:o,noDeleteOnStaleGet:r,status:A});let g={allowStale:u,updateAgeOnGet:o,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:s,size:c,sizeCalculation:d,noUpdateTTL:f,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:m,status:A,signal:b},y=v(this,we).get(t);if(y===void 0){A&&(A.fetch="miss");let k=X(this,G,Vu).call(this,t,y,g,w);return k.__returned=k}else{let k=v(this,ne)[y];if(X(this,G,pe).call(this,k)){let U=u&&k.__staleWhileFetching!==void 0;return A&&(A.fetch="inflight",U&&(A.returnedStale=!0)),U?k.__staleWhileFetching:k.__returned=k}let T=v(this,rt).call(this,y);if(!x&&!T)return A&&(A.fetch="hit"),X(this,G,Sr).call(this,y),o&&v(this,un).call(this,y),A&&v(this,Lt).call(this,A,y),k;let D=X(this,G,Vu).call(this,t,y,g,w),F=D.__staleWhileFetching!==void 0&&u;return A&&(A.fetch=T?"stale":"refresh",F&&T&&(A.returnedStale=!0)),F?D.__staleWhileFetching:D.__returned=D}}async forceFetch(t,n={}){let u=await this.fetch(t,n);if(u===void 0)throw new Error("fetch() returned undefined");return u}memo(t,n={}){let u=v(this,Sn);if(!u)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:r,...a}=n,s=this.get(t,a);if(!r&&s!==void 0)return s;let c=u(t,s,{options:a,context:o});return this.set(t,c,a),c}get(t,n={}){let{allowStale:u=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=n,s=v(this,we).get(t);if(s!==void 0){let c=v(this,ne)[s],d=X(this,G,pe).call(this,c);return a&&v(this,Lt).call(this,a,s),v(this,rt).call(this,s)?(a&&(a.get="stale"),d?(a&&u&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),u?c.__staleWhileFetching:void 0):(r||X(this,G,Yt).call(this,t,"expire"),a&&u&&(a.returnedStale=!0),u?c:void 0)):(a&&(a.get="hit"),d?c.__staleWhileFetching:(X(this,G,Sr).call(this,s),o&&v(this,un).call(this,s),c))}else a&&(a.get="miss")}delete(t){return X(this,G,Yt).call(this,t,"delete")}clear(){return X(this,G,ci).call(this,"delete")}},it=new WeakMap,Je=new WeakMap,lt=new WeakMap,rn=new WeakMap,dt=new WeakMap,En=new WeakMap,Sn=new WeakMap,ft=new WeakMap,ke=new WeakMap,ht=new WeakMap,we=new WeakMap,he=new WeakMap,ne=new WeakMap,$e=new WeakMap,et=new WeakMap,Ve=new WeakMap,Se=new WeakMap,pt=new WeakMap,Fe=new WeakMap,mt=new WeakMap,gt=new WeakMap,tt=new WeakMap,nt=new WeakMap,bt=new WeakMap,Gt=new WeakMap,Ue=new WeakMap,Fn=new WeakMap,G=new WeakSet,ii=function(){let t=new cu(v(this,it)),n=new cu(v(this,it));ee(this,tt,t),ee(this,gt,n);let u=this.ttlAutopurge?new Array(v(this,it)):void 0;ee(this,nt,u),ee(this,kr,(s,c,d=v(this,ft).now())=>{n[s]=c!==0?d:0,t[s]=c,o(s,c)}),ee(this,un,s=>{n[s]=t[s]!==0?v(this,ft).now():0,o(s,t[s])});let o=this.ttlAutopurge?(s,c)=>{if(u!=null&&u[s]&&(clearTimeout(u[s]),u[s]=void 0),c&&c!==0&&u){let d=setTimeout(()=>{v(this,rt).call(this,s)&&X(this,G,Yt).call(this,v(this,he)[s],"expire")},c+1);d.unref&&d.unref(),u[s]=d}}:()=>{};ee(this,Lt,(s,c)=>{if(t[c]){let d=t[c],f=n[c];if(!d||!f)return;s.ttl=d,s.start=f,s.now=r||a();let l=s.now-f;s.remainingTTL=d-l}});let r=0,a=()=>{let s=v(this,ft).now();if(this.ttlResolution>0){r=s;let c=setTimeout(()=>r=0,this.ttlResolution);c.unref&&c.unref()}return s};this.getRemainingTTL=s=>{let c=v(this,we).get(s);if(c===void 0)return 0;let d=t[c],f=n[c];if(!d||!f)return 1/0;let l=(r||a())-f;return d-l},ee(this,rt,s=>{let c=n[s],d=t[s];return!!d&&!!c&&(r||a())-c>d})},un=new WeakMap,Lt=new WeakMap,kr=new WeakMap,rt=new WeakMap,jc=function(){let t=new cu(v(this,it));ee(this,ht,0),ee(this,mt,t),ee(this,on,n=>{ee(this,ht,v(this,ht)-t[n]),t[n]=0}),ee(this,Cr,(n,u,o,r)=>{if(X(this,G,pe).call(this,u))return 0;if(!$t(o))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(o=r(u,n),!$t(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),ee(this,Dn,(n,u,o)=>{if(t[n]=u,v(this,Je)){let r=v(this,Je)-t[n];for(;v(this,ht)>r;)X(this,G,Ru).call(this,!0)}ee(this,ht,v(this,ht)+t[n]),o&&(o.entrySize=u,o.totalCalculatedSize=v(this,ht))})},on=new WeakMap,Dn=new WeakMap,Cr=new WeakMap,Xt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Se);!(!X(this,G,ai).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Ve)));)n=v(this,et)[n]},Zt=function*({allowStale:t=this.allowStale}={}){if(v(this,ke))for(let n=v(this,Ve);!(!X(this,G,ai).call(this,n)||((t||!v(this,rt).call(this,n))&&(yield n),n===v(this,Se)));)n=v(this,$e)[n]},ai=function(t){return t!==void 0&&v(this,we).get(v(this,he)[t])===t},Ru=function(t){var r,a,s;let n=v(this,Ve),u=v(this,he)[n],o=v(this,ne)[n];return v(this,Gt)&&X(this,G,pe).call(this,o)?o.__abortController.abort(new Error("evicted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((r=v(this,lt))==null||r.call(this,o,u,"evict")),v(this,Ue)&&((a=v(this,Fe))==null||a.push([o,u,"evict"]))),v(this,on).call(this,n),(s=v(this,nt))!=null&&s[n]&&(clearTimeout(v(this,nt)[n]),v(this,nt)[n]=void 0),t&&(v(this,he)[n]=void 0,v(this,ne)[n]=void 0,v(this,pt).push(n)),v(this,ke)===1?(ee(this,Ve,ee(this,Se,0)),v(this,pt).length=0):ee(this,Ve,v(this,$e)[n]),v(this,we).delete(u),Pu(this,ke)._--,n},Vu=function(t,n,u,o){let r=n===void 0?void 0:v(this,ne)[n];if(X(this,G,pe).call(this,r))return r;let a=new su,{signal:s}=u;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let c={signal:a.signal,options:u,context:o},d=(w,x=!1)=>{let{aborted:A}=a.signal,b=u.ignoreFetchAbort&&w!==void 0,g=u.ignoreFetchAbort||!!(u.allowStaleOnFetchAbort&&w!==void 0);if(u.status&&(A&&!x?(u.status.fetchAborted=!0,u.status.fetchError=a.signal.reason,b&&(u.status.fetchAbortIgnored=!0)):u.status.fetchResolved=!0),A&&!b&&!x)return l(a.signal.reason,g);let y=m,k=v(this,ne)[n];return(k===m||b&&x&&k===void 0)&&(w===void 0?y.__staleWhileFetching!==void 0?v(this,ne)[n]=y.__staleWhileFetching:X(this,G,Yt).call(this,t,"fetch"):(u.status&&(u.status.fetchUpdated=!0),this.set(t,w,c.options))),w},f=w=>(u.status&&(u.status.fetchRejected=!0,u.status.fetchError=w),l(w,!1)),l=(w,x)=>{let{aborted:A}=a.signal,b=A&&u.allowStaleOnFetchAbort,g=b||u.allowStaleOnFetchRejection,y=g||u.noDeleteOnFetchRejection,k=m;if(v(this,ne)[n]===m&&(!y||!x&&k.__staleWhileFetching===void 0?X(this,G,Yt).call(this,t,"fetch"):b||(v(this,ne)[n]=k.__staleWhileFetching)),g)return u.status&&k.__staleWhileFetching!==void 0&&(u.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw w},h=(w,x)=>{var b;let A=(b=v(this,En))==null?void 0:b.call(this,t,r,c);A&&A instanceof Promise&&A.then(g=>w(g===void 0?void 0:g),x),a.signal.addEventListener("abort",()=>{(!u.ignoreFetchAbort||u.allowStaleOnFetchAbort)&&(w(void 0),u.allowStaleOnFetchAbort&&(w=g=>d(g,!0)))})};u.status&&(u.status.fetchDispatched=!0);let m=new Promise(h).then(d,f),p=Object.assign(m,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return n===void 0?(this.set(t,p,{...c.options,status:void 0}),n=v(this,we).get(t)):v(this,ne)[n]=p,p},pe=function(t){if(!v(this,Gt))return!1;let n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof su},si=function(t,n){v(this,et)[n]=t,v(this,$e)[t]=n},Sr=function(t){t!==v(this,Se)&&(t===v(this,Ve)?ee(this,Ve,v(this,$e)[t]):X(this,G,si).call(this,v(this,et)[t],v(this,$e)[t]),X(this,G,si).call(this,v(this,Se),t),ee(this,Se,t))},Yt=function(t,n){var o,r,a,s,c,d;let u=!1;if(v(this,ke)!==0){let f=v(this,we).get(t);if(f!==void 0)if((o=v(this,nt))!=null&&o[f]&&(clearTimeout((r=v(this,nt))==null?void 0:r[f]),v(this,nt)[f]=void 0),u=!0,v(this,ke)===1)X(this,G,ci).call(this,n);else{v(this,on).call(this,f);let l=v(this,ne)[f];if(X(this,G,pe).call(this,l)?l.__abortController.abort(new Error("deleted")):(v(this,bt)||v(this,Ue))&&(v(this,bt)&&((a=v(this,lt))==null||a.call(this,l,t,n)),v(this,Ue)&&((s=v(this,Fe))==null||s.push([l,t,n]))),v(this,we).delete(t),v(this,he)[f]=void 0,v(this,ne)[f]=void 0,f===v(this,Se))ee(this,Se,v(this,et)[f]);else if(f===v(this,Ve))ee(this,Ve,v(this,$e)[f]);else{let h=v(this,et)[f];v(this,$e)[h]=v(this,$e)[f];let m=v(this,$e)[f];v(this,et)[m]=v(this,et)[f]}Pu(this,ke)._--,v(this,pt).push(f)}}if(v(this,Ue)&&((c=v(this,Fe))!=null&&c.length)){let f=v(this,Fe),l;for(;l=f==null?void 0:f.shift();)(d=v(this,dt))==null||d.call(this,...l)}return u},ci=function(t){var n,u,o,r;for(let a of X(this,G,Zt).call(this,{allowStale:!0})){let s=v(this,ne)[a];if(X(this,G,pe).call(this,s))s.__abortController.abort(new Error("deleted"));else{let c=v(this,he)[a];v(this,bt)&&((n=v(this,lt))==null||n.call(this,s,c,t)),v(this,Ue)&&((u=v(this,Fe))==null||u.push([s,c,t]))}}if(v(this,we).clear(),v(this,ne).fill(void 0),v(this,he).fill(void 0),v(this,tt)&&v(this,gt)){v(this,tt).fill(0),v(this,gt).fill(0);for(let a of v(this,nt)??[])a!==void 0&&clearTimeout(a);(o=v(this,nt))==null||o.fill(void 0)}if(v(this,mt)&&v(this,mt).fill(0),ee(this,Ve,0),ee(this,Se,0),v(this,pt).length=0,ee(this,ht,0),ee(this,ke,0),v(this,Ue)&&v(this,Fe)){let a=v(this,Fe),s;for(;s=a==null?void 0:a.shift();)(r=v(this,dt))==null||r.call(this,...s)}},Tn);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var Jt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u])}return e},lu=function(t){return t.tagName==="IMG"},y1=function(t){return NodeList.prototype.isPrototypeOf(t)},du=function(t){return t&&t.nodeType===1},gs=function(t){var n=t.currentSrc||t.src;return n.substr(-4).toLowerCase()===".svg"},bs=function(t){try{return Array.isArray(t)?t.filter(lu):y1(t)?[].slice.call(t).filter(lu):du(t)?[t].filter(lu):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(lu):[]}catch{throw new TypeError(`The provided selector is invalid.
34
34
  Expects a CSS selector, a Node element, a NodeList or an array.
35
- See: https://github.com/francoischalifour/medium-zoom`)}},b1=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},y1=function(t){var n=t.getBoundingClientRect(),u=n.top,i=n.left,r=n.width,a=n.height,s=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,d=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=u+l+"px",s.style.left=i+d+"px",s.style.width=r+"px",s.style.height=a+"px",s.style.transform="",s},An=function(t,n){var u=Jt({bubbles:!1,cancelable:!1,detail:void 0},n);if(typeof window.CustomEvent=="function")return new CustomEvent(t,u);var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,u.bubbles,u.cancelable,u.detail),i},x1=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=window.Promise||function(B){function D(){}B(D,D)},i=function(B){var D=B.target;if(D===z){p();return}h.indexOf(D)!==-1&&v({target:D})},r=function(){if(!(w||!_.original)){var B=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(C-B)>E.scrollOffset&&setTimeout(p,150)}},a=function(B){var D=B.key||B.keyCode;(D==="Escape"||D==="Esc"||D===27)&&p()},s=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=B;if(B.background&&(z.style.background=B.background),B.container&&B.container instanceof Object&&(D.container=Jt({},E.container,B.container)),B.template){var H=du(B.template)?B.template:document.querySelector(B.template);D.template=H}return E=Jt({},E,D),h.forEach(function($){$.dispatchEvent(An("medium-zoom:update",{detail:{zoom:M}}))}),M},l=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(Jt({},E,B))},d=function(){for(var B=arguments.length,D=Array(B),H=0;H<B;H++)D[H]=arguments[H];var $=D.reduce(function(F,R){return[].concat(F,bs(R))},[]);return $.filter(function(F){return h.indexOf(F)===-1}).forEach(function(F){h.push(F),F.classList.add("medium-zoom-image")}),b.forEach(function(F){var R=F.type,O=F.listener,U=F.options;$.forEach(function(re){re.addEventListener(R,O,U)})}),M},f=function(){for(var B=arguments.length,D=Array(B),H=0;H<B;H++)D[H]=arguments[H];_.zoomed&&p();var $=D.length>0?D.reduce(function(F,R){return[].concat(F,bs(R))},[]):h;return $.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(An("medium-zoom:detach",{detail:{zoom:M}}))}),h=h.filter(function(F){return $.indexOf(F)===-1}),M},c=function(B,D){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return h.forEach(function($){$.addEventListener("medium-zoom:"+B,D,H)}),b.push({type:"medium-zoom:"+B,listener:D,options:H}),M},m=function(B,D){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return h.forEach(function($){$.removeEventListener("medium-zoom:"+B,D,H)}),b=b.filter(function($){return!($.type==="medium-zoom:"+B&&$.listener.toString()===D.toString())}),M},g=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=B.target,H=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},R=void 0,O=void 0;if(E.container)if(E.container instanceof Object)F=Jt({},F,E.container),R=F.width-F.left-F.right-E.margin*2,O=F.height-F.top-F.bottom-E.margin*2;else{var U=du(E.container)?E.container:document.querySelector(E.container),re=U.getBoundingClientRect(),te=re.width,P=re.height,V=re.left,T=re.top;F=Jt({},F,{width:te,height:P,left:V,top:T})}R=R||F.width-E.margin*2,O=O||F.height-E.margin*2;var L=_.zoomedHd||_.original,W=gs(L)?R:L.naturalWidth||R,K=gs(L)?O:L.naturalHeight||O,Z=L.getBoundingClientRect(),Y=Z.top,ue=Z.left,le=Z.width,De=Z.height,Te=Math.min(Math.max(le,W),R)/le,yt=Math.min(Math.max(De,K),O)/De,Me=Math.min(Te,yt),Nn=(-ue+(R-le)/2+E.margin+F.left)/Me,Xt=(-Y+(O-De)/2+E.margin+F.top)/Me,Lt="scale("+Me+") translate3d("+Nn+"px, "+Xt+"px, 0)";_.zoomed.style.transform=Lt,_.zoomedHd&&(_.zoomedHd.style.transform=Lt)};return new u(function($){if(D&&h.indexOf(D)===-1){$(M);return}var F=function te(){w=!1,_.zoomed.removeEventListener("transitionend",te),_.original.dispatchEvent(An("medium-zoom:opened",{detail:{zoom:M}})),$(M)};if(_.zoomed){$(M);return}if(D)_.original=D;else if(h.length>0){var R=h;_.original=R[0]}else{$(M);return}if(_.original.dispatchEvent(An("medium-zoom:open",{detail:{zoom:M}})),C=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,w=!0,_.zoomed=y1(_.original),document.body.appendChild(z),E.template){var O=du(E.template)?E.template:document.querySelector(E.template);_.template=document.createElement("div"),_.template.appendChild(O.content.cloneNode(!0)),document.body.appendChild(_.template)}if(_.original.parentElement&&_.original.parentElement.tagName==="PICTURE"&&_.original.currentSrc&&(_.zoomed.src=_.original.currentSrc),document.body.appendChild(_.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),_.original.classList.add("medium-zoom-image--hidden"),_.zoomed.classList.add("medium-zoom-image--opened"),_.zoomed.addEventListener("click",p),_.zoomed.addEventListener("transitionend",F),_.original.getAttribute("data-zoom-src")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("srcset"),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading"),_.zoomedHd.src=_.zoomed.getAttribute("data-zoom-src"),_.zoomedHd.onerror=function(){clearInterval(U),console.warn("Unable to reach the zoom image target "+_.zoomedHd.src),_.zoomedHd=null,H()};var U=setInterval(function(){_.zoomedHd.complete&&(clearInterval(U),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",p),document.body.appendChild(_.zoomedHd),H())},10)}else if(_.original.hasAttribute("srcset")){_.zoomedHd=_.zoomed.cloneNode(),_.zoomedHd.removeAttribute("sizes"),_.zoomedHd.removeAttribute("loading");var re=_.zoomedHd.addEventListener("load",function(){_.zoomedHd.removeEventListener("load",re),_.zoomedHd.classList.add("medium-zoom-image--opened"),_.zoomedHd.addEventListener("click",p),document.body.appendChild(_.zoomedHd),H()})}else H()})},p=function(){return new u(function(B){if(w||!_.original){B(M);return}var D=function H(){_.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(_.zoomed),_.zoomedHd&&document.body.removeChild(_.zoomedHd),document.body.removeChild(z),_.zoomed.classList.remove("medium-zoom-image--opened"),_.template&&document.body.removeChild(_.template),w=!1,_.zoomed.removeEventListener("transitionend",H),_.original.dispatchEvent(An("medium-zoom:closed",{detail:{zoom:M}})),_.original=null,_.zoomed=null,_.zoomedHd=null,_.template=null,B(M)};w=!0,document.body.classList.remove("medium-zoom--opened"),_.zoomed.style.transform="",_.zoomedHd&&(_.zoomedHd.style.transform=""),_.template&&(_.template.style.transition="opacity 150ms",_.template.style.opacity=0),_.original.dispatchEvent(An("medium-zoom:close",{detail:{zoom:M}})),_.zoomed.addEventListener("transitionend",D)})},v=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=B.target;return _.original?p():g({target:D})},x=function(){return E},k=function(){return h},y=function(){return _.original},h=[],b=[],w=!1,C=0,E=n,_={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?E=t:(t||typeof t=="string")&&d(t),E=Jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},E);var z=b1(E.background);document.addEventListener("click",i),document.addEventListener("keyup",a),document.addEventListener("scroll",r),window.addEventListener("resize",p);var M={open:g,close:p,toggle:v,update:s,clone:l,attach:d,detach:f,on:c,off:m,getOptions:x,getImages:k,getZoomedImage:y};return M};function w1(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var u=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&u.firstChild?u.insertBefore(i,u.firstChild):u.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var v1=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";w1(v1);const $t={hljs:`${X}-hljs`,hlcss:`${X}-hlCss`,mermaidM:`${X}-mermaid-m`,mermaid:`${X}-mermaid`,katexjs:`${X}-katex`,katexcss:`${X}-katexCss`,echarts:`${X}-echarts`},A1=(e,{editorId:t,rootRef:n,setting:u})=>{const i=lt.editorExtensions.highlight,r=lt.editorExtensionsAttrs.highlight;o.provide("editorId",t),o.provide("rootRef",n),o.provide("theme",o.computed(()=>e.theme)),o.provide("language",o.computed(()=>e.language)),o.provide("highlight",o.computed(()=>{const{js:s}=i,l={...Ni,...i.css},{js:d,css:f={}}=r||{},c=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,m=l[e.codeTheme]?l[e.codeTheme][c]:Ni.atom[c],g=l[e.codeTheme]&&f[e.codeTheme]?f[e.codeTheme][c]:f.atom?f.atom[c]:{};return{js:{src:s,...d},css:{href:m,...g}}})),o.provide("showCodeRowNumber",e.showCodeRowNumber);const a=o.computed(()=>{const s={...os,...lt.editorConfig.languageUserDefined};return Di(ir(os["en-US"]),s[e.language]||{})});return o.provide("usedLanguageText",a),o.provide("previewTheme",o.computed(()=>e.previewTheme)),o.provide("customIcon",o.computed(()=>e.customIcon)),o.provide("setting",o.computed(()=>u?{...u}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},k1=e=>{const t=o.useId();return e.id||e.editorId||`${X}-${t}`},C1=(e,t,n)=>{const u=o.inject("editorId"),i=o.inject("rootRef"),r=o.inject("usedLanguageText"),a=o.inject("setting"),s=()=>{i.value.querySelectorAll(`#${u} .${X}-preview .${X}-code`).forEach(f=>{let c=-1;const m=f.querySelector(`.${X}-copy-button:not([data-processed])`);m&&(m.onclick=g=>{g.preventDefault(),clearTimeout(c);const p=(f.querySelector("input:checked + pre code")||f.querySelector("pre code")).textContent,{text:v,successTips:x,failTips:k}=r.value.copyCode;let y=x;ss(e.formatCopiedText(p||"")).catch(()=>{y=k}).finally(()=>{m.dataset.isIcon?m.dataset.tips=y:m.innerHTML=y,c=window.setTimeout(()=>{m.dataset.isIcon?m.dataset.tips=v:m.innerHTML=v},1500)})},m.setAttribute("data-processed","true"))})},l=()=>{o.nextTick(s)},d=f=>{f&&o.nextTick(s)};o.watch([t,n],l),o.watch(()=>a.value.preview,d),o.watch(()=>a.value.htmlPreview,d),o.onMounted(s)},E1=e=>{const t=o.inject("editorId"),n=o.inject("theme"),u=o.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:r}=lt;let a=i.echarts.instance;const s=o.shallowRef(-1),l=()=>{!e.noEcharts&&a&&(s.value=s.value+1)};o.watch(()=>n.value,()=>{l()}),o.onMounted(()=>{var v;if(e.noEcharts||a)return;const p=i.echarts.js;jt("script",{...(v=r.echarts)==null?void 0:v.js,src:p,id:$t.echarts,onload(){a=window.echarts,l()}},"echarts")});let d=[],f=[],c=[];const m=(p=!1)=>{if(!d.length){p&&(f.forEach(y=>{var h;(h=y.dispose)==null||h.call(y)}),c.forEach(y=>{var h;(h=y.disconnect)==null||h.call(y)}),f=[],c=[]);return}const v=[],x=[],k=[];d.forEach((y,h)=>{var C,E;const b=f[h],w=c[h];if(p||!y||!y.isConnected||u!=null&&u.value&&!u.value.contains(y)){(C=b==null?void 0:b.dispose)==null||C.call(b),(E=w==null?void 0:w.disconnect)==null||E.call(w);return}v.push(y),b&&x.push(b),w&&k.push(w)}),d=v,f=x,c=k},g=()=>{m(),!e.noEcharts&&a&&Array.from(u.value.querySelectorAll(`#${t} div.${X}-echarts:not([data-processed])`)).forEach(p=>{if(p.dataset.closed==="false")return!1;try{const v=new Function(`return ${p.innerText}`)(),x=a.init(p,n.value);x.setOption(v),p.setAttribute("data-processed",""),d.push(p),f.push(x);const k=new ResizeObserver(()=>{x.resize()});k.observe(p),c.push(k)}catch(v){it.emit(t,Li,{name:"echarts",message:v==null?void 0:v.message,error:v})}})};return o.onBeforeUnmount(()=>{m(!0)}),{reRenderEcharts:s,replaceEcharts:g}},_1=e=>{const t=o.inject("highlight"),n=o.shallowRef(lt.editorExtensions.highlight.instance);return o.onMounted(()=>{e.noHighlight||n.value||(jt("link",{...t.value.css,rel:"stylesheet",id:$t.hlcss}),jt("script",{...t.value.js,id:$t.hljs,onload(){n.value=window.hljs}},"hljs"))}),o.watch(()=>t.value.css,()=>{e.noHighlight||lt.editorExtensions.highlight.instance||e1("link",{...t.value.css,rel:"stylesheet",id:$t.hlcss})}),n},S1=e=>{const t=o.shallowRef(lt.editorExtensions.katex.instance);return o.onMounted(()=>{var i,r;if(e.noKatex||t.value)return;const{editorExtensions:n,editorExtensionsAttrs:u}=lt;jt("script",{...(i=u.katex)==null?void 0:i.js,src:n.katex.js,id:$t.katexjs,onload(){t.value=window.katex}},"katex"),jt("link",{...(r=u.katex)==null?void 0:r.css,rel:"stylesheet",href:n.katex.css,id:$t.katexcss})}),t},fu=new p1({max:1e3,ttl:6e5}),F1=e=>{const t=o.inject("editorId"),n=o.inject("theme"),u=o.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:r,mermaidConfig:a}=lt;let s=i.mermaid.instance;const l=o.shallowRef(-1),d=()=>{if(!e.noMermaid&&s){const f=n.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};s.initialize(a(f)),l.value=l.value+1}};return o.watch(()=>n.value,()=>{fu.clear(),d()}),o.onMounted(()=>{var c,m;if(e.noMermaid||s)return;const f=i.mermaid.js;/\.mjs/.test(f)?(jt("link",{...(c=r.mermaid)==null?void 0:c.js,rel:"modulepreload",href:f,id:$t.mermaidM}),import(f).then(g=>{s=g.default,d()}).catch(g=>{it.emit(t,Li,{name:"mermaid",message:`Failed to load mermaid module: ${g.message}`,error:g})})):jt("script",{...(m=r.mermaid)==null?void 0:m.js,src:f,id:$t.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:l,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=u.value.querySelectorAll(`div.${X}-mermaid`),c=document.createElement("div"),m=document.body.offsetWidth>1366?document.body.offsetWidth:1366,g=document.body.offsetHeight>768?document.body.offsetHeight:768;c.style.width=m+"px",c.style.height=g+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let p=f.length;p>0&&document.body.appendChild(c),await Promise.allSettled(Array.from(f).map(v=>(async x=>{var h;if(x.dataset.closed==="false")return!1;const k=x.innerText;let y=fu.get(k);if(!y){const b=Fi();let w={svg:""};try{w=await s.render(b,k,c),y=await e.sanitizeMermaid(w.svg);const C=document.createElement("p");C.className=`${X}-mermaid`,C.setAttribute("data-processed",""),C.setAttribute("data-content",k),C.innerHTML=y,(h=C.children[0])==null||h.removeAttribute("height"),fu.set(k,C.innerHTML),x.dataset.line!==void 0&&(C.dataset.line=x.dataset.line),x.replaceWith(C)}catch(C){it.emit(t,Li,{name:"mermaid",message:C.message,error:C})}--p===0&&c.remove()}})(v)))}}}},D1=(e,t)=>{t=t||{};const n=3,u=t.marker||"!",i=u.charCodeAt(0),r=u.length;let a="",s="";const l=(f,c,m,g,p)=>{const v=f[c];return v.type==="admonition_open"?f[c].attrPush(["class",`${X}-admonition ${X}-admonition-${v.info}`]):v.type==="admonition_title_open"&&f[c].attrPush(["class",`${X}-admonition-title`]),p.renderToken(f,c,m)},d=f=>{const c=f.trim().split(" ",2);s="",a=c[0],c.length>1&&(s=f.substring(a.length+2))};e.block.ruler.before("code","admonition",(f,c,m,g)=>{let p,v,x,k=!1,y=f.bMarks[c]+f.tShift[c],h=f.eMarks[c];if(i!==f.src.charCodeAt(y))return!1;for(p=y+1;p<=h&&u[(p-y)%r]===f.src[p];p++);const b=Math.floor((p-y)/r);if(b!==n)return!1;p-=(p-y)%r;const w=f.src.slice(y,p),C=f.src.slice(p,h);if(d(C),g)return!0;for(v=c;v++,!(v>=m||(y=f.bMarks[v]+f.tShift[v],h=f.eMarks[v],y<h&&f.sCount[v]<f.blkIndent));)if(i===f.src.charCodeAt(y)&&!(f.sCount[v]-f.blkIndent>=4)){for(p=y+1;p<=h&&u[(p-y)%r]===f.src[p];p++);if(!(Math.floor((p-y)/r)<b)&&(p-=(p-y)%r,p=f.skipSpaces(p),!(p<h))){k=!0;break}}const E=f.parentType,_=f.lineMax;return f.parentType="root",f.lineMax=v,x=f.push("admonition_open","div",1),x.markup=w,x.block=!0,x.info=a,x.map=[c,v],s&&(x=f.push("admonition_title_open","p",1),x.markup=w+" "+a,x.map=[c,v],x=f.push("inline","",0),x.content=s,x.map=[c,f.line-1],x.children=[],x=f.push("admonition_title_close","p",-1),x.markup=w+" "+a),f.md.block.tokenize(f,c+1,v),x=f.push("admonition_close","div",-1),x.markup=f.src.slice(y,p),x.block=!0,f.parentType=E,f.lineMax=_,f.line=v+(k?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},Pi=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(u=>{const i=e.attrIndex(u[0]);i<0?n.push(u):(n[i]=n[i].slice(),n[i][1]+=` ${u[1]}`)}),n},T1=(e,t)=>{const n=e.renderer.rules.fence,u=e.utils.unescapeAll,i=/\[(\w*)(?::([\w ]*))?\]/,r=/::(open|close)/,a=c=>c.info?u(c.info).trim():"",s=c=>{const m=a(c),[g=null,p=""]=(i.exec(m)||[]).slice(1);return[g,p]},l=c=>{const m=a(c);return m?m.split(/(\s+)/g)[0]:""},d=c=>{const m=c.info.match(r)||[],g=m[1]==="open"||m[1]!=="close"&&t.codeFoldable&&c.content.trim().split(`
36
- `).length<t.autoFoldThreshold,p=m[1]||t.codeFoldable?"details":"div",v=m[1]||t.codeFoldable?"summary":"div";return{open:g,tagContainer:p,tagHeader:v}},f=(c,m,g,p,v)=>{var R;if(c[m].hidden)return"";const x=(R=t.usedLanguageTextRef.value)==null?void 0:R.copyCode.text,k=t.customIconRef.value.copy||x,y=!!t.customIconRef.value.copy,h=`<span class="${X}-collapse-tips">${St("collapse-tips",t.customIconRef.value)}</span>`,[b]=s(c[m]);if(b===null){const{open:O,tagContainer:U,tagHeader:re}=d(c[m]),te=[["class",`${X}-code`]];O&&te.push(["open",""]);const P={attrs:Pi(c[m],te)};c[m].info=c[m].info.replace(r,"");const V=n(c,m,g,p,v);return`
37
- <${U} ${v.renderAttrs(P)}>
38
- <${re} class="${X}-code-head">
39
- <div class="${X}-code-flag"><span></span><span></span><span></span></div>
40
- <div class="${X}-code-action">
41
- <span class="${X}-code-lang">${e.utils.escapeHtml(c[m].info.trim())}</span>
42
- <span class="${X}-copy-button" data-tips="${x}"${y?" data-is-icon=true":""}>${k}</span>
43
- ${t.extraTools instanceof Function?t.extraTools({lang:c[m].info.trim()}):t.extraTools||""}
44
- ${U==="details"?h:""}
35
+ See: https://github.com/francoischalifour/medium-zoom`)}},x1=function(t){var n=document.createElement("div");return n.classList.add("medium-zoom-overlay"),n.style.background=t,n},w1=function(t){var n=t.getBoundingClientRect(),u=n.top,o=n.left,r=n.width,a=n.height,s=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,d=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=u+c+"px",s.style.left=o+d+"px",s.style.width=r+"px",s.style.height=a+"px",s.style.transform="",s},An=function(t,n){var u=Jt({bubbles:!1,cancelable:!1,detail:void 0},n);if(typeof window.CustomEvent=="function")return new CustomEvent(t,u);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,u.bubbles,u.cancelable,u.detail),o},v1=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=window.Promise||function(L){function C(){}L(C,C)},o=function(L){var C=L.target;if(C===U){p();return}g.indexOf(C)!==-1&&w({target:C})},r=function(){if(!(k||!F.original)){var L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(T-L)>D.scrollOffset&&setTimeout(p,150)}},a=function(L){var C=L.key||L.keyCode;(C==="Escape"||C==="Esc"||C===27)&&p()},s=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=L;if(L.background&&(U.style.background=L.background),L.container&&L.container instanceof Object&&(C.container=Jt({},D.container,L.container)),L.template){var P=du(L.template)?L.template:document.querySelector(L.template);C.template=P}return D=Jt({},D,C),g.forEach(function(R){R.dispatchEvent(An("medium-zoom:update",{detail:{zoom:_}}))}),_},c=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(Jt({},D,L))},d=function(){for(var L=arguments.length,C=Array(L),P=0;P<L;P++)C[P]=arguments[P];var R=C.reduce(function(E,M){return[].concat(E,bs(M))},[]);return R.filter(function(E){return g.indexOf(E)===-1}).forEach(function(E){g.push(E),E.classList.add("medium-zoom-image")}),y.forEach(function(E){var M=E.type,V=E.listener,$=E.options;R.forEach(function(re){re.addEventListener(M,V,$)})}),_},f=function(){for(var L=arguments.length,C=Array(L),P=0;P<L;P++)C[P]=arguments[P];F.zoomed&&p();var R=C.length>0?C.reduce(function(E,M){return[].concat(E,bs(M))},[]):g;return R.forEach(function(E){E.classList.remove("medium-zoom-image"),E.dispatchEvent(An("medium-zoom:detach",{detail:{zoom:_}}))}),g=g.filter(function(E){return R.indexOf(E)===-1}),_},l=function(L,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(R){R.addEventListener("medium-zoom:"+L,C,P)}),y.push({type:"medium-zoom:"+L,listener:C,options:P}),_},h=function(L,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.forEach(function(R){R.removeEventListener("medium-zoom:"+L,C,P)}),y=y.filter(function(R){return!(R.type==="medium-zoom:"+L&&R.listener.toString()===C.toString())}),_},m=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=L.target,P=function(){var E={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},M=void 0,V=void 0;if(D.container)if(D.container instanceof Object)E=Jt({},E,D.container),M=E.width-E.left-E.right-D.margin*2,V=E.height-E.top-E.bottom-D.margin*2;else{var $=du(D.container)?D.container:document.querySelector(D.container),re=$.getBoundingClientRect(),te=re.width,z=re.height,j=re.left,I=re.top;E=Jt({},E,{width:te,height:z,left:j,top:I})}M=M||E.width-D.margin*2,V=V||E.height-D.margin*2;var B=F.zoomedHd||F.original,W=gs(B)?M:B.naturalWidth||M,K=gs(B)?V:B.naturalHeight||V,Z=B.getBoundingClientRect(),Y=Z.top,ue=Z.left,ce=Z.width,De=Z.height,Te=Math.min(Math.max(ce,W),M)/ce,yt=Math.min(Math.max(De,K),V)/De,Me=Math.min(Te,yt),Nn=(-ue+(M-ce)/2+D.margin+E.left)/Me,qt=(-Y+(V-De)/2+D.margin+E.top)/Me,It="scale("+Me+") translate3d("+Nn+"px, "+qt+"px, 0)";F.zoomed.style.transform=It,F.zoomedHd&&(F.zoomedHd.style.transform=It)};return new u(function(R){if(C&&g.indexOf(C)===-1){R(_);return}var E=function te(){k=!1,F.zoomed.removeEventListener("transitionend",te),F.original.dispatchEvent(An("medium-zoom:opened",{detail:{zoom:_}})),R(_)};if(F.zoomed){R(_);return}if(C)F.original=C;else if(g.length>0){var M=g;F.original=M[0]}else{R(_);return}if(F.original.dispatchEvent(An("medium-zoom:open",{detail:{zoom:_}})),T=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,k=!0,F.zoomed=w1(F.original),document.body.appendChild(U),D.template){var V=du(D.template)?D.template:document.querySelector(D.template);F.template=document.createElement("div"),F.template.appendChild(V.content.cloneNode(!0)),document.body.appendChild(F.template)}if(F.original.parentElement&&F.original.parentElement.tagName==="PICTURE"&&F.original.currentSrc&&(F.zoomed.src=F.original.currentSrc),document.body.appendChild(F.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),F.original.classList.add("medium-zoom-image--hidden"),F.zoomed.classList.add("medium-zoom-image--opened"),F.zoomed.addEventListener("click",p),F.zoomed.addEventListener("transitionend",E),F.original.getAttribute("data-zoom-src")){F.zoomedHd=F.zoomed.cloneNode(),F.zoomedHd.removeAttribute("srcset"),F.zoomedHd.removeAttribute("sizes"),F.zoomedHd.removeAttribute("loading"),F.zoomedHd.src=F.zoomed.getAttribute("data-zoom-src"),F.zoomedHd.onerror=function(){clearInterval($),console.warn("Unable to reach the zoom image target "+F.zoomedHd.src),F.zoomedHd=null,P()};var $=setInterval(function(){F.zoomedHd.complete&&(clearInterval($),F.zoomedHd.classList.add("medium-zoom-image--opened"),F.zoomedHd.addEventListener("click",p),document.body.appendChild(F.zoomedHd),P())},10)}else if(F.original.hasAttribute("srcset")){F.zoomedHd=F.zoomed.cloneNode(),F.zoomedHd.removeAttribute("sizes"),F.zoomedHd.removeAttribute("loading");var re=F.zoomedHd.addEventListener("load",function(){F.zoomedHd.removeEventListener("load",re),F.zoomedHd.classList.add("medium-zoom-image--opened"),F.zoomedHd.addEventListener("click",p),document.body.appendChild(F.zoomedHd),P()})}else P()})},p=function(){return new u(function(L){if(k||!F.original){L(_);return}var C=function P(){F.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(F.zoomed),F.zoomedHd&&document.body.removeChild(F.zoomedHd),document.body.removeChild(U),F.zoomed.classList.remove("medium-zoom-image--opened"),F.template&&document.body.removeChild(F.template),k=!1,F.zoomed.removeEventListener("transitionend",P),F.original.dispatchEvent(An("medium-zoom:closed",{detail:{zoom:_}})),F.original=null,F.zoomed=null,F.zoomedHd=null,F.template=null,L(_)};k=!0,document.body.classList.remove("medium-zoom--opened"),F.zoomed.style.transform="",F.zoomedHd&&(F.zoomedHd.style.transform=""),F.template&&(F.template.style.transition="opacity 150ms",F.template.style.opacity=0),F.original.dispatchEvent(An("medium-zoom:close",{detail:{zoom:_}})),F.zoomed.addEventListener("transitionend",C)})},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C=L.target;return F.original?p():m({target:C})},x=function(){return D},A=function(){return g},b=function(){return F.original},g=[],y=[],k=!1,T=0,D=n,F={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&d(t),D=Jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var U=x1(D.background);document.addEventListener("click",o),document.addEventListener("keyup",a),document.addEventListener("scroll",r),window.addEventListener("resize",p);var _={open:m,close:p,toggle:w,update:s,clone:c,attach:d,detach:f,on:l,off:h,getOptions:x,getImages:A,getZoomedImage:b};return _};function A1(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var u=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&u.firstChild?u.insertBefore(o,u.firstChild):u.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var k1=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";A1(k1);const Ut={hljs:`${q}-hljs`,hlcss:`${q}-hlCss`,mermaidM:`${q}-mermaid-m`,mermaid:`${q}-mermaid`,katexjs:`${q}-katex`,katexcss:`${q}-katexCss`,echarts:`${q}-echarts`},C1=(e,{editorId:t,rootRef:n,setting:u})=>{const o=ct.editorExtensions.highlight,r=ct.editorExtensionsAttrs.highlight;i.provide("editorId",t),i.provide("rootRef",n),i.provide("theme",i.computed(()=>e.theme)),i.provide("language",i.computed(()=>e.language)),i.provide("highlight",i.computed(()=>{const{js:s}=o,c={...Lo,...o.css},{js:d,css:f={}}=r||{},l=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,h=c[e.codeTheme]?c[e.codeTheme][l]:Lo.atom[l],m=c[e.codeTheme]&&f[e.codeTheme]?f[e.codeTheme][l]:f.atom?f.atom[l]:{};return{js:{src:s,...d},css:{href:h,...m}}})),i.provide("showCodeRowNumber",e.showCodeRowNumber);const a=i.computed(()=>{const s={...is,...ct.editorConfig.languageUserDefined};return To(or(is["en-US"]),s[e.language]||{})});return i.provide("usedLanguageText",a),i.provide("previewTheme",i.computed(()=>e.previewTheme)),i.provide("customIcon",i.computed(()=>e.customIcon)),i.provide("setting",i.computed(()=>u?{...u}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},_1=e=>{const t=i.useId();return e.id||e.editorId||`${q}-${t}`},E1=(e,t,n)=>{const u=i.inject("editorId"),o=i.inject("rootRef"),r=i.inject("usedLanguageText"),a=i.inject("setting"),s=()=>{o.value.querySelectorAll(`#${u} .${q}-preview .${q}-code`).forEach(f=>{let l=-1;const h=f.querySelector(`.${q}-copy-button:not([data-processed])`);h&&(h.onclick=m=>{m.preventDefault(),clearTimeout(l);const p=(f.querySelector("input:checked + pre code")||f.querySelector("pre code")).textContent,{text:w,successTips:x,failTips:A}=r.value.copyCode;let b=x;ss(e.formatCopiedText(p||"")).catch(()=>{b=A}).finally(()=>{h.dataset.isIcon?h.dataset.tips=b:h.innerHTML=b,l=window.setTimeout(()=>{h.dataset.isIcon?h.dataset.tips=w:h.innerHTML=w},1500)})},h.setAttribute("data-processed","true"))})},c=()=>{i.nextTick(s)},d=f=>{f&&i.nextTick(s)};i.watch([t,n],c),i.watch(()=>a.value.preview,d),i.watch(()=>a.value.htmlPreview,d),i.onMounted(s)},S1=e=>{const t=i.inject("editorId"),n=i.inject("theme"),u=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:r}=ct;let a=o.echarts.instance;const s=i.shallowRef(-1),c=()=>{!e.noEcharts&&a&&(s.value=s.value+1)};i.watch(()=>n.value,()=>{c()}),i.onMounted(()=>{var w;if(e.noEcharts||a)return;const p=o.echarts.js;Ht("script",{...(w=r.echarts)==null?void 0:w.js,src:p,id:Ut.echarts,onload(){a=window.echarts,c()}},"echarts")});let d=[],f=[],l=[];const h=(p=!1)=>{if(!d.length){p&&(f.forEach(b=>{var g;(g=b.dispose)==null||g.call(b)}),l.forEach(b=>{var g;(g=b.disconnect)==null||g.call(b)}),f=[],l=[]);return}const w=[],x=[],A=[];d.forEach((b,g)=>{var T,D;const y=f[g],k=l[g];if(p||!b||!b.isConnected||u!=null&&u.value&&!u.value.contains(b)){(T=y==null?void 0:y.dispose)==null||T.call(y),(D=k==null?void 0:k.disconnect)==null||D.call(k);return}w.push(b),y&&x.push(y),k&&A.push(k)}),d=w,f=x,l=A},m=()=>{h(),!e.noEcharts&&a&&Array.from(u.value.querySelectorAll(`#${t} div.${q}-echarts:not([data-processed])`)).forEach(p=>{if(p.dataset.closed==="false")return!1;try{const w=new Function(`return ${p.innerText}`)(),x=a.init(p,n.value);x.setOption(w),p.setAttribute("data-processed",""),d.push(p),f.push(x);const A=new ResizeObserver(()=>{x.resize()});A.observe(p),l.push(A)}catch(w){ot.emit(t,Io,{name:"echarts",message:w==null?void 0:w.message,error:w})}})};return i.onBeforeUnmount(()=>{h(!0)}),{reRenderEcharts:s,replaceEcharts:m}},F1=e=>{const t=i.inject("highlight"),n=i.shallowRef(ct.editorExtensions.highlight.instance);return i.onMounted(()=>{e.noHighlight||n.value||(Ht("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss}),Ht("script",{...t.value.js,id:Ut.hljs,onload(){n.value=window.hljs}},"hljs"))}),i.watch(()=>t.value.css,()=>{e.noHighlight||ct.editorExtensions.highlight.instance||n1("link",{...t.value.css,rel:"stylesheet",id:Ut.hlcss})}),n},D1=e=>{const t=i.shallowRef(ct.editorExtensions.katex.instance);return i.onMounted(()=>{var o,r;if(e.noKatex||t.value)return;const{editorExtensions:n,editorExtensionsAttrs:u}=ct;Ht("script",{...(o=u.katex)==null?void 0:o.js,src:n.katex.js,id:Ut.katexjs,onload(){t.value=window.katex}},"katex"),Ht("link",{...(r=u.katex)==null?void 0:r.css,rel:"stylesheet",href:n.katex.css,id:Ut.katexcss})}),t},fu=new b1({max:1e3,ttl:6e5}),T1=e=>{const t=i.inject("editorId"),n=i.inject("theme"),u=i.inject("rootRef"),{editorExtensions:o,editorExtensionsAttrs:r,mermaidConfig:a}=ct;let s=o.mermaid.instance;const c=i.shallowRef(-1),d=()=>{if(!e.noMermaid&&s){const f=n.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};s.initialize(a(f)),c.value=c.value+1}};return i.watch(()=>n.value,()=>{fu.clear(),d()}),i.onMounted(()=>{var l,h;if(e.noMermaid||s)return;const f=o.mermaid.js;/\.mjs/.test(f)?(Ht("link",{...(l=r.mermaid)==null?void 0:l.js,rel:"modulepreload",href:f,id:Ut.mermaidM}),import(f).then(m=>{s=m.default,d()}).catch(m=>{ot.emit(t,Io,{name:"mermaid",message:`Failed to load mermaid module: ${m.message}`,error:m})})):Ht("script",{...(h=r.mermaid)==null?void 0:h.js,src:f,id:Ut.mermaid,onload(){s=window.mermaid,d()}},"mermaid")}),{reRenderRef:c,replaceMermaid:async()=>{if(!e.noMermaid&&s){const f=u.value.querySelectorAll(`div.${q}-mermaid`),l=document.createElement("div"),h=document.body.offsetWidth>1366?document.body.offsetWidth:1366,m=document.body.offsetHeight>768?document.body.offsetHeight:768;l.style.width=h+"px",l.style.height=m+"px",l.style.position="fixed",l.style.zIndex="-10000",l.style.top="-10000";let p=f.length;p>0&&document.body.appendChild(l),await Promise.allSettled(Array.from(f).map(w=>(async x=>{var g;if(x.dataset.closed==="false")return!1;const A=x.innerText;let b=fu.get(A);if(!b){const y=Do();let k={svg:""};try{k=await s.render(y,A,l),b=await e.sanitizeMermaid(k.svg);const T=document.createElement("p");T.className=`${q}-mermaid`,T.setAttribute("data-processed",""),T.setAttribute("data-content",A),T.innerHTML=b,(g=T.children[0])==null||g.removeAttribute("height"),fu.set(A,T.innerHTML),x.dataset.line!==void 0&&(T.dataset.line=x.dataset.line),x.replaceWith(T)}catch(T){ot.emit(t,Io,{name:"mermaid",message:T.message,error:T})}--p===0&&l.remove()}})(w)))}}}},N1=(e,t)=>{t=t||{};const n=3,u=t.marker||"!",o=u.charCodeAt(0),r=u.length;let a="",s="";const c=(f,l,h,m,p)=>{const w=f[l];return w.type==="admonition_open"?f[l].attrPush(["class",`${q}-admonition ${q}-admonition-${w.info}`]):w.type==="admonition_title_open"&&f[l].attrPush(["class",`${q}-admonition-title`]),p.renderToken(f,l,h)},d=f=>{const l=f.trim().split(" ",2);s="",a=l[0],l.length>1&&(s=f.substring(a.length+2))};e.block.ruler.before("code","admonition",(f,l,h,m)=>{let p,w,x,A=!1,b=f.bMarks[l]+f.tShift[l],g=f.eMarks[l];if(o!==f.src.charCodeAt(b))return!1;for(p=b+1;p<=g&&u[(p-b)%r]===f.src[p];p++);const y=Math.floor((p-b)/r);if(y!==n)return!1;p-=(p-b)%r;const k=f.src.slice(b,p),T=f.src.slice(p,g);if(d(T),m)return!0;for(w=l;w++,!(w>=h||(b=f.bMarks[w]+f.tShift[w],g=f.eMarks[w],b<g&&f.sCount[w]<f.blkIndent));)if(o===f.src.charCodeAt(b)&&!(f.sCount[w]-f.blkIndent>=4)){for(p=b+1;p<=g&&u[(p-b)%r]===f.src[p];p++);if(!(Math.floor((p-b)/r)<y)&&(p-=(p-b)%r,p=f.skipSpaces(p),!(p<g))){A=!0;break}}const D=f.parentType,F=f.lineMax;return f.parentType="root",f.lineMax=w,x=f.push("admonition_open","div",1),x.markup=k,x.block=!0,x.info=a,x.map=[l,w],s&&(x=f.push("admonition_title_open","p",1),x.markup=k+" "+a,x.map=[l,w],x=f.push("inline","",0),x.content=s,x.map=[l,f.line-1],x.children=[],x=f.push("admonition_title_close","p",-1),x.markup=k+" "+a),f.md.block.tokenize(f,l+1,w),x=f.push("admonition_close","div",-1),x.markup=f.src.slice(b,p),x.block=!0,f.parentType=D,f.lineMax=F,f.line=w+(A?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=c,e.renderer.rules.admonition_title_open=c,e.renderer.rules.admonition_title_close=c,e.renderer.rules.admonition_close=c},Ro=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(u=>{const o=e.attrIndex(u[0]);o<0?n.push(u):(n[o]=n[o].slice(),n[o][1]+=` ${u[1]}`)}),n},L1=(e,t)=>{const n=e.renderer.rules.fence,u=e.utils.unescapeAll,o=/\[(\w*)(?::([\w ]*))?\]/,r=/::(open|close)/,a=l=>l.info?u(l.info).trim():"",s=l=>{const h=a(l),[m=null,p=""]=(o.exec(h)||[]).slice(1);return[m,p]},c=l=>{const h=a(l);return h?h.split(/(\s+)/g)[0]:""},d=l=>{const h=l.info.match(r)||[],m=h[1]==="open"||h[1]!=="close"&&t.codeFoldable&&l.content.trim().split(`
36
+ `).length<t.autoFoldThreshold,p=h[1]||t.codeFoldable?"details":"div",w=h[1]||t.codeFoldable?"summary":"div";return{open:m,tagContainer:p,tagHeader:w}},f=(l,h,m,p,w)=>{var M;if(l[h].hidden)return"";const x=(M=t.usedLanguageTextRef.value)==null?void 0:M.copyCode.text,A=t.customIconRef.value.copy||x,b=!!t.customIconRef.value.copy,g=`<span class="${q}-collapse-tips">${St("collapse-tips",t.customIconRef.value)}</span>`,[y]=s(l[h]);if(y===null){const{open:V,tagContainer:$,tagHeader:re}=d(l[h]),te=[["class",`${q}-code`]];V&&te.push(["open",""]);const z={attrs:Ro(l[h],te)};l[h].info=l[h].info.replace(r,"");const j=n(l,h,m,p,w);return`
37
+ <${$} ${w.renderAttrs(z)}>
38
+ <${re} class="${q}-code-head">
39
+ <div class="${q}-code-flag"><span></span><span></span><span></span></div>
40
+ <div class="${q}-code-action">
41
+ <span class="${q}-code-lang">${e.utils.escapeHtml(l[h].info.trim())}</span>
42
+ <span class="${q}-copy-button" data-tips="${x}"${b?" data-is-icon=true":""}>${A}</span>
43
+ ${t.extraTools instanceof Function?t.extraTools({lang:l[h].info.trim()}):t.extraTools||""}
44
+ ${$==="details"?g:""}
45
45
  </div>
46
46
  </${re}>
47
- ${V}
48
- </${U}>
49
- `}let w,C,E,_,z="",M="",I="";const{open:B,tagContainer:D,tagHeader:H}=d(c[m]),$=[["class",`${X}-code`]];B&&$.push(["open",""]);const F={attrs:Pi(c[m],$)};for(let O=m;O<c.length&&(w=c[O],[C,E]=s(w),C===b);O++){w.info=w.info.replace(i,"").replace(r,""),w.hidden=!0;const U=`${X}-codetab-${t.editorId}-${m}-${O-m}`;_=O-m>0?"":"checked",z+=`
47
+ ${j}
48
+ </${$}>
49
+ `}let k,T,D,F,U="",_="",N="";const{open:L,tagContainer:C,tagHeader:P}=d(l[h]),R=[["class",`${q}-code`]];L&&R.push(["open",""]);const E={attrs:Ro(l[h],R)};for(let V=h;V<l.length&&(k=l[V],[T,D]=s(k),T===y);V++){k.info=k.info.replace(o,"").replace(r,""),k.hidden=!0;const $=`${q}-codetab-${t.editorId}-${h}-${V-h}`;F=V-h>0?"":"checked",U+=`
50
50
  <li>
51
51
  <input
52
52
  type="radio"
53
- id="label-${X}-codetab-label-1-${t.editorId}-${m}-${O-m}"
54
- name="${X}-codetab-label-${t.editorId}-${m}"
55
- class="${U}"
56
- ${_}
53
+ id="label-${q}-codetab-label-1-${t.editorId}-${h}-${V-h}"
54
+ name="${q}-codetab-label-${t.editorId}-${h}"
55
+ class="${$}"
56
+ ${F}
57
57
  >
58
58
  <label
59
- for="label-${X}-codetab-label-1-${t.editorId}-${m}-${O-m}"
60
- onclick="this.getRootNode().querySelectorAll('.${U}').forEach(e => e.click())"
59
+ for="label-${q}-codetab-label-1-${t.editorId}-${h}-${V-h}"
60
+ onclick="this.getRootNode().querySelectorAll('.${$}').forEach(e => e.click())"
61
61
  >
62
- ${e.utils.escapeHtml(E||l(w))}
62
+ ${e.utils.escapeHtml(D||c(k))}
63
63
  </label>
64
- </li>`,M+=`
64
+ </li>`,_+=`
65
65
  <div role="tabpanel">
66
66
  <input
67
67
  type="radio"
68
- name="${X}-codetab-pre-${t.editorId}-${m}"
69
- class="${U}"
70
- ${_}
68
+ name="${q}-codetab-pre-${t.editorId}-${h}"
69
+ class="${$}"
70
+ ${F}
71
71
  role="presentation">
72
- ${n(c,O,g,p,v)}
73
- </div>`,I+=`
72
+ ${n(l,V,m,p,w)}
73
+ </div>`,N+=`
74
74
  <input
75
75
  type="radio"
76
- name="${X}-codetab-lang-${t.editorId}-${m}"
77
- class="${U}"
78
- ${_}
76
+ name="${q}-codetab-lang-${t.editorId}-${h}"
77
+ class="${$}"
78
+ ${F}
79
79
  role="presentation">
80
- <span class=${X}-code-lang role="note">${e.utils.escapeHtml(l(w))}</span>`}return`
81
- <${D} ${v.renderAttrs(F)}>
82
- <${H} class="${X}-code-head">
83
- <div class="${X}-code-flag">
84
- <ul class="${X}-codetab-label" role="tablist">${z}</ul>
80
+ <span class=${q}-code-lang role="note">${e.utils.escapeHtml(c(k))}</span>`}return`
81
+ <${C} ${w.renderAttrs(E)}>
82
+ <${P} class="${q}-code-head">
83
+ <div class="${q}-code-flag">
84
+ <ul class="${q}-codetab-label" role="tablist">${U}</ul>
85
85
  </div>
86
- <div class="${X}-code-action">
87
- <span class="${X}-codetab-lang">${I}</span>
88
- <span class="${X}-copy-button" data-tips="${x}"${y?" data-is-icon=true":""}>${k}</span>
89
- ${t.extraTools instanceof Function?t.extraTools({lang:c[m].info.trim()}):t.extraTools||""}
90
- ${D==="details"?h:""}
86
+ <div class="${q}-code-action">
87
+ <span class="${q}-codetab-lang">${N}</span>
88
+ <span class="${q}-copy-button" data-tips="${x}"${b?" data-is-icon=true":""}>${A}</span>
89
+ ${t.extraTools instanceof Function?t.extraTools({lang:l[h].info.trim()}):t.extraTools||""}
90
+ ${C==="details"?g:""}
91
91
  </div>
92
- </${H}>
93
- ${M}
94
- </${D}>
95
- `};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},N1=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(u,i,r,a,s)=>{var f,c;const l=u[i],d=l.content.trim();if(l.info==="echarts"){if(l.attrSet("class",`${X}-echarts`),l.attrSet("data-echarts-theme",t.themeRef.value),l.map&&l.level===0){const m=l.map[1]-1,g=!!((c=(f=a.srcLines[m])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${g}`),l.attrSet("data-line",String(l.map[0]))}return`<div ${s.renderAttrs(l)} style="width: 100%; aspect-ratio: 4 / 3;">${e.utils.escapeHtml(d)}</div>`}return n(u,i,r,a,s)}},L1=(e,t)=>{e.renderer.rules.heading_open=(n,u)=>{var s;const i=n[u],r=((s=n[u+1].children)==null?void 0:s.reduce((l,d)=>l+(["text","code_inline","math_inline"].includes(d.type)&&d.content||""),""))||"",a=i.markup.length;return t.headsRef.value.push({text:r,level:a,line:i.map[0],currentToken:i,nextToken:n[u+1]}),i.map&&i.level===0&&i.attrSet("id",t.mdHeadingId({text:r,level:a,index:t.headsRef.value.length,currentToken:i,nextToken:n[u+1]})),e.renderer.renderToken(n,u,t)},e.renderer.rules.heading_close=(n,u,i,r,a)=>a.renderToken(n,u,i)},ys={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},I1=e=>(t,n)=>{const u=e.delimiters;for(const i of u){if(!t.src.startsWith(i.open,t.pos))continue;const r=t.pos+i.open.length;let a=r;for(;(a=t.src.indexOf(i.close,a))!==-1;){let s=0,l=a-1;for(;l>=0&&t.src[l]==="\\";)s++,l--;if(s%2===0)break;a+=i.close.length}if(a!==-1){if(a-r===0)return n||(t.pending+=i.open+i.close),t.pos=a+i.close.length,!0;if(!n){const s=t.push("math_inline","math",0);s.markup=i.open,s.content=t.src.slice(r,a)}return t.pos=a+i.close.length,!0}}return!1},O1=e=>(t,n,u,i)=>{const r=e.delimiters,a=t.bMarks[n]+t.tShift[n],s=t.eMarks[n],l=(d,f,c)=>{t.line=f;const m=t.push("math_block","math",0);return m.block=!0,m.content=d,m.map=[n,t.line],m.markup=c,!0};for(const d of r){const f=a;if(t.src.slice(f,f+d.open.length)!==d.open)continue;const c=f+d.open.length,m=t.src.slice(c,s).trim(),g=m==="",p=m===d.close,v=m.endsWith(d.close);if(!g&&!p&&!v)continue;if(i)return!0;if(p)return l("",n+1,d.open);if(!g&&v){const b=m.slice(0,-d.close.length);return l(b,n+1,d.open)}let x=n+1,k=!1,y="";for(;x<u;x++){const b=t.bMarks[x]+t.tShift[x],w=t.eMarks[x];if(b<w&&t.tShift[x]<t.blkIndent)break;if(t.src.slice(b,w).trim().endsWith(d.close)){const C=t.src.slice(0,w).lastIndexOf(d.close);y=t.src.slice(b,C),k=!0;break}}if(!k)continue;const h=t.getLines(n+1,x,t.tShift[n],!0)+(y.trim()?y:"");return l(h,x+1,d.open)}return!1},P1=(e,{katexRef:t,inlineDelimiters:n,blockDelimiters:u})=>{const i=(s,l,d,f,c=!1)=>{const m={attrs:Pi(s,[["class",l]])},g=f.renderAttrs(m);if(!t.value)return`<${d} ${g}>${s.content}</${d}>`;const p=t.value.renderToString(s.content,lt.katexConfig({throwOnError:!1,displayMode:c}));return`<${d} ${g} data-processed>${p}</${d}>`},r=(s,l,d,f,c)=>i(s[l],`${X}-katex-inline`,"span",c),a=(s,l,d,f,c)=>i(s[l],`${X}-katex-block`,"p",c,!0);e.inline.ruler.before("escape","math_inline",I1({delimiters:n||ys.inline})),e.block.ruler.after("blockquote","math_block",O1({delimiters:u||ys.block}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=r,e.renderer.rules.math_block=a},R1=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(u,i,r,a,s)=>{var f,c;const l=u[i],d=l.content.trim();if(l.info==="mermaid"){if(l.attrSet("class",`${X}-mermaid`),l.attrSet("data-mermaid-theme",t.themeRef.value),l.map&&l.level===0){const g=l.map[1]-1,p=!!((c=(f=a.srcLines[g])==null?void 0:f.trim())!=null&&c.startsWith("```"));l.attrSet("data-closed",`${p}`),l.attrSet("data-line",String(l.map[0]))}const m=fu.get(d);return m?(l.attrSet("data-processed",""),l.attrSet("data-content",d),`<p ${s.renderAttrs(l)}>${m}</p>`):`<div ${s.renderAttrs(l)}>${e.utils.escapeHtml(d)}</div>`}return n(u,i,r,a,s)}},xs=(e,t,n)=>{const u=e.attrIndex(t),i=[t,n];u<0?e.attrPush(i):(e.attrs=e.attrs||[],e.attrs[u]=i)},V1=e=>e.type==="inline",M1=e=>e.type==="paragraph_open",B1=e=>e.type==="list_item_open",z1=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,j1=(e,t)=>V1(e[t])&&M1(e[t-1])&&B1(e[t-2])&&z1(e[t]),H1=(e,t)=>{const n=e[t].level-1;for(let u=t-1;u>=0;u--)if(e[u].level===n)return u;return-1},$1=e=>{const t=new e("html_inline","",0);return t.content="<label>",t},U1=e=>{const t=new e("html_inline","",0);return t.content="</label>",t},W1=(e,t,n)=>{const u=new n("html_inline","",0);return u.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",u.attrs=[["for",t]],u},G1=(e,t,n)=>{const u=new t("html_inline","",0),i=n.enabled?" ":' disabled="" ';return e.content.indexOf("[ ] ")===0?u.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(u.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),u},X1=(e,t,n)=>{if(e.children=e.children||[],e.children.unshift(G1(e,t,n)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n.label)if(n.labelAfter){e.children.pop();const u="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+u+'">',e.children.push(W1(e.content,u,t))}else e.children.unshift($1(t)),e.children.push(U1(t))},q1=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",n=>{const u=n.tokens;for(let i=2;i<u.length;i++)j1(u,i)&&(X1(u[i],n.Token,t),xs(u[i-2],"class","task-list-item"+(t.enabled?" enabled":" ")),xs(u[H1(u,i-2)],"class","contains-task-list"))})},Z1=e=>{e.core.ruler.push("init-line-number",t=>(t.tokens.forEach(n=>{n.map&&(n.attrs||(n.attrs=[]),n.attrs.push(["data-line",n.map[0].toString()]))}),!0))},Y1=(e,t)=>{const{editorConfig:n,markdownItPlugins:u}=lt,i=o.inject("editorId"),r=o.inject("language"),a=o.inject("usedLanguageText"),s=o.inject("showCodeRowNumber"),l=o.inject("theme"),d=o.inject("customIcon"),f=o.inject("rootRef"),c=o.inject("setting"),m=o.ref([]),g=_1(e),p=S1(e),{reRenderRef:v,replaceMermaid:x}=F1(e),{reRenderEcharts:k,replaceEcharts:y}=E1(e),h=Ze({html:!0,breaks:!0,linkify:!0}),b=[{type:"image",plugin:i1,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:D1,options:{}},{type:"taskList",plugin:q1,options:{}},{type:"heading",plugin:L1,options:{mdHeadingId:e.mdHeadingId,headsRef:m}},{type:"code",plugin:T1,options:{editorId:i,usedLanguageTextRef:a,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:d}},{type:"sub",plugin:s1,options:{}},{type:"sup",plugin:d1,options:{}}];e.noKatex||b.push({type:"katex",plugin:P1,options:{katexRef:p}}),e.noMermaid||b.push({type:"mermaid",plugin:R1,options:{themeRef:l}}),e.noEcharts||b.push({type:"echarts",plugin:N1,options:{themeRef:l}}),u(b,{editorId:i}).forEach($=>{h.use($.plugin,$.options)});const w=h.options.highlight;h.set({highlight:($,F,R)=>{if(w){const re=w($,F,R);if(re)return re}let O;!e.noHighlight&&g.value?g.value.getLanguage(F)?O=g.value.highlight($,{language:F,ignoreIllegals:!0}).value:O=g.value.highlightAuto($).value:O=h.utils.escapeHtml($);const U=s?Qh(O.replace(/^\n+|\n+$/g,""),$.replace(/^\n+|\n+$/g,"")):`<span class="${X}-code-block">${O.replace(/^\n+|\n+$/g,"")}</span>`;return`<pre><code class="language-${F}" language=${F}>${U}</code></pre>`}}),Z1(h);const C=o.ref(`_article-key_${Fi()}`),E=o.ref(e.sanitize(h.render(e.modelValue,{srcLines:e.modelValue.split(`
96
- `)})));let _=()=>{},z=()=>{};const M=()=>{var F;const $=(F=f.value)==null?void 0:F.querySelectorAll(`#${i} p.${X}-mermaid:not([data-closed=false])`);z(),z=n1($,{customIcon:d.value}),_(),_=r1($,{customIcon:d.value})},I=()=>{it.emit(i,qh,E.value),e.onHtmlChanged(E.value),e.onGetCatalog(m.value),it.emit(i,Ii,m.value),o.nextTick(()=>{x().then(M),y()})},B=()=>{m.value=[],E.value=e.sanitize(h.render(e.modelValue,{srcLines:e.modelValue.split(`
97
- `)}))},D=o.computed(()=>(e.noKatex||!!p.value)&&(e.noHighlight||!!g.value));let H=-1;return o.watch([o.toRef(e,"modelValue"),D,v,r],()=>{H=window.setTimeout(()=>{B()},t?0:n.renderDelay)}),o.watch(()=>c.value.preview,()=>{c.value.preview&&o.nextTick(()=>{x().then(M),y(),it.emit(i,Ii,m.value)})}),o.watch([E,k],()=>{I()}),o.onMounted(I),o.onMounted(()=>{it.on(i,{name:Zh,callback(){it.emit(i,Ii,m.value)}}),it.on(i,{name:as,callback:()=>{C.value=`_article-key_${Fi()}`,B()}})}),o.onBeforeUnmount(()=>{_(),z(),clearTimeout(H)}),{html:E,key:C}},K1=(e,t)=>{const n=o.inject("editorId"),u=o.inject("setting"),{noImgZoomIn:i}=e,r=Mh(()=>{const a=document.querySelectorAll(`#${n}-preview img:not(.not-zoom):not(.medium-zoom-image)`);a.length!==0&&x1(a,{background:"#00000073"})});o.onMounted(async()=>{!i&&u.value.preview&&await r()}),o.watch([t,()=>u.value.preview],async()=>{!i&&u.value.preview&&await r()})},ws={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},Q1=(e,t)=>{const n=o.inject("editorId"),u=o.inject("rootRef");let i=()=>{};const r=()=>{if(!u.value)return!1;const a=u.value.querySelectorAll(".task-list-item.enabled"),s=l=>{var p;l.preventDefault();const d=l.target.checked?"unChecked":"checked",f=(p=l.target.parentElement)==null?void 0:p.dataset.line;if(!f)return;const c=Number(f),m=e.modelValue.split(`
98
- `),g=m[Number(c)].replace(ws[d].regexp,ws[d].value);e.previewOnly?(m[Number(c)]=g,e.onChange(m.join(`
99
- `))):it.emit(n,Yh,c+1,g)};a.forEach(l=>{l.addEventListener("click",s)}),i=()=>{a.forEach(l=>{l.removeEventListener("click",s)})}};o.onBeforeUnmount(()=>{i()}),o.watch([t],()=>{i(),o.nextTick(r)},{immediate:!0})},J1=(e,t,n)=>{const u=o.inject("setting"),i=()=>{o.nextTick(()=>{var a;(a=e.onRemount)==null||a.call(e)})},r=a=>{a&&i()};o.watch([t,n],i),o.watch(()=>u.value.preview,r),o.watch(()=>u.value.htmlPreview,r),o.onMounted(i)},vs={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}};({...vs});const As=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},e2=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,t2=o.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=o.ref(),n=e.html,u=(i,r)=>{if(!t.value)return;const a=t.value,s=Array.from(a.childNodes),l=Math.min(i.length,r.length);let d=-1;for(let c=0;c<l;c++)if(!e2(i[c],r[c])){d=c;break}if(d===-1)if(r.length>i.length)d=i.length;else if(i.length>r.length)d=r.length;else return;const f=Math.min(d,s.length);for(let c=s.length-1;c>=f;c--)s[c].remove();for(let c=d;c<i.length;c++)a.appendChild(i[c].cloneNode(!0))};return o.watch(()=>e.html,(i,r)=>{const a=As(i),s=As(r||"");u(a,s)}),()=>o.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),n2=o.defineComponent({name:"ContentPreview",props:vs,setup(e){const t=o.inject("editorId"),n=o.inject("setting"),u=o.inject("previewTheme"),i=o.inject("showCodeRowNumber"),{html:r,key:a}=Y1(e,e.previewOnly);C1(e,r,a),K1(e,r),Q1(e,r),J1(e,r,a);const s=o.computed(()=>[`${X}-preview`,`${u==null?void 0:u.value}-theme`,i&&`${X}-scrn`].filter(Boolean)),l=()=>{const d=`${t}-preview`;return e.previewComponent?o.h(e.previewComponent,{key:a.value,html:r.value,id:d,class:s.value}):o.createVNode(t2,{key:a.value,html:r.value,id:d,class:s.value},null)};return()=>o.createVNode(o.Fragment,null,[n.value.preview&&(e.previewOnly?l():o.createVNode("div",{id:`${t}-preview-wrapper`,class:`${X}-preview-wrapper`,key:"content-preview-wrapper"},[l()])),n.value.htmlPreview&&o.createVNode("div",{id:`${t}-html-wrapper`,class:`${X}-preview-wrapper`,key:"html-preview-wrapper"},[o.createVNode("div",{class:`${X}-html`},[r.value])])])}}),r2=({text:e})=>e,ks={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:r2},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}};({...ks});const Cs=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...Cs];const u2=(e,t,n)=>{const{editorId:u}=n,i={rerender(){it.emit(u,as)}};t.expose(i)},hu=o.defineComponent({name:"MdPreview",props:ks,emits:Cs,setup(e,t){const{noKatex:n,noMermaid:u,noHighlight:i}=e,r=o.ref(),a=k1(e);A1(e,{rootRef:r,editorId:a}),u2(e,t,{editorId:a}),o.onBeforeUnmount(()=>{it.clear(a)});const s=c=>{var m;(m=e.onChange)==null||m.call(e,c),t.emit("onChange",c),t.emit("update:modelValue",c)},l=c=>{var m;(m=e.onHtmlChanged)==null||m.call(e,c),t.emit("onHtmlChanged",c)},d=c=>{var m;(m=e.onGetCatalog)==null||m.call(e,c),t.emit("onGetCatalog",c)},f=()=>{var c;(c=e.onRemount)==null||c.call(e),t.emit("onRemount")};return()=>o.createVNode("div",{id:a,class:[X,e.class,e.theme==="dark"&&`${X}-dark`,`${X}-previewOnly`],style:e.style,ref:r},[o.createVNode(n2,{modelValue:e.modelValue,onChange:s,onHtmlChanged:l,onGetCatalog:d,mdHeadingId:e.mdHeadingId,noMermaid:u,sanitize:e.sanitize,noKatex:n,formatCopiedText:e.formatCopiedText,noHighlight:i,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:f,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});hu.install=e=>(e.component(hu.name,hu),e);const i2={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},Ri=o.defineComponent({name:"NormalFooterToolbar",props:i2,emits:["onClick"],setup(e,t){return()=>{const n=Xh({props:e,ctx:t});return o.createVNode("div",{class:[`${X}-footer-item`,e.disabled&&`${X}-disabled`],onClick:u=>{var i;e.disabled||((i=e.onClick)==null||i.call(e,u),t.emit("onClick",u))}},[n])}}});Ri.install=e=>(e.component(Ri.name,Ri),e);var Vi={exports:{}},pe={},Mi={exports:{}},en={},Es;function _s(){if(Es)return en;Es=1;function e(){var r={};return r["align-content"]=!1,r["align-items"]=!1,r["align-self"]=!1,r["alignment-adjust"]=!1,r["alignment-baseline"]=!1,r.all=!1,r["anchor-point"]=!1,r.animation=!1,r["animation-delay"]=!1,r["animation-direction"]=!1,r["animation-duration"]=!1,r["animation-fill-mode"]=!1,r["animation-iteration-count"]=!1,r["animation-name"]=!1,r["animation-play-state"]=!1,r["animation-timing-function"]=!1,r.azimuth=!1,r["backface-visibility"]=!1,r.background=!0,r["background-attachment"]=!0,r["background-clip"]=!0,r["background-color"]=!0,r["background-image"]=!0,r["background-origin"]=!0,r["background-position"]=!0,r["background-repeat"]=!0,r["background-size"]=!0,r["baseline-shift"]=!1,r.binding=!1,r.bleed=!1,r["bookmark-label"]=!1,r["bookmark-level"]=!1,r["bookmark-state"]=!1,r.border=!0,r["border-bottom"]=!0,r["border-bottom-color"]=!0,r["border-bottom-left-radius"]=!0,r["border-bottom-right-radius"]=!0,r["border-bottom-style"]=!0,r["border-bottom-width"]=!0,r["border-collapse"]=!0,r["border-color"]=!0,r["border-image"]=!0,r["border-image-outset"]=!0,r["border-image-repeat"]=!0,r["border-image-slice"]=!0,r["border-image-source"]=!0,r["border-image-width"]=!0,r["border-left"]=!0,r["border-left-color"]=!0,r["border-left-style"]=!0,r["border-left-width"]=!0,r["border-radius"]=!0,r["border-right"]=!0,r["border-right-color"]=!0,r["border-right-style"]=!0,r["border-right-width"]=!0,r["border-spacing"]=!0,r["border-style"]=!0,r["border-top"]=!0,r["border-top-color"]=!0,r["border-top-left-radius"]=!0,r["border-top-right-radius"]=!0,r["border-top-style"]=!0,r["border-top-width"]=!0,r["border-width"]=!0,r.bottom=!1,r["box-decoration-break"]=!0,r["box-shadow"]=!0,r["box-sizing"]=!0,r["box-snap"]=!0,r["box-suppress"]=!0,r["break-after"]=!0,r["break-before"]=!0,r["break-inside"]=!0,r["caption-side"]=!1,r.chains=!1,r.clear=!0,r.clip=!1,r["clip-path"]=!1,r["clip-rule"]=!1,r.color=!0,r["color-interpolation-filters"]=!0,r["column-count"]=!1,r["column-fill"]=!1,r["column-gap"]=!1,r["column-rule"]=!1,r["column-rule-color"]=!1,r["column-rule-style"]=!1,r["column-rule-width"]=!1,r["column-span"]=!1,r["column-width"]=!1,r.columns=!1,r.contain=!1,r.content=!1,r["counter-increment"]=!1,r["counter-reset"]=!1,r["counter-set"]=!1,r.crop=!1,r.cue=!1,r["cue-after"]=!1,r["cue-before"]=!1,r.cursor=!1,r.direction=!1,r.display=!0,r["display-inside"]=!0,r["display-list"]=!0,r["display-outside"]=!0,r["dominant-baseline"]=!1,r.elevation=!1,r["empty-cells"]=!1,r.filter=!1,r.flex=!1,r["flex-basis"]=!1,r["flex-direction"]=!1,r["flex-flow"]=!1,r["flex-grow"]=!1,r["flex-shrink"]=!1,r["flex-wrap"]=!1,r.float=!1,r["float-offset"]=!1,r["flood-color"]=!1,r["flood-opacity"]=!1,r["flow-from"]=!1,r["flow-into"]=!1,r.font=!0,r["font-family"]=!0,r["font-feature-settings"]=!0,r["font-kerning"]=!0,r["font-language-override"]=!0,r["font-size"]=!0,r["font-size-adjust"]=!0,r["font-stretch"]=!0,r["font-style"]=!0,r["font-synthesis"]=!0,r["font-variant"]=!0,r["font-variant-alternates"]=!0,r["font-variant-caps"]=!0,r["font-variant-east-asian"]=!0,r["font-variant-ligatures"]=!0,r["font-variant-numeric"]=!0,r["font-variant-position"]=!0,r["font-weight"]=!0,r.grid=!1,r["grid-area"]=!1,r["grid-auto-columns"]=!1,r["grid-auto-flow"]=!1,r["grid-auto-rows"]=!1,r["grid-column"]=!1,r["grid-column-end"]=!1,r["grid-column-start"]=!1,r["grid-row"]=!1,r["grid-row-end"]=!1,r["grid-row-start"]=!1,r["grid-template"]=!1,r["grid-template-areas"]=!1,r["grid-template-columns"]=!1,r["grid-template-rows"]=!1,r["hanging-punctuation"]=!1,r.height=!0,r.hyphens=!1,r.icon=!1,r["image-orientation"]=!1,r["image-resolution"]=!1,r["ime-mode"]=!1,r["initial-letters"]=!1,r["inline-box-align"]=!1,r["justify-content"]=!1,r["justify-items"]=!1,r["justify-self"]=!1,r.left=!1,r["letter-spacing"]=!0,r["lighting-color"]=!0,r["line-box-contain"]=!1,r["line-break"]=!1,r["line-grid"]=!1,r["line-height"]=!1,r["line-snap"]=!1,r["line-stacking"]=!1,r["line-stacking-ruby"]=!1,r["line-stacking-shift"]=!1,r["line-stacking-strategy"]=!1,r["list-style"]=!0,r["list-style-image"]=!0,r["list-style-position"]=!0,r["list-style-type"]=!0,r.margin=!0,r["margin-bottom"]=!0,r["margin-left"]=!0,r["margin-right"]=!0,r["margin-top"]=!0,r["marker-offset"]=!1,r["marker-side"]=!1,r.marks=!1,r.mask=!1,r["mask-box"]=!1,r["mask-box-outset"]=!1,r["mask-box-repeat"]=!1,r["mask-box-slice"]=!1,r["mask-box-source"]=!1,r["mask-box-width"]=!1,r["mask-clip"]=!1,r["mask-image"]=!1,r["mask-origin"]=!1,r["mask-position"]=!1,r["mask-repeat"]=!1,r["mask-size"]=!1,r["mask-source-type"]=!1,r["mask-type"]=!1,r["max-height"]=!0,r["max-lines"]=!1,r["max-width"]=!0,r["min-height"]=!0,r["min-width"]=!0,r["move-to"]=!1,r["nav-down"]=!1,r["nav-index"]=!1,r["nav-left"]=!1,r["nav-right"]=!1,r["nav-up"]=!1,r["object-fit"]=!1,r["object-position"]=!1,r.opacity=!1,r.order=!1,r.orphans=!1,r.outline=!1,r["outline-color"]=!1,r["outline-offset"]=!1,r["outline-style"]=!1,r["outline-width"]=!1,r.overflow=!1,r["overflow-wrap"]=!1,r["overflow-x"]=!1,r["overflow-y"]=!1,r.padding=!0,r["padding-bottom"]=!0,r["padding-left"]=!0,r["padding-right"]=!0,r["padding-top"]=!0,r.page=!1,r["page-break-after"]=!1,r["page-break-before"]=!1,r["page-break-inside"]=!1,r["page-policy"]=!1,r.pause=!1,r["pause-after"]=!1,r["pause-before"]=!1,r.perspective=!1,r["perspective-origin"]=!1,r.pitch=!1,r["pitch-range"]=!1,r["play-during"]=!1,r.position=!1,r["presentation-level"]=!1,r.quotes=!1,r["region-fragment"]=!1,r.resize=!1,r.rest=!1,r["rest-after"]=!1,r["rest-before"]=!1,r.richness=!1,r.right=!1,r.rotation=!1,r["rotation-point"]=!1,r["ruby-align"]=!1,r["ruby-merge"]=!1,r["ruby-position"]=!1,r["shape-image-threshold"]=!1,r["shape-outside"]=!1,r["shape-margin"]=!1,r.size=!1,r.speak=!1,r["speak-as"]=!1,r["speak-header"]=!1,r["speak-numeral"]=!1,r["speak-punctuation"]=!1,r["speech-rate"]=!1,r.stress=!1,r["string-set"]=!1,r["tab-size"]=!1,r["table-layout"]=!1,r["text-align"]=!0,r["text-align-last"]=!0,r["text-combine-upright"]=!0,r["text-decoration"]=!0,r["text-decoration-color"]=!0,r["text-decoration-line"]=!0,r["text-decoration-skip"]=!0,r["text-decoration-style"]=!0,r["text-emphasis"]=!0,r["text-emphasis-color"]=!0,r["text-emphasis-position"]=!0,r["text-emphasis-style"]=!0,r["text-height"]=!0,r["text-indent"]=!0,r["text-justify"]=!0,r["text-orientation"]=!0,r["text-overflow"]=!0,r["text-shadow"]=!0,r["text-space-collapse"]=!0,r["text-transform"]=!0,r["text-underline-position"]=!0,r["text-wrap"]=!0,r.top=!1,r.transform=!1,r["transform-origin"]=!1,r["transform-style"]=!1,r.transition=!1,r["transition-delay"]=!1,r["transition-duration"]=!1,r["transition-property"]=!1,r["transition-timing-function"]=!1,r["unicode-bidi"]=!1,r["vertical-align"]=!1,r.visibility=!1,r["voice-balance"]=!1,r["voice-duration"]=!1,r["voice-family"]=!1,r["voice-pitch"]=!1,r["voice-range"]=!1,r["voice-rate"]=!1,r["voice-stress"]=!1,r["voice-volume"]=!1,r.volume=!1,r["white-space"]=!1,r.widows=!1,r.width=!0,r["will-change"]=!1,r["word-break"]=!0,r["word-spacing"]=!0,r["word-wrap"]=!0,r["wrap-flow"]=!1,r["wrap-through"]=!1,r["writing-mode"]=!1,r["z-index"]=!1,r}function t(r,a,s){}function n(r,a,s){}var u=/javascript\s*\:/img;function i(r,a){return u.test(a)?"":a}return en.whiteList=e(),en.getDefaultWhiteList=e,en.onAttr=t,en.onIgnoreAttr=n,en.safeAttrValue=i,en}var Ss,Fs;function Ds(){return Fs||(Fs=1,Ss={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,i;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,i=e.length;u<i;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}),Ss}var Bi,Ts;function o2(){if(Ts)return Bi;Ts=1;var e=Ds();function t(n,u){n=e.trimRight(n),n[n.length-1]!==";"&&(n+=";");var i=n.length,r=!1,a=0,s=0,l="";function d(){if(!r){var m=e.trim(n.slice(a,s)),g=m.indexOf(":");if(g!==-1){var p=e.trim(m.slice(0,g)),v=e.trim(m.slice(g+1));if(p){var x=u(a,l.length,p,v,m);x&&(l+=x+"; ")}}}a=s+1}for(;s<i;s++){var f=n[s];if(f==="/"&&n[s+1]==="*"){var c=n.indexOf("*/",s+2);if(c===-1)break;s=c+1,a=s+1,r=!1}else f==="("?r=!0:f===")"?r=!1:f===";"?r||d():f===`
100
- `&&d()}return e.trim(l)}return Bi=t,Bi}var zi,Ns;function a2(){if(Ns)return zi;Ns=1;var e=_s(),t=o2();Ds();function n(r){return r==null}function u(r){var a={};for(var s in r)a[s]=r[s];return a}function i(r){r=u(r||{}),r.whiteList=r.whiteList||e.whiteList,r.onAttr=r.onAttr||e.onAttr,r.onIgnoreAttr=r.onIgnoreAttr||e.onIgnoreAttr,r.safeAttrValue=r.safeAttrValue||e.safeAttrValue,this.options=r}return i.prototype.process=function(r){if(r=r||"",r=r.toString(),!r)return"";var a=this,s=a.options,l=s.whiteList,d=s.onAttr,f=s.onIgnoreAttr,c=s.safeAttrValue,m=t(r,function(g,p,v,x,k){var y=l[v],h=!1;if(y===!0?h=y:typeof y=="function"?h=y(x):y instanceof RegExp&&(h=y.test(x)),h!==!0&&(h=!1),x=c(v,x),!!x){var b={position:p,sourcePosition:g,source:k,isWhite:h};if(h){var w=d(v,x,b);return n(w)?v+":"+x:w}else{var w=f(v,x,b);if(!n(w))return w}}});return m},zi=i,zi}var Ls;function ji(){return Ls||(Ls=1,function(e,t){var n=_s(),u=a2();function i(a,s){var l=new u(s);return l.process(a)}t=e.exports=i,t.FilterCSS=u;for(var r in n)t[r]=n[r];typeof window<"u"&&(window.filterCSS=e.exports)}(Mi,Mi.exports)),Mi.exports}var Is,Os;function Hi(){return Os||(Os=1,Is={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,i;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,i=e.length;u<i;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}}),Is}var Ps;function Rs(){if(Ps)return pe;Ps=1;var e=ji().FilterCSS,t=ji().getDefaultWhiteList,n=Hi();function u(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var i=new e;function r(F,R,O){}function a(F,R,O){}function s(F,R,O){}function l(F,R,O){}function d(F){return F.replace(c,"&lt;").replace(m,"&gt;")}function f(F,R,O,U){if(O=M(O),R==="href"||R==="src"){if(O=n.trim(O),O==="#")return"#";if(!(O.substr(0,7)==="http://"||O.substr(0,8)==="https://"||O.substr(0,7)==="mailto:"||O.substr(0,4)==="tel:"||O.substr(0,11)==="data:image/"||O.substr(0,6)==="ftp://"||O.substr(0,2)==="./"||O.substr(0,3)==="../"||O[0]==="#"||O[0]==="/"))return""}else if(R==="background"){if(y.lastIndex=0,y.test(O))return""}else if(R==="style"){if(h.lastIndex=0,h.test(O)||(b.lastIndex=0,b.test(O)&&(y.lastIndex=0,y.test(O))))return"";U!==!1&&(U=U||i,O=U.process(O))}return O=I(O),O}var c=/</g,m=/>/g,g=/"/g,p=/&quot;/g,v=/&#([a-zA-Z0-9]*);?/gim,x=/&colon;?/gim,k=/&newline;?/gim,y=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,h=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function w(F){return F.replace(g,"&quot;")}function C(F){return F.replace(p,'"')}function E(F){return F.replace(v,function(R,O){return O[0]==="x"||O[0]==="X"?String.fromCharCode(parseInt(O.substr(1),16)):String.fromCharCode(parseInt(O,10))})}function _(F){return F.replace(x,":").replace(k," ")}function z(F){for(var R="",O=0,U=F.length;O<U;O++)R+=F.charCodeAt(O)<32?" ":F.charAt(O);return n.trim(R)}function M(F){return F=C(F),F=E(F),F=_(F),F=z(F),F}function I(F){return F=w(F),F=d(F),F}function B(){return""}function D(F,R){typeof R!="function"&&(R=function(){});var O=!Array.isArray(F);function U(P){return O?!0:n.indexOf(F,P)!==-1}var re=[],te=!1;return{onIgnoreTag:function(P,V,T){if(U(P))if(T.isClosing){var L="[/removed]",W=T.position+L.length;return re.push([te!==!1?te:T.position,W]),te=!1,L}else return te||(te=T.position),"[removed]";else return R(P,V,T)},remove:function(P){var V="",T=0;return n.forEach(re,function(L){V+=P.slice(T,L[0]),T=L[1]}),V+=P.slice(T),V}}}function H(F){for(var R="",O=0;O<F.length;){var U=F.indexOf("<!--",O);if(U===-1){R+=F.slice(O);break}R+=F.slice(O,U);var re=F.indexOf("-->",U);if(re===-1)break;O=re+3}return R}function $(F){var R=F.split("");return R=R.filter(function(O){var U=O.charCodeAt(0);return U===127?!1:U<=31?U===10||U===13:!0}),R.join("")}return pe.whiteList=u(),pe.getDefaultWhiteList=u,pe.onTag=r,pe.onIgnoreTag=a,pe.onTagAttr=s,pe.onIgnoreTagAttr=l,pe.safeAttrValue=f,pe.escapeHtml=d,pe.escapeQuote=w,pe.unescapeQuote=C,pe.escapeHtmlEntities=E,pe.escapeDangerHtml5Entities=_,pe.clearNonPrintableCharacter=z,pe.friendlyAttrValue=M,pe.escapeAttrValue=I,pe.onIgnoreTagStripAll=B,pe.StripTagBody=D,pe.stripCommentTag=H,pe.stripBlankChar=$,pe.attributeWrapSign='"',pe.cssFilter=i,pe.getDefaultCSSWhiteList=t,pe}var mu={},Vs;function Ms(){if(Vs)return mu;Vs=1;var e=Hi();function t(c){var m=e.spaceIndex(c),g;return m===-1?g=c.slice(1,-1):g=c.slice(1,m+1),g=e.trim(g).toLowerCase(),g.slice(0,1)==="/"&&(g=g.slice(1)),g.slice(-1)==="/"&&(g=g.slice(0,-1)),g}function n(c){return c.slice(0,2)==="</"}function u(c,m,g){var p="",v=0,x=!1,k=!1,y=0,h=c.length,b="",w="";e:for(y=0;y<h;y++){var C=c.charAt(y);if(x===!1){if(C==="<"){x=y;continue}}else if(k===!1){if(C==="<"){p+=g(c.slice(v,y)),x=y,v=y;continue}if(C===">"||y===h-1){p+=g(c.slice(v,x)),w=c.slice(x,y+1),b=t(w),p+=m(x,p.length,b,w,n(w)),v=y+1,x=!1;continue}if(C==='"'||C==="'")for(var E=1,_=c.charAt(y-E);_.trim()===""||_==="=";){if(_==="="){k=C;continue e}_=c.charAt(y-++E)}}else if(C===k){k=!1;continue}}return v<h&&(p+=g(c.substr(v))),p}var i=/[^a-zA-Z0-9\\_:.-]/gim;function r(c,m){var g=0,p=0,v=[],x=!1,k=c.length;function y(E,_){if(E=e.trim(E),E=E.replace(i,"").toLowerCase(),!(E.length<1)){var z=m(E,_||"");z&&v.push(z)}}for(var h=0;h<k;h++){var b=c.charAt(h),w,C;if(x===!1&&b==="="){x=c.slice(g,h),g=h+1,p=c.charAt(g)==='"'||c.charAt(g)==="'"?g:s(c,h+1);continue}if(x!==!1&&h===p){if(C=c.indexOf(b,h+1),C===-1)break;w=e.trim(c.slice(p+1,C)),y(x,w),x=!1,h=C,g=h+1;continue}if(/\s|\n|\t/.test(b))if(c=c.replace(/\s|\n|\t/g," "),x===!1)if(C=a(c,h),C===-1){w=e.trim(c.slice(g,h)),y(w),x=!1,g=h+1;continue}else{h=C-1;continue}else if(C=l(c,h-1),C===-1){w=e.trim(c.slice(g,h)),w=f(w),y(x,w),x=!1,g=h+1;continue}else continue}return g<c.length&&(x===!1?y(c.slice(g)):y(x,f(e.trim(c.slice(g))))),e.trim(v.join(" "))}function a(c,m){for(;m<c.length;m++){var g=c[m];if(g!==" ")return g==="="?m:-1}}function s(c,m){for(;m<c.length;m++){var g=c[m];if(g!==" ")return g==="'"||g==='"'?m:-1}}function l(c,m){for(;m>0;m--){var g=c[m];if(g!==" ")return g==="="?m:-1}}function d(c){return c[0]==='"'&&c[c.length-1]==='"'||c[0]==="'"&&c[c.length-1]==="'"}function f(c){return d(c)?c.substr(1,c.length-2):c}return mu.parseTag=u,mu.parseAttr=r,mu}var $i,Bs;function s2(){if(Bs)return $i;Bs=1;var e=ji().FilterCSS,t=Rs(),n=Ms(),u=n.parseTag,i=n.parseAttr,r=Hi();function a(c){return c==null}function s(c){var m=r.spaceIndex(c);if(m===-1)return{html:"",closing:c[c.length-2]==="/"};c=r.trim(c.slice(m+1,-1));var g=c[c.length-1]==="/";return g&&(c=r.trim(c.slice(0,-1))),{html:c,closing:g}}function l(c){var m={};for(var g in c)m[g]=c[g];return m}function d(c){var m={};for(var g in c)Array.isArray(c[g])?m[g.toLowerCase()]=c[g].map(function(p){return p.toLowerCase()}):m[g.toLowerCase()]=c[g];return m}function f(c){c=l(c||{}),c.stripIgnoreTag&&(c.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),c.onIgnoreTag=t.onIgnoreTagStripAll),c.whiteList||c.allowList?c.whiteList=d(c.whiteList||c.allowList):c.whiteList=t.whiteList,this.attributeWrapSign=c.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,c.onTag=c.onTag||t.onTag,c.onTagAttr=c.onTagAttr||t.onTagAttr,c.onIgnoreTag=c.onIgnoreTag||t.onIgnoreTag,c.onIgnoreTagAttr=c.onIgnoreTagAttr||t.onIgnoreTagAttr,c.safeAttrValue=c.safeAttrValue||t.safeAttrValue,c.escapeHtml=c.escapeHtml||t.escapeHtml,this.options=c,c.css===!1?this.cssFilter=!1:(c.css=c.css||{},this.cssFilter=new e(c.css))}return f.prototype.process=function(c){if(c=c||"",c=c.toString(),!c)return"";var m=this,g=m.options,p=g.whiteList,v=g.onTag,x=g.onIgnoreTag,k=g.onTagAttr,y=g.onIgnoreTagAttr,h=g.safeAttrValue,b=g.escapeHtml,w=m.attributeWrapSign,C=m.cssFilter;g.stripBlankChar&&(c=t.stripBlankChar(c)),g.allowCommentTag||(c=t.stripCommentTag(c));var E=!1;g.stripIgnoreTagBody&&(E=t.StripTagBody(g.stripIgnoreTagBody,x),x=E.onIgnoreTag);var _=u(c,function(z,M,I,B,D){var H={sourcePosition:z,position:M,isClosing:D,isWhite:Object.prototype.hasOwnProperty.call(p,I)},$=v(I,B,H);if(!a($))return $;if(H.isWhite){if(H.isClosing)return"</"+I+">";var F=s(B),R=p[I],O=i(F.html,function(U,re){var te=r.indexOf(R,U)!==-1,P=k(I,U,re,te);return a(P)?te?(re=h(I,U,re,C),re?U+"="+w+re+w:U):(P=y(I,U,re,te),a(P)?void 0:P):P});return B="<"+I,O&&(B+=" "+O),F.closing&&(B+=" /"),B+=">",B}else return $=x(I,B,H),a($)?b(B):$},b);return E&&(_=E.remove(_)),_},$i=f,$i}var zs;function l2(){return zs||(zs=1,function(e,t){var n=Rs(),u=Ms(),i=s2();function r(s,l){var d=new i(l);return d.process(s)}t=e.exports=r,t.filterXSS=r,t.FilterXSS=i,function(){for(var s in n)t[s]=n[s];for(var l in u)t[l]=u[l]}(),typeof window<"u"&&(window.filterXSS=e.exports);function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)}(Vi,Vi.exports)),Vi.exports}l2();const tn=o.defineComponent({name:"FMarkdownPreview",props:us,setup(e){return()=>o.createVNode("div",{class:"f-markdown-preview-container"},[o.createVNode(hu,{modelValue:e.content},null)])}});tn.install=e=>{e.component(tn.name,tn)};const Ui="farris-x-preview-bridge",Wi=1,Gi="assistant.message";function js(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function Hs(e){return e!==null&&typeof e=="object"}function $s(e){if(!Hs(e)||e.source!==Ui||e.v!==Wi||e.type!==Gi)return!1;const t=e.payload;return!(!Hs(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function c2(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function Us(e,t,n){const u=js(n);try{return e.postMessage({source:Ui,v:Wi,type:Gi,payload:u},t),!0}catch{return!1}}function Ws(e){const t=e.allowTopAsSource!==!1,n=u=>{var i;c2(u,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(u.origin)||$s(u.data)&&((i=e.onAssistantMessage)==null||i.call(e,u.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const d2="/platform/common/web/renderer/index.html#/preview",f2="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",h2="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",m2="67441dbb-0219-46f2-b247-51555c317995";function Gs(e){if(e.url)return e.url;const t=e.baseUri??d2,n=e.metadataPath??f2,u=e.projectPath??h2,i=e.baseMetadataId??m2;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(u)}&baseMetadataId=${encodeURIComponent(i)}`}function p2(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=Gs(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const or=o.defineComponent({name:"ChatPreview",props:rs,setup(e,{expose:t}){const n=o.ref(null),u=o.ref(null),i=o.ref(!1),r=o.ref(!1),a=o.computed(()=>Gs(e.previewConfig??{})),s=o.computed(()=>{var F;return((F=e.previewConfig)==null?void 0:F.contentType)==="markdown"}),l=o.computed(()=>{var F;return Object.keys(((F=e.previewConfig)==null?void 0:F.contentMap)??{})}),d=o.computed(()=>l.value.filter(F=>F).length>0),f=o.ref(),c=o.ref(),m=o.ref(!1);let g=null;o.onBeforeUnmount(()=>{g==null||g(),g=null,B()}),o.watch(()=>[a.value,n.value,s.value],()=>{if(g==null||g(),g=null,s.value)return;const F=n.value;if(!F)return;m.value=!1,i.value=!1,r.value=!1;const R=Date.now(),O=200,U=300,re=1e4;let te=!1,P=null,V=null;V=window.setTimeout(()=>{V=null,te||(r.value=!0)},O);const T=()=>{if(te)return;if(te=!0,P&&(window.clearTimeout(P),P=null),V&&(window.clearTimeout(V),V=null),m.value=!0,D(F),r.value){const K=Date.now()-R,Z=Math.max(0,U-K);setTimeout(()=>{i.value=!0},Z)}else i.value=!0;const W=()=>{var K;return(K=e.onIframeLoad)==null?void 0:K.call(e)};W(),window.setTimeout(W,0),window.setTimeout(W,120)},L=()=>{var W;te||(te=!0,V&&(window.clearTimeout(V),V=null),console.warn("ChatPreview: iframe load timeout"),m.value=!0,i.value=!0,(W=e.onIframeLoad)==null||W.call(e))};F.addEventListener("load",T,{once:!0}),P=window.setTimeout(L,re),g=()=>{F.removeEventListener("load",T),P&&(window.clearTimeout(P),P=null),V&&(window.clearTimeout(V),V=null)}},{flush:"post"}),o.watch([s,()=>{var F;return(F=e.previewConfig)==null?void 0:F.contentMap}],()=>{B(),s.value&&o.nextTick(()=>I())},{flush:"post"}),o.watch(()=>{var F;return(F=e.previewConfig)==null?void 0:F.contentMap},F=>{if(F){const R=Object.keys(F);f.value=R[0]??""}else f.value="";p()},{immediate:!0});function p(F){var R,O;F&&(f.value=F),d.value&&f.value?c.value=((O=(R=e.previewConfig)==null?void 0:R.contentMap)==null?void 0:O[f.value])||"":c.value=""}function v(F){var U;if(s.value||!m.value)return!1;const R=(U=n.value)==null?void 0:U.contentWindow;if(!R)return!1;const O=p2(e.previewConfig??{});return O?Us(R,O,F):!1}t({postAssistantPayload:v});const x=o.ref(!1);let k=null;const y=800;function h(){x.value=!0,M(!0),k!=null&&(window.clearTimeout(k),k=null)}function b(){k!=null&&window.clearTimeout(k),k=window.setTimeout(()=>{x.value=!1,M(!1),k=null},y)}function w(){h(),b()}function C(){h()}function E(){b()}let _=[];function z(){const F=u.value;if(!F)return[];const R=[],O=F.querySelectorAll(".f-markdown-preview-container");return O.length>0&&O.forEach(U=>R.push(U)),R.length===0&&F.scrollHeight>F.clientHeight&&R.push(F),R}function M(F){const R=u.value;R&&R.querySelectorAll(".f-markdown-preview-container").forEach(O=>{O.classList.toggle("f-chat-preview-scrollbar-visible",F)})}function I(){const F=z();_=F,F.forEach(R=>{R.addEventListener("scroll",w,{passive:!0}),R.addEventListener("mouseenter",C),R.addEventListener("mouseleave",E)})}function B(){_.forEach(F=>{F.removeEventListener("scroll",w),F.removeEventListener("mouseenter",C),F.removeEventListener("mouseleave",E)}),_=[]}function D(F){try{const R=F.contentDocument;if(!R)return;const O="f-chat-preview-injected-scrollbar-style";if(R.getElementById(O))return;const U=R.createElement("style");U.id=O,U.textContent=`
92
+ </${P}>
93
+ ${_}
94
+ </${C}>
95
+ `};e.renderer.rules.fence=f,e.renderer.rules.code_block=f},I1=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(u,o,r,a,s)=>{var f,l;const c=u[o],d=c.content.trim();if(c.info==="echarts"){if(c.attrSet("class",`${q}-echarts`),c.attrSet("data-echarts-theme",t.themeRef.value),c.map&&c.level===0){const h=c.map[1]-1,m=!!((l=(f=a.srcLines[h])==null?void 0:f.trim())!=null&&l.startsWith("```"));c.attrSet("data-closed",`${m}`),c.attrSet("data-line",String(c.map[0]))}return`<div ${s.renderAttrs(c)} style="width: 100%; aspect-ratio: 4 / 3;">${e.utils.escapeHtml(d)}</div>`}return n(u,o,r,a,s)}},O1=(e,t)=>{e.renderer.rules.heading_open=(n,u)=>{var s;const o=n[u],r=((s=n[u+1].children)==null?void 0:s.reduce((c,d)=>c+(["text","code_inline","math_inline"].includes(d.type)&&d.content||""),""))||"",a=o.markup.length;return t.headsRef.value.push({text:r,level:a,line:o.map[0],currentToken:o,nextToken:n[u+1]}),o.map&&o.level===0&&o.attrSet("id",t.mdHeadingId({text:r,level:a,index:t.headsRef.value.length,currentToken:o,nextToken:n[u+1]})),e.renderer.renderToken(n,u,t)},e.renderer.rules.heading_close=(n,u,o,r,a)=>a.renderToken(n,u,o)},ys={block:[{open:"$$",close:"$$"},{open:"\\[",close:"\\]"}],inline:[{open:"$$",close:"$$"},{open:"$",close:"$"},{open:"\\[",close:"\\]"},{open:"\\(",close:"\\)"}]},P1=e=>(t,n)=>{const u=e.delimiters;for(const o of u){if(!t.src.startsWith(o.open,t.pos))continue;const r=t.pos+o.open.length;let a=r;for(;(a=t.src.indexOf(o.close,a))!==-1;){let s=0,c=a-1;for(;c>=0&&t.src[c]==="\\";)s++,c--;if(s%2===0)break;a+=o.close.length}if(a!==-1){if(a-r===0)return n||(t.pending+=o.open+o.close),t.pos=a+o.close.length,!0;if(!n){const s=t.push("math_inline","math",0);s.markup=o.open,s.content=t.src.slice(r,a)}return t.pos=a+o.close.length,!0}}return!1},R1=e=>(t,n,u,o)=>{const r=e.delimiters,a=t.bMarks[n]+t.tShift[n],s=t.eMarks[n],c=(d,f,l)=>{t.line=f;const h=t.push("math_block","math",0);return h.block=!0,h.content=d,h.map=[n,t.line],h.markup=l,!0};for(const d of r){const f=a;if(t.src.slice(f,f+d.open.length)!==d.open)continue;const l=f+d.open.length,h=t.src.slice(l,s).trim(),m=h==="",p=h===d.close,w=h.endsWith(d.close);if(!m&&!p&&!w)continue;if(o)return!0;if(p)return c("",n+1,d.open);if(!m&&w){const y=h.slice(0,-d.close.length);return c(y,n+1,d.open)}let x=n+1,A=!1,b="";for(;x<u;x++){const y=t.bMarks[x]+t.tShift[x],k=t.eMarks[x];if(y<k&&t.tShift[x]<t.blkIndent)break;if(t.src.slice(y,k).trim().endsWith(d.close)){const T=t.src.slice(0,k).lastIndexOf(d.close);b=t.src.slice(y,T),A=!0;break}}if(!A)continue;const g=t.getLines(n+1,x,t.tShift[n],!0)+(b.trim()?b:"");return c(g,x+1,d.open)}return!1},V1=(e,{katexRef:t,inlineDelimiters:n,blockDelimiters:u})=>{const o=(s,c,d,f,l=!1)=>{const h={attrs:Ro(s,[["class",c]])},m=f.renderAttrs(h);if(!t.value)return`<${d} ${m}>${s.content}</${d}>`;const p=t.value.renderToString(s.content,ct.katexConfig({throwOnError:!1,displayMode:l}));return`<${d} ${m} data-processed>${p}</${d}>`},r=(s,c,d,f,l)=>o(s[c],`${q}-katex-inline`,"span",l),a=(s,c,d,f,l)=>o(s[c],`${q}-katex-block`,"p",l,!0);e.inline.ruler.before("escape","math_inline",P1({delimiters:n||ys.inline})),e.block.ruler.after("blockquote","math_block",R1({delimiters:u||ys.block}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=r,e.renderer.rules.math_block=a},M1=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(u,o,r,a,s)=>{var f,l;const c=u[o],d=c.content.trim();if(c.info==="mermaid"){if(c.attrSet("class",`${q}-mermaid`),c.attrSet("data-mermaid-theme",t.themeRef.value),c.map&&c.level===0){const m=c.map[1]-1,p=!!((l=(f=a.srcLines[m])==null?void 0:f.trim())!=null&&l.startsWith("```"));c.attrSet("data-closed",`${p}`),c.attrSet("data-line",String(c.map[0]))}const h=fu.get(d);return h?(c.attrSet("data-processed",""),c.attrSet("data-content",d),`<p ${s.renderAttrs(c)}>${h}</p>`):`<div ${s.renderAttrs(c)}>${e.utils.escapeHtml(d)}</div>`}return n(u,o,r,a,s)}},xs=(e,t,n)=>{const u=e.attrIndex(t),o=[t,n];u<0?e.attrPush(o):(e.attrs=e.attrs||[],e.attrs[u]=o)},B1=e=>e.type==="inline",z1=e=>e.type==="paragraph_open",j1=e=>e.type==="list_item_open",H1=e=>e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0,$1=(e,t)=>B1(e[t])&&z1(e[t-1])&&j1(e[t-2])&&H1(e[t]),U1=(e,t)=>{const n=e[t].level-1;for(let u=t-1;u>=0;u--)if(e[u].level===n)return u;return-1},W1=e=>{const t=new e("html_inline","",0);return t.content="<label>",t},G1=e=>{const t=new e("html_inline","",0);return t.content="</label>",t},q1=(e,t,n)=>{const u=new n("html_inline","",0);return u.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",u.attrs=[["for",t]],u},X1=(e,t,n)=>{const u=new t("html_inline","",0),o=n.enabled?" ":' disabled="" ';return e.content.indexOf("[ ] ")===0?u.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(u.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">'),u},Z1=(e,t,n)=>{if(e.children=e.children||[],e.children.unshift(X1(e,t,n)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n.label)if(n.labelAfter){e.children.pop();const u="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+u+'">',e.children.push(q1(e.content,u,t))}else e.children.unshift(W1(t)),e.children.push(G1(t))},Y1=(e,t={})=>{e.core.ruler.after("inline","github-task-lists",n=>{const u=n.tokens;for(let o=2;o<u.length;o++)$1(u,o)&&(Z1(u[o],n.Token,t),xs(u[o-2],"class","task-list-item"+(t.enabled?" enabled":" ")),xs(u[U1(u,o-2)],"class","contains-task-list"))})},K1=e=>{e.core.ruler.push("init-line-number",t=>(t.tokens.forEach(n=>{n.map&&(n.attrs||(n.attrs=[]),n.attrs.push(["data-line",n.map[0].toString()]))}),!0))},Q1=(e,t)=>{const{editorConfig:n,markdownItPlugins:u}=ct,o=i.inject("editorId"),r=i.inject("language"),a=i.inject("usedLanguageText"),s=i.inject("showCodeRowNumber"),c=i.inject("theme"),d=i.inject("customIcon"),f=i.inject("rootRef"),l=i.inject("setting"),h=i.ref([]),m=F1(e),p=D1(e),{reRenderRef:w,replaceMermaid:x}=T1(e),{reRenderEcharts:A,replaceEcharts:b}=S1(e),g=Ze({html:!0,breaks:!0,linkify:!0}),y=[{type:"image",plugin:a1,options:{figcaption:!0,classes:"md-zoom"}},{type:"admonition",plugin:N1,options:{}},{type:"taskList",plugin:Y1,options:{}},{type:"heading",plugin:O1,options:{mdHeadingId:e.mdHeadingId,headsRef:h}},{type:"code",plugin:L1,options:{editorId:o,usedLanguageTextRef:a,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,customIconRef:d}},{type:"sub",plugin:l1,options:{}},{type:"sup",plugin:h1,options:{}}];e.noKatex||y.push({type:"katex",plugin:V1,options:{katexRef:p}}),e.noMermaid||y.push({type:"mermaid",plugin:M1,options:{themeRef:c}}),e.noEcharts||y.push({type:"echarts",plugin:I1,options:{themeRef:c}}),u(y,{editorId:o}).forEach(R=>{g.use(R.plugin,R.options)});const k=g.options.highlight;g.set({highlight:(R,E,M)=>{if(k){const re=k(R,E,M);if(re)return re}let V;!e.noHighlight&&m.value?m.value.getLanguage(E)?V=m.value.highlight(R,{language:E,ignoreIllegals:!0}).value:V=m.value.highlightAuto(R).value:V=g.utils.escapeHtml(R);const $=s?e1(V.replace(/^\n+|\n+$/g,""),R.replace(/^\n+|\n+$/g,"")):`<span class="${q}-code-block">${V.replace(/^\n+|\n+$/g,"")}</span>`;return`<pre><code class="language-${E}" language=${E}>${$}</code></pre>`}}),K1(g);const T=i.ref(`_article-key_${Do()}`),D=i.ref(e.sanitize(g.render(e.modelValue,{srcLines:e.modelValue.split(`
96
+ `)})));let F=()=>{},U=()=>{};const _=()=>{var E;const R=(E=f.value)==null?void 0:E.querySelectorAll(`#${o} p.${q}-mermaid:not([data-closed=false])`);U(),U=u1(R,{customIcon:d.value}),F(),F=o1(R,{customIcon:d.value})},N=()=>{ot.emit(o,Yh,D.value),e.onHtmlChanged(D.value),e.onGetCatalog(h.value),ot.emit(o,Oo,h.value),i.nextTick(()=>{x().then(_),b()})},L=()=>{h.value=[],D.value=e.sanitize(g.render(e.modelValue,{srcLines:e.modelValue.split(`
97
+ `)}))},C=i.computed(()=>(e.noKatex||!!p.value)&&(e.noHighlight||!!m.value));let P=-1;return i.watch([i.toRef(e,"modelValue"),C,w,r],()=>{P=window.setTimeout(()=>{L()},t?0:n.renderDelay)}),i.watch(()=>l.value.preview,()=>{l.value.preview&&i.nextTick(()=>{x().then(_),b(),ot.emit(o,Oo,h.value)})}),i.watch([D,A],()=>{N()}),i.onMounted(N),i.onMounted(()=>{ot.on(o,{name:Kh,callback(){ot.emit(o,Oo,h.value)}}),ot.on(o,{name:as,callback:()=>{T.value=`_article-key_${Do()}`,L()}})}),i.onBeforeUnmount(()=>{F(),U(),clearTimeout(P)}),{html:D,key:T}},J1=(e,t)=>{const n=i.inject("editorId"),u=i.inject("setting"),{noImgZoomIn:o}=e,r=zh(()=>{const a=document.querySelectorAll(`#${n}-preview img:not(.not-zoom):not(.medium-zoom-image)`);a.length!==0&&v1(a,{background:"#00000073"})});i.onMounted(async()=>{!o&&u.value.preview&&await r()}),i.watch([t,()=>u.value.preview],async()=>{!o&&u.value.preview&&await r()})},ws={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},e2=(e,t)=>{const n=i.inject("editorId"),u=i.inject("rootRef");let o=()=>{};const r=()=>{if(!u.value)return!1;const a=u.value.querySelectorAll(".task-list-item.enabled"),s=c=>{var p;c.preventDefault();const d=c.target.checked?"unChecked":"checked",f=(p=c.target.parentElement)==null?void 0:p.dataset.line;if(!f)return;const l=Number(f),h=e.modelValue.split(`
98
+ `),m=h[Number(l)].replace(ws[d].regexp,ws[d].value);e.previewOnly?(h[Number(l)]=m,e.onChange(h.join(`
99
+ `))):ot.emit(n,Qh,l+1,m)};a.forEach(c=>{c.addEventListener("click",s)}),o=()=>{a.forEach(c=>{c.removeEventListener("click",s)})}};i.onBeforeUnmount(()=>{o()}),i.watch([t],()=>{o(),i.nextTick(r)},{immediate:!0})},t2=(e,t,n)=>{const u=i.inject("setting"),o=()=>{i.nextTick(()=>{var a;(a=e.onRemount)==null||a.call(e)})},r=a=>{a&&o()};i.watch([t,n],o),i.watch(()=>u.value.preview,r),i.watch(()=>u.value.htmlPreview,r),i.onMounted(o)},vs={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}};({...vs});const As=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},n2=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,r2=i.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=i.ref(),n=e.html,u=(o,r)=>{if(!t.value)return;const a=t.value,s=Array.from(a.childNodes),c=Math.min(o.length,r.length);let d=-1;for(let l=0;l<c;l++)if(!n2(o[l],r[l])){d=l;break}if(d===-1)if(r.length>o.length)d=o.length;else if(o.length>r.length)d=r.length;else return;const f=Math.min(d,s.length);for(let l=s.length-1;l>=f;l--)s[l].remove();for(let l=d;l<o.length;l++)a.appendChild(o[l].cloneNode(!0))};return i.watch(()=>e.html,(o,r)=>{const a=As(o),s=As(r||"");u(a,s)}),()=>i.createVNode("div",{id:e.id,class:e.class,innerHTML:n,ref:t},null)}}),u2=i.defineComponent({name:"ContentPreview",props:vs,setup(e){const t=i.inject("editorId"),n=i.inject("setting"),u=i.inject("previewTheme"),o=i.inject("showCodeRowNumber"),{html:r,key:a}=Q1(e,e.previewOnly);E1(e,r,a),J1(e,r),e2(e,r),t2(e,r,a);const s=i.computed(()=>[`${q}-preview`,`${u==null?void 0:u.value}-theme`,o&&`${q}-scrn`].filter(Boolean)),c=()=>{const d=`${t}-preview`;return e.previewComponent?i.h(e.previewComponent,{key:a.value,html:r.value,id:d,class:s.value}):i.createVNode(r2,{key:a.value,html:r.value,id:d,class:s.value},null)};return()=>i.createVNode(i.Fragment,null,[n.value.preview&&(e.previewOnly?c():i.createVNode("div",{id:`${t}-preview-wrapper`,class:`${q}-preview-wrapper`,key:"content-preview-wrapper"},[c()])),n.value.htmlPreview&&i.createVNode("div",{id:`${t}-html-wrapper`,class:`${q}-preview-wrapper`,key:"html-preview-wrapper"},[i.createVNode("div",{class:`${q}-html`},[r.value])])])}}),o2=({text:e})=>e,ks={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:o2},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}};({...ks});const Cs=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...Cs];const i2=(e,t,n)=>{const{editorId:u}=n,o={rerender(){ot.emit(u,as)}};t.expose(o)},hu=i.defineComponent({name:"MdPreview",props:ks,emits:Cs,setup(e,t){const{noKatex:n,noMermaid:u,noHighlight:o}=e,r=i.ref(),a=_1(e);C1(e,{rootRef:r,editorId:a}),i2(e,t,{editorId:a}),i.onBeforeUnmount(()=>{ot.clear(a)});const s=l=>{var h;(h=e.onChange)==null||h.call(e,l),t.emit("onChange",l),t.emit("update:modelValue",l)},c=l=>{var h;(h=e.onHtmlChanged)==null||h.call(e,l),t.emit("onHtmlChanged",l)},d=l=>{var h;(h=e.onGetCatalog)==null||h.call(e,l),t.emit("onGetCatalog",l)},f=()=>{var l;(l=e.onRemount)==null||l.call(e),t.emit("onRemount")};return()=>i.createVNode("div",{id:a,class:[q,e.class,e.theme==="dark"&&`${q}-dark`,`${q}-previewOnly`],style:e.style,ref:r},[i.createVNode(u2,{modelValue:e.modelValue,onChange:s,onHtmlChanged:c,onGetCatalog:d,mdHeadingId:e.mdHeadingId,noMermaid:u,sanitize:e.sanitize,noKatex:n,formatCopiedText:e.formatCopiedText,noHighlight:o,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:f,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});hu.install=e=>(e.component(hu.name,hu),e);const a2={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},Vo=i.defineComponent({name:"NormalFooterToolbar",props:a2,emits:["onClick"],setup(e,t){return()=>{const n=Zh({props:e,ctx:t});return i.createVNode("div",{class:[`${q}-footer-item`,e.disabled&&`${q}-disabled`],onClick:u=>{var o;e.disabled||((o=e.onClick)==null||o.call(e,u),t.emit("onClick",u))}},[n])}}});Vo.install=e=>(e.component(Vo.name,Vo),e);var Mo={exports:{}},me={},Bo={exports:{}},en={},_s;function Es(){if(_s)return en;_s=1;function e(){var r={};return r["align-content"]=!1,r["align-items"]=!1,r["align-self"]=!1,r["alignment-adjust"]=!1,r["alignment-baseline"]=!1,r.all=!1,r["anchor-point"]=!1,r.animation=!1,r["animation-delay"]=!1,r["animation-direction"]=!1,r["animation-duration"]=!1,r["animation-fill-mode"]=!1,r["animation-iteration-count"]=!1,r["animation-name"]=!1,r["animation-play-state"]=!1,r["animation-timing-function"]=!1,r.azimuth=!1,r["backface-visibility"]=!1,r.background=!0,r["background-attachment"]=!0,r["background-clip"]=!0,r["background-color"]=!0,r["background-image"]=!0,r["background-origin"]=!0,r["background-position"]=!0,r["background-repeat"]=!0,r["background-size"]=!0,r["baseline-shift"]=!1,r.binding=!1,r.bleed=!1,r["bookmark-label"]=!1,r["bookmark-level"]=!1,r["bookmark-state"]=!1,r.border=!0,r["border-bottom"]=!0,r["border-bottom-color"]=!0,r["border-bottom-left-radius"]=!0,r["border-bottom-right-radius"]=!0,r["border-bottom-style"]=!0,r["border-bottom-width"]=!0,r["border-collapse"]=!0,r["border-color"]=!0,r["border-image"]=!0,r["border-image-outset"]=!0,r["border-image-repeat"]=!0,r["border-image-slice"]=!0,r["border-image-source"]=!0,r["border-image-width"]=!0,r["border-left"]=!0,r["border-left-color"]=!0,r["border-left-style"]=!0,r["border-left-width"]=!0,r["border-radius"]=!0,r["border-right"]=!0,r["border-right-color"]=!0,r["border-right-style"]=!0,r["border-right-width"]=!0,r["border-spacing"]=!0,r["border-style"]=!0,r["border-top"]=!0,r["border-top-color"]=!0,r["border-top-left-radius"]=!0,r["border-top-right-radius"]=!0,r["border-top-style"]=!0,r["border-top-width"]=!0,r["border-width"]=!0,r.bottom=!1,r["box-decoration-break"]=!0,r["box-shadow"]=!0,r["box-sizing"]=!0,r["box-snap"]=!0,r["box-suppress"]=!0,r["break-after"]=!0,r["break-before"]=!0,r["break-inside"]=!0,r["caption-side"]=!1,r.chains=!1,r.clear=!0,r.clip=!1,r["clip-path"]=!1,r["clip-rule"]=!1,r.color=!0,r["color-interpolation-filters"]=!0,r["column-count"]=!1,r["column-fill"]=!1,r["column-gap"]=!1,r["column-rule"]=!1,r["column-rule-color"]=!1,r["column-rule-style"]=!1,r["column-rule-width"]=!1,r["column-span"]=!1,r["column-width"]=!1,r.columns=!1,r.contain=!1,r.content=!1,r["counter-increment"]=!1,r["counter-reset"]=!1,r["counter-set"]=!1,r.crop=!1,r.cue=!1,r["cue-after"]=!1,r["cue-before"]=!1,r.cursor=!1,r.direction=!1,r.display=!0,r["display-inside"]=!0,r["display-list"]=!0,r["display-outside"]=!0,r["dominant-baseline"]=!1,r.elevation=!1,r["empty-cells"]=!1,r.filter=!1,r.flex=!1,r["flex-basis"]=!1,r["flex-direction"]=!1,r["flex-flow"]=!1,r["flex-grow"]=!1,r["flex-shrink"]=!1,r["flex-wrap"]=!1,r.float=!1,r["float-offset"]=!1,r["flood-color"]=!1,r["flood-opacity"]=!1,r["flow-from"]=!1,r["flow-into"]=!1,r.font=!0,r["font-family"]=!0,r["font-feature-settings"]=!0,r["font-kerning"]=!0,r["font-language-override"]=!0,r["font-size"]=!0,r["font-size-adjust"]=!0,r["font-stretch"]=!0,r["font-style"]=!0,r["font-synthesis"]=!0,r["font-variant"]=!0,r["font-variant-alternates"]=!0,r["font-variant-caps"]=!0,r["font-variant-east-asian"]=!0,r["font-variant-ligatures"]=!0,r["font-variant-numeric"]=!0,r["font-variant-position"]=!0,r["font-weight"]=!0,r.grid=!1,r["grid-area"]=!1,r["grid-auto-columns"]=!1,r["grid-auto-flow"]=!1,r["grid-auto-rows"]=!1,r["grid-column"]=!1,r["grid-column-end"]=!1,r["grid-column-start"]=!1,r["grid-row"]=!1,r["grid-row-end"]=!1,r["grid-row-start"]=!1,r["grid-template"]=!1,r["grid-template-areas"]=!1,r["grid-template-columns"]=!1,r["grid-template-rows"]=!1,r["hanging-punctuation"]=!1,r.height=!0,r.hyphens=!1,r.icon=!1,r["image-orientation"]=!1,r["image-resolution"]=!1,r["ime-mode"]=!1,r["initial-letters"]=!1,r["inline-box-align"]=!1,r["justify-content"]=!1,r["justify-items"]=!1,r["justify-self"]=!1,r.left=!1,r["letter-spacing"]=!0,r["lighting-color"]=!0,r["line-box-contain"]=!1,r["line-break"]=!1,r["line-grid"]=!1,r["line-height"]=!1,r["line-snap"]=!1,r["line-stacking"]=!1,r["line-stacking-ruby"]=!1,r["line-stacking-shift"]=!1,r["line-stacking-strategy"]=!1,r["list-style"]=!0,r["list-style-image"]=!0,r["list-style-position"]=!0,r["list-style-type"]=!0,r.margin=!0,r["margin-bottom"]=!0,r["margin-left"]=!0,r["margin-right"]=!0,r["margin-top"]=!0,r["marker-offset"]=!1,r["marker-side"]=!1,r.marks=!1,r.mask=!1,r["mask-box"]=!1,r["mask-box-outset"]=!1,r["mask-box-repeat"]=!1,r["mask-box-slice"]=!1,r["mask-box-source"]=!1,r["mask-box-width"]=!1,r["mask-clip"]=!1,r["mask-image"]=!1,r["mask-origin"]=!1,r["mask-position"]=!1,r["mask-repeat"]=!1,r["mask-size"]=!1,r["mask-source-type"]=!1,r["mask-type"]=!1,r["max-height"]=!0,r["max-lines"]=!1,r["max-width"]=!0,r["min-height"]=!0,r["min-width"]=!0,r["move-to"]=!1,r["nav-down"]=!1,r["nav-index"]=!1,r["nav-left"]=!1,r["nav-right"]=!1,r["nav-up"]=!1,r["object-fit"]=!1,r["object-position"]=!1,r.opacity=!1,r.order=!1,r.orphans=!1,r.outline=!1,r["outline-color"]=!1,r["outline-offset"]=!1,r["outline-style"]=!1,r["outline-width"]=!1,r.overflow=!1,r["overflow-wrap"]=!1,r["overflow-x"]=!1,r["overflow-y"]=!1,r.padding=!0,r["padding-bottom"]=!0,r["padding-left"]=!0,r["padding-right"]=!0,r["padding-top"]=!0,r.page=!1,r["page-break-after"]=!1,r["page-break-before"]=!1,r["page-break-inside"]=!1,r["page-policy"]=!1,r.pause=!1,r["pause-after"]=!1,r["pause-before"]=!1,r.perspective=!1,r["perspective-origin"]=!1,r.pitch=!1,r["pitch-range"]=!1,r["play-during"]=!1,r.position=!1,r["presentation-level"]=!1,r.quotes=!1,r["region-fragment"]=!1,r.resize=!1,r.rest=!1,r["rest-after"]=!1,r["rest-before"]=!1,r.richness=!1,r.right=!1,r.rotation=!1,r["rotation-point"]=!1,r["ruby-align"]=!1,r["ruby-merge"]=!1,r["ruby-position"]=!1,r["shape-image-threshold"]=!1,r["shape-outside"]=!1,r["shape-margin"]=!1,r.size=!1,r.speak=!1,r["speak-as"]=!1,r["speak-header"]=!1,r["speak-numeral"]=!1,r["speak-punctuation"]=!1,r["speech-rate"]=!1,r.stress=!1,r["string-set"]=!1,r["tab-size"]=!1,r["table-layout"]=!1,r["text-align"]=!0,r["text-align-last"]=!0,r["text-combine-upright"]=!0,r["text-decoration"]=!0,r["text-decoration-color"]=!0,r["text-decoration-line"]=!0,r["text-decoration-skip"]=!0,r["text-decoration-style"]=!0,r["text-emphasis"]=!0,r["text-emphasis-color"]=!0,r["text-emphasis-position"]=!0,r["text-emphasis-style"]=!0,r["text-height"]=!0,r["text-indent"]=!0,r["text-justify"]=!0,r["text-orientation"]=!0,r["text-overflow"]=!0,r["text-shadow"]=!0,r["text-space-collapse"]=!0,r["text-transform"]=!0,r["text-underline-position"]=!0,r["text-wrap"]=!0,r.top=!1,r.transform=!1,r["transform-origin"]=!1,r["transform-style"]=!1,r.transition=!1,r["transition-delay"]=!1,r["transition-duration"]=!1,r["transition-property"]=!1,r["transition-timing-function"]=!1,r["unicode-bidi"]=!1,r["vertical-align"]=!1,r.visibility=!1,r["voice-balance"]=!1,r["voice-duration"]=!1,r["voice-family"]=!1,r["voice-pitch"]=!1,r["voice-range"]=!1,r["voice-rate"]=!1,r["voice-stress"]=!1,r["voice-volume"]=!1,r.volume=!1,r["white-space"]=!1,r.widows=!1,r.width=!0,r["will-change"]=!1,r["word-break"]=!0,r["word-spacing"]=!0,r["word-wrap"]=!0,r["wrap-flow"]=!1,r["wrap-through"]=!1,r["writing-mode"]=!1,r["z-index"]=!1,r}function t(r,a,s){}function n(r,a,s){}var u=/javascript\s*\:/img;function o(r,a){return u.test(a)?"":a}return en.whiteList=e(),en.getDefaultWhiteList=e,en.onAttr=t,en.onIgnoreAttr=n,en.safeAttrValue=o,en}var Ss,Fs;function Ds(){return Fs||(Fs=1,Ss={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,o;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,o=e.length;u<o;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}),Ss}var zo,Ts;function s2(){if(Ts)return zo;Ts=1;var e=Ds();function t(n,u){n=e.trimRight(n),n[n.length-1]!==";"&&(n+=";");var o=n.length,r=!1,a=0,s=0,c="";function d(){if(!r){var h=e.trim(n.slice(a,s)),m=h.indexOf(":");if(m!==-1){var p=e.trim(h.slice(0,m)),w=e.trim(h.slice(m+1));if(p){var x=u(a,c.length,p,w,h);x&&(c+=x+"; ")}}}a=s+1}for(;s<o;s++){var f=n[s];if(f==="/"&&n[s+1]==="*"){var l=n.indexOf("*/",s+2);if(l===-1)break;s=l+1,a=s+1,r=!1}else f==="("?r=!0:f===")"?r=!1:f===";"?r||d():f===`
100
+ `&&d()}return e.trim(c)}return zo=t,zo}var jo,Ns;function c2(){if(Ns)return jo;Ns=1;var e=Es(),t=s2();Ds();function n(r){return r==null}function u(r){var a={};for(var s in r)a[s]=r[s];return a}function o(r){r=u(r||{}),r.whiteList=r.whiteList||e.whiteList,r.onAttr=r.onAttr||e.onAttr,r.onIgnoreAttr=r.onIgnoreAttr||e.onIgnoreAttr,r.safeAttrValue=r.safeAttrValue||e.safeAttrValue,this.options=r}return o.prototype.process=function(r){if(r=r||"",r=r.toString(),!r)return"";var a=this,s=a.options,c=s.whiteList,d=s.onAttr,f=s.onIgnoreAttr,l=s.safeAttrValue,h=t(r,function(m,p,w,x,A){var b=c[w],g=!1;if(b===!0?g=b:typeof b=="function"?g=b(x):b instanceof RegExp&&(g=b.test(x)),g!==!0&&(g=!1),x=l(w,x),!!x){var y={position:p,sourcePosition:m,source:A,isWhite:g};if(g){var k=d(w,x,y);return n(k)?w+":"+x:k}else{var k=f(w,x,y);if(!n(k))return k}}});return h},jo=o,jo}var Ls;function Ho(){return Ls||(Ls=1,function(e,t){var n=Es(),u=c2();function o(a,s){var c=new u(s);return c.process(a)}t=e.exports=o,t.FilterCSS=u;for(var r in n)t[r]=n[r];typeof window<"u"&&(window.filterCSS=e.exports)}(Bo,Bo.exports)),Bo.exports}var Is,Os;function $o(){return Os||(Os=1,Is={indexOf:function(e,t){var n,u;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,u=e.length;n<u;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var u,o;if(Array.prototype.forEach)return e.forEach(t,n);for(u=0,o=e.length;u<o;u++)t.call(n,e[u],u,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}}),Is}var Ps;function Rs(){if(Ps)return me;Ps=1;var e=Ho().FilterCSS,t=Ho().getDefaultWhiteList,n=$o();function u(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var o=new e;function r(E,M,V){}function a(E,M,V){}function s(E,M,V){}function c(E,M,V){}function d(E){return E.replace(l,"&lt;").replace(h,"&gt;")}function f(E,M,V,$){if(V=_(V),M==="href"||M==="src"){if(V=n.trim(V),V==="#")return"#";if(!(V.substr(0,7)==="http://"||V.substr(0,8)==="https://"||V.substr(0,7)==="mailto:"||V.substr(0,4)==="tel:"||V.substr(0,11)==="data:image/"||V.substr(0,6)==="ftp://"||V.substr(0,2)==="./"||V.substr(0,3)==="../"||V[0]==="#"||V[0]==="/"))return""}else if(M==="background"){if(b.lastIndex=0,b.test(V))return""}else if(M==="style"){if(g.lastIndex=0,g.test(V)||(y.lastIndex=0,y.test(V)&&(b.lastIndex=0,b.test(V))))return"";$!==!1&&($=$||o,V=$.process(V))}return V=N(V),V}var l=/</g,h=/>/g,m=/"/g,p=/&quot;/g,w=/&#([a-zA-Z0-9]*);?/gim,x=/&colon;?/gim,A=/&newline;?/gim,b=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,g=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function k(E){return E.replace(m,"&quot;")}function T(E){return E.replace(p,'"')}function D(E){return E.replace(w,function(M,V){return V[0]==="x"||V[0]==="X"?String.fromCharCode(parseInt(V.substr(1),16)):String.fromCharCode(parseInt(V,10))})}function F(E){return E.replace(x,":").replace(A," ")}function U(E){for(var M="",V=0,$=E.length;V<$;V++)M+=E.charCodeAt(V)<32?" ":E.charAt(V);return n.trim(M)}function _(E){return E=T(E),E=D(E),E=F(E),E=U(E),E}function N(E){return E=k(E),E=d(E),E}function L(){return""}function C(E,M){typeof M!="function"&&(M=function(){});var V=!Array.isArray(E);function $(z){return V?!0:n.indexOf(E,z)!==-1}var re=[],te=!1;return{onIgnoreTag:function(z,j,I){if($(z))if(I.isClosing){var B="[/removed]",W=I.position+B.length;return re.push([te!==!1?te:I.position,W]),te=!1,B}else return te||(te=I.position),"[removed]";else return M(z,j,I)},remove:function(z){var j="",I=0;return n.forEach(re,function(B){j+=z.slice(I,B[0]),I=B[1]}),j+=z.slice(I),j}}}function P(E){for(var M="",V=0;V<E.length;){var $=E.indexOf("<!--",V);if($===-1){M+=E.slice(V);break}M+=E.slice(V,$);var re=E.indexOf("-->",$);if(re===-1)break;V=re+3}return M}function R(E){var M=E.split("");return M=M.filter(function(V){var $=V.charCodeAt(0);return $===127?!1:$<=31?$===10||$===13:!0}),M.join("")}return me.whiteList=u(),me.getDefaultWhiteList=u,me.onTag=r,me.onIgnoreTag=a,me.onTagAttr=s,me.onIgnoreTagAttr=c,me.safeAttrValue=f,me.escapeHtml=d,me.escapeQuote=k,me.unescapeQuote=T,me.escapeHtmlEntities=D,me.escapeDangerHtml5Entities=F,me.clearNonPrintableCharacter=U,me.friendlyAttrValue=_,me.escapeAttrValue=N,me.onIgnoreTagStripAll=L,me.StripTagBody=C,me.stripCommentTag=P,me.stripBlankChar=R,me.attributeWrapSign='"',me.cssFilter=o,me.getDefaultCSSWhiteList=t,me}var pu={},Vs;function Ms(){if(Vs)return pu;Vs=1;var e=$o();function t(l){var h=e.spaceIndex(l),m;return h===-1?m=l.slice(1,-1):m=l.slice(1,h+1),m=e.trim(m).toLowerCase(),m.slice(0,1)==="/"&&(m=m.slice(1)),m.slice(-1)==="/"&&(m=m.slice(0,-1)),m}function n(l){return l.slice(0,2)==="</"}function u(l,h,m){var p="",w=0,x=!1,A=!1,b=0,g=l.length,y="",k="";e:for(b=0;b<g;b++){var T=l.charAt(b);if(x===!1){if(T==="<"){x=b;continue}}else if(A===!1){if(T==="<"){p+=m(l.slice(w,b)),x=b,w=b;continue}if(T===">"||b===g-1){p+=m(l.slice(w,x)),k=l.slice(x,b+1),y=t(k),p+=h(x,p.length,y,k,n(k)),w=b+1,x=!1;continue}if(T==='"'||T==="'")for(var D=1,F=l.charAt(b-D);F.trim()===""||F==="=";){if(F==="="){A=T;continue e}F=l.charAt(b-++D)}}else if(T===A){A=!1;continue}}return w<g&&(p+=m(l.substr(w))),p}var o=/[^a-zA-Z0-9\\_:.-]/gim;function r(l,h){var m=0,p=0,w=[],x=!1,A=l.length;function b(D,F){if(D=e.trim(D),D=D.replace(o,"").toLowerCase(),!(D.length<1)){var U=h(D,F||"");U&&w.push(U)}}for(var g=0;g<A;g++){var y=l.charAt(g),k,T;if(x===!1&&y==="="){x=l.slice(m,g),m=g+1,p=l.charAt(m)==='"'||l.charAt(m)==="'"?m:s(l,g+1);continue}if(x!==!1&&g===p){if(T=l.indexOf(y,g+1),T===-1)break;k=e.trim(l.slice(p+1,T)),b(x,k),x=!1,g=T,m=g+1;continue}if(/\s|\n|\t/.test(y))if(l=l.replace(/\s|\n|\t/g," "),x===!1)if(T=a(l,g),T===-1){k=e.trim(l.slice(m,g)),b(k),x=!1,m=g+1;continue}else{g=T-1;continue}else if(T=c(l,g-1),T===-1){k=e.trim(l.slice(m,g)),k=f(k),b(x,k),x=!1,m=g+1;continue}else continue}return m<l.length&&(x===!1?b(l.slice(m)):b(x,f(e.trim(l.slice(m))))),e.trim(w.join(" "))}function a(l,h){for(;h<l.length;h++){var m=l[h];if(m!==" ")return m==="="?h:-1}}function s(l,h){for(;h<l.length;h++){var m=l[h];if(m!==" ")return m==="'"||m==='"'?h:-1}}function c(l,h){for(;h>0;h--){var m=l[h];if(m!==" ")return m==="="?h:-1}}function d(l){return l[0]==='"'&&l[l.length-1]==='"'||l[0]==="'"&&l[l.length-1]==="'"}function f(l){return d(l)?l.substr(1,l.length-2):l}return pu.parseTag=u,pu.parseAttr=r,pu}var Uo,Bs;function l2(){if(Bs)return Uo;Bs=1;var e=Ho().FilterCSS,t=Rs(),n=Ms(),u=n.parseTag,o=n.parseAttr,r=$o();function a(l){return l==null}function s(l){var h=r.spaceIndex(l);if(h===-1)return{html:"",closing:l[l.length-2]==="/"};l=r.trim(l.slice(h+1,-1));var m=l[l.length-1]==="/";return m&&(l=r.trim(l.slice(0,-1))),{html:l,closing:m}}function c(l){var h={};for(var m in l)h[m]=l[m];return h}function d(l){var h={};for(var m in l)Array.isArray(l[m])?h[m.toLowerCase()]=l[m].map(function(p){return p.toLowerCase()}):h[m.toLowerCase()]=l[m];return h}function f(l){l=c(l||{}),l.stripIgnoreTag&&(l.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),l.onIgnoreTag=t.onIgnoreTagStripAll),l.whiteList||l.allowList?l.whiteList=d(l.whiteList||l.allowList):l.whiteList=t.whiteList,this.attributeWrapSign=l.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,l.onTag=l.onTag||t.onTag,l.onTagAttr=l.onTagAttr||t.onTagAttr,l.onIgnoreTag=l.onIgnoreTag||t.onIgnoreTag,l.onIgnoreTagAttr=l.onIgnoreTagAttr||t.onIgnoreTagAttr,l.safeAttrValue=l.safeAttrValue||t.safeAttrValue,l.escapeHtml=l.escapeHtml||t.escapeHtml,this.options=l,l.css===!1?this.cssFilter=!1:(l.css=l.css||{},this.cssFilter=new e(l.css))}return f.prototype.process=function(l){if(l=l||"",l=l.toString(),!l)return"";var h=this,m=h.options,p=m.whiteList,w=m.onTag,x=m.onIgnoreTag,A=m.onTagAttr,b=m.onIgnoreTagAttr,g=m.safeAttrValue,y=m.escapeHtml,k=h.attributeWrapSign,T=h.cssFilter;m.stripBlankChar&&(l=t.stripBlankChar(l)),m.allowCommentTag||(l=t.stripCommentTag(l));var D=!1;m.stripIgnoreTagBody&&(D=t.StripTagBody(m.stripIgnoreTagBody,x),x=D.onIgnoreTag);var F=u(l,function(U,_,N,L,C){var P={sourcePosition:U,position:_,isClosing:C,isWhite:Object.prototype.hasOwnProperty.call(p,N)},R=w(N,L,P);if(!a(R))return R;if(P.isWhite){if(P.isClosing)return"</"+N+">";var E=s(L),M=p[N],V=o(E.html,function($,re){var te=r.indexOf(M,$)!==-1,z=A(N,$,re,te);return a(z)?te?(re=g(N,$,re,T),re?$+"="+k+re+k:$):(z=b(N,$,re,te),a(z)?void 0:z):z});return L="<"+N,V&&(L+=" "+V),E.closing&&(L+=" /"),L+=">",L}else return R=x(N,L,P),a(R)?y(L):R},y);return D&&(F=D.remove(F)),F},Uo=f,Uo}var zs;function d2(){return zs||(zs=1,function(e,t){var n=Rs(),u=Ms(),o=l2();function r(s,c){var d=new o(c);return d.process(s)}t=e.exports=r,t.filterXSS=r,t.FilterXSS=o,function(){for(var s in n)t[s]=n[s];for(var c in u)t[c]=u[c]}(),typeof window<"u"&&(window.filterXSS=e.exports);function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)}(Mo,Mo.exports)),Mo.exports}d2();const tn=i.defineComponent({name:"FMarkdownPreview",props:us,setup(e){return()=>i.createVNode("div",{class:"f-markdown-preview-container"},[i.createVNode(hu,{modelValue:e.content},null)])}});tn.install=e=>{e.component(tn.name,tn)};const Wo="farris-x-preview-bridge",Go=1,qo="assistant.message";function js(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function Hs(e){return e!==null&&typeof e=="object"}function $s(e){if(!Hs(e)||e.source!==Wo||e.v!==Go||e.type!==qo)return!1;const t=e.payload;return!(!Hs(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function f2(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function Us(e,t,n){const u=js(n);try{return e.postMessage({source:Wo,v:Go,type:qo,payload:u},t),!0}catch{return!1}}function Ws(e){const t=e.allowTopAsSource!==!1,n=u=>{var o;f2(u,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(u.origin)||$s(u.data)&&((o=e.onAssistantMessage)==null||o.call(e,u.data.payload)))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}const h2="/platform/common/web/renderer/index.html#/preview",p2="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",m2="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",g2="67441dbb-0219-46f2-b247-51555c317995";function Gs(e){if(e.url)return e.url;const t=e.baseUri??h2,n=e.metadataPath??p2,u=e.projectPath??m2,o=e.baseMetadataId??g2;return`${t}?metadataPath=${encodeURIComponent(n)}&projectPath=${encodeURIComponent(u)}&baseMetadataId=${encodeURIComponent(o)}`}function b2(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=Gs(e),n=new URL(t,window.location.href).origin;return n==="null"||n===""?window.location.origin:n}catch{return null}}const ir=i.defineComponent({name:"ChatPreview",props:rs,setup(e,{expose:t}){const n=i.ref(null),u=i.ref(null),o=i.ref(!1),r=i.ref(!1),a=i.computed(()=>Gs(e.previewConfig??{})),s=i.computed(()=>{var E;return((E=e.previewConfig)==null?void 0:E.contentType)==="markdown"}),c=i.computed(()=>{var E;return Object.keys(((E=e.previewConfig)==null?void 0:E.contentMap)??{})}),d=i.computed(()=>c.value.filter(E=>E).length>0),f=i.ref(),l=i.ref(),h=i.ref(!1);let m=null;i.onBeforeUnmount(()=>{m==null||m(),m=null,L()}),i.watch(()=>[a.value,n.value,s.value],()=>{if(m==null||m(),m=null,s.value)return;const E=n.value;if(!E)return;h.value=!1,o.value=!1,r.value=!1;const M=Date.now(),V=200,$=300,re=1e4;let te=!1,z=null,j=null;j=window.setTimeout(()=>{j=null,te||(r.value=!0)},V);const I=()=>{if(te)return;if(te=!0,z&&(window.clearTimeout(z),z=null),j&&(window.clearTimeout(j),j=null),h.value=!0,C(E),r.value){const K=Date.now()-M,Z=Math.max(0,$-K);setTimeout(()=>{o.value=!0},Z)}else o.value=!0;const W=()=>{var K;return(K=e.onIframeLoad)==null?void 0:K.call(e)};W(),window.setTimeout(W,0),window.setTimeout(W,120)},B=()=>{var W;te||(te=!0,j&&(window.clearTimeout(j),j=null),console.warn("ChatPreview: iframe load timeout"),h.value=!0,o.value=!0,(W=e.onIframeLoad)==null||W.call(e))};E.addEventListener("load",I,{once:!0}),z=window.setTimeout(B,re),m=()=>{E.removeEventListener("load",I),z&&(window.clearTimeout(z),z=null),j&&(window.clearTimeout(j),j=null)}},{flush:"post"}),i.watch([s,()=>{var E;return(E=e.previewConfig)==null?void 0:E.contentMap}],()=>{L(),s.value&&i.nextTick(()=>N())},{flush:"post"}),i.watch(()=>{var E;return(E=e.previewConfig)==null?void 0:E.contentMap},E=>{if(E){const M=Object.keys(E);f.value=M[0]??""}else f.value="";p()},{immediate:!0});function p(E){var M,V;E&&(f.value=E),d.value&&f.value?l.value=((V=(M=e.previewConfig)==null?void 0:M.contentMap)==null?void 0:V[f.value])||"":l.value=""}function w(E){var $;if(s.value||!h.value)return!1;const M=($=n.value)==null?void 0:$.contentWindow;if(!M)return!1;const V=b2(e.previewConfig??{});return V?Us(M,V,E):!1}t({postAssistantPayload:w});const x=i.ref(!1);let A=null;const b=800;function g(){x.value=!0,_(!0),A!=null&&(window.clearTimeout(A),A=null)}function y(){A!=null&&window.clearTimeout(A),A=window.setTimeout(()=>{x.value=!1,_(!1),A=null},b)}function k(){g(),y()}function T(){g()}function D(){y()}let F=[];function U(){const E=u.value;if(!E)return[];const M=[],V=E.querySelectorAll(".f-markdown-preview-container");return V.length>0&&V.forEach($=>M.push($)),M.length===0&&E.scrollHeight>E.clientHeight&&M.push(E),M}function _(E){const M=u.value;M&&M.querySelectorAll(".f-markdown-preview-container").forEach(V=>{V.classList.toggle("f-chat-preview-scrollbar-visible",E)})}function N(){const E=U();F=E,E.forEach(M=>{M.addEventListener("scroll",k,{passive:!0}),M.addEventListener("mouseenter",T),M.addEventListener("mouseleave",D)})}function L(){F.forEach(E=>{E.removeEventListener("scroll",k),E.removeEventListener("mouseenter",T),E.removeEventListener("mouseleave",D)}),F=[]}function C(E){try{const M=E.contentDocument;if(!M)return;const V="f-chat-preview-injected-scrollbar-style";if(M.getElementById(V))return;const $=M.createElement("style");$.id=V,$.textContent=`
101
101
  html, body {
102
102
  scrollbar-width: thin;
103
103
  scrollbar-color: transparent transparent;
@@ -123,7 +123,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},b1=function(t){var n=d
123
123
  body.iframe-scrollbar-visible::-webkit-scrollbar-thumb {
124
124
  background: rgba(0, 0, 0, 0.2);
125
125
  }
126
- `,(R.head||R.documentElement).appendChild(U);const re="f-chat-preview-injected-scrollbar-script";if(R.getElementById(re))return;const te=R.createElement("script");te.id=re,te.textContent=`
126
+ `,(M.head||M.documentElement).appendChild($);const re="f-chat-preview-injected-scrollbar-script";if(M.getElementById(re))return;const te=M.createElement("script");te.id=re,te.textContent=`
127
127
  (function() {
128
128
  var hideTimer = null;
129
129
  var HIDE_DELAY = 800;
@@ -144,8 +144,8 @@ See: https://github.com/francoischalifour/medium-zoom`)}},b1=function(t){var n=d
144
144
  document.addEventListener('mouseenter', show);
145
145
  document.addEventListener('mouseleave', scheduleHide);
146
146
  })();
147
- `,(R.head||R.documentElement).appendChild(te)}catch{}}const H=()=>{var F;return o.createVNode("div",{class:"f-chat-preview-header"},[o.createVNode("div",{class:"f-chat-preview-header-left"},[o.createVNode("button",{class:"f-chat-preview-preview-btn"},[o.createVNode("i",{class:"fx-icon fx-icon-card_info"},null),o.createVNode("span",{class:"f-chat-preview-preview-text"},[((F=e.previewConfig)==null?void 0:F.title)||"预览"])])]),o.createVNode("div",{class:"f-chat-preview-header-right"},[o.createVNode("button",{class:"f-chat-preview-tool-btn",title:"关闭预览","aria-label":"关闭预览",onClick:()=>{var R;return(R=e.onClose)==null?void 0:R.call(e)}},[o.createVNode("i",{class:"fx-icon fx-icon-sidewindow_close"},null)])])])},$=()=>{var F;return d.value?c.value?o.createVNode("div",{class:"d-flex"},[o.createVNode(vn,{class:"f-chat-content-main-layout",direction:"row"},{default:()=>[o.createVNode(ur,{position:"center",resizable:!1,minWidth:100,class:"f-chat-content-main-left"},{default:()=>[o.createVNode("div",{class:"f-chat-preview-content-nav"},[o.createVNode("div",{class:"f-chat-preview-content-nav-title"},[o.createTextVNode("全部文件")]),o.createVNode("div",{class:"f-chat-preview-content-nav-content"},[l.value.map((R,O)=>o.createVNode("div",{key:O,class:["f-chat-preview-content-nav-item",R===f.value?"active-nav-item":""],title:R,onClick:()=>p(R)},[R]))])])]}),o.createVNode(ur,{position:"right",resizable:!0,width:600,class:"f-chat-preview-pane-right"},{default:()=>[o.createVNode(tn,{content:c.value},null)]})]})]):null:o.createVNode(tn,{content:((F=e.previewConfig)==null?void 0:F.content)??""},null)};return()=>o.createVNode("div",{class:"f-chat-preview"},[H(),o.createVNode("div",{ref:u,class:"f-chat-preview-content",style:{overflow:s.value?"auto":"hidden"}},[s.value?$():o.createVNode(o.Fragment,null,[o.withDirectives(o.createVNode("div",{class:["f-chat-preview-skeleton",{"f-chat-preview-skeleton--fade-out":i.value}]},[o.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"60%"}},null),o.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"80%"}},null),o.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"45%"}},null),o.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"70%"}},null),o.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"55%"}},null)]),[[o.vShow,r.value]]),o.createVNode("iframe",{ref:n,name:"preview-iframe",title:"preview-iframe",src:a.value,class:["f-chat-preview-iframe",{"f-chat-preview-iframe--visible":i.value}]},null)])])])}});function g2(e,t){const n=typeof window<"u"?window.AgentWorkbenchSDK:void 0;if(!n){console.warn("[AgentWorkbenchSDK] invoke: window.AgentWorkbenchSDK is not available");return}try{const u=n[e];if(typeof u!="function"){console.warn("[AgentWorkbenchSDK] invoke: not a function:",e);return}return u(...t??[])}catch(u){console.warn("[AgentWorkbenchSDK] invoke error:",e,u);return}}function b2(e){return Ws(e)}let y2=0;const ar=[];function nn(){var e;return((e=ar[ar.length-1])==null?void 0:e.h)??{}}function x2(e){const t=++y2;return ar.push({id:t,h:e}),()=>{const n=ar.findIndex(u=>u.id===t);n>=0&&ar.splice(n,1)}}const w2={showPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},replaceRightPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},closePreviewPane(){var e,t;(t=(e=nn()).closePreviewPane)==null||t.call(e)},closeRightPreview(){var e,t;(t=(e=nn()).closeRightPreview)==null||t.call(e)},showFullScreenPreview(e){var t,n;(n=(t=nn()).showFullScreenPreview)==null||n.call(t,e)},closeFullScreenPreview(){var e,t;(t=(e=nn()).closeFullScreenPreview)==null||t.call(e)},isPreviewLayoutActive(){return typeof nn().showPreview=="function"}};or.install=e=>{e.component(or.name,or)};const Xs={modelValue:{type:Boolean,default:!1},title:{type:[String,Object],default:"标题"},description:{type:[String,Object],default:""},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"},closeOnMask:{type:Boolean,default:!1},showDivider:{type:Boolean,default:!0}},sr=o.defineComponent({name:"FXConfirmDialog",props:Xs,emits:{"update:modelValue":e=>!0,cancel:()=>!0,confirm:()=>!0},setup(e,{emit:t,slots:n}){function u(){t("update:modelValue",!1)}function i(){t("cancel"),u()}function r(){t("confirm"),u()}function a(s){e.closeOnMask&&s.target===s.currentTarget&&i()}return()=>e.modelValue?o.createVNode(o.Teleport,{to:"body"},{default:()=>[o.createVNode("div",{class:"f-chat-confirm-dialog-mask",onClick:a},[o.createVNode("div",{class:"f-chat-confirm-dialog"},[o.createVNode("div",{class:"f-chat-confirm-dialog-title"},[n.title?n.title():e.title]),o.createVNode("div",{class:"f-chat-confirm-dialog-description"},[n.default?n.default():e.description]),o.createVNode("div",{class:["f-chat-confirm-dialog-actions",{"with-divider":e.showDivider}]},[o.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-cancel",onClick:i},[e.cancelText]),o.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-confirm",onClick:r},[e.confirmText])])])])]}):null}});sr.install=e=>{e.component(sr.name,sr)};function qs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,u=Array(t);n<t;n++)u[n]=e[n];return u}function v2(e){if(Array.isArray(e))return e}function A2(e,t,n){return(t=D2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var u,i,r,a,s=[],l=!0,d=!1;try{if(r=(n=n.call(e)).next,t!==0)for(;!(l=(u=r.call(n)).done)&&(s.push(u.value),s.length!==t);l=!0);}catch(f){d=!0,i=f}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return s}}function C2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
148
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);t&&(u=u.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,u)}return n}function Ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zs(Object(n),!0).forEach(function(u){A2(e,u,n[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(u){Object.defineProperty(e,u,Object.getOwnPropertyDescriptor(n,u))})}return e}function E2(e,t){if(e==null)return{};var n,u,i=_2(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(u=0;u<r.length;u++)n=r[u],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _2(e,t){if(e==null)return{};var n={};for(var u in e)if({}.hasOwnProperty.call(e,u)){if(t.indexOf(u)!==-1)continue;n[u]=e[u]}return n}function S2(e,t){return v2(e)||k2(e,t)||T2(e,t)||C2()}function F2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var u=n.call(e,t);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D2(e){var t=F2(e,"string");return typeof t=="symbol"?t:t+""}function T2(e,t){if(e){if(typeof e=="string")return qs(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qs(e,t):void 0}}function N2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ks(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);t&&(u=u.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,u)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ks(Object(n),!0).forEach(function(u){N2(e,u,n[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(u){Object.defineProperty(e,u,Object.getOwnPropertyDescriptor(n,u))})}return e}function L2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(u){return t.reduceRight(function(i,r){return r(i)},u)}}function lr(e){return function t(){for(var n=this,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function pu(e){return{}.toString.call(e).includes("Object")}function I2(e){return!Object.keys(e).length}function cr(e){return typeof e=="function"}function O2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function P2(e,t){return pu(t)||Ut("changeType"),Object.keys(t).some(function(n){return!O2(e,n)})&&Ut("changeField"),t}function R2(e){cr(e)||Ut("selectorType")}function V2(e){cr(e)||pu(e)||Ut("handlerType"),pu(e)&&Object.values(e).some(function(t){return!cr(t)})&&Ut("handlersType")}function M2(e){e||Ut("initialIsRequired"),pu(e)||Ut("initialType"),I2(e)&&Ut("initialContent")}function B2(e,t){throw new Error(e[t]||e.default)}var z2={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ut=lr(B2)(z2),gu={changes:P2,selector:R2,handler:V2,initial:M2};function j2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gu.initial(e),gu.handler(t);var n={current:e},u=lr(U2)(n,t),i=lr($2)(n),r=lr(gu.changes)(e),a=lr(H2)(n);function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return gu.selector(d),d(n.current)}function l(d){L2(u,i,r,a)(d)}return[s,l]}function H2(e,t){return cr(t)?t(e.current):t}function $2(e,t){return e.current=Qs(Qs({},e.current),t),t}function U2(e,t,n){return cr(t)?t(e.current):Object.keys(n).forEach(function(u){var i;return(i=t[u])===null||i===void 0?void 0:i.call(t,e.current[u])}),n}var W2={create:j2},G2={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function X2(e){return function t(){for(var n=this,u=arguments.length,i=new Array(u),r=0;r<u;r++)i[r]=arguments[r];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function q2(e){return{}.toString.call(e).includes("Object")}function Z2(e){return e||el("configIsRequired"),q2(e)||el("configType"),e.urls?(Y2(),{paths:{vs:e.urls.monacoBase}}):e}function Y2(){console.warn(Js.deprecation)}function K2(e,t){throw new Error(e[t]||e.default)}var Js={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
147
+ `,(M.head||M.documentElement).appendChild(te)}catch{}}const P=()=>{var E;return i.createVNode("div",{class:"f-chat-preview-header"},[i.createVNode("div",{class:"f-chat-preview-header-left"},[i.createVNode("button",{class:"f-chat-preview-preview-btn"},[i.createVNode("i",{class:"fx-icon fx-icon-card_info"},null),i.createVNode("span",{class:"f-chat-preview-preview-text"},[((E=e.previewConfig)==null?void 0:E.title)||"预览"])])]),i.createVNode("div",{class:"f-chat-preview-header-right"},[i.createVNode("button",{class:"f-chat-preview-tool-btn",title:"关闭预览","aria-label":"关闭预览",onClick:()=>{var M;return(M=e.onClose)==null?void 0:M.call(e)}},[i.createVNode("i",{class:"fx-icon fx-icon-sidewindow_close"},null)])])])},R=()=>{var E;return d.value?l.value?i.createVNode("div",{class:"d-flex"},[i.createVNode(vn,{class:"f-chat-content-main-layout",direction:"row"},{default:()=>[i.createVNode(ur,{position:"center",resizable:!1,minWidth:100,class:"f-chat-content-main-left"},{default:()=>[i.createVNode("div",{class:"f-chat-preview-content-nav"},[i.createVNode("div",{class:"f-chat-preview-content-nav-title"},[i.createTextVNode("全部文件")]),i.createVNode("div",{class:"f-chat-preview-content-nav-content"},[c.value.map((M,V)=>i.createVNode("div",{key:V,class:["f-chat-preview-content-nav-item",M===f.value?"active-nav-item":""],title:M,onClick:()=>p(M)},[M]))])])]}),i.createVNode(ur,{position:"right",resizable:!0,width:600,class:"f-chat-preview-pane-right"},{default:()=>[i.createVNode(tn,{content:l.value},null)]})]})]):null:i.createVNode(tn,{content:((E=e.previewConfig)==null?void 0:E.content)??""},null)};return()=>i.createVNode("div",{class:"f-chat-preview"},[P(),i.createVNode("div",{ref:u,class:"f-chat-preview-content",style:{overflow:s.value?"auto":"hidden"}},[s.value?R():i.createVNode(i.Fragment,null,[i.withDirectives(i.createVNode("div",{class:["f-chat-preview-skeleton",{"f-chat-preview-skeleton--fade-out":o.value}]},[i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"60%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"80%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"45%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"70%"}},null),i.createVNode("div",{class:"f-chat-preview-skeleton-line",style:{width:"55%"}},null)]),[[i.vShow,r.value]]),i.createVNode("iframe",{ref:n,name:"preview-iframe",title:"preview-iframe",src:a.value,class:["f-chat-preview-iframe",{"f-chat-preview-iframe--visible":o.value}]},null)])])])}});function y2(e,t){const n=typeof window<"u"?window.AgentWorkbenchSDK:void 0;if(!n){console.warn("[AgentWorkbenchSDK] invoke: window.AgentWorkbenchSDK is not available");return}try{const u=n[e];if(typeof u!="function"){console.warn("[AgentWorkbenchSDK] invoke: not a function:",e);return}return u(...t??[])}catch(u){console.warn("[AgentWorkbenchSDK] invoke error:",e,u);return}}function x2(e){return Ws(e)}let w2=0;const ar=[];function nn(){var e;return((e=ar[ar.length-1])==null?void 0:e.h)??{}}function v2(e){const t=++w2;return ar.push({id:t,h:e}),()=>{const n=ar.findIndex(u=>u.id===t);n>=0&&ar.splice(n,1)}}const A2={showPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},replaceRightPreview(e){var t,n;(n=(t=nn()).showPreview)==null||n.call(t,e)},closePreviewPane(){var e,t;(t=(e=nn()).closePreviewPane)==null||t.call(e)},closeRightPreview(){var e,t;(t=(e=nn()).closeRightPreview)==null||t.call(e)},showFullScreenPreview(e){var t,n;(n=(t=nn()).showFullScreenPreview)==null||n.call(t,e)},closeFullScreenPreview(){var e,t;(t=(e=nn()).closeFullScreenPreview)==null||t.call(e)},isPreviewLayoutActive(){return typeof nn().showPreview=="function"}};ir.install=e=>{e.component(ir.name,ir)};const qs={modelValue:{type:Boolean,default:!1},title:{type:[String,Object],default:"标题"},description:{type:[String,Object],default:""},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"},closeOnMask:{type:Boolean,default:!1},showDivider:{type:Boolean,default:!0}},sr=i.defineComponent({name:"FXConfirmDialog",props:qs,emits:{"update:modelValue":e=>!0,cancel:()=>!0,confirm:()=>!0},setup(e,{emit:t,slots:n}){function u(){t("update:modelValue",!1)}function o(){t("cancel"),u()}function r(){t("confirm"),u()}function a(s){e.closeOnMask&&s.target===s.currentTarget&&o()}return()=>e.modelValue?i.createVNode(i.Teleport,{to:"body"},{default:()=>[i.createVNode("div",{class:"f-chat-confirm-dialog-mask",onClick:a},[i.createVNode("div",{class:"f-chat-confirm-dialog"},[i.createVNode("div",{class:"f-chat-confirm-dialog-title"},[n.title?n.title():e.title]),i.createVNode("div",{class:"f-chat-confirm-dialog-description"},[n.default?n.default():e.description]),i.createVNode("div",{class:["f-chat-confirm-dialog-actions",{"with-divider":e.showDivider}]},[i.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-cancel",onClick:o},[e.cancelText]),i.createVNode("button",{type:"button",class:"f-chat-confirm-dialog-btn f-chat-confirm-dialog-btn-confirm",onClick:r},[e.confirmText])])])])]}):null}});sr.install=e=>{e.component(sr.name,sr)};function Xs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,u=Array(t);n<t;n++)u[n]=e[n];return u}function k2(e){if(Array.isArray(e))return e}function C2(e,t,n){return(t=N2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var u,o,r,a,s=[],c=!0,d=!1;try{if(r=(n=n.call(e)).next,t!==0)for(;!(c=(u=r.call(n)).done)&&(s.push(u.value),s.length!==t);c=!0);}catch(f){d=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return s}}function E2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
148
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);t&&(u=u.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,u)}return n}function Ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zs(Object(n),!0).forEach(function(u){C2(e,u,n[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(u){Object.defineProperty(e,u,Object.getOwnPropertyDescriptor(n,u))})}return e}function S2(e,t){if(e==null)return{};var n,u,o=F2(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(u=0;u<r.length;u++)n=r[u],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function F2(e,t){if(e==null)return{};var n={};for(var u in e)if({}.hasOwnProperty.call(e,u)){if(t.indexOf(u)!==-1)continue;n[u]=e[u]}return n}function D2(e,t){return k2(e)||_2(e,t)||L2(e,t)||E2()}function T2(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var u=n.call(e,t);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N2(e){var t=T2(e,"string");return typeof t=="symbol"?t:t+""}function L2(e,t){if(e){if(typeof e=="string")return Xs(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xs(e,t):void 0}}function I2(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ks(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);t&&(u=u.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,u)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ks(Object(n),!0).forEach(function(u){I2(e,u,n[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(u){Object.defineProperty(e,u,Object.getOwnPropertyDescriptor(n,u))})}return e}function O2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(u){return t.reduceRight(function(o,r){return r(o)},u)}}function cr(e){return function t(){for(var n=this,u=arguments.length,o=new Array(u),r=0;r<u;r++)o[r]=arguments[r];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return t.apply(n,[].concat(o,s))}}}function mu(e){return{}.toString.call(e).includes("Object")}function P2(e){return!Object.keys(e).length}function lr(e){return typeof e=="function"}function R2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function V2(e,t){return mu(t)||Wt("changeType"),Object.keys(t).some(function(n){return!R2(e,n)})&&Wt("changeField"),t}function M2(e){lr(e)||Wt("selectorType")}function B2(e){lr(e)||mu(e)||Wt("handlerType"),mu(e)&&Object.values(e).some(function(t){return!lr(t)})&&Wt("handlersType")}function z2(e){e||Wt("initialIsRequired"),mu(e)||Wt("initialType"),P2(e)&&Wt("initialContent")}function j2(e,t){throw new Error(e[t]||e.default)}var H2={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Wt=cr(j2)(H2),gu={changes:V2,selector:M2,handler:B2,initial:z2};function $2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gu.initial(e),gu.handler(t);var n={current:e},u=cr(G2)(n,t),o=cr(W2)(n),r=cr(gu.changes)(e),a=cr(U2)(n);function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return gu.selector(d),d(n.current)}function c(d){O2(u,o,r,a)(d)}return[s,c]}function U2(e,t){return lr(t)?t(e.current):t}function W2(e,t){return e.current=Qs(Qs({},e.current),t),t}function G2(e,t,n){return lr(t)?t(e.current):Object.keys(n).forEach(function(u){var o;return(o=t[u])===null||o===void 0?void 0:o.call(t,e.current[u])}),n}var q2={create:$2},X2={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Z2(e){return function t(){for(var n=this,u=arguments.length,o=new Array(u),r=0;r<u;r++)o[r]=arguments[r];return o.length>=e.length?e.apply(this,o):function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return t.apply(n,[].concat(o,s))}}}function Y2(e){return{}.toString.call(e).includes("Object")}function K2(e){return e||ec("configIsRequired"),Y2(e)||ec("configType"),e.urls?(Q2(),{paths:{vs:e.urls.monacoBase}}):e}function Q2(){console.warn(Js.deprecation)}function J2(e,t){throw new Error(e[t]||e.default)}var Js={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
149
149
  You are using deprecated way of configuration.
150
150
 
151
151
  Instead of using
@@ -154,6 +154,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
154
154
  monaco.config({ paths: { vs: '...' } })
155
155
 
156
156
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
157
- `},el=X2(K2)(Js),Q2={config:Z2},J2=function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];return function(i){return n.reduceRight(function(r,a){return a(r)},i)}};function tl(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],tl(e[n],t[n]))}),Ys(Ys({},e),t)}var em={type:"cancelation",msg:"operation is manually canceled"};function Xi(e){var t=!1,n=new Promise(function(u,i){e.then(function(r){return t?i(em):u(r)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var tm=["monaco"],nm=W2.create({config:G2,isInitialized:!1,resolve:null,reject:null,monaco:null}),nl=S2(nm,2),dr=nl[0],bu=nl[1];function rm(e){var t=Q2.config(e),n=t.monaco,u=E2(t,tm);bu(function(i){return{config:tl(i.config,u),monaco:n}})}function um(){var e=dr(function(t){var n=t.monaco,u=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:u,resolve:i}});if(!e.isInitialized){if(bu({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Xi(qi);if(window.monaco&&window.monaco.editor)return rl(window.monaco),e.resolve(window.monaco),Xi(qi);J2(im,am)(sm)}return Xi(qi)}function im(e){return document.body.appendChild(e)}function om(e){var t=document.createElement("script");return e&&(t.src=e),t}function am(e){var t=dr(function(u){var i=u.config,r=u.reject;return{config:i,reject:r}}),n=om("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function sm(){var e=dr(function(n){var u=n.config,i=n.resolve,r=n.reject;return{config:u,resolve:i,reject:r}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var u=n.m||n;rl(u),e.resolve(u)},function(n){e.reject(n)})}function rl(e){dr().monaco||bu({monaco:e})}function lm(){return dr(function(e){var t=e.monaco;return t})}var qi=new Promise(function(e,t){return bu({resolve:e,reject:t})}),cm={config:rm,init:um,__getMonacoInstance:lm};const ul={content:{type:Object,required:!0}},il=20,dm=16,kn=180;function fm(e){typeof requestIdleCallback<"u"?requestIdleCallback(e,{timeout:500}):setTimeout(e,0)}const fr=o.defineComponent({name:"FXCodingMessage",props:ul,setup(e){const t=o.ref(!0),n=o.ref(!1),u=o.ref(null),i=o.ref(null),r=o.ref(kn),a=o.ref(!1);function s(){t.value=!t.value}function l(){var y,h,b,w;const p=(y=e.content)==null?void 0:y.code;if(!p)return kn;const x=i.value;let k;if(x!=null&&x.getOriginalEditor&&(x!=null&&x.getModifiedEditor)){const C=((h=x.getOriginalEditor().getModel())==null?void 0:h.getLineCount())??0,E=((b=x.getModifiedEditor().getModel())==null?void 0:b.getLineCount())??0;k=C+E}else if(x!=null&&x.getModel)k=((w=x.getModel())==null?void 0:w.getLineCount())??0;else{const{value:C,originalValue:E}=p,_=(C||"").split(`
158
- `).length,z=E?E.split(`
159
- `).length:0;k=E?z+_:_}return dm+k*il}const d=o.computed(()=>(i.value,l()>kn));function f(){n.value=!n.value,r.value=n.value?l():kn,m()}function c(){if(!i.value)return;i.value=null;const v=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(v,{timeout:100}):setTimeout(v,0)}function m(){if(a.value)return;const p=u.value,v=i.value;if(!p||!(v!=null&&v.layout))return;const x=p.clientWidth||p.offsetWidth,k=r.value;requestAnimationFrame(()=>{var y,h;a.value||!i.value||(h=(y=i.value)==null?void 0:y.layout)==null||h.call(y,{width:x,height:k})})}function g(){var p;a.value||!u.value||!((p=e.content)!=null&&p.code)||cm.init().then(v=>{var b;if(a.value||!u.value||!((b=e.content)!=null&&b.code))return;const{value:x,originalValue:k,language:y="typescript"}=e.content.code,h={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:il,padding:{top:8,bottom:8}};if(k){const w=v.editor.createDiffEditor(u.value,{...h,renderSideBySide:!1,renderOverviewRuler:!1});w.setModel({original:v.editor.createModel(k,y),modified:v.editor.createModel(x,y)}),w.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),w.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),o.nextTick(()=>{var E;if(a.value)return;const C=(E=w.getContainerDomNode)==null?void 0:E.call(w);if(C){const _=C.querySelector('.diff-editor-cell.original, [class*="original"]');_&&(_.style.display="none")}}),i.value=w}else{const w=v.editor.create(u.value,{value:x,language:y,...h});i.value=w}r.value=kn,o.nextTick(()=>m())})}return o.onMounted(()=>{fm(()=>{a.value||!u.value||g()})}),o.watch(t,p=>{p&&!a.value&&o.nextTick(()=>m())}),o.onBeforeUnmount(()=>{a.value=!0,c()}),o.watch(()=>{var p,v;return(v=(p=e.content)==null?void 0:p.code)==null?void 0:v.value},()=>{a.value||(n.value?r.value=l():r.value=kn,m())}),()=>{const p=e.content;if(!p)return null;const{message:v,fileIcon:x,fileName:k,code:y}=p;return o.createVNode("div",{class:"f-chat-message-coding"},[o.createVNode("div",{class:"f-chat-coding-message"},[v]),o.createVNode("div",{class:"f-chat-coding-card"},[o.createVNode("div",{class:"f-chat-coding-header",onClick:s,role:"button",tabindex:0,onKeydown:h=>h.key==="Enter"&&s()},[o.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[o.createVNode("span",{class:"f-chat-coding-header-icon"},[o.createVNode("img",{src:x,alt:"",onError:h=>{var b;h.target.style.display="none",(b=h.target.parentElement)==null||b.classList.add("icon-error")}},null),o.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[o.createTextVNode("📄")])]),o.createVNode("span",{class:"f-chat-coding-header-expand"},[o.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])]),o.createVNode("span",{class:"f-chat-coding-header-filename"},[k]),o.createVNode("span",{class:"f-chat-coding-header-stats"},[o.createVNode("span",{class:"f-chat-coding-stat-add"},[o.createTextVNode("+"),y.addedLines]),o.createVNode("span",{class:"f-chat-coding-stat-del"},[o.createTextVNode("-"),y.deletedLines])])]),o.createVNode("div",{style:{display:t.value?"block":"none"}},[o.createVNode("div",{ref:u,class:"f-chat-coding-editor",style:{height:`${r.value}px`}},null),d.value&&o.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:f,"aria-label":n.value?"收起代码":"展开代码",title:n.value?"收起代码":"展开代码"},[o.createVNode("i",{class:["fx-icon fx-icon-expanddown",n.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});fr.install=e=>{e.component(fr.name,fr)};const ol={content:{type:Object,required:!0}};function hm(e){return"file"in e&&"path"in e}const hr=o.defineComponent({name:"FileOperationMessage",props:ol,setup(e){const t=o.ref(!0),n=o.ref({}),u=o.computed(()=>{var l;return!!((l=e.content)!=null&&l.summary)}),i=o.computed(()=>{var d;const l=(d=e.content)==null?void 0:d.summary;return l?`浏览了 ${l.explored} 个文件并查询了 ${l.searched} 个文件`:""});function r(){t.value=!t.value}function a(l){n.value={...n.value,[l]:!n.value[l]}}function s(l){return n.value[l]??!1}return()=>{const l=e.content;if(!l)return null;const{summary:d,operations:f}=l,c=!u.value||t.value;return o.createVNode("div",{class:"f-chat-message-file-operation"},[d&&o.createVNode("div",{class:"f-chat-file-op-summary",onClick:r,role:"button",tabindex:0,onKeydown:m=>m.key==="Enter"&&r()},[o.createVNode("span",{class:"f-chat-file-op-summary-inner"},[o.createVNode("span",{class:"f-chat-file-op-summary-text"},[i.value]),o.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[o.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])])]),c&&o.createVNode("div",{class:"f-chat-file-op-operations"},[f.map((m,g)=>{var p,v,x,k;return o.createVNode("div",{key:g,class:"f-chat-file-op-operation"},[o.createVNode("div",o.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":m.type==="Read","has-details":!!((p=m.details)!=null&&p.length)}],onClick:()=>{var y;return((y=m.details)==null?void 0:y.length)&&a(g)}},(v=m.details)!=null&&v.length?{role:"button",tabIndex:0}:{},{onKeydown:y=>{var h;return((h=m.details)==null?void 0:h.length)&&y.key==="Enter"&&a(g)}}),[o.createVNode("span",{class:"f-chat-file-op-type"},[m.type]),o.createVNode("span",{class:"f-chat-file-op-message-wrap"},[o.createVNode("span",{class:"f-chat-file-op-message"},[m.message]),(x=m.details)!=null&&x.length?o.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:s(g)}]},[o.createVNode("i",{class:s(g)?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)]):null])]),((k=m.details)==null?void 0:k.length)&&s(g)&&o.createVNode("div",{class:"f-chat-file-op-details"},[m.details.map((y,h)=>hm(y)?o.createVNode("div",{key:h,class:"f-chat-file-op-detail-file"},[o.createVNode("span",{class:"f-chat-file-op-file-icon"},[o.createVNode("img",{src:y.icon,alt:"",onError:b=>{const w=b.target;w.style.display="none";const C=w.parentElement;C&&C.classList.add("icon-error")}},null),o.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[o.createTextVNode("📄")])]),o.createVNode("span",{class:"f-chat-file-op-file-name"},[y.file]),o.createVNode("span",{class:"f-chat-file-op-file-path",title:y.path},[y.path])]):o.createVNode("div",{key:h,class:"f-chat-file-op-detail-text"},[o.createVNode("div",{class:"f-chat-file-op-detail-title"},[y.title]),o.createVNode("div",{class:"f-chat-file-op-detail-content"},[y.text])]))])])})])])}}});hr.install=e=>{e.component(hr.name,hr)};const al={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},mm="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",mr=o.defineComponent({name:"FXGenerateProcess",props:al,emits:["closed"],setup(e,t){const n=o.computed(()=>{const d={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return ye(d,e.customClass)}),u=o.computed(()=>Ae({},e.customStyle));function i(){var d,f;return t.slots.icon?t.slots.icon():o.createVNode("div",{class:["fx-generate-process--icon",(d=e.classNames)==null?void 0:d.icon],style:(f=e.styles)==null?void 0:f.icon},[e.icon?Tr(e.icon):o.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:mm},null)])}function r(){var d,f;return e.description&&o.createVNode("p",{class:["fx-generate-process--description",(d=e.classNames)==null?void 0:d.description],style:(f=e.styles)==null?void 0:f.description},[e.description])}function a(){var d,f;return e.progress>0&&o.createVNode("div",{class:["fx-generate-process--progress-text",(d=e.classNames)==null?void 0:d["progress-text"]],style:(f=e.styles)==null?void 0:f["progress-text"]},[e.progress,o.createTextVNode("%")])}function s(){return o.createVNode("div",{class:"fx-generate-process--mask",onClick:d=>{d.stopPropagation()}},null)}function l(d=()=>{}){t.emit("closed",{callback:d})}return o.watch(()=>e.visible,d=>{d||l()}),t.expose({close:l}),()=>{var d,f;return o.createVNode(o.Fragment,null,[e.visible&&s(),e.visible&&o.createVNode("div",{class:n.value,style:u.value},[i(),!e.showProgress&&r(),e.showProgress&&o.createVNode("div",{class:["fx-generate-process--progress-bar",(d=e.classNames)==null?void 0:d["progress-bar"]],style:(f=e.styles)==null?void 0:f["progress-bar"]},[o.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&a()]),e.description&&e.progress>0&&o.createVNode("div",{class:"fx-generate-process--progress"},[r(),o.createTextVNode(" "),a()])])])}}});mr.install=e=>{e.component(mr.name,mr)};const sl={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},pm=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],pr=o.defineComponent({name:"FXChatHistory",props:sl,emits:["itemClick"],setup(e,{emit:t}){const n=a=>{const s=new Date(a),l=new Date;return s.getDate()===l.getDate()&&s.getMonth()===l.getMonth()&&s.getFullYear()===l.getFullYear()},u=a=>{const s=new Date(a),l=new Date;return l.setDate(l.getDate()-7),s>=l&&!n(a)},i=o.computed(()=>{var l;const a={today:[],week:[],older:[]};(l=e.items)==null||l.forEach(d=>{n(d.timestamp)?a.today.push(d):u(d.timestamp)?a.week.push(d):a.older.push(d)});const s=(d,f)=>f.timestamp-d.timestamp;return a.today.sort(s).length||a.week.sort(s).length||a.older.sort(s).length?{today:a.today.sort(s),week:a.week.sort(s),older:a.older.sort(s)}:null}),r=(a,s)=>s.length>0&&o.createVNode("div",{class:"f-chat-history-section"},[o.createVNode("span",{class:"f-chat-history-section-header"},[a]),o.createVNode("div",{class:"d-flex flex-column"},[s.map(l=>o.createVNode("div",{key:l.id,class:"f-chat-history-item",onClick:()=>t("itemClick",l)},[o.createVNode("span",{class:"f-chat-history-item-title"},[l.title])]))])]);return()=>o.createVNode("div",{class:"f-chat-history-manager"},[o.createVNode("div",{class:"f-chat-history-manager-scroll"},[i.value&&pm.map(a=>r(a.label,i.value[a.key]))])])}});pr.install=e=>{e.component(pr.name,pr)};const ll={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var cl=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(cl||{});const dl={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:cl.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},yu=o.defineComponent({name:"FPrompt",props:dl,setup(e){const t=o.computed(()=>!e.id&&e.children&&e.children.length>0),n=o.computed(()=>{var m;let c={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return c=ye(c,(m=e.classNames)==null?void 0:m.item),ye(c,e.customClass)}),u=o.computed(()=>{let c={"fx-prompt--item":!0};return c[`fx-prompt--${e.showType||"none"}`]=!0,c}),i=o.computed(()=>{var m;const c=Ae({},(m=e.styles)==null?void 0:m.item);return Ae(c,e.customStyle)}),r=()=>{var c,m;return e.icon?o.createVNode("div",{class:["fx-prompt--item-icon",(c=e.classNames)==null?void 0:c.icon],style:(m=e.styles)==null?void 0:m.icon},[Tr(e.icon)]):null},a=()=>{var c,m;return e.label?o.createVNode("h6",{class:["fx-prompt--item-label",(c=e.classNames)==null?void 0:c.label],style:(m=e.styles)==null?void 0:m.label},[Rn(e.label)]):null};function s(){var m;const c={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(c["badge-default"]=!0),ye(c,(m=e.classNames)==null?void 0:m.badge)}const l=()=>{var c;return e.badge?o.createVNode("span",{class:s(),style:(c=e.styles)==null?void 0:c.badge},[Rn(e.badge)]):null},d=()=>{var c,m;return e.description?o.createVNode("p",{class:["fx-prompt--item-description",(c=e.classNames)==null?void 0:c.description],style:(m=e.styles)==null?void 0:m.description},[Rn(e.description)]):null},f=()=>{var c,m,g,p;return!e.children||e.children.length===0?null:o.createVNode(Cn,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(c=e.classNames)==null?void 0:c.subItems,customStyle:(m=e.styles)==null?void 0:m.subItems,styles:{item:((g=e.styles)==null?void 0:g.subItem)??{}},classNames:{item:((p=e.classNames)==null?void 0:p.subItem)??""}},null)};return()=>{var c,m;return o.createVNode("div",{class:n.value,style:i.value,onClick:e.onClick},[t.value?f():o.createVNode("div",{class:u.value},[r(),l(),o.createVNode("div",{class:["fx-prompt--item-content",(c=e.classNames)==null?void 0:c.itemContent],style:(m=e.styles)==null?void 0:m.itemContent},[a(),d(),f()])])])}}}),Cn=o.defineComponent({name:"FXPrompts",props:ll,emits:["item-click"],setup(e,t){const n=o.computed(()=>{var f;let d={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return d=ye(d,e.customClass),d=ye(d,(f=e.classNames)==null?void 0:f.root),d});function u(d=null){var c;let f={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return f=ye(f,(c=e.classNames)==null?void 0:c.items),f=ye(f,d==null?void 0:d.customClass),f}function i(d=null){var c;let f={};return(e.gap||e.gap===0)&&(f.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),f=Ae(f,(c=e.styles)==null?void 0:c.items),f=Ae(f,d==null?void 0:d.customStyle),f}const r=(d,f)=>{f.disabled||f.children&&f.children.length>0||t.emit("item-click",d,f)},a=d=>{var f,c;return d!=null&&d.title?o.createVNode("h5",{class:["fx-prompts--title",(f=e.classNames)==null?void 0:f.title],style:(c=e.styles)==null?void 0:c.title},[Rn(d==null?void 0:d.title)]):null};function s(d){return!d.items||d.items.length===0?null:o.createVNode("div",{class:u(d),style:i(d)},[d.items.map((f,c)=>o.createVNode(yu,{key:f.id||`key_${c}`,id:f.id,icon:f.icon,label:f.label,description:f.description,disabled:f.disabled,children:f.children,styles:f.styles||e.styles,classNames:f.classNames||e.classNames,showType:f.showType,customClass:f.customClass,customStyle:f.customStyle,gap:f.gap,badge:f.badge,onClick:m=>r(m,f)},null))])}function l(){return t.slots.footer?t.slots.footer():null}return()=>{var d;return o.createVNode("div",{class:n.value,style:(d=e.styles)==null?void 0:d.root},[t.slots.title&&t.slots.title(),a(e),t.slots.default&&t.slots.default(),s(e),l()])}}});Cn.install=e=>{e.component(Cn.name,Cn),e.component(yu.name,yu)};const fl={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},gr=o.defineComponent({name:"FXSuggestion",props:fl,setup(e,t){const n=o.ref(null),u=o.ref(!1),i=o.ref(!1),r=o.ref({top:0,left:0,height:0}),a=o.ref(-1),s=o.ref(""),l=o.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),d=o.computed(()=>{var k;return(((k=e.items)==null?void 0:k.length)??0)===0}),f=()=>{var z;if(!n.value||d.value)return;if((((z=n.value.textContent)==null?void 0:z.trim())||"")===""){n.value.textContent="",n.value.innerHTML="",v();return}const y=window.getSelection();if(!y||y.rangeCount===0)return;const h=y.getRangeAt(0),b=h.cloneRange();b.selectNodeContents(n.value),b.setEnd(h.endContainer,h.endOffset);const w=b.toString(),C=w.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",C!==-1&&w.substring(C+1).trim()===""&&(n.value.textContent=w.replace(/@$/,`@${e.promptAgentName} `),s.value=n.value.textContent,u.value=!0,h.selectNodeContents(n.value),h.collapse(!1),y.removeAllRanges(),y.addRange(h)),u.value===!1){i.value=!1,a.value=-1;return}if((n.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const M=document.createRange();M.setStart(n.value,0),M.setEnd(h.endContainer,h.endOffset);const{top:I,right:B}=M.getBoundingClientRect(),D=c();r.value={top:I-D-5,left:B+5,height:D},a.value===-1&&(a.value=0),i.value=!0}else i.value=!1,a.value=-1},c=()=>{const y=e.items.length*38-6;return Math.min(y+28+20,e.height)},m=k=>{var w;if(!n.value)return;const y=window.getSelection();if(!y||y.rangeCount===0)return;const h=((w=n.value.textContent)==null?void 0:w.replace(/\s*$/,""))||"";n.value.textContent=`${h} ${k.label}`;const b=y.getRangeAt(0);b.selectNodeContents(n.value),b.collapse(!1),y.removeAllRanges(),y.addRange(b),v()},g=async k=>{if(!i.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(k.key)&&k.preventDefault(),k.key){case"ArrowDown":a.value++,a.value>=e.items.length&&(a.value=0);break;case"ArrowUp":a.value--,a.value<0&&(a.value=e.items.length-1);break;case"Enter":a.value!==-1&&m(e.items[a.value]);break;case"Escape":v();break}await o.nextTick();const y=a.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",h=document.querySelector(y);h==null||h.scrollIntoView({block:"nearest",behavior:"smooth"})},p=k=>{n.value&&!n.value.contains(k.target)&&v()},v=()=>{u.value=!1,i.value=!1,a.value=-1};o.onMounted(()=>{document.addEventListener("click",p)}),o.onUnmounted(()=>{document.removeEventListener("click",p)});const x=k=>{const y=k.iconUrl||"",h=k.icon||"fx-icon fx-icon-sender_task";return o.createVNode(o.Fragment,null,[y?o.createVNode("img",{alt:"suggestion item icon",src:y},null):o.createVNode("i",{class:h},null),o.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[k.label])])};return()=>{var k;return o.createVNode("div",{class:"f-chat-suggestion-container"},[o.createVNode("div",{ref:n,class:"f-chat-suggestion-input",contenteditable:"true",onInput:f,onKeyup:f,onKeydown:g,"data-placeholder":l.value},null),i.value&&o.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${r.value.top}px`,left:`${r.value.left}px`,height:`${r.value.height}px`}},[o.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),o.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(k=e.items)==null?void 0:k.map((y,h)=>o.createVNode("div",{key:h,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":h===a.value}],onClick:()=>m(y),onMouseenter:()=>a.value===h},[x(y)]))])])])}}});gr.install=e=>{e.component(gr.name,gr)};const hl={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},br=o.defineComponent({name:"Todo",props:hl,setup(e){const t=o.ref(!0),n=o.computed(()=>{var i;return(i=e.items)==null?void 0:i.length});function u(){t.value=!t.value}return()=>o.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[o.createVNode("div",{class:"f-chat-todo-message"},[e.message]),o.createVNode("div",{class:"f-chat-todo-list"},[o.createVNode("div",{class:"f-chat-todo-header",onClick:u,role:"button",tabindex:0,onKeydown:i=>i.key==="Enter"&&u()},[o.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[o.createVNode("span",{class:"f-chat-todo-header-icon"},[o.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),o.createVNode("span",{class:"f-chat-todo-header-expand"},[o.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])]),o.createVNode("span",{class:"f-chat-todo-header-label"},[o.createTextVNode("待办任务")]),o.createVNode("span",{class:"f-chat-todo-header-count"},[n.value])]),t.value&&o.createVNode("div",{class:"f-chat-todo-content"},[o.createVNode(er,{items:e.items},null)])])])}});br.install=e=>{e.component(br.name,br),e.component(er.name,er),e.component(iu.name,iu)};const ml={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},yr=o.defineComponent({name:"FXWelcome",props:ml,emits:[],setup(e,t){const n=o.computed(()=>{const a={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(a["fx-welcome--no-description"]=!0),ye(a,e.customClass)}),u=o.computed(()=>Ae({},e.customStyle));function i(){var a,s;return t.slots.icon?t.slots.icon():e.icon?o.createVNode("div",{class:["fx-welcome--icon",(a=e.classNames)==null?void 0:a.icon],style:(s=e.styles)==null?void 0:s.icon},[Tr(e.icon)]):null}function r(){var a,s,l,d,f,c;return t.slots.content?o.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&o.createVNode("div",{class:["fx-welcome--content",(a=e.classNames)==null?void 0:a.content],style:(s=e.styles)==null?void 0:s.content},[e.title&&o.createVNode("h4",{class:["fx-welcome--title",(l=e.classNames)==null?void 0:l.title],style:(d=e.styles)==null?void 0:d.title},[e.title]),e.description&&o.createVNode("p",{class:["fx-welcome--description",(f=e.classNames)==null?void 0:f.description],style:(c=e.styles)==null?void 0:c.description},[e.description])])}return()=>o.createVNode("div",{class:n.value,style:u.value},[i(),r()])}});yr.install=e=>{e.component(yr.name,yr)};const pl={content:{type:Object,required:!0},onOpen:{type:Function}},gm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",bm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",ym="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",gl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",xm="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",xr=o.defineComponent({name:"FChatAttachmentPreview",props:pl,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return gm;case"xlsx":case"xls":return bm;case"ppt":case"mobi":return ym;case"txt":return gl;case"png":case"jpg":case"jpeg":case"gif":return xm;default:return gl}}function n(s){return s.icon?s.icon:t(s.type||"")}function u(s){if(s===0)return"0 B";const l=1024,d=["B","KB","MB","GB"],f=Math.floor(Math.log(s)/Math.log(l));return parseFloat((s/Math.pow(l,f)).toFixed(2))+" "+d[f]}async function i(s){var l;(l=e.onOpen)==null||l.call(e,s)}async function r(s,l){s.stopPropagation(),s.preventDefault();const d=sn(l);d&&await Dr(d,l.name)}function a(s,l){const d=u(s.size||0),f=n(s),c=sn(s);return o.createVNode("div",{key:l,class:"f-chat-attachment-preview-card"},[o.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[o.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>i(s),onKeydown:m=>m.key==="Enter"&&i(s)},[o.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[o.createVNode("img",{src:f,alt:""},null)]),o.createVNode("div",{class:"f-chat-attachment-preview-info"},[o.createVNode("div",{class:"f-chat-attachment-preview-name",title:s.name},[s.name]),o.createVNode("div",{class:"f-chat-attachment-preview-meta"},[d&&o.createVNode("span",null,[d])])])]),c?o.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:m=>r(m,s)},[o.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[o.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),o.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),o.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const s=e.content;if(!s)return null;const{message:l,attachments:d}=s;return o.createVNode("div",{class:"f-chat-attachment-preview"},[l&&o.createVNode("div",{class:"f-chat-attachment-preview-message"},[l]),o.createVNode("div",{class:"f-chat-attachment-preview-list"},[d.map((f,c)=>a(f,c))])])}}});xr.install=e=>{e.component(xr.name,xr)},yn.install=e=>{e.component(yn.name,yn)},xn.install=e=>{e.component(xn.name,xn)};const bl={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},wr=o.defineComponent({name:"FXNav",props:bl,emits:["nav","update:activeNavId"],setup(e,t){const n=o.ref(e.activeNavId),u=o.ref(e.navData);function i(f){if(u.value&&u.value.length){let c=u.value.find(m=>m[e.idField]===f&&m[e.disableField]!==!0);c||(c=u.value.find(m=>m[e.disableField]!==!0)),c&&n.value!==c.id&&(n.value=c.id,t.emit("nav",c))}}o.watch([()=>e.activeNavId,()=>e.navData],([f,c])=>{u.value=c,i(f)});const r=o.computed(()=>e.visible&&u.value.length>0);function a(f){f.disable||f.id===n.value||Promise.resolve().then(()=>{const c=e.navPicking;return c&&typeof c=="function"?c(f):!0}).then(c=>{let m=!0;typeof c=="object"?c.canContinue||(m=!1,c.message&&console.error({message:c.message,position:"top-center"})):m=c,m&&(n.value=f.id,t.emit("update:activeNavId",f.id),t.emit("nav",f))})}const s=o.computed(()=>{const f={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return ye(f,e.customClass)}),l=o.computed(()=>Ae({},e.customStyle));function d(f){u.value=f,i(n.value)}return t.expose({updateNavData:d}),()=>{var f;return r.value&&o.createVNode("div",{class:s.value,style:l.value},[(f=u.value)==null?void 0:f.map(c=>o.createVNode("div",{class:["farris-nav-item",{active:c[e.idField]===n.value},{disabled:c[e.disableField]}],onClick:()=>a(c)},[o.createVNode("div",{class:"farris-nav-item-link pt-3"},[o.createVNode("span",{class:"farris-nav-item-link-text"},[typeof c[e.displayField]=="function"?c[e.displayField]():c[e.displayField],c[e.valueField]&&o.createVNode("div",{class:"farris-nav-item-tag"},[c[e.valueField]<=e.maxNum&&o.createVNode("span",{class:"tag-text"},[c[e.valueField]]),c[e.valueField]>e.maxNum&&o.createVNode("span",{class:"tag-text"},[e.maxNum,o.createTextVNode("+")])])]),o.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});wr.install=e=>{e.component(wr.name,wr)};const yl={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0}},xl={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1}},xu=o.defineComponent({name:"FXSearchBoxContainer",props:xl,emits:["confirmResult","searchedValue"],setup(e,t){const n=o.ref(e.data),u=o.ref(""),i=o.computed(()=>{if(!u.value)return n.value;const d=u.value.toLowerCase();return n.value.filter(f=>String(f[e.textField]??"").toLowerCase().includes(d))});function r(d){u.value=d}function a(d){t.emit("confirmResult",d[e.textField]),t.emit("searchedValue",[d])}function s(d){return t.slots.default?t.slots.default({item:d}):o.createVNode("span",null,[d[e.textField]])}const l=o.computed(()=>{const d={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(d.maxHeight=`${e.maxHeight}px`),d});return o.watch(()=>e.data,d=>{d!==n.value&&(n.value=d)}),t.expose({search:r}),()=>o.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:l.value},[e.loading&&o.createVNode("div",{class:"search-box-loading"},[o.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),o.createVNode("ul",{class:"search-box-list"},[i.value.map(d=>o.createVNode("li",{class:"search-box-item dropdown-item",key:d[e.idField],onClick:()=>a(d)},[s(d)])),!e.loading&&i.value.length===0&&o.createVNode("li",{class:"search-box-empty"},[o.createTextVNode("无匹配结果")])])])}}),vr=o.defineComponent({name:"FXSearchBox",props:yl,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const n=o.ref(),u=o.ref(),i=o.ref(),r=o.ref(e.modelValue),a=o.ref(!1),s='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',l=o.computed(()=>e.loading?s:e.buttonContent);o.watch(r,b=>{var w;(w=i.value)==null||w.search(b),t.emit("update:modelValue",b)}),o.watch(()=>e.modelValue,b=>{r.value=b});function d(b){r.value=b,p()}function f(b){const w=r.value;t.emit("change",b,{oldValue:w,newValue:b})}function c(b){t.emit("selectedValue",b)}function m(){t.emit("clickButton",{})}async function g(){var b;a.value=!0,await o.nextTick(),(b=u.value)==null||b.show(n.value)}function p(){var b;(b=u.value)==null||b.hide(),a.value=!1}function v(){a.value?p():g()}function x(b){const w=b.target.value;r.value=w,f(w),e.showDropdown&&w&&g()}function k(){e.showDropdown&&r.value&&g()}function y(){r.value="",t.emit("update:modelValue",""),p()}t.expose({togglePopup:v,hidePopup:p,showPopup:g});const h=o.computed(()=>{const b=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof b=="string"?[b]:Array.isArray(b)?b:[]]});return()=>o.createVNode("div",{class:h.value},[o.createVNode("div",{class:"f-search-box-input-group",ref:n},[o.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:r.value,disabled:e.disable,onInput:x,onFocus:k},null),r.value&&!e.disable&&o.createVNode("span",{class:"f-search-box-clear",onClick:y},[o.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),o.createVNode("span",{class:"f-search-box-button",onClick:m,innerHTML:l.value},null)]),e.showDropdown&&o.createVNode(Kt,{ref:u,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[o.createVNode(xu,{ref:i,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:b=>c(b),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});vr.install=e=>{e.component(vr.name,vr),e.component(xu.name,xu)};const Zi={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function wm(e){const t=o.ref([...e.data]),n=o.ref([]),u=o.ref(""),i=o.computed(()=>{var m;const c=e.group;return c!=null&&c.enable&&((m=c.groupFields)!=null&&m.length)?r(t.value,c):t.value.map((g,p)=>({type:0,data:g,originalIndex:p}))});function r(c,m){const g=[],p=m.groupFields[0],v=new Map;c.forEach(k=>{const y=String(k[p]??"");v.has(y)||v.set(y,[]),v.get(y).push(k)});let x=0;return v.forEach((k,y)=>{g.push({type:1,data:{[p]:y},groupField:p,groupValue:y,originalIndex:x++}),k.forEach(h=>{g.push({type:0,data:h,groupField:p,groupValue:y,originalIndex:x++})})}),g}function a(c){t.value=[...c],n.value=[],u.value=""}function s(c){u.value=c;const m=t.value.find(g=>g[e.idField]===c);m&&!n.value.includes(m)&&(n.value=[m])}function l(){n.value=[],u.value=""}function d(c){const m=n.value.indexOf(c);m>=0?n.value.splice(m,1):n.value=[c],u.value=c[e.idField]}function f(c){return n.value.includes(c)}return{data:t,visualData:i,selectedItems:n,activeItemId:u,updateDataSource:a,activeRowById:s,clearSelection:l,toggleSelection:d,isSelected:f}}const vm=o.defineComponent({name:"FXListViewItem",props:{...Zi,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const n=o.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>o.createVNode("li",{class:[n.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):o.createVNode("span",null,[e.item[e.textField]])])}}),Am=o.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>o.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):o.createVNode("div",{class:"f-list-view-group-header"},[o.createVNode("i",{class:"fx-icon f-accordion-expand"},null),o.createVNode("span",null,[e.groupValue])])])}}),Ar=o.defineComponent({name:"FXListView",props:Zi,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:u,updateDataSource:i,activeRowById:r,clearSelection:a,toggleSelection:s,isSelected:l}=wm({data:e.data,idField:e.idField,group:e.group}),d=o.computed(()=>ye({"f-list-view":!0},e.customClass));function f(c,m){s(c),t.emit("clickItem",c,m)}return t.expose({updateDataSource:i,activeRowById:r,clearSelection:a}),()=>o.createVNode("div",{class:d.value},[o.createVNode("div",{class:"f-list-view-content"},[o.createVNode("ul",{class:"f-listview-items"},[n.value.map((c,m)=>c.type===1?o.createVNode(Am,{key:`group_${c.groupValue}_${m}`,groupData:c.data,groupField:c.groupField,groupValue:c.groupValue,index:m},{default:t.slots.group}):o.createVNode(vm,{key:`${c.data[e.idField]}_${m}`,item:c.data,index:c.originalIndex,isActive:c.data[e.idField]===u.value,isSelected:l(c.data),itemClass:e.itemClass,textField:e.textField,onClickItem:f},{default:t.slots.content}))])])])}});Ar.install=e=>{e.component(Ar.name,Ar)};const wu=o.defineComponent({name:"FXAgentThinkingMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content,n=t.streamStatus==="end"||t.streamStatus===void 0;return o.createVNode("details",{class:"f-ec-thinking",open:!0},[o.createVNode("summary",{class:"f-ec-thinking-summary"},[o.createTextVNode("思考过程"),n?null:o.createVNode("span",{class:"f-ec-thinking-badge"},[o.createTextVNode("进行中")])]),o.createVNode("div",{class:"f-ec-thinking-body"},[t.text]),t.sources&&t.sources.length>0?o.createVNode("ul",{class:"f-ec-thinking-sources"},[t.sources.map((u,i)=>o.createVNode("li",{key:i},[u]))]):null])}}});wu.install=e=>{e.component(wu.name,wu)};function km(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Cm(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function Em(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const vu=o.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=o.computed(()=>Cm(e.content.media)),n=o.computed(()=>sn(Em(e.content.media)));async function u(i){i.preventDefault(),i.stopPropagation();const r=n.value;r&&await Dr(r,e.content.name)}return()=>{const i=!!n.value;return o.createVNode("div",{class:"f-ec-attach-row"},[o.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[o.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[o.createTextVNode("📎")]),o.createVNode("span",{class:"f-ec-attach-body"},[o.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),o.createVNode("span",{class:"f-ec-attach-meta"},[o.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),o.createVNode("span",{class:"f-ec-attach-size"},[km(e.content.size)])])])]),i?o.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:u},[o.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[o.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),o.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),o.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});vu.install=e=>{e.component(vu.name,vu)};const _m={0:"高",1:"中",2:"低"},Au=o.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return o.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[o.createVNode("div",{class:"f-ec-error-head"},[o.createVNode("span",{class:"f-ec-error-badge"},[_m[t]]),o.createVNode("span",{class:"f-ec-error-label"},[o.createTextVNode("错误提醒")])]),o.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?o.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[o.createTextVNode("查看详情")]):null])}}});Au.install=e=>{e.component(Au.name,Au)};const Wt="__hitl_other__";function ku(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"?t:"text"}const Cu=o.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},onSubmitAnswers:{type:Function,default:void 0}},setup(e){const t=o.ref(!1),n=o.ref({}),u=o.ref({});function i(h){const b={},w={};for(const C of h){const E=ku(C.ui_type);if(E==="confirm")b[C.id]=C.default_value==="true"||C.default_value==="1";else if(E==="text"||E==="select")b[C.id]=C.default_value??"";else if(E==="multi_select")b[C.id]=C.default_value?JSON.parse(C.default_value):[];else if(E==="form"){const _={};if(Array.isArray(C.fields))for(const z of C.fields)_[z.name]=z.default_value??"";b[C.id]=_}else b[C.id]=C.default_value??"";w[C.id]={active:!1,text:""}}n.value=b,u.value=w}o.watch(()=>e.content.questions,h=>{Array.isArray(h)&&h.length&&i(h)},{immediate:!0});const r=o.computed(()=>{var h,b;if(t.value||e.disabled)return!1;for(const w of e.content.questions){const C=ku(w.ui_type),E=n.value[w.id];if(C==="text"&&(typeof E!="string"||E.trim()==="")||C==="select"&&(typeof E!="string"||E.trim()===""||E===Wt&&(((b=(h=u.value[w.id])==null?void 0:h.text)==null?void 0:b.trim())??"")==="")||C==="confirm"&&typeof E!="boolean"||C==="multi_select"&&(!Array.isArray(E)||E.length===0))return!1;if(C==="form"){const _=w.fields??[],z=E;for(const M of _)if(M.required){const I=z[M.name];if(typeof I!="string"||I.trim()==="")return!1}}if((C==="date"||C==="number")&&(typeof E!="string"||E.trim()===""))return!1}return!0});function a(h,b){n.value={...n.value,[h]:b}}function s(h,b){var w;b===Wt?(u.value={...u.value,[h.id]:{...u.value[h.id],active:!0,text:((w=u.value[h.id])==null?void 0:w.text)??""}},a(h.id,Wt)):(u.value={...u.value,[h.id]:{active:!1,text:""}},a(h.id,b))}function l(h,b){const w=n.value[h.id]??[];w.includes(b)?a(h.id,w.filter(C=>C!==b)):a(h.id,[...w,b])}function d(){var b,w,C;if(!r.value)return;const h=[];for(const E of e.content.questions){const _=ku(E.ui_type);let z=n.value[E.id];_==="select"&&z===Wt&&(z=((w=(b=u.value[E.id])==null?void 0:b.text)==null?void 0:w.trim())??""),_==="number"&&(z=Number(z)),h.push({id:E.id,answer:z})}t.value=!0,(C=e.onSubmitAnswers)==null||C.call(e,h)}function f(h){const b=n.value[h.id]??"";return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("input",{class:"f-hitl-input",type:"text",value:b,placeholder:h.placeholder??"请输入",disabled:t.value||e.disabled,onInput:w=>a(h.id,w.target.value)},null)])}function c(h,b){const w=n.value[h.id]??"",C=u.value[h.id]??{active:!1,text:""};return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("div",{class:"f-hitl-select-group"},[b.map(E=>o.createVNode("button",{key:E.label,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":w===E.label&&!C.active}],disabled:t.value||e.disabled,onClick:()=>s(h,E.label)},[o.createVNode("span",{class:"f-hitl-opt__label"},[E.label]),E.description?o.createVNode("span",{class:"f-hitl-opt__desc"},[E.description]):null])),h.allow_other?o.createVNode("button",{type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":w===Wt||C.active}],disabled:t.value||e.disabled,onClick:()=>s(h,Wt)},[o.createTextVNode("其他")]):null]),h.allow_other&&(w===Wt||C.active)?o.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:t.value||e.disabled,onInput:E=>{const _=E.target.value;u.value={...u.value,[h.id]:{active:!0,text:_}},a(h.id,Wt)}},null):null])}function m(h,b){const w=n.value[h.id]??[],C=u.value[h.id]??{active:!1,text:""};return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("div",{class:"f-hitl-select-group"},[b.map(E=>o.createVNode("button",{key:E.label,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":w.includes(E.label)}],disabled:t.value||e.disabled,onClick:()=>l(h,E.label)},[o.createVNode("span",{class:"f-hitl-opt__label"},[E.label]),E.description?o.createVNode("span",{class:"f-hitl-opt__desc"},[E.description]):null])),h.allow_other?o.createVNode("button",{type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":C.active}],disabled:t.value||e.disabled,onClick:()=>{const E=C.text;if(C.active){const _=n.value[h.id]??[];a(h.id,_.filter(z=>z!==E)),u.value={...u.value,[h.id]:{active:!1,text:""}}}else u.value={...u.value,[h.id]:{active:!0,text:C.text}},C.text&&!w.includes(C.text)&&a(h.id,[...w,C.text])}},[o.createTextVNode("其他")]):null]),h.allow_other&&C.active?o.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:t.value||e.disabled,onInput:E=>{const _=E.target.value,z=C.text;u.value={...u.value,[h.id]:{active:!0,text:_}};const M=n.value[h.id]??[];a(h.id,[...M.filter(I=>I!==z),_])}},null):null])}function g(h){const b=n.value[h.id]??{},w=h.fields??[];return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("div",{class:"f-hitl-form-group"},[w.map(C=>{const E=b[C.name]??"";return C.type==="select"?o.createVNode("div",{class:"f-hitl-form-item",key:C.name},[o.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),o.createVNode("div",{class:"f-hitl-select-group"},[(C.options??[]).map(_=>o.createVNode("button",{key:_,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":E===_}],disabled:t.value||e.disabled,onClick:()=>a(h.id,{...b,[C.name]:_})},[_]))])]):C.type==="number"?o.createVNode("div",{class:"f-hitl-form-item",key:C.name},[o.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),o.createVNode("input",{class:"f-hitl-input",type:"number",value:E,min:C.min,max:C.max,disabled:t.value||e.disabled,onInput:_=>a(h.id,{...b,[C.name]:_.target.value})},null)]):C.type==="date"?o.createVNode("div",{class:"f-hitl-form-item",key:C.name},[o.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),o.createVNode("input",{class:"f-hitl-input",type:"date",value:E,disabled:t.value||e.disabled,onInput:_=>a(h.id,{...b,[C.name]:_.target.value})},null)]):o.createVNode("div",{class:"f-hitl-form-item",key:C.name},[o.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),o.createVNode("input",{class:"f-hitl-input",type:"text",value:E,placeholder:C.default_value??"请输入",disabled:t.value||e.disabled,onInput:_=>a(h.id,{...b,[C.name]:_.target.value})},null)])})])])}function p(h){const b=n.value[h.id]??"";return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("input",{class:"f-hitl-input",type:"date",value:b,disabled:t.value||e.disabled,onInput:w=>a(h.id,w.target.value)},null)])}function v(h){const b=n.value[h.id]??"";return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("input",{class:"f-hitl-input",type:"number",value:b,min:h.min,max:h.max,disabled:t.value||e.disabled,onInput:w=>a(h.id,w.target.value)},null)])}function x(h){const b=n.value[h.id];return o.createVNode("div",{class:"f-hitl-field",key:h.id},[h.header?o.createVNode("div",{class:"f-hitl-field__header"},[h.header]):null,o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("div",{class:"f-hitl-confirm"},[o.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":b===!0}],disabled:t.value||e.disabled,onClick:()=>a(h.id,!0)},[o.createTextVNode("是")]),o.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":b===!1}],disabled:t.value||e.disabled,onClick:()=>a(h.id,!1)},[o.createTextVNode("否")])])])}function k(h){return o.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:h.id},[o.createVNode("div",{class:"f-hitl-field__label"},[h.question]),o.createVNode("div",{class:"f-hitl-unsupported"},[o.createTextVNode("暂不支持 ui_type「"),String(h.ui_type),o.createTextVNode("」,请升级前端。")])])}function y(h){const b=ku(h.ui_type);if(b==="text")return f(h);if(b==="multi_select"){const w=Array.isArray(h.options)?h.options:[];return m(h,w)}if(b==="form")return g(h);if(b==="select"){const w=Array.isArray(h.options)?h.options:[];return w.length===0?k({...h,ui_type:"text"}):c(h,w)}return b==="confirm"?x(h):b==="date"?p(h):b==="number"?v(h):k(h)}return()=>o.createVNode("div",{class:"f-hitl-card"},[o.createVNode("div",{class:"f-hitl-card__meta"},[o.createVNode("span",{class:"f-hitl-chip"},[o.createTextVNode("人机协同")])]),o.createVNode("div",{class:"f-hitl-card__body"},[e.content.questions.map(h=>y(h))]),o.createVNode("div",{class:"f-hitl-card__footer"},[o.createVNode("button",{type:"button",class:"f-hitl-submit",disabled:!r.value,onClick:d},[t.value?"已提交":"提交回答"])])])}});Cu.install=e=>{e.component(Cu.name,Cu)};function Sm(e,t){var u;const n=(u=e.pickActions)==null?void 0:u[t];return n||e.pickActionDefault}const Eu=o.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,u)=>{var i;Sm(e.content,u),(i=e.onPick)==null||i.call(e,n)};return()=>o.createVNode("div",{class:"f-ec-recommend"},[e.content.title?o.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,o.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((n,u)=>o.createVNode("button",{key:u,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(n,u)},[n]))])])}});Eu.install=e=>{e.component(Eu.name,Eu)};const _u=o.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return o.createVNode("div",{class:"f-ec-linkcard"},[t.poster?o.createVNode("div",{class:"f-ec-linkcard-poster"},[o.createVNode("img",{src:t.poster,alt:""},null)]):null,o.createVNode("div",{class:"f-ec-linkcard-body"},[o.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?o.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?o.createVNode("div",{class:"f-ec-linkcard-related"},[o.createVNode("div",{class:"f-ec-linkcard-related-label"},[o.createTextVNode("相关阅读")]),o.createVNode("ul",null,[t.relatedLinks.map((n,u)=>o.createVNode("li",{key:u},[o.createVNode("a",{href:n.url,target:"_blank",rel:"noopener noreferrer"},[n.title])]))])]):null])])}}});_u.install=e=>{e.component(_u.name,_u)};const Su=o.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>o.createVNode("div",{class:"f-ec-sources"},[o.createVNode("div",{class:"f-ec-sources-title"},[o.createTextVNode("引用来源")]),o.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,n)=>o.createVNode("li",{key:n},[o.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});Su.install=e=>{e.component(Su.name,Su)};const Fu=o.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>o.createVNode("div",{class:"f-ec-unknown"},[o.createVNode("div",{class:"f-ec-unknown-title"},[o.createTextVNode("未知类型消息")]),e.content.wireType?o.createVNode("div",{class:"f-ec-unknown-wire"},[o.createTextVNode("wire type: "),e.content.wireType]):null,o.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});Fu.install=e=>{e.component(Fu.name,Fu)},tr.install=e=>{e.component(tr.name,tr)};const Fm={install(e){e.use(at).use(nr).use(rr).use(or).use(sr).use(fr).use(hr).use(mr).use(pr).use(mn).use(tn).use(Cn).use(Qt).use(gr).use(br).use(yr).use(xr).use(yn).use(xn).use(Kt).use(vn).use(wr).use(vr).use(Ar)}};N.FXAgentThinking=wu,N.FXAppPreview=at,N.FXAttachmentFile=vu,N.FXAttachmentPreview=xr,N.FXBubble=nr,N.FXBubbleAction=Si,N.FXCarousel=rr,N.FXCarouselItem=ou,N.FXChatPreview=or,N.FXCoding=fr,N.FXConfirmDialog=sr,N.FXDynamicComponent=xn,N.FXErrorReminder=Au,N.FXFileOperation=hr,N.FXGenerateProcess=mr,N.FXHistory=pr,N.FXHitlQuestion=Cu,N.FXInputRecommend=Eu,N.FXLinkCard=_u,N.FXListView=Ar,N.FXMarkdown=mn,N.FXMarkdownPreview=tn,N.FXNav=wr,N.FXPopover=Kt,N.FXPopoverDirective=Za,N.FXPrompt=yu,N.FXPrompts=Cn,N.FXReferenceSources=Su,N.FXSearchBox=vr,N.FXSearchBoxContainer=xu,N.FXSplitter=vn,N.FXSplitterPane=ur,N.FXStartedTodo=Qt,N.FXSuggestion=gr,N.FXTodo=br,N.FXTodoListItemView=iu,N.FXTodoListView=er,N.FXToolUse=wn,N.FXUnknownEnterprise=Fu,N.FXUserAuth=tr,N.FXWelcome=yr,N.FXWidgetContainer=yn,N.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=Gi,N.PREVIEW_BRIDGE_SOURCE=Ui,N.PREVIEW_BRIDGE_VERSION=Wi,N.appPreviewMessageProps=be,N.attachmentPreviewProps=pl,N.bubbleActionProps=Ja,N.bubbleProps=Fr,N.carouselItemProps=ts,N.carouselProps=es,N.chatHistoryProps=sl,N.chatPreviewProps=rs,N.clonePreviewPayloadForPostMessage=js,N.codingMessageProps=ul,N.confirmDialogProps=Xs,N.createPreviewIframeSdk=b2,N.default=Fm,N.extractFileIdFromRuntimeDownloadUrl=lo,N.fileOperationMessageProps=ol,N.generateProcessProps=al,N.getCustomClass=ye,N.getCustomStyle=Ae,N.getDynamicComponentRegistryDebugSnapshot=Ci,N.invokeAgentWorkbenchSdkApi=g2,N.isImageUrl=co,N.isPreviewBridgeAssistantMessage=$s,N.listViewProps=Zi,N.loadDynamicComponent=Ha,N.markdownMessageProps=ba,N.markdownPreviewProps=us,N.navProps=bl,N.normalizeDynamicComponentRegisterClaim=Re,N.peekDynamicComponentRegisterBootstrapId=ch,N.popoverProps=Ga,N.postAssistantToPreviewIframe=Us,N.postDynamicComponentAssistantMessage=ph,N.previewLayoutBridge=w2,N.promptProps=dl,N.promptsProps=ll,N.registerPreviewChromeSdk=x2,N.renderIconNode=Tr,N.renderNode=Rn,N.resolveHrefForAttachmentDownload=sn,N.resolveRuntimeAttachmentDownloadUrl=Bu,N.searchBoxContainerProps=xl,N.searchBoxProps=yl,N.splitterProps=ns,N.startedTodoProps=Ya,N.subscribeAssistantInPreviewIframe=Ws,N.suggestionProps=fl,N.todoListItemProps=Qa,N.todoListViewProps=Ka,N.todoProps=hl,N.triggerAttachmentDownload=Dr,N.unloadDynamicComponent=$a,N.useSequentialStreaming=Nr,N.useStreamingOutput=fo,N.useTimer=zu,N.welcomeProps=ml,N.widgetContainerProps=Ra,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
157
+ `},ec=Z2(J2)(Js),ep={config:K2},tp=function(){for(var t=arguments.length,n=new Array(t),u=0;u<t;u++)n[u]=arguments[u];return function(o){return n.reduceRight(function(r,a){return a(r)},o)}};function tc(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],tc(e[n],t[n]))}),Ys(Ys({},e),t)}var np={type:"cancelation",msg:"operation is manually canceled"};function Xo(e){var t=!1,n=new Promise(function(u,o){e.then(function(r){return t?o(np):u(r)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var rp=["monaco"],up=q2.create({config:X2,isInitialized:!1,resolve:null,reject:null,monaco:null}),nc=D2(up,2),dr=nc[0],bu=nc[1];function op(e){var t=ep.config(e),n=t.monaco,u=S2(t,rp);bu(function(o){return{config:tc(o.config,u),monaco:n}})}function ip(){var e=dr(function(t){var n=t.monaco,u=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:u,resolve:o}});if(!e.isInitialized){if(bu({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Xo(Zo);if(window.monaco&&window.monaco.editor)return rc(window.monaco),e.resolve(window.monaco),Xo(Zo);tp(ap,cp)(lp)}return Xo(Zo)}function ap(e){return document.body.appendChild(e)}function sp(e){var t=document.createElement("script");return e&&(t.src=e),t}function cp(e){var t=dr(function(u){var o=u.config,r=u.reject;return{config:o,reject:r}}),n=sp("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function lp(){var e=dr(function(n){var u=n.config,o=n.resolve,r=n.reject;return{config:u,resolve:o,reject:r}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var u=n.m||n;rc(u),e.resolve(u)},function(n){e.reject(n)})}function rc(e){dr().monaco||bu({monaco:e})}function dp(){return dr(function(e){var t=e.monaco;return t})}var Zo=new Promise(function(e,t){return bu({resolve:e,reject:t})}),fp={config:op,init:ip,__getMonacoInstance:dp};const uc={content:{type:Object,required:!0}},oc=20,hp=16,kn=180;function pp(e){typeof requestIdleCallback<"u"?requestIdleCallback(e,{timeout:500}):setTimeout(e,0)}const fr=i.defineComponent({name:"FXCodingMessage",props:uc,setup(e){const t=i.ref(!0),n=i.ref(!1),u=i.ref(null),o=i.ref(null),r=i.ref(kn),a=i.ref(!1);function s(){t.value=!t.value}function c(){var b,g,y,k;const p=(b=e.content)==null?void 0:b.code;if(!p)return kn;const x=o.value;let A;if(x!=null&&x.getOriginalEditor&&(x!=null&&x.getModifiedEditor)){const T=((g=x.getOriginalEditor().getModel())==null?void 0:g.getLineCount())??0,D=((y=x.getModifiedEditor().getModel())==null?void 0:y.getLineCount())??0;A=T+D}else if(x!=null&&x.getModel)A=((k=x.getModel())==null?void 0:k.getLineCount())??0;else{const{value:T,originalValue:D}=p,F=(T||"").split(`
158
+ `).length,U=D?D.split(`
159
+ `).length:0;A=D?U+F:F}return hp+A*oc}const d=i.computed(()=>(o.value,c()>kn));function f(){n.value=!n.value,r.value=n.value?c():kn,h()}function l(){if(!o.value)return;o.value=null;const w=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(w,{timeout:100}):setTimeout(w,0)}function h(){if(a.value)return;const p=u.value,w=o.value;if(!p||!(w!=null&&w.layout))return;const x=p.clientWidth||p.offsetWidth,A=r.value;requestAnimationFrame(()=>{var b,g;a.value||!o.value||(g=(b=o.value)==null?void 0:b.layout)==null||g.call(b,{width:x,height:A})})}function m(){var p;a.value||!u.value||!((p=e.content)!=null&&p.code)||fp.init().then(w=>{var y;if(a.value||!u.value||!((y=e.content)!=null&&y.code))return;const{value:x,originalValue:A,language:b="typescript"}=e.content.code,g={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:oc,padding:{top:8,bottom:8}};if(A){const k=w.editor.createDiffEditor(u.value,{...g,renderSideBySide:!1,renderOverviewRuler:!1});k.setModel({original:w.editor.createModel(A,b),modified:w.editor.createModel(x,b)}),k.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),k.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),i.nextTick(()=>{var D;if(a.value)return;const T=(D=k.getContainerDomNode)==null?void 0:D.call(k);if(T){const F=T.querySelector('.diff-editor-cell.original, [class*="original"]');F&&(F.style.display="none")}}),o.value=k}else{const k=w.editor.create(u.value,{value:x,language:b,...g});o.value=k}r.value=kn,i.nextTick(()=>h())})}return i.onMounted(()=>{pp(()=>{a.value||!u.value||m()})}),i.watch(t,p=>{p&&!a.value&&i.nextTick(()=>h())}),i.onBeforeUnmount(()=>{a.value=!0,l()}),i.watch(()=>{var p,w;return(w=(p=e.content)==null?void 0:p.code)==null?void 0:w.value},()=>{a.value||(n.value?r.value=c():r.value=kn,h())}),()=>{const p=e.content;if(!p)return null;const{message:w,fileIcon:x,fileName:A,code:b}=p;return i.createVNode("div",{class:"f-chat-message-coding"},[i.createVNode("div",{class:"f-chat-coding-message"},[w]),i.createVNode("div",{class:"f-chat-coding-card"},[i.createVNode("div",{class:"f-chat-coding-header",onClick:s,role:"button",tabindex:0,onKeydown:g=>g.key==="Enter"&&s()},[i.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[i.createVNode("span",{class:"f-chat-coding-header-icon"},[i.createVNode("img",{src:x,alt:"",onError:g=>{var y;g.target.style.display="none",(y=g.target.parentElement)==null||y.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-coding-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])]),i.createVNode("span",{class:"f-chat-coding-header-filename"},[A]),i.createVNode("span",{class:"f-chat-coding-header-stats"},[i.createVNode("span",{class:"f-chat-coding-stat-add"},[i.createTextVNode("+"),b.addedLines]),i.createVNode("span",{class:"f-chat-coding-stat-del"},[i.createTextVNode("-"),b.deletedLines])])]),i.createVNode("div",{style:{display:t.value?"block":"none"}},[i.createVNode("div",{ref:u,class:"f-chat-coding-editor",style:{height:`${r.value}px`}},null),d.value&&i.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:f,"aria-label":n.value?"收起代码":"展开代码",title:n.value?"收起代码":"展开代码"},[i.createVNode("i",{class:["fx-icon fx-icon-expanddown",n.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});fr.install=e=>{e.component(fr.name,fr)};const ic={content:{type:Object,required:!0}};function mp(e){return"file"in e&&"path"in e}const hr=i.defineComponent({name:"FileOperationMessage",props:ic,setup(e){const t=i.ref(!0),n=i.ref({}),u=i.computed(()=>{var c;return!!((c=e.content)!=null&&c.summary)}),o=i.computed(()=>{var d;const c=(d=e.content)==null?void 0:d.summary;return c?`浏览了 ${c.explored} 个文件并查询了 ${c.searched} 个文件`:""});function r(){t.value=!t.value}function a(c){n.value={...n.value,[c]:!n.value[c]}}function s(c){return n.value[c]??!1}return()=>{const c=e.content;if(!c)return null;const{summary:d,operations:f}=c,l=!u.value||t.value;return i.createVNode("div",{class:"f-chat-message-file-operation"},[d&&i.createVNode("div",{class:"f-chat-file-op-summary",onClick:r,role:"button",tabindex:0,onKeydown:h=>h.key==="Enter"&&r()},[i.createVNode("span",{class:"f-chat-file-op-summary-inner"},[i.createVNode("span",{class:"f-chat-file-op-summary-text"},[o.value]),i.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])])]),l&&i.createVNode("div",{class:"f-chat-file-op-operations"},[f.map((h,m)=>{var p,w,x,A;return i.createVNode("div",{key:m,class:"f-chat-file-op-operation"},[i.createVNode("div",i.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":h.type==="Read","has-details":!!((p=h.details)!=null&&p.length)}],onClick:()=>{var b;return((b=h.details)==null?void 0:b.length)&&a(m)}},(w=h.details)!=null&&w.length?{role:"button",tabIndex:0}:{},{onKeydown:b=>{var g;return((g=h.details)==null?void 0:g.length)&&b.key==="Enter"&&a(m)}}),[i.createVNode("span",{class:"f-chat-file-op-type"},[h.type]),i.createVNode("span",{class:"f-chat-file-op-message-wrap"},[i.createVNode("span",{class:"f-chat-file-op-message"},[h.message]),(x=h.details)!=null&&x.length?i.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:s(m)}]},[i.createVNode("i",{class:s(m)?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)]):null])]),((A=h.details)==null?void 0:A.length)&&s(m)&&i.createVNode("div",{class:"f-chat-file-op-details"},[h.details.map((b,g)=>mp(b)?i.createVNode("div",{key:g,class:"f-chat-file-op-detail-file"},[i.createVNode("span",{class:"f-chat-file-op-file-icon"},[i.createVNode("img",{src:b.icon,alt:"",onError:y=>{const k=y.target;k.style.display="none";const T=k.parentElement;T&&T.classList.add("icon-error")}},null),i.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[i.createTextVNode("📄")])]),i.createVNode("span",{class:"f-chat-file-op-file-name"},[b.file]),i.createVNode("span",{class:"f-chat-file-op-file-path",title:b.path},[b.path])]):i.createVNode("div",{key:g,class:"f-chat-file-op-detail-text"},[i.createVNode("div",{class:"f-chat-file-op-detail-title"},[b.title]),i.createVNode("div",{class:"f-chat-file-op-detail-content"},[b.text])]))])])})])])}}});hr.install=e=>{e.component(hr.name,hr)};const ac={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},gp="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",pr=i.defineComponent({name:"FXGenerateProcess",props:ac,emits:["closed"],setup(e,t){const n=i.computed(()=>{const d={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return ye(d,e.customClass)}),u=i.computed(()=>Ae({},e.customStyle));function o(){var d,f;return t.slots.icon?t.slots.icon():i.createVNode("div",{class:["fx-generate-process--icon",(d=e.classNames)==null?void 0:d.icon],style:(f=e.styles)==null?void 0:f.icon},[e.icon?Tr(e.icon):i.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:gp},null)])}function r(){var d,f;return e.description&&i.createVNode("p",{class:["fx-generate-process--description",(d=e.classNames)==null?void 0:d.description],style:(f=e.styles)==null?void 0:f.description},[e.description])}function a(){var d,f;return e.progress>0&&i.createVNode("div",{class:["fx-generate-process--progress-text",(d=e.classNames)==null?void 0:d["progress-text"]],style:(f=e.styles)==null?void 0:f["progress-text"]},[e.progress,i.createTextVNode("%")])}function s(){return i.createVNode("div",{class:"fx-generate-process--mask",onClick:d=>{d.stopPropagation()}},null)}function c(d=()=>{}){t.emit("closed",{callback:d})}return i.watch(()=>e.visible,d=>{d||c()}),t.expose({close:c}),()=>{var d,f;return i.createVNode(i.Fragment,null,[e.visible&&s(),e.visible&&i.createVNode("div",{class:n.value,style:u.value},[o(),!e.showProgress&&r(),e.showProgress&&i.createVNode("div",{class:["fx-generate-process--progress-bar",(d=e.classNames)==null?void 0:d["progress-bar"]],style:(f=e.styles)==null?void 0:f["progress-bar"]},[i.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&a()]),e.description&&e.progress>0&&i.createVNode("div",{class:"fx-generate-process--progress"},[r(),i.createTextVNode(" "),a()])])])}}});pr.install=e=>{e.component(pr.name,pr)};const sc={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},bp=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],mr=i.defineComponent({name:"FXChatHistory",props:sc,emits:["itemClick"],setup(e,{emit:t}){const n=a=>{const s=new Date(a),c=new Date;return s.getDate()===c.getDate()&&s.getMonth()===c.getMonth()&&s.getFullYear()===c.getFullYear()},u=a=>{const s=new Date(a),c=new Date;return c.setDate(c.getDate()-7),s>=c&&!n(a)},o=i.computed(()=>{var c;const a={today:[],week:[],older:[]};(c=e.items)==null||c.forEach(d=>{n(d.timestamp)?a.today.push(d):u(d.timestamp)?a.week.push(d):a.older.push(d)});const s=(d,f)=>f.timestamp-d.timestamp;return a.today.sort(s).length||a.week.sort(s).length||a.older.sort(s).length?{today:a.today.sort(s),week:a.week.sort(s),older:a.older.sort(s)}:null}),r=(a,s)=>s.length>0&&i.createVNode("div",{class:"f-chat-history-section"},[i.createVNode("span",{class:"f-chat-history-section-header"},[a]),i.createVNode("div",{class:"d-flex flex-column"},[s.map(c=>i.createVNode("div",{key:c.id,class:"f-chat-history-item",onClick:()=>t("itemClick",c)},[i.createVNode("span",{class:"f-chat-history-item-title"},[c.title])]))])]);return()=>i.createVNode("div",{class:"f-chat-history-manager"},[i.createVNode("div",{class:"f-chat-history-manager-scroll"},[o.value&&bp.map(a=>r(a.label,o.value[a.key]))])])}});mr.install=e=>{e.component(mr.name,mr)};const cc={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var lc=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(lc||{});const dc={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:lc.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},yu=i.defineComponent({name:"FPrompt",props:dc,setup(e){const t=i.computed(()=>!e.id&&e.children&&e.children.length>0),n=i.computed(()=>{var h;let l={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return l=ye(l,(h=e.classNames)==null?void 0:h.item),ye(l,e.customClass)}),u=i.computed(()=>{let l={"fx-prompt--item":!0};return l[`fx-prompt--${e.showType||"none"}`]=!0,l}),o=i.computed(()=>{var h;const l=Ae({},(h=e.styles)==null?void 0:h.item);return Ae(l,e.customStyle)}),r=()=>{var l,h;return e.icon?i.createVNode("div",{class:["fx-prompt--item-icon",(l=e.classNames)==null?void 0:l.icon],style:(h=e.styles)==null?void 0:h.icon},[Tr(e.icon)]):null},a=()=>{var l,h;return e.label?i.createVNode("h6",{class:["fx-prompt--item-label",(l=e.classNames)==null?void 0:l.label],style:(h=e.styles)==null?void 0:h.label},[Rn(e.label)]):null};function s(){var h;const l={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(l["badge-default"]=!0),ye(l,(h=e.classNames)==null?void 0:h.badge)}const c=()=>{var l;return e.badge?i.createVNode("span",{class:s(),style:(l=e.styles)==null?void 0:l.badge},[Rn(e.badge)]):null},d=()=>{var l,h;return e.description?i.createVNode("p",{class:["fx-prompt--item-description",(l=e.classNames)==null?void 0:l.description],style:(h=e.styles)==null?void 0:h.description},[Rn(e.description)]):null},f=()=>{var l,h,m,p;return!e.children||e.children.length===0?null:i.createVNode(Cn,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(l=e.classNames)==null?void 0:l.subItems,customStyle:(h=e.styles)==null?void 0:h.subItems,styles:{item:((m=e.styles)==null?void 0:m.subItem)??{}},classNames:{item:((p=e.classNames)==null?void 0:p.subItem)??""}},null)};return()=>{var l,h;return i.createVNode("div",{class:n.value,style:o.value,onClick:e.onClick},[t.value?f():i.createVNode("div",{class:u.value},[r(),c(),i.createVNode("div",{class:["fx-prompt--item-content",(l=e.classNames)==null?void 0:l.itemContent],style:(h=e.styles)==null?void 0:h.itemContent},[a(),d(),f()])])])}}}),Cn=i.defineComponent({name:"FXPrompts",props:cc,emits:["item-click"],setup(e,t){const n=i.computed(()=>{var f;let d={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return d=ye(d,e.customClass),d=ye(d,(f=e.classNames)==null?void 0:f.root),d});function u(d=null){var l;let f={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return f=ye(f,(l=e.classNames)==null?void 0:l.items),f=ye(f,d==null?void 0:d.customClass),f}function o(d=null){var l;let f={};return(e.gap||e.gap===0)&&(f.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),f=Ae(f,(l=e.styles)==null?void 0:l.items),f=Ae(f,d==null?void 0:d.customStyle),f}const r=(d,f)=>{f.disabled||f.children&&f.children.length>0||t.emit("item-click",d,f)},a=d=>{var f,l;return d!=null&&d.title?i.createVNode("h5",{class:["fx-prompts--title",(f=e.classNames)==null?void 0:f.title],style:(l=e.styles)==null?void 0:l.title},[Rn(d==null?void 0:d.title)]):null};function s(d){return!d.items||d.items.length===0?null:i.createVNode("div",{class:u(d),style:o(d)},[d.items.map((f,l)=>i.createVNode(yu,{key:f.id||`key_${l}`,id:f.id,icon:f.icon,label:f.label,description:f.description,disabled:f.disabled,children:f.children,styles:f.styles||e.styles,classNames:f.classNames||e.classNames,showType:f.showType,customClass:f.customClass,customStyle:f.customStyle,gap:f.gap,badge:f.badge,onClick:h=>r(h,f)},null))])}function c(){return t.slots.footer?t.slots.footer():null}return()=>{var d;return i.createVNode("div",{class:n.value,style:(d=e.styles)==null?void 0:d.root},[t.slots.title&&t.slots.title(),a(e),t.slots.default&&t.slots.default(),s(e),c()])}}});Cn.install=e=>{e.component(Cn.name,Cn),e.component(yu.name,yu)};const fc={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},gr=i.defineComponent({name:"FXSuggestion",props:fc,setup(e,t){const n=i.ref(null),u=i.ref(!1),o=i.ref(!1),r=i.ref({top:0,left:0,height:0}),a=i.ref(-1),s=i.ref(""),c=i.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),d=i.computed(()=>{var A;return(((A=e.items)==null?void 0:A.length)??0)===0}),f=()=>{var U;if(!n.value||d.value)return;if((((U=n.value.textContent)==null?void 0:U.trim())||"")===""){n.value.textContent="",n.value.innerHTML="",w();return}const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=b.getRangeAt(0),y=g.cloneRange();y.selectNodeContents(n.value),y.setEnd(g.endContainer,g.endOffset);const k=y.toString(),T=k.lastIndexOf(e.promptChar);if(s.value=n.value.textContent||"",T!==-1&&k.substring(T+1).trim()===""&&(n.value.textContent=k.replace(/@$/,`@${e.promptAgentName} `),s.value=n.value.textContent,u.value=!0,g.selectNodeContents(n.value),g.collapse(!1),b.removeAllRanges(),b.addRange(g)),u.value===!1){o.value=!1,a.value=-1;return}if((n.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const _=document.createRange();_.setStart(n.value,0),_.setEnd(g.endContainer,g.endOffset);const{top:N,right:L}=_.getBoundingClientRect(),C=l();r.value={top:N-C-5,left:L+5,height:C},a.value===-1&&(a.value=0),o.value=!0}else o.value=!1,a.value=-1},l=()=>{const b=e.items.length*38-6;return Math.min(b+28+20,e.height)},h=A=>{var k;if(!n.value)return;const b=window.getSelection();if(!b||b.rangeCount===0)return;const g=((k=n.value.textContent)==null?void 0:k.replace(/\s*$/,""))||"";n.value.textContent=`${g} ${A.label}`;const y=b.getRangeAt(0);y.selectNodeContents(n.value),y.collapse(!1),b.removeAllRanges(),b.addRange(y),w()},m=async A=>{if(!o.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(A.key)&&A.preventDefault(),A.key){case"ArrowDown":a.value++,a.value>=e.items.length&&(a.value=0);break;case"ArrowUp":a.value--,a.value<0&&(a.value=e.items.length-1);break;case"Enter":a.value!==-1&&h(e.items[a.value]);break;case"Escape":w();break}await i.nextTick();const b=a.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",g=document.querySelector(b);g==null||g.scrollIntoView({block:"nearest",behavior:"smooth"})},p=A=>{n.value&&!n.value.contains(A.target)&&w()},w=()=>{u.value=!1,o.value=!1,a.value=-1};i.onMounted(()=>{document.addEventListener("click",p)}),i.onUnmounted(()=>{document.removeEventListener("click",p)});const x=A=>{const b=A.iconUrl||"",g=A.icon||"fx-icon fx-icon-sender_task";return i.createVNode(i.Fragment,null,[b?i.createVNode("img",{alt:"suggestion item icon",src:b},null):i.createVNode("i",{class:g},null),i.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[A.label])])};return()=>{var A;return i.createVNode("div",{class:"f-chat-suggestion-container"},[i.createVNode("div",{ref:n,class:"f-chat-suggestion-input",contenteditable:"true",onInput:f,onKeyup:f,onKeydown:m,"data-placeholder":c.value},null),o.value&&i.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${r.value.top}px`,left:`${r.value.left}px`,height:`${r.value.height}px`}},[i.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),i.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(A=e.items)==null?void 0:A.map((b,g)=>i.createVNode("div",{key:g,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":g===a.value}],onClick:()=>h(b),onMouseenter:()=>a.value===g},[x(b)]))])])])}}});gr.install=e=>{e.component(gr.name,gr)};const hc={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},br=i.defineComponent({name:"Todo",props:hc,setup(e){const t=i.ref(!0),n=i.computed(()=>{var o;return(o=e.items)==null?void 0:o.length});function u(){t.value=!t.value}return()=>i.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[i.createVNode("div",{class:"f-chat-todo-message"},[e.message]),i.createVNode("div",{class:"f-chat-todo-list"},[i.createVNode("div",{class:"f-chat-todo-header",onClick:u,role:"button",tabindex:0,onKeydown:o=>o.key==="Enter"&&u()},[i.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[i.createVNode("span",{class:"f-chat-todo-header-icon"},[i.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),i.createVNode("span",{class:"f-chat-todo-header-expand"},[i.createVNode("i",{class:t.value?"fx-icon fx-icon-expanddown":"fx-icon fx-icon-arrow-right"},null)])]),i.createVNode("span",{class:"f-chat-todo-header-label"},[i.createTextVNode("待办任务")]),i.createVNode("span",{class:"f-chat-todo-header-count"},[n.value])]),t.value&&i.createVNode("div",{class:"f-chat-todo-content"},[i.createVNode(er,{items:e.items},null)])])])}});br.install=e=>{e.component(br.name,br),e.component(er.name,er),e.component(ou.name,ou)};const pc={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},yr=i.defineComponent({name:"FXWelcome",props:pc,emits:[],setup(e,t){const n=i.computed(()=>{const a={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(a["fx-welcome--no-description"]=!0),ye(a,e.customClass)}),u=i.computed(()=>Ae({},e.customStyle));function o(){var a,s;return t.slots.icon?t.slots.icon():e.icon?i.createVNode("div",{class:["fx-welcome--icon",(a=e.classNames)==null?void 0:a.icon],style:(s=e.styles)==null?void 0:s.icon},[Tr(e.icon)]):null}function r(){var a,s,c,d,f,l;return t.slots.content?i.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&i.createVNode("div",{class:["fx-welcome--content",(a=e.classNames)==null?void 0:a.content],style:(s=e.styles)==null?void 0:s.content},[e.title&&i.createVNode("h4",{class:["fx-welcome--title",(c=e.classNames)==null?void 0:c.title],style:(d=e.styles)==null?void 0:d.title},[e.title]),e.description&&i.createVNode("p",{class:["fx-welcome--description",(f=e.classNames)==null?void 0:f.description],style:(l=e.styles)==null?void 0:l.description},[e.description])])}return()=>i.createVNode("div",{class:n.value,style:u.value},[o(),r()])}});yr.install=e=>{e.component(yr.name,yr)};const mc={content:{type:Object,required:!0},onOpen:{type:Function}},yp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",xp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",wp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",gc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",vp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",xr=i.defineComponent({name:"FChatAttachmentPreview",props:mc,emits:[],setup(e){function t(s){switch(s.toLowerCase()){case"doc":case"docx":return yp;case"xlsx":case"xls":return xp;case"ppt":case"mobi":return wp;case"txt":return gc;case"png":case"jpg":case"jpeg":case"gif":return vp;default:return gc}}function n(s){return s.icon?s.icon:t(s.type||"")}function u(s){if(s===0)return"0 B";const c=1024,d=["B","KB","MB","GB"],f=Math.floor(Math.log(s)/Math.log(c));return parseFloat((s/Math.pow(c,f)).toFixed(2))+" "+d[f]}async function o(s){var c;(c=e.onOpen)==null||c.call(e,s)}async function r(s,c){s.stopPropagation(),s.preventDefault();const d=sn(c);d&&await Dr(d,c.name)}function a(s,c){const d=u(s.size||0),f=n(s),l=sn(s);return i.createVNode("div",{key:c,class:"f-chat-attachment-preview-card"},[i.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[i.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>o(s),onKeydown:h=>h.key==="Enter"&&o(s)},[i.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[i.createVNode("img",{src:f,alt:""},null)]),i.createVNode("div",{class:"f-chat-attachment-preview-info"},[i.createVNode("div",{class:"f-chat-attachment-preview-name",title:s.name},[s.name]),i.createVNode("div",{class:"f-chat-attachment-preview-meta"},[d&&i.createVNode("span",null,[d])])])]),l?i.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:h=>r(h,s)},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const s=e.content;if(!s)return null;const{message:c,attachments:d}=s;return i.createVNode("div",{class:"f-chat-attachment-preview"},[c&&i.createVNode("div",{class:"f-chat-attachment-preview-message"},[c]),i.createVNode("div",{class:"f-chat-attachment-preview-list"},[d.map((f,l)=>a(f,l))])])}}});xr.install=e=>{e.component(xr.name,xr)},yn.install=e=>{e.component(yn.name,yn)},xn.install=e=>{e.component(xn.name,xn)};const bc={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},wr=i.defineComponent({name:"FXNav",props:bc,emits:["nav","update:activeNavId"],setup(e,t){const n=i.ref(e.activeNavId),u=i.ref(e.navData);function o(f){if(u.value&&u.value.length){let l=u.value.find(h=>h[e.idField]===f&&h[e.disableField]!==!0);l||(l=u.value.find(h=>h[e.disableField]!==!0)),l&&n.value!==l.id&&(n.value=l.id,t.emit("nav",l))}}i.watch([()=>e.activeNavId,()=>e.navData],([f,l])=>{u.value=l,o(f)});const r=i.computed(()=>e.visible&&u.value.length>0);function a(f){f.disable||f.id===n.value||Promise.resolve().then(()=>{const l=e.navPicking;return l&&typeof l=="function"?l(f):!0}).then(l=>{let h=!0;typeof l=="object"?l.canContinue||(h=!1,l.message&&console.error({message:l.message,position:"top-center"})):h=l,h&&(n.value=f.id,t.emit("update:activeNavId",f.id),t.emit("nav",f))})}const s=i.computed(()=>{const f={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return ye(f,e.customClass)}),c=i.computed(()=>Ae({},e.customStyle));function d(f){u.value=f,o(n.value)}return t.expose({updateNavData:d}),()=>{var f;return r.value&&i.createVNode("div",{class:s.value,style:c.value},[(f=u.value)==null?void 0:f.map(l=>i.createVNode("div",{class:["farris-nav-item",{active:l[e.idField]===n.value},{disabled:l[e.disableField]}],onClick:()=>a(l)},[i.createVNode("div",{class:"farris-nav-item-link pt-3"},[i.createVNode("span",{class:"farris-nav-item-link-text"},[typeof l[e.displayField]=="function"?l[e.displayField]():l[e.displayField],l[e.valueField]&&i.createVNode("div",{class:"farris-nav-item-tag"},[l[e.valueField]<=e.maxNum&&i.createVNode("span",{class:"tag-text"},[l[e.valueField]]),l[e.valueField]>e.maxNum&&i.createVNode("span",{class:"tag-text"},[e.maxNum,i.createTextVNode("+")])])]),i.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});wr.install=e=>{e.component(wr.name,wr)};const yc={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0}},xc={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1}},xu=i.defineComponent({name:"FXSearchBoxContainer",props:xc,emits:["confirmResult","searchedValue"],setup(e,t){const n=i.ref(e.data),u=i.ref(""),o=i.computed(()=>{if(!u.value)return n.value;const d=u.value.toLowerCase();return n.value.filter(f=>String(f[e.textField]??"").toLowerCase().includes(d))});function r(d){u.value=d}function a(d){t.emit("confirmResult",d[e.textField]),t.emit("searchedValue",[d])}function s(d){return t.slots.default?t.slots.default({item:d}):i.createVNode("span",null,[d[e.textField]])}const c=i.computed(()=>{const d={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(d.maxHeight=`${e.maxHeight}px`),d});return i.watch(()=>e.data,d=>{d!==n.value&&(n.value=d)}),t.expose({search:r}),()=>i.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:c.value},[e.loading&&i.createVNode("div",{class:"search-box-loading"},[i.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),i.createVNode("ul",{class:"search-box-list"},[o.value.map(d=>i.createVNode("li",{class:"search-box-item dropdown-item",key:d[e.idField],onClick:()=>a(d)},[s(d)])),!e.loading&&o.value.length===0&&i.createVNode("li",{class:"search-box-empty"},[i.createTextVNode("无匹配结果")])])])}}),vr=i.defineComponent({name:"FXSearchBox",props:yc,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const n=i.ref(),u=i.ref(),o=i.ref(),r=i.ref(e.modelValue),a=i.ref(!1),s='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',c=i.computed(()=>e.loading?s:e.buttonContent);i.watch(r,y=>{var k;(k=o.value)==null||k.search(y),t.emit("update:modelValue",y)}),i.watch(()=>e.modelValue,y=>{r.value=y});function d(y){r.value=y,p()}function f(y){const k=r.value;t.emit("change",y,{oldValue:k,newValue:y})}function l(y){t.emit("selectedValue",y)}function h(){t.emit("clickButton",{})}async function m(){var y;a.value=!0,await i.nextTick(),(y=u.value)==null||y.show(n.value)}function p(){var y;(y=u.value)==null||y.hide(),a.value=!1}function w(){a.value?p():m()}function x(y){const k=y.target.value;r.value=k,f(k),e.showDropdown&&k&&m()}function A(){e.showDropdown&&r.value&&m()}function b(){r.value="",t.emit("update:modelValue",""),p()}t.expose({togglePopup:w,hidePopup:p,showPopup:m});const g=i.computed(()=>{const y=ye({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof y=="string"?[y]:Array.isArray(y)?y:[]]});return()=>i.createVNode("div",{class:g.value},[i.createVNode("div",{class:"f-search-box-input-group",ref:n},[i.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:r.value,disabled:e.disable,onInput:x,onFocus:A},null),r.value&&!e.disable&&i.createVNode("span",{class:"f-search-box-clear",onClick:b},[i.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),i.createVNode("span",{class:"f-search-box-button",onClick:h,innerHTML:c.value},null)]),e.showDropdown&&i.createVNode(Kt,{ref:u,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost},{default:()=>[i.createVNode(xu,{ref:o,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:d,onSearchedValue:y=>l(y),loading:e.loading,maxHeight:e.maxHeight},t.slots)]})])}});vr.install=e=>{e.component(vr.name,vr),e.component(xu.name,xu)};const Yo={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function Ap(e){const t=i.ref([...e.data]),n=i.ref([]),u=i.ref(""),o=i.computed(()=>{var h;const l=e.group;return l!=null&&l.enable&&((h=l.groupFields)!=null&&h.length)?r(t.value,l):t.value.map((m,p)=>({type:0,data:m,originalIndex:p}))});function r(l,h){const m=[],p=h.groupFields[0],w=new Map;l.forEach(A=>{const b=String(A[p]??"");w.has(b)||w.set(b,[]),w.get(b).push(A)});let x=0;return w.forEach((A,b)=>{m.push({type:1,data:{[p]:b},groupField:p,groupValue:b,originalIndex:x++}),A.forEach(g=>{m.push({type:0,data:g,groupField:p,groupValue:b,originalIndex:x++})})}),m}function a(l){t.value=[...l],n.value=[],u.value=""}function s(l){u.value=l;const h=t.value.find(m=>m[e.idField]===l);h&&!n.value.includes(h)&&(n.value=[h])}function c(){n.value=[],u.value=""}function d(l){const h=n.value.indexOf(l);h>=0?n.value.splice(h,1):n.value=[l],u.value=l[e.idField]}function f(l){return n.value.includes(l)}return{data:t,visualData:o,selectedItems:n,activeItemId:u,updateDataSource:a,activeRowById:s,clearSelection:c,toggleSelection:d,isSelected:f}}const kp=i.defineComponent({name:"FXListViewItem",props:{...Yo,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const n=i.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>i.createVNode("li",{class:[n.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):i.createVNode("span",null,[e.item[e.textField]])])}}),Cp=i.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>i.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):i.createVNode("div",{class:"f-list-view-group-header"},[i.createVNode("i",{class:"fx-icon f-accordion-expand"},null),i.createVNode("span",null,[e.groupValue])])])}}),Ar=i.defineComponent({name:"FXListView",props:Yo,emits:["clickItem"],setup(e,t){const{visualData:n,activeItemId:u,updateDataSource:o,activeRowById:r,clearSelection:a,toggleSelection:s,isSelected:c}=Ap({data:e.data,idField:e.idField,group:e.group}),d=i.computed(()=>ye({"f-list-view":!0},e.customClass));function f(l,h){s(l),t.emit("clickItem",l,h)}return t.expose({updateDataSource:o,activeRowById:r,clearSelection:a}),()=>i.createVNode("div",{class:d.value},[i.createVNode("div",{class:"f-list-view-content"},[i.createVNode("ul",{class:"f-listview-items"},[n.value.map((l,h)=>l.type===1?i.createVNode(Cp,{key:`group_${l.groupValue}_${h}`,groupData:l.data,groupField:l.groupField,groupValue:l.groupValue,index:h},{default:t.slots.group}):i.createVNode(kp,{key:`${l.data[e.idField]}_${h}`,item:l.data,index:l.originalIndex,isActive:l.data[e.idField]===u.value,isSelected:c(l.data),itemClass:e.itemClass,textField:e.textField,onClickItem:f},{default:t.slots.content}))])])])}});Ar.install=e=>{e.component(Ar.name,Ar)};const wu=i.defineComponent({name:"FXAgentThinkingMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content,n=t.streamStatus==="end"||t.streamStatus===void 0;return i.createVNode("details",{class:"f-ec-thinking",open:!0},[i.createVNode("summary",{class:"f-ec-thinking-summary"},[i.createTextVNode("思考过程"),n?null:i.createVNode("span",{class:"f-ec-thinking-badge"},[i.createTextVNode("进行中")])]),i.createVNode("div",{class:"f-ec-thinking-body"},[t.text]),t.sources&&t.sources.length>0?i.createVNode("ul",{class:"f-ec-thinking-sources"},[t.sources.map((u,o)=>i.createVNode("li",{key:o},[u]))]):null])}}});wu.install=e=>{e.component(wu.name,wu)};function _p(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ep(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function Sp(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const vu=i.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=i.computed(()=>Ep(e.content.media)),n=i.computed(()=>sn(Sp(e.content.media)));async function u(o){o.preventDefault(),o.stopPropagation();const r=n.value;r&&await Dr(r,e.content.name)}return()=>{const o=!!n.value;return i.createVNode("div",{class:"f-ec-attach-row"},[i.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[i.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[i.createTextVNode("📎")]),i.createVNode("span",{class:"f-ec-attach-body"},[i.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),i.createVNode("span",{class:"f-ec-attach-meta"},[i.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),i.createVNode("span",{class:"f-ec-attach-size"},[_p(e.content.size)])])])]),o?i.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:u},[i.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[i.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),i.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});vu.install=e=>{e.component(vu.name,vu)};const Fp={0:"高",1:"中",2:"低"},Au=i.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return i.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[i.createVNode("div",{class:"f-ec-error-head"},[i.createVNode("span",{class:"f-ec-error-badge"},[Fp[t]]),i.createVNode("span",{class:"f-ec-error-label"},[i.createTextVNode("错误提醒")])]),i.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?i.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[i.createTextVNode("查看详情")]):null])}}});Au.install=e=>{e.component(Au.name,Au)};const Nt="__hitl_other__";function ku(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"?t:"text"}const Cu=i.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},pinned:{type:Boolean,default:!1},onSubmitAnswers:{type:Function,default:void 0}},setup(e){const t=i.ref(!1),n=i.ref(0),u=i.ref({}),o=i.ref({});function r(_){const N={},L={};for(const C of _){const P=ku(C.ui_type);if(P==="confirm")N[C.id]=C.default_value==="true"||C.default_value==="1";else if(P==="text"||P==="select")N[C.id]=C.default_value??"";else if(P==="multi_select")N[C.id]=C.default_value?JSON.parse(C.default_value):[];else if(P==="form"){const R={};if(Array.isArray(C.fields))for(const E of C.fields)R[E.name]=E.default_value??"";N[C.id]=R}else N[C.id]=C.default_value??"";L[C.id]={active:!1,text:""}}u.value=N,o.value=L,n.value=0}i.watch(()=>e.content.questions,_=>{Array.isArray(_)&&_.length&&r(_)},{immediate:!0});const a=i.computed(()=>e.content.questions.length),s=i.computed(()=>{const _=e.content.questions;if(_.length===0)return null;const N=Math.max(0,Math.min(n.value,_.length-1));return _[N]}),c=i.computed(()=>n.value<=0),d=i.computed(()=>n.value>=a.value-1);function f(){d.value||(n.value+=1)}function l(){c.value||(n.value-=1)}const h=i.computed(()=>{var _,N;if(t.value||e.disabled)return!1;for(const L of e.content.questions){const C=ku(L.ui_type),P=u.value[L.id];if(C==="text"&&(typeof P!="string"||P.trim()==="")||C==="select"&&(typeof P!="string"||P.trim()===""||P===Nt&&(((N=(_=o.value[L.id])==null?void 0:_.text)==null?void 0:N.trim())??"")==="")||C==="confirm"&&typeof P!="boolean"||C==="multi_select"&&(!Array.isArray(P)||P.length===0))return!1;if(C==="form"){const R=L.fields??[],E=P;for(const M of R)if(M.required){const V=E[M.name];if(typeof V!="string"||V.trim()==="")return!1}}if((C==="date"||C==="number")&&(typeof P!="string"||P.trim()===""))return!1}return!0});function m(_,N){u.value={...u.value,[_]:N}}function p(_,N){var L;N===Nt?(o.value={...o.value,[_.id]:{...o.value[_.id],active:!0,text:((L=o.value[_.id])==null?void 0:L.text)??""}},m(_.id,Nt)):(o.value={...o.value,[_.id]:{active:!1,text:""}},m(_.id,N))}function w(_,N){const L=u.value[_.id]??[];L.includes(N)?m(_.id,L.filter(C=>C!==N)):m(_.id,[...L,N])}function x(){var N,L,C;if(!h.value)return;const _=[];for(const P of e.content.questions){const R=ku(P.ui_type);let E=u.value[P.id];R==="select"&&E===Nt&&(E=((L=(N=o.value[P.id])==null?void 0:N.text)==null?void 0:L.trim())??""),R==="number"&&(E=Number(E)),_.push({id:P.id,answer:E})}t.value=!0,(C=e.onSubmitAnswers)==null||C.call(e,_)}function A(_,N,L){return i.createVNode("div",{class:"f-hitl-date-wrap"},[i.createVNode("input",{class:"f-hitl-input",type:"date",value:_,disabled:N,onInput:C=>L(C.target.value)},null)])}function b(_,N,L,C,P){const R=V=>{let $=Number(_)||0;$+=V,C!==void 0&&($=Math.max(C,$)),P!==void 0&&($=Math.min(P,$)),L(String($))},E=P!==void 0&&Number(_||0)>=P,M=C!==void 0&&Number(_||0)<=C;return i.createVNode("div",{class:"f-hitl-num-wrap"},[i.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:_,min:C,max:P,disabled:N,onInput:V=>L(V.target.value)},null),i.createVNode("div",{class:"f-hitl-num-btns"},[i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:N||E,onClick:()=>R(1)},[i.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),i.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:N||M,onClick:()=>R(-1)},[i.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function g(_,N){const L=u.value[_.id]??"",C=o.value[_.id]??{active:!1,text:""},P=t.value||e.disabled;return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.map((R,E)=>{const M=L===R.label&&!C.active;return i.createVNode("div",{key:R.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":M}],onClick:()=>{P||p(_,R.label)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[E+1]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[R.label]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[M?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}),_.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":L===Nt||C.active}],onClick:()=>{P||p(_,Nt)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[i.createTextVNode("...")]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[i.createTextVNode("其他")]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[L===Nt||C.active?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),_.allow_other&&(L===Nt||C.active)?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:P,onInput:R=>{const E=R.target.value;o.value={...o.value,[_.id]:{active:!0,text:E}},m(_.id,Nt)}},null):null])}function y(_,N){const L=u.value[_.id]??[],C=o.value[_.id]??{active:!1,text:""},P=t.value||e.disabled;return i.createVNode("div",{key:_.id},[i.createVNode("div",{class:"f-hitl-option-list"},[N.map((R,E)=>{const M=L.includes(R.label);return i.createVNode("div",{key:R.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":M}],onClick:()=>{P||w(_,R.label)}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[E+1]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[R.label]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[M?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}),_.allow_other?i.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":C.active}],onClick:()=>{if(P)return;const R=C.text;if(C.active){const E=u.value[_.id]??[];m(_.id,E.filter(M=>M!==R)),o.value={...o.value,[_.id]:{active:!1,text:""}}}else o.value={...o.value,[_.id]:{active:!0,text:C.text}},C.text&&!L.includes(C.text)&&m(_.id,[...L,C.text])}},[i.createVNode("span",{class:"f-hitl-opt-row__index"},[i.createTextVNode("...")]),i.createVNode("span",{class:"f-hitl-opt-row__label"},[i.createTextVNode("其他")]),i.createVNode("span",{class:"f-hitl-opt-row__check"},[C.active?i.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),_.allow_other&&C.active?i.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:C.text,placeholder:"请输入自定义内容",disabled:P,onInput:R=>{const E=R.target.value,M=C.text;o.value={...o.value,[_.id]:{active:!0,text:E}};const V=u.value[_.id]??[];m(_.id,[...V.filter($=>$!==M),E])}},null):null])}function k(_){const N=u.value[_.id]??{},L=_.fields??[];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-form-group"},[L.map(C=>{const P=N[C.name]??"";return C.type==="select"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),i.createVNode("div",{class:"f-hitl-select-group"},[(C.options??[]).map(R=>i.createVNode("button",{key:R,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":P===R}],disabled:t.value||e.disabled,onClick:()=>m(_.id,{...N,[C.name]:R})},[R]))])]):C.type==="number"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),b(P,t.value||e.disabled,R=>m(_.id,{...N,[C.name]:R}),C.min,C.max)]):C.type==="date"?i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),A(P,t.value||e.disabled,R=>m(_.id,{...N,[C.name]:R}))]):i.createVNode("div",{class:"f-hitl-form-item",key:C.name},[i.createVNode("div",{class:"f-hitl-form-item__label"},[C.label]),i.createVNode("input",{class:"f-hitl-input",type:"text",value:P,placeholder:C.default_value??"请输入",disabled:t.value||e.disabled,onInput:R=>m(_.id,{...N,[C.name]:R.target.value})},null)])})])])}function T(_){const N=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[A(N,t.value||e.disabled,L=>m(_.id,L))])}function D(_){const N=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[b(N,t.value||e.disabled,L=>m(_.id,L),_.min,_.max)])}function F(_){const N=ku(_.ui_type);if(N==="text"){const L=u.value[_.id]??"";return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("input",{class:"f-hitl-input",type:"text",value:L,placeholder:_.placeholder??"请输入",disabled:t.value||e.disabled,onInput:C=>m(_.id,C.target.value)},null)])}if(N==="multi_select"){const L=Array.isArray(_.options)?_.options:[];return y(_,L)}if(N==="form")return k(_);if(N==="select"){const L=Array.isArray(_.options)?_.options:[];return L.length===0?i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持空的 select,请升级前端。")])]):g(_,L)}if(N==="confirm"){const L=u.value[_.id];return i.createVNode("div",{class:"f-hitl-field",key:_.id},[i.createVNode("div",{class:"f-hitl-confirm"},[i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":L===!0}],disabled:t.value||e.disabled,onClick:()=>m(_.id,!0)},[i.createTextVNode("是")]),i.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":L===!1}],disabled:t.value||e.disabled,onClick:()=>m(_.id,!1)},[i.createTextVNode("否")])])])}return N==="date"?T(_):N==="number"?D(_):i.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:_.id},[i.createVNode("div",{class:"f-hitl-unsupported"},[i.createTextVNode("暂不支持 ui_type「"),String(_.ui_type),i.createTextVNode("」,请升级前端。")])])}function U(){return a.value<=1?null:i.createVNode("div",{class:"f-hitl-pagination"},[i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:c.value,onClick:l},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-left"},null)]),i.createVNode("span",{class:"f-hitl-pagination__text"},[n.value+1,i.createTextVNode("/"),a.value]),i.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:d.value,onClick:f},[i.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}return()=>{const _=s.value;if(!_)return null;const N=e.pinned&&!t.value?"f-hitl-card--pinned":"";return i.createVNode("div",{class:["f-hitl-card",N]},[i.createVNode("div",{class:"f-hitl-card__header"},[i.createVNode("div",{class:"f-hitl-card__title-wrap"},[i.createVNode("span",{class:"f-hitl-card__title"},[_.question]),i.createVNode("span",{class:"f-hitl-card__subtitle"},[_.header])]),U()]),i.createVNode("div",{class:"f-hitl-card__body"},[F(_)]),i.createVNode("div",{class:"f-hitl-card__footer"},[i.createVNode("button",{type:"button",class:"f-hitl-submit",disabled:!h.value,onClick:x},[t.value?"已提交":"提交"])])])}}});Cu.install=e=>{e.component(Cu.name,Cu)};function Dp(e,t){var u;const n=(u=e.pickActions)==null?void 0:u[t];return n||e.pickActionDefault}const _u=i.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(n,u)=>{var o;Dp(e.content,u),(o=e.onPick)==null||o.call(e,n)};return()=>i.createVNode("div",{class:"f-ec-recommend"},[e.content.title?i.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,i.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((n,u)=>i.createVNode("button",{key:u,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(n,u)},[n]))])])}});_u.install=e=>{e.component(_u.name,_u)};const Eu=i.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return i.createVNode("div",{class:"f-ec-linkcard"},[t.poster?i.createVNode("div",{class:"f-ec-linkcard-poster"},[i.createVNode("img",{src:t.poster,alt:""},null)]):null,i.createVNode("div",{class:"f-ec-linkcard-body"},[i.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?i.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?i.createVNode("div",{class:"f-ec-linkcard-related"},[i.createVNode("div",{class:"f-ec-linkcard-related-label"},[i.createTextVNode("相关阅读")]),i.createVNode("ul",null,[t.relatedLinks.map((n,u)=>i.createVNode("li",{key:u},[i.createVNode("a",{href:n.url,target:"_blank",rel:"noopener noreferrer"},[n.title])]))])]):null])])}}});Eu.install=e=>{e.component(Eu.name,Eu)};const Su=i.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-sources"},[i.createVNode("div",{class:"f-ec-sources-title"},[i.createTextVNode("引用来源")]),i.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,n)=>i.createVNode("li",{key:n},[i.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});Su.install=e=>{e.component(Su.name,Su)};const Fu=i.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>i.createVNode("div",{class:"f-ec-unknown"},[i.createVNode("div",{class:"f-ec-unknown-title"},[i.createTextVNode("未知类型消息")]),e.content.wireType?i.createVNode("div",{class:"f-ec-unknown-wire"},[i.createTextVNode("wire type: "),e.content.wireType]):null,i.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});Fu.install=e=>{e.component(Fu.name,Fu)},tr.install=e=>{e.component(tr.name,tr)};const Tp={install(e){e.use(at).use(nr).use(rr).use(ir).use(sr).use(fr).use(hr).use(pr).use(mr).use(pn).use(tn).use(Cn).use(Qt).use(gr).use(br).use(yr).use(xr).use(yn).use(xn).use(Kt).use(vn).use(wr).use(vr).use(Ar)}};O.FXAgentThinking=wu,O.FXAppPreview=at,O.FXAttachmentFile=vu,O.FXAttachmentPreview=xr,O.FXBubble=nr,O.FXBubbleAction=Fo,O.FXCarousel=rr,O.FXCarouselItem=iu,O.FXChatPreview=ir,O.FXCoding=fr,O.FXConfirmDialog=sr,O.FXDynamicComponent=xn,O.FXErrorReminder=Au,O.FXFileOperation=hr,O.FXGenerateProcess=pr,O.FXHistory=mr,O.FXHitlQuestion=Cu,O.FXInputRecommend=_u,O.FXLinkCard=Eu,O.FXListView=Ar,O.FXMarkdown=pn,O.FXMarkdownPreview=tn,O.FXNav=wr,O.FXPopover=Kt,O.FXPopoverDirective=Za,O.FXPrompt=yu,O.FXPrompts=Cn,O.FXReferenceSources=Su,O.FXSearchBox=vr,O.FXSearchBoxContainer=xu,O.FXSplitter=vn,O.FXSplitterPane=ur,O.FXStartedTodo=Qt,O.FXSuggestion=gr,O.FXTodo=br,O.FXTodoListItemView=ou,O.FXTodoListView=er,O.FXToolUse=wn,O.FXUnknownEnterprise=Fu,O.FXUserAuth=tr,O.FXWelcome=yr,O.FXWidgetContainer=yn,O.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=qo,O.PREVIEW_BRIDGE_SOURCE=Wo,O.PREVIEW_BRIDGE_VERSION=Go,O.appPreviewMessageProps=be,O.attachmentPreviewProps=mc,O.bubbleActionProps=Ja,O.bubbleProps=Fr,O.carouselItemProps=ts,O.carouselProps=es,O.chatHistoryProps=sc,O.chatPreviewProps=rs,O.clonePreviewPayloadForPostMessage=js,O.codingMessageProps=uc,O.confirmDialogProps=qs,O.createPreviewIframeSdk=x2,O.default=Tp,O.extractFileIdFromRuntimeDownloadUrl=li,O.fileOperationMessageProps=ic,O.generateProcessProps=ac,O.getCustomClass=ye,O.getCustomStyle=Ae,O.getDynamicComponentRegistryDebugSnapshot=_o,O.invokeAgentWorkbenchSdkApi=y2,O.isImageUrl=di,O.isPreviewBridgeAssistantMessage=$s,O.listViewProps=Yo,O.loadDynamicComponent=Ha,O.markdownMessageProps=ba,O.markdownPreviewProps=us,O.navProps=bc,O.normalizeDynamicComponentRegisterClaim=Re,O.peekDynamicComponentRegisterBootstrapId=lh,O.popoverProps=Ga,O.postAssistantToPreviewIframe=Us,O.postDynamicComponentAssistantMessage=mh,O.previewLayoutBridge=A2,O.promptProps=dc,O.promptsProps=cc,O.registerPreviewChromeSdk=v2,O.renderIconNode=Tr,O.renderNode=Rn,O.resolveHrefForAttachmentDownload=sn,O.resolveRuntimeAttachmentDownloadUrl=Bu,O.searchBoxContainerProps=xc,O.searchBoxProps=yc,O.splitterProps=ns,O.startedTodoProps=Ya,O.subscribeAssistantInPreviewIframe=Ws,O.suggestionProps=fc,O.todoListItemProps=Qa,O.todoListViewProps=Ka,O.todoProps=hc,O.triggerAttachmentDownload=Dr,O.unloadDynamicComponent=$a,O.useSequentialStreaming=Nr,O.useStreamingOutput=fi,O.useTimer=zu,O.welcomeProps=pc,O.widgetContainerProps=Ra,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});